From be7983a042933cb306d0dfb02bca838ca8b04f56 Mon Sep 17 00:00:00 2001 From: Fabiano Amaral Freitas Date: Tue, 21 Sep 2021 17:59:22 -0300 Subject: [PATCH] feat: add suport for ECS Tasks --- README.md | 197 +++++++++++++++++++++++----------------------- action.yml | 15 ++-- dist/index.js | 82 ++++++++++++------- dist/index.js.map | 2 +- index.js | 84 +++++++++++++------- index.test.js | 15 +--- package.json | 9 +-- wait.js | 10 --- 8 files changed, 226 insertions(+), 188 deletions(-) delete mode 100644 wait.js diff --git a/README.md b/README.md index 7f0f2f3..e4e4bf5 100644 --- a/README.md +++ b/README.md @@ -1,116 +1,113 @@ -# Create a JavaScript Action +## ecs-task-def-replacements -

- javscript-action status -

+Help on aws ECS deploy, getting the current task running on a service, or the latest revision from a task definition family, replacing any field on the running/latest task definition. -Use this template to bootstrap the creation of a JavaScript action.:rocket: +Plays nice with: -This template includes tests, linting, a validation workflow, publishing, and versioning guidance. +- https://github.com/marketplace/actions/amazon-ecs-deploy-task-definition-action-for-github-actions -If you are new, there's also a simpler introduction. See the [Hello World JavaScript Action](https://github.com/actions/hello-world-javascript-action) +- https://github.com/marketplace/actions/configure-aws-credentials-action-for-github-actions -## Create an action from this template +- https://github.com/marketplace/actions/amazon-ecr-login-action-for-github-actions -Click the `Use this Template` and provide the new repo details for your action +## Usage for ECS service -## Code in Main +Case you are using for get the currently running task definition (**not** the last revision, this is very useful when the last task definition isn't running on serive, maybe because a rollback), you need to specify the cluster name and service name -Install the dependencies - -```bash -npm install +```yml +- name: Retrieve trask def + uses: pagarme/ecs-task-def-replacements@main + id: task + with: + cluster-name: my-ecs-cluster + service-name: my-service-name + replacements: | + { + "containerDefinitions": [{ + "image": "my-new-image" + }] + } ``` -Run the tests :heavy_check_mark: - -```bash -$ npm test - - PASS ./index.test.js - ✓ throws invalid number (3ms) - ✓ wait 500 ms (504ms) - ✓ test runs (95ms) -... +If you are interested to get the last revision of a task definition, you can use in this way + +```yml +- name: Retrieve trask def + uses: pagarme/ecs-task-def-replacements@main + id: task + with: + task-name: my-task-name + replacements: | + { + "containerDefinitions": [{ + "image": "my-new-image" + }] + } ``` -## Change action.yml - -The action.yml defines the inputs and output for your action. - -Update the action.yml with your name, description, inputs and outputs for your action. - -See the [documentation](https://help.github.com/en/articles/metadata-syntax-for-github-actions) - -## Change the Code - -Most toolkit and CI/CD operations involve async operations so the action is run in an async function. - -```javascript -const core = require('@actions/core'); -... - -async function run() { - try { - ... - } - catch (error) { - core.setFailed(error.message); - } -} - -run() +## Pipeline that use this Action + +```yml +name: Build and Deploy +on: + push: + branches: + - main +jobs: + build_and_deploy: + runs-on: ubuntu-20.04 + steps: + - name: Checkout and set Output + id: checkout_code + uses: actions/checkout@v2 + + - name: Configure AWS credentials + id: login_aws_credentials + uses: aws-actions/configure-aws-credentials@v1 + with: + aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} + aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} + aws-region: us-east-1 + mask-aws-account-id: 'no' + + - name: Login to Amazon ECR + id: login-ecr + uses: aws-actions/amazon-ecr-login@v1 + + - name: Build, tag, and push image to Amazon ECR + id: build + env: + ECR_REGISTRY: ${{ steps.login-ecr.outputs.registry }} + ECR_REPOSITORY: my-service-repository + run: | + docker build -t $ECR_REGISTRY/$ECR_REPOSITORY:${GITHUB_SHA::7} --build-arg DD_VERSION=${GITHUB_SHA::7} . + docker push $ECR_REGISTRY/$ECR_REPOSITORY:${GITHUB_SHA::7} + echo "::set-output name=image::$ECR_REGISTRY/$ECR_REPOSITORY:${GITHUB_SHA::7}" + + - name: Retrieve trask def + uses: pagarme/ecs-task-def-replacements@main + id: task + with: + cluster-name: my-cluster + service-name: my-service + replacements: | + { + "containerDefinitions": [{ + "image": "${{ steps.build.outputs.image }}" + }] + } + + - name: Deploy to Amazon ECS + uses: aws-actions/amazon-ecs-deploy-task-definition@v1 + with: + task-definition: ${{ steps.task.outputs.taskDef }} + service: my-service + cluster: my-cluster + wait-for-service-stability: true ``` -See the [toolkit documentation](https://github.com/actions/toolkit/blob/master/README.md#packages) for the various packages. - -## Package for distribution - -GitHub Actions will run the entry point from the action.yml. Packaging assembles the code into one file that can be checked in to Git, enabling fast and reliable execution and preventing the need to check in node_modules. - -Actions are run from GitHub repos. Packaging the action will create a packaged action in the dist folder. - -Run prepare - -```bash -npm run prepare -``` +## About us -Since the packaged index.js is run from the dist folder. - -```bash -git add dist -``` - -## Create a release branch - -Users shouldn't consume the action from master since that would be latest code and actions can break compatibility between major versions. - -Checkin to the v1 release branch - -```bash -git checkout -b v1 -git commit -a -m "v1 release" -``` - -```bash -git push origin v1 -``` - -Note: We recommend using the `--license` option for ncc, which will create a license file for all of the production node modules used in your project. - -Your action is now published! :rocket: - -See the [versioning documentation](https://github.com/actions/toolkit/blob/master/docs/action-versioning.md) - -## Usage - -You can now consume the action by referencing the v1 branch - -```yaml -uses: actions/javascript-action@v1 -with: - milliseconds: 1000 -``` +[Pagar.me](https://pagar.me) is a Brazilian Fintech focused in processing online payments, making life easier for Brazilian entrepreneurs. -See the [actions tab](https://github.com/actions/javascript-action/actions) for runs of this action! :rocket: +[we're hiring](https://boards.greenhouse.io/pagarme/) \ No newline at end of file diff --git a/action.yml b/action.yml index 57c1d7e..22f8372 100644 --- a/action.yml +++ b/action.yml @@ -1,19 +1,22 @@ -name: 'ecs task def render' -description: 'get the currently running task definition, replace values (like image) and create a new revision' +name: 'ecs task definition replacements' +description: 'get the currently running task definition, replace values (like image)' inputs: cluster-name: # id of input description: cluster that service is running required: true service-name: # id of input - description: service to get task definition - required: true + description: service to get current running task definition + required: false + task-name: # id of input + description: task family to get the latest task definition revision + required: false replacements: # id of input description: "JSON between '' eg '{\"name\": \"Andrew\"}'" required: true outputs: - taskDef: # output will be available to future steps - description: 'The message to output' + taskDef: + description: 'Path to the new json file' runs: using: 'node12' main: 'dist/index.js' diff --git a/dist/index.js b/dist/index.js index 823ece7..760a6e3 100644 --- a/dist/index.js +++ b/dist/index.js @@ -52700,7 +52700,6 @@ client, return taskDefinition } catch (error) { core.setFailed(error.message) - return null } } @@ -52724,37 +52723,66 @@ const getECSService = async ({ async function run() { - const client = new ECSClient() + const client = new ECSClient({ region: 'us-east-1' }) const cluster = core.getInput('cluster-name') const service = core.getInput('service-name') + const task = core.getInput('task-name') + try { - const services = await getECSService({ - cluster, - service, - client - }) - const { taskDefinition } = head(services) - const taskDef = await getTaskDefinition({ - taskDefinition, - client, - }) - const replacements = core.getInput('replacements') || '{}' - const taskDefMerged = merge(taskDef, JSON.parse(replacements)) - - const newTaskDef = omit(taskDefMerged, IGNORED_TASK_DEFINITION_ATTRIBUTES) - - // create a a file for task def - const taskDefFile = tmp.fileSync({ - tmpdir: process.env.RUNNER_TEMP, - prefix: 'task-definition-', - postfix: '.json', - keep: true, - discardDescriptor: true - }) + if(service !== '') { + const services = await getECSService({ + cluster, + service, + client + }) + const { taskDefinition } = head(services) + const taskDef = await getTaskDefinition({ + taskDefinition, + client, + }) + + const replacements = core.getInput('replacements') || '{}' + const taskDefMerged = merge(taskDef, JSON.parse(replacements)) + + const newTaskDef = omit(taskDefMerged, IGNORED_TASK_DEFINITION_ATTRIBUTES) + + // create a a file for task def + const taskDefFile = tmp.fileSync({ + tmpdir: process.env.RUNNER_TEMP, + prefix: 'task-definition-', + postfix: '.json', + keep: true, + discardDescriptor: true + }) + + fs.writeFileSync(taskDefFile.name, JSON.stringify(newTaskDef)) + core.setOutput('taskDef', taskDefFile.name) + } else { + + const taskDef = await getTaskDefinition({ + taskDefinition: task, + client, + }) + + const replacements = core.getInput('replacements') || '{}' + const taskDefMerged = merge(taskDef, JSON.parse(replacements)) - fs.writeFileSync(taskDefFile.name, JSON.stringify(newTaskDef)) - core.setOutput('taskDef', taskDefFile.name) + const newTaskDef = omit(taskDefMerged, IGNORED_TASK_DEFINITION_ATTRIBUTES) + + console.dir(newTaskDef) + + const taskDefFile = tmp.fileSync({ + tmpdir: process.env.RUNNER_TEMP, + prefix: 'task-definition-', + postfix: '.json', + keep: true, + discardDescriptor: true + }) + + fs.writeFileSync(taskDefFile.name, JSON.stringify(newTaskDef)) + core.setOutput('taskDef', taskDefFile.name) + } } catch (error) { core.setFailed(error.message) } diff --git a/dist/index.js.map b/dist/index.js.map index 1d29cef..797001a 100644 --- a/dist/index.js.map +++ b/dist/index.js.map @@ -1 +1 @@ -{"version":3,"file":"index.js","sources":["../webpack://javascript-action/./node_modules/@actions/core/lib/command.js","../webpack://javascript-action/./node_modules/@actions/core/lib/core.js","../webpack://javascript-action/./node_modules/@actions/core/lib/file-command.js","../webpack://javascript-action/./node_modules/@actions/core/lib/utils.js","../webpack://javascript-action/./node_modules/@aws-sdk/client-ecs/dist/cjs/ECS.js","../webpack://javascript-action/./node_modules/@aws-sdk/client-ecs/dist/cjs/ECSClient.js","../webpack://javascript-action/./node_modules/@aws-sdk/client-ecs/dist/cjs/commands/CreateCapacityProviderCommand.js","../webpack://javascript-action/./node_modules/@aws-sdk/client-ecs/dist/cjs/commands/CreateClusterCommand.js","../webpack://javascript-action/./node_modules/@aws-sdk/client-ecs/dist/cjs/commands/CreateServiceCommand.js","../webpack://javascript-action/./node_modules/@aws-sdk/client-ecs/dist/cjs/commands/CreateTaskSetCommand.js","../webpack://javascript-action/./node_modules/@aws-sdk/client-ecs/dist/cjs/commands/DeleteAccountSettingCommand.js","../webpack://javascript-action/./node_modules/@aws-sdk/client-ecs/dist/cjs/commands/DeleteAttributesCommand.js","../webpack://javascript-action/./node_modules/@aws-sdk/client-ecs/dist/cjs/commands/DeleteCapacityProviderCommand.js","../webpack://javascript-action/./node_modules/@aws-sdk/client-ecs/dist/cjs/commands/DeleteClusterCommand.js","../webpack://javascript-action/./node_modules/@aws-sdk/client-ecs/dist/cjs/commands/DeleteServiceCommand.js","../webpack://javascript-action/./node_modules/@aws-sdk/client-ecs/dist/cjs/commands/DeleteTaskSetCommand.js","../webpack://javascript-action/./node_modules/@aws-sdk/client-ecs/dist/cjs/commands/DeregisterContainerInstanceCommand.js","../webpack://javascript-action/./node_modules/@aws-sdk/client-ecs/dist/cjs/commands/DeregisterTaskDefinitionCommand.js","../webpack://javascript-action/./node_modules/@aws-sdk/client-ecs/dist/cjs/commands/DescribeCapacityProvidersCommand.js","../webpack://javascript-action/./node_modules/@aws-sdk/client-ecs/dist/cjs/commands/DescribeClustersCommand.js","../webpack://javascript-action/./node_modules/@aws-sdk/client-ecs/dist/cjs/commands/DescribeContainerInstancesCommand.js","../webpack://javascript-action/./node_modules/@aws-sdk/client-ecs/dist/cjs/commands/DescribeServicesCommand.js","../webpack://javascript-action/./node_modules/@aws-sdk/client-ecs/dist/cjs/commands/DescribeTaskDefinitionCommand.js","../webpack://javascript-action/./node_modules/@aws-sdk/client-ecs/dist/cjs/commands/DescribeTaskSetsCommand.js","../webpack://javascript-action/./node_modules/@aws-sdk/client-ecs/dist/cjs/commands/DescribeTasksCommand.js","../webpack://javascript-action/./node_modules/@aws-sdk/client-ecs/dist/cjs/commands/DiscoverPollEndpointCommand.js","../webpack://javascript-action/./node_modules/@aws-sdk/client-ecs/dist/cjs/commands/ExecuteCommandCommand.js","../webpack://javascript-action/./node_modules/@aws-sdk/client-ecs/dist/cjs/commands/ListAccountSettingsCommand.js","../webpack://javascript-action/./node_modules/@aws-sdk/client-ecs/dist/cjs/commands/ListAttributesCommand.js","../webpack://javascript-action/./node_modules/@aws-sdk/client-ecs/dist/cjs/commands/ListClustersCommand.js","../webpack://javascript-action/./node_modules/@aws-sdk/client-ecs/dist/cjs/commands/ListContainerInstancesCommand.js","../webpack://javascript-action/./node_modules/@aws-sdk/client-ecs/dist/cjs/commands/ListServicesCommand.js","../webpack://javascript-action/./node_modules/@aws-sdk/client-ecs/dist/cjs/commands/ListTagsForResourceCommand.js","../webpack://javascript-action/./node_modules/@aws-sdk/client-ecs/dist/cjs/commands/ListTaskDefinitionFamiliesCommand.js","../webpack://javascript-action/./node_modules/@aws-sdk/client-ecs/dist/cjs/commands/ListTaskDefinitionsCommand.js","../webpack://javascript-action/./node_modules/@aws-sdk/client-ecs/dist/cjs/commands/ListTasksCommand.js","../webpack://javascript-action/./node_modules/@aws-sdk/client-ecs/dist/cjs/commands/PutAccountSettingCommand.js","../webpack://javascript-action/./node_modules/@aws-sdk/client-ecs/dist/cjs/commands/PutAccountSettingDefaultCommand.js","../webpack://javascript-action/./node_modules/@aws-sdk/client-ecs/dist/cjs/commands/PutAttributesCommand.js","../webpack://javascript-action/./node_modules/@aws-sdk/client-ecs/dist/cjs/commands/PutClusterCapacityProvidersCommand.js","../webpack://javascript-action/./node_modules/@aws-sdk/client-ecs/dist/cjs/commands/RegisterContainerInstanceCommand.js","../webpack://javascript-action/./node_modules/@aws-sdk/client-ecs/dist/cjs/commands/RegisterTaskDefinitionCommand.js","../webpack://javascript-action/./node_modules/@aws-sdk/client-ecs/dist/cjs/commands/RunTaskCommand.js","../webpack://javascript-action/./node_modules/@aws-sdk/client-ecs/dist/cjs/commands/StartTaskCommand.js","../webpack://javascript-action/./node_modules/@aws-sdk/client-ecs/dist/cjs/commands/StopTaskCommand.js","../webpack://javascript-action/./node_modules/@aws-sdk/client-ecs/dist/cjs/commands/SubmitAttachmentStateChangesCommand.js","../webpack://javascript-action/./node_modules/@aws-sdk/client-ecs/dist/cjs/commands/SubmitContainerStateChangeCommand.js","../webpack://javascript-action/./node_modules/@aws-sdk/client-ecs/dist/cjs/commands/SubmitTaskStateChangeCommand.js","../webpack://javascript-action/./node_modules/@aws-sdk/client-ecs/dist/cjs/commands/TagResourceCommand.js","../webpack://javascript-action/./node_modules/@aws-sdk/client-ecs/dist/cjs/commands/UntagResourceCommand.js","../webpack://javascript-action/./node_modules/@aws-sdk/client-ecs/dist/cjs/commands/UpdateCapacityProviderCommand.js","../webpack://javascript-action/./node_modules/@aws-sdk/client-ecs/dist/cjs/commands/UpdateClusterCommand.js","../webpack://javascript-action/./node_modules/@aws-sdk/client-ecs/dist/cjs/commands/UpdateClusterSettingsCommand.js","../webpack://javascript-action/./node_modules/@aws-sdk/client-ecs/dist/cjs/commands/UpdateContainerAgentCommand.js","../webpack://javascript-action/./node_modules/@aws-sdk/client-ecs/dist/cjs/commands/UpdateContainerInstancesStateCommand.js","../webpack://javascript-action/./node_modules/@aws-sdk/client-ecs/dist/cjs/commands/UpdateServiceCommand.js","../webpack://javascript-action/./node_modules/@aws-sdk/client-ecs/dist/cjs/commands/UpdateServicePrimaryTaskSetCommand.js","../webpack://javascript-action/./node_modules/@aws-sdk/client-ecs/dist/cjs/commands/UpdateTaskSetCommand.js","../webpack://javascript-action/./node_modules/@aws-sdk/client-ecs/dist/cjs/endpoints.js","../webpack://javascript-action/./node_modules/@aws-sdk/client-ecs/dist/cjs/index.js","../webpack://javascript-action/./node_modules/@aws-sdk/client-ecs/dist/cjs/models/index.js","../webpack://javascript-action/./node_modules/@aws-sdk/client-ecs/dist/cjs/models/models_0.js","../webpack://javascript-action/./node_modules/@aws-sdk/client-ecs/dist/cjs/pagination/Interfaces.js","../webpack://javascript-action/./node_modules/@aws-sdk/client-ecs/dist/cjs/pagination/ListAccountSettingsPaginator.js","../webpack://javascript-action/./node_modules/@aws-sdk/client-ecs/dist/cjs/pagination/ListAttributesPaginator.js","../webpack://javascript-action/./node_modules/@aws-sdk/client-ecs/dist/cjs/pagination/ListClustersPaginator.js","../webpack://javascript-action/./node_modules/@aws-sdk/client-ecs/dist/cjs/pagination/ListContainerInstancesPaginator.js","../webpack://javascript-action/./node_modules/@aws-sdk/client-ecs/dist/cjs/pagination/ListServicesPaginator.js","../webpack://javascript-action/./node_modules/@aws-sdk/client-ecs/dist/cjs/pagination/ListTaskDefinitionFamiliesPaginator.js","../webpack://javascript-action/./node_modules/@aws-sdk/client-ecs/dist/cjs/pagination/ListTaskDefinitionsPaginator.js","../webpack://javascript-action/./node_modules/@aws-sdk/client-ecs/dist/cjs/pagination/ListTasksPaginator.js","../webpack://javascript-action/./node_modules/@aws-sdk/client-ecs/dist/cjs/protocols/Aws_json1_1.js","../webpack://javascript-action/./node_modules/@aws-sdk/client-ecs/dist/cjs/runtimeConfig.js","../webpack://javascript-action/./node_modules/@aws-sdk/client-ecs/dist/cjs/runtimeConfig.shared.js","../webpack://javascript-action/./node_modules/@aws-sdk/client-ecs/dist/cjs/waiters/waitForServicesInactive.js","../webpack://javascript-action/./node_modules/@aws-sdk/client-ecs/dist/cjs/waiters/waitForTasksRunning.js","../webpack://javascript-action/./node_modules/@aws-sdk/client-ecs/dist/cjs/waiters/waitForTasksStopped.js","../webpack://javascript-action/./node_modules/@aws-sdk/client-sso/dist/cjs/SSO.js","../webpack://javascript-action/./node_modules/@aws-sdk/client-sso/dist/cjs/SSOClient.js","../webpack://javascript-action/./node_modules/@aws-sdk/client-sso/dist/cjs/commands/GetRoleCredentialsCommand.js","../webpack://javascript-action/./node_modules/@aws-sdk/client-sso/dist/cjs/commands/ListAccountRolesCommand.js","../webpack://javascript-action/./node_modules/@aws-sdk/client-sso/dist/cjs/commands/ListAccountsCommand.js","../webpack://javascript-action/./node_modules/@aws-sdk/client-sso/dist/cjs/commands/LogoutCommand.js","../webpack://javascript-action/./node_modules/@aws-sdk/client-sso/dist/cjs/endpoints.js","../webpack://javascript-action/./node_modules/@aws-sdk/client-sso/dist/cjs/index.js","../webpack://javascript-action/./node_modules/@aws-sdk/client-sso/dist/cjs/models/index.js","../webpack://javascript-action/./node_modules/@aws-sdk/client-sso/dist/cjs/models/models_0.js","../webpack://javascript-action/./node_modules/@aws-sdk/client-sso/dist/cjs/pagination/Interfaces.js","../webpack://javascript-action/./node_modules/@aws-sdk/client-sso/dist/cjs/pagination/ListAccountRolesPaginator.js","../webpack://javascript-action/./node_modules/@aws-sdk/client-sso/dist/cjs/pagination/ListAccountsPaginator.js","../webpack://javascript-action/./node_modules/@aws-sdk/client-sso/dist/cjs/protocols/Aws_restJson1.js","../webpack://javascript-action/./node_modules/@aws-sdk/client-sso/dist/cjs/runtimeConfig.js","../webpack://javascript-action/./node_modules/@aws-sdk/client-sso/dist/cjs/runtimeConfig.shared.js","../webpack://javascript-action/./node_modules/@aws-sdk/client-sts/dist/cjs/STS.js","../webpack://javascript-action/./node_modules/@aws-sdk/client-sts/dist/cjs/STSClient.js","../webpack://javascript-action/./node_modules/@aws-sdk/client-sts/dist/cjs/commands/AssumeRoleCommand.js","../webpack://javascript-action/./node_modules/@aws-sdk/client-sts/dist/cjs/commands/AssumeRoleWithSAMLCommand.js","../webpack://javascript-action/./node_modules/@aws-sdk/client-sts/dist/cjs/commands/AssumeRoleWithWebIdentityCommand.js","../webpack://javascript-action/./node_modules/@aws-sdk/client-sts/dist/cjs/commands/DecodeAuthorizationMessageCommand.js","../webpack://javascript-action/./node_modules/@aws-sdk/client-sts/dist/cjs/commands/GetAccessKeyInfoCommand.js","../webpack://javascript-action/./node_modules/@aws-sdk/client-sts/dist/cjs/commands/GetCallerIdentityCommand.js","../webpack://javascript-action/./node_modules/@aws-sdk/client-sts/dist/cjs/commands/GetFederationTokenCommand.js","../webpack://javascript-action/./node_modules/@aws-sdk/client-sts/dist/cjs/commands/GetSessionTokenCommand.js","../webpack://javascript-action/./node_modules/@aws-sdk/client-sts/dist/cjs/defaultRoleAssumers.js","../webpack://javascript-action/./node_modules/@aws-sdk/client-sts/dist/cjs/defaultStsRoleAssumers.js","../webpack://javascript-action/./node_modules/@aws-sdk/client-sts/dist/cjs/endpoints.js","../webpack://javascript-action/./node_modules/@aws-sdk/client-sts/dist/cjs/index.js","../webpack://javascript-action/./node_modules/@aws-sdk/client-sts/dist/cjs/models/index.js","../webpack://javascript-action/./node_modules/@aws-sdk/client-sts/dist/cjs/models/models_0.js","../webpack://javascript-action/./node_modules/@aws-sdk/client-sts/dist/cjs/protocols/Aws_query.js","../webpack://javascript-action/./node_modules/@aws-sdk/client-sts/dist/cjs/runtimeConfig.js","../webpack://javascript-action/./node_modules/@aws-sdk/client-sts/dist/cjs/runtimeConfig.shared.js","../webpack://javascript-action/./node_modules/@aws-sdk/config-resolver/dist/cjs/endpointsConfig/index.js","../webpack://javascript-action/./node_modules/@aws-sdk/config-resolver/dist/cjs/endpointsConfig/resolveCustomEndpointsConfig.js","../webpack://javascript-action/./node_modules/@aws-sdk/config-resolver/dist/cjs/endpointsConfig/resolveEndpointsConfig.js","../webpack://javascript-action/./node_modules/@aws-sdk/config-resolver/dist/cjs/endpointsConfig/utils/getEndpointFromRegion.js","../webpack://javascript-action/./node_modules/@aws-sdk/config-resolver/dist/cjs/endpointsConfig/utils/normalizeEndpoint.js","../webpack://javascript-action/./node_modules/@aws-sdk/config-resolver/dist/cjs/index.js","../webpack://javascript-action/./node_modules/@aws-sdk/config-resolver/dist/cjs/regionConfig/config.js","../webpack://javascript-action/./node_modules/@aws-sdk/config-resolver/dist/cjs/regionConfig/index.js","../webpack://javascript-action/./node_modules/@aws-sdk/config-resolver/dist/cjs/regionConfig/normalizeRegion.js","../webpack://javascript-action/./node_modules/@aws-sdk/config-resolver/dist/cjs/regionConfig/resolveRegionConfig.js","../webpack://javascript-action/./node_modules/@aws-sdk/config-resolver/dist/cjs/regionInfo/getHostnameTemplate.js","../webpack://javascript-action/./node_modules/@aws-sdk/config-resolver/dist/cjs/regionInfo/getRegionInfo.js","../webpack://javascript-action/./node_modules/@aws-sdk/config-resolver/dist/cjs/regionInfo/getResolvedHostname.js","../webpack://javascript-action/./node_modules/@aws-sdk/config-resolver/dist/cjs/regionInfo/getResolvedPartition.js","../webpack://javascript-action/./node_modules/@aws-sdk/config-resolver/dist/cjs/regionInfo/index.js","../webpack://javascript-action/./node_modules/@aws-sdk/credential-provider-env/dist/cjs/index.js","../webpack://javascript-action/./node_modules/@aws-sdk/credential-provider-imds/dist/cjs/config/Endpoint.js","../webpack://javascript-action/./node_modules/@aws-sdk/credential-provider-imds/dist/cjs/config/EndpointConfigOptions.js","../webpack://javascript-action/./node_modules/@aws-sdk/credential-provider-imds/dist/cjs/config/EndpointMode.js","../webpack://javascript-action/./node_modules/@aws-sdk/credential-provider-imds/dist/cjs/config/EndpointModeConfigOptions.js","../webpack://javascript-action/./node_modules/@aws-sdk/credential-provider-imds/dist/cjs/fromContainerMetadata.js","../webpack://javascript-action/./node_modules/@aws-sdk/credential-provider-imds/dist/cjs/fromInstanceMetadata.js","../webpack://javascript-action/./node_modules/@aws-sdk/credential-provider-imds/dist/cjs/index.js","../webpack://javascript-action/./node_modules/@aws-sdk/credential-provider-imds/dist/cjs/remoteProvider/ImdsCredentials.js","../webpack://javascript-action/./node_modules/@aws-sdk/credential-provider-imds/dist/cjs/remoteProvider/RemoteProviderInit.js","../webpack://javascript-action/./node_modules/@aws-sdk/credential-provider-imds/dist/cjs/remoteProvider/httpRequest.js","../webpack://javascript-action/./node_modules/@aws-sdk/credential-provider-imds/dist/cjs/remoteProvider/retry.js","../webpack://javascript-action/./node_modules/@aws-sdk/credential-provider-imds/dist/cjs/utils/getInstanceMetadataEndpoint.js","../webpack://javascript-action/./node_modules/@aws-sdk/credential-provider-ini/dist/cjs/index.js","../webpack://javascript-action/./node_modules/@aws-sdk/credential-provider-node/dist/cjs/index.js","../webpack://javascript-action/./node_modules/@aws-sdk/credential-provider-process/dist/cjs/index.js","../webpack://javascript-action/./node_modules/@aws-sdk/credential-provider-sso/dist/cjs/index.js","../webpack://javascript-action/./node_modules/@aws-sdk/credential-provider-web-identity/dist/cjs/fromTokenFile.js","../webpack://javascript-action/./node_modules/@aws-sdk/credential-provider-web-identity/dist/cjs/fromWebToken.js","../webpack://javascript-action/./node_modules/@aws-sdk/credential-provider-web-identity/dist/cjs/index.js","../webpack://javascript-action/./node_modules/@aws-sdk/hash-node/dist/cjs/index.js","../webpack://javascript-action/./node_modules/@aws-sdk/is-array-buffer/dist/cjs/index.js","../webpack://javascript-action/./node_modules/@aws-sdk/middleware-content-length/dist/cjs/index.js","../webpack://javascript-action/./node_modules/@aws-sdk/middleware-host-header/dist/cjs/index.js","../webpack://javascript-action/./node_modules/@aws-sdk/middleware-logger/dist/cjs/index.js","../webpack://javascript-action/./node_modules/@aws-sdk/middleware-logger/dist/cjs/loggerMiddleware.js","../webpack://javascript-action/./node_modules/@aws-sdk/middleware-retry/dist/cjs/AdaptiveRetryStrategy.js","../webpack://javascript-action/./node_modules/@aws-sdk/middleware-retry/dist/cjs/DefaultRateLimiter.js","../webpack://javascript-action/./node_modules/@aws-sdk/middleware-retry/dist/cjs/StandardRetryStrategy.js","../webpack://javascript-action/./node_modules/@aws-sdk/middleware-retry/dist/cjs/config.js","../webpack://javascript-action/./node_modules/@aws-sdk/middleware-retry/dist/cjs/configurations.js","../webpack://javascript-action/./node_modules/@aws-sdk/middleware-retry/dist/cjs/constants.js","../webpack://javascript-action/./node_modules/@aws-sdk/middleware-retry/dist/cjs/defaultRetryQuota.js","../webpack://javascript-action/./node_modules/@aws-sdk/middleware-retry/dist/cjs/delayDecider.js","../webpack://javascript-action/./node_modules/@aws-sdk/middleware-retry/dist/cjs/index.js","../webpack://javascript-action/./node_modules/@aws-sdk/middleware-retry/dist/cjs/omitRetryHeadersMiddleware.js","../webpack://javascript-action/./node_modules/@aws-sdk/middleware-retry/dist/cjs/retryDecider.js","../webpack://javascript-action/./node_modules/@aws-sdk/middleware-retry/dist/cjs/retryMiddleware.js","../webpack://javascript-action/./node_modules/@aws-sdk/middleware-retry/dist/cjs/types.js","../webpack://javascript-action/./node_modules/@aws-sdk/middleware-sdk-sts/dist/cjs/index.js","../webpack://javascript-action/./node_modules/@aws-sdk/middleware-serde/dist/cjs/deserializerMiddleware.js","../webpack://javascript-action/./node_modules/@aws-sdk/middleware-serde/dist/cjs/index.js","../webpack://javascript-action/./node_modules/@aws-sdk/middleware-serde/dist/cjs/serdePlugin.js","../webpack://javascript-action/./node_modules/@aws-sdk/middleware-serde/dist/cjs/serializerMiddleware.js","../webpack://javascript-action/./node_modules/@aws-sdk/middleware-signing/dist/cjs/configurations.js","../webpack://javascript-action/./node_modules/@aws-sdk/middleware-signing/dist/cjs/index.js","../webpack://javascript-action/./node_modules/@aws-sdk/middleware-signing/dist/cjs/middleware.js","../webpack://javascript-action/./node_modules/@aws-sdk/middleware-signing/dist/cjs/utils/getSkewCorrectedDate.js","../webpack://javascript-action/./node_modules/@aws-sdk/middleware-signing/dist/cjs/utils/getUpdatedSystemClockOffset.js","../webpack://javascript-action/./node_modules/@aws-sdk/middleware-signing/dist/cjs/utils/isClockSkewed.js","../webpack://javascript-action/./node_modules/@aws-sdk/middleware-stack/dist/cjs/MiddlewareStack.js","../webpack://javascript-action/./node_modules/@aws-sdk/middleware-stack/dist/cjs/index.js","../webpack://javascript-action/./node_modules/@aws-sdk/middleware-user-agent/dist/cjs/configurations.js","../webpack://javascript-action/./node_modules/@aws-sdk/middleware-user-agent/dist/cjs/constants.js","../webpack://javascript-action/./node_modules/@aws-sdk/middleware-user-agent/dist/cjs/index.js","../webpack://javascript-action/./node_modules/@aws-sdk/middleware-user-agent/dist/cjs/user-agent-middleware.js","../webpack://javascript-action/./node_modules/@aws-sdk/node-config-provider/dist/cjs/configLoader.js","../webpack://javascript-action/./node_modules/@aws-sdk/node-config-provider/dist/cjs/fromEnv.js","../webpack://javascript-action/./node_modules/@aws-sdk/node-config-provider/dist/cjs/fromSharedConfigFiles.js","../webpack://javascript-action/./node_modules/@aws-sdk/node-config-provider/dist/cjs/fromStatic.js","../webpack://javascript-action/./node_modules/@aws-sdk/node-config-provider/dist/cjs/index.js","../webpack://javascript-action/./node_modules/@aws-sdk/node-http-handler/dist/cjs/constants.js","../webpack://javascript-action/./node_modules/@aws-sdk/node-http-handler/dist/cjs/get-transformed-headers.js","../webpack://javascript-action/./node_modules/@aws-sdk/node-http-handler/dist/cjs/index.js","../webpack://javascript-action/./node_modules/@aws-sdk/node-http-handler/dist/cjs/node-http-handler.js","../webpack://javascript-action/./node_modules/@aws-sdk/node-http-handler/dist/cjs/node-http2-handler.js","../webpack://javascript-action/./node_modules/@aws-sdk/node-http-handler/dist/cjs/set-connection-timeout.js","../webpack://javascript-action/./node_modules/@aws-sdk/node-http-handler/dist/cjs/set-socket-timeout.js","../webpack://javascript-action/./node_modules/@aws-sdk/node-http-handler/dist/cjs/stream-collector/collector.js","../webpack://javascript-action/./node_modules/@aws-sdk/node-http-handler/dist/cjs/stream-collector/index.js","../webpack://javascript-action/./node_modules/@aws-sdk/node-http-handler/dist/cjs/write-request-body.js","../webpack://javascript-action/./node_modules/@aws-sdk/property-provider/dist/cjs/ProviderError.js","../webpack://javascript-action/./node_modules/@aws-sdk/property-provider/dist/cjs/chain.js","../webpack://javascript-action/./node_modules/@aws-sdk/property-provider/dist/cjs/fromStatic.js","../webpack://javascript-action/./node_modules/@aws-sdk/property-provider/dist/cjs/index.js","../webpack://javascript-action/./node_modules/@aws-sdk/property-provider/dist/cjs/memoize.js","../webpack://javascript-action/./node_modules/@aws-sdk/protocol-http/dist/cjs/httpHandler.js","../webpack://javascript-action/./node_modules/@aws-sdk/protocol-http/dist/cjs/httpRequest.js","../webpack://javascript-action/./node_modules/@aws-sdk/protocol-http/dist/cjs/httpResponse.js","../webpack://javascript-action/./node_modules/@aws-sdk/protocol-http/dist/cjs/index.js","../webpack://javascript-action/./node_modules/@aws-sdk/protocol-http/dist/cjs/isValidHostname.js","../webpack://javascript-action/./node_modules/@aws-sdk/querystring-builder/dist/cjs/index.js","../webpack://javascript-action/./node_modules/@aws-sdk/querystring-parser/dist/cjs/index.js","../webpack://javascript-action/./node_modules/@aws-sdk/service-error-classification/dist/cjs/constants.js","../webpack://javascript-action/./node_modules/@aws-sdk/service-error-classification/dist/cjs/index.js","../webpack://javascript-action/./node_modules/@aws-sdk/shared-ini-file-loader/dist/cjs/index.js","../webpack://javascript-action/./node_modules/@aws-sdk/signature-v4/dist/cjs/SignatureV4.js","../webpack://javascript-action/./node_modules/@aws-sdk/signature-v4/dist/cjs/cloneRequest.js","../webpack://javascript-action/./node_modules/@aws-sdk/signature-v4/dist/cjs/constants.js","../webpack://javascript-action/./node_modules/@aws-sdk/signature-v4/dist/cjs/credentialDerivation.js","../webpack://javascript-action/./node_modules/@aws-sdk/signature-v4/dist/cjs/getCanonicalHeaders.js","../webpack://javascript-action/./node_modules/@aws-sdk/signature-v4/dist/cjs/getCanonicalQuery.js","../webpack://javascript-action/./node_modules/@aws-sdk/signature-v4/dist/cjs/getPayloadHash.js","../webpack://javascript-action/./node_modules/@aws-sdk/signature-v4/dist/cjs/hasHeader.js","../webpack://javascript-action/./node_modules/@aws-sdk/signature-v4/dist/cjs/index.js","../webpack://javascript-action/./node_modules/@aws-sdk/signature-v4/dist/cjs/moveHeadersToQuery.js","../webpack://javascript-action/./node_modules/@aws-sdk/signature-v4/dist/cjs/prepareRequest.js","../webpack://javascript-action/./node_modules/@aws-sdk/signature-v4/dist/cjs/utilDate.js","../webpack://javascript-action/./node_modules/@aws-sdk/smithy-client/dist/cjs/client.js","../webpack://javascript-action/./node_modules/@aws-sdk/smithy-client/dist/cjs/command.js","../webpack://javascript-action/./node_modules/@aws-sdk/smithy-client/dist/cjs/constants.js","../webpack://javascript-action/./node_modules/@aws-sdk/smithy-client/dist/cjs/date-utils.js","../webpack://javascript-action/./node_modules/@aws-sdk/smithy-client/dist/cjs/emitWarningIfUnsupportedVersion.js","../webpack://javascript-action/./node_modules/@aws-sdk/smithy-client/dist/cjs/extended-encode-uri-component.js","../webpack://javascript-action/./node_modules/@aws-sdk/smithy-client/dist/cjs/get-array-if-single-item.js","../webpack://javascript-action/./node_modules/@aws-sdk/smithy-client/dist/cjs/get-value-from-text-node.js","../webpack://javascript-action/./node_modules/@aws-sdk/smithy-client/dist/cjs/index.js","../webpack://javascript-action/./node_modules/@aws-sdk/smithy-client/dist/cjs/lazy-json.js","../webpack://javascript-action/./node_modules/@aws-sdk/smithy-client/dist/cjs/parse-utils.js","../webpack://javascript-action/./node_modules/@aws-sdk/smithy-client/dist/cjs/ser-utils.js","../webpack://javascript-action/./node_modules/@aws-sdk/smithy-client/dist/cjs/split-every.js","../webpack://javascript-action/./node_modules/@aws-sdk/url-parser/dist/cjs/index.js","../webpack://javascript-action/./node_modules/@aws-sdk/util-base64-node/dist/cjs/index.js","../webpack://javascript-action/./node_modules/@aws-sdk/util-body-length-node/dist/cjs/index.js","../webpack://javascript-action/./node_modules/@aws-sdk/util-buffer-from/dist/cjs/index.js","../webpack://javascript-action/./node_modules/@aws-sdk/util-credentials/dist/cjs/index.js","../webpack://javascript-action/./node_modules/@aws-sdk/util-hex-encoding/dist/cjs/index.js","../webpack://javascript-action/./node_modules/@aws-sdk/util-uri-escape/dist/cjs/escape-uri-path.js","../webpack://javascript-action/./node_modules/@aws-sdk/util-uri-escape/dist/cjs/escape-uri.js","../webpack://javascript-action/./node_modules/@aws-sdk/util-uri-escape/dist/cjs/index.js","../webpack://javascript-action/./node_modules/@aws-sdk/util-user-agent-node/dist/cjs/index.js","../webpack://javascript-action/./node_modules/@aws-sdk/util-utf8-node/dist/cjs/index.js","../webpack://javascript-action/./node_modules/@aws-sdk/util-waiter/dist/cjs/createWaiter.js","../webpack://javascript-action/./node_modules/@aws-sdk/util-waiter/dist/cjs/index.js","../webpack://javascript-action/./node_modules/@aws-sdk/util-waiter/dist/cjs/poller.js","../webpack://javascript-action/./node_modules/@aws-sdk/util-waiter/dist/cjs/utils/index.js","../webpack://javascript-action/./node_modules/@aws-sdk/util-waiter/dist/cjs/utils/sleep.js","../webpack://javascript-action/./node_modules/@aws-sdk/util-waiter/dist/cjs/utils/validate.js","../webpack://javascript-action/./node_modules/@aws-sdk/util-waiter/dist/cjs/waiter.js","../webpack://javascript-action/./node_modules/balanced-match/index.js","../webpack://javascript-action/./node_modules/brace-expansion/index.js","../webpack://javascript-action/./node_modules/concat-map/index.js","../webpack://javascript-action/./node_modules/entities/lib/decode.js","../webpack://javascript-action/./node_modules/entities/lib/decode_codepoint.js","../webpack://javascript-action/./node_modules/entities/lib/encode.js","../webpack://javascript-action/./node_modules/entities/lib/index.js","../webpack://javascript-action/./node_modules/fast-xml-parser/src/json2xml.js","../webpack://javascript-action/./node_modules/fast-xml-parser/src/nimndata.js","../webpack://javascript-action/./node_modules/fast-xml-parser/src/node2json.js","../webpack://javascript-action/./node_modules/fast-xml-parser/src/node2json_str.js","../webpack://javascript-action/./node_modules/fast-xml-parser/src/parser.js","../webpack://javascript-action/./node_modules/fast-xml-parser/src/util.js","../webpack://javascript-action/./node_modules/fast-xml-parser/src/validator.js","../webpack://javascript-action/./node_modules/fast-xml-parser/src/xmlNode.js","../webpack://javascript-action/./node_modules/fast-xml-parser/src/xmlstr2xmlnode.js","../webpack://javascript-action/./node_modules/fs.realpath/index.js","../webpack://javascript-action/./node_modules/fs.realpath/old.js","../webpack://javascript-action/./node_modules/glob/common.js","../webpack://javascript-action/./node_modules/glob/glob.js","../webpack://javascript-action/./node_modules/glob/sync.js","../webpack://javascript-action/./node_modules/inflight/inflight.js","../webpack://javascript-action/./node_modules/inherits/inherits.js","../webpack://javascript-action/./node_modules/inherits/inherits_browser.js","../webpack://javascript-action/./node_modules/lodash/lodash.js","../webpack://javascript-action/./node_modules/minimatch/minimatch.js","../webpack://javascript-action/./node_modules/once/once.js","../webpack://javascript-action/./node_modules/path-is-absolute/index.js","../webpack://javascript-action/./node_modules/rimraf/rimraf.js","../webpack://javascript-action/./node_modules/tmp/lib/tmp.js","../webpack://javascript-action/./node_modules/tslib/tslib.js","../webpack://javascript-action/./node_modules/uuid/dist/index.js","../webpack://javascript-action/./node_modules/uuid/dist/md5.js","../webpack://javascript-action/./node_modules/uuid/dist/nil.js","../webpack://javascript-action/./node_modules/uuid/dist/parse.js","../webpack://javascript-action/./node_modules/uuid/dist/regex.js","../webpack://javascript-action/./node_modules/uuid/dist/rng.js","../webpack://javascript-action/./node_modules/uuid/dist/sha1.js","../webpack://javascript-action/./node_modules/uuid/dist/stringify.js","../webpack://javascript-action/./node_modules/uuid/dist/v1.js","../webpack://javascript-action/./node_modules/uuid/dist/v3.js","../webpack://javascript-action/./node_modules/uuid/dist/v35.js","../webpack://javascript-action/./node_modules/uuid/dist/v4.js","../webpack://javascript-action/./node_modules/uuid/dist/v5.js","../webpack://javascript-action/./node_modules/uuid/dist/validate.js","../webpack://javascript-action/./node_modules/uuid/dist/version.js","../webpack://javascript-action/./node_modules/wrappy/wrappy.js","../webpack://javascript-action/external \"assert\"","../webpack://javascript-action/external \"buffer\"","../webpack://javascript-action/external \"child_process\"","../webpack://javascript-action/external \"crypto\"","../webpack://javascript-action/external \"events\"","../webpack://javascript-action/external \"fs\"","../webpack://javascript-action/external \"http\"","../webpack://javascript-action/external \"http2\"","../webpack://javascript-action/external \"https\"","../webpack://javascript-action/external \"os\"","../webpack://javascript-action/external \"path\"","../webpack://javascript-action/external \"process\"","../webpack://javascript-action/external \"stream\"","../webpack://javascript-action/external \"url\"","../webpack://javascript-action/external \"util\"","../webpack://javascript-action/webpack/bootstrap","../webpack://javascript-action/webpack/runtime/node module decorator","../webpack://javascript-action/webpack/runtime/compat","../webpack://javascript-action/./index.js"],"sourcesContent":["\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n});\nvar __importStar = (this && this.__importStar) || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n __setModuleDefault(result, mod);\n return result;\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.issue = exports.issueCommand = void 0;\nconst os = __importStar(require(\"os\"));\nconst utils_1 = require(\"./utils\");\n/**\n * Commands\n *\n * Command Format:\n * ::name key=value,key=value::message\n *\n * Examples:\n * ::warning::This is the message\n * ::set-env name=MY_VAR::some value\n */\nfunction issueCommand(command, properties, message) {\n const cmd = new Command(command, properties, message);\n process.stdout.write(cmd.toString() + os.EOL);\n}\nexports.issueCommand = issueCommand;\nfunction issue(name, message = '') {\n issueCommand(name, {}, message);\n}\nexports.issue = issue;\nconst CMD_STRING = '::';\nclass Command {\n constructor(command, properties, message) {\n if (!command) {\n command = 'missing.command';\n }\n this.command = command;\n this.properties = properties;\n this.message = message;\n }\n toString() {\n let cmdStr = CMD_STRING + this.command;\n if (this.properties && Object.keys(this.properties).length > 0) {\n cmdStr += ' ';\n let first = true;\n for (const key in this.properties) {\n if (this.properties.hasOwnProperty(key)) {\n const val = this.properties[key];\n if (val) {\n if (first) {\n first = false;\n }\n else {\n cmdStr += ',';\n }\n cmdStr += `${key}=${escapeProperty(val)}`;\n }\n }\n }\n }\n cmdStr += `${CMD_STRING}${escapeData(this.message)}`;\n return cmdStr;\n }\n}\nfunction escapeData(s) {\n return utils_1.toCommandValue(s)\n .replace(/%/g, '%25')\n .replace(/\\r/g, '%0D')\n .replace(/\\n/g, '%0A');\n}\nfunction escapeProperty(s) {\n return utils_1.toCommandValue(s)\n .replace(/%/g, '%25')\n .replace(/\\r/g, '%0D')\n .replace(/\\n/g, '%0A')\n .replace(/:/g, '%3A')\n .replace(/,/g, '%2C');\n}\n//# sourceMappingURL=command.js.map","\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n});\nvar __importStar = (this && this.__importStar) || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n __setModuleDefault(result, mod);\n return result;\n};\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.getState = exports.saveState = exports.group = exports.endGroup = exports.startGroup = exports.info = exports.notice = exports.warning = exports.error = exports.debug = exports.isDebug = exports.setFailed = exports.setCommandEcho = exports.setOutput = exports.getBooleanInput = exports.getMultilineInput = exports.getInput = exports.addPath = exports.setSecret = exports.exportVariable = exports.ExitCode = void 0;\nconst command_1 = require(\"./command\");\nconst file_command_1 = require(\"./file-command\");\nconst utils_1 = require(\"./utils\");\nconst os = __importStar(require(\"os\"));\nconst path = __importStar(require(\"path\"));\n/**\n * The code to exit an action\n */\nvar ExitCode;\n(function (ExitCode) {\n /**\n * A code indicating that the action was successful\n */\n ExitCode[ExitCode[\"Success\"] = 0] = \"Success\";\n /**\n * A code indicating that the action was a failure\n */\n ExitCode[ExitCode[\"Failure\"] = 1] = \"Failure\";\n})(ExitCode = exports.ExitCode || (exports.ExitCode = {}));\n//-----------------------------------------------------------------------\n// Variables\n//-----------------------------------------------------------------------\n/**\n * Sets env variable for this action and future actions in the job\n * @param name the name of the variable to set\n * @param val the value of the variable. Non-string values will be converted to a string via JSON.stringify\n */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nfunction exportVariable(name, val) {\n const convertedVal = utils_1.toCommandValue(val);\n process.env[name] = convertedVal;\n const filePath = process.env['GITHUB_ENV'] || '';\n if (filePath) {\n const delimiter = '_GitHubActionsFileCommandDelimeter_';\n const commandValue = `${name}<<${delimiter}${os.EOL}${convertedVal}${os.EOL}${delimiter}`;\n file_command_1.issueCommand('ENV', commandValue);\n }\n else {\n command_1.issueCommand('set-env', { name }, convertedVal);\n }\n}\nexports.exportVariable = exportVariable;\n/**\n * Registers a secret which will get masked from logs\n * @param secret value of the secret\n */\nfunction setSecret(secret) {\n command_1.issueCommand('add-mask', {}, secret);\n}\nexports.setSecret = setSecret;\n/**\n * Prepends inputPath to the PATH (for this action and future actions)\n * @param inputPath\n */\nfunction addPath(inputPath) {\n const filePath = process.env['GITHUB_PATH'] || '';\n if (filePath) {\n file_command_1.issueCommand('PATH', inputPath);\n }\n else {\n command_1.issueCommand('add-path', {}, inputPath);\n }\n process.env['PATH'] = `${inputPath}${path.delimiter}${process.env['PATH']}`;\n}\nexports.addPath = addPath;\n/**\n * Gets the value of an input.\n * Unless trimWhitespace is set to false in InputOptions, the value is also trimmed.\n * Returns an empty string if the value is not defined.\n *\n * @param name name of the input to get\n * @param options optional. See InputOptions.\n * @returns string\n */\nfunction getInput(name, options) {\n const val = process.env[`INPUT_${name.replace(/ /g, '_').toUpperCase()}`] || '';\n if (options && options.required && !val) {\n throw new Error(`Input required and not supplied: ${name}`);\n }\n if (options && options.trimWhitespace === false) {\n return val;\n }\n return val.trim();\n}\nexports.getInput = getInput;\n/**\n * Gets the values of an multiline input. Each value is also trimmed.\n *\n * @param name name of the input to get\n * @param options optional. See InputOptions.\n * @returns string[]\n *\n */\nfunction getMultilineInput(name, options) {\n const inputs = getInput(name, options)\n .split('\\n')\n .filter(x => x !== '');\n return inputs;\n}\nexports.getMultilineInput = getMultilineInput;\n/**\n * Gets the input value of the boolean type in the YAML 1.2 \"core schema\" specification.\n * Support boolean input list: `true | True | TRUE | false | False | FALSE` .\n * The return value is also in boolean type.\n * ref: https://yaml.org/spec/1.2/spec.html#id2804923\n *\n * @param name name of the input to get\n * @param options optional. See InputOptions.\n * @returns boolean\n */\nfunction getBooleanInput(name, options) {\n const trueValue = ['true', 'True', 'TRUE'];\n const falseValue = ['false', 'False', 'FALSE'];\n const val = getInput(name, options);\n if (trueValue.includes(val))\n return true;\n if (falseValue.includes(val))\n return false;\n throw new TypeError(`Input does not meet YAML 1.2 \"Core Schema\" specification: ${name}\\n` +\n `Support boolean input list: \\`true | True | TRUE | false | False | FALSE\\``);\n}\nexports.getBooleanInput = getBooleanInput;\n/**\n * Sets the value of an output.\n *\n * @param name name of the output to set\n * @param value value to store. Non-string values will be converted to a string via JSON.stringify\n */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nfunction setOutput(name, value) {\n process.stdout.write(os.EOL);\n command_1.issueCommand('set-output', { name }, value);\n}\nexports.setOutput = setOutput;\n/**\n * Enables or disables the echoing of commands into stdout for the rest of the step.\n * Echoing is disabled by default if ACTIONS_STEP_DEBUG is not set.\n *\n */\nfunction setCommandEcho(enabled) {\n command_1.issue('echo', enabled ? 'on' : 'off');\n}\nexports.setCommandEcho = setCommandEcho;\n//-----------------------------------------------------------------------\n// Results\n//-----------------------------------------------------------------------\n/**\n * Sets the action status to failed.\n * When the action exits it will be with an exit code of 1\n * @param message add error issue message\n */\nfunction setFailed(message) {\n process.exitCode = ExitCode.Failure;\n error(message);\n}\nexports.setFailed = setFailed;\n//-----------------------------------------------------------------------\n// Logging Commands\n//-----------------------------------------------------------------------\n/**\n * Gets whether Actions Step Debug is on or not\n */\nfunction isDebug() {\n return process.env['RUNNER_DEBUG'] === '1';\n}\nexports.isDebug = isDebug;\n/**\n * Writes debug message to user log\n * @param message debug message\n */\nfunction debug(message) {\n command_1.issueCommand('debug', {}, message);\n}\nexports.debug = debug;\n/**\n * Adds an error issue\n * @param message error issue message. Errors will be converted to string via toString()\n * @param properties optional properties to add to the annotation.\n */\nfunction error(message, properties = {}) {\n command_1.issueCommand('error', utils_1.toCommandProperties(properties), message instanceof Error ? message.toString() : message);\n}\nexports.error = error;\n/**\n * Adds a warning issue\n * @param message warning issue message. Errors will be converted to string via toString()\n * @param properties optional properties to add to the annotation.\n */\nfunction warning(message, properties = {}) {\n command_1.issueCommand('warning', utils_1.toCommandProperties(properties), message instanceof Error ? message.toString() : message);\n}\nexports.warning = warning;\n/**\n * Adds a notice issue\n * @param message notice issue message. Errors will be converted to string via toString()\n * @param properties optional properties to add to the annotation.\n */\nfunction notice(message, properties = {}) {\n command_1.issueCommand('notice', utils_1.toCommandProperties(properties), message instanceof Error ? message.toString() : message);\n}\nexports.notice = notice;\n/**\n * Writes info to log with console.log.\n * @param message info message\n */\nfunction info(message) {\n process.stdout.write(message + os.EOL);\n}\nexports.info = info;\n/**\n * Begin an output group.\n *\n * Output until the next `groupEnd` will be foldable in this group\n *\n * @param name The name of the output group\n */\nfunction startGroup(name) {\n command_1.issue('group', name);\n}\nexports.startGroup = startGroup;\n/**\n * End an output group.\n */\nfunction endGroup() {\n command_1.issue('endgroup');\n}\nexports.endGroup = endGroup;\n/**\n * Wrap an asynchronous function call in a group.\n *\n * Returns the same type as the function itself.\n *\n * @param name The name of the group\n * @param fn The function to wrap in the group\n */\nfunction group(name, fn) {\n return __awaiter(this, void 0, void 0, function* () {\n startGroup(name);\n let result;\n try {\n result = yield fn();\n }\n finally {\n endGroup();\n }\n return result;\n });\n}\nexports.group = group;\n//-----------------------------------------------------------------------\n// Wrapper action state\n//-----------------------------------------------------------------------\n/**\n * Saves state for current action, the state can only be retrieved by this action's post job execution.\n *\n * @param name name of the state to store\n * @param value value to store. Non-string values will be converted to a string via JSON.stringify\n */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nfunction saveState(name, value) {\n command_1.issueCommand('save-state', { name }, value);\n}\nexports.saveState = saveState;\n/**\n * Gets the value of an state set by this action's main execution.\n *\n * @param name name of the state to get\n * @returns string\n */\nfunction getState(name) {\n return process.env[`STATE_${name}`] || '';\n}\nexports.getState = getState;\n//# sourceMappingURL=core.js.map","\"use strict\";\n// For internal use, subject to change.\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n});\nvar __importStar = (this && this.__importStar) || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n __setModuleDefault(result, mod);\n return result;\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.issueCommand = void 0;\n// We use any as a valid input type\n/* eslint-disable @typescript-eslint/no-explicit-any */\nconst fs = __importStar(require(\"fs\"));\nconst os = __importStar(require(\"os\"));\nconst utils_1 = require(\"./utils\");\nfunction issueCommand(command, message) {\n const filePath = process.env[`GITHUB_${command}`];\n if (!filePath) {\n throw new Error(`Unable to find environment variable for file command ${command}`);\n }\n if (!fs.existsSync(filePath)) {\n throw new Error(`Missing file at path: ${filePath}`);\n }\n fs.appendFileSync(filePath, `${utils_1.toCommandValue(message)}${os.EOL}`, {\n encoding: 'utf8'\n });\n}\nexports.issueCommand = issueCommand;\n//# sourceMappingURL=file-command.js.map","\"use strict\";\n// We use any as a valid input type\n/* eslint-disable @typescript-eslint/no-explicit-any */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.toCommandProperties = exports.toCommandValue = void 0;\n/**\n * Sanitizes an input into a string so it can be passed into issueCommand safely\n * @param input input to sanitize into a string\n */\nfunction toCommandValue(input) {\n if (input === null || input === undefined) {\n return '';\n }\n else if (typeof input === 'string' || input instanceof String) {\n return input;\n }\n return JSON.stringify(input);\n}\nexports.toCommandValue = toCommandValue;\n/**\n *\n * @param annotationProperties\n * @returns The command properties to send with the actual annotation command\n * See IssueCommandProperties: https://github.com/actions/runner/blob/main/src/Runner.Worker/ActionCommandManager.cs#L646\n */\nfunction toCommandProperties(annotationProperties) {\n if (!Object.keys(annotationProperties).length) {\n return {};\n }\n return {\n title: annotationProperties.title,\n line: annotationProperties.startLine,\n endLine: annotationProperties.endLine,\n col: annotationProperties.startColumn,\n endColumn: annotationProperties.endColumn\n };\n}\nexports.toCommandProperties = toCommandProperties;\n//# sourceMappingURL=utils.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.ECS = void 0;\nconst ECSClient_1 = require(\"./ECSClient\");\nconst CreateCapacityProviderCommand_1 = require(\"./commands/CreateCapacityProviderCommand\");\nconst CreateClusterCommand_1 = require(\"./commands/CreateClusterCommand\");\nconst CreateServiceCommand_1 = require(\"./commands/CreateServiceCommand\");\nconst CreateTaskSetCommand_1 = require(\"./commands/CreateTaskSetCommand\");\nconst DeleteAccountSettingCommand_1 = require(\"./commands/DeleteAccountSettingCommand\");\nconst DeleteAttributesCommand_1 = require(\"./commands/DeleteAttributesCommand\");\nconst DeleteCapacityProviderCommand_1 = require(\"./commands/DeleteCapacityProviderCommand\");\nconst DeleteClusterCommand_1 = require(\"./commands/DeleteClusterCommand\");\nconst DeleteServiceCommand_1 = require(\"./commands/DeleteServiceCommand\");\nconst DeleteTaskSetCommand_1 = require(\"./commands/DeleteTaskSetCommand\");\nconst DeregisterContainerInstanceCommand_1 = require(\"./commands/DeregisterContainerInstanceCommand\");\nconst DeregisterTaskDefinitionCommand_1 = require(\"./commands/DeregisterTaskDefinitionCommand\");\nconst DescribeCapacityProvidersCommand_1 = require(\"./commands/DescribeCapacityProvidersCommand\");\nconst DescribeClustersCommand_1 = require(\"./commands/DescribeClustersCommand\");\nconst DescribeContainerInstancesCommand_1 = require(\"./commands/DescribeContainerInstancesCommand\");\nconst DescribeServicesCommand_1 = require(\"./commands/DescribeServicesCommand\");\nconst DescribeTaskDefinitionCommand_1 = require(\"./commands/DescribeTaskDefinitionCommand\");\nconst DescribeTaskSetsCommand_1 = require(\"./commands/DescribeTaskSetsCommand\");\nconst DescribeTasksCommand_1 = require(\"./commands/DescribeTasksCommand\");\nconst DiscoverPollEndpointCommand_1 = require(\"./commands/DiscoverPollEndpointCommand\");\nconst ExecuteCommandCommand_1 = require(\"./commands/ExecuteCommandCommand\");\nconst ListAccountSettingsCommand_1 = require(\"./commands/ListAccountSettingsCommand\");\nconst ListAttributesCommand_1 = require(\"./commands/ListAttributesCommand\");\nconst ListClustersCommand_1 = require(\"./commands/ListClustersCommand\");\nconst ListContainerInstancesCommand_1 = require(\"./commands/ListContainerInstancesCommand\");\nconst ListServicesCommand_1 = require(\"./commands/ListServicesCommand\");\nconst ListTagsForResourceCommand_1 = require(\"./commands/ListTagsForResourceCommand\");\nconst ListTaskDefinitionFamiliesCommand_1 = require(\"./commands/ListTaskDefinitionFamiliesCommand\");\nconst ListTaskDefinitionsCommand_1 = require(\"./commands/ListTaskDefinitionsCommand\");\nconst ListTasksCommand_1 = require(\"./commands/ListTasksCommand\");\nconst PutAccountSettingCommand_1 = require(\"./commands/PutAccountSettingCommand\");\nconst PutAccountSettingDefaultCommand_1 = require(\"./commands/PutAccountSettingDefaultCommand\");\nconst PutAttributesCommand_1 = require(\"./commands/PutAttributesCommand\");\nconst PutClusterCapacityProvidersCommand_1 = require(\"./commands/PutClusterCapacityProvidersCommand\");\nconst RegisterContainerInstanceCommand_1 = require(\"./commands/RegisterContainerInstanceCommand\");\nconst RegisterTaskDefinitionCommand_1 = require(\"./commands/RegisterTaskDefinitionCommand\");\nconst RunTaskCommand_1 = require(\"./commands/RunTaskCommand\");\nconst StartTaskCommand_1 = require(\"./commands/StartTaskCommand\");\nconst StopTaskCommand_1 = require(\"./commands/StopTaskCommand\");\nconst SubmitAttachmentStateChangesCommand_1 = require(\"./commands/SubmitAttachmentStateChangesCommand\");\nconst SubmitContainerStateChangeCommand_1 = require(\"./commands/SubmitContainerStateChangeCommand\");\nconst SubmitTaskStateChangeCommand_1 = require(\"./commands/SubmitTaskStateChangeCommand\");\nconst TagResourceCommand_1 = require(\"./commands/TagResourceCommand\");\nconst UntagResourceCommand_1 = require(\"./commands/UntagResourceCommand\");\nconst UpdateCapacityProviderCommand_1 = require(\"./commands/UpdateCapacityProviderCommand\");\nconst UpdateClusterCommand_1 = require(\"./commands/UpdateClusterCommand\");\nconst UpdateClusterSettingsCommand_1 = require(\"./commands/UpdateClusterSettingsCommand\");\nconst UpdateContainerAgentCommand_1 = require(\"./commands/UpdateContainerAgentCommand\");\nconst UpdateContainerInstancesStateCommand_1 = require(\"./commands/UpdateContainerInstancesStateCommand\");\nconst UpdateServiceCommand_1 = require(\"./commands/UpdateServiceCommand\");\nconst UpdateServicePrimaryTaskSetCommand_1 = require(\"./commands/UpdateServicePrimaryTaskSetCommand\");\nconst UpdateTaskSetCommand_1 = require(\"./commands/UpdateTaskSetCommand\");\n/**\n * Amazon Elastic Container Service\n * \t\t

Amazon Elastic Container Service (Amazon ECS) is a highly scalable, fast, container management service that makes\n * \t\t\tit easy to run, stop, and manage Docker containers on a cluster. You can host your\n * \t\t\tcluster on a serverless infrastructure that is managed by Amazon ECS by launching your\n * \t\t\tservices or tasks on Fargate. For more control, you can host your tasks on a cluster\n * \t\t\tof Amazon Elastic Compute Cloud (Amazon EC2) instances that you manage.

\n * \t\t

Amazon ECS makes it easy to launch and stop container-based applications with simple API\n * \t\t\tcalls, allows you to get the state of your cluster from a centralized service, and gives\n * \t\t\tyou access to many familiar Amazon EC2 features.

\n * \t\t

You can use Amazon ECS to schedule the placement of containers across your cluster based on\n * \t\t\tyour resource needs, isolation policies, and availability requirements. Amazon ECS eliminates\n * \t\t\tthe need for you to operate your own cluster management and configuration management\n * \t\t\tsystems or worry about scaling your management infrastructure.

\n */\nclass ECS extends ECSClient_1.ECSClient {\n createCapacityProvider(args, optionsOrCb, cb) {\n const command = new CreateCapacityProviderCommand_1.CreateCapacityProviderCommand(args);\n if (typeof optionsOrCb === \"function\") {\n this.send(command, optionsOrCb);\n }\n else if (typeof cb === \"function\") {\n if (typeof optionsOrCb !== \"object\")\n throw new Error(`Expect http options but get ${typeof optionsOrCb}`);\n this.send(command, optionsOrCb || {}, cb);\n }\n else {\n return this.send(command, optionsOrCb);\n }\n }\n createCluster(args, optionsOrCb, cb) {\n const command = new CreateClusterCommand_1.CreateClusterCommand(args);\n if (typeof optionsOrCb === \"function\") {\n this.send(command, optionsOrCb);\n }\n else if (typeof cb === \"function\") {\n if (typeof optionsOrCb !== \"object\")\n throw new Error(`Expect http options but get ${typeof optionsOrCb}`);\n this.send(command, optionsOrCb || {}, cb);\n }\n else {\n return this.send(command, optionsOrCb);\n }\n }\n createService(args, optionsOrCb, cb) {\n const command = new CreateServiceCommand_1.CreateServiceCommand(args);\n if (typeof optionsOrCb === \"function\") {\n this.send(command, optionsOrCb);\n }\n else if (typeof cb === \"function\") {\n if (typeof optionsOrCb !== \"object\")\n throw new Error(`Expect http options but get ${typeof optionsOrCb}`);\n this.send(command, optionsOrCb || {}, cb);\n }\n else {\n return this.send(command, optionsOrCb);\n }\n }\n createTaskSet(args, optionsOrCb, cb) {\n const command = new CreateTaskSetCommand_1.CreateTaskSetCommand(args);\n if (typeof optionsOrCb === \"function\") {\n this.send(command, optionsOrCb);\n }\n else if (typeof cb === \"function\") {\n if (typeof optionsOrCb !== \"object\")\n throw new Error(`Expect http options but get ${typeof optionsOrCb}`);\n this.send(command, optionsOrCb || {}, cb);\n }\n else {\n return this.send(command, optionsOrCb);\n }\n }\n deleteAccountSetting(args, optionsOrCb, cb) {\n const command = new DeleteAccountSettingCommand_1.DeleteAccountSettingCommand(args);\n if (typeof optionsOrCb === \"function\") {\n this.send(command, optionsOrCb);\n }\n else if (typeof cb === \"function\") {\n if (typeof optionsOrCb !== \"object\")\n throw new Error(`Expect http options but get ${typeof optionsOrCb}`);\n this.send(command, optionsOrCb || {}, cb);\n }\n else {\n return this.send(command, optionsOrCb);\n }\n }\n deleteAttributes(args, optionsOrCb, cb) {\n const command = new DeleteAttributesCommand_1.DeleteAttributesCommand(args);\n if (typeof optionsOrCb === \"function\") {\n this.send(command, optionsOrCb);\n }\n else if (typeof cb === \"function\") {\n if (typeof optionsOrCb !== \"object\")\n throw new Error(`Expect http options but get ${typeof optionsOrCb}`);\n this.send(command, optionsOrCb || {}, cb);\n }\n else {\n return this.send(command, optionsOrCb);\n }\n }\n deleteCapacityProvider(args, optionsOrCb, cb) {\n const command = new DeleteCapacityProviderCommand_1.DeleteCapacityProviderCommand(args);\n if (typeof optionsOrCb === \"function\") {\n this.send(command, optionsOrCb);\n }\n else if (typeof cb === \"function\") {\n if (typeof optionsOrCb !== \"object\")\n throw new Error(`Expect http options but get ${typeof optionsOrCb}`);\n this.send(command, optionsOrCb || {}, cb);\n }\n else {\n return this.send(command, optionsOrCb);\n }\n }\n deleteCluster(args, optionsOrCb, cb) {\n const command = new DeleteClusterCommand_1.DeleteClusterCommand(args);\n if (typeof optionsOrCb === \"function\") {\n this.send(command, optionsOrCb);\n }\n else if (typeof cb === \"function\") {\n if (typeof optionsOrCb !== \"object\")\n throw new Error(`Expect http options but get ${typeof optionsOrCb}`);\n this.send(command, optionsOrCb || {}, cb);\n }\n else {\n return this.send(command, optionsOrCb);\n }\n }\n deleteService(args, optionsOrCb, cb) {\n const command = new DeleteServiceCommand_1.DeleteServiceCommand(args);\n if (typeof optionsOrCb === \"function\") {\n this.send(command, optionsOrCb);\n }\n else if (typeof cb === \"function\") {\n if (typeof optionsOrCb !== \"object\")\n throw new Error(`Expect http options but get ${typeof optionsOrCb}`);\n this.send(command, optionsOrCb || {}, cb);\n }\n else {\n return this.send(command, optionsOrCb);\n }\n }\n deleteTaskSet(args, optionsOrCb, cb) {\n const command = new DeleteTaskSetCommand_1.DeleteTaskSetCommand(args);\n if (typeof optionsOrCb === \"function\") {\n this.send(command, optionsOrCb);\n }\n else if (typeof cb === \"function\") {\n if (typeof optionsOrCb !== \"object\")\n throw new Error(`Expect http options but get ${typeof optionsOrCb}`);\n this.send(command, optionsOrCb || {}, cb);\n }\n else {\n return this.send(command, optionsOrCb);\n }\n }\n deregisterContainerInstance(args, optionsOrCb, cb) {\n const command = new DeregisterContainerInstanceCommand_1.DeregisterContainerInstanceCommand(args);\n if (typeof optionsOrCb === \"function\") {\n this.send(command, optionsOrCb);\n }\n else if (typeof cb === \"function\") {\n if (typeof optionsOrCb !== \"object\")\n throw new Error(`Expect http options but get ${typeof optionsOrCb}`);\n this.send(command, optionsOrCb || {}, cb);\n }\n else {\n return this.send(command, optionsOrCb);\n }\n }\n deregisterTaskDefinition(args, optionsOrCb, cb) {\n const command = new DeregisterTaskDefinitionCommand_1.DeregisterTaskDefinitionCommand(args);\n if (typeof optionsOrCb === \"function\") {\n this.send(command, optionsOrCb);\n }\n else if (typeof cb === \"function\") {\n if (typeof optionsOrCb !== \"object\")\n throw new Error(`Expect http options but get ${typeof optionsOrCb}`);\n this.send(command, optionsOrCb || {}, cb);\n }\n else {\n return this.send(command, optionsOrCb);\n }\n }\n describeCapacityProviders(args, optionsOrCb, cb) {\n const command = new DescribeCapacityProvidersCommand_1.DescribeCapacityProvidersCommand(args);\n if (typeof optionsOrCb === \"function\") {\n this.send(command, optionsOrCb);\n }\n else if (typeof cb === \"function\") {\n if (typeof optionsOrCb !== \"object\")\n throw new Error(`Expect http options but get ${typeof optionsOrCb}`);\n this.send(command, optionsOrCb || {}, cb);\n }\n else {\n return this.send(command, optionsOrCb);\n }\n }\n describeClusters(args, optionsOrCb, cb) {\n const command = new DescribeClustersCommand_1.DescribeClustersCommand(args);\n if (typeof optionsOrCb === \"function\") {\n this.send(command, optionsOrCb);\n }\n else if (typeof cb === \"function\") {\n if (typeof optionsOrCb !== \"object\")\n throw new Error(`Expect http options but get ${typeof optionsOrCb}`);\n this.send(command, optionsOrCb || {}, cb);\n }\n else {\n return this.send(command, optionsOrCb);\n }\n }\n describeContainerInstances(args, optionsOrCb, cb) {\n const command = new DescribeContainerInstancesCommand_1.DescribeContainerInstancesCommand(args);\n if (typeof optionsOrCb === \"function\") {\n this.send(command, optionsOrCb);\n }\n else if (typeof cb === \"function\") {\n if (typeof optionsOrCb !== \"object\")\n throw new Error(`Expect http options but get ${typeof optionsOrCb}`);\n this.send(command, optionsOrCb || {}, cb);\n }\n else {\n return this.send(command, optionsOrCb);\n }\n }\n describeServices(args, optionsOrCb, cb) {\n const command = new DescribeServicesCommand_1.DescribeServicesCommand(args);\n if (typeof optionsOrCb === \"function\") {\n this.send(command, optionsOrCb);\n }\n else if (typeof cb === \"function\") {\n if (typeof optionsOrCb !== \"object\")\n throw new Error(`Expect http options but get ${typeof optionsOrCb}`);\n this.send(command, optionsOrCb || {}, cb);\n }\n else {\n return this.send(command, optionsOrCb);\n }\n }\n describeTaskDefinition(args, optionsOrCb, cb) {\n const command = new DescribeTaskDefinitionCommand_1.DescribeTaskDefinitionCommand(args);\n if (typeof optionsOrCb === \"function\") {\n this.send(command, optionsOrCb);\n }\n else if (typeof cb === \"function\") {\n if (typeof optionsOrCb !== \"object\")\n throw new Error(`Expect http options but get ${typeof optionsOrCb}`);\n this.send(command, optionsOrCb || {}, cb);\n }\n else {\n return this.send(command, optionsOrCb);\n }\n }\n describeTasks(args, optionsOrCb, cb) {\n const command = new DescribeTasksCommand_1.DescribeTasksCommand(args);\n if (typeof optionsOrCb === \"function\") {\n this.send(command, optionsOrCb);\n }\n else if (typeof cb === \"function\") {\n if (typeof optionsOrCb !== \"object\")\n throw new Error(`Expect http options but get ${typeof optionsOrCb}`);\n this.send(command, optionsOrCb || {}, cb);\n }\n else {\n return this.send(command, optionsOrCb);\n }\n }\n describeTaskSets(args, optionsOrCb, cb) {\n const command = new DescribeTaskSetsCommand_1.DescribeTaskSetsCommand(args);\n if (typeof optionsOrCb === \"function\") {\n this.send(command, optionsOrCb);\n }\n else if (typeof cb === \"function\") {\n if (typeof optionsOrCb !== \"object\")\n throw new Error(`Expect http options but get ${typeof optionsOrCb}`);\n this.send(command, optionsOrCb || {}, cb);\n }\n else {\n return this.send(command, optionsOrCb);\n }\n }\n discoverPollEndpoint(args, optionsOrCb, cb) {\n const command = new DiscoverPollEndpointCommand_1.DiscoverPollEndpointCommand(args);\n if (typeof optionsOrCb === \"function\") {\n this.send(command, optionsOrCb);\n }\n else if (typeof cb === \"function\") {\n if (typeof optionsOrCb !== \"object\")\n throw new Error(`Expect http options but get ${typeof optionsOrCb}`);\n this.send(command, optionsOrCb || {}, cb);\n }\n else {\n return this.send(command, optionsOrCb);\n }\n }\n executeCommand(args, optionsOrCb, cb) {\n const command = new ExecuteCommandCommand_1.ExecuteCommandCommand(args);\n if (typeof optionsOrCb === \"function\") {\n this.send(command, optionsOrCb);\n }\n else if (typeof cb === \"function\") {\n if (typeof optionsOrCb !== \"object\")\n throw new Error(`Expect http options but get ${typeof optionsOrCb}`);\n this.send(command, optionsOrCb || {}, cb);\n }\n else {\n return this.send(command, optionsOrCb);\n }\n }\n listAccountSettings(args, optionsOrCb, cb) {\n const command = new ListAccountSettingsCommand_1.ListAccountSettingsCommand(args);\n if (typeof optionsOrCb === \"function\") {\n this.send(command, optionsOrCb);\n }\n else if (typeof cb === \"function\") {\n if (typeof optionsOrCb !== \"object\")\n throw new Error(`Expect http options but get ${typeof optionsOrCb}`);\n this.send(command, optionsOrCb || {}, cb);\n }\n else {\n return this.send(command, optionsOrCb);\n }\n }\n listAttributes(args, optionsOrCb, cb) {\n const command = new ListAttributesCommand_1.ListAttributesCommand(args);\n if (typeof optionsOrCb === \"function\") {\n this.send(command, optionsOrCb);\n }\n else if (typeof cb === \"function\") {\n if (typeof optionsOrCb !== \"object\")\n throw new Error(`Expect http options but get ${typeof optionsOrCb}`);\n this.send(command, optionsOrCb || {}, cb);\n }\n else {\n return this.send(command, optionsOrCb);\n }\n }\n listClusters(args, optionsOrCb, cb) {\n const command = new ListClustersCommand_1.ListClustersCommand(args);\n if (typeof optionsOrCb === \"function\") {\n this.send(command, optionsOrCb);\n }\n else if (typeof cb === \"function\") {\n if (typeof optionsOrCb !== \"object\")\n throw new Error(`Expect http options but get ${typeof optionsOrCb}`);\n this.send(command, optionsOrCb || {}, cb);\n }\n else {\n return this.send(command, optionsOrCb);\n }\n }\n listContainerInstances(args, optionsOrCb, cb) {\n const command = new ListContainerInstancesCommand_1.ListContainerInstancesCommand(args);\n if (typeof optionsOrCb === \"function\") {\n this.send(command, optionsOrCb);\n }\n else if (typeof cb === \"function\") {\n if (typeof optionsOrCb !== \"object\")\n throw new Error(`Expect http options but get ${typeof optionsOrCb}`);\n this.send(command, optionsOrCb || {}, cb);\n }\n else {\n return this.send(command, optionsOrCb);\n }\n }\n listServices(args, optionsOrCb, cb) {\n const command = new ListServicesCommand_1.ListServicesCommand(args);\n if (typeof optionsOrCb === \"function\") {\n this.send(command, optionsOrCb);\n }\n else if (typeof cb === \"function\") {\n if (typeof optionsOrCb !== \"object\")\n throw new Error(`Expect http options but get ${typeof optionsOrCb}`);\n this.send(command, optionsOrCb || {}, cb);\n }\n else {\n return this.send(command, optionsOrCb);\n }\n }\n listTagsForResource(args, optionsOrCb, cb) {\n const command = new ListTagsForResourceCommand_1.ListTagsForResourceCommand(args);\n if (typeof optionsOrCb === \"function\") {\n this.send(command, optionsOrCb);\n }\n else if (typeof cb === \"function\") {\n if (typeof optionsOrCb !== \"object\")\n throw new Error(`Expect http options but get ${typeof optionsOrCb}`);\n this.send(command, optionsOrCb || {}, cb);\n }\n else {\n return this.send(command, optionsOrCb);\n }\n }\n listTaskDefinitionFamilies(args, optionsOrCb, cb) {\n const command = new ListTaskDefinitionFamiliesCommand_1.ListTaskDefinitionFamiliesCommand(args);\n if (typeof optionsOrCb === \"function\") {\n this.send(command, optionsOrCb);\n }\n else if (typeof cb === \"function\") {\n if (typeof optionsOrCb !== \"object\")\n throw new Error(`Expect http options but get ${typeof optionsOrCb}`);\n this.send(command, optionsOrCb || {}, cb);\n }\n else {\n return this.send(command, optionsOrCb);\n }\n }\n listTaskDefinitions(args, optionsOrCb, cb) {\n const command = new ListTaskDefinitionsCommand_1.ListTaskDefinitionsCommand(args);\n if (typeof optionsOrCb === \"function\") {\n this.send(command, optionsOrCb);\n }\n else if (typeof cb === \"function\") {\n if (typeof optionsOrCb !== \"object\")\n throw new Error(`Expect http options but get ${typeof optionsOrCb}`);\n this.send(command, optionsOrCb || {}, cb);\n }\n else {\n return this.send(command, optionsOrCb);\n }\n }\n listTasks(args, optionsOrCb, cb) {\n const command = new ListTasksCommand_1.ListTasksCommand(args);\n if (typeof optionsOrCb === \"function\") {\n this.send(command, optionsOrCb);\n }\n else if (typeof cb === \"function\") {\n if (typeof optionsOrCb !== \"object\")\n throw new Error(`Expect http options but get ${typeof optionsOrCb}`);\n this.send(command, optionsOrCb || {}, cb);\n }\n else {\n return this.send(command, optionsOrCb);\n }\n }\n putAccountSetting(args, optionsOrCb, cb) {\n const command = new PutAccountSettingCommand_1.PutAccountSettingCommand(args);\n if (typeof optionsOrCb === \"function\") {\n this.send(command, optionsOrCb);\n }\n else if (typeof cb === \"function\") {\n if (typeof optionsOrCb !== \"object\")\n throw new Error(`Expect http options but get ${typeof optionsOrCb}`);\n this.send(command, optionsOrCb || {}, cb);\n }\n else {\n return this.send(command, optionsOrCb);\n }\n }\n putAccountSettingDefault(args, optionsOrCb, cb) {\n const command = new PutAccountSettingDefaultCommand_1.PutAccountSettingDefaultCommand(args);\n if (typeof optionsOrCb === \"function\") {\n this.send(command, optionsOrCb);\n }\n else if (typeof cb === \"function\") {\n if (typeof optionsOrCb !== \"object\")\n throw new Error(`Expect http options but get ${typeof optionsOrCb}`);\n this.send(command, optionsOrCb || {}, cb);\n }\n else {\n return this.send(command, optionsOrCb);\n }\n }\n putAttributes(args, optionsOrCb, cb) {\n const command = new PutAttributesCommand_1.PutAttributesCommand(args);\n if (typeof optionsOrCb === \"function\") {\n this.send(command, optionsOrCb);\n }\n else if (typeof cb === \"function\") {\n if (typeof optionsOrCb !== \"object\")\n throw new Error(`Expect http options but get ${typeof optionsOrCb}`);\n this.send(command, optionsOrCb || {}, cb);\n }\n else {\n return this.send(command, optionsOrCb);\n }\n }\n putClusterCapacityProviders(args, optionsOrCb, cb) {\n const command = new PutClusterCapacityProvidersCommand_1.PutClusterCapacityProvidersCommand(args);\n if (typeof optionsOrCb === \"function\") {\n this.send(command, optionsOrCb);\n }\n else if (typeof cb === \"function\") {\n if (typeof optionsOrCb !== \"object\")\n throw new Error(`Expect http options but get ${typeof optionsOrCb}`);\n this.send(command, optionsOrCb || {}, cb);\n }\n else {\n return this.send(command, optionsOrCb);\n }\n }\n registerContainerInstance(args, optionsOrCb, cb) {\n const command = new RegisterContainerInstanceCommand_1.RegisterContainerInstanceCommand(args);\n if (typeof optionsOrCb === \"function\") {\n this.send(command, optionsOrCb);\n }\n else if (typeof cb === \"function\") {\n if (typeof optionsOrCb !== \"object\")\n throw new Error(`Expect http options but get ${typeof optionsOrCb}`);\n this.send(command, optionsOrCb || {}, cb);\n }\n else {\n return this.send(command, optionsOrCb);\n }\n }\n registerTaskDefinition(args, optionsOrCb, cb) {\n const command = new RegisterTaskDefinitionCommand_1.RegisterTaskDefinitionCommand(args);\n if (typeof optionsOrCb === \"function\") {\n this.send(command, optionsOrCb);\n }\n else if (typeof cb === \"function\") {\n if (typeof optionsOrCb !== \"object\")\n throw new Error(`Expect http options but get ${typeof optionsOrCb}`);\n this.send(command, optionsOrCb || {}, cb);\n }\n else {\n return this.send(command, optionsOrCb);\n }\n }\n runTask(args, optionsOrCb, cb) {\n const command = new RunTaskCommand_1.RunTaskCommand(args);\n if (typeof optionsOrCb === \"function\") {\n this.send(command, optionsOrCb);\n }\n else if (typeof cb === \"function\") {\n if (typeof optionsOrCb !== \"object\")\n throw new Error(`Expect http options but get ${typeof optionsOrCb}`);\n this.send(command, optionsOrCb || {}, cb);\n }\n else {\n return this.send(command, optionsOrCb);\n }\n }\n startTask(args, optionsOrCb, cb) {\n const command = new StartTaskCommand_1.StartTaskCommand(args);\n if (typeof optionsOrCb === \"function\") {\n this.send(command, optionsOrCb);\n }\n else if (typeof cb === \"function\") {\n if (typeof optionsOrCb !== \"object\")\n throw new Error(`Expect http options but get ${typeof optionsOrCb}`);\n this.send(command, optionsOrCb || {}, cb);\n }\n else {\n return this.send(command, optionsOrCb);\n }\n }\n stopTask(args, optionsOrCb, cb) {\n const command = new StopTaskCommand_1.StopTaskCommand(args);\n if (typeof optionsOrCb === \"function\") {\n this.send(command, optionsOrCb);\n }\n else if (typeof cb === \"function\") {\n if (typeof optionsOrCb !== \"object\")\n throw new Error(`Expect http options but get ${typeof optionsOrCb}`);\n this.send(command, optionsOrCb || {}, cb);\n }\n else {\n return this.send(command, optionsOrCb);\n }\n }\n submitAttachmentStateChanges(args, optionsOrCb, cb) {\n const command = new SubmitAttachmentStateChangesCommand_1.SubmitAttachmentStateChangesCommand(args);\n if (typeof optionsOrCb === \"function\") {\n this.send(command, optionsOrCb);\n }\n else if (typeof cb === \"function\") {\n if (typeof optionsOrCb !== \"object\")\n throw new Error(`Expect http options but get ${typeof optionsOrCb}`);\n this.send(command, optionsOrCb || {}, cb);\n }\n else {\n return this.send(command, optionsOrCb);\n }\n }\n submitContainerStateChange(args, optionsOrCb, cb) {\n const command = new SubmitContainerStateChangeCommand_1.SubmitContainerStateChangeCommand(args);\n if (typeof optionsOrCb === \"function\") {\n this.send(command, optionsOrCb);\n }\n else if (typeof cb === \"function\") {\n if (typeof optionsOrCb !== \"object\")\n throw new Error(`Expect http options but get ${typeof optionsOrCb}`);\n this.send(command, optionsOrCb || {}, cb);\n }\n else {\n return this.send(command, optionsOrCb);\n }\n }\n submitTaskStateChange(args, optionsOrCb, cb) {\n const command = new SubmitTaskStateChangeCommand_1.SubmitTaskStateChangeCommand(args);\n if (typeof optionsOrCb === \"function\") {\n this.send(command, optionsOrCb);\n }\n else if (typeof cb === \"function\") {\n if (typeof optionsOrCb !== \"object\")\n throw new Error(`Expect http options but get ${typeof optionsOrCb}`);\n this.send(command, optionsOrCb || {}, cb);\n }\n else {\n return this.send(command, optionsOrCb);\n }\n }\n tagResource(args, optionsOrCb, cb) {\n const command = new TagResourceCommand_1.TagResourceCommand(args);\n if (typeof optionsOrCb === \"function\") {\n this.send(command, optionsOrCb);\n }\n else if (typeof cb === \"function\") {\n if (typeof optionsOrCb !== \"object\")\n throw new Error(`Expect http options but get ${typeof optionsOrCb}`);\n this.send(command, optionsOrCb || {}, cb);\n }\n else {\n return this.send(command, optionsOrCb);\n }\n }\n untagResource(args, optionsOrCb, cb) {\n const command = new UntagResourceCommand_1.UntagResourceCommand(args);\n if (typeof optionsOrCb === \"function\") {\n this.send(command, optionsOrCb);\n }\n else if (typeof cb === \"function\") {\n if (typeof optionsOrCb !== \"object\")\n throw new Error(`Expect http options but get ${typeof optionsOrCb}`);\n this.send(command, optionsOrCb || {}, cb);\n }\n else {\n return this.send(command, optionsOrCb);\n }\n }\n updateCapacityProvider(args, optionsOrCb, cb) {\n const command = new UpdateCapacityProviderCommand_1.UpdateCapacityProviderCommand(args);\n if (typeof optionsOrCb === \"function\") {\n this.send(command, optionsOrCb);\n }\n else if (typeof cb === \"function\") {\n if (typeof optionsOrCb !== \"object\")\n throw new Error(`Expect http options but get ${typeof optionsOrCb}`);\n this.send(command, optionsOrCb || {}, cb);\n }\n else {\n return this.send(command, optionsOrCb);\n }\n }\n updateCluster(args, optionsOrCb, cb) {\n const command = new UpdateClusterCommand_1.UpdateClusterCommand(args);\n if (typeof optionsOrCb === \"function\") {\n this.send(command, optionsOrCb);\n }\n else if (typeof cb === \"function\") {\n if (typeof optionsOrCb !== \"object\")\n throw new Error(`Expect http options but get ${typeof optionsOrCb}`);\n this.send(command, optionsOrCb || {}, cb);\n }\n else {\n return this.send(command, optionsOrCb);\n }\n }\n updateClusterSettings(args, optionsOrCb, cb) {\n const command = new UpdateClusterSettingsCommand_1.UpdateClusterSettingsCommand(args);\n if (typeof optionsOrCb === \"function\") {\n this.send(command, optionsOrCb);\n }\n else if (typeof cb === \"function\") {\n if (typeof optionsOrCb !== \"object\")\n throw new Error(`Expect http options but get ${typeof optionsOrCb}`);\n this.send(command, optionsOrCb || {}, cb);\n }\n else {\n return this.send(command, optionsOrCb);\n }\n }\n updateContainerAgent(args, optionsOrCb, cb) {\n const command = new UpdateContainerAgentCommand_1.UpdateContainerAgentCommand(args);\n if (typeof optionsOrCb === \"function\") {\n this.send(command, optionsOrCb);\n }\n else if (typeof cb === \"function\") {\n if (typeof optionsOrCb !== \"object\")\n throw new Error(`Expect http options but get ${typeof optionsOrCb}`);\n this.send(command, optionsOrCb || {}, cb);\n }\n else {\n return this.send(command, optionsOrCb);\n }\n }\n updateContainerInstancesState(args, optionsOrCb, cb) {\n const command = new UpdateContainerInstancesStateCommand_1.UpdateContainerInstancesStateCommand(args);\n if (typeof optionsOrCb === \"function\") {\n this.send(command, optionsOrCb);\n }\n else if (typeof cb === \"function\") {\n if (typeof optionsOrCb !== \"object\")\n throw new Error(`Expect http options but get ${typeof optionsOrCb}`);\n this.send(command, optionsOrCb || {}, cb);\n }\n else {\n return this.send(command, optionsOrCb);\n }\n }\n updateService(args, optionsOrCb, cb) {\n const command = new UpdateServiceCommand_1.UpdateServiceCommand(args);\n if (typeof optionsOrCb === \"function\") {\n this.send(command, optionsOrCb);\n }\n else if (typeof cb === \"function\") {\n if (typeof optionsOrCb !== \"object\")\n throw new Error(`Expect http options but get ${typeof optionsOrCb}`);\n this.send(command, optionsOrCb || {}, cb);\n }\n else {\n return this.send(command, optionsOrCb);\n }\n }\n updateServicePrimaryTaskSet(args, optionsOrCb, cb) {\n const command = new UpdateServicePrimaryTaskSetCommand_1.UpdateServicePrimaryTaskSetCommand(args);\n if (typeof optionsOrCb === \"function\") {\n this.send(command, optionsOrCb);\n }\n else if (typeof cb === \"function\") {\n if (typeof optionsOrCb !== \"object\")\n throw new Error(`Expect http options but get ${typeof optionsOrCb}`);\n this.send(command, optionsOrCb || {}, cb);\n }\n else {\n return this.send(command, optionsOrCb);\n }\n }\n updateTaskSet(args, optionsOrCb, cb) {\n const command = new UpdateTaskSetCommand_1.UpdateTaskSetCommand(args);\n if (typeof optionsOrCb === \"function\") {\n this.send(command, optionsOrCb);\n }\n else if (typeof cb === \"function\") {\n if (typeof optionsOrCb !== \"object\")\n throw new Error(`Expect http options but get ${typeof optionsOrCb}`);\n this.send(command, optionsOrCb || {}, cb);\n }\n else {\n return this.send(command, optionsOrCb);\n }\n }\n}\nexports.ECS = ECS;\n//# sourceMappingURL=ECS.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.ECSClient = void 0;\nconst runtimeConfig_1 = require(\"./runtimeConfig\");\nconst config_resolver_1 = require(\"@aws-sdk/config-resolver\");\nconst middleware_content_length_1 = require(\"@aws-sdk/middleware-content-length\");\nconst middleware_host_header_1 = require(\"@aws-sdk/middleware-host-header\");\nconst middleware_logger_1 = require(\"@aws-sdk/middleware-logger\");\nconst middleware_retry_1 = require(\"@aws-sdk/middleware-retry\");\nconst middleware_signing_1 = require(\"@aws-sdk/middleware-signing\");\nconst middleware_user_agent_1 = require(\"@aws-sdk/middleware-user-agent\");\nconst smithy_client_1 = require(\"@aws-sdk/smithy-client\");\n/**\n * Amazon Elastic Container Service\n * \t\t

Amazon Elastic Container Service (Amazon ECS) is a highly scalable, fast, container management service that makes\n * \t\t\tit easy to run, stop, and manage Docker containers on a cluster. You can host your\n * \t\t\tcluster on a serverless infrastructure that is managed by Amazon ECS by launching your\n * \t\t\tservices or tasks on Fargate. For more control, you can host your tasks on a cluster\n * \t\t\tof Amazon Elastic Compute Cloud (Amazon EC2) instances that you manage.

\n * \t\t

Amazon ECS makes it easy to launch and stop container-based applications with simple API\n * \t\t\tcalls, allows you to get the state of your cluster from a centralized service, and gives\n * \t\t\tyou access to many familiar Amazon EC2 features.

\n * \t\t

You can use Amazon ECS to schedule the placement of containers across your cluster based on\n * \t\t\tyour resource needs, isolation policies, and availability requirements. Amazon ECS eliminates\n * \t\t\tthe need for you to operate your own cluster management and configuration management\n * \t\t\tsystems or worry about scaling your management infrastructure.

\n */\nclass ECSClient extends smithy_client_1.Client {\n constructor(configuration) {\n let _config_0 = runtimeConfig_1.getRuntimeConfig(configuration);\n let _config_1 = config_resolver_1.resolveRegionConfig(_config_0);\n let _config_2 = config_resolver_1.resolveEndpointsConfig(_config_1);\n let _config_3 = middleware_retry_1.resolveRetryConfig(_config_2);\n let _config_4 = middleware_host_header_1.resolveHostHeaderConfig(_config_3);\n let _config_5 = middleware_signing_1.resolveAwsAuthConfig(_config_4);\n let _config_6 = middleware_user_agent_1.resolveUserAgentConfig(_config_5);\n super(_config_6);\n this.config = _config_6;\n this.middlewareStack.use(middleware_retry_1.getRetryPlugin(this.config));\n this.middlewareStack.use(middleware_content_length_1.getContentLengthPlugin(this.config));\n this.middlewareStack.use(middleware_host_header_1.getHostHeaderPlugin(this.config));\n this.middlewareStack.use(middleware_logger_1.getLoggerPlugin(this.config));\n this.middlewareStack.use(middleware_signing_1.getAwsAuthPlugin(this.config));\n this.middlewareStack.use(middleware_user_agent_1.getUserAgentPlugin(this.config));\n }\n /**\n * Destroy underlying resources, like sockets. It's usually not necessary to do this.\n * However in Node.js, it's best to explicitly shut down the client's agent when it is no longer needed.\n * Otherwise, sockets might stay open for quite a long time before the server terminates them.\n */\n destroy() {\n super.destroy();\n }\n}\nexports.ECSClient = ECSClient;\n//# sourceMappingURL=ECSClient.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.CreateCapacityProviderCommand = void 0;\nconst models_0_1 = require(\"../models/models_0\");\nconst Aws_json1_1_1 = require(\"../protocols/Aws_json1_1\");\nconst middleware_serde_1 = require(\"@aws-sdk/middleware-serde\");\nconst smithy_client_1 = require(\"@aws-sdk/smithy-client\");\n/**\n *

Creates a new capacity provider. Capacity providers are associated with an Amazon ECS\n * \t\t\tcluster and are used in capacity provider strategies to facilitate cluster auto\n * \t\t\tscaling.

\n * \t\t

Only capacity providers using an Auto Scaling group can be created. Amazon ECS tasks on\n * \t\t\tFargate use the FARGATE and FARGATE_SPOT capacity providers\n * \t\t\twhich are already created and available to all accounts in Regions supported by\n * \t\t\tFargate.

\n * @example\n * Use a bare-bones client and the command you need to make an API call.\n * ```javascript\n * import { ECSClient, CreateCapacityProviderCommand } from \"@aws-sdk/client-ecs\"; // ES Modules import\n * // const { ECSClient, CreateCapacityProviderCommand } = require(\"@aws-sdk/client-ecs\"); // CommonJS import\n * const client = new ECSClient(config);\n * const command = new CreateCapacityProviderCommand(input);\n * const response = await client.send(command);\n * ```\n *\n * @see {@link CreateCapacityProviderCommandInput} for command's `input` shape.\n * @see {@link CreateCapacityProviderCommandOutput} for command's `response` shape.\n * @see {@link ECSClientResolvedConfig | config} for command's `input` shape.\n *\n */\nclass CreateCapacityProviderCommand extends smithy_client_1.Command {\n // Start section: command_properties\n // End section: command_properties\n constructor(input) {\n // Start section: command_constructor\n super();\n this.input = input;\n // End section: command_constructor\n }\n /**\n * @internal\n */\n resolveMiddleware(clientStack, configuration, options) {\n this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize));\n const stack = clientStack.concat(this.middlewareStack);\n const { logger } = configuration;\n const clientName = \"ECSClient\";\n const commandName = \"CreateCapacityProviderCommand\";\n const handlerExecutionContext = {\n logger,\n clientName,\n commandName,\n inputFilterSensitiveLog: models_0_1.CreateCapacityProviderRequest.filterSensitiveLog,\n outputFilterSensitiveLog: models_0_1.CreateCapacityProviderResponse.filterSensitiveLog,\n };\n const { requestHandler } = configuration;\n return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);\n }\n serialize(input, context) {\n return Aws_json1_1_1.serializeAws_json1_1CreateCapacityProviderCommand(input, context);\n }\n deserialize(output, context) {\n return Aws_json1_1_1.deserializeAws_json1_1CreateCapacityProviderCommand(output, context);\n }\n}\nexports.CreateCapacityProviderCommand = CreateCapacityProviderCommand;\n//# sourceMappingURL=CreateCapacityProviderCommand.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.CreateClusterCommand = void 0;\nconst models_0_1 = require(\"../models/models_0\");\nconst Aws_json1_1_1 = require(\"../protocols/Aws_json1_1\");\nconst middleware_serde_1 = require(\"@aws-sdk/middleware-serde\");\nconst smithy_client_1 = require(\"@aws-sdk/smithy-client\");\n/**\n *

Creates a new Amazon ECS cluster. By default, your account receives a default\n * \t\t\tcluster when you launch your first container instance. However, you can create your own\n * \t\t\tcluster with a unique name with the CreateCluster action.

\n * \t\t \n * \t\t\t

When you call the CreateCluster API operation, Amazon ECS attempts to\n * \t\t\t\tcreate the Amazon ECS service-linked role for your account so that required resources in\n * \t\t\t\tother Amazon Web Services services can be managed on your behalf. However, if the IAM user that\n * \t\t\t\tmakes the call does not have permissions to create the service-linked role, it is\n * \t\t\t\tnot created. For more information, see Using\n * \t\t\t\t\tService-Linked Roles for Amazon ECS in the\n * \t\t\t\t\tAmazon Elastic Container Service Developer Guide.

\n * \t\t
\n * @example\n * Use a bare-bones client and the command you need to make an API call.\n * ```javascript\n * import { ECSClient, CreateClusterCommand } from \"@aws-sdk/client-ecs\"; // ES Modules import\n * // const { ECSClient, CreateClusterCommand } = require(\"@aws-sdk/client-ecs\"); // CommonJS import\n * const client = new ECSClient(config);\n * const command = new CreateClusterCommand(input);\n * const response = await client.send(command);\n * ```\n *\n * @see {@link CreateClusterCommandInput} for command's `input` shape.\n * @see {@link CreateClusterCommandOutput} for command's `response` shape.\n * @see {@link ECSClientResolvedConfig | config} for command's `input` shape.\n *\n */\nclass CreateClusterCommand extends smithy_client_1.Command {\n // Start section: command_properties\n // End section: command_properties\n constructor(input) {\n // Start section: command_constructor\n super();\n this.input = input;\n // End section: command_constructor\n }\n /**\n * @internal\n */\n resolveMiddleware(clientStack, configuration, options) {\n this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize));\n const stack = clientStack.concat(this.middlewareStack);\n const { logger } = configuration;\n const clientName = \"ECSClient\";\n const commandName = \"CreateClusterCommand\";\n const handlerExecutionContext = {\n logger,\n clientName,\n commandName,\n inputFilterSensitiveLog: models_0_1.CreateClusterRequest.filterSensitiveLog,\n outputFilterSensitiveLog: models_0_1.CreateClusterResponse.filterSensitiveLog,\n };\n const { requestHandler } = configuration;\n return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);\n }\n serialize(input, context) {\n return Aws_json1_1_1.serializeAws_json1_1CreateClusterCommand(input, context);\n }\n deserialize(output, context) {\n return Aws_json1_1_1.deserializeAws_json1_1CreateClusterCommand(output, context);\n }\n}\nexports.CreateClusterCommand = CreateClusterCommand;\n//# sourceMappingURL=CreateClusterCommand.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.CreateServiceCommand = void 0;\nconst models_0_1 = require(\"../models/models_0\");\nconst Aws_json1_1_1 = require(\"../protocols/Aws_json1_1\");\nconst middleware_serde_1 = require(\"@aws-sdk/middleware-serde\");\nconst smithy_client_1 = require(\"@aws-sdk/smithy-client\");\n/**\n *

Runs and maintains a desired number of tasks from a specified task definition. If the\n * \t\t\tnumber of tasks running in a service drops below the desiredCount, Amazon ECS\n * \t\t\truns another copy of the task in the specified cluster. To update an existing service,\n * \t\t\tsee the UpdateService action.

\n * \t\t

In addition to maintaining the desired count of tasks in your service, you can\n * \t\t\toptionally run your service behind one or more load balancers. The load balancers\n * \t\t\tdistribute traffic across the tasks that are associated with the service. For more\n * \t\t\tinformation, see Service Load Balancing in the\n * \t\t\t\tAmazon Elastic Container Service Developer Guide.

\n * \t\t

Tasks for services that do not use a load balancer are considered\n * \t\t\thealthy if they're in the RUNNING state. Tasks for services that\n * \t\t\t\tdo use a load balancer are considered healthy if they're in the\n * \t\t\t\tRUNNING state and the container instance that they're hosted on is\n * \t\t\treported as healthy by the load balancer.

\n * \t\t

There are two service scheduler strategies available:

\n * \t\t \n * \t\t

You can optionally specify a deployment configuration for your service. The deployment\n * \t\t\tis triggered by changing properties, such as the task definition or the desired count of\n * \t\t\ta service, with an UpdateService operation. The default value for a\n * \t\t\treplica service for minimumHealthyPercent is 100%. The default value for a\n * \t\t\tdaemon service for minimumHealthyPercent is 0%.

\n * \t\t

If a service is using the ECS deployment controller, the minimum healthy\n * \t\t\tpercent represents a lower limit on the number of tasks in a service that must remain in\n * \t\t\tthe RUNNING state during a deployment, as a percentage of the desired\n * \t\t\tnumber of tasks (rounded up to the nearest integer), and while any container instances\n * \t\t\tare in the DRAINING state if the service contains tasks using the\n * \t\t\tEC2 launch type. This parameter enables you to deploy without using\n * \t\t\tadditional cluster capacity. For example, if your service has a desired number of four\n * \t\t\ttasks and a minimum healthy percent of 50%, the scheduler might stop two existing tasks\n * \t\t\tto free up cluster capacity before starting two new tasks. Tasks for services that\n * \t\t\t\tdo not use a load balancer are considered healthy if they're in\n * \t\t\tthe RUNNING state. Tasks for services that do use a\n * \t\t\tload balancer are considered healthy if they're in the RUNNING state and\n * \t\t\tthey're reported as healthy by the load balancer. The default value for minimum healthy\n * \t\t\tpercent is 100%.

\n * \t\t

If a service is using the ECS deployment controller, the maximum percent parameter represents an upper limit on the\n * \t\t\tnumber of tasks in a service that are allowed in the RUNNING or\n * \t\t\t\tPENDING state during a deployment, as a percentage of the desired\n * \t\t\tnumber of tasks (rounded down to the nearest integer), and while any container instances\n * \t\t\tare in the DRAINING state if the service contains tasks using the\n * \t\t\tEC2 launch type. This parameter enables you to define the deployment batch\n * \t\t\tsize. For example, if your service has a desired number of four tasks and a maximum\n * \t\t\tpercent value of 200%, the scheduler may start four new tasks before stopping the four\n * \t\t\tolder tasks (provided that the cluster resources required to do this are available). The\n * \t\t\tdefault value for maximum percent is 200%.

\n * \t\t

If a service is using either the CODE_DEPLOY or EXTERNAL\n * \t\t\tdeployment controller types and tasks that use the EC2 launch type, the\n * \t\t\t\tminimum healthy percent and maximum percent values are used only to define the lower and upper limit\n * \t\t\ton the number of the tasks in the service that remain in the RUNNING state\n * \t\t\twhile the container instances are in the DRAINING state. If the tasks in\n * \t\t\tthe service use the Fargate launch type, the minimum healthy percent and\n * \t\t\tmaximum percent values aren't used, although they're currently visible when describing\n * \t\t\tyour service.

\n * \t\t

When creating a service that uses the EXTERNAL deployment controller, you\n * \t\t\tcan specify only parameters that aren't controlled at the task set level. The only\n * \t\t\trequired parameter is the service name. You control your services using the CreateTaskSet operation. For more information, see Amazon ECS Deployment Types in the Amazon Elastic Container Service Developer Guide.

\n * \t\t

When the service scheduler launches new tasks, it determines task placement in your\n * \t\t\tcluster using the following logic:

\n * \t\t \n * @example\n * Use a bare-bones client and the command you need to make an API call.\n * ```javascript\n * import { ECSClient, CreateServiceCommand } from \"@aws-sdk/client-ecs\"; // ES Modules import\n * // const { ECSClient, CreateServiceCommand } = require(\"@aws-sdk/client-ecs\"); // CommonJS import\n * const client = new ECSClient(config);\n * const command = new CreateServiceCommand(input);\n * const response = await client.send(command);\n * ```\n *\n * @see {@link CreateServiceCommandInput} for command's `input` shape.\n * @see {@link CreateServiceCommandOutput} for command's `response` shape.\n * @see {@link ECSClientResolvedConfig | config} for command's `input` shape.\n *\n */\nclass CreateServiceCommand extends smithy_client_1.Command {\n // Start section: command_properties\n // End section: command_properties\n constructor(input) {\n // Start section: command_constructor\n super();\n this.input = input;\n // End section: command_constructor\n }\n /**\n * @internal\n */\n resolveMiddleware(clientStack, configuration, options) {\n this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize));\n const stack = clientStack.concat(this.middlewareStack);\n const { logger } = configuration;\n const clientName = \"ECSClient\";\n const commandName = \"CreateServiceCommand\";\n const handlerExecutionContext = {\n logger,\n clientName,\n commandName,\n inputFilterSensitiveLog: models_0_1.CreateServiceRequest.filterSensitiveLog,\n outputFilterSensitiveLog: models_0_1.CreateServiceResponse.filterSensitiveLog,\n };\n const { requestHandler } = configuration;\n return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);\n }\n serialize(input, context) {\n return Aws_json1_1_1.serializeAws_json1_1CreateServiceCommand(input, context);\n }\n deserialize(output, context) {\n return Aws_json1_1_1.deserializeAws_json1_1CreateServiceCommand(output, context);\n }\n}\nexports.CreateServiceCommand = CreateServiceCommand;\n//# sourceMappingURL=CreateServiceCommand.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.CreateTaskSetCommand = void 0;\nconst models_0_1 = require(\"../models/models_0\");\nconst Aws_json1_1_1 = require(\"../protocols/Aws_json1_1\");\nconst middleware_serde_1 = require(\"@aws-sdk/middleware-serde\");\nconst smithy_client_1 = require(\"@aws-sdk/smithy-client\");\n/**\n *

Create a task set in the specified cluster and service. This is used when a service\n * \t\t\tuses the EXTERNAL deployment controller type. For more information, see\n * \t\t\t\tAmazon ECS Deployment\n * \t\t\t\tTypes in the Amazon Elastic Container Service Developer Guide.

\n * @example\n * Use a bare-bones client and the command you need to make an API call.\n * ```javascript\n * import { ECSClient, CreateTaskSetCommand } from \"@aws-sdk/client-ecs\"; // ES Modules import\n * // const { ECSClient, CreateTaskSetCommand } = require(\"@aws-sdk/client-ecs\"); // CommonJS import\n * const client = new ECSClient(config);\n * const command = new CreateTaskSetCommand(input);\n * const response = await client.send(command);\n * ```\n *\n * @see {@link CreateTaskSetCommandInput} for command's `input` shape.\n * @see {@link CreateTaskSetCommandOutput} for command's `response` shape.\n * @see {@link ECSClientResolvedConfig | config} for command's `input` shape.\n *\n */\nclass CreateTaskSetCommand extends smithy_client_1.Command {\n // Start section: command_properties\n // End section: command_properties\n constructor(input) {\n // Start section: command_constructor\n super();\n this.input = input;\n // End section: command_constructor\n }\n /**\n * @internal\n */\n resolveMiddleware(clientStack, configuration, options) {\n this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize));\n const stack = clientStack.concat(this.middlewareStack);\n const { logger } = configuration;\n const clientName = \"ECSClient\";\n const commandName = \"CreateTaskSetCommand\";\n const handlerExecutionContext = {\n logger,\n clientName,\n commandName,\n inputFilterSensitiveLog: models_0_1.CreateTaskSetRequest.filterSensitiveLog,\n outputFilterSensitiveLog: models_0_1.CreateTaskSetResponse.filterSensitiveLog,\n };\n const { requestHandler } = configuration;\n return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);\n }\n serialize(input, context) {\n return Aws_json1_1_1.serializeAws_json1_1CreateTaskSetCommand(input, context);\n }\n deserialize(output, context) {\n return Aws_json1_1_1.deserializeAws_json1_1CreateTaskSetCommand(output, context);\n }\n}\nexports.CreateTaskSetCommand = CreateTaskSetCommand;\n//# sourceMappingURL=CreateTaskSetCommand.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.DeleteAccountSettingCommand = void 0;\nconst models_0_1 = require(\"../models/models_0\");\nconst Aws_json1_1_1 = require(\"../protocols/Aws_json1_1\");\nconst middleware_serde_1 = require(\"@aws-sdk/middleware-serde\");\nconst smithy_client_1 = require(\"@aws-sdk/smithy-client\");\n/**\n *

Disables an account setting for a specified IAM user, IAM role, or the root user for\n * \t\t\tan account.

\n * @example\n * Use a bare-bones client and the command you need to make an API call.\n * ```javascript\n * import { ECSClient, DeleteAccountSettingCommand } from \"@aws-sdk/client-ecs\"; // ES Modules import\n * // const { ECSClient, DeleteAccountSettingCommand } = require(\"@aws-sdk/client-ecs\"); // CommonJS import\n * const client = new ECSClient(config);\n * const command = new DeleteAccountSettingCommand(input);\n * const response = await client.send(command);\n * ```\n *\n * @see {@link DeleteAccountSettingCommandInput} for command's `input` shape.\n * @see {@link DeleteAccountSettingCommandOutput} for command's `response` shape.\n * @see {@link ECSClientResolvedConfig | config} for command's `input` shape.\n *\n */\nclass DeleteAccountSettingCommand extends smithy_client_1.Command {\n // Start section: command_properties\n // End section: command_properties\n constructor(input) {\n // Start section: command_constructor\n super();\n this.input = input;\n // End section: command_constructor\n }\n /**\n * @internal\n */\n resolveMiddleware(clientStack, configuration, options) {\n this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize));\n const stack = clientStack.concat(this.middlewareStack);\n const { logger } = configuration;\n const clientName = \"ECSClient\";\n const commandName = \"DeleteAccountSettingCommand\";\n const handlerExecutionContext = {\n logger,\n clientName,\n commandName,\n inputFilterSensitiveLog: models_0_1.DeleteAccountSettingRequest.filterSensitiveLog,\n outputFilterSensitiveLog: models_0_1.DeleteAccountSettingResponse.filterSensitiveLog,\n };\n const { requestHandler } = configuration;\n return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);\n }\n serialize(input, context) {\n return Aws_json1_1_1.serializeAws_json1_1DeleteAccountSettingCommand(input, context);\n }\n deserialize(output, context) {\n return Aws_json1_1_1.deserializeAws_json1_1DeleteAccountSettingCommand(output, context);\n }\n}\nexports.DeleteAccountSettingCommand = DeleteAccountSettingCommand;\n//# sourceMappingURL=DeleteAccountSettingCommand.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.DeleteAttributesCommand = void 0;\nconst models_0_1 = require(\"../models/models_0\");\nconst Aws_json1_1_1 = require(\"../protocols/Aws_json1_1\");\nconst middleware_serde_1 = require(\"@aws-sdk/middleware-serde\");\nconst smithy_client_1 = require(\"@aws-sdk/smithy-client\");\n/**\n *

Deletes one or more custom attributes from an Amazon ECS resource.

\n * @example\n * Use a bare-bones client and the command you need to make an API call.\n * ```javascript\n * import { ECSClient, DeleteAttributesCommand } from \"@aws-sdk/client-ecs\"; // ES Modules import\n * // const { ECSClient, DeleteAttributesCommand } = require(\"@aws-sdk/client-ecs\"); // CommonJS import\n * const client = new ECSClient(config);\n * const command = new DeleteAttributesCommand(input);\n * const response = await client.send(command);\n * ```\n *\n * @see {@link DeleteAttributesCommandInput} for command's `input` shape.\n * @see {@link DeleteAttributesCommandOutput} for command's `response` shape.\n * @see {@link ECSClientResolvedConfig | config} for command's `input` shape.\n *\n */\nclass DeleteAttributesCommand extends smithy_client_1.Command {\n // Start section: command_properties\n // End section: command_properties\n constructor(input) {\n // Start section: command_constructor\n super();\n this.input = input;\n // End section: command_constructor\n }\n /**\n * @internal\n */\n resolveMiddleware(clientStack, configuration, options) {\n this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize));\n const stack = clientStack.concat(this.middlewareStack);\n const { logger } = configuration;\n const clientName = \"ECSClient\";\n const commandName = \"DeleteAttributesCommand\";\n const handlerExecutionContext = {\n logger,\n clientName,\n commandName,\n inputFilterSensitiveLog: models_0_1.DeleteAttributesRequest.filterSensitiveLog,\n outputFilterSensitiveLog: models_0_1.DeleteAttributesResponse.filterSensitiveLog,\n };\n const { requestHandler } = configuration;\n return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);\n }\n serialize(input, context) {\n return Aws_json1_1_1.serializeAws_json1_1DeleteAttributesCommand(input, context);\n }\n deserialize(output, context) {\n return Aws_json1_1_1.deserializeAws_json1_1DeleteAttributesCommand(output, context);\n }\n}\nexports.DeleteAttributesCommand = DeleteAttributesCommand;\n//# sourceMappingURL=DeleteAttributesCommand.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.DeleteCapacityProviderCommand = void 0;\nconst models_0_1 = require(\"../models/models_0\");\nconst Aws_json1_1_1 = require(\"../protocols/Aws_json1_1\");\nconst middleware_serde_1 = require(\"@aws-sdk/middleware-serde\");\nconst smithy_client_1 = require(\"@aws-sdk/smithy-client\");\n/**\n *

Deletes the specified capacity provider.

\n * \t\t \n * \t\t\t

The FARGATE and FARGATE_SPOT capacity providers are\n * \t\t\t\treserved and cannot be deleted. You can disassociate them from a cluster using\n * \t\t\t\teither the PutClusterCapacityProviders API or by deleting the\n * \t\t\t\tcluster.

\n * \t\t
\n * \t\t

Prior to a capacity provider being deleted, the capacity provider must be removed from\n * \t\t\tthe capacity provider strategy from all services. The UpdateService\n * \t\t\tAPI can be used to remove a capacity provider from a service's capacity provider\n * \t\t\tstrategy. When updating a service, the forceNewDeployment option can be\n * \t\t\tused to ensure that any tasks using the Amazon EC2 instance capacity provided by the capacity\n * \t\t\tprovider are transitioned to use the capacity from the remaining capacity providers.\n * \t\t\tOnly capacity providers that are not associated with a cluster can be deleted. To remove\n * \t\t\ta capacity provider from a cluster, you can either use PutClusterCapacityProviders or delete the cluster.

\n * @example\n * Use a bare-bones client and the command you need to make an API call.\n * ```javascript\n * import { ECSClient, DeleteCapacityProviderCommand } from \"@aws-sdk/client-ecs\"; // ES Modules import\n * // const { ECSClient, DeleteCapacityProviderCommand } = require(\"@aws-sdk/client-ecs\"); // CommonJS import\n * const client = new ECSClient(config);\n * const command = new DeleteCapacityProviderCommand(input);\n * const response = await client.send(command);\n * ```\n *\n * @see {@link DeleteCapacityProviderCommandInput} for command's `input` shape.\n * @see {@link DeleteCapacityProviderCommandOutput} for command's `response` shape.\n * @see {@link ECSClientResolvedConfig | config} for command's `input` shape.\n *\n */\nclass DeleteCapacityProviderCommand extends smithy_client_1.Command {\n // Start section: command_properties\n // End section: command_properties\n constructor(input) {\n // Start section: command_constructor\n super();\n this.input = input;\n // End section: command_constructor\n }\n /**\n * @internal\n */\n resolveMiddleware(clientStack, configuration, options) {\n this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize));\n const stack = clientStack.concat(this.middlewareStack);\n const { logger } = configuration;\n const clientName = \"ECSClient\";\n const commandName = \"DeleteCapacityProviderCommand\";\n const handlerExecutionContext = {\n logger,\n clientName,\n commandName,\n inputFilterSensitiveLog: models_0_1.DeleteCapacityProviderRequest.filterSensitiveLog,\n outputFilterSensitiveLog: models_0_1.DeleteCapacityProviderResponse.filterSensitiveLog,\n };\n const { requestHandler } = configuration;\n return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);\n }\n serialize(input, context) {\n return Aws_json1_1_1.serializeAws_json1_1DeleteCapacityProviderCommand(input, context);\n }\n deserialize(output, context) {\n return Aws_json1_1_1.deserializeAws_json1_1DeleteCapacityProviderCommand(output, context);\n }\n}\nexports.DeleteCapacityProviderCommand = DeleteCapacityProviderCommand;\n//# sourceMappingURL=DeleteCapacityProviderCommand.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.DeleteClusterCommand = void 0;\nconst models_0_1 = require(\"../models/models_0\");\nconst Aws_json1_1_1 = require(\"../protocols/Aws_json1_1\");\nconst middleware_serde_1 = require(\"@aws-sdk/middleware-serde\");\nconst smithy_client_1 = require(\"@aws-sdk/smithy-client\");\n/**\n *

Deletes the specified cluster. The cluster will transition to the\n * \t\t\t\tINACTIVE state. Clusters with an INACTIVE status may\n * \t\t\tremain discoverable in your account for a period of time. However, this behavior is\n * \t\t\tsubject to change in the future, so you should not rely on INACTIVE\n * \t\t\tclusters persisting.

\n * \t\t

You must deregister all container instances from this cluster before you may delete\n * \t\t\tit. You can list the container instances in a cluster with ListContainerInstances and deregister them with DeregisterContainerInstance.

\n * @example\n * Use a bare-bones client and the command you need to make an API call.\n * ```javascript\n * import { ECSClient, DeleteClusterCommand } from \"@aws-sdk/client-ecs\"; // ES Modules import\n * // const { ECSClient, DeleteClusterCommand } = require(\"@aws-sdk/client-ecs\"); // CommonJS import\n * const client = new ECSClient(config);\n * const command = new DeleteClusterCommand(input);\n * const response = await client.send(command);\n * ```\n *\n * @see {@link DeleteClusterCommandInput} for command's `input` shape.\n * @see {@link DeleteClusterCommandOutput} for command's `response` shape.\n * @see {@link ECSClientResolvedConfig | config} for command's `input` shape.\n *\n */\nclass DeleteClusterCommand extends smithy_client_1.Command {\n // Start section: command_properties\n // End section: command_properties\n constructor(input) {\n // Start section: command_constructor\n super();\n this.input = input;\n // End section: command_constructor\n }\n /**\n * @internal\n */\n resolveMiddleware(clientStack, configuration, options) {\n this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize));\n const stack = clientStack.concat(this.middlewareStack);\n const { logger } = configuration;\n const clientName = \"ECSClient\";\n const commandName = \"DeleteClusterCommand\";\n const handlerExecutionContext = {\n logger,\n clientName,\n commandName,\n inputFilterSensitiveLog: models_0_1.DeleteClusterRequest.filterSensitiveLog,\n outputFilterSensitiveLog: models_0_1.DeleteClusterResponse.filterSensitiveLog,\n };\n const { requestHandler } = configuration;\n return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);\n }\n serialize(input, context) {\n return Aws_json1_1_1.serializeAws_json1_1DeleteClusterCommand(input, context);\n }\n deserialize(output, context) {\n return Aws_json1_1_1.deserializeAws_json1_1DeleteClusterCommand(output, context);\n }\n}\nexports.DeleteClusterCommand = DeleteClusterCommand;\n//# sourceMappingURL=DeleteClusterCommand.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.DeleteServiceCommand = void 0;\nconst models_0_1 = require(\"../models/models_0\");\nconst Aws_json1_1_1 = require(\"../protocols/Aws_json1_1\");\nconst middleware_serde_1 = require(\"@aws-sdk/middleware-serde\");\nconst smithy_client_1 = require(\"@aws-sdk/smithy-client\");\n/**\n *

Deletes a specified service within a cluster. You can delete a service if you have no\n * \t\t\trunning tasks in it and the desired task count is zero. If the service is actively\n * \t\t\tmaintaining tasks, you cannot delete it, and you must update the service to a desired\n * \t\t\ttask count of zero. For more information, see UpdateService.

\n * \t\t \n * \t\t\t

When you delete a service, if there are still running tasks that require cleanup,\n * \t\t\t\tthe service status moves from ACTIVE to DRAINING, and the\n * \t\t\t\tservice is no longer visible in the console or in the ListServices\n * \t\t\t\tAPI operation. After all tasks have transitioned to either STOPPING or\n * \t\t\t\t\tSTOPPED status, the service status moves from DRAINING\n * \t\t\t\tto INACTIVE. Services in the DRAINING or\n * \t\t\t\t\tINACTIVE status can still be viewed with the DescribeServices API operation. However, in the future,\n * \t\t\t\t\tINACTIVE services may be cleaned up and purged from Amazon ECS record\n * \t\t\t\tkeeping, and DescribeServices calls on those services return a\n * \t\t\t\t\tServiceNotFoundException error.

\n * \t\t
\n * \t\t \n * \t\t\t

If you attempt to create a new service with the same name as an existing service\n * \t\t\t\tin either ACTIVE or DRAINING status, you receive an\n * \t\t\t\terror.

\n * \t\t
\n * @example\n * Use a bare-bones client and the command you need to make an API call.\n * ```javascript\n * import { ECSClient, DeleteServiceCommand } from \"@aws-sdk/client-ecs\"; // ES Modules import\n * // const { ECSClient, DeleteServiceCommand } = require(\"@aws-sdk/client-ecs\"); // CommonJS import\n * const client = new ECSClient(config);\n * const command = new DeleteServiceCommand(input);\n * const response = await client.send(command);\n * ```\n *\n * @see {@link DeleteServiceCommandInput} for command's `input` shape.\n * @see {@link DeleteServiceCommandOutput} for command's `response` shape.\n * @see {@link ECSClientResolvedConfig | config} for command's `input` shape.\n *\n */\nclass DeleteServiceCommand extends smithy_client_1.Command {\n // Start section: command_properties\n // End section: command_properties\n constructor(input) {\n // Start section: command_constructor\n super();\n this.input = input;\n // End section: command_constructor\n }\n /**\n * @internal\n */\n resolveMiddleware(clientStack, configuration, options) {\n this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize));\n const stack = clientStack.concat(this.middlewareStack);\n const { logger } = configuration;\n const clientName = \"ECSClient\";\n const commandName = \"DeleteServiceCommand\";\n const handlerExecutionContext = {\n logger,\n clientName,\n commandName,\n inputFilterSensitiveLog: models_0_1.DeleteServiceRequest.filterSensitiveLog,\n outputFilterSensitiveLog: models_0_1.DeleteServiceResponse.filterSensitiveLog,\n };\n const { requestHandler } = configuration;\n return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);\n }\n serialize(input, context) {\n return Aws_json1_1_1.serializeAws_json1_1DeleteServiceCommand(input, context);\n }\n deserialize(output, context) {\n return Aws_json1_1_1.deserializeAws_json1_1DeleteServiceCommand(output, context);\n }\n}\nexports.DeleteServiceCommand = DeleteServiceCommand;\n//# sourceMappingURL=DeleteServiceCommand.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.DeleteTaskSetCommand = void 0;\nconst models_0_1 = require(\"../models/models_0\");\nconst Aws_json1_1_1 = require(\"../protocols/Aws_json1_1\");\nconst middleware_serde_1 = require(\"@aws-sdk/middleware-serde\");\nconst smithy_client_1 = require(\"@aws-sdk/smithy-client\");\n/**\n *

Deletes a specified task set within a service. This is used when a service uses the\n * \t\t\t\tEXTERNAL deployment controller type. For more information, see Amazon ECS Deployment Types in the Amazon Elastic Container Service Developer Guide.

\n * @example\n * Use a bare-bones client and the command you need to make an API call.\n * ```javascript\n * import { ECSClient, DeleteTaskSetCommand } from \"@aws-sdk/client-ecs\"; // ES Modules import\n * // const { ECSClient, DeleteTaskSetCommand } = require(\"@aws-sdk/client-ecs\"); // CommonJS import\n * const client = new ECSClient(config);\n * const command = new DeleteTaskSetCommand(input);\n * const response = await client.send(command);\n * ```\n *\n * @see {@link DeleteTaskSetCommandInput} for command's `input` shape.\n * @see {@link DeleteTaskSetCommandOutput} for command's `response` shape.\n * @see {@link ECSClientResolvedConfig | config} for command's `input` shape.\n *\n */\nclass DeleteTaskSetCommand extends smithy_client_1.Command {\n // Start section: command_properties\n // End section: command_properties\n constructor(input) {\n // Start section: command_constructor\n super();\n this.input = input;\n // End section: command_constructor\n }\n /**\n * @internal\n */\n resolveMiddleware(clientStack, configuration, options) {\n this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize));\n const stack = clientStack.concat(this.middlewareStack);\n const { logger } = configuration;\n const clientName = \"ECSClient\";\n const commandName = \"DeleteTaskSetCommand\";\n const handlerExecutionContext = {\n logger,\n clientName,\n commandName,\n inputFilterSensitiveLog: models_0_1.DeleteTaskSetRequest.filterSensitiveLog,\n outputFilterSensitiveLog: models_0_1.DeleteTaskSetResponse.filterSensitiveLog,\n };\n const { requestHandler } = configuration;\n return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);\n }\n serialize(input, context) {\n return Aws_json1_1_1.serializeAws_json1_1DeleteTaskSetCommand(input, context);\n }\n deserialize(output, context) {\n return Aws_json1_1_1.deserializeAws_json1_1DeleteTaskSetCommand(output, context);\n }\n}\nexports.DeleteTaskSetCommand = DeleteTaskSetCommand;\n//# sourceMappingURL=DeleteTaskSetCommand.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.DeregisterContainerInstanceCommand = void 0;\nconst models_0_1 = require(\"../models/models_0\");\nconst Aws_json1_1_1 = require(\"../protocols/Aws_json1_1\");\nconst middleware_serde_1 = require(\"@aws-sdk/middleware-serde\");\nconst smithy_client_1 = require(\"@aws-sdk/smithy-client\");\n/**\n *

Deregisters an Amazon ECS container instance from the specified cluster. This instance is\n * \t\t\tno longer available to run tasks.

\n * \t\t

If you intend to use the container instance for some other purpose after\n * \t\t\tderegistration, you should stop all of the tasks running on the container instance\n * \t\t\tbefore deregistration. That prevents any orphaned tasks from consuming resources.

\n * \t\t

Deregistering a container instance removes the instance from a cluster, but it does\n * \t\t\tnot terminate the EC2 instance. If you are finished using the instance, be sure to\n * \t\t\tterminate it in the Amazon EC2 console to stop billing.

\n * \t\t \n * \t\t\t

If you terminate a running container instance, Amazon ECS automatically deregisters the\n * \t\t\t\tinstance from your cluster (stopped container instances or instances with\n * \t\t\t\tdisconnected agents are not automatically deregistered when terminated).

\n * \t\t
\n * @example\n * Use a bare-bones client and the command you need to make an API call.\n * ```javascript\n * import { ECSClient, DeregisterContainerInstanceCommand } from \"@aws-sdk/client-ecs\"; // ES Modules import\n * // const { ECSClient, DeregisterContainerInstanceCommand } = require(\"@aws-sdk/client-ecs\"); // CommonJS import\n * const client = new ECSClient(config);\n * const command = new DeregisterContainerInstanceCommand(input);\n * const response = await client.send(command);\n * ```\n *\n * @see {@link DeregisterContainerInstanceCommandInput} for command's `input` shape.\n * @see {@link DeregisterContainerInstanceCommandOutput} for command's `response` shape.\n * @see {@link ECSClientResolvedConfig | config} for command's `input` shape.\n *\n */\nclass DeregisterContainerInstanceCommand extends smithy_client_1.Command {\n // Start section: command_properties\n // End section: command_properties\n constructor(input) {\n // Start section: command_constructor\n super();\n this.input = input;\n // End section: command_constructor\n }\n /**\n * @internal\n */\n resolveMiddleware(clientStack, configuration, options) {\n this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize));\n const stack = clientStack.concat(this.middlewareStack);\n const { logger } = configuration;\n const clientName = \"ECSClient\";\n const commandName = \"DeregisterContainerInstanceCommand\";\n const handlerExecutionContext = {\n logger,\n clientName,\n commandName,\n inputFilterSensitiveLog: models_0_1.DeregisterContainerInstanceRequest.filterSensitiveLog,\n outputFilterSensitiveLog: models_0_1.DeregisterContainerInstanceResponse.filterSensitiveLog,\n };\n const { requestHandler } = configuration;\n return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);\n }\n serialize(input, context) {\n return Aws_json1_1_1.serializeAws_json1_1DeregisterContainerInstanceCommand(input, context);\n }\n deserialize(output, context) {\n return Aws_json1_1_1.deserializeAws_json1_1DeregisterContainerInstanceCommand(output, context);\n }\n}\nexports.DeregisterContainerInstanceCommand = DeregisterContainerInstanceCommand;\n//# sourceMappingURL=DeregisterContainerInstanceCommand.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.DeregisterTaskDefinitionCommand = void 0;\nconst models_0_1 = require(\"../models/models_0\");\nconst Aws_json1_1_1 = require(\"../protocols/Aws_json1_1\");\nconst middleware_serde_1 = require(\"@aws-sdk/middleware-serde\");\nconst smithy_client_1 = require(\"@aws-sdk/smithy-client\");\n/**\n *

Deregisters the specified task definition by family and revision. Upon deregistration,\n * \t\t\tthe task definition is marked as INACTIVE. Existing tasks and services that\n * \t\t\treference an INACTIVE task definition continue to run without disruption.\n * \t\t\tExisting services that reference an INACTIVE task definition can still\n * \t\t\tscale up or down by modifying the service's desired count.

\n * \t\t

You cannot use an INACTIVE task definition to run new tasks or create new\n * \t\t\tservices, and you cannot update an existing service to reference an\n * \t\t\t\tINACTIVE task definition. However, there may be up to a 10-minute\n * \t\t\twindow following deregistration where these restrictions have not yet taken\n * \t\t\teffect.

\n * \t\t \n * \t\t\t

At this time, INACTIVE task definitions remain discoverable in your\n * \t\t\t\taccount indefinitely. However, this behavior is subject to change in the future, so\n * \t\t\t\tyou should not rely on INACTIVE task definitions persisting beyond the\n * \t\t\t\tlifecycle of any associated tasks and services.

\n * \t\t
\n * @example\n * Use a bare-bones client and the command you need to make an API call.\n * ```javascript\n * import { ECSClient, DeregisterTaskDefinitionCommand } from \"@aws-sdk/client-ecs\"; // ES Modules import\n * // const { ECSClient, DeregisterTaskDefinitionCommand } = require(\"@aws-sdk/client-ecs\"); // CommonJS import\n * const client = new ECSClient(config);\n * const command = new DeregisterTaskDefinitionCommand(input);\n * const response = await client.send(command);\n * ```\n *\n * @see {@link DeregisterTaskDefinitionCommandInput} for command's `input` shape.\n * @see {@link DeregisterTaskDefinitionCommandOutput} for command's `response` shape.\n * @see {@link ECSClientResolvedConfig | config} for command's `input` shape.\n *\n */\nclass DeregisterTaskDefinitionCommand extends smithy_client_1.Command {\n // Start section: command_properties\n // End section: command_properties\n constructor(input) {\n // Start section: command_constructor\n super();\n this.input = input;\n // End section: command_constructor\n }\n /**\n * @internal\n */\n resolveMiddleware(clientStack, configuration, options) {\n this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize));\n const stack = clientStack.concat(this.middlewareStack);\n const { logger } = configuration;\n const clientName = \"ECSClient\";\n const commandName = \"DeregisterTaskDefinitionCommand\";\n const handlerExecutionContext = {\n logger,\n clientName,\n commandName,\n inputFilterSensitiveLog: models_0_1.DeregisterTaskDefinitionRequest.filterSensitiveLog,\n outputFilterSensitiveLog: models_0_1.DeregisterTaskDefinitionResponse.filterSensitiveLog,\n };\n const { requestHandler } = configuration;\n return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);\n }\n serialize(input, context) {\n return Aws_json1_1_1.serializeAws_json1_1DeregisterTaskDefinitionCommand(input, context);\n }\n deserialize(output, context) {\n return Aws_json1_1_1.deserializeAws_json1_1DeregisterTaskDefinitionCommand(output, context);\n }\n}\nexports.DeregisterTaskDefinitionCommand = DeregisterTaskDefinitionCommand;\n//# sourceMappingURL=DeregisterTaskDefinitionCommand.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.DescribeCapacityProvidersCommand = void 0;\nconst models_0_1 = require(\"../models/models_0\");\nconst Aws_json1_1_1 = require(\"../protocols/Aws_json1_1\");\nconst middleware_serde_1 = require(\"@aws-sdk/middleware-serde\");\nconst smithy_client_1 = require(\"@aws-sdk/smithy-client\");\n/**\n *

Describes one or more of your capacity providers.

\n * @example\n * Use a bare-bones client and the command you need to make an API call.\n * ```javascript\n * import { ECSClient, DescribeCapacityProvidersCommand } from \"@aws-sdk/client-ecs\"; // ES Modules import\n * // const { ECSClient, DescribeCapacityProvidersCommand } = require(\"@aws-sdk/client-ecs\"); // CommonJS import\n * const client = new ECSClient(config);\n * const command = new DescribeCapacityProvidersCommand(input);\n * const response = await client.send(command);\n * ```\n *\n * @see {@link DescribeCapacityProvidersCommandInput} for command's `input` shape.\n * @see {@link DescribeCapacityProvidersCommandOutput} for command's `response` shape.\n * @see {@link ECSClientResolvedConfig | config} for command's `input` shape.\n *\n */\nclass DescribeCapacityProvidersCommand extends smithy_client_1.Command {\n // Start section: command_properties\n // End section: command_properties\n constructor(input) {\n // Start section: command_constructor\n super();\n this.input = input;\n // End section: command_constructor\n }\n /**\n * @internal\n */\n resolveMiddleware(clientStack, configuration, options) {\n this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize));\n const stack = clientStack.concat(this.middlewareStack);\n const { logger } = configuration;\n const clientName = \"ECSClient\";\n const commandName = \"DescribeCapacityProvidersCommand\";\n const handlerExecutionContext = {\n logger,\n clientName,\n commandName,\n inputFilterSensitiveLog: models_0_1.DescribeCapacityProvidersRequest.filterSensitiveLog,\n outputFilterSensitiveLog: models_0_1.DescribeCapacityProvidersResponse.filterSensitiveLog,\n };\n const { requestHandler } = configuration;\n return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);\n }\n serialize(input, context) {\n return Aws_json1_1_1.serializeAws_json1_1DescribeCapacityProvidersCommand(input, context);\n }\n deserialize(output, context) {\n return Aws_json1_1_1.deserializeAws_json1_1DescribeCapacityProvidersCommand(output, context);\n }\n}\nexports.DescribeCapacityProvidersCommand = DescribeCapacityProvidersCommand;\n//# sourceMappingURL=DescribeCapacityProvidersCommand.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.DescribeClustersCommand = void 0;\nconst models_0_1 = require(\"../models/models_0\");\nconst Aws_json1_1_1 = require(\"../protocols/Aws_json1_1\");\nconst middleware_serde_1 = require(\"@aws-sdk/middleware-serde\");\nconst smithy_client_1 = require(\"@aws-sdk/smithy-client\");\n/**\n *

Describes one or more of your clusters.

\n * @example\n * Use a bare-bones client and the command you need to make an API call.\n * ```javascript\n * import { ECSClient, DescribeClustersCommand } from \"@aws-sdk/client-ecs\"; // ES Modules import\n * // const { ECSClient, DescribeClustersCommand } = require(\"@aws-sdk/client-ecs\"); // CommonJS import\n * const client = new ECSClient(config);\n * const command = new DescribeClustersCommand(input);\n * const response = await client.send(command);\n * ```\n *\n * @see {@link DescribeClustersCommandInput} for command's `input` shape.\n * @see {@link DescribeClustersCommandOutput} for command's `response` shape.\n * @see {@link ECSClientResolvedConfig | config} for command's `input` shape.\n *\n */\nclass DescribeClustersCommand extends smithy_client_1.Command {\n // Start section: command_properties\n // End section: command_properties\n constructor(input) {\n // Start section: command_constructor\n super();\n this.input = input;\n // End section: command_constructor\n }\n /**\n * @internal\n */\n resolveMiddleware(clientStack, configuration, options) {\n this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize));\n const stack = clientStack.concat(this.middlewareStack);\n const { logger } = configuration;\n const clientName = \"ECSClient\";\n const commandName = \"DescribeClustersCommand\";\n const handlerExecutionContext = {\n logger,\n clientName,\n commandName,\n inputFilterSensitiveLog: models_0_1.DescribeClustersRequest.filterSensitiveLog,\n outputFilterSensitiveLog: models_0_1.DescribeClustersResponse.filterSensitiveLog,\n };\n const { requestHandler } = configuration;\n return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);\n }\n serialize(input, context) {\n return Aws_json1_1_1.serializeAws_json1_1DescribeClustersCommand(input, context);\n }\n deserialize(output, context) {\n return Aws_json1_1_1.deserializeAws_json1_1DescribeClustersCommand(output, context);\n }\n}\nexports.DescribeClustersCommand = DescribeClustersCommand;\n//# sourceMappingURL=DescribeClustersCommand.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.DescribeContainerInstancesCommand = void 0;\nconst models_0_1 = require(\"../models/models_0\");\nconst Aws_json1_1_1 = require(\"../protocols/Aws_json1_1\");\nconst middleware_serde_1 = require(\"@aws-sdk/middleware-serde\");\nconst smithy_client_1 = require(\"@aws-sdk/smithy-client\");\n/**\n *

Describes one or more container instances. Returns metadata about each container\n * \t\t\tinstance requested.

\n * @example\n * Use a bare-bones client and the command you need to make an API call.\n * ```javascript\n * import { ECSClient, DescribeContainerInstancesCommand } from \"@aws-sdk/client-ecs\"; // ES Modules import\n * // const { ECSClient, DescribeContainerInstancesCommand } = require(\"@aws-sdk/client-ecs\"); // CommonJS import\n * const client = new ECSClient(config);\n * const command = new DescribeContainerInstancesCommand(input);\n * const response = await client.send(command);\n * ```\n *\n * @see {@link DescribeContainerInstancesCommandInput} for command's `input` shape.\n * @see {@link DescribeContainerInstancesCommandOutput} for command's `response` shape.\n * @see {@link ECSClientResolvedConfig | config} for command's `input` shape.\n *\n */\nclass DescribeContainerInstancesCommand extends smithy_client_1.Command {\n // Start section: command_properties\n // End section: command_properties\n constructor(input) {\n // Start section: command_constructor\n super();\n this.input = input;\n // End section: command_constructor\n }\n /**\n * @internal\n */\n resolveMiddleware(clientStack, configuration, options) {\n this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize));\n const stack = clientStack.concat(this.middlewareStack);\n const { logger } = configuration;\n const clientName = \"ECSClient\";\n const commandName = \"DescribeContainerInstancesCommand\";\n const handlerExecutionContext = {\n logger,\n clientName,\n commandName,\n inputFilterSensitiveLog: models_0_1.DescribeContainerInstancesRequest.filterSensitiveLog,\n outputFilterSensitiveLog: models_0_1.DescribeContainerInstancesResponse.filterSensitiveLog,\n };\n const { requestHandler } = configuration;\n return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);\n }\n serialize(input, context) {\n return Aws_json1_1_1.serializeAws_json1_1DescribeContainerInstancesCommand(input, context);\n }\n deserialize(output, context) {\n return Aws_json1_1_1.deserializeAws_json1_1DescribeContainerInstancesCommand(output, context);\n }\n}\nexports.DescribeContainerInstancesCommand = DescribeContainerInstancesCommand;\n//# sourceMappingURL=DescribeContainerInstancesCommand.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.DescribeServicesCommand = void 0;\nconst models_0_1 = require(\"../models/models_0\");\nconst Aws_json1_1_1 = require(\"../protocols/Aws_json1_1\");\nconst middleware_serde_1 = require(\"@aws-sdk/middleware-serde\");\nconst smithy_client_1 = require(\"@aws-sdk/smithy-client\");\n/**\n *

Describes the specified services running in your cluster.

\n * @example\n * Use a bare-bones client and the command you need to make an API call.\n * ```javascript\n * import { ECSClient, DescribeServicesCommand } from \"@aws-sdk/client-ecs\"; // ES Modules import\n * // const { ECSClient, DescribeServicesCommand } = require(\"@aws-sdk/client-ecs\"); // CommonJS import\n * const client = new ECSClient(config);\n * const command = new DescribeServicesCommand(input);\n * const response = await client.send(command);\n * ```\n *\n * @see {@link DescribeServicesCommandInput} for command's `input` shape.\n * @see {@link DescribeServicesCommandOutput} for command's `response` shape.\n * @see {@link ECSClientResolvedConfig | config} for command's `input` shape.\n *\n */\nclass DescribeServicesCommand extends smithy_client_1.Command {\n // Start section: command_properties\n // End section: command_properties\n constructor(input) {\n // Start section: command_constructor\n super();\n this.input = input;\n // End section: command_constructor\n }\n /**\n * @internal\n */\n resolveMiddleware(clientStack, configuration, options) {\n this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize));\n const stack = clientStack.concat(this.middlewareStack);\n const { logger } = configuration;\n const clientName = \"ECSClient\";\n const commandName = \"DescribeServicesCommand\";\n const handlerExecutionContext = {\n logger,\n clientName,\n commandName,\n inputFilterSensitiveLog: models_0_1.DescribeServicesRequest.filterSensitiveLog,\n outputFilterSensitiveLog: models_0_1.DescribeServicesResponse.filterSensitiveLog,\n };\n const { requestHandler } = configuration;\n return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);\n }\n serialize(input, context) {\n return Aws_json1_1_1.serializeAws_json1_1DescribeServicesCommand(input, context);\n }\n deserialize(output, context) {\n return Aws_json1_1_1.deserializeAws_json1_1DescribeServicesCommand(output, context);\n }\n}\nexports.DescribeServicesCommand = DescribeServicesCommand;\n//# sourceMappingURL=DescribeServicesCommand.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.DescribeTaskDefinitionCommand = void 0;\nconst models_0_1 = require(\"../models/models_0\");\nconst Aws_json1_1_1 = require(\"../protocols/Aws_json1_1\");\nconst middleware_serde_1 = require(\"@aws-sdk/middleware-serde\");\nconst smithy_client_1 = require(\"@aws-sdk/smithy-client\");\n/**\n *

Describes a task definition. You can specify a family and\n * \t\t\t\trevision to find information about a specific task definition, or you\n * \t\t\tcan simply specify the family to find the latest ACTIVE revision in that\n * \t\t\tfamily.

\n * \t\t \n * \t\t\t

You can only describe INACTIVE task definitions while an active task\n * \t\t\t\tor service references them.

\n * \t\t
\n * @example\n * Use a bare-bones client and the command you need to make an API call.\n * ```javascript\n * import { ECSClient, DescribeTaskDefinitionCommand } from \"@aws-sdk/client-ecs\"; // ES Modules import\n * // const { ECSClient, DescribeTaskDefinitionCommand } = require(\"@aws-sdk/client-ecs\"); // CommonJS import\n * const client = new ECSClient(config);\n * const command = new DescribeTaskDefinitionCommand(input);\n * const response = await client.send(command);\n * ```\n *\n * @see {@link DescribeTaskDefinitionCommandInput} for command's `input` shape.\n * @see {@link DescribeTaskDefinitionCommandOutput} for command's `response` shape.\n * @see {@link ECSClientResolvedConfig | config} for command's `input` shape.\n *\n */\nclass DescribeTaskDefinitionCommand extends smithy_client_1.Command {\n // Start section: command_properties\n // End section: command_properties\n constructor(input) {\n // Start section: command_constructor\n super();\n this.input = input;\n // End section: command_constructor\n }\n /**\n * @internal\n */\n resolveMiddleware(clientStack, configuration, options) {\n this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize));\n const stack = clientStack.concat(this.middlewareStack);\n const { logger } = configuration;\n const clientName = \"ECSClient\";\n const commandName = \"DescribeTaskDefinitionCommand\";\n const handlerExecutionContext = {\n logger,\n clientName,\n commandName,\n inputFilterSensitiveLog: models_0_1.DescribeTaskDefinitionRequest.filterSensitiveLog,\n outputFilterSensitiveLog: models_0_1.DescribeTaskDefinitionResponse.filterSensitiveLog,\n };\n const { requestHandler } = configuration;\n return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);\n }\n serialize(input, context) {\n return Aws_json1_1_1.serializeAws_json1_1DescribeTaskDefinitionCommand(input, context);\n }\n deserialize(output, context) {\n return Aws_json1_1_1.deserializeAws_json1_1DescribeTaskDefinitionCommand(output, context);\n }\n}\nexports.DescribeTaskDefinitionCommand = DescribeTaskDefinitionCommand;\n//# sourceMappingURL=DescribeTaskDefinitionCommand.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.DescribeTaskSetsCommand = void 0;\nconst models_0_1 = require(\"../models/models_0\");\nconst Aws_json1_1_1 = require(\"../protocols/Aws_json1_1\");\nconst middleware_serde_1 = require(\"@aws-sdk/middleware-serde\");\nconst smithy_client_1 = require(\"@aws-sdk/smithy-client\");\n/**\n *

Describes the task sets in the specified cluster and service. This is used when a\n * \t\t\tservice uses the EXTERNAL deployment controller type. For more information,\n * \t\t\tsee Amazon ECS Deployment\n * \t\t\t\tTypes in the Amazon Elastic Container Service Developer Guide.

\n * @example\n * Use a bare-bones client and the command you need to make an API call.\n * ```javascript\n * import { ECSClient, DescribeTaskSetsCommand } from \"@aws-sdk/client-ecs\"; // ES Modules import\n * // const { ECSClient, DescribeTaskSetsCommand } = require(\"@aws-sdk/client-ecs\"); // CommonJS import\n * const client = new ECSClient(config);\n * const command = new DescribeTaskSetsCommand(input);\n * const response = await client.send(command);\n * ```\n *\n * @see {@link DescribeTaskSetsCommandInput} for command's `input` shape.\n * @see {@link DescribeTaskSetsCommandOutput} for command's `response` shape.\n * @see {@link ECSClientResolvedConfig | config} for command's `input` shape.\n *\n */\nclass DescribeTaskSetsCommand extends smithy_client_1.Command {\n // Start section: command_properties\n // End section: command_properties\n constructor(input) {\n // Start section: command_constructor\n super();\n this.input = input;\n // End section: command_constructor\n }\n /**\n * @internal\n */\n resolveMiddleware(clientStack, configuration, options) {\n this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize));\n const stack = clientStack.concat(this.middlewareStack);\n const { logger } = configuration;\n const clientName = \"ECSClient\";\n const commandName = \"DescribeTaskSetsCommand\";\n const handlerExecutionContext = {\n logger,\n clientName,\n commandName,\n inputFilterSensitiveLog: models_0_1.DescribeTaskSetsRequest.filterSensitiveLog,\n outputFilterSensitiveLog: models_0_1.DescribeTaskSetsResponse.filterSensitiveLog,\n };\n const { requestHandler } = configuration;\n return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);\n }\n serialize(input, context) {\n return Aws_json1_1_1.serializeAws_json1_1DescribeTaskSetsCommand(input, context);\n }\n deserialize(output, context) {\n return Aws_json1_1_1.deserializeAws_json1_1DescribeTaskSetsCommand(output, context);\n }\n}\nexports.DescribeTaskSetsCommand = DescribeTaskSetsCommand;\n//# sourceMappingURL=DescribeTaskSetsCommand.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.DescribeTasksCommand = void 0;\nconst models_0_1 = require(\"../models/models_0\");\nconst Aws_json1_1_1 = require(\"../protocols/Aws_json1_1\");\nconst middleware_serde_1 = require(\"@aws-sdk/middleware-serde\");\nconst smithy_client_1 = require(\"@aws-sdk/smithy-client\");\n/**\n *

Describes a specified task or tasks.

\n * @example\n * Use a bare-bones client and the command you need to make an API call.\n * ```javascript\n * import { ECSClient, DescribeTasksCommand } from \"@aws-sdk/client-ecs\"; // ES Modules import\n * // const { ECSClient, DescribeTasksCommand } = require(\"@aws-sdk/client-ecs\"); // CommonJS import\n * const client = new ECSClient(config);\n * const command = new DescribeTasksCommand(input);\n * const response = await client.send(command);\n * ```\n *\n * @see {@link DescribeTasksCommandInput} for command's `input` shape.\n * @see {@link DescribeTasksCommandOutput} for command's `response` shape.\n * @see {@link ECSClientResolvedConfig | config} for command's `input` shape.\n *\n */\nclass DescribeTasksCommand extends smithy_client_1.Command {\n // Start section: command_properties\n // End section: command_properties\n constructor(input) {\n // Start section: command_constructor\n super();\n this.input = input;\n // End section: command_constructor\n }\n /**\n * @internal\n */\n resolveMiddleware(clientStack, configuration, options) {\n this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize));\n const stack = clientStack.concat(this.middlewareStack);\n const { logger } = configuration;\n const clientName = \"ECSClient\";\n const commandName = \"DescribeTasksCommand\";\n const handlerExecutionContext = {\n logger,\n clientName,\n commandName,\n inputFilterSensitiveLog: models_0_1.DescribeTasksRequest.filterSensitiveLog,\n outputFilterSensitiveLog: models_0_1.DescribeTasksResponse.filterSensitiveLog,\n };\n const { requestHandler } = configuration;\n return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);\n }\n serialize(input, context) {\n return Aws_json1_1_1.serializeAws_json1_1DescribeTasksCommand(input, context);\n }\n deserialize(output, context) {\n return Aws_json1_1_1.deserializeAws_json1_1DescribeTasksCommand(output, context);\n }\n}\nexports.DescribeTasksCommand = DescribeTasksCommand;\n//# sourceMappingURL=DescribeTasksCommand.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.DiscoverPollEndpointCommand = void 0;\nconst models_0_1 = require(\"../models/models_0\");\nconst Aws_json1_1_1 = require(\"../protocols/Aws_json1_1\");\nconst middleware_serde_1 = require(\"@aws-sdk/middleware-serde\");\nconst smithy_client_1 = require(\"@aws-sdk/smithy-client\");\n/**\n * \n *

This action is only used by the Amazon ECS agent, and it is not intended for use outside of the agent.

\n *
\n *

Returns an endpoint for\n * \t\t\tthe Amazon ECS agent to poll for updates.

\n * @example\n * Use a bare-bones client and the command you need to make an API call.\n * ```javascript\n * import { ECSClient, DiscoverPollEndpointCommand } from \"@aws-sdk/client-ecs\"; // ES Modules import\n * // const { ECSClient, DiscoverPollEndpointCommand } = require(\"@aws-sdk/client-ecs\"); // CommonJS import\n * const client = new ECSClient(config);\n * const command = new DiscoverPollEndpointCommand(input);\n * const response = await client.send(command);\n * ```\n *\n * @see {@link DiscoverPollEndpointCommandInput} for command's `input` shape.\n * @see {@link DiscoverPollEndpointCommandOutput} for command's `response` shape.\n * @see {@link ECSClientResolvedConfig | config} for command's `input` shape.\n *\n */\nclass DiscoverPollEndpointCommand extends smithy_client_1.Command {\n // Start section: command_properties\n // End section: command_properties\n constructor(input) {\n // Start section: command_constructor\n super();\n this.input = input;\n // End section: command_constructor\n }\n /**\n * @internal\n */\n resolveMiddleware(clientStack, configuration, options) {\n this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize));\n const stack = clientStack.concat(this.middlewareStack);\n const { logger } = configuration;\n const clientName = \"ECSClient\";\n const commandName = \"DiscoverPollEndpointCommand\";\n const handlerExecutionContext = {\n logger,\n clientName,\n commandName,\n inputFilterSensitiveLog: models_0_1.DiscoverPollEndpointRequest.filterSensitiveLog,\n outputFilterSensitiveLog: models_0_1.DiscoverPollEndpointResponse.filterSensitiveLog,\n };\n const { requestHandler } = configuration;\n return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);\n }\n serialize(input, context) {\n return Aws_json1_1_1.serializeAws_json1_1DiscoverPollEndpointCommand(input, context);\n }\n deserialize(output, context) {\n return Aws_json1_1_1.deserializeAws_json1_1DiscoverPollEndpointCommand(output, context);\n }\n}\nexports.DiscoverPollEndpointCommand = DiscoverPollEndpointCommand;\n//# sourceMappingURL=DiscoverPollEndpointCommand.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.ExecuteCommandCommand = void 0;\nconst models_0_1 = require(\"../models/models_0\");\nconst Aws_json1_1_1 = require(\"../protocols/Aws_json1_1\");\nconst middleware_serde_1 = require(\"@aws-sdk/middleware-serde\");\nconst smithy_client_1 = require(\"@aws-sdk/smithy-client\");\n/**\n *

Runs a command remotely on a container within a task.

\n * @example\n * Use a bare-bones client and the command you need to make an API call.\n * ```javascript\n * import { ECSClient, ExecuteCommandCommand } from \"@aws-sdk/client-ecs\"; // ES Modules import\n * // const { ECSClient, ExecuteCommandCommand } = require(\"@aws-sdk/client-ecs\"); // CommonJS import\n * const client = new ECSClient(config);\n * const command = new ExecuteCommandCommand(input);\n * const response = await client.send(command);\n * ```\n *\n * @see {@link ExecuteCommandCommandInput} for command's `input` shape.\n * @see {@link ExecuteCommandCommandOutput} for command's `response` shape.\n * @see {@link ECSClientResolvedConfig | config} for command's `input` shape.\n *\n */\nclass ExecuteCommandCommand extends smithy_client_1.Command {\n // Start section: command_properties\n // End section: command_properties\n constructor(input) {\n // Start section: command_constructor\n super();\n this.input = input;\n // End section: command_constructor\n }\n /**\n * @internal\n */\n resolveMiddleware(clientStack, configuration, options) {\n this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize));\n const stack = clientStack.concat(this.middlewareStack);\n const { logger } = configuration;\n const clientName = \"ECSClient\";\n const commandName = \"ExecuteCommandCommand\";\n const handlerExecutionContext = {\n logger,\n clientName,\n commandName,\n inputFilterSensitiveLog: models_0_1.ExecuteCommandRequest.filterSensitiveLog,\n outputFilterSensitiveLog: models_0_1.ExecuteCommandResponse.filterSensitiveLog,\n };\n const { requestHandler } = configuration;\n return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);\n }\n serialize(input, context) {\n return Aws_json1_1_1.serializeAws_json1_1ExecuteCommandCommand(input, context);\n }\n deserialize(output, context) {\n return Aws_json1_1_1.deserializeAws_json1_1ExecuteCommandCommand(output, context);\n }\n}\nexports.ExecuteCommandCommand = ExecuteCommandCommand;\n//# sourceMappingURL=ExecuteCommandCommand.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.ListAccountSettingsCommand = void 0;\nconst models_0_1 = require(\"../models/models_0\");\nconst Aws_json1_1_1 = require(\"../protocols/Aws_json1_1\");\nconst middleware_serde_1 = require(\"@aws-sdk/middleware-serde\");\nconst smithy_client_1 = require(\"@aws-sdk/smithy-client\");\n/**\n *

Lists the account settings for a specified principal.

\n * @example\n * Use a bare-bones client and the command you need to make an API call.\n * ```javascript\n * import { ECSClient, ListAccountSettingsCommand } from \"@aws-sdk/client-ecs\"; // ES Modules import\n * // const { ECSClient, ListAccountSettingsCommand } = require(\"@aws-sdk/client-ecs\"); // CommonJS import\n * const client = new ECSClient(config);\n * const command = new ListAccountSettingsCommand(input);\n * const response = await client.send(command);\n * ```\n *\n * @see {@link ListAccountSettingsCommandInput} for command's `input` shape.\n * @see {@link ListAccountSettingsCommandOutput} for command's `response` shape.\n * @see {@link ECSClientResolvedConfig | config} for command's `input` shape.\n *\n */\nclass ListAccountSettingsCommand extends smithy_client_1.Command {\n // Start section: command_properties\n // End section: command_properties\n constructor(input) {\n // Start section: command_constructor\n super();\n this.input = input;\n // End section: command_constructor\n }\n /**\n * @internal\n */\n resolveMiddleware(clientStack, configuration, options) {\n this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize));\n const stack = clientStack.concat(this.middlewareStack);\n const { logger } = configuration;\n const clientName = \"ECSClient\";\n const commandName = \"ListAccountSettingsCommand\";\n const handlerExecutionContext = {\n logger,\n clientName,\n commandName,\n inputFilterSensitiveLog: models_0_1.ListAccountSettingsRequest.filterSensitiveLog,\n outputFilterSensitiveLog: models_0_1.ListAccountSettingsResponse.filterSensitiveLog,\n };\n const { requestHandler } = configuration;\n return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);\n }\n serialize(input, context) {\n return Aws_json1_1_1.serializeAws_json1_1ListAccountSettingsCommand(input, context);\n }\n deserialize(output, context) {\n return Aws_json1_1_1.deserializeAws_json1_1ListAccountSettingsCommand(output, context);\n }\n}\nexports.ListAccountSettingsCommand = ListAccountSettingsCommand;\n//# sourceMappingURL=ListAccountSettingsCommand.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.ListAttributesCommand = void 0;\nconst models_0_1 = require(\"../models/models_0\");\nconst Aws_json1_1_1 = require(\"../protocols/Aws_json1_1\");\nconst middleware_serde_1 = require(\"@aws-sdk/middleware-serde\");\nconst smithy_client_1 = require(\"@aws-sdk/smithy-client\");\n/**\n *

Lists the attributes for Amazon ECS resources within a specified target type and cluster.\n * \t\t\tWhen you specify a target type and cluster, ListAttributes returns a list\n * \t\t\tof attribute objects, one for each attribute on each resource. You can filter the list\n * \t\t\tof results to a single attribute name to only return results that have that name. You\n * \t\t\tcan also filter the results by attribute name and value, for example, to see which\n * \t\t\tcontainer instances in a cluster are running a Linux AMI\n * \t\t\t(ecs.os-type=linux).

\n * @example\n * Use a bare-bones client and the command you need to make an API call.\n * ```javascript\n * import { ECSClient, ListAttributesCommand } from \"@aws-sdk/client-ecs\"; // ES Modules import\n * // const { ECSClient, ListAttributesCommand } = require(\"@aws-sdk/client-ecs\"); // CommonJS import\n * const client = new ECSClient(config);\n * const command = new ListAttributesCommand(input);\n * const response = await client.send(command);\n * ```\n *\n * @see {@link ListAttributesCommandInput} for command's `input` shape.\n * @see {@link ListAttributesCommandOutput} for command's `response` shape.\n * @see {@link ECSClientResolvedConfig | config} for command's `input` shape.\n *\n */\nclass ListAttributesCommand extends smithy_client_1.Command {\n // Start section: command_properties\n // End section: command_properties\n constructor(input) {\n // Start section: command_constructor\n super();\n this.input = input;\n // End section: command_constructor\n }\n /**\n * @internal\n */\n resolveMiddleware(clientStack, configuration, options) {\n this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize));\n const stack = clientStack.concat(this.middlewareStack);\n const { logger } = configuration;\n const clientName = \"ECSClient\";\n const commandName = \"ListAttributesCommand\";\n const handlerExecutionContext = {\n logger,\n clientName,\n commandName,\n inputFilterSensitiveLog: models_0_1.ListAttributesRequest.filterSensitiveLog,\n outputFilterSensitiveLog: models_0_1.ListAttributesResponse.filterSensitiveLog,\n };\n const { requestHandler } = configuration;\n return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);\n }\n serialize(input, context) {\n return Aws_json1_1_1.serializeAws_json1_1ListAttributesCommand(input, context);\n }\n deserialize(output, context) {\n return Aws_json1_1_1.deserializeAws_json1_1ListAttributesCommand(output, context);\n }\n}\nexports.ListAttributesCommand = ListAttributesCommand;\n//# sourceMappingURL=ListAttributesCommand.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.ListClustersCommand = void 0;\nconst models_0_1 = require(\"../models/models_0\");\nconst Aws_json1_1_1 = require(\"../protocols/Aws_json1_1\");\nconst middleware_serde_1 = require(\"@aws-sdk/middleware-serde\");\nconst smithy_client_1 = require(\"@aws-sdk/smithy-client\");\n/**\n *

Returns a list of existing clusters.

\n * @example\n * Use a bare-bones client and the command you need to make an API call.\n * ```javascript\n * import { ECSClient, ListClustersCommand } from \"@aws-sdk/client-ecs\"; // ES Modules import\n * // const { ECSClient, ListClustersCommand } = require(\"@aws-sdk/client-ecs\"); // CommonJS import\n * const client = new ECSClient(config);\n * const command = new ListClustersCommand(input);\n * const response = await client.send(command);\n * ```\n *\n * @see {@link ListClustersCommandInput} for command's `input` shape.\n * @see {@link ListClustersCommandOutput} for command's `response` shape.\n * @see {@link ECSClientResolvedConfig | config} for command's `input` shape.\n *\n */\nclass ListClustersCommand extends smithy_client_1.Command {\n // Start section: command_properties\n // End section: command_properties\n constructor(input) {\n // Start section: command_constructor\n super();\n this.input = input;\n // End section: command_constructor\n }\n /**\n * @internal\n */\n resolveMiddleware(clientStack, configuration, options) {\n this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize));\n const stack = clientStack.concat(this.middlewareStack);\n const { logger } = configuration;\n const clientName = \"ECSClient\";\n const commandName = \"ListClustersCommand\";\n const handlerExecutionContext = {\n logger,\n clientName,\n commandName,\n inputFilterSensitiveLog: models_0_1.ListClustersRequest.filterSensitiveLog,\n outputFilterSensitiveLog: models_0_1.ListClustersResponse.filterSensitiveLog,\n };\n const { requestHandler } = configuration;\n return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);\n }\n serialize(input, context) {\n return Aws_json1_1_1.serializeAws_json1_1ListClustersCommand(input, context);\n }\n deserialize(output, context) {\n return Aws_json1_1_1.deserializeAws_json1_1ListClustersCommand(output, context);\n }\n}\nexports.ListClustersCommand = ListClustersCommand;\n//# sourceMappingURL=ListClustersCommand.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.ListContainerInstancesCommand = void 0;\nconst models_0_1 = require(\"../models/models_0\");\nconst Aws_json1_1_1 = require(\"../protocols/Aws_json1_1\");\nconst middleware_serde_1 = require(\"@aws-sdk/middleware-serde\");\nconst smithy_client_1 = require(\"@aws-sdk/smithy-client\");\n/**\n *

Returns a list of container instances in a specified cluster. You can filter the\n * \t\t\tresults of a ListContainerInstances operation with cluster query language\n * \t\t\tstatements inside the filter parameter. For more information, see Cluster Query Language in the\n * \t\t\t\tAmazon Elastic Container Service Developer Guide.

\n * @example\n * Use a bare-bones client and the command you need to make an API call.\n * ```javascript\n * import { ECSClient, ListContainerInstancesCommand } from \"@aws-sdk/client-ecs\"; // ES Modules import\n * // const { ECSClient, ListContainerInstancesCommand } = require(\"@aws-sdk/client-ecs\"); // CommonJS import\n * const client = new ECSClient(config);\n * const command = new ListContainerInstancesCommand(input);\n * const response = await client.send(command);\n * ```\n *\n * @see {@link ListContainerInstancesCommandInput} for command's `input` shape.\n * @see {@link ListContainerInstancesCommandOutput} for command's `response` shape.\n * @see {@link ECSClientResolvedConfig | config} for command's `input` shape.\n *\n */\nclass ListContainerInstancesCommand extends smithy_client_1.Command {\n // Start section: command_properties\n // End section: command_properties\n constructor(input) {\n // Start section: command_constructor\n super();\n this.input = input;\n // End section: command_constructor\n }\n /**\n * @internal\n */\n resolveMiddleware(clientStack, configuration, options) {\n this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize));\n const stack = clientStack.concat(this.middlewareStack);\n const { logger } = configuration;\n const clientName = \"ECSClient\";\n const commandName = \"ListContainerInstancesCommand\";\n const handlerExecutionContext = {\n logger,\n clientName,\n commandName,\n inputFilterSensitiveLog: models_0_1.ListContainerInstancesRequest.filterSensitiveLog,\n outputFilterSensitiveLog: models_0_1.ListContainerInstancesResponse.filterSensitiveLog,\n };\n const { requestHandler } = configuration;\n return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);\n }\n serialize(input, context) {\n return Aws_json1_1_1.serializeAws_json1_1ListContainerInstancesCommand(input, context);\n }\n deserialize(output, context) {\n return Aws_json1_1_1.deserializeAws_json1_1ListContainerInstancesCommand(output, context);\n }\n}\nexports.ListContainerInstancesCommand = ListContainerInstancesCommand;\n//# sourceMappingURL=ListContainerInstancesCommand.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.ListServicesCommand = void 0;\nconst models_0_1 = require(\"../models/models_0\");\nconst Aws_json1_1_1 = require(\"../protocols/Aws_json1_1\");\nconst middleware_serde_1 = require(\"@aws-sdk/middleware-serde\");\nconst smithy_client_1 = require(\"@aws-sdk/smithy-client\");\n/**\n *

Returns a list of services. You can filter the results by cluster, launch type, and\n * \t\t\tscheduling strategy.

\n * @example\n * Use a bare-bones client and the command you need to make an API call.\n * ```javascript\n * import { ECSClient, ListServicesCommand } from \"@aws-sdk/client-ecs\"; // ES Modules import\n * // const { ECSClient, ListServicesCommand } = require(\"@aws-sdk/client-ecs\"); // CommonJS import\n * const client = new ECSClient(config);\n * const command = new ListServicesCommand(input);\n * const response = await client.send(command);\n * ```\n *\n * @see {@link ListServicesCommandInput} for command's `input` shape.\n * @see {@link ListServicesCommandOutput} for command's `response` shape.\n * @see {@link ECSClientResolvedConfig | config} for command's `input` shape.\n *\n */\nclass ListServicesCommand extends smithy_client_1.Command {\n // Start section: command_properties\n // End section: command_properties\n constructor(input) {\n // Start section: command_constructor\n super();\n this.input = input;\n // End section: command_constructor\n }\n /**\n * @internal\n */\n resolveMiddleware(clientStack, configuration, options) {\n this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize));\n const stack = clientStack.concat(this.middlewareStack);\n const { logger } = configuration;\n const clientName = \"ECSClient\";\n const commandName = \"ListServicesCommand\";\n const handlerExecutionContext = {\n logger,\n clientName,\n commandName,\n inputFilterSensitiveLog: models_0_1.ListServicesRequest.filterSensitiveLog,\n outputFilterSensitiveLog: models_0_1.ListServicesResponse.filterSensitiveLog,\n };\n const { requestHandler } = configuration;\n return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);\n }\n serialize(input, context) {\n return Aws_json1_1_1.serializeAws_json1_1ListServicesCommand(input, context);\n }\n deserialize(output, context) {\n return Aws_json1_1_1.deserializeAws_json1_1ListServicesCommand(output, context);\n }\n}\nexports.ListServicesCommand = ListServicesCommand;\n//# sourceMappingURL=ListServicesCommand.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.ListTagsForResourceCommand = void 0;\nconst models_0_1 = require(\"../models/models_0\");\nconst Aws_json1_1_1 = require(\"../protocols/Aws_json1_1\");\nconst middleware_serde_1 = require(\"@aws-sdk/middleware-serde\");\nconst smithy_client_1 = require(\"@aws-sdk/smithy-client\");\n/**\n *

List the tags for an Amazon ECS resource.

\n * @example\n * Use a bare-bones client and the command you need to make an API call.\n * ```javascript\n * import { ECSClient, ListTagsForResourceCommand } from \"@aws-sdk/client-ecs\"; // ES Modules import\n * // const { ECSClient, ListTagsForResourceCommand } = require(\"@aws-sdk/client-ecs\"); // CommonJS import\n * const client = new ECSClient(config);\n * const command = new ListTagsForResourceCommand(input);\n * const response = await client.send(command);\n * ```\n *\n * @see {@link ListTagsForResourceCommandInput} for command's `input` shape.\n * @see {@link ListTagsForResourceCommandOutput} for command's `response` shape.\n * @see {@link ECSClientResolvedConfig | config} for command's `input` shape.\n *\n */\nclass ListTagsForResourceCommand extends smithy_client_1.Command {\n // Start section: command_properties\n // End section: command_properties\n constructor(input) {\n // Start section: command_constructor\n super();\n this.input = input;\n // End section: command_constructor\n }\n /**\n * @internal\n */\n resolveMiddleware(clientStack, configuration, options) {\n this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize));\n const stack = clientStack.concat(this.middlewareStack);\n const { logger } = configuration;\n const clientName = \"ECSClient\";\n const commandName = \"ListTagsForResourceCommand\";\n const handlerExecutionContext = {\n logger,\n clientName,\n commandName,\n inputFilterSensitiveLog: models_0_1.ListTagsForResourceRequest.filterSensitiveLog,\n outputFilterSensitiveLog: models_0_1.ListTagsForResourceResponse.filterSensitiveLog,\n };\n const { requestHandler } = configuration;\n return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);\n }\n serialize(input, context) {\n return Aws_json1_1_1.serializeAws_json1_1ListTagsForResourceCommand(input, context);\n }\n deserialize(output, context) {\n return Aws_json1_1_1.deserializeAws_json1_1ListTagsForResourceCommand(output, context);\n }\n}\nexports.ListTagsForResourceCommand = ListTagsForResourceCommand;\n//# sourceMappingURL=ListTagsForResourceCommand.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.ListTaskDefinitionFamiliesCommand = void 0;\nconst models_0_1 = require(\"../models/models_0\");\nconst Aws_json1_1_1 = require(\"../protocols/Aws_json1_1\");\nconst middleware_serde_1 = require(\"@aws-sdk/middleware-serde\");\nconst smithy_client_1 = require(\"@aws-sdk/smithy-client\");\n/**\n *

Returns a list of task definition families that are registered to your account (which\n * \t\t\tmay include task definition families that no longer have any ACTIVE task\n * \t\t\tdefinition revisions).

\n * \t\t

You can filter out task definition families that do not contain any\n * \t\t\t\tACTIVE task definition revisions by setting the status\n * \t\t\tparameter to ACTIVE. You can also filter the results with the\n * \t\t\t\tfamilyPrefix parameter.

\n * @example\n * Use a bare-bones client and the command you need to make an API call.\n * ```javascript\n * import { ECSClient, ListTaskDefinitionFamiliesCommand } from \"@aws-sdk/client-ecs\"; // ES Modules import\n * // const { ECSClient, ListTaskDefinitionFamiliesCommand } = require(\"@aws-sdk/client-ecs\"); // CommonJS import\n * const client = new ECSClient(config);\n * const command = new ListTaskDefinitionFamiliesCommand(input);\n * const response = await client.send(command);\n * ```\n *\n * @see {@link ListTaskDefinitionFamiliesCommandInput} for command's `input` shape.\n * @see {@link ListTaskDefinitionFamiliesCommandOutput} for command's `response` shape.\n * @see {@link ECSClientResolvedConfig | config} for command's `input` shape.\n *\n */\nclass ListTaskDefinitionFamiliesCommand extends smithy_client_1.Command {\n // Start section: command_properties\n // End section: command_properties\n constructor(input) {\n // Start section: command_constructor\n super();\n this.input = input;\n // End section: command_constructor\n }\n /**\n * @internal\n */\n resolveMiddleware(clientStack, configuration, options) {\n this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize));\n const stack = clientStack.concat(this.middlewareStack);\n const { logger } = configuration;\n const clientName = \"ECSClient\";\n const commandName = \"ListTaskDefinitionFamiliesCommand\";\n const handlerExecutionContext = {\n logger,\n clientName,\n commandName,\n inputFilterSensitiveLog: models_0_1.ListTaskDefinitionFamiliesRequest.filterSensitiveLog,\n outputFilterSensitiveLog: models_0_1.ListTaskDefinitionFamiliesResponse.filterSensitiveLog,\n };\n const { requestHandler } = configuration;\n return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);\n }\n serialize(input, context) {\n return Aws_json1_1_1.serializeAws_json1_1ListTaskDefinitionFamiliesCommand(input, context);\n }\n deserialize(output, context) {\n return Aws_json1_1_1.deserializeAws_json1_1ListTaskDefinitionFamiliesCommand(output, context);\n }\n}\nexports.ListTaskDefinitionFamiliesCommand = ListTaskDefinitionFamiliesCommand;\n//# sourceMappingURL=ListTaskDefinitionFamiliesCommand.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.ListTaskDefinitionsCommand = void 0;\nconst models_0_1 = require(\"../models/models_0\");\nconst Aws_json1_1_1 = require(\"../protocols/Aws_json1_1\");\nconst middleware_serde_1 = require(\"@aws-sdk/middleware-serde\");\nconst smithy_client_1 = require(\"@aws-sdk/smithy-client\");\n/**\n *

Returns a list of task definitions that are registered to your account. You can filter\n * \t\t\tthe results by family name with the familyPrefix parameter or by status\n * \t\t\twith the status parameter.

\n * @example\n * Use a bare-bones client and the command you need to make an API call.\n * ```javascript\n * import { ECSClient, ListTaskDefinitionsCommand } from \"@aws-sdk/client-ecs\"; // ES Modules import\n * // const { ECSClient, ListTaskDefinitionsCommand } = require(\"@aws-sdk/client-ecs\"); // CommonJS import\n * const client = new ECSClient(config);\n * const command = new ListTaskDefinitionsCommand(input);\n * const response = await client.send(command);\n * ```\n *\n * @see {@link ListTaskDefinitionsCommandInput} for command's `input` shape.\n * @see {@link ListTaskDefinitionsCommandOutput} for command's `response` shape.\n * @see {@link ECSClientResolvedConfig | config} for command's `input` shape.\n *\n */\nclass ListTaskDefinitionsCommand extends smithy_client_1.Command {\n // Start section: command_properties\n // End section: command_properties\n constructor(input) {\n // Start section: command_constructor\n super();\n this.input = input;\n // End section: command_constructor\n }\n /**\n * @internal\n */\n resolveMiddleware(clientStack, configuration, options) {\n this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize));\n const stack = clientStack.concat(this.middlewareStack);\n const { logger } = configuration;\n const clientName = \"ECSClient\";\n const commandName = \"ListTaskDefinitionsCommand\";\n const handlerExecutionContext = {\n logger,\n clientName,\n commandName,\n inputFilterSensitiveLog: models_0_1.ListTaskDefinitionsRequest.filterSensitiveLog,\n outputFilterSensitiveLog: models_0_1.ListTaskDefinitionsResponse.filterSensitiveLog,\n };\n const { requestHandler } = configuration;\n return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);\n }\n serialize(input, context) {\n return Aws_json1_1_1.serializeAws_json1_1ListTaskDefinitionsCommand(input, context);\n }\n deserialize(output, context) {\n return Aws_json1_1_1.deserializeAws_json1_1ListTaskDefinitionsCommand(output, context);\n }\n}\nexports.ListTaskDefinitionsCommand = ListTaskDefinitionsCommand;\n//# sourceMappingURL=ListTaskDefinitionsCommand.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.ListTasksCommand = void 0;\nconst models_0_1 = require(\"../models/models_0\");\nconst Aws_json1_1_1 = require(\"../protocols/Aws_json1_1\");\nconst middleware_serde_1 = require(\"@aws-sdk/middleware-serde\");\nconst smithy_client_1 = require(\"@aws-sdk/smithy-client\");\n/**\n *

Returns a list of tasks. You can filter the results by cluster, task definition\n * \t\t\tfamily, container instance, launch type, what IAM principal started the task, or by the\n * \t\t\tdesired status of the task.

\n * \t\t

Recently stopped tasks might appear in the returned results. Currently, stopped tasks\n * \t\t\tappear in the returned results for at least one hour.

\n * @example\n * Use a bare-bones client and the command you need to make an API call.\n * ```javascript\n * import { ECSClient, ListTasksCommand } from \"@aws-sdk/client-ecs\"; // ES Modules import\n * // const { ECSClient, ListTasksCommand } = require(\"@aws-sdk/client-ecs\"); // CommonJS import\n * const client = new ECSClient(config);\n * const command = new ListTasksCommand(input);\n * const response = await client.send(command);\n * ```\n *\n * @see {@link ListTasksCommandInput} for command's `input` shape.\n * @see {@link ListTasksCommandOutput} for command's `response` shape.\n * @see {@link ECSClientResolvedConfig | config} for command's `input` shape.\n *\n */\nclass ListTasksCommand extends smithy_client_1.Command {\n // Start section: command_properties\n // End section: command_properties\n constructor(input) {\n // Start section: command_constructor\n super();\n this.input = input;\n // End section: command_constructor\n }\n /**\n * @internal\n */\n resolveMiddleware(clientStack, configuration, options) {\n this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize));\n const stack = clientStack.concat(this.middlewareStack);\n const { logger } = configuration;\n const clientName = \"ECSClient\";\n const commandName = \"ListTasksCommand\";\n const handlerExecutionContext = {\n logger,\n clientName,\n commandName,\n inputFilterSensitiveLog: models_0_1.ListTasksRequest.filterSensitiveLog,\n outputFilterSensitiveLog: models_0_1.ListTasksResponse.filterSensitiveLog,\n };\n const { requestHandler } = configuration;\n return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);\n }\n serialize(input, context) {\n return Aws_json1_1_1.serializeAws_json1_1ListTasksCommand(input, context);\n }\n deserialize(output, context) {\n return Aws_json1_1_1.deserializeAws_json1_1ListTasksCommand(output, context);\n }\n}\nexports.ListTasksCommand = ListTasksCommand;\n//# sourceMappingURL=ListTasksCommand.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.PutAccountSettingCommand = void 0;\nconst models_0_1 = require(\"../models/models_0\");\nconst Aws_json1_1_1 = require(\"../protocols/Aws_json1_1\");\nconst middleware_serde_1 = require(\"@aws-sdk/middleware-serde\");\nconst smithy_client_1 = require(\"@aws-sdk/smithy-client\");\n/**\n *

Modifies an account setting. Account settings are set on a per-Region basis.

\n * \t\t

If you change the account setting for the root user, the default settings for all of\n * \t\t\tthe IAM users and roles for which no individual account setting has been specified are\n * \t\t\treset. For more information, see Account\n * \t\t\t\tSettings in the Amazon Elastic Container Service Developer Guide.

\n * \t\t

When serviceLongArnFormat, taskLongArnFormat, or\n * \t\t\t\tcontainerInstanceLongArnFormat are specified, the Amazon Resource Name\n * \t\t\t(ARN) and resource ID format of the resource type for a specified IAM user, IAM role, or\n * \t\t\tthe root user for an account is affected. The opt-in and opt-out account setting must be\n * \t\t\tset for each Amazon ECS resource separately. The ARN and resource ID format of a resource\n * \t\t\twill be defined by the opt-in status of the IAM user or role that created the resource.\n * \t\t\tYou must enable this setting to use Amazon ECS features such as resource tagging.

\n * \t\t

When awsvpcTrunking is specified, the elastic network interface (ENI)\n * \t\t\tlimit for any new container instances that support the feature is changed. If\n * \t\t\t\tawsvpcTrunking is enabled, any new container instances that support the\n * \t\t\tfeature are launched have the increased ENI limits available to them. For more\n * \t\t\tinformation, see Elastic Network\n * \t\t\t\tInterface Trunking in the Amazon Elastic Container Service Developer Guide.

\n * \t\t

When containerInsights is specified, the default setting indicating\n * \t\t\twhether CloudWatch Container Insights is enabled for your clusters is changed. If\n * \t\t\t\tcontainerInsights is enabled, any new clusters that are created will\n * \t\t\thave Container Insights enabled unless you disable it during cluster creation. For more\n * \t\t\tinformation, see CloudWatch\n * \t\t\t\tContainer Insights in the Amazon Elastic Container Service Developer Guide.

\n * @example\n * Use a bare-bones client and the command you need to make an API call.\n * ```javascript\n * import { ECSClient, PutAccountSettingCommand } from \"@aws-sdk/client-ecs\"; // ES Modules import\n * // const { ECSClient, PutAccountSettingCommand } = require(\"@aws-sdk/client-ecs\"); // CommonJS import\n * const client = new ECSClient(config);\n * const command = new PutAccountSettingCommand(input);\n * const response = await client.send(command);\n * ```\n *\n * @see {@link PutAccountSettingCommandInput} for command's `input` shape.\n * @see {@link PutAccountSettingCommandOutput} for command's `response` shape.\n * @see {@link ECSClientResolvedConfig | config} for command's `input` shape.\n *\n */\nclass PutAccountSettingCommand extends smithy_client_1.Command {\n // Start section: command_properties\n // End section: command_properties\n constructor(input) {\n // Start section: command_constructor\n super();\n this.input = input;\n // End section: command_constructor\n }\n /**\n * @internal\n */\n resolveMiddleware(clientStack, configuration, options) {\n this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize));\n const stack = clientStack.concat(this.middlewareStack);\n const { logger } = configuration;\n const clientName = \"ECSClient\";\n const commandName = \"PutAccountSettingCommand\";\n const handlerExecutionContext = {\n logger,\n clientName,\n commandName,\n inputFilterSensitiveLog: models_0_1.PutAccountSettingRequest.filterSensitiveLog,\n outputFilterSensitiveLog: models_0_1.PutAccountSettingResponse.filterSensitiveLog,\n };\n const { requestHandler } = configuration;\n return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);\n }\n serialize(input, context) {\n return Aws_json1_1_1.serializeAws_json1_1PutAccountSettingCommand(input, context);\n }\n deserialize(output, context) {\n return Aws_json1_1_1.deserializeAws_json1_1PutAccountSettingCommand(output, context);\n }\n}\nexports.PutAccountSettingCommand = PutAccountSettingCommand;\n//# sourceMappingURL=PutAccountSettingCommand.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.PutAccountSettingDefaultCommand = void 0;\nconst models_0_1 = require(\"../models/models_0\");\nconst Aws_json1_1_1 = require(\"../protocols/Aws_json1_1\");\nconst middleware_serde_1 = require(\"@aws-sdk/middleware-serde\");\nconst smithy_client_1 = require(\"@aws-sdk/smithy-client\");\n/**\n *

Modifies an account setting for all IAM users on an account for whom no individual\n * \t\t\taccount setting has been specified. Account settings are set on a per-Region\n * \t\t\tbasis.

\n * @example\n * Use a bare-bones client and the command you need to make an API call.\n * ```javascript\n * import { ECSClient, PutAccountSettingDefaultCommand } from \"@aws-sdk/client-ecs\"; // ES Modules import\n * // const { ECSClient, PutAccountSettingDefaultCommand } = require(\"@aws-sdk/client-ecs\"); // CommonJS import\n * const client = new ECSClient(config);\n * const command = new PutAccountSettingDefaultCommand(input);\n * const response = await client.send(command);\n * ```\n *\n * @see {@link PutAccountSettingDefaultCommandInput} for command's `input` shape.\n * @see {@link PutAccountSettingDefaultCommandOutput} for command's `response` shape.\n * @see {@link ECSClientResolvedConfig | config} for command's `input` shape.\n *\n */\nclass PutAccountSettingDefaultCommand extends smithy_client_1.Command {\n // Start section: command_properties\n // End section: command_properties\n constructor(input) {\n // Start section: command_constructor\n super();\n this.input = input;\n // End section: command_constructor\n }\n /**\n * @internal\n */\n resolveMiddleware(clientStack, configuration, options) {\n this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize));\n const stack = clientStack.concat(this.middlewareStack);\n const { logger } = configuration;\n const clientName = \"ECSClient\";\n const commandName = \"PutAccountSettingDefaultCommand\";\n const handlerExecutionContext = {\n logger,\n clientName,\n commandName,\n inputFilterSensitiveLog: models_0_1.PutAccountSettingDefaultRequest.filterSensitiveLog,\n outputFilterSensitiveLog: models_0_1.PutAccountSettingDefaultResponse.filterSensitiveLog,\n };\n const { requestHandler } = configuration;\n return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);\n }\n serialize(input, context) {\n return Aws_json1_1_1.serializeAws_json1_1PutAccountSettingDefaultCommand(input, context);\n }\n deserialize(output, context) {\n return Aws_json1_1_1.deserializeAws_json1_1PutAccountSettingDefaultCommand(output, context);\n }\n}\nexports.PutAccountSettingDefaultCommand = PutAccountSettingDefaultCommand;\n//# sourceMappingURL=PutAccountSettingDefaultCommand.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.PutAttributesCommand = void 0;\nconst models_0_1 = require(\"../models/models_0\");\nconst Aws_json1_1_1 = require(\"../protocols/Aws_json1_1\");\nconst middleware_serde_1 = require(\"@aws-sdk/middleware-serde\");\nconst smithy_client_1 = require(\"@aws-sdk/smithy-client\");\n/**\n *

Create or update an attribute on an Amazon ECS resource. If the attribute does not exist,\n * \t\t\tit is created. If the attribute exists, its value is replaced with the specified value.\n * \t\t\tTo delete an attribute, use DeleteAttributes. For more information,\n * \t\t\tsee Attributes in the\n * \t\t\tAmazon Elastic Container Service Developer Guide.

\n * @example\n * Use a bare-bones client and the command you need to make an API call.\n * ```javascript\n * import { ECSClient, PutAttributesCommand } from \"@aws-sdk/client-ecs\"; // ES Modules import\n * // const { ECSClient, PutAttributesCommand } = require(\"@aws-sdk/client-ecs\"); // CommonJS import\n * const client = new ECSClient(config);\n * const command = new PutAttributesCommand(input);\n * const response = await client.send(command);\n * ```\n *\n * @see {@link PutAttributesCommandInput} for command's `input` shape.\n * @see {@link PutAttributesCommandOutput} for command's `response` shape.\n * @see {@link ECSClientResolvedConfig | config} for command's `input` shape.\n *\n */\nclass PutAttributesCommand extends smithy_client_1.Command {\n // Start section: command_properties\n // End section: command_properties\n constructor(input) {\n // Start section: command_constructor\n super();\n this.input = input;\n // End section: command_constructor\n }\n /**\n * @internal\n */\n resolveMiddleware(clientStack, configuration, options) {\n this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize));\n const stack = clientStack.concat(this.middlewareStack);\n const { logger } = configuration;\n const clientName = \"ECSClient\";\n const commandName = \"PutAttributesCommand\";\n const handlerExecutionContext = {\n logger,\n clientName,\n commandName,\n inputFilterSensitiveLog: models_0_1.PutAttributesRequest.filterSensitiveLog,\n outputFilterSensitiveLog: models_0_1.PutAttributesResponse.filterSensitiveLog,\n };\n const { requestHandler } = configuration;\n return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);\n }\n serialize(input, context) {\n return Aws_json1_1_1.serializeAws_json1_1PutAttributesCommand(input, context);\n }\n deserialize(output, context) {\n return Aws_json1_1_1.deserializeAws_json1_1PutAttributesCommand(output, context);\n }\n}\nexports.PutAttributesCommand = PutAttributesCommand;\n//# sourceMappingURL=PutAttributesCommand.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.PutClusterCapacityProvidersCommand = void 0;\nconst models_0_1 = require(\"../models/models_0\");\nconst Aws_json1_1_1 = require(\"../protocols/Aws_json1_1\");\nconst middleware_serde_1 = require(\"@aws-sdk/middleware-serde\");\nconst smithy_client_1 = require(\"@aws-sdk/smithy-client\");\n/**\n *

Modifies the available capacity providers and the default capacity provider strategy\n * \t\t\tfor a cluster.

\n * \t\t

You must specify both the available capacity providers and a default capacity provider\n * \t\t\tstrategy for the cluster. If the specified cluster has existing capacity providers\n * \t\t\tassociated with it, you must specify all existing capacity providers in addition to any\n * \t\t\tnew ones you want to add. Any existing capacity providers associated with a cluster that\n * \t\t\tare omitted from a PutClusterCapacityProviders API call will be\n * \t\t\tdisassociated with the cluster. You can only disassociate an existing capacity provider\n * \t\t\tfrom a cluster if it's not being used by any existing tasks.

\n * \t\t

When creating a service or running a task on a cluster, if no capacity provider or\n * \t\t\tlaunch type is specified, then the cluster's default capacity provider strategy is used.\n * \t\t\tIt is recommended to define a default capacity provider strategy for your cluster,\n * \t\t\thowever you may specify an empty array ([]) to bypass defining a default\n * \t\t\tstrategy.

\n * @example\n * Use a bare-bones client and the command you need to make an API call.\n * ```javascript\n * import { ECSClient, PutClusterCapacityProvidersCommand } from \"@aws-sdk/client-ecs\"; // ES Modules import\n * // const { ECSClient, PutClusterCapacityProvidersCommand } = require(\"@aws-sdk/client-ecs\"); // CommonJS import\n * const client = new ECSClient(config);\n * const command = new PutClusterCapacityProvidersCommand(input);\n * const response = await client.send(command);\n * ```\n *\n * @see {@link PutClusterCapacityProvidersCommandInput} for command's `input` shape.\n * @see {@link PutClusterCapacityProvidersCommandOutput} for command's `response` shape.\n * @see {@link ECSClientResolvedConfig | config} for command's `input` shape.\n *\n */\nclass PutClusterCapacityProvidersCommand extends smithy_client_1.Command {\n // Start section: command_properties\n // End section: command_properties\n constructor(input) {\n // Start section: command_constructor\n super();\n this.input = input;\n // End section: command_constructor\n }\n /**\n * @internal\n */\n resolveMiddleware(clientStack, configuration, options) {\n this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize));\n const stack = clientStack.concat(this.middlewareStack);\n const { logger } = configuration;\n const clientName = \"ECSClient\";\n const commandName = \"PutClusterCapacityProvidersCommand\";\n const handlerExecutionContext = {\n logger,\n clientName,\n commandName,\n inputFilterSensitiveLog: models_0_1.PutClusterCapacityProvidersRequest.filterSensitiveLog,\n outputFilterSensitiveLog: models_0_1.PutClusterCapacityProvidersResponse.filterSensitiveLog,\n };\n const { requestHandler } = configuration;\n return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);\n }\n serialize(input, context) {\n return Aws_json1_1_1.serializeAws_json1_1PutClusterCapacityProvidersCommand(input, context);\n }\n deserialize(output, context) {\n return Aws_json1_1_1.deserializeAws_json1_1PutClusterCapacityProvidersCommand(output, context);\n }\n}\nexports.PutClusterCapacityProvidersCommand = PutClusterCapacityProvidersCommand;\n//# sourceMappingURL=PutClusterCapacityProvidersCommand.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.RegisterContainerInstanceCommand = void 0;\nconst models_0_1 = require(\"../models/models_0\");\nconst Aws_json1_1_1 = require(\"../protocols/Aws_json1_1\");\nconst middleware_serde_1 = require(\"@aws-sdk/middleware-serde\");\nconst smithy_client_1 = require(\"@aws-sdk/smithy-client\");\n/**\n * \n *

This action is only used by the Amazon ECS agent, and it is not intended for use outside of the agent.

\n *
\n *

Registers an EC2\n * \t\t\tinstance into the specified cluster. This instance becomes available to place containers\n * \t\t\ton.

\n * @example\n * Use a bare-bones client and the command you need to make an API call.\n * ```javascript\n * import { ECSClient, RegisterContainerInstanceCommand } from \"@aws-sdk/client-ecs\"; // ES Modules import\n * // const { ECSClient, RegisterContainerInstanceCommand } = require(\"@aws-sdk/client-ecs\"); // CommonJS import\n * const client = new ECSClient(config);\n * const command = new RegisterContainerInstanceCommand(input);\n * const response = await client.send(command);\n * ```\n *\n * @see {@link RegisterContainerInstanceCommandInput} for command's `input` shape.\n * @see {@link RegisterContainerInstanceCommandOutput} for command's `response` shape.\n * @see {@link ECSClientResolvedConfig | config} for command's `input` shape.\n *\n */\nclass RegisterContainerInstanceCommand extends smithy_client_1.Command {\n // Start section: command_properties\n // End section: command_properties\n constructor(input) {\n // Start section: command_constructor\n super();\n this.input = input;\n // End section: command_constructor\n }\n /**\n * @internal\n */\n resolveMiddleware(clientStack, configuration, options) {\n this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize));\n const stack = clientStack.concat(this.middlewareStack);\n const { logger } = configuration;\n const clientName = \"ECSClient\";\n const commandName = \"RegisterContainerInstanceCommand\";\n const handlerExecutionContext = {\n logger,\n clientName,\n commandName,\n inputFilterSensitiveLog: models_0_1.RegisterContainerInstanceRequest.filterSensitiveLog,\n outputFilterSensitiveLog: models_0_1.RegisterContainerInstanceResponse.filterSensitiveLog,\n };\n const { requestHandler } = configuration;\n return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);\n }\n serialize(input, context) {\n return Aws_json1_1_1.serializeAws_json1_1RegisterContainerInstanceCommand(input, context);\n }\n deserialize(output, context) {\n return Aws_json1_1_1.deserializeAws_json1_1RegisterContainerInstanceCommand(output, context);\n }\n}\nexports.RegisterContainerInstanceCommand = RegisterContainerInstanceCommand;\n//# sourceMappingURL=RegisterContainerInstanceCommand.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.RegisterTaskDefinitionCommand = void 0;\nconst models_0_1 = require(\"../models/models_0\");\nconst Aws_json1_1_1 = require(\"../protocols/Aws_json1_1\");\nconst middleware_serde_1 = require(\"@aws-sdk/middleware-serde\");\nconst smithy_client_1 = require(\"@aws-sdk/smithy-client\");\n/**\n *

Registers a new task definition from the supplied family and\n * \t\t\t\tcontainerDefinitions. Optionally, you can add data volumes to your\n * \t\t\tcontainers with the volumes parameter. For more information about task\n * \t\t\tdefinition parameters and defaults, see Amazon ECS Task\n * \t\t\t\tDefinitions in the Amazon Elastic Container Service Developer Guide.

\n * \t\t

You can specify an IAM role for your task with the taskRoleArn parameter.\n * \t\t\tWhen you specify an IAM role for a task, its containers can then use the latest versions\n * \t\t\tof the CLI or SDKs to make API requests to the Amazon Web Services services that are specified in\n * \t\t\tthe IAM policy associated with the role. For more information, see IAM\n * \t\t\t\tRoles for Tasks in the Amazon Elastic Container Service Developer Guide.

\n * \t\t

You can specify a Docker networking mode for the containers in your task definition\n * \t\t\twith the networkMode parameter. The available network modes correspond to\n * \t\t\tthose described in Network\n * \t\t\t\tsettings in the Docker run reference. If you specify the awsvpc\n * \t\t\tnetwork mode, the task is allocated an elastic network interface, and you must specify a\n * \t\t\t\tNetworkConfiguration when you create a service or run a task with\n * \t\t\tthe task definition. For more information, see Task Networking\n * \t\t\tin the Amazon Elastic Container Service Developer Guide.

\n * @example\n * Use a bare-bones client and the command you need to make an API call.\n * ```javascript\n * import { ECSClient, RegisterTaskDefinitionCommand } from \"@aws-sdk/client-ecs\"; // ES Modules import\n * // const { ECSClient, RegisterTaskDefinitionCommand } = require(\"@aws-sdk/client-ecs\"); // CommonJS import\n * const client = new ECSClient(config);\n * const command = new RegisterTaskDefinitionCommand(input);\n * const response = await client.send(command);\n * ```\n *\n * @see {@link RegisterTaskDefinitionCommandInput} for command's `input` shape.\n * @see {@link RegisterTaskDefinitionCommandOutput} for command's `response` shape.\n * @see {@link ECSClientResolvedConfig | config} for command's `input` shape.\n *\n */\nclass RegisterTaskDefinitionCommand extends smithy_client_1.Command {\n // Start section: command_properties\n // End section: command_properties\n constructor(input) {\n // Start section: command_constructor\n super();\n this.input = input;\n // End section: command_constructor\n }\n /**\n * @internal\n */\n resolveMiddleware(clientStack, configuration, options) {\n this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize));\n const stack = clientStack.concat(this.middlewareStack);\n const { logger } = configuration;\n const clientName = \"ECSClient\";\n const commandName = \"RegisterTaskDefinitionCommand\";\n const handlerExecutionContext = {\n logger,\n clientName,\n commandName,\n inputFilterSensitiveLog: models_0_1.RegisterTaskDefinitionRequest.filterSensitiveLog,\n outputFilterSensitiveLog: models_0_1.RegisterTaskDefinitionResponse.filterSensitiveLog,\n };\n const { requestHandler } = configuration;\n return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);\n }\n serialize(input, context) {\n return Aws_json1_1_1.serializeAws_json1_1RegisterTaskDefinitionCommand(input, context);\n }\n deserialize(output, context) {\n return Aws_json1_1_1.deserializeAws_json1_1RegisterTaskDefinitionCommand(output, context);\n }\n}\nexports.RegisterTaskDefinitionCommand = RegisterTaskDefinitionCommand;\n//# sourceMappingURL=RegisterTaskDefinitionCommand.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.RunTaskCommand = void 0;\nconst models_0_1 = require(\"../models/models_0\");\nconst Aws_json1_1_1 = require(\"../protocols/Aws_json1_1\");\nconst middleware_serde_1 = require(\"@aws-sdk/middleware-serde\");\nconst smithy_client_1 = require(\"@aws-sdk/smithy-client\");\n/**\n *

Starts a new task using the specified task definition.

\n * \t\t

You can allow Amazon ECS to place tasks for you, or you can customize how Amazon ECS places\n * \t\t\ttasks using placement constraints and placement strategies. For more information, see\n * \t\t\t\tScheduling Tasks in the\n * \t\t\t\tAmazon Elastic Container Service Developer Guide.

\n * \t\t

Alternatively, you can use StartTask to use your own scheduler or\n * \t\t\tplace tasks manually on specific container instances.

\n * \t\t

The Amazon ECS API follows an eventual consistency model, due to the distributed nature of\n * \t\t\tthe system supporting the API. This means that the result of an API command you run that\n * \t\t\taffects your Amazon ECS resources might not be immediately visible to all subsequent commands\n * \t\t\tyou run. Keep this in mind when you carry out an API command that immediately follows a\n * \t\t\tprevious API command.

\n * \t\t

To manage eventual consistency, you can do the following:

\n * \t\t \n * @example\n * Use a bare-bones client and the command you need to make an API call.\n * ```javascript\n * import { ECSClient, RunTaskCommand } from \"@aws-sdk/client-ecs\"; // ES Modules import\n * // const { ECSClient, RunTaskCommand } = require(\"@aws-sdk/client-ecs\"); // CommonJS import\n * const client = new ECSClient(config);\n * const command = new RunTaskCommand(input);\n * const response = await client.send(command);\n * ```\n *\n * @see {@link RunTaskCommandInput} for command's `input` shape.\n * @see {@link RunTaskCommandOutput} for command's `response` shape.\n * @see {@link ECSClientResolvedConfig | config} for command's `input` shape.\n *\n */\nclass RunTaskCommand extends smithy_client_1.Command {\n // Start section: command_properties\n // End section: command_properties\n constructor(input) {\n // Start section: command_constructor\n super();\n this.input = input;\n // End section: command_constructor\n }\n /**\n * @internal\n */\n resolveMiddleware(clientStack, configuration, options) {\n this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize));\n const stack = clientStack.concat(this.middlewareStack);\n const { logger } = configuration;\n const clientName = \"ECSClient\";\n const commandName = \"RunTaskCommand\";\n const handlerExecutionContext = {\n logger,\n clientName,\n commandName,\n inputFilterSensitiveLog: models_0_1.RunTaskRequest.filterSensitiveLog,\n outputFilterSensitiveLog: models_0_1.RunTaskResponse.filterSensitiveLog,\n };\n const { requestHandler } = configuration;\n return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);\n }\n serialize(input, context) {\n return Aws_json1_1_1.serializeAws_json1_1RunTaskCommand(input, context);\n }\n deserialize(output, context) {\n return Aws_json1_1_1.deserializeAws_json1_1RunTaskCommand(output, context);\n }\n}\nexports.RunTaskCommand = RunTaskCommand;\n//# sourceMappingURL=RunTaskCommand.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.StartTaskCommand = void 0;\nconst models_0_1 = require(\"../models/models_0\");\nconst Aws_json1_1_1 = require(\"../protocols/Aws_json1_1\");\nconst middleware_serde_1 = require(\"@aws-sdk/middleware-serde\");\nconst smithy_client_1 = require(\"@aws-sdk/smithy-client\");\n/**\n *

Starts a new task from the specified task definition on the specified container\n * \t\t\tinstance or instances.

\n * \t\t

Alternatively, you can use RunTask to place tasks for you. For more\n * \t\t\tinformation, see Scheduling Tasks in the\n * \t\t\t\tAmazon Elastic Container Service Developer Guide.

\n * @example\n * Use a bare-bones client and the command you need to make an API call.\n * ```javascript\n * import { ECSClient, StartTaskCommand } from \"@aws-sdk/client-ecs\"; // ES Modules import\n * // const { ECSClient, StartTaskCommand } = require(\"@aws-sdk/client-ecs\"); // CommonJS import\n * const client = new ECSClient(config);\n * const command = new StartTaskCommand(input);\n * const response = await client.send(command);\n * ```\n *\n * @see {@link StartTaskCommandInput} for command's `input` shape.\n * @see {@link StartTaskCommandOutput} for command's `response` shape.\n * @see {@link ECSClientResolvedConfig | config} for command's `input` shape.\n *\n */\nclass StartTaskCommand extends smithy_client_1.Command {\n // Start section: command_properties\n // End section: command_properties\n constructor(input) {\n // Start section: command_constructor\n super();\n this.input = input;\n // End section: command_constructor\n }\n /**\n * @internal\n */\n resolveMiddleware(clientStack, configuration, options) {\n this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize));\n const stack = clientStack.concat(this.middlewareStack);\n const { logger } = configuration;\n const clientName = \"ECSClient\";\n const commandName = \"StartTaskCommand\";\n const handlerExecutionContext = {\n logger,\n clientName,\n commandName,\n inputFilterSensitiveLog: models_0_1.StartTaskRequest.filterSensitiveLog,\n outputFilterSensitiveLog: models_0_1.StartTaskResponse.filterSensitiveLog,\n };\n const { requestHandler } = configuration;\n return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);\n }\n serialize(input, context) {\n return Aws_json1_1_1.serializeAws_json1_1StartTaskCommand(input, context);\n }\n deserialize(output, context) {\n return Aws_json1_1_1.deserializeAws_json1_1StartTaskCommand(output, context);\n }\n}\nexports.StartTaskCommand = StartTaskCommand;\n//# sourceMappingURL=StartTaskCommand.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.StopTaskCommand = void 0;\nconst models_0_1 = require(\"../models/models_0\");\nconst Aws_json1_1_1 = require(\"../protocols/Aws_json1_1\");\nconst middleware_serde_1 = require(\"@aws-sdk/middleware-serde\");\nconst smithy_client_1 = require(\"@aws-sdk/smithy-client\");\n/**\n *

Stops a running task. Any tags associated with the task will be deleted.

\n * \t\t

When StopTask is called on a task, the equivalent of docker\n * \t\t\t\tstop is issued to the containers running in the task. This results in a\n * \t\t\t\tSIGTERM value and a default 30-second timeout, after which the\n * \t\t\t\tSIGKILL value is sent and the containers are forcibly stopped. If the\n * \t\t\tcontainer handles the SIGTERM value gracefully and exits within 30 seconds\n * \t\t\tfrom receiving it, no SIGKILL value is sent.

\n * \t\t \n * \t\t\t

The default 30-second timeout can be configured on the Amazon ECS container agent with\n * \t\t\t\tthe ECS_CONTAINER_STOP_TIMEOUT variable. For more information, see\n * \t\t\t\t\tAmazon ECS Container Agent Configuration in the\n * \t\t\t\t\tAmazon Elastic Container Service Developer Guide.

\n * \t\t
\n * @example\n * Use a bare-bones client and the command you need to make an API call.\n * ```javascript\n * import { ECSClient, StopTaskCommand } from \"@aws-sdk/client-ecs\"; // ES Modules import\n * // const { ECSClient, StopTaskCommand } = require(\"@aws-sdk/client-ecs\"); // CommonJS import\n * const client = new ECSClient(config);\n * const command = new StopTaskCommand(input);\n * const response = await client.send(command);\n * ```\n *\n * @see {@link StopTaskCommandInput} for command's `input` shape.\n * @see {@link StopTaskCommandOutput} for command's `response` shape.\n * @see {@link ECSClientResolvedConfig | config} for command's `input` shape.\n *\n */\nclass StopTaskCommand extends smithy_client_1.Command {\n // Start section: command_properties\n // End section: command_properties\n constructor(input) {\n // Start section: command_constructor\n super();\n this.input = input;\n // End section: command_constructor\n }\n /**\n * @internal\n */\n resolveMiddleware(clientStack, configuration, options) {\n this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize));\n const stack = clientStack.concat(this.middlewareStack);\n const { logger } = configuration;\n const clientName = \"ECSClient\";\n const commandName = \"StopTaskCommand\";\n const handlerExecutionContext = {\n logger,\n clientName,\n commandName,\n inputFilterSensitiveLog: models_0_1.StopTaskRequest.filterSensitiveLog,\n outputFilterSensitiveLog: models_0_1.StopTaskResponse.filterSensitiveLog,\n };\n const { requestHandler } = configuration;\n return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);\n }\n serialize(input, context) {\n return Aws_json1_1_1.serializeAws_json1_1StopTaskCommand(input, context);\n }\n deserialize(output, context) {\n return Aws_json1_1_1.deserializeAws_json1_1StopTaskCommand(output, context);\n }\n}\nexports.StopTaskCommand = StopTaskCommand;\n//# sourceMappingURL=StopTaskCommand.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.SubmitAttachmentStateChangesCommand = void 0;\nconst models_0_1 = require(\"../models/models_0\");\nconst Aws_json1_1_1 = require(\"../protocols/Aws_json1_1\");\nconst middleware_serde_1 = require(\"@aws-sdk/middleware-serde\");\nconst smithy_client_1 = require(\"@aws-sdk/smithy-client\");\n/**\n * \n *

This action is only used by the Amazon ECS agent, and it is not intended for use outside of the agent.

\n *
\n *

Sent to\n * \t\t\tacknowledge that an attachment changed states.

\n * @example\n * Use a bare-bones client and the command you need to make an API call.\n * ```javascript\n * import { ECSClient, SubmitAttachmentStateChangesCommand } from \"@aws-sdk/client-ecs\"; // ES Modules import\n * // const { ECSClient, SubmitAttachmentStateChangesCommand } = require(\"@aws-sdk/client-ecs\"); // CommonJS import\n * const client = new ECSClient(config);\n * const command = new SubmitAttachmentStateChangesCommand(input);\n * const response = await client.send(command);\n * ```\n *\n * @see {@link SubmitAttachmentStateChangesCommandInput} for command's `input` shape.\n * @see {@link SubmitAttachmentStateChangesCommandOutput} for command's `response` shape.\n * @see {@link ECSClientResolvedConfig | config} for command's `input` shape.\n *\n */\nclass SubmitAttachmentStateChangesCommand extends smithy_client_1.Command {\n // Start section: command_properties\n // End section: command_properties\n constructor(input) {\n // Start section: command_constructor\n super();\n this.input = input;\n // End section: command_constructor\n }\n /**\n * @internal\n */\n resolveMiddleware(clientStack, configuration, options) {\n this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize));\n const stack = clientStack.concat(this.middlewareStack);\n const { logger } = configuration;\n const clientName = \"ECSClient\";\n const commandName = \"SubmitAttachmentStateChangesCommand\";\n const handlerExecutionContext = {\n logger,\n clientName,\n commandName,\n inputFilterSensitiveLog: models_0_1.SubmitAttachmentStateChangesRequest.filterSensitiveLog,\n outputFilterSensitiveLog: models_0_1.SubmitAttachmentStateChangesResponse.filterSensitiveLog,\n };\n const { requestHandler } = configuration;\n return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);\n }\n serialize(input, context) {\n return Aws_json1_1_1.serializeAws_json1_1SubmitAttachmentStateChangesCommand(input, context);\n }\n deserialize(output, context) {\n return Aws_json1_1_1.deserializeAws_json1_1SubmitAttachmentStateChangesCommand(output, context);\n }\n}\nexports.SubmitAttachmentStateChangesCommand = SubmitAttachmentStateChangesCommand;\n//# sourceMappingURL=SubmitAttachmentStateChangesCommand.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.SubmitContainerStateChangeCommand = void 0;\nconst models_0_1 = require(\"../models/models_0\");\nconst Aws_json1_1_1 = require(\"../protocols/Aws_json1_1\");\nconst middleware_serde_1 = require(\"@aws-sdk/middleware-serde\");\nconst smithy_client_1 = require(\"@aws-sdk/smithy-client\");\n/**\n * \n *

This action is only used by the Amazon ECS agent, and it is not intended for use outside of the agent.

\n *
\n *

Sent to\n * \t\t\tacknowledge that a container changed states.

\n * @example\n * Use a bare-bones client and the command you need to make an API call.\n * ```javascript\n * import { ECSClient, SubmitContainerStateChangeCommand } from \"@aws-sdk/client-ecs\"; // ES Modules import\n * // const { ECSClient, SubmitContainerStateChangeCommand } = require(\"@aws-sdk/client-ecs\"); // CommonJS import\n * const client = new ECSClient(config);\n * const command = new SubmitContainerStateChangeCommand(input);\n * const response = await client.send(command);\n * ```\n *\n * @see {@link SubmitContainerStateChangeCommandInput} for command's `input` shape.\n * @see {@link SubmitContainerStateChangeCommandOutput} for command's `response` shape.\n * @see {@link ECSClientResolvedConfig | config} for command's `input` shape.\n *\n */\nclass SubmitContainerStateChangeCommand extends smithy_client_1.Command {\n // Start section: command_properties\n // End section: command_properties\n constructor(input) {\n // Start section: command_constructor\n super();\n this.input = input;\n // End section: command_constructor\n }\n /**\n * @internal\n */\n resolveMiddleware(clientStack, configuration, options) {\n this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize));\n const stack = clientStack.concat(this.middlewareStack);\n const { logger } = configuration;\n const clientName = \"ECSClient\";\n const commandName = \"SubmitContainerStateChangeCommand\";\n const handlerExecutionContext = {\n logger,\n clientName,\n commandName,\n inputFilterSensitiveLog: models_0_1.SubmitContainerStateChangeRequest.filterSensitiveLog,\n outputFilterSensitiveLog: models_0_1.SubmitContainerStateChangeResponse.filterSensitiveLog,\n };\n const { requestHandler } = configuration;\n return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);\n }\n serialize(input, context) {\n return Aws_json1_1_1.serializeAws_json1_1SubmitContainerStateChangeCommand(input, context);\n }\n deserialize(output, context) {\n return Aws_json1_1_1.deserializeAws_json1_1SubmitContainerStateChangeCommand(output, context);\n }\n}\nexports.SubmitContainerStateChangeCommand = SubmitContainerStateChangeCommand;\n//# sourceMappingURL=SubmitContainerStateChangeCommand.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.SubmitTaskStateChangeCommand = void 0;\nconst models_0_1 = require(\"../models/models_0\");\nconst Aws_json1_1_1 = require(\"../protocols/Aws_json1_1\");\nconst middleware_serde_1 = require(\"@aws-sdk/middleware-serde\");\nconst smithy_client_1 = require(\"@aws-sdk/smithy-client\");\n/**\n * \n *

This action is only used by the Amazon ECS agent, and it is not intended for use outside of the agent.

\n *
\n *

Sent to acknowledge\n * \t\t\tthat a task changed states.

\n * @example\n * Use a bare-bones client and the command you need to make an API call.\n * ```javascript\n * import { ECSClient, SubmitTaskStateChangeCommand } from \"@aws-sdk/client-ecs\"; // ES Modules import\n * // const { ECSClient, SubmitTaskStateChangeCommand } = require(\"@aws-sdk/client-ecs\"); // CommonJS import\n * const client = new ECSClient(config);\n * const command = new SubmitTaskStateChangeCommand(input);\n * const response = await client.send(command);\n * ```\n *\n * @see {@link SubmitTaskStateChangeCommandInput} for command's `input` shape.\n * @see {@link SubmitTaskStateChangeCommandOutput} for command's `response` shape.\n * @see {@link ECSClientResolvedConfig | config} for command's `input` shape.\n *\n */\nclass SubmitTaskStateChangeCommand extends smithy_client_1.Command {\n // Start section: command_properties\n // End section: command_properties\n constructor(input) {\n // Start section: command_constructor\n super();\n this.input = input;\n // End section: command_constructor\n }\n /**\n * @internal\n */\n resolveMiddleware(clientStack, configuration, options) {\n this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize));\n const stack = clientStack.concat(this.middlewareStack);\n const { logger } = configuration;\n const clientName = \"ECSClient\";\n const commandName = \"SubmitTaskStateChangeCommand\";\n const handlerExecutionContext = {\n logger,\n clientName,\n commandName,\n inputFilterSensitiveLog: models_0_1.SubmitTaskStateChangeRequest.filterSensitiveLog,\n outputFilterSensitiveLog: models_0_1.SubmitTaskStateChangeResponse.filterSensitiveLog,\n };\n const { requestHandler } = configuration;\n return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);\n }\n serialize(input, context) {\n return Aws_json1_1_1.serializeAws_json1_1SubmitTaskStateChangeCommand(input, context);\n }\n deserialize(output, context) {\n return Aws_json1_1_1.deserializeAws_json1_1SubmitTaskStateChangeCommand(output, context);\n }\n}\nexports.SubmitTaskStateChangeCommand = SubmitTaskStateChangeCommand;\n//# sourceMappingURL=SubmitTaskStateChangeCommand.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.TagResourceCommand = void 0;\nconst models_0_1 = require(\"../models/models_0\");\nconst Aws_json1_1_1 = require(\"../protocols/Aws_json1_1\");\nconst middleware_serde_1 = require(\"@aws-sdk/middleware-serde\");\nconst smithy_client_1 = require(\"@aws-sdk/smithy-client\");\n/**\n *

Associates the specified tags to a resource with the specified\n * \t\t\t\tresourceArn. If existing tags on a resource are not specified in the\n * \t\t\trequest parameters, they are not changed. When a resource is deleted, the tags\n * \t\t\tassociated with that resource are deleted as well.

\n * @example\n * Use a bare-bones client and the command you need to make an API call.\n * ```javascript\n * import { ECSClient, TagResourceCommand } from \"@aws-sdk/client-ecs\"; // ES Modules import\n * // const { ECSClient, TagResourceCommand } = require(\"@aws-sdk/client-ecs\"); // CommonJS import\n * const client = new ECSClient(config);\n * const command = new TagResourceCommand(input);\n * const response = await client.send(command);\n * ```\n *\n * @see {@link TagResourceCommandInput} for command's `input` shape.\n * @see {@link TagResourceCommandOutput} for command's `response` shape.\n * @see {@link ECSClientResolvedConfig | config} for command's `input` shape.\n *\n */\nclass TagResourceCommand extends smithy_client_1.Command {\n // Start section: command_properties\n // End section: command_properties\n constructor(input) {\n // Start section: command_constructor\n super();\n this.input = input;\n // End section: command_constructor\n }\n /**\n * @internal\n */\n resolveMiddleware(clientStack, configuration, options) {\n this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize));\n const stack = clientStack.concat(this.middlewareStack);\n const { logger } = configuration;\n const clientName = \"ECSClient\";\n const commandName = \"TagResourceCommand\";\n const handlerExecutionContext = {\n logger,\n clientName,\n commandName,\n inputFilterSensitiveLog: models_0_1.TagResourceRequest.filterSensitiveLog,\n outputFilterSensitiveLog: models_0_1.TagResourceResponse.filterSensitiveLog,\n };\n const { requestHandler } = configuration;\n return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);\n }\n serialize(input, context) {\n return Aws_json1_1_1.serializeAws_json1_1TagResourceCommand(input, context);\n }\n deserialize(output, context) {\n return Aws_json1_1_1.deserializeAws_json1_1TagResourceCommand(output, context);\n }\n}\nexports.TagResourceCommand = TagResourceCommand;\n//# sourceMappingURL=TagResourceCommand.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.UntagResourceCommand = void 0;\nconst models_0_1 = require(\"../models/models_0\");\nconst Aws_json1_1_1 = require(\"../protocols/Aws_json1_1\");\nconst middleware_serde_1 = require(\"@aws-sdk/middleware-serde\");\nconst smithy_client_1 = require(\"@aws-sdk/smithy-client\");\n/**\n *

Deletes specified tags from a resource.

\n * @example\n * Use a bare-bones client and the command you need to make an API call.\n * ```javascript\n * import { ECSClient, UntagResourceCommand } from \"@aws-sdk/client-ecs\"; // ES Modules import\n * // const { ECSClient, UntagResourceCommand } = require(\"@aws-sdk/client-ecs\"); // CommonJS import\n * const client = new ECSClient(config);\n * const command = new UntagResourceCommand(input);\n * const response = await client.send(command);\n * ```\n *\n * @see {@link UntagResourceCommandInput} for command's `input` shape.\n * @see {@link UntagResourceCommandOutput} for command's `response` shape.\n * @see {@link ECSClientResolvedConfig | config} for command's `input` shape.\n *\n */\nclass UntagResourceCommand extends smithy_client_1.Command {\n // Start section: command_properties\n // End section: command_properties\n constructor(input) {\n // Start section: command_constructor\n super();\n this.input = input;\n // End section: command_constructor\n }\n /**\n * @internal\n */\n resolveMiddleware(clientStack, configuration, options) {\n this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize));\n const stack = clientStack.concat(this.middlewareStack);\n const { logger } = configuration;\n const clientName = \"ECSClient\";\n const commandName = \"UntagResourceCommand\";\n const handlerExecutionContext = {\n logger,\n clientName,\n commandName,\n inputFilterSensitiveLog: models_0_1.UntagResourceRequest.filterSensitiveLog,\n outputFilterSensitiveLog: models_0_1.UntagResourceResponse.filterSensitiveLog,\n };\n const { requestHandler } = configuration;\n return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);\n }\n serialize(input, context) {\n return Aws_json1_1_1.serializeAws_json1_1UntagResourceCommand(input, context);\n }\n deserialize(output, context) {\n return Aws_json1_1_1.deserializeAws_json1_1UntagResourceCommand(output, context);\n }\n}\nexports.UntagResourceCommand = UntagResourceCommand;\n//# sourceMappingURL=UntagResourceCommand.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.UpdateCapacityProviderCommand = void 0;\nconst models_0_1 = require(\"../models/models_0\");\nconst Aws_json1_1_1 = require(\"../protocols/Aws_json1_1\");\nconst middleware_serde_1 = require(\"@aws-sdk/middleware-serde\");\nconst smithy_client_1 = require(\"@aws-sdk/smithy-client\");\n/**\n *

Modifies the parameters for a capacity provider.

\n * @example\n * Use a bare-bones client and the command you need to make an API call.\n * ```javascript\n * import { ECSClient, UpdateCapacityProviderCommand } from \"@aws-sdk/client-ecs\"; // ES Modules import\n * // const { ECSClient, UpdateCapacityProviderCommand } = require(\"@aws-sdk/client-ecs\"); // CommonJS import\n * const client = new ECSClient(config);\n * const command = new UpdateCapacityProviderCommand(input);\n * const response = await client.send(command);\n * ```\n *\n * @see {@link UpdateCapacityProviderCommandInput} for command's `input` shape.\n * @see {@link UpdateCapacityProviderCommandOutput} for command's `response` shape.\n * @see {@link ECSClientResolvedConfig | config} for command's `input` shape.\n *\n */\nclass UpdateCapacityProviderCommand extends smithy_client_1.Command {\n // Start section: command_properties\n // End section: command_properties\n constructor(input) {\n // Start section: command_constructor\n super();\n this.input = input;\n // End section: command_constructor\n }\n /**\n * @internal\n */\n resolveMiddleware(clientStack, configuration, options) {\n this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize));\n const stack = clientStack.concat(this.middlewareStack);\n const { logger } = configuration;\n const clientName = \"ECSClient\";\n const commandName = \"UpdateCapacityProviderCommand\";\n const handlerExecutionContext = {\n logger,\n clientName,\n commandName,\n inputFilterSensitiveLog: models_0_1.UpdateCapacityProviderRequest.filterSensitiveLog,\n outputFilterSensitiveLog: models_0_1.UpdateCapacityProviderResponse.filterSensitiveLog,\n };\n const { requestHandler } = configuration;\n return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);\n }\n serialize(input, context) {\n return Aws_json1_1_1.serializeAws_json1_1UpdateCapacityProviderCommand(input, context);\n }\n deserialize(output, context) {\n return Aws_json1_1_1.deserializeAws_json1_1UpdateCapacityProviderCommand(output, context);\n }\n}\nexports.UpdateCapacityProviderCommand = UpdateCapacityProviderCommand;\n//# sourceMappingURL=UpdateCapacityProviderCommand.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.UpdateClusterCommand = void 0;\nconst models_0_1 = require(\"../models/models_0\");\nconst Aws_json1_1_1 = require(\"../protocols/Aws_json1_1\");\nconst middleware_serde_1 = require(\"@aws-sdk/middleware-serde\");\nconst smithy_client_1 = require(\"@aws-sdk/smithy-client\");\n/**\n *

Updates the cluster.

\n * @example\n * Use a bare-bones client and the command you need to make an API call.\n * ```javascript\n * import { ECSClient, UpdateClusterCommand } from \"@aws-sdk/client-ecs\"; // ES Modules import\n * // const { ECSClient, UpdateClusterCommand } = require(\"@aws-sdk/client-ecs\"); // CommonJS import\n * const client = new ECSClient(config);\n * const command = new UpdateClusterCommand(input);\n * const response = await client.send(command);\n * ```\n *\n * @see {@link UpdateClusterCommandInput} for command's `input` shape.\n * @see {@link UpdateClusterCommandOutput} for command's `response` shape.\n * @see {@link ECSClientResolvedConfig | config} for command's `input` shape.\n *\n */\nclass UpdateClusterCommand extends smithy_client_1.Command {\n // Start section: command_properties\n // End section: command_properties\n constructor(input) {\n // Start section: command_constructor\n super();\n this.input = input;\n // End section: command_constructor\n }\n /**\n * @internal\n */\n resolveMiddleware(clientStack, configuration, options) {\n this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize));\n const stack = clientStack.concat(this.middlewareStack);\n const { logger } = configuration;\n const clientName = \"ECSClient\";\n const commandName = \"UpdateClusterCommand\";\n const handlerExecutionContext = {\n logger,\n clientName,\n commandName,\n inputFilterSensitiveLog: models_0_1.UpdateClusterRequest.filterSensitiveLog,\n outputFilterSensitiveLog: models_0_1.UpdateClusterResponse.filterSensitiveLog,\n };\n const { requestHandler } = configuration;\n return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);\n }\n serialize(input, context) {\n return Aws_json1_1_1.serializeAws_json1_1UpdateClusterCommand(input, context);\n }\n deserialize(output, context) {\n return Aws_json1_1_1.deserializeAws_json1_1UpdateClusterCommand(output, context);\n }\n}\nexports.UpdateClusterCommand = UpdateClusterCommand;\n//# sourceMappingURL=UpdateClusterCommand.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.UpdateClusterSettingsCommand = void 0;\nconst models_0_1 = require(\"../models/models_0\");\nconst Aws_json1_1_1 = require(\"../protocols/Aws_json1_1\");\nconst middleware_serde_1 = require(\"@aws-sdk/middleware-serde\");\nconst smithy_client_1 = require(\"@aws-sdk/smithy-client\");\n/**\n *

Modifies the settings to use for a cluster.

\n * @example\n * Use a bare-bones client and the command you need to make an API call.\n * ```javascript\n * import { ECSClient, UpdateClusterSettingsCommand } from \"@aws-sdk/client-ecs\"; // ES Modules import\n * // const { ECSClient, UpdateClusterSettingsCommand } = require(\"@aws-sdk/client-ecs\"); // CommonJS import\n * const client = new ECSClient(config);\n * const command = new UpdateClusterSettingsCommand(input);\n * const response = await client.send(command);\n * ```\n *\n * @see {@link UpdateClusterSettingsCommandInput} for command's `input` shape.\n * @see {@link UpdateClusterSettingsCommandOutput} for command's `response` shape.\n * @see {@link ECSClientResolvedConfig | config} for command's `input` shape.\n *\n */\nclass UpdateClusterSettingsCommand extends smithy_client_1.Command {\n // Start section: command_properties\n // End section: command_properties\n constructor(input) {\n // Start section: command_constructor\n super();\n this.input = input;\n // End section: command_constructor\n }\n /**\n * @internal\n */\n resolveMiddleware(clientStack, configuration, options) {\n this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize));\n const stack = clientStack.concat(this.middlewareStack);\n const { logger } = configuration;\n const clientName = \"ECSClient\";\n const commandName = \"UpdateClusterSettingsCommand\";\n const handlerExecutionContext = {\n logger,\n clientName,\n commandName,\n inputFilterSensitiveLog: models_0_1.UpdateClusterSettingsRequest.filterSensitiveLog,\n outputFilterSensitiveLog: models_0_1.UpdateClusterSettingsResponse.filterSensitiveLog,\n };\n const { requestHandler } = configuration;\n return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);\n }\n serialize(input, context) {\n return Aws_json1_1_1.serializeAws_json1_1UpdateClusterSettingsCommand(input, context);\n }\n deserialize(output, context) {\n return Aws_json1_1_1.deserializeAws_json1_1UpdateClusterSettingsCommand(output, context);\n }\n}\nexports.UpdateClusterSettingsCommand = UpdateClusterSettingsCommand;\n//# sourceMappingURL=UpdateClusterSettingsCommand.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.UpdateContainerAgentCommand = void 0;\nconst models_0_1 = require(\"../models/models_0\");\nconst Aws_json1_1_1 = require(\"../protocols/Aws_json1_1\");\nconst middleware_serde_1 = require(\"@aws-sdk/middleware-serde\");\nconst smithy_client_1 = require(\"@aws-sdk/smithy-client\");\n/**\n *

Updates the Amazon ECS container agent on a specified container instance. Updating the\n * \t\t\tAmazon ECS container agent does not interrupt running tasks or services on the container\n * \t\t\tinstance. The process for updating the agent differs depending on whether your container\n * \t\t\tinstance was launched with the Amazon ECS-optimized AMI or another operating system.

\n * \t\t \n * \t\t\t

The UpdateContainerAgent API isn't supported for container instances\n * \t\t\t\tusing the Amazon ECS-optimized Amazon Linux 2 (arm64) AMI. To update the container agent,\n * \t\t\t\tyou can update the ecs-init package which will update the agent. For\n * \t\t\t\tmore information, see Updating the\n * \t\t\t\t\tAmazon ECS container agent in the\n * \t\t\t\tAmazon Elastic Container Service Developer Guide.

\n * \t\t
\n * \t\t

The UpdateContainerAgent API requires an Amazon ECS-optimized AMI or Amazon\n * \t\t\tLinux AMI with the ecs-init service installed and running. For help\n * \t\t\tupdating the Amazon ECS container agent on other operating systems, see Manually updating the Amazon ECS container agent in the\n * \t\t\t\tAmazon Elastic Container Service Developer Guide.

\n * @example\n * Use a bare-bones client and the command you need to make an API call.\n * ```javascript\n * import { ECSClient, UpdateContainerAgentCommand } from \"@aws-sdk/client-ecs\"; // ES Modules import\n * // const { ECSClient, UpdateContainerAgentCommand } = require(\"@aws-sdk/client-ecs\"); // CommonJS import\n * const client = new ECSClient(config);\n * const command = new UpdateContainerAgentCommand(input);\n * const response = await client.send(command);\n * ```\n *\n * @see {@link UpdateContainerAgentCommandInput} for command's `input` shape.\n * @see {@link UpdateContainerAgentCommandOutput} for command's `response` shape.\n * @see {@link ECSClientResolvedConfig | config} for command's `input` shape.\n *\n */\nclass UpdateContainerAgentCommand extends smithy_client_1.Command {\n // Start section: command_properties\n // End section: command_properties\n constructor(input) {\n // Start section: command_constructor\n super();\n this.input = input;\n // End section: command_constructor\n }\n /**\n * @internal\n */\n resolveMiddleware(clientStack, configuration, options) {\n this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize));\n const stack = clientStack.concat(this.middlewareStack);\n const { logger } = configuration;\n const clientName = \"ECSClient\";\n const commandName = \"UpdateContainerAgentCommand\";\n const handlerExecutionContext = {\n logger,\n clientName,\n commandName,\n inputFilterSensitiveLog: models_0_1.UpdateContainerAgentRequest.filterSensitiveLog,\n outputFilterSensitiveLog: models_0_1.UpdateContainerAgentResponse.filterSensitiveLog,\n };\n const { requestHandler } = configuration;\n return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);\n }\n serialize(input, context) {\n return Aws_json1_1_1.serializeAws_json1_1UpdateContainerAgentCommand(input, context);\n }\n deserialize(output, context) {\n return Aws_json1_1_1.deserializeAws_json1_1UpdateContainerAgentCommand(output, context);\n }\n}\nexports.UpdateContainerAgentCommand = UpdateContainerAgentCommand;\n//# sourceMappingURL=UpdateContainerAgentCommand.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.UpdateContainerInstancesStateCommand = void 0;\nconst models_0_1 = require(\"../models/models_0\");\nconst Aws_json1_1_1 = require(\"../protocols/Aws_json1_1\");\nconst middleware_serde_1 = require(\"@aws-sdk/middleware-serde\");\nconst smithy_client_1 = require(\"@aws-sdk/smithy-client\");\n/**\n *

Modifies the status of an Amazon ECS container instance.

\n * \t\t

Once a container instance has reached an ACTIVE state, you can change the\n * \t\t\tstatus of a container instance to DRAINING to manually remove an instance\n * \t\t\tfrom a cluster, for example to perform system updates, update the Docker daemon, or\n * \t\t\tscale down the cluster size.

\n * \t\t \n * \t\t\t

A container instance cannot be changed to DRAINING until it has\n * \t\t\t\treached an ACTIVE status. If the instance is in any other status, an\n * \t\t\t\terror will be received.

\n * \t\t
\n * \t\t

When you set a container instance to DRAINING, Amazon ECS prevents new tasks\n * \t\t\tfrom being scheduled for placement on the container instance and replacement service\n * \t\t\ttasks are started on other container instances in the cluster if the resources are\n * \t\t\tavailable. Service tasks on the container instance that are in the PENDING\n * \t\t\tstate are stopped immediately.

\n * \t\t

Service tasks on the container instance that are in the RUNNING state are\n * \t\t\tstopped and replaced according to the service's deployment configuration parameters,\n * \t\t\t\tminimumHealthyPercent and maximumPercent. You can change\n * \t\t\tthe deployment configuration of your service using UpdateService.

\n * \t\t \n * \t\t

Any PENDING or RUNNING tasks that do not belong to a service\n * \t\t\tare not affected. You must wait for them to finish or stop them manually.

\n * \t\t

A container instance has completed draining when it has no more RUNNING\n * \t\t\ttasks. You can verify this using ListTasks.

\n * \t\t

When a container instance has been drained, you can set a container instance to\n * \t\t\t\tACTIVE status and once it has reached that status the Amazon ECS scheduler\n * \t\t\tcan begin scheduling tasks on the instance again.

\n * @example\n * Use a bare-bones client and the command you need to make an API call.\n * ```javascript\n * import { ECSClient, UpdateContainerInstancesStateCommand } from \"@aws-sdk/client-ecs\"; // ES Modules import\n * // const { ECSClient, UpdateContainerInstancesStateCommand } = require(\"@aws-sdk/client-ecs\"); // CommonJS import\n * const client = new ECSClient(config);\n * const command = new UpdateContainerInstancesStateCommand(input);\n * const response = await client.send(command);\n * ```\n *\n * @see {@link UpdateContainerInstancesStateCommandInput} for command's `input` shape.\n * @see {@link UpdateContainerInstancesStateCommandOutput} for command's `response` shape.\n * @see {@link ECSClientResolvedConfig | config} for command's `input` shape.\n *\n */\nclass UpdateContainerInstancesStateCommand extends smithy_client_1.Command {\n // Start section: command_properties\n // End section: command_properties\n constructor(input) {\n // Start section: command_constructor\n super();\n this.input = input;\n // End section: command_constructor\n }\n /**\n * @internal\n */\n resolveMiddleware(clientStack, configuration, options) {\n this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize));\n const stack = clientStack.concat(this.middlewareStack);\n const { logger } = configuration;\n const clientName = \"ECSClient\";\n const commandName = \"UpdateContainerInstancesStateCommand\";\n const handlerExecutionContext = {\n logger,\n clientName,\n commandName,\n inputFilterSensitiveLog: models_0_1.UpdateContainerInstancesStateRequest.filterSensitiveLog,\n outputFilterSensitiveLog: models_0_1.UpdateContainerInstancesStateResponse.filterSensitiveLog,\n };\n const { requestHandler } = configuration;\n return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);\n }\n serialize(input, context) {\n return Aws_json1_1_1.serializeAws_json1_1UpdateContainerInstancesStateCommand(input, context);\n }\n deserialize(output, context) {\n return Aws_json1_1_1.deserializeAws_json1_1UpdateContainerInstancesStateCommand(output, context);\n }\n}\nexports.UpdateContainerInstancesStateCommand = UpdateContainerInstancesStateCommand;\n//# sourceMappingURL=UpdateContainerInstancesStateCommand.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.UpdateServiceCommand = void 0;\nconst models_0_1 = require(\"../models/models_0\");\nconst Aws_json1_1_1 = require(\"../protocols/Aws_json1_1\");\nconst middleware_serde_1 = require(\"@aws-sdk/middleware-serde\");\nconst smithy_client_1 = require(\"@aws-sdk/smithy-client\");\n/**\n * \n * \t\t\t

Updating the task placement strategies and constraints on an Amazon ECS service remains\n * \t\t\t\tin preview and is a Beta Service as defined by and subject to the Beta Service\n * \t\t\t\tParticipation Service Terms located at https://aws.amazon.com/service-terms (\"Beta Terms\"). These Beta Terms\n * \t\t\t\tapply to your participation in this preview.

\n * \t\t
\n * \t\t

Modifies the parameters of a service.

\n * \t\t

For services using the rolling update (ECS) deployment controller, the\n * \t\t\tdesired count, deployment configuration, network configuration, task placement\n * \t\t\tconstraints and strategies, or task definition used can be updated.

\n * \t\t

For services using the blue/green (CODE_DEPLOY) deployment controller,\n * \t\t\tonly the desired count, deployment configuration, task placement constraints and\n * \t\t\tstrategies, and health check grace period can be updated using this API. If the network\n * \t\t\tconfiguration, platform version, or task definition need to be updated, a new CodeDeploy\n * \t\t\tdeployment should be created. For more information, see CreateDeployment in the CodeDeploy API Reference.

\n * \t\t

For services using an external deployment controller, you can update only the desired\n * \t\t\tcount, task placement constraints and strategies, and health check grace period using\n * \t\t\tthis API. If the launch type, load balancer, network configuration, platform version, or\n * \t\t\ttask definition need to be updated, you should create a new task set. For more\n * \t\t\tinformation, see CreateTaskSet.

\n * \t\t

You can add to or subtract from the number of instantiations of a task definition in a\n * \t\t\tservice by specifying the cluster that the service is running in and a new\n * \t\t\t\tdesiredCount parameter.

\n * \t\t

If you have updated the Docker image of your application, you can create a new task\n * \t\t\tdefinition with that image and deploy it to your service. The service scheduler uses the\n * \t\t\tminimum healthy percent and maximum percent parameters (in the service's deployment\n * \t\t\tconfiguration) to determine the deployment strategy.

\n * \t\t \n * \t\t\t

If your updated Docker image uses the same tag as what is in the existing task\n * \t\t\t\tdefinition for your service (for example, my_image:latest), you do not\n * \t\t\t\tneed to create a new revision of your task definition. You can update the service\n * \t\t\t\tusing the forceNewDeployment option. The new tasks launched by the\n * \t\t\t\tdeployment pull the current image/tag combination from your repository when they\n * \t\t\t\tstart.

\n * \t\t
\n * \t\t

You can also update the deployment configuration of a service. When a deployment is\n * \t\t\ttriggered by updating the task definition of a service, the service scheduler uses the\n * \t\t\tdeployment configuration parameters, minimumHealthyPercent and\n * \t\t\t\tmaximumPercent, to determine the deployment strategy.

\n * \t\t \n * \t\t

When UpdateService stops a task during a deployment, the equivalent\n * \t\t\tof docker stop is issued to the containers running in the task. This\n * \t\t\tresults in a SIGTERM and a 30-second timeout, after which\n * \t\t\t\tSIGKILL is sent and the containers are forcibly stopped. If the\n * \t\t\tcontainer handles the SIGTERM gracefully and exits within 30 seconds from\n * \t\t\treceiving it, no SIGKILL is sent.

\n * \t\t

When the service scheduler launches new tasks, it determines task placement in your\n * \t\t\tcluster with the following logic:

\n * \t\t \n * \t\t

When the service scheduler stops running tasks, it attempts to maintain balance across\n * \t\t\tthe Availability Zones in your cluster using the following logic:

\n * \t\t \n * @example\n * Use a bare-bones client and the command you need to make an API call.\n * ```javascript\n * import { ECSClient, UpdateServiceCommand } from \"@aws-sdk/client-ecs\"; // ES Modules import\n * // const { ECSClient, UpdateServiceCommand } = require(\"@aws-sdk/client-ecs\"); // CommonJS import\n * const client = new ECSClient(config);\n * const command = new UpdateServiceCommand(input);\n * const response = await client.send(command);\n * ```\n *\n * @see {@link UpdateServiceCommandInput} for command's `input` shape.\n * @see {@link UpdateServiceCommandOutput} for command's `response` shape.\n * @see {@link ECSClientResolvedConfig | config} for command's `input` shape.\n *\n */\nclass UpdateServiceCommand extends smithy_client_1.Command {\n // Start section: command_properties\n // End section: command_properties\n constructor(input) {\n // Start section: command_constructor\n super();\n this.input = input;\n // End section: command_constructor\n }\n /**\n * @internal\n */\n resolveMiddleware(clientStack, configuration, options) {\n this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize));\n const stack = clientStack.concat(this.middlewareStack);\n const { logger } = configuration;\n const clientName = \"ECSClient\";\n const commandName = \"UpdateServiceCommand\";\n const handlerExecutionContext = {\n logger,\n clientName,\n commandName,\n inputFilterSensitiveLog: models_0_1.UpdateServiceRequest.filterSensitiveLog,\n outputFilterSensitiveLog: models_0_1.UpdateServiceResponse.filterSensitiveLog,\n };\n const { requestHandler } = configuration;\n return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);\n }\n serialize(input, context) {\n return Aws_json1_1_1.serializeAws_json1_1UpdateServiceCommand(input, context);\n }\n deserialize(output, context) {\n return Aws_json1_1_1.deserializeAws_json1_1UpdateServiceCommand(output, context);\n }\n}\nexports.UpdateServiceCommand = UpdateServiceCommand;\n//# sourceMappingURL=UpdateServiceCommand.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.UpdateServicePrimaryTaskSetCommand = void 0;\nconst models_0_1 = require(\"../models/models_0\");\nconst Aws_json1_1_1 = require(\"../protocols/Aws_json1_1\");\nconst middleware_serde_1 = require(\"@aws-sdk/middleware-serde\");\nconst smithy_client_1 = require(\"@aws-sdk/smithy-client\");\n/**\n *

Modifies which task set in a service is the primary task set. Any parameters that are\n * \t\t\tupdated on the primary task set in a service will transition to the service. This is\n * \t\t\tused when a service uses the EXTERNAL deployment controller type. For more\n * \t\t\tinformation, see Amazon ECS Deployment\n * \t\t\t\tTypes in the Amazon Elastic Container Service Developer Guide.

\n * @example\n * Use a bare-bones client and the command you need to make an API call.\n * ```javascript\n * import { ECSClient, UpdateServicePrimaryTaskSetCommand } from \"@aws-sdk/client-ecs\"; // ES Modules import\n * // const { ECSClient, UpdateServicePrimaryTaskSetCommand } = require(\"@aws-sdk/client-ecs\"); // CommonJS import\n * const client = new ECSClient(config);\n * const command = new UpdateServicePrimaryTaskSetCommand(input);\n * const response = await client.send(command);\n * ```\n *\n * @see {@link UpdateServicePrimaryTaskSetCommandInput} for command's `input` shape.\n * @see {@link UpdateServicePrimaryTaskSetCommandOutput} for command's `response` shape.\n * @see {@link ECSClientResolvedConfig | config} for command's `input` shape.\n *\n */\nclass UpdateServicePrimaryTaskSetCommand extends smithy_client_1.Command {\n // Start section: command_properties\n // End section: command_properties\n constructor(input) {\n // Start section: command_constructor\n super();\n this.input = input;\n // End section: command_constructor\n }\n /**\n * @internal\n */\n resolveMiddleware(clientStack, configuration, options) {\n this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize));\n const stack = clientStack.concat(this.middlewareStack);\n const { logger } = configuration;\n const clientName = \"ECSClient\";\n const commandName = \"UpdateServicePrimaryTaskSetCommand\";\n const handlerExecutionContext = {\n logger,\n clientName,\n commandName,\n inputFilterSensitiveLog: models_0_1.UpdateServicePrimaryTaskSetRequest.filterSensitiveLog,\n outputFilterSensitiveLog: models_0_1.UpdateServicePrimaryTaskSetResponse.filterSensitiveLog,\n };\n const { requestHandler } = configuration;\n return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);\n }\n serialize(input, context) {\n return Aws_json1_1_1.serializeAws_json1_1UpdateServicePrimaryTaskSetCommand(input, context);\n }\n deserialize(output, context) {\n return Aws_json1_1_1.deserializeAws_json1_1UpdateServicePrimaryTaskSetCommand(output, context);\n }\n}\nexports.UpdateServicePrimaryTaskSetCommand = UpdateServicePrimaryTaskSetCommand;\n//# sourceMappingURL=UpdateServicePrimaryTaskSetCommand.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.UpdateTaskSetCommand = void 0;\nconst models_0_1 = require(\"../models/models_0\");\nconst Aws_json1_1_1 = require(\"../protocols/Aws_json1_1\");\nconst middleware_serde_1 = require(\"@aws-sdk/middleware-serde\");\nconst smithy_client_1 = require(\"@aws-sdk/smithy-client\");\n/**\n *

Modifies a task set. This is used when a service uses the EXTERNAL\n * \t\t\tdeployment controller type. For more information, see Amazon ECS Deployment\n * \t\t\t\tTypes in the Amazon Elastic Container Service Developer Guide.

\n * @example\n * Use a bare-bones client and the command you need to make an API call.\n * ```javascript\n * import { ECSClient, UpdateTaskSetCommand } from \"@aws-sdk/client-ecs\"; // ES Modules import\n * // const { ECSClient, UpdateTaskSetCommand } = require(\"@aws-sdk/client-ecs\"); // CommonJS import\n * const client = new ECSClient(config);\n * const command = new UpdateTaskSetCommand(input);\n * const response = await client.send(command);\n * ```\n *\n * @see {@link UpdateTaskSetCommandInput} for command's `input` shape.\n * @see {@link UpdateTaskSetCommandOutput} for command's `response` shape.\n * @see {@link ECSClientResolvedConfig | config} for command's `input` shape.\n *\n */\nclass UpdateTaskSetCommand extends smithy_client_1.Command {\n // Start section: command_properties\n // End section: command_properties\n constructor(input) {\n // Start section: command_constructor\n super();\n this.input = input;\n // End section: command_constructor\n }\n /**\n * @internal\n */\n resolveMiddleware(clientStack, configuration, options) {\n this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize));\n const stack = clientStack.concat(this.middlewareStack);\n const { logger } = configuration;\n const clientName = \"ECSClient\";\n const commandName = \"UpdateTaskSetCommand\";\n const handlerExecutionContext = {\n logger,\n clientName,\n commandName,\n inputFilterSensitiveLog: models_0_1.UpdateTaskSetRequest.filterSensitiveLog,\n outputFilterSensitiveLog: models_0_1.UpdateTaskSetResponse.filterSensitiveLog,\n };\n const { requestHandler } = configuration;\n return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);\n }\n serialize(input, context) {\n return Aws_json1_1_1.serializeAws_json1_1UpdateTaskSetCommand(input, context);\n }\n deserialize(output, context) {\n return Aws_json1_1_1.deserializeAws_json1_1UpdateTaskSetCommand(output, context);\n }\n}\nexports.UpdateTaskSetCommand = UpdateTaskSetCommand;\n//# sourceMappingURL=UpdateTaskSetCommand.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.defaultRegionInfoProvider = void 0;\nconst config_resolver_1 = require(\"@aws-sdk/config-resolver\");\nconst regionHash = {\n \"fips-us-east-1\": {\n hostname: \"ecs-fips.us-east-1.amazonaws.com\",\n signingRegion: \"us-east-1\",\n },\n \"fips-us-east-2\": {\n hostname: \"ecs-fips.us-east-2.amazonaws.com\",\n signingRegion: \"us-east-2\",\n },\n \"fips-us-gov-east-1\": {\n hostname: \"ecs-fips.us-gov-east-1.amazonaws.com\",\n signingRegion: \"us-gov-east-1\",\n },\n \"fips-us-gov-west-1\": {\n hostname: \"ecs-fips.us-gov-west-1.amazonaws.com\",\n signingRegion: \"us-gov-west-1\",\n },\n \"fips-us-west-1\": {\n hostname: \"ecs-fips.us-west-1.amazonaws.com\",\n signingRegion: \"us-west-1\",\n },\n \"fips-us-west-2\": {\n hostname: \"ecs-fips.us-west-2.amazonaws.com\",\n signingRegion: \"us-west-2\",\n },\n};\nconst partitionHash = {\n aws: {\n regions: [\n \"af-south-1\",\n \"ap-east-1\",\n \"ap-northeast-1\",\n \"ap-northeast-2\",\n \"ap-northeast-3\",\n \"ap-south-1\",\n \"ap-southeast-1\",\n \"ap-southeast-2\",\n \"ca-central-1\",\n \"eu-central-1\",\n \"eu-north-1\",\n \"eu-south-1\",\n \"eu-west-1\",\n \"eu-west-2\",\n \"eu-west-3\",\n \"fips-us-east-1\",\n \"fips-us-east-2\",\n \"fips-us-west-1\",\n \"fips-us-west-2\",\n \"me-south-1\",\n \"sa-east-1\",\n \"us-east-1\",\n \"us-east-2\",\n \"us-west-1\",\n \"us-west-2\",\n ],\n hostname: \"ecs.{region}.amazonaws.com\",\n },\n \"aws-cn\": {\n regions: [\"cn-north-1\", \"cn-northwest-1\"],\n hostname: \"ecs.{region}.amazonaws.com.cn\",\n },\n \"aws-iso\": {\n regions: [\"us-iso-east-1\"],\n hostname: \"ecs.{region}.c2s.ic.gov\",\n },\n \"aws-iso-b\": {\n regions: [\"us-isob-east-1\"],\n hostname: \"ecs.{region}.sc2s.sgov.gov\",\n },\n \"aws-us-gov\": {\n regions: [\"fips-us-gov-east-1\", \"fips-us-gov-west-1\", \"us-gov-east-1\", \"us-gov-west-1\"],\n hostname: \"ecs.{region}.amazonaws.com\",\n },\n};\nconst defaultRegionInfoProvider = async (region, options) => config_resolver_1.getRegionInfo(region, {\n ...options,\n signingService: \"ecs\",\n regionHash,\n partitionHash,\n});\nexports.defaultRegionInfoProvider = defaultRegionInfoProvider;\n//# sourceMappingURL=endpoints.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst tslib_1 = require(\"tslib\");\ntslib_1.__exportStar(require(\"./ECSClient\"), exports);\ntslib_1.__exportStar(require(\"./ECS\"), exports);\ntslib_1.__exportStar(require(\"./commands/CreateCapacityProviderCommand\"), exports);\ntslib_1.__exportStar(require(\"./commands/CreateClusterCommand\"), exports);\ntslib_1.__exportStar(require(\"./commands/CreateServiceCommand\"), exports);\ntslib_1.__exportStar(require(\"./commands/CreateTaskSetCommand\"), exports);\ntslib_1.__exportStar(require(\"./commands/DeleteAccountSettingCommand\"), exports);\ntslib_1.__exportStar(require(\"./commands/DeleteAttributesCommand\"), exports);\ntslib_1.__exportStar(require(\"./commands/DeleteCapacityProviderCommand\"), exports);\ntslib_1.__exportStar(require(\"./commands/DeleteClusterCommand\"), exports);\ntslib_1.__exportStar(require(\"./commands/DeleteServiceCommand\"), exports);\ntslib_1.__exportStar(require(\"./commands/DeleteTaskSetCommand\"), exports);\ntslib_1.__exportStar(require(\"./commands/DeregisterContainerInstanceCommand\"), exports);\ntslib_1.__exportStar(require(\"./commands/DeregisterTaskDefinitionCommand\"), exports);\ntslib_1.__exportStar(require(\"./commands/DescribeCapacityProvidersCommand\"), exports);\ntslib_1.__exportStar(require(\"./commands/DescribeClustersCommand\"), exports);\ntslib_1.__exportStar(require(\"./commands/DescribeContainerInstancesCommand\"), exports);\ntslib_1.__exportStar(require(\"./commands/DescribeServicesCommand\"), exports);\ntslib_1.__exportStar(require(\"./waiters/waitForServicesInactive\"), exports);\ntslib_1.__exportStar(require(\"./commands/DescribeTaskDefinitionCommand\"), exports);\ntslib_1.__exportStar(require(\"./commands/DescribeTasksCommand\"), exports);\ntslib_1.__exportStar(require(\"./waiters/waitForTasksRunning\"), exports);\ntslib_1.__exportStar(require(\"./waiters/waitForTasksStopped\"), exports);\ntslib_1.__exportStar(require(\"./commands/DescribeTaskSetsCommand\"), exports);\ntslib_1.__exportStar(require(\"./commands/DiscoverPollEndpointCommand\"), exports);\ntslib_1.__exportStar(require(\"./commands/ExecuteCommandCommand\"), exports);\ntslib_1.__exportStar(require(\"./commands/ListAccountSettingsCommand\"), exports);\ntslib_1.__exportStar(require(\"./pagination/ListAccountSettingsPaginator\"), exports);\ntslib_1.__exportStar(require(\"./commands/ListAttributesCommand\"), exports);\ntslib_1.__exportStar(require(\"./pagination/ListAttributesPaginator\"), exports);\ntslib_1.__exportStar(require(\"./commands/ListClustersCommand\"), exports);\ntslib_1.__exportStar(require(\"./pagination/ListClustersPaginator\"), exports);\ntslib_1.__exportStar(require(\"./commands/ListContainerInstancesCommand\"), exports);\ntslib_1.__exportStar(require(\"./pagination/ListContainerInstancesPaginator\"), exports);\ntslib_1.__exportStar(require(\"./commands/ListServicesCommand\"), exports);\ntslib_1.__exportStar(require(\"./pagination/ListServicesPaginator\"), exports);\ntslib_1.__exportStar(require(\"./commands/ListTagsForResourceCommand\"), exports);\ntslib_1.__exportStar(require(\"./commands/ListTaskDefinitionFamiliesCommand\"), exports);\ntslib_1.__exportStar(require(\"./pagination/ListTaskDefinitionFamiliesPaginator\"), exports);\ntslib_1.__exportStar(require(\"./commands/ListTaskDefinitionsCommand\"), exports);\ntslib_1.__exportStar(require(\"./pagination/ListTaskDefinitionsPaginator\"), exports);\ntslib_1.__exportStar(require(\"./commands/ListTasksCommand\"), exports);\ntslib_1.__exportStar(require(\"./pagination/ListTasksPaginator\"), exports);\ntslib_1.__exportStar(require(\"./commands/PutAccountSettingCommand\"), exports);\ntslib_1.__exportStar(require(\"./commands/PutAccountSettingDefaultCommand\"), exports);\ntslib_1.__exportStar(require(\"./commands/PutAttributesCommand\"), exports);\ntslib_1.__exportStar(require(\"./commands/PutClusterCapacityProvidersCommand\"), exports);\ntslib_1.__exportStar(require(\"./commands/RegisterContainerInstanceCommand\"), exports);\ntslib_1.__exportStar(require(\"./commands/RegisterTaskDefinitionCommand\"), exports);\ntslib_1.__exportStar(require(\"./commands/RunTaskCommand\"), exports);\ntslib_1.__exportStar(require(\"./commands/StartTaskCommand\"), exports);\ntslib_1.__exportStar(require(\"./commands/StopTaskCommand\"), exports);\ntslib_1.__exportStar(require(\"./commands/SubmitAttachmentStateChangesCommand\"), exports);\ntslib_1.__exportStar(require(\"./commands/SubmitContainerStateChangeCommand\"), exports);\ntslib_1.__exportStar(require(\"./commands/SubmitTaskStateChangeCommand\"), exports);\ntslib_1.__exportStar(require(\"./commands/TagResourceCommand\"), exports);\ntslib_1.__exportStar(require(\"./commands/UntagResourceCommand\"), exports);\ntslib_1.__exportStar(require(\"./commands/UpdateCapacityProviderCommand\"), exports);\ntslib_1.__exportStar(require(\"./commands/UpdateClusterCommand\"), exports);\ntslib_1.__exportStar(require(\"./commands/UpdateClusterSettingsCommand\"), exports);\ntslib_1.__exportStar(require(\"./commands/UpdateContainerAgentCommand\"), exports);\ntslib_1.__exportStar(require(\"./commands/UpdateContainerInstancesStateCommand\"), exports);\ntslib_1.__exportStar(require(\"./commands/UpdateServiceCommand\"), exports);\ntslib_1.__exportStar(require(\"./commands/UpdateServicePrimaryTaskSetCommand\"), exports);\ntslib_1.__exportStar(require(\"./commands/UpdateTaskSetCommand\"), exports);\ntslib_1.__exportStar(require(\"./pagination/Interfaces\"), exports);\ntslib_1.__exportStar(require(\"./models/index\"), exports);\n//# sourceMappingURL=index.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst tslib_1 = require(\"tslib\");\ntslib_1.__exportStar(require(\"./models_0\"), exports);\n//# sourceMappingURL=index.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.ServiceEvent = exports.Deployment = exports.DeploymentRolloutState = exports.CreateServiceRequest = exports.ServiceRegistry = exports.SchedulingStrategy = exports.PropagateTags = exports.PlacementStrategy = exports.PlacementStrategyType = exports.PlacementConstraint = exports.PlacementConstraintType = exports.NetworkConfiguration = exports.AwsVpcConfiguration = exports.AssignPublicIp = exports.LoadBalancer = exports.LaunchType = exports.DeploymentController = exports.DeploymentControllerType = exports.DeploymentConfiguration = exports.DeploymentCircuitBreaker = exports.ClusterNotFoundException = exports.CreateClusterResponse = exports.Cluster = exports.Attachment = exports.KeyValuePair = exports.CreateClusterRequest = exports.ClusterSetting = exports.ClusterSettingName = exports.CapacityProviderStrategyItem = exports.ClusterConfiguration = exports.ExecuteCommandConfiguration = exports.ExecuteCommandLogging = exports.ExecuteCommandLogConfiguration = exports.UpdateInProgressException = exports.ServerException = exports.LimitExceededException = exports.InvalidParameterException = exports.CreateCapacityProviderResponse = exports.CapacityProvider = exports.CapacityProviderUpdateStatus = exports.CapacityProviderStatus = exports.CreateCapacityProviderRequest = exports.Tag = exports.AutoScalingGroupProvider = exports.ManagedTerminationProtection = exports.ManagedScaling = exports.ManagedScalingStatus = exports.ClientException = exports.AgentUpdateStatus = exports.AccessDeniedException = void 0;\nexports.KernelCapabilities = exports.HealthCheck = exports.FirelensConfiguration = exports.FirelensConfigurationType = exports.HostEntry = exports.EnvironmentFile = exports.EnvironmentFileType = exports.ContainerDependency = exports.ContainerCondition = exports.Compatibility = exports.DeregisterTaskDefinitionRequest = exports.DeregisterContainerInstanceResponse = exports.ContainerInstance = exports.VersionInfo = exports.Resource = exports.DeregisterContainerInstanceRequest = exports.TaskSetNotFoundException = exports.DeleteTaskSetResponse = exports.DeleteTaskSetRequest = exports.DeleteServiceResponse = exports.DeleteServiceRequest = exports.DeleteClusterResponse = exports.DeleteClusterRequest = exports.ClusterContainsTasksException = exports.ClusterContainsServicesException = exports.ClusterContainsContainerInstancesException = exports.DeleteCapacityProviderResponse = exports.DeleteCapacityProviderRequest = exports.TargetNotFoundException = exports.DeleteAttributesResponse = exports.DeleteAttributesRequest = exports.Attribute = exports.TargetType = exports.DeleteAccountSettingResponse = exports.Setting = exports.DeleteAccountSettingRequest = exports.SettingName = exports.ServiceNotFoundException = exports.ServiceNotActiveException = exports.CreateTaskSetResponse = exports.CreateTaskSetRequest = exports.UnsupportedFeatureException = exports.PlatformUnknownException = exports.PlatformTaskDefinitionIncompatibilityException = exports.CreateServiceResponse = exports.Service = exports.TaskSet = exports.StabilityStatus = exports.Scale = exports.ScaleUnit = void 0;\nexports.DescribeContainerInstancesResponse = exports.DescribeContainerInstancesRequest = exports.ContainerInstanceField = exports.DescribeClustersResponse = exports.DescribeClustersRequest = exports.ClusterField = exports.DescribeCapacityProvidersResponse = exports.Failure = exports.DescribeCapacityProvidersRequest = exports.CapacityProviderField = exports.DeregisterTaskDefinitionResponse = exports.TaskDefinition = exports.Volume = exports.HostVolumeProperties = exports.FSxWindowsFileServerVolumeConfiguration = exports.FSxWindowsFileServerAuthorizationConfig = exports.EFSVolumeConfiguration = exports.EFSTransitEncryption = exports.EFSAuthorizationConfig = exports.EFSAuthorizationConfigIAM = exports.DockerVolumeConfiguration = exports.Scope = exports.TaskDefinitionStatus = exports.ProxyConfiguration = exports.ProxyConfigurationType = exports.TaskDefinitionPlacementConstraint = exports.TaskDefinitionPlacementConstraintType = exports.PidMode = exports.NetworkMode = exports.IpcMode = exports.InferenceAccelerator = exports.EphemeralStorage = exports.ContainerDefinition = exports.VolumeFrom = exports.Ulimit = exports.UlimitName = exports.SystemControl = exports.ResourceRequirement = exports.ResourceType = exports.RepositoryCredentials = exports.PortMapping = exports.TransportProtocol = exports.MountPoint = exports.LogConfiguration = exports.Secret = exports.LogDriver = exports.LinuxParameters = exports.Tmpfs = exports.Device = exports.DeviceCgroupPermission = void 0;\nexports.DesiredStatus = exports.ListTaskDefinitionsResponse = exports.ListTaskDefinitionsRequest = exports.SortOrder = exports.ListTaskDefinitionFamiliesResponse = exports.ListTaskDefinitionFamiliesRequest = exports.TaskDefinitionFamilyStatus = exports.ListTagsForResourceResponse = exports.ListTagsForResourceRequest = exports.ListServicesResponse = exports.ListServicesRequest = exports.ListContainerInstancesResponse = exports.ListContainerInstancesRequest = exports.ContainerInstanceStatus = exports.ListClustersResponse = exports.ListClustersRequest = exports.ListAttributesResponse = exports.ListAttributesRequest = exports.ListAccountSettingsResponse = exports.ListAccountSettingsRequest = exports.TargetNotConnectedException = exports.ExecuteCommandResponse = exports.Session = exports.ExecuteCommandRequest = exports.DiscoverPollEndpointResponse = exports.DiscoverPollEndpointRequest = exports.DescribeTaskSetsResponse = exports.DescribeTaskSetsRequest = exports.TaskSetField = exports.DescribeTasksResponse = exports.Task = exports.TaskStopCode = exports.TaskOverride = exports.InferenceAcceleratorOverride = exports.ContainerOverride = exports.Container = exports.NetworkInterface = exports.NetworkBinding = exports.ManagedAgent = exports.ManagedAgentName = exports.HealthStatus = exports.Connectivity = exports.DescribeTasksRequest = exports.TaskField = exports.DescribeTaskDefinitionResponse = exports.DescribeTaskDefinitionRequest = exports.TaskDefinitionField = exports.DescribeServicesResponse = exports.DescribeServicesRequest = exports.ServiceField = void 0;\nexports.UpdateContainerAgentResponse = exports.UpdateContainerAgentRequest = exports.NoUpdateAvailableException = exports.MissingVersionException = exports.UpdateClusterSettingsResponse = exports.UpdateClusterSettingsRequest = exports.UpdateClusterResponse = exports.UpdateClusterRequest = exports.UpdateCapacityProviderResponse = exports.UpdateCapacityProviderRequest = exports.AutoScalingGroupProviderUpdate = exports.UntagResourceResponse = exports.UntagResourceRequest = exports.TagResourceResponse = exports.TagResourceRequest = exports.ResourceNotFoundException = exports.SubmitTaskStateChangeResponse = exports.SubmitTaskStateChangeRequest = exports.ManagedAgentStateChange = exports.ContainerStateChange = exports.SubmitContainerStateChangeResponse = exports.SubmitContainerStateChangeRequest = exports.SubmitAttachmentStateChangesResponse = exports.SubmitAttachmentStateChangesRequest = exports.AttachmentStateChange = exports.StopTaskResponse = exports.StopTaskRequest = exports.StartTaskResponse = exports.StartTaskRequest = exports.RunTaskResponse = exports.RunTaskRequest = exports.BlockedException = exports.RegisterTaskDefinitionResponse = exports.RegisterTaskDefinitionRequest = exports.RegisterContainerInstanceResponse = exports.RegisterContainerInstanceRequest = exports.PlatformDevice = exports.PlatformDeviceType = exports.ResourceInUseException = exports.PutClusterCapacityProvidersResponse = exports.PutClusterCapacityProvidersRequest = exports.PutAttributesResponse = exports.PutAttributesRequest = exports.AttributeLimitExceededException = exports.PutAccountSettingDefaultResponse = exports.PutAccountSettingDefaultRequest = exports.PutAccountSettingResponse = exports.PutAccountSettingRequest = exports.ListTasksResponse = exports.ListTasksRequest = void 0;\nexports.UpdateTaskSetResponse = exports.UpdateTaskSetRequest = exports.UpdateServicePrimaryTaskSetResponse = exports.UpdateServicePrimaryTaskSetRequest = exports.UpdateServiceResponse = exports.UpdateServiceRequest = exports.UpdateContainerInstancesStateResponse = exports.UpdateContainerInstancesStateRequest = void 0;\nconst smithy_client_1 = require(\"@aws-sdk/smithy-client\");\nvar AccessDeniedException;\n(function (AccessDeniedException) {\n /**\n * @internal\n */\n AccessDeniedException.filterSensitiveLog = (obj) => ({\n ...obj,\n });\n})(AccessDeniedException = exports.AccessDeniedException || (exports.AccessDeniedException = {}));\nvar AgentUpdateStatus;\n(function (AgentUpdateStatus) {\n AgentUpdateStatus[\"FAILED\"] = \"FAILED\";\n AgentUpdateStatus[\"PENDING\"] = \"PENDING\";\n AgentUpdateStatus[\"STAGED\"] = \"STAGED\";\n AgentUpdateStatus[\"STAGING\"] = \"STAGING\";\n AgentUpdateStatus[\"UPDATED\"] = \"UPDATED\";\n AgentUpdateStatus[\"UPDATING\"] = \"UPDATING\";\n})(AgentUpdateStatus = exports.AgentUpdateStatus || (exports.AgentUpdateStatus = {}));\nvar ClientException;\n(function (ClientException) {\n /**\n * @internal\n */\n ClientException.filterSensitiveLog = (obj) => ({\n ...obj,\n });\n})(ClientException = exports.ClientException || (exports.ClientException = {}));\nvar ManagedScalingStatus;\n(function (ManagedScalingStatus) {\n ManagedScalingStatus[\"DISABLED\"] = \"DISABLED\";\n ManagedScalingStatus[\"ENABLED\"] = \"ENABLED\";\n})(ManagedScalingStatus = exports.ManagedScalingStatus || (exports.ManagedScalingStatus = {}));\nvar ManagedScaling;\n(function (ManagedScaling) {\n /**\n * @internal\n */\n ManagedScaling.filterSensitiveLog = (obj) => ({\n ...obj,\n });\n})(ManagedScaling = exports.ManagedScaling || (exports.ManagedScaling = {}));\nvar ManagedTerminationProtection;\n(function (ManagedTerminationProtection) {\n ManagedTerminationProtection[\"DISABLED\"] = \"DISABLED\";\n ManagedTerminationProtection[\"ENABLED\"] = \"ENABLED\";\n})(ManagedTerminationProtection = exports.ManagedTerminationProtection || (exports.ManagedTerminationProtection = {}));\nvar AutoScalingGroupProvider;\n(function (AutoScalingGroupProvider) {\n /**\n * @internal\n */\n AutoScalingGroupProvider.filterSensitiveLog = (obj) => ({\n ...obj,\n });\n})(AutoScalingGroupProvider = exports.AutoScalingGroupProvider || (exports.AutoScalingGroupProvider = {}));\nvar Tag;\n(function (Tag) {\n /**\n * @internal\n */\n Tag.filterSensitiveLog = (obj) => ({\n ...obj,\n });\n})(Tag = exports.Tag || (exports.Tag = {}));\nvar CreateCapacityProviderRequest;\n(function (CreateCapacityProviderRequest) {\n /**\n * @internal\n */\n CreateCapacityProviderRequest.filterSensitiveLog = (obj) => ({\n ...obj,\n });\n})(CreateCapacityProviderRequest = exports.CreateCapacityProviderRequest || (exports.CreateCapacityProviderRequest = {}));\nvar CapacityProviderStatus;\n(function (CapacityProviderStatus) {\n CapacityProviderStatus[\"ACTIVE\"] = \"ACTIVE\";\n CapacityProviderStatus[\"INACTIVE\"] = \"INACTIVE\";\n})(CapacityProviderStatus = exports.CapacityProviderStatus || (exports.CapacityProviderStatus = {}));\nvar CapacityProviderUpdateStatus;\n(function (CapacityProviderUpdateStatus) {\n CapacityProviderUpdateStatus[\"DELETE_COMPLETE\"] = \"DELETE_COMPLETE\";\n CapacityProviderUpdateStatus[\"DELETE_FAILED\"] = \"DELETE_FAILED\";\n CapacityProviderUpdateStatus[\"DELETE_IN_PROGRESS\"] = \"DELETE_IN_PROGRESS\";\n CapacityProviderUpdateStatus[\"UPDATE_COMPLETE\"] = \"UPDATE_COMPLETE\";\n CapacityProviderUpdateStatus[\"UPDATE_FAILED\"] = \"UPDATE_FAILED\";\n CapacityProviderUpdateStatus[\"UPDATE_IN_PROGRESS\"] = \"UPDATE_IN_PROGRESS\";\n})(CapacityProviderUpdateStatus = exports.CapacityProviderUpdateStatus || (exports.CapacityProviderUpdateStatus = {}));\nvar CapacityProvider;\n(function (CapacityProvider) {\n /**\n * @internal\n */\n CapacityProvider.filterSensitiveLog = (obj) => ({\n ...obj,\n });\n})(CapacityProvider = exports.CapacityProvider || (exports.CapacityProvider = {}));\nvar CreateCapacityProviderResponse;\n(function (CreateCapacityProviderResponse) {\n /**\n * @internal\n */\n CreateCapacityProviderResponse.filterSensitiveLog = (obj) => ({\n ...obj,\n });\n})(CreateCapacityProviderResponse = exports.CreateCapacityProviderResponse || (exports.CreateCapacityProviderResponse = {}));\nvar InvalidParameterException;\n(function (InvalidParameterException) {\n /**\n * @internal\n */\n InvalidParameterException.filterSensitiveLog = (obj) => ({\n ...obj,\n });\n})(InvalidParameterException = exports.InvalidParameterException || (exports.InvalidParameterException = {}));\nvar LimitExceededException;\n(function (LimitExceededException) {\n /**\n * @internal\n */\n LimitExceededException.filterSensitiveLog = (obj) => ({\n ...obj,\n });\n})(LimitExceededException = exports.LimitExceededException || (exports.LimitExceededException = {}));\nvar ServerException;\n(function (ServerException) {\n /**\n * @internal\n */\n ServerException.filterSensitiveLog = (obj) => ({\n ...obj,\n });\n})(ServerException = exports.ServerException || (exports.ServerException = {}));\nvar UpdateInProgressException;\n(function (UpdateInProgressException) {\n /**\n * @internal\n */\n UpdateInProgressException.filterSensitiveLog = (obj) => ({\n ...obj,\n });\n})(UpdateInProgressException = exports.UpdateInProgressException || (exports.UpdateInProgressException = {}));\nvar ExecuteCommandLogConfiguration;\n(function (ExecuteCommandLogConfiguration) {\n /**\n * @internal\n */\n ExecuteCommandLogConfiguration.filterSensitiveLog = (obj) => ({\n ...obj,\n });\n})(ExecuteCommandLogConfiguration = exports.ExecuteCommandLogConfiguration || (exports.ExecuteCommandLogConfiguration = {}));\nvar ExecuteCommandLogging;\n(function (ExecuteCommandLogging) {\n ExecuteCommandLogging[\"DEFAULT\"] = \"DEFAULT\";\n ExecuteCommandLogging[\"NONE\"] = \"NONE\";\n ExecuteCommandLogging[\"OVERRIDE\"] = \"OVERRIDE\";\n})(ExecuteCommandLogging = exports.ExecuteCommandLogging || (exports.ExecuteCommandLogging = {}));\nvar ExecuteCommandConfiguration;\n(function (ExecuteCommandConfiguration) {\n /**\n * @internal\n */\n ExecuteCommandConfiguration.filterSensitiveLog = (obj) => ({\n ...obj,\n });\n})(ExecuteCommandConfiguration = exports.ExecuteCommandConfiguration || (exports.ExecuteCommandConfiguration = {}));\nvar ClusterConfiguration;\n(function (ClusterConfiguration) {\n /**\n * @internal\n */\n ClusterConfiguration.filterSensitiveLog = (obj) => ({\n ...obj,\n });\n})(ClusterConfiguration = exports.ClusterConfiguration || (exports.ClusterConfiguration = {}));\nvar CapacityProviderStrategyItem;\n(function (CapacityProviderStrategyItem) {\n /**\n * @internal\n */\n CapacityProviderStrategyItem.filterSensitiveLog = (obj) => ({\n ...obj,\n });\n})(CapacityProviderStrategyItem = exports.CapacityProviderStrategyItem || (exports.CapacityProviderStrategyItem = {}));\nvar ClusterSettingName;\n(function (ClusterSettingName) {\n ClusterSettingName[\"CONTAINER_INSIGHTS\"] = \"containerInsights\";\n})(ClusterSettingName = exports.ClusterSettingName || (exports.ClusterSettingName = {}));\nvar ClusterSetting;\n(function (ClusterSetting) {\n /**\n * @internal\n */\n ClusterSetting.filterSensitiveLog = (obj) => ({\n ...obj,\n });\n})(ClusterSetting = exports.ClusterSetting || (exports.ClusterSetting = {}));\nvar CreateClusterRequest;\n(function (CreateClusterRequest) {\n /**\n * @internal\n */\n CreateClusterRequest.filterSensitiveLog = (obj) => ({\n ...obj,\n });\n})(CreateClusterRequest = exports.CreateClusterRequest || (exports.CreateClusterRequest = {}));\nvar KeyValuePair;\n(function (KeyValuePair) {\n /**\n * @internal\n */\n KeyValuePair.filterSensitiveLog = (obj) => ({\n ...obj,\n });\n})(KeyValuePair = exports.KeyValuePair || (exports.KeyValuePair = {}));\nvar Attachment;\n(function (Attachment) {\n /**\n * @internal\n */\n Attachment.filterSensitiveLog = (obj) => ({\n ...obj,\n });\n})(Attachment = exports.Attachment || (exports.Attachment = {}));\nvar Cluster;\n(function (Cluster) {\n /**\n * @internal\n */\n Cluster.filterSensitiveLog = (obj) => ({\n ...obj,\n });\n})(Cluster = exports.Cluster || (exports.Cluster = {}));\nvar CreateClusterResponse;\n(function (CreateClusterResponse) {\n /**\n * @internal\n */\n CreateClusterResponse.filterSensitiveLog = (obj) => ({\n ...obj,\n });\n})(CreateClusterResponse = exports.CreateClusterResponse || (exports.CreateClusterResponse = {}));\nvar ClusterNotFoundException;\n(function (ClusterNotFoundException) {\n /**\n * @internal\n */\n ClusterNotFoundException.filterSensitiveLog = (obj) => ({\n ...obj,\n });\n})(ClusterNotFoundException = exports.ClusterNotFoundException || (exports.ClusterNotFoundException = {}));\nvar DeploymentCircuitBreaker;\n(function (DeploymentCircuitBreaker) {\n /**\n * @internal\n */\n DeploymentCircuitBreaker.filterSensitiveLog = (obj) => ({\n ...obj,\n });\n})(DeploymentCircuitBreaker = exports.DeploymentCircuitBreaker || (exports.DeploymentCircuitBreaker = {}));\nvar DeploymentConfiguration;\n(function (DeploymentConfiguration) {\n /**\n * @internal\n */\n DeploymentConfiguration.filterSensitiveLog = (obj) => ({\n ...obj,\n });\n})(DeploymentConfiguration = exports.DeploymentConfiguration || (exports.DeploymentConfiguration = {}));\nvar DeploymentControllerType;\n(function (DeploymentControllerType) {\n DeploymentControllerType[\"CODE_DEPLOY\"] = \"CODE_DEPLOY\";\n DeploymentControllerType[\"ECS\"] = \"ECS\";\n DeploymentControllerType[\"EXTERNAL\"] = \"EXTERNAL\";\n})(DeploymentControllerType = exports.DeploymentControllerType || (exports.DeploymentControllerType = {}));\nvar DeploymentController;\n(function (DeploymentController) {\n /**\n * @internal\n */\n DeploymentController.filterSensitiveLog = (obj) => ({\n ...obj,\n });\n})(DeploymentController = exports.DeploymentController || (exports.DeploymentController = {}));\nvar LaunchType;\n(function (LaunchType) {\n LaunchType[\"EC2\"] = \"EC2\";\n LaunchType[\"EXTERNAL\"] = \"EXTERNAL\";\n LaunchType[\"FARGATE\"] = \"FARGATE\";\n})(LaunchType = exports.LaunchType || (exports.LaunchType = {}));\nvar LoadBalancer;\n(function (LoadBalancer) {\n /**\n * @internal\n */\n LoadBalancer.filterSensitiveLog = (obj) => ({\n ...obj,\n });\n})(LoadBalancer = exports.LoadBalancer || (exports.LoadBalancer = {}));\nvar AssignPublicIp;\n(function (AssignPublicIp) {\n AssignPublicIp[\"DISABLED\"] = \"DISABLED\";\n AssignPublicIp[\"ENABLED\"] = \"ENABLED\";\n})(AssignPublicIp = exports.AssignPublicIp || (exports.AssignPublicIp = {}));\nvar AwsVpcConfiguration;\n(function (AwsVpcConfiguration) {\n /**\n * @internal\n */\n AwsVpcConfiguration.filterSensitiveLog = (obj) => ({\n ...obj,\n });\n})(AwsVpcConfiguration = exports.AwsVpcConfiguration || (exports.AwsVpcConfiguration = {}));\nvar NetworkConfiguration;\n(function (NetworkConfiguration) {\n /**\n * @internal\n */\n NetworkConfiguration.filterSensitiveLog = (obj) => ({\n ...obj,\n });\n})(NetworkConfiguration = exports.NetworkConfiguration || (exports.NetworkConfiguration = {}));\nvar PlacementConstraintType;\n(function (PlacementConstraintType) {\n PlacementConstraintType[\"DISTINCT_INSTANCE\"] = \"distinctInstance\";\n PlacementConstraintType[\"MEMBER_OF\"] = \"memberOf\";\n})(PlacementConstraintType = exports.PlacementConstraintType || (exports.PlacementConstraintType = {}));\nvar PlacementConstraint;\n(function (PlacementConstraint) {\n /**\n * @internal\n */\n PlacementConstraint.filterSensitiveLog = (obj) => ({\n ...obj,\n });\n})(PlacementConstraint = exports.PlacementConstraint || (exports.PlacementConstraint = {}));\nvar PlacementStrategyType;\n(function (PlacementStrategyType) {\n PlacementStrategyType[\"BINPACK\"] = \"binpack\";\n PlacementStrategyType[\"RANDOM\"] = \"random\";\n PlacementStrategyType[\"SPREAD\"] = \"spread\";\n})(PlacementStrategyType = exports.PlacementStrategyType || (exports.PlacementStrategyType = {}));\nvar PlacementStrategy;\n(function (PlacementStrategy) {\n /**\n * @internal\n */\n PlacementStrategy.filterSensitiveLog = (obj) => ({\n ...obj,\n });\n})(PlacementStrategy = exports.PlacementStrategy || (exports.PlacementStrategy = {}));\nvar PropagateTags;\n(function (PropagateTags) {\n PropagateTags[\"SERVICE\"] = \"SERVICE\";\n PropagateTags[\"TASK_DEFINITION\"] = \"TASK_DEFINITION\";\n})(PropagateTags = exports.PropagateTags || (exports.PropagateTags = {}));\nvar SchedulingStrategy;\n(function (SchedulingStrategy) {\n SchedulingStrategy[\"DAEMON\"] = \"DAEMON\";\n SchedulingStrategy[\"REPLICA\"] = \"REPLICA\";\n})(SchedulingStrategy = exports.SchedulingStrategy || (exports.SchedulingStrategy = {}));\nvar ServiceRegistry;\n(function (ServiceRegistry) {\n /**\n * @internal\n */\n ServiceRegistry.filterSensitiveLog = (obj) => ({\n ...obj,\n });\n})(ServiceRegistry = exports.ServiceRegistry || (exports.ServiceRegistry = {}));\nvar CreateServiceRequest;\n(function (CreateServiceRequest) {\n /**\n * @internal\n */\n CreateServiceRequest.filterSensitiveLog = (obj) => ({\n ...obj,\n });\n})(CreateServiceRequest = exports.CreateServiceRequest || (exports.CreateServiceRequest = {}));\nvar DeploymentRolloutState;\n(function (DeploymentRolloutState) {\n DeploymentRolloutState[\"COMPLETED\"] = \"COMPLETED\";\n DeploymentRolloutState[\"FAILED\"] = \"FAILED\";\n DeploymentRolloutState[\"IN_PROGRESS\"] = \"IN_PROGRESS\";\n})(DeploymentRolloutState = exports.DeploymentRolloutState || (exports.DeploymentRolloutState = {}));\nvar Deployment;\n(function (Deployment) {\n /**\n * @internal\n */\n Deployment.filterSensitiveLog = (obj) => ({\n ...obj,\n });\n})(Deployment = exports.Deployment || (exports.Deployment = {}));\nvar ServiceEvent;\n(function (ServiceEvent) {\n /**\n * @internal\n */\n ServiceEvent.filterSensitiveLog = (obj) => ({\n ...obj,\n });\n})(ServiceEvent = exports.ServiceEvent || (exports.ServiceEvent = {}));\nvar ScaleUnit;\n(function (ScaleUnit) {\n ScaleUnit[\"PERCENT\"] = \"PERCENT\";\n})(ScaleUnit = exports.ScaleUnit || (exports.ScaleUnit = {}));\nvar Scale;\n(function (Scale) {\n /**\n * @internal\n */\n Scale.filterSensitiveLog = (obj) => ({\n ...obj,\n });\n})(Scale = exports.Scale || (exports.Scale = {}));\nvar StabilityStatus;\n(function (StabilityStatus) {\n StabilityStatus[\"STABILIZING\"] = \"STABILIZING\";\n StabilityStatus[\"STEADY_STATE\"] = \"STEADY_STATE\";\n})(StabilityStatus = exports.StabilityStatus || (exports.StabilityStatus = {}));\nvar TaskSet;\n(function (TaskSet) {\n /**\n * @internal\n */\n TaskSet.filterSensitiveLog = (obj) => ({\n ...obj,\n });\n})(TaskSet = exports.TaskSet || (exports.TaskSet = {}));\nvar Service;\n(function (Service) {\n /**\n * @internal\n */\n Service.filterSensitiveLog = (obj) => ({\n ...obj,\n });\n})(Service = exports.Service || (exports.Service = {}));\nvar CreateServiceResponse;\n(function (CreateServiceResponse) {\n /**\n * @internal\n */\n CreateServiceResponse.filterSensitiveLog = (obj) => ({\n ...obj,\n });\n})(CreateServiceResponse = exports.CreateServiceResponse || (exports.CreateServiceResponse = {}));\nvar PlatformTaskDefinitionIncompatibilityException;\n(function (PlatformTaskDefinitionIncompatibilityException) {\n /**\n * @internal\n */\n PlatformTaskDefinitionIncompatibilityException.filterSensitiveLog = (obj) => ({\n ...obj,\n });\n})(PlatformTaskDefinitionIncompatibilityException = exports.PlatformTaskDefinitionIncompatibilityException || (exports.PlatformTaskDefinitionIncompatibilityException = {}));\nvar PlatformUnknownException;\n(function (PlatformUnknownException) {\n /**\n * @internal\n */\n PlatformUnknownException.filterSensitiveLog = (obj) => ({\n ...obj,\n });\n})(PlatformUnknownException = exports.PlatformUnknownException || (exports.PlatformUnknownException = {}));\nvar UnsupportedFeatureException;\n(function (UnsupportedFeatureException) {\n /**\n * @internal\n */\n UnsupportedFeatureException.filterSensitiveLog = (obj) => ({\n ...obj,\n });\n})(UnsupportedFeatureException = exports.UnsupportedFeatureException || (exports.UnsupportedFeatureException = {}));\nvar CreateTaskSetRequest;\n(function (CreateTaskSetRequest) {\n /**\n * @internal\n */\n CreateTaskSetRequest.filterSensitiveLog = (obj) => ({\n ...obj,\n });\n})(CreateTaskSetRequest = exports.CreateTaskSetRequest || (exports.CreateTaskSetRequest = {}));\nvar CreateTaskSetResponse;\n(function (CreateTaskSetResponse) {\n /**\n * @internal\n */\n CreateTaskSetResponse.filterSensitiveLog = (obj) => ({\n ...obj,\n });\n})(CreateTaskSetResponse = exports.CreateTaskSetResponse || (exports.CreateTaskSetResponse = {}));\nvar ServiceNotActiveException;\n(function (ServiceNotActiveException) {\n /**\n * @internal\n */\n ServiceNotActiveException.filterSensitiveLog = (obj) => ({\n ...obj,\n });\n})(ServiceNotActiveException = exports.ServiceNotActiveException || (exports.ServiceNotActiveException = {}));\nvar ServiceNotFoundException;\n(function (ServiceNotFoundException) {\n /**\n * @internal\n */\n ServiceNotFoundException.filterSensitiveLog = (obj) => ({\n ...obj,\n });\n})(ServiceNotFoundException = exports.ServiceNotFoundException || (exports.ServiceNotFoundException = {}));\nvar SettingName;\n(function (SettingName) {\n SettingName[\"AWSVPC_TRUNKING\"] = \"awsvpcTrunking\";\n SettingName[\"CONTAINER_INSIGHTS\"] = \"containerInsights\";\n SettingName[\"CONTAINER_INSTANCE_LONG_ARN_FORMAT\"] = \"containerInstanceLongArnFormat\";\n SettingName[\"SERVICE_LONG_ARN_FORMAT\"] = \"serviceLongArnFormat\";\n SettingName[\"TASK_LONG_ARN_FORMAT\"] = \"taskLongArnFormat\";\n})(SettingName = exports.SettingName || (exports.SettingName = {}));\nvar DeleteAccountSettingRequest;\n(function (DeleteAccountSettingRequest) {\n /**\n * @internal\n */\n DeleteAccountSettingRequest.filterSensitiveLog = (obj) => ({\n ...obj,\n });\n})(DeleteAccountSettingRequest = exports.DeleteAccountSettingRequest || (exports.DeleteAccountSettingRequest = {}));\nvar Setting;\n(function (Setting) {\n /**\n * @internal\n */\n Setting.filterSensitiveLog = (obj) => ({\n ...obj,\n });\n})(Setting = exports.Setting || (exports.Setting = {}));\nvar DeleteAccountSettingResponse;\n(function (DeleteAccountSettingResponse) {\n /**\n * @internal\n */\n DeleteAccountSettingResponse.filterSensitiveLog = (obj) => ({\n ...obj,\n });\n})(DeleteAccountSettingResponse = exports.DeleteAccountSettingResponse || (exports.DeleteAccountSettingResponse = {}));\nvar TargetType;\n(function (TargetType) {\n TargetType[\"CONTAINER_INSTANCE\"] = \"container-instance\";\n})(TargetType = exports.TargetType || (exports.TargetType = {}));\nvar Attribute;\n(function (Attribute) {\n /**\n * @internal\n */\n Attribute.filterSensitiveLog = (obj) => ({\n ...obj,\n });\n})(Attribute = exports.Attribute || (exports.Attribute = {}));\nvar DeleteAttributesRequest;\n(function (DeleteAttributesRequest) {\n /**\n * @internal\n */\n DeleteAttributesRequest.filterSensitiveLog = (obj) => ({\n ...obj,\n });\n})(DeleteAttributesRequest = exports.DeleteAttributesRequest || (exports.DeleteAttributesRequest = {}));\nvar DeleteAttributesResponse;\n(function (DeleteAttributesResponse) {\n /**\n * @internal\n */\n DeleteAttributesResponse.filterSensitiveLog = (obj) => ({\n ...obj,\n });\n})(DeleteAttributesResponse = exports.DeleteAttributesResponse || (exports.DeleteAttributesResponse = {}));\nvar TargetNotFoundException;\n(function (TargetNotFoundException) {\n /**\n * @internal\n */\n TargetNotFoundException.filterSensitiveLog = (obj) => ({\n ...obj,\n });\n})(TargetNotFoundException = exports.TargetNotFoundException || (exports.TargetNotFoundException = {}));\nvar DeleteCapacityProviderRequest;\n(function (DeleteCapacityProviderRequest) {\n /**\n * @internal\n */\n DeleteCapacityProviderRequest.filterSensitiveLog = (obj) => ({\n ...obj,\n });\n})(DeleteCapacityProviderRequest = exports.DeleteCapacityProviderRequest || (exports.DeleteCapacityProviderRequest = {}));\nvar DeleteCapacityProviderResponse;\n(function (DeleteCapacityProviderResponse) {\n /**\n * @internal\n */\n DeleteCapacityProviderResponse.filterSensitiveLog = (obj) => ({\n ...obj,\n });\n})(DeleteCapacityProviderResponse = exports.DeleteCapacityProviderResponse || (exports.DeleteCapacityProviderResponse = {}));\nvar ClusterContainsContainerInstancesException;\n(function (ClusterContainsContainerInstancesException) {\n /**\n * @internal\n */\n ClusterContainsContainerInstancesException.filterSensitiveLog = (obj) => ({\n ...obj,\n });\n})(ClusterContainsContainerInstancesException = exports.ClusterContainsContainerInstancesException || (exports.ClusterContainsContainerInstancesException = {}));\nvar ClusterContainsServicesException;\n(function (ClusterContainsServicesException) {\n /**\n * @internal\n */\n ClusterContainsServicesException.filterSensitiveLog = (obj) => ({\n ...obj,\n });\n})(ClusterContainsServicesException = exports.ClusterContainsServicesException || (exports.ClusterContainsServicesException = {}));\nvar ClusterContainsTasksException;\n(function (ClusterContainsTasksException) {\n /**\n * @internal\n */\n ClusterContainsTasksException.filterSensitiveLog = (obj) => ({\n ...obj,\n });\n})(ClusterContainsTasksException = exports.ClusterContainsTasksException || (exports.ClusterContainsTasksException = {}));\nvar DeleteClusterRequest;\n(function (DeleteClusterRequest) {\n /**\n * @internal\n */\n DeleteClusterRequest.filterSensitiveLog = (obj) => ({\n ...obj,\n });\n})(DeleteClusterRequest = exports.DeleteClusterRequest || (exports.DeleteClusterRequest = {}));\nvar DeleteClusterResponse;\n(function (DeleteClusterResponse) {\n /**\n * @internal\n */\n DeleteClusterResponse.filterSensitiveLog = (obj) => ({\n ...obj,\n });\n})(DeleteClusterResponse = exports.DeleteClusterResponse || (exports.DeleteClusterResponse = {}));\nvar DeleteServiceRequest;\n(function (DeleteServiceRequest) {\n /**\n * @internal\n */\n DeleteServiceRequest.filterSensitiveLog = (obj) => ({\n ...obj,\n });\n})(DeleteServiceRequest = exports.DeleteServiceRequest || (exports.DeleteServiceRequest = {}));\nvar DeleteServiceResponse;\n(function (DeleteServiceResponse) {\n /**\n * @internal\n */\n DeleteServiceResponse.filterSensitiveLog = (obj) => ({\n ...obj,\n });\n})(DeleteServiceResponse = exports.DeleteServiceResponse || (exports.DeleteServiceResponse = {}));\nvar DeleteTaskSetRequest;\n(function (DeleteTaskSetRequest) {\n /**\n * @internal\n */\n DeleteTaskSetRequest.filterSensitiveLog = (obj) => ({\n ...obj,\n });\n})(DeleteTaskSetRequest = exports.DeleteTaskSetRequest || (exports.DeleteTaskSetRequest = {}));\nvar DeleteTaskSetResponse;\n(function (DeleteTaskSetResponse) {\n /**\n * @internal\n */\n DeleteTaskSetResponse.filterSensitiveLog = (obj) => ({\n ...obj,\n });\n})(DeleteTaskSetResponse = exports.DeleteTaskSetResponse || (exports.DeleteTaskSetResponse = {}));\nvar TaskSetNotFoundException;\n(function (TaskSetNotFoundException) {\n /**\n * @internal\n */\n TaskSetNotFoundException.filterSensitiveLog = (obj) => ({\n ...obj,\n });\n})(TaskSetNotFoundException = exports.TaskSetNotFoundException || (exports.TaskSetNotFoundException = {}));\nvar DeregisterContainerInstanceRequest;\n(function (DeregisterContainerInstanceRequest) {\n /**\n * @internal\n */\n DeregisterContainerInstanceRequest.filterSensitiveLog = (obj) => ({\n ...obj,\n });\n})(DeregisterContainerInstanceRequest = exports.DeregisterContainerInstanceRequest || (exports.DeregisterContainerInstanceRequest = {}));\nvar Resource;\n(function (Resource) {\n /**\n * @internal\n */\n Resource.filterSensitiveLog = (obj) => ({\n ...obj,\n });\n})(Resource = exports.Resource || (exports.Resource = {}));\nvar VersionInfo;\n(function (VersionInfo) {\n /**\n * @internal\n */\n VersionInfo.filterSensitiveLog = (obj) => ({\n ...obj,\n });\n})(VersionInfo = exports.VersionInfo || (exports.VersionInfo = {}));\nvar ContainerInstance;\n(function (ContainerInstance) {\n /**\n * @internal\n */\n ContainerInstance.filterSensitiveLog = (obj) => ({\n ...obj,\n });\n})(ContainerInstance = exports.ContainerInstance || (exports.ContainerInstance = {}));\nvar DeregisterContainerInstanceResponse;\n(function (DeregisterContainerInstanceResponse) {\n /**\n * @internal\n */\n DeregisterContainerInstanceResponse.filterSensitiveLog = (obj) => ({\n ...obj,\n });\n})(DeregisterContainerInstanceResponse = exports.DeregisterContainerInstanceResponse || (exports.DeregisterContainerInstanceResponse = {}));\nvar DeregisterTaskDefinitionRequest;\n(function (DeregisterTaskDefinitionRequest) {\n /**\n * @internal\n */\n DeregisterTaskDefinitionRequest.filterSensitiveLog = (obj) => ({\n ...obj,\n });\n})(DeregisterTaskDefinitionRequest = exports.DeregisterTaskDefinitionRequest || (exports.DeregisterTaskDefinitionRequest = {}));\nvar Compatibility;\n(function (Compatibility) {\n Compatibility[\"EC2\"] = \"EC2\";\n Compatibility[\"EXTERNAL\"] = \"EXTERNAL\";\n Compatibility[\"FARGATE\"] = \"FARGATE\";\n})(Compatibility = exports.Compatibility || (exports.Compatibility = {}));\nvar ContainerCondition;\n(function (ContainerCondition) {\n ContainerCondition[\"COMPLETE\"] = \"COMPLETE\";\n ContainerCondition[\"HEALTHY\"] = \"HEALTHY\";\n ContainerCondition[\"START\"] = \"START\";\n ContainerCondition[\"SUCCESS\"] = \"SUCCESS\";\n})(ContainerCondition = exports.ContainerCondition || (exports.ContainerCondition = {}));\nvar ContainerDependency;\n(function (ContainerDependency) {\n /**\n * @internal\n */\n ContainerDependency.filterSensitiveLog = (obj) => ({\n ...obj,\n });\n})(ContainerDependency = exports.ContainerDependency || (exports.ContainerDependency = {}));\nvar EnvironmentFileType;\n(function (EnvironmentFileType) {\n EnvironmentFileType[\"S3\"] = \"s3\";\n})(EnvironmentFileType = exports.EnvironmentFileType || (exports.EnvironmentFileType = {}));\nvar EnvironmentFile;\n(function (EnvironmentFile) {\n /**\n * @internal\n */\n EnvironmentFile.filterSensitiveLog = (obj) => ({\n ...obj,\n });\n})(EnvironmentFile = exports.EnvironmentFile || (exports.EnvironmentFile = {}));\nvar HostEntry;\n(function (HostEntry) {\n /**\n * @internal\n */\n HostEntry.filterSensitiveLog = (obj) => ({\n ...obj,\n });\n})(HostEntry = exports.HostEntry || (exports.HostEntry = {}));\nvar FirelensConfigurationType;\n(function (FirelensConfigurationType) {\n FirelensConfigurationType[\"FLUENTBIT\"] = \"fluentbit\";\n FirelensConfigurationType[\"FLUENTD\"] = \"fluentd\";\n})(FirelensConfigurationType = exports.FirelensConfigurationType || (exports.FirelensConfigurationType = {}));\nvar FirelensConfiguration;\n(function (FirelensConfiguration) {\n /**\n * @internal\n */\n FirelensConfiguration.filterSensitiveLog = (obj) => ({\n ...obj,\n });\n})(FirelensConfiguration = exports.FirelensConfiguration || (exports.FirelensConfiguration = {}));\nvar HealthCheck;\n(function (HealthCheck) {\n /**\n * @internal\n */\n HealthCheck.filterSensitiveLog = (obj) => ({\n ...obj,\n });\n})(HealthCheck = exports.HealthCheck || (exports.HealthCheck = {}));\nvar KernelCapabilities;\n(function (KernelCapabilities) {\n /**\n * @internal\n */\n KernelCapabilities.filterSensitiveLog = (obj) => ({\n ...obj,\n });\n})(KernelCapabilities = exports.KernelCapabilities || (exports.KernelCapabilities = {}));\nvar DeviceCgroupPermission;\n(function (DeviceCgroupPermission) {\n DeviceCgroupPermission[\"MKNOD\"] = \"mknod\";\n DeviceCgroupPermission[\"READ\"] = \"read\";\n DeviceCgroupPermission[\"WRITE\"] = \"write\";\n})(DeviceCgroupPermission = exports.DeviceCgroupPermission || (exports.DeviceCgroupPermission = {}));\nvar Device;\n(function (Device) {\n /**\n * @internal\n */\n Device.filterSensitiveLog = (obj) => ({\n ...obj,\n });\n})(Device = exports.Device || (exports.Device = {}));\nvar Tmpfs;\n(function (Tmpfs) {\n /**\n * @internal\n */\n Tmpfs.filterSensitiveLog = (obj) => ({\n ...obj,\n });\n})(Tmpfs = exports.Tmpfs || (exports.Tmpfs = {}));\nvar LinuxParameters;\n(function (LinuxParameters) {\n /**\n * @internal\n */\n LinuxParameters.filterSensitiveLog = (obj) => ({\n ...obj,\n });\n})(LinuxParameters = exports.LinuxParameters || (exports.LinuxParameters = {}));\nvar LogDriver;\n(function (LogDriver) {\n LogDriver[\"AWSFIRELENS\"] = \"awsfirelens\";\n LogDriver[\"AWSLOGS\"] = \"awslogs\";\n LogDriver[\"FLUENTD\"] = \"fluentd\";\n LogDriver[\"GELF\"] = \"gelf\";\n LogDriver[\"JOURNALD\"] = \"journald\";\n LogDriver[\"JSON_FILE\"] = \"json-file\";\n LogDriver[\"SPLUNK\"] = \"splunk\";\n LogDriver[\"SYSLOG\"] = \"syslog\";\n})(LogDriver = exports.LogDriver || (exports.LogDriver = {}));\nvar Secret;\n(function (Secret) {\n /**\n * @internal\n */\n Secret.filterSensitiveLog = (obj) => ({\n ...obj,\n });\n})(Secret = exports.Secret || (exports.Secret = {}));\nvar LogConfiguration;\n(function (LogConfiguration) {\n /**\n * @internal\n */\n LogConfiguration.filterSensitiveLog = (obj) => ({\n ...obj,\n });\n})(LogConfiguration = exports.LogConfiguration || (exports.LogConfiguration = {}));\nvar MountPoint;\n(function (MountPoint) {\n /**\n * @internal\n */\n MountPoint.filterSensitiveLog = (obj) => ({\n ...obj,\n });\n})(MountPoint = exports.MountPoint || (exports.MountPoint = {}));\nvar TransportProtocol;\n(function (TransportProtocol) {\n TransportProtocol[\"TCP\"] = \"tcp\";\n TransportProtocol[\"UDP\"] = \"udp\";\n})(TransportProtocol = exports.TransportProtocol || (exports.TransportProtocol = {}));\nvar PortMapping;\n(function (PortMapping) {\n /**\n * @internal\n */\n PortMapping.filterSensitiveLog = (obj) => ({\n ...obj,\n });\n})(PortMapping = exports.PortMapping || (exports.PortMapping = {}));\nvar RepositoryCredentials;\n(function (RepositoryCredentials) {\n /**\n * @internal\n */\n RepositoryCredentials.filterSensitiveLog = (obj) => ({\n ...obj,\n });\n})(RepositoryCredentials = exports.RepositoryCredentials || (exports.RepositoryCredentials = {}));\nvar ResourceType;\n(function (ResourceType) {\n ResourceType[\"GPU\"] = \"GPU\";\n ResourceType[\"INFERENCE_ACCELERATOR\"] = \"InferenceAccelerator\";\n})(ResourceType = exports.ResourceType || (exports.ResourceType = {}));\nvar ResourceRequirement;\n(function (ResourceRequirement) {\n /**\n * @internal\n */\n ResourceRequirement.filterSensitiveLog = (obj) => ({\n ...obj,\n });\n})(ResourceRequirement = exports.ResourceRequirement || (exports.ResourceRequirement = {}));\nvar SystemControl;\n(function (SystemControl) {\n /**\n * @internal\n */\n SystemControl.filterSensitiveLog = (obj) => ({\n ...obj,\n });\n})(SystemControl = exports.SystemControl || (exports.SystemControl = {}));\nvar UlimitName;\n(function (UlimitName) {\n UlimitName[\"CORE\"] = \"core\";\n UlimitName[\"CPU\"] = \"cpu\";\n UlimitName[\"DATA\"] = \"data\";\n UlimitName[\"FSIZE\"] = \"fsize\";\n UlimitName[\"LOCKS\"] = \"locks\";\n UlimitName[\"MEMLOCK\"] = \"memlock\";\n UlimitName[\"MSGQUEUE\"] = \"msgqueue\";\n UlimitName[\"NICE\"] = \"nice\";\n UlimitName[\"NOFILE\"] = \"nofile\";\n UlimitName[\"NPROC\"] = \"nproc\";\n UlimitName[\"RSS\"] = \"rss\";\n UlimitName[\"RTPRIO\"] = \"rtprio\";\n UlimitName[\"RTTIME\"] = \"rttime\";\n UlimitName[\"SIGPENDING\"] = \"sigpending\";\n UlimitName[\"STACK\"] = \"stack\";\n})(UlimitName = exports.UlimitName || (exports.UlimitName = {}));\nvar Ulimit;\n(function (Ulimit) {\n /**\n * @internal\n */\n Ulimit.filterSensitiveLog = (obj) => ({\n ...obj,\n });\n})(Ulimit = exports.Ulimit || (exports.Ulimit = {}));\nvar VolumeFrom;\n(function (VolumeFrom) {\n /**\n * @internal\n */\n VolumeFrom.filterSensitiveLog = (obj) => ({\n ...obj,\n });\n})(VolumeFrom = exports.VolumeFrom || (exports.VolumeFrom = {}));\nvar ContainerDefinition;\n(function (ContainerDefinition) {\n /**\n * @internal\n */\n ContainerDefinition.filterSensitiveLog = (obj) => ({\n ...obj,\n });\n})(ContainerDefinition = exports.ContainerDefinition || (exports.ContainerDefinition = {}));\nvar EphemeralStorage;\n(function (EphemeralStorage) {\n /**\n * @internal\n */\n EphemeralStorage.filterSensitiveLog = (obj) => ({\n ...obj,\n });\n})(EphemeralStorage = exports.EphemeralStorage || (exports.EphemeralStorage = {}));\nvar InferenceAccelerator;\n(function (InferenceAccelerator) {\n /**\n * @internal\n */\n InferenceAccelerator.filterSensitiveLog = (obj) => ({\n ...obj,\n });\n})(InferenceAccelerator = exports.InferenceAccelerator || (exports.InferenceAccelerator = {}));\nvar IpcMode;\n(function (IpcMode) {\n IpcMode[\"HOST\"] = \"host\";\n IpcMode[\"NONE\"] = \"none\";\n IpcMode[\"TASK\"] = \"task\";\n})(IpcMode = exports.IpcMode || (exports.IpcMode = {}));\nvar NetworkMode;\n(function (NetworkMode) {\n NetworkMode[\"AWSVPC\"] = \"awsvpc\";\n NetworkMode[\"BRIDGE\"] = \"bridge\";\n NetworkMode[\"HOST\"] = \"host\";\n NetworkMode[\"NONE\"] = \"none\";\n})(NetworkMode = exports.NetworkMode || (exports.NetworkMode = {}));\nvar PidMode;\n(function (PidMode) {\n PidMode[\"HOST\"] = \"host\";\n PidMode[\"TASK\"] = \"task\";\n})(PidMode = exports.PidMode || (exports.PidMode = {}));\nvar TaskDefinitionPlacementConstraintType;\n(function (TaskDefinitionPlacementConstraintType) {\n TaskDefinitionPlacementConstraintType[\"MEMBER_OF\"] = \"memberOf\";\n})(TaskDefinitionPlacementConstraintType = exports.TaskDefinitionPlacementConstraintType || (exports.TaskDefinitionPlacementConstraintType = {}));\nvar TaskDefinitionPlacementConstraint;\n(function (TaskDefinitionPlacementConstraint) {\n /**\n * @internal\n */\n TaskDefinitionPlacementConstraint.filterSensitiveLog = (obj) => ({\n ...obj,\n });\n})(TaskDefinitionPlacementConstraint = exports.TaskDefinitionPlacementConstraint || (exports.TaskDefinitionPlacementConstraint = {}));\nvar ProxyConfigurationType;\n(function (ProxyConfigurationType) {\n ProxyConfigurationType[\"APPMESH\"] = \"APPMESH\";\n})(ProxyConfigurationType = exports.ProxyConfigurationType || (exports.ProxyConfigurationType = {}));\nvar ProxyConfiguration;\n(function (ProxyConfiguration) {\n /**\n * @internal\n */\n ProxyConfiguration.filterSensitiveLog = (obj) => ({\n ...obj,\n });\n})(ProxyConfiguration = exports.ProxyConfiguration || (exports.ProxyConfiguration = {}));\nvar TaskDefinitionStatus;\n(function (TaskDefinitionStatus) {\n TaskDefinitionStatus[\"ACTIVE\"] = \"ACTIVE\";\n TaskDefinitionStatus[\"INACTIVE\"] = \"INACTIVE\";\n})(TaskDefinitionStatus = exports.TaskDefinitionStatus || (exports.TaskDefinitionStatus = {}));\nvar Scope;\n(function (Scope) {\n Scope[\"SHARED\"] = \"shared\";\n Scope[\"TASK\"] = \"task\";\n})(Scope = exports.Scope || (exports.Scope = {}));\nvar DockerVolumeConfiguration;\n(function (DockerVolumeConfiguration) {\n /**\n * @internal\n */\n DockerVolumeConfiguration.filterSensitiveLog = (obj) => ({\n ...obj,\n });\n})(DockerVolumeConfiguration = exports.DockerVolumeConfiguration || (exports.DockerVolumeConfiguration = {}));\nvar EFSAuthorizationConfigIAM;\n(function (EFSAuthorizationConfigIAM) {\n EFSAuthorizationConfigIAM[\"DISABLED\"] = \"DISABLED\";\n EFSAuthorizationConfigIAM[\"ENABLED\"] = \"ENABLED\";\n})(EFSAuthorizationConfigIAM = exports.EFSAuthorizationConfigIAM || (exports.EFSAuthorizationConfigIAM = {}));\nvar EFSAuthorizationConfig;\n(function (EFSAuthorizationConfig) {\n /**\n * @internal\n */\n EFSAuthorizationConfig.filterSensitiveLog = (obj) => ({\n ...obj,\n });\n})(EFSAuthorizationConfig = exports.EFSAuthorizationConfig || (exports.EFSAuthorizationConfig = {}));\nvar EFSTransitEncryption;\n(function (EFSTransitEncryption) {\n EFSTransitEncryption[\"DISABLED\"] = \"DISABLED\";\n EFSTransitEncryption[\"ENABLED\"] = \"ENABLED\";\n})(EFSTransitEncryption = exports.EFSTransitEncryption || (exports.EFSTransitEncryption = {}));\nvar EFSVolumeConfiguration;\n(function (EFSVolumeConfiguration) {\n /**\n * @internal\n */\n EFSVolumeConfiguration.filterSensitiveLog = (obj) => ({\n ...obj,\n });\n})(EFSVolumeConfiguration = exports.EFSVolumeConfiguration || (exports.EFSVolumeConfiguration = {}));\nvar FSxWindowsFileServerAuthorizationConfig;\n(function (FSxWindowsFileServerAuthorizationConfig) {\n /**\n * @internal\n */\n FSxWindowsFileServerAuthorizationConfig.filterSensitiveLog = (obj) => ({\n ...obj,\n });\n})(FSxWindowsFileServerAuthorizationConfig = exports.FSxWindowsFileServerAuthorizationConfig || (exports.FSxWindowsFileServerAuthorizationConfig = {}));\nvar FSxWindowsFileServerVolumeConfiguration;\n(function (FSxWindowsFileServerVolumeConfiguration) {\n /**\n * @internal\n */\n FSxWindowsFileServerVolumeConfiguration.filterSensitiveLog = (obj) => ({\n ...obj,\n });\n})(FSxWindowsFileServerVolumeConfiguration = exports.FSxWindowsFileServerVolumeConfiguration || (exports.FSxWindowsFileServerVolumeConfiguration = {}));\nvar HostVolumeProperties;\n(function (HostVolumeProperties) {\n /**\n * @internal\n */\n HostVolumeProperties.filterSensitiveLog = (obj) => ({\n ...obj,\n });\n})(HostVolumeProperties = exports.HostVolumeProperties || (exports.HostVolumeProperties = {}));\nvar Volume;\n(function (Volume) {\n /**\n * @internal\n */\n Volume.filterSensitiveLog = (obj) => ({\n ...obj,\n });\n})(Volume = exports.Volume || (exports.Volume = {}));\nvar TaskDefinition;\n(function (TaskDefinition) {\n /**\n * @internal\n */\n TaskDefinition.filterSensitiveLog = (obj) => ({\n ...obj,\n });\n})(TaskDefinition = exports.TaskDefinition || (exports.TaskDefinition = {}));\nvar DeregisterTaskDefinitionResponse;\n(function (DeregisterTaskDefinitionResponse) {\n /**\n * @internal\n */\n DeregisterTaskDefinitionResponse.filterSensitiveLog = (obj) => ({\n ...obj,\n });\n})(DeregisterTaskDefinitionResponse = exports.DeregisterTaskDefinitionResponse || (exports.DeregisterTaskDefinitionResponse = {}));\nvar CapacityProviderField;\n(function (CapacityProviderField) {\n CapacityProviderField[\"TAGS\"] = \"TAGS\";\n})(CapacityProviderField = exports.CapacityProviderField || (exports.CapacityProviderField = {}));\nvar DescribeCapacityProvidersRequest;\n(function (DescribeCapacityProvidersRequest) {\n /**\n * @internal\n */\n DescribeCapacityProvidersRequest.filterSensitiveLog = (obj) => ({\n ...obj,\n });\n})(DescribeCapacityProvidersRequest = exports.DescribeCapacityProvidersRequest || (exports.DescribeCapacityProvidersRequest = {}));\nvar Failure;\n(function (Failure) {\n /**\n * @internal\n */\n Failure.filterSensitiveLog = (obj) => ({\n ...obj,\n });\n})(Failure = exports.Failure || (exports.Failure = {}));\nvar DescribeCapacityProvidersResponse;\n(function (DescribeCapacityProvidersResponse) {\n /**\n * @internal\n */\n DescribeCapacityProvidersResponse.filterSensitiveLog = (obj) => ({\n ...obj,\n });\n})(DescribeCapacityProvidersResponse = exports.DescribeCapacityProvidersResponse || (exports.DescribeCapacityProvidersResponse = {}));\nvar ClusterField;\n(function (ClusterField) {\n ClusterField[\"ATTACHMENTS\"] = \"ATTACHMENTS\";\n ClusterField[\"CONFIGURATIONS\"] = \"CONFIGURATIONS\";\n ClusterField[\"SETTINGS\"] = \"SETTINGS\";\n ClusterField[\"STATISTICS\"] = \"STATISTICS\";\n ClusterField[\"TAGS\"] = \"TAGS\";\n})(ClusterField = exports.ClusterField || (exports.ClusterField = {}));\nvar DescribeClustersRequest;\n(function (DescribeClustersRequest) {\n /**\n * @internal\n */\n DescribeClustersRequest.filterSensitiveLog = (obj) => ({\n ...obj,\n });\n})(DescribeClustersRequest = exports.DescribeClustersRequest || (exports.DescribeClustersRequest = {}));\nvar DescribeClustersResponse;\n(function (DescribeClustersResponse) {\n /**\n * @internal\n */\n DescribeClustersResponse.filterSensitiveLog = (obj) => ({\n ...obj,\n });\n})(DescribeClustersResponse = exports.DescribeClustersResponse || (exports.DescribeClustersResponse = {}));\nvar ContainerInstanceField;\n(function (ContainerInstanceField) {\n ContainerInstanceField[\"TAGS\"] = \"TAGS\";\n})(ContainerInstanceField = exports.ContainerInstanceField || (exports.ContainerInstanceField = {}));\nvar DescribeContainerInstancesRequest;\n(function (DescribeContainerInstancesRequest) {\n /**\n * @internal\n */\n DescribeContainerInstancesRequest.filterSensitiveLog = (obj) => ({\n ...obj,\n });\n})(DescribeContainerInstancesRequest = exports.DescribeContainerInstancesRequest || (exports.DescribeContainerInstancesRequest = {}));\nvar DescribeContainerInstancesResponse;\n(function (DescribeContainerInstancesResponse) {\n /**\n * @internal\n */\n DescribeContainerInstancesResponse.filterSensitiveLog = (obj) => ({\n ...obj,\n });\n})(DescribeContainerInstancesResponse = exports.DescribeContainerInstancesResponse || (exports.DescribeContainerInstancesResponse = {}));\nvar ServiceField;\n(function (ServiceField) {\n ServiceField[\"TAGS\"] = \"TAGS\";\n})(ServiceField = exports.ServiceField || (exports.ServiceField = {}));\nvar DescribeServicesRequest;\n(function (DescribeServicesRequest) {\n /**\n * @internal\n */\n DescribeServicesRequest.filterSensitiveLog = (obj) => ({\n ...obj,\n });\n})(DescribeServicesRequest = exports.DescribeServicesRequest || (exports.DescribeServicesRequest = {}));\nvar DescribeServicesResponse;\n(function (DescribeServicesResponse) {\n /**\n * @internal\n */\n DescribeServicesResponse.filterSensitiveLog = (obj) => ({\n ...obj,\n });\n})(DescribeServicesResponse = exports.DescribeServicesResponse || (exports.DescribeServicesResponse = {}));\nvar TaskDefinitionField;\n(function (TaskDefinitionField) {\n TaskDefinitionField[\"TAGS\"] = \"TAGS\";\n})(TaskDefinitionField = exports.TaskDefinitionField || (exports.TaskDefinitionField = {}));\nvar DescribeTaskDefinitionRequest;\n(function (DescribeTaskDefinitionRequest) {\n /**\n * @internal\n */\n DescribeTaskDefinitionRequest.filterSensitiveLog = (obj) => ({\n ...obj,\n });\n})(DescribeTaskDefinitionRequest = exports.DescribeTaskDefinitionRequest || (exports.DescribeTaskDefinitionRequest = {}));\nvar DescribeTaskDefinitionResponse;\n(function (DescribeTaskDefinitionResponse) {\n /**\n * @internal\n */\n DescribeTaskDefinitionResponse.filterSensitiveLog = (obj) => ({\n ...obj,\n });\n})(DescribeTaskDefinitionResponse = exports.DescribeTaskDefinitionResponse || (exports.DescribeTaskDefinitionResponse = {}));\nvar TaskField;\n(function (TaskField) {\n TaskField[\"TAGS\"] = \"TAGS\";\n})(TaskField = exports.TaskField || (exports.TaskField = {}));\nvar DescribeTasksRequest;\n(function (DescribeTasksRequest) {\n /**\n * @internal\n */\n DescribeTasksRequest.filterSensitiveLog = (obj) => ({\n ...obj,\n });\n})(DescribeTasksRequest = exports.DescribeTasksRequest || (exports.DescribeTasksRequest = {}));\nvar Connectivity;\n(function (Connectivity) {\n Connectivity[\"CONNECTED\"] = \"CONNECTED\";\n Connectivity[\"DISCONNECTED\"] = \"DISCONNECTED\";\n})(Connectivity = exports.Connectivity || (exports.Connectivity = {}));\nvar HealthStatus;\n(function (HealthStatus) {\n HealthStatus[\"HEALTHY\"] = \"HEALTHY\";\n HealthStatus[\"UNHEALTHY\"] = \"UNHEALTHY\";\n HealthStatus[\"UNKNOWN\"] = \"UNKNOWN\";\n})(HealthStatus = exports.HealthStatus || (exports.HealthStatus = {}));\nvar ManagedAgentName;\n(function (ManagedAgentName) {\n ManagedAgentName[\"ExecuteCommandAgent\"] = \"ExecuteCommandAgent\";\n})(ManagedAgentName = exports.ManagedAgentName || (exports.ManagedAgentName = {}));\nvar ManagedAgent;\n(function (ManagedAgent) {\n /**\n * @internal\n */\n ManagedAgent.filterSensitiveLog = (obj) => ({\n ...obj,\n });\n})(ManagedAgent = exports.ManagedAgent || (exports.ManagedAgent = {}));\nvar NetworkBinding;\n(function (NetworkBinding) {\n /**\n * @internal\n */\n NetworkBinding.filterSensitiveLog = (obj) => ({\n ...obj,\n });\n})(NetworkBinding = exports.NetworkBinding || (exports.NetworkBinding = {}));\nvar NetworkInterface;\n(function (NetworkInterface) {\n /**\n * @internal\n */\n NetworkInterface.filterSensitiveLog = (obj) => ({\n ...obj,\n });\n})(NetworkInterface = exports.NetworkInterface || (exports.NetworkInterface = {}));\nvar Container;\n(function (Container) {\n /**\n * @internal\n */\n Container.filterSensitiveLog = (obj) => ({\n ...obj,\n });\n})(Container = exports.Container || (exports.Container = {}));\nvar ContainerOverride;\n(function (ContainerOverride) {\n /**\n * @internal\n */\n ContainerOverride.filterSensitiveLog = (obj) => ({\n ...obj,\n });\n})(ContainerOverride = exports.ContainerOverride || (exports.ContainerOverride = {}));\nvar InferenceAcceleratorOverride;\n(function (InferenceAcceleratorOverride) {\n /**\n * @internal\n */\n InferenceAcceleratorOverride.filterSensitiveLog = (obj) => ({\n ...obj,\n });\n})(InferenceAcceleratorOverride = exports.InferenceAcceleratorOverride || (exports.InferenceAcceleratorOverride = {}));\nvar TaskOverride;\n(function (TaskOverride) {\n /**\n * @internal\n */\n TaskOverride.filterSensitiveLog = (obj) => ({\n ...obj,\n });\n})(TaskOverride = exports.TaskOverride || (exports.TaskOverride = {}));\nvar TaskStopCode;\n(function (TaskStopCode) {\n TaskStopCode[\"ESSENTIAL_CONTAINER_EXITED\"] = \"EssentialContainerExited\";\n TaskStopCode[\"TASK_FAILED_TO_START\"] = \"TaskFailedToStart\";\n TaskStopCode[\"USER_INITIATED\"] = \"UserInitiated\";\n})(TaskStopCode = exports.TaskStopCode || (exports.TaskStopCode = {}));\nvar Task;\n(function (Task) {\n /**\n * @internal\n */\n Task.filterSensitiveLog = (obj) => ({\n ...obj,\n });\n})(Task = exports.Task || (exports.Task = {}));\nvar DescribeTasksResponse;\n(function (DescribeTasksResponse) {\n /**\n * @internal\n */\n DescribeTasksResponse.filterSensitiveLog = (obj) => ({\n ...obj,\n });\n})(DescribeTasksResponse = exports.DescribeTasksResponse || (exports.DescribeTasksResponse = {}));\nvar TaskSetField;\n(function (TaskSetField) {\n TaskSetField[\"TAGS\"] = \"TAGS\";\n})(TaskSetField = exports.TaskSetField || (exports.TaskSetField = {}));\nvar DescribeTaskSetsRequest;\n(function (DescribeTaskSetsRequest) {\n /**\n * @internal\n */\n DescribeTaskSetsRequest.filterSensitiveLog = (obj) => ({\n ...obj,\n });\n})(DescribeTaskSetsRequest = exports.DescribeTaskSetsRequest || (exports.DescribeTaskSetsRequest = {}));\nvar DescribeTaskSetsResponse;\n(function (DescribeTaskSetsResponse) {\n /**\n * @internal\n */\n DescribeTaskSetsResponse.filterSensitiveLog = (obj) => ({\n ...obj,\n });\n})(DescribeTaskSetsResponse = exports.DescribeTaskSetsResponse || (exports.DescribeTaskSetsResponse = {}));\nvar DiscoverPollEndpointRequest;\n(function (DiscoverPollEndpointRequest) {\n /**\n * @internal\n */\n DiscoverPollEndpointRequest.filterSensitiveLog = (obj) => ({\n ...obj,\n });\n})(DiscoverPollEndpointRequest = exports.DiscoverPollEndpointRequest || (exports.DiscoverPollEndpointRequest = {}));\nvar DiscoverPollEndpointResponse;\n(function (DiscoverPollEndpointResponse) {\n /**\n * @internal\n */\n DiscoverPollEndpointResponse.filterSensitiveLog = (obj) => ({\n ...obj,\n });\n})(DiscoverPollEndpointResponse = exports.DiscoverPollEndpointResponse || (exports.DiscoverPollEndpointResponse = {}));\nvar ExecuteCommandRequest;\n(function (ExecuteCommandRequest) {\n /**\n * @internal\n */\n ExecuteCommandRequest.filterSensitiveLog = (obj) => ({\n ...obj,\n });\n})(ExecuteCommandRequest = exports.ExecuteCommandRequest || (exports.ExecuteCommandRequest = {}));\nvar Session;\n(function (Session) {\n /**\n * @internal\n */\n Session.filterSensitiveLog = (obj) => ({\n ...obj,\n ...(obj.tokenValue && { tokenValue: smithy_client_1.SENSITIVE_STRING }),\n });\n})(Session = exports.Session || (exports.Session = {}));\nvar ExecuteCommandResponse;\n(function (ExecuteCommandResponse) {\n /**\n * @internal\n */\n ExecuteCommandResponse.filterSensitiveLog = (obj) => ({\n ...obj,\n ...(obj.session && { session: Session.filterSensitiveLog(obj.session) }),\n });\n})(ExecuteCommandResponse = exports.ExecuteCommandResponse || (exports.ExecuteCommandResponse = {}));\nvar TargetNotConnectedException;\n(function (TargetNotConnectedException) {\n /**\n * @internal\n */\n TargetNotConnectedException.filterSensitiveLog = (obj) => ({\n ...obj,\n });\n})(TargetNotConnectedException = exports.TargetNotConnectedException || (exports.TargetNotConnectedException = {}));\nvar ListAccountSettingsRequest;\n(function (ListAccountSettingsRequest) {\n /**\n * @internal\n */\n ListAccountSettingsRequest.filterSensitiveLog = (obj) => ({\n ...obj,\n });\n})(ListAccountSettingsRequest = exports.ListAccountSettingsRequest || (exports.ListAccountSettingsRequest = {}));\nvar ListAccountSettingsResponse;\n(function (ListAccountSettingsResponse) {\n /**\n * @internal\n */\n ListAccountSettingsResponse.filterSensitiveLog = (obj) => ({\n ...obj,\n });\n})(ListAccountSettingsResponse = exports.ListAccountSettingsResponse || (exports.ListAccountSettingsResponse = {}));\nvar ListAttributesRequest;\n(function (ListAttributesRequest) {\n /**\n * @internal\n */\n ListAttributesRequest.filterSensitiveLog = (obj) => ({\n ...obj,\n });\n})(ListAttributesRequest = exports.ListAttributesRequest || (exports.ListAttributesRequest = {}));\nvar ListAttributesResponse;\n(function (ListAttributesResponse) {\n /**\n * @internal\n */\n ListAttributesResponse.filterSensitiveLog = (obj) => ({\n ...obj,\n });\n})(ListAttributesResponse = exports.ListAttributesResponse || (exports.ListAttributesResponse = {}));\nvar ListClustersRequest;\n(function (ListClustersRequest) {\n /**\n * @internal\n */\n ListClustersRequest.filterSensitiveLog = (obj) => ({\n ...obj,\n });\n})(ListClustersRequest = exports.ListClustersRequest || (exports.ListClustersRequest = {}));\nvar ListClustersResponse;\n(function (ListClustersResponse) {\n /**\n * @internal\n */\n ListClustersResponse.filterSensitiveLog = (obj) => ({\n ...obj,\n });\n})(ListClustersResponse = exports.ListClustersResponse || (exports.ListClustersResponse = {}));\nvar ContainerInstanceStatus;\n(function (ContainerInstanceStatus) {\n ContainerInstanceStatus[\"ACTIVE\"] = \"ACTIVE\";\n ContainerInstanceStatus[\"DEREGISTERING\"] = \"DEREGISTERING\";\n ContainerInstanceStatus[\"DRAINING\"] = \"DRAINING\";\n ContainerInstanceStatus[\"REGISTERING\"] = \"REGISTERING\";\n ContainerInstanceStatus[\"REGISTRATION_FAILED\"] = \"REGISTRATION_FAILED\";\n})(ContainerInstanceStatus = exports.ContainerInstanceStatus || (exports.ContainerInstanceStatus = {}));\nvar ListContainerInstancesRequest;\n(function (ListContainerInstancesRequest) {\n /**\n * @internal\n */\n ListContainerInstancesRequest.filterSensitiveLog = (obj) => ({\n ...obj,\n });\n})(ListContainerInstancesRequest = exports.ListContainerInstancesRequest || (exports.ListContainerInstancesRequest = {}));\nvar ListContainerInstancesResponse;\n(function (ListContainerInstancesResponse) {\n /**\n * @internal\n */\n ListContainerInstancesResponse.filterSensitiveLog = (obj) => ({\n ...obj,\n });\n})(ListContainerInstancesResponse = exports.ListContainerInstancesResponse || (exports.ListContainerInstancesResponse = {}));\nvar ListServicesRequest;\n(function (ListServicesRequest) {\n /**\n * @internal\n */\n ListServicesRequest.filterSensitiveLog = (obj) => ({\n ...obj,\n });\n})(ListServicesRequest = exports.ListServicesRequest || (exports.ListServicesRequest = {}));\nvar ListServicesResponse;\n(function (ListServicesResponse) {\n /**\n * @internal\n */\n ListServicesResponse.filterSensitiveLog = (obj) => ({\n ...obj,\n });\n})(ListServicesResponse = exports.ListServicesResponse || (exports.ListServicesResponse = {}));\nvar ListTagsForResourceRequest;\n(function (ListTagsForResourceRequest) {\n /**\n * @internal\n */\n ListTagsForResourceRequest.filterSensitiveLog = (obj) => ({\n ...obj,\n });\n})(ListTagsForResourceRequest = exports.ListTagsForResourceRequest || (exports.ListTagsForResourceRequest = {}));\nvar ListTagsForResourceResponse;\n(function (ListTagsForResourceResponse) {\n /**\n * @internal\n */\n ListTagsForResourceResponse.filterSensitiveLog = (obj) => ({\n ...obj,\n });\n})(ListTagsForResourceResponse = exports.ListTagsForResourceResponse || (exports.ListTagsForResourceResponse = {}));\nvar TaskDefinitionFamilyStatus;\n(function (TaskDefinitionFamilyStatus) {\n TaskDefinitionFamilyStatus[\"ACTIVE\"] = \"ACTIVE\";\n TaskDefinitionFamilyStatus[\"ALL\"] = \"ALL\";\n TaskDefinitionFamilyStatus[\"INACTIVE\"] = \"INACTIVE\";\n})(TaskDefinitionFamilyStatus = exports.TaskDefinitionFamilyStatus || (exports.TaskDefinitionFamilyStatus = {}));\nvar ListTaskDefinitionFamiliesRequest;\n(function (ListTaskDefinitionFamiliesRequest) {\n /**\n * @internal\n */\n ListTaskDefinitionFamiliesRequest.filterSensitiveLog = (obj) => ({\n ...obj,\n });\n})(ListTaskDefinitionFamiliesRequest = exports.ListTaskDefinitionFamiliesRequest || (exports.ListTaskDefinitionFamiliesRequest = {}));\nvar ListTaskDefinitionFamiliesResponse;\n(function (ListTaskDefinitionFamiliesResponse) {\n /**\n * @internal\n */\n ListTaskDefinitionFamiliesResponse.filterSensitiveLog = (obj) => ({\n ...obj,\n });\n})(ListTaskDefinitionFamiliesResponse = exports.ListTaskDefinitionFamiliesResponse || (exports.ListTaskDefinitionFamiliesResponse = {}));\nvar SortOrder;\n(function (SortOrder) {\n SortOrder[\"ASC\"] = \"ASC\";\n SortOrder[\"DESC\"] = \"DESC\";\n})(SortOrder = exports.SortOrder || (exports.SortOrder = {}));\nvar ListTaskDefinitionsRequest;\n(function (ListTaskDefinitionsRequest) {\n /**\n * @internal\n */\n ListTaskDefinitionsRequest.filterSensitiveLog = (obj) => ({\n ...obj,\n });\n})(ListTaskDefinitionsRequest = exports.ListTaskDefinitionsRequest || (exports.ListTaskDefinitionsRequest = {}));\nvar ListTaskDefinitionsResponse;\n(function (ListTaskDefinitionsResponse) {\n /**\n * @internal\n */\n ListTaskDefinitionsResponse.filterSensitiveLog = (obj) => ({\n ...obj,\n });\n})(ListTaskDefinitionsResponse = exports.ListTaskDefinitionsResponse || (exports.ListTaskDefinitionsResponse = {}));\nvar DesiredStatus;\n(function (DesiredStatus) {\n DesiredStatus[\"PENDING\"] = \"PENDING\";\n DesiredStatus[\"RUNNING\"] = \"RUNNING\";\n DesiredStatus[\"STOPPED\"] = \"STOPPED\";\n})(DesiredStatus = exports.DesiredStatus || (exports.DesiredStatus = {}));\nvar ListTasksRequest;\n(function (ListTasksRequest) {\n /**\n * @internal\n */\n ListTasksRequest.filterSensitiveLog = (obj) => ({\n ...obj,\n });\n})(ListTasksRequest = exports.ListTasksRequest || (exports.ListTasksRequest = {}));\nvar ListTasksResponse;\n(function (ListTasksResponse) {\n /**\n * @internal\n */\n ListTasksResponse.filterSensitiveLog = (obj) => ({\n ...obj,\n });\n})(ListTasksResponse = exports.ListTasksResponse || (exports.ListTasksResponse = {}));\nvar PutAccountSettingRequest;\n(function (PutAccountSettingRequest) {\n /**\n * @internal\n */\n PutAccountSettingRequest.filterSensitiveLog = (obj) => ({\n ...obj,\n });\n})(PutAccountSettingRequest = exports.PutAccountSettingRequest || (exports.PutAccountSettingRequest = {}));\nvar PutAccountSettingResponse;\n(function (PutAccountSettingResponse) {\n /**\n * @internal\n */\n PutAccountSettingResponse.filterSensitiveLog = (obj) => ({\n ...obj,\n });\n})(PutAccountSettingResponse = exports.PutAccountSettingResponse || (exports.PutAccountSettingResponse = {}));\nvar PutAccountSettingDefaultRequest;\n(function (PutAccountSettingDefaultRequest) {\n /**\n * @internal\n */\n PutAccountSettingDefaultRequest.filterSensitiveLog = (obj) => ({\n ...obj,\n });\n})(PutAccountSettingDefaultRequest = exports.PutAccountSettingDefaultRequest || (exports.PutAccountSettingDefaultRequest = {}));\nvar PutAccountSettingDefaultResponse;\n(function (PutAccountSettingDefaultResponse) {\n /**\n * @internal\n */\n PutAccountSettingDefaultResponse.filterSensitiveLog = (obj) => ({\n ...obj,\n });\n})(PutAccountSettingDefaultResponse = exports.PutAccountSettingDefaultResponse || (exports.PutAccountSettingDefaultResponse = {}));\nvar AttributeLimitExceededException;\n(function (AttributeLimitExceededException) {\n /**\n * @internal\n */\n AttributeLimitExceededException.filterSensitiveLog = (obj) => ({\n ...obj,\n });\n})(AttributeLimitExceededException = exports.AttributeLimitExceededException || (exports.AttributeLimitExceededException = {}));\nvar PutAttributesRequest;\n(function (PutAttributesRequest) {\n /**\n * @internal\n */\n PutAttributesRequest.filterSensitiveLog = (obj) => ({\n ...obj,\n });\n})(PutAttributesRequest = exports.PutAttributesRequest || (exports.PutAttributesRequest = {}));\nvar PutAttributesResponse;\n(function (PutAttributesResponse) {\n /**\n * @internal\n */\n PutAttributesResponse.filterSensitiveLog = (obj) => ({\n ...obj,\n });\n})(PutAttributesResponse = exports.PutAttributesResponse || (exports.PutAttributesResponse = {}));\nvar PutClusterCapacityProvidersRequest;\n(function (PutClusterCapacityProvidersRequest) {\n /**\n * @internal\n */\n PutClusterCapacityProvidersRequest.filterSensitiveLog = (obj) => ({\n ...obj,\n });\n})(PutClusterCapacityProvidersRequest = exports.PutClusterCapacityProvidersRequest || (exports.PutClusterCapacityProvidersRequest = {}));\nvar PutClusterCapacityProvidersResponse;\n(function (PutClusterCapacityProvidersResponse) {\n /**\n * @internal\n */\n PutClusterCapacityProvidersResponse.filterSensitiveLog = (obj) => ({\n ...obj,\n });\n})(PutClusterCapacityProvidersResponse = exports.PutClusterCapacityProvidersResponse || (exports.PutClusterCapacityProvidersResponse = {}));\nvar ResourceInUseException;\n(function (ResourceInUseException) {\n /**\n * @internal\n */\n ResourceInUseException.filterSensitiveLog = (obj) => ({\n ...obj,\n });\n})(ResourceInUseException = exports.ResourceInUseException || (exports.ResourceInUseException = {}));\nvar PlatformDeviceType;\n(function (PlatformDeviceType) {\n PlatformDeviceType[\"GPU\"] = \"GPU\";\n})(PlatformDeviceType = exports.PlatformDeviceType || (exports.PlatformDeviceType = {}));\nvar PlatformDevice;\n(function (PlatformDevice) {\n /**\n * @internal\n */\n PlatformDevice.filterSensitiveLog = (obj) => ({\n ...obj,\n });\n})(PlatformDevice = exports.PlatformDevice || (exports.PlatformDevice = {}));\nvar RegisterContainerInstanceRequest;\n(function (RegisterContainerInstanceRequest) {\n /**\n * @internal\n */\n RegisterContainerInstanceRequest.filterSensitiveLog = (obj) => ({\n ...obj,\n });\n})(RegisterContainerInstanceRequest = exports.RegisterContainerInstanceRequest || (exports.RegisterContainerInstanceRequest = {}));\nvar RegisterContainerInstanceResponse;\n(function (RegisterContainerInstanceResponse) {\n /**\n * @internal\n */\n RegisterContainerInstanceResponse.filterSensitiveLog = (obj) => ({\n ...obj,\n });\n})(RegisterContainerInstanceResponse = exports.RegisterContainerInstanceResponse || (exports.RegisterContainerInstanceResponse = {}));\nvar RegisterTaskDefinitionRequest;\n(function (RegisterTaskDefinitionRequest) {\n /**\n * @internal\n */\n RegisterTaskDefinitionRequest.filterSensitiveLog = (obj) => ({\n ...obj,\n });\n})(RegisterTaskDefinitionRequest = exports.RegisterTaskDefinitionRequest || (exports.RegisterTaskDefinitionRequest = {}));\nvar RegisterTaskDefinitionResponse;\n(function (RegisterTaskDefinitionResponse) {\n /**\n * @internal\n */\n RegisterTaskDefinitionResponse.filterSensitiveLog = (obj) => ({\n ...obj,\n });\n})(RegisterTaskDefinitionResponse = exports.RegisterTaskDefinitionResponse || (exports.RegisterTaskDefinitionResponse = {}));\nvar BlockedException;\n(function (BlockedException) {\n /**\n * @internal\n */\n BlockedException.filterSensitiveLog = (obj) => ({\n ...obj,\n });\n})(BlockedException = exports.BlockedException || (exports.BlockedException = {}));\nvar RunTaskRequest;\n(function (RunTaskRequest) {\n /**\n * @internal\n */\n RunTaskRequest.filterSensitiveLog = (obj) => ({\n ...obj,\n });\n})(RunTaskRequest = exports.RunTaskRequest || (exports.RunTaskRequest = {}));\nvar RunTaskResponse;\n(function (RunTaskResponse) {\n /**\n * @internal\n */\n RunTaskResponse.filterSensitiveLog = (obj) => ({\n ...obj,\n });\n})(RunTaskResponse = exports.RunTaskResponse || (exports.RunTaskResponse = {}));\nvar StartTaskRequest;\n(function (StartTaskRequest) {\n /**\n * @internal\n */\n StartTaskRequest.filterSensitiveLog = (obj) => ({\n ...obj,\n });\n})(StartTaskRequest = exports.StartTaskRequest || (exports.StartTaskRequest = {}));\nvar StartTaskResponse;\n(function (StartTaskResponse) {\n /**\n * @internal\n */\n StartTaskResponse.filterSensitiveLog = (obj) => ({\n ...obj,\n });\n})(StartTaskResponse = exports.StartTaskResponse || (exports.StartTaskResponse = {}));\nvar StopTaskRequest;\n(function (StopTaskRequest) {\n /**\n * @internal\n */\n StopTaskRequest.filterSensitiveLog = (obj) => ({\n ...obj,\n });\n})(StopTaskRequest = exports.StopTaskRequest || (exports.StopTaskRequest = {}));\nvar StopTaskResponse;\n(function (StopTaskResponse) {\n /**\n * @internal\n */\n StopTaskResponse.filterSensitiveLog = (obj) => ({\n ...obj,\n });\n})(StopTaskResponse = exports.StopTaskResponse || (exports.StopTaskResponse = {}));\nvar AttachmentStateChange;\n(function (AttachmentStateChange) {\n /**\n * @internal\n */\n AttachmentStateChange.filterSensitiveLog = (obj) => ({\n ...obj,\n });\n})(AttachmentStateChange = exports.AttachmentStateChange || (exports.AttachmentStateChange = {}));\nvar SubmitAttachmentStateChangesRequest;\n(function (SubmitAttachmentStateChangesRequest) {\n /**\n * @internal\n */\n SubmitAttachmentStateChangesRequest.filterSensitiveLog = (obj) => ({\n ...obj,\n });\n})(SubmitAttachmentStateChangesRequest = exports.SubmitAttachmentStateChangesRequest || (exports.SubmitAttachmentStateChangesRequest = {}));\nvar SubmitAttachmentStateChangesResponse;\n(function (SubmitAttachmentStateChangesResponse) {\n /**\n * @internal\n */\n SubmitAttachmentStateChangesResponse.filterSensitiveLog = (obj) => ({\n ...obj,\n });\n})(SubmitAttachmentStateChangesResponse = exports.SubmitAttachmentStateChangesResponse || (exports.SubmitAttachmentStateChangesResponse = {}));\nvar SubmitContainerStateChangeRequest;\n(function (SubmitContainerStateChangeRequest) {\n /**\n * @internal\n */\n SubmitContainerStateChangeRequest.filterSensitiveLog = (obj) => ({\n ...obj,\n });\n})(SubmitContainerStateChangeRequest = exports.SubmitContainerStateChangeRequest || (exports.SubmitContainerStateChangeRequest = {}));\nvar SubmitContainerStateChangeResponse;\n(function (SubmitContainerStateChangeResponse) {\n /**\n * @internal\n */\n SubmitContainerStateChangeResponse.filterSensitiveLog = (obj) => ({\n ...obj,\n });\n})(SubmitContainerStateChangeResponse = exports.SubmitContainerStateChangeResponse || (exports.SubmitContainerStateChangeResponse = {}));\nvar ContainerStateChange;\n(function (ContainerStateChange) {\n /**\n * @internal\n */\n ContainerStateChange.filterSensitiveLog = (obj) => ({\n ...obj,\n });\n})(ContainerStateChange = exports.ContainerStateChange || (exports.ContainerStateChange = {}));\nvar ManagedAgentStateChange;\n(function (ManagedAgentStateChange) {\n /**\n * @internal\n */\n ManagedAgentStateChange.filterSensitiveLog = (obj) => ({\n ...obj,\n });\n})(ManagedAgentStateChange = exports.ManagedAgentStateChange || (exports.ManagedAgentStateChange = {}));\nvar SubmitTaskStateChangeRequest;\n(function (SubmitTaskStateChangeRequest) {\n /**\n * @internal\n */\n SubmitTaskStateChangeRequest.filterSensitiveLog = (obj) => ({\n ...obj,\n });\n})(SubmitTaskStateChangeRequest = exports.SubmitTaskStateChangeRequest || (exports.SubmitTaskStateChangeRequest = {}));\nvar SubmitTaskStateChangeResponse;\n(function (SubmitTaskStateChangeResponse) {\n /**\n * @internal\n */\n SubmitTaskStateChangeResponse.filterSensitiveLog = (obj) => ({\n ...obj,\n });\n})(SubmitTaskStateChangeResponse = exports.SubmitTaskStateChangeResponse || (exports.SubmitTaskStateChangeResponse = {}));\nvar ResourceNotFoundException;\n(function (ResourceNotFoundException) {\n /**\n * @internal\n */\n ResourceNotFoundException.filterSensitiveLog = (obj) => ({\n ...obj,\n });\n})(ResourceNotFoundException = exports.ResourceNotFoundException || (exports.ResourceNotFoundException = {}));\nvar TagResourceRequest;\n(function (TagResourceRequest) {\n /**\n * @internal\n */\n TagResourceRequest.filterSensitiveLog = (obj) => ({\n ...obj,\n });\n})(TagResourceRequest = exports.TagResourceRequest || (exports.TagResourceRequest = {}));\nvar TagResourceResponse;\n(function (TagResourceResponse) {\n /**\n * @internal\n */\n TagResourceResponse.filterSensitiveLog = (obj) => ({\n ...obj,\n });\n})(TagResourceResponse = exports.TagResourceResponse || (exports.TagResourceResponse = {}));\nvar UntagResourceRequest;\n(function (UntagResourceRequest) {\n /**\n * @internal\n */\n UntagResourceRequest.filterSensitiveLog = (obj) => ({\n ...obj,\n });\n})(UntagResourceRequest = exports.UntagResourceRequest || (exports.UntagResourceRequest = {}));\nvar UntagResourceResponse;\n(function (UntagResourceResponse) {\n /**\n * @internal\n */\n UntagResourceResponse.filterSensitiveLog = (obj) => ({\n ...obj,\n });\n})(UntagResourceResponse = exports.UntagResourceResponse || (exports.UntagResourceResponse = {}));\nvar AutoScalingGroupProviderUpdate;\n(function (AutoScalingGroupProviderUpdate) {\n /**\n * @internal\n */\n AutoScalingGroupProviderUpdate.filterSensitiveLog = (obj) => ({\n ...obj,\n });\n})(AutoScalingGroupProviderUpdate = exports.AutoScalingGroupProviderUpdate || (exports.AutoScalingGroupProviderUpdate = {}));\nvar UpdateCapacityProviderRequest;\n(function (UpdateCapacityProviderRequest) {\n /**\n * @internal\n */\n UpdateCapacityProviderRequest.filterSensitiveLog = (obj) => ({\n ...obj,\n });\n})(UpdateCapacityProviderRequest = exports.UpdateCapacityProviderRequest || (exports.UpdateCapacityProviderRequest = {}));\nvar UpdateCapacityProviderResponse;\n(function (UpdateCapacityProviderResponse) {\n /**\n * @internal\n */\n UpdateCapacityProviderResponse.filterSensitiveLog = (obj) => ({\n ...obj,\n });\n})(UpdateCapacityProviderResponse = exports.UpdateCapacityProviderResponse || (exports.UpdateCapacityProviderResponse = {}));\nvar UpdateClusterRequest;\n(function (UpdateClusterRequest) {\n /**\n * @internal\n */\n UpdateClusterRequest.filterSensitiveLog = (obj) => ({\n ...obj,\n });\n})(UpdateClusterRequest = exports.UpdateClusterRequest || (exports.UpdateClusterRequest = {}));\nvar UpdateClusterResponse;\n(function (UpdateClusterResponse) {\n /**\n * @internal\n */\n UpdateClusterResponse.filterSensitiveLog = (obj) => ({\n ...obj,\n });\n})(UpdateClusterResponse = exports.UpdateClusterResponse || (exports.UpdateClusterResponse = {}));\nvar UpdateClusterSettingsRequest;\n(function (UpdateClusterSettingsRequest) {\n /**\n * @internal\n */\n UpdateClusterSettingsRequest.filterSensitiveLog = (obj) => ({\n ...obj,\n });\n})(UpdateClusterSettingsRequest = exports.UpdateClusterSettingsRequest || (exports.UpdateClusterSettingsRequest = {}));\nvar UpdateClusterSettingsResponse;\n(function (UpdateClusterSettingsResponse) {\n /**\n * @internal\n */\n UpdateClusterSettingsResponse.filterSensitiveLog = (obj) => ({\n ...obj,\n });\n})(UpdateClusterSettingsResponse = exports.UpdateClusterSettingsResponse || (exports.UpdateClusterSettingsResponse = {}));\nvar MissingVersionException;\n(function (MissingVersionException) {\n /**\n * @internal\n */\n MissingVersionException.filterSensitiveLog = (obj) => ({\n ...obj,\n });\n})(MissingVersionException = exports.MissingVersionException || (exports.MissingVersionException = {}));\nvar NoUpdateAvailableException;\n(function (NoUpdateAvailableException) {\n /**\n * @internal\n */\n NoUpdateAvailableException.filterSensitiveLog = (obj) => ({\n ...obj,\n });\n})(NoUpdateAvailableException = exports.NoUpdateAvailableException || (exports.NoUpdateAvailableException = {}));\nvar UpdateContainerAgentRequest;\n(function (UpdateContainerAgentRequest) {\n /**\n * @internal\n */\n UpdateContainerAgentRequest.filterSensitiveLog = (obj) => ({\n ...obj,\n });\n})(UpdateContainerAgentRequest = exports.UpdateContainerAgentRequest || (exports.UpdateContainerAgentRequest = {}));\nvar UpdateContainerAgentResponse;\n(function (UpdateContainerAgentResponse) {\n /**\n * @internal\n */\n UpdateContainerAgentResponse.filterSensitiveLog = (obj) => ({\n ...obj,\n });\n})(UpdateContainerAgentResponse = exports.UpdateContainerAgentResponse || (exports.UpdateContainerAgentResponse = {}));\nvar UpdateContainerInstancesStateRequest;\n(function (UpdateContainerInstancesStateRequest) {\n /**\n * @internal\n */\n UpdateContainerInstancesStateRequest.filterSensitiveLog = (obj) => ({\n ...obj,\n });\n})(UpdateContainerInstancesStateRequest = exports.UpdateContainerInstancesStateRequest || (exports.UpdateContainerInstancesStateRequest = {}));\nvar UpdateContainerInstancesStateResponse;\n(function (UpdateContainerInstancesStateResponse) {\n /**\n * @internal\n */\n UpdateContainerInstancesStateResponse.filterSensitiveLog = (obj) => ({\n ...obj,\n });\n})(UpdateContainerInstancesStateResponse = exports.UpdateContainerInstancesStateResponse || (exports.UpdateContainerInstancesStateResponse = {}));\nvar UpdateServiceRequest;\n(function (UpdateServiceRequest) {\n /**\n * @internal\n */\n UpdateServiceRequest.filterSensitiveLog = (obj) => ({\n ...obj,\n });\n})(UpdateServiceRequest = exports.UpdateServiceRequest || (exports.UpdateServiceRequest = {}));\nvar UpdateServiceResponse;\n(function (UpdateServiceResponse) {\n /**\n * @internal\n */\n UpdateServiceResponse.filterSensitiveLog = (obj) => ({\n ...obj,\n });\n})(UpdateServiceResponse = exports.UpdateServiceResponse || (exports.UpdateServiceResponse = {}));\nvar UpdateServicePrimaryTaskSetRequest;\n(function (UpdateServicePrimaryTaskSetRequest) {\n /**\n * @internal\n */\n UpdateServicePrimaryTaskSetRequest.filterSensitiveLog = (obj) => ({\n ...obj,\n });\n})(UpdateServicePrimaryTaskSetRequest = exports.UpdateServicePrimaryTaskSetRequest || (exports.UpdateServicePrimaryTaskSetRequest = {}));\nvar UpdateServicePrimaryTaskSetResponse;\n(function (UpdateServicePrimaryTaskSetResponse) {\n /**\n * @internal\n */\n UpdateServicePrimaryTaskSetResponse.filterSensitiveLog = (obj) => ({\n ...obj,\n });\n})(UpdateServicePrimaryTaskSetResponse = exports.UpdateServicePrimaryTaskSetResponse || (exports.UpdateServicePrimaryTaskSetResponse = {}));\nvar UpdateTaskSetRequest;\n(function (UpdateTaskSetRequest) {\n /**\n * @internal\n */\n UpdateTaskSetRequest.filterSensitiveLog = (obj) => ({\n ...obj,\n });\n})(UpdateTaskSetRequest = exports.UpdateTaskSetRequest || (exports.UpdateTaskSetRequest = {}));\nvar UpdateTaskSetResponse;\n(function (UpdateTaskSetResponse) {\n /**\n * @internal\n */\n UpdateTaskSetResponse.filterSensitiveLog = (obj) => ({\n ...obj,\n });\n})(UpdateTaskSetResponse = exports.UpdateTaskSetResponse || (exports.UpdateTaskSetResponse = {}));\n//# sourceMappingURL=models_0.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\n//# sourceMappingURL=Interfaces.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.paginateListAccountSettings = void 0;\nconst ECS_1 = require(\"../ECS\");\nconst ECSClient_1 = require(\"../ECSClient\");\nconst ListAccountSettingsCommand_1 = require(\"../commands/ListAccountSettingsCommand\");\n/**\n * @private\n */\nconst makePagedClientRequest = async (client, input, ...args) => {\n // @ts-ignore\n return await client.send(new ListAccountSettingsCommand_1.ListAccountSettingsCommand(input), ...args);\n};\n/**\n * @private\n */\nconst makePagedRequest = async (client, input, ...args) => {\n // @ts-ignore\n return await client.listAccountSettings(input, ...args);\n};\nasync function* paginateListAccountSettings(config, input, ...additionalArguments) {\n // ToDo: replace with actual type instead of typeof input.nextToken\n let token = config.startingToken || undefined;\n let hasNext = true;\n let page;\n while (hasNext) {\n input.nextToken = token;\n input[\"maxResults\"] = config.pageSize;\n if (config.client instanceof ECS_1.ECS) {\n page = await makePagedRequest(config.client, input, ...additionalArguments);\n }\n else if (config.client instanceof ECSClient_1.ECSClient) {\n page = await makePagedClientRequest(config.client, input, ...additionalArguments);\n }\n else {\n throw new Error(\"Invalid client, expected ECS | ECSClient\");\n }\n yield page;\n token = page.nextToken;\n hasNext = !!token;\n }\n // @ts-ignore\n return undefined;\n}\nexports.paginateListAccountSettings = paginateListAccountSettings;\n//# sourceMappingURL=ListAccountSettingsPaginator.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.paginateListAttributes = void 0;\nconst ECS_1 = require(\"../ECS\");\nconst ECSClient_1 = require(\"../ECSClient\");\nconst ListAttributesCommand_1 = require(\"../commands/ListAttributesCommand\");\n/**\n * @private\n */\nconst makePagedClientRequest = async (client, input, ...args) => {\n // @ts-ignore\n return await client.send(new ListAttributesCommand_1.ListAttributesCommand(input), ...args);\n};\n/**\n * @private\n */\nconst makePagedRequest = async (client, input, ...args) => {\n // @ts-ignore\n return await client.listAttributes(input, ...args);\n};\nasync function* paginateListAttributes(config, input, ...additionalArguments) {\n // ToDo: replace with actual type instead of typeof input.nextToken\n let token = config.startingToken || undefined;\n let hasNext = true;\n let page;\n while (hasNext) {\n input.nextToken = token;\n input[\"maxResults\"] = config.pageSize;\n if (config.client instanceof ECS_1.ECS) {\n page = await makePagedRequest(config.client, input, ...additionalArguments);\n }\n else if (config.client instanceof ECSClient_1.ECSClient) {\n page = await makePagedClientRequest(config.client, input, ...additionalArguments);\n }\n else {\n throw new Error(\"Invalid client, expected ECS | ECSClient\");\n }\n yield page;\n token = page.nextToken;\n hasNext = !!token;\n }\n // @ts-ignore\n return undefined;\n}\nexports.paginateListAttributes = paginateListAttributes;\n//# sourceMappingURL=ListAttributesPaginator.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.paginateListClusters = void 0;\nconst ECS_1 = require(\"../ECS\");\nconst ECSClient_1 = require(\"../ECSClient\");\nconst ListClustersCommand_1 = require(\"../commands/ListClustersCommand\");\n/**\n * @private\n */\nconst makePagedClientRequest = async (client, input, ...args) => {\n // @ts-ignore\n return await client.send(new ListClustersCommand_1.ListClustersCommand(input), ...args);\n};\n/**\n * @private\n */\nconst makePagedRequest = async (client, input, ...args) => {\n // @ts-ignore\n return await client.listClusters(input, ...args);\n};\nasync function* paginateListClusters(config, input, ...additionalArguments) {\n // ToDo: replace with actual type instead of typeof input.nextToken\n let token = config.startingToken || undefined;\n let hasNext = true;\n let page;\n while (hasNext) {\n input.nextToken = token;\n input[\"maxResults\"] = config.pageSize;\n if (config.client instanceof ECS_1.ECS) {\n page = await makePagedRequest(config.client, input, ...additionalArguments);\n }\n else if (config.client instanceof ECSClient_1.ECSClient) {\n page = await makePagedClientRequest(config.client, input, ...additionalArguments);\n }\n else {\n throw new Error(\"Invalid client, expected ECS | ECSClient\");\n }\n yield page;\n token = page.nextToken;\n hasNext = !!token;\n }\n // @ts-ignore\n return undefined;\n}\nexports.paginateListClusters = paginateListClusters;\n//# sourceMappingURL=ListClustersPaginator.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.paginateListContainerInstances = void 0;\nconst ECS_1 = require(\"../ECS\");\nconst ECSClient_1 = require(\"../ECSClient\");\nconst ListContainerInstancesCommand_1 = require(\"../commands/ListContainerInstancesCommand\");\n/**\n * @private\n */\nconst makePagedClientRequest = async (client, input, ...args) => {\n // @ts-ignore\n return await client.send(new ListContainerInstancesCommand_1.ListContainerInstancesCommand(input), ...args);\n};\n/**\n * @private\n */\nconst makePagedRequest = async (client, input, ...args) => {\n // @ts-ignore\n return await client.listContainerInstances(input, ...args);\n};\nasync function* paginateListContainerInstances(config, input, ...additionalArguments) {\n // ToDo: replace with actual type instead of typeof input.nextToken\n let token = config.startingToken || undefined;\n let hasNext = true;\n let page;\n while (hasNext) {\n input.nextToken = token;\n input[\"maxResults\"] = config.pageSize;\n if (config.client instanceof ECS_1.ECS) {\n page = await makePagedRequest(config.client, input, ...additionalArguments);\n }\n else if (config.client instanceof ECSClient_1.ECSClient) {\n page = await makePagedClientRequest(config.client, input, ...additionalArguments);\n }\n else {\n throw new Error(\"Invalid client, expected ECS | ECSClient\");\n }\n yield page;\n token = page.nextToken;\n hasNext = !!token;\n }\n // @ts-ignore\n return undefined;\n}\nexports.paginateListContainerInstances = paginateListContainerInstances;\n//# sourceMappingURL=ListContainerInstancesPaginator.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.paginateListServices = void 0;\nconst ECS_1 = require(\"../ECS\");\nconst ECSClient_1 = require(\"../ECSClient\");\nconst ListServicesCommand_1 = require(\"../commands/ListServicesCommand\");\n/**\n * @private\n */\nconst makePagedClientRequest = async (client, input, ...args) => {\n // @ts-ignore\n return await client.send(new ListServicesCommand_1.ListServicesCommand(input), ...args);\n};\n/**\n * @private\n */\nconst makePagedRequest = async (client, input, ...args) => {\n // @ts-ignore\n return await client.listServices(input, ...args);\n};\nasync function* paginateListServices(config, input, ...additionalArguments) {\n // ToDo: replace with actual type instead of typeof input.nextToken\n let token = config.startingToken || undefined;\n let hasNext = true;\n let page;\n while (hasNext) {\n input.nextToken = token;\n input[\"maxResults\"] = config.pageSize;\n if (config.client instanceof ECS_1.ECS) {\n page = await makePagedRequest(config.client, input, ...additionalArguments);\n }\n else if (config.client instanceof ECSClient_1.ECSClient) {\n page = await makePagedClientRequest(config.client, input, ...additionalArguments);\n }\n else {\n throw new Error(\"Invalid client, expected ECS | ECSClient\");\n }\n yield page;\n token = page.nextToken;\n hasNext = !!token;\n }\n // @ts-ignore\n return undefined;\n}\nexports.paginateListServices = paginateListServices;\n//# sourceMappingURL=ListServicesPaginator.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.paginateListTaskDefinitionFamilies = void 0;\nconst ECS_1 = require(\"../ECS\");\nconst ECSClient_1 = require(\"../ECSClient\");\nconst ListTaskDefinitionFamiliesCommand_1 = require(\"../commands/ListTaskDefinitionFamiliesCommand\");\n/**\n * @private\n */\nconst makePagedClientRequest = async (client, input, ...args) => {\n // @ts-ignore\n return await client.send(new ListTaskDefinitionFamiliesCommand_1.ListTaskDefinitionFamiliesCommand(input), ...args);\n};\n/**\n * @private\n */\nconst makePagedRequest = async (client, input, ...args) => {\n // @ts-ignore\n return await client.listTaskDefinitionFamilies(input, ...args);\n};\nasync function* paginateListTaskDefinitionFamilies(config, input, ...additionalArguments) {\n // ToDo: replace with actual type instead of typeof input.nextToken\n let token = config.startingToken || undefined;\n let hasNext = true;\n let page;\n while (hasNext) {\n input.nextToken = token;\n input[\"maxResults\"] = config.pageSize;\n if (config.client instanceof ECS_1.ECS) {\n page = await makePagedRequest(config.client, input, ...additionalArguments);\n }\n else if (config.client instanceof ECSClient_1.ECSClient) {\n page = await makePagedClientRequest(config.client, input, ...additionalArguments);\n }\n else {\n throw new Error(\"Invalid client, expected ECS | ECSClient\");\n }\n yield page;\n token = page.nextToken;\n hasNext = !!token;\n }\n // @ts-ignore\n return undefined;\n}\nexports.paginateListTaskDefinitionFamilies = paginateListTaskDefinitionFamilies;\n//# sourceMappingURL=ListTaskDefinitionFamiliesPaginator.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.paginateListTaskDefinitions = void 0;\nconst ECS_1 = require(\"../ECS\");\nconst ECSClient_1 = require(\"../ECSClient\");\nconst ListTaskDefinitionsCommand_1 = require(\"../commands/ListTaskDefinitionsCommand\");\n/**\n * @private\n */\nconst makePagedClientRequest = async (client, input, ...args) => {\n // @ts-ignore\n return await client.send(new ListTaskDefinitionsCommand_1.ListTaskDefinitionsCommand(input), ...args);\n};\n/**\n * @private\n */\nconst makePagedRequest = async (client, input, ...args) => {\n // @ts-ignore\n return await client.listTaskDefinitions(input, ...args);\n};\nasync function* paginateListTaskDefinitions(config, input, ...additionalArguments) {\n // ToDo: replace with actual type instead of typeof input.nextToken\n let token = config.startingToken || undefined;\n let hasNext = true;\n let page;\n while (hasNext) {\n input.nextToken = token;\n input[\"maxResults\"] = config.pageSize;\n if (config.client instanceof ECS_1.ECS) {\n page = await makePagedRequest(config.client, input, ...additionalArguments);\n }\n else if (config.client instanceof ECSClient_1.ECSClient) {\n page = await makePagedClientRequest(config.client, input, ...additionalArguments);\n }\n else {\n throw new Error(\"Invalid client, expected ECS | ECSClient\");\n }\n yield page;\n token = page.nextToken;\n hasNext = !!token;\n }\n // @ts-ignore\n return undefined;\n}\nexports.paginateListTaskDefinitions = paginateListTaskDefinitions;\n//# sourceMappingURL=ListTaskDefinitionsPaginator.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.paginateListTasks = void 0;\nconst ECS_1 = require(\"../ECS\");\nconst ECSClient_1 = require(\"../ECSClient\");\nconst ListTasksCommand_1 = require(\"../commands/ListTasksCommand\");\n/**\n * @private\n */\nconst makePagedClientRequest = async (client, input, ...args) => {\n // @ts-ignore\n return await client.send(new ListTasksCommand_1.ListTasksCommand(input), ...args);\n};\n/**\n * @private\n */\nconst makePagedRequest = async (client, input, ...args) => {\n // @ts-ignore\n return await client.listTasks(input, ...args);\n};\nasync function* paginateListTasks(config, input, ...additionalArguments) {\n // ToDo: replace with actual type instead of typeof input.nextToken\n let token = config.startingToken || undefined;\n let hasNext = true;\n let page;\n while (hasNext) {\n input.nextToken = token;\n input[\"maxResults\"] = config.pageSize;\n if (config.client instanceof ECS_1.ECS) {\n page = await makePagedRequest(config.client, input, ...additionalArguments);\n }\n else if (config.client instanceof ECSClient_1.ECSClient) {\n page = await makePagedClientRequest(config.client, input, ...additionalArguments);\n }\n else {\n throw new Error(\"Invalid client, expected ECS | ECSClient\");\n }\n yield page;\n token = page.nextToken;\n hasNext = !!token;\n }\n // @ts-ignore\n return undefined;\n}\nexports.paginateListTasks = paginateListTasks;\n//# sourceMappingURL=ListTasksPaginator.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.serializeAws_json1_1UpdateServiceCommand = exports.serializeAws_json1_1UpdateContainerInstancesStateCommand = exports.serializeAws_json1_1UpdateContainerAgentCommand = exports.serializeAws_json1_1UpdateClusterSettingsCommand = exports.serializeAws_json1_1UpdateClusterCommand = exports.serializeAws_json1_1UpdateCapacityProviderCommand = exports.serializeAws_json1_1UntagResourceCommand = exports.serializeAws_json1_1TagResourceCommand = exports.serializeAws_json1_1SubmitTaskStateChangeCommand = exports.serializeAws_json1_1SubmitContainerStateChangeCommand = exports.serializeAws_json1_1SubmitAttachmentStateChangesCommand = exports.serializeAws_json1_1StopTaskCommand = exports.serializeAws_json1_1StartTaskCommand = exports.serializeAws_json1_1RunTaskCommand = exports.serializeAws_json1_1RegisterTaskDefinitionCommand = exports.serializeAws_json1_1RegisterContainerInstanceCommand = exports.serializeAws_json1_1PutClusterCapacityProvidersCommand = exports.serializeAws_json1_1PutAttributesCommand = exports.serializeAws_json1_1PutAccountSettingDefaultCommand = exports.serializeAws_json1_1PutAccountSettingCommand = exports.serializeAws_json1_1ListTasksCommand = exports.serializeAws_json1_1ListTaskDefinitionsCommand = exports.serializeAws_json1_1ListTaskDefinitionFamiliesCommand = exports.serializeAws_json1_1ListTagsForResourceCommand = exports.serializeAws_json1_1ListServicesCommand = exports.serializeAws_json1_1ListContainerInstancesCommand = exports.serializeAws_json1_1ListClustersCommand = exports.serializeAws_json1_1ListAttributesCommand = exports.serializeAws_json1_1ListAccountSettingsCommand = exports.serializeAws_json1_1ExecuteCommandCommand = exports.serializeAws_json1_1DiscoverPollEndpointCommand = exports.serializeAws_json1_1DescribeTaskSetsCommand = exports.serializeAws_json1_1DescribeTasksCommand = exports.serializeAws_json1_1DescribeTaskDefinitionCommand = exports.serializeAws_json1_1DescribeServicesCommand = exports.serializeAws_json1_1DescribeContainerInstancesCommand = exports.serializeAws_json1_1DescribeClustersCommand = exports.serializeAws_json1_1DescribeCapacityProvidersCommand = exports.serializeAws_json1_1DeregisterTaskDefinitionCommand = exports.serializeAws_json1_1DeregisterContainerInstanceCommand = exports.serializeAws_json1_1DeleteTaskSetCommand = exports.serializeAws_json1_1DeleteServiceCommand = exports.serializeAws_json1_1DeleteClusterCommand = exports.serializeAws_json1_1DeleteCapacityProviderCommand = exports.serializeAws_json1_1DeleteAttributesCommand = exports.serializeAws_json1_1DeleteAccountSettingCommand = exports.serializeAws_json1_1CreateTaskSetCommand = exports.serializeAws_json1_1CreateServiceCommand = exports.serializeAws_json1_1CreateClusterCommand = exports.serializeAws_json1_1CreateCapacityProviderCommand = void 0;\nexports.deserializeAws_json1_1UpdateContainerAgentCommand = exports.deserializeAws_json1_1UpdateClusterSettingsCommand = exports.deserializeAws_json1_1UpdateClusterCommand = exports.deserializeAws_json1_1UpdateCapacityProviderCommand = exports.deserializeAws_json1_1UntagResourceCommand = exports.deserializeAws_json1_1TagResourceCommand = exports.deserializeAws_json1_1SubmitTaskStateChangeCommand = exports.deserializeAws_json1_1SubmitContainerStateChangeCommand = exports.deserializeAws_json1_1SubmitAttachmentStateChangesCommand = exports.deserializeAws_json1_1StopTaskCommand = exports.deserializeAws_json1_1StartTaskCommand = exports.deserializeAws_json1_1RunTaskCommand = exports.deserializeAws_json1_1RegisterTaskDefinitionCommand = exports.deserializeAws_json1_1RegisterContainerInstanceCommand = exports.deserializeAws_json1_1PutClusterCapacityProvidersCommand = exports.deserializeAws_json1_1PutAttributesCommand = exports.deserializeAws_json1_1PutAccountSettingDefaultCommand = exports.deserializeAws_json1_1PutAccountSettingCommand = exports.deserializeAws_json1_1ListTasksCommand = exports.deserializeAws_json1_1ListTaskDefinitionsCommand = exports.deserializeAws_json1_1ListTaskDefinitionFamiliesCommand = exports.deserializeAws_json1_1ListTagsForResourceCommand = exports.deserializeAws_json1_1ListServicesCommand = exports.deserializeAws_json1_1ListContainerInstancesCommand = exports.deserializeAws_json1_1ListClustersCommand = exports.deserializeAws_json1_1ListAttributesCommand = exports.deserializeAws_json1_1ListAccountSettingsCommand = exports.deserializeAws_json1_1ExecuteCommandCommand = exports.deserializeAws_json1_1DiscoverPollEndpointCommand = exports.deserializeAws_json1_1DescribeTaskSetsCommand = exports.deserializeAws_json1_1DescribeTasksCommand = exports.deserializeAws_json1_1DescribeTaskDefinitionCommand = exports.deserializeAws_json1_1DescribeServicesCommand = exports.deserializeAws_json1_1DescribeContainerInstancesCommand = exports.deserializeAws_json1_1DescribeClustersCommand = exports.deserializeAws_json1_1DescribeCapacityProvidersCommand = exports.deserializeAws_json1_1DeregisterTaskDefinitionCommand = exports.deserializeAws_json1_1DeregisterContainerInstanceCommand = exports.deserializeAws_json1_1DeleteTaskSetCommand = exports.deserializeAws_json1_1DeleteServiceCommand = exports.deserializeAws_json1_1DeleteClusterCommand = exports.deserializeAws_json1_1DeleteCapacityProviderCommand = exports.deserializeAws_json1_1DeleteAttributesCommand = exports.deserializeAws_json1_1DeleteAccountSettingCommand = exports.deserializeAws_json1_1CreateTaskSetCommand = exports.deserializeAws_json1_1CreateServiceCommand = exports.deserializeAws_json1_1CreateClusterCommand = exports.deserializeAws_json1_1CreateCapacityProviderCommand = exports.serializeAws_json1_1UpdateTaskSetCommand = exports.serializeAws_json1_1UpdateServicePrimaryTaskSetCommand = void 0;\nexports.deserializeAws_json1_1UpdateTaskSetCommand = exports.deserializeAws_json1_1UpdateServicePrimaryTaskSetCommand = exports.deserializeAws_json1_1UpdateServiceCommand = exports.deserializeAws_json1_1UpdateContainerInstancesStateCommand = void 0;\nconst protocol_http_1 = require(\"@aws-sdk/protocol-http\");\nconst smithy_client_1 = require(\"@aws-sdk/smithy-client\");\nconst serializeAws_json1_1CreateCapacityProviderCommand = async (input, context) => {\n const headers = {\n \"content-type\": \"application/x-amz-json-1.1\",\n \"x-amz-target\": \"AmazonEC2ContainerServiceV20141113.CreateCapacityProvider\",\n };\n let body;\n body = JSON.stringify(serializeAws_json1_1CreateCapacityProviderRequest(input, context));\n return buildHttpRpcRequest(context, headers, \"/\", undefined, body);\n};\nexports.serializeAws_json1_1CreateCapacityProviderCommand = serializeAws_json1_1CreateCapacityProviderCommand;\nconst serializeAws_json1_1CreateClusterCommand = async (input, context) => {\n const headers = {\n \"content-type\": \"application/x-amz-json-1.1\",\n \"x-amz-target\": \"AmazonEC2ContainerServiceV20141113.CreateCluster\",\n };\n let body;\n body = JSON.stringify(serializeAws_json1_1CreateClusterRequest(input, context));\n return buildHttpRpcRequest(context, headers, \"/\", undefined, body);\n};\nexports.serializeAws_json1_1CreateClusterCommand = serializeAws_json1_1CreateClusterCommand;\nconst serializeAws_json1_1CreateServiceCommand = async (input, context) => {\n const headers = {\n \"content-type\": \"application/x-amz-json-1.1\",\n \"x-amz-target\": \"AmazonEC2ContainerServiceV20141113.CreateService\",\n };\n let body;\n body = JSON.stringify(serializeAws_json1_1CreateServiceRequest(input, context));\n return buildHttpRpcRequest(context, headers, \"/\", undefined, body);\n};\nexports.serializeAws_json1_1CreateServiceCommand = serializeAws_json1_1CreateServiceCommand;\nconst serializeAws_json1_1CreateTaskSetCommand = async (input, context) => {\n const headers = {\n \"content-type\": \"application/x-amz-json-1.1\",\n \"x-amz-target\": \"AmazonEC2ContainerServiceV20141113.CreateTaskSet\",\n };\n let body;\n body = JSON.stringify(serializeAws_json1_1CreateTaskSetRequest(input, context));\n return buildHttpRpcRequest(context, headers, \"/\", undefined, body);\n};\nexports.serializeAws_json1_1CreateTaskSetCommand = serializeAws_json1_1CreateTaskSetCommand;\nconst serializeAws_json1_1DeleteAccountSettingCommand = async (input, context) => {\n const headers = {\n \"content-type\": \"application/x-amz-json-1.1\",\n \"x-amz-target\": \"AmazonEC2ContainerServiceV20141113.DeleteAccountSetting\",\n };\n let body;\n body = JSON.stringify(serializeAws_json1_1DeleteAccountSettingRequest(input, context));\n return buildHttpRpcRequest(context, headers, \"/\", undefined, body);\n};\nexports.serializeAws_json1_1DeleteAccountSettingCommand = serializeAws_json1_1DeleteAccountSettingCommand;\nconst serializeAws_json1_1DeleteAttributesCommand = async (input, context) => {\n const headers = {\n \"content-type\": \"application/x-amz-json-1.1\",\n \"x-amz-target\": \"AmazonEC2ContainerServiceV20141113.DeleteAttributes\",\n };\n let body;\n body = JSON.stringify(serializeAws_json1_1DeleteAttributesRequest(input, context));\n return buildHttpRpcRequest(context, headers, \"/\", undefined, body);\n};\nexports.serializeAws_json1_1DeleteAttributesCommand = serializeAws_json1_1DeleteAttributesCommand;\nconst serializeAws_json1_1DeleteCapacityProviderCommand = async (input, context) => {\n const headers = {\n \"content-type\": \"application/x-amz-json-1.1\",\n \"x-amz-target\": \"AmazonEC2ContainerServiceV20141113.DeleteCapacityProvider\",\n };\n let body;\n body = JSON.stringify(serializeAws_json1_1DeleteCapacityProviderRequest(input, context));\n return buildHttpRpcRequest(context, headers, \"/\", undefined, body);\n};\nexports.serializeAws_json1_1DeleteCapacityProviderCommand = serializeAws_json1_1DeleteCapacityProviderCommand;\nconst serializeAws_json1_1DeleteClusterCommand = async (input, context) => {\n const headers = {\n \"content-type\": \"application/x-amz-json-1.1\",\n \"x-amz-target\": \"AmazonEC2ContainerServiceV20141113.DeleteCluster\",\n };\n let body;\n body = JSON.stringify(serializeAws_json1_1DeleteClusterRequest(input, context));\n return buildHttpRpcRequest(context, headers, \"/\", undefined, body);\n};\nexports.serializeAws_json1_1DeleteClusterCommand = serializeAws_json1_1DeleteClusterCommand;\nconst serializeAws_json1_1DeleteServiceCommand = async (input, context) => {\n const headers = {\n \"content-type\": \"application/x-amz-json-1.1\",\n \"x-amz-target\": \"AmazonEC2ContainerServiceV20141113.DeleteService\",\n };\n let body;\n body = JSON.stringify(serializeAws_json1_1DeleteServiceRequest(input, context));\n return buildHttpRpcRequest(context, headers, \"/\", undefined, body);\n};\nexports.serializeAws_json1_1DeleteServiceCommand = serializeAws_json1_1DeleteServiceCommand;\nconst serializeAws_json1_1DeleteTaskSetCommand = async (input, context) => {\n const headers = {\n \"content-type\": \"application/x-amz-json-1.1\",\n \"x-amz-target\": \"AmazonEC2ContainerServiceV20141113.DeleteTaskSet\",\n };\n let body;\n body = JSON.stringify(serializeAws_json1_1DeleteTaskSetRequest(input, context));\n return buildHttpRpcRequest(context, headers, \"/\", undefined, body);\n};\nexports.serializeAws_json1_1DeleteTaskSetCommand = serializeAws_json1_1DeleteTaskSetCommand;\nconst serializeAws_json1_1DeregisterContainerInstanceCommand = async (input, context) => {\n const headers = {\n \"content-type\": \"application/x-amz-json-1.1\",\n \"x-amz-target\": \"AmazonEC2ContainerServiceV20141113.DeregisterContainerInstance\",\n };\n let body;\n body = JSON.stringify(serializeAws_json1_1DeregisterContainerInstanceRequest(input, context));\n return buildHttpRpcRequest(context, headers, \"/\", undefined, body);\n};\nexports.serializeAws_json1_1DeregisterContainerInstanceCommand = serializeAws_json1_1DeregisterContainerInstanceCommand;\nconst serializeAws_json1_1DeregisterTaskDefinitionCommand = async (input, context) => {\n const headers = {\n \"content-type\": \"application/x-amz-json-1.1\",\n \"x-amz-target\": \"AmazonEC2ContainerServiceV20141113.DeregisterTaskDefinition\",\n };\n let body;\n body = JSON.stringify(serializeAws_json1_1DeregisterTaskDefinitionRequest(input, context));\n return buildHttpRpcRequest(context, headers, \"/\", undefined, body);\n};\nexports.serializeAws_json1_1DeregisterTaskDefinitionCommand = serializeAws_json1_1DeregisterTaskDefinitionCommand;\nconst serializeAws_json1_1DescribeCapacityProvidersCommand = async (input, context) => {\n const headers = {\n \"content-type\": \"application/x-amz-json-1.1\",\n \"x-amz-target\": \"AmazonEC2ContainerServiceV20141113.DescribeCapacityProviders\",\n };\n let body;\n body = JSON.stringify(serializeAws_json1_1DescribeCapacityProvidersRequest(input, context));\n return buildHttpRpcRequest(context, headers, \"/\", undefined, body);\n};\nexports.serializeAws_json1_1DescribeCapacityProvidersCommand = serializeAws_json1_1DescribeCapacityProvidersCommand;\nconst serializeAws_json1_1DescribeClustersCommand = async (input, context) => {\n const headers = {\n \"content-type\": \"application/x-amz-json-1.1\",\n \"x-amz-target\": \"AmazonEC2ContainerServiceV20141113.DescribeClusters\",\n };\n let body;\n body = JSON.stringify(serializeAws_json1_1DescribeClustersRequest(input, context));\n return buildHttpRpcRequest(context, headers, \"/\", undefined, body);\n};\nexports.serializeAws_json1_1DescribeClustersCommand = serializeAws_json1_1DescribeClustersCommand;\nconst serializeAws_json1_1DescribeContainerInstancesCommand = async (input, context) => {\n const headers = {\n \"content-type\": \"application/x-amz-json-1.1\",\n \"x-amz-target\": \"AmazonEC2ContainerServiceV20141113.DescribeContainerInstances\",\n };\n let body;\n body = JSON.stringify(serializeAws_json1_1DescribeContainerInstancesRequest(input, context));\n return buildHttpRpcRequest(context, headers, \"/\", undefined, body);\n};\nexports.serializeAws_json1_1DescribeContainerInstancesCommand = serializeAws_json1_1DescribeContainerInstancesCommand;\nconst serializeAws_json1_1DescribeServicesCommand = async (input, context) => {\n const headers = {\n \"content-type\": \"application/x-amz-json-1.1\",\n \"x-amz-target\": \"AmazonEC2ContainerServiceV20141113.DescribeServices\",\n };\n let body;\n body = JSON.stringify(serializeAws_json1_1DescribeServicesRequest(input, context));\n return buildHttpRpcRequest(context, headers, \"/\", undefined, body);\n};\nexports.serializeAws_json1_1DescribeServicesCommand = serializeAws_json1_1DescribeServicesCommand;\nconst serializeAws_json1_1DescribeTaskDefinitionCommand = async (input, context) => {\n const headers = {\n \"content-type\": \"application/x-amz-json-1.1\",\n \"x-amz-target\": \"AmazonEC2ContainerServiceV20141113.DescribeTaskDefinition\",\n };\n let body;\n body = JSON.stringify(serializeAws_json1_1DescribeTaskDefinitionRequest(input, context));\n return buildHttpRpcRequest(context, headers, \"/\", undefined, body);\n};\nexports.serializeAws_json1_1DescribeTaskDefinitionCommand = serializeAws_json1_1DescribeTaskDefinitionCommand;\nconst serializeAws_json1_1DescribeTasksCommand = async (input, context) => {\n const headers = {\n \"content-type\": \"application/x-amz-json-1.1\",\n \"x-amz-target\": \"AmazonEC2ContainerServiceV20141113.DescribeTasks\",\n };\n let body;\n body = JSON.stringify(serializeAws_json1_1DescribeTasksRequest(input, context));\n return buildHttpRpcRequest(context, headers, \"/\", undefined, body);\n};\nexports.serializeAws_json1_1DescribeTasksCommand = serializeAws_json1_1DescribeTasksCommand;\nconst serializeAws_json1_1DescribeTaskSetsCommand = async (input, context) => {\n const headers = {\n \"content-type\": \"application/x-amz-json-1.1\",\n \"x-amz-target\": \"AmazonEC2ContainerServiceV20141113.DescribeTaskSets\",\n };\n let body;\n body = JSON.stringify(serializeAws_json1_1DescribeTaskSetsRequest(input, context));\n return buildHttpRpcRequest(context, headers, \"/\", undefined, body);\n};\nexports.serializeAws_json1_1DescribeTaskSetsCommand = serializeAws_json1_1DescribeTaskSetsCommand;\nconst serializeAws_json1_1DiscoverPollEndpointCommand = async (input, context) => {\n const headers = {\n \"content-type\": \"application/x-amz-json-1.1\",\n \"x-amz-target\": \"AmazonEC2ContainerServiceV20141113.DiscoverPollEndpoint\",\n };\n let body;\n body = JSON.stringify(serializeAws_json1_1DiscoverPollEndpointRequest(input, context));\n return buildHttpRpcRequest(context, headers, \"/\", undefined, body);\n};\nexports.serializeAws_json1_1DiscoverPollEndpointCommand = serializeAws_json1_1DiscoverPollEndpointCommand;\nconst serializeAws_json1_1ExecuteCommandCommand = async (input, context) => {\n const headers = {\n \"content-type\": \"application/x-amz-json-1.1\",\n \"x-amz-target\": \"AmazonEC2ContainerServiceV20141113.ExecuteCommand\",\n };\n let body;\n body = JSON.stringify(serializeAws_json1_1ExecuteCommandRequest(input, context));\n return buildHttpRpcRequest(context, headers, \"/\", undefined, body);\n};\nexports.serializeAws_json1_1ExecuteCommandCommand = serializeAws_json1_1ExecuteCommandCommand;\nconst serializeAws_json1_1ListAccountSettingsCommand = async (input, context) => {\n const headers = {\n \"content-type\": \"application/x-amz-json-1.1\",\n \"x-amz-target\": \"AmazonEC2ContainerServiceV20141113.ListAccountSettings\",\n };\n let body;\n body = JSON.stringify(serializeAws_json1_1ListAccountSettingsRequest(input, context));\n return buildHttpRpcRequest(context, headers, \"/\", undefined, body);\n};\nexports.serializeAws_json1_1ListAccountSettingsCommand = serializeAws_json1_1ListAccountSettingsCommand;\nconst serializeAws_json1_1ListAttributesCommand = async (input, context) => {\n const headers = {\n \"content-type\": \"application/x-amz-json-1.1\",\n \"x-amz-target\": \"AmazonEC2ContainerServiceV20141113.ListAttributes\",\n };\n let body;\n body = JSON.stringify(serializeAws_json1_1ListAttributesRequest(input, context));\n return buildHttpRpcRequest(context, headers, \"/\", undefined, body);\n};\nexports.serializeAws_json1_1ListAttributesCommand = serializeAws_json1_1ListAttributesCommand;\nconst serializeAws_json1_1ListClustersCommand = async (input, context) => {\n const headers = {\n \"content-type\": \"application/x-amz-json-1.1\",\n \"x-amz-target\": \"AmazonEC2ContainerServiceV20141113.ListClusters\",\n };\n let body;\n body = JSON.stringify(serializeAws_json1_1ListClustersRequest(input, context));\n return buildHttpRpcRequest(context, headers, \"/\", undefined, body);\n};\nexports.serializeAws_json1_1ListClustersCommand = serializeAws_json1_1ListClustersCommand;\nconst serializeAws_json1_1ListContainerInstancesCommand = async (input, context) => {\n const headers = {\n \"content-type\": \"application/x-amz-json-1.1\",\n \"x-amz-target\": \"AmazonEC2ContainerServiceV20141113.ListContainerInstances\",\n };\n let body;\n body = JSON.stringify(serializeAws_json1_1ListContainerInstancesRequest(input, context));\n return buildHttpRpcRequest(context, headers, \"/\", undefined, body);\n};\nexports.serializeAws_json1_1ListContainerInstancesCommand = serializeAws_json1_1ListContainerInstancesCommand;\nconst serializeAws_json1_1ListServicesCommand = async (input, context) => {\n const headers = {\n \"content-type\": \"application/x-amz-json-1.1\",\n \"x-amz-target\": \"AmazonEC2ContainerServiceV20141113.ListServices\",\n };\n let body;\n body = JSON.stringify(serializeAws_json1_1ListServicesRequest(input, context));\n return buildHttpRpcRequest(context, headers, \"/\", undefined, body);\n};\nexports.serializeAws_json1_1ListServicesCommand = serializeAws_json1_1ListServicesCommand;\nconst serializeAws_json1_1ListTagsForResourceCommand = async (input, context) => {\n const headers = {\n \"content-type\": \"application/x-amz-json-1.1\",\n \"x-amz-target\": \"AmazonEC2ContainerServiceV20141113.ListTagsForResource\",\n };\n let body;\n body = JSON.stringify(serializeAws_json1_1ListTagsForResourceRequest(input, context));\n return buildHttpRpcRequest(context, headers, \"/\", undefined, body);\n};\nexports.serializeAws_json1_1ListTagsForResourceCommand = serializeAws_json1_1ListTagsForResourceCommand;\nconst serializeAws_json1_1ListTaskDefinitionFamiliesCommand = async (input, context) => {\n const headers = {\n \"content-type\": \"application/x-amz-json-1.1\",\n \"x-amz-target\": \"AmazonEC2ContainerServiceV20141113.ListTaskDefinitionFamilies\",\n };\n let body;\n body = JSON.stringify(serializeAws_json1_1ListTaskDefinitionFamiliesRequest(input, context));\n return buildHttpRpcRequest(context, headers, \"/\", undefined, body);\n};\nexports.serializeAws_json1_1ListTaskDefinitionFamiliesCommand = serializeAws_json1_1ListTaskDefinitionFamiliesCommand;\nconst serializeAws_json1_1ListTaskDefinitionsCommand = async (input, context) => {\n const headers = {\n \"content-type\": \"application/x-amz-json-1.1\",\n \"x-amz-target\": \"AmazonEC2ContainerServiceV20141113.ListTaskDefinitions\",\n };\n let body;\n body = JSON.stringify(serializeAws_json1_1ListTaskDefinitionsRequest(input, context));\n return buildHttpRpcRequest(context, headers, \"/\", undefined, body);\n};\nexports.serializeAws_json1_1ListTaskDefinitionsCommand = serializeAws_json1_1ListTaskDefinitionsCommand;\nconst serializeAws_json1_1ListTasksCommand = async (input, context) => {\n const headers = {\n \"content-type\": \"application/x-amz-json-1.1\",\n \"x-amz-target\": \"AmazonEC2ContainerServiceV20141113.ListTasks\",\n };\n let body;\n body = JSON.stringify(serializeAws_json1_1ListTasksRequest(input, context));\n return buildHttpRpcRequest(context, headers, \"/\", undefined, body);\n};\nexports.serializeAws_json1_1ListTasksCommand = serializeAws_json1_1ListTasksCommand;\nconst serializeAws_json1_1PutAccountSettingCommand = async (input, context) => {\n const headers = {\n \"content-type\": \"application/x-amz-json-1.1\",\n \"x-amz-target\": \"AmazonEC2ContainerServiceV20141113.PutAccountSetting\",\n };\n let body;\n body = JSON.stringify(serializeAws_json1_1PutAccountSettingRequest(input, context));\n return buildHttpRpcRequest(context, headers, \"/\", undefined, body);\n};\nexports.serializeAws_json1_1PutAccountSettingCommand = serializeAws_json1_1PutAccountSettingCommand;\nconst serializeAws_json1_1PutAccountSettingDefaultCommand = async (input, context) => {\n const headers = {\n \"content-type\": \"application/x-amz-json-1.1\",\n \"x-amz-target\": \"AmazonEC2ContainerServiceV20141113.PutAccountSettingDefault\",\n };\n let body;\n body = JSON.stringify(serializeAws_json1_1PutAccountSettingDefaultRequest(input, context));\n return buildHttpRpcRequest(context, headers, \"/\", undefined, body);\n};\nexports.serializeAws_json1_1PutAccountSettingDefaultCommand = serializeAws_json1_1PutAccountSettingDefaultCommand;\nconst serializeAws_json1_1PutAttributesCommand = async (input, context) => {\n const headers = {\n \"content-type\": \"application/x-amz-json-1.1\",\n \"x-amz-target\": \"AmazonEC2ContainerServiceV20141113.PutAttributes\",\n };\n let body;\n body = JSON.stringify(serializeAws_json1_1PutAttributesRequest(input, context));\n return buildHttpRpcRequest(context, headers, \"/\", undefined, body);\n};\nexports.serializeAws_json1_1PutAttributesCommand = serializeAws_json1_1PutAttributesCommand;\nconst serializeAws_json1_1PutClusterCapacityProvidersCommand = async (input, context) => {\n const headers = {\n \"content-type\": \"application/x-amz-json-1.1\",\n \"x-amz-target\": \"AmazonEC2ContainerServiceV20141113.PutClusterCapacityProviders\",\n };\n let body;\n body = JSON.stringify(serializeAws_json1_1PutClusterCapacityProvidersRequest(input, context));\n return buildHttpRpcRequest(context, headers, \"/\", undefined, body);\n};\nexports.serializeAws_json1_1PutClusterCapacityProvidersCommand = serializeAws_json1_1PutClusterCapacityProvidersCommand;\nconst serializeAws_json1_1RegisterContainerInstanceCommand = async (input, context) => {\n const headers = {\n \"content-type\": \"application/x-amz-json-1.1\",\n \"x-amz-target\": \"AmazonEC2ContainerServiceV20141113.RegisterContainerInstance\",\n };\n let body;\n body = JSON.stringify(serializeAws_json1_1RegisterContainerInstanceRequest(input, context));\n return buildHttpRpcRequest(context, headers, \"/\", undefined, body);\n};\nexports.serializeAws_json1_1RegisterContainerInstanceCommand = serializeAws_json1_1RegisterContainerInstanceCommand;\nconst serializeAws_json1_1RegisterTaskDefinitionCommand = async (input, context) => {\n const headers = {\n \"content-type\": \"application/x-amz-json-1.1\",\n \"x-amz-target\": \"AmazonEC2ContainerServiceV20141113.RegisterTaskDefinition\",\n };\n let body;\n body = JSON.stringify(serializeAws_json1_1RegisterTaskDefinitionRequest(input, context));\n return buildHttpRpcRequest(context, headers, \"/\", undefined, body);\n};\nexports.serializeAws_json1_1RegisterTaskDefinitionCommand = serializeAws_json1_1RegisterTaskDefinitionCommand;\nconst serializeAws_json1_1RunTaskCommand = async (input, context) => {\n const headers = {\n \"content-type\": \"application/x-amz-json-1.1\",\n \"x-amz-target\": \"AmazonEC2ContainerServiceV20141113.RunTask\",\n };\n let body;\n body = JSON.stringify(serializeAws_json1_1RunTaskRequest(input, context));\n return buildHttpRpcRequest(context, headers, \"/\", undefined, body);\n};\nexports.serializeAws_json1_1RunTaskCommand = serializeAws_json1_1RunTaskCommand;\nconst serializeAws_json1_1StartTaskCommand = async (input, context) => {\n const headers = {\n \"content-type\": \"application/x-amz-json-1.1\",\n \"x-amz-target\": \"AmazonEC2ContainerServiceV20141113.StartTask\",\n };\n let body;\n body = JSON.stringify(serializeAws_json1_1StartTaskRequest(input, context));\n return buildHttpRpcRequest(context, headers, \"/\", undefined, body);\n};\nexports.serializeAws_json1_1StartTaskCommand = serializeAws_json1_1StartTaskCommand;\nconst serializeAws_json1_1StopTaskCommand = async (input, context) => {\n const headers = {\n \"content-type\": \"application/x-amz-json-1.1\",\n \"x-amz-target\": \"AmazonEC2ContainerServiceV20141113.StopTask\",\n };\n let body;\n body = JSON.stringify(serializeAws_json1_1StopTaskRequest(input, context));\n return buildHttpRpcRequest(context, headers, \"/\", undefined, body);\n};\nexports.serializeAws_json1_1StopTaskCommand = serializeAws_json1_1StopTaskCommand;\nconst serializeAws_json1_1SubmitAttachmentStateChangesCommand = async (input, context) => {\n const headers = {\n \"content-type\": \"application/x-amz-json-1.1\",\n \"x-amz-target\": \"AmazonEC2ContainerServiceV20141113.SubmitAttachmentStateChanges\",\n };\n let body;\n body = JSON.stringify(serializeAws_json1_1SubmitAttachmentStateChangesRequest(input, context));\n return buildHttpRpcRequest(context, headers, \"/\", undefined, body);\n};\nexports.serializeAws_json1_1SubmitAttachmentStateChangesCommand = serializeAws_json1_1SubmitAttachmentStateChangesCommand;\nconst serializeAws_json1_1SubmitContainerStateChangeCommand = async (input, context) => {\n const headers = {\n \"content-type\": \"application/x-amz-json-1.1\",\n \"x-amz-target\": \"AmazonEC2ContainerServiceV20141113.SubmitContainerStateChange\",\n };\n let body;\n body = JSON.stringify(serializeAws_json1_1SubmitContainerStateChangeRequest(input, context));\n return buildHttpRpcRequest(context, headers, \"/\", undefined, body);\n};\nexports.serializeAws_json1_1SubmitContainerStateChangeCommand = serializeAws_json1_1SubmitContainerStateChangeCommand;\nconst serializeAws_json1_1SubmitTaskStateChangeCommand = async (input, context) => {\n const headers = {\n \"content-type\": \"application/x-amz-json-1.1\",\n \"x-amz-target\": \"AmazonEC2ContainerServiceV20141113.SubmitTaskStateChange\",\n };\n let body;\n body = JSON.stringify(serializeAws_json1_1SubmitTaskStateChangeRequest(input, context));\n return buildHttpRpcRequest(context, headers, \"/\", undefined, body);\n};\nexports.serializeAws_json1_1SubmitTaskStateChangeCommand = serializeAws_json1_1SubmitTaskStateChangeCommand;\nconst serializeAws_json1_1TagResourceCommand = async (input, context) => {\n const headers = {\n \"content-type\": \"application/x-amz-json-1.1\",\n \"x-amz-target\": \"AmazonEC2ContainerServiceV20141113.TagResource\",\n };\n let body;\n body = JSON.stringify(serializeAws_json1_1TagResourceRequest(input, context));\n return buildHttpRpcRequest(context, headers, \"/\", undefined, body);\n};\nexports.serializeAws_json1_1TagResourceCommand = serializeAws_json1_1TagResourceCommand;\nconst serializeAws_json1_1UntagResourceCommand = async (input, context) => {\n const headers = {\n \"content-type\": \"application/x-amz-json-1.1\",\n \"x-amz-target\": \"AmazonEC2ContainerServiceV20141113.UntagResource\",\n };\n let body;\n body = JSON.stringify(serializeAws_json1_1UntagResourceRequest(input, context));\n return buildHttpRpcRequest(context, headers, \"/\", undefined, body);\n};\nexports.serializeAws_json1_1UntagResourceCommand = serializeAws_json1_1UntagResourceCommand;\nconst serializeAws_json1_1UpdateCapacityProviderCommand = async (input, context) => {\n const headers = {\n \"content-type\": \"application/x-amz-json-1.1\",\n \"x-amz-target\": \"AmazonEC2ContainerServiceV20141113.UpdateCapacityProvider\",\n };\n let body;\n body = JSON.stringify(serializeAws_json1_1UpdateCapacityProviderRequest(input, context));\n return buildHttpRpcRequest(context, headers, \"/\", undefined, body);\n};\nexports.serializeAws_json1_1UpdateCapacityProviderCommand = serializeAws_json1_1UpdateCapacityProviderCommand;\nconst serializeAws_json1_1UpdateClusterCommand = async (input, context) => {\n const headers = {\n \"content-type\": \"application/x-amz-json-1.1\",\n \"x-amz-target\": \"AmazonEC2ContainerServiceV20141113.UpdateCluster\",\n };\n let body;\n body = JSON.stringify(serializeAws_json1_1UpdateClusterRequest(input, context));\n return buildHttpRpcRequest(context, headers, \"/\", undefined, body);\n};\nexports.serializeAws_json1_1UpdateClusterCommand = serializeAws_json1_1UpdateClusterCommand;\nconst serializeAws_json1_1UpdateClusterSettingsCommand = async (input, context) => {\n const headers = {\n \"content-type\": \"application/x-amz-json-1.1\",\n \"x-amz-target\": \"AmazonEC2ContainerServiceV20141113.UpdateClusterSettings\",\n };\n let body;\n body = JSON.stringify(serializeAws_json1_1UpdateClusterSettingsRequest(input, context));\n return buildHttpRpcRequest(context, headers, \"/\", undefined, body);\n};\nexports.serializeAws_json1_1UpdateClusterSettingsCommand = serializeAws_json1_1UpdateClusterSettingsCommand;\nconst serializeAws_json1_1UpdateContainerAgentCommand = async (input, context) => {\n const headers = {\n \"content-type\": \"application/x-amz-json-1.1\",\n \"x-amz-target\": \"AmazonEC2ContainerServiceV20141113.UpdateContainerAgent\",\n };\n let body;\n body = JSON.stringify(serializeAws_json1_1UpdateContainerAgentRequest(input, context));\n return buildHttpRpcRequest(context, headers, \"/\", undefined, body);\n};\nexports.serializeAws_json1_1UpdateContainerAgentCommand = serializeAws_json1_1UpdateContainerAgentCommand;\nconst serializeAws_json1_1UpdateContainerInstancesStateCommand = async (input, context) => {\n const headers = {\n \"content-type\": \"application/x-amz-json-1.1\",\n \"x-amz-target\": \"AmazonEC2ContainerServiceV20141113.UpdateContainerInstancesState\",\n };\n let body;\n body = JSON.stringify(serializeAws_json1_1UpdateContainerInstancesStateRequest(input, context));\n return buildHttpRpcRequest(context, headers, \"/\", undefined, body);\n};\nexports.serializeAws_json1_1UpdateContainerInstancesStateCommand = serializeAws_json1_1UpdateContainerInstancesStateCommand;\nconst serializeAws_json1_1UpdateServiceCommand = async (input, context) => {\n const headers = {\n \"content-type\": \"application/x-amz-json-1.1\",\n \"x-amz-target\": \"AmazonEC2ContainerServiceV20141113.UpdateService\",\n };\n let body;\n body = JSON.stringify(serializeAws_json1_1UpdateServiceRequest(input, context));\n return buildHttpRpcRequest(context, headers, \"/\", undefined, body);\n};\nexports.serializeAws_json1_1UpdateServiceCommand = serializeAws_json1_1UpdateServiceCommand;\nconst serializeAws_json1_1UpdateServicePrimaryTaskSetCommand = async (input, context) => {\n const headers = {\n \"content-type\": \"application/x-amz-json-1.1\",\n \"x-amz-target\": \"AmazonEC2ContainerServiceV20141113.UpdateServicePrimaryTaskSet\",\n };\n let body;\n body = JSON.stringify(serializeAws_json1_1UpdateServicePrimaryTaskSetRequest(input, context));\n return buildHttpRpcRequest(context, headers, \"/\", undefined, body);\n};\nexports.serializeAws_json1_1UpdateServicePrimaryTaskSetCommand = serializeAws_json1_1UpdateServicePrimaryTaskSetCommand;\nconst serializeAws_json1_1UpdateTaskSetCommand = async (input, context) => {\n const headers = {\n \"content-type\": \"application/x-amz-json-1.1\",\n \"x-amz-target\": \"AmazonEC2ContainerServiceV20141113.UpdateTaskSet\",\n };\n let body;\n body = JSON.stringify(serializeAws_json1_1UpdateTaskSetRequest(input, context));\n return buildHttpRpcRequest(context, headers, \"/\", undefined, body);\n};\nexports.serializeAws_json1_1UpdateTaskSetCommand = serializeAws_json1_1UpdateTaskSetCommand;\nconst deserializeAws_json1_1CreateCapacityProviderCommand = async (output, context) => {\n if (output.statusCode >= 300) {\n return deserializeAws_json1_1CreateCapacityProviderCommandError(output, context);\n }\n const data = await parseBody(output.body, context);\n let contents = {};\n contents = deserializeAws_json1_1CreateCapacityProviderResponse(data, context);\n const response = {\n $metadata: deserializeMetadata(output),\n ...contents,\n };\n return Promise.resolve(response);\n};\nexports.deserializeAws_json1_1CreateCapacityProviderCommand = deserializeAws_json1_1CreateCapacityProviderCommand;\nconst deserializeAws_json1_1CreateCapacityProviderCommandError = async (output, context) => {\n const parsedOutput = {\n ...output,\n body: await parseBody(output.body, context),\n };\n let response;\n let errorCode = \"UnknownError\";\n errorCode = loadRestJsonErrorCode(output, parsedOutput.body);\n switch (errorCode) {\n case \"ClientException\":\n case \"com.amazonaws.ecs#ClientException\":\n response = {\n ...(await deserializeAws_json1_1ClientExceptionResponse(parsedOutput, context)),\n name: errorCode,\n $metadata: deserializeMetadata(output),\n };\n break;\n case \"InvalidParameterException\":\n case \"com.amazonaws.ecs#InvalidParameterException\":\n response = {\n ...(await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)),\n name: errorCode,\n $metadata: deserializeMetadata(output),\n };\n break;\n case \"LimitExceededException\":\n case \"com.amazonaws.ecs#LimitExceededException\":\n response = {\n ...(await deserializeAws_json1_1LimitExceededExceptionResponse(parsedOutput, context)),\n name: errorCode,\n $metadata: deserializeMetadata(output),\n };\n break;\n case \"ServerException\":\n case \"com.amazonaws.ecs#ServerException\":\n response = {\n ...(await deserializeAws_json1_1ServerExceptionResponse(parsedOutput, context)),\n name: errorCode,\n $metadata: deserializeMetadata(output),\n };\n break;\n case \"UpdateInProgressException\":\n case \"com.amazonaws.ecs#UpdateInProgressException\":\n response = {\n ...(await deserializeAws_json1_1UpdateInProgressExceptionResponse(parsedOutput, context)),\n name: errorCode,\n $metadata: deserializeMetadata(output),\n };\n break;\n default:\n const parsedBody = parsedOutput.body;\n errorCode = parsedBody.code || parsedBody.Code || errorCode;\n response = {\n ...parsedBody,\n name: `${errorCode}`,\n message: parsedBody.message || parsedBody.Message || errorCode,\n $fault: \"client\",\n $metadata: deserializeMetadata(output),\n };\n }\n const message = response.message || response.Message || errorCode;\n response.message = message;\n delete response.Message;\n return Promise.reject(Object.assign(new Error(message), response));\n};\nconst deserializeAws_json1_1CreateClusterCommand = async (output, context) => {\n if (output.statusCode >= 300) {\n return deserializeAws_json1_1CreateClusterCommandError(output, context);\n }\n const data = await parseBody(output.body, context);\n let contents = {};\n contents = deserializeAws_json1_1CreateClusterResponse(data, context);\n const response = {\n $metadata: deserializeMetadata(output),\n ...contents,\n };\n return Promise.resolve(response);\n};\nexports.deserializeAws_json1_1CreateClusterCommand = deserializeAws_json1_1CreateClusterCommand;\nconst deserializeAws_json1_1CreateClusterCommandError = async (output, context) => {\n const parsedOutput = {\n ...output,\n body: await parseBody(output.body, context),\n };\n let response;\n let errorCode = \"UnknownError\";\n errorCode = loadRestJsonErrorCode(output, parsedOutput.body);\n switch (errorCode) {\n case \"ClientException\":\n case \"com.amazonaws.ecs#ClientException\":\n response = {\n ...(await deserializeAws_json1_1ClientExceptionResponse(parsedOutput, context)),\n name: errorCode,\n $metadata: deserializeMetadata(output),\n };\n break;\n case \"InvalidParameterException\":\n case \"com.amazonaws.ecs#InvalidParameterException\":\n response = {\n ...(await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)),\n name: errorCode,\n $metadata: deserializeMetadata(output),\n };\n break;\n case \"ServerException\":\n case \"com.amazonaws.ecs#ServerException\":\n response = {\n ...(await deserializeAws_json1_1ServerExceptionResponse(parsedOutput, context)),\n name: errorCode,\n $metadata: deserializeMetadata(output),\n };\n break;\n default:\n const parsedBody = parsedOutput.body;\n errorCode = parsedBody.code || parsedBody.Code || errorCode;\n response = {\n ...parsedBody,\n name: `${errorCode}`,\n message: parsedBody.message || parsedBody.Message || errorCode,\n $fault: \"client\",\n $metadata: deserializeMetadata(output),\n };\n }\n const message = response.message || response.Message || errorCode;\n response.message = message;\n delete response.Message;\n return Promise.reject(Object.assign(new Error(message), response));\n};\nconst deserializeAws_json1_1CreateServiceCommand = async (output, context) => {\n if (output.statusCode >= 300) {\n return deserializeAws_json1_1CreateServiceCommandError(output, context);\n }\n const data = await parseBody(output.body, context);\n let contents = {};\n contents = deserializeAws_json1_1CreateServiceResponse(data, context);\n const response = {\n $metadata: deserializeMetadata(output),\n ...contents,\n };\n return Promise.resolve(response);\n};\nexports.deserializeAws_json1_1CreateServiceCommand = deserializeAws_json1_1CreateServiceCommand;\nconst deserializeAws_json1_1CreateServiceCommandError = async (output, context) => {\n const parsedOutput = {\n ...output,\n body: await parseBody(output.body, context),\n };\n let response;\n let errorCode = \"UnknownError\";\n errorCode = loadRestJsonErrorCode(output, parsedOutput.body);\n switch (errorCode) {\n case \"AccessDeniedException\":\n case \"com.amazonaws.ecs#AccessDeniedException\":\n response = {\n ...(await deserializeAws_json1_1AccessDeniedExceptionResponse(parsedOutput, context)),\n name: errorCode,\n $metadata: deserializeMetadata(output),\n };\n break;\n case \"ClientException\":\n case \"com.amazonaws.ecs#ClientException\":\n response = {\n ...(await deserializeAws_json1_1ClientExceptionResponse(parsedOutput, context)),\n name: errorCode,\n $metadata: deserializeMetadata(output),\n };\n break;\n case \"ClusterNotFoundException\":\n case \"com.amazonaws.ecs#ClusterNotFoundException\":\n response = {\n ...(await deserializeAws_json1_1ClusterNotFoundExceptionResponse(parsedOutput, context)),\n name: errorCode,\n $metadata: deserializeMetadata(output),\n };\n break;\n case \"InvalidParameterException\":\n case \"com.amazonaws.ecs#InvalidParameterException\":\n response = {\n ...(await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)),\n name: errorCode,\n $metadata: deserializeMetadata(output),\n };\n break;\n case \"PlatformTaskDefinitionIncompatibilityException\":\n case \"com.amazonaws.ecs#PlatformTaskDefinitionIncompatibilityException\":\n response = {\n ...(await deserializeAws_json1_1PlatformTaskDefinitionIncompatibilityExceptionResponse(parsedOutput, context)),\n name: errorCode,\n $metadata: deserializeMetadata(output),\n };\n break;\n case \"PlatformUnknownException\":\n case \"com.amazonaws.ecs#PlatformUnknownException\":\n response = {\n ...(await deserializeAws_json1_1PlatformUnknownExceptionResponse(parsedOutput, context)),\n name: errorCode,\n $metadata: deserializeMetadata(output),\n };\n break;\n case \"ServerException\":\n case \"com.amazonaws.ecs#ServerException\":\n response = {\n ...(await deserializeAws_json1_1ServerExceptionResponse(parsedOutput, context)),\n name: errorCode,\n $metadata: deserializeMetadata(output),\n };\n break;\n case \"UnsupportedFeatureException\":\n case \"com.amazonaws.ecs#UnsupportedFeatureException\":\n response = {\n ...(await deserializeAws_json1_1UnsupportedFeatureExceptionResponse(parsedOutput, context)),\n name: errorCode,\n $metadata: deserializeMetadata(output),\n };\n break;\n default:\n const parsedBody = parsedOutput.body;\n errorCode = parsedBody.code || parsedBody.Code || errorCode;\n response = {\n ...parsedBody,\n name: `${errorCode}`,\n message: parsedBody.message || parsedBody.Message || errorCode,\n $fault: \"client\",\n $metadata: deserializeMetadata(output),\n };\n }\n const message = response.message || response.Message || errorCode;\n response.message = message;\n delete response.Message;\n return Promise.reject(Object.assign(new Error(message), response));\n};\nconst deserializeAws_json1_1CreateTaskSetCommand = async (output, context) => {\n if (output.statusCode >= 300) {\n return deserializeAws_json1_1CreateTaskSetCommandError(output, context);\n }\n const data = await parseBody(output.body, context);\n let contents = {};\n contents = deserializeAws_json1_1CreateTaskSetResponse(data, context);\n const response = {\n $metadata: deserializeMetadata(output),\n ...contents,\n };\n return Promise.resolve(response);\n};\nexports.deserializeAws_json1_1CreateTaskSetCommand = deserializeAws_json1_1CreateTaskSetCommand;\nconst deserializeAws_json1_1CreateTaskSetCommandError = async (output, context) => {\n const parsedOutput = {\n ...output,\n body: await parseBody(output.body, context),\n };\n let response;\n let errorCode = \"UnknownError\";\n errorCode = loadRestJsonErrorCode(output, parsedOutput.body);\n switch (errorCode) {\n case \"AccessDeniedException\":\n case \"com.amazonaws.ecs#AccessDeniedException\":\n response = {\n ...(await deserializeAws_json1_1AccessDeniedExceptionResponse(parsedOutput, context)),\n name: errorCode,\n $metadata: deserializeMetadata(output),\n };\n break;\n case \"ClientException\":\n case \"com.amazonaws.ecs#ClientException\":\n response = {\n ...(await deserializeAws_json1_1ClientExceptionResponse(parsedOutput, context)),\n name: errorCode,\n $metadata: deserializeMetadata(output),\n };\n break;\n case \"ClusterNotFoundException\":\n case \"com.amazonaws.ecs#ClusterNotFoundException\":\n response = {\n ...(await deserializeAws_json1_1ClusterNotFoundExceptionResponse(parsedOutput, context)),\n name: errorCode,\n $metadata: deserializeMetadata(output),\n };\n break;\n case \"InvalidParameterException\":\n case \"com.amazonaws.ecs#InvalidParameterException\":\n response = {\n ...(await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)),\n name: errorCode,\n $metadata: deserializeMetadata(output),\n };\n break;\n case \"PlatformTaskDefinitionIncompatibilityException\":\n case \"com.amazonaws.ecs#PlatformTaskDefinitionIncompatibilityException\":\n response = {\n ...(await deserializeAws_json1_1PlatformTaskDefinitionIncompatibilityExceptionResponse(parsedOutput, context)),\n name: errorCode,\n $metadata: deserializeMetadata(output),\n };\n break;\n case \"PlatformUnknownException\":\n case \"com.amazonaws.ecs#PlatformUnknownException\":\n response = {\n ...(await deserializeAws_json1_1PlatformUnknownExceptionResponse(parsedOutput, context)),\n name: errorCode,\n $metadata: deserializeMetadata(output),\n };\n break;\n case \"ServerException\":\n case \"com.amazonaws.ecs#ServerException\":\n response = {\n ...(await deserializeAws_json1_1ServerExceptionResponse(parsedOutput, context)),\n name: errorCode,\n $metadata: deserializeMetadata(output),\n };\n break;\n case \"ServiceNotActiveException\":\n case \"com.amazonaws.ecs#ServiceNotActiveException\":\n response = {\n ...(await deserializeAws_json1_1ServiceNotActiveExceptionResponse(parsedOutput, context)),\n name: errorCode,\n $metadata: deserializeMetadata(output),\n };\n break;\n case \"ServiceNotFoundException\":\n case \"com.amazonaws.ecs#ServiceNotFoundException\":\n response = {\n ...(await deserializeAws_json1_1ServiceNotFoundExceptionResponse(parsedOutput, context)),\n name: errorCode,\n $metadata: deserializeMetadata(output),\n };\n break;\n case \"UnsupportedFeatureException\":\n case \"com.amazonaws.ecs#UnsupportedFeatureException\":\n response = {\n ...(await deserializeAws_json1_1UnsupportedFeatureExceptionResponse(parsedOutput, context)),\n name: errorCode,\n $metadata: deserializeMetadata(output),\n };\n break;\n default:\n const parsedBody = parsedOutput.body;\n errorCode = parsedBody.code || parsedBody.Code || errorCode;\n response = {\n ...parsedBody,\n name: `${errorCode}`,\n message: parsedBody.message || parsedBody.Message || errorCode,\n $fault: \"client\",\n $metadata: deserializeMetadata(output),\n };\n }\n const message = response.message || response.Message || errorCode;\n response.message = message;\n delete response.Message;\n return Promise.reject(Object.assign(new Error(message), response));\n};\nconst deserializeAws_json1_1DeleteAccountSettingCommand = async (output, context) => {\n if (output.statusCode >= 300) {\n return deserializeAws_json1_1DeleteAccountSettingCommandError(output, context);\n }\n const data = await parseBody(output.body, context);\n let contents = {};\n contents = deserializeAws_json1_1DeleteAccountSettingResponse(data, context);\n const response = {\n $metadata: deserializeMetadata(output),\n ...contents,\n };\n return Promise.resolve(response);\n};\nexports.deserializeAws_json1_1DeleteAccountSettingCommand = deserializeAws_json1_1DeleteAccountSettingCommand;\nconst deserializeAws_json1_1DeleteAccountSettingCommandError = async (output, context) => {\n const parsedOutput = {\n ...output,\n body: await parseBody(output.body, context),\n };\n let response;\n let errorCode = \"UnknownError\";\n errorCode = loadRestJsonErrorCode(output, parsedOutput.body);\n switch (errorCode) {\n case \"ClientException\":\n case \"com.amazonaws.ecs#ClientException\":\n response = {\n ...(await deserializeAws_json1_1ClientExceptionResponse(parsedOutput, context)),\n name: errorCode,\n $metadata: deserializeMetadata(output),\n };\n break;\n case \"InvalidParameterException\":\n case \"com.amazonaws.ecs#InvalidParameterException\":\n response = {\n ...(await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)),\n name: errorCode,\n $metadata: deserializeMetadata(output),\n };\n break;\n case \"ServerException\":\n case \"com.amazonaws.ecs#ServerException\":\n response = {\n ...(await deserializeAws_json1_1ServerExceptionResponse(parsedOutput, context)),\n name: errorCode,\n $metadata: deserializeMetadata(output),\n };\n break;\n default:\n const parsedBody = parsedOutput.body;\n errorCode = parsedBody.code || parsedBody.Code || errorCode;\n response = {\n ...parsedBody,\n name: `${errorCode}`,\n message: parsedBody.message || parsedBody.Message || errorCode,\n $fault: \"client\",\n $metadata: deserializeMetadata(output),\n };\n }\n const message = response.message || response.Message || errorCode;\n response.message = message;\n delete response.Message;\n return Promise.reject(Object.assign(new Error(message), response));\n};\nconst deserializeAws_json1_1DeleteAttributesCommand = async (output, context) => {\n if (output.statusCode >= 300) {\n return deserializeAws_json1_1DeleteAttributesCommandError(output, context);\n }\n const data = await parseBody(output.body, context);\n let contents = {};\n contents = deserializeAws_json1_1DeleteAttributesResponse(data, context);\n const response = {\n $metadata: deserializeMetadata(output),\n ...contents,\n };\n return Promise.resolve(response);\n};\nexports.deserializeAws_json1_1DeleteAttributesCommand = deserializeAws_json1_1DeleteAttributesCommand;\nconst deserializeAws_json1_1DeleteAttributesCommandError = async (output, context) => {\n const parsedOutput = {\n ...output,\n body: await parseBody(output.body, context),\n };\n let response;\n let errorCode = \"UnknownError\";\n errorCode = loadRestJsonErrorCode(output, parsedOutput.body);\n switch (errorCode) {\n case \"ClusterNotFoundException\":\n case \"com.amazonaws.ecs#ClusterNotFoundException\":\n response = {\n ...(await deserializeAws_json1_1ClusterNotFoundExceptionResponse(parsedOutput, context)),\n name: errorCode,\n $metadata: deserializeMetadata(output),\n };\n break;\n case \"InvalidParameterException\":\n case \"com.amazonaws.ecs#InvalidParameterException\":\n response = {\n ...(await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)),\n name: errorCode,\n $metadata: deserializeMetadata(output),\n };\n break;\n case \"TargetNotFoundException\":\n case \"com.amazonaws.ecs#TargetNotFoundException\":\n response = {\n ...(await deserializeAws_json1_1TargetNotFoundExceptionResponse(parsedOutput, context)),\n name: errorCode,\n $metadata: deserializeMetadata(output),\n };\n break;\n default:\n const parsedBody = parsedOutput.body;\n errorCode = parsedBody.code || parsedBody.Code || errorCode;\n response = {\n ...parsedBody,\n name: `${errorCode}`,\n message: parsedBody.message || parsedBody.Message || errorCode,\n $fault: \"client\",\n $metadata: deserializeMetadata(output),\n };\n }\n const message = response.message || response.Message || errorCode;\n response.message = message;\n delete response.Message;\n return Promise.reject(Object.assign(new Error(message), response));\n};\nconst deserializeAws_json1_1DeleteCapacityProviderCommand = async (output, context) => {\n if (output.statusCode >= 300) {\n return deserializeAws_json1_1DeleteCapacityProviderCommandError(output, context);\n }\n const data = await parseBody(output.body, context);\n let contents = {};\n contents = deserializeAws_json1_1DeleteCapacityProviderResponse(data, context);\n const response = {\n $metadata: deserializeMetadata(output),\n ...contents,\n };\n return Promise.resolve(response);\n};\nexports.deserializeAws_json1_1DeleteCapacityProviderCommand = deserializeAws_json1_1DeleteCapacityProviderCommand;\nconst deserializeAws_json1_1DeleteCapacityProviderCommandError = async (output, context) => {\n const parsedOutput = {\n ...output,\n body: await parseBody(output.body, context),\n };\n let response;\n let errorCode = \"UnknownError\";\n errorCode = loadRestJsonErrorCode(output, parsedOutput.body);\n switch (errorCode) {\n case \"ClientException\":\n case \"com.amazonaws.ecs#ClientException\":\n response = {\n ...(await deserializeAws_json1_1ClientExceptionResponse(parsedOutput, context)),\n name: errorCode,\n $metadata: deserializeMetadata(output),\n };\n break;\n case \"InvalidParameterException\":\n case \"com.amazonaws.ecs#InvalidParameterException\":\n response = {\n ...(await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)),\n name: errorCode,\n $metadata: deserializeMetadata(output),\n };\n break;\n case \"ServerException\":\n case \"com.amazonaws.ecs#ServerException\":\n response = {\n ...(await deserializeAws_json1_1ServerExceptionResponse(parsedOutput, context)),\n name: errorCode,\n $metadata: deserializeMetadata(output),\n };\n break;\n default:\n const parsedBody = parsedOutput.body;\n errorCode = parsedBody.code || parsedBody.Code || errorCode;\n response = {\n ...parsedBody,\n name: `${errorCode}`,\n message: parsedBody.message || parsedBody.Message || errorCode,\n $fault: \"client\",\n $metadata: deserializeMetadata(output),\n };\n }\n const message = response.message || response.Message || errorCode;\n response.message = message;\n delete response.Message;\n return Promise.reject(Object.assign(new Error(message), response));\n};\nconst deserializeAws_json1_1DeleteClusterCommand = async (output, context) => {\n if (output.statusCode >= 300) {\n return deserializeAws_json1_1DeleteClusterCommandError(output, context);\n }\n const data = await parseBody(output.body, context);\n let contents = {};\n contents = deserializeAws_json1_1DeleteClusterResponse(data, context);\n const response = {\n $metadata: deserializeMetadata(output),\n ...contents,\n };\n return Promise.resolve(response);\n};\nexports.deserializeAws_json1_1DeleteClusterCommand = deserializeAws_json1_1DeleteClusterCommand;\nconst deserializeAws_json1_1DeleteClusterCommandError = async (output, context) => {\n const parsedOutput = {\n ...output,\n body: await parseBody(output.body, context),\n };\n let response;\n let errorCode = \"UnknownError\";\n errorCode = loadRestJsonErrorCode(output, parsedOutput.body);\n switch (errorCode) {\n case \"ClientException\":\n case \"com.amazonaws.ecs#ClientException\":\n response = {\n ...(await deserializeAws_json1_1ClientExceptionResponse(parsedOutput, context)),\n name: errorCode,\n $metadata: deserializeMetadata(output),\n };\n break;\n case \"ClusterContainsContainerInstancesException\":\n case \"com.amazonaws.ecs#ClusterContainsContainerInstancesException\":\n response = {\n ...(await deserializeAws_json1_1ClusterContainsContainerInstancesExceptionResponse(parsedOutput, context)),\n name: errorCode,\n $metadata: deserializeMetadata(output),\n };\n break;\n case \"ClusterContainsServicesException\":\n case \"com.amazonaws.ecs#ClusterContainsServicesException\":\n response = {\n ...(await deserializeAws_json1_1ClusterContainsServicesExceptionResponse(parsedOutput, context)),\n name: errorCode,\n $metadata: deserializeMetadata(output),\n };\n break;\n case \"ClusterContainsTasksException\":\n case \"com.amazonaws.ecs#ClusterContainsTasksException\":\n response = {\n ...(await deserializeAws_json1_1ClusterContainsTasksExceptionResponse(parsedOutput, context)),\n name: errorCode,\n $metadata: deserializeMetadata(output),\n };\n break;\n case \"ClusterNotFoundException\":\n case \"com.amazonaws.ecs#ClusterNotFoundException\":\n response = {\n ...(await deserializeAws_json1_1ClusterNotFoundExceptionResponse(parsedOutput, context)),\n name: errorCode,\n $metadata: deserializeMetadata(output),\n };\n break;\n case \"InvalidParameterException\":\n case \"com.amazonaws.ecs#InvalidParameterException\":\n response = {\n ...(await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)),\n name: errorCode,\n $metadata: deserializeMetadata(output),\n };\n break;\n case \"ServerException\":\n case \"com.amazonaws.ecs#ServerException\":\n response = {\n ...(await deserializeAws_json1_1ServerExceptionResponse(parsedOutput, context)),\n name: errorCode,\n $metadata: deserializeMetadata(output),\n };\n break;\n case \"UpdateInProgressException\":\n case \"com.amazonaws.ecs#UpdateInProgressException\":\n response = {\n ...(await deserializeAws_json1_1UpdateInProgressExceptionResponse(parsedOutput, context)),\n name: errorCode,\n $metadata: deserializeMetadata(output),\n };\n break;\n default:\n const parsedBody = parsedOutput.body;\n errorCode = parsedBody.code || parsedBody.Code || errorCode;\n response = {\n ...parsedBody,\n name: `${errorCode}`,\n message: parsedBody.message || parsedBody.Message || errorCode,\n $fault: \"client\",\n $metadata: deserializeMetadata(output),\n };\n }\n const message = response.message || response.Message || errorCode;\n response.message = message;\n delete response.Message;\n return Promise.reject(Object.assign(new Error(message), response));\n};\nconst deserializeAws_json1_1DeleteServiceCommand = async (output, context) => {\n if (output.statusCode >= 300) {\n return deserializeAws_json1_1DeleteServiceCommandError(output, context);\n }\n const data = await parseBody(output.body, context);\n let contents = {};\n contents = deserializeAws_json1_1DeleteServiceResponse(data, context);\n const response = {\n $metadata: deserializeMetadata(output),\n ...contents,\n };\n return Promise.resolve(response);\n};\nexports.deserializeAws_json1_1DeleteServiceCommand = deserializeAws_json1_1DeleteServiceCommand;\nconst deserializeAws_json1_1DeleteServiceCommandError = async (output, context) => {\n const parsedOutput = {\n ...output,\n body: await parseBody(output.body, context),\n };\n let response;\n let errorCode = \"UnknownError\";\n errorCode = loadRestJsonErrorCode(output, parsedOutput.body);\n switch (errorCode) {\n case \"ClientException\":\n case \"com.amazonaws.ecs#ClientException\":\n response = {\n ...(await deserializeAws_json1_1ClientExceptionResponse(parsedOutput, context)),\n name: errorCode,\n $metadata: deserializeMetadata(output),\n };\n break;\n case \"ClusterNotFoundException\":\n case \"com.amazonaws.ecs#ClusterNotFoundException\":\n response = {\n ...(await deserializeAws_json1_1ClusterNotFoundExceptionResponse(parsedOutput, context)),\n name: errorCode,\n $metadata: deserializeMetadata(output),\n };\n break;\n case \"InvalidParameterException\":\n case \"com.amazonaws.ecs#InvalidParameterException\":\n response = {\n ...(await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)),\n name: errorCode,\n $metadata: deserializeMetadata(output),\n };\n break;\n case \"ServerException\":\n case \"com.amazonaws.ecs#ServerException\":\n response = {\n ...(await deserializeAws_json1_1ServerExceptionResponse(parsedOutput, context)),\n name: errorCode,\n $metadata: deserializeMetadata(output),\n };\n break;\n case \"ServiceNotFoundException\":\n case \"com.amazonaws.ecs#ServiceNotFoundException\":\n response = {\n ...(await deserializeAws_json1_1ServiceNotFoundExceptionResponse(parsedOutput, context)),\n name: errorCode,\n $metadata: deserializeMetadata(output),\n };\n break;\n default:\n const parsedBody = parsedOutput.body;\n errorCode = parsedBody.code || parsedBody.Code || errorCode;\n response = {\n ...parsedBody,\n name: `${errorCode}`,\n message: parsedBody.message || parsedBody.Message || errorCode,\n $fault: \"client\",\n $metadata: deserializeMetadata(output),\n };\n }\n const message = response.message || response.Message || errorCode;\n response.message = message;\n delete response.Message;\n return Promise.reject(Object.assign(new Error(message), response));\n};\nconst deserializeAws_json1_1DeleteTaskSetCommand = async (output, context) => {\n if (output.statusCode >= 300) {\n return deserializeAws_json1_1DeleteTaskSetCommandError(output, context);\n }\n const data = await parseBody(output.body, context);\n let contents = {};\n contents = deserializeAws_json1_1DeleteTaskSetResponse(data, context);\n const response = {\n $metadata: deserializeMetadata(output),\n ...contents,\n };\n return Promise.resolve(response);\n};\nexports.deserializeAws_json1_1DeleteTaskSetCommand = deserializeAws_json1_1DeleteTaskSetCommand;\nconst deserializeAws_json1_1DeleteTaskSetCommandError = async (output, context) => {\n const parsedOutput = {\n ...output,\n body: await parseBody(output.body, context),\n };\n let response;\n let errorCode = \"UnknownError\";\n errorCode = loadRestJsonErrorCode(output, parsedOutput.body);\n switch (errorCode) {\n case \"AccessDeniedException\":\n case \"com.amazonaws.ecs#AccessDeniedException\":\n response = {\n ...(await deserializeAws_json1_1AccessDeniedExceptionResponse(parsedOutput, context)),\n name: errorCode,\n $metadata: deserializeMetadata(output),\n };\n break;\n case \"ClientException\":\n case \"com.amazonaws.ecs#ClientException\":\n response = {\n ...(await deserializeAws_json1_1ClientExceptionResponse(parsedOutput, context)),\n name: errorCode,\n $metadata: deserializeMetadata(output),\n };\n break;\n case \"ClusterNotFoundException\":\n case \"com.amazonaws.ecs#ClusterNotFoundException\":\n response = {\n ...(await deserializeAws_json1_1ClusterNotFoundExceptionResponse(parsedOutput, context)),\n name: errorCode,\n $metadata: deserializeMetadata(output),\n };\n break;\n case \"InvalidParameterException\":\n case \"com.amazonaws.ecs#InvalidParameterException\":\n response = {\n ...(await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)),\n name: errorCode,\n $metadata: deserializeMetadata(output),\n };\n break;\n case \"ServerException\":\n case \"com.amazonaws.ecs#ServerException\":\n response = {\n ...(await deserializeAws_json1_1ServerExceptionResponse(parsedOutput, context)),\n name: errorCode,\n $metadata: deserializeMetadata(output),\n };\n break;\n case \"ServiceNotActiveException\":\n case \"com.amazonaws.ecs#ServiceNotActiveException\":\n response = {\n ...(await deserializeAws_json1_1ServiceNotActiveExceptionResponse(parsedOutput, context)),\n name: errorCode,\n $metadata: deserializeMetadata(output),\n };\n break;\n case \"ServiceNotFoundException\":\n case \"com.amazonaws.ecs#ServiceNotFoundException\":\n response = {\n ...(await deserializeAws_json1_1ServiceNotFoundExceptionResponse(parsedOutput, context)),\n name: errorCode,\n $metadata: deserializeMetadata(output),\n };\n break;\n case \"TaskSetNotFoundException\":\n case \"com.amazonaws.ecs#TaskSetNotFoundException\":\n response = {\n ...(await deserializeAws_json1_1TaskSetNotFoundExceptionResponse(parsedOutput, context)),\n name: errorCode,\n $metadata: deserializeMetadata(output),\n };\n break;\n case \"UnsupportedFeatureException\":\n case \"com.amazonaws.ecs#UnsupportedFeatureException\":\n response = {\n ...(await deserializeAws_json1_1UnsupportedFeatureExceptionResponse(parsedOutput, context)),\n name: errorCode,\n $metadata: deserializeMetadata(output),\n };\n break;\n default:\n const parsedBody = parsedOutput.body;\n errorCode = parsedBody.code || parsedBody.Code || errorCode;\n response = {\n ...parsedBody,\n name: `${errorCode}`,\n message: parsedBody.message || parsedBody.Message || errorCode,\n $fault: \"client\",\n $metadata: deserializeMetadata(output),\n };\n }\n const message = response.message || response.Message || errorCode;\n response.message = message;\n delete response.Message;\n return Promise.reject(Object.assign(new Error(message), response));\n};\nconst deserializeAws_json1_1DeregisterContainerInstanceCommand = async (output, context) => {\n if (output.statusCode >= 300) {\n return deserializeAws_json1_1DeregisterContainerInstanceCommandError(output, context);\n }\n const data = await parseBody(output.body, context);\n let contents = {};\n contents = deserializeAws_json1_1DeregisterContainerInstanceResponse(data, context);\n const response = {\n $metadata: deserializeMetadata(output),\n ...contents,\n };\n return Promise.resolve(response);\n};\nexports.deserializeAws_json1_1DeregisterContainerInstanceCommand = deserializeAws_json1_1DeregisterContainerInstanceCommand;\nconst deserializeAws_json1_1DeregisterContainerInstanceCommandError = async (output, context) => {\n const parsedOutput = {\n ...output,\n body: await parseBody(output.body, context),\n };\n let response;\n let errorCode = \"UnknownError\";\n errorCode = loadRestJsonErrorCode(output, parsedOutput.body);\n switch (errorCode) {\n case \"ClientException\":\n case \"com.amazonaws.ecs#ClientException\":\n response = {\n ...(await deserializeAws_json1_1ClientExceptionResponse(parsedOutput, context)),\n name: errorCode,\n $metadata: deserializeMetadata(output),\n };\n break;\n case \"ClusterNotFoundException\":\n case \"com.amazonaws.ecs#ClusterNotFoundException\":\n response = {\n ...(await deserializeAws_json1_1ClusterNotFoundExceptionResponse(parsedOutput, context)),\n name: errorCode,\n $metadata: deserializeMetadata(output),\n };\n break;\n case \"InvalidParameterException\":\n case \"com.amazonaws.ecs#InvalidParameterException\":\n response = {\n ...(await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)),\n name: errorCode,\n $metadata: deserializeMetadata(output),\n };\n break;\n case \"ServerException\":\n case \"com.amazonaws.ecs#ServerException\":\n response = {\n ...(await deserializeAws_json1_1ServerExceptionResponse(parsedOutput, context)),\n name: errorCode,\n $metadata: deserializeMetadata(output),\n };\n break;\n default:\n const parsedBody = parsedOutput.body;\n errorCode = parsedBody.code || parsedBody.Code || errorCode;\n response = {\n ...parsedBody,\n name: `${errorCode}`,\n message: parsedBody.message || parsedBody.Message || errorCode,\n $fault: \"client\",\n $metadata: deserializeMetadata(output),\n };\n }\n const message = response.message || response.Message || errorCode;\n response.message = message;\n delete response.Message;\n return Promise.reject(Object.assign(new Error(message), response));\n};\nconst deserializeAws_json1_1DeregisterTaskDefinitionCommand = async (output, context) => {\n if (output.statusCode >= 300) {\n return deserializeAws_json1_1DeregisterTaskDefinitionCommandError(output, context);\n }\n const data = await parseBody(output.body, context);\n let contents = {};\n contents = deserializeAws_json1_1DeregisterTaskDefinitionResponse(data, context);\n const response = {\n $metadata: deserializeMetadata(output),\n ...contents,\n };\n return Promise.resolve(response);\n};\nexports.deserializeAws_json1_1DeregisterTaskDefinitionCommand = deserializeAws_json1_1DeregisterTaskDefinitionCommand;\nconst deserializeAws_json1_1DeregisterTaskDefinitionCommandError = async (output, context) => {\n const parsedOutput = {\n ...output,\n body: await parseBody(output.body, context),\n };\n let response;\n let errorCode = \"UnknownError\";\n errorCode = loadRestJsonErrorCode(output, parsedOutput.body);\n switch (errorCode) {\n case \"ClientException\":\n case \"com.amazonaws.ecs#ClientException\":\n response = {\n ...(await deserializeAws_json1_1ClientExceptionResponse(parsedOutput, context)),\n name: errorCode,\n $metadata: deserializeMetadata(output),\n };\n break;\n case \"InvalidParameterException\":\n case \"com.amazonaws.ecs#InvalidParameterException\":\n response = {\n ...(await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)),\n name: errorCode,\n $metadata: deserializeMetadata(output),\n };\n break;\n case \"ServerException\":\n case \"com.amazonaws.ecs#ServerException\":\n response = {\n ...(await deserializeAws_json1_1ServerExceptionResponse(parsedOutput, context)),\n name: errorCode,\n $metadata: deserializeMetadata(output),\n };\n break;\n default:\n const parsedBody = parsedOutput.body;\n errorCode = parsedBody.code || parsedBody.Code || errorCode;\n response = {\n ...parsedBody,\n name: `${errorCode}`,\n message: parsedBody.message || parsedBody.Message || errorCode,\n $fault: \"client\",\n $metadata: deserializeMetadata(output),\n };\n }\n const message = response.message || response.Message || errorCode;\n response.message = message;\n delete response.Message;\n return Promise.reject(Object.assign(new Error(message), response));\n};\nconst deserializeAws_json1_1DescribeCapacityProvidersCommand = async (output, context) => {\n if (output.statusCode >= 300) {\n return deserializeAws_json1_1DescribeCapacityProvidersCommandError(output, context);\n }\n const data = await parseBody(output.body, context);\n let contents = {};\n contents = deserializeAws_json1_1DescribeCapacityProvidersResponse(data, context);\n const response = {\n $metadata: deserializeMetadata(output),\n ...contents,\n };\n return Promise.resolve(response);\n};\nexports.deserializeAws_json1_1DescribeCapacityProvidersCommand = deserializeAws_json1_1DescribeCapacityProvidersCommand;\nconst deserializeAws_json1_1DescribeCapacityProvidersCommandError = async (output, context) => {\n const parsedOutput = {\n ...output,\n body: await parseBody(output.body, context),\n };\n let response;\n let errorCode = \"UnknownError\";\n errorCode = loadRestJsonErrorCode(output, parsedOutput.body);\n switch (errorCode) {\n case \"ClientException\":\n case \"com.amazonaws.ecs#ClientException\":\n response = {\n ...(await deserializeAws_json1_1ClientExceptionResponse(parsedOutput, context)),\n name: errorCode,\n $metadata: deserializeMetadata(output),\n };\n break;\n case \"InvalidParameterException\":\n case \"com.amazonaws.ecs#InvalidParameterException\":\n response = {\n ...(await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)),\n name: errorCode,\n $metadata: deserializeMetadata(output),\n };\n break;\n case \"ServerException\":\n case \"com.amazonaws.ecs#ServerException\":\n response = {\n ...(await deserializeAws_json1_1ServerExceptionResponse(parsedOutput, context)),\n name: errorCode,\n $metadata: deserializeMetadata(output),\n };\n break;\n default:\n const parsedBody = parsedOutput.body;\n errorCode = parsedBody.code || parsedBody.Code || errorCode;\n response = {\n ...parsedBody,\n name: `${errorCode}`,\n message: parsedBody.message || parsedBody.Message || errorCode,\n $fault: \"client\",\n $metadata: deserializeMetadata(output),\n };\n }\n const message = response.message || response.Message || errorCode;\n response.message = message;\n delete response.Message;\n return Promise.reject(Object.assign(new Error(message), response));\n};\nconst deserializeAws_json1_1DescribeClustersCommand = async (output, context) => {\n if (output.statusCode >= 300) {\n return deserializeAws_json1_1DescribeClustersCommandError(output, context);\n }\n const data = await parseBody(output.body, context);\n let contents = {};\n contents = deserializeAws_json1_1DescribeClustersResponse(data, context);\n const response = {\n $metadata: deserializeMetadata(output),\n ...contents,\n };\n return Promise.resolve(response);\n};\nexports.deserializeAws_json1_1DescribeClustersCommand = deserializeAws_json1_1DescribeClustersCommand;\nconst deserializeAws_json1_1DescribeClustersCommandError = async (output, context) => {\n const parsedOutput = {\n ...output,\n body: await parseBody(output.body, context),\n };\n let response;\n let errorCode = \"UnknownError\";\n errorCode = loadRestJsonErrorCode(output, parsedOutput.body);\n switch (errorCode) {\n case \"ClientException\":\n case \"com.amazonaws.ecs#ClientException\":\n response = {\n ...(await deserializeAws_json1_1ClientExceptionResponse(parsedOutput, context)),\n name: errorCode,\n $metadata: deserializeMetadata(output),\n };\n break;\n case \"InvalidParameterException\":\n case \"com.amazonaws.ecs#InvalidParameterException\":\n response = {\n ...(await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)),\n name: errorCode,\n $metadata: deserializeMetadata(output),\n };\n break;\n case \"ServerException\":\n case \"com.amazonaws.ecs#ServerException\":\n response = {\n ...(await deserializeAws_json1_1ServerExceptionResponse(parsedOutput, context)),\n name: errorCode,\n $metadata: deserializeMetadata(output),\n };\n break;\n default:\n const parsedBody = parsedOutput.body;\n errorCode = parsedBody.code || parsedBody.Code || errorCode;\n response = {\n ...parsedBody,\n name: `${errorCode}`,\n message: parsedBody.message || parsedBody.Message || errorCode,\n $fault: \"client\",\n $metadata: deserializeMetadata(output),\n };\n }\n const message = response.message || response.Message || errorCode;\n response.message = message;\n delete response.Message;\n return Promise.reject(Object.assign(new Error(message), response));\n};\nconst deserializeAws_json1_1DescribeContainerInstancesCommand = async (output, context) => {\n if (output.statusCode >= 300) {\n return deserializeAws_json1_1DescribeContainerInstancesCommandError(output, context);\n }\n const data = await parseBody(output.body, context);\n let contents = {};\n contents = deserializeAws_json1_1DescribeContainerInstancesResponse(data, context);\n const response = {\n $metadata: deserializeMetadata(output),\n ...contents,\n };\n return Promise.resolve(response);\n};\nexports.deserializeAws_json1_1DescribeContainerInstancesCommand = deserializeAws_json1_1DescribeContainerInstancesCommand;\nconst deserializeAws_json1_1DescribeContainerInstancesCommandError = async (output, context) => {\n const parsedOutput = {\n ...output,\n body: await parseBody(output.body, context),\n };\n let response;\n let errorCode = \"UnknownError\";\n errorCode = loadRestJsonErrorCode(output, parsedOutput.body);\n switch (errorCode) {\n case \"ClientException\":\n case \"com.amazonaws.ecs#ClientException\":\n response = {\n ...(await deserializeAws_json1_1ClientExceptionResponse(parsedOutput, context)),\n name: errorCode,\n $metadata: deserializeMetadata(output),\n };\n break;\n case \"ClusterNotFoundException\":\n case \"com.amazonaws.ecs#ClusterNotFoundException\":\n response = {\n ...(await deserializeAws_json1_1ClusterNotFoundExceptionResponse(parsedOutput, context)),\n name: errorCode,\n $metadata: deserializeMetadata(output),\n };\n break;\n case \"InvalidParameterException\":\n case \"com.amazonaws.ecs#InvalidParameterException\":\n response = {\n ...(await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)),\n name: errorCode,\n $metadata: deserializeMetadata(output),\n };\n break;\n case \"ServerException\":\n case \"com.amazonaws.ecs#ServerException\":\n response = {\n ...(await deserializeAws_json1_1ServerExceptionResponse(parsedOutput, context)),\n name: errorCode,\n $metadata: deserializeMetadata(output),\n };\n break;\n default:\n const parsedBody = parsedOutput.body;\n errorCode = parsedBody.code || parsedBody.Code || errorCode;\n response = {\n ...parsedBody,\n name: `${errorCode}`,\n message: parsedBody.message || parsedBody.Message || errorCode,\n $fault: \"client\",\n $metadata: deserializeMetadata(output),\n };\n }\n const message = response.message || response.Message || errorCode;\n response.message = message;\n delete response.Message;\n return Promise.reject(Object.assign(new Error(message), response));\n};\nconst deserializeAws_json1_1DescribeServicesCommand = async (output, context) => {\n if (output.statusCode >= 300) {\n return deserializeAws_json1_1DescribeServicesCommandError(output, context);\n }\n const data = await parseBody(output.body, context);\n let contents = {};\n contents = deserializeAws_json1_1DescribeServicesResponse(data, context);\n const response = {\n $metadata: deserializeMetadata(output),\n ...contents,\n };\n return Promise.resolve(response);\n};\nexports.deserializeAws_json1_1DescribeServicesCommand = deserializeAws_json1_1DescribeServicesCommand;\nconst deserializeAws_json1_1DescribeServicesCommandError = async (output, context) => {\n const parsedOutput = {\n ...output,\n body: await parseBody(output.body, context),\n };\n let response;\n let errorCode = \"UnknownError\";\n errorCode = loadRestJsonErrorCode(output, parsedOutput.body);\n switch (errorCode) {\n case \"ClientException\":\n case \"com.amazonaws.ecs#ClientException\":\n response = {\n ...(await deserializeAws_json1_1ClientExceptionResponse(parsedOutput, context)),\n name: errorCode,\n $metadata: deserializeMetadata(output),\n };\n break;\n case \"ClusterNotFoundException\":\n case \"com.amazonaws.ecs#ClusterNotFoundException\":\n response = {\n ...(await deserializeAws_json1_1ClusterNotFoundExceptionResponse(parsedOutput, context)),\n name: errorCode,\n $metadata: deserializeMetadata(output),\n };\n break;\n case \"InvalidParameterException\":\n case \"com.amazonaws.ecs#InvalidParameterException\":\n response = {\n ...(await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)),\n name: errorCode,\n $metadata: deserializeMetadata(output),\n };\n break;\n case \"ServerException\":\n case \"com.amazonaws.ecs#ServerException\":\n response = {\n ...(await deserializeAws_json1_1ServerExceptionResponse(parsedOutput, context)),\n name: errorCode,\n $metadata: deserializeMetadata(output),\n };\n break;\n default:\n const parsedBody = parsedOutput.body;\n errorCode = parsedBody.code || parsedBody.Code || errorCode;\n response = {\n ...parsedBody,\n name: `${errorCode}`,\n message: parsedBody.message || parsedBody.Message || errorCode,\n $fault: \"client\",\n $metadata: deserializeMetadata(output),\n };\n }\n const message = response.message || response.Message || errorCode;\n response.message = message;\n delete response.Message;\n return Promise.reject(Object.assign(new Error(message), response));\n};\nconst deserializeAws_json1_1DescribeTaskDefinitionCommand = async (output, context) => {\n if (output.statusCode >= 300) {\n return deserializeAws_json1_1DescribeTaskDefinitionCommandError(output, context);\n }\n const data = await parseBody(output.body, context);\n let contents = {};\n contents = deserializeAws_json1_1DescribeTaskDefinitionResponse(data, context);\n const response = {\n $metadata: deserializeMetadata(output),\n ...contents,\n };\n return Promise.resolve(response);\n};\nexports.deserializeAws_json1_1DescribeTaskDefinitionCommand = deserializeAws_json1_1DescribeTaskDefinitionCommand;\nconst deserializeAws_json1_1DescribeTaskDefinitionCommandError = async (output, context) => {\n const parsedOutput = {\n ...output,\n body: await parseBody(output.body, context),\n };\n let response;\n let errorCode = \"UnknownError\";\n errorCode = loadRestJsonErrorCode(output, parsedOutput.body);\n switch (errorCode) {\n case \"ClientException\":\n case \"com.amazonaws.ecs#ClientException\":\n response = {\n ...(await deserializeAws_json1_1ClientExceptionResponse(parsedOutput, context)),\n name: errorCode,\n $metadata: deserializeMetadata(output),\n };\n break;\n case \"InvalidParameterException\":\n case \"com.amazonaws.ecs#InvalidParameterException\":\n response = {\n ...(await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)),\n name: errorCode,\n $metadata: deserializeMetadata(output),\n };\n break;\n case \"ServerException\":\n case \"com.amazonaws.ecs#ServerException\":\n response = {\n ...(await deserializeAws_json1_1ServerExceptionResponse(parsedOutput, context)),\n name: errorCode,\n $metadata: deserializeMetadata(output),\n };\n break;\n default:\n const parsedBody = parsedOutput.body;\n errorCode = parsedBody.code || parsedBody.Code || errorCode;\n response = {\n ...parsedBody,\n name: `${errorCode}`,\n message: parsedBody.message || parsedBody.Message || errorCode,\n $fault: \"client\",\n $metadata: deserializeMetadata(output),\n };\n }\n const message = response.message || response.Message || errorCode;\n response.message = message;\n delete response.Message;\n return Promise.reject(Object.assign(new Error(message), response));\n};\nconst deserializeAws_json1_1DescribeTasksCommand = async (output, context) => {\n if (output.statusCode >= 300) {\n return deserializeAws_json1_1DescribeTasksCommandError(output, context);\n }\n const data = await parseBody(output.body, context);\n let contents = {};\n contents = deserializeAws_json1_1DescribeTasksResponse(data, context);\n const response = {\n $metadata: deserializeMetadata(output),\n ...contents,\n };\n return Promise.resolve(response);\n};\nexports.deserializeAws_json1_1DescribeTasksCommand = deserializeAws_json1_1DescribeTasksCommand;\nconst deserializeAws_json1_1DescribeTasksCommandError = async (output, context) => {\n const parsedOutput = {\n ...output,\n body: await parseBody(output.body, context),\n };\n let response;\n let errorCode = \"UnknownError\";\n errorCode = loadRestJsonErrorCode(output, parsedOutput.body);\n switch (errorCode) {\n case \"ClientException\":\n case \"com.amazonaws.ecs#ClientException\":\n response = {\n ...(await deserializeAws_json1_1ClientExceptionResponse(parsedOutput, context)),\n name: errorCode,\n $metadata: deserializeMetadata(output),\n };\n break;\n case \"ClusterNotFoundException\":\n case \"com.amazonaws.ecs#ClusterNotFoundException\":\n response = {\n ...(await deserializeAws_json1_1ClusterNotFoundExceptionResponse(parsedOutput, context)),\n name: errorCode,\n $metadata: deserializeMetadata(output),\n };\n break;\n case \"InvalidParameterException\":\n case \"com.amazonaws.ecs#InvalidParameterException\":\n response = {\n ...(await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)),\n name: errorCode,\n $metadata: deserializeMetadata(output),\n };\n break;\n case \"ServerException\":\n case \"com.amazonaws.ecs#ServerException\":\n response = {\n ...(await deserializeAws_json1_1ServerExceptionResponse(parsedOutput, context)),\n name: errorCode,\n $metadata: deserializeMetadata(output),\n };\n break;\n default:\n const parsedBody = parsedOutput.body;\n errorCode = parsedBody.code || parsedBody.Code || errorCode;\n response = {\n ...parsedBody,\n name: `${errorCode}`,\n message: parsedBody.message || parsedBody.Message || errorCode,\n $fault: \"client\",\n $metadata: deserializeMetadata(output),\n };\n }\n const message = response.message || response.Message || errorCode;\n response.message = message;\n delete response.Message;\n return Promise.reject(Object.assign(new Error(message), response));\n};\nconst deserializeAws_json1_1DescribeTaskSetsCommand = async (output, context) => {\n if (output.statusCode >= 300) {\n return deserializeAws_json1_1DescribeTaskSetsCommandError(output, context);\n }\n const data = await parseBody(output.body, context);\n let contents = {};\n contents = deserializeAws_json1_1DescribeTaskSetsResponse(data, context);\n const response = {\n $metadata: deserializeMetadata(output),\n ...contents,\n };\n return Promise.resolve(response);\n};\nexports.deserializeAws_json1_1DescribeTaskSetsCommand = deserializeAws_json1_1DescribeTaskSetsCommand;\nconst deserializeAws_json1_1DescribeTaskSetsCommandError = async (output, context) => {\n const parsedOutput = {\n ...output,\n body: await parseBody(output.body, context),\n };\n let response;\n let errorCode = \"UnknownError\";\n errorCode = loadRestJsonErrorCode(output, parsedOutput.body);\n switch (errorCode) {\n case \"AccessDeniedException\":\n case \"com.amazonaws.ecs#AccessDeniedException\":\n response = {\n ...(await deserializeAws_json1_1AccessDeniedExceptionResponse(parsedOutput, context)),\n name: errorCode,\n $metadata: deserializeMetadata(output),\n };\n break;\n case \"ClientException\":\n case \"com.amazonaws.ecs#ClientException\":\n response = {\n ...(await deserializeAws_json1_1ClientExceptionResponse(parsedOutput, context)),\n name: errorCode,\n $metadata: deserializeMetadata(output),\n };\n break;\n case \"ClusterNotFoundException\":\n case \"com.amazonaws.ecs#ClusterNotFoundException\":\n response = {\n ...(await deserializeAws_json1_1ClusterNotFoundExceptionResponse(parsedOutput, context)),\n name: errorCode,\n $metadata: deserializeMetadata(output),\n };\n break;\n case \"InvalidParameterException\":\n case \"com.amazonaws.ecs#InvalidParameterException\":\n response = {\n ...(await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)),\n name: errorCode,\n $metadata: deserializeMetadata(output),\n };\n break;\n case \"ServerException\":\n case \"com.amazonaws.ecs#ServerException\":\n response = {\n ...(await deserializeAws_json1_1ServerExceptionResponse(parsedOutput, context)),\n name: errorCode,\n $metadata: deserializeMetadata(output),\n };\n break;\n case \"ServiceNotActiveException\":\n case \"com.amazonaws.ecs#ServiceNotActiveException\":\n response = {\n ...(await deserializeAws_json1_1ServiceNotActiveExceptionResponse(parsedOutput, context)),\n name: errorCode,\n $metadata: deserializeMetadata(output),\n };\n break;\n case \"ServiceNotFoundException\":\n case \"com.amazonaws.ecs#ServiceNotFoundException\":\n response = {\n ...(await deserializeAws_json1_1ServiceNotFoundExceptionResponse(parsedOutput, context)),\n name: errorCode,\n $metadata: deserializeMetadata(output),\n };\n break;\n case \"UnsupportedFeatureException\":\n case \"com.amazonaws.ecs#UnsupportedFeatureException\":\n response = {\n ...(await deserializeAws_json1_1UnsupportedFeatureExceptionResponse(parsedOutput, context)),\n name: errorCode,\n $metadata: deserializeMetadata(output),\n };\n break;\n default:\n const parsedBody = parsedOutput.body;\n errorCode = parsedBody.code || parsedBody.Code || errorCode;\n response = {\n ...parsedBody,\n name: `${errorCode}`,\n message: parsedBody.message || parsedBody.Message || errorCode,\n $fault: \"client\",\n $metadata: deserializeMetadata(output),\n };\n }\n const message = response.message || response.Message || errorCode;\n response.message = message;\n delete response.Message;\n return Promise.reject(Object.assign(new Error(message), response));\n};\nconst deserializeAws_json1_1DiscoverPollEndpointCommand = async (output, context) => {\n if (output.statusCode >= 300) {\n return deserializeAws_json1_1DiscoverPollEndpointCommandError(output, context);\n }\n const data = await parseBody(output.body, context);\n let contents = {};\n contents = deserializeAws_json1_1DiscoverPollEndpointResponse(data, context);\n const response = {\n $metadata: deserializeMetadata(output),\n ...contents,\n };\n return Promise.resolve(response);\n};\nexports.deserializeAws_json1_1DiscoverPollEndpointCommand = deserializeAws_json1_1DiscoverPollEndpointCommand;\nconst deserializeAws_json1_1DiscoverPollEndpointCommandError = async (output, context) => {\n const parsedOutput = {\n ...output,\n body: await parseBody(output.body, context),\n };\n let response;\n let errorCode = \"UnknownError\";\n errorCode = loadRestJsonErrorCode(output, parsedOutput.body);\n switch (errorCode) {\n case \"ClientException\":\n case \"com.amazonaws.ecs#ClientException\":\n response = {\n ...(await deserializeAws_json1_1ClientExceptionResponse(parsedOutput, context)),\n name: errorCode,\n $metadata: deserializeMetadata(output),\n };\n break;\n case \"ServerException\":\n case \"com.amazonaws.ecs#ServerException\":\n response = {\n ...(await deserializeAws_json1_1ServerExceptionResponse(parsedOutput, context)),\n name: errorCode,\n $metadata: deserializeMetadata(output),\n };\n break;\n default:\n const parsedBody = parsedOutput.body;\n errorCode = parsedBody.code || parsedBody.Code || errorCode;\n response = {\n ...parsedBody,\n name: `${errorCode}`,\n message: parsedBody.message || parsedBody.Message || errorCode,\n $fault: \"client\",\n $metadata: deserializeMetadata(output),\n };\n }\n const message = response.message || response.Message || errorCode;\n response.message = message;\n delete response.Message;\n return Promise.reject(Object.assign(new Error(message), response));\n};\nconst deserializeAws_json1_1ExecuteCommandCommand = async (output, context) => {\n if (output.statusCode >= 300) {\n return deserializeAws_json1_1ExecuteCommandCommandError(output, context);\n }\n const data = await parseBody(output.body, context);\n let contents = {};\n contents = deserializeAws_json1_1ExecuteCommandResponse(data, context);\n const response = {\n $metadata: deserializeMetadata(output),\n ...contents,\n };\n return Promise.resolve(response);\n};\nexports.deserializeAws_json1_1ExecuteCommandCommand = deserializeAws_json1_1ExecuteCommandCommand;\nconst deserializeAws_json1_1ExecuteCommandCommandError = async (output, context) => {\n const parsedOutput = {\n ...output,\n body: await parseBody(output.body, context),\n };\n let response;\n let errorCode = \"UnknownError\";\n errorCode = loadRestJsonErrorCode(output, parsedOutput.body);\n switch (errorCode) {\n case \"AccessDeniedException\":\n case \"com.amazonaws.ecs#AccessDeniedException\":\n response = {\n ...(await deserializeAws_json1_1AccessDeniedExceptionResponse(parsedOutput, context)),\n name: errorCode,\n $metadata: deserializeMetadata(output),\n };\n break;\n case \"ClientException\":\n case \"com.amazonaws.ecs#ClientException\":\n response = {\n ...(await deserializeAws_json1_1ClientExceptionResponse(parsedOutput, context)),\n name: errorCode,\n $metadata: deserializeMetadata(output),\n };\n break;\n case \"ClusterNotFoundException\":\n case \"com.amazonaws.ecs#ClusterNotFoundException\":\n response = {\n ...(await deserializeAws_json1_1ClusterNotFoundExceptionResponse(parsedOutput, context)),\n name: errorCode,\n $metadata: deserializeMetadata(output),\n };\n break;\n case \"InvalidParameterException\":\n case \"com.amazonaws.ecs#InvalidParameterException\":\n response = {\n ...(await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)),\n name: errorCode,\n $metadata: deserializeMetadata(output),\n };\n break;\n case \"ServerException\":\n case \"com.amazonaws.ecs#ServerException\":\n response = {\n ...(await deserializeAws_json1_1ServerExceptionResponse(parsedOutput, context)),\n name: errorCode,\n $metadata: deserializeMetadata(output),\n };\n break;\n case \"TargetNotConnectedException\":\n case \"com.amazonaws.ecs#TargetNotConnectedException\":\n response = {\n ...(await deserializeAws_json1_1TargetNotConnectedExceptionResponse(parsedOutput, context)),\n name: errorCode,\n $metadata: deserializeMetadata(output),\n };\n break;\n default:\n const parsedBody = parsedOutput.body;\n errorCode = parsedBody.code || parsedBody.Code || errorCode;\n response = {\n ...parsedBody,\n name: `${errorCode}`,\n message: parsedBody.message || parsedBody.Message || errorCode,\n $fault: \"client\",\n $metadata: deserializeMetadata(output),\n };\n }\n const message = response.message || response.Message || errorCode;\n response.message = message;\n delete response.Message;\n return Promise.reject(Object.assign(new Error(message), response));\n};\nconst deserializeAws_json1_1ListAccountSettingsCommand = async (output, context) => {\n if (output.statusCode >= 300) {\n return deserializeAws_json1_1ListAccountSettingsCommandError(output, context);\n }\n const data = await parseBody(output.body, context);\n let contents = {};\n contents = deserializeAws_json1_1ListAccountSettingsResponse(data, context);\n const response = {\n $metadata: deserializeMetadata(output),\n ...contents,\n };\n return Promise.resolve(response);\n};\nexports.deserializeAws_json1_1ListAccountSettingsCommand = deserializeAws_json1_1ListAccountSettingsCommand;\nconst deserializeAws_json1_1ListAccountSettingsCommandError = async (output, context) => {\n const parsedOutput = {\n ...output,\n body: await parseBody(output.body, context),\n };\n let response;\n let errorCode = \"UnknownError\";\n errorCode = loadRestJsonErrorCode(output, parsedOutput.body);\n switch (errorCode) {\n case \"ClientException\":\n case \"com.amazonaws.ecs#ClientException\":\n response = {\n ...(await deserializeAws_json1_1ClientExceptionResponse(parsedOutput, context)),\n name: errorCode,\n $metadata: deserializeMetadata(output),\n };\n break;\n case \"InvalidParameterException\":\n case \"com.amazonaws.ecs#InvalidParameterException\":\n response = {\n ...(await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)),\n name: errorCode,\n $metadata: deserializeMetadata(output),\n };\n break;\n case \"ServerException\":\n case \"com.amazonaws.ecs#ServerException\":\n response = {\n ...(await deserializeAws_json1_1ServerExceptionResponse(parsedOutput, context)),\n name: errorCode,\n $metadata: deserializeMetadata(output),\n };\n break;\n default:\n const parsedBody = parsedOutput.body;\n errorCode = parsedBody.code || parsedBody.Code || errorCode;\n response = {\n ...parsedBody,\n name: `${errorCode}`,\n message: parsedBody.message || parsedBody.Message || errorCode,\n $fault: \"client\",\n $metadata: deserializeMetadata(output),\n };\n }\n const message = response.message || response.Message || errorCode;\n response.message = message;\n delete response.Message;\n return Promise.reject(Object.assign(new Error(message), response));\n};\nconst deserializeAws_json1_1ListAttributesCommand = async (output, context) => {\n if (output.statusCode >= 300) {\n return deserializeAws_json1_1ListAttributesCommandError(output, context);\n }\n const data = await parseBody(output.body, context);\n let contents = {};\n contents = deserializeAws_json1_1ListAttributesResponse(data, context);\n const response = {\n $metadata: deserializeMetadata(output),\n ...contents,\n };\n return Promise.resolve(response);\n};\nexports.deserializeAws_json1_1ListAttributesCommand = deserializeAws_json1_1ListAttributesCommand;\nconst deserializeAws_json1_1ListAttributesCommandError = async (output, context) => {\n const parsedOutput = {\n ...output,\n body: await parseBody(output.body, context),\n };\n let response;\n let errorCode = \"UnknownError\";\n errorCode = loadRestJsonErrorCode(output, parsedOutput.body);\n switch (errorCode) {\n case \"ClusterNotFoundException\":\n case \"com.amazonaws.ecs#ClusterNotFoundException\":\n response = {\n ...(await deserializeAws_json1_1ClusterNotFoundExceptionResponse(parsedOutput, context)),\n name: errorCode,\n $metadata: deserializeMetadata(output),\n };\n break;\n case \"InvalidParameterException\":\n case \"com.amazonaws.ecs#InvalidParameterException\":\n response = {\n ...(await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)),\n name: errorCode,\n $metadata: deserializeMetadata(output),\n };\n break;\n default:\n const parsedBody = parsedOutput.body;\n errorCode = parsedBody.code || parsedBody.Code || errorCode;\n response = {\n ...parsedBody,\n name: `${errorCode}`,\n message: parsedBody.message || parsedBody.Message || errorCode,\n $fault: \"client\",\n $metadata: deserializeMetadata(output),\n };\n }\n const message = response.message || response.Message || errorCode;\n response.message = message;\n delete response.Message;\n return Promise.reject(Object.assign(new Error(message), response));\n};\nconst deserializeAws_json1_1ListClustersCommand = async (output, context) => {\n if (output.statusCode >= 300) {\n return deserializeAws_json1_1ListClustersCommandError(output, context);\n }\n const data = await parseBody(output.body, context);\n let contents = {};\n contents = deserializeAws_json1_1ListClustersResponse(data, context);\n const response = {\n $metadata: deserializeMetadata(output),\n ...contents,\n };\n return Promise.resolve(response);\n};\nexports.deserializeAws_json1_1ListClustersCommand = deserializeAws_json1_1ListClustersCommand;\nconst deserializeAws_json1_1ListClustersCommandError = async (output, context) => {\n const parsedOutput = {\n ...output,\n body: await parseBody(output.body, context),\n };\n let response;\n let errorCode = \"UnknownError\";\n errorCode = loadRestJsonErrorCode(output, parsedOutput.body);\n switch (errorCode) {\n case \"ClientException\":\n case \"com.amazonaws.ecs#ClientException\":\n response = {\n ...(await deserializeAws_json1_1ClientExceptionResponse(parsedOutput, context)),\n name: errorCode,\n $metadata: deserializeMetadata(output),\n };\n break;\n case \"InvalidParameterException\":\n case \"com.amazonaws.ecs#InvalidParameterException\":\n response = {\n ...(await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)),\n name: errorCode,\n $metadata: deserializeMetadata(output),\n };\n break;\n case \"ServerException\":\n case \"com.amazonaws.ecs#ServerException\":\n response = {\n ...(await deserializeAws_json1_1ServerExceptionResponse(parsedOutput, context)),\n name: errorCode,\n $metadata: deserializeMetadata(output),\n };\n break;\n default:\n const parsedBody = parsedOutput.body;\n errorCode = parsedBody.code || parsedBody.Code || errorCode;\n response = {\n ...parsedBody,\n name: `${errorCode}`,\n message: parsedBody.message || parsedBody.Message || errorCode,\n $fault: \"client\",\n $metadata: deserializeMetadata(output),\n };\n }\n const message = response.message || response.Message || errorCode;\n response.message = message;\n delete response.Message;\n return Promise.reject(Object.assign(new Error(message), response));\n};\nconst deserializeAws_json1_1ListContainerInstancesCommand = async (output, context) => {\n if (output.statusCode >= 300) {\n return deserializeAws_json1_1ListContainerInstancesCommandError(output, context);\n }\n const data = await parseBody(output.body, context);\n let contents = {};\n contents = deserializeAws_json1_1ListContainerInstancesResponse(data, context);\n const response = {\n $metadata: deserializeMetadata(output),\n ...contents,\n };\n return Promise.resolve(response);\n};\nexports.deserializeAws_json1_1ListContainerInstancesCommand = deserializeAws_json1_1ListContainerInstancesCommand;\nconst deserializeAws_json1_1ListContainerInstancesCommandError = async (output, context) => {\n const parsedOutput = {\n ...output,\n body: await parseBody(output.body, context),\n };\n let response;\n let errorCode = \"UnknownError\";\n errorCode = loadRestJsonErrorCode(output, parsedOutput.body);\n switch (errorCode) {\n case \"ClientException\":\n case \"com.amazonaws.ecs#ClientException\":\n response = {\n ...(await deserializeAws_json1_1ClientExceptionResponse(parsedOutput, context)),\n name: errorCode,\n $metadata: deserializeMetadata(output),\n };\n break;\n case \"ClusterNotFoundException\":\n case \"com.amazonaws.ecs#ClusterNotFoundException\":\n response = {\n ...(await deserializeAws_json1_1ClusterNotFoundExceptionResponse(parsedOutput, context)),\n name: errorCode,\n $metadata: deserializeMetadata(output),\n };\n break;\n case \"InvalidParameterException\":\n case \"com.amazonaws.ecs#InvalidParameterException\":\n response = {\n ...(await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)),\n name: errorCode,\n $metadata: deserializeMetadata(output),\n };\n break;\n case \"ServerException\":\n case \"com.amazonaws.ecs#ServerException\":\n response = {\n ...(await deserializeAws_json1_1ServerExceptionResponse(parsedOutput, context)),\n name: errorCode,\n $metadata: deserializeMetadata(output),\n };\n break;\n default:\n const parsedBody = parsedOutput.body;\n errorCode = parsedBody.code || parsedBody.Code || errorCode;\n response = {\n ...parsedBody,\n name: `${errorCode}`,\n message: parsedBody.message || parsedBody.Message || errorCode,\n $fault: \"client\",\n $metadata: deserializeMetadata(output),\n };\n }\n const message = response.message || response.Message || errorCode;\n response.message = message;\n delete response.Message;\n return Promise.reject(Object.assign(new Error(message), response));\n};\nconst deserializeAws_json1_1ListServicesCommand = async (output, context) => {\n if (output.statusCode >= 300) {\n return deserializeAws_json1_1ListServicesCommandError(output, context);\n }\n const data = await parseBody(output.body, context);\n let contents = {};\n contents = deserializeAws_json1_1ListServicesResponse(data, context);\n const response = {\n $metadata: deserializeMetadata(output),\n ...contents,\n };\n return Promise.resolve(response);\n};\nexports.deserializeAws_json1_1ListServicesCommand = deserializeAws_json1_1ListServicesCommand;\nconst deserializeAws_json1_1ListServicesCommandError = async (output, context) => {\n const parsedOutput = {\n ...output,\n body: await parseBody(output.body, context),\n };\n let response;\n let errorCode = \"UnknownError\";\n errorCode = loadRestJsonErrorCode(output, parsedOutput.body);\n switch (errorCode) {\n case \"ClientException\":\n case \"com.amazonaws.ecs#ClientException\":\n response = {\n ...(await deserializeAws_json1_1ClientExceptionResponse(parsedOutput, context)),\n name: errorCode,\n $metadata: deserializeMetadata(output),\n };\n break;\n case \"ClusterNotFoundException\":\n case \"com.amazonaws.ecs#ClusterNotFoundException\":\n response = {\n ...(await deserializeAws_json1_1ClusterNotFoundExceptionResponse(parsedOutput, context)),\n name: errorCode,\n $metadata: deserializeMetadata(output),\n };\n break;\n case \"InvalidParameterException\":\n case \"com.amazonaws.ecs#InvalidParameterException\":\n response = {\n ...(await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)),\n name: errorCode,\n $metadata: deserializeMetadata(output),\n };\n break;\n case \"ServerException\":\n case \"com.amazonaws.ecs#ServerException\":\n response = {\n ...(await deserializeAws_json1_1ServerExceptionResponse(parsedOutput, context)),\n name: errorCode,\n $metadata: deserializeMetadata(output),\n };\n break;\n default:\n const parsedBody = parsedOutput.body;\n errorCode = parsedBody.code || parsedBody.Code || errorCode;\n response = {\n ...parsedBody,\n name: `${errorCode}`,\n message: parsedBody.message || parsedBody.Message || errorCode,\n $fault: \"client\",\n $metadata: deserializeMetadata(output),\n };\n }\n const message = response.message || response.Message || errorCode;\n response.message = message;\n delete response.Message;\n return Promise.reject(Object.assign(new Error(message), response));\n};\nconst deserializeAws_json1_1ListTagsForResourceCommand = async (output, context) => {\n if (output.statusCode >= 300) {\n return deserializeAws_json1_1ListTagsForResourceCommandError(output, context);\n }\n const data = await parseBody(output.body, context);\n let contents = {};\n contents = deserializeAws_json1_1ListTagsForResourceResponse(data, context);\n const response = {\n $metadata: deserializeMetadata(output),\n ...contents,\n };\n return Promise.resolve(response);\n};\nexports.deserializeAws_json1_1ListTagsForResourceCommand = deserializeAws_json1_1ListTagsForResourceCommand;\nconst deserializeAws_json1_1ListTagsForResourceCommandError = async (output, context) => {\n const parsedOutput = {\n ...output,\n body: await parseBody(output.body, context),\n };\n let response;\n let errorCode = \"UnknownError\";\n errorCode = loadRestJsonErrorCode(output, parsedOutput.body);\n switch (errorCode) {\n case \"ClientException\":\n case \"com.amazonaws.ecs#ClientException\":\n response = {\n ...(await deserializeAws_json1_1ClientExceptionResponse(parsedOutput, context)),\n name: errorCode,\n $metadata: deserializeMetadata(output),\n };\n break;\n case \"ClusterNotFoundException\":\n case \"com.amazonaws.ecs#ClusterNotFoundException\":\n response = {\n ...(await deserializeAws_json1_1ClusterNotFoundExceptionResponse(parsedOutput, context)),\n name: errorCode,\n $metadata: deserializeMetadata(output),\n };\n break;\n case \"InvalidParameterException\":\n case \"com.amazonaws.ecs#InvalidParameterException\":\n response = {\n ...(await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)),\n name: errorCode,\n $metadata: deserializeMetadata(output),\n };\n break;\n case \"ServerException\":\n case \"com.amazonaws.ecs#ServerException\":\n response = {\n ...(await deserializeAws_json1_1ServerExceptionResponse(parsedOutput, context)),\n name: errorCode,\n $metadata: deserializeMetadata(output),\n };\n break;\n default:\n const parsedBody = parsedOutput.body;\n errorCode = parsedBody.code || parsedBody.Code || errorCode;\n response = {\n ...parsedBody,\n name: `${errorCode}`,\n message: parsedBody.message || parsedBody.Message || errorCode,\n $fault: \"client\",\n $metadata: deserializeMetadata(output),\n };\n }\n const message = response.message || response.Message || errorCode;\n response.message = message;\n delete response.Message;\n return Promise.reject(Object.assign(new Error(message), response));\n};\nconst deserializeAws_json1_1ListTaskDefinitionFamiliesCommand = async (output, context) => {\n if (output.statusCode >= 300) {\n return deserializeAws_json1_1ListTaskDefinitionFamiliesCommandError(output, context);\n }\n const data = await parseBody(output.body, context);\n let contents = {};\n contents = deserializeAws_json1_1ListTaskDefinitionFamiliesResponse(data, context);\n const response = {\n $metadata: deserializeMetadata(output),\n ...contents,\n };\n return Promise.resolve(response);\n};\nexports.deserializeAws_json1_1ListTaskDefinitionFamiliesCommand = deserializeAws_json1_1ListTaskDefinitionFamiliesCommand;\nconst deserializeAws_json1_1ListTaskDefinitionFamiliesCommandError = async (output, context) => {\n const parsedOutput = {\n ...output,\n body: await parseBody(output.body, context),\n };\n let response;\n let errorCode = \"UnknownError\";\n errorCode = loadRestJsonErrorCode(output, parsedOutput.body);\n switch (errorCode) {\n case \"ClientException\":\n case \"com.amazonaws.ecs#ClientException\":\n response = {\n ...(await deserializeAws_json1_1ClientExceptionResponse(parsedOutput, context)),\n name: errorCode,\n $metadata: deserializeMetadata(output),\n };\n break;\n case \"InvalidParameterException\":\n case \"com.amazonaws.ecs#InvalidParameterException\":\n response = {\n ...(await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)),\n name: errorCode,\n $metadata: deserializeMetadata(output),\n };\n break;\n case \"ServerException\":\n case \"com.amazonaws.ecs#ServerException\":\n response = {\n ...(await deserializeAws_json1_1ServerExceptionResponse(parsedOutput, context)),\n name: errorCode,\n $metadata: deserializeMetadata(output),\n };\n break;\n default:\n const parsedBody = parsedOutput.body;\n errorCode = parsedBody.code || parsedBody.Code || errorCode;\n response = {\n ...parsedBody,\n name: `${errorCode}`,\n message: parsedBody.message || parsedBody.Message || errorCode,\n $fault: \"client\",\n $metadata: deserializeMetadata(output),\n };\n }\n const message = response.message || response.Message || errorCode;\n response.message = message;\n delete response.Message;\n return Promise.reject(Object.assign(new Error(message), response));\n};\nconst deserializeAws_json1_1ListTaskDefinitionsCommand = async (output, context) => {\n if (output.statusCode >= 300) {\n return deserializeAws_json1_1ListTaskDefinitionsCommandError(output, context);\n }\n const data = await parseBody(output.body, context);\n let contents = {};\n contents = deserializeAws_json1_1ListTaskDefinitionsResponse(data, context);\n const response = {\n $metadata: deserializeMetadata(output),\n ...contents,\n };\n return Promise.resolve(response);\n};\nexports.deserializeAws_json1_1ListTaskDefinitionsCommand = deserializeAws_json1_1ListTaskDefinitionsCommand;\nconst deserializeAws_json1_1ListTaskDefinitionsCommandError = async (output, context) => {\n const parsedOutput = {\n ...output,\n body: await parseBody(output.body, context),\n };\n let response;\n let errorCode = \"UnknownError\";\n errorCode = loadRestJsonErrorCode(output, parsedOutput.body);\n switch (errorCode) {\n case \"ClientException\":\n case \"com.amazonaws.ecs#ClientException\":\n response = {\n ...(await deserializeAws_json1_1ClientExceptionResponse(parsedOutput, context)),\n name: errorCode,\n $metadata: deserializeMetadata(output),\n };\n break;\n case \"InvalidParameterException\":\n case \"com.amazonaws.ecs#InvalidParameterException\":\n response = {\n ...(await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)),\n name: errorCode,\n $metadata: deserializeMetadata(output),\n };\n break;\n case \"ServerException\":\n case \"com.amazonaws.ecs#ServerException\":\n response = {\n ...(await deserializeAws_json1_1ServerExceptionResponse(parsedOutput, context)),\n name: errorCode,\n $metadata: deserializeMetadata(output),\n };\n break;\n default:\n const parsedBody = parsedOutput.body;\n errorCode = parsedBody.code || parsedBody.Code || errorCode;\n response = {\n ...parsedBody,\n name: `${errorCode}`,\n message: parsedBody.message || parsedBody.Message || errorCode,\n $fault: \"client\",\n $metadata: deserializeMetadata(output),\n };\n }\n const message = response.message || response.Message || errorCode;\n response.message = message;\n delete response.Message;\n return Promise.reject(Object.assign(new Error(message), response));\n};\nconst deserializeAws_json1_1ListTasksCommand = async (output, context) => {\n if (output.statusCode >= 300) {\n return deserializeAws_json1_1ListTasksCommandError(output, context);\n }\n const data = await parseBody(output.body, context);\n let contents = {};\n contents = deserializeAws_json1_1ListTasksResponse(data, context);\n const response = {\n $metadata: deserializeMetadata(output),\n ...contents,\n };\n return Promise.resolve(response);\n};\nexports.deserializeAws_json1_1ListTasksCommand = deserializeAws_json1_1ListTasksCommand;\nconst deserializeAws_json1_1ListTasksCommandError = async (output, context) => {\n const parsedOutput = {\n ...output,\n body: await parseBody(output.body, context),\n };\n let response;\n let errorCode = \"UnknownError\";\n errorCode = loadRestJsonErrorCode(output, parsedOutput.body);\n switch (errorCode) {\n case \"ClientException\":\n case \"com.amazonaws.ecs#ClientException\":\n response = {\n ...(await deserializeAws_json1_1ClientExceptionResponse(parsedOutput, context)),\n name: errorCode,\n $metadata: deserializeMetadata(output),\n };\n break;\n case \"ClusterNotFoundException\":\n case \"com.amazonaws.ecs#ClusterNotFoundException\":\n response = {\n ...(await deserializeAws_json1_1ClusterNotFoundExceptionResponse(parsedOutput, context)),\n name: errorCode,\n $metadata: deserializeMetadata(output),\n };\n break;\n case \"InvalidParameterException\":\n case \"com.amazonaws.ecs#InvalidParameterException\":\n response = {\n ...(await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)),\n name: errorCode,\n $metadata: deserializeMetadata(output),\n };\n break;\n case \"ServerException\":\n case \"com.amazonaws.ecs#ServerException\":\n response = {\n ...(await deserializeAws_json1_1ServerExceptionResponse(parsedOutput, context)),\n name: errorCode,\n $metadata: deserializeMetadata(output),\n };\n break;\n case \"ServiceNotFoundException\":\n case \"com.amazonaws.ecs#ServiceNotFoundException\":\n response = {\n ...(await deserializeAws_json1_1ServiceNotFoundExceptionResponse(parsedOutput, context)),\n name: errorCode,\n $metadata: deserializeMetadata(output),\n };\n break;\n default:\n const parsedBody = parsedOutput.body;\n errorCode = parsedBody.code || parsedBody.Code || errorCode;\n response = {\n ...parsedBody,\n name: `${errorCode}`,\n message: parsedBody.message || parsedBody.Message || errorCode,\n $fault: \"client\",\n $metadata: deserializeMetadata(output),\n };\n }\n const message = response.message || response.Message || errorCode;\n response.message = message;\n delete response.Message;\n return Promise.reject(Object.assign(new Error(message), response));\n};\nconst deserializeAws_json1_1PutAccountSettingCommand = async (output, context) => {\n if (output.statusCode >= 300) {\n return deserializeAws_json1_1PutAccountSettingCommandError(output, context);\n }\n const data = await parseBody(output.body, context);\n let contents = {};\n contents = deserializeAws_json1_1PutAccountSettingResponse(data, context);\n const response = {\n $metadata: deserializeMetadata(output),\n ...contents,\n };\n return Promise.resolve(response);\n};\nexports.deserializeAws_json1_1PutAccountSettingCommand = deserializeAws_json1_1PutAccountSettingCommand;\nconst deserializeAws_json1_1PutAccountSettingCommandError = async (output, context) => {\n const parsedOutput = {\n ...output,\n body: await parseBody(output.body, context),\n };\n let response;\n let errorCode = \"UnknownError\";\n errorCode = loadRestJsonErrorCode(output, parsedOutput.body);\n switch (errorCode) {\n case \"ClientException\":\n case \"com.amazonaws.ecs#ClientException\":\n response = {\n ...(await deserializeAws_json1_1ClientExceptionResponse(parsedOutput, context)),\n name: errorCode,\n $metadata: deserializeMetadata(output),\n };\n break;\n case \"InvalidParameterException\":\n case \"com.amazonaws.ecs#InvalidParameterException\":\n response = {\n ...(await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)),\n name: errorCode,\n $metadata: deserializeMetadata(output),\n };\n break;\n case \"ServerException\":\n case \"com.amazonaws.ecs#ServerException\":\n response = {\n ...(await deserializeAws_json1_1ServerExceptionResponse(parsedOutput, context)),\n name: errorCode,\n $metadata: deserializeMetadata(output),\n };\n break;\n default:\n const parsedBody = parsedOutput.body;\n errorCode = parsedBody.code || parsedBody.Code || errorCode;\n response = {\n ...parsedBody,\n name: `${errorCode}`,\n message: parsedBody.message || parsedBody.Message || errorCode,\n $fault: \"client\",\n $metadata: deserializeMetadata(output),\n };\n }\n const message = response.message || response.Message || errorCode;\n response.message = message;\n delete response.Message;\n return Promise.reject(Object.assign(new Error(message), response));\n};\nconst deserializeAws_json1_1PutAccountSettingDefaultCommand = async (output, context) => {\n if (output.statusCode >= 300) {\n return deserializeAws_json1_1PutAccountSettingDefaultCommandError(output, context);\n }\n const data = await parseBody(output.body, context);\n let contents = {};\n contents = deserializeAws_json1_1PutAccountSettingDefaultResponse(data, context);\n const response = {\n $metadata: deserializeMetadata(output),\n ...contents,\n };\n return Promise.resolve(response);\n};\nexports.deserializeAws_json1_1PutAccountSettingDefaultCommand = deserializeAws_json1_1PutAccountSettingDefaultCommand;\nconst deserializeAws_json1_1PutAccountSettingDefaultCommandError = async (output, context) => {\n const parsedOutput = {\n ...output,\n body: await parseBody(output.body, context),\n };\n let response;\n let errorCode = \"UnknownError\";\n errorCode = loadRestJsonErrorCode(output, parsedOutput.body);\n switch (errorCode) {\n case \"ClientException\":\n case \"com.amazonaws.ecs#ClientException\":\n response = {\n ...(await deserializeAws_json1_1ClientExceptionResponse(parsedOutput, context)),\n name: errorCode,\n $metadata: deserializeMetadata(output),\n };\n break;\n case \"InvalidParameterException\":\n case \"com.amazonaws.ecs#InvalidParameterException\":\n response = {\n ...(await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)),\n name: errorCode,\n $metadata: deserializeMetadata(output),\n };\n break;\n case \"ServerException\":\n case \"com.amazonaws.ecs#ServerException\":\n response = {\n ...(await deserializeAws_json1_1ServerExceptionResponse(parsedOutput, context)),\n name: errorCode,\n $metadata: deserializeMetadata(output),\n };\n break;\n default:\n const parsedBody = parsedOutput.body;\n errorCode = parsedBody.code || parsedBody.Code || errorCode;\n response = {\n ...parsedBody,\n name: `${errorCode}`,\n message: parsedBody.message || parsedBody.Message || errorCode,\n $fault: \"client\",\n $metadata: deserializeMetadata(output),\n };\n }\n const message = response.message || response.Message || errorCode;\n response.message = message;\n delete response.Message;\n return Promise.reject(Object.assign(new Error(message), response));\n};\nconst deserializeAws_json1_1PutAttributesCommand = async (output, context) => {\n if (output.statusCode >= 300) {\n return deserializeAws_json1_1PutAttributesCommandError(output, context);\n }\n const data = await parseBody(output.body, context);\n let contents = {};\n contents = deserializeAws_json1_1PutAttributesResponse(data, context);\n const response = {\n $metadata: deserializeMetadata(output),\n ...contents,\n };\n return Promise.resolve(response);\n};\nexports.deserializeAws_json1_1PutAttributesCommand = deserializeAws_json1_1PutAttributesCommand;\nconst deserializeAws_json1_1PutAttributesCommandError = async (output, context) => {\n const parsedOutput = {\n ...output,\n body: await parseBody(output.body, context),\n };\n let response;\n let errorCode = \"UnknownError\";\n errorCode = loadRestJsonErrorCode(output, parsedOutput.body);\n switch (errorCode) {\n case \"AttributeLimitExceededException\":\n case \"com.amazonaws.ecs#AttributeLimitExceededException\":\n response = {\n ...(await deserializeAws_json1_1AttributeLimitExceededExceptionResponse(parsedOutput, context)),\n name: errorCode,\n $metadata: deserializeMetadata(output),\n };\n break;\n case \"ClusterNotFoundException\":\n case \"com.amazonaws.ecs#ClusterNotFoundException\":\n response = {\n ...(await deserializeAws_json1_1ClusterNotFoundExceptionResponse(parsedOutput, context)),\n name: errorCode,\n $metadata: deserializeMetadata(output),\n };\n break;\n case \"InvalidParameterException\":\n case \"com.amazonaws.ecs#InvalidParameterException\":\n response = {\n ...(await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)),\n name: errorCode,\n $metadata: deserializeMetadata(output),\n };\n break;\n case \"TargetNotFoundException\":\n case \"com.amazonaws.ecs#TargetNotFoundException\":\n response = {\n ...(await deserializeAws_json1_1TargetNotFoundExceptionResponse(parsedOutput, context)),\n name: errorCode,\n $metadata: deserializeMetadata(output),\n };\n break;\n default:\n const parsedBody = parsedOutput.body;\n errorCode = parsedBody.code || parsedBody.Code || errorCode;\n response = {\n ...parsedBody,\n name: `${errorCode}`,\n message: parsedBody.message || parsedBody.Message || errorCode,\n $fault: \"client\",\n $metadata: deserializeMetadata(output),\n };\n }\n const message = response.message || response.Message || errorCode;\n response.message = message;\n delete response.Message;\n return Promise.reject(Object.assign(new Error(message), response));\n};\nconst deserializeAws_json1_1PutClusterCapacityProvidersCommand = async (output, context) => {\n if (output.statusCode >= 300) {\n return deserializeAws_json1_1PutClusterCapacityProvidersCommandError(output, context);\n }\n const data = await parseBody(output.body, context);\n let contents = {};\n contents = deserializeAws_json1_1PutClusterCapacityProvidersResponse(data, context);\n const response = {\n $metadata: deserializeMetadata(output),\n ...contents,\n };\n return Promise.resolve(response);\n};\nexports.deserializeAws_json1_1PutClusterCapacityProvidersCommand = deserializeAws_json1_1PutClusterCapacityProvidersCommand;\nconst deserializeAws_json1_1PutClusterCapacityProvidersCommandError = async (output, context) => {\n const parsedOutput = {\n ...output,\n body: await parseBody(output.body, context),\n };\n let response;\n let errorCode = \"UnknownError\";\n errorCode = loadRestJsonErrorCode(output, parsedOutput.body);\n switch (errorCode) {\n case \"ClientException\":\n case \"com.amazonaws.ecs#ClientException\":\n response = {\n ...(await deserializeAws_json1_1ClientExceptionResponse(parsedOutput, context)),\n name: errorCode,\n $metadata: deserializeMetadata(output),\n };\n break;\n case \"ClusterNotFoundException\":\n case \"com.amazonaws.ecs#ClusterNotFoundException\":\n response = {\n ...(await deserializeAws_json1_1ClusterNotFoundExceptionResponse(parsedOutput, context)),\n name: errorCode,\n $metadata: deserializeMetadata(output),\n };\n break;\n case \"InvalidParameterException\":\n case \"com.amazonaws.ecs#InvalidParameterException\":\n response = {\n ...(await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)),\n name: errorCode,\n $metadata: deserializeMetadata(output),\n };\n break;\n case \"ResourceInUseException\":\n case \"com.amazonaws.ecs#ResourceInUseException\":\n response = {\n ...(await deserializeAws_json1_1ResourceInUseExceptionResponse(parsedOutput, context)),\n name: errorCode,\n $metadata: deserializeMetadata(output),\n };\n break;\n case \"ServerException\":\n case \"com.amazonaws.ecs#ServerException\":\n response = {\n ...(await deserializeAws_json1_1ServerExceptionResponse(parsedOutput, context)),\n name: errorCode,\n $metadata: deserializeMetadata(output),\n };\n break;\n case \"UpdateInProgressException\":\n case \"com.amazonaws.ecs#UpdateInProgressException\":\n response = {\n ...(await deserializeAws_json1_1UpdateInProgressExceptionResponse(parsedOutput, context)),\n name: errorCode,\n $metadata: deserializeMetadata(output),\n };\n break;\n default:\n const parsedBody = parsedOutput.body;\n errorCode = parsedBody.code || parsedBody.Code || errorCode;\n response = {\n ...parsedBody,\n name: `${errorCode}`,\n message: parsedBody.message || parsedBody.Message || errorCode,\n $fault: \"client\",\n $metadata: deserializeMetadata(output),\n };\n }\n const message = response.message || response.Message || errorCode;\n response.message = message;\n delete response.Message;\n return Promise.reject(Object.assign(new Error(message), response));\n};\nconst deserializeAws_json1_1RegisterContainerInstanceCommand = async (output, context) => {\n if (output.statusCode >= 300) {\n return deserializeAws_json1_1RegisterContainerInstanceCommandError(output, context);\n }\n const data = await parseBody(output.body, context);\n let contents = {};\n contents = deserializeAws_json1_1RegisterContainerInstanceResponse(data, context);\n const response = {\n $metadata: deserializeMetadata(output),\n ...contents,\n };\n return Promise.resolve(response);\n};\nexports.deserializeAws_json1_1RegisterContainerInstanceCommand = deserializeAws_json1_1RegisterContainerInstanceCommand;\nconst deserializeAws_json1_1RegisterContainerInstanceCommandError = async (output, context) => {\n const parsedOutput = {\n ...output,\n body: await parseBody(output.body, context),\n };\n let response;\n let errorCode = \"UnknownError\";\n errorCode = loadRestJsonErrorCode(output, parsedOutput.body);\n switch (errorCode) {\n case \"ClientException\":\n case \"com.amazonaws.ecs#ClientException\":\n response = {\n ...(await deserializeAws_json1_1ClientExceptionResponse(parsedOutput, context)),\n name: errorCode,\n $metadata: deserializeMetadata(output),\n };\n break;\n case \"InvalidParameterException\":\n case \"com.amazonaws.ecs#InvalidParameterException\":\n response = {\n ...(await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)),\n name: errorCode,\n $metadata: deserializeMetadata(output),\n };\n break;\n case \"ServerException\":\n case \"com.amazonaws.ecs#ServerException\":\n response = {\n ...(await deserializeAws_json1_1ServerExceptionResponse(parsedOutput, context)),\n name: errorCode,\n $metadata: deserializeMetadata(output),\n };\n break;\n default:\n const parsedBody = parsedOutput.body;\n errorCode = parsedBody.code || parsedBody.Code || errorCode;\n response = {\n ...parsedBody,\n name: `${errorCode}`,\n message: parsedBody.message || parsedBody.Message || errorCode,\n $fault: \"client\",\n $metadata: deserializeMetadata(output),\n };\n }\n const message = response.message || response.Message || errorCode;\n response.message = message;\n delete response.Message;\n return Promise.reject(Object.assign(new Error(message), response));\n};\nconst deserializeAws_json1_1RegisterTaskDefinitionCommand = async (output, context) => {\n if (output.statusCode >= 300) {\n return deserializeAws_json1_1RegisterTaskDefinitionCommandError(output, context);\n }\n const data = await parseBody(output.body, context);\n let contents = {};\n contents = deserializeAws_json1_1RegisterTaskDefinitionResponse(data, context);\n const response = {\n $metadata: deserializeMetadata(output),\n ...contents,\n };\n return Promise.resolve(response);\n};\nexports.deserializeAws_json1_1RegisterTaskDefinitionCommand = deserializeAws_json1_1RegisterTaskDefinitionCommand;\nconst deserializeAws_json1_1RegisterTaskDefinitionCommandError = async (output, context) => {\n const parsedOutput = {\n ...output,\n body: await parseBody(output.body, context),\n };\n let response;\n let errorCode = \"UnknownError\";\n errorCode = loadRestJsonErrorCode(output, parsedOutput.body);\n switch (errorCode) {\n case \"ClientException\":\n case \"com.amazonaws.ecs#ClientException\":\n response = {\n ...(await deserializeAws_json1_1ClientExceptionResponse(parsedOutput, context)),\n name: errorCode,\n $metadata: deserializeMetadata(output),\n };\n break;\n case \"InvalidParameterException\":\n case \"com.amazonaws.ecs#InvalidParameterException\":\n response = {\n ...(await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)),\n name: errorCode,\n $metadata: deserializeMetadata(output),\n };\n break;\n case \"ServerException\":\n case \"com.amazonaws.ecs#ServerException\":\n response = {\n ...(await deserializeAws_json1_1ServerExceptionResponse(parsedOutput, context)),\n name: errorCode,\n $metadata: deserializeMetadata(output),\n };\n break;\n default:\n const parsedBody = parsedOutput.body;\n errorCode = parsedBody.code || parsedBody.Code || errorCode;\n response = {\n ...parsedBody,\n name: `${errorCode}`,\n message: parsedBody.message || parsedBody.Message || errorCode,\n $fault: \"client\",\n $metadata: deserializeMetadata(output),\n };\n }\n const message = response.message || response.Message || errorCode;\n response.message = message;\n delete response.Message;\n return Promise.reject(Object.assign(new Error(message), response));\n};\nconst deserializeAws_json1_1RunTaskCommand = async (output, context) => {\n if (output.statusCode >= 300) {\n return deserializeAws_json1_1RunTaskCommandError(output, context);\n }\n const data = await parseBody(output.body, context);\n let contents = {};\n contents = deserializeAws_json1_1RunTaskResponse(data, context);\n const response = {\n $metadata: deserializeMetadata(output),\n ...contents,\n };\n return Promise.resolve(response);\n};\nexports.deserializeAws_json1_1RunTaskCommand = deserializeAws_json1_1RunTaskCommand;\nconst deserializeAws_json1_1RunTaskCommandError = async (output, context) => {\n const parsedOutput = {\n ...output,\n body: await parseBody(output.body, context),\n };\n let response;\n let errorCode = \"UnknownError\";\n errorCode = loadRestJsonErrorCode(output, parsedOutput.body);\n switch (errorCode) {\n case \"AccessDeniedException\":\n case \"com.amazonaws.ecs#AccessDeniedException\":\n response = {\n ...(await deserializeAws_json1_1AccessDeniedExceptionResponse(parsedOutput, context)),\n name: errorCode,\n $metadata: deserializeMetadata(output),\n };\n break;\n case \"BlockedException\":\n case \"com.amazonaws.ecs#BlockedException\":\n response = {\n ...(await deserializeAws_json1_1BlockedExceptionResponse(parsedOutput, context)),\n name: errorCode,\n $metadata: deserializeMetadata(output),\n };\n break;\n case \"ClientException\":\n case \"com.amazonaws.ecs#ClientException\":\n response = {\n ...(await deserializeAws_json1_1ClientExceptionResponse(parsedOutput, context)),\n name: errorCode,\n $metadata: deserializeMetadata(output),\n };\n break;\n case \"ClusterNotFoundException\":\n case \"com.amazonaws.ecs#ClusterNotFoundException\":\n response = {\n ...(await deserializeAws_json1_1ClusterNotFoundExceptionResponse(parsedOutput, context)),\n name: errorCode,\n $metadata: deserializeMetadata(output),\n };\n break;\n case \"InvalidParameterException\":\n case \"com.amazonaws.ecs#InvalidParameterException\":\n response = {\n ...(await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)),\n name: errorCode,\n $metadata: deserializeMetadata(output),\n };\n break;\n case \"PlatformTaskDefinitionIncompatibilityException\":\n case \"com.amazonaws.ecs#PlatformTaskDefinitionIncompatibilityException\":\n response = {\n ...(await deserializeAws_json1_1PlatformTaskDefinitionIncompatibilityExceptionResponse(parsedOutput, context)),\n name: errorCode,\n $metadata: deserializeMetadata(output),\n };\n break;\n case \"PlatformUnknownException\":\n case \"com.amazonaws.ecs#PlatformUnknownException\":\n response = {\n ...(await deserializeAws_json1_1PlatformUnknownExceptionResponse(parsedOutput, context)),\n name: errorCode,\n $metadata: deserializeMetadata(output),\n };\n break;\n case \"ServerException\":\n case \"com.amazonaws.ecs#ServerException\":\n response = {\n ...(await deserializeAws_json1_1ServerExceptionResponse(parsedOutput, context)),\n name: errorCode,\n $metadata: deserializeMetadata(output),\n };\n break;\n case \"UnsupportedFeatureException\":\n case \"com.amazonaws.ecs#UnsupportedFeatureException\":\n response = {\n ...(await deserializeAws_json1_1UnsupportedFeatureExceptionResponse(parsedOutput, context)),\n name: errorCode,\n $metadata: deserializeMetadata(output),\n };\n break;\n default:\n const parsedBody = parsedOutput.body;\n errorCode = parsedBody.code || parsedBody.Code || errorCode;\n response = {\n ...parsedBody,\n name: `${errorCode}`,\n message: parsedBody.message || parsedBody.Message || errorCode,\n $fault: \"client\",\n $metadata: deserializeMetadata(output),\n };\n }\n const message = response.message || response.Message || errorCode;\n response.message = message;\n delete response.Message;\n return Promise.reject(Object.assign(new Error(message), response));\n};\nconst deserializeAws_json1_1StartTaskCommand = async (output, context) => {\n if (output.statusCode >= 300) {\n return deserializeAws_json1_1StartTaskCommandError(output, context);\n }\n const data = await parseBody(output.body, context);\n let contents = {};\n contents = deserializeAws_json1_1StartTaskResponse(data, context);\n const response = {\n $metadata: deserializeMetadata(output),\n ...contents,\n };\n return Promise.resolve(response);\n};\nexports.deserializeAws_json1_1StartTaskCommand = deserializeAws_json1_1StartTaskCommand;\nconst deserializeAws_json1_1StartTaskCommandError = async (output, context) => {\n const parsedOutput = {\n ...output,\n body: await parseBody(output.body, context),\n };\n let response;\n let errorCode = \"UnknownError\";\n errorCode = loadRestJsonErrorCode(output, parsedOutput.body);\n switch (errorCode) {\n case \"ClientException\":\n case \"com.amazonaws.ecs#ClientException\":\n response = {\n ...(await deserializeAws_json1_1ClientExceptionResponse(parsedOutput, context)),\n name: errorCode,\n $metadata: deserializeMetadata(output),\n };\n break;\n case \"ClusterNotFoundException\":\n case \"com.amazonaws.ecs#ClusterNotFoundException\":\n response = {\n ...(await deserializeAws_json1_1ClusterNotFoundExceptionResponse(parsedOutput, context)),\n name: errorCode,\n $metadata: deserializeMetadata(output),\n };\n break;\n case \"InvalidParameterException\":\n case \"com.amazonaws.ecs#InvalidParameterException\":\n response = {\n ...(await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)),\n name: errorCode,\n $metadata: deserializeMetadata(output),\n };\n break;\n case \"ServerException\":\n case \"com.amazonaws.ecs#ServerException\":\n response = {\n ...(await deserializeAws_json1_1ServerExceptionResponse(parsedOutput, context)),\n name: errorCode,\n $metadata: deserializeMetadata(output),\n };\n break;\n default:\n const parsedBody = parsedOutput.body;\n errorCode = parsedBody.code || parsedBody.Code || errorCode;\n response = {\n ...parsedBody,\n name: `${errorCode}`,\n message: parsedBody.message || parsedBody.Message || errorCode,\n $fault: \"client\",\n $metadata: deserializeMetadata(output),\n };\n }\n const message = response.message || response.Message || errorCode;\n response.message = message;\n delete response.Message;\n return Promise.reject(Object.assign(new Error(message), response));\n};\nconst deserializeAws_json1_1StopTaskCommand = async (output, context) => {\n if (output.statusCode >= 300) {\n return deserializeAws_json1_1StopTaskCommandError(output, context);\n }\n const data = await parseBody(output.body, context);\n let contents = {};\n contents = deserializeAws_json1_1StopTaskResponse(data, context);\n const response = {\n $metadata: deserializeMetadata(output),\n ...contents,\n };\n return Promise.resolve(response);\n};\nexports.deserializeAws_json1_1StopTaskCommand = deserializeAws_json1_1StopTaskCommand;\nconst deserializeAws_json1_1StopTaskCommandError = async (output, context) => {\n const parsedOutput = {\n ...output,\n body: await parseBody(output.body, context),\n };\n let response;\n let errorCode = \"UnknownError\";\n errorCode = loadRestJsonErrorCode(output, parsedOutput.body);\n switch (errorCode) {\n case \"ClientException\":\n case \"com.amazonaws.ecs#ClientException\":\n response = {\n ...(await deserializeAws_json1_1ClientExceptionResponse(parsedOutput, context)),\n name: errorCode,\n $metadata: deserializeMetadata(output),\n };\n break;\n case \"ClusterNotFoundException\":\n case \"com.amazonaws.ecs#ClusterNotFoundException\":\n response = {\n ...(await deserializeAws_json1_1ClusterNotFoundExceptionResponse(parsedOutput, context)),\n name: errorCode,\n $metadata: deserializeMetadata(output),\n };\n break;\n case \"InvalidParameterException\":\n case \"com.amazonaws.ecs#InvalidParameterException\":\n response = {\n ...(await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)),\n name: errorCode,\n $metadata: deserializeMetadata(output),\n };\n break;\n case \"ServerException\":\n case \"com.amazonaws.ecs#ServerException\":\n response = {\n ...(await deserializeAws_json1_1ServerExceptionResponse(parsedOutput, context)),\n name: errorCode,\n $metadata: deserializeMetadata(output),\n };\n break;\n default:\n const parsedBody = parsedOutput.body;\n errorCode = parsedBody.code || parsedBody.Code || errorCode;\n response = {\n ...parsedBody,\n name: `${errorCode}`,\n message: parsedBody.message || parsedBody.Message || errorCode,\n $fault: \"client\",\n $metadata: deserializeMetadata(output),\n };\n }\n const message = response.message || response.Message || errorCode;\n response.message = message;\n delete response.Message;\n return Promise.reject(Object.assign(new Error(message), response));\n};\nconst deserializeAws_json1_1SubmitAttachmentStateChangesCommand = async (output, context) => {\n if (output.statusCode >= 300) {\n return deserializeAws_json1_1SubmitAttachmentStateChangesCommandError(output, context);\n }\n const data = await parseBody(output.body, context);\n let contents = {};\n contents = deserializeAws_json1_1SubmitAttachmentStateChangesResponse(data, context);\n const response = {\n $metadata: deserializeMetadata(output),\n ...contents,\n };\n return Promise.resolve(response);\n};\nexports.deserializeAws_json1_1SubmitAttachmentStateChangesCommand = deserializeAws_json1_1SubmitAttachmentStateChangesCommand;\nconst deserializeAws_json1_1SubmitAttachmentStateChangesCommandError = async (output, context) => {\n const parsedOutput = {\n ...output,\n body: await parseBody(output.body, context),\n };\n let response;\n let errorCode = \"UnknownError\";\n errorCode = loadRestJsonErrorCode(output, parsedOutput.body);\n switch (errorCode) {\n case \"AccessDeniedException\":\n case \"com.amazonaws.ecs#AccessDeniedException\":\n response = {\n ...(await deserializeAws_json1_1AccessDeniedExceptionResponse(parsedOutput, context)),\n name: errorCode,\n $metadata: deserializeMetadata(output),\n };\n break;\n case \"ClientException\":\n case \"com.amazonaws.ecs#ClientException\":\n response = {\n ...(await deserializeAws_json1_1ClientExceptionResponse(parsedOutput, context)),\n name: errorCode,\n $metadata: deserializeMetadata(output),\n };\n break;\n case \"InvalidParameterException\":\n case \"com.amazonaws.ecs#InvalidParameterException\":\n response = {\n ...(await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)),\n name: errorCode,\n $metadata: deserializeMetadata(output),\n };\n break;\n case \"ServerException\":\n case \"com.amazonaws.ecs#ServerException\":\n response = {\n ...(await deserializeAws_json1_1ServerExceptionResponse(parsedOutput, context)),\n name: errorCode,\n $metadata: deserializeMetadata(output),\n };\n break;\n default:\n const parsedBody = parsedOutput.body;\n errorCode = parsedBody.code || parsedBody.Code || errorCode;\n response = {\n ...parsedBody,\n name: `${errorCode}`,\n message: parsedBody.message || parsedBody.Message || errorCode,\n $fault: \"client\",\n $metadata: deserializeMetadata(output),\n };\n }\n const message = response.message || response.Message || errorCode;\n response.message = message;\n delete response.Message;\n return Promise.reject(Object.assign(new Error(message), response));\n};\nconst deserializeAws_json1_1SubmitContainerStateChangeCommand = async (output, context) => {\n if (output.statusCode >= 300) {\n return deserializeAws_json1_1SubmitContainerStateChangeCommandError(output, context);\n }\n const data = await parseBody(output.body, context);\n let contents = {};\n contents = deserializeAws_json1_1SubmitContainerStateChangeResponse(data, context);\n const response = {\n $metadata: deserializeMetadata(output),\n ...contents,\n };\n return Promise.resolve(response);\n};\nexports.deserializeAws_json1_1SubmitContainerStateChangeCommand = deserializeAws_json1_1SubmitContainerStateChangeCommand;\nconst deserializeAws_json1_1SubmitContainerStateChangeCommandError = async (output, context) => {\n const parsedOutput = {\n ...output,\n body: await parseBody(output.body, context),\n };\n let response;\n let errorCode = \"UnknownError\";\n errorCode = loadRestJsonErrorCode(output, parsedOutput.body);\n switch (errorCode) {\n case \"AccessDeniedException\":\n case \"com.amazonaws.ecs#AccessDeniedException\":\n response = {\n ...(await deserializeAws_json1_1AccessDeniedExceptionResponse(parsedOutput, context)),\n name: errorCode,\n $metadata: deserializeMetadata(output),\n };\n break;\n case \"ClientException\":\n case \"com.amazonaws.ecs#ClientException\":\n response = {\n ...(await deserializeAws_json1_1ClientExceptionResponse(parsedOutput, context)),\n name: errorCode,\n $metadata: deserializeMetadata(output),\n };\n break;\n case \"ServerException\":\n case \"com.amazonaws.ecs#ServerException\":\n response = {\n ...(await deserializeAws_json1_1ServerExceptionResponse(parsedOutput, context)),\n name: errorCode,\n $metadata: deserializeMetadata(output),\n };\n break;\n default:\n const parsedBody = parsedOutput.body;\n errorCode = parsedBody.code || parsedBody.Code || errorCode;\n response = {\n ...parsedBody,\n name: `${errorCode}`,\n message: parsedBody.message || parsedBody.Message || errorCode,\n $fault: \"client\",\n $metadata: deserializeMetadata(output),\n };\n }\n const message = response.message || response.Message || errorCode;\n response.message = message;\n delete response.Message;\n return Promise.reject(Object.assign(new Error(message), response));\n};\nconst deserializeAws_json1_1SubmitTaskStateChangeCommand = async (output, context) => {\n if (output.statusCode >= 300) {\n return deserializeAws_json1_1SubmitTaskStateChangeCommandError(output, context);\n }\n const data = await parseBody(output.body, context);\n let contents = {};\n contents = deserializeAws_json1_1SubmitTaskStateChangeResponse(data, context);\n const response = {\n $metadata: deserializeMetadata(output),\n ...contents,\n };\n return Promise.resolve(response);\n};\nexports.deserializeAws_json1_1SubmitTaskStateChangeCommand = deserializeAws_json1_1SubmitTaskStateChangeCommand;\nconst deserializeAws_json1_1SubmitTaskStateChangeCommandError = async (output, context) => {\n const parsedOutput = {\n ...output,\n body: await parseBody(output.body, context),\n };\n let response;\n let errorCode = \"UnknownError\";\n errorCode = loadRestJsonErrorCode(output, parsedOutput.body);\n switch (errorCode) {\n case \"AccessDeniedException\":\n case \"com.amazonaws.ecs#AccessDeniedException\":\n response = {\n ...(await deserializeAws_json1_1AccessDeniedExceptionResponse(parsedOutput, context)),\n name: errorCode,\n $metadata: deserializeMetadata(output),\n };\n break;\n case \"ClientException\":\n case \"com.amazonaws.ecs#ClientException\":\n response = {\n ...(await deserializeAws_json1_1ClientExceptionResponse(parsedOutput, context)),\n name: errorCode,\n $metadata: deserializeMetadata(output),\n };\n break;\n case \"InvalidParameterException\":\n case \"com.amazonaws.ecs#InvalidParameterException\":\n response = {\n ...(await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)),\n name: errorCode,\n $metadata: deserializeMetadata(output),\n };\n break;\n case \"ServerException\":\n case \"com.amazonaws.ecs#ServerException\":\n response = {\n ...(await deserializeAws_json1_1ServerExceptionResponse(parsedOutput, context)),\n name: errorCode,\n $metadata: deserializeMetadata(output),\n };\n break;\n default:\n const parsedBody = parsedOutput.body;\n errorCode = parsedBody.code || parsedBody.Code || errorCode;\n response = {\n ...parsedBody,\n name: `${errorCode}`,\n message: parsedBody.message || parsedBody.Message || errorCode,\n $fault: \"client\",\n $metadata: deserializeMetadata(output),\n };\n }\n const message = response.message || response.Message || errorCode;\n response.message = message;\n delete response.Message;\n return Promise.reject(Object.assign(new Error(message), response));\n};\nconst deserializeAws_json1_1TagResourceCommand = async (output, context) => {\n if (output.statusCode >= 300) {\n return deserializeAws_json1_1TagResourceCommandError(output, context);\n }\n const data = await parseBody(output.body, context);\n let contents = {};\n contents = deserializeAws_json1_1TagResourceResponse(data, context);\n const response = {\n $metadata: deserializeMetadata(output),\n ...contents,\n };\n return Promise.resolve(response);\n};\nexports.deserializeAws_json1_1TagResourceCommand = deserializeAws_json1_1TagResourceCommand;\nconst deserializeAws_json1_1TagResourceCommandError = async (output, context) => {\n const parsedOutput = {\n ...output,\n body: await parseBody(output.body, context),\n };\n let response;\n let errorCode = \"UnknownError\";\n errorCode = loadRestJsonErrorCode(output, parsedOutput.body);\n switch (errorCode) {\n case \"ClientException\":\n case \"com.amazonaws.ecs#ClientException\":\n response = {\n ...(await deserializeAws_json1_1ClientExceptionResponse(parsedOutput, context)),\n name: errorCode,\n $metadata: deserializeMetadata(output),\n };\n break;\n case \"ClusterNotFoundException\":\n case \"com.amazonaws.ecs#ClusterNotFoundException\":\n response = {\n ...(await deserializeAws_json1_1ClusterNotFoundExceptionResponse(parsedOutput, context)),\n name: errorCode,\n $metadata: deserializeMetadata(output),\n };\n break;\n case \"InvalidParameterException\":\n case \"com.amazonaws.ecs#InvalidParameterException\":\n response = {\n ...(await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)),\n name: errorCode,\n $metadata: deserializeMetadata(output),\n };\n break;\n case \"ResourceNotFoundException\":\n case \"com.amazonaws.ecs#ResourceNotFoundException\":\n response = {\n ...(await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)),\n name: errorCode,\n $metadata: deserializeMetadata(output),\n };\n break;\n case \"ServerException\":\n case \"com.amazonaws.ecs#ServerException\":\n response = {\n ...(await deserializeAws_json1_1ServerExceptionResponse(parsedOutput, context)),\n name: errorCode,\n $metadata: deserializeMetadata(output),\n };\n break;\n default:\n const parsedBody = parsedOutput.body;\n errorCode = parsedBody.code || parsedBody.Code || errorCode;\n response = {\n ...parsedBody,\n name: `${errorCode}`,\n message: parsedBody.message || parsedBody.Message || errorCode,\n $fault: \"client\",\n $metadata: deserializeMetadata(output),\n };\n }\n const message = response.message || response.Message || errorCode;\n response.message = message;\n delete response.Message;\n return Promise.reject(Object.assign(new Error(message), response));\n};\nconst deserializeAws_json1_1UntagResourceCommand = async (output, context) => {\n if (output.statusCode >= 300) {\n return deserializeAws_json1_1UntagResourceCommandError(output, context);\n }\n const data = await parseBody(output.body, context);\n let contents = {};\n contents = deserializeAws_json1_1UntagResourceResponse(data, context);\n const response = {\n $metadata: deserializeMetadata(output),\n ...contents,\n };\n return Promise.resolve(response);\n};\nexports.deserializeAws_json1_1UntagResourceCommand = deserializeAws_json1_1UntagResourceCommand;\nconst deserializeAws_json1_1UntagResourceCommandError = async (output, context) => {\n const parsedOutput = {\n ...output,\n body: await parseBody(output.body, context),\n };\n let response;\n let errorCode = \"UnknownError\";\n errorCode = loadRestJsonErrorCode(output, parsedOutput.body);\n switch (errorCode) {\n case \"ClientException\":\n case \"com.amazonaws.ecs#ClientException\":\n response = {\n ...(await deserializeAws_json1_1ClientExceptionResponse(parsedOutput, context)),\n name: errorCode,\n $metadata: deserializeMetadata(output),\n };\n break;\n case \"ClusterNotFoundException\":\n case \"com.amazonaws.ecs#ClusterNotFoundException\":\n response = {\n ...(await deserializeAws_json1_1ClusterNotFoundExceptionResponse(parsedOutput, context)),\n name: errorCode,\n $metadata: deserializeMetadata(output),\n };\n break;\n case \"InvalidParameterException\":\n case \"com.amazonaws.ecs#InvalidParameterException\":\n response = {\n ...(await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)),\n name: errorCode,\n $metadata: deserializeMetadata(output),\n };\n break;\n case \"ResourceNotFoundException\":\n case \"com.amazonaws.ecs#ResourceNotFoundException\":\n response = {\n ...(await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)),\n name: errorCode,\n $metadata: deserializeMetadata(output),\n };\n break;\n case \"ServerException\":\n case \"com.amazonaws.ecs#ServerException\":\n response = {\n ...(await deserializeAws_json1_1ServerExceptionResponse(parsedOutput, context)),\n name: errorCode,\n $metadata: deserializeMetadata(output),\n };\n break;\n default:\n const parsedBody = parsedOutput.body;\n errorCode = parsedBody.code || parsedBody.Code || errorCode;\n response = {\n ...parsedBody,\n name: `${errorCode}`,\n message: parsedBody.message || parsedBody.Message || errorCode,\n $fault: \"client\",\n $metadata: deserializeMetadata(output),\n };\n }\n const message = response.message || response.Message || errorCode;\n response.message = message;\n delete response.Message;\n return Promise.reject(Object.assign(new Error(message), response));\n};\nconst deserializeAws_json1_1UpdateCapacityProviderCommand = async (output, context) => {\n if (output.statusCode >= 300) {\n return deserializeAws_json1_1UpdateCapacityProviderCommandError(output, context);\n }\n const data = await parseBody(output.body, context);\n let contents = {};\n contents = deserializeAws_json1_1UpdateCapacityProviderResponse(data, context);\n const response = {\n $metadata: deserializeMetadata(output),\n ...contents,\n };\n return Promise.resolve(response);\n};\nexports.deserializeAws_json1_1UpdateCapacityProviderCommand = deserializeAws_json1_1UpdateCapacityProviderCommand;\nconst deserializeAws_json1_1UpdateCapacityProviderCommandError = async (output, context) => {\n const parsedOutput = {\n ...output,\n body: await parseBody(output.body, context),\n };\n let response;\n let errorCode = \"UnknownError\";\n errorCode = loadRestJsonErrorCode(output, parsedOutput.body);\n switch (errorCode) {\n case \"ClientException\":\n case \"com.amazonaws.ecs#ClientException\":\n response = {\n ...(await deserializeAws_json1_1ClientExceptionResponse(parsedOutput, context)),\n name: errorCode,\n $metadata: deserializeMetadata(output),\n };\n break;\n case \"InvalidParameterException\":\n case \"com.amazonaws.ecs#InvalidParameterException\":\n response = {\n ...(await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)),\n name: errorCode,\n $metadata: deserializeMetadata(output),\n };\n break;\n case \"ServerException\":\n case \"com.amazonaws.ecs#ServerException\":\n response = {\n ...(await deserializeAws_json1_1ServerExceptionResponse(parsedOutput, context)),\n name: errorCode,\n $metadata: deserializeMetadata(output),\n };\n break;\n default:\n const parsedBody = parsedOutput.body;\n errorCode = parsedBody.code || parsedBody.Code || errorCode;\n response = {\n ...parsedBody,\n name: `${errorCode}`,\n message: parsedBody.message || parsedBody.Message || errorCode,\n $fault: \"client\",\n $metadata: deserializeMetadata(output),\n };\n }\n const message = response.message || response.Message || errorCode;\n response.message = message;\n delete response.Message;\n return Promise.reject(Object.assign(new Error(message), response));\n};\nconst deserializeAws_json1_1UpdateClusterCommand = async (output, context) => {\n if (output.statusCode >= 300) {\n return deserializeAws_json1_1UpdateClusterCommandError(output, context);\n }\n const data = await parseBody(output.body, context);\n let contents = {};\n contents = deserializeAws_json1_1UpdateClusterResponse(data, context);\n const response = {\n $metadata: deserializeMetadata(output),\n ...contents,\n };\n return Promise.resolve(response);\n};\nexports.deserializeAws_json1_1UpdateClusterCommand = deserializeAws_json1_1UpdateClusterCommand;\nconst deserializeAws_json1_1UpdateClusterCommandError = async (output, context) => {\n const parsedOutput = {\n ...output,\n body: await parseBody(output.body, context),\n };\n let response;\n let errorCode = \"UnknownError\";\n errorCode = loadRestJsonErrorCode(output, parsedOutput.body);\n switch (errorCode) {\n case \"ClientException\":\n case \"com.amazonaws.ecs#ClientException\":\n response = {\n ...(await deserializeAws_json1_1ClientExceptionResponse(parsedOutput, context)),\n name: errorCode,\n $metadata: deserializeMetadata(output),\n };\n break;\n case \"ClusterNotFoundException\":\n case \"com.amazonaws.ecs#ClusterNotFoundException\":\n response = {\n ...(await deserializeAws_json1_1ClusterNotFoundExceptionResponse(parsedOutput, context)),\n name: errorCode,\n $metadata: deserializeMetadata(output),\n };\n break;\n case \"InvalidParameterException\":\n case \"com.amazonaws.ecs#InvalidParameterException\":\n response = {\n ...(await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)),\n name: errorCode,\n $metadata: deserializeMetadata(output),\n };\n break;\n case \"ServerException\":\n case \"com.amazonaws.ecs#ServerException\":\n response = {\n ...(await deserializeAws_json1_1ServerExceptionResponse(parsedOutput, context)),\n name: errorCode,\n $metadata: deserializeMetadata(output),\n };\n break;\n default:\n const parsedBody = parsedOutput.body;\n errorCode = parsedBody.code || parsedBody.Code || errorCode;\n response = {\n ...parsedBody,\n name: `${errorCode}`,\n message: parsedBody.message || parsedBody.Message || errorCode,\n $fault: \"client\",\n $metadata: deserializeMetadata(output),\n };\n }\n const message = response.message || response.Message || errorCode;\n response.message = message;\n delete response.Message;\n return Promise.reject(Object.assign(new Error(message), response));\n};\nconst deserializeAws_json1_1UpdateClusterSettingsCommand = async (output, context) => {\n if (output.statusCode >= 300) {\n return deserializeAws_json1_1UpdateClusterSettingsCommandError(output, context);\n }\n const data = await parseBody(output.body, context);\n let contents = {};\n contents = deserializeAws_json1_1UpdateClusterSettingsResponse(data, context);\n const response = {\n $metadata: deserializeMetadata(output),\n ...contents,\n };\n return Promise.resolve(response);\n};\nexports.deserializeAws_json1_1UpdateClusterSettingsCommand = deserializeAws_json1_1UpdateClusterSettingsCommand;\nconst deserializeAws_json1_1UpdateClusterSettingsCommandError = async (output, context) => {\n const parsedOutput = {\n ...output,\n body: await parseBody(output.body, context),\n };\n let response;\n let errorCode = \"UnknownError\";\n errorCode = loadRestJsonErrorCode(output, parsedOutput.body);\n switch (errorCode) {\n case \"ClientException\":\n case \"com.amazonaws.ecs#ClientException\":\n response = {\n ...(await deserializeAws_json1_1ClientExceptionResponse(parsedOutput, context)),\n name: errorCode,\n $metadata: deserializeMetadata(output),\n };\n break;\n case \"ClusterNotFoundException\":\n case \"com.amazonaws.ecs#ClusterNotFoundException\":\n response = {\n ...(await deserializeAws_json1_1ClusterNotFoundExceptionResponse(parsedOutput, context)),\n name: errorCode,\n $metadata: deserializeMetadata(output),\n };\n break;\n case \"InvalidParameterException\":\n case \"com.amazonaws.ecs#InvalidParameterException\":\n response = {\n ...(await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)),\n name: errorCode,\n $metadata: deserializeMetadata(output),\n };\n break;\n case \"ServerException\":\n case \"com.amazonaws.ecs#ServerException\":\n response = {\n ...(await deserializeAws_json1_1ServerExceptionResponse(parsedOutput, context)),\n name: errorCode,\n $metadata: deserializeMetadata(output),\n };\n break;\n default:\n const parsedBody = parsedOutput.body;\n errorCode = parsedBody.code || parsedBody.Code || errorCode;\n response = {\n ...parsedBody,\n name: `${errorCode}`,\n message: parsedBody.message || parsedBody.Message || errorCode,\n $fault: \"client\",\n $metadata: deserializeMetadata(output),\n };\n }\n const message = response.message || response.Message || errorCode;\n response.message = message;\n delete response.Message;\n return Promise.reject(Object.assign(new Error(message), response));\n};\nconst deserializeAws_json1_1UpdateContainerAgentCommand = async (output, context) => {\n if (output.statusCode >= 300) {\n return deserializeAws_json1_1UpdateContainerAgentCommandError(output, context);\n }\n const data = await parseBody(output.body, context);\n let contents = {};\n contents = deserializeAws_json1_1UpdateContainerAgentResponse(data, context);\n const response = {\n $metadata: deserializeMetadata(output),\n ...contents,\n };\n return Promise.resolve(response);\n};\nexports.deserializeAws_json1_1UpdateContainerAgentCommand = deserializeAws_json1_1UpdateContainerAgentCommand;\nconst deserializeAws_json1_1UpdateContainerAgentCommandError = async (output, context) => {\n const parsedOutput = {\n ...output,\n body: await parseBody(output.body, context),\n };\n let response;\n let errorCode = \"UnknownError\";\n errorCode = loadRestJsonErrorCode(output, parsedOutput.body);\n switch (errorCode) {\n case \"ClientException\":\n case \"com.amazonaws.ecs#ClientException\":\n response = {\n ...(await deserializeAws_json1_1ClientExceptionResponse(parsedOutput, context)),\n name: errorCode,\n $metadata: deserializeMetadata(output),\n };\n break;\n case \"ClusterNotFoundException\":\n case \"com.amazonaws.ecs#ClusterNotFoundException\":\n response = {\n ...(await deserializeAws_json1_1ClusterNotFoundExceptionResponse(parsedOutput, context)),\n name: errorCode,\n $metadata: deserializeMetadata(output),\n };\n break;\n case \"InvalidParameterException\":\n case \"com.amazonaws.ecs#InvalidParameterException\":\n response = {\n ...(await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)),\n name: errorCode,\n $metadata: deserializeMetadata(output),\n };\n break;\n case \"MissingVersionException\":\n case \"com.amazonaws.ecs#MissingVersionException\":\n response = {\n ...(await deserializeAws_json1_1MissingVersionExceptionResponse(parsedOutput, context)),\n name: errorCode,\n $metadata: deserializeMetadata(output),\n };\n break;\n case \"NoUpdateAvailableException\":\n case \"com.amazonaws.ecs#NoUpdateAvailableException\":\n response = {\n ...(await deserializeAws_json1_1NoUpdateAvailableExceptionResponse(parsedOutput, context)),\n name: errorCode,\n $metadata: deserializeMetadata(output),\n };\n break;\n case \"ServerException\":\n case \"com.amazonaws.ecs#ServerException\":\n response = {\n ...(await deserializeAws_json1_1ServerExceptionResponse(parsedOutput, context)),\n name: errorCode,\n $metadata: deserializeMetadata(output),\n };\n break;\n case \"UpdateInProgressException\":\n case \"com.amazonaws.ecs#UpdateInProgressException\":\n response = {\n ...(await deserializeAws_json1_1UpdateInProgressExceptionResponse(parsedOutput, context)),\n name: errorCode,\n $metadata: deserializeMetadata(output),\n };\n break;\n default:\n const parsedBody = parsedOutput.body;\n errorCode = parsedBody.code || parsedBody.Code || errorCode;\n response = {\n ...parsedBody,\n name: `${errorCode}`,\n message: parsedBody.message || parsedBody.Message || errorCode,\n $fault: \"client\",\n $metadata: deserializeMetadata(output),\n };\n }\n const message = response.message || response.Message || errorCode;\n response.message = message;\n delete response.Message;\n return Promise.reject(Object.assign(new Error(message), response));\n};\nconst deserializeAws_json1_1UpdateContainerInstancesStateCommand = async (output, context) => {\n if (output.statusCode >= 300) {\n return deserializeAws_json1_1UpdateContainerInstancesStateCommandError(output, context);\n }\n const data = await parseBody(output.body, context);\n let contents = {};\n contents = deserializeAws_json1_1UpdateContainerInstancesStateResponse(data, context);\n const response = {\n $metadata: deserializeMetadata(output),\n ...contents,\n };\n return Promise.resolve(response);\n};\nexports.deserializeAws_json1_1UpdateContainerInstancesStateCommand = deserializeAws_json1_1UpdateContainerInstancesStateCommand;\nconst deserializeAws_json1_1UpdateContainerInstancesStateCommandError = async (output, context) => {\n const parsedOutput = {\n ...output,\n body: await parseBody(output.body, context),\n };\n let response;\n let errorCode = \"UnknownError\";\n errorCode = loadRestJsonErrorCode(output, parsedOutput.body);\n switch (errorCode) {\n case \"ClientException\":\n case \"com.amazonaws.ecs#ClientException\":\n response = {\n ...(await deserializeAws_json1_1ClientExceptionResponse(parsedOutput, context)),\n name: errorCode,\n $metadata: deserializeMetadata(output),\n };\n break;\n case \"ClusterNotFoundException\":\n case \"com.amazonaws.ecs#ClusterNotFoundException\":\n response = {\n ...(await deserializeAws_json1_1ClusterNotFoundExceptionResponse(parsedOutput, context)),\n name: errorCode,\n $metadata: deserializeMetadata(output),\n };\n break;\n case \"InvalidParameterException\":\n case \"com.amazonaws.ecs#InvalidParameterException\":\n response = {\n ...(await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)),\n name: errorCode,\n $metadata: deserializeMetadata(output),\n };\n break;\n case \"ServerException\":\n case \"com.amazonaws.ecs#ServerException\":\n response = {\n ...(await deserializeAws_json1_1ServerExceptionResponse(parsedOutput, context)),\n name: errorCode,\n $metadata: deserializeMetadata(output),\n };\n break;\n default:\n const parsedBody = parsedOutput.body;\n errorCode = parsedBody.code || parsedBody.Code || errorCode;\n response = {\n ...parsedBody,\n name: `${errorCode}`,\n message: parsedBody.message || parsedBody.Message || errorCode,\n $fault: \"client\",\n $metadata: deserializeMetadata(output),\n };\n }\n const message = response.message || response.Message || errorCode;\n response.message = message;\n delete response.Message;\n return Promise.reject(Object.assign(new Error(message), response));\n};\nconst deserializeAws_json1_1UpdateServiceCommand = async (output, context) => {\n if (output.statusCode >= 300) {\n return deserializeAws_json1_1UpdateServiceCommandError(output, context);\n }\n const data = await parseBody(output.body, context);\n let contents = {};\n contents = deserializeAws_json1_1UpdateServiceResponse(data, context);\n const response = {\n $metadata: deserializeMetadata(output),\n ...contents,\n };\n return Promise.resolve(response);\n};\nexports.deserializeAws_json1_1UpdateServiceCommand = deserializeAws_json1_1UpdateServiceCommand;\nconst deserializeAws_json1_1UpdateServiceCommandError = async (output, context) => {\n const parsedOutput = {\n ...output,\n body: await parseBody(output.body, context),\n };\n let response;\n let errorCode = \"UnknownError\";\n errorCode = loadRestJsonErrorCode(output, parsedOutput.body);\n switch (errorCode) {\n case \"AccessDeniedException\":\n case \"com.amazonaws.ecs#AccessDeniedException\":\n response = {\n ...(await deserializeAws_json1_1AccessDeniedExceptionResponse(parsedOutput, context)),\n name: errorCode,\n $metadata: deserializeMetadata(output),\n };\n break;\n case \"ClientException\":\n case \"com.amazonaws.ecs#ClientException\":\n response = {\n ...(await deserializeAws_json1_1ClientExceptionResponse(parsedOutput, context)),\n name: errorCode,\n $metadata: deserializeMetadata(output),\n };\n break;\n case \"ClusterNotFoundException\":\n case \"com.amazonaws.ecs#ClusterNotFoundException\":\n response = {\n ...(await deserializeAws_json1_1ClusterNotFoundExceptionResponse(parsedOutput, context)),\n name: errorCode,\n $metadata: deserializeMetadata(output),\n };\n break;\n case \"InvalidParameterException\":\n case \"com.amazonaws.ecs#InvalidParameterException\":\n response = {\n ...(await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)),\n name: errorCode,\n $metadata: deserializeMetadata(output),\n };\n break;\n case \"PlatformTaskDefinitionIncompatibilityException\":\n case \"com.amazonaws.ecs#PlatformTaskDefinitionIncompatibilityException\":\n response = {\n ...(await deserializeAws_json1_1PlatformTaskDefinitionIncompatibilityExceptionResponse(parsedOutput, context)),\n name: errorCode,\n $metadata: deserializeMetadata(output),\n };\n break;\n case \"PlatformUnknownException\":\n case \"com.amazonaws.ecs#PlatformUnknownException\":\n response = {\n ...(await deserializeAws_json1_1PlatformUnknownExceptionResponse(parsedOutput, context)),\n name: errorCode,\n $metadata: deserializeMetadata(output),\n };\n break;\n case \"ServerException\":\n case \"com.amazonaws.ecs#ServerException\":\n response = {\n ...(await deserializeAws_json1_1ServerExceptionResponse(parsedOutput, context)),\n name: errorCode,\n $metadata: deserializeMetadata(output),\n };\n break;\n case \"ServiceNotActiveException\":\n case \"com.amazonaws.ecs#ServiceNotActiveException\":\n response = {\n ...(await deserializeAws_json1_1ServiceNotActiveExceptionResponse(parsedOutput, context)),\n name: errorCode,\n $metadata: deserializeMetadata(output),\n };\n break;\n case \"ServiceNotFoundException\":\n case \"com.amazonaws.ecs#ServiceNotFoundException\":\n response = {\n ...(await deserializeAws_json1_1ServiceNotFoundExceptionResponse(parsedOutput, context)),\n name: errorCode,\n $metadata: deserializeMetadata(output),\n };\n break;\n default:\n const parsedBody = parsedOutput.body;\n errorCode = parsedBody.code || parsedBody.Code || errorCode;\n response = {\n ...parsedBody,\n name: `${errorCode}`,\n message: parsedBody.message || parsedBody.Message || errorCode,\n $fault: \"client\",\n $metadata: deserializeMetadata(output),\n };\n }\n const message = response.message || response.Message || errorCode;\n response.message = message;\n delete response.Message;\n return Promise.reject(Object.assign(new Error(message), response));\n};\nconst deserializeAws_json1_1UpdateServicePrimaryTaskSetCommand = async (output, context) => {\n if (output.statusCode >= 300) {\n return deserializeAws_json1_1UpdateServicePrimaryTaskSetCommandError(output, context);\n }\n const data = await parseBody(output.body, context);\n let contents = {};\n contents = deserializeAws_json1_1UpdateServicePrimaryTaskSetResponse(data, context);\n const response = {\n $metadata: deserializeMetadata(output),\n ...contents,\n };\n return Promise.resolve(response);\n};\nexports.deserializeAws_json1_1UpdateServicePrimaryTaskSetCommand = deserializeAws_json1_1UpdateServicePrimaryTaskSetCommand;\nconst deserializeAws_json1_1UpdateServicePrimaryTaskSetCommandError = async (output, context) => {\n const parsedOutput = {\n ...output,\n body: await parseBody(output.body, context),\n };\n let response;\n let errorCode = \"UnknownError\";\n errorCode = loadRestJsonErrorCode(output, parsedOutput.body);\n switch (errorCode) {\n case \"AccessDeniedException\":\n case \"com.amazonaws.ecs#AccessDeniedException\":\n response = {\n ...(await deserializeAws_json1_1AccessDeniedExceptionResponse(parsedOutput, context)),\n name: errorCode,\n $metadata: deserializeMetadata(output),\n };\n break;\n case \"ClientException\":\n case \"com.amazonaws.ecs#ClientException\":\n response = {\n ...(await deserializeAws_json1_1ClientExceptionResponse(parsedOutput, context)),\n name: errorCode,\n $metadata: deserializeMetadata(output),\n };\n break;\n case \"ClusterNotFoundException\":\n case \"com.amazonaws.ecs#ClusterNotFoundException\":\n response = {\n ...(await deserializeAws_json1_1ClusterNotFoundExceptionResponse(parsedOutput, context)),\n name: errorCode,\n $metadata: deserializeMetadata(output),\n };\n break;\n case \"InvalidParameterException\":\n case \"com.amazonaws.ecs#InvalidParameterException\":\n response = {\n ...(await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)),\n name: errorCode,\n $metadata: deserializeMetadata(output),\n };\n break;\n case \"ServerException\":\n case \"com.amazonaws.ecs#ServerException\":\n response = {\n ...(await deserializeAws_json1_1ServerExceptionResponse(parsedOutput, context)),\n name: errorCode,\n $metadata: deserializeMetadata(output),\n };\n break;\n case \"ServiceNotActiveException\":\n case \"com.amazonaws.ecs#ServiceNotActiveException\":\n response = {\n ...(await deserializeAws_json1_1ServiceNotActiveExceptionResponse(parsedOutput, context)),\n name: errorCode,\n $metadata: deserializeMetadata(output),\n };\n break;\n case \"ServiceNotFoundException\":\n case \"com.amazonaws.ecs#ServiceNotFoundException\":\n response = {\n ...(await deserializeAws_json1_1ServiceNotFoundExceptionResponse(parsedOutput, context)),\n name: errorCode,\n $metadata: deserializeMetadata(output),\n };\n break;\n case \"TaskSetNotFoundException\":\n case \"com.amazonaws.ecs#TaskSetNotFoundException\":\n response = {\n ...(await deserializeAws_json1_1TaskSetNotFoundExceptionResponse(parsedOutput, context)),\n name: errorCode,\n $metadata: deserializeMetadata(output),\n };\n break;\n case \"UnsupportedFeatureException\":\n case \"com.amazonaws.ecs#UnsupportedFeatureException\":\n response = {\n ...(await deserializeAws_json1_1UnsupportedFeatureExceptionResponse(parsedOutput, context)),\n name: errorCode,\n $metadata: deserializeMetadata(output),\n };\n break;\n default:\n const parsedBody = parsedOutput.body;\n errorCode = parsedBody.code || parsedBody.Code || errorCode;\n response = {\n ...parsedBody,\n name: `${errorCode}`,\n message: parsedBody.message || parsedBody.Message || errorCode,\n $fault: \"client\",\n $metadata: deserializeMetadata(output),\n };\n }\n const message = response.message || response.Message || errorCode;\n response.message = message;\n delete response.Message;\n return Promise.reject(Object.assign(new Error(message), response));\n};\nconst deserializeAws_json1_1UpdateTaskSetCommand = async (output, context) => {\n if (output.statusCode >= 300) {\n return deserializeAws_json1_1UpdateTaskSetCommandError(output, context);\n }\n const data = await parseBody(output.body, context);\n let contents = {};\n contents = deserializeAws_json1_1UpdateTaskSetResponse(data, context);\n const response = {\n $metadata: deserializeMetadata(output),\n ...contents,\n };\n return Promise.resolve(response);\n};\nexports.deserializeAws_json1_1UpdateTaskSetCommand = deserializeAws_json1_1UpdateTaskSetCommand;\nconst deserializeAws_json1_1UpdateTaskSetCommandError = async (output, context) => {\n const parsedOutput = {\n ...output,\n body: await parseBody(output.body, context),\n };\n let response;\n let errorCode = \"UnknownError\";\n errorCode = loadRestJsonErrorCode(output, parsedOutput.body);\n switch (errorCode) {\n case \"AccessDeniedException\":\n case \"com.amazonaws.ecs#AccessDeniedException\":\n response = {\n ...(await deserializeAws_json1_1AccessDeniedExceptionResponse(parsedOutput, context)),\n name: errorCode,\n $metadata: deserializeMetadata(output),\n };\n break;\n case \"ClientException\":\n case \"com.amazonaws.ecs#ClientException\":\n response = {\n ...(await deserializeAws_json1_1ClientExceptionResponse(parsedOutput, context)),\n name: errorCode,\n $metadata: deserializeMetadata(output),\n };\n break;\n case \"ClusterNotFoundException\":\n case \"com.amazonaws.ecs#ClusterNotFoundException\":\n response = {\n ...(await deserializeAws_json1_1ClusterNotFoundExceptionResponse(parsedOutput, context)),\n name: errorCode,\n $metadata: deserializeMetadata(output),\n };\n break;\n case \"InvalidParameterException\":\n case \"com.amazonaws.ecs#InvalidParameterException\":\n response = {\n ...(await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)),\n name: errorCode,\n $metadata: deserializeMetadata(output),\n };\n break;\n case \"ServerException\":\n case \"com.amazonaws.ecs#ServerException\":\n response = {\n ...(await deserializeAws_json1_1ServerExceptionResponse(parsedOutput, context)),\n name: errorCode,\n $metadata: deserializeMetadata(output),\n };\n break;\n case \"ServiceNotActiveException\":\n case \"com.amazonaws.ecs#ServiceNotActiveException\":\n response = {\n ...(await deserializeAws_json1_1ServiceNotActiveExceptionResponse(parsedOutput, context)),\n name: errorCode,\n $metadata: deserializeMetadata(output),\n };\n break;\n case \"ServiceNotFoundException\":\n case \"com.amazonaws.ecs#ServiceNotFoundException\":\n response = {\n ...(await deserializeAws_json1_1ServiceNotFoundExceptionResponse(parsedOutput, context)),\n name: errorCode,\n $metadata: deserializeMetadata(output),\n };\n break;\n case \"TaskSetNotFoundException\":\n case \"com.amazonaws.ecs#TaskSetNotFoundException\":\n response = {\n ...(await deserializeAws_json1_1TaskSetNotFoundExceptionResponse(parsedOutput, context)),\n name: errorCode,\n $metadata: deserializeMetadata(output),\n };\n break;\n case \"UnsupportedFeatureException\":\n case \"com.amazonaws.ecs#UnsupportedFeatureException\":\n response = {\n ...(await deserializeAws_json1_1UnsupportedFeatureExceptionResponse(parsedOutput, context)),\n name: errorCode,\n $metadata: deserializeMetadata(output),\n };\n break;\n default:\n const parsedBody = parsedOutput.body;\n errorCode = parsedBody.code || parsedBody.Code || errorCode;\n response = {\n ...parsedBody,\n name: `${errorCode}`,\n message: parsedBody.message || parsedBody.Message || errorCode,\n $fault: \"client\",\n $metadata: deserializeMetadata(output),\n };\n }\n const message = response.message || response.Message || errorCode;\n response.message = message;\n delete response.Message;\n return Promise.reject(Object.assign(new Error(message), response));\n};\nconst deserializeAws_json1_1AccessDeniedExceptionResponse = async (parsedOutput, context) => {\n const body = parsedOutput.body;\n const deserialized = deserializeAws_json1_1AccessDeniedException(body, context);\n const contents = {\n name: \"AccessDeniedException\",\n $fault: \"client\",\n $metadata: deserializeMetadata(parsedOutput),\n ...deserialized,\n };\n return contents;\n};\nconst deserializeAws_json1_1AttributeLimitExceededExceptionResponse = async (parsedOutput, context) => {\n const body = parsedOutput.body;\n const deserialized = deserializeAws_json1_1AttributeLimitExceededException(body, context);\n const contents = {\n name: \"AttributeLimitExceededException\",\n $fault: \"client\",\n $metadata: deserializeMetadata(parsedOutput),\n ...deserialized,\n };\n return contents;\n};\nconst deserializeAws_json1_1BlockedExceptionResponse = async (parsedOutput, context) => {\n const body = parsedOutput.body;\n const deserialized = deserializeAws_json1_1BlockedException(body, context);\n const contents = {\n name: \"BlockedException\",\n $fault: \"client\",\n $metadata: deserializeMetadata(parsedOutput),\n ...deserialized,\n };\n return contents;\n};\nconst deserializeAws_json1_1ClientExceptionResponse = async (parsedOutput, context) => {\n const body = parsedOutput.body;\n const deserialized = deserializeAws_json1_1ClientException(body, context);\n const contents = {\n name: \"ClientException\",\n $fault: \"client\",\n $metadata: deserializeMetadata(parsedOutput),\n ...deserialized,\n };\n return contents;\n};\nconst deserializeAws_json1_1ClusterContainsContainerInstancesExceptionResponse = async (parsedOutput, context) => {\n const body = parsedOutput.body;\n const deserialized = deserializeAws_json1_1ClusterContainsContainerInstancesException(body, context);\n const contents = {\n name: \"ClusterContainsContainerInstancesException\",\n $fault: \"client\",\n $metadata: deserializeMetadata(parsedOutput),\n ...deserialized,\n };\n return contents;\n};\nconst deserializeAws_json1_1ClusterContainsServicesExceptionResponse = async (parsedOutput, context) => {\n const body = parsedOutput.body;\n const deserialized = deserializeAws_json1_1ClusterContainsServicesException(body, context);\n const contents = {\n name: \"ClusterContainsServicesException\",\n $fault: \"client\",\n $metadata: deserializeMetadata(parsedOutput),\n ...deserialized,\n };\n return contents;\n};\nconst deserializeAws_json1_1ClusterContainsTasksExceptionResponse = async (parsedOutput, context) => {\n const body = parsedOutput.body;\n const deserialized = deserializeAws_json1_1ClusterContainsTasksException(body, context);\n const contents = {\n name: \"ClusterContainsTasksException\",\n $fault: \"client\",\n $metadata: deserializeMetadata(parsedOutput),\n ...deserialized,\n };\n return contents;\n};\nconst deserializeAws_json1_1ClusterNotFoundExceptionResponse = async (parsedOutput, context) => {\n const body = parsedOutput.body;\n const deserialized = deserializeAws_json1_1ClusterNotFoundException(body, context);\n const contents = {\n name: \"ClusterNotFoundException\",\n $fault: \"client\",\n $metadata: deserializeMetadata(parsedOutput),\n ...deserialized,\n };\n return contents;\n};\nconst deserializeAws_json1_1InvalidParameterExceptionResponse = async (parsedOutput, context) => {\n const body = parsedOutput.body;\n const deserialized = deserializeAws_json1_1InvalidParameterException(body, context);\n const contents = {\n name: \"InvalidParameterException\",\n $fault: \"client\",\n $metadata: deserializeMetadata(parsedOutput),\n ...deserialized,\n };\n return contents;\n};\nconst deserializeAws_json1_1LimitExceededExceptionResponse = async (parsedOutput, context) => {\n const body = parsedOutput.body;\n const deserialized = deserializeAws_json1_1LimitExceededException(body, context);\n const contents = {\n name: \"LimitExceededException\",\n $fault: \"client\",\n $metadata: deserializeMetadata(parsedOutput),\n ...deserialized,\n };\n return contents;\n};\nconst deserializeAws_json1_1MissingVersionExceptionResponse = async (parsedOutput, context) => {\n const body = parsedOutput.body;\n const deserialized = deserializeAws_json1_1MissingVersionException(body, context);\n const contents = {\n name: \"MissingVersionException\",\n $fault: \"client\",\n $metadata: deserializeMetadata(parsedOutput),\n ...deserialized,\n };\n return contents;\n};\nconst deserializeAws_json1_1NoUpdateAvailableExceptionResponse = async (parsedOutput, context) => {\n const body = parsedOutput.body;\n const deserialized = deserializeAws_json1_1NoUpdateAvailableException(body, context);\n const contents = {\n name: \"NoUpdateAvailableException\",\n $fault: \"client\",\n $metadata: deserializeMetadata(parsedOutput),\n ...deserialized,\n };\n return contents;\n};\nconst deserializeAws_json1_1PlatformTaskDefinitionIncompatibilityExceptionResponse = async (parsedOutput, context) => {\n const body = parsedOutput.body;\n const deserialized = deserializeAws_json1_1PlatformTaskDefinitionIncompatibilityException(body, context);\n const contents = {\n name: \"PlatformTaskDefinitionIncompatibilityException\",\n $fault: \"client\",\n $metadata: deserializeMetadata(parsedOutput),\n ...deserialized,\n };\n return contents;\n};\nconst deserializeAws_json1_1PlatformUnknownExceptionResponse = async (parsedOutput, context) => {\n const body = parsedOutput.body;\n const deserialized = deserializeAws_json1_1PlatformUnknownException(body, context);\n const contents = {\n name: \"PlatformUnknownException\",\n $fault: \"client\",\n $metadata: deserializeMetadata(parsedOutput),\n ...deserialized,\n };\n return contents;\n};\nconst deserializeAws_json1_1ResourceInUseExceptionResponse = async (parsedOutput, context) => {\n const body = parsedOutput.body;\n const deserialized = deserializeAws_json1_1ResourceInUseException(body, context);\n const contents = {\n name: \"ResourceInUseException\",\n $fault: \"client\",\n $metadata: deserializeMetadata(parsedOutput),\n ...deserialized,\n };\n return contents;\n};\nconst deserializeAws_json1_1ResourceNotFoundExceptionResponse = async (parsedOutput, context) => {\n const body = parsedOutput.body;\n const deserialized = deserializeAws_json1_1ResourceNotFoundException(body, context);\n const contents = {\n name: \"ResourceNotFoundException\",\n $fault: \"client\",\n $metadata: deserializeMetadata(parsedOutput),\n ...deserialized,\n };\n return contents;\n};\nconst deserializeAws_json1_1ServerExceptionResponse = async (parsedOutput, context) => {\n const body = parsedOutput.body;\n const deserialized = deserializeAws_json1_1ServerException(body, context);\n const contents = {\n name: \"ServerException\",\n $fault: \"server\",\n $metadata: deserializeMetadata(parsedOutput),\n ...deserialized,\n };\n return contents;\n};\nconst deserializeAws_json1_1ServiceNotActiveExceptionResponse = async (parsedOutput, context) => {\n const body = parsedOutput.body;\n const deserialized = deserializeAws_json1_1ServiceNotActiveException(body, context);\n const contents = {\n name: \"ServiceNotActiveException\",\n $fault: \"client\",\n $metadata: deserializeMetadata(parsedOutput),\n ...deserialized,\n };\n return contents;\n};\nconst deserializeAws_json1_1ServiceNotFoundExceptionResponse = async (parsedOutput, context) => {\n const body = parsedOutput.body;\n const deserialized = deserializeAws_json1_1ServiceNotFoundException(body, context);\n const contents = {\n name: \"ServiceNotFoundException\",\n $fault: \"client\",\n $metadata: deserializeMetadata(parsedOutput),\n ...deserialized,\n };\n return contents;\n};\nconst deserializeAws_json1_1TargetNotConnectedExceptionResponse = async (parsedOutput, context) => {\n const body = parsedOutput.body;\n const deserialized = deserializeAws_json1_1TargetNotConnectedException(body, context);\n const contents = {\n name: \"TargetNotConnectedException\",\n $fault: \"client\",\n $metadata: deserializeMetadata(parsedOutput),\n ...deserialized,\n };\n return contents;\n};\nconst deserializeAws_json1_1TargetNotFoundExceptionResponse = async (parsedOutput, context) => {\n const body = parsedOutput.body;\n const deserialized = deserializeAws_json1_1TargetNotFoundException(body, context);\n const contents = {\n name: \"TargetNotFoundException\",\n $fault: \"client\",\n $metadata: deserializeMetadata(parsedOutput),\n ...deserialized,\n };\n return contents;\n};\nconst deserializeAws_json1_1TaskSetNotFoundExceptionResponse = async (parsedOutput, context) => {\n const body = parsedOutput.body;\n const deserialized = deserializeAws_json1_1TaskSetNotFoundException(body, context);\n const contents = {\n name: \"TaskSetNotFoundException\",\n $fault: \"client\",\n $metadata: deserializeMetadata(parsedOutput),\n ...deserialized,\n };\n return contents;\n};\nconst deserializeAws_json1_1UnsupportedFeatureExceptionResponse = async (parsedOutput, context) => {\n const body = parsedOutput.body;\n const deserialized = deserializeAws_json1_1UnsupportedFeatureException(body, context);\n const contents = {\n name: \"UnsupportedFeatureException\",\n $fault: \"client\",\n $metadata: deserializeMetadata(parsedOutput),\n ...deserialized,\n };\n return contents;\n};\nconst deserializeAws_json1_1UpdateInProgressExceptionResponse = async (parsedOutput, context) => {\n const body = parsedOutput.body;\n const deserialized = deserializeAws_json1_1UpdateInProgressException(body, context);\n const contents = {\n name: \"UpdateInProgressException\",\n $fault: \"client\",\n $metadata: deserializeMetadata(parsedOutput),\n ...deserialized,\n };\n return contents;\n};\nconst serializeAws_json1_1AttachmentStateChange = (input, context) => {\n return {\n ...(input.attachmentArn !== undefined && input.attachmentArn !== null && { attachmentArn: input.attachmentArn }),\n ...(input.status !== undefined && input.status !== null && { status: input.status }),\n };\n};\nconst serializeAws_json1_1AttachmentStateChanges = (input, context) => {\n return input\n .filter((e) => e != null)\n .map((entry) => {\n if (entry === null) {\n return null;\n }\n return serializeAws_json1_1AttachmentStateChange(entry, context);\n });\n};\nconst serializeAws_json1_1Attribute = (input, context) => {\n return {\n ...(input.name !== undefined && input.name !== null && { name: input.name }),\n ...(input.targetId !== undefined && input.targetId !== null && { targetId: input.targetId }),\n ...(input.targetType !== undefined && input.targetType !== null && { targetType: input.targetType }),\n ...(input.value !== undefined && input.value !== null && { value: input.value }),\n };\n};\nconst serializeAws_json1_1Attributes = (input, context) => {\n return input\n .filter((e) => e != null)\n .map((entry) => {\n if (entry === null) {\n return null;\n }\n return serializeAws_json1_1Attribute(entry, context);\n });\n};\nconst serializeAws_json1_1AutoScalingGroupProvider = (input, context) => {\n return {\n ...(input.autoScalingGroupArn !== undefined &&\n input.autoScalingGroupArn !== null && { autoScalingGroupArn: input.autoScalingGroupArn }),\n ...(input.managedScaling !== undefined &&\n input.managedScaling !== null && {\n managedScaling: serializeAws_json1_1ManagedScaling(input.managedScaling, context),\n }),\n ...(input.managedTerminationProtection !== undefined &&\n input.managedTerminationProtection !== null && {\n managedTerminationProtection: input.managedTerminationProtection,\n }),\n };\n};\nconst serializeAws_json1_1AutoScalingGroupProviderUpdate = (input, context) => {\n return {\n ...(input.managedScaling !== undefined &&\n input.managedScaling !== null && {\n managedScaling: serializeAws_json1_1ManagedScaling(input.managedScaling, context),\n }),\n ...(input.managedTerminationProtection !== undefined &&\n input.managedTerminationProtection !== null && {\n managedTerminationProtection: input.managedTerminationProtection,\n }),\n };\n};\nconst serializeAws_json1_1AwsVpcConfiguration = (input, context) => {\n return {\n ...(input.assignPublicIp !== undefined &&\n input.assignPublicIp !== null && { assignPublicIp: input.assignPublicIp }),\n ...(input.securityGroups !== undefined &&\n input.securityGroups !== null && {\n securityGroups: serializeAws_json1_1StringList(input.securityGroups, context),\n }),\n ...(input.subnets !== undefined &&\n input.subnets !== null && { subnets: serializeAws_json1_1StringList(input.subnets, context) }),\n };\n};\nconst serializeAws_json1_1CapacityProviderFieldList = (input, context) => {\n return input\n .filter((e) => e != null)\n .map((entry) => {\n if (entry === null) {\n return null;\n }\n return entry;\n });\n};\nconst serializeAws_json1_1CapacityProviderStrategy = (input, context) => {\n return input\n .filter((e) => e != null)\n .map((entry) => {\n if (entry === null) {\n return null;\n }\n return serializeAws_json1_1CapacityProviderStrategyItem(entry, context);\n });\n};\nconst serializeAws_json1_1CapacityProviderStrategyItem = (input, context) => {\n return {\n ...(input.base !== undefined && input.base !== null && { base: input.base }),\n ...(input.capacityProvider !== undefined &&\n input.capacityProvider !== null && { capacityProvider: input.capacityProvider }),\n ...(input.weight !== undefined && input.weight !== null && { weight: input.weight }),\n };\n};\nconst serializeAws_json1_1ClusterConfiguration = (input, context) => {\n return {\n ...(input.executeCommandConfiguration !== undefined &&\n input.executeCommandConfiguration !== null && {\n executeCommandConfiguration: serializeAws_json1_1ExecuteCommandConfiguration(input.executeCommandConfiguration, context),\n }),\n };\n};\nconst serializeAws_json1_1ClusterFieldList = (input, context) => {\n return input\n .filter((e) => e != null)\n .map((entry) => {\n if (entry === null) {\n return null;\n }\n return entry;\n });\n};\nconst serializeAws_json1_1ClusterSetting = (input, context) => {\n return {\n ...(input.name !== undefined && input.name !== null && { name: input.name }),\n ...(input.value !== undefined && input.value !== null && { value: input.value }),\n };\n};\nconst serializeAws_json1_1ClusterSettings = (input, context) => {\n return input\n .filter((e) => e != null)\n .map((entry) => {\n if (entry === null) {\n return null;\n }\n return serializeAws_json1_1ClusterSetting(entry, context);\n });\n};\nconst serializeAws_json1_1CompatibilityList = (input, context) => {\n return input\n .filter((e) => e != null)\n .map((entry) => {\n if (entry === null) {\n return null;\n }\n return entry;\n });\n};\nconst serializeAws_json1_1ContainerDefinition = (input, context) => {\n return {\n ...(input.command !== undefined &&\n input.command !== null && { command: serializeAws_json1_1StringList(input.command, context) }),\n ...(input.cpu !== undefined && input.cpu !== null && { cpu: input.cpu }),\n ...(input.dependsOn !== undefined &&\n input.dependsOn !== null && { dependsOn: serializeAws_json1_1ContainerDependencies(input.dependsOn, context) }),\n ...(input.disableNetworking !== undefined &&\n input.disableNetworking !== null && { disableNetworking: input.disableNetworking }),\n ...(input.dnsSearchDomains !== undefined &&\n input.dnsSearchDomains !== null && {\n dnsSearchDomains: serializeAws_json1_1StringList(input.dnsSearchDomains, context),\n }),\n ...(input.dnsServers !== undefined &&\n input.dnsServers !== null && { dnsServers: serializeAws_json1_1StringList(input.dnsServers, context) }),\n ...(input.dockerLabels !== undefined &&\n input.dockerLabels !== null && {\n dockerLabels: serializeAws_json1_1DockerLabelsMap(input.dockerLabels, context),\n }),\n ...(input.dockerSecurityOptions !== undefined &&\n input.dockerSecurityOptions !== null && {\n dockerSecurityOptions: serializeAws_json1_1StringList(input.dockerSecurityOptions, context),\n }),\n ...(input.entryPoint !== undefined &&\n input.entryPoint !== null && { entryPoint: serializeAws_json1_1StringList(input.entryPoint, context) }),\n ...(input.environment !== undefined &&\n input.environment !== null && {\n environment: serializeAws_json1_1EnvironmentVariables(input.environment, context),\n }),\n ...(input.environmentFiles !== undefined &&\n input.environmentFiles !== null && {\n environmentFiles: serializeAws_json1_1EnvironmentFiles(input.environmentFiles, context),\n }),\n ...(input.essential !== undefined && input.essential !== null && { essential: input.essential }),\n ...(input.extraHosts !== undefined &&\n input.extraHosts !== null && { extraHosts: serializeAws_json1_1HostEntryList(input.extraHosts, context) }),\n ...(input.firelensConfiguration !== undefined &&\n input.firelensConfiguration !== null && {\n firelensConfiguration: serializeAws_json1_1FirelensConfiguration(input.firelensConfiguration, context),\n }),\n ...(input.healthCheck !== undefined &&\n input.healthCheck !== null && { healthCheck: serializeAws_json1_1HealthCheck(input.healthCheck, context) }),\n ...(input.hostname !== undefined && input.hostname !== null && { hostname: input.hostname }),\n ...(input.image !== undefined && input.image !== null && { image: input.image }),\n ...(input.interactive !== undefined && input.interactive !== null && { interactive: input.interactive }),\n ...(input.links !== undefined &&\n input.links !== null && { links: serializeAws_json1_1StringList(input.links, context) }),\n ...(input.linuxParameters !== undefined &&\n input.linuxParameters !== null && {\n linuxParameters: serializeAws_json1_1LinuxParameters(input.linuxParameters, context),\n }),\n ...(input.logConfiguration !== undefined &&\n input.logConfiguration !== null && {\n logConfiguration: serializeAws_json1_1LogConfiguration(input.logConfiguration, context),\n }),\n ...(input.memory !== undefined && input.memory !== null && { memory: input.memory }),\n ...(input.memoryReservation !== undefined &&\n input.memoryReservation !== null && { memoryReservation: input.memoryReservation }),\n ...(input.mountPoints !== undefined &&\n input.mountPoints !== null && { mountPoints: serializeAws_json1_1MountPointList(input.mountPoints, context) }),\n ...(input.name !== undefined && input.name !== null && { name: input.name }),\n ...(input.portMappings !== undefined &&\n input.portMappings !== null && {\n portMappings: serializeAws_json1_1PortMappingList(input.portMappings, context),\n }),\n ...(input.privileged !== undefined && input.privileged !== null && { privileged: input.privileged }),\n ...(input.pseudoTerminal !== undefined &&\n input.pseudoTerminal !== null && { pseudoTerminal: input.pseudoTerminal }),\n ...(input.readonlyRootFilesystem !== undefined &&\n input.readonlyRootFilesystem !== null && { readonlyRootFilesystem: input.readonlyRootFilesystem }),\n ...(input.repositoryCredentials !== undefined &&\n input.repositoryCredentials !== null && {\n repositoryCredentials: serializeAws_json1_1RepositoryCredentials(input.repositoryCredentials, context),\n }),\n ...(input.resourceRequirements !== undefined &&\n input.resourceRequirements !== null && {\n resourceRequirements: serializeAws_json1_1ResourceRequirements(input.resourceRequirements, context),\n }),\n ...(input.secrets !== undefined &&\n input.secrets !== null && { secrets: serializeAws_json1_1SecretList(input.secrets, context) }),\n ...(input.startTimeout !== undefined && input.startTimeout !== null && { startTimeout: input.startTimeout }),\n ...(input.stopTimeout !== undefined && input.stopTimeout !== null && { stopTimeout: input.stopTimeout }),\n ...(input.systemControls !== undefined &&\n input.systemControls !== null && {\n systemControls: serializeAws_json1_1SystemControls(input.systemControls, context),\n }),\n ...(input.ulimits !== undefined &&\n input.ulimits !== null && { ulimits: serializeAws_json1_1UlimitList(input.ulimits, context) }),\n ...(input.user !== undefined && input.user !== null && { user: input.user }),\n ...(input.volumesFrom !== undefined &&\n input.volumesFrom !== null && { volumesFrom: serializeAws_json1_1VolumeFromList(input.volumesFrom, context) }),\n ...(input.workingDirectory !== undefined &&\n input.workingDirectory !== null && { workingDirectory: input.workingDirectory }),\n };\n};\nconst serializeAws_json1_1ContainerDefinitions = (input, context) => {\n return input\n .filter((e) => e != null)\n .map((entry) => {\n if (entry === null) {\n return null;\n }\n return serializeAws_json1_1ContainerDefinition(entry, context);\n });\n};\nconst serializeAws_json1_1ContainerDependencies = (input, context) => {\n return input\n .filter((e) => e != null)\n .map((entry) => {\n if (entry === null) {\n return null;\n }\n return serializeAws_json1_1ContainerDependency(entry, context);\n });\n};\nconst serializeAws_json1_1ContainerDependency = (input, context) => {\n return {\n ...(input.condition !== undefined && input.condition !== null && { condition: input.condition }),\n ...(input.containerName !== undefined && input.containerName !== null && { containerName: input.containerName }),\n };\n};\nconst serializeAws_json1_1ContainerInstanceFieldList = (input, context) => {\n return input\n .filter((e) => e != null)\n .map((entry) => {\n if (entry === null) {\n return null;\n }\n return entry;\n });\n};\nconst serializeAws_json1_1ContainerOverride = (input, context) => {\n return {\n ...(input.command !== undefined &&\n input.command !== null && { command: serializeAws_json1_1StringList(input.command, context) }),\n ...(input.cpu !== undefined && input.cpu !== null && { cpu: input.cpu }),\n ...(input.environment !== undefined &&\n input.environment !== null && {\n environment: serializeAws_json1_1EnvironmentVariables(input.environment, context),\n }),\n ...(input.environmentFiles !== undefined &&\n input.environmentFiles !== null && {\n environmentFiles: serializeAws_json1_1EnvironmentFiles(input.environmentFiles, context),\n }),\n ...(input.memory !== undefined && input.memory !== null && { memory: input.memory }),\n ...(input.memoryReservation !== undefined &&\n input.memoryReservation !== null && { memoryReservation: input.memoryReservation }),\n ...(input.name !== undefined && input.name !== null && { name: input.name }),\n ...(input.resourceRequirements !== undefined &&\n input.resourceRequirements !== null && {\n resourceRequirements: serializeAws_json1_1ResourceRequirements(input.resourceRequirements, context),\n }),\n };\n};\nconst serializeAws_json1_1ContainerOverrides = (input, context) => {\n return input\n .filter((e) => e != null)\n .map((entry) => {\n if (entry === null) {\n return null;\n }\n return serializeAws_json1_1ContainerOverride(entry, context);\n });\n};\nconst serializeAws_json1_1ContainerStateChange = (input, context) => {\n return {\n ...(input.containerName !== undefined && input.containerName !== null && { containerName: input.containerName }),\n ...(input.exitCode !== undefined && input.exitCode !== null && { exitCode: input.exitCode }),\n ...(input.imageDigest !== undefined && input.imageDigest !== null && { imageDigest: input.imageDigest }),\n ...(input.networkBindings !== undefined &&\n input.networkBindings !== null && {\n networkBindings: serializeAws_json1_1NetworkBindings(input.networkBindings, context),\n }),\n ...(input.reason !== undefined && input.reason !== null && { reason: input.reason }),\n ...(input.runtimeId !== undefined && input.runtimeId !== null && { runtimeId: input.runtimeId }),\n ...(input.status !== undefined && input.status !== null && { status: input.status }),\n };\n};\nconst serializeAws_json1_1ContainerStateChanges = (input, context) => {\n return input\n .filter((e) => e != null)\n .map((entry) => {\n if (entry === null) {\n return null;\n }\n return serializeAws_json1_1ContainerStateChange(entry, context);\n });\n};\nconst serializeAws_json1_1CreateCapacityProviderRequest = (input, context) => {\n return {\n ...(input.autoScalingGroupProvider !== undefined &&\n input.autoScalingGroupProvider !== null && {\n autoScalingGroupProvider: serializeAws_json1_1AutoScalingGroupProvider(input.autoScalingGroupProvider, context),\n }),\n ...(input.name !== undefined && input.name !== null && { name: input.name }),\n ...(input.tags !== undefined && input.tags !== null && { tags: serializeAws_json1_1Tags(input.tags, context) }),\n };\n};\nconst serializeAws_json1_1CreateClusterRequest = (input, context) => {\n return {\n ...(input.capacityProviders !== undefined &&\n input.capacityProviders !== null && {\n capacityProviders: serializeAws_json1_1StringList(input.capacityProviders, context),\n }),\n ...(input.clusterName !== undefined && input.clusterName !== null && { clusterName: input.clusterName }),\n ...(input.configuration !== undefined &&\n input.configuration !== null && {\n configuration: serializeAws_json1_1ClusterConfiguration(input.configuration, context),\n }),\n ...(input.defaultCapacityProviderStrategy !== undefined &&\n input.defaultCapacityProviderStrategy !== null && {\n defaultCapacityProviderStrategy: serializeAws_json1_1CapacityProviderStrategy(input.defaultCapacityProviderStrategy, context),\n }),\n ...(input.settings !== undefined &&\n input.settings !== null && { settings: serializeAws_json1_1ClusterSettings(input.settings, context) }),\n ...(input.tags !== undefined && input.tags !== null && { tags: serializeAws_json1_1Tags(input.tags, context) }),\n };\n};\nconst serializeAws_json1_1CreateServiceRequest = (input, context) => {\n return {\n ...(input.capacityProviderStrategy !== undefined &&\n input.capacityProviderStrategy !== null && {\n capacityProviderStrategy: serializeAws_json1_1CapacityProviderStrategy(input.capacityProviderStrategy, context),\n }),\n ...(input.clientToken !== undefined && input.clientToken !== null && { clientToken: input.clientToken }),\n ...(input.cluster !== undefined && input.cluster !== null && { cluster: input.cluster }),\n ...(input.deploymentConfiguration !== undefined &&\n input.deploymentConfiguration !== null && {\n deploymentConfiguration: serializeAws_json1_1DeploymentConfiguration(input.deploymentConfiguration, context),\n }),\n ...(input.deploymentController !== undefined &&\n input.deploymentController !== null && {\n deploymentController: serializeAws_json1_1DeploymentController(input.deploymentController, context),\n }),\n ...(input.desiredCount !== undefined && input.desiredCount !== null && { desiredCount: input.desiredCount }),\n ...(input.enableECSManagedTags !== undefined &&\n input.enableECSManagedTags !== null && { enableECSManagedTags: input.enableECSManagedTags }),\n ...(input.enableExecuteCommand !== undefined &&\n input.enableExecuteCommand !== null && { enableExecuteCommand: input.enableExecuteCommand }),\n ...(input.healthCheckGracePeriodSeconds !== undefined &&\n input.healthCheckGracePeriodSeconds !== null && {\n healthCheckGracePeriodSeconds: input.healthCheckGracePeriodSeconds,\n }),\n ...(input.launchType !== undefined && input.launchType !== null && { launchType: input.launchType }),\n ...(input.loadBalancers !== undefined &&\n input.loadBalancers !== null && {\n loadBalancers: serializeAws_json1_1LoadBalancers(input.loadBalancers, context),\n }),\n ...(input.networkConfiguration !== undefined &&\n input.networkConfiguration !== null && {\n networkConfiguration: serializeAws_json1_1NetworkConfiguration(input.networkConfiguration, context),\n }),\n ...(input.placementConstraints !== undefined &&\n input.placementConstraints !== null && {\n placementConstraints: serializeAws_json1_1PlacementConstraints(input.placementConstraints, context),\n }),\n ...(input.placementStrategy !== undefined &&\n input.placementStrategy !== null && {\n placementStrategy: serializeAws_json1_1PlacementStrategies(input.placementStrategy, context),\n }),\n ...(input.platformVersion !== undefined &&\n input.platformVersion !== null && { platformVersion: input.platformVersion }),\n ...(input.propagateTags !== undefined && input.propagateTags !== null && { propagateTags: input.propagateTags }),\n ...(input.role !== undefined && input.role !== null && { role: input.role }),\n ...(input.schedulingStrategy !== undefined &&\n input.schedulingStrategy !== null && { schedulingStrategy: input.schedulingStrategy }),\n ...(input.serviceName !== undefined && input.serviceName !== null && { serviceName: input.serviceName }),\n ...(input.serviceRegistries !== undefined &&\n input.serviceRegistries !== null && {\n serviceRegistries: serializeAws_json1_1ServiceRegistries(input.serviceRegistries, context),\n }),\n ...(input.tags !== undefined && input.tags !== null && { tags: serializeAws_json1_1Tags(input.tags, context) }),\n ...(input.taskDefinition !== undefined &&\n input.taskDefinition !== null && { taskDefinition: input.taskDefinition }),\n };\n};\nconst serializeAws_json1_1CreateTaskSetRequest = (input, context) => {\n return {\n ...(input.capacityProviderStrategy !== undefined &&\n input.capacityProviderStrategy !== null && {\n capacityProviderStrategy: serializeAws_json1_1CapacityProviderStrategy(input.capacityProviderStrategy, context),\n }),\n ...(input.clientToken !== undefined && input.clientToken !== null && { clientToken: input.clientToken }),\n ...(input.cluster !== undefined && input.cluster !== null && { cluster: input.cluster }),\n ...(input.externalId !== undefined && input.externalId !== null && { externalId: input.externalId }),\n ...(input.launchType !== undefined && input.launchType !== null && { launchType: input.launchType }),\n ...(input.loadBalancers !== undefined &&\n input.loadBalancers !== null && {\n loadBalancers: serializeAws_json1_1LoadBalancers(input.loadBalancers, context),\n }),\n ...(input.networkConfiguration !== undefined &&\n input.networkConfiguration !== null && {\n networkConfiguration: serializeAws_json1_1NetworkConfiguration(input.networkConfiguration, context),\n }),\n ...(input.platformVersion !== undefined &&\n input.platformVersion !== null && { platformVersion: input.platformVersion }),\n ...(input.scale !== undefined &&\n input.scale !== null && { scale: serializeAws_json1_1Scale(input.scale, context) }),\n ...(input.service !== undefined && input.service !== null && { service: input.service }),\n ...(input.serviceRegistries !== undefined &&\n input.serviceRegistries !== null && {\n serviceRegistries: serializeAws_json1_1ServiceRegistries(input.serviceRegistries, context),\n }),\n ...(input.tags !== undefined && input.tags !== null && { tags: serializeAws_json1_1Tags(input.tags, context) }),\n ...(input.taskDefinition !== undefined &&\n input.taskDefinition !== null && { taskDefinition: input.taskDefinition }),\n };\n};\nconst serializeAws_json1_1DeleteAccountSettingRequest = (input, context) => {\n return {\n ...(input.name !== undefined && input.name !== null && { name: input.name }),\n ...(input.principalArn !== undefined && input.principalArn !== null && { principalArn: input.principalArn }),\n };\n};\nconst serializeAws_json1_1DeleteAttributesRequest = (input, context) => {\n return {\n ...(input.attributes !== undefined &&\n input.attributes !== null && { attributes: serializeAws_json1_1Attributes(input.attributes, context) }),\n ...(input.cluster !== undefined && input.cluster !== null && { cluster: input.cluster }),\n };\n};\nconst serializeAws_json1_1DeleteCapacityProviderRequest = (input, context) => {\n return {\n ...(input.capacityProvider !== undefined &&\n input.capacityProvider !== null && { capacityProvider: input.capacityProvider }),\n };\n};\nconst serializeAws_json1_1DeleteClusterRequest = (input, context) => {\n return {\n ...(input.cluster !== undefined && input.cluster !== null && { cluster: input.cluster }),\n };\n};\nconst serializeAws_json1_1DeleteServiceRequest = (input, context) => {\n return {\n ...(input.cluster !== undefined && input.cluster !== null && { cluster: input.cluster }),\n ...(input.force !== undefined && input.force !== null && { force: input.force }),\n ...(input.service !== undefined && input.service !== null && { service: input.service }),\n };\n};\nconst serializeAws_json1_1DeleteTaskSetRequest = (input, context) => {\n return {\n ...(input.cluster !== undefined && input.cluster !== null && { cluster: input.cluster }),\n ...(input.force !== undefined && input.force !== null && { force: input.force }),\n ...(input.service !== undefined && input.service !== null && { service: input.service }),\n ...(input.taskSet !== undefined && input.taskSet !== null && { taskSet: input.taskSet }),\n };\n};\nconst serializeAws_json1_1DeploymentCircuitBreaker = (input, context) => {\n return {\n ...(input.enable !== undefined && input.enable !== null && { enable: input.enable }),\n ...(input.rollback !== undefined && input.rollback !== null && { rollback: input.rollback }),\n };\n};\nconst serializeAws_json1_1DeploymentConfiguration = (input, context) => {\n return {\n ...(input.deploymentCircuitBreaker !== undefined &&\n input.deploymentCircuitBreaker !== null && {\n deploymentCircuitBreaker: serializeAws_json1_1DeploymentCircuitBreaker(input.deploymentCircuitBreaker, context),\n }),\n ...(input.maximumPercent !== undefined &&\n input.maximumPercent !== null && { maximumPercent: input.maximumPercent }),\n ...(input.minimumHealthyPercent !== undefined &&\n input.minimumHealthyPercent !== null && { minimumHealthyPercent: input.minimumHealthyPercent }),\n };\n};\nconst serializeAws_json1_1DeploymentController = (input, context) => {\n return {\n ...(input.type !== undefined && input.type !== null && { type: input.type }),\n };\n};\nconst serializeAws_json1_1DeregisterContainerInstanceRequest = (input, context) => {\n return {\n ...(input.cluster !== undefined && input.cluster !== null && { cluster: input.cluster }),\n ...(input.containerInstance !== undefined &&\n input.containerInstance !== null && { containerInstance: input.containerInstance }),\n ...(input.force !== undefined && input.force !== null && { force: input.force }),\n };\n};\nconst serializeAws_json1_1DeregisterTaskDefinitionRequest = (input, context) => {\n return {\n ...(input.taskDefinition !== undefined &&\n input.taskDefinition !== null && { taskDefinition: input.taskDefinition }),\n };\n};\nconst serializeAws_json1_1DescribeCapacityProvidersRequest = (input, context) => {\n return {\n ...(input.capacityProviders !== undefined &&\n input.capacityProviders !== null && {\n capacityProviders: serializeAws_json1_1StringList(input.capacityProviders, context),\n }),\n ...(input.include !== undefined &&\n input.include !== null && { include: serializeAws_json1_1CapacityProviderFieldList(input.include, context) }),\n ...(input.maxResults !== undefined && input.maxResults !== null && { maxResults: input.maxResults }),\n ...(input.nextToken !== undefined && input.nextToken !== null && { nextToken: input.nextToken }),\n };\n};\nconst serializeAws_json1_1DescribeClustersRequest = (input, context) => {\n return {\n ...(input.clusters !== undefined &&\n input.clusters !== null && { clusters: serializeAws_json1_1StringList(input.clusters, context) }),\n ...(input.include !== undefined &&\n input.include !== null && { include: serializeAws_json1_1ClusterFieldList(input.include, context) }),\n };\n};\nconst serializeAws_json1_1DescribeContainerInstancesRequest = (input, context) => {\n return {\n ...(input.cluster !== undefined && input.cluster !== null && { cluster: input.cluster }),\n ...(input.containerInstances !== undefined &&\n input.containerInstances !== null && {\n containerInstances: serializeAws_json1_1StringList(input.containerInstances, context),\n }),\n ...(input.include !== undefined &&\n input.include !== null && { include: serializeAws_json1_1ContainerInstanceFieldList(input.include, context) }),\n };\n};\nconst serializeAws_json1_1DescribeServicesRequest = (input, context) => {\n return {\n ...(input.cluster !== undefined && input.cluster !== null && { cluster: input.cluster }),\n ...(input.include !== undefined &&\n input.include !== null && { include: serializeAws_json1_1ServiceFieldList(input.include, context) }),\n ...(input.services !== undefined &&\n input.services !== null && { services: serializeAws_json1_1StringList(input.services, context) }),\n };\n};\nconst serializeAws_json1_1DescribeTaskDefinitionRequest = (input, context) => {\n return {\n ...(input.include !== undefined &&\n input.include !== null && { include: serializeAws_json1_1TaskDefinitionFieldList(input.include, context) }),\n ...(input.taskDefinition !== undefined &&\n input.taskDefinition !== null && { taskDefinition: input.taskDefinition }),\n };\n};\nconst serializeAws_json1_1DescribeTaskSetsRequest = (input, context) => {\n return {\n ...(input.cluster !== undefined && input.cluster !== null && { cluster: input.cluster }),\n ...(input.include !== undefined &&\n input.include !== null && { include: serializeAws_json1_1TaskSetFieldList(input.include, context) }),\n ...(input.service !== undefined && input.service !== null && { service: input.service }),\n ...(input.taskSets !== undefined &&\n input.taskSets !== null && { taskSets: serializeAws_json1_1StringList(input.taskSets, context) }),\n };\n};\nconst serializeAws_json1_1DescribeTasksRequest = (input, context) => {\n return {\n ...(input.cluster !== undefined && input.cluster !== null && { cluster: input.cluster }),\n ...(input.include !== undefined &&\n input.include !== null && { include: serializeAws_json1_1TaskFieldList(input.include, context) }),\n ...(input.tasks !== undefined &&\n input.tasks !== null && { tasks: serializeAws_json1_1StringList(input.tasks, context) }),\n };\n};\nconst serializeAws_json1_1Device = (input, context) => {\n return {\n ...(input.containerPath !== undefined && input.containerPath !== null && { containerPath: input.containerPath }),\n ...(input.hostPath !== undefined && input.hostPath !== null && { hostPath: input.hostPath }),\n ...(input.permissions !== undefined &&\n input.permissions !== null && {\n permissions: serializeAws_json1_1DeviceCgroupPermissions(input.permissions, context),\n }),\n };\n};\nconst serializeAws_json1_1DeviceCgroupPermissions = (input, context) => {\n return input\n .filter((e) => e != null)\n .map((entry) => {\n if (entry === null) {\n return null;\n }\n return entry;\n });\n};\nconst serializeAws_json1_1DevicesList = (input, context) => {\n return input\n .filter((e) => e != null)\n .map((entry) => {\n if (entry === null) {\n return null;\n }\n return serializeAws_json1_1Device(entry, context);\n });\n};\nconst serializeAws_json1_1DiscoverPollEndpointRequest = (input, context) => {\n return {\n ...(input.cluster !== undefined && input.cluster !== null && { cluster: input.cluster }),\n ...(input.containerInstance !== undefined &&\n input.containerInstance !== null && { containerInstance: input.containerInstance }),\n };\n};\nconst serializeAws_json1_1DockerLabelsMap = (input, context) => {\n return Object.entries(input).reduce((acc, [key, value]) => {\n if (value === null) {\n return acc;\n }\n return {\n ...acc,\n [key]: value,\n };\n }, {});\n};\nconst serializeAws_json1_1DockerVolumeConfiguration = (input, context) => {\n return {\n ...(input.autoprovision !== undefined && input.autoprovision !== null && { autoprovision: input.autoprovision }),\n ...(input.driver !== undefined && input.driver !== null && { driver: input.driver }),\n ...(input.driverOpts !== undefined &&\n input.driverOpts !== null && { driverOpts: serializeAws_json1_1StringMap(input.driverOpts, context) }),\n ...(input.labels !== undefined &&\n input.labels !== null && { labels: serializeAws_json1_1StringMap(input.labels, context) }),\n ...(input.scope !== undefined && input.scope !== null && { scope: input.scope }),\n };\n};\nconst serializeAws_json1_1EFSAuthorizationConfig = (input, context) => {\n return {\n ...(input.accessPointId !== undefined && input.accessPointId !== null && { accessPointId: input.accessPointId }),\n ...(input.iam !== undefined && input.iam !== null && { iam: input.iam }),\n };\n};\nconst serializeAws_json1_1EFSVolumeConfiguration = (input, context) => {\n return {\n ...(input.authorizationConfig !== undefined &&\n input.authorizationConfig !== null && {\n authorizationConfig: serializeAws_json1_1EFSAuthorizationConfig(input.authorizationConfig, context),\n }),\n ...(input.fileSystemId !== undefined && input.fileSystemId !== null && { fileSystemId: input.fileSystemId }),\n ...(input.rootDirectory !== undefined && input.rootDirectory !== null && { rootDirectory: input.rootDirectory }),\n ...(input.transitEncryption !== undefined &&\n input.transitEncryption !== null && { transitEncryption: input.transitEncryption }),\n ...(input.transitEncryptionPort !== undefined &&\n input.transitEncryptionPort !== null && { transitEncryptionPort: input.transitEncryptionPort }),\n };\n};\nconst serializeAws_json1_1EnvironmentFile = (input, context) => {\n return {\n ...(input.type !== undefined && input.type !== null && { type: input.type }),\n ...(input.value !== undefined && input.value !== null && { value: input.value }),\n };\n};\nconst serializeAws_json1_1EnvironmentFiles = (input, context) => {\n return input\n .filter((e) => e != null)\n .map((entry) => {\n if (entry === null) {\n return null;\n }\n return serializeAws_json1_1EnvironmentFile(entry, context);\n });\n};\nconst serializeAws_json1_1EnvironmentVariables = (input, context) => {\n return input\n .filter((e) => e != null)\n .map((entry) => {\n if (entry === null) {\n return null;\n }\n return serializeAws_json1_1KeyValuePair(entry, context);\n });\n};\nconst serializeAws_json1_1EphemeralStorage = (input, context) => {\n return {\n ...(input.sizeInGiB !== undefined && input.sizeInGiB !== null && { sizeInGiB: input.sizeInGiB }),\n };\n};\nconst serializeAws_json1_1ExecuteCommandConfiguration = (input, context) => {\n return {\n ...(input.kmsKeyId !== undefined && input.kmsKeyId !== null && { kmsKeyId: input.kmsKeyId }),\n ...(input.logConfiguration !== undefined &&\n input.logConfiguration !== null && {\n logConfiguration: serializeAws_json1_1ExecuteCommandLogConfiguration(input.logConfiguration, context),\n }),\n ...(input.logging !== undefined && input.logging !== null && { logging: input.logging }),\n };\n};\nconst serializeAws_json1_1ExecuteCommandLogConfiguration = (input, context) => {\n return {\n ...(input.cloudWatchEncryptionEnabled !== undefined &&\n input.cloudWatchEncryptionEnabled !== null && { cloudWatchEncryptionEnabled: input.cloudWatchEncryptionEnabled }),\n ...(input.cloudWatchLogGroupName !== undefined &&\n input.cloudWatchLogGroupName !== null && { cloudWatchLogGroupName: input.cloudWatchLogGroupName }),\n ...(input.s3BucketName !== undefined && input.s3BucketName !== null && { s3BucketName: input.s3BucketName }),\n ...(input.s3EncryptionEnabled !== undefined &&\n input.s3EncryptionEnabled !== null && { s3EncryptionEnabled: input.s3EncryptionEnabled }),\n ...(input.s3KeyPrefix !== undefined && input.s3KeyPrefix !== null && { s3KeyPrefix: input.s3KeyPrefix }),\n };\n};\nconst serializeAws_json1_1ExecuteCommandRequest = (input, context) => {\n return {\n ...(input.cluster !== undefined && input.cluster !== null && { cluster: input.cluster }),\n ...(input.command !== undefined && input.command !== null && { command: input.command }),\n ...(input.container !== undefined && input.container !== null && { container: input.container }),\n ...(input.interactive !== undefined && input.interactive !== null && { interactive: input.interactive }),\n ...(input.task !== undefined && input.task !== null && { task: input.task }),\n };\n};\nconst serializeAws_json1_1FirelensConfiguration = (input, context) => {\n return {\n ...(input.options !== undefined &&\n input.options !== null && {\n options: serializeAws_json1_1FirelensConfigurationOptionsMap(input.options, context),\n }),\n ...(input.type !== undefined && input.type !== null && { type: input.type }),\n };\n};\nconst serializeAws_json1_1FirelensConfigurationOptionsMap = (input, context) => {\n return Object.entries(input).reduce((acc, [key, value]) => {\n if (value === null) {\n return acc;\n }\n return {\n ...acc,\n [key]: value,\n };\n }, {});\n};\nconst serializeAws_json1_1FSxWindowsFileServerAuthorizationConfig = (input, context) => {\n return {\n ...(input.credentialsParameter !== undefined &&\n input.credentialsParameter !== null && { credentialsParameter: input.credentialsParameter }),\n ...(input.domain !== undefined && input.domain !== null && { domain: input.domain }),\n };\n};\nconst serializeAws_json1_1FSxWindowsFileServerVolumeConfiguration = (input, context) => {\n return {\n ...(input.authorizationConfig !== undefined &&\n input.authorizationConfig !== null && {\n authorizationConfig: serializeAws_json1_1FSxWindowsFileServerAuthorizationConfig(input.authorizationConfig, context),\n }),\n ...(input.fileSystemId !== undefined && input.fileSystemId !== null && { fileSystemId: input.fileSystemId }),\n ...(input.rootDirectory !== undefined && input.rootDirectory !== null && { rootDirectory: input.rootDirectory }),\n };\n};\nconst serializeAws_json1_1HealthCheck = (input, context) => {\n return {\n ...(input.command !== undefined &&\n input.command !== null && { command: serializeAws_json1_1StringList(input.command, context) }),\n ...(input.interval !== undefined && input.interval !== null && { interval: input.interval }),\n ...(input.retries !== undefined && input.retries !== null && { retries: input.retries }),\n ...(input.startPeriod !== undefined && input.startPeriod !== null && { startPeriod: input.startPeriod }),\n ...(input.timeout !== undefined && input.timeout !== null && { timeout: input.timeout }),\n };\n};\nconst serializeAws_json1_1HostEntry = (input, context) => {\n return {\n ...(input.hostname !== undefined && input.hostname !== null && { hostname: input.hostname }),\n ...(input.ipAddress !== undefined && input.ipAddress !== null && { ipAddress: input.ipAddress }),\n };\n};\nconst serializeAws_json1_1HostEntryList = (input, context) => {\n return input\n .filter((e) => e != null)\n .map((entry) => {\n if (entry === null) {\n return null;\n }\n return serializeAws_json1_1HostEntry(entry, context);\n });\n};\nconst serializeAws_json1_1HostVolumeProperties = (input, context) => {\n return {\n ...(input.sourcePath !== undefined && input.sourcePath !== null && { sourcePath: input.sourcePath }),\n };\n};\nconst serializeAws_json1_1InferenceAccelerator = (input, context) => {\n return {\n ...(input.deviceName !== undefined && input.deviceName !== null && { deviceName: input.deviceName }),\n ...(input.deviceType !== undefined && input.deviceType !== null && { deviceType: input.deviceType }),\n };\n};\nconst serializeAws_json1_1InferenceAcceleratorOverride = (input, context) => {\n return {\n ...(input.deviceName !== undefined && input.deviceName !== null && { deviceName: input.deviceName }),\n ...(input.deviceType !== undefined && input.deviceType !== null && { deviceType: input.deviceType }),\n };\n};\nconst serializeAws_json1_1InferenceAcceleratorOverrides = (input, context) => {\n return input\n .filter((e) => e != null)\n .map((entry) => {\n if (entry === null) {\n return null;\n }\n return serializeAws_json1_1InferenceAcceleratorOverride(entry, context);\n });\n};\nconst serializeAws_json1_1InferenceAccelerators = (input, context) => {\n return input\n .filter((e) => e != null)\n .map((entry) => {\n if (entry === null) {\n return null;\n }\n return serializeAws_json1_1InferenceAccelerator(entry, context);\n });\n};\nconst serializeAws_json1_1KernelCapabilities = (input, context) => {\n return {\n ...(input.add !== undefined && input.add !== null && { add: serializeAws_json1_1StringList(input.add, context) }),\n ...(input.drop !== undefined &&\n input.drop !== null && { drop: serializeAws_json1_1StringList(input.drop, context) }),\n };\n};\nconst serializeAws_json1_1KeyValuePair = (input, context) => {\n return {\n ...(input.name !== undefined && input.name !== null && { name: input.name }),\n ...(input.value !== undefined && input.value !== null && { value: input.value }),\n };\n};\nconst serializeAws_json1_1LinuxParameters = (input, context) => {\n return {\n ...(input.capabilities !== undefined &&\n input.capabilities !== null && {\n capabilities: serializeAws_json1_1KernelCapabilities(input.capabilities, context),\n }),\n ...(input.devices !== undefined &&\n input.devices !== null && { devices: serializeAws_json1_1DevicesList(input.devices, context) }),\n ...(input.initProcessEnabled !== undefined &&\n input.initProcessEnabled !== null && { initProcessEnabled: input.initProcessEnabled }),\n ...(input.maxSwap !== undefined && input.maxSwap !== null && { maxSwap: input.maxSwap }),\n ...(input.sharedMemorySize !== undefined &&\n input.sharedMemorySize !== null && { sharedMemorySize: input.sharedMemorySize }),\n ...(input.swappiness !== undefined && input.swappiness !== null && { swappiness: input.swappiness }),\n ...(input.tmpfs !== undefined &&\n input.tmpfs !== null && { tmpfs: serializeAws_json1_1TmpfsList(input.tmpfs, context) }),\n };\n};\nconst serializeAws_json1_1ListAccountSettingsRequest = (input, context) => {\n return {\n ...(input.effectiveSettings !== undefined &&\n input.effectiveSettings !== null && { effectiveSettings: input.effectiveSettings }),\n ...(input.maxResults !== undefined && input.maxResults !== null && { maxResults: input.maxResults }),\n ...(input.name !== undefined && input.name !== null && { name: input.name }),\n ...(input.nextToken !== undefined && input.nextToken !== null && { nextToken: input.nextToken }),\n ...(input.principalArn !== undefined && input.principalArn !== null && { principalArn: input.principalArn }),\n ...(input.value !== undefined && input.value !== null && { value: input.value }),\n };\n};\nconst serializeAws_json1_1ListAttributesRequest = (input, context) => {\n return {\n ...(input.attributeName !== undefined && input.attributeName !== null && { attributeName: input.attributeName }),\n ...(input.attributeValue !== undefined &&\n input.attributeValue !== null && { attributeValue: input.attributeValue }),\n ...(input.cluster !== undefined && input.cluster !== null && { cluster: input.cluster }),\n ...(input.maxResults !== undefined && input.maxResults !== null && { maxResults: input.maxResults }),\n ...(input.nextToken !== undefined && input.nextToken !== null && { nextToken: input.nextToken }),\n ...(input.targetType !== undefined && input.targetType !== null && { targetType: input.targetType }),\n };\n};\nconst serializeAws_json1_1ListClustersRequest = (input, context) => {\n return {\n ...(input.maxResults !== undefined && input.maxResults !== null && { maxResults: input.maxResults }),\n ...(input.nextToken !== undefined && input.nextToken !== null && { nextToken: input.nextToken }),\n };\n};\nconst serializeAws_json1_1ListContainerInstancesRequest = (input, context) => {\n return {\n ...(input.cluster !== undefined && input.cluster !== null && { cluster: input.cluster }),\n ...(input.filter !== undefined && input.filter !== null && { filter: input.filter }),\n ...(input.maxResults !== undefined && input.maxResults !== null && { maxResults: input.maxResults }),\n ...(input.nextToken !== undefined && input.nextToken !== null && { nextToken: input.nextToken }),\n ...(input.status !== undefined && input.status !== null && { status: input.status }),\n };\n};\nconst serializeAws_json1_1ListServicesRequest = (input, context) => {\n return {\n ...(input.cluster !== undefined && input.cluster !== null && { cluster: input.cluster }),\n ...(input.launchType !== undefined && input.launchType !== null && { launchType: input.launchType }),\n ...(input.maxResults !== undefined && input.maxResults !== null && { maxResults: input.maxResults }),\n ...(input.nextToken !== undefined && input.nextToken !== null && { nextToken: input.nextToken }),\n ...(input.schedulingStrategy !== undefined &&\n input.schedulingStrategy !== null && { schedulingStrategy: input.schedulingStrategy }),\n };\n};\nconst serializeAws_json1_1ListTagsForResourceRequest = (input, context) => {\n return {\n ...(input.resourceArn !== undefined && input.resourceArn !== null && { resourceArn: input.resourceArn }),\n };\n};\nconst serializeAws_json1_1ListTaskDefinitionFamiliesRequest = (input, context) => {\n return {\n ...(input.familyPrefix !== undefined && input.familyPrefix !== null && { familyPrefix: input.familyPrefix }),\n ...(input.maxResults !== undefined && input.maxResults !== null && { maxResults: input.maxResults }),\n ...(input.nextToken !== undefined && input.nextToken !== null && { nextToken: input.nextToken }),\n ...(input.status !== undefined && input.status !== null && { status: input.status }),\n };\n};\nconst serializeAws_json1_1ListTaskDefinitionsRequest = (input, context) => {\n return {\n ...(input.familyPrefix !== undefined && input.familyPrefix !== null && { familyPrefix: input.familyPrefix }),\n ...(input.maxResults !== undefined && input.maxResults !== null && { maxResults: input.maxResults }),\n ...(input.nextToken !== undefined && input.nextToken !== null && { nextToken: input.nextToken }),\n ...(input.sort !== undefined && input.sort !== null && { sort: input.sort }),\n ...(input.status !== undefined && input.status !== null && { status: input.status }),\n };\n};\nconst serializeAws_json1_1ListTasksRequest = (input, context) => {\n return {\n ...(input.cluster !== undefined && input.cluster !== null && { cluster: input.cluster }),\n ...(input.containerInstance !== undefined &&\n input.containerInstance !== null && { containerInstance: input.containerInstance }),\n ...(input.desiredStatus !== undefined && input.desiredStatus !== null && { desiredStatus: input.desiredStatus }),\n ...(input.family !== undefined && input.family !== null && { family: input.family }),\n ...(input.launchType !== undefined && input.launchType !== null && { launchType: input.launchType }),\n ...(input.maxResults !== undefined && input.maxResults !== null && { maxResults: input.maxResults }),\n ...(input.nextToken !== undefined && input.nextToken !== null && { nextToken: input.nextToken }),\n ...(input.serviceName !== undefined && input.serviceName !== null && { serviceName: input.serviceName }),\n ...(input.startedBy !== undefined && input.startedBy !== null && { startedBy: input.startedBy }),\n };\n};\nconst serializeAws_json1_1LoadBalancer = (input, context) => {\n return {\n ...(input.containerName !== undefined && input.containerName !== null && { containerName: input.containerName }),\n ...(input.containerPort !== undefined && input.containerPort !== null && { containerPort: input.containerPort }),\n ...(input.loadBalancerName !== undefined &&\n input.loadBalancerName !== null && { loadBalancerName: input.loadBalancerName }),\n ...(input.targetGroupArn !== undefined &&\n input.targetGroupArn !== null && { targetGroupArn: input.targetGroupArn }),\n };\n};\nconst serializeAws_json1_1LoadBalancers = (input, context) => {\n return input\n .filter((e) => e != null)\n .map((entry) => {\n if (entry === null) {\n return null;\n }\n return serializeAws_json1_1LoadBalancer(entry, context);\n });\n};\nconst serializeAws_json1_1LogConfiguration = (input, context) => {\n return {\n ...(input.logDriver !== undefined && input.logDriver !== null && { logDriver: input.logDriver }),\n ...(input.options !== undefined &&\n input.options !== null && { options: serializeAws_json1_1LogConfigurationOptionsMap(input.options, context) }),\n ...(input.secretOptions !== undefined &&\n input.secretOptions !== null && { secretOptions: serializeAws_json1_1SecretList(input.secretOptions, context) }),\n };\n};\nconst serializeAws_json1_1LogConfigurationOptionsMap = (input, context) => {\n return Object.entries(input).reduce((acc, [key, value]) => {\n if (value === null) {\n return acc;\n }\n return {\n ...acc,\n [key]: value,\n };\n }, {});\n};\nconst serializeAws_json1_1ManagedAgentStateChange = (input, context) => {\n return {\n ...(input.containerName !== undefined && input.containerName !== null && { containerName: input.containerName }),\n ...(input.managedAgentName !== undefined &&\n input.managedAgentName !== null && { managedAgentName: input.managedAgentName }),\n ...(input.reason !== undefined && input.reason !== null && { reason: input.reason }),\n ...(input.status !== undefined && input.status !== null && { status: input.status }),\n };\n};\nconst serializeAws_json1_1ManagedAgentStateChanges = (input, context) => {\n return input\n .filter((e) => e != null)\n .map((entry) => {\n if (entry === null) {\n return null;\n }\n return serializeAws_json1_1ManagedAgentStateChange(entry, context);\n });\n};\nconst serializeAws_json1_1ManagedScaling = (input, context) => {\n return {\n ...(input.instanceWarmupPeriod !== undefined &&\n input.instanceWarmupPeriod !== null && { instanceWarmupPeriod: input.instanceWarmupPeriod }),\n ...(input.maximumScalingStepSize !== undefined &&\n input.maximumScalingStepSize !== null && { maximumScalingStepSize: input.maximumScalingStepSize }),\n ...(input.minimumScalingStepSize !== undefined &&\n input.minimumScalingStepSize !== null && { minimumScalingStepSize: input.minimumScalingStepSize }),\n ...(input.status !== undefined && input.status !== null && { status: input.status }),\n ...(input.targetCapacity !== undefined &&\n input.targetCapacity !== null && { targetCapacity: input.targetCapacity }),\n };\n};\nconst serializeAws_json1_1MountPoint = (input, context) => {\n return {\n ...(input.containerPath !== undefined && input.containerPath !== null && { containerPath: input.containerPath }),\n ...(input.readOnly !== undefined && input.readOnly !== null && { readOnly: input.readOnly }),\n ...(input.sourceVolume !== undefined && input.sourceVolume !== null && { sourceVolume: input.sourceVolume }),\n };\n};\nconst serializeAws_json1_1MountPointList = (input, context) => {\n return input\n .filter((e) => e != null)\n .map((entry) => {\n if (entry === null) {\n return null;\n }\n return serializeAws_json1_1MountPoint(entry, context);\n });\n};\nconst serializeAws_json1_1NetworkBinding = (input, context) => {\n return {\n ...(input.bindIP !== undefined && input.bindIP !== null && { bindIP: input.bindIP }),\n ...(input.containerPort !== undefined && input.containerPort !== null && { containerPort: input.containerPort }),\n ...(input.hostPort !== undefined && input.hostPort !== null && { hostPort: input.hostPort }),\n ...(input.protocol !== undefined && input.protocol !== null && { protocol: input.protocol }),\n };\n};\nconst serializeAws_json1_1NetworkBindings = (input, context) => {\n return input\n .filter((e) => e != null)\n .map((entry) => {\n if (entry === null) {\n return null;\n }\n return serializeAws_json1_1NetworkBinding(entry, context);\n });\n};\nconst serializeAws_json1_1NetworkConfiguration = (input, context) => {\n return {\n ...(input.awsvpcConfiguration !== undefined &&\n input.awsvpcConfiguration !== null && {\n awsvpcConfiguration: serializeAws_json1_1AwsVpcConfiguration(input.awsvpcConfiguration, context),\n }),\n };\n};\nconst serializeAws_json1_1PlacementConstraint = (input, context) => {\n return {\n ...(input.expression !== undefined && input.expression !== null && { expression: input.expression }),\n ...(input.type !== undefined && input.type !== null && { type: input.type }),\n };\n};\nconst serializeAws_json1_1PlacementConstraints = (input, context) => {\n return input\n .filter((e) => e != null)\n .map((entry) => {\n if (entry === null) {\n return null;\n }\n return serializeAws_json1_1PlacementConstraint(entry, context);\n });\n};\nconst serializeAws_json1_1PlacementStrategies = (input, context) => {\n return input\n .filter((e) => e != null)\n .map((entry) => {\n if (entry === null) {\n return null;\n }\n return serializeAws_json1_1PlacementStrategy(entry, context);\n });\n};\nconst serializeAws_json1_1PlacementStrategy = (input, context) => {\n return {\n ...(input.field !== undefined && input.field !== null && { field: input.field }),\n ...(input.type !== undefined && input.type !== null && { type: input.type }),\n };\n};\nconst serializeAws_json1_1PlatformDevice = (input, context) => {\n return {\n ...(input.id !== undefined && input.id !== null && { id: input.id }),\n ...(input.type !== undefined && input.type !== null && { type: input.type }),\n };\n};\nconst serializeAws_json1_1PlatformDevices = (input, context) => {\n return input\n .filter((e) => e != null)\n .map((entry) => {\n if (entry === null) {\n return null;\n }\n return serializeAws_json1_1PlatformDevice(entry, context);\n });\n};\nconst serializeAws_json1_1PortMapping = (input, context) => {\n return {\n ...(input.containerPort !== undefined && input.containerPort !== null && { containerPort: input.containerPort }),\n ...(input.hostPort !== undefined && input.hostPort !== null && { hostPort: input.hostPort }),\n ...(input.protocol !== undefined && input.protocol !== null && { protocol: input.protocol }),\n };\n};\nconst serializeAws_json1_1PortMappingList = (input, context) => {\n return input\n .filter((e) => e != null)\n .map((entry) => {\n if (entry === null) {\n return null;\n }\n return serializeAws_json1_1PortMapping(entry, context);\n });\n};\nconst serializeAws_json1_1ProxyConfiguration = (input, context) => {\n return {\n ...(input.containerName !== undefined && input.containerName !== null && { containerName: input.containerName }),\n ...(input.properties !== undefined &&\n input.properties !== null && {\n properties: serializeAws_json1_1ProxyConfigurationProperties(input.properties, context),\n }),\n ...(input.type !== undefined && input.type !== null && { type: input.type }),\n };\n};\nconst serializeAws_json1_1ProxyConfigurationProperties = (input, context) => {\n return input\n .filter((e) => e != null)\n .map((entry) => {\n if (entry === null) {\n return null;\n }\n return serializeAws_json1_1KeyValuePair(entry, context);\n });\n};\nconst serializeAws_json1_1PutAccountSettingDefaultRequest = (input, context) => {\n return {\n ...(input.name !== undefined && input.name !== null && { name: input.name }),\n ...(input.value !== undefined && input.value !== null && { value: input.value }),\n };\n};\nconst serializeAws_json1_1PutAccountSettingRequest = (input, context) => {\n return {\n ...(input.name !== undefined && input.name !== null && { name: input.name }),\n ...(input.principalArn !== undefined && input.principalArn !== null && { principalArn: input.principalArn }),\n ...(input.value !== undefined && input.value !== null && { value: input.value }),\n };\n};\nconst serializeAws_json1_1PutAttributesRequest = (input, context) => {\n return {\n ...(input.attributes !== undefined &&\n input.attributes !== null && { attributes: serializeAws_json1_1Attributes(input.attributes, context) }),\n ...(input.cluster !== undefined && input.cluster !== null && { cluster: input.cluster }),\n };\n};\nconst serializeAws_json1_1PutClusterCapacityProvidersRequest = (input, context) => {\n return {\n ...(input.capacityProviders !== undefined &&\n input.capacityProviders !== null && {\n capacityProviders: serializeAws_json1_1StringList(input.capacityProviders, context),\n }),\n ...(input.cluster !== undefined && input.cluster !== null && { cluster: input.cluster }),\n ...(input.defaultCapacityProviderStrategy !== undefined &&\n input.defaultCapacityProviderStrategy !== null && {\n defaultCapacityProviderStrategy: serializeAws_json1_1CapacityProviderStrategy(input.defaultCapacityProviderStrategy, context),\n }),\n };\n};\nconst serializeAws_json1_1RegisterContainerInstanceRequest = (input, context) => {\n return {\n ...(input.attributes !== undefined &&\n input.attributes !== null && { attributes: serializeAws_json1_1Attributes(input.attributes, context) }),\n ...(input.cluster !== undefined && input.cluster !== null && { cluster: input.cluster }),\n ...(input.containerInstanceArn !== undefined &&\n input.containerInstanceArn !== null && { containerInstanceArn: input.containerInstanceArn }),\n ...(input.instanceIdentityDocument !== undefined &&\n input.instanceIdentityDocument !== null && { instanceIdentityDocument: input.instanceIdentityDocument }),\n ...(input.instanceIdentityDocumentSignature !== undefined &&\n input.instanceIdentityDocumentSignature !== null && {\n instanceIdentityDocumentSignature: input.instanceIdentityDocumentSignature,\n }),\n ...(input.platformDevices !== undefined &&\n input.platformDevices !== null && {\n platformDevices: serializeAws_json1_1PlatformDevices(input.platformDevices, context),\n }),\n ...(input.tags !== undefined && input.tags !== null && { tags: serializeAws_json1_1Tags(input.tags, context) }),\n ...(input.totalResources !== undefined &&\n input.totalResources !== null && {\n totalResources: serializeAws_json1_1Resources(input.totalResources, context),\n }),\n ...(input.versionInfo !== undefined &&\n input.versionInfo !== null && { versionInfo: serializeAws_json1_1VersionInfo(input.versionInfo, context) }),\n };\n};\nconst serializeAws_json1_1RegisterTaskDefinitionRequest = (input, context) => {\n return {\n ...(input.containerDefinitions !== undefined &&\n input.containerDefinitions !== null && {\n containerDefinitions: serializeAws_json1_1ContainerDefinitions(input.containerDefinitions, context),\n }),\n ...(input.cpu !== undefined && input.cpu !== null && { cpu: input.cpu }),\n ...(input.ephemeralStorage !== undefined &&\n input.ephemeralStorage !== null && {\n ephemeralStorage: serializeAws_json1_1EphemeralStorage(input.ephemeralStorage, context),\n }),\n ...(input.executionRoleArn !== undefined &&\n input.executionRoleArn !== null && { executionRoleArn: input.executionRoleArn }),\n ...(input.family !== undefined && input.family !== null && { family: input.family }),\n ...(input.inferenceAccelerators !== undefined &&\n input.inferenceAccelerators !== null && {\n inferenceAccelerators: serializeAws_json1_1InferenceAccelerators(input.inferenceAccelerators, context),\n }),\n ...(input.ipcMode !== undefined && input.ipcMode !== null && { ipcMode: input.ipcMode }),\n ...(input.memory !== undefined && input.memory !== null && { memory: input.memory }),\n ...(input.networkMode !== undefined && input.networkMode !== null && { networkMode: input.networkMode }),\n ...(input.pidMode !== undefined && input.pidMode !== null && { pidMode: input.pidMode }),\n ...(input.placementConstraints !== undefined &&\n input.placementConstraints !== null && {\n placementConstraints: serializeAws_json1_1TaskDefinitionPlacementConstraints(input.placementConstraints, context),\n }),\n ...(input.proxyConfiguration !== undefined &&\n input.proxyConfiguration !== null && {\n proxyConfiguration: serializeAws_json1_1ProxyConfiguration(input.proxyConfiguration, context),\n }),\n ...(input.requiresCompatibilities !== undefined &&\n input.requiresCompatibilities !== null && {\n requiresCompatibilities: serializeAws_json1_1CompatibilityList(input.requiresCompatibilities, context),\n }),\n ...(input.tags !== undefined && input.tags !== null && { tags: serializeAws_json1_1Tags(input.tags, context) }),\n ...(input.taskRoleArn !== undefined && input.taskRoleArn !== null && { taskRoleArn: input.taskRoleArn }),\n ...(input.volumes !== undefined &&\n input.volumes !== null && { volumes: serializeAws_json1_1VolumeList(input.volumes, context) }),\n };\n};\nconst serializeAws_json1_1RepositoryCredentials = (input, context) => {\n return {\n ...(input.credentialsParameter !== undefined &&\n input.credentialsParameter !== null && { credentialsParameter: input.credentialsParameter }),\n };\n};\nconst serializeAws_json1_1Resource = (input, context) => {\n return {\n ...(input.doubleValue !== undefined &&\n input.doubleValue !== null && { doubleValue: smithy_client_1.serializeFloat(input.doubleValue) }),\n ...(input.integerValue !== undefined && input.integerValue !== null && { integerValue: input.integerValue }),\n ...(input.longValue !== undefined && input.longValue !== null && { longValue: input.longValue }),\n ...(input.name !== undefined && input.name !== null && { name: input.name }),\n ...(input.stringSetValue !== undefined &&\n input.stringSetValue !== null && {\n stringSetValue: serializeAws_json1_1StringList(input.stringSetValue, context),\n }),\n ...(input.type !== undefined && input.type !== null && { type: input.type }),\n };\n};\nconst serializeAws_json1_1ResourceRequirement = (input, context) => {\n return {\n ...(input.type !== undefined && input.type !== null && { type: input.type }),\n ...(input.value !== undefined && input.value !== null && { value: input.value }),\n };\n};\nconst serializeAws_json1_1ResourceRequirements = (input, context) => {\n return input\n .filter((e) => e != null)\n .map((entry) => {\n if (entry === null) {\n return null;\n }\n return serializeAws_json1_1ResourceRequirement(entry, context);\n });\n};\nconst serializeAws_json1_1Resources = (input, context) => {\n return input\n .filter((e) => e != null)\n .map((entry) => {\n if (entry === null) {\n return null;\n }\n return serializeAws_json1_1Resource(entry, context);\n });\n};\nconst serializeAws_json1_1RunTaskRequest = (input, context) => {\n return {\n ...(input.capacityProviderStrategy !== undefined &&\n input.capacityProviderStrategy !== null && {\n capacityProviderStrategy: serializeAws_json1_1CapacityProviderStrategy(input.capacityProviderStrategy, context),\n }),\n ...(input.cluster !== undefined && input.cluster !== null && { cluster: input.cluster }),\n ...(input.count !== undefined && input.count !== null && { count: input.count }),\n ...(input.enableECSManagedTags !== undefined &&\n input.enableECSManagedTags !== null && { enableECSManagedTags: input.enableECSManagedTags }),\n ...(input.enableExecuteCommand !== undefined &&\n input.enableExecuteCommand !== null && { enableExecuteCommand: input.enableExecuteCommand }),\n ...(input.group !== undefined && input.group !== null && { group: input.group }),\n ...(input.launchType !== undefined && input.launchType !== null && { launchType: input.launchType }),\n ...(input.networkConfiguration !== undefined &&\n input.networkConfiguration !== null && {\n networkConfiguration: serializeAws_json1_1NetworkConfiguration(input.networkConfiguration, context),\n }),\n ...(input.overrides !== undefined &&\n input.overrides !== null && { overrides: serializeAws_json1_1TaskOverride(input.overrides, context) }),\n ...(input.placementConstraints !== undefined &&\n input.placementConstraints !== null && {\n placementConstraints: serializeAws_json1_1PlacementConstraints(input.placementConstraints, context),\n }),\n ...(input.placementStrategy !== undefined &&\n input.placementStrategy !== null && {\n placementStrategy: serializeAws_json1_1PlacementStrategies(input.placementStrategy, context),\n }),\n ...(input.platformVersion !== undefined &&\n input.platformVersion !== null && { platformVersion: input.platformVersion }),\n ...(input.propagateTags !== undefined && input.propagateTags !== null && { propagateTags: input.propagateTags }),\n ...(input.referenceId !== undefined && input.referenceId !== null && { referenceId: input.referenceId }),\n ...(input.startedBy !== undefined && input.startedBy !== null && { startedBy: input.startedBy }),\n ...(input.tags !== undefined && input.tags !== null && { tags: serializeAws_json1_1Tags(input.tags, context) }),\n ...(input.taskDefinition !== undefined &&\n input.taskDefinition !== null && { taskDefinition: input.taskDefinition }),\n };\n};\nconst serializeAws_json1_1Scale = (input, context) => {\n return {\n ...(input.unit !== undefined && input.unit !== null && { unit: input.unit }),\n ...(input.value !== undefined && input.value !== null && { value: smithy_client_1.serializeFloat(input.value) }),\n };\n};\nconst serializeAws_json1_1Secret = (input, context) => {\n return {\n ...(input.name !== undefined && input.name !== null && { name: input.name }),\n ...(input.valueFrom !== undefined && input.valueFrom !== null && { valueFrom: input.valueFrom }),\n };\n};\nconst serializeAws_json1_1SecretList = (input, context) => {\n return input\n .filter((e) => e != null)\n .map((entry) => {\n if (entry === null) {\n return null;\n }\n return serializeAws_json1_1Secret(entry, context);\n });\n};\nconst serializeAws_json1_1ServiceFieldList = (input, context) => {\n return input\n .filter((e) => e != null)\n .map((entry) => {\n if (entry === null) {\n return null;\n }\n return entry;\n });\n};\nconst serializeAws_json1_1ServiceRegistries = (input, context) => {\n return input\n .filter((e) => e != null)\n .map((entry) => {\n if (entry === null) {\n return null;\n }\n return serializeAws_json1_1ServiceRegistry(entry, context);\n });\n};\nconst serializeAws_json1_1ServiceRegistry = (input, context) => {\n return {\n ...(input.containerName !== undefined && input.containerName !== null && { containerName: input.containerName }),\n ...(input.containerPort !== undefined && input.containerPort !== null && { containerPort: input.containerPort }),\n ...(input.port !== undefined && input.port !== null && { port: input.port }),\n ...(input.registryArn !== undefined && input.registryArn !== null && { registryArn: input.registryArn }),\n };\n};\nconst serializeAws_json1_1StartTaskRequest = (input, context) => {\n return {\n ...(input.cluster !== undefined && input.cluster !== null && { cluster: input.cluster }),\n ...(input.containerInstances !== undefined &&\n input.containerInstances !== null && {\n containerInstances: serializeAws_json1_1StringList(input.containerInstances, context),\n }),\n ...(input.enableECSManagedTags !== undefined &&\n input.enableECSManagedTags !== null && { enableECSManagedTags: input.enableECSManagedTags }),\n ...(input.enableExecuteCommand !== undefined &&\n input.enableExecuteCommand !== null && { enableExecuteCommand: input.enableExecuteCommand }),\n ...(input.group !== undefined && input.group !== null && { group: input.group }),\n ...(input.networkConfiguration !== undefined &&\n input.networkConfiguration !== null && {\n networkConfiguration: serializeAws_json1_1NetworkConfiguration(input.networkConfiguration, context),\n }),\n ...(input.overrides !== undefined &&\n input.overrides !== null && { overrides: serializeAws_json1_1TaskOverride(input.overrides, context) }),\n ...(input.propagateTags !== undefined && input.propagateTags !== null && { propagateTags: input.propagateTags }),\n ...(input.referenceId !== undefined && input.referenceId !== null && { referenceId: input.referenceId }),\n ...(input.startedBy !== undefined && input.startedBy !== null && { startedBy: input.startedBy }),\n ...(input.tags !== undefined && input.tags !== null && { tags: serializeAws_json1_1Tags(input.tags, context) }),\n ...(input.taskDefinition !== undefined &&\n input.taskDefinition !== null && { taskDefinition: input.taskDefinition }),\n };\n};\nconst serializeAws_json1_1StopTaskRequest = (input, context) => {\n return {\n ...(input.cluster !== undefined && input.cluster !== null && { cluster: input.cluster }),\n ...(input.reason !== undefined && input.reason !== null && { reason: input.reason }),\n ...(input.task !== undefined && input.task !== null && { task: input.task }),\n };\n};\nconst serializeAws_json1_1StringList = (input, context) => {\n return input\n .filter((e) => e != null)\n .map((entry) => {\n if (entry === null) {\n return null;\n }\n return entry;\n });\n};\nconst serializeAws_json1_1StringMap = (input, context) => {\n return Object.entries(input).reduce((acc, [key, value]) => {\n if (value === null) {\n return acc;\n }\n return {\n ...acc,\n [key]: value,\n };\n }, {});\n};\nconst serializeAws_json1_1SubmitAttachmentStateChangesRequest = (input, context) => {\n return {\n ...(input.attachments !== undefined &&\n input.attachments !== null && {\n attachments: serializeAws_json1_1AttachmentStateChanges(input.attachments, context),\n }),\n ...(input.cluster !== undefined && input.cluster !== null && { cluster: input.cluster }),\n };\n};\nconst serializeAws_json1_1SubmitContainerStateChangeRequest = (input, context) => {\n return {\n ...(input.cluster !== undefined && input.cluster !== null && { cluster: input.cluster }),\n ...(input.containerName !== undefined && input.containerName !== null && { containerName: input.containerName }),\n ...(input.exitCode !== undefined && input.exitCode !== null && { exitCode: input.exitCode }),\n ...(input.networkBindings !== undefined &&\n input.networkBindings !== null && {\n networkBindings: serializeAws_json1_1NetworkBindings(input.networkBindings, context),\n }),\n ...(input.reason !== undefined && input.reason !== null && { reason: input.reason }),\n ...(input.runtimeId !== undefined && input.runtimeId !== null && { runtimeId: input.runtimeId }),\n ...(input.status !== undefined && input.status !== null && { status: input.status }),\n ...(input.task !== undefined && input.task !== null && { task: input.task }),\n };\n};\nconst serializeAws_json1_1SubmitTaskStateChangeRequest = (input, context) => {\n return {\n ...(input.attachments !== undefined &&\n input.attachments !== null && {\n attachments: serializeAws_json1_1AttachmentStateChanges(input.attachments, context),\n }),\n ...(input.cluster !== undefined && input.cluster !== null && { cluster: input.cluster }),\n ...(input.containers !== undefined &&\n input.containers !== null && {\n containers: serializeAws_json1_1ContainerStateChanges(input.containers, context),\n }),\n ...(input.executionStoppedAt !== undefined &&\n input.executionStoppedAt !== null && {\n executionStoppedAt: Math.round(input.executionStoppedAt.getTime() / 1000),\n }),\n ...(input.managedAgents !== undefined &&\n input.managedAgents !== null && {\n managedAgents: serializeAws_json1_1ManagedAgentStateChanges(input.managedAgents, context),\n }),\n ...(input.pullStartedAt !== undefined &&\n input.pullStartedAt !== null && { pullStartedAt: Math.round(input.pullStartedAt.getTime() / 1000) }),\n ...(input.pullStoppedAt !== undefined &&\n input.pullStoppedAt !== null && { pullStoppedAt: Math.round(input.pullStoppedAt.getTime() / 1000) }),\n ...(input.reason !== undefined && input.reason !== null && { reason: input.reason }),\n ...(input.status !== undefined && input.status !== null && { status: input.status }),\n ...(input.task !== undefined && input.task !== null && { task: input.task }),\n };\n};\nconst serializeAws_json1_1SystemControl = (input, context) => {\n return {\n ...(input.namespace !== undefined && input.namespace !== null && { namespace: input.namespace }),\n ...(input.value !== undefined && input.value !== null && { value: input.value }),\n };\n};\nconst serializeAws_json1_1SystemControls = (input, context) => {\n return input\n .filter((e) => e != null)\n .map((entry) => {\n if (entry === null) {\n return null;\n }\n return serializeAws_json1_1SystemControl(entry, context);\n });\n};\nconst serializeAws_json1_1Tag = (input, context) => {\n return {\n ...(input.key !== undefined && input.key !== null && { key: input.key }),\n ...(input.value !== undefined && input.value !== null && { value: input.value }),\n };\n};\nconst serializeAws_json1_1TagKeys = (input, context) => {\n return input\n .filter((e) => e != null)\n .map((entry) => {\n if (entry === null) {\n return null;\n }\n return entry;\n });\n};\nconst serializeAws_json1_1TagResourceRequest = (input, context) => {\n return {\n ...(input.resourceArn !== undefined && input.resourceArn !== null && { resourceArn: input.resourceArn }),\n ...(input.tags !== undefined && input.tags !== null && { tags: serializeAws_json1_1Tags(input.tags, context) }),\n };\n};\nconst serializeAws_json1_1Tags = (input, context) => {\n return input\n .filter((e) => e != null)\n .map((entry) => {\n if (entry === null) {\n return null;\n }\n return serializeAws_json1_1Tag(entry, context);\n });\n};\nconst serializeAws_json1_1TaskDefinitionFieldList = (input, context) => {\n return input\n .filter((e) => e != null)\n .map((entry) => {\n if (entry === null) {\n return null;\n }\n return entry;\n });\n};\nconst serializeAws_json1_1TaskDefinitionPlacementConstraint = (input, context) => {\n return {\n ...(input.expression !== undefined && input.expression !== null && { expression: input.expression }),\n ...(input.type !== undefined && input.type !== null && { type: input.type }),\n };\n};\nconst serializeAws_json1_1TaskDefinitionPlacementConstraints = (input, context) => {\n return input\n .filter((e) => e != null)\n .map((entry) => {\n if (entry === null) {\n return null;\n }\n return serializeAws_json1_1TaskDefinitionPlacementConstraint(entry, context);\n });\n};\nconst serializeAws_json1_1TaskFieldList = (input, context) => {\n return input\n .filter((e) => e != null)\n .map((entry) => {\n if (entry === null) {\n return null;\n }\n return entry;\n });\n};\nconst serializeAws_json1_1TaskOverride = (input, context) => {\n return {\n ...(input.containerOverrides !== undefined &&\n input.containerOverrides !== null && {\n containerOverrides: serializeAws_json1_1ContainerOverrides(input.containerOverrides, context),\n }),\n ...(input.cpu !== undefined && input.cpu !== null && { cpu: input.cpu }),\n ...(input.ephemeralStorage !== undefined &&\n input.ephemeralStorage !== null && {\n ephemeralStorage: serializeAws_json1_1EphemeralStorage(input.ephemeralStorage, context),\n }),\n ...(input.executionRoleArn !== undefined &&\n input.executionRoleArn !== null && { executionRoleArn: input.executionRoleArn }),\n ...(input.inferenceAcceleratorOverrides !== undefined &&\n input.inferenceAcceleratorOverrides !== null && {\n inferenceAcceleratorOverrides: serializeAws_json1_1InferenceAcceleratorOverrides(input.inferenceAcceleratorOverrides, context),\n }),\n ...(input.memory !== undefined && input.memory !== null && { memory: input.memory }),\n ...(input.taskRoleArn !== undefined && input.taskRoleArn !== null && { taskRoleArn: input.taskRoleArn }),\n };\n};\nconst serializeAws_json1_1TaskSetFieldList = (input, context) => {\n return input\n .filter((e) => e != null)\n .map((entry) => {\n if (entry === null) {\n return null;\n }\n return entry;\n });\n};\nconst serializeAws_json1_1Tmpfs = (input, context) => {\n return {\n ...(input.containerPath !== undefined && input.containerPath !== null && { containerPath: input.containerPath }),\n ...(input.mountOptions !== undefined &&\n input.mountOptions !== null && { mountOptions: serializeAws_json1_1StringList(input.mountOptions, context) }),\n ...(input.size !== undefined && input.size !== null && { size: input.size }),\n };\n};\nconst serializeAws_json1_1TmpfsList = (input, context) => {\n return input\n .filter((e) => e != null)\n .map((entry) => {\n if (entry === null) {\n return null;\n }\n return serializeAws_json1_1Tmpfs(entry, context);\n });\n};\nconst serializeAws_json1_1Ulimit = (input, context) => {\n return {\n ...(input.hardLimit !== undefined && input.hardLimit !== null && { hardLimit: input.hardLimit }),\n ...(input.name !== undefined && input.name !== null && { name: input.name }),\n ...(input.softLimit !== undefined && input.softLimit !== null && { softLimit: input.softLimit }),\n };\n};\nconst serializeAws_json1_1UlimitList = (input, context) => {\n return input\n .filter((e) => e != null)\n .map((entry) => {\n if (entry === null) {\n return null;\n }\n return serializeAws_json1_1Ulimit(entry, context);\n });\n};\nconst serializeAws_json1_1UntagResourceRequest = (input, context) => {\n return {\n ...(input.resourceArn !== undefined && input.resourceArn !== null && { resourceArn: input.resourceArn }),\n ...(input.tagKeys !== undefined &&\n input.tagKeys !== null && { tagKeys: serializeAws_json1_1TagKeys(input.tagKeys, context) }),\n };\n};\nconst serializeAws_json1_1UpdateCapacityProviderRequest = (input, context) => {\n return {\n ...(input.autoScalingGroupProvider !== undefined &&\n input.autoScalingGroupProvider !== null && {\n autoScalingGroupProvider: serializeAws_json1_1AutoScalingGroupProviderUpdate(input.autoScalingGroupProvider, context),\n }),\n ...(input.name !== undefined && input.name !== null && { name: input.name }),\n };\n};\nconst serializeAws_json1_1UpdateClusterRequest = (input, context) => {\n return {\n ...(input.cluster !== undefined && input.cluster !== null && { cluster: input.cluster }),\n ...(input.configuration !== undefined &&\n input.configuration !== null && {\n configuration: serializeAws_json1_1ClusterConfiguration(input.configuration, context),\n }),\n ...(input.settings !== undefined &&\n input.settings !== null && { settings: serializeAws_json1_1ClusterSettings(input.settings, context) }),\n };\n};\nconst serializeAws_json1_1UpdateClusterSettingsRequest = (input, context) => {\n return {\n ...(input.cluster !== undefined && input.cluster !== null && { cluster: input.cluster }),\n ...(input.settings !== undefined &&\n input.settings !== null && { settings: serializeAws_json1_1ClusterSettings(input.settings, context) }),\n };\n};\nconst serializeAws_json1_1UpdateContainerAgentRequest = (input, context) => {\n return {\n ...(input.cluster !== undefined && input.cluster !== null && { cluster: input.cluster }),\n ...(input.containerInstance !== undefined &&\n input.containerInstance !== null && { containerInstance: input.containerInstance }),\n };\n};\nconst serializeAws_json1_1UpdateContainerInstancesStateRequest = (input, context) => {\n return {\n ...(input.cluster !== undefined && input.cluster !== null && { cluster: input.cluster }),\n ...(input.containerInstances !== undefined &&\n input.containerInstances !== null && {\n containerInstances: serializeAws_json1_1StringList(input.containerInstances, context),\n }),\n ...(input.status !== undefined && input.status !== null && { status: input.status }),\n };\n};\nconst serializeAws_json1_1UpdateServicePrimaryTaskSetRequest = (input, context) => {\n return {\n ...(input.cluster !== undefined && input.cluster !== null && { cluster: input.cluster }),\n ...(input.primaryTaskSet !== undefined &&\n input.primaryTaskSet !== null && { primaryTaskSet: input.primaryTaskSet }),\n ...(input.service !== undefined && input.service !== null && { service: input.service }),\n };\n};\nconst serializeAws_json1_1UpdateServiceRequest = (input, context) => {\n return {\n ...(input.capacityProviderStrategy !== undefined &&\n input.capacityProviderStrategy !== null && {\n capacityProviderStrategy: serializeAws_json1_1CapacityProviderStrategy(input.capacityProviderStrategy, context),\n }),\n ...(input.cluster !== undefined && input.cluster !== null && { cluster: input.cluster }),\n ...(input.deploymentConfiguration !== undefined &&\n input.deploymentConfiguration !== null && {\n deploymentConfiguration: serializeAws_json1_1DeploymentConfiguration(input.deploymentConfiguration, context),\n }),\n ...(input.desiredCount !== undefined && input.desiredCount !== null && { desiredCount: input.desiredCount }),\n ...(input.enableExecuteCommand !== undefined &&\n input.enableExecuteCommand !== null && { enableExecuteCommand: input.enableExecuteCommand }),\n ...(input.forceNewDeployment !== undefined &&\n input.forceNewDeployment !== null && { forceNewDeployment: input.forceNewDeployment }),\n ...(input.healthCheckGracePeriodSeconds !== undefined &&\n input.healthCheckGracePeriodSeconds !== null && {\n healthCheckGracePeriodSeconds: input.healthCheckGracePeriodSeconds,\n }),\n ...(input.networkConfiguration !== undefined &&\n input.networkConfiguration !== null && {\n networkConfiguration: serializeAws_json1_1NetworkConfiguration(input.networkConfiguration, context),\n }),\n ...(input.placementConstraints !== undefined &&\n input.placementConstraints !== null && {\n placementConstraints: serializeAws_json1_1PlacementConstraints(input.placementConstraints, context),\n }),\n ...(input.placementStrategy !== undefined &&\n input.placementStrategy !== null && {\n placementStrategy: serializeAws_json1_1PlacementStrategies(input.placementStrategy, context),\n }),\n ...(input.platformVersion !== undefined &&\n input.platformVersion !== null && { platformVersion: input.platformVersion }),\n ...(input.service !== undefined && input.service !== null && { service: input.service }),\n ...(input.taskDefinition !== undefined &&\n input.taskDefinition !== null && { taskDefinition: input.taskDefinition }),\n };\n};\nconst serializeAws_json1_1UpdateTaskSetRequest = (input, context) => {\n return {\n ...(input.cluster !== undefined && input.cluster !== null && { cluster: input.cluster }),\n ...(input.scale !== undefined &&\n input.scale !== null && { scale: serializeAws_json1_1Scale(input.scale, context) }),\n ...(input.service !== undefined && input.service !== null && { service: input.service }),\n ...(input.taskSet !== undefined && input.taskSet !== null && { taskSet: input.taskSet }),\n };\n};\nconst serializeAws_json1_1VersionInfo = (input, context) => {\n return {\n ...(input.agentHash !== undefined && input.agentHash !== null && { agentHash: input.agentHash }),\n ...(input.agentVersion !== undefined && input.agentVersion !== null && { agentVersion: input.agentVersion }),\n ...(input.dockerVersion !== undefined && input.dockerVersion !== null && { dockerVersion: input.dockerVersion }),\n };\n};\nconst serializeAws_json1_1Volume = (input, context) => {\n return {\n ...(input.dockerVolumeConfiguration !== undefined &&\n input.dockerVolumeConfiguration !== null && {\n dockerVolumeConfiguration: serializeAws_json1_1DockerVolumeConfiguration(input.dockerVolumeConfiguration, context),\n }),\n ...(input.efsVolumeConfiguration !== undefined &&\n input.efsVolumeConfiguration !== null && {\n efsVolumeConfiguration: serializeAws_json1_1EFSVolumeConfiguration(input.efsVolumeConfiguration, context),\n }),\n ...(input.fsxWindowsFileServerVolumeConfiguration !== undefined &&\n input.fsxWindowsFileServerVolumeConfiguration !== null && {\n fsxWindowsFileServerVolumeConfiguration: serializeAws_json1_1FSxWindowsFileServerVolumeConfiguration(input.fsxWindowsFileServerVolumeConfiguration, context),\n }),\n ...(input.host !== undefined &&\n input.host !== null && { host: serializeAws_json1_1HostVolumeProperties(input.host, context) }),\n ...(input.name !== undefined && input.name !== null && { name: input.name }),\n };\n};\nconst serializeAws_json1_1VolumeFrom = (input, context) => {\n return {\n ...(input.readOnly !== undefined && input.readOnly !== null && { readOnly: input.readOnly }),\n ...(input.sourceContainer !== undefined &&\n input.sourceContainer !== null && { sourceContainer: input.sourceContainer }),\n };\n};\nconst serializeAws_json1_1VolumeFromList = (input, context) => {\n return input\n .filter((e) => e != null)\n .map((entry) => {\n if (entry === null) {\n return null;\n }\n return serializeAws_json1_1VolumeFrom(entry, context);\n });\n};\nconst serializeAws_json1_1VolumeList = (input, context) => {\n return input\n .filter((e) => e != null)\n .map((entry) => {\n if (entry === null) {\n return null;\n }\n return serializeAws_json1_1Volume(entry, context);\n });\n};\nconst deserializeAws_json1_1AccessDeniedException = (output, context) => {\n return {\n message: smithy_client_1.expectString(output.message),\n };\n};\nconst deserializeAws_json1_1Attachment = (output, context) => {\n return {\n details: output.details !== undefined && output.details !== null\n ? deserializeAws_json1_1AttachmentDetails(output.details, context)\n : undefined,\n id: smithy_client_1.expectString(output.id),\n status: smithy_client_1.expectString(output.status),\n type: smithy_client_1.expectString(output.type),\n };\n};\nconst deserializeAws_json1_1AttachmentDetails = (output, context) => {\n return (output || [])\n .filter((e) => e != null)\n .map((entry) => {\n if (entry === null) {\n return null;\n }\n return deserializeAws_json1_1KeyValuePair(entry, context);\n });\n};\nconst deserializeAws_json1_1Attachments = (output, context) => {\n return (output || [])\n .filter((e) => e != null)\n .map((entry) => {\n if (entry === null) {\n return null;\n }\n return deserializeAws_json1_1Attachment(entry, context);\n });\n};\nconst deserializeAws_json1_1Attribute = (output, context) => {\n return {\n name: smithy_client_1.expectString(output.name),\n targetId: smithy_client_1.expectString(output.targetId),\n targetType: smithy_client_1.expectString(output.targetType),\n value: smithy_client_1.expectString(output.value),\n };\n};\nconst deserializeAws_json1_1AttributeLimitExceededException = (output, context) => {\n return {\n message: smithy_client_1.expectString(output.message),\n };\n};\nconst deserializeAws_json1_1Attributes = (output, context) => {\n return (output || [])\n .filter((e) => e != null)\n .map((entry) => {\n if (entry === null) {\n return null;\n }\n return deserializeAws_json1_1Attribute(entry, context);\n });\n};\nconst deserializeAws_json1_1AutoScalingGroupProvider = (output, context) => {\n return {\n autoScalingGroupArn: smithy_client_1.expectString(output.autoScalingGroupArn),\n managedScaling: output.managedScaling !== undefined && output.managedScaling !== null\n ? deserializeAws_json1_1ManagedScaling(output.managedScaling, context)\n : undefined,\n managedTerminationProtection: smithy_client_1.expectString(output.managedTerminationProtection),\n };\n};\nconst deserializeAws_json1_1AwsVpcConfiguration = (output, context) => {\n return {\n assignPublicIp: smithy_client_1.expectString(output.assignPublicIp),\n securityGroups: output.securityGroups !== undefined && output.securityGroups !== null\n ? deserializeAws_json1_1StringList(output.securityGroups, context)\n : undefined,\n subnets: output.subnets !== undefined && output.subnets !== null\n ? deserializeAws_json1_1StringList(output.subnets, context)\n : undefined,\n };\n};\nconst deserializeAws_json1_1BlockedException = (output, context) => {\n return {\n message: smithy_client_1.expectString(output.message),\n };\n};\nconst deserializeAws_json1_1CapacityProvider = (output, context) => {\n return {\n autoScalingGroupProvider: output.autoScalingGroupProvider !== undefined && output.autoScalingGroupProvider !== null\n ? deserializeAws_json1_1AutoScalingGroupProvider(output.autoScalingGroupProvider, context)\n : undefined,\n capacityProviderArn: smithy_client_1.expectString(output.capacityProviderArn),\n name: smithy_client_1.expectString(output.name),\n status: smithy_client_1.expectString(output.status),\n tags: output.tags !== undefined && output.tags !== null ? deserializeAws_json1_1Tags(output.tags, context) : undefined,\n updateStatus: smithy_client_1.expectString(output.updateStatus),\n updateStatusReason: smithy_client_1.expectString(output.updateStatusReason),\n };\n};\nconst deserializeAws_json1_1CapacityProviders = (output, context) => {\n return (output || [])\n .filter((e) => e != null)\n .map((entry) => {\n if (entry === null) {\n return null;\n }\n return deserializeAws_json1_1CapacityProvider(entry, context);\n });\n};\nconst deserializeAws_json1_1CapacityProviderStrategy = (output, context) => {\n return (output || [])\n .filter((e) => e != null)\n .map((entry) => {\n if (entry === null) {\n return null;\n }\n return deserializeAws_json1_1CapacityProviderStrategyItem(entry, context);\n });\n};\nconst deserializeAws_json1_1CapacityProviderStrategyItem = (output, context) => {\n return {\n base: smithy_client_1.expectInt32(output.base),\n capacityProvider: smithy_client_1.expectString(output.capacityProvider),\n weight: smithy_client_1.expectInt32(output.weight),\n };\n};\nconst deserializeAws_json1_1ClientException = (output, context) => {\n return {\n message: smithy_client_1.expectString(output.message),\n };\n};\nconst deserializeAws_json1_1Cluster = (output, context) => {\n return {\n activeServicesCount: smithy_client_1.expectInt32(output.activeServicesCount),\n attachments: output.attachments !== undefined && output.attachments !== null\n ? deserializeAws_json1_1Attachments(output.attachments, context)\n : undefined,\n attachmentsStatus: smithy_client_1.expectString(output.attachmentsStatus),\n capacityProviders: output.capacityProviders !== undefined && output.capacityProviders !== null\n ? deserializeAws_json1_1StringList(output.capacityProviders, context)\n : undefined,\n clusterArn: smithy_client_1.expectString(output.clusterArn),\n clusterName: smithy_client_1.expectString(output.clusterName),\n configuration: output.configuration !== undefined && output.configuration !== null\n ? deserializeAws_json1_1ClusterConfiguration(output.configuration, context)\n : undefined,\n defaultCapacityProviderStrategy: output.defaultCapacityProviderStrategy !== undefined && output.defaultCapacityProviderStrategy !== null\n ? deserializeAws_json1_1CapacityProviderStrategy(output.defaultCapacityProviderStrategy, context)\n : undefined,\n pendingTasksCount: smithy_client_1.expectInt32(output.pendingTasksCount),\n registeredContainerInstancesCount: smithy_client_1.expectInt32(output.registeredContainerInstancesCount),\n runningTasksCount: smithy_client_1.expectInt32(output.runningTasksCount),\n settings: output.settings !== undefined && output.settings !== null\n ? deserializeAws_json1_1ClusterSettings(output.settings, context)\n : undefined,\n statistics: output.statistics !== undefined && output.statistics !== null\n ? deserializeAws_json1_1Statistics(output.statistics, context)\n : undefined,\n status: smithy_client_1.expectString(output.status),\n tags: output.tags !== undefined && output.tags !== null ? deserializeAws_json1_1Tags(output.tags, context) : undefined,\n };\n};\nconst deserializeAws_json1_1ClusterConfiguration = (output, context) => {\n return {\n executeCommandConfiguration: output.executeCommandConfiguration !== undefined && output.executeCommandConfiguration !== null\n ? deserializeAws_json1_1ExecuteCommandConfiguration(output.executeCommandConfiguration, context)\n : undefined,\n };\n};\nconst deserializeAws_json1_1ClusterContainsContainerInstancesException = (output, context) => {\n return {\n message: smithy_client_1.expectString(output.message),\n };\n};\nconst deserializeAws_json1_1ClusterContainsServicesException = (output, context) => {\n return {\n message: smithy_client_1.expectString(output.message),\n };\n};\nconst deserializeAws_json1_1ClusterContainsTasksException = (output, context) => {\n return {\n message: smithy_client_1.expectString(output.message),\n };\n};\nconst deserializeAws_json1_1ClusterNotFoundException = (output, context) => {\n return {\n message: smithy_client_1.expectString(output.message),\n };\n};\nconst deserializeAws_json1_1Clusters = (output, context) => {\n return (output || [])\n .filter((e) => e != null)\n .map((entry) => {\n if (entry === null) {\n return null;\n }\n return deserializeAws_json1_1Cluster(entry, context);\n });\n};\nconst deserializeAws_json1_1ClusterSetting = (output, context) => {\n return {\n name: smithy_client_1.expectString(output.name),\n value: smithy_client_1.expectString(output.value),\n };\n};\nconst deserializeAws_json1_1ClusterSettings = (output, context) => {\n return (output || [])\n .filter((e) => e != null)\n .map((entry) => {\n if (entry === null) {\n return null;\n }\n return deserializeAws_json1_1ClusterSetting(entry, context);\n });\n};\nconst deserializeAws_json1_1CompatibilityList = (output, context) => {\n return (output || [])\n .filter((e) => e != null)\n .map((entry) => {\n if (entry === null) {\n return null;\n }\n return smithy_client_1.expectString(entry);\n });\n};\nconst deserializeAws_json1_1Container = (output, context) => {\n return {\n containerArn: smithy_client_1.expectString(output.containerArn),\n cpu: smithy_client_1.expectString(output.cpu),\n exitCode: smithy_client_1.expectInt32(output.exitCode),\n gpuIds: output.gpuIds !== undefined && output.gpuIds !== null\n ? deserializeAws_json1_1GpuIds(output.gpuIds, context)\n : undefined,\n healthStatus: smithy_client_1.expectString(output.healthStatus),\n image: smithy_client_1.expectString(output.image),\n imageDigest: smithy_client_1.expectString(output.imageDigest),\n lastStatus: smithy_client_1.expectString(output.lastStatus),\n managedAgents: output.managedAgents !== undefined && output.managedAgents !== null\n ? deserializeAws_json1_1ManagedAgents(output.managedAgents, context)\n : undefined,\n memory: smithy_client_1.expectString(output.memory),\n memoryReservation: smithy_client_1.expectString(output.memoryReservation),\n name: smithy_client_1.expectString(output.name),\n networkBindings: output.networkBindings !== undefined && output.networkBindings !== null\n ? deserializeAws_json1_1NetworkBindings(output.networkBindings, context)\n : undefined,\n networkInterfaces: output.networkInterfaces !== undefined && output.networkInterfaces !== null\n ? deserializeAws_json1_1NetworkInterfaces(output.networkInterfaces, context)\n : undefined,\n reason: smithy_client_1.expectString(output.reason),\n runtimeId: smithy_client_1.expectString(output.runtimeId),\n taskArn: smithy_client_1.expectString(output.taskArn),\n };\n};\nconst deserializeAws_json1_1ContainerDefinition = (output, context) => {\n return {\n command: output.command !== undefined && output.command !== null\n ? deserializeAws_json1_1StringList(output.command, context)\n : undefined,\n cpu: smithy_client_1.expectInt32(output.cpu),\n dependsOn: output.dependsOn !== undefined && output.dependsOn !== null\n ? deserializeAws_json1_1ContainerDependencies(output.dependsOn, context)\n : undefined,\n disableNetworking: smithy_client_1.expectBoolean(output.disableNetworking),\n dnsSearchDomains: output.dnsSearchDomains !== undefined && output.dnsSearchDomains !== null\n ? deserializeAws_json1_1StringList(output.dnsSearchDomains, context)\n : undefined,\n dnsServers: output.dnsServers !== undefined && output.dnsServers !== null\n ? deserializeAws_json1_1StringList(output.dnsServers, context)\n : undefined,\n dockerLabels: output.dockerLabels !== undefined && output.dockerLabels !== null\n ? deserializeAws_json1_1DockerLabelsMap(output.dockerLabels, context)\n : undefined,\n dockerSecurityOptions: output.dockerSecurityOptions !== undefined && output.dockerSecurityOptions !== null\n ? deserializeAws_json1_1StringList(output.dockerSecurityOptions, context)\n : undefined,\n entryPoint: output.entryPoint !== undefined && output.entryPoint !== null\n ? deserializeAws_json1_1StringList(output.entryPoint, context)\n : undefined,\n environment: output.environment !== undefined && output.environment !== null\n ? deserializeAws_json1_1EnvironmentVariables(output.environment, context)\n : undefined,\n environmentFiles: output.environmentFiles !== undefined && output.environmentFiles !== null\n ? deserializeAws_json1_1EnvironmentFiles(output.environmentFiles, context)\n : undefined,\n essential: smithy_client_1.expectBoolean(output.essential),\n extraHosts: output.extraHosts !== undefined && output.extraHosts !== null\n ? deserializeAws_json1_1HostEntryList(output.extraHosts, context)\n : undefined,\n firelensConfiguration: output.firelensConfiguration !== undefined && output.firelensConfiguration !== null\n ? deserializeAws_json1_1FirelensConfiguration(output.firelensConfiguration, context)\n : undefined,\n healthCheck: output.healthCheck !== undefined && output.healthCheck !== null\n ? deserializeAws_json1_1HealthCheck(output.healthCheck, context)\n : undefined,\n hostname: smithy_client_1.expectString(output.hostname),\n image: smithy_client_1.expectString(output.image),\n interactive: smithy_client_1.expectBoolean(output.interactive),\n links: output.links !== undefined && output.links !== null\n ? deserializeAws_json1_1StringList(output.links, context)\n : undefined,\n linuxParameters: output.linuxParameters !== undefined && output.linuxParameters !== null\n ? deserializeAws_json1_1LinuxParameters(output.linuxParameters, context)\n : undefined,\n logConfiguration: output.logConfiguration !== undefined && output.logConfiguration !== null\n ? deserializeAws_json1_1LogConfiguration(output.logConfiguration, context)\n : undefined,\n memory: smithy_client_1.expectInt32(output.memory),\n memoryReservation: smithy_client_1.expectInt32(output.memoryReservation),\n mountPoints: output.mountPoints !== undefined && output.mountPoints !== null\n ? deserializeAws_json1_1MountPointList(output.mountPoints, context)\n : undefined,\n name: smithy_client_1.expectString(output.name),\n portMappings: output.portMappings !== undefined && output.portMappings !== null\n ? deserializeAws_json1_1PortMappingList(output.portMappings, context)\n : undefined,\n privileged: smithy_client_1.expectBoolean(output.privileged),\n pseudoTerminal: smithy_client_1.expectBoolean(output.pseudoTerminal),\n readonlyRootFilesystem: smithy_client_1.expectBoolean(output.readonlyRootFilesystem),\n repositoryCredentials: output.repositoryCredentials !== undefined && output.repositoryCredentials !== null\n ? deserializeAws_json1_1RepositoryCredentials(output.repositoryCredentials, context)\n : undefined,\n resourceRequirements: output.resourceRequirements !== undefined && output.resourceRequirements !== null\n ? deserializeAws_json1_1ResourceRequirements(output.resourceRequirements, context)\n : undefined,\n secrets: output.secrets !== undefined && output.secrets !== null\n ? deserializeAws_json1_1SecretList(output.secrets, context)\n : undefined,\n startTimeout: smithy_client_1.expectInt32(output.startTimeout),\n stopTimeout: smithy_client_1.expectInt32(output.stopTimeout),\n systemControls: output.systemControls !== undefined && output.systemControls !== null\n ? deserializeAws_json1_1SystemControls(output.systemControls, context)\n : undefined,\n ulimits: output.ulimits !== undefined && output.ulimits !== null\n ? deserializeAws_json1_1UlimitList(output.ulimits, context)\n : undefined,\n user: smithy_client_1.expectString(output.user),\n volumesFrom: output.volumesFrom !== undefined && output.volumesFrom !== null\n ? deserializeAws_json1_1VolumeFromList(output.volumesFrom, context)\n : undefined,\n workingDirectory: smithy_client_1.expectString(output.workingDirectory),\n };\n};\nconst deserializeAws_json1_1ContainerDefinitions = (output, context) => {\n return (output || [])\n .filter((e) => e != null)\n .map((entry) => {\n if (entry === null) {\n return null;\n }\n return deserializeAws_json1_1ContainerDefinition(entry, context);\n });\n};\nconst deserializeAws_json1_1ContainerDependencies = (output, context) => {\n return (output || [])\n .filter((e) => e != null)\n .map((entry) => {\n if (entry === null) {\n return null;\n }\n return deserializeAws_json1_1ContainerDependency(entry, context);\n });\n};\nconst deserializeAws_json1_1ContainerDependency = (output, context) => {\n return {\n condition: smithy_client_1.expectString(output.condition),\n containerName: smithy_client_1.expectString(output.containerName),\n };\n};\nconst deserializeAws_json1_1ContainerInstance = (output, context) => {\n return {\n agentConnected: smithy_client_1.expectBoolean(output.agentConnected),\n agentUpdateStatus: smithy_client_1.expectString(output.agentUpdateStatus),\n attachments: output.attachments !== undefined && output.attachments !== null\n ? deserializeAws_json1_1Attachments(output.attachments, context)\n : undefined,\n attributes: output.attributes !== undefined && output.attributes !== null\n ? deserializeAws_json1_1Attributes(output.attributes, context)\n : undefined,\n capacityProviderName: smithy_client_1.expectString(output.capacityProviderName),\n containerInstanceArn: smithy_client_1.expectString(output.containerInstanceArn),\n ec2InstanceId: smithy_client_1.expectString(output.ec2InstanceId),\n pendingTasksCount: smithy_client_1.expectInt32(output.pendingTasksCount),\n registeredAt: output.registeredAt !== undefined && output.registeredAt !== null\n ? smithy_client_1.expectNonNull(smithy_client_1.parseEpochTimestamp(smithy_client_1.expectNumber(output.registeredAt)))\n : undefined,\n registeredResources: output.registeredResources !== undefined && output.registeredResources !== null\n ? deserializeAws_json1_1Resources(output.registeredResources, context)\n : undefined,\n remainingResources: output.remainingResources !== undefined && output.remainingResources !== null\n ? deserializeAws_json1_1Resources(output.remainingResources, context)\n : undefined,\n runningTasksCount: smithy_client_1.expectInt32(output.runningTasksCount),\n status: smithy_client_1.expectString(output.status),\n statusReason: smithy_client_1.expectString(output.statusReason),\n tags: output.tags !== undefined && output.tags !== null ? deserializeAws_json1_1Tags(output.tags, context) : undefined,\n version: smithy_client_1.expectLong(output.version),\n versionInfo: output.versionInfo !== undefined && output.versionInfo !== null\n ? deserializeAws_json1_1VersionInfo(output.versionInfo, context)\n : undefined,\n };\n};\nconst deserializeAws_json1_1ContainerInstances = (output, context) => {\n return (output || [])\n .filter((e) => e != null)\n .map((entry) => {\n if (entry === null) {\n return null;\n }\n return deserializeAws_json1_1ContainerInstance(entry, context);\n });\n};\nconst deserializeAws_json1_1ContainerOverride = (output, context) => {\n return {\n command: output.command !== undefined && output.command !== null\n ? deserializeAws_json1_1StringList(output.command, context)\n : undefined,\n cpu: smithy_client_1.expectInt32(output.cpu),\n environment: output.environment !== undefined && output.environment !== null\n ? deserializeAws_json1_1EnvironmentVariables(output.environment, context)\n : undefined,\n environmentFiles: output.environmentFiles !== undefined && output.environmentFiles !== null\n ? deserializeAws_json1_1EnvironmentFiles(output.environmentFiles, context)\n : undefined,\n memory: smithy_client_1.expectInt32(output.memory),\n memoryReservation: smithy_client_1.expectInt32(output.memoryReservation),\n name: smithy_client_1.expectString(output.name),\n resourceRequirements: output.resourceRequirements !== undefined && output.resourceRequirements !== null\n ? deserializeAws_json1_1ResourceRequirements(output.resourceRequirements, context)\n : undefined,\n };\n};\nconst deserializeAws_json1_1ContainerOverrides = (output, context) => {\n return (output || [])\n .filter((e) => e != null)\n .map((entry) => {\n if (entry === null) {\n return null;\n }\n return deserializeAws_json1_1ContainerOverride(entry, context);\n });\n};\nconst deserializeAws_json1_1Containers = (output, context) => {\n return (output || [])\n .filter((e) => e != null)\n .map((entry) => {\n if (entry === null) {\n return null;\n }\n return deserializeAws_json1_1Container(entry, context);\n });\n};\nconst deserializeAws_json1_1CreateCapacityProviderResponse = (output, context) => {\n return {\n capacityProvider: output.capacityProvider !== undefined && output.capacityProvider !== null\n ? deserializeAws_json1_1CapacityProvider(output.capacityProvider, context)\n : undefined,\n };\n};\nconst deserializeAws_json1_1CreateClusterResponse = (output, context) => {\n return {\n cluster: output.cluster !== undefined && output.cluster !== null\n ? deserializeAws_json1_1Cluster(output.cluster, context)\n : undefined,\n };\n};\nconst deserializeAws_json1_1CreateServiceResponse = (output, context) => {\n return {\n service: output.service !== undefined && output.service !== null\n ? deserializeAws_json1_1Service(output.service, context)\n : undefined,\n };\n};\nconst deserializeAws_json1_1CreateTaskSetResponse = (output, context) => {\n return {\n taskSet: output.taskSet !== undefined && output.taskSet !== null\n ? deserializeAws_json1_1TaskSet(output.taskSet, context)\n : undefined,\n };\n};\nconst deserializeAws_json1_1DeleteAccountSettingResponse = (output, context) => {\n return {\n setting: output.setting !== undefined && output.setting !== null\n ? deserializeAws_json1_1Setting(output.setting, context)\n : undefined,\n };\n};\nconst deserializeAws_json1_1DeleteAttributesResponse = (output, context) => {\n return {\n attributes: output.attributes !== undefined && output.attributes !== null\n ? deserializeAws_json1_1Attributes(output.attributes, context)\n : undefined,\n };\n};\nconst deserializeAws_json1_1DeleteCapacityProviderResponse = (output, context) => {\n return {\n capacityProvider: output.capacityProvider !== undefined && output.capacityProvider !== null\n ? deserializeAws_json1_1CapacityProvider(output.capacityProvider, context)\n : undefined,\n };\n};\nconst deserializeAws_json1_1DeleteClusterResponse = (output, context) => {\n return {\n cluster: output.cluster !== undefined && output.cluster !== null\n ? deserializeAws_json1_1Cluster(output.cluster, context)\n : undefined,\n };\n};\nconst deserializeAws_json1_1DeleteServiceResponse = (output, context) => {\n return {\n service: output.service !== undefined && output.service !== null\n ? deserializeAws_json1_1Service(output.service, context)\n : undefined,\n };\n};\nconst deserializeAws_json1_1DeleteTaskSetResponse = (output, context) => {\n return {\n taskSet: output.taskSet !== undefined && output.taskSet !== null\n ? deserializeAws_json1_1TaskSet(output.taskSet, context)\n : undefined,\n };\n};\nconst deserializeAws_json1_1Deployment = (output, context) => {\n return {\n capacityProviderStrategy: output.capacityProviderStrategy !== undefined && output.capacityProviderStrategy !== null\n ? deserializeAws_json1_1CapacityProviderStrategy(output.capacityProviderStrategy, context)\n : undefined,\n createdAt: output.createdAt !== undefined && output.createdAt !== null\n ? smithy_client_1.expectNonNull(smithy_client_1.parseEpochTimestamp(smithy_client_1.expectNumber(output.createdAt)))\n : undefined,\n desiredCount: smithy_client_1.expectInt32(output.desiredCount),\n failedTasks: smithy_client_1.expectInt32(output.failedTasks),\n id: smithy_client_1.expectString(output.id),\n launchType: smithy_client_1.expectString(output.launchType),\n networkConfiguration: output.networkConfiguration !== undefined && output.networkConfiguration !== null\n ? deserializeAws_json1_1NetworkConfiguration(output.networkConfiguration, context)\n : undefined,\n pendingCount: smithy_client_1.expectInt32(output.pendingCount),\n platformVersion: smithy_client_1.expectString(output.platformVersion),\n rolloutState: smithy_client_1.expectString(output.rolloutState),\n rolloutStateReason: smithy_client_1.expectString(output.rolloutStateReason),\n runningCount: smithy_client_1.expectInt32(output.runningCount),\n status: smithy_client_1.expectString(output.status),\n taskDefinition: smithy_client_1.expectString(output.taskDefinition),\n updatedAt: output.updatedAt !== undefined && output.updatedAt !== null\n ? smithy_client_1.expectNonNull(smithy_client_1.parseEpochTimestamp(smithy_client_1.expectNumber(output.updatedAt)))\n : undefined,\n };\n};\nconst deserializeAws_json1_1DeploymentCircuitBreaker = (output, context) => {\n return {\n enable: smithy_client_1.expectBoolean(output.enable),\n rollback: smithy_client_1.expectBoolean(output.rollback),\n };\n};\nconst deserializeAws_json1_1DeploymentConfiguration = (output, context) => {\n return {\n deploymentCircuitBreaker: output.deploymentCircuitBreaker !== undefined && output.deploymentCircuitBreaker !== null\n ? deserializeAws_json1_1DeploymentCircuitBreaker(output.deploymentCircuitBreaker, context)\n : undefined,\n maximumPercent: smithy_client_1.expectInt32(output.maximumPercent),\n minimumHealthyPercent: smithy_client_1.expectInt32(output.minimumHealthyPercent),\n };\n};\nconst deserializeAws_json1_1DeploymentController = (output, context) => {\n return {\n type: smithy_client_1.expectString(output.type),\n };\n};\nconst deserializeAws_json1_1Deployments = (output, context) => {\n return (output || [])\n .filter((e) => e != null)\n .map((entry) => {\n if (entry === null) {\n return null;\n }\n return deserializeAws_json1_1Deployment(entry, context);\n });\n};\nconst deserializeAws_json1_1DeregisterContainerInstanceResponse = (output, context) => {\n return {\n containerInstance: output.containerInstance !== undefined && output.containerInstance !== null\n ? deserializeAws_json1_1ContainerInstance(output.containerInstance, context)\n : undefined,\n };\n};\nconst deserializeAws_json1_1DeregisterTaskDefinitionResponse = (output, context) => {\n return {\n taskDefinition: output.taskDefinition !== undefined && output.taskDefinition !== null\n ? deserializeAws_json1_1TaskDefinition(output.taskDefinition, context)\n : undefined,\n };\n};\nconst deserializeAws_json1_1DescribeCapacityProvidersResponse = (output, context) => {\n return {\n capacityProviders: output.capacityProviders !== undefined && output.capacityProviders !== null\n ? deserializeAws_json1_1CapacityProviders(output.capacityProviders, context)\n : undefined,\n failures: output.failures !== undefined && output.failures !== null\n ? deserializeAws_json1_1Failures(output.failures, context)\n : undefined,\n nextToken: smithy_client_1.expectString(output.nextToken),\n };\n};\nconst deserializeAws_json1_1DescribeClustersResponse = (output, context) => {\n return {\n clusters: output.clusters !== undefined && output.clusters !== null\n ? deserializeAws_json1_1Clusters(output.clusters, context)\n : undefined,\n failures: output.failures !== undefined && output.failures !== null\n ? deserializeAws_json1_1Failures(output.failures, context)\n : undefined,\n };\n};\nconst deserializeAws_json1_1DescribeContainerInstancesResponse = (output, context) => {\n return {\n containerInstances: output.containerInstances !== undefined && output.containerInstances !== null\n ? deserializeAws_json1_1ContainerInstances(output.containerInstances, context)\n : undefined,\n failures: output.failures !== undefined && output.failures !== null\n ? deserializeAws_json1_1Failures(output.failures, context)\n : undefined,\n };\n};\nconst deserializeAws_json1_1DescribeServicesResponse = (output, context) => {\n return {\n failures: output.failures !== undefined && output.failures !== null\n ? deserializeAws_json1_1Failures(output.failures, context)\n : undefined,\n services: output.services !== undefined && output.services !== null\n ? deserializeAws_json1_1Services(output.services, context)\n : undefined,\n };\n};\nconst deserializeAws_json1_1DescribeTaskDefinitionResponse = (output, context) => {\n return {\n tags: output.tags !== undefined && output.tags !== null ? deserializeAws_json1_1Tags(output.tags, context) : undefined,\n taskDefinition: output.taskDefinition !== undefined && output.taskDefinition !== null\n ? deserializeAws_json1_1TaskDefinition(output.taskDefinition, context)\n : undefined,\n };\n};\nconst deserializeAws_json1_1DescribeTaskSetsResponse = (output, context) => {\n return {\n failures: output.failures !== undefined && output.failures !== null\n ? deserializeAws_json1_1Failures(output.failures, context)\n : undefined,\n taskSets: output.taskSets !== undefined && output.taskSets !== null\n ? deserializeAws_json1_1TaskSets(output.taskSets, context)\n : undefined,\n };\n};\nconst deserializeAws_json1_1DescribeTasksResponse = (output, context) => {\n return {\n failures: output.failures !== undefined && output.failures !== null\n ? deserializeAws_json1_1Failures(output.failures, context)\n : undefined,\n tasks: output.tasks !== undefined && output.tasks !== null\n ? deserializeAws_json1_1Tasks(output.tasks, context)\n : undefined,\n };\n};\nconst deserializeAws_json1_1Device = (output, context) => {\n return {\n containerPath: smithy_client_1.expectString(output.containerPath),\n hostPath: smithy_client_1.expectString(output.hostPath),\n permissions: output.permissions !== undefined && output.permissions !== null\n ? deserializeAws_json1_1DeviceCgroupPermissions(output.permissions, context)\n : undefined,\n };\n};\nconst deserializeAws_json1_1DeviceCgroupPermissions = (output, context) => {\n return (output || [])\n .filter((e) => e != null)\n .map((entry) => {\n if (entry === null) {\n return null;\n }\n return smithy_client_1.expectString(entry);\n });\n};\nconst deserializeAws_json1_1DevicesList = (output, context) => {\n return (output || [])\n .filter((e) => e != null)\n .map((entry) => {\n if (entry === null) {\n return null;\n }\n return deserializeAws_json1_1Device(entry, context);\n });\n};\nconst deserializeAws_json1_1DiscoverPollEndpointResponse = (output, context) => {\n return {\n endpoint: smithy_client_1.expectString(output.endpoint),\n telemetryEndpoint: smithy_client_1.expectString(output.telemetryEndpoint),\n };\n};\nconst deserializeAws_json1_1DockerLabelsMap = (output, context) => {\n return Object.entries(output).reduce((acc, [key, value]) => {\n if (value === null) {\n return acc;\n }\n return {\n ...acc,\n [key]: smithy_client_1.expectString(value),\n };\n }, {});\n};\nconst deserializeAws_json1_1DockerVolumeConfiguration = (output, context) => {\n return {\n autoprovision: smithy_client_1.expectBoolean(output.autoprovision),\n driver: smithy_client_1.expectString(output.driver),\n driverOpts: output.driverOpts !== undefined && output.driverOpts !== null\n ? deserializeAws_json1_1StringMap(output.driverOpts, context)\n : undefined,\n labels: output.labels !== undefined && output.labels !== null\n ? deserializeAws_json1_1StringMap(output.labels, context)\n : undefined,\n scope: smithy_client_1.expectString(output.scope),\n };\n};\nconst deserializeAws_json1_1EFSAuthorizationConfig = (output, context) => {\n return {\n accessPointId: smithy_client_1.expectString(output.accessPointId),\n iam: smithy_client_1.expectString(output.iam),\n };\n};\nconst deserializeAws_json1_1EFSVolumeConfiguration = (output, context) => {\n return {\n authorizationConfig: output.authorizationConfig !== undefined && output.authorizationConfig !== null\n ? deserializeAws_json1_1EFSAuthorizationConfig(output.authorizationConfig, context)\n : undefined,\n fileSystemId: smithy_client_1.expectString(output.fileSystemId),\n rootDirectory: smithy_client_1.expectString(output.rootDirectory),\n transitEncryption: smithy_client_1.expectString(output.transitEncryption),\n transitEncryptionPort: smithy_client_1.expectInt32(output.transitEncryptionPort),\n };\n};\nconst deserializeAws_json1_1EnvironmentFile = (output, context) => {\n return {\n type: smithy_client_1.expectString(output.type),\n value: smithy_client_1.expectString(output.value),\n };\n};\nconst deserializeAws_json1_1EnvironmentFiles = (output, context) => {\n return (output || [])\n .filter((e) => e != null)\n .map((entry) => {\n if (entry === null) {\n return null;\n }\n return deserializeAws_json1_1EnvironmentFile(entry, context);\n });\n};\nconst deserializeAws_json1_1EnvironmentVariables = (output, context) => {\n return (output || [])\n .filter((e) => e != null)\n .map((entry) => {\n if (entry === null) {\n return null;\n }\n return deserializeAws_json1_1KeyValuePair(entry, context);\n });\n};\nconst deserializeAws_json1_1EphemeralStorage = (output, context) => {\n return {\n sizeInGiB: smithy_client_1.expectInt32(output.sizeInGiB),\n };\n};\nconst deserializeAws_json1_1ExecuteCommandConfiguration = (output, context) => {\n return {\n kmsKeyId: smithy_client_1.expectString(output.kmsKeyId),\n logConfiguration: output.logConfiguration !== undefined && output.logConfiguration !== null\n ? deserializeAws_json1_1ExecuteCommandLogConfiguration(output.logConfiguration, context)\n : undefined,\n logging: smithy_client_1.expectString(output.logging),\n };\n};\nconst deserializeAws_json1_1ExecuteCommandLogConfiguration = (output, context) => {\n return {\n cloudWatchEncryptionEnabled: smithy_client_1.expectBoolean(output.cloudWatchEncryptionEnabled),\n cloudWatchLogGroupName: smithy_client_1.expectString(output.cloudWatchLogGroupName),\n s3BucketName: smithy_client_1.expectString(output.s3BucketName),\n s3EncryptionEnabled: smithy_client_1.expectBoolean(output.s3EncryptionEnabled),\n s3KeyPrefix: smithy_client_1.expectString(output.s3KeyPrefix),\n };\n};\nconst deserializeAws_json1_1ExecuteCommandResponse = (output, context) => {\n return {\n clusterArn: smithy_client_1.expectString(output.clusterArn),\n containerArn: smithy_client_1.expectString(output.containerArn),\n containerName: smithy_client_1.expectString(output.containerName),\n interactive: smithy_client_1.expectBoolean(output.interactive),\n session: output.session !== undefined && output.session !== null\n ? deserializeAws_json1_1Session(output.session, context)\n : undefined,\n taskArn: smithy_client_1.expectString(output.taskArn),\n };\n};\nconst deserializeAws_json1_1Failure = (output, context) => {\n return {\n arn: smithy_client_1.expectString(output.arn),\n detail: smithy_client_1.expectString(output.detail),\n reason: smithy_client_1.expectString(output.reason),\n };\n};\nconst deserializeAws_json1_1Failures = (output, context) => {\n return (output || [])\n .filter((e) => e != null)\n .map((entry) => {\n if (entry === null) {\n return null;\n }\n return deserializeAws_json1_1Failure(entry, context);\n });\n};\nconst deserializeAws_json1_1FirelensConfiguration = (output, context) => {\n return {\n options: output.options !== undefined && output.options !== null\n ? deserializeAws_json1_1FirelensConfigurationOptionsMap(output.options, context)\n : undefined,\n type: smithy_client_1.expectString(output.type),\n };\n};\nconst deserializeAws_json1_1FirelensConfigurationOptionsMap = (output, context) => {\n return Object.entries(output).reduce((acc, [key, value]) => {\n if (value === null) {\n return acc;\n }\n return {\n ...acc,\n [key]: smithy_client_1.expectString(value),\n };\n }, {});\n};\nconst deserializeAws_json1_1FSxWindowsFileServerAuthorizationConfig = (output, context) => {\n return {\n credentialsParameter: smithy_client_1.expectString(output.credentialsParameter),\n domain: smithy_client_1.expectString(output.domain),\n };\n};\nconst deserializeAws_json1_1FSxWindowsFileServerVolumeConfiguration = (output, context) => {\n return {\n authorizationConfig: output.authorizationConfig !== undefined && output.authorizationConfig !== null\n ? deserializeAws_json1_1FSxWindowsFileServerAuthorizationConfig(output.authorizationConfig, context)\n : undefined,\n fileSystemId: smithy_client_1.expectString(output.fileSystemId),\n rootDirectory: smithy_client_1.expectString(output.rootDirectory),\n };\n};\nconst deserializeAws_json1_1GpuIds = (output, context) => {\n return (output || [])\n .filter((e) => e != null)\n .map((entry) => {\n if (entry === null) {\n return null;\n }\n return smithy_client_1.expectString(entry);\n });\n};\nconst deserializeAws_json1_1HealthCheck = (output, context) => {\n return {\n command: output.command !== undefined && output.command !== null\n ? deserializeAws_json1_1StringList(output.command, context)\n : undefined,\n interval: smithy_client_1.expectInt32(output.interval),\n retries: smithy_client_1.expectInt32(output.retries),\n startPeriod: smithy_client_1.expectInt32(output.startPeriod),\n timeout: smithy_client_1.expectInt32(output.timeout),\n };\n};\nconst deserializeAws_json1_1HostEntry = (output, context) => {\n return {\n hostname: smithy_client_1.expectString(output.hostname),\n ipAddress: smithy_client_1.expectString(output.ipAddress),\n };\n};\nconst deserializeAws_json1_1HostEntryList = (output, context) => {\n return (output || [])\n .filter((e) => e != null)\n .map((entry) => {\n if (entry === null) {\n return null;\n }\n return deserializeAws_json1_1HostEntry(entry, context);\n });\n};\nconst deserializeAws_json1_1HostVolumeProperties = (output, context) => {\n return {\n sourcePath: smithy_client_1.expectString(output.sourcePath),\n };\n};\nconst deserializeAws_json1_1InferenceAccelerator = (output, context) => {\n return {\n deviceName: smithy_client_1.expectString(output.deviceName),\n deviceType: smithy_client_1.expectString(output.deviceType),\n };\n};\nconst deserializeAws_json1_1InferenceAcceleratorOverride = (output, context) => {\n return {\n deviceName: smithy_client_1.expectString(output.deviceName),\n deviceType: smithy_client_1.expectString(output.deviceType),\n };\n};\nconst deserializeAws_json1_1InferenceAcceleratorOverrides = (output, context) => {\n return (output || [])\n .filter((e) => e != null)\n .map((entry) => {\n if (entry === null) {\n return null;\n }\n return deserializeAws_json1_1InferenceAcceleratorOverride(entry, context);\n });\n};\nconst deserializeAws_json1_1InferenceAccelerators = (output, context) => {\n return (output || [])\n .filter((e) => e != null)\n .map((entry) => {\n if (entry === null) {\n return null;\n }\n return deserializeAws_json1_1InferenceAccelerator(entry, context);\n });\n};\nconst deserializeAws_json1_1InvalidParameterException = (output, context) => {\n return {\n message: smithy_client_1.expectString(output.message),\n };\n};\nconst deserializeAws_json1_1KernelCapabilities = (output, context) => {\n return {\n add: output.add !== undefined && output.add !== null\n ? deserializeAws_json1_1StringList(output.add, context)\n : undefined,\n drop: output.drop !== undefined && output.drop !== null\n ? deserializeAws_json1_1StringList(output.drop, context)\n : undefined,\n };\n};\nconst deserializeAws_json1_1KeyValuePair = (output, context) => {\n return {\n name: smithy_client_1.expectString(output.name),\n value: smithy_client_1.expectString(output.value),\n };\n};\nconst deserializeAws_json1_1LimitExceededException = (output, context) => {\n return {\n message: smithy_client_1.expectString(output.message),\n };\n};\nconst deserializeAws_json1_1LinuxParameters = (output, context) => {\n return {\n capabilities: output.capabilities !== undefined && output.capabilities !== null\n ? deserializeAws_json1_1KernelCapabilities(output.capabilities, context)\n : undefined,\n devices: output.devices !== undefined && output.devices !== null\n ? deserializeAws_json1_1DevicesList(output.devices, context)\n : undefined,\n initProcessEnabled: smithy_client_1.expectBoolean(output.initProcessEnabled),\n maxSwap: smithy_client_1.expectInt32(output.maxSwap),\n sharedMemorySize: smithy_client_1.expectInt32(output.sharedMemorySize),\n swappiness: smithy_client_1.expectInt32(output.swappiness),\n tmpfs: output.tmpfs !== undefined && output.tmpfs !== null\n ? deserializeAws_json1_1TmpfsList(output.tmpfs, context)\n : undefined,\n };\n};\nconst deserializeAws_json1_1ListAccountSettingsResponse = (output, context) => {\n return {\n nextToken: smithy_client_1.expectString(output.nextToken),\n settings: output.settings !== undefined && output.settings !== null\n ? deserializeAws_json1_1Settings(output.settings, context)\n : undefined,\n };\n};\nconst deserializeAws_json1_1ListAttributesResponse = (output, context) => {\n return {\n attributes: output.attributes !== undefined && output.attributes !== null\n ? deserializeAws_json1_1Attributes(output.attributes, context)\n : undefined,\n nextToken: smithy_client_1.expectString(output.nextToken),\n };\n};\nconst deserializeAws_json1_1ListClustersResponse = (output, context) => {\n return {\n clusterArns: output.clusterArns !== undefined && output.clusterArns !== null\n ? deserializeAws_json1_1StringList(output.clusterArns, context)\n : undefined,\n nextToken: smithy_client_1.expectString(output.nextToken),\n };\n};\nconst deserializeAws_json1_1ListContainerInstancesResponse = (output, context) => {\n return {\n containerInstanceArns: output.containerInstanceArns !== undefined && output.containerInstanceArns !== null\n ? deserializeAws_json1_1StringList(output.containerInstanceArns, context)\n : undefined,\n nextToken: smithy_client_1.expectString(output.nextToken),\n };\n};\nconst deserializeAws_json1_1ListServicesResponse = (output, context) => {\n return {\n nextToken: smithy_client_1.expectString(output.nextToken),\n serviceArns: output.serviceArns !== undefined && output.serviceArns !== null\n ? deserializeAws_json1_1StringList(output.serviceArns, context)\n : undefined,\n };\n};\nconst deserializeAws_json1_1ListTagsForResourceResponse = (output, context) => {\n return {\n tags: output.tags !== undefined && output.tags !== null ? deserializeAws_json1_1Tags(output.tags, context) : undefined,\n };\n};\nconst deserializeAws_json1_1ListTaskDefinitionFamiliesResponse = (output, context) => {\n return {\n families: output.families !== undefined && output.families !== null\n ? deserializeAws_json1_1StringList(output.families, context)\n : undefined,\n nextToken: smithy_client_1.expectString(output.nextToken),\n };\n};\nconst deserializeAws_json1_1ListTaskDefinitionsResponse = (output, context) => {\n return {\n nextToken: smithy_client_1.expectString(output.nextToken),\n taskDefinitionArns: output.taskDefinitionArns !== undefined && output.taskDefinitionArns !== null\n ? deserializeAws_json1_1StringList(output.taskDefinitionArns, context)\n : undefined,\n };\n};\nconst deserializeAws_json1_1ListTasksResponse = (output, context) => {\n return {\n nextToken: smithy_client_1.expectString(output.nextToken),\n taskArns: output.taskArns !== undefined && output.taskArns !== null\n ? deserializeAws_json1_1StringList(output.taskArns, context)\n : undefined,\n };\n};\nconst deserializeAws_json1_1LoadBalancer = (output, context) => {\n return {\n containerName: smithy_client_1.expectString(output.containerName),\n containerPort: smithy_client_1.expectInt32(output.containerPort),\n loadBalancerName: smithy_client_1.expectString(output.loadBalancerName),\n targetGroupArn: smithy_client_1.expectString(output.targetGroupArn),\n };\n};\nconst deserializeAws_json1_1LoadBalancers = (output, context) => {\n return (output || [])\n .filter((e) => e != null)\n .map((entry) => {\n if (entry === null) {\n return null;\n }\n return deserializeAws_json1_1LoadBalancer(entry, context);\n });\n};\nconst deserializeAws_json1_1LogConfiguration = (output, context) => {\n return {\n logDriver: smithy_client_1.expectString(output.logDriver),\n options: output.options !== undefined && output.options !== null\n ? deserializeAws_json1_1LogConfigurationOptionsMap(output.options, context)\n : undefined,\n secretOptions: output.secretOptions !== undefined && output.secretOptions !== null\n ? deserializeAws_json1_1SecretList(output.secretOptions, context)\n : undefined,\n };\n};\nconst deserializeAws_json1_1LogConfigurationOptionsMap = (output, context) => {\n return Object.entries(output).reduce((acc, [key, value]) => {\n if (value === null) {\n return acc;\n }\n return {\n ...acc,\n [key]: smithy_client_1.expectString(value),\n };\n }, {});\n};\nconst deserializeAws_json1_1ManagedAgent = (output, context) => {\n return {\n lastStartedAt: output.lastStartedAt !== undefined && output.lastStartedAt !== null\n ? smithy_client_1.expectNonNull(smithy_client_1.parseEpochTimestamp(smithy_client_1.expectNumber(output.lastStartedAt)))\n : undefined,\n lastStatus: smithy_client_1.expectString(output.lastStatus),\n name: smithy_client_1.expectString(output.name),\n reason: smithy_client_1.expectString(output.reason),\n };\n};\nconst deserializeAws_json1_1ManagedAgents = (output, context) => {\n return (output || [])\n .filter((e) => e != null)\n .map((entry) => {\n if (entry === null) {\n return null;\n }\n return deserializeAws_json1_1ManagedAgent(entry, context);\n });\n};\nconst deserializeAws_json1_1ManagedScaling = (output, context) => {\n return {\n instanceWarmupPeriod: smithy_client_1.expectInt32(output.instanceWarmupPeriod),\n maximumScalingStepSize: smithy_client_1.expectInt32(output.maximumScalingStepSize),\n minimumScalingStepSize: smithy_client_1.expectInt32(output.minimumScalingStepSize),\n status: smithy_client_1.expectString(output.status),\n targetCapacity: smithy_client_1.expectInt32(output.targetCapacity),\n };\n};\nconst deserializeAws_json1_1MissingVersionException = (output, context) => {\n return {\n message: smithy_client_1.expectString(output.message),\n };\n};\nconst deserializeAws_json1_1MountPoint = (output, context) => {\n return {\n containerPath: smithy_client_1.expectString(output.containerPath),\n readOnly: smithy_client_1.expectBoolean(output.readOnly),\n sourceVolume: smithy_client_1.expectString(output.sourceVolume),\n };\n};\nconst deserializeAws_json1_1MountPointList = (output, context) => {\n return (output || [])\n .filter((e) => e != null)\n .map((entry) => {\n if (entry === null) {\n return null;\n }\n return deserializeAws_json1_1MountPoint(entry, context);\n });\n};\nconst deserializeAws_json1_1NetworkBinding = (output, context) => {\n return {\n bindIP: smithy_client_1.expectString(output.bindIP),\n containerPort: smithy_client_1.expectInt32(output.containerPort),\n hostPort: smithy_client_1.expectInt32(output.hostPort),\n protocol: smithy_client_1.expectString(output.protocol),\n };\n};\nconst deserializeAws_json1_1NetworkBindings = (output, context) => {\n return (output || [])\n .filter((e) => e != null)\n .map((entry) => {\n if (entry === null) {\n return null;\n }\n return deserializeAws_json1_1NetworkBinding(entry, context);\n });\n};\nconst deserializeAws_json1_1NetworkConfiguration = (output, context) => {\n return {\n awsvpcConfiguration: output.awsvpcConfiguration !== undefined && output.awsvpcConfiguration !== null\n ? deserializeAws_json1_1AwsVpcConfiguration(output.awsvpcConfiguration, context)\n : undefined,\n };\n};\nconst deserializeAws_json1_1NetworkInterface = (output, context) => {\n return {\n attachmentId: smithy_client_1.expectString(output.attachmentId),\n ipv6Address: smithy_client_1.expectString(output.ipv6Address),\n privateIpv4Address: smithy_client_1.expectString(output.privateIpv4Address),\n };\n};\nconst deserializeAws_json1_1NetworkInterfaces = (output, context) => {\n return (output || [])\n .filter((e) => e != null)\n .map((entry) => {\n if (entry === null) {\n return null;\n }\n return deserializeAws_json1_1NetworkInterface(entry, context);\n });\n};\nconst deserializeAws_json1_1NoUpdateAvailableException = (output, context) => {\n return {\n message: smithy_client_1.expectString(output.message),\n };\n};\nconst deserializeAws_json1_1PlacementConstraint = (output, context) => {\n return {\n expression: smithy_client_1.expectString(output.expression),\n type: smithy_client_1.expectString(output.type),\n };\n};\nconst deserializeAws_json1_1PlacementConstraints = (output, context) => {\n return (output || [])\n .filter((e) => e != null)\n .map((entry) => {\n if (entry === null) {\n return null;\n }\n return deserializeAws_json1_1PlacementConstraint(entry, context);\n });\n};\nconst deserializeAws_json1_1PlacementStrategies = (output, context) => {\n return (output || [])\n .filter((e) => e != null)\n .map((entry) => {\n if (entry === null) {\n return null;\n }\n return deserializeAws_json1_1PlacementStrategy(entry, context);\n });\n};\nconst deserializeAws_json1_1PlacementStrategy = (output, context) => {\n return {\n field: smithy_client_1.expectString(output.field),\n type: smithy_client_1.expectString(output.type),\n };\n};\nconst deserializeAws_json1_1PlatformTaskDefinitionIncompatibilityException = (output, context) => {\n return {\n message: smithy_client_1.expectString(output.message),\n };\n};\nconst deserializeAws_json1_1PlatformUnknownException = (output, context) => {\n return {\n message: smithy_client_1.expectString(output.message),\n };\n};\nconst deserializeAws_json1_1PortMapping = (output, context) => {\n return {\n containerPort: smithy_client_1.expectInt32(output.containerPort),\n hostPort: smithy_client_1.expectInt32(output.hostPort),\n protocol: smithy_client_1.expectString(output.protocol),\n };\n};\nconst deserializeAws_json1_1PortMappingList = (output, context) => {\n return (output || [])\n .filter((e) => e != null)\n .map((entry) => {\n if (entry === null) {\n return null;\n }\n return deserializeAws_json1_1PortMapping(entry, context);\n });\n};\nconst deserializeAws_json1_1ProxyConfiguration = (output, context) => {\n return {\n containerName: smithy_client_1.expectString(output.containerName),\n properties: output.properties !== undefined && output.properties !== null\n ? deserializeAws_json1_1ProxyConfigurationProperties(output.properties, context)\n : undefined,\n type: smithy_client_1.expectString(output.type),\n };\n};\nconst deserializeAws_json1_1ProxyConfigurationProperties = (output, context) => {\n return (output || [])\n .filter((e) => e != null)\n .map((entry) => {\n if (entry === null) {\n return null;\n }\n return deserializeAws_json1_1KeyValuePair(entry, context);\n });\n};\nconst deserializeAws_json1_1PutAccountSettingDefaultResponse = (output, context) => {\n return {\n setting: output.setting !== undefined && output.setting !== null\n ? deserializeAws_json1_1Setting(output.setting, context)\n : undefined,\n };\n};\nconst deserializeAws_json1_1PutAccountSettingResponse = (output, context) => {\n return {\n setting: output.setting !== undefined && output.setting !== null\n ? deserializeAws_json1_1Setting(output.setting, context)\n : undefined,\n };\n};\nconst deserializeAws_json1_1PutAttributesResponse = (output, context) => {\n return {\n attributes: output.attributes !== undefined && output.attributes !== null\n ? deserializeAws_json1_1Attributes(output.attributes, context)\n : undefined,\n };\n};\nconst deserializeAws_json1_1PutClusterCapacityProvidersResponse = (output, context) => {\n return {\n cluster: output.cluster !== undefined && output.cluster !== null\n ? deserializeAws_json1_1Cluster(output.cluster, context)\n : undefined,\n };\n};\nconst deserializeAws_json1_1RegisterContainerInstanceResponse = (output, context) => {\n return {\n containerInstance: output.containerInstance !== undefined && output.containerInstance !== null\n ? deserializeAws_json1_1ContainerInstance(output.containerInstance, context)\n : undefined,\n };\n};\nconst deserializeAws_json1_1RegisterTaskDefinitionResponse = (output, context) => {\n return {\n tags: output.tags !== undefined && output.tags !== null ? deserializeAws_json1_1Tags(output.tags, context) : undefined,\n taskDefinition: output.taskDefinition !== undefined && output.taskDefinition !== null\n ? deserializeAws_json1_1TaskDefinition(output.taskDefinition, context)\n : undefined,\n };\n};\nconst deserializeAws_json1_1RepositoryCredentials = (output, context) => {\n return {\n credentialsParameter: smithy_client_1.expectString(output.credentialsParameter),\n };\n};\nconst deserializeAws_json1_1RequiresAttributes = (output, context) => {\n return (output || [])\n .filter((e) => e != null)\n .map((entry) => {\n if (entry === null) {\n return null;\n }\n return deserializeAws_json1_1Attribute(entry, context);\n });\n};\nconst deserializeAws_json1_1Resource = (output, context) => {\n return {\n doubleValue: smithy_client_1.limitedParseDouble(output.doubleValue),\n integerValue: smithy_client_1.expectInt32(output.integerValue),\n longValue: smithy_client_1.expectLong(output.longValue),\n name: smithy_client_1.expectString(output.name),\n stringSetValue: output.stringSetValue !== undefined && output.stringSetValue !== null\n ? deserializeAws_json1_1StringList(output.stringSetValue, context)\n : undefined,\n type: smithy_client_1.expectString(output.type),\n };\n};\nconst deserializeAws_json1_1ResourceInUseException = (output, context) => {\n return {\n message: smithy_client_1.expectString(output.message),\n };\n};\nconst deserializeAws_json1_1ResourceNotFoundException = (output, context) => {\n return {\n message: smithy_client_1.expectString(output.message),\n };\n};\nconst deserializeAws_json1_1ResourceRequirement = (output, context) => {\n return {\n type: smithy_client_1.expectString(output.type),\n value: smithy_client_1.expectString(output.value),\n };\n};\nconst deserializeAws_json1_1ResourceRequirements = (output, context) => {\n return (output || [])\n .filter((e) => e != null)\n .map((entry) => {\n if (entry === null) {\n return null;\n }\n return deserializeAws_json1_1ResourceRequirement(entry, context);\n });\n};\nconst deserializeAws_json1_1Resources = (output, context) => {\n return (output || [])\n .filter((e) => e != null)\n .map((entry) => {\n if (entry === null) {\n return null;\n }\n return deserializeAws_json1_1Resource(entry, context);\n });\n};\nconst deserializeAws_json1_1RunTaskResponse = (output, context) => {\n return {\n failures: output.failures !== undefined && output.failures !== null\n ? deserializeAws_json1_1Failures(output.failures, context)\n : undefined,\n tasks: output.tasks !== undefined && output.tasks !== null\n ? deserializeAws_json1_1Tasks(output.tasks, context)\n : undefined,\n };\n};\nconst deserializeAws_json1_1Scale = (output, context) => {\n return {\n unit: smithy_client_1.expectString(output.unit),\n value: smithy_client_1.limitedParseDouble(output.value),\n };\n};\nconst deserializeAws_json1_1Secret = (output, context) => {\n return {\n name: smithy_client_1.expectString(output.name),\n valueFrom: smithy_client_1.expectString(output.valueFrom),\n };\n};\nconst deserializeAws_json1_1SecretList = (output, context) => {\n return (output || [])\n .filter((e) => e != null)\n .map((entry) => {\n if (entry === null) {\n return null;\n }\n return deserializeAws_json1_1Secret(entry, context);\n });\n};\nconst deserializeAws_json1_1ServerException = (output, context) => {\n return {\n message: smithy_client_1.expectString(output.message),\n };\n};\nconst deserializeAws_json1_1Service = (output, context) => {\n return {\n capacityProviderStrategy: output.capacityProviderStrategy !== undefined && output.capacityProviderStrategy !== null\n ? deserializeAws_json1_1CapacityProviderStrategy(output.capacityProviderStrategy, context)\n : undefined,\n clusterArn: smithy_client_1.expectString(output.clusterArn),\n createdAt: output.createdAt !== undefined && output.createdAt !== null\n ? smithy_client_1.expectNonNull(smithy_client_1.parseEpochTimestamp(smithy_client_1.expectNumber(output.createdAt)))\n : undefined,\n createdBy: smithy_client_1.expectString(output.createdBy),\n deploymentConfiguration: output.deploymentConfiguration !== undefined && output.deploymentConfiguration !== null\n ? deserializeAws_json1_1DeploymentConfiguration(output.deploymentConfiguration, context)\n : undefined,\n deploymentController: output.deploymentController !== undefined && output.deploymentController !== null\n ? deserializeAws_json1_1DeploymentController(output.deploymentController, context)\n : undefined,\n deployments: output.deployments !== undefined && output.deployments !== null\n ? deserializeAws_json1_1Deployments(output.deployments, context)\n : undefined,\n desiredCount: smithy_client_1.expectInt32(output.desiredCount),\n enableECSManagedTags: smithy_client_1.expectBoolean(output.enableECSManagedTags),\n enableExecuteCommand: smithy_client_1.expectBoolean(output.enableExecuteCommand),\n events: output.events !== undefined && output.events !== null\n ? deserializeAws_json1_1ServiceEvents(output.events, context)\n : undefined,\n healthCheckGracePeriodSeconds: smithy_client_1.expectInt32(output.healthCheckGracePeriodSeconds),\n launchType: smithy_client_1.expectString(output.launchType),\n loadBalancers: output.loadBalancers !== undefined && output.loadBalancers !== null\n ? deserializeAws_json1_1LoadBalancers(output.loadBalancers, context)\n : undefined,\n networkConfiguration: output.networkConfiguration !== undefined && output.networkConfiguration !== null\n ? deserializeAws_json1_1NetworkConfiguration(output.networkConfiguration, context)\n : undefined,\n pendingCount: smithy_client_1.expectInt32(output.pendingCount),\n placementConstraints: output.placementConstraints !== undefined && output.placementConstraints !== null\n ? deserializeAws_json1_1PlacementConstraints(output.placementConstraints, context)\n : undefined,\n placementStrategy: output.placementStrategy !== undefined && output.placementStrategy !== null\n ? deserializeAws_json1_1PlacementStrategies(output.placementStrategy, context)\n : undefined,\n platformVersion: smithy_client_1.expectString(output.platformVersion),\n propagateTags: smithy_client_1.expectString(output.propagateTags),\n roleArn: smithy_client_1.expectString(output.roleArn),\n runningCount: smithy_client_1.expectInt32(output.runningCount),\n schedulingStrategy: smithy_client_1.expectString(output.schedulingStrategy),\n serviceArn: smithy_client_1.expectString(output.serviceArn),\n serviceName: smithy_client_1.expectString(output.serviceName),\n serviceRegistries: output.serviceRegistries !== undefined && output.serviceRegistries !== null\n ? deserializeAws_json1_1ServiceRegistries(output.serviceRegistries, context)\n : undefined,\n status: smithy_client_1.expectString(output.status),\n tags: output.tags !== undefined && output.tags !== null ? deserializeAws_json1_1Tags(output.tags, context) : undefined,\n taskDefinition: smithy_client_1.expectString(output.taskDefinition),\n taskSets: output.taskSets !== undefined && output.taskSets !== null\n ? deserializeAws_json1_1TaskSets(output.taskSets, context)\n : undefined,\n };\n};\nconst deserializeAws_json1_1ServiceEvent = (output, context) => {\n return {\n createdAt: output.createdAt !== undefined && output.createdAt !== null\n ? smithy_client_1.expectNonNull(smithy_client_1.parseEpochTimestamp(smithy_client_1.expectNumber(output.createdAt)))\n : undefined,\n id: smithy_client_1.expectString(output.id),\n message: smithy_client_1.expectString(output.message),\n };\n};\nconst deserializeAws_json1_1ServiceEvents = (output, context) => {\n return (output || [])\n .filter((e) => e != null)\n .map((entry) => {\n if (entry === null) {\n return null;\n }\n return deserializeAws_json1_1ServiceEvent(entry, context);\n });\n};\nconst deserializeAws_json1_1ServiceNotActiveException = (output, context) => {\n return {\n message: smithy_client_1.expectString(output.message),\n };\n};\nconst deserializeAws_json1_1ServiceNotFoundException = (output, context) => {\n return {\n message: smithy_client_1.expectString(output.message),\n };\n};\nconst deserializeAws_json1_1ServiceRegistries = (output, context) => {\n return (output || [])\n .filter((e) => e != null)\n .map((entry) => {\n if (entry === null) {\n return null;\n }\n return deserializeAws_json1_1ServiceRegistry(entry, context);\n });\n};\nconst deserializeAws_json1_1ServiceRegistry = (output, context) => {\n return {\n containerName: smithy_client_1.expectString(output.containerName),\n containerPort: smithy_client_1.expectInt32(output.containerPort),\n port: smithy_client_1.expectInt32(output.port),\n registryArn: smithy_client_1.expectString(output.registryArn),\n };\n};\nconst deserializeAws_json1_1Services = (output, context) => {\n return (output || [])\n .filter((e) => e != null)\n .map((entry) => {\n if (entry === null) {\n return null;\n }\n return deserializeAws_json1_1Service(entry, context);\n });\n};\nconst deserializeAws_json1_1Session = (output, context) => {\n return {\n sessionId: smithy_client_1.expectString(output.sessionId),\n streamUrl: smithy_client_1.expectString(output.streamUrl),\n tokenValue: smithy_client_1.expectString(output.tokenValue),\n };\n};\nconst deserializeAws_json1_1Setting = (output, context) => {\n return {\n name: smithy_client_1.expectString(output.name),\n principalArn: smithy_client_1.expectString(output.principalArn),\n value: smithy_client_1.expectString(output.value),\n };\n};\nconst deserializeAws_json1_1Settings = (output, context) => {\n return (output || [])\n .filter((e) => e != null)\n .map((entry) => {\n if (entry === null) {\n return null;\n }\n return deserializeAws_json1_1Setting(entry, context);\n });\n};\nconst deserializeAws_json1_1StartTaskResponse = (output, context) => {\n return {\n failures: output.failures !== undefined && output.failures !== null\n ? deserializeAws_json1_1Failures(output.failures, context)\n : undefined,\n tasks: output.tasks !== undefined && output.tasks !== null\n ? deserializeAws_json1_1Tasks(output.tasks, context)\n : undefined,\n };\n};\nconst deserializeAws_json1_1Statistics = (output, context) => {\n return (output || [])\n .filter((e) => e != null)\n .map((entry) => {\n if (entry === null) {\n return null;\n }\n return deserializeAws_json1_1KeyValuePair(entry, context);\n });\n};\nconst deserializeAws_json1_1StopTaskResponse = (output, context) => {\n return {\n task: output.task !== undefined && output.task !== null ? deserializeAws_json1_1Task(output.task, context) : undefined,\n };\n};\nconst deserializeAws_json1_1StringList = (output, context) => {\n return (output || [])\n .filter((e) => e != null)\n .map((entry) => {\n if (entry === null) {\n return null;\n }\n return smithy_client_1.expectString(entry);\n });\n};\nconst deserializeAws_json1_1StringMap = (output, context) => {\n return Object.entries(output).reduce((acc, [key, value]) => {\n if (value === null) {\n return acc;\n }\n return {\n ...acc,\n [key]: smithy_client_1.expectString(value),\n };\n }, {});\n};\nconst deserializeAws_json1_1SubmitAttachmentStateChangesResponse = (output, context) => {\n return {\n acknowledgment: smithy_client_1.expectString(output.acknowledgment),\n };\n};\nconst deserializeAws_json1_1SubmitContainerStateChangeResponse = (output, context) => {\n return {\n acknowledgment: smithy_client_1.expectString(output.acknowledgment),\n };\n};\nconst deserializeAws_json1_1SubmitTaskStateChangeResponse = (output, context) => {\n return {\n acknowledgment: smithy_client_1.expectString(output.acknowledgment),\n };\n};\nconst deserializeAws_json1_1SystemControl = (output, context) => {\n return {\n namespace: smithy_client_1.expectString(output.namespace),\n value: smithy_client_1.expectString(output.value),\n };\n};\nconst deserializeAws_json1_1SystemControls = (output, context) => {\n return (output || [])\n .filter((e) => e != null)\n .map((entry) => {\n if (entry === null) {\n return null;\n }\n return deserializeAws_json1_1SystemControl(entry, context);\n });\n};\nconst deserializeAws_json1_1Tag = (output, context) => {\n return {\n key: smithy_client_1.expectString(output.key),\n value: smithy_client_1.expectString(output.value),\n };\n};\nconst deserializeAws_json1_1TagResourceResponse = (output, context) => {\n return {};\n};\nconst deserializeAws_json1_1Tags = (output, context) => {\n return (output || [])\n .filter((e) => e != null)\n .map((entry) => {\n if (entry === null) {\n return null;\n }\n return deserializeAws_json1_1Tag(entry, context);\n });\n};\nconst deserializeAws_json1_1TargetNotConnectedException = (output, context) => {\n return {\n message: smithy_client_1.expectString(output.message),\n };\n};\nconst deserializeAws_json1_1TargetNotFoundException = (output, context) => {\n return {\n message: smithy_client_1.expectString(output.message),\n };\n};\nconst deserializeAws_json1_1Task = (output, context) => {\n return {\n attachments: output.attachments !== undefined && output.attachments !== null\n ? deserializeAws_json1_1Attachments(output.attachments, context)\n : undefined,\n attributes: output.attributes !== undefined && output.attributes !== null\n ? deserializeAws_json1_1Attributes(output.attributes, context)\n : undefined,\n availabilityZone: smithy_client_1.expectString(output.availabilityZone),\n capacityProviderName: smithy_client_1.expectString(output.capacityProviderName),\n clusterArn: smithy_client_1.expectString(output.clusterArn),\n connectivity: smithy_client_1.expectString(output.connectivity),\n connectivityAt: output.connectivityAt !== undefined && output.connectivityAt !== null\n ? smithy_client_1.expectNonNull(smithy_client_1.parseEpochTimestamp(smithy_client_1.expectNumber(output.connectivityAt)))\n : undefined,\n containerInstanceArn: smithy_client_1.expectString(output.containerInstanceArn),\n containers: output.containers !== undefined && output.containers !== null\n ? deserializeAws_json1_1Containers(output.containers, context)\n : undefined,\n cpu: smithy_client_1.expectString(output.cpu),\n createdAt: output.createdAt !== undefined && output.createdAt !== null\n ? smithy_client_1.expectNonNull(smithy_client_1.parseEpochTimestamp(smithy_client_1.expectNumber(output.createdAt)))\n : undefined,\n desiredStatus: smithy_client_1.expectString(output.desiredStatus),\n enableExecuteCommand: smithy_client_1.expectBoolean(output.enableExecuteCommand),\n ephemeralStorage: output.ephemeralStorage !== undefined && output.ephemeralStorage !== null\n ? deserializeAws_json1_1EphemeralStorage(output.ephemeralStorage, context)\n : undefined,\n executionStoppedAt: output.executionStoppedAt !== undefined && output.executionStoppedAt !== null\n ? smithy_client_1.expectNonNull(smithy_client_1.parseEpochTimestamp(smithy_client_1.expectNumber(output.executionStoppedAt)))\n : undefined,\n group: smithy_client_1.expectString(output.group),\n healthStatus: smithy_client_1.expectString(output.healthStatus),\n inferenceAccelerators: output.inferenceAccelerators !== undefined && output.inferenceAccelerators !== null\n ? deserializeAws_json1_1InferenceAccelerators(output.inferenceAccelerators, context)\n : undefined,\n lastStatus: smithy_client_1.expectString(output.lastStatus),\n launchType: smithy_client_1.expectString(output.launchType),\n memory: smithy_client_1.expectString(output.memory),\n overrides: output.overrides !== undefined && output.overrides !== null\n ? deserializeAws_json1_1TaskOverride(output.overrides, context)\n : undefined,\n platformVersion: smithy_client_1.expectString(output.platformVersion),\n pullStartedAt: output.pullStartedAt !== undefined && output.pullStartedAt !== null\n ? smithy_client_1.expectNonNull(smithy_client_1.parseEpochTimestamp(smithy_client_1.expectNumber(output.pullStartedAt)))\n : undefined,\n pullStoppedAt: output.pullStoppedAt !== undefined && output.pullStoppedAt !== null\n ? smithy_client_1.expectNonNull(smithy_client_1.parseEpochTimestamp(smithy_client_1.expectNumber(output.pullStoppedAt)))\n : undefined,\n startedAt: output.startedAt !== undefined && output.startedAt !== null\n ? smithy_client_1.expectNonNull(smithy_client_1.parseEpochTimestamp(smithy_client_1.expectNumber(output.startedAt)))\n : undefined,\n startedBy: smithy_client_1.expectString(output.startedBy),\n stopCode: smithy_client_1.expectString(output.stopCode),\n stoppedAt: output.stoppedAt !== undefined && output.stoppedAt !== null\n ? smithy_client_1.expectNonNull(smithy_client_1.parseEpochTimestamp(smithy_client_1.expectNumber(output.stoppedAt)))\n : undefined,\n stoppedReason: smithy_client_1.expectString(output.stoppedReason),\n stoppingAt: output.stoppingAt !== undefined && output.stoppingAt !== null\n ? smithy_client_1.expectNonNull(smithy_client_1.parseEpochTimestamp(smithy_client_1.expectNumber(output.stoppingAt)))\n : undefined,\n tags: output.tags !== undefined && output.tags !== null ? deserializeAws_json1_1Tags(output.tags, context) : undefined,\n taskArn: smithy_client_1.expectString(output.taskArn),\n taskDefinitionArn: smithy_client_1.expectString(output.taskDefinitionArn),\n version: smithy_client_1.expectLong(output.version),\n };\n};\nconst deserializeAws_json1_1TaskDefinition = (output, context) => {\n return {\n compatibilities: output.compatibilities !== undefined && output.compatibilities !== null\n ? deserializeAws_json1_1CompatibilityList(output.compatibilities, context)\n : undefined,\n containerDefinitions: output.containerDefinitions !== undefined && output.containerDefinitions !== null\n ? deserializeAws_json1_1ContainerDefinitions(output.containerDefinitions, context)\n : undefined,\n cpu: smithy_client_1.expectString(output.cpu),\n deregisteredAt: output.deregisteredAt !== undefined && output.deregisteredAt !== null\n ? smithy_client_1.expectNonNull(smithy_client_1.parseEpochTimestamp(smithy_client_1.expectNumber(output.deregisteredAt)))\n : undefined,\n ephemeralStorage: output.ephemeralStorage !== undefined && output.ephemeralStorage !== null\n ? deserializeAws_json1_1EphemeralStorage(output.ephemeralStorage, context)\n : undefined,\n executionRoleArn: smithy_client_1.expectString(output.executionRoleArn),\n family: smithy_client_1.expectString(output.family),\n inferenceAccelerators: output.inferenceAccelerators !== undefined && output.inferenceAccelerators !== null\n ? deserializeAws_json1_1InferenceAccelerators(output.inferenceAccelerators, context)\n : undefined,\n ipcMode: smithy_client_1.expectString(output.ipcMode),\n memory: smithy_client_1.expectString(output.memory),\n networkMode: smithy_client_1.expectString(output.networkMode),\n pidMode: smithy_client_1.expectString(output.pidMode),\n placementConstraints: output.placementConstraints !== undefined && output.placementConstraints !== null\n ? deserializeAws_json1_1TaskDefinitionPlacementConstraints(output.placementConstraints, context)\n : undefined,\n proxyConfiguration: output.proxyConfiguration !== undefined && output.proxyConfiguration !== null\n ? deserializeAws_json1_1ProxyConfiguration(output.proxyConfiguration, context)\n : undefined,\n registeredAt: output.registeredAt !== undefined && output.registeredAt !== null\n ? smithy_client_1.expectNonNull(smithy_client_1.parseEpochTimestamp(smithy_client_1.expectNumber(output.registeredAt)))\n : undefined,\n registeredBy: smithy_client_1.expectString(output.registeredBy),\n requiresAttributes: output.requiresAttributes !== undefined && output.requiresAttributes !== null\n ? deserializeAws_json1_1RequiresAttributes(output.requiresAttributes, context)\n : undefined,\n requiresCompatibilities: output.requiresCompatibilities !== undefined && output.requiresCompatibilities !== null\n ? deserializeAws_json1_1CompatibilityList(output.requiresCompatibilities, context)\n : undefined,\n revision: smithy_client_1.expectInt32(output.revision),\n status: smithy_client_1.expectString(output.status),\n taskDefinitionArn: smithy_client_1.expectString(output.taskDefinitionArn),\n taskRoleArn: smithy_client_1.expectString(output.taskRoleArn),\n volumes: output.volumes !== undefined && output.volumes !== null\n ? deserializeAws_json1_1VolumeList(output.volumes, context)\n : undefined,\n };\n};\nconst deserializeAws_json1_1TaskDefinitionPlacementConstraint = (output, context) => {\n return {\n expression: smithy_client_1.expectString(output.expression),\n type: smithy_client_1.expectString(output.type),\n };\n};\nconst deserializeAws_json1_1TaskDefinitionPlacementConstraints = (output, context) => {\n return (output || [])\n .filter((e) => e != null)\n .map((entry) => {\n if (entry === null) {\n return null;\n }\n return deserializeAws_json1_1TaskDefinitionPlacementConstraint(entry, context);\n });\n};\nconst deserializeAws_json1_1TaskOverride = (output, context) => {\n return {\n containerOverrides: output.containerOverrides !== undefined && output.containerOverrides !== null\n ? deserializeAws_json1_1ContainerOverrides(output.containerOverrides, context)\n : undefined,\n cpu: smithy_client_1.expectString(output.cpu),\n ephemeralStorage: output.ephemeralStorage !== undefined && output.ephemeralStorage !== null\n ? deserializeAws_json1_1EphemeralStorage(output.ephemeralStorage, context)\n : undefined,\n executionRoleArn: smithy_client_1.expectString(output.executionRoleArn),\n inferenceAcceleratorOverrides: output.inferenceAcceleratorOverrides !== undefined && output.inferenceAcceleratorOverrides !== null\n ? deserializeAws_json1_1InferenceAcceleratorOverrides(output.inferenceAcceleratorOverrides, context)\n : undefined,\n memory: smithy_client_1.expectString(output.memory),\n taskRoleArn: smithy_client_1.expectString(output.taskRoleArn),\n };\n};\nconst deserializeAws_json1_1Tasks = (output, context) => {\n return (output || [])\n .filter((e) => e != null)\n .map((entry) => {\n if (entry === null) {\n return null;\n }\n return deserializeAws_json1_1Task(entry, context);\n });\n};\nconst deserializeAws_json1_1TaskSet = (output, context) => {\n return {\n capacityProviderStrategy: output.capacityProviderStrategy !== undefined && output.capacityProviderStrategy !== null\n ? deserializeAws_json1_1CapacityProviderStrategy(output.capacityProviderStrategy, context)\n : undefined,\n clusterArn: smithy_client_1.expectString(output.clusterArn),\n computedDesiredCount: smithy_client_1.expectInt32(output.computedDesiredCount),\n createdAt: output.createdAt !== undefined && output.createdAt !== null\n ? smithy_client_1.expectNonNull(smithy_client_1.parseEpochTimestamp(smithy_client_1.expectNumber(output.createdAt)))\n : undefined,\n externalId: smithy_client_1.expectString(output.externalId),\n id: smithy_client_1.expectString(output.id),\n launchType: smithy_client_1.expectString(output.launchType),\n loadBalancers: output.loadBalancers !== undefined && output.loadBalancers !== null\n ? deserializeAws_json1_1LoadBalancers(output.loadBalancers, context)\n : undefined,\n networkConfiguration: output.networkConfiguration !== undefined && output.networkConfiguration !== null\n ? deserializeAws_json1_1NetworkConfiguration(output.networkConfiguration, context)\n : undefined,\n pendingCount: smithy_client_1.expectInt32(output.pendingCount),\n platformVersion: smithy_client_1.expectString(output.platformVersion),\n runningCount: smithy_client_1.expectInt32(output.runningCount),\n scale: output.scale !== undefined && output.scale !== null\n ? deserializeAws_json1_1Scale(output.scale, context)\n : undefined,\n serviceArn: smithy_client_1.expectString(output.serviceArn),\n serviceRegistries: output.serviceRegistries !== undefined && output.serviceRegistries !== null\n ? deserializeAws_json1_1ServiceRegistries(output.serviceRegistries, context)\n : undefined,\n stabilityStatus: smithy_client_1.expectString(output.stabilityStatus),\n stabilityStatusAt: output.stabilityStatusAt !== undefined && output.stabilityStatusAt !== null\n ? smithy_client_1.expectNonNull(smithy_client_1.parseEpochTimestamp(smithy_client_1.expectNumber(output.stabilityStatusAt)))\n : undefined,\n startedBy: smithy_client_1.expectString(output.startedBy),\n status: smithy_client_1.expectString(output.status),\n tags: output.tags !== undefined && output.tags !== null ? deserializeAws_json1_1Tags(output.tags, context) : undefined,\n taskDefinition: smithy_client_1.expectString(output.taskDefinition),\n taskSetArn: smithy_client_1.expectString(output.taskSetArn),\n updatedAt: output.updatedAt !== undefined && output.updatedAt !== null\n ? smithy_client_1.expectNonNull(smithy_client_1.parseEpochTimestamp(smithy_client_1.expectNumber(output.updatedAt)))\n : undefined,\n };\n};\nconst deserializeAws_json1_1TaskSetNotFoundException = (output, context) => {\n return {\n message: smithy_client_1.expectString(output.message),\n };\n};\nconst deserializeAws_json1_1TaskSets = (output, context) => {\n return (output || [])\n .filter((e) => e != null)\n .map((entry) => {\n if (entry === null) {\n return null;\n }\n return deserializeAws_json1_1TaskSet(entry, context);\n });\n};\nconst deserializeAws_json1_1Tmpfs = (output, context) => {\n return {\n containerPath: smithy_client_1.expectString(output.containerPath),\n mountOptions: output.mountOptions !== undefined && output.mountOptions !== null\n ? deserializeAws_json1_1StringList(output.mountOptions, context)\n : undefined,\n size: smithy_client_1.expectInt32(output.size),\n };\n};\nconst deserializeAws_json1_1TmpfsList = (output, context) => {\n return (output || [])\n .filter((e) => e != null)\n .map((entry) => {\n if (entry === null) {\n return null;\n }\n return deserializeAws_json1_1Tmpfs(entry, context);\n });\n};\nconst deserializeAws_json1_1Ulimit = (output, context) => {\n return {\n hardLimit: smithy_client_1.expectInt32(output.hardLimit),\n name: smithy_client_1.expectString(output.name),\n softLimit: smithy_client_1.expectInt32(output.softLimit),\n };\n};\nconst deserializeAws_json1_1UlimitList = (output, context) => {\n return (output || [])\n .filter((e) => e != null)\n .map((entry) => {\n if (entry === null) {\n return null;\n }\n return deserializeAws_json1_1Ulimit(entry, context);\n });\n};\nconst deserializeAws_json1_1UnsupportedFeatureException = (output, context) => {\n return {\n message: smithy_client_1.expectString(output.message),\n };\n};\nconst deserializeAws_json1_1UntagResourceResponse = (output, context) => {\n return {};\n};\nconst deserializeAws_json1_1UpdateCapacityProviderResponse = (output, context) => {\n return {\n capacityProvider: output.capacityProvider !== undefined && output.capacityProvider !== null\n ? deserializeAws_json1_1CapacityProvider(output.capacityProvider, context)\n : undefined,\n };\n};\nconst deserializeAws_json1_1UpdateClusterResponse = (output, context) => {\n return {\n cluster: output.cluster !== undefined && output.cluster !== null\n ? deserializeAws_json1_1Cluster(output.cluster, context)\n : undefined,\n };\n};\nconst deserializeAws_json1_1UpdateClusterSettingsResponse = (output, context) => {\n return {\n cluster: output.cluster !== undefined && output.cluster !== null\n ? deserializeAws_json1_1Cluster(output.cluster, context)\n : undefined,\n };\n};\nconst deserializeAws_json1_1UpdateContainerAgentResponse = (output, context) => {\n return {\n containerInstance: output.containerInstance !== undefined && output.containerInstance !== null\n ? deserializeAws_json1_1ContainerInstance(output.containerInstance, context)\n : undefined,\n };\n};\nconst deserializeAws_json1_1UpdateContainerInstancesStateResponse = (output, context) => {\n return {\n containerInstances: output.containerInstances !== undefined && output.containerInstances !== null\n ? deserializeAws_json1_1ContainerInstances(output.containerInstances, context)\n : undefined,\n failures: output.failures !== undefined && output.failures !== null\n ? deserializeAws_json1_1Failures(output.failures, context)\n : undefined,\n };\n};\nconst deserializeAws_json1_1UpdateInProgressException = (output, context) => {\n return {\n message: smithy_client_1.expectString(output.message),\n };\n};\nconst deserializeAws_json1_1UpdateServicePrimaryTaskSetResponse = (output, context) => {\n return {\n taskSet: output.taskSet !== undefined && output.taskSet !== null\n ? deserializeAws_json1_1TaskSet(output.taskSet, context)\n : undefined,\n };\n};\nconst deserializeAws_json1_1UpdateServiceResponse = (output, context) => {\n return {\n service: output.service !== undefined && output.service !== null\n ? deserializeAws_json1_1Service(output.service, context)\n : undefined,\n };\n};\nconst deserializeAws_json1_1UpdateTaskSetResponse = (output, context) => {\n return {\n taskSet: output.taskSet !== undefined && output.taskSet !== null\n ? deserializeAws_json1_1TaskSet(output.taskSet, context)\n : undefined,\n };\n};\nconst deserializeAws_json1_1VersionInfo = (output, context) => {\n return {\n agentHash: smithy_client_1.expectString(output.agentHash),\n agentVersion: smithy_client_1.expectString(output.agentVersion),\n dockerVersion: smithy_client_1.expectString(output.dockerVersion),\n };\n};\nconst deserializeAws_json1_1Volume = (output, context) => {\n return {\n dockerVolumeConfiguration: output.dockerVolumeConfiguration !== undefined && output.dockerVolumeConfiguration !== null\n ? deserializeAws_json1_1DockerVolumeConfiguration(output.dockerVolumeConfiguration, context)\n : undefined,\n efsVolumeConfiguration: output.efsVolumeConfiguration !== undefined && output.efsVolumeConfiguration !== null\n ? deserializeAws_json1_1EFSVolumeConfiguration(output.efsVolumeConfiguration, context)\n : undefined,\n fsxWindowsFileServerVolumeConfiguration: output.fsxWindowsFileServerVolumeConfiguration !== undefined &&\n output.fsxWindowsFileServerVolumeConfiguration !== null\n ? deserializeAws_json1_1FSxWindowsFileServerVolumeConfiguration(output.fsxWindowsFileServerVolumeConfiguration, context)\n : undefined,\n host: output.host !== undefined && output.host !== null\n ? deserializeAws_json1_1HostVolumeProperties(output.host, context)\n : undefined,\n name: smithy_client_1.expectString(output.name),\n };\n};\nconst deserializeAws_json1_1VolumeFrom = (output, context) => {\n return {\n readOnly: smithy_client_1.expectBoolean(output.readOnly),\n sourceContainer: smithy_client_1.expectString(output.sourceContainer),\n };\n};\nconst deserializeAws_json1_1VolumeFromList = (output, context) => {\n return (output || [])\n .filter((e) => e != null)\n .map((entry) => {\n if (entry === null) {\n return null;\n }\n return deserializeAws_json1_1VolumeFrom(entry, context);\n });\n};\nconst deserializeAws_json1_1VolumeList = (output, context) => {\n return (output || [])\n .filter((e) => e != null)\n .map((entry) => {\n if (entry === null) {\n return null;\n }\n return deserializeAws_json1_1Volume(entry, context);\n });\n};\nconst deserializeMetadata = (output) => {\n var _a;\n return ({\n httpStatusCode: output.statusCode,\n requestId: (_a = output.headers[\"x-amzn-requestid\"]) !== null && _a !== void 0 ? _a : output.headers[\"x-amzn-request-id\"],\n extendedRequestId: output.headers[\"x-amz-id-2\"],\n cfId: output.headers[\"x-amz-cf-id\"],\n });\n};\n// Collect low-level response body stream to Uint8Array.\nconst collectBody = (streamBody = new Uint8Array(), context) => {\n if (streamBody instanceof Uint8Array) {\n return Promise.resolve(streamBody);\n }\n return context.streamCollector(streamBody) || Promise.resolve(new Uint8Array());\n};\n// Encode Uint8Array data into string with utf-8.\nconst collectBodyString = (streamBody, context) => collectBody(streamBody, context).then((body) => context.utf8Encoder(body));\nconst buildHttpRpcRequest = async (context, headers, path, resolvedHostname, body) => {\n const { hostname, protocol = \"https\", port, path: basePath } = await context.endpoint();\n const contents = {\n protocol,\n hostname,\n port,\n method: \"POST\",\n path: basePath.endsWith(\"/\") ? basePath.slice(0, -1) + path : basePath + path,\n headers,\n };\n if (resolvedHostname !== undefined) {\n contents.hostname = resolvedHostname;\n }\n if (body !== undefined) {\n contents.body = body;\n }\n return new protocol_http_1.HttpRequest(contents);\n};\nconst parseBody = (streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {\n if (encoded.length) {\n return JSON.parse(encoded);\n }\n return {};\n});\n/**\n * Load an error code for the aws.rest-json-1.1 protocol.\n */\nconst 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 (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.code !== undefined) {\n return sanitizeErrorCode(data.code);\n }\n if (data[\"__type\"] !== undefined) {\n return sanitizeErrorCode(data[\"__type\"]);\n }\n return \"\";\n};\n//# sourceMappingURL=Aws_json1_1.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.getRuntimeConfig = void 0;\nconst tslib_1 = require(\"tslib\");\nconst package_json_1 = tslib_1.__importDefault(require(\"./package.json\"));\nconst client_sts_1 = require(\"@aws-sdk/client-sts\");\nconst config_resolver_1 = require(\"@aws-sdk/config-resolver\");\nconst credential_provider_node_1 = require(\"@aws-sdk/credential-provider-node\");\nconst hash_node_1 = require(\"@aws-sdk/hash-node\");\nconst middleware_retry_1 = require(\"@aws-sdk/middleware-retry\");\nconst node_config_provider_1 = require(\"@aws-sdk/node-config-provider\");\nconst node_http_handler_1 = require(\"@aws-sdk/node-http-handler\");\nconst util_base64_node_1 = require(\"@aws-sdk/util-base64-node\");\nconst util_body_length_node_1 = require(\"@aws-sdk/util-body-length-node\");\nconst util_user_agent_node_1 = require(\"@aws-sdk/util-user-agent-node\");\nconst util_utf8_node_1 = require(\"@aws-sdk/util-utf8-node\");\nconst runtimeConfig_shared_1 = require(\"./runtimeConfig.shared\");\nconst smithy_client_1 = require(\"@aws-sdk/smithy-client\");\n/**\n * @internal\n */\nconst getRuntimeConfig = (config) => {\n var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o;\n smithy_client_1.emitWarningIfUnsupportedVersion(process.version);\n const clientSharedValues = runtimeConfig_shared_1.getRuntimeConfig(config);\n return {\n ...clientSharedValues,\n ...config,\n runtime: \"node\",\n base64Decoder: (_a = config === null || config === void 0 ? void 0 : config.base64Decoder) !== null && _a !== void 0 ? _a : util_base64_node_1.fromBase64,\n base64Encoder: (_b = config === null || config === void 0 ? void 0 : config.base64Encoder) !== null && _b !== void 0 ? _b : util_base64_node_1.toBase64,\n bodyLengthChecker: (_c = config === null || config === void 0 ? void 0 : config.bodyLengthChecker) !== null && _c !== void 0 ? _c : util_body_length_node_1.calculateBodyLength,\n credentialDefaultProvider: (_d = config === null || config === void 0 ? void 0 : config.credentialDefaultProvider) !== null && _d !== void 0 ? _d : client_sts_1.decorateDefaultCredentialProvider(credential_provider_node_1.defaultProvider),\n defaultUserAgentProvider: (_e = config === null || config === void 0 ? void 0 : config.defaultUserAgentProvider) !== null && _e !== void 0 ? _e : util_user_agent_node_1.defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: package_json_1.default.version }),\n maxAttempts: (_f = config === null || config === void 0 ? void 0 : config.maxAttempts) !== null && _f !== void 0 ? _f : node_config_provider_1.loadConfig(middleware_retry_1.NODE_MAX_ATTEMPT_CONFIG_OPTIONS),\n region: (_g = config === null || config === void 0 ? void 0 : config.region) !== null && _g !== void 0 ? _g : node_config_provider_1.loadConfig(config_resolver_1.NODE_REGION_CONFIG_OPTIONS, config_resolver_1.NODE_REGION_CONFIG_FILE_OPTIONS),\n requestHandler: (_h = config === null || config === void 0 ? void 0 : config.requestHandler) !== null && _h !== void 0 ? _h : new node_http_handler_1.NodeHttpHandler(),\n retryMode: (_j = config === null || config === void 0 ? void 0 : config.retryMode) !== null && _j !== void 0 ? _j : node_config_provider_1.loadConfig(middleware_retry_1.NODE_RETRY_MODE_CONFIG_OPTIONS),\n sha256: (_k = config === null || config === void 0 ? void 0 : config.sha256) !== null && _k !== void 0 ? _k : hash_node_1.Hash.bind(null, \"sha256\"),\n streamCollector: (_l = config === null || config === void 0 ? void 0 : config.streamCollector) !== null && _l !== void 0 ? _l : node_http_handler_1.streamCollector,\n utf8Decoder: (_m = config === null || config === void 0 ? void 0 : config.utf8Decoder) !== null && _m !== void 0 ? _m : util_utf8_node_1.fromUtf8,\n utf8Encoder: (_o = config === null || config === void 0 ? void 0 : config.utf8Encoder) !== null && _o !== void 0 ? _o : util_utf8_node_1.toUtf8,\n };\n};\nexports.getRuntimeConfig = getRuntimeConfig;\n//# sourceMappingURL=runtimeConfig.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.getRuntimeConfig = void 0;\nconst endpoints_1 = require(\"./endpoints\");\nconst url_parser_1 = require(\"@aws-sdk/url-parser\");\n/**\n * @internal\n */\nconst getRuntimeConfig = (config) => {\n var _a, _b, _c, _d, _e;\n return ({\n apiVersion: \"2014-11-13\",\n disableHostPrefix: (_a = config === null || config === void 0 ? void 0 : config.disableHostPrefix) !== null && _a !== void 0 ? _a : false,\n logger: (_b = config === null || config === void 0 ? void 0 : config.logger) !== null && _b !== void 0 ? _b : {},\n regionInfoProvider: (_c = config === null || config === void 0 ? void 0 : config.regionInfoProvider) !== null && _c !== void 0 ? _c : endpoints_1.defaultRegionInfoProvider,\n serviceId: (_d = config === null || config === void 0 ? void 0 : config.serviceId) !== null && _d !== void 0 ? _d : \"ECS\",\n urlParser: (_e = config === null || config === void 0 ? void 0 : config.urlParser) !== null && _e !== void 0 ? _e : url_parser_1.parseUrl,\n });\n};\nexports.getRuntimeConfig = getRuntimeConfig;\n//# sourceMappingURL=runtimeConfig.shared.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.waitUntilServicesInactive = exports.waitForServicesInactive = void 0;\nconst DescribeServicesCommand_1 = require(\"../commands/DescribeServicesCommand\");\nconst util_waiter_1 = require(\"@aws-sdk/util-waiter\");\nconst checkState = async (client, input) => {\n let reason;\n try {\n let result = await client.send(new DescribeServicesCommand_1.DescribeServicesCommand(input));\n reason = result;\n try {\n let returnComparator = () => {\n let flat_1 = [].concat(...result.failures);\n let projection_3 = flat_1.map((element_2) => {\n return element_2.reason;\n });\n return projection_3;\n };\n for (let anyStringEq_4 of returnComparator()) {\n if (anyStringEq_4 == \"MISSING\") {\n return { state: util_waiter_1.WaiterState.FAILURE, reason };\n }\n }\n }\n catch (e) { }\n try {\n let returnComparator = () => {\n let flat_1 = [].concat(...result.services);\n let projection_3 = flat_1.map((element_2) => {\n return element_2.status;\n });\n return projection_3;\n };\n for (let anyStringEq_4 of returnComparator()) {\n if (anyStringEq_4 == \"INACTIVE\") {\n return { state: util_waiter_1.WaiterState.SUCCESS, reason };\n }\n }\n }\n catch (e) { }\n }\n catch (exception) {\n reason = exception;\n }\n return { state: util_waiter_1.WaiterState.RETRY, reason };\n};\n/**\n *\n * @deprecated Use waitUntilServicesInactive instead. waitForServicesInactive does not throw error in non-success cases.\n */\nconst waitForServicesInactive = async (params, input) => {\n const serviceDefaults = { minDelay: 15, maxDelay: 120 };\n return util_waiter_1.createWaiter({ ...serviceDefaults, ...params }, input, checkState);\n};\nexports.waitForServicesInactive = waitForServicesInactive;\n/**\n *\n * @param params - Waiter configuration options.\n * @param input - The input to DescribeServicesCommand for polling.\n */\nconst waitUntilServicesInactive = async (params, input) => {\n const serviceDefaults = { minDelay: 15, maxDelay: 120 };\n const result = await util_waiter_1.createWaiter({ ...serviceDefaults, ...params }, input, checkState);\n return util_waiter_1.checkExceptions(result);\n};\nexports.waitUntilServicesInactive = waitUntilServicesInactive;\n//# sourceMappingURL=waitForServicesInactive.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.waitUntilTasksRunning = exports.waitForTasksRunning = void 0;\nconst DescribeTasksCommand_1 = require(\"../commands/DescribeTasksCommand\");\nconst util_waiter_1 = require(\"@aws-sdk/util-waiter\");\nconst checkState = async (client, input) => {\n let reason;\n try {\n let result = await client.send(new DescribeTasksCommand_1.DescribeTasksCommand(input));\n reason = result;\n try {\n let returnComparator = () => {\n let flat_1 = [].concat(...result.tasks);\n let projection_3 = flat_1.map((element_2) => {\n return element_2.lastStatus;\n });\n return projection_3;\n };\n for (let anyStringEq_4 of returnComparator()) {\n if (anyStringEq_4 == \"STOPPED\") {\n return { state: util_waiter_1.WaiterState.FAILURE, reason };\n }\n }\n }\n catch (e) { }\n try {\n let returnComparator = () => {\n let flat_1 = [].concat(...result.failures);\n let projection_3 = flat_1.map((element_2) => {\n return element_2.reason;\n });\n return projection_3;\n };\n for (let anyStringEq_4 of returnComparator()) {\n if (anyStringEq_4 == \"MISSING\") {\n return { state: util_waiter_1.WaiterState.FAILURE, reason };\n }\n }\n }\n catch (e) { }\n try {\n let returnComparator = () => {\n let flat_1 = [].concat(...result.tasks);\n let projection_3 = flat_1.map((element_2) => {\n return element_2.lastStatus;\n });\n return projection_3;\n };\n let allStringEq_5 = returnComparator().length > 0;\n for (let element_4 of returnComparator()) {\n allStringEq_5 = allStringEq_5 && element_4 == \"RUNNING\";\n }\n if (allStringEq_5) {\n return { state: util_waiter_1.WaiterState.SUCCESS, reason };\n }\n }\n catch (e) { }\n }\n catch (exception) {\n reason = exception;\n }\n return { state: util_waiter_1.WaiterState.RETRY, reason };\n};\n/**\n *\n * @deprecated Use waitUntilTasksRunning instead. waitForTasksRunning does not throw error in non-success cases.\n */\nconst waitForTasksRunning = async (params, input) => {\n const serviceDefaults = { minDelay: 6, maxDelay: 120 };\n return util_waiter_1.createWaiter({ ...serviceDefaults, ...params }, input, checkState);\n};\nexports.waitForTasksRunning = waitForTasksRunning;\n/**\n *\n * @param params - Waiter configuration options.\n * @param input - The input to DescribeTasksCommand for polling.\n */\nconst waitUntilTasksRunning = async (params, input) => {\n const serviceDefaults = { minDelay: 6, maxDelay: 120 };\n const result = await util_waiter_1.createWaiter({ ...serviceDefaults, ...params }, input, checkState);\n return util_waiter_1.checkExceptions(result);\n};\nexports.waitUntilTasksRunning = waitUntilTasksRunning;\n//# sourceMappingURL=waitForTasksRunning.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.waitUntilTasksStopped = exports.waitForTasksStopped = void 0;\nconst DescribeTasksCommand_1 = require(\"../commands/DescribeTasksCommand\");\nconst util_waiter_1 = require(\"@aws-sdk/util-waiter\");\nconst checkState = async (client, input) => {\n let reason;\n try {\n let result = await client.send(new DescribeTasksCommand_1.DescribeTasksCommand(input));\n reason = result;\n try {\n let returnComparator = () => {\n let flat_1 = [].concat(...result.tasks);\n let projection_3 = flat_1.map((element_2) => {\n return element_2.lastStatus;\n });\n return projection_3;\n };\n let allStringEq_5 = returnComparator().length > 0;\n for (let element_4 of returnComparator()) {\n allStringEq_5 = allStringEq_5 && element_4 == \"STOPPED\";\n }\n if (allStringEq_5) {\n return { state: util_waiter_1.WaiterState.SUCCESS, reason };\n }\n }\n catch (e) { }\n }\n catch (exception) {\n reason = exception;\n }\n return { state: util_waiter_1.WaiterState.RETRY, reason };\n};\n/**\n *\n * @deprecated Use waitUntilTasksStopped instead. waitForTasksStopped does not throw error in non-success cases.\n */\nconst waitForTasksStopped = async (params, input) => {\n const serviceDefaults = { minDelay: 6, maxDelay: 120 };\n return util_waiter_1.createWaiter({ ...serviceDefaults, ...params }, input, checkState);\n};\nexports.waitForTasksStopped = waitForTasksStopped;\n/**\n *\n * @param params - Waiter configuration options.\n * @param input - The input to DescribeTasksCommand for polling.\n */\nconst waitUntilTasksStopped = async (params, input) => {\n const serviceDefaults = { minDelay: 6, maxDelay: 120 };\n const result = await util_waiter_1.createWaiter({ ...serviceDefaults, ...params }, input, checkState);\n return util_waiter_1.checkExceptions(result);\n};\nexports.waitUntilTasksStopped = waitUntilTasksStopped;\n//# sourceMappingURL=waitForTasksStopped.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.SSO = void 0;\nconst SSOClient_1 = require(\"./SSOClient\");\nconst GetRoleCredentialsCommand_1 = require(\"./commands/GetRoleCredentialsCommand\");\nconst ListAccountRolesCommand_1 = require(\"./commands/ListAccountRolesCommand\");\nconst ListAccountsCommand_1 = require(\"./commands/ListAccountsCommand\");\nconst LogoutCommand_1 = require(\"./commands/LogoutCommand\");\n/**\n *

AWS Single Sign-On Portal is a web service that makes it easy for you to assign user\n * access to AWS SSO resources such as the user portal. Users can get AWS account applications\n * and roles assigned to them and get federated into the application.

\n *\n *

For general information about AWS SSO, see What is AWS\n * Single Sign-On? in the AWS SSO User Guide.

\n *\n *

This API reference guide describes the AWS SSO Portal operations that you can call\n * programatically and includes detailed information on data types and errors.

\n *\n * \n *

AWS provides SDKs that consist of libraries and sample code for various programming\n * languages and platforms, such as Java, Ruby, .Net, iOS, or Android. The SDKs provide a\n * convenient way to create programmatic access to AWS SSO and other AWS services. For more\n * information about the AWS SDKs, including how to download and install them, see Tools for Amazon Web Services.

\n *
\n */\nclass SSO extends SSOClient_1.SSOClient {\n getRoleCredentials(args, optionsOrCb, cb) {\n const command = new GetRoleCredentialsCommand_1.GetRoleCredentialsCommand(args);\n if (typeof optionsOrCb === \"function\") {\n this.send(command, optionsOrCb);\n }\n else if (typeof cb === \"function\") {\n if (typeof optionsOrCb !== \"object\")\n throw new Error(`Expect http options but get ${typeof optionsOrCb}`);\n this.send(command, optionsOrCb || {}, cb);\n }\n else {\n return this.send(command, optionsOrCb);\n }\n }\n listAccountRoles(args, optionsOrCb, cb) {\n const command = new ListAccountRolesCommand_1.ListAccountRolesCommand(args);\n if (typeof optionsOrCb === \"function\") {\n this.send(command, optionsOrCb);\n }\n else if (typeof cb === \"function\") {\n if (typeof optionsOrCb !== \"object\")\n throw new Error(`Expect http options but get ${typeof optionsOrCb}`);\n this.send(command, optionsOrCb || {}, cb);\n }\n else {\n return this.send(command, optionsOrCb);\n }\n }\n listAccounts(args, optionsOrCb, cb) {\n const command = new ListAccountsCommand_1.ListAccountsCommand(args);\n if (typeof optionsOrCb === \"function\") {\n this.send(command, optionsOrCb);\n }\n else if (typeof cb === \"function\") {\n if (typeof optionsOrCb !== \"object\")\n throw new Error(`Expect http options but get ${typeof optionsOrCb}`);\n this.send(command, optionsOrCb || {}, cb);\n }\n else {\n return this.send(command, optionsOrCb);\n }\n }\n logout(args, optionsOrCb, cb) {\n const command = new LogoutCommand_1.LogoutCommand(args);\n if (typeof optionsOrCb === \"function\") {\n this.send(command, optionsOrCb);\n }\n else if (typeof cb === \"function\") {\n if (typeof optionsOrCb !== \"object\")\n throw new Error(`Expect http options but get ${typeof optionsOrCb}`);\n this.send(command, optionsOrCb || {}, cb);\n }\n else {\n return this.send(command, optionsOrCb);\n }\n }\n}\nexports.SSO = SSO;\n//# sourceMappingURL=SSO.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.SSOClient = void 0;\nconst runtimeConfig_1 = require(\"./runtimeConfig\");\nconst config_resolver_1 = require(\"@aws-sdk/config-resolver\");\nconst middleware_content_length_1 = require(\"@aws-sdk/middleware-content-length\");\nconst middleware_host_header_1 = require(\"@aws-sdk/middleware-host-header\");\nconst middleware_logger_1 = require(\"@aws-sdk/middleware-logger\");\nconst middleware_retry_1 = require(\"@aws-sdk/middleware-retry\");\nconst middleware_user_agent_1 = require(\"@aws-sdk/middleware-user-agent\");\nconst smithy_client_1 = require(\"@aws-sdk/smithy-client\");\n/**\n *

AWS Single Sign-On Portal is a web service that makes it easy for you to assign user\n * access to AWS SSO resources such as the user portal. Users can get AWS account applications\n * and roles assigned to them and get federated into the application.

\n *\n *

For general information about AWS SSO, see What is AWS\n * Single Sign-On? in the AWS SSO User Guide.

\n *\n *

This API reference guide describes the AWS SSO Portal operations that you can call\n * programatically and includes detailed information on data types and errors.

\n *\n * \n *

AWS provides SDKs that consist of libraries and sample code for various programming\n * languages and platforms, such as Java, Ruby, .Net, iOS, or Android. The SDKs provide a\n * convenient way to create programmatic access to AWS SSO and other AWS services. For more\n * information about the AWS SDKs, including how to download and install them, see Tools for Amazon Web Services.

\n *
\n */\nclass SSOClient extends smithy_client_1.Client {\n constructor(configuration) {\n let _config_0 = runtimeConfig_1.getRuntimeConfig(configuration);\n let _config_1 = config_resolver_1.resolveRegionConfig(_config_0);\n let _config_2 = config_resolver_1.resolveEndpointsConfig(_config_1);\n let _config_3 = middleware_retry_1.resolveRetryConfig(_config_2);\n let _config_4 = middleware_host_header_1.resolveHostHeaderConfig(_config_3);\n let _config_5 = middleware_user_agent_1.resolveUserAgentConfig(_config_4);\n super(_config_5);\n this.config = _config_5;\n this.middlewareStack.use(middleware_retry_1.getRetryPlugin(this.config));\n this.middlewareStack.use(middleware_content_length_1.getContentLengthPlugin(this.config));\n this.middlewareStack.use(middleware_host_header_1.getHostHeaderPlugin(this.config));\n this.middlewareStack.use(middleware_logger_1.getLoggerPlugin(this.config));\n this.middlewareStack.use(middleware_user_agent_1.getUserAgentPlugin(this.config));\n }\n /**\n * Destroy underlying resources, like sockets. It's usually not necessary to do this.\n * However in Node.js, it's best to explicitly shut down the client's agent when it is no longer needed.\n * Otherwise, sockets might stay open for quite a long time before the server terminates them.\n */\n destroy() {\n super.destroy();\n }\n}\nexports.SSOClient = SSOClient;\n//# sourceMappingURL=SSOClient.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.GetRoleCredentialsCommand = void 0;\nconst models_0_1 = require(\"../models/models_0\");\nconst Aws_restJson1_1 = require(\"../protocols/Aws_restJson1\");\nconst middleware_serde_1 = require(\"@aws-sdk/middleware-serde\");\nconst smithy_client_1 = require(\"@aws-sdk/smithy-client\");\n/**\n *

Returns the STS short-term credentials for a given role name that is assigned to the\n * user.

\n * @example\n * Use a bare-bones client and the command you need to make an API call.\n * ```javascript\n * import { SSOClient, GetRoleCredentialsCommand } from \"@aws-sdk/client-sso\"; // ES Modules import\n * // const { SSOClient, GetRoleCredentialsCommand } = require(\"@aws-sdk/client-sso\"); // CommonJS import\n * const client = new SSOClient(config);\n * const command = new GetRoleCredentialsCommand(input);\n * const response = await client.send(command);\n * ```\n *\n * @see {@link GetRoleCredentialsCommandInput} for command's `input` shape.\n * @see {@link GetRoleCredentialsCommandOutput} for command's `response` shape.\n * @see {@link SSOClientResolvedConfig | config} for command's `input` shape.\n *\n */\nclass GetRoleCredentialsCommand extends smithy_client_1.Command {\n // Start section: command_properties\n // End section: command_properties\n constructor(input) {\n // Start section: command_constructor\n super();\n this.input = input;\n // End section: command_constructor\n }\n /**\n * @internal\n */\n resolveMiddleware(clientStack, configuration, options) {\n this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize));\n const stack = clientStack.concat(this.middlewareStack);\n const { logger } = configuration;\n const clientName = \"SSOClient\";\n const commandName = \"GetRoleCredentialsCommand\";\n const handlerExecutionContext = {\n logger,\n clientName,\n commandName,\n inputFilterSensitiveLog: models_0_1.GetRoleCredentialsRequest.filterSensitiveLog,\n outputFilterSensitiveLog: models_0_1.GetRoleCredentialsResponse.filterSensitiveLog,\n };\n const { requestHandler } = configuration;\n return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);\n }\n serialize(input, context) {\n return Aws_restJson1_1.serializeAws_restJson1GetRoleCredentialsCommand(input, context);\n }\n deserialize(output, context) {\n return Aws_restJson1_1.deserializeAws_restJson1GetRoleCredentialsCommand(output, context);\n }\n}\nexports.GetRoleCredentialsCommand = GetRoleCredentialsCommand;\n//# sourceMappingURL=GetRoleCredentialsCommand.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.ListAccountRolesCommand = void 0;\nconst models_0_1 = require(\"../models/models_0\");\nconst Aws_restJson1_1 = require(\"../protocols/Aws_restJson1\");\nconst middleware_serde_1 = require(\"@aws-sdk/middleware-serde\");\nconst smithy_client_1 = require(\"@aws-sdk/smithy-client\");\n/**\n *

Lists all roles that are assigned to the user for a given AWS account.

\n * @example\n * Use a bare-bones client and the command you need to make an API call.\n * ```javascript\n * import { SSOClient, ListAccountRolesCommand } from \"@aws-sdk/client-sso\"; // ES Modules import\n * // const { SSOClient, ListAccountRolesCommand } = require(\"@aws-sdk/client-sso\"); // CommonJS import\n * const client = new SSOClient(config);\n * const command = new ListAccountRolesCommand(input);\n * const response = await client.send(command);\n * ```\n *\n * @see {@link ListAccountRolesCommandInput} for command's `input` shape.\n * @see {@link ListAccountRolesCommandOutput} for command's `response` shape.\n * @see {@link SSOClientResolvedConfig | config} for command's `input` shape.\n *\n */\nclass ListAccountRolesCommand extends smithy_client_1.Command {\n // Start section: command_properties\n // End section: command_properties\n constructor(input) {\n // Start section: command_constructor\n super();\n this.input = input;\n // End section: command_constructor\n }\n /**\n * @internal\n */\n resolveMiddleware(clientStack, configuration, options) {\n this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize));\n const stack = clientStack.concat(this.middlewareStack);\n const { logger } = configuration;\n const clientName = \"SSOClient\";\n const commandName = \"ListAccountRolesCommand\";\n const handlerExecutionContext = {\n logger,\n clientName,\n commandName,\n inputFilterSensitiveLog: models_0_1.ListAccountRolesRequest.filterSensitiveLog,\n outputFilterSensitiveLog: models_0_1.ListAccountRolesResponse.filterSensitiveLog,\n };\n const { requestHandler } = configuration;\n return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);\n }\n serialize(input, context) {\n return Aws_restJson1_1.serializeAws_restJson1ListAccountRolesCommand(input, context);\n }\n deserialize(output, context) {\n return Aws_restJson1_1.deserializeAws_restJson1ListAccountRolesCommand(output, context);\n }\n}\nexports.ListAccountRolesCommand = ListAccountRolesCommand;\n//# sourceMappingURL=ListAccountRolesCommand.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.ListAccountsCommand = void 0;\nconst models_0_1 = require(\"../models/models_0\");\nconst Aws_restJson1_1 = require(\"../protocols/Aws_restJson1\");\nconst middleware_serde_1 = require(\"@aws-sdk/middleware-serde\");\nconst smithy_client_1 = require(\"@aws-sdk/smithy-client\");\n/**\n *

Lists all AWS accounts assigned to the user. These AWS accounts are assigned by the\n * administrator of the account. For more information, see Assign User Access in the AWS SSO User Guide. This operation\n * returns a paginated response.

\n * @example\n * Use a bare-bones client and the command you need to make an API call.\n * ```javascript\n * import { SSOClient, ListAccountsCommand } from \"@aws-sdk/client-sso\"; // ES Modules import\n * // const { SSOClient, ListAccountsCommand } = require(\"@aws-sdk/client-sso\"); // CommonJS import\n * const client = new SSOClient(config);\n * const command = new ListAccountsCommand(input);\n * const response = await client.send(command);\n * ```\n *\n * @see {@link ListAccountsCommandInput} for command's `input` shape.\n * @see {@link ListAccountsCommandOutput} for command's `response` shape.\n * @see {@link SSOClientResolvedConfig | config} for command's `input` shape.\n *\n */\nclass ListAccountsCommand extends smithy_client_1.Command {\n // Start section: command_properties\n // End section: command_properties\n constructor(input) {\n // Start section: command_constructor\n super();\n this.input = input;\n // End section: command_constructor\n }\n /**\n * @internal\n */\n resolveMiddleware(clientStack, configuration, options) {\n this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize));\n const stack = clientStack.concat(this.middlewareStack);\n const { logger } = configuration;\n const clientName = \"SSOClient\";\n const commandName = \"ListAccountsCommand\";\n const handlerExecutionContext = {\n logger,\n clientName,\n commandName,\n inputFilterSensitiveLog: models_0_1.ListAccountsRequest.filterSensitiveLog,\n outputFilterSensitiveLog: models_0_1.ListAccountsResponse.filterSensitiveLog,\n };\n const { requestHandler } = configuration;\n return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);\n }\n serialize(input, context) {\n return Aws_restJson1_1.serializeAws_restJson1ListAccountsCommand(input, context);\n }\n deserialize(output, context) {\n return Aws_restJson1_1.deserializeAws_restJson1ListAccountsCommand(output, context);\n }\n}\nexports.ListAccountsCommand = ListAccountsCommand;\n//# sourceMappingURL=ListAccountsCommand.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.LogoutCommand = void 0;\nconst models_0_1 = require(\"../models/models_0\");\nconst Aws_restJson1_1 = require(\"../protocols/Aws_restJson1\");\nconst middleware_serde_1 = require(\"@aws-sdk/middleware-serde\");\nconst smithy_client_1 = require(\"@aws-sdk/smithy-client\");\n/**\n *

Removes the client- and server-side session that is associated with the user.

\n * @example\n * Use a bare-bones client and the command you need to make an API call.\n * ```javascript\n * import { SSOClient, LogoutCommand } from \"@aws-sdk/client-sso\"; // ES Modules import\n * // const { SSOClient, LogoutCommand } = require(\"@aws-sdk/client-sso\"); // CommonJS import\n * const client = new SSOClient(config);\n * const command = new LogoutCommand(input);\n * const response = await client.send(command);\n * ```\n *\n * @see {@link LogoutCommandInput} for command's `input` shape.\n * @see {@link LogoutCommandOutput} for command's `response` shape.\n * @see {@link SSOClientResolvedConfig | config} for command's `input` shape.\n *\n */\nclass LogoutCommand extends smithy_client_1.Command {\n // Start section: command_properties\n // End section: command_properties\n constructor(input) {\n // Start section: command_constructor\n super();\n this.input = input;\n // End section: command_constructor\n }\n /**\n * @internal\n */\n resolveMiddleware(clientStack, configuration, options) {\n this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize));\n const stack = clientStack.concat(this.middlewareStack);\n const { logger } = configuration;\n const clientName = \"SSOClient\";\n const commandName = \"LogoutCommand\";\n const handlerExecutionContext = {\n logger,\n clientName,\n commandName,\n inputFilterSensitiveLog: models_0_1.LogoutRequest.filterSensitiveLog,\n outputFilterSensitiveLog: (output) => output,\n };\n const { requestHandler } = configuration;\n return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);\n }\n serialize(input, context) {\n return Aws_restJson1_1.serializeAws_restJson1LogoutCommand(input, context);\n }\n deserialize(output, context) {\n return Aws_restJson1_1.deserializeAws_restJson1LogoutCommand(output, context);\n }\n}\nexports.LogoutCommand = LogoutCommand;\n//# sourceMappingURL=LogoutCommand.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.defaultRegionInfoProvider = void 0;\nconst config_resolver_1 = require(\"@aws-sdk/config-resolver\");\nconst regionHash = {\n \"ap-southeast-1\": {\n hostname: \"portal.sso.ap-southeast-1.amazonaws.com\",\n signingRegion: \"ap-southeast-1\",\n },\n \"ap-southeast-2\": {\n hostname: \"portal.sso.ap-southeast-2.amazonaws.com\",\n signingRegion: \"ap-southeast-2\",\n },\n \"ca-central-1\": {\n hostname: \"portal.sso.ca-central-1.amazonaws.com\",\n signingRegion: \"ca-central-1\",\n },\n \"eu-central-1\": {\n hostname: \"portal.sso.eu-central-1.amazonaws.com\",\n signingRegion: \"eu-central-1\",\n },\n \"eu-west-1\": {\n hostname: \"portal.sso.eu-west-1.amazonaws.com\",\n signingRegion: \"eu-west-1\",\n },\n \"eu-west-2\": {\n hostname: \"portal.sso.eu-west-2.amazonaws.com\",\n signingRegion: \"eu-west-2\",\n },\n \"us-east-1\": {\n hostname: \"portal.sso.us-east-1.amazonaws.com\",\n signingRegion: \"us-east-1\",\n },\n \"us-east-2\": {\n hostname: \"portal.sso.us-east-2.amazonaws.com\",\n signingRegion: \"us-east-2\",\n },\n \"us-west-2\": {\n hostname: \"portal.sso.us-west-2.amazonaws.com\",\n signingRegion: \"us-west-2\",\n },\n};\nconst partitionHash = {\n aws: {\n regions: [\n \"af-south-1\",\n \"ap-east-1\",\n \"ap-northeast-1\",\n \"ap-northeast-2\",\n \"ap-northeast-3\",\n \"ap-south-1\",\n \"ap-southeast-1\",\n \"ap-southeast-2\",\n \"ca-central-1\",\n \"eu-central-1\",\n \"eu-north-1\",\n \"eu-south-1\",\n \"eu-west-1\",\n \"eu-west-2\",\n \"eu-west-3\",\n \"me-south-1\",\n \"sa-east-1\",\n \"us-east-1\",\n \"us-east-2\",\n \"us-west-1\",\n \"us-west-2\",\n ],\n hostname: \"portal.sso.{region}.amazonaws.com\",\n },\n \"aws-cn\": {\n regions: [\"cn-north-1\", \"cn-northwest-1\"],\n hostname: \"portal.sso.{region}.amazonaws.com.cn\",\n },\n \"aws-iso\": {\n regions: [\"us-iso-east-1\"],\n hostname: \"portal.sso.{region}.c2s.ic.gov\",\n },\n \"aws-iso-b\": {\n regions: [\"us-isob-east-1\"],\n hostname: \"portal.sso.{region}.sc2s.sgov.gov\",\n },\n \"aws-us-gov\": {\n regions: [\"us-gov-east-1\", \"us-gov-west-1\"],\n hostname: \"portal.sso.{region}.amazonaws.com\",\n },\n};\nconst defaultRegionInfoProvider = async (region, options) => config_resolver_1.getRegionInfo(region, {\n ...options,\n signingService: \"awsssoportal\",\n regionHash,\n partitionHash,\n});\nexports.defaultRegionInfoProvider = defaultRegionInfoProvider;\n//# sourceMappingURL=endpoints.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst tslib_1 = require(\"tslib\");\ntslib_1.__exportStar(require(\"./SSOClient\"), exports);\ntslib_1.__exportStar(require(\"./SSO\"), exports);\ntslib_1.__exportStar(require(\"./commands/GetRoleCredentialsCommand\"), exports);\ntslib_1.__exportStar(require(\"./commands/ListAccountRolesCommand\"), exports);\ntslib_1.__exportStar(require(\"./pagination/ListAccountRolesPaginator\"), exports);\ntslib_1.__exportStar(require(\"./commands/ListAccountsCommand\"), exports);\ntslib_1.__exportStar(require(\"./pagination/ListAccountsPaginator\"), exports);\ntslib_1.__exportStar(require(\"./commands/LogoutCommand\"), exports);\ntslib_1.__exportStar(require(\"./pagination/Interfaces\"), exports);\ntslib_1.__exportStar(require(\"./models/index\"), exports);\n//# sourceMappingURL=index.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst tslib_1 = require(\"tslib\");\ntslib_1.__exportStar(require(\"./models_0\"), exports);\n//# sourceMappingURL=index.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.LogoutRequest = exports.ListAccountsResponse = exports.ListAccountsRequest = exports.ListAccountRolesResponse = exports.RoleInfo = exports.ListAccountRolesRequest = exports.UnauthorizedException = exports.TooManyRequestsException = exports.ResourceNotFoundException = exports.InvalidRequestException = exports.GetRoleCredentialsResponse = exports.RoleCredentials = exports.GetRoleCredentialsRequest = exports.AccountInfo = void 0;\nconst smithy_client_1 = require(\"@aws-sdk/smithy-client\");\nvar AccountInfo;\n(function (AccountInfo) {\n /**\n * @internal\n */\n AccountInfo.filterSensitiveLog = (obj) => ({\n ...obj,\n });\n})(AccountInfo = exports.AccountInfo || (exports.AccountInfo = {}));\nvar GetRoleCredentialsRequest;\n(function (GetRoleCredentialsRequest) {\n /**\n * @internal\n */\n GetRoleCredentialsRequest.filterSensitiveLog = (obj) => ({\n ...obj,\n ...(obj.accessToken && { accessToken: smithy_client_1.SENSITIVE_STRING }),\n });\n})(GetRoleCredentialsRequest = exports.GetRoleCredentialsRequest || (exports.GetRoleCredentialsRequest = {}));\nvar RoleCredentials;\n(function (RoleCredentials) {\n /**\n * @internal\n */\n RoleCredentials.filterSensitiveLog = (obj) => ({\n ...obj,\n ...(obj.secretAccessKey && { secretAccessKey: smithy_client_1.SENSITIVE_STRING }),\n ...(obj.sessionToken && { sessionToken: smithy_client_1.SENSITIVE_STRING }),\n });\n})(RoleCredentials = exports.RoleCredentials || (exports.RoleCredentials = {}));\nvar GetRoleCredentialsResponse;\n(function (GetRoleCredentialsResponse) {\n /**\n * @internal\n */\n GetRoleCredentialsResponse.filterSensitiveLog = (obj) => ({\n ...obj,\n ...(obj.roleCredentials && { roleCredentials: RoleCredentials.filterSensitiveLog(obj.roleCredentials) }),\n });\n})(GetRoleCredentialsResponse = exports.GetRoleCredentialsResponse || (exports.GetRoleCredentialsResponse = {}));\nvar InvalidRequestException;\n(function (InvalidRequestException) {\n /**\n * @internal\n */\n InvalidRequestException.filterSensitiveLog = (obj) => ({\n ...obj,\n });\n})(InvalidRequestException = exports.InvalidRequestException || (exports.InvalidRequestException = {}));\nvar ResourceNotFoundException;\n(function (ResourceNotFoundException) {\n /**\n * @internal\n */\n ResourceNotFoundException.filterSensitiveLog = (obj) => ({\n ...obj,\n });\n})(ResourceNotFoundException = exports.ResourceNotFoundException || (exports.ResourceNotFoundException = {}));\nvar TooManyRequestsException;\n(function (TooManyRequestsException) {\n /**\n * @internal\n */\n TooManyRequestsException.filterSensitiveLog = (obj) => ({\n ...obj,\n });\n})(TooManyRequestsException = exports.TooManyRequestsException || (exports.TooManyRequestsException = {}));\nvar UnauthorizedException;\n(function (UnauthorizedException) {\n /**\n * @internal\n */\n UnauthorizedException.filterSensitiveLog = (obj) => ({\n ...obj,\n });\n})(UnauthorizedException = exports.UnauthorizedException || (exports.UnauthorizedException = {}));\nvar ListAccountRolesRequest;\n(function (ListAccountRolesRequest) {\n /**\n * @internal\n */\n ListAccountRolesRequest.filterSensitiveLog = (obj) => ({\n ...obj,\n ...(obj.accessToken && { accessToken: smithy_client_1.SENSITIVE_STRING }),\n });\n})(ListAccountRolesRequest = exports.ListAccountRolesRequest || (exports.ListAccountRolesRequest = {}));\nvar RoleInfo;\n(function (RoleInfo) {\n /**\n * @internal\n */\n RoleInfo.filterSensitiveLog = (obj) => ({\n ...obj,\n });\n})(RoleInfo = exports.RoleInfo || (exports.RoleInfo = {}));\nvar ListAccountRolesResponse;\n(function (ListAccountRolesResponse) {\n /**\n * @internal\n */\n ListAccountRolesResponse.filterSensitiveLog = (obj) => ({\n ...obj,\n });\n})(ListAccountRolesResponse = exports.ListAccountRolesResponse || (exports.ListAccountRolesResponse = {}));\nvar ListAccountsRequest;\n(function (ListAccountsRequest) {\n /**\n * @internal\n */\n ListAccountsRequest.filterSensitiveLog = (obj) => ({\n ...obj,\n ...(obj.accessToken && { accessToken: smithy_client_1.SENSITIVE_STRING }),\n });\n})(ListAccountsRequest = exports.ListAccountsRequest || (exports.ListAccountsRequest = {}));\nvar ListAccountsResponse;\n(function (ListAccountsResponse) {\n /**\n * @internal\n */\n ListAccountsResponse.filterSensitiveLog = (obj) => ({\n ...obj,\n });\n})(ListAccountsResponse = exports.ListAccountsResponse || (exports.ListAccountsResponse = {}));\nvar LogoutRequest;\n(function (LogoutRequest) {\n /**\n * @internal\n */\n LogoutRequest.filterSensitiveLog = (obj) => ({\n ...obj,\n ...(obj.accessToken && { accessToken: smithy_client_1.SENSITIVE_STRING }),\n });\n})(LogoutRequest = exports.LogoutRequest || (exports.LogoutRequest = {}));\n//# sourceMappingURL=models_0.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\n//# sourceMappingURL=Interfaces.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.paginateListAccountRoles = void 0;\nconst SSO_1 = require(\"../SSO\");\nconst SSOClient_1 = require(\"../SSOClient\");\nconst ListAccountRolesCommand_1 = require(\"../commands/ListAccountRolesCommand\");\n/**\n * @private\n */\nconst makePagedClientRequest = async (client, input, ...args) => {\n // @ts-ignore\n return await client.send(new ListAccountRolesCommand_1.ListAccountRolesCommand(input), ...args);\n};\n/**\n * @private\n */\nconst makePagedRequest = async (client, input, ...args) => {\n // @ts-ignore\n return await client.listAccountRoles(input, ...args);\n};\nasync function* paginateListAccountRoles(config, input, ...additionalArguments) {\n // ToDo: replace with actual type instead of typeof input.nextToken\n let token = config.startingToken || undefined;\n let hasNext = true;\n let page;\n while (hasNext) {\n input.nextToken = token;\n input[\"maxResults\"] = config.pageSize;\n if (config.client instanceof SSO_1.SSO) {\n page = await makePagedRequest(config.client, input, ...additionalArguments);\n }\n else if (config.client instanceof SSOClient_1.SSOClient) {\n page = await makePagedClientRequest(config.client, input, ...additionalArguments);\n }\n else {\n throw new Error(\"Invalid client, expected SSO | SSOClient\");\n }\n yield page;\n token = page.nextToken;\n hasNext = !!token;\n }\n // @ts-ignore\n return undefined;\n}\nexports.paginateListAccountRoles = paginateListAccountRoles;\n//# sourceMappingURL=ListAccountRolesPaginator.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.paginateListAccounts = void 0;\nconst SSO_1 = require(\"../SSO\");\nconst SSOClient_1 = require(\"../SSOClient\");\nconst ListAccountsCommand_1 = require(\"../commands/ListAccountsCommand\");\n/**\n * @private\n */\nconst makePagedClientRequest = async (client, input, ...args) => {\n // @ts-ignore\n return await client.send(new ListAccountsCommand_1.ListAccountsCommand(input), ...args);\n};\n/**\n * @private\n */\nconst makePagedRequest = async (client, input, ...args) => {\n // @ts-ignore\n return await client.listAccounts(input, ...args);\n};\nasync function* paginateListAccounts(config, input, ...additionalArguments) {\n // ToDo: replace with actual type instead of typeof input.nextToken\n let token = config.startingToken || undefined;\n let hasNext = true;\n let page;\n while (hasNext) {\n input.nextToken = token;\n input[\"maxResults\"] = config.pageSize;\n if (config.client instanceof SSO_1.SSO) {\n page = await makePagedRequest(config.client, input, ...additionalArguments);\n }\n else if (config.client instanceof SSOClient_1.SSOClient) {\n page = await makePagedClientRequest(config.client, input, ...additionalArguments);\n }\n else {\n throw new Error(\"Invalid client, expected SSO | SSOClient\");\n }\n yield page;\n token = page.nextToken;\n hasNext = !!token;\n }\n // @ts-ignore\n return undefined;\n}\nexports.paginateListAccounts = paginateListAccounts;\n//# sourceMappingURL=ListAccountsPaginator.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.deserializeAws_restJson1LogoutCommand = exports.deserializeAws_restJson1ListAccountsCommand = exports.deserializeAws_restJson1ListAccountRolesCommand = exports.deserializeAws_restJson1GetRoleCredentialsCommand = exports.serializeAws_restJson1LogoutCommand = exports.serializeAws_restJson1ListAccountsCommand = exports.serializeAws_restJson1ListAccountRolesCommand = exports.serializeAws_restJson1GetRoleCredentialsCommand = void 0;\nconst protocol_http_1 = require(\"@aws-sdk/protocol-http\");\nconst smithy_client_1 = require(\"@aws-sdk/smithy-client\");\nconst serializeAws_restJson1GetRoleCredentialsCommand = async (input, context) => {\n const { hostname, protocol = \"https\", port, path: basePath } = await context.endpoint();\n const headers = {\n ...(isSerializableHeaderValue(input.accessToken) && { \"x-amz-sso_bearer_token\": input.accessToken }),\n };\n let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith(\"/\")) ? basePath.slice(0, -1) : basePath || \"\"}` + \"/federation/credentials\";\n const query = {\n ...(input.roleName !== undefined && { role_name: input.roleName }),\n ...(input.accountId !== undefined && { account_id: input.accountId }),\n };\n let body;\n return new protocol_http_1.HttpRequest({\n protocol,\n hostname,\n port,\n method: \"GET\",\n headers,\n path: resolvedPath,\n query,\n body,\n });\n};\nexports.serializeAws_restJson1GetRoleCredentialsCommand = serializeAws_restJson1GetRoleCredentialsCommand;\nconst serializeAws_restJson1ListAccountRolesCommand = async (input, context) => {\n const { hostname, protocol = \"https\", port, path: basePath } = await context.endpoint();\n const headers = {\n ...(isSerializableHeaderValue(input.accessToken) && { \"x-amz-sso_bearer_token\": input.accessToken }),\n };\n let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith(\"/\")) ? basePath.slice(0, -1) : basePath || \"\"}` + \"/assignment/roles\";\n const query = {\n ...(input.nextToken !== undefined && { next_token: input.nextToken }),\n ...(input.maxResults !== undefined && { max_result: input.maxResults.toString() }),\n ...(input.accountId !== undefined && { account_id: input.accountId }),\n };\n let body;\n return new protocol_http_1.HttpRequest({\n protocol,\n hostname,\n port,\n method: \"GET\",\n headers,\n path: resolvedPath,\n query,\n body,\n });\n};\nexports.serializeAws_restJson1ListAccountRolesCommand = serializeAws_restJson1ListAccountRolesCommand;\nconst serializeAws_restJson1ListAccountsCommand = async (input, context) => {\n const { hostname, protocol = \"https\", port, path: basePath } = await context.endpoint();\n const headers = {\n ...(isSerializableHeaderValue(input.accessToken) && { \"x-amz-sso_bearer_token\": input.accessToken }),\n };\n let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith(\"/\")) ? basePath.slice(0, -1) : basePath || \"\"}` + \"/assignment/accounts\";\n const query = {\n ...(input.nextToken !== undefined && { next_token: input.nextToken }),\n ...(input.maxResults !== undefined && { max_result: input.maxResults.toString() }),\n };\n let body;\n return new protocol_http_1.HttpRequest({\n protocol,\n hostname,\n port,\n method: \"GET\",\n headers,\n path: resolvedPath,\n query,\n body,\n });\n};\nexports.serializeAws_restJson1ListAccountsCommand = serializeAws_restJson1ListAccountsCommand;\nconst serializeAws_restJson1LogoutCommand = async (input, context) => {\n const { hostname, protocol = \"https\", port, path: basePath } = await context.endpoint();\n const headers = {\n ...(isSerializableHeaderValue(input.accessToken) && { \"x-amz-sso_bearer_token\": input.accessToken }),\n };\n let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith(\"/\")) ? basePath.slice(0, -1) : basePath || \"\"}` + \"/logout\";\n let body;\n return new protocol_http_1.HttpRequest({\n protocol,\n hostname,\n port,\n method: \"POST\",\n headers,\n path: resolvedPath,\n body,\n });\n};\nexports.serializeAws_restJson1LogoutCommand = serializeAws_restJson1LogoutCommand;\nconst deserializeAws_restJson1GetRoleCredentialsCommand = async (output, context) => {\n if (output.statusCode !== 200 && output.statusCode >= 300) {\n return deserializeAws_restJson1GetRoleCredentialsCommandError(output, context);\n }\n const contents = {\n $metadata: deserializeMetadata(output),\n roleCredentials: undefined,\n };\n const data = smithy_client_1.expectNonNull(smithy_client_1.expectObject(await parseBody(output.body, context)), \"body\");\n if (data.roleCredentials !== undefined && data.roleCredentials !== null) {\n contents.roleCredentials = deserializeAws_restJson1RoleCredentials(data.roleCredentials, context);\n }\n return Promise.resolve(contents);\n};\nexports.deserializeAws_restJson1GetRoleCredentialsCommand = deserializeAws_restJson1GetRoleCredentialsCommand;\nconst deserializeAws_restJson1GetRoleCredentialsCommandError = async (output, context) => {\n const parsedOutput = {\n ...output,\n body: await parseBody(output.body, context),\n };\n let response;\n let errorCode = \"UnknownError\";\n errorCode = loadRestJsonErrorCode(output, parsedOutput.body);\n switch (errorCode) {\n case \"InvalidRequestException\":\n case \"com.amazonaws.sso#InvalidRequestException\":\n response = {\n ...(await deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context)),\n name: errorCode,\n $metadata: deserializeMetadata(output),\n };\n break;\n case \"ResourceNotFoundException\":\n case \"com.amazonaws.sso#ResourceNotFoundException\":\n response = {\n ...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)),\n name: errorCode,\n $metadata: deserializeMetadata(output),\n };\n break;\n case \"TooManyRequestsException\":\n case \"com.amazonaws.sso#TooManyRequestsException\":\n response = {\n ...(await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context)),\n name: errorCode,\n $metadata: deserializeMetadata(output),\n };\n break;\n case \"UnauthorizedException\":\n case \"com.amazonaws.sso#UnauthorizedException\":\n response = {\n ...(await deserializeAws_restJson1UnauthorizedExceptionResponse(parsedOutput, context)),\n name: errorCode,\n $metadata: deserializeMetadata(output),\n };\n break;\n default:\n const parsedBody = parsedOutput.body;\n errorCode = parsedBody.code || parsedBody.Code || errorCode;\n response = {\n ...parsedBody,\n name: `${errorCode}`,\n message: parsedBody.message || parsedBody.Message || errorCode,\n $fault: \"client\",\n $metadata: deserializeMetadata(output),\n };\n }\n const message = response.message || response.Message || errorCode;\n response.message = message;\n delete response.Message;\n return Promise.reject(Object.assign(new Error(message), response));\n};\nconst deserializeAws_restJson1ListAccountRolesCommand = async (output, context) => {\n if (output.statusCode !== 200 && output.statusCode >= 300) {\n return deserializeAws_restJson1ListAccountRolesCommandError(output, context);\n }\n const contents = {\n $metadata: deserializeMetadata(output),\n nextToken: undefined,\n roleList: undefined,\n };\n const data = smithy_client_1.expectNonNull(smithy_client_1.expectObject(await parseBody(output.body, context)), \"body\");\n if (data.nextToken !== undefined && data.nextToken !== null) {\n contents.nextToken = smithy_client_1.expectString(data.nextToken);\n }\n if (data.roleList !== undefined && data.roleList !== null) {\n contents.roleList = deserializeAws_restJson1RoleListType(data.roleList, context);\n }\n return Promise.resolve(contents);\n};\nexports.deserializeAws_restJson1ListAccountRolesCommand = deserializeAws_restJson1ListAccountRolesCommand;\nconst deserializeAws_restJson1ListAccountRolesCommandError = async (output, context) => {\n const parsedOutput = {\n ...output,\n body: await parseBody(output.body, context),\n };\n let response;\n let errorCode = \"UnknownError\";\n errorCode = loadRestJsonErrorCode(output, parsedOutput.body);\n switch (errorCode) {\n case \"InvalidRequestException\":\n case \"com.amazonaws.sso#InvalidRequestException\":\n response = {\n ...(await deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context)),\n name: errorCode,\n $metadata: deserializeMetadata(output),\n };\n break;\n case \"ResourceNotFoundException\":\n case \"com.amazonaws.sso#ResourceNotFoundException\":\n response = {\n ...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)),\n name: errorCode,\n $metadata: deserializeMetadata(output),\n };\n break;\n case \"TooManyRequestsException\":\n case \"com.amazonaws.sso#TooManyRequestsException\":\n response = {\n ...(await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context)),\n name: errorCode,\n $metadata: deserializeMetadata(output),\n };\n break;\n case \"UnauthorizedException\":\n case \"com.amazonaws.sso#UnauthorizedException\":\n response = {\n ...(await deserializeAws_restJson1UnauthorizedExceptionResponse(parsedOutput, context)),\n name: errorCode,\n $metadata: deserializeMetadata(output),\n };\n break;\n default:\n const parsedBody = parsedOutput.body;\n errorCode = parsedBody.code || parsedBody.Code || errorCode;\n response = {\n ...parsedBody,\n name: `${errorCode}`,\n message: parsedBody.message || parsedBody.Message || errorCode,\n $fault: \"client\",\n $metadata: deserializeMetadata(output),\n };\n }\n const message = response.message || response.Message || errorCode;\n response.message = message;\n delete response.Message;\n return Promise.reject(Object.assign(new Error(message), response));\n};\nconst deserializeAws_restJson1ListAccountsCommand = async (output, context) => {\n if (output.statusCode !== 200 && output.statusCode >= 300) {\n return deserializeAws_restJson1ListAccountsCommandError(output, context);\n }\n const contents = {\n $metadata: deserializeMetadata(output),\n accountList: undefined,\n nextToken: undefined,\n };\n const data = smithy_client_1.expectNonNull(smithy_client_1.expectObject(await parseBody(output.body, context)), \"body\");\n if (data.accountList !== undefined && data.accountList !== null) {\n contents.accountList = deserializeAws_restJson1AccountListType(data.accountList, context);\n }\n if (data.nextToken !== undefined && data.nextToken !== null) {\n contents.nextToken = smithy_client_1.expectString(data.nextToken);\n }\n return Promise.resolve(contents);\n};\nexports.deserializeAws_restJson1ListAccountsCommand = deserializeAws_restJson1ListAccountsCommand;\nconst deserializeAws_restJson1ListAccountsCommandError = async (output, context) => {\n const parsedOutput = {\n ...output,\n body: await parseBody(output.body, context),\n };\n let response;\n let errorCode = \"UnknownError\";\n errorCode = loadRestJsonErrorCode(output, parsedOutput.body);\n switch (errorCode) {\n case \"InvalidRequestException\":\n case \"com.amazonaws.sso#InvalidRequestException\":\n response = {\n ...(await deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context)),\n name: errorCode,\n $metadata: deserializeMetadata(output),\n };\n break;\n case \"ResourceNotFoundException\":\n case \"com.amazonaws.sso#ResourceNotFoundException\":\n response = {\n ...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)),\n name: errorCode,\n $metadata: deserializeMetadata(output),\n };\n break;\n case \"TooManyRequestsException\":\n case \"com.amazonaws.sso#TooManyRequestsException\":\n response = {\n ...(await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context)),\n name: errorCode,\n $metadata: deserializeMetadata(output),\n };\n break;\n case \"UnauthorizedException\":\n case \"com.amazonaws.sso#UnauthorizedException\":\n response = {\n ...(await deserializeAws_restJson1UnauthorizedExceptionResponse(parsedOutput, context)),\n name: errorCode,\n $metadata: deserializeMetadata(output),\n };\n break;\n default:\n const parsedBody = parsedOutput.body;\n errorCode = parsedBody.code || parsedBody.Code || errorCode;\n response = {\n ...parsedBody,\n name: `${errorCode}`,\n message: parsedBody.message || parsedBody.Message || errorCode,\n $fault: \"client\",\n $metadata: deserializeMetadata(output),\n };\n }\n const message = response.message || response.Message || errorCode;\n response.message = message;\n delete response.Message;\n return Promise.reject(Object.assign(new Error(message), response));\n};\nconst deserializeAws_restJson1LogoutCommand = async (output, context) => {\n if (output.statusCode !== 200 && output.statusCode >= 300) {\n return deserializeAws_restJson1LogoutCommandError(output, context);\n }\n const contents = {\n $metadata: deserializeMetadata(output),\n };\n await collectBody(output.body, context);\n return Promise.resolve(contents);\n};\nexports.deserializeAws_restJson1LogoutCommand = deserializeAws_restJson1LogoutCommand;\nconst deserializeAws_restJson1LogoutCommandError = async (output, context) => {\n const parsedOutput = {\n ...output,\n body: await parseBody(output.body, context),\n };\n let response;\n let errorCode = \"UnknownError\";\n errorCode = loadRestJsonErrorCode(output, parsedOutput.body);\n switch (errorCode) {\n case \"InvalidRequestException\":\n case \"com.amazonaws.sso#InvalidRequestException\":\n response = {\n ...(await deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context)),\n name: errorCode,\n $metadata: deserializeMetadata(output),\n };\n break;\n case \"TooManyRequestsException\":\n case \"com.amazonaws.sso#TooManyRequestsException\":\n response = {\n ...(await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context)),\n name: errorCode,\n $metadata: deserializeMetadata(output),\n };\n break;\n case \"UnauthorizedException\":\n case \"com.amazonaws.sso#UnauthorizedException\":\n response = {\n ...(await deserializeAws_restJson1UnauthorizedExceptionResponse(parsedOutput, context)),\n name: errorCode,\n $metadata: deserializeMetadata(output),\n };\n break;\n default:\n const parsedBody = parsedOutput.body;\n errorCode = parsedBody.code || parsedBody.Code || errorCode;\n response = {\n ...parsedBody,\n name: `${errorCode}`,\n message: parsedBody.message || parsedBody.Message || errorCode,\n $fault: \"client\",\n $metadata: deserializeMetadata(output),\n };\n }\n const message = response.message || response.Message || errorCode;\n response.message = message;\n delete response.Message;\n return Promise.reject(Object.assign(new Error(message), response));\n};\nconst deserializeAws_restJson1InvalidRequestExceptionResponse = async (parsedOutput, context) => {\n const contents = {\n name: \"InvalidRequestException\",\n $fault: \"client\",\n $metadata: deserializeMetadata(parsedOutput),\n message: undefined,\n };\n const data = parsedOutput.body;\n if (data.message !== undefined && data.message !== null) {\n contents.message = smithy_client_1.expectString(data.message);\n }\n return contents;\n};\nconst deserializeAws_restJson1ResourceNotFoundExceptionResponse = async (parsedOutput, context) => {\n const contents = {\n name: \"ResourceNotFoundException\",\n $fault: \"client\",\n $metadata: deserializeMetadata(parsedOutput),\n message: undefined,\n };\n const data = parsedOutput.body;\n if (data.message !== undefined && data.message !== null) {\n contents.message = smithy_client_1.expectString(data.message);\n }\n return contents;\n};\nconst deserializeAws_restJson1TooManyRequestsExceptionResponse = async (parsedOutput, context) => {\n const contents = {\n name: \"TooManyRequestsException\",\n $fault: \"client\",\n $metadata: deserializeMetadata(parsedOutput),\n message: undefined,\n };\n const data = parsedOutput.body;\n if (data.message !== undefined && data.message !== null) {\n contents.message = smithy_client_1.expectString(data.message);\n }\n return contents;\n};\nconst deserializeAws_restJson1UnauthorizedExceptionResponse = async (parsedOutput, context) => {\n const contents = {\n name: \"UnauthorizedException\",\n $fault: \"client\",\n $metadata: deserializeMetadata(parsedOutput),\n message: undefined,\n };\n const data = parsedOutput.body;\n if (data.message !== undefined && data.message !== null) {\n contents.message = smithy_client_1.expectString(data.message);\n }\n return contents;\n};\nconst deserializeAws_restJson1AccountInfo = (output, context) => {\n return {\n accountId: smithy_client_1.expectString(output.accountId),\n accountName: smithy_client_1.expectString(output.accountName),\n emailAddress: smithy_client_1.expectString(output.emailAddress),\n };\n};\nconst deserializeAws_restJson1AccountListType = (output, context) => {\n return (output || [])\n .filter((e) => e != null)\n .map((entry) => {\n if (entry === null) {\n return null;\n }\n return deserializeAws_restJson1AccountInfo(entry, context);\n });\n};\nconst deserializeAws_restJson1RoleCredentials = (output, context) => {\n return {\n accessKeyId: smithy_client_1.expectString(output.accessKeyId),\n expiration: smithy_client_1.expectLong(output.expiration),\n secretAccessKey: smithy_client_1.expectString(output.secretAccessKey),\n sessionToken: smithy_client_1.expectString(output.sessionToken),\n };\n};\nconst deserializeAws_restJson1RoleInfo = (output, context) => {\n return {\n accountId: smithy_client_1.expectString(output.accountId),\n roleName: smithy_client_1.expectString(output.roleName),\n };\n};\nconst deserializeAws_restJson1RoleListType = (output, context) => {\n return (output || [])\n .filter((e) => e != null)\n .map((entry) => {\n if (entry === null) {\n return null;\n }\n return deserializeAws_restJson1RoleInfo(entry, context);\n });\n};\nconst deserializeMetadata = (output) => {\n var _a;\n return ({\n httpStatusCode: output.statusCode,\n requestId: (_a = output.headers[\"x-amzn-requestid\"]) !== null && _a !== void 0 ? _a : output.headers[\"x-amzn-request-id\"],\n extendedRequestId: output.headers[\"x-amz-id-2\"],\n cfId: output.headers[\"x-amz-cf-id\"],\n });\n};\n// Collect low-level response body stream to Uint8Array.\nconst collectBody = (streamBody = new Uint8Array(), context) => {\n if (streamBody instanceof Uint8Array) {\n return Promise.resolve(streamBody);\n }\n return context.streamCollector(streamBody) || Promise.resolve(new Uint8Array());\n};\n// Encode Uint8Array data into string with utf-8.\nconst collectBodyString = (streamBody, context) => collectBody(streamBody, context).then((body) => context.utf8Encoder(body));\nconst isSerializableHeaderValue = (value) => value !== undefined &&\n value !== null &&\n value !== \"\" &&\n (!Object.getOwnPropertyNames(value).includes(\"length\") || value.length != 0) &&\n (!Object.getOwnPropertyNames(value).includes(\"size\") || value.size != 0);\nconst parseBody = (streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {\n if (encoded.length) {\n return JSON.parse(encoded);\n }\n return {};\n});\n/**\n * Load an error code for the aws.rest-json-1.1 protocol.\n */\nconst 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 (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.code !== undefined) {\n return sanitizeErrorCode(data.code);\n }\n if (data[\"__type\"] !== undefined) {\n return sanitizeErrorCode(data[\"__type\"]);\n }\n return \"\";\n};\n//# sourceMappingURL=Aws_restJson1.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.getRuntimeConfig = void 0;\nconst tslib_1 = require(\"tslib\");\nconst package_json_1 = tslib_1.__importDefault(require(\"./package.json\"));\nconst config_resolver_1 = require(\"@aws-sdk/config-resolver\");\nconst hash_node_1 = require(\"@aws-sdk/hash-node\");\nconst middleware_retry_1 = require(\"@aws-sdk/middleware-retry\");\nconst node_config_provider_1 = require(\"@aws-sdk/node-config-provider\");\nconst node_http_handler_1 = require(\"@aws-sdk/node-http-handler\");\nconst util_base64_node_1 = require(\"@aws-sdk/util-base64-node\");\nconst util_body_length_node_1 = require(\"@aws-sdk/util-body-length-node\");\nconst util_user_agent_node_1 = require(\"@aws-sdk/util-user-agent-node\");\nconst util_utf8_node_1 = require(\"@aws-sdk/util-utf8-node\");\nconst runtimeConfig_shared_1 = require(\"./runtimeConfig.shared\");\nconst smithy_client_1 = require(\"@aws-sdk/smithy-client\");\n/**\n * @internal\n */\nconst getRuntimeConfig = (config) => {\n var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;\n smithy_client_1.emitWarningIfUnsupportedVersion(process.version);\n const clientSharedValues = runtimeConfig_shared_1.getRuntimeConfig(config);\n return {\n ...clientSharedValues,\n ...config,\n runtime: \"node\",\n base64Decoder: (_a = config === null || config === void 0 ? void 0 : config.base64Decoder) !== null && _a !== void 0 ? _a : util_base64_node_1.fromBase64,\n base64Encoder: (_b = config === null || config === void 0 ? void 0 : config.base64Encoder) !== null && _b !== void 0 ? _b : util_base64_node_1.toBase64,\n bodyLengthChecker: (_c = config === null || config === void 0 ? void 0 : config.bodyLengthChecker) !== null && _c !== void 0 ? _c : util_body_length_node_1.calculateBodyLength,\n defaultUserAgentProvider: (_d = config === null || config === void 0 ? void 0 : config.defaultUserAgentProvider) !== null && _d !== void 0 ? _d : util_user_agent_node_1.defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: package_json_1.default.version }),\n maxAttempts: (_e = config === null || config === void 0 ? void 0 : config.maxAttempts) !== null && _e !== void 0 ? _e : node_config_provider_1.loadConfig(middleware_retry_1.NODE_MAX_ATTEMPT_CONFIG_OPTIONS),\n region: (_f = config === null || config === void 0 ? void 0 : config.region) !== null && _f !== void 0 ? _f : node_config_provider_1.loadConfig(config_resolver_1.NODE_REGION_CONFIG_OPTIONS, config_resolver_1.NODE_REGION_CONFIG_FILE_OPTIONS),\n requestHandler: (_g = config === null || config === void 0 ? void 0 : config.requestHandler) !== null && _g !== void 0 ? _g : new node_http_handler_1.NodeHttpHandler(),\n retryMode: (_h = config === null || config === void 0 ? void 0 : config.retryMode) !== null && _h !== void 0 ? _h : node_config_provider_1.loadConfig(middleware_retry_1.NODE_RETRY_MODE_CONFIG_OPTIONS),\n sha256: (_j = config === null || config === void 0 ? void 0 : config.sha256) !== null && _j !== void 0 ? _j : hash_node_1.Hash.bind(null, \"sha256\"),\n streamCollector: (_k = config === null || config === void 0 ? void 0 : config.streamCollector) !== null && _k !== void 0 ? _k : node_http_handler_1.streamCollector,\n utf8Decoder: (_l = config === null || config === void 0 ? void 0 : config.utf8Decoder) !== null && _l !== void 0 ? _l : util_utf8_node_1.fromUtf8,\n utf8Encoder: (_m = config === null || config === void 0 ? void 0 : config.utf8Encoder) !== null && _m !== void 0 ? _m : util_utf8_node_1.toUtf8,\n };\n};\nexports.getRuntimeConfig = getRuntimeConfig;\n//# sourceMappingURL=runtimeConfig.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.getRuntimeConfig = void 0;\nconst endpoints_1 = require(\"./endpoints\");\nconst url_parser_1 = require(\"@aws-sdk/url-parser\");\n/**\n * @internal\n */\nconst getRuntimeConfig = (config) => {\n var _a, _b, _c, _d, _e;\n return ({\n apiVersion: \"2019-06-10\",\n disableHostPrefix: (_a = config === null || config === void 0 ? void 0 : config.disableHostPrefix) !== null && _a !== void 0 ? _a : false,\n logger: (_b = config === null || config === void 0 ? void 0 : config.logger) !== null && _b !== void 0 ? _b : {},\n regionInfoProvider: (_c = config === null || config === void 0 ? void 0 : config.regionInfoProvider) !== null && _c !== void 0 ? _c : endpoints_1.defaultRegionInfoProvider,\n serviceId: (_d = config === null || config === void 0 ? void 0 : config.serviceId) !== null && _d !== void 0 ? _d : \"SSO\",\n urlParser: (_e = config === null || config === void 0 ? void 0 : config.urlParser) !== null && _e !== void 0 ? _e : url_parser_1.parseUrl,\n });\n};\nexports.getRuntimeConfig = getRuntimeConfig;\n//# sourceMappingURL=runtimeConfig.shared.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.STS = void 0;\nconst STSClient_1 = require(\"./STSClient\");\nconst AssumeRoleCommand_1 = require(\"./commands/AssumeRoleCommand\");\nconst AssumeRoleWithSAMLCommand_1 = require(\"./commands/AssumeRoleWithSAMLCommand\");\nconst AssumeRoleWithWebIdentityCommand_1 = require(\"./commands/AssumeRoleWithWebIdentityCommand\");\nconst DecodeAuthorizationMessageCommand_1 = require(\"./commands/DecodeAuthorizationMessageCommand\");\nconst GetAccessKeyInfoCommand_1 = require(\"./commands/GetAccessKeyInfoCommand\");\nconst GetCallerIdentityCommand_1 = require(\"./commands/GetCallerIdentityCommand\");\nconst GetFederationTokenCommand_1 = require(\"./commands/GetFederationTokenCommand\");\nconst GetSessionTokenCommand_1 = require(\"./commands/GetSessionTokenCommand\");\n/**\n * Security Token Service\n *

Security Token Service (STS) enables you to request temporary, limited-privilege\n * credentials for Identity and Access Management (IAM) users or for users that you\n * authenticate (federated users). This guide provides descriptions of the STS API. For\n * more information about using this service, see Temporary Security Credentials.

\n */\nclass STS extends STSClient_1.STSClient {\n assumeRole(args, optionsOrCb, cb) {\n const command = new AssumeRoleCommand_1.AssumeRoleCommand(args);\n if (typeof optionsOrCb === \"function\") {\n this.send(command, optionsOrCb);\n }\n else if (typeof cb === \"function\") {\n if (typeof optionsOrCb !== \"object\")\n throw new Error(`Expect http options but get ${typeof optionsOrCb}`);\n this.send(command, optionsOrCb || {}, cb);\n }\n else {\n return this.send(command, optionsOrCb);\n }\n }\n assumeRoleWithSAML(args, optionsOrCb, cb) {\n const command = new AssumeRoleWithSAMLCommand_1.AssumeRoleWithSAMLCommand(args);\n if (typeof optionsOrCb === \"function\") {\n this.send(command, optionsOrCb);\n }\n else if (typeof cb === \"function\") {\n if (typeof optionsOrCb !== \"object\")\n throw new Error(`Expect http options but get ${typeof optionsOrCb}`);\n this.send(command, optionsOrCb || {}, cb);\n }\n else {\n return this.send(command, optionsOrCb);\n }\n }\n assumeRoleWithWebIdentity(args, optionsOrCb, cb) {\n const command = new AssumeRoleWithWebIdentityCommand_1.AssumeRoleWithWebIdentityCommand(args);\n if (typeof optionsOrCb === \"function\") {\n this.send(command, optionsOrCb);\n }\n else if (typeof cb === \"function\") {\n if (typeof optionsOrCb !== \"object\")\n throw new Error(`Expect http options but get ${typeof optionsOrCb}`);\n this.send(command, optionsOrCb || {}, cb);\n }\n else {\n return this.send(command, optionsOrCb);\n }\n }\n decodeAuthorizationMessage(args, optionsOrCb, cb) {\n const command = new DecodeAuthorizationMessageCommand_1.DecodeAuthorizationMessageCommand(args);\n if (typeof optionsOrCb === \"function\") {\n this.send(command, optionsOrCb);\n }\n else if (typeof cb === \"function\") {\n if (typeof optionsOrCb !== \"object\")\n throw new Error(`Expect http options but get ${typeof optionsOrCb}`);\n this.send(command, optionsOrCb || {}, cb);\n }\n else {\n return this.send(command, optionsOrCb);\n }\n }\n getAccessKeyInfo(args, optionsOrCb, cb) {\n const command = new GetAccessKeyInfoCommand_1.GetAccessKeyInfoCommand(args);\n if (typeof optionsOrCb === \"function\") {\n this.send(command, optionsOrCb);\n }\n else if (typeof cb === \"function\") {\n if (typeof optionsOrCb !== \"object\")\n throw new Error(`Expect http options but get ${typeof optionsOrCb}`);\n this.send(command, optionsOrCb || {}, cb);\n }\n else {\n return this.send(command, optionsOrCb);\n }\n }\n getCallerIdentity(args, optionsOrCb, cb) {\n const command = new GetCallerIdentityCommand_1.GetCallerIdentityCommand(args);\n if (typeof optionsOrCb === \"function\") {\n this.send(command, optionsOrCb);\n }\n else if (typeof cb === \"function\") {\n if (typeof optionsOrCb !== \"object\")\n throw new Error(`Expect http options but get ${typeof optionsOrCb}`);\n this.send(command, optionsOrCb || {}, cb);\n }\n else {\n return this.send(command, optionsOrCb);\n }\n }\n getFederationToken(args, optionsOrCb, cb) {\n const command = new GetFederationTokenCommand_1.GetFederationTokenCommand(args);\n if (typeof optionsOrCb === \"function\") {\n this.send(command, optionsOrCb);\n }\n else if (typeof cb === \"function\") {\n if (typeof optionsOrCb !== \"object\")\n throw new Error(`Expect http options but get ${typeof optionsOrCb}`);\n this.send(command, optionsOrCb || {}, cb);\n }\n else {\n return this.send(command, optionsOrCb);\n }\n }\n getSessionToken(args, optionsOrCb, cb) {\n const command = new GetSessionTokenCommand_1.GetSessionTokenCommand(args);\n if (typeof optionsOrCb === \"function\") {\n this.send(command, optionsOrCb);\n }\n else if (typeof cb === \"function\") {\n if (typeof optionsOrCb !== \"object\")\n throw new Error(`Expect http options but get ${typeof optionsOrCb}`);\n this.send(command, optionsOrCb || {}, cb);\n }\n else {\n return this.send(command, optionsOrCb);\n }\n }\n}\nexports.STS = STS;\n//# sourceMappingURL=STS.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.STSClient = void 0;\nconst runtimeConfig_1 = require(\"./runtimeConfig\");\nconst config_resolver_1 = require(\"@aws-sdk/config-resolver\");\nconst middleware_content_length_1 = require(\"@aws-sdk/middleware-content-length\");\nconst middleware_host_header_1 = require(\"@aws-sdk/middleware-host-header\");\nconst middleware_logger_1 = require(\"@aws-sdk/middleware-logger\");\nconst middleware_retry_1 = require(\"@aws-sdk/middleware-retry\");\nconst middleware_sdk_sts_1 = require(\"@aws-sdk/middleware-sdk-sts\");\nconst middleware_user_agent_1 = require(\"@aws-sdk/middleware-user-agent\");\nconst smithy_client_1 = require(\"@aws-sdk/smithy-client\");\n/**\n * Security Token Service\n *

Security Token Service (STS) enables you to request temporary, limited-privilege\n * credentials for Identity and Access Management (IAM) users or for users that you\n * authenticate (federated users). This guide provides descriptions of the STS API. For\n * more information about using this service, see Temporary Security Credentials.

\n */\nclass STSClient extends smithy_client_1.Client {\n constructor(configuration) {\n let _config_0 = runtimeConfig_1.getRuntimeConfig(configuration);\n let _config_1 = config_resolver_1.resolveRegionConfig(_config_0);\n let _config_2 = config_resolver_1.resolveEndpointsConfig(_config_1);\n let _config_3 = middleware_retry_1.resolveRetryConfig(_config_2);\n let _config_4 = middleware_host_header_1.resolveHostHeaderConfig(_config_3);\n let _config_5 = middleware_sdk_sts_1.resolveStsAuthConfig(_config_4, { stsClientCtor: STSClient });\n let _config_6 = middleware_user_agent_1.resolveUserAgentConfig(_config_5);\n super(_config_6);\n this.config = _config_6;\n this.middlewareStack.use(middleware_retry_1.getRetryPlugin(this.config));\n this.middlewareStack.use(middleware_content_length_1.getContentLengthPlugin(this.config));\n this.middlewareStack.use(middleware_host_header_1.getHostHeaderPlugin(this.config));\n this.middlewareStack.use(middleware_logger_1.getLoggerPlugin(this.config));\n this.middlewareStack.use(middleware_user_agent_1.getUserAgentPlugin(this.config));\n }\n /**\n * Destroy underlying resources, like sockets. It's usually not necessary to do this.\n * However in Node.js, it's best to explicitly shut down the client's agent when it is no longer needed.\n * Otherwise, sockets might stay open for quite a long time before the server terminates them.\n */\n destroy() {\n super.destroy();\n }\n}\nexports.STSClient = STSClient;\n//# sourceMappingURL=STSClient.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.AssumeRoleCommand = void 0;\nconst models_0_1 = require(\"../models/models_0\");\nconst Aws_query_1 = require(\"../protocols/Aws_query\");\nconst middleware_serde_1 = require(\"@aws-sdk/middleware-serde\");\nconst middleware_signing_1 = require(\"@aws-sdk/middleware-signing\");\nconst smithy_client_1 = require(\"@aws-sdk/smithy-client\");\n/**\n *

Returns a set of temporary security credentials that you can use to access Amazon Web Services\n * resources that you might not normally have access to. These temporary credentials\n * consist of an access key ID, a secret access key, and a security token. Typically, you\n * use AssumeRole within your account or for cross-account access. For a\n * comparison of AssumeRole with other API operations that produce temporary\n * credentials, see Requesting Temporary Security\n * Credentials and Comparing\n * the STS API operations in the\n * IAM User Guide.

\n *

\n * Permissions\n *

\n *

The temporary security credentials created by AssumeRole can be used to\n * make API calls to any Amazon Web Services service with the following exception: You cannot call the\n * STS GetFederationToken or GetSessionToken API\n * operations.

\n *

(Optional) You can pass inline or managed session policies to\n * this operation. You can pass a single JSON policy document to use as an inline session\n * policy. You can also specify up to 10 managed policies to use as managed session policies.\n * The plaintext that you use for both inline and managed session policies can't exceed 2,048\n * characters. Passing policies to this operation returns new\n * temporary credentials. The resulting session's permissions are the intersection of the\n * role's identity-based policy and the session policies. You can use the role's temporary\n * credentials in subsequent Amazon Web Services API calls to access resources in the account that owns\n * the role. You cannot use session policies to grant more permissions than those allowed\n * by the identity-based policy of the role that is being assumed. For more information, see\n * Session\n * Policies in the IAM User Guide.

\n *

To assume a role from a different account, your account must be trusted by the\n * role. The trust relationship is defined in the role's trust policy when the role is\n * created. That trust policy states which accounts are allowed to delegate that access to\n * users in the account.

\n *

A user who wants to access a role in a different account must also have permissions that\n * are delegated from the user account administrator. The administrator must attach a policy\n * that allows the user to call AssumeRole for the ARN of the role in the other\n * account. If the user is in the same account as the role, then you can do either of the\n * following:

\n * \n *

In this case, the trust policy acts as an IAM resource-based policy. Users in the same\n * account as the role do not need explicit permission to assume the role. For more\n * information about trust policies and resource-based policies, see IAM Policies in\n * the IAM User Guide.

\n *

\n * Tags\n *

\n *

(Optional) You can pass tag key-value pairs to your session. These tags are called\n * session tags. For more information about session tags, see Passing Session Tags in STS in the\n * IAM User Guide.

\n *

An administrator must grant you the permissions necessary to pass session tags. The\n * administrator can also create granular permissions to allow you to pass only specific\n * session tags. For more information, see Tutorial: Using Tags\n * for Attribute-Based Access Control in the\n * IAM User Guide.

\n *

You can set the session tags as transitive. Transitive tags persist during role\n * chaining. For more information, see Chaining Roles\n * with Session Tags in the IAM User Guide.

\n *

\n * Using MFA with AssumeRole\n *

\n *

(Optional) You can include multi-factor authentication (MFA) information when you call\n * AssumeRole. This is useful for cross-account scenarios to ensure that the\n * user that assumes the role has been authenticated with an Amazon Web Services MFA device. In that\n * scenario, the trust policy of the role being assumed includes a condition that tests for\n * MFA authentication. If the caller does not include valid MFA information, the request to\n * assume the role is denied. The condition in a trust policy that tests for MFA\n * authentication might look like the following example.

\n *

\n * \"Condition\": {\"Bool\": {\"aws:MultiFactorAuthPresent\": true}}\n *

\n *

For more information, see Configuring MFA-Protected API Access\n * in the IAM User Guide guide.

\n *

To use MFA with AssumeRole, you pass values for the\n * SerialNumber and TokenCode parameters. The\n * SerialNumber value identifies the user's hardware or virtual MFA device.\n * The TokenCode is the time-based one-time password (TOTP) that the MFA device\n * produces.

\n * @example\n * Use a bare-bones client and the command you need to make an API call.\n * ```javascript\n * import { STSClient, AssumeRoleCommand } from \"@aws-sdk/client-sts\"; // ES Modules import\n * // const { STSClient, AssumeRoleCommand } = require(\"@aws-sdk/client-sts\"); // CommonJS import\n * const client = new STSClient(config);\n * const command = new AssumeRoleCommand(input);\n * const response = await client.send(command);\n * ```\n *\n * @see {@link AssumeRoleCommandInput} for command's `input` shape.\n * @see {@link AssumeRoleCommandOutput} for command's `response` shape.\n * @see {@link STSClientResolvedConfig | config} for command's `input` shape.\n *\n */\nclass AssumeRoleCommand extends smithy_client_1.Command {\n // Start section: command_properties\n // End section: command_properties\n constructor(input) {\n // Start section: command_constructor\n super();\n this.input = input;\n // End section: command_constructor\n }\n /**\n * @internal\n */\n resolveMiddleware(clientStack, configuration, options) {\n this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize));\n this.middlewareStack.use(middleware_signing_1.getAwsAuthPlugin(configuration));\n const stack = clientStack.concat(this.middlewareStack);\n const { logger } = configuration;\n const clientName = \"STSClient\";\n const commandName = \"AssumeRoleCommand\";\n const handlerExecutionContext = {\n logger,\n clientName,\n commandName,\n inputFilterSensitiveLog: models_0_1.AssumeRoleRequest.filterSensitiveLog,\n outputFilterSensitiveLog: models_0_1.AssumeRoleResponse.filterSensitiveLog,\n };\n const { requestHandler } = configuration;\n return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);\n }\n serialize(input, context) {\n return Aws_query_1.serializeAws_queryAssumeRoleCommand(input, context);\n }\n deserialize(output, context) {\n return Aws_query_1.deserializeAws_queryAssumeRoleCommand(output, context);\n }\n}\nexports.AssumeRoleCommand = AssumeRoleCommand;\n//# sourceMappingURL=AssumeRoleCommand.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.AssumeRoleWithSAMLCommand = void 0;\nconst models_0_1 = require(\"../models/models_0\");\nconst Aws_query_1 = require(\"../protocols/Aws_query\");\nconst middleware_serde_1 = require(\"@aws-sdk/middleware-serde\");\nconst smithy_client_1 = require(\"@aws-sdk/smithy-client\");\n/**\n *

Returns a set of temporary security credentials for users who have been authenticated\n * via a SAML authentication response. This operation provides a mechanism for tying an\n * enterprise identity store or directory to role-based Amazon Web Services access without user-specific\n * credentials or configuration. For a comparison of AssumeRoleWithSAML with the\n * other API operations that produce temporary credentials, see Requesting Temporary Security\n * Credentials and Comparing the\n * STS API operations in the IAM User Guide.

\n *

The temporary security credentials returned by this operation consist of an access key\n * ID, a secret access key, and a security token. Applications can use these temporary\n * security credentials to sign calls to Amazon Web Services services.

\n *

\n * Session Duration\n *

\n *

By default, the temporary security credentials created by\n * AssumeRoleWithSAML last for one hour. However, you can use the optional\n * DurationSeconds parameter to specify the duration of your session. Your\n * role session lasts for the duration that you specify, or until the time specified in the\n * SAML authentication response's SessionNotOnOrAfter value, whichever is\n * shorter. You can provide a DurationSeconds value from 900 seconds (15 minutes)\n * up to the maximum session duration setting for the role. This setting can have a value from\n * 1 hour to 12 hours. To learn how to view the maximum value for your role, see View the\n * Maximum Session Duration Setting for a Role in the\n * IAM User Guide. The maximum session duration limit applies when\n * you use the AssumeRole* API operations or the assume-role* CLI\n * commands. However the limit does not apply when you use those operations to create a\n * console URL. For more information, see Using IAM Roles in the\n * IAM User Guide.

\n * \n *

\n * Role chaining limits your CLI or Amazon Web Services API\n * role session to a maximum of one hour. When you use the AssumeRole API\n * operation to assume a role, you can specify the duration of your role session with\n * the DurationSeconds parameter. You can specify a parameter value of up\n * to 43200 seconds (12 hours), depending on the maximum session duration setting for\n * your role. However, if you assume a role using role chaining and provide a\n * DurationSeconds parameter value greater than one hour, the\n * operation fails.

\n *
\n *

\n * Permissions\n *

\n *

The temporary security credentials created by AssumeRoleWithSAML can be\n * used to make API calls to any Amazon Web Services service with the following exception: you cannot call\n * the STS GetFederationToken or GetSessionToken API\n * operations.

\n *

(Optional) You can pass inline or managed session policies to\n * this operation. You can pass a single JSON policy document to use as an inline session\n * policy. You can also specify up to 10 managed policies to use as managed session policies.\n * The plaintext that you use for both inline and managed session policies can't exceed 2,048\n * characters. Passing policies to this operation returns new\n * temporary credentials. The resulting session's permissions are the intersection of the\n * role's identity-based policy and the session policies. You can use the role's temporary\n * credentials in subsequent Amazon Web Services API calls to access resources in the account that owns\n * the role. You cannot use session policies to grant more permissions than those allowed\n * by the identity-based policy of the role that is being assumed. For more information, see\n * Session\n * Policies in the IAM User Guide.

\n *

Calling AssumeRoleWithSAML does not require the use of Amazon Web Services security\n * credentials. The identity of the caller is validated by using keys in the metadata document\n * that is uploaded for the SAML provider entity for your identity provider.

\n * \n *

Calling AssumeRoleWithSAML can result in an entry in your CloudTrail logs.\n * The entry includes the value in the NameID element of the SAML assertion.\n * We recommend that you use a NameIDType that is not associated with any\n * personally identifiable information (PII). For example, you could instead use the\n * persistent identifier\n * (urn:oasis:names:tc:SAML:2.0:nameid-format:persistent).

\n *
\n *

\n * Tags\n *

\n *

(Optional) You can configure your IdP to pass attributes into your SAML assertion as\n * session tags. Each session tag consists of a key name and an associated value. For more\n * information about session tags, see Passing Session Tags in STS in the\n * IAM User Guide.

\n *

You can pass up to 50 session tags. The plaintext session tag keys can’t exceed 128\n * characters and the values can’t exceed 256 characters. For these and additional limits, see\n * IAM\n * and STS Character Limits in the IAM User Guide.

\n *\n * \n *

An Amazon Web Services conversion compresses the passed session policies and session tags into a\n * packed binary format that has a separate limit. Your request can fail for this limit\n * even if your plaintext meets the other requirements. The PackedPolicySize\n * response element indicates by percentage how close the policies and tags for your\n * request are to the upper size limit.\n *

\n *
\n *

You can pass a session tag with the same key as a tag that is\n * attached to the role. When you do, session tags override the role's tags with the same\n * key.

\n *

An administrator must grant you the permissions necessary to pass session tags. The\n * administrator can also create granular permissions to allow you to pass only specific\n * session tags. For more information, see Tutorial: Using Tags\n * for Attribute-Based Access Control in the\n * IAM User Guide.

\n *

You can set the session tags as transitive. Transitive tags persist during role\n * chaining. For more information, see Chaining Roles\n * with Session Tags in the IAM User Guide.

\n *

\n * SAML Configuration\n *

\n *

Before your application can call AssumeRoleWithSAML, you must configure\n * your SAML identity provider (IdP) to issue the claims required by Amazon Web Services. Additionally, you\n * must use Identity and Access Management (IAM) to create a SAML provider entity in your Amazon Web Services account that\n * represents your identity provider. You must also create an IAM role that specifies this\n * SAML provider in its trust policy.

\n *

For more information, see the following resources:

\n * \n * @example\n * Use a bare-bones client and the command you need to make an API call.\n * ```javascript\n * import { STSClient, AssumeRoleWithSAMLCommand } from \"@aws-sdk/client-sts\"; // ES Modules import\n * // const { STSClient, AssumeRoleWithSAMLCommand } = require(\"@aws-sdk/client-sts\"); // CommonJS import\n * const client = new STSClient(config);\n * const command = new AssumeRoleWithSAMLCommand(input);\n * const response = await client.send(command);\n * ```\n *\n * @see {@link AssumeRoleWithSAMLCommandInput} for command's `input` shape.\n * @see {@link AssumeRoleWithSAMLCommandOutput} for command's `response` shape.\n * @see {@link STSClientResolvedConfig | config} for command's `input` shape.\n *\n */\nclass AssumeRoleWithSAMLCommand extends smithy_client_1.Command {\n // Start section: command_properties\n // End section: command_properties\n constructor(input) {\n // Start section: command_constructor\n super();\n this.input = input;\n // End section: command_constructor\n }\n /**\n * @internal\n */\n resolveMiddleware(clientStack, configuration, options) {\n this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize));\n const stack = clientStack.concat(this.middlewareStack);\n const { logger } = configuration;\n const clientName = \"STSClient\";\n const commandName = \"AssumeRoleWithSAMLCommand\";\n const handlerExecutionContext = {\n logger,\n clientName,\n commandName,\n inputFilterSensitiveLog: models_0_1.AssumeRoleWithSAMLRequest.filterSensitiveLog,\n outputFilterSensitiveLog: models_0_1.AssumeRoleWithSAMLResponse.filterSensitiveLog,\n };\n const { requestHandler } = configuration;\n return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);\n }\n serialize(input, context) {\n return Aws_query_1.serializeAws_queryAssumeRoleWithSAMLCommand(input, context);\n }\n deserialize(output, context) {\n return Aws_query_1.deserializeAws_queryAssumeRoleWithSAMLCommand(output, context);\n }\n}\nexports.AssumeRoleWithSAMLCommand = AssumeRoleWithSAMLCommand;\n//# sourceMappingURL=AssumeRoleWithSAMLCommand.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.AssumeRoleWithWebIdentityCommand = void 0;\nconst models_0_1 = require(\"../models/models_0\");\nconst Aws_query_1 = require(\"../protocols/Aws_query\");\nconst middleware_serde_1 = require(\"@aws-sdk/middleware-serde\");\nconst smithy_client_1 = require(\"@aws-sdk/smithy-client\");\n/**\n *

Returns a set of temporary security credentials for users who have been authenticated in\n * a mobile or web application with a web identity provider. Example providers include Amazon Cognito,\n * Login with Amazon, Facebook, Google, or any OpenID Connect-compatible identity\n * provider.

\n * \n *

For mobile applications, we recommend that you use Amazon Cognito. You can use Amazon Cognito with the\n * Amazon Web Services SDK for iOS Developer Guide and the Amazon Web Services SDK for Android Developer Guide to uniquely\n * identify a user. You can also supply the user with a consistent identity throughout the\n * lifetime of an application.

\n *

To learn more about Amazon Cognito, see Amazon Cognito Overview in\n * Amazon Web Services SDK for Android Developer Guide and Amazon Cognito Overview in the\n * Amazon Web Services SDK for iOS Developer Guide.

\n *
\n *

Calling AssumeRoleWithWebIdentity does not require the use of Amazon Web Services\n * security credentials. Therefore, you can distribute an application (for example, on mobile\n * devices) that requests temporary security credentials without including long-term Amazon Web Services\n * credentials in the application. You also don't need to deploy server-based proxy services\n * that use long-term Amazon Web Services credentials. Instead, the identity of the caller is validated by\n * using a token from the web identity provider. For a comparison of\n * AssumeRoleWithWebIdentity with the other API operations that produce\n * temporary credentials, see Requesting Temporary Security\n * Credentials and Comparing the\n * STS API operations in the IAM User Guide.

\n *

The temporary security credentials returned by this API consist of an access key ID, a\n * secret access key, and a security token. Applications can use these temporary security\n * credentials to sign calls to Amazon Web Services service API operations.

\n *

\n * Session Duration\n *

\n *

By default, the temporary security credentials created by\n * AssumeRoleWithWebIdentity last for one hour. However, you can use the\n * optional DurationSeconds parameter to specify the duration of your session.\n * You can provide a value from 900 seconds (15 minutes) up to the maximum session duration\n * setting for the role. This setting can have a value from 1 hour to 12 hours. To learn how\n * to view the maximum value for your role, see View the\n * Maximum Session Duration Setting for a Role in the\n * IAM User Guide. The maximum session duration limit applies when\n * you use the AssumeRole* API operations or the assume-role* CLI\n * commands. However the limit does not apply when you use those operations to create a\n * console URL. For more information, see Using IAM Roles in the\n * IAM User Guide.

\n *

\n * Permissions\n *

\n *

The temporary security credentials created by AssumeRoleWithWebIdentity can\n * be used to make API calls to any Amazon Web Services service with the following exception: you cannot\n * call the STS GetFederationToken or GetSessionToken API\n * operations.

\n *

(Optional) You can pass inline or managed session policies to\n * this operation. You can pass a single JSON policy document to use as an inline session\n * policy. You can also specify up to 10 managed policies to use as managed session policies.\n * The plaintext that you use for both inline and managed session policies can't exceed 2,048\n * characters. Passing policies to this operation returns new\n * temporary credentials. The resulting session's permissions are the intersection of the\n * role's identity-based policy and the session policies. You can use the role's temporary\n * credentials in subsequent Amazon Web Services API calls to access resources in the account that owns\n * the role. You cannot use session policies to grant more permissions than those allowed\n * by the identity-based policy of the role that is being assumed. For more information, see\n * Session\n * Policies in the IAM User Guide.

\n *

\n * Tags\n *

\n *

(Optional) You can configure your IdP to pass attributes into your web identity token as\n * session tags. Each session tag consists of a key name and an associated value. For more\n * information about session tags, see Passing Session Tags in STS in the\n * IAM User Guide.

\n *

You can pass up to 50 session tags. The plaintext session tag keys can’t exceed 128\n * characters and the values can’t exceed 256 characters. For these and additional limits, see\n * IAM\n * and STS Character Limits in the IAM User Guide.

\n *\n * \n *

An Amazon Web Services conversion compresses the passed session policies and session tags into a\n * packed binary format that has a separate limit. Your request can fail for this limit\n * even if your plaintext meets the other requirements. The PackedPolicySize\n * response element indicates by percentage how close the policies and tags for your\n * request are to the upper size limit.\n *

\n *
\n *

You can pass a session tag with the same key as a tag that is\n * attached to the role. When you do, the session tag overrides the role tag with the same\n * key.

\n *

An administrator must grant you the permissions necessary to pass session tags. The\n * administrator can also create granular permissions to allow you to pass only specific\n * session tags. For more information, see Tutorial: Using Tags\n * for Attribute-Based Access Control in the\n * IAM User Guide.

\n *

You can set the session tags as transitive. Transitive tags persist during role\n * chaining. For more information, see Chaining Roles\n * with Session Tags in the IAM User Guide.

\n *

\n * Identities\n *

\n *

Before your application can call AssumeRoleWithWebIdentity, you must have\n * an identity token from a supported identity provider and create a role that the application\n * can assume. The role that your application assumes must trust the identity provider that is\n * associated with the identity token. In other words, the identity provider must be specified\n * in the role's trust policy.

\n * \n *

Calling AssumeRoleWithWebIdentity can result in an entry in your\n * CloudTrail logs. The entry includes the Subject of\n * the provided web identity token. We recommend that you avoid using any personally\n * identifiable information (PII) in this field. For example, you could instead use a GUID\n * or a pairwise identifier, as suggested\n * in the OIDC specification.

\n *
\n *

For more information about how to use web identity federation and the\n * AssumeRoleWithWebIdentity API, see the following resources:

\n * \n * @example\n * Use a bare-bones client and the command you need to make an API call.\n * ```javascript\n * import { STSClient, AssumeRoleWithWebIdentityCommand } from \"@aws-sdk/client-sts\"; // ES Modules import\n * // const { STSClient, AssumeRoleWithWebIdentityCommand } = require(\"@aws-sdk/client-sts\"); // CommonJS import\n * const client = new STSClient(config);\n * const command = new AssumeRoleWithWebIdentityCommand(input);\n * const response = await client.send(command);\n * ```\n *\n * @see {@link AssumeRoleWithWebIdentityCommandInput} for command's `input` shape.\n * @see {@link AssumeRoleWithWebIdentityCommandOutput} for command's `response` shape.\n * @see {@link STSClientResolvedConfig | config} for command's `input` shape.\n *\n */\nclass AssumeRoleWithWebIdentityCommand extends smithy_client_1.Command {\n // Start section: command_properties\n // End section: command_properties\n constructor(input) {\n // Start section: command_constructor\n super();\n this.input = input;\n // End section: command_constructor\n }\n /**\n * @internal\n */\n resolveMiddleware(clientStack, configuration, options) {\n this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize));\n const stack = clientStack.concat(this.middlewareStack);\n const { logger } = configuration;\n const clientName = \"STSClient\";\n const commandName = \"AssumeRoleWithWebIdentityCommand\";\n const handlerExecutionContext = {\n logger,\n clientName,\n commandName,\n inputFilterSensitiveLog: models_0_1.AssumeRoleWithWebIdentityRequest.filterSensitiveLog,\n outputFilterSensitiveLog: models_0_1.AssumeRoleWithWebIdentityResponse.filterSensitiveLog,\n };\n const { requestHandler } = configuration;\n return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);\n }\n serialize(input, context) {\n return Aws_query_1.serializeAws_queryAssumeRoleWithWebIdentityCommand(input, context);\n }\n deserialize(output, context) {\n return Aws_query_1.deserializeAws_queryAssumeRoleWithWebIdentityCommand(output, context);\n }\n}\nexports.AssumeRoleWithWebIdentityCommand = AssumeRoleWithWebIdentityCommand;\n//# sourceMappingURL=AssumeRoleWithWebIdentityCommand.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.DecodeAuthorizationMessageCommand = void 0;\nconst models_0_1 = require(\"../models/models_0\");\nconst Aws_query_1 = require(\"../protocols/Aws_query\");\nconst middleware_serde_1 = require(\"@aws-sdk/middleware-serde\");\nconst middleware_signing_1 = require(\"@aws-sdk/middleware-signing\");\nconst smithy_client_1 = require(\"@aws-sdk/smithy-client\");\n/**\n *

Decodes additional information about the authorization status of a request from an\n * encoded message returned in response to an Amazon Web Services request.

\n *

For example, if a user is not authorized to perform an operation that he or she has\n * requested, the request returns a Client.UnauthorizedOperation response (an\n * HTTP 403 response). Some Amazon Web Services operations additionally return an encoded message that can\n * provide details about this authorization failure.

\n * \n *

Only certain Amazon Web Services operations return an encoded authorization message. The\n * documentation for an individual operation indicates whether that operation returns an\n * encoded message in addition to returning an HTTP code.

\n *
\n *

The message is encoded because the details of the authorization status can constitute\n * privileged information that the user who requested the operation should not see. To decode\n * an authorization status message, a user must be granted permissions via an IAM policy to\n * request the DecodeAuthorizationMessage\n * (sts:DecodeAuthorizationMessage) action.

\n *

The decoded message includes the following type of information:

\n * \n * @example\n * Use a bare-bones client and the command you need to make an API call.\n * ```javascript\n * import { STSClient, DecodeAuthorizationMessageCommand } from \"@aws-sdk/client-sts\"; // ES Modules import\n * // const { STSClient, DecodeAuthorizationMessageCommand } = require(\"@aws-sdk/client-sts\"); // CommonJS import\n * const client = new STSClient(config);\n * const command = new DecodeAuthorizationMessageCommand(input);\n * const response = await client.send(command);\n * ```\n *\n * @see {@link DecodeAuthorizationMessageCommandInput} for command's `input` shape.\n * @see {@link DecodeAuthorizationMessageCommandOutput} for command's `response` shape.\n * @see {@link STSClientResolvedConfig | config} for command's `input` shape.\n *\n */\nclass DecodeAuthorizationMessageCommand extends smithy_client_1.Command {\n // Start section: command_properties\n // End section: command_properties\n constructor(input) {\n // Start section: command_constructor\n super();\n this.input = input;\n // End section: command_constructor\n }\n /**\n * @internal\n */\n resolveMiddleware(clientStack, configuration, options) {\n this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize));\n this.middlewareStack.use(middleware_signing_1.getAwsAuthPlugin(configuration));\n const stack = clientStack.concat(this.middlewareStack);\n const { logger } = configuration;\n const clientName = \"STSClient\";\n const commandName = \"DecodeAuthorizationMessageCommand\";\n const handlerExecutionContext = {\n logger,\n clientName,\n commandName,\n inputFilterSensitiveLog: models_0_1.DecodeAuthorizationMessageRequest.filterSensitiveLog,\n outputFilterSensitiveLog: models_0_1.DecodeAuthorizationMessageResponse.filterSensitiveLog,\n };\n const { requestHandler } = configuration;\n return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);\n }\n serialize(input, context) {\n return Aws_query_1.serializeAws_queryDecodeAuthorizationMessageCommand(input, context);\n }\n deserialize(output, context) {\n return Aws_query_1.deserializeAws_queryDecodeAuthorizationMessageCommand(output, context);\n }\n}\nexports.DecodeAuthorizationMessageCommand = DecodeAuthorizationMessageCommand;\n//# sourceMappingURL=DecodeAuthorizationMessageCommand.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.GetAccessKeyInfoCommand = void 0;\nconst models_0_1 = require(\"../models/models_0\");\nconst Aws_query_1 = require(\"../protocols/Aws_query\");\nconst middleware_serde_1 = require(\"@aws-sdk/middleware-serde\");\nconst middleware_signing_1 = require(\"@aws-sdk/middleware-signing\");\nconst smithy_client_1 = require(\"@aws-sdk/smithy-client\");\n/**\n *

Returns the account identifier for the specified access key ID.

\n *

Access keys consist of two parts: an access key ID (for example,\n * AKIAIOSFODNN7EXAMPLE) and a secret access key (for example,\n * wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY). For more information about\n * access keys, see Managing Access Keys for IAM\n * Users in the IAM User Guide.

\n *

When you pass an access key ID to this operation, it returns the ID of the Amazon Web Services\n * account to which the keys belong. Access key IDs beginning with AKIA are\n * long-term credentials for an IAM user or the Amazon Web Services account root user. Access key IDs\n * beginning with ASIA are temporary credentials that are created using STS\n * operations. If the account in the response belongs to you, you can sign in as the root\n * user and review your root user access keys. Then, you can pull a credentials report to learn which IAM user owns the keys. To learn who\n * requested the temporary credentials for an ASIA access key, view the STS\n * events in your CloudTrail logs in the\n * IAM User Guide.

\n *

This operation does not indicate the state of the access key. The key might be active,\n * inactive, or deleted. Active keys might not have permissions to perform an operation.\n * Providing a deleted access key might return an error that the key doesn't exist.

\n * @example\n * Use a bare-bones client and the command you need to make an API call.\n * ```javascript\n * import { STSClient, GetAccessKeyInfoCommand } from \"@aws-sdk/client-sts\"; // ES Modules import\n * // const { STSClient, GetAccessKeyInfoCommand } = require(\"@aws-sdk/client-sts\"); // CommonJS import\n * const client = new STSClient(config);\n * const command = new GetAccessKeyInfoCommand(input);\n * const response = await client.send(command);\n * ```\n *\n * @see {@link GetAccessKeyInfoCommandInput} for command's `input` shape.\n * @see {@link GetAccessKeyInfoCommandOutput} for command's `response` shape.\n * @see {@link STSClientResolvedConfig | config} for command's `input` shape.\n *\n */\nclass GetAccessKeyInfoCommand extends smithy_client_1.Command {\n // Start section: command_properties\n // End section: command_properties\n constructor(input) {\n // Start section: command_constructor\n super();\n this.input = input;\n // End section: command_constructor\n }\n /**\n * @internal\n */\n resolveMiddleware(clientStack, configuration, options) {\n this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize));\n this.middlewareStack.use(middleware_signing_1.getAwsAuthPlugin(configuration));\n const stack = clientStack.concat(this.middlewareStack);\n const { logger } = configuration;\n const clientName = \"STSClient\";\n const commandName = \"GetAccessKeyInfoCommand\";\n const handlerExecutionContext = {\n logger,\n clientName,\n commandName,\n inputFilterSensitiveLog: models_0_1.GetAccessKeyInfoRequest.filterSensitiveLog,\n outputFilterSensitiveLog: models_0_1.GetAccessKeyInfoResponse.filterSensitiveLog,\n };\n const { requestHandler } = configuration;\n return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);\n }\n serialize(input, context) {\n return Aws_query_1.serializeAws_queryGetAccessKeyInfoCommand(input, context);\n }\n deserialize(output, context) {\n return Aws_query_1.deserializeAws_queryGetAccessKeyInfoCommand(output, context);\n }\n}\nexports.GetAccessKeyInfoCommand = GetAccessKeyInfoCommand;\n//# sourceMappingURL=GetAccessKeyInfoCommand.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.GetCallerIdentityCommand = void 0;\nconst models_0_1 = require(\"../models/models_0\");\nconst Aws_query_1 = require(\"../protocols/Aws_query\");\nconst middleware_serde_1 = require(\"@aws-sdk/middleware-serde\");\nconst middleware_signing_1 = require(\"@aws-sdk/middleware-signing\");\nconst smithy_client_1 = require(\"@aws-sdk/smithy-client\");\n/**\n *

Returns details about the IAM user or role whose credentials are used to call the\n * operation.

\n * \n *

No permissions are required to perform this operation. If an administrator adds a\n * policy to your IAM user or role that explicitly denies access to the\n * sts:GetCallerIdentity action, you can still perform this operation.\n * Permissions are not required because the same information is returned when an IAM\n * user or role is denied access. To view an example response, see I Am Not Authorized to Perform: iam:DeleteVirtualMFADevice in the\n * IAM User Guide.

\n *
\n * @example\n * Use a bare-bones client and the command you need to make an API call.\n * ```javascript\n * import { STSClient, GetCallerIdentityCommand } from \"@aws-sdk/client-sts\"; // ES Modules import\n * // const { STSClient, GetCallerIdentityCommand } = require(\"@aws-sdk/client-sts\"); // CommonJS import\n * const client = new STSClient(config);\n * const command = new GetCallerIdentityCommand(input);\n * const response = await client.send(command);\n * ```\n *\n * @see {@link GetCallerIdentityCommandInput} for command's `input` shape.\n * @see {@link GetCallerIdentityCommandOutput} for command's `response` shape.\n * @see {@link STSClientResolvedConfig | config} for command's `input` shape.\n *\n */\nclass GetCallerIdentityCommand extends smithy_client_1.Command {\n // Start section: command_properties\n // End section: command_properties\n constructor(input) {\n // Start section: command_constructor\n super();\n this.input = input;\n // End section: command_constructor\n }\n /**\n * @internal\n */\n resolveMiddleware(clientStack, configuration, options) {\n this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize));\n this.middlewareStack.use(middleware_signing_1.getAwsAuthPlugin(configuration));\n const stack = clientStack.concat(this.middlewareStack);\n const { logger } = configuration;\n const clientName = \"STSClient\";\n const commandName = \"GetCallerIdentityCommand\";\n const handlerExecutionContext = {\n logger,\n clientName,\n commandName,\n inputFilterSensitiveLog: models_0_1.GetCallerIdentityRequest.filterSensitiveLog,\n outputFilterSensitiveLog: models_0_1.GetCallerIdentityResponse.filterSensitiveLog,\n };\n const { requestHandler } = configuration;\n return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);\n }\n serialize(input, context) {\n return Aws_query_1.serializeAws_queryGetCallerIdentityCommand(input, context);\n }\n deserialize(output, context) {\n return Aws_query_1.deserializeAws_queryGetCallerIdentityCommand(output, context);\n }\n}\nexports.GetCallerIdentityCommand = GetCallerIdentityCommand;\n//# sourceMappingURL=GetCallerIdentityCommand.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.GetFederationTokenCommand = void 0;\nconst models_0_1 = require(\"../models/models_0\");\nconst Aws_query_1 = require(\"../protocols/Aws_query\");\nconst middleware_serde_1 = require(\"@aws-sdk/middleware-serde\");\nconst middleware_signing_1 = require(\"@aws-sdk/middleware-signing\");\nconst smithy_client_1 = require(\"@aws-sdk/smithy-client\");\n/**\n *

Returns a set of temporary security credentials (consisting of an access key ID, a\n * secret access key, and a security token) for a federated user. A typical use is in a proxy\n * application that gets temporary security credentials on behalf of distributed applications\n * inside a corporate network. You must call the GetFederationToken operation\n * using the long-term security credentials of an IAM user. As a result, this call is\n * appropriate in contexts where those credentials can be safely stored, usually in a\n * server-based application. For a comparison of GetFederationToken with the\n * other API operations that produce temporary credentials, see Requesting Temporary Security\n * Credentials and Comparing the\n * STS API operations in the IAM User Guide.

\n * \n *

You can create a mobile-based or browser-based app that can authenticate users using\n * a web identity provider like Login with Amazon, Facebook, Google, or an OpenID\n * Connect-compatible identity provider. In this case, we recommend that you use Amazon Cognito or\n * AssumeRoleWithWebIdentity. For more information, see Federation Through a Web-based Identity Provider in the\n * IAM User Guide.

\n *
\n *

You can also call GetFederationToken using the security credentials of an\n * Amazon Web Services account root user, but we do not recommend it. Instead, we recommend that you create\n * an IAM user for the purpose of the proxy application. Then attach a policy to the IAM\n * user that limits federated users to only the actions and resources that they need to\n * access. For more information, see IAM Best Practices in the\n * IAM User Guide.

\n *

\n * Session duration\n *

\n *

The temporary credentials are valid for the specified duration, from 900 seconds (15\n * minutes) up to a maximum of 129,600 seconds (36 hours). The default session duration is\n * 43,200 seconds (12 hours). Temporary credentials that are obtained by using Amazon Web Services account\n * root user credentials have a maximum duration of 3,600 seconds (1 hour).

\n *

\n * Permissions\n *

\n *

You can use the temporary credentials created by GetFederationToken in any\n * Amazon Web Services service except the following:

\n * \n *

You must pass an inline or managed session policy to\n * this operation. You can pass a single JSON policy document to use as an inline session\n * policy. You can also specify up to 10 managed policies to use as managed session policies.\n * The plaintext that you use for both inline and managed session policies can't exceed 2,048\n * characters.

\n *

Though the session policy parameters are optional, if you do not pass a policy, then the\n * resulting federated user session has no permissions. When you pass session policies, the\n * session permissions are the intersection of the IAM user policies and the session\n * policies that you pass. This gives you a way to further restrict the permissions for a\n * federated user. You cannot use session policies to grant more permissions than those that\n * are defined in the permissions policy of the IAM user. For more information, see Session\n * Policies in the IAM User Guide. For information about\n * using GetFederationToken to create temporary security credentials, see GetFederationToken—Federation Through a Custom Identity Broker.

\n *

You can use the credentials to access a resource that has a resource-based policy. If\n * that policy specifically references the federated user session in the\n * Principal element of the policy, the session has the permissions allowed by\n * the policy. These permissions are granted in addition to the permissions granted by the\n * session policies.

\n *

\n * Tags\n *

\n *

(Optional) You can pass tag key-value pairs to your session. These are called session\n * tags. For more information about session tags, see Passing Session Tags in STS in the\n * IAM User Guide.

\n * \n *

You can create a mobile-based or browser-based app that can authenticate users\n * using a web identity provider like Login with Amazon, Facebook, Google, or an OpenID\n * Connect-compatible identity provider. In this case, we recommend that you use Amazon Cognito or\n * AssumeRoleWithWebIdentity. For more information, see Federation Through a Web-based Identity Provider in the\n * IAM User Guide.

\n *
\n *

You can also call GetFederationToken using the security credentials of an\n * Amazon Web Services account root user, but we do not recommend it. Instead, we recommend that you\n * create an IAM user for the purpose of the proxy application. Then attach a policy to\n * the IAM user that limits federated users to only the actions and resources that they\n * need to access. For more information, see IAM Best Practices in the\n * IAM User Guide.

\n *

\n * Session duration\n *

\n *

The temporary credentials are valid for the specified duration, from 900 seconds (15\n * minutes) up to a maximum of 129,600 seconds (36 hours). The default session duration is\n * 43,200 seconds (12 hours). Temporary credentials that are obtained by using Amazon Web Services\n * account root user credentials have a maximum duration of 3,600 seconds (1 hour).

\n *

\n * Permissions\n *

\n *

You can use the temporary credentials created by GetFederationToken in\n * any Amazon Web Services service except the following:

\n * \n *

You must pass an inline or managed session policy to\n * this operation. You can pass a single JSON policy document to use as an inline session\n * policy. You can also specify up to 10 managed policies to use as managed session\n * policies. The plain text that you use for both inline and managed session policies can't\n * exceed 2,048 characters.

\n *

Though the session policy parameters are optional, if you do not pass a policy, then\n * the resulting federated user session has no permissions. When you pass session policies,\n * the session permissions are the intersection of the IAM user policies and the session\n * policies that you pass. This gives you a way to further restrict the permissions for a\n * federated user. You cannot use session policies to grant more permissions than those\n * that are defined in the permissions policy of the IAM user. For more information, see\n * Session Policies\n * in the IAM User Guide. For information about using\n * GetFederationToken to create temporary security credentials, see GetFederationToken—Federation Through a Custom Identity Broker.

\n *

You can use the credentials to access a resource that has a resource-based policy. If\n * that policy specifically references the federated user session in the\n * Principal element of the policy, the session has the permissions\n * allowed by the policy. These permissions are granted in addition to the permissions\n * granted by the session policies.

\n *

\n * Tags\n *

\n *

(Optional) You can pass tag key-value pairs to your session. These are called session\n * tags. For more information about session tags, see Passing Session Tags in STS in\n * the IAM User Guide.

\n *

An administrator must grant you the permissions necessary to pass session tags. The\n * administrator can also create granular permissions to allow you to pass only specific\n * session tags. For more information, see Tutorial: Using\n * Tags for Attribute-Based Access Control in the\n * IAM User Guide.

\n *

Tag key–value pairs are not case sensitive, but case is preserved. This means that you\n * cannot have separate Department and department tag keys.\n * Assume that the user that you are federating has the\n * Department=Marketing tag and you pass the\n * department=engineering session tag.\n * Department and department are not saved as separate tags,\n * and the session tag passed in the request takes precedence over the user tag.

\n * @example\n * Use a bare-bones client and the command you need to make an API call.\n * ```javascript\n * import { STSClient, GetFederationTokenCommand } from \"@aws-sdk/client-sts\"; // ES Modules import\n * // const { STSClient, GetFederationTokenCommand } = require(\"@aws-sdk/client-sts\"); // CommonJS import\n * const client = new STSClient(config);\n * const command = new GetFederationTokenCommand(input);\n * const response = await client.send(command);\n * ```\n *\n * @see {@link GetFederationTokenCommandInput} for command's `input` shape.\n * @see {@link GetFederationTokenCommandOutput} for command's `response` shape.\n * @see {@link STSClientResolvedConfig | config} for command's `input` shape.\n *\n */\nclass GetFederationTokenCommand extends smithy_client_1.Command {\n // Start section: command_properties\n // End section: command_properties\n constructor(input) {\n // Start section: command_constructor\n super();\n this.input = input;\n // End section: command_constructor\n }\n /**\n * @internal\n */\n resolveMiddleware(clientStack, configuration, options) {\n this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize));\n this.middlewareStack.use(middleware_signing_1.getAwsAuthPlugin(configuration));\n const stack = clientStack.concat(this.middlewareStack);\n const { logger } = configuration;\n const clientName = \"STSClient\";\n const commandName = \"GetFederationTokenCommand\";\n const handlerExecutionContext = {\n logger,\n clientName,\n commandName,\n inputFilterSensitiveLog: models_0_1.GetFederationTokenRequest.filterSensitiveLog,\n outputFilterSensitiveLog: models_0_1.GetFederationTokenResponse.filterSensitiveLog,\n };\n const { requestHandler } = configuration;\n return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);\n }\n serialize(input, context) {\n return Aws_query_1.serializeAws_queryGetFederationTokenCommand(input, context);\n }\n deserialize(output, context) {\n return Aws_query_1.deserializeAws_queryGetFederationTokenCommand(output, context);\n }\n}\nexports.GetFederationTokenCommand = GetFederationTokenCommand;\n//# sourceMappingURL=GetFederationTokenCommand.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.GetSessionTokenCommand = void 0;\nconst models_0_1 = require(\"../models/models_0\");\nconst Aws_query_1 = require(\"../protocols/Aws_query\");\nconst middleware_serde_1 = require(\"@aws-sdk/middleware-serde\");\nconst middleware_signing_1 = require(\"@aws-sdk/middleware-signing\");\nconst smithy_client_1 = require(\"@aws-sdk/smithy-client\");\n/**\n *

Returns a set of temporary credentials for an Amazon Web Services account or IAM user. The\n * credentials consist of an access key ID, a secret access key, and a security token.\n * Typically, you use GetSessionToken if you want to use MFA to protect\n * programmatic calls to specific Amazon Web Services API operations like Amazon EC2 StopInstances.\n * MFA-enabled IAM users would need to call GetSessionToken and submit an MFA\n * code that is associated with their MFA device. Using the temporary security credentials\n * that are returned from the call, IAM users can then make programmatic calls to API\n * operations that require MFA authentication. If you do not supply a correct MFA code, then\n * the API returns an access denied error. For a comparison of GetSessionToken\n * with the other API operations that produce temporary credentials, see Requesting\n * Temporary Security Credentials and Comparing the\n * STS API operations in the IAM User Guide.

\n *

\n * Session Duration\n *

\n *

The GetSessionToken operation must be called by using the long-term Amazon Web Services\n * security credentials of the Amazon Web Services account root user or an IAM user. Credentials that are\n * created by IAM users are valid for the duration that you specify. This duration can range\n * from 900 seconds (15 minutes) up to a maximum of 129,600 seconds (36 hours), with a default\n * of 43,200 seconds (12 hours). Credentials based on account credentials can range from 900\n * seconds (15 minutes) up to 3,600 seconds (1 hour), with a default of 1 hour.

\n *

\n * Permissions\n *

\n *

The temporary security credentials created by GetSessionToken can be used\n * to make API calls to any Amazon Web Services service with the following exceptions:

\n * \n * \n *

We recommend that you do not call GetSessionToken with Amazon Web Services account\n * root user credentials. Instead, follow our best practices by\n * creating one or more IAM users, giving them the necessary permissions, and using IAM\n * users for everyday interaction with Amazon Web Services.

\n *
\n *

The credentials that are returned by GetSessionToken are based on\n * permissions associated with the user whose credentials were used to call the operation. If\n * GetSessionToken is called using Amazon Web Services account root user credentials, the\n * temporary credentials have root user permissions. Similarly, if\n * GetSessionToken is called using the credentials of an IAM user, the\n * temporary credentials have the same permissions as the IAM user.

\n *

For more information about using GetSessionToken to create temporary\n * credentials, go to Temporary\n * Credentials for Users in Untrusted Environments in the\n * IAM User Guide.

\n * @example\n * Use a bare-bones client and the command you need to make an API call.\n * ```javascript\n * import { STSClient, GetSessionTokenCommand } from \"@aws-sdk/client-sts\"; // ES Modules import\n * // const { STSClient, GetSessionTokenCommand } = require(\"@aws-sdk/client-sts\"); // CommonJS import\n * const client = new STSClient(config);\n * const command = new GetSessionTokenCommand(input);\n * const response = await client.send(command);\n * ```\n *\n * @see {@link GetSessionTokenCommandInput} for command's `input` shape.\n * @see {@link GetSessionTokenCommandOutput} for command's `response` shape.\n * @see {@link STSClientResolvedConfig | config} for command's `input` shape.\n *\n */\nclass GetSessionTokenCommand extends smithy_client_1.Command {\n // Start section: command_properties\n // End section: command_properties\n constructor(input) {\n // Start section: command_constructor\n super();\n this.input = input;\n // End section: command_constructor\n }\n /**\n * @internal\n */\n resolveMiddleware(clientStack, configuration, options) {\n this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize));\n this.middlewareStack.use(middleware_signing_1.getAwsAuthPlugin(configuration));\n const stack = clientStack.concat(this.middlewareStack);\n const { logger } = configuration;\n const clientName = \"STSClient\";\n const commandName = \"GetSessionTokenCommand\";\n const handlerExecutionContext = {\n logger,\n clientName,\n commandName,\n inputFilterSensitiveLog: models_0_1.GetSessionTokenRequest.filterSensitiveLog,\n outputFilterSensitiveLog: models_0_1.GetSessionTokenResponse.filterSensitiveLog,\n };\n const { requestHandler } = configuration;\n return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);\n }\n serialize(input, context) {\n return Aws_query_1.serializeAws_queryGetSessionTokenCommand(input, context);\n }\n deserialize(output, context) {\n return Aws_query_1.deserializeAws_queryGetSessionTokenCommand(output, context);\n }\n}\nexports.GetSessionTokenCommand = GetSessionTokenCommand;\n//# sourceMappingURL=GetSessionTokenCommand.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.decorateDefaultCredentialProvider = exports.getDefaultRoleAssumerWithWebIdentity = exports.getDefaultRoleAssumer = void 0;\n// Please do not touch this file. It's generated from template in:\n// https://github.com/aws/aws-sdk-js-v3/blob/main/codegen/smithy-aws-typescript-codegen/src/main/resources/software/amazon/smithy/aws/typescript/codegen/sts-client-defaultRoleAssumers.ts\nconst defaultStsRoleAssumers_1 = require(\"./defaultStsRoleAssumers\");\nconst STSClient_1 = require(\"./STSClient\");\n/**\n * The default role assumer that used by credential providers when sts:AssumeRole API is needed.\n */\nconst getDefaultRoleAssumer = (stsOptions = {}) => defaultStsRoleAssumers_1.getDefaultRoleAssumer(stsOptions, STSClient_1.STSClient);\nexports.getDefaultRoleAssumer = getDefaultRoleAssumer;\n/**\n * The default role assumer that used by credential providers when sts:AssumeRoleWithWebIdentity API is needed.\n */\nconst getDefaultRoleAssumerWithWebIdentity = (stsOptions = {}) => defaultStsRoleAssumers_1.getDefaultRoleAssumerWithWebIdentity(stsOptions, STSClient_1.STSClient);\nexports.getDefaultRoleAssumerWithWebIdentity = getDefaultRoleAssumerWithWebIdentity;\n/**\n * The default credential providers depend STS client to assume role with desired API: sts:assumeRole,\n * sts:assumeRoleWithWebIdentity, etc. This function decorates the default credential provider with role assumers which\n * encapsulates the process of calling STS commands. This can only be imported by AWS client packages to avoid circular\n * dependencies.\n *\n * @internal\n */\nconst decorateDefaultCredentialProvider = (provider) => (input) => provider({\n roleAssumer: exports.getDefaultRoleAssumer(input),\n roleAssumerWithWebIdentity: exports.getDefaultRoleAssumerWithWebIdentity(input),\n ...input,\n});\nexports.decorateDefaultCredentialProvider = decorateDefaultCredentialProvider;\n//# sourceMappingURL=defaultRoleAssumers.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.decorateDefaultCredentialProvider = exports.getDefaultRoleAssumerWithWebIdentity = exports.getDefaultRoleAssumer = void 0;\nconst AssumeRoleCommand_1 = require(\"./commands/AssumeRoleCommand\");\nconst AssumeRoleWithWebIdentityCommand_1 = require(\"./commands/AssumeRoleWithWebIdentityCommand\");\nconst ASSUME_ROLE_DEFAULT_REGION = \"us-east-1\";\n/**\n * Inject the fallback STS region of us-east-1.\n */\nconst decorateDefaultRegion = (region) => {\n if (typeof region !== \"function\") {\n return region === undefined ? ASSUME_ROLE_DEFAULT_REGION : region;\n }\n return async () => {\n try {\n return await region();\n }\n catch (e) {\n return ASSUME_ROLE_DEFAULT_REGION;\n }\n };\n};\n/**\n * The default role assumer that used by credential providers when sts:AssumeRole API is needed.\n * @internal\n */\nconst getDefaultRoleAssumer = (stsOptions, stsClientCtor) => {\n let stsClient;\n let closureSourceCreds;\n return async (sourceCreds, params) => {\n closureSourceCreds = sourceCreds;\n if (!stsClient) {\n const { logger, region, requestHandler } = stsOptions;\n stsClient = new stsClientCtor({\n logger,\n // A hack to make sts client uses the credential in current closure.\n credentialDefaultProvider: () => async () => closureSourceCreds,\n region: decorateDefaultRegion(region || stsOptions.region),\n ...(requestHandler ? { requestHandler } : {}),\n });\n }\n const { Credentials } = await stsClient.send(new AssumeRoleCommand_1.AssumeRoleCommand(params));\n if (!Credentials || !Credentials.AccessKeyId || !Credentials.SecretAccessKey) {\n throw new Error(`Invalid response from STS.assumeRole call with role ${params.RoleArn}`);\n }\n return {\n accessKeyId: Credentials.AccessKeyId,\n secretAccessKey: Credentials.SecretAccessKey,\n sessionToken: Credentials.SessionToken,\n expiration: Credentials.Expiration,\n };\n };\n};\nexports.getDefaultRoleAssumer = getDefaultRoleAssumer;\n/**\n * The default role assumer that used by credential providers when sts:AssumeRoleWithWebIdentity API is needed.\n * @internal\n */\nconst getDefaultRoleAssumerWithWebIdentity = (stsOptions, stsClientCtor) => {\n let stsClient;\n return async (params) => {\n if (!stsClient) {\n const { logger, region, requestHandler } = stsOptions;\n stsClient = new stsClientCtor({\n logger,\n region: decorateDefaultRegion(region || stsOptions.region),\n ...(requestHandler ? { requestHandler } : {}),\n });\n }\n const { Credentials } = await stsClient.send(new AssumeRoleWithWebIdentityCommand_1.AssumeRoleWithWebIdentityCommand(params));\n if (!Credentials || !Credentials.AccessKeyId || !Credentials.SecretAccessKey) {\n throw new Error(`Invalid response from STS.assumeRoleWithWebIdentity call with role ${params.RoleArn}`);\n }\n return {\n accessKeyId: Credentials.AccessKeyId,\n secretAccessKey: Credentials.SecretAccessKey,\n sessionToken: Credentials.SessionToken,\n expiration: Credentials.Expiration,\n };\n };\n};\nexports.getDefaultRoleAssumerWithWebIdentity = getDefaultRoleAssumerWithWebIdentity;\n/**\n * The default credential providers depend STS client to assume role with desired API: sts:assumeRole,\n * sts:assumeRoleWithWebIdentity, etc. This function decorates the default credential provider with role assumers which\n * encapsulates the process of calling STS commands. This can only be imported by AWS client packages to avoid circular\n * dependencies.\n *\n * @internal\n */\nconst decorateDefaultCredentialProvider = (provider) => (input) => provider({\n roleAssumer: exports.getDefaultRoleAssumer(input, input.stsClientCtor),\n roleAssumerWithWebIdentity: exports.getDefaultRoleAssumerWithWebIdentity(input, input.stsClientCtor),\n ...input,\n});\nexports.decorateDefaultCredentialProvider = decorateDefaultCredentialProvider;\n//# sourceMappingURL=defaultStsRoleAssumers.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.defaultRegionInfoProvider = void 0;\nconst config_resolver_1 = require(\"@aws-sdk/config-resolver\");\nconst regionHash = {\n \"aws-global\": {\n hostname: \"sts.amazonaws.com\",\n signingRegion: \"us-east-1\",\n },\n \"us-east-1-fips\": {\n hostname: \"sts-fips.us-east-1.amazonaws.com\",\n signingRegion: \"us-east-1\",\n },\n \"us-east-2-fips\": {\n hostname: \"sts-fips.us-east-2.amazonaws.com\",\n signingRegion: \"us-east-2\",\n },\n \"us-gov-east-1-fips\": {\n hostname: \"sts.us-gov-east-1.amazonaws.com\",\n signingRegion: \"us-gov-east-1\",\n },\n \"us-gov-west-1-fips\": {\n hostname: \"sts.us-gov-west-1.amazonaws.com\",\n signingRegion: \"us-gov-west-1\",\n },\n \"us-west-1-fips\": {\n hostname: \"sts-fips.us-west-1.amazonaws.com\",\n signingRegion: \"us-west-1\",\n },\n \"us-west-2-fips\": {\n hostname: \"sts-fips.us-west-2.amazonaws.com\",\n signingRegion: \"us-west-2\",\n },\n};\nconst partitionHash = {\n aws: {\n regions: [\n \"af-south-1\",\n \"ap-east-1\",\n \"ap-northeast-1\",\n \"ap-northeast-2\",\n \"ap-northeast-3\",\n \"ap-south-1\",\n \"ap-southeast-1\",\n \"ap-southeast-2\",\n \"aws-global\",\n \"ca-central-1\",\n \"eu-central-1\",\n \"eu-north-1\",\n \"eu-south-1\",\n \"eu-west-1\",\n \"eu-west-2\",\n \"eu-west-3\",\n \"me-south-1\",\n \"sa-east-1\",\n \"us-east-1\",\n \"us-east-1-fips\",\n \"us-east-2\",\n \"us-east-2-fips\",\n \"us-west-1\",\n \"us-west-1-fips\",\n \"us-west-2\",\n \"us-west-2-fips\",\n ],\n hostname: \"sts.{region}.amazonaws.com\",\n },\n \"aws-cn\": {\n regions: [\"cn-north-1\", \"cn-northwest-1\"],\n hostname: \"sts.{region}.amazonaws.com.cn\",\n },\n \"aws-iso\": {\n regions: [\"us-iso-east-1\"],\n hostname: \"sts.{region}.c2s.ic.gov\",\n },\n \"aws-iso-b\": {\n regions: [\"us-isob-east-1\"],\n hostname: \"sts.{region}.sc2s.sgov.gov\",\n },\n \"aws-us-gov\": {\n regions: [\"us-gov-east-1\", \"us-gov-east-1-fips\", \"us-gov-west-1\", \"us-gov-west-1-fips\"],\n hostname: \"sts.{region}.amazonaws.com\",\n },\n};\nconst defaultRegionInfoProvider = async (region, options) => config_resolver_1.getRegionInfo(region, {\n ...options,\n signingService: \"sts\",\n regionHash,\n partitionHash,\n});\nexports.defaultRegionInfoProvider = defaultRegionInfoProvider;\n//# sourceMappingURL=endpoints.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst tslib_1 = require(\"tslib\");\ntslib_1.__exportStar(require(\"./STSClient\"), exports);\ntslib_1.__exportStar(require(\"./STS\"), exports);\ntslib_1.__exportStar(require(\"./commands/AssumeRoleCommand\"), exports);\ntslib_1.__exportStar(require(\"./commands/AssumeRoleWithSAMLCommand\"), exports);\ntslib_1.__exportStar(require(\"./commands/AssumeRoleWithWebIdentityCommand\"), exports);\ntslib_1.__exportStar(require(\"./commands/DecodeAuthorizationMessageCommand\"), exports);\ntslib_1.__exportStar(require(\"./commands/GetAccessKeyInfoCommand\"), exports);\ntslib_1.__exportStar(require(\"./commands/GetCallerIdentityCommand\"), exports);\ntslib_1.__exportStar(require(\"./commands/GetFederationTokenCommand\"), exports);\ntslib_1.__exportStar(require(\"./commands/GetSessionTokenCommand\"), exports);\ntslib_1.__exportStar(require(\"./defaultRoleAssumers\"), exports);\ntslib_1.__exportStar(require(\"./models/index\"), exports);\n//# sourceMappingURL=index.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst tslib_1 = require(\"tslib\");\ntslib_1.__exportStar(require(\"./models_0\"), exports);\n//# sourceMappingURL=index.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.GetSessionTokenResponse = exports.GetSessionTokenRequest = exports.GetFederationTokenResponse = exports.FederatedUser = exports.GetFederationTokenRequest = exports.GetCallerIdentityResponse = exports.GetCallerIdentityRequest = exports.GetAccessKeyInfoResponse = exports.GetAccessKeyInfoRequest = exports.InvalidAuthorizationMessageException = exports.DecodeAuthorizationMessageResponse = exports.DecodeAuthorizationMessageRequest = exports.IDPCommunicationErrorException = exports.AssumeRoleWithWebIdentityResponse = exports.AssumeRoleWithWebIdentityRequest = exports.InvalidIdentityTokenException = exports.IDPRejectedClaimException = exports.AssumeRoleWithSAMLResponse = exports.AssumeRoleWithSAMLRequest = exports.RegionDisabledException = exports.PackedPolicyTooLargeException = exports.MalformedPolicyDocumentException = exports.ExpiredTokenException = exports.AssumeRoleResponse = exports.Credentials = exports.AssumeRoleRequest = exports.Tag = exports.PolicyDescriptorType = exports.AssumedRoleUser = void 0;\nvar AssumedRoleUser;\n(function (AssumedRoleUser) {\n /**\n * @internal\n */\n AssumedRoleUser.filterSensitiveLog = (obj) => ({\n ...obj,\n });\n})(AssumedRoleUser = exports.AssumedRoleUser || (exports.AssumedRoleUser = {}));\nvar PolicyDescriptorType;\n(function (PolicyDescriptorType) {\n /**\n * @internal\n */\n PolicyDescriptorType.filterSensitiveLog = (obj) => ({\n ...obj,\n });\n})(PolicyDescriptorType = exports.PolicyDescriptorType || (exports.PolicyDescriptorType = {}));\nvar Tag;\n(function (Tag) {\n /**\n * @internal\n */\n Tag.filterSensitiveLog = (obj) => ({\n ...obj,\n });\n})(Tag = exports.Tag || (exports.Tag = {}));\nvar AssumeRoleRequest;\n(function (AssumeRoleRequest) {\n /**\n * @internal\n */\n AssumeRoleRequest.filterSensitiveLog = (obj) => ({\n ...obj,\n });\n})(AssumeRoleRequest = exports.AssumeRoleRequest || (exports.AssumeRoleRequest = {}));\nvar Credentials;\n(function (Credentials) {\n /**\n * @internal\n */\n Credentials.filterSensitiveLog = (obj) => ({\n ...obj,\n });\n})(Credentials = exports.Credentials || (exports.Credentials = {}));\nvar AssumeRoleResponse;\n(function (AssumeRoleResponse) {\n /**\n * @internal\n */\n AssumeRoleResponse.filterSensitiveLog = (obj) => ({\n ...obj,\n });\n})(AssumeRoleResponse = exports.AssumeRoleResponse || (exports.AssumeRoleResponse = {}));\nvar ExpiredTokenException;\n(function (ExpiredTokenException) {\n /**\n * @internal\n */\n ExpiredTokenException.filterSensitiveLog = (obj) => ({\n ...obj,\n });\n})(ExpiredTokenException = exports.ExpiredTokenException || (exports.ExpiredTokenException = {}));\nvar MalformedPolicyDocumentException;\n(function (MalformedPolicyDocumentException) {\n /**\n * @internal\n */\n MalformedPolicyDocumentException.filterSensitiveLog = (obj) => ({\n ...obj,\n });\n})(MalformedPolicyDocumentException = exports.MalformedPolicyDocumentException || (exports.MalformedPolicyDocumentException = {}));\nvar PackedPolicyTooLargeException;\n(function (PackedPolicyTooLargeException) {\n /**\n * @internal\n */\n PackedPolicyTooLargeException.filterSensitiveLog = (obj) => ({\n ...obj,\n });\n})(PackedPolicyTooLargeException = exports.PackedPolicyTooLargeException || (exports.PackedPolicyTooLargeException = {}));\nvar RegionDisabledException;\n(function (RegionDisabledException) {\n /**\n * @internal\n */\n RegionDisabledException.filterSensitiveLog = (obj) => ({\n ...obj,\n });\n})(RegionDisabledException = exports.RegionDisabledException || (exports.RegionDisabledException = {}));\nvar AssumeRoleWithSAMLRequest;\n(function (AssumeRoleWithSAMLRequest) {\n /**\n * @internal\n */\n AssumeRoleWithSAMLRequest.filterSensitiveLog = (obj) => ({\n ...obj,\n });\n})(AssumeRoleWithSAMLRequest = exports.AssumeRoleWithSAMLRequest || (exports.AssumeRoleWithSAMLRequest = {}));\nvar AssumeRoleWithSAMLResponse;\n(function (AssumeRoleWithSAMLResponse) {\n /**\n * @internal\n */\n AssumeRoleWithSAMLResponse.filterSensitiveLog = (obj) => ({\n ...obj,\n });\n})(AssumeRoleWithSAMLResponse = exports.AssumeRoleWithSAMLResponse || (exports.AssumeRoleWithSAMLResponse = {}));\nvar IDPRejectedClaimException;\n(function (IDPRejectedClaimException) {\n /**\n * @internal\n */\n IDPRejectedClaimException.filterSensitiveLog = (obj) => ({\n ...obj,\n });\n})(IDPRejectedClaimException = exports.IDPRejectedClaimException || (exports.IDPRejectedClaimException = {}));\nvar InvalidIdentityTokenException;\n(function (InvalidIdentityTokenException) {\n /**\n * @internal\n */\n InvalidIdentityTokenException.filterSensitiveLog = (obj) => ({\n ...obj,\n });\n})(InvalidIdentityTokenException = exports.InvalidIdentityTokenException || (exports.InvalidIdentityTokenException = {}));\nvar AssumeRoleWithWebIdentityRequest;\n(function (AssumeRoleWithWebIdentityRequest) {\n /**\n * @internal\n */\n AssumeRoleWithWebIdentityRequest.filterSensitiveLog = (obj) => ({\n ...obj,\n });\n})(AssumeRoleWithWebIdentityRequest = exports.AssumeRoleWithWebIdentityRequest || (exports.AssumeRoleWithWebIdentityRequest = {}));\nvar AssumeRoleWithWebIdentityResponse;\n(function (AssumeRoleWithWebIdentityResponse) {\n /**\n * @internal\n */\n AssumeRoleWithWebIdentityResponse.filterSensitiveLog = (obj) => ({\n ...obj,\n });\n})(AssumeRoleWithWebIdentityResponse = exports.AssumeRoleWithWebIdentityResponse || (exports.AssumeRoleWithWebIdentityResponse = {}));\nvar IDPCommunicationErrorException;\n(function (IDPCommunicationErrorException) {\n /**\n * @internal\n */\n IDPCommunicationErrorException.filterSensitiveLog = (obj) => ({\n ...obj,\n });\n})(IDPCommunicationErrorException = exports.IDPCommunicationErrorException || (exports.IDPCommunicationErrorException = {}));\nvar DecodeAuthorizationMessageRequest;\n(function (DecodeAuthorizationMessageRequest) {\n /**\n * @internal\n */\n DecodeAuthorizationMessageRequest.filterSensitiveLog = (obj) => ({\n ...obj,\n });\n})(DecodeAuthorizationMessageRequest = exports.DecodeAuthorizationMessageRequest || (exports.DecodeAuthorizationMessageRequest = {}));\nvar DecodeAuthorizationMessageResponse;\n(function (DecodeAuthorizationMessageResponse) {\n /**\n * @internal\n */\n DecodeAuthorizationMessageResponse.filterSensitiveLog = (obj) => ({\n ...obj,\n });\n})(DecodeAuthorizationMessageResponse = exports.DecodeAuthorizationMessageResponse || (exports.DecodeAuthorizationMessageResponse = {}));\nvar InvalidAuthorizationMessageException;\n(function (InvalidAuthorizationMessageException) {\n /**\n * @internal\n */\n InvalidAuthorizationMessageException.filterSensitiveLog = (obj) => ({\n ...obj,\n });\n})(InvalidAuthorizationMessageException = exports.InvalidAuthorizationMessageException || (exports.InvalidAuthorizationMessageException = {}));\nvar GetAccessKeyInfoRequest;\n(function (GetAccessKeyInfoRequest) {\n /**\n * @internal\n */\n GetAccessKeyInfoRequest.filterSensitiveLog = (obj) => ({\n ...obj,\n });\n})(GetAccessKeyInfoRequest = exports.GetAccessKeyInfoRequest || (exports.GetAccessKeyInfoRequest = {}));\nvar GetAccessKeyInfoResponse;\n(function (GetAccessKeyInfoResponse) {\n /**\n * @internal\n */\n GetAccessKeyInfoResponse.filterSensitiveLog = (obj) => ({\n ...obj,\n });\n})(GetAccessKeyInfoResponse = exports.GetAccessKeyInfoResponse || (exports.GetAccessKeyInfoResponse = {}));\nvar GetCallerIdentityRequest;\n(function (GetCallerIdentityRequest) {\n /**\n * @internal\n */\n GetCallerIdentityRequest.filterSensitiveLog = (obj) => ({\n ...obj,\n });\n})(GetCallerIdentityRequest = exports.GetCallerIdentityRequest || (exports.GetCallerIdentityRequest = {}));\nvar GetCallerIdentityResponse;\n(function (GetCallerIdentityResponse) {\n /**\n * @internal\n */\n GetCallerIdentityResponse.filterSensitiveLog = (obj) => ({\n ...obj,\n });\n})(GetCallerIdentityResponse = exports.GetCallerIdentityResponse || (exports.GetCallerIdentityResponse = {}));\nvar GetFederationTokenRequest;\n(function (GetFederationTokenRequest) {\n /**\n * @internal\n */\n GetFederationTokenRequest.filterSensitiveLog = (obj) => ({\n ...obj,\n });\n})(GetFederationTokenRequest = exports.GetFederationTokenRequest || (exports.GetFederationTokenRequest = {}));\nvar FederatedUser;\n(function (FederatedUser) {\n /**\n * @internal\n */\n FederatedUser.filterSensitiveLog = (obj) => ({\n ...obj,\n });\n})(FederatedUser = exports.FederatedUser || (exports.FederatedUser = {}));\nvar GetFederationTokenResponse;\n(function (GetFederationTokenResponse) {\n /**\n * @internal\n */\n GetFederationTokenResponse.filterSensitiveLog = (obj) => ({\n ...obj,\n });\n})(GetFederationTokenResponse = exports.GetFederationTokenResponse || (exports.GetFederationTokenResponse = {}));\nvar GetSessionTokenRequest;\n(function (GetSessionTokenRequest) {\n /**\n * @internal\n */\n GetSessionTokenRequest.filterSensitiveLog = (obj) => ({\n ...obj,\n });\n})(GetSessionTokenRequest = exports.GetSessionTokenRequest || (exports.GetSessionTokenRequest = {}));\nvar GetSessionTokenResponse;\n(function (GetSessionTokenResponse) {\n /**\n * @internal\n */\n GetSessionTokenResponse.filterSensitiveLog = (obj) => ({\n ...obj,\n });\n})(GetSessionTokenResponse = exports.GetSessionTokenResponse || (exports.GetSessionTokenResponse = {}));\n//# sourceMappingURL=models_0.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.deserializeAws_queryGetSessionTokenCommand = exports.deserializeAws_queryGetFederationTokenCommand = exports.deserializeAws_queryGetCallerIdentityCommand = exports.deserializeAws_queryGetAccessKeyInfoCommand = exports.deserializeAws_queryDecodeAuthorizationMessageCommand = exports.deserializeAws_queryAssumeRoleWithWebIdentityCommand = exports.deserializeAws_queryAssumeRoleWithSAMLCommand = exports.deserializeAws_queryAssumeRoleCommand = exports.serializeAws_queryGetSessionTokenCommand = exports.serializeAws_queryGetFederationTokenCommand = exports.serializeAws_queryGetCallerIdentityCommand = exports.serializeAws_queryGetAccessKeyInfoCommand = exports.serializeAws_queryDecodeAuthorizationMessageCommand = exports.serializeAws_queryAssumeRoleWithWebIdentityCommand = exports.serializeAws_queryAssumeRoleWithSAMLCommand = exports.serializeAws_queryAssumeRoleCommand = void 0;\nconst protocol_http_1 = require(\"@aws-sdk/protocol-http\");\nconst smithy_client_1 = require(\"@aws-sdk/smithy-client\");\nconst entities_1 = require(\"entities\");\nconst fast_xml_parser_1 = require(\"fast-xml-parser\");\nconst serializeAws_queryAssumeRoleCommand = async (input, context) => {\n const headers = {\n \"content-type\": \"application/x-www-form-urlencoded\",\n };\n let body;\n body = buildFormUrlencodedString({\n ...serializeAws_queryAssumeRoleRequest(input, context),\n Action: \"AssumeRole\",\n Version: \"2011-06-15\",\n });\n return buildHttpRpcRequest(context, headers, \"/\", undefined, body);\n};\nexports.serializeAws_queryAssumeRoleCommand = serializeAws_queryAssumeRoleCommand;\nconst serializeAws_queryAssumeRoleWithSAMLCommand = async (input, context) => {\n const headers = {\n \"content-type\": \"application/x-www-form-urlencoded\",\n };\n let body;\n body = buildFormUrlencodedString({\n ...serializeAws_queryAssumeRoleWithSAMLRequest(input, context),\n Action: \"AssumeRoleWithSAML\",\n Version: \"2011-06-15\",\n });\n return buildHttpRpcRequest(context, headers, \"/\", undefined, body);\n};\nexports.serializeAws_queryAssumeRoleWithSAMLCommand = serializeAws_queryAssumeRoleWithSAMLCommand;\nconst serializeAws_queryAssumeRoleWithWebIdentityCommand = async (input, context) => {\n const headers = {\n \"content-type\": \"application/x-www-form-urlencoded\",\n };\n let body;\n body = buildFormUrlencodedString({\n ...serializeAws_queryAssumeRoleWithWebIdentityRequest(input, context),\n Action: \"AssumeRoleWithWebIdentity\",\n Version: \"2011-06-15\",\n });\n return buildHttpRpcRequest(context, headers, \"/\", undefined, body);\n};\nexports.serializeAws_queryAssumeRoleWithWebIdentityCommand = serializeAws_queryAssumeRoleWithWebIdentityCommand;\nconst serializeAws_queryDecodeAuthorizationMessageCommand = async (input, context) => {\n const headers = {\n \"content-type\": \"application/x-www-form-urlencoded\",\n };\n let body;\n body = buildFormUrlencodedString({\n ...serializeAws_queryDecodeAuthorizationMessageRequest(input, context),\n Action: \"DecodeAuthorizationMessage\",\n Version: \"2011-06-15\",\n });\n return buildHttpRpcRequest(context, headers, \"/\", undefined, body);\n};\nexports.serializeAws_queryDecodeAuthorizationMessageCommand = serializeAws_queryDecodeAuthorizationMessageCommand;\nconst serializeAws_queryGetAccessKeyInfoCommand = async (input, context) => {\n const headers = {\n \"content-type\": \"application/x-www-form-urlencoded\",\n };\n let body;\n body = buildFormUrlencodedString({\n ...serializeAws_queryGetAccessKeyInfoRequest(input, context),\n Action: \"GetAccessKeyInfo\",\n Version: \"2011-06-15\",\n });\n return buildHttpRpcRequest(context, headers, \"/\", undefined, body);\n};\nexports.serializeAws_queryGetAccessKeyInfoCommand = serializeAws_queryGetAccessKeyInfoCommand;\nconst serializeAws_queryGetCallerIdentityCommand = async (input, context) => {\n const headers = {\n \"content-type\": \"application/x-www-form-urlencoded\",\n };\n let body;\n body = buildFormUrlencodedString({\n ...serializeAws_queryGetCallerIdentityRequest(input, context),\n Action: \"GetCallerIdentity\",\n Version: \"2011-06-15\",\n });\n return buildHttpRpcRequest(context, headers, \"/\", undefined, body);\n};\nexports.serializeAws_queryGetCallerIdentityCommand = serializeAws_queryGetCallerIdentityCommand;\nconst serializeAws_queryGetFederationTokenCommand = async (input, context) => {\n const headers = {\n \"content-type\": \"application/x-www-form-urlencoded\",\n };\n let body;\n body = buildFormUrlencodedString({\n ...serializeAws_queryGetFederationTokenRequest(input, context),\n Action: \"GetFederationToken\",\n Version: \"2011-06-15\",\n });\n return buildHttpRpcRequest(context, headers, \"/\", undefined, body);\n};\nexports.serializeAws_queryGetFederationTokenCommand = serializeAws_queryGetFederationTokenCommand;\nconst serializeAws_queryGetSessionTokenCommand = async (input, context) => {\n const headers = {\n \"content-type\": \"application/x-www-form-urlencoded\",\n };\n let body;\n body = buildFormUrlencodedString({\n ...serializeAws_queryGetSessionTokenRequest(input, context),\n Action: \"GetSessionToken\",\n Version: \"2011-06-15\",\n });\n return buildHttpRpcRequest(context, headers, \"/\", undefined, body);\n};\nexports.serializeAws_queryGetSessionTokenCommand = serializeAws_queryGetSessionTokenCommand;\nconst deserializeAws_queryAssumeRoleCommand = async (output, context) => {\n if (output.statusCode >= 300) {\n return deserializeAws_queryAssumeRoleCommandError(output, context);\n }\n const data = await parseBody(output.body, context);\n let contents = {};\n contents = deserializeAws_queryAssumeRoleResponse(data.AssumeRoleResult, context);\n const response = {\n $metadata: deserializeMetadata(output),\n ...contents,\n };\n return Promise.resolve(response);\n};\nexports.deserializeAws_queryAssumeRoleCommand = deserializeAws_queryAssumeRoleCommand;\nconst deserializeAws_queryAssumeRoleCommandError = async (output, context) => {\n const parsedOutput = {\n ...output,\n body: await parseBody(output.body, context),\n };\n let response;\n let errorCode = \"UnknownError\";\n errorCode = loadQueryErrorCode(output, parsedOutput.body);\n switch (errorCode) {\n case \"ExpiredTokenException\":\n case \"com.amazonaws.sts#ExpiredTokenException\":\n response = {\n ...(await deserializeAws_queryExpiredTokenExceptionResponse(parsedOutput, context)),\n name: errorCode,\n $metadata: deserializeMetadata(output),\n };\n break;\n case \"MalformedPolicyDocumentException\":\n case \"com.amazonaws.sts#MalformedPolicyDocumentException\":\n response = {\n ...(await deserializeAws_queryMalformedPolicyDocumentExceptionResponse(parsedOutput, context)),\n name: errorCode,\n $metadata: deserializeMetadata(output),\n };\n break;\n case \"PackedPolicyTooLargeException\":\n case \"com.amazonaws.sts#PackedPolicyTooLargeException\":\n response = {\n ...(await deserializeAws_queryPackedPolicyTooLargeExceptionResponse(parsedOutput, context)),\n name: errorCode,\n $metadata: deserializeMetadata(output),\n };\n break;\n case \"RegionDisabledException\":\n case \"com.amazonaws.sts#RegionDisabledException\":\n response = {\n ...(await deserializeAws_queryRegionDisabledExceptionResponse(parsedOutput, context)),\n name: errorCode,\n $metadata: deserializeMetadata(output),\n };\n break;\n default:\n const parsedBody = parsedOutput.body;\n errorCode = parsedBody.Error.code || parsedBody.Error.Code || errorCode;\n response = {\n ...parsedBody.Error,\n name: `${errorCode}`,\n message: parsedBody.Error.message || parsedBody.Error.Message || errorCode,\n $fault: \"client\",\n $metadata: deserializeMetadata(output),\n };\n }\n const message = response.message || response.Message || errorCode;\n response.message = message;\n delete response.Message;\n return Promise.reject(Object.assign(new Error(message), response));\n};\nconst deserializeAws_queryAssumeRoleWithSAMLCommand = async (output, context) => {\n if (output.statusCode >= 300) {\n return deserializeAws_queryAssumeRoleWithSAMLCommandError(output, context);\n }\n const data = await parseBody(output.body, context);\n let contents = {};\n contents = deserializeAws_queryAssumeRoleWithSAMLResponse(data.AssumeRoleWithSAMLResult, context);\n const response = {\n $metadata: deserializeMetadata(output),\n ...contents,\n };\n return Promise.resolve(response);\n};\nexports.deserializeAws_queryAssumeRoleWithSAMLCommand = deserializeAws_queryAssumeRoleWithSAMLCommand;\nconst deserializeAws_queryAssumeRoleWithSAMLCommandError = async (output, context) => {\n const parsedOutput = {\n ...output,\n body: await parseBody(output.body, context),\n };\n let response;\n let errorCode = \"UnknownError\";\n errorCode = loadQueryErrorCode(output, parsedOutput.body);\n switch (errorCode) {\n case \"ExpiredTokenException\":\n case \"com.amazonaws.sts#ExpiredTokenException\":\n response = {\n ...(await deserializeAws_queryExpiredTokenExceptionResponse(parsedOutput, context)),\n name: errorCode,\n $metadata: deserializeMetadata(output),\n };\n break;\n case \"IDPRejectedClaimException\":\n case \"com.amazonaws.sts#IDPRejectedClaimException\":\n response = {\n ...(await deserializeAws_queryIDPRejectedClaimExceptionResponse(parsedOutput, context)),\n name: errorCode,\n $metadata: deserializeMetadata(output),\n };\n break;\n case \"InvalidIdentityTokenException\":\n case \"com.amazonaws.sts#InvalidIdentityTokenException\":\n response = {\n ...(await deserializeAws_queryInvalidIdentityTokenExceptionResponse(parsedOutput, context)),\n name: errorCode,\n $metadata: deserializeMetadata(output),\n };\n break;\n case \"MalformedPolicyDocumentException\":\n case \"com.amazonaws.sts#MalformedPolicyDocumentException\":\n response = {\n ...(await deserializeAws_queryMalformedPolicyDocumentExceptionResponse(parsedOutput, context)),\n name: errorCode,\n $metadata: deserializeMetadata(output),\n };\n break;\n case \"PackedPolicyTooLargeException\":\n case \"com.amazonaws.sts#PackedPolicyTooLargeException\":\n response = {\n ...(await deserializeAws_queryPackedPolicyTooLargeExceptionResponse(parsedOutput, context)),\n name: errorCode,\n $metadata: deserializeMetadata(output),\n };\n break;\n case \"RegionDisabledException\":\n case \"com.amazonaws.sts#RegionDisabledException\":\n response = {\n ...(await deserializeAws_queryRegionDisabledExceptionResponse(parsedOutput, context)),\n name: errorCode,\n $metadata: deserializeMetadata(output),\n };\n break;\n default:\n const parsedBody = parsedOutput.body;\n errorCode = parsedBody.Error.code || parsedBody.Error.Code || errorCode;\n response = {\n ...parsedBody.Error,\n name: `${errorCode}`,\n message: parsedBody.Error.message || parsedBody.Error.Message || errorCode,\n $fault: \"client\",\n $metadata: deserializeMetadata(output),\n };\n }\n const message = response.message || response.Message || errorCode;\n response.message = message;\n delete response.Message;\n return Promise.reject(Object.assign(new Error(message), response));\n};\nconst deserializeAws_queryAssumeRoleWithWebIdentityCommand = async (output, context) => {\n if (output.statusCode >= 300) {\n return deserializeAws_queryAssumeRoleWithWebIdentityCommandError(output, context);\n }\n const data = await parseBody(output.body, context);\n let contents = {};\n contents = deserializeAws_queryAssumeRoleWithWebIdentityResponse(data.AssumeRoleWithWebIdentityResult, context);\n const response = {\n $metadata: deserializeMetadata(output),\n ...contents,\n };\n return Promise.resolve(response);\n};\nexports.deserializeAws_queryAssumeRoleWithWebIdentityCommand = deserializeAws_queryAssumeRoleWithWebIdentityCommand;\nconst deserializeAws_queryAssumeRoleWithWebIdentityCommandError = async (output, context) => {\n const parsedOutput = {\n ...output,\n body: await parseBody(output.body, context),\n };\n let response;\n let errorCode = \"UnknownError\";\n errorCode = loadQueryErrorCode(output, parsedOutput.body);\n switch (errorCode) {\n case \"ExpiredTokenException\":\n case \"com.amazonaws.sts#ExpiredTokenException\":\n response = {\n ...(await deserializeAws_queryExpiredTokenExceptionResponse(parsedOutput, context)),\n name: errorCode,\n $metadata: deserializeMetadata(output),\n };\n break;\n case \"IDPCommunicationErrorException\":\n case \"com.amazonaws.sts#IDPCommunicationErrorException\":\n response = {\n ...(await deserializeAws_queryIDPCommunicationErrorExceptionResponse(parsedOutput, context)),\n name: errorCode,\n $metadata: deserializeMetadata(output),\n };\n break;\n case \"IDPRejectedClaimException\":\n case \"com.amazonaws.sts#IDPRejectedClaimException\":\n response = {\n ...(await deserializeAws_queryIDPRejectedClaimExceptionResponse(parsedOutput, context)),\n name: errorCode,\n $metadata: deserializeMetadata(output),\n };\n break;\n case \"InvalidIdentityTokenException\":\n case \"com.amazonaws.sts#InvalidIdentityTokenException\":\n response = {\n ...(await deserializeAws_queryInvalidIdentityTokenExceptionResponse(parsedOutput, context)),\n name: errorCode,\n $metadata: deserializeMetadata(output),\n };\n break;\n case \"MalformedPolicyDocumentException\":\n case \"com.amazonaws.sts#MalformedPolicyDocumentException\":\n response = {\n ...(await deserializeAws_queryMalformedPolicyDocumentExceptionResponse(parsedOutput, context)),\n name: errorCode,\n $metadata: deserializeMetadata(output),\n };\n break;\n case \"PackedPolicyTooLargeException\":\n case \"com.amazonaws.sts#PackedPolicyTooLargeException\":\n response = {\n ...(await deserializeAws_queryPackedPolicyTooLargeExceptionResponse(parsedOutput, context)),\n name: errorCode,\n $metadata: deserializeMetadata(output),\n };\n break;\n case \"RegionDisabledException\":\n case \"com.amazonaws.sts#RegionDisabledException\":\n response = {\n ...(await deserializeAws_queryRegionDisabledExceptionResponse(parsedOutput, context)),\n name: errorCode,\n $metadata: deserializeMetadata(output),\n };\n break;\n default:\n const parsedBody = parsedOutput.body;\n errorCode = parsedBody.Error.code || parsedBody.Error.Code || errorCode;\n response = {\n ...parsedBody.Error,\n name: `${errorCode}`,\n message: parsedBody.Error.message || parsedBody.Error.Message || errorCode,\n $fault: \"client\",\n $metadata: deserializeMetadata(output),\n };\n }\n const message = response.message || response.Message || errorCode;\n response.message = message;\n delete response.Message;\n return Promise.reject(Object.assign(new Error(message), response));\n};\nconst deserializeAws_queryDecodeAuthorizationMessageCommand = async (output, context) => {\n if (output.statusCode >= 300) {\n return deserializeAws_queryDecodeAuthorizationMessageCommandError(output, context);\n }\n const data = await parseBody(output.body, context);\n let contents = {};\n contents = deserializeAws_queryDecodeAuthorizationMessageResponse(data.DecodeAuthorizationMessageResult, context);\n const response = {\n $metadata: deserializeMetadata(output),\n ...contents,\n };\n return Promise.resolve(response);\n};\nexports.deserializeAws_queryDecodeAuthorizationMessageCommand = deserializeAws_queryDecodeAuthorizationMessageCommand;\nconst deserializeAws_queryDecodeAuthorizationMessageCommandError = async (output, context) => {\n const parsedOutput = {\n ...output,\n body: await parseBody(output.body, context),\n };\n let response;\n let errorCode = \"UnknownError\";\n errorCode = loadQueryErrorCode(output, parsedOutput.body);\n switch (errorCode) {\n case \"InvalidAuthorizationMessageException\":\n case \"com.amazonaws.sts#InvalidAuthorizationMessageException\":\n response = {\n ...(await deserializeAws_queryInvalidAuthorizationMessageExceptionResponse(parsedOutput, context)),\n name: errorCode,\n $metadata: deserializeMetadata(output),\n };\n break;\n default:\n const parsedBody = parsedOutput.body;\n errorCode = parsedBody.Error.code || parsedBody.Error.Code || errorCode;\n response = {\n ...parsedBody.Error,\n name: `${errorCode}`,\n message: parsedBody.Error.message || parsedBody.Error.Message || errorCode,\n $fault: \"client\",\n $metadata: deserializeMetadata(output),\n };\n }\n const message = response.message || response.Message || errorCode;\n response.message = message;\n delete response.Message;\n return Promise.reject(Object.assign(new Error(message), response));\n};\nconst deserializeAws_queryGetAccessKeyInfoCommand = async (output, context) => {\n if (output.statusCode >= 300) {\n return deserializeAws_queryGetAccessKeyInfoCommandError(output, context);\n }\n const data = await parseBody(output.body, context);\n let contents = {};\n contents = deserializeAws_queryGetAccessKeyInfoResponse(data.GetAccessKeyInfoResult, context);\n const response = {\n $metadata: deserializeMetadata(output),\n ...contents,\n };\n return Promise.resolve(response);\n};\nexports.deserializeAws_queryGetAccessKeyInfoCommand = deserializeAws_queryGetAccessKeyInfoCommand;\nconst deserializeAws_queryGetAccessKeyInfoCommandError = async (output, context) => {\n const parsedOutput = {\n ...output,\n body: await parseBody(output.body, context),\n };\n let response;\n let errorCode = \"UnknownError\";\n errorCode = loadQueryErrorCode(output, parsedOutput.body);\n switch (errorCode) {\n default:\n const parsedBody = parsedOutput.body;\n errorCode = parsedBody.Error.code || parsedBody.Error.Code || errorCode;\n response = {\n ...parsedBody.Error,\n name: `${errorCode}`,\n message: parsedBody.Error.message || parsedBody.Error.Message || errorCode,\n $fault: \"client\",\n $metadata: deserializeMetadata(output),\n };\n }\n const message = response.message || response.Message || errorCode;\n response.message = message;\n delete response.Message;\n return Promise.reject(Object.assign(new Error(message), response));\n};\nconst deserializeAws_queryGetCallerIdentityCommand = async (output, context) => {\n if (output.statusCode >= 300) {\n return deserializeAws_queryGetCallerIdentityCommandError(output, context);\n }\n const data = await parseBody(output.body, context);\n let contents = {};\n contents = deserializeAws_queryGetCallerIdentityResponse(data.GetCallerIdentityResult, context);\n const response = {\n $metadata: deserializeMetadata(output),\n ...contents,\n };\n return Promise.resolve(response);\n};\nexports.deserializeAws_queryGetCallerIdentityCommand = deserializeAws_queryGetCallerIdentityCommand;\nconst deserializeAws_queryGetCallerIdentityCommandError = async (output, context) => {\n const parsedOutput = {\n ...output,\n body: await parseBody(output.body, context),\n };\n let response;\n let errorCode = \"UnknownError\";\n errorCode = loadQueryErrorCode(output, parsedOutput.body);\n switch (errorCode) {\n default:\n const parsedBody = parsedOutput.body;\n errorCode = parsedBody.Error.code || parsedBody.Error.Code || errorCode;\n response = {\n ...parsedBody.Error,\n name: `${errorCode}`,\n message: parsedBody.Error.message || parsedBody.Error.Message || errorCode,\n $fault: \"client\",\n $metadata: deserializeMetadata(output),\n };\n }\n const message = response.message || response.Message || errorCode;\n response.message = message;\n delete response.Message;\n return Promise.reject(Object.assign(new Error(message), response));\n};\nconst deserializeAws_queryGetFederationTokenCommand = async (output, context) => {\n if (output.statusCode >= 300) {\n return deserializeAws_queryGetFederationTokenCommandError(output, context);\n }\n const data = await parseBody(output.body, context);\n let contents = {};\n contents = deserializeAws_queryGetFederationTokenResponse(data.GetFederationTokenResult, context);\n const response = {\n $metadata: deserializeMetadata(output),\n ...contents,\n };\n return Promise.resolve(response);\n};\nexports.deserializeAws_queryGetFederationTokenCommand = deserializeAws_queryGetFederationTokenCommand;\nconst deserializeAws_queryGetFederationTokenCommandError = async (output, context) => {\n const parsedOutput = {\n ...output,\n body: await parseBody(output.body, context),\n };\n let response;\n let errorCode = \"UnknownError\";\n errorCode = loadQueryErrorCode(output, parsedOutput.body);\n switch (errorCode) {\n case \"MalformedPolicyDocumentException\":\n case \"com.amazonaws.sts#MalformedPolicyDocumentException\":\n response = {\n ...(await deserializeAws_queryMalformedPolicyDocumentExceptionResponse(parsedOutput, context)),\n name: errorCode,\n $metadata: deserializeMetadata(output),\n };\n break;\n case \"PackedPolicyTooLargeException\":\n case \"com.amazonaws.sts#PackedPolicyTooLargeException\":\n response = {\n ...(await deserializeAws_queryPackedPolicyTooLargeExceptionResponse(parsedOutput, context)),\n name: errorCode,\n $metadata: deserializeMetadata(output),\n };\n break;\n case \"RegionDisabledException\":\n case \"com.amazonaws.sts#RegionDisabledException\":\n response = {\n ...(await deserializeAws_queryRegionDisabledExceptionResponse(parsedOutput, context)),\n name: errorCode,\n $metadata: deserializeMetadata(output),\n };\n break;\n default:\n const parsedBody = parsedOutput.body;\n errorCode = parsedBody.Error.code || parsedBody.Error.Code || errorCode;\n response = {\n ...parsedBody.Error,\n name: `${errorCode}`,\n message: parsedBody.Error.message || parsedBody.Error.Message || errorCode,\n $fault: \"client\",\n $metadata: deserializeMetadata(output),\n };\n }\n const message = response.message || response.Message || errorCode;\n response.message = message;\n delete response.Message;\n return Promise.reject(Object.assign(new Error(message), response));\n};\nconst deserializeAws_queryGetSessionTokenCommand = async (output, context) => {\n if (output.statusCode >= 300) {\n return deserializeAws_queryGetSessionTokenCommandError(output, context);\n }\n const data = await parseBody(output.body, context);\n let contents = {};\n contents = deserializeAws_queryGetSessionTokenResponse(data.GetSessionTokenResult, context);\n const response = {\n $metadata: deserializeMetadata(output),\n ...contents,\n };\n return Promise.resolve(response);\n};\nexports.deserializeAws_queryGetSessionTokenCommand = deserializeAws_queryGetSessionTokenCommand;\nconst deserializeAws_queryGetSessionTokenCommandError = async (output, context) => {\n const parsedOutput = {\n ...output,\n body: await parseBody(output.body, context),\n };\n let response;\n let errorCode = \"UnknownError\";\n errorCode = loadQueryErrorCode(output, parsedOutput.body);\n switch (errorCode) {\n case \"RegionDisabledException\":\n case \"com.amazonaws.sts#RegionDisabledException\":\n response = {\n ...(await deserializeAws_queryRegionDisabledExceptionResponse(parsedOutput, context)),\n name: errorCode,\n $metadata: deserializeMetadata(output),\n };\n break;\n default:\n const parsedBody = parsedOutput.body;\n errorCode = parsedBody.Error.code || parsedBody.Error.Code || errorCode;\n response = {\n ...parsedBody.Error,\n name: `${errorCode}`,\n message: parsedBody.Error.message || parsedBody.Error.Message || errorCode,\n $fault: \"client\",\n $metadata: deserializeMetadata(output),\n };\n }\n const message = response.message || response.Message || errorCode;\n response.message = message;\n delete response.Message;\n return Promise.reject(Object.assign(new Error(message), response));\n};\nconst deserializeAws_queryExpiredTokenExceptionResponse = async (parsedOutput, context) => {\n const body = parsedOutput.body;\n const deserialized = deserializeAws_queryExpiredTokenException(body.Error, context);\n const contents = {\n name: \"ExpiredTokenException\",\n $fault: \"client\",\n $metadata: deserializeMetadata(parsedOutput),\n ...deserialized,\n };\n return contents;\n};\nconst deserializeAws_queryIDPCommunicationErrorExceptionResponse = async (parsedOutput, context) => {\n const body = parsedOutput.body;\n const deserialized = deserializeAws_queryIDPCommunicationErrorException(body.Error, context);\n const contents = {\n name: \"IDPCommunicationErrorException\",\n $fault: \"client\",\n $metadata: deserializeMetadata(parsedOutput),\n ...deserialized,\n };\n return contents;\n};\nconst deserializeAws_queryIDPRejectedClaimExceptionResponse = async (parsedOutput, context) => {\n const body = parsedOutput.body;\n const deserialized = deserializeAws_queryIDPRejectedClaimException(body.Error, context);\n const contents = {\n name: \"IDPRejectedClaimException\",\n $fault: \"client\",\n $metadata: deserializeMetadata(parsedOutput),\n ...deserialized,\n };\n return contents;\n};\nconst deserializeAws_queryInvalidAuthorizationMessageExceptionResponse = async (parsedOutput, context) => {\n const body = parsedOutput.body;\n const deserialized = deserializeAws_queryInvalidAuthorizationMessageException(body.Error, context);\n const contents = {\n name: \"InvalidAuthorizationMessageException\",\n $fault: \"client\",\n $metadata: deserializeMetadata(parsedOutput),\n ...deserialized,\n };\n return contents;\n};\nconst deserializeAws_queryInvalidIdentityTokenExceptionResponse = async (parsedOutput, context) => {\n const body = parsedOutput.body;\n const deserialized = deserializeAws_queryInvalidIdentityTokenException(body.Error, context);\n const contents = {\n name: \"InvalidIdentityTokenException\",\n $fault: \"client\",\n $metadata: deserializeMetadata(parsedOutput),\n ...deserialized,\n };\n return contents;\n};\nconst deserializeAws_queryMalformedPolicyDocumentExceptionResponse = async (parsedOutput, context) => {\n const body = parsedOutput.body;\n const deserialized = deserializeAws_queryMalformedPolicyDocumentException(body.Error, context);\n const contents = {\n name: \"MalformedPolicyDocumentException\",\n $fault: \"client\",\n $metadata: deserializeMetadata(parsedOutput),\n ...deserialized,\n };\n return contents;\n};\nconst deserializeAws_queryPackedPolicyTooLargeExceptionResponse = async (parsedOutput, context) => {\n const body = parsedOutput.body;\n const deserialized = deserializeAws_queryPackedPolicyTooLargeException(body.Error, context);\n const contents = {\n name: \"PackedPolicyTooLargeException\",\n $fault: \"client\",\n $metadata: deserializeMetadata(parsedOutput),\n ...deserialized,\n };\n return contents;\n};\nconst deserializeAws_queryRegionDisabledExceptionResponse = async (parsedOutput, context) => {\n const body = parsedOutput.body;\n const deserialized = deserializeAws_queryRegionDisabledException(body.Error, context);\n const contents = {\n name: \"RegionDisabledException\",\n $fault: \"client\",\n $metadata: deserializeMetadata(parsedOutput),\n ...deserialized,\n };\n return contents;\n};\nconst serializeAws_queryAssumeRoleRequest = (input, context) => {\n const entries = {};\n if (input.RoleArn !== undefined && input.RoleArn !== null) {\n entries[\"RoleArn\"] = input.RoleArn;\n }\n if (input.RoleSessionName !== undefined && input.RoleSessionName !== null) {\n entries[\"RoleSessionName\"] = input.RoleSessionName;\n }\n if (input.PolicyArns !== undefined && input.PolicyArns !== null) {\n const memberEntries = serializeAws_querypolicyDescriptorListType(input.PolicyArns, context);\n Object.entries(memberEntries).forEach(([key, value]) => {\n const loc = `PolicyArns.${key}`;\n entries[loc] = value;\n });\n }\n if (input.Policy !== undefined && input.Policy !== null) {\n entries[\"Policy\"] = input.Policy;\n }\n if (input.DurationSeconds !== undefined && input.DurationSeconds !== null) {\n entries[\"DurationSeconds\"] = input.DurationSeconds;\n }\n if (input.Tags !== undefined && input.Tags !== null) {\n const memberEntries = serializeAws_querytagListType(input.Tags, context);\n Object.entries(memberEntries).forEach(([key, value]) => {\n const loc = `Tags.${key}`;\n entries[loc] = value;\n });\n }\n if (input.TransitiveTagKeys !== undefined && input.TransitiveTagKeys !== null) {\n const memberEntries = serializeAws_querytagKeyListType(input.TransitiveTagKeys, context);\n Object.entries(memberEntries).forEach(([key, value]) => {\n const loc = `TransitiveTagKeys.${key}`;\n entries[loc] = value;\n });\n }\n if (input.ExternalId !== undefined && input.ExternalId !== null) {\n entries[\"ExternalId\"] = input.ExternalId;\n }\n if (input.SerialNumber !== undefined && input.SerialNumber !== null) {\n entries[\"SerialNumber\"] = input.SerialNumber;\n }\n if (input.TokenCode !== undefined && input.TokenCode !== null) {\n entries[\"TokenCode\"] = input.TokenCode;\n }\n if (input.SourceIdentity !== undefined && input.SourceIdentity !== null) {\n entries[\"SourceIdentity\"] = input.SourceIdentity;\n }\n return entries;\n};\nconst serializeAws_queryAssumeRoleWithSAMLRequest = (input, context) => {\n const entries = {};\n if (input.RoleArn !== undefined && input.RoleArn !== null) {\n entries[\"RoleArn\"] = input.RoleArn;\n }\n if (input.PrincipalArn !== undefined && input.PrincipalArn !== null) {\n entries[\"PrincipalArn\"] = input.PrincipalArn;\n }\n if (input.SAMLAssertion !== undefined && input.SAMLAssertion !== null) {\n entries[\"SAMLAssertion\"] = input.SAMLAssertion;\n }\n if (input.PolicyArns !== undefined && input.PolicyArns !== null) {\n const memberEntries = serializeAws_querypolicyDescriptorListType(input.PolicyArns, context);\n Object.entries(memberEntries).forEach(([key, value]) => {\n const loc = `PolicyArns.${key}`;\n entries[loc] = value;\n });\n }\n if (input.Policy !== undefined && input.Policy !== null) {\n entries[\"Policy\"] = input.Policy;\n }\n if (input.DurationSeconds !== undefined && input.DurationSeconds !== null) {\n entries[\"DurationSeconds\"] = input.DurationSeconds;\n }\n return entries;\n};\nconst serializeAws_queryAssumeRoleWithWebIdentityRequest = (input, context) => {\n const entries = {};\n if (input.RoleArn !== undefined && input.RoleArn !== null) {\n entries[\"RoleArn\"] = input.RoleArn;\n }\n if (input.RoleSessionName !== undefined && input.RoleSessionName !== null) {\n entries[\"RoleSessionName\"] = input.RoleSessionName;\n }\n if (input.WebIdentityToken !== undefined && input.WebIdentityToken !== null) {\n entries[\"WebIdentityToken\"] = input.WebIdentityToken;\n }\n if (input.ProviderId !== undefined && input.ProviderId !== null) {\n entries[\"ProviderId\"] = input.ProviderId;\n }\n if (input.PolicyArns !== undefined && input.PolicyArns !== null) {\n const memberEntries = serializeAws_querypolicyDescriptorListType(input.PolicyArns, context);\n Object.entries(memberEntries).forEach(([key, value]) => {\n const loc = `PolicyArns.${key}`;\n entries[loc] = value;\n });\n }\n if (input.Policy !== undefined && input.Policy !== null) {\n entries[\"Policy\"] = input.Policy;\n }\n if (input.DurationSeconds !== undefined && input.DurationSeconds !== null) {\n entries[\"DurationSeconds\"] = input.DurationSeconds;\n }\n return entries;\n};\nconst serializeAws_queryDecodeAuthorizationMessageRequest = (input, context) => {\n const entries = {};\n if (input.EncodedMessage !== undefined && input.EncodedMessage !== null) {\n entries[\"EncodedMessage\"] = input.EncodedMessage;\n }\n return entries;\n};\nconst serializeAws_queryGetAccessKeyInfoRequest = (input, context) => {\n const entries = {};\n if (input.AccessKeyId !== undefined && input.AccessKeyId !== null) {\n entries[\"AccessKeyId\"] = input.AccessKeyId;\n }\n return entries;\n};\nconst serializeAws_queryGetCallerIdentityRequest = (input, context) => {\n const entries = {};\n return entries;\n};\nconst serializeAws_queryGetFederationTokenRequest = (input, context) => {\n const entries = {};\n if (input.Name !== undefined && input.Name !== null) {\n entries[\"Name\"] = input.Name;\n }\n if (input.Policy !== undefined && input.Policy !== null) {\n entries[\"Policy\"] = input.Policy;\n }\n if (input.PolicyArns !== undefined && input.PolicyArns !== null) {\n const memberEntries = serializeAws_querypolicyDescriptorListType(input.PolicyArns, context);\n Object.entries(memberEntries).forEach(([key, value]) => {\n const loc = `PolicyArns.${key}`;\n entries[loc] = value;\n });\n }\n if (input.DurationSeconds !== undefined && input.DurationSeconds !== null) {\n entries[\"DurationSeconds\"] = input.DurationSeconds;\n }\n if (input.Tags !== undefined && input.Tags !== null) {\n const memberEntries = serializeAws_querytagListType(input.Tags, context);\n Object.entries(memberEntries).forEach(([key, value]) => {\n const loc = `Tags.${key}`;\n entries[loc] = value;\n });\n }\n return entries;\n};\nconst serializeAws_queryGetSessionTokenRequest = (input, context) => {\n const entries = {};\n if (input.DurationSeconds !== undefined && input.DurationSeconds !== null) {\n entries[\"DurationSeconds\"] = input.DurationSeconds;\n }\n if (input.SerialNumber !== undefined && input.SerialNumber !== null) {\n entries[\"SerialNumber\"] = input.SerialNumber;\n }\n if (input.TokenCode !== undefined && input.TokenCode !== null) {\n entries[\"TokenCode\"] = input.TokenCode;\n }\n return entries;\n};\nconst serializeAws_querypolicyDescriptorListType = (input, context) => {\n const entries = {};\n let counter = 1;\n for (let entry of input) {\n if (entry === null) {\n continue;\n }\n const memberEntries = serializeAws_queryPolicyDescriptorType(entry, context);\n Object.entries(memberEntries).forEach(([key, value]) => {\n entries[`member.${counter}.${key}`] = value;\n });\n counter++;\n }\n return entries;\n};\nconst serializeAws_queryPolicyDescriptorType = (input, context) => {\n const entries = {};\n if (input.arn !== undefined && input.arn !== null) {\n entries[\"arn\"] = input.arn;\n }\n return entries;\n};\nconst serializeAws_queryTag = (input, context) => {\n const entries = {};\n if (input.Key !== undefined && input.Key !== null) {\n entries[\"Key\"] = input.Key;\n }\n if (input.Value !== undefined && input.Value !== null) {\n entries[\"Value\"] = input.Value;\n }\n return entries;\n};\nconst serializeAws_querytagKeyListType = (input, context) => {\n const entries = {};\n let counter = 1;\n for (let entry of input) {\n if (entry === null) {\n continue;\n }\n entries[`member.${counter}`] = entry;\n counter++;\n }\n return entries;\n};\nconst serializeAws_querytagListType = (input, context) => {\n const entries = {};\n let counter = 1;\n for (let entry of input) {\n if (entry === null) {\n continue;\n }\n const memberEntries = serializeAws_queryTag(entry, context);\n Object.entries(memberEntries).forEach(([key, value]) => {\n entries[`member.${counter}.${key}`] = value;\n });\n counter++;\n }\n return entries;\n};\nconst deserializeAws_queryAssumedRoleUser = (output, context) => {\n let contents = {\n AssumedRoleId: undefined,\n Arn: undefined,\n };\n if (output[\"AssumedRoleId\"] !== undefined) {\n contents.AssumedRoleId = smithy_client_1.expectString(output[\"AssumedRoleId\"]);\n }\n if (output[\"Arn\"] !== undefined) {\n contents.Arn = smithy_client_1.expectString(output[\"Arn\"]);\n }\n return contents;\n};\nconst deserializeAws_queryAssumeRoleResponse = (output, context) => {\n let contents = {\n Credentials: undefined,\n AssumedRoleUser: undefined,\n PackedPolicySize: undefined,\n SourceIdentity: undefined,\n };\n if (output[\"Credentials\"] !== undefined) {\n contents.Credentials = deserializeAws_queryCredentials(output[\"Credentials\"], context);\n }\n if (output[\"AssumedRoleUser\"] !== undefined) {\n contents.AssumedRoleUser = deserializeAws_queryAssumedRoleUser(output[\"AssumedRoleUser\"], context);\n }\n if (output[\"PackedPolicySize\"] !== undefined) {\n contents.PackedPolicySize = smithy_client_1.strictParseInt32(output[\"PackedPolicySize\"]);\n }\n if (output[\"SourceIdentity\"] !== undefined) {\n contents.SourceIdentity = smithy_client_1.expectString(output[\"SourceIdentity\"]);\n }\n return contents;\n};\nconst deserializeAws_queryAssumeRoleWithSAMLResponse = (output, context) => {\n let contents = {\n Credentials: undefined,\n AssumedRoleUser: undefined,\n PackedPolicySize: undefined,\n Subject: undefined,\n SubjectType: undefined,\n Issuer: undefined,\n Audience: undefined,\n NameQualifier: undefined,\n SourceIdentity: undefined,\n };\n if (output[\"Credentials\"] !== undefined) {\n contents.Credentials = deserializeAws_queryCredentials(output[\"Credentials\"], context);\n }\n if (output[\"AssumedRoleUser\"] !== undefined) {\n contents.AssumedRoleUser = deserializeAws_queryAssumedRoleUser(output[\"AssumedRoleUser\"], context);\n }\n if (output[\"PackedPolicySize\"] !== undefined) {\n contents.PackedPolicySize = smithy_client_1.strictParseInt32(output[\"PackedPolicySize\"]);\n }\n if (output[\"Subject\"] !== undefined) {\n contents.Subject = smithy_client_1.expectString(output[\"Subject\"]);\n }\n if (output[\"SubjectType\"] !== undefined) {\n contents.SubjectType = smithy_client_1.expectString(output[\"SubjectType\"]);\n }\n if (output[\"Issuer\"] !== undefined) {\n contents.Issuer = smithy_client_1.expectString(output[\"Issuer\"]);\n }\n if (output[\"Audience\"] !== undefined) {\n contents.Audience = smithy_client_1.expectString(output[\"Audience\"]);\n }\n if (output[\"NameQualifier\"] !== undefined) {\n contents.NameQualifier = smithy_client_1.expectString(output[\"NameQualifier\"]);\n }\n if (output[\"SourceIdentity\"] !== undefined) {\n contents.SourceIdentity = smithy_client_1.expectString(output[\"SourceIdentity\"]);\n }\n return contents;\n};\nconst deserializeAws_queryAssumeRoleWithWebIdentityResponse = (output, context) => {\n let contents = {\n Credentials: undefined,\n SubjectFromWebIdentityToken: undefined,\n AssumedRoleUser: undefined,\n PackedPolicySize: undefined,\n Provider: undefined,\n Audience: undefined,\n SourceIdentity: undefined,\n };\n if (output[\"Credentials\"] !== undefined) {\n contents.Credentials = deserializeAws_queryCredentials(output[\"Credentials\"], context);\n }\n if (output[\"SubjectFromWebIdentityToken\"] !== undefined) {\n contents.SubjectFromWebIdentityToken = smithy_client_1.expectString(output[\"SubjectFromWebIdentityToken\"]);\n }\n if (output[\"AssumedRoleUser\"] !== undefined) {\n contents.AssumedRoleUser = deserializeAws_queryAssumedRoleUser(output[\"AssumedRoleUser\"], context);\n }\n if (output[\"PackedPolicySize\"] !== undefined) {\n contents.PackedPolicySize = smithy_client_1.strictParseInt32(output[\"PackedPolicySize\"]);\n }\n if (output[\"Provider\"] !== undefined) {\n contents.Provider = smithy_client_1.expectString(output[\"Provider\"]);\n }\n if (output[\"Audience\"] !== undefined) {\n contents.Audience = smithy_client_1.expectString(output[\"Audience\"]);\n }\n if (output[\"SourceIdentity\"] !== undefined) {\n contents.SourceIdentity = smithy_client_1.expectString(output[\"SourceIdentity\"]);\n }\n return contents;\n};\nconst deserializeAws_queryCredentials = (output, context) => {\n let contents = {\n AccessKeyId: undefined,\n SecretAccessKey: undefined,\n SessionToken: undefined,\n Expiration: undefined,\n };\n if (output[\"AccessKeyId\"] !== undefined) {\n contents.AccessKeyId = smithy_client_1.expectString(output[\"AccessKeyId\"]);\n }\n if (output[\"SecretAccessKey\"] !== undefined) {\n contents.SecretAccessKey = smithy_client_1.expectString(output[\"SecretAccessKey\"]);\n }\n if (output[\"SessionToken\"] !== undefined) {\n contents.SessionToken = smithy_client_1.expectString(output[\"SessionToken\"]);\n }\n if (output[\"Expiration\"] !== undefined) {\n contents.Expiration = smithy_client_1.expectNonNull(smithy_client_1.parseRfc3339DateTime(output[\"Expiration\"]));\n }\n return contents;\n};\nconst deserializeAws_queryDecodeAuthorizationMessageResponse = (output, context) => {\n let contents = {\n DecodedMessage: undefined,\n };\n if (output[\"DecodedMessage\"] !== undefined) {\n contents.DecodedMessage = smithy_client_1.expectString(output[\"DecodedMessage\"]);\n }\n return contents;\n};\nconst deserializeAws_queryExpiredTokenException = (output, context) => {\n let contents = {\n message: undefined,\n };\n if (output[\"message\"] !== undefined) {\n contents.message = smithy_client_1.expectString(output[\"message\"]);\n }\n return contents;\n};\nconst deserializeAws_queryFederatedUser = (output, context) => {\n let contents = {\n FederatedUserId: undefined,\n Arn: undefined,\n };\n if (output[\"FederatedUserId\"] !== undefined) {\n contents.FederatedUserId = smithy_client_1.expectString(output[\"FederatedUserId\"]);\n }\n if (output[\"Arn\"] !== undefined) {\n contents.Arn = smithy_client_1.expectString(output[\"Arn\"]);\n }\n return contents;\n};\nconst deserializeAws_queryGetAccessKeyInfoResponse = (output, context) => {\n let contents = {\n Account: undefined,\n };\n if (output[\"Account\"] !== undefined) {\n contents.Account = smithy_client_1.expectString(output[\"Account\"]);\n }\n return contents;\n};\nconst deserializeAws_queryGetCallerIdentityResponse = (output, context) => {\n let contents = {\n UserId: undefined,\n Account: undefined,\n Arn: undefined,\n };\n if (output[\"UserId\"] !== undefined) {\n contents.UserId = smithy_client_1.expectString(output[\"UserId\"]);\n }\n if (output[\"Account\"] !== undefined) {\n contents.Account = smithy_client_1.expectString(output[\"Account\"]);\n }\n if (output[\"Arn\"] !== undefined) {\n contents.Arn = smithy_client_1.expectString(output[\"Arn\"]);\n }\n return contents;\n};\nconst deserializeAws_queryGetFederationTokenResponse = (output, context) => {\n let contents = {\n Credentials: undefined,\n FederatedUser: undefined,\n PackedPolicySize: undefined,\n };\n if (output[\"Credentials\"] !== undefined) {\n contents.Credentials = deserializeAws_queryCredentials(output[\"Credentials\"], context);\n }\n if (output[\"FederatedUser\"] !== undefined) {\n contents.FederatedUser = deserializeAws_queryFederatedUser(output[\"FederatedUser\"], context);\n }\n if (output[\"PackedPolicySize\"] !== undefined) {\n contents.PackedPolicySize = smithy_client_1.strictParseInt32(output[\"PackedPolicySize\"]);\n }\n return contents;\n};\nconst deserializeAws_queryGetSessionTokenResponse = (output, context) => {\n let contents = {\n Credentials: undefined,\n };\n if (output[\"Credentials\"] !== undefined) {\n contents.Credentials = deserializeAws_queryCredentials(output[\"Credentials\"], context);\n }\n return contents;\n};\nconst deserializeAws_queryIDPCommunicationErrorException = (output, context) => {\n let contents = {\n message: undefined,\n };\n if (output[\"message\"] !== undefined) {\n contents.message = smithy_client_1.expectString(output[\"message\"]);\n }\n return contents;\n};\nconst deserializeAws_queryIDPRejectedClaimException = (output, context) => {\n let contents = {\n message: undefined,\n };\n if (output[\"message\"] !== undefined) {\n contents.message = smithy_client_1.expectString(output[\"message\"]);\n }\n return contents;\n};\nconst deserializeAws_queryInvalidAuthorizationMessageException = (output, context) => {\n let contents = {\n message: undefined,\n };\n if (output[\"message\"] !== undefined) {\n contents.message = smithy_client_1.expectString(output[\"message\"]);\n }\n return contents;\n};\nconst deserializeAws_queryInvalidIdentityTokenException = (output, context) => {\n let contents = {\n message: undefined,\n };\n if (output[\"message\"] !== undefined) {\n contents.message = smithy_client_1.expectString(output[\"message\"]);\n }\n return contents;\n};\nconst deserializeAws_queryMalformedPolicyDocumentException = (output, context) => {\n let contents = {\n message: undefined,\n };\n if (output[\"message\"] !== undefined) {\n contents.message = smithy_client_1.expectString(output[\"message\"]);\n }\n return contents;\n};\nconst deserializeAws_queryPackedPolicyTooLargeException = (output, context) => {\n let contents = {\n message: undefined,\n };\n if (output[\"message\"] !== undefined) {\n contents.message = smithy_client_1.expectString(output[\"message\"]);\n }\n return contents;\n};\nconst deserializeAws_queryRegionDisabledException = (output, context) => {\n let contents = {\n message: undefined,\n };\n if (output[\"message\"] !== undefined) {\n contents.message = smithy_client_1.expectString(output[\"message\"]);\n }\n return contents;\n};\nconst deserializeMetadata = (output) => {\n var _a;\n return ({\n httpStatusCode: output.statusCode,\n requestId: (_a = output.headers[\"x-amzn-requestid\"]) !== null && _a !== void 0 ? _a : output.headers[\"x-amzn-request-id\"],\n extendedRequestId: output.headers[\"x-amz-id-2\"],\n cfId: output.headers[\"x-amz-cf-id\"],\n });\n};\n// Collect low-level response body stream to Uint8Array.\nconst collectBody = (streamBody = new Uint8Array(), context) => {\n if (streamBody instanceof Uint8Array) {\n return Promise.resolve(streamBody);\n }\n return context.streamCollector(streamBody) || Promise.resolve(new Uint8Array());\n};\n// Encode Uint8Array data into string with utf-8.\nconst collectBodyString = (streamBody, context) => collectBody(streamBody, context).then((body) => context.utf8Encoder(body));\nconst buildHttpRpcRequest = async (context, headers, path, resolvedHostname, body) => {\n const { hostname, protocol = \"https\", port, path: basePath } = await context.endpoint();\n const contents = {\n protocol,\n hostname,\n port,\n method: \"POST\",\n path: basePath.endsWith(\"/\") ? basePath.slice(0, -1) + path : basePath + path,\n headers,\n };\n if (resolvedHostname !== undefined) {\n contents.hostname = resolvedHostname;\n }\n if (body !== undefined) {\n contents.body = body;\n }\n return new protocol_http_1.HttpRequest(contents);\n};\nconst parseBody = (streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {\n if (encoded.length) {\n const parsedObj = fast_xml_parser_1.parse(encoded, {\n attributeNamePrefix: \"\",\n ignoreAttributes: false,\n parseNodeValue: false,\n trimValues: false,\n tagValueProcessor: (val) => (val.trim() === \"\" && val.includes(\"\\n\") ? \"\" : entities_1.decodeHTML(val)),\n });\n const textNodeName = \"#text\";\n const key = Object.keys(parsedObj)[0];\n const parsedObjToReturn = parsedObj[key];\n if (parsedObjToReturn[textNodeName]) {\n parsedObjToReturn[key] = parsedObjToReturn[textNodeName];\n delete parsedObjToReturn[textNodeName];\n }\n return smithy_client_1.getValueFromTextNode(parsedObjToReturn);\n }\n return {};\n});\nconst buildFormUrlencodedString = (formEntries) => Object.entries(formEntries)\n .map(([key, value]) => smithy_client_1.extendedEncodeURIComponent(key) + \"=\" + smithy_client_1.extendedEncodeURIComponent(value))\n .join(\"&\");\nconst loadQueryErrorCode = (output, data) => {\n if (data.Error.Code !== undefined) {\n return data.Error.Code;\n }\n if (output.statusCode == 404) {\n return \"NotFound\";\n }\n return \"\";\n};\n//# sourceMappingURL=Aws_query.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.getRuntimeConfig = void 0;\nconst tslib_1 = require(\"tslib\");\nconst package_json_1 = tslib_1.__importDefault(require(\"./package.json\"));\nconst defaultStsRoleAssumers_1 = require(\"./defaultStsRoleAssumers\");\nconst config_resolver_1 = require(\"@aws-sdk/config-resolver\");\nconst credential_provider_node_1 = require(\"@aws-sdk/credential-provider-node\");\nconst hash_node_1 = require(\"@aws-sdk/hash-node\");\nconst middleware_retry_1 = require(\"@aws-sdk/middleware-retry\");\nconst node_config_provider_1 = require(\"@aws-sdk/node-config-provider\");\nconst node_http_handler_1 = require(\"@aws-sdk/node-http-handler\");\nconst util_base64_node_1 = require(\"@aws-sdk/util-base64-node\");\nconst util_body_length_node_1 = require(\"@aws-sdk/util-body-length-node\");\nconst util_user_agent_node_1 = require(\"@aws-sdk/util-user-agent-node\");\nconst util_utf8_node_1 = require(\"@aws-sdk/util-utf8-node\");\nconst runtimeConfig_shared_1 = require(\"./runtimeConfig.shared\");\nconst smithy_client_1 = require(\"@aws-sdk/smithy-client\");\n/**\n * @internal\n */\nconst getRuntimeConfig = (config) => {\n var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o;\n smithy_client_1.emitWarningIfUnsupportedVersion(process.version);\n const clientSharedValues = runtimeConfig_shared_1.getRuntimeConfig(config);\n return {\n ...clientSharedValues,\n ...config,\n runtime: \"node\",\n base64Decoder: (_a = config === null || config === void 0 ? void 0 : config.base64Decoder) !== null && _a !== void 0 ? _a : util_base64_node_1.fromBase64,\n base64Encoder: (_b = config === null || config === void 0 ? void 0 : config.base64Encoder) !== null && _b !== void 0 ? _b : util_base64_node_1.toBase64,\n bodyLengthChecker: (_c = config === null || config === void 0 ? void 0 : config.bodyLengthChecker) !== null && _c !== void 0 ? _c : util_body_length_node_1.calculateBodyLength,\n credentialDefaultProvider: (_d = config === null || config === void 0 ? void 0 : config.credentialDefaultProvider) !== null && _d !== void 0 ? _d : defaultStsRoleAssumers_1.decorateDefaultCredentialProvider(credential_provider_node_1.defaultProvider),\n defaultUserAgentProvider: (_e = config === null || config === void 0 ? void 0 : config.defaultUserAgentProvider) !== null && _e !== void 0 ? _e : util_user_agent_node_1.defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: package_json_1.default.version }),\n maxAttempts: (_f = config === null || config === void 0 ? void 0 : config.maxAttempts) !== null && _f !== void 0 ? _f : node_config_provider_1.loadConfig(middleware_retry_1.NODE_MAX_ATTEMPT_CONFIG_OPTIONS),\n region: (_g = config === null || config === void 0 ? void 0 : config.region) !== null && _g !== void 0 ? _g : node_config_provider_1.loadConfig(config_resolver_1.NODE_REGION_CONFIG_OPTIONS, config_resolver_1.NODE_REGION_CONFIG_FILE_OPTIONS),\n requestHandler: (_h = config === null || config === void 0 ? void 0 : config.requestHandler) !== null && _h !== void 0 ? _h : new node_http_handler_1.NodeHttpHandler(),\n retryMode: (_j = config === null || config === void 0 ? void 0 : config.retryMode) !== null && _j !== void 0 ? _j : node_config_provider_1.loadConfig(middleware_retry_1.NODE_RETRY_MODE_CONFIG_OPTIONS),\n sha256: (_k = config === null || config === void 0 ? void 0 : config.sha256) !== null && _k !== void 0 ? _k : hash_node_1.Hash.bind(null, \"sha256\"),\n streamCollector: (_l = config === null || config === void 0 ? void 0 : config.streamCollector) !== null && _l !== void 0 ? _l : node_http_handler_1.streamCollector,\n utf8Decoder: (_m = config === null || config === void 0 ? void 0 : config.utf8Decoder) !== null && _m !== void 0 ? _m : util_utf8_node_1.fromUtf8,\n utf8Encoder: (_o = config === null || config === void 0 ? void 0 : config.utf8Encoder) !== null && _o !== void 0 ? _o : util_utf8_node_1.toUtf8,\n };\n};\nexports.getRuntimeConfig = getRuntimeConfig;\n//# sourceMappingURL=runtimeConfig.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.getRuntimeConfig = void 0;\nconst endpoints_1 = require(\"./endpoints\");\nconst url_parser_1 = require(\"@aws-sdk/url-parser\");\n/**\n * @internal\n */\nconst getRuntimeConfig = (config) => {\n var _a, _b, _c, _d, _e;\n return ({\n apiVersion: \"2011-06-15\",\n disableHostPrefix: (_a = config === null || config === void 0 ? void 0 : config.disableHostPrefix) !== null && _a !== void 0 ? _a : false,\n logger: (_b = config === null || config === void 0 ? void 0 : config.logger) !== null && _b !== void 0 ? _b : {},\n regionInfoProvider: (_c = config === null || config === void 0 ? void 0 : config.regionInfoProvider) !== null && _c !== void 0 ? _c : endpoints_1.defaultRegionInfoProvider,\n serviceId: (_d = config === null || config === void 0 ? void 0 : config.serviceId) !== null && _d !== void 0 ? _d : \"STS\",\n urlParser: (_e = config === null || config === void 0 ? void 0 : config.urlParser) !== null && _e !== void 0 ? _e : url_parser_1.parseUrl,\n });\n};\nexports.getRuntimeConfig = getRuntimeConfig;\n//# sourceMappingURL=runtimeConfig.shared.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst tslib_1 = require(\"tslib\");\ntslib_1.__exportStar(require(\"./resolveCustomEndpointsConfig\"), exports);\ntslib_1.__exportStar(require(\"./resolveEndpointsConfig\"), exports);\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi9zcmMvZW5kcG9pbnRzQ29uZmlnL2luZGV4LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7OztBQUFBLHlFQUErQztBQUMvQyxtRUFBeUMiLCJzb3VyY2VzQ29udGVudCI6WyJleHBvcnQgKiBmcm9tIFwiLi9yZXNvbHZlQ3VzdG9tRW5kcG9pbnRzQ29uZmlnXCI7XG5leHBvcnQgKiBmcm9tIFwiLi9yZXNvbHZlRW5kcG9pbnRzQ29uZmlnXCI7XG4iXX0=","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.resolveCustomEndpointsConfig = void 0;\nconst normalizeEndpoint_1 = require(\"./utils/normalizeEndpoint\");\nconst resolveCustomEndpointsConfig = (input) => {\n var _a;\n return ({\n ...input,\n tls: (_a = input.tls) !== null && _a !== void 0 ? _a : true,\n endpoint: normalizeEndpoint_1.normalizeEndpoint(input),\n isCustomEndpoint: true,\n });\n};\nexports.resolveCustomEndpointsConfig = resolveCustomEndpointsConfig;\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicmVzb2x2ZUN1c3RvbUVuZHBvaW50c0NvbmZpZy5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3NyYy9lbmRwb2ludHNDb25maWcvcmVzb2x2ZUN1c3RvbUVuZHBvaW50c0NvbmZpZy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7QUFHQSxpRUFBOEQ7QUFxQnZELE1BQU0sNEJBQTRCLEdBQUcsQ0FDMUMsS0FBMEQsRUFDdkIsRUFBRTs7SUFBQyxPQUFBLENBQUM7UUFDdkMsR0FBRyxLQUFLO1FBQ1IsR0FBRyxFQUFFLE1BQUEsS0FBSyxDQUFDLEdBQUcsbUNBQUksSUFBSTtRQUN0QixRQUFRLEVBQUUscUNBQWlCLENBQUMsS0FBSyxDQUFDO1FBQ2xDLGdCQUFnQixFQUFFLElBQUk7S0FDdkIsQ0FBQyxDQUFBO0NBQUEsQ0FBQztBQVBVLFFBQUEsNEJBQTRCLGdDQU90QyIsInNvdXJjZXNDb250ZW50IjpbImltcG9ydCB7IEVuZHBvaW50LCBQcm92aWRlciwgVXJsUGFyc2VyIH0gZnJvbSBcIkBhd3Mtc2RrL3R5cG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gdHJ1ZSxcbiAgZW5kcG9pbnQ6IG5vcm1hbGl6ZUVuZHBvaW50KGlucHV0KSxcbiAgaXNDdXN0b21FbmRwb2ludDogdHJ1ZSxcbn0pO1xuIl19","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.resolveEndpointsConfig = void 0;\nconst getEndpointFromRegion_1 = require(\"./utils/getEndpointFromRegion\");\nconst normalizeEndpoint_1 = require(\"./utils/normalizeEndpoint\");\nconst resolveEndpointsConfig = (input) => {\n var _a;\n return ({\n ...input,\n tls: (_a = input.tls) !== null && _a !== void 0 ? _a : true,\n endpoint: input.endpoint\n ? normalizeEndpoint_1.normalizeEndpoint({ ...input, endpoint: input.endpoint })\n : () => getEndpointFromRegion_1.getEndpointFromRegion(input),\n isCustomEndpoint: input.endpoint ? true : false,\n });\n};\nexports.resolveEndpointsConfig = resolveEndpointsConfig;\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicmVzb2x2ZUVuZHBvaW50c0NvbmZpZy5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3NyYy9lbmRwb2ludHNDb25maWcvcmVzb2x2ZUVuZHBvaW50c0NvbmZpZy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7QUFFQSx5RUFBc0U7QUFDdEUsaUVBQThEO0FBaUN2RCxNQUFNLHNCQUFzQixHQUFHLENBQ3BDLEtBQW9ELEVBQ3ZCLEVBQUU7O0lBQUMsT0FBQSxDQUFDO1FBQ2pDLEdBQUcsS0FBSztRQUNSLEdBQUcsRUFBRSxNQUFBLEtBQUssQ0FBQyxHQUFHLG1DQUFJLElBQUk7UUFDdEIsUUFBUSxFQUFFLEtBQUssQ0FBQyxRQUFRO1lBQ3RCLENBQUMsQ0FBQyxxQ0FBaUIsQ0FBQyxFQUFFLEdBQUcsS0FBSyxFQUFFLFFBQVEsRUFBRSxLQUFLLENBQUMsUUFBUSx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","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.getEndpointFromRegion = void 0;\nconst getEndpointFromRegion = async (input) => {\n var _a;\n const { tls = true } = input;\n const region = await input.region();\n const dnsHostRegex = new RegExp(/^([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9-]{0,61}[a-zA-Z0-9])$/);\n if (!dnsHostRegex.test(region)) {\n throw new Error(\"Invalid region in client config\");\n }\n const { hostname } = (_a = (await input.regionInfoProvider(region))) !== null && _a !== void 0 ? _a : {};\n if (!hostname) {\n throw new Error(\"Cannot resolve hostname from client config\");\n }\n return input.urlParser(`${tls ? \"https:\" : \"http:\"}//${hostname}`);\n};\nexports.getEndpointFromRegion = getEndpointFromRegion;\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZ2V0RW5kcG9pbnRGcm9tUmVnaW9uLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vc3JjL2VuZHBvaW50c0NvbmZpZy91dGlscy9nZXRFbmRwb2ludEZyb21SZWdpb24udHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7O0FBU08sTUFBTSxxQkFBcUIsR0FBRyxLQUFLLEVBQUUsS0FBbUMsRUFBRSxFQUFFOztJQUNqRixNQUFNLEVBQUUsR0FBRyxHQUFHLElBQUksRUFBRSxHQUFHLEtBQUssQ0FBQztJQUM3QixNQUFNLE1BQU0sR0FBRyxNQUFNLEtBQUssQ0FBQyxNQUFNLEVBQUUsQ0FBQztJQUVwQyxNQUFNLFlBQVksR0FBRyxJQUFJLE1BQU0sQ0FBQywwREFBMEQsQ0FBQyxDQUFDO0lBQzVGLElBQUksQ0FBQyxZQUFZLENBQUMsSUFBSSxDQUFDLE1BQU0sQ0FBQyxFQUFFO1FBQzlCLE1BQU0sSUFBSSxLQUFLLENBQUMsaUNBQWlDLENBQUMsQ0FBQztLQUNwRDtJQUVELE1BQU0sRUFBRS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fVthLXpBLVowLTldKSQvKTtcbiAgaWYgKCFkbnNIb3N0UmVnZXgudGVzdChyZWdpb24pKSB7XG4gICAgdGhyb3cgbmV3IEVycm9yKFwiSW52YWxpZCByZWdpb24gaW4gY2xpZW50IGNvbmZpZ1wiKTtcbiAgfVxuXG4gIGNvbnN0IHsgaG9zdG5hbWUgfSA9IChhd2FpdCBpbnB1dC5yZWdpb25JbmZvUHJvdmlkZXIocmVnaW9uKSkgPz8ge307XG4gIGlmICghaG9zdG5hbWUpIHtcbiAgICB0aHJvdyBuZXcgRXJyb3IoXCJDYW5ub3QgcmVzb2x2ZSBob3N0bmFtZSBmcm9tIGNsaWVudCBjb25maWdcIik7XG4gIH1cblxuICByZXR1cm4gaW5wdXQudXJsUGFyc2VyKGAke3RscyA/IFwiaHR0cHM6XCIgOiBcImh0dHA6XCJ9Ly8ke2hvc3RuYW1lfWApO1xufTtcbiJdfQ==","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.normalizeEndpoint = void 0;\nconst normalizeEndpoint = ({ endpoint, urlParser }) => {\n if (typeof endpoint === \"string\") {\n const promisified = Promise.resolve(urlParser(endpoint));\n return () => promisified;\n }\n else if (typeof endpoint === \"object\") {\n const promisified = Promise.resolve(endpoint);\n return () => promisified;\n }\n return endpoint;\n};\nexports.normalizeEndpoint = normalizeEndpoint;\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibm9ybWFsaXplRW5kcG9pbnQuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi9zcmMvZW5kcG9pbnRzQ29uZmlnL3V0aWxzL25vcm1hbGl6ZUVuZHBvaW50LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7OztBQU9PLE1BQU0saUJBQWlCLEdBQUcsQ0FBQyxFQUFFLFFBQVEsRUFBRSxTQUFTLEVBQTRCLEVBQXNCLEVBQUU7SUFDekcsSUFBSSxPQUFPL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vZiBlbmRwb2ludCA9PT0gXCJvYmplY3RcIikge1xuICAgIGNvbnN0IHByb21pc2lmaWVkID0gUHJvbWlzZS5yZXNvbHZlKGVuZHBvaW50KTtcbiAgICByZXR1cm4gKCkgPT4gcHJvbWlzaWZpZWQ7XG4gIH1cbiAgcmV0dXJuIGVuZHBvaW50O1xufTtcbiJdfQ==","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst tslib_1 = require(\"tslib\");\ntslib_1.__exportStar(require(\"./endpointsConfig\"), exports);\ntslib_1.__exportStar(require(\"./regionConfig\"), exports);\ntslib_1.__exportStar(require(\"./regionInfo\"), exports);\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvaW5kZXgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7O0FBQUEsNERBQWtDO0FBQ2xDLHlEQUErQjtBQUMvQix1REFBNkIiLCJzb3VyY2VzQ29udGVudCI6WyJleHBvcnQgKiBmcm9tIFwiLi9lbmRwb2ludHNDb25maWdcIjtcbmV4cG9ydCAqIGZyb20gXCIuL3JlZ2lvbkNvbmZpZ1wiO1xuZXhwb3J0ICogZnJvbSBcIi4vcmVnaW9uSW5mb1wiO1xuIl19","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.NODE_REGION_CONFIG_FILE_OPTIONS = exports.NODE_REGION_CONFIG_OPTIONS = exports.REGION_INI_NAME = exports.REGION_ENV_NAME = void 0;\nexports.REGION_ENV_NAME = \"AWS_REGION\";\nexports.REGION_INI_NAME = \"region\";\nexports.NODE_REGION_CONFIG_OPTIONS = {\n environmentVariableSelector: (env) => env[exports.REGION_ENV_NAME],\n configFileSelector: (profile) => profile[exports.REGION_INI_NAME],\n default: () => {\n throw new Error(\"Region is missing\");\n },\n};\nexports.NODE_REGION_CONFIG_FILE_OPTIONS = {\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B7XG4gIGVudmlyb25tZW50VmFyaWFibGVTZWxlY3RvcjogKGVudikgPT4gZW52W1JFR0lPTl9FTlZfTkFNRV0sXG4gIGNvbmZpZ0ZpbGVTZWxlY3RvcjogKHByb2ZpbGUpID0+IHByb2ZpbGVbUkVHSU9OX0lOSV9OQU1FXSxcbiAgZGVmYXVsdDogKCkgPT4ge1xuICAgIHRocm93IG5ldyBFcnJvcihcIlJlZ2lvbiBpcyBtaXNzaW5nXCIpO1xuICB9LFxufTtcblxuZXhwb3J0IGNvbnN0IE5PREVfUkVHSU9OX0NPTkZJR19GSUxFX09QVElPTlM6IExvY2FsQ29uZmlnT3B0aW9ucyA9IHtcbiAgcHJlZmVycmVkRmlsZTogXCJjcmVkZW50aWFsc1wiLFxufTtcbiJdfQ==","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst tslib_1 = require(\"tslib\");\ntslib_1.__exportStar(require(\"./config\"), exports);\ntslib_1.__exportStar(require(\"./resolveRegionConfig\"), exports);\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi9zcmMvcmVnaW9uQ29uZmlnL2luZGV4LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7OztBQUFBLG1EQUF5QjtBQUN6QixnRUFBc0MiLCJzb3VyY2VzQ29udGVudCI6WyJleHBvcnQgKiBmcm9tIFwiLi9jb25maWdcIjtcbmV4cG9ydCAqIGZyb20gXCIuL3Jlc29sdmVSZWdpb25Db25maWdcIjtcbiJdfQ==","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.normalizeRegion = void 0;\nconst normalizeRegion = (region) => {\n if (typeof region === \"string\") {\n const promisified = Promise.resolve(region);\n return () => promisified;\n }\n return region;\n};\nexports.normalizeRegion = normalizeRegion;\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibm9ybWFsaXplUmVnaW9uLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vc3JjL3JlZ2lvbkNvbmZpZy9ub3JtYWxpemVSZWdpb24udHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7O0FBRU8sTUFBTSxlQUFlLEdBQUcsQ0FBQyxNQUFpQyxFQUFvQixFQUFFO0lBQ3JGLElBQUksT0FBTyxNQUFNLEtBQUssUUFBUSxFQUFFO1FBQzlCLE1BQU0sV0FBVyxHQUFHLE9BQU8sQ0FBQyxPQUFPLENBQUMsTUFBTSxDQUFDLENBQUM7UUFDNUMsT0FBTyxHQUFHLEVBQUUsQ0FBQyxXQUFXLENBQUM7S0FDMUI7SUFDRCxPQUFPLE1BQTBCLENBQUM7QUFDcEMsQ0FBQyxDQUFDO0FBTlcsUUFBQSxlQUFlLG1CQU0xQiIsInNvdXJjZXNDb250ZW50IjpbImltcG9ydCB7IFByb3ZpZGVyIH0gZnJvbSBcIkBhd3Mtc2RrL3R5cGVzXCI7XG5cbmV4cG9ydCBjb25zdCBub3JtYWxpemVSZWdpb24gPSAocmVnaW9uOiBzdHJpbmcgfCBQcm92aWRlcjxzdHJpbmc+KTogUHJvdmlkZXI8c3RyaW5nPiA9PiB7XG4gIGlmICh0eXBlb2YgcmVnaW9uID09PSBcInN0cmluZ1wiKSB7XG4gICAgY29uc3QgcHJvbWlzaWZpZWQgPSBQcm9taXNlLnJlc29sdmUocmVnaW9uKTtcbiAgICByZXR1cm4gKCkgPT4gcHJvbWlzaWZpZWQ7XG4gIH1cbiAgcmV0dXJuIHJlZ2lvbiBhcyBQcm92aWRlcjxzdHJpbmc+O1xufTtcbiJdfQ==","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.resolveRegionConfig = void 0;\nconst normalizeRegion_1 = require(\"./normalizeRegion\");\nconst resolveRegionConfig = (input) => {\n if (!input.region) {\n throw new Error(\"Region is missing\");\n }\n return {\n ...input,\n region: normalizeRegion_1.normalizeRegion(input.region),\n };\n};\nexports.resolveRegionConfig = resolveRegionConfig;\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicmVzb2x2ZVJlZ2lvbkNvbmZpZy5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3NyYy9yZWdpb25Db25maWcvcmVzb2x2ZVJlZ2lvbkNvbmZpZy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7QUFFQSx1REFBb0Q7QUFrQjdDLE1BQU0sbUJBQW1CLEdBQUcsQ0FBSSxLQUFpRCxFQUE0QixFQUFFO0lBQ3BILElBQUksQ0FBQyxLQUFLLENBQUMsTUFBTSxFQUFFO1FBQ2pCLE1BQU0sSUFBSSxLQUFLLENBQUMsbUJBQW1CLENBQUMsQ0FBQztLQUN0QztJQUNELE9BQU87UUFDTCxHQUFHLEtBQUs7UUFDUixNQUFNLEVBQUUsaUNBQWUsQ0FBQyxLQUFLLENBQUMsTUFBTyxDQUFDO0tBQ3ZDLENBQUM7QUFDSixDQUFDLENBQUM7QUFSVyxRQUFBLG1CQUFtQix1QkFROUIiLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgeyBQcm92aWRlciB9IGZyb20gXCJAYXdzLXNkay90eXBlc1wiO1xuXG5pbXBvcnQgeyBub3JtYWxpemVSZWdpb24gfSBmcm9tIFwiLi9ub3JtYWxpemVSZWdpb25cIjtcblxuZXhwb3J0IGludGVyZmFjZSBSZWdpb25JbnB1dENvbmZpZyB7XG4gIC8qKlxuICAgKiBUaGUgQVdTIHJlZ2lvbiB0byB3aGljaCB0aGlzIGNsaWVudCB3aWxsIHNlbmQgcmVxdWVzdHNcbiAgICovXG4gIHJlZ2lvbj86IHN0cmluZyB8IFByb3ZpZGVyPHN0cmluZz47XG59XG5cbmludGVyZmFjZSBQcmV2aW91c2x5UmVzb2x2ZWQge31cblxuZXhwb3J0IGludGVyZmFjZSBSZWdpb25SZXNvbHZlZENvbmZpZyB7XG4gIC8qKlxuICAgKiBSZXNvbHZlZCB2YWx1ZSBmb3IgaW5wdXQgY29uZmlnIHtAbGluayBSZWdpb25JbnB1dENvbmZpZy5yZWdpb259XG4gICAqL1xuICByZWdpb246IFByb3ZpZGVyPHN0cmluZz47XG59XG5cbmV4cG9ydCBjb25zdCByZXNvbHZlUmVnaW9uQ29uZmlnID0gPFQ+KGlucHV0OiBUICYgUmVnaW9uSW5wdXRDb25maWcgJiBQcmV2aW91c2x5UmVzb2x2ZWQpOiBUICYgUmVnaW9uUmVzb2x2ZWRDb25maWcgPT4ge1xuICBpZiAoIWlucHV0LnJlZ2lvbikge1xuICAgIHRocm93IG5ldyBFcnJvcihcIlJlZ2lvbiBpcyBtaXNzaW5nXCIpO1xuICB9XG4gIHJldHVybiB7XG4gICAgLi4uaW5wdXQsXG4gICAgcmVnaW9uOiBub3JtYWxpemVSZWdpb24oaW5wdXQucmVnaW9uISksXG4gIH07XG59O1xuIl19","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.getHostnameTemplate = void 0;\nconst getResolvedPartition_1 = require(\"./getResolvedPartition\");\nconst AWS_TEMPLATE = \"{signingService}.{region}.amazonaws.com\";\nconst getHostnameTemplate = (region, { signingService, partitionHash }) => {\n var _a, _b;\n return (_b = (_a = partitionHash[getResolvedPartition_1.getResolvedPartition(region, { partitionHash })]) === null || _a === void 0 ? void 0 : _a.hostname) !== null && _b !== void 0 ? _b : AWS_TEMPLATE.replace(\"{signingService}\", signingService);\n};\nexports.getHostnameTemplate = getHostnameTemplate;\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZ2V0SG9zdG5hbWVUZW1wbGF0ZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3NyYy9yZWdpb25JbmZvL2dldEhvc3RuYW1lVGVtcGxhd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2ggfTogR2V0SG9zdG5hbWVUZW1wbGF0ZU9wdGlvbnMpID0+XG4gIHBhcnRpdGlvbkhhc2hbZ2V0UmVzb2x2ZWRQYXJ0aXRpb24ocmVnaW9uLCB7IHBhcnRpdGlvbkhhc2ggfSldPy5ob3N0bmFtZSA/P1xuICBBV1NfVEVNUExBVEUucmVwbGFjZShcIntzaWduaW5nU2VydmljZX1cIiwgc2lnbmluZ1NlcnZpY2UpO1xuIl19","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.getRegionInfo = void 0;\nconst getResolvedHostname_1 = require(\"./getResolvedHostname\");\nconst getResolvedPartition_1 = require(\"./getResolvedPartition\");\nconst getRegionInfo = (region, { signingService, regionHash, partitionHash }) => {\n var _a, _b, _c, _d;\n const partition = getResolvedPartition_1.getResolvedPartition(region, { partitionHash });\n const resolvedRegion = (_b = (_a = partitionHash[partition]) === null || _a === void 0 ? void 0 : _a.endpoint) !== null && _b !== void 0 ? _b : region;\n return {\n partition,\n signingService,\n hostname: getResolvedHostname_1.getResolvedHostname(resolvedRegion, { signingService, regionHash, partitionHash }),\n ...(((_c = regionHash[resolvedRegion]) === null || _c === void 0 ? void 0 : _c.signingRegion) && {\n signingRegion: regionHash[resolvedRegion].signingRegion,\n }),\n ...(((_d = regionHash[resolvedRegion]) === null || _d === void 0 ? void 0 : _d.signingService) && {\n signingService: regionHash[resolvedRegion].signingService,\n }),\n };\n};\nexports.getRegionInfo = getRegionInfo;\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZ2V0UmVnaW9uSW5mby5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3NyYy9yZWdpb25JbmZvL2dldFJlZ2lvbkluZm8udHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7O0FBRUEsK0RBQW9HO0FBQ3BHLGlFQUE2RTtBQU10RSxNQUFNLGFBQWEsR0FBRyxDQUMzQix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pZ25pbmdTZXJ2aWNlICYmIHtcbiAgICAgIHNpZ25pbmdTZXJ2aWNlOiByZWdpb25IYXNoW3Jlc29sdmVkUmVnaW9uXS5zaWduaW5nU2VydmljZSxcbiAgICB9KSxcbiAgfTtcbn07XG4iXX0=","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.getResolvedHostname = void 0;\nconst getHostnameTemplate_1 = require(\"./getHostnameTemplate\");\nconst getResolvedHostname = (region, { signingService, regionHash, partitionHash }) => {\n var _a, _b;\n return (_b = (_a = regionHash[region]) === null || _a === void 0 ? void 0 : _a.hostname) !== null && _b !== void 0 ? _b : getHostnameTemplate_1.getHostnameTemplate(region, { signingService, partitionHash }).replace(\"{region}\", region);\n};\nexports.getResolvedHostname = getResolvedHostname;\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZ2V0UmVzb2x2ZWRIb3N0bmFtZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3NyYy9yZWdpb25JbmZvL2dldFJlc29sdmVkSG9zdG5hbWUudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7O0FBRUEsK0RBQXdGO0FBYWpGLE1BQU0sbUJBQW1CLEdBQUcsQ0FDakMsTUFBYyxFQUNkLEVBQUUsY0FBYyxFQUFFLFVBQVUsRUFBRSxhQUFhLEVBQThCLEVBQ3pFLEVBQUU7O0lBQ0YsT0FBQSxNQUFBLE1BQUEsVUFBVSxDQUFDLE1BQU0sQ0FBQywwQ0FBRSxRQUFRLG1DQUM1Qix5Q0FBbUIsQ0FBQyxNQUFNLEVBQUUsRUFBRSxjQUFjLEVBQUUsYUFBYSxFQUFFLENBQUMsQ0FBQyxPQUFPLENBQUMsVUFBVSxFQUFFLE1BQU0sQ0FBQyxDQUFBO0NBQUEsQ0FBQztBQUxoRixRQUFBLG1CQUFtQix1QkFLNkQiLCJzb3VyY2VzQ29udGVudCI6WyJ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3RuYW1lID8/XG4gIGdldEhvc3RuYW1lVGVtcGxhdGUocmVnaW9uLCB7IHNpZ25pbmdTZXJ2aWNlLCBwYXJ0aXRpb25IYXNoIH0pLnJlcGxhY2UoXCJ7cmVnaW9ufVwiLCByZWdpb24pO1xuIl19","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.getResolvedPartition = void 0;\nconst getResolvedPartition = (region, { partitionHash }) => { var _a; return (_a = Object.keys(partitionHash || {}).find((key) => partitionHash[key].regions.includes(region))) !== null && _a !== void 0 ? _a : \"aws\"; };\nexports.getResolvedPartition = getResolvedPartition;\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZ2V0UmVzb2x2ZWRQYXJ0aXRpb24uanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi9zcmMvcmVnaW9uSW5mby9nZXRSZXNvbHZlZFBhcnRpdGlvbi50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7QUFXTyxNQUFNLG9CQUFvQixHQUFHLENBQUMsTUFBYyxFQUFFLEVBQUUsYUFBYSxFQUErQixFQUFFLEVBQUUsV0FDckcsT0FBQSxNQUFBLE1BQU0sQ0FBQyxJQUFJLENBQUMsYUFBYSxJQUFJLEVBQUUsQ0FBQyxDQUFDLElBQUksQ0FBQyxDQUFDLEdBQUcsRUFBRSxFQUFFLENBQUMsYUFBYSxDQUFDLEdBQUcsQ0FBQyxDQUFDLE9BQU8sQ0FBQyxRQUFRLENBQUMsTUFBTSxDQUFDLENBQUMsbUNBQUksS0FBSyxDQUFBLEVBQUEsQ0FBQztBQUQxRixRQUFBLG9CQUFvQix3QkFDc0UiLCJzb3VyY2VzQ29udGVudCI6WyJleHBvcnQgdHlwZSBQYXJ0aXRpb25IYXNoID0geyBba2V5OiBzdHJpbmddOiB7IHJlZ2lvbnM6IHN0cmluZ1tdOyBob3N0bmFtZT86IHN0cmluZzsgZW5kcG9pbnQ/OiBzdHJpbmcgfSB9O1xuXG5leHBvcnQgaW50ZXJmYWNlIEdldFJlc29sdmVkUGFydGl0aW9uT3B0aW9ucyB7XG4gIC8qKlxuICAgKiBUaGUgaGFzaCBvZiBwYXJ0aXRpb24gd2l0aCB0aGUgaW5mb3JtYXRpb24gc3BlY2lmaWMgdG8gdGhhdCBwYXJ0aXRpb24uXG4gICAqIFRoZSBpbmZvcm1hdGlvbiBpbmNsdWRlcyB0aGUgbGlzdCBvZiByZWdpb25zIGJlbG9uZ2luZyB0byB0aGF0IHBhcnRpdGlvbixcbiAgICogYW5kIHRoZSBob3N0bmFtZSB0byBiZSB1c2VkIGZvciB0aGUgcGFydGl0aW9uLlxuICAgKi9cbiAgcGFydGl0aW9uSGFzaDogUGFydGl0aW9uSGFzaDtcbn1cblxuZXhwb3J0IGNvbnN0IGdldFJlc29sdmVkUGFydGl0aW9uID0gKHJlZ2lvbjogc3RyaW5nLCB7IHBhcnRpdGlvbkhhc2ggfTogR2V0UmVzb2x2ZWRQYXJ0aXRpb25PcHRpb25zKSA9PlxuICBPYmplY3Qua2V5cyhwYXJ0aXRpb25IYXNoIHx8IHt9KS5maW5kKChrZXkpID0+IHBhcnRpdGlvbkhhc2hba2V5XS5yZWdpb25zLmluY2x1ZGVzKHJlZ2lvbikpID8/IFwiYXdzXCI7XG4iXX0=","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst tslib_1 = require(\"tslib\");\ntslib_1.__exportStar(require(\"./getRegionInfo\"), exports);\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi9zcmMvcmVnaW9uSW5mby9pbmRleC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7QUFBQSwwREFBZ0MiLCJzb3VyY2VzQ29udGVudCI6WyJleHBvcnQgKiBmcm9tIFwiLi9nZXRSZWdpb25JbmZvXCI7XG4iXX0=","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.fromEnv = exports.ENV_EXPIRATION = exports.ENV_SESSION = exports.ENV_SECRET = exports.ENV_KEY = void 0;\nconst property_provider_1 = require(\"@aws-sdk/property-provider\");\nexports.ENV_KEY = \"AWS_ACCESS_KEY_ID\";\nexports.ENV_SECRET = \"AWS_SECRET_ACCESS_KEY\";\nexports.ENV_SESSION = \"AWS_SESSION_TOKEN\";\nexports.ENV_EXPIRATION = \"AWS_CREDENTIAL_EXPIRATION\";\n/**\n * Source AWS credentials from known environment variables. If either the\n * `AWS_ACCESS_KEY_ID` or `AWS_SECRET_ACCESS_KEY` environment variable is not\n * set in this process, the provider will return a rejected promise.\n */\nfunction fromEnv() {\n return () => {\n const accessKeyId = process.env[exports.ENV_KEY];\n const secretAccessKey = process.env[exports.ENV_SECRET];\n const expiry = process.env[exports.ENV_EXPIRATION];\n if (accessKeyId && secretAccessKey) {\n return Promise.resolve({\n accessKeyId,\n secretAccessKey,\n sessionToken: process.env[exports.ENV_SESSION],\n expiration: expiry ? new Date(expiry) : undefined,\n });\n }\n return Promise.reject(new property_provider_1.CredentialsProviderError(\"Unable to find environment variable credentials.\"));\n };\n}\nexports.fromEnv = fromEnv;\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvaW5kZXgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7O0FBQUEsa0VBQXNFO0FBR3pELFFBQUEsT0FBTyxHQUFHLG1CQUFtQixDQUFDO0FBQzlCLFFBQUEsVUFBVSxHQUFHLHVCQUF1QixDQUFDO0FBQ3JDLFFBQUEsV0FBVyxHQUFHLG1CQUFtQixDQUFDO0FBQ2xDLFFBQUEsY0FBYyxHQUFHLDJCQUEyQixDQUFDO0FBRTFEOzs7O0dBSUc7QUFDS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9TRVNTSU9OXSxcbiAgICAgICAgZXhwaXJhdGlvbjogZXhwaXJ5ID8gbmV3IERhdGUoZXhwaXJ5KSA6IHVuZGVmaW5lZCxcbiAgICAgIH0pO1xuICAgIH1cblxuICAgIHJldHVybiBQcm9taXNlLnJlamVjdChuZXcgQ3JlZGVudGlhbHNQcm92aWRlckVycm9yKFwiVW5hYmxlIHRvIGZpbmQgZW52aXJvbm1lbnQgdmFyaWFibGUgY3JlZGVudGlhbHMuXCIpKTtcbiAgfTtcbn1cbiJdfQ==","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.Endpoint = void 0;\nvar Endpoint;\n(function (Endpoint) {\n Endpoint[\"IPv4\"] = \"http://169.254.169.254\";\n Endpoint[\"IPv6\"] = \"http://[fd00:ec2::254]\";\n})(Endpoint = exports.Endpoint || (exports.Endpoint = {}));\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiRW5kcG9pbnQuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi9zcmMvY29uZmlnL0VuZHBvaW50LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7OztBQUFBLElBQVksUUFHWDtBQUhELFdBQVksUUFBUTtJQUNsQiwyQ0FBK0IsQ0FBQTtJQUMvQiwyQ0FBK0IsQ0FBQTtBQUNqQyxDQUFDLEVBSFcsUUFBUSxHQUFSLGdCQUFRLEtBQVIsZ0JBQVEsUUFHbkIiLCJzb3VyY2VzQ29udGVudCI6WyJleHBvcnQgZW51bSBFbmRwb2ludCB7XG4gIElQdjQgPSBcImh0dHA6Ly8xNjkuMjU0LjE2OS4yNTRcIixcbiAgSVB2NiA9IFwiaHR0cDovL1tmZDAwOmVjMjo6MjU0XVwiLFxufVxuIl19","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.ENDPOINT_CONFIG_OPTIONS = exports.CONFIG_ENDPOINT_NAME = exports.ENV_ENDPOINT_NAME = void 0;\nexports.ENV_ENDPOINT_NAME = \"AWS_EC2_METADATA_SERVICE_ENDPOINT\";\nexports.CONFIG_ENDPOINT_NAME = \"ec2_metadata_service_endpoint\";\nexports.ENDPOINT_CONFIG_OPTIONS = {\n environmentVariableSelector: (env) => env[exports.ENV_ENDPOINT_NAME],\n configFileSelector: (profile) => profile[exports.CONFIG_ENDPOINT_NAME],\n default: undefined,\n};\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiRW5kcG9pbnRDb25maWdPcHRpb25zLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vc3JjL2NvbmZpZy9FbmRwb2ludENvbmZpZ09wdGlvbnMudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7O0FBRWEsUUFBQSxpQkFBaUIsR0FBRyxtQ0FBbUMsQ0FBQztBQUN4RCxRQUFBLG9CQUFvQixHQUFHLCtCQUErQixDQUFDO0FBRXZELFFBQUEsdUJBQXVCLEdBQThDO0lBQ2hGLDJCQUEyQixFQUFFLENBQUMsR0FBRyxFQUFFLEVBQUUsQ0FBQyxHQUFHLENBQUMseUJBQWlCLENBQUM7SUFDNUQsa0JBQWtCLEVBQUUsQ0FBQyxPQUFPLEVBQUUsRUFBRSxDQUFDLE9BQU8sQ0FBQyw0QkFBb0IsQ0FBQztJQUM5RCxPQUFPLEVBQUUsU0FBUztDQUNuQixDQUFDIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHsgTG9hZGVkQ29uZmlnU2VsZWN0b3JzIH0gZnJvbSBcIkBhd3Mtc2RrL25vZGUtY29uZmlnLXByb3ZpZGVyXCI7XG5cbmV4cG9ydCBjb25zdCBFTlZfRU5EUE9JTlRfTkFNRSA9IFwiQVdTX0VDMl9NRVRBREFUQV9TRVJWSUNFX0VORFBPSU5UXCI7XG5leHBvcnQgY29uc3QgQ09ORklHX0VORFBPSU5UX05BTUUgPSBcImVjMl9tZXRhZGF0YV9zZXJ2aWNlX2VuZHBvaW50XCI7XG5cbmV4cG9ydCBjb25zdCBFTkRQT0lOVF9DT05GSUdfT1BUSU9OUzogTG9hZGVkQ29uZmlnU2VsZWN0b3JzPHN0cmluZyB8IHVuZGVmaW5lZD4gPSB7XG4gIGVudmlyb25tZW50VmFyaWFibGVTZWxlY3RvcjogKGVudikgPT4gZW52W0VOVl9FTkRQT0lOVF9OQU1FXSxcbiAgY29uZmlnRmlsZVNlbGVjdG9yOiAocHJvZmlsZSkgPT4gcHJvZmlsZVtDT05GSUdfRU5EUE9JTlRfTkFNRV0sXG4gIGRlZmF1bHQ6IHVuZGVmaW5lZCxcbn07XG4iXX0=","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.EndpointMode = void 0;\nvar EndpointMode;\n(function (EndpointMode) {\n EndpointMode[\"IPv4\"] = \"IPv4\";\n EndpointMode[\"IPv6\"] = \"IPv6\";\n})(EndpointMode = exports.EndpointMode || (exports.EndpointMode = {}));\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiRW5kcG9pbnRNb2RlLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vc3JjL2NvbmZpZy9FbmRwb2ludE1vZGUudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7O0FBQUEsSUFBWSxZQUdYO0FBSEQsV0FBWSxZQUFZO0lBQ3RCLDZCQUFhLENBQUE7SUFDYiw2QkFBYSxDQUFBO0FBQ2YsQ0FBQyxFQUhXLFlBQVksR0FBWixvQkFBWSxLQUFaLG9CQUFZLFFBR3ZCIiwic291cmNlc0NvbnRlbnQiOlsiZXhwb3J0IGVudW0gRW5kcG9pbnRNb2RlIHtcbiAgSVB2NCA9IFwiSVB2NFwiLFxuICBJUHY2ID0gXCJJUHY2XCIsXG59XG4iXX0=","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.ENDPOINT_MODE_CONFIG_OPTIONS = exports.CONFIG_ENDPOINT_MODE_NAME = exports.ENV_ENDPOINT_MODE_NAME = void 0;\nconst EndpointMode_1 = require(\"./EndpointMode\");\nexports.ENV_ENDPOINT_MODE_NAME = \"AWS_EC2_METADATA_SERVICE_ENDPOINT_MODE\";\nexports.CONFIG_ENDPOINT_MODE_NAME = \"ec2_metadata_service_endpoint_mode\";\nexports.ENDPOINT_MODE_CONFIG_OPTIONS = {\n environmentVariableSelector: (env) => env[exports.ENV_ENDPOINT_MODE_NAME],\n configFileSelector: (profile) => profile[exports.CONFIG_ENDPOINT_MODE_NAME],\n default: EndpointMode_1.EndpointMode.IPv4,\n};\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiRW5kcG9pbnRNb2RlQ29uZmlnT3B0aW9ucy5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3NyYy9jb25maWcvRW5kcG9pbnRNb2RlQ29uZmlnT3B0aW9ucy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7QUFFQSxpREFBOEM7QUFFakMsUUFBQSxzQkFBc0IsR0FBRyx3Q0FBd0MsQ0FBQztBQUNsRSxRQUFBLHlCQUF5QixHQUFHLG9DQUFvQyxDQUFDO0FBRWpFLFFBQUEsNEJBQTRCLEdBQThDO0lBQ3JGLDJCQUEyQixFQUFFLENBQUMsR0FBRyxFQUFFLEVBQUUsQ0FBQyxHQUFHLENBQUMsOEJBQXNCLENBQUM7SUFDakUsa0JBQWtCLEVBQUUsQ0FBQyxPQUFPLEVBQUUsRUFBRSxDQUFDLE9BQU8sQ0FBQyxpQ0FBeUIsQ0FBQztJQUNuRSxPQUFPLEVBQUUsMkJBQVksQ0FBQyxJQUFJO0NBQzNCLENBQUMiLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgeyBMb2FkZWRDb25maWdTZWxlY3RvcnMgfSBmcm9tIFwiQGF3cy1zZGsvbm9kZS1jb25maWctcHJvdmlkZXJcIjtcblxuaW1wb3J0IHsgRW5kcG9pbnRNb2RlIH0gZnJvbSBcIi4vRW5kcG9pbnRNb2RlXCI7XG5cbmV4cG9ydCBjb25zdCBFTlZfRU5EUE9JTlRfTU9ERV9OQU1FID0gXCJBV1NfRUMyX01FVEFEQVRBX1NFUlZJQ0VfRU5EUE9JTlRfTU9ERVwiO1xuZXhwb3J0IGNvbnN0IENPTkZJR19FTkRQT0lOVF9NT0RFX05BTUUgPSBcImVjMl9tZXRhZGF0YV9zZXJ2aWNlX2VuZHBvaW50X21vZGVcIjtcblxuZXhwb3J0IGNvbnN0IEVORFBPSU5UX01PREVfQ09ORklHX09QVElPTlM6IExvYWRlZENvbmZpZ1NlbGVjdG9yczxzdHJpbmcgfCB1bmRlZmluZWQ+ID0ge1xuICBlbnZpcm9ubWVudFZhcmlhYmxlU2VsZWN0b3I6IChlbnYpID0+IGVudltFTlZfRU5EUE9JTlRfTU9ERV9OQU1FXSxcbiAgY29uZmlnRmlsZVNlbGVjdG9yOiAocHJvZmlsZSkgPT4gcHJvZmlsZVtDT05GSUdfRU5EUE9JTlRfTU9ERV9OQU1FXSxcbiAgZGVmYXVsdDogRW5kcG9pbnRNb2RlLklQdjQsXG59O1xuIl19","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.fromContainerMetadata = exports.ENV_CMDS_AUTH_TOKEN = exports.ENV_CMDS_RELATIVE_URI = exports.ENV_CMDS_FULL_URI = void 0;\nconst property_provider_1 = require(\"@aws-sdk/property-provider\");\nconst url_1 = require(\"url\");\nconst httpRequest_1 = require(\"./remoteProvider/httpRequest\");\nconst ImdsCredentials_1 = require(\"./remoteProvider/ImdsCredentials\");\nconst RemoteProviderInit_1 = require(\"./remoteProvider/RemoteProviderInit\");\nconst retry_1 = require(\"./remoteProvider/retry\");\nexports.ENV_CMDS_FULL_URI = \"AWS_CONTAINER_CREDENTIALS_FULL_URI\";\nexports.ENV_CMDS_RELATIVE_URI = \"AWS_CONTAINER_CREDENTIALS_RELATIVE_URI\";\nexports.ENV_CMDS_AUTH_TOKEN = \"AWS_CONTAINER_AUTHORIZATION_TOKEN\";\n/**\n * Creates a credential provider that will source credentials from the ECS\n * Container Metadata Service\n */\nconst fromContainerMetadata = (init = {}) => {\n const { timeout, maxRetries } = RemoteProviderInit_1.providerConfigFromInit(init);\n return () => retry_1.retry(async () => {\n const requestOptions = await getCmdsUri();\n const credsResponse = JSON.parse(await requestFromEcsImds(timeout, requestOptions));\n if (!ImdsCredentials_1.isImdsCredentials(credsResponse)) {\n throw new property_provider_1.CredentialsProviderError(\"Invalid response received from instance metadata service.\");\n }\n return ImdsCredentials_1.fromImdsCredentials(credsResponse);\n }, maxRetries);\n};\nexports.fromContainerMetadata = fromContainerMetadata;\nconst requestFromEcsImds = async (timeout, options) => {\n if (process.env[exports.ENV_CMDS_AUTH_TOKEN]) {\n options.headers = {\n ...options.headers,\n Authorization: process.env[exports.ENV_CMDS_AUTH_TOKEN],\n };\n }\n const buffer = await httpRequest_1.httpRequest({\n ...options,\n timeout,\n });\n return buffer.toString();\n};\nconst CMDS_IP = \"169.254.170.2\";\nconst GREENGRASS_HOSTS = {\n localhost: true,\n \"127.0.0.1\": true,\n};\nconst GREENGRASS_PROTOCOLS = {\n \"http:\": true,\n \"https:\": true,\n};\nconst getCmdsUri = async () => {\n if (process.env[exports.ENV_CMDS_RELATIVE_URI]) {\n return {\n hostname: CMDS_IP,\n path: process.env[exports.ENV_CMDS_RELATIVE_URI],\n };\n }\n if (process.env[exports.ENV_CMDS_FULL_URI]) {\n const parsed = url_1.parse(process.env[exports.ENV_CMDS_FULL_URI]);\n if (!parsed.hostname || !(parsed.hostname in GREENGRASS_HOSTS)) {\n throw new property_provider_1.CredentialsProviderError(`${parsed.hostname} is not a valid container metadata service hostname`, false);\n }\n if (!parsed.protocol || !(parsed.protocol in GREENGRASS_PROTOCOLS)) {\n throw new property_provider_1.CredentialsProviderError(`${parsed.protocol} is not a valid container metadata service protocol`, false);\n }\n return {\n ...parsed,\n port: parsed.port ? parseInt(parsed.port, 10) : undefined,\n };\n }\n throw new property_provider_1.CredentialsProviderError(\"The container metadata credential provider cannot be used unless\" +\n ` the ${exports.ENV_CMDS_RELATIVE_URI} or ${exports.ENV_CMDS_FULL_URI} environment` +\n \" variable is set\", false);\n};\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZnJvbUNvbnRhaW5lck1ldGFkYXRhLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vc3JjL2Zyb21Db250YWluZXJNZXRhZGF0YS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7QUFBQSxrRUFBc0U7QUFHdEUsNkJBQTRCO0FBRTVCLDhEQUEyRDtBQUMzRCxzRUFBMEY7QUFDMUYsNEVBQWlHO0FBQ2pHLGtEQUErQztBQUVsQyxRQUFBLGlCQUFpQixHQUFHLG9DQUFvQyxDQUFDO0FBQ3pELFFBQUEscUJBQXFCLEdBQUcsd0NBQXdDLENBQUM7QUFDakUsUUFBQSxtQkFBbUIsR0FBRyxtQ0FBbUMsQ0FBQztBQUV2RTs7O0dBR0c7QUFDSSxNQUFNLHFCQUFxQixHQUFHLENBQUMsT0FBMkIsRUFBRSxFQUFzQixFQUFFO0lBQ3pGLE1BQU0sRUFBRSxPQUFPLEVBQUUsVUFBVSxFQUFFLEdBQUcsMkNBQXNCLENBQUMsSUFBSSxDQUFDLENBQUM7SUFDN0QsT0FBTyxHQUFHLEVBQUUsQ0FDVixhQUFLLENBQUMsS0FBSyxJQUFJLEVBQUU7UUFDZixNQUFNLGNBQWMsR0FBRyxNQUFNLFVBQVUsRUFBRSxDQUFDO1FBQzFDLE1BQU0sYUFBYSxHQUFHLElBQUksQ0FBQyxLQUFLLENBQUMsTUFBTSxrQkFBa0IsQ0FBQyxPQUFPLEVBQUUsY0FBYyxDQUFDLENBQUMs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ShwYXJzZWQuaG9zdG5hbWUgaW4gR1JFRU5HUkFTU19IT1NUUykpIHtcbiAgICAgIHRocm93IG5ldyBDcmVkZW50aWFsc1Byb3ZpZGVyRXJyb3IoXG4gICAgICAgIGAke3BhcnNlZC5ob3N0bmFtZX0gaXMgbm90IGEgdmFsaWQgY29udGFpbmVyIG1ldGFkYXRhIHNlcnZpY2UgaG9zdG5hbWVgLFxuICAgICAgICBmYWxzZVxuICAgICAgKTtcbiAgICB9XG5cbiAgICBpZiAoIXBhcnNlZC5wcm90b2NvbCB8fCAhKHBhcnNlZC5wcm90b2NvbCBpbiBHUkVFTkdSQVNTX1BST1RPQ09MUykpIHtcbiAgICAgIHRocm93IG5ldyBDcmVkZW50aWFsc1Byb3ZpZGVyRXJyb3IoXG4gICAgICAgIGAke3BhcnNlZC5wcm90b2NvbH0gaXMgbm90IGEgdmFsaWQgY29udGFpbmVyIG1ldGFkYXRhIHNlcnZpY2UgcHJvdG9jb2xgLFxuICAgICAgICBmYWxzZVxuICAgICAgKTtcbiAgICB9XG5cbiAgICByZXR1cm4ge1xuICAgICAgLi4ucGFyc2VkLFxuICAgICAgcG9ydDogcGFyc2VkLnBvcnQgPyBwYXJzZUludChwYXJzZWQucG9ydCwgMTApIDogdW5kZWZpbmVkLFxuICAgIH07XG4gIH1cblxuICB0aHJvdyBuZXcgQ3JlZGVudGlhbHNQcm92aWRlckVycm9yKFxuICAgIFwiVGhlIGNvbnRhaW5lciBtZXRhZGF0YSBjcmVkZW50aWFsIHByb3ZpZGVyIGNhbm5vdCBiZSB1c2VkIHVubGVzc1wiICtcbiAgICAgIGAgdGhlICR7RU5WX0NNRFNfUkVMQVRJVkVfVVJJfSBvciAke0VOVl9DTURTX0ZVTExfVVJJfSBlbnZpcm9ubWVudGAgK1xuICAgICAgXCIgdmFyaWFibGUgaXMgc2V0XCIsXG4gICAgZmFsc2VcbiAgKTtcbn07XG4iXX0=","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.fromInstanceMetadata = void 0;\nconst property_provider_1 = require(\"@aws-sdk/property-provider\");\nconst httpRequest_1 = require(\"./remoteProvider/httpRequest\");\nconst ImdsCredentials_1 = require(\"./remoteProvider/ImdsCredentials\");\nconst RemoteProviderInit_1 = require(\"./remoteProvider/RemoteProviderInit\");\nconst retry_1 = require(\"./remoteProvider/retry\");\nconst getInstanceMetadataEndpoint_1 = require(\"./utils/getInstanceMetadataEndpoint\");\nconst IMDS_PATH = \"/latest/meta-data/iam/security-credentials/\";\nconst IMDS_TOKEN_PATH = \"/latest/api/token\";\n/**\n * Creates a credential provider that will source credentials from the EC2\n * Instance Metadata Service\n */\nconst fromInstanceMetadata = (init = {}) => {\n // when set to true, metadata service will not fetch token\n let disableFetchToken = false;\n const { timeout, maxRetries } = RemoteProviderInit_1.providerConfigFromInit(init);\n const getCredentials = async (maxRetries, options) => {\n const profile = (await retry_1.retry(async () => {\n let profile;\n try {\n profile = await getProfile(options);\n }\n catch (err) {\n if (err.statusCode === 401) {\n disableFetchToken = false;\n }\n throw err;\n }\n return profile;\n }, maxRetries)).trim();\n return retry_1.retry(async () => {\n let creds;\n try {\n creds = await getCredentialsFromProfile(profile, options);\n }\n catch (err) {\n if (err.statusCode === 401) {\n disableFetchToken = false;\n }\n throw err;\n }\n return creds;\n }, maxRetries);\n };\n return async () => {\n const endpoint = await getInstanceMetadataEndpoint_1.getInstanceMetadataEndpoint();\n if (disableFetchToken) {\n return getCredentials(maxRetries, { ...endpoint, timeout });\n }\n else {\n let token;\n try {\n token = (await getMetadataToken({ ...endpoint, timeout })).toString();\n }\n catch (error) {\n if ((error === null || error === void 0 ? void 0 : error.statusCode) === 400) {\n throw Object.assign(error, {\n message: \"EC2 Metadata token request returned error\",\n });\n }\n else if (error.message === \"TimeoutError\" || [403, 404, 405].includes(error.statusCode)) {\n disableFetchToken = true;\n }\n return getCredentials(maxRetries, { ...endpoint, timeout });\n }\n return getCredentials(maxRetries, {\n ...endpoint,\n headers: {\n \"x-aws-ec2-metadata-token\": token,\n },\n timeout,\n });\n }\n };\n};\nexports.fromInstanceMetadata = fromInstanceMetadata;\nconst getMetadataToken = async (options) => httpRequest_1.httpRequest({\n ...options,\n path: IMDS_TOKEN_PATH,\n method: \"PUT\",\n headers: {\n \"x-aws-ec2-metadata-token-ttl-seconds\": \"21600\",\n },\n});\nconst getProfile = async (options) => (await httpRequest_1.httpRequest({ ...options, path: IMDS_PATH })).toString();\nconst getCredentialsFromProfile = async (profile, options) => {\n const credsResponse = JSON.parse((await httpRequest_1.httpRequest({\n ...options,\n path: IMDS_PATH + profile,\n })).toString());\n if (!ImdsCredentials_1.isImdsCredentials(credsResponse)) {\n throw new property_provider_1.CredentialsProviderError(\"Invalid response received from instance metadata service.\");\n }\n return ImdsCredentials_1.fromImdsCredentials(credsResponse);\n};\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZnJvbUluc3RhbmNlTWV0YWRhdGEuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvZnJvbUluc3RhbmNlTWV0YWRhdGEudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7O0FBQUEsa0VBQXNFO0FBSXRFLDhEQUEyRDtBQUMzRCxzRUFBMEY7QUFDMUYsNEVBQWlHO0FBQ2pHLGtEQUErQztBQUMvQyxxRkFBa0Y7QUFFbEYsTUFBTSxTQUFTLEdBQUcsNkNBQTZDLENBQUM7QUFDaEUsTUFBTSxlQUFlLEdBQUcsbUJBQW1CLENBQUM7QUFFNUM7OztHQUdHO0FBQ0ksTUFBTSxvQkFBb0IsR0FBRyxDQUFDLE9BQTJCLEVBQUUsRUFBc0IsRUFBRTtJQUN4RiwwREFBMEQ7SUFDMUQsSUFBSSxpQkFBaUIsR0FBRyxLQUFLLENBQUM7SUFDOUIsTUFBTSxFQUFFLE9BQU8sRUFBRSxVQUFVLEVBQUUsR0FBRywyQ0FBc0IsQ0FBQyxJQUFJLENBQU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gICAgICAgIHBhdGg6IElNRFNfUEFUSCArIHByb2ZpbGUsXG4gICAgICB9KVxuICAgICkudG9TdHJpbmcoKVxuICApO1xuXG4gIGlmICghaXNJbWRzQ3JlZGVudGlhbHMoY3JlZHNSZXNwb25zZSkpIHtcbiAgICB0aHJvdyBuZXcgQ3JlZGVudGlhbHNQcm92aWRlckVycm9yKFwiSW52YWxpZCByZXNwb25zZSByZWNlaXZlZCBmcm9tIGluc3RhbmNlIG1ldGFkYXRhIHNlcnZpY2UuXCIpO1xuICB9XG5cbiAgcmV0dXJuIGZyb21JbWRzQ3JlZGVudGlhbHMoY3JlZHNSZXNwb25zZSk7XG59O1xuIl19","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst tslib_1 = require(\"tslib\");\ntslib_1.__exportStar(require(\"./fromContainerMetadata\"), exports);\ntslib_1.__exportStar(require(\"./fromInstanceMetadata\"), exports);\ntslib_1.__exportStar(require(\"./remoteProvider/RemoteProviderInit\"), exports);\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvaW5kZXgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7O0FBQUEsa0VBQXdDO0FBQ3hDLGlFQUF1QztBQUN2Qyw4RUFBb0QiLCJzb3VyY2VzQ29udGVudCI6WyJleHBvcnQgKiBmcm9tIFwiLi9mcm9tQ29udGFpbmVyTWV0YWRhdGFcIjtcbmV4cG9ydCAqIGZyb20gXCIuL2Zyb21JbnN0YW5jZU1ldGFkYXRhXCI7XG5leHBvcnQgKiBmcm9tIFwiLi9yZW1vdGVQcm92aWRlci9SZW1vdGVQcm92aWRlckluaXRcIjtcbiJdfQ==","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.fromImdsCredentials = exports.isImdsCredentials = void 0;\nconst isImdsCredentials = (arg) => Boolean(arg) &&\n typeof arg === \"object\" &&\n typeof arg.AccessKeyId === \"string\" &&\n typeof arg.SecretAccessKey === \"string\" &&\n typeof arg.Token === \"string\" &&\n typeof arg.Expiration === \"string\";\nexports.isImdsCredentials = isImdsCredentials;\nconst fromImdsCredentials = (creds) => ({\n accessKeyId: creds.AccessKeyId,\n secretAccessKey: creds.SecretAccessKey,\n sessionToken: creds.Token,\n expiration: new Date(creds.Expiration),\n});\nexports.fromImdsCredentials = fromImdsCredentials;\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiSW1kc0NyZWRlbnRpYWxzLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vc3JjL3JlbW90ZVByb3ZpZGVyL0ltZHNDcmVkZW50aWFscy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7QUFTTyxNQUFNLGlCQUFpQixHQUFHLENBQUMsR0FBUSxFQUEwQixFQUFFLENBQ3BFLE9BQU8sQ0FBQyxHQUFHLENBQUM7SUFDWixPQUFPLEdBQUcsS0FBSyxRQUFRO0lBQ3ZCLE9BQU8sR0FBRyxDQUFDLFdBQVcsS0FBSyxRQUFRO0lBQ25DLE9BQU8sR0FBRyxDQUFDLGVBQWUsS0FBSyxRQUFRO0lBQ3ZDLE9BQU8sR0FBRyxDQUFDLEtBQUssS0FBSyxRQUFRO0lBQzdCLE9BQU8sR0FBRyxDQUFDLFVBQVUsS0FBSyxRQUFRLENBQUM7QUFOeEIsUUFBQSxpQkFBaUIscUJBTU87QUFFOUIsTUFBTSxtQkFBbUIsR0FBRyxDQUFDLEtBQXNCLEVBQWUsRUFBRSxDQUFDLENBQUM7SUFDM0UsV0FBVyxFQUFFLEtBQUssQ0FBQyxXQUFXO0lBQzlCLGVBQWUsRUFBRSxLQUFLLENBQUMsZUFBZTtJQUN0QyxZQUFZLEVBQUUsS0FBSyxDQUFDLEtBQUs7SUFDekIsVUFBVSxFQUFFLElBQUksSU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xcbn0pO1xuIl19","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.providerConfigFromInit = exports.DEFAULT_MAX_RETRIES = exports.DEFAULT_TIMEOUT = void 0;\nexports.DEFAULT_TIMEOUT = 1000;\n// The default in AWS SDK for Python and CLI (botocore) is no retry or one attempt\n// https://github.com/boto/botocore/blob/646c61a7065933e75bab545b785e6098bc94c081/botocore/utils.py#L273\nexports.DEFAULT_MAX_RETRIES = 0;\nconst providerConfigFromInit = ({ maxRetries = exports.DEFAULT_MAX_RETRIES, timeout = exports.DEFAULT_TIMEOUT, }) => ({ maxRetries, timeout });\nexports.providerConfigFromInit = providerConfigFromInit;\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiUmVtb3RlUHJvdmlkZXJJbml0LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vc3JjL3JlbW90ZVByb3ZpZGVyL1JlbW90ZVByb3ZpZGVySW5pdC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7QUFBYSxRQUFBLGVBQWUsR0FBRyxJQUFJLENBQUM7QUFFcEMsa0ZBQWtGO0FBQ2xGLHdHQUF3RztBQUMzRixRQUFBLG1CQUFtQixHQUFHLENBQUMsQ0FBQztBQWdCOUIsTUFBTSxzQkFBc0IsR0FBRyxDQUFDLEVBQ3JDLFVBQVUsR0FBRywyQkFBbUIsRUFDaEMsT0FBTyxHQUFHLHVCQUFlLEdBQ04sRUFBd0IsRUFBRSxDQUFDLENBQUMsRUFBRSxVQUFVLEVBQUUsT0FBTyxFQUFFLENBQUMsQ0FBQztBQUg3RCxRQUFBLHNCQUFzQiwwQkFHdUMiLCJzb3VyY2VzQ29udGVudCI6WyJleHBvcnQgY29uc3QgREVGQVVMVF9USU1FT1VUID0gMTAwMDtcblxuLy8gVGhlIGRlZmF1bHQgaW4gQVdTIFNESyBmb3IgUHl0aG9uIGFuZCBDTEkgKGJvdG9jb3JlKSBpcyBubyByZXRyeSBvciBvbmUgYXR0ZW1wdFxuLy8gaHR0cHM6Ly9naXRodWIuY29tL2JvdG8vYm90b2NvcmUvYmxvYi82NDZjNjFhNzA2NTkzM2U3NWJhYjU0NWI3ODVlNjA5OGJjOTRjMDgxL2JvdG9jb3JlL3V0aWxzLnB5I0wyNzNcbmV4cG9ydCBjb25zdCBERUZBVUxUX01BWF9SRVRSSUVTID0gMDtcblxuZXhwb3J0IGludGVyZmFjZSBSZW1vdGVQcm92aWRlckNvbmZpZyB7XG4gIC8qKlxuICAgKiBUaGUgY29ubmVjdGlvbiB0aW1lb3V0IChpbiBtaWxsaXNlY29uZHMpXG4gICAqL1xuICB0aW1lb3V0OiBudW1iZXI7XG5cbiAgLyoqXG4gICAqIFRoZSBtYXhpbXVtIG51bWJlciBvZiB0aW1lcyB0aGUgSFRUUCBjb25uZWN0aW9uIHNob3VsZCBiZSByZXRyaWVkXG4gICAqL1xuICBtYXhSZXRyaWVzOiBudW1iZXI7XG59XG5cbmV4cG9ydCB0eXBlIFJlbW90ZVByb3ZpZGVySW5pdCA9IFBhcnRpYWw8UmVtb3RlUHJvdmlkZXJDb25maWc+O1xuXG5leHBvcnQgY29uc3QgcHJvdmlkZXJDb25maWdGcm9tSW5pdCA9ICh7XG4gIG1heFJldHJpZXMgPSBERUZBVUxUX01BWF9SRVRSSUVTLFxuICB0aW1lb3V0ID0gREVGQVVMVF9USU1FT1VULFxufTogUmVtb3RlUHJvdmlkZXJJbml0KTogUmVtb3RlUHJvdmlkZXJDb25maWcgPT4gKHsgbWF4UmV0cmllcywgdGltZW91dCB9KTtcbiJdfQ==","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.httpRequest = void 0;\nconst property_provider_1 = require(\"@aws-sdk/property-provider\");\nconst buffer_1 = require(\"buffer\");\nconst http_1 = require(\"http\");\n/**\n * @internal\n */\nfunction httpRequest(options) {\n return new Promise((resolve, reject) => {\n var _a;\n const req = http_1.request({\n method: \"GET\",\n ...options,\n // Node.js http module doesn't accept hostname with square brackets\n // Refs: https://github.com/nodejs/node/issues/39738\n hostname: (_a = options.hostname) === null || _a === void 0 ? void 0 : _a.replace(/^\\[(.+)\\]$/, \"$1\"),\n });\n req.on(\"error\", (err) => {\n reject(Object.assign(new property_provider_1.ProviderError(\"Unable to connect to instance metadata service\"), err));\n req.destroy();\n });\n req.on(\"timeout\", () => {\n reject(new property_provider_1.ProviderError(\"TimeoutError from instance metadata service\"));\n req.destroy();\n });\n req.on(\"response\", (res) => {\n const { statusCode = 400 } = res;\n if (statusCode < 200 || 300 <= statusCode) {\n reject(Object.assign(new property_provider_1.ProviderError(\"Error response received from instance metadata service\"), { statusCode }));\n req.destroy();\n }\n const chunks = [];\n res.on(\"data\", (chunk) => {\n chunks.push(chunk);\n });\n res.on(\"end\", () => {\n resolve(buffer_1.Buffer.concat(chunks));\n req.destroy();\n });\n });\n req.end();\n });\n}\nexports.httpRequest = httpRequest;\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaHR0cFJlcXVlc3QuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi9zcmMvcmVtb3RlUHJvdmlkZXIvaHR0cFJlcXVlc3QudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7O0FBQUEsa0VBQTJEO0FBQzNELG1DQUFnQztBQUNoQywrQkFBZ0U7QUFFaEU7O0dBRUc7QUFDSCxTQUFnQixXQUFXLENBQUMsT0FBdUI7SUFDakQsT0FBTyxJQUFJLE9BQU8sQ0FBQyxDQUFDLE9BQU8sRUFBRSxNQUFNLEVBQUUsRUFBRTs7UUFDckMsTUFBTSxHQUFHLEdBQUcsY0FBTyxDQUFDO1lBQ2xCLE1BQU0sRUFBRSxLQUFLO1lBQ2IsR0FBRyxPQUFPO1lBQ1YsbUVBQW1FO1lBQ25FLG9EQUFvRDtZQUNwRCxRQUFRLEVBQUUsTUFBQS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0IGNodW5rczogQXJyYXk8QnVmZmVyPiA9IFtdO1xuICAgICAgcmVzLm9uKFwiZGF0YVwiLCAoY2h1bmspID0+IHtcbiAgICAgICAgY2h1bmtzLnB1c2goY2h1bmsgYXMgQnVmZmVyKTtcbiAgICAgIH0pO1xuICAgICAgcmVzLm9uKFwiZW5kXCIsICgpID0+IHtcbiAgICAgICAgcmVzb2x2ZShCdWZmZXIuY29uY2F0KGNodW5rcykpO1xuICAgICAgICByZXEuZGVzdHJveSgpO1xuICAgICAgfSk7XG4gICAgfSk7XG5cbiAgICByZXEuZW5kKCk7XG4gIH0pO1xufVxuIl19","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.retry = void 0;\n/**\n * @internal\n */\nconst retry = (toRetry, maxRetries) => {\n let promise = toRetry();\n for (let i = 0; i < maxRetries; i++) {\n promise = promise.catch(toRetry);\n }\n return promise;\n};\nexports.retry = retry;\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicmV0cnkuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi9zcmMvcmVtb3RlUHJvdmlkZXIvcmV0cnkudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7O0FBSUE7O0dBRUc7QUFDSSxNQUFNLEtBQUssR0FBRyxDQUFJLE9BQTZCLEVBQUUsVUFBa0IsRUFBYyxFQUFFO0lBQ3hGLElBQUksT0FBTyxHQUFHLE9BQU8sRUFBRSxDQUFDO0lBQ3hCLEtBQUssSUFBSSxDQUFDLEdBQUcsQ0FBQyxFQUFFLENBQUMsR0FBRyxVQUFVLEVBQUUsQ0FBQyxFQUFFLEVBQUU7UUFDbkMsT0FBTyxHQUFHLE9BQU8sQ0FBQyxLQUFLLENBQUMsT0FBTyxDQUFDLENBQUM7S0FDbEM7SUFFRCxPQUFPLE9BQU8sQ0FBQztBQUNqQixDQUFDLENBQUM7QUFQVyxRQUFBLEtBQUssU0FPaEIiLCJzb3VyY2VzQ29udGVudCI6WyJleHBvcnQgaW50ZXJmYWNlIFJldHJ5YWJsZVByb3ZpZGVyPFQ+IHtcbiAgKCk6IFByb21pc2U8VD47XG59XG5cbi8qKlxuICogQGludGVybmFsXG4gKi9cbmV4cG9ydCBjb25zdCByZXRyeSA9IDxUPih0b1JldHJ5OiBSZXRyeWFibGVQcm92aWRlcjxUPiwgbWF4UmV0cmllczogbnVtYmVyKTogUHJvbWlzZTxUPiA9PiB7XG4gIGxldCBwcm9taXNlID0gdG9SZXRyeSgpO1xuICBmb3IgKGxldCBpID0gMDsgaSA8IG1heFJldHJpZXM7IGkrKykge1xuICAgIHByb21pc2UgPSBwcm9taXNlLmNhdGNoKHRvUmV0cnkpO1xuICB9XG5cbiAgcmV0dXJuIHByb21pc2U7XG59O1xuIl19","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.getInstanceMetadataEndpoint = void 0;\nconst node_config_provider_1 = require(\"@aws-sdk/node-config-provider\");\nconst url_parser_1 = require(\"@aws-sdk/url-parser\");\nconst Endpoint_1 = require(\"../config/Endpoint\");\nconst EndpointConfigOptions_1 = require(\"../config/EndpointConfigOptions\");\nconst EndpointMode_1 = require(\"../config/EndpointMode\");\nconst EndpointModeConfigOptions_1 = require(\"../config/EndpointModeConfigOptions\");\n/**\n * Returns the host to use for instance metadata service call.\n *\n * The host is read from endpoint which can be set either in\n * {@link ENV_ENDPOINT_NAME} environment variable or {@link CONFIG_ENDPOINT_NAME}\n * configuration property.\n *\n * If endpoint is not set, then endpoint mode is read either from\n * {@link ENV_ENDPOINT_MODE_NAME} environment variable or {@link CONFIG_ENDPOINT_MODE_NAME}\n * configuration property. If endpoint mode is not set, then default endpoint mode\n * {@link EndpointMode.IPv4} is used.\n *\n * If endpoint mode is set to {@link EndpointMode.IPv4}, then the host is {@link Endpoint.IPv4}.\n * If endpoint mode is set to {@link EndpointMode.IPv6}, then the host is {@link Endpoint.IPv6}.\n *\n * @returns Host to use for instance metadata service call.\n */\nconst getInstanceMetadataEndpoint = async () => url_parser_1.parseUrl((await getFromEndpointConfig()) || (await getFromEndpointModeConfig()));\nexports.getInstanceMetadataEndpoint = getInstanceMetadataEndpoint;\nconst getFromEndpointConfig = async () => node_config_provider_1.loadConfig(EndpointConfigOptions_1.ENDPOINT_CONFIG_OPTIONS)();\nconst getFromEndpointModeConfig = async () => {\n const endpointMode = await node_config_provider_1.loadConfig(EndpointModeConfigOptions_1.ENDPOINT_MODE_CONFIG_OPTIONS)();\n switch (endpointMode) {\n case EndpointMode_1.EndpointMode.IPv4:\n return Endpoint_1.Endpoint.IPv4;\n case EndpointMode_1.EndpointMode.IPv6:\n return Endpoint_1.Endpoint.IPv6;\n default:\n throw new Error(`Unsupported endpoint mode: ${endpointMode}.` + ` Select from ${Object.values(EndpointMode_1.EndpointMode)}`);\n }\n};\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZ2V0SW5zdGFuY2VNZXRhZGF0YUVuZHBvaW50LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vc3JjL3V0aWxzL2dldEluc3RhbmNlTWV0YWRhdGFFbmRwb2ludC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7QUFBQSx3RUFBMkQ7QUFFM0Qsb0RBQStDO0FBRS9DLGlEQUEwRTtBQUMxRSwyRUFBbUg7QUFDbkgseURBQXNEO0FBQ3RELG1GQUk2QztBQUU3Qzs7Ozs7Ozs7Ozs7Ozs7OztHQWdCRztBQUNJLE1BQU0sMkJBQTJCLEdBQUcsS0FBSyxJQUF1QixFQUFFLENBQ3ZFLHFCQUFRLENBQUMsQ0FBQyxNQUFNLHFCQUFxQixFQUFFLENBQUMsSUFBSSxDQUFDLE1BQU0seUJBQXlCLEVBQUUsQ0FBQyxDQUFDLENBQUM7QUFEdEUsUUFBQSwyQkFBMkIsK0JBQzJDO0FBRW5GLE1BQU0scUJBQX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lxuICAgICAgdGhyb3cgbmV3IEVycm9yKGBVbnN1cHBvcnRlZCBlbmRwb2ludCBtb2RlOiAke2VuZHBvaW50TW9kZX0uYCArIGAgU2VsZWN0IGZyb20gJHtPYmplY3QudmFsdWVzKEVuZHBvaW50TW9kZSl9YCk7XG4gIH1cbn07XG4iXX0=","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.fromIni = void 0;\nconst credential_provider_env_1 = require(\"@aws-sdk/credential-provider-env\");\nconst credential_provider_imds_1 = require(\"@aws-sdk/credential-provider-imds\");\nconst credential_provider_sso_1 = require(\"@aws-sdk/credential-provider-sso\");\nconst credential_provider_web_identity_1 = require(\"@aws-sdk/credential-provider-web-identity\");\nconst property_provider_1 = require(\"@aws-sdk/property-provider\");\nconst util_credentials_1 = require(\"@aws-sdk/util-credentials\");\nconst isStaticCredsProfile = (arg) => Boolean(arg) &&\n typeof arg === \"object\" &&\n typeof arg.aws_access_key_id === \"string\" &&\n typeof arg.aws_secret_access_key === \"string\" &&\n [\"undefined\", \"string\"].indexOf(typeof arg.aws_session_token) > -1;\nconst isWebIdentityProfile = (arg) => Boolean(arg) &&\n typeof arg === \"object\" &&\n typeof arg.web_identity_token_file === \"string\" &&\n typeof arg.role_arn === \"string\" &&\n [\"undefined\", \"string\"].indexOf(typeof arg.role_session_name) > -1;\nconst isAssumeRoleProfile = (arg) => Boolean(arg) &&\n typeof arg === \"object\" &&\n typeof arg.role_arn === \"string\" &&\n [\"undefined\", \"string\"].indexOf(typeof arg.role_session_name) > -1 &&\n [\"undefined\", \"string\"].indexOf(typeof arg.external_id) > -1 &&\n [\"undefined\", \"string\"].indexOf(typeof arg.mfa_serial) > -1;\nconst isAssumeRoleWithSourceProfile = (arg) => isAssumeRoleProfile(arg) && typeof arg.source_profile === \"string\" && typeof arg.credential_source === \"undefined\";\nconst isAssumeRoleWithProviderProfile = (arg) => isAssumeRoleProfile(arg) && typeof arg.credential_source === \"string\" && typeof arg.source_profile === \"undefined\";\n/**\n * Creates a credential provider that will read from ini files and supports\n * role assumption and multi-factor authentication.\n */\nconst fromIni = (init = {}) => async () => {\n const profiles = await util_credentials_1.parseKnownFiles(init);\n return resolveProfileData(util_credentials_1.getMasterProfileName(init), profiles, init);\n};\nexports.fromIni = fromIni;\nconst resolveProfileData = async (profileName, profiles, options, visitedProfiles = {}) => {\n const data = profiles[profileName];\n // If this is not the first profile visited, static credentials should be\n // preferred over role assumption metadata. This special treatment of\n // second and subsequent hops is to ensure compatibility with the AWS CLI.\n if (Object.keys(visitedProfiles).length > 0 && isStaticCredsProfile(data)) {\n return resolveStaticCredentials(data);\n }\n // If this is the first profile visited, role assumption keys should be\n // given precedence over static credentials.\n if (isAssumeRoleWithSourceProfile(data) || isAssumeRoleWithProviderProfile(data)) {\n const { external_id: ExternalId, mfa_serial, role_arn: RoleArn, role_session_name: RoleSessionName = \"aws-sdk-js-\" + Date.now(), source_profile, credential_source, } = data;\n if (!options.roleAssumer) {\n throw new property_provider_1.CredentialsProviderError(`Profile ${profileName} requires a role to be assumed, but no` + ` role assumption callback was provided.`, false);\n }\n if (source_profile && source_profile in visitedProfiles) {\n throw new property_provider_1.CredentialsProviderError(`Detected a cycle attempting to resolve credentials for profile` +\n ` ${util_credentials_1.getMasterProfileName(options)}. Profiles visited: ` +\n Object.keys(visitedProfiles).join(\", \"), false);\n }\n const sourceCreds = source_profile\n ? resolveProfileData(source_profile, profiles, options, {\n ...visitedProfiles,\n [source_profile]: true,\n })\n : resolveCredentialSource(credential_source, profileName)();\n const params = { RoleArn, RoleSessionName, ExternalId };\n if (mfa_serial) {\n if (!options.mfaCodeProvider) {\n throw new property_provider_1.CredentialsProviderError(`Profile ${profileName} requires multi-factor authentication,` + ` but no MFA code callback was provided.`, false);\n }\n params.SerialNumber = mfa_serial;\n params.TokenCode = await options.mfaCodeProvider(mfa_serial);\n }\n return options.roleAssumer(await sourceCreds, params);\n }\n // If no role assumption metadata is present, attempt to load static\n // credentials from the selected profile.\n if (isStaticCredsProfile(data)) {\n return resolveStaticCredentials(data);\n }\n // If no static credentials are present, attempt to assume role with\n // web identity if web_identity_token_file and role_arn is available\n if (isWebIdentityProfile(data)) {\n return resolveWebIdentityCredentials(data, options);\n }\n if (credential_provider_sso_1.isSsoProfile(data)) {\n const { sso_start_url, sso_account_id, sso_region, sso_role_name } = credential_provider_sso_1.validateSsoProfile(data);\n return credential_provider_sso_1.fromSSO({\n ssoStartUrl: sso_start_url,\n ssoAccountId: sso_account_id,\n ssoRegion: sso_region,\n ssoRoleName: sso_role_name,\n })();\n }\n // If the profile cannot be parsed or contains neither static credentials\n // nor role assumption metadata, throw an error. This should be considered a\n // terminal resolution error if a profile has been specified by the user\n // (whether via a parameter, an environment variable, or another profile's\n // `source_profile` key).\n throw new property_provider_1.CredentialsProviderError(`Profile ${profileName} could not be found or parsed in shared` + ` credentials file.`);\n};\n/**\n * Resolve the `credential_source` entry from the profile, and return the\n * credential providers respectively. No memoization is needed for the\n * credential source providers because memoization should be added outside the\n * fromIni() provider. The source credential needs to be refreshed every time\n * fromIni() is called.\n */\nconst resolveCredentialSource = (credentialSource, profileName) => {\n const sourceProvidersMap = {\n EcsContainer: credential_provider_imds_1.fromContainerMetadata,\n Ec2InstanceMetadata: credential_provider_imds_1.fromInstanceMetadata,\n Environment: credential_provider_env_1.fromEnv,\n };\n if (credentialSource in sourceProvidersMap) {\n return sourceProvidersMap[credentialSource]();\n }\n else {\n throw new property_provider_1.CredentialsProviderError(`Unsupported credential source in profile ${profileName}. Got ${credentialSource}, ` +\n `expected EcsContainer or Ec2InstanceMetadata or Environment.`);\n }\n};\nconst resolveStaticCredentials = (profile) => Promise.resolve({\n accessKeyId: profile.aws_access_key_id,\n secretAccessKey: profile.aws_secret_access_key,\n sessionToken: profile.aws_session_token,\n});\nconst resolveWebIdentityCredentials = async (profile, options) => credential_provider_web_identity_1.fromTokenFile({\n webIdentityTokenFile: profile.web_identity_token_file,\n roleArn: profile.role_arn,\n roleSessionName: profile.role_session_name,\n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WRlbnRpdHlQcm9maWxlLCBvcHRpb25zOiBGcm9tSW5pSW5pdCk6IFByb21pc2U8Q3JlZGVudGlhbHM+ID0+XG4gIGZyb21Ub2tlbkZpbGUoe1xuICAgIHdlYklkZW50aXR5VG9rZW5GaWxlOiBwcm9maWxlLndlYl9pZGVudGl0eV90b2tlbl9maWxlLFxuICAgIHJvbGVBcm46IHByb2ZpbGUucm9sZV9hcm4sXG4gICAgcm9sZVNlc3Npb25OYW1lOiBwcm9maWxlLnJvbGVfc2Vzc2lvbl9uYW1lLFxuICAgIHJvbGVBc3N1bWVyV2l0aFdlYklkZW50aXR5OiBvcHRpb25zLnJvbGVBc3N1bWVyV2l0aFdlYklkZW50aXR5LFxuICB9KSgpO1xuIl19","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.defaultProvider = exports.ENV_IMDS_DISABLED = void 0;\nconst credential_provider_env_1 = require(\"@aws-sdk/credential-provider-env\");\nconst credential_provider_imds_1 = require(\"@aws-sdk/credential-provider-imds\");\nconst credential_provider_ini_1 = require(\"@aws-sdk/credential-provider-ini\");\nconst credential_provider_process_1 = require(\"@aws-sdk/credential-provider-process\");\nconst credential_provider_sso_1 = require(\"@aws-sdk/credential-provider-sso\");\nconst credential_provider_web_identity_1 = require(\"@aws-sdk/credential-provider-web-identity\");\nconst property_provider_1 = require(\"@aws-sdk/property-provider\");\nconst shared_ini_file_loader_1 = require(\"@aws-sdk/shared-ini-file-loader\");\nconst util_credentials_1 = require(\"@aws-sdk/util-credentials\");\nexports.ENV_IMDS_DISABLED = \"AWS_EC2_METADATA_DISABLED\";\n/**\n * Creates a credential provider that will attempt to find credentials from the\n * following sources (listed in order of precedence):\n * * Environment variables exposed via `process.env`\n * * SSO credentials from token cache\n * * Web identity token credentials\n * * Shared credentials and config ini files\n * * The EC2/ECS Instance Metadata Service\n *\n * The default credential provider will invoke one provider at a time and only\n * continue to the next if no credentials have been located. For example, if\n * the process finds values defined via the `AWS_ACCESS_KEY_ID` and\n * `AWS_SECRET_ACCESS_KEY` environment variables, the files at\n * `~/.aws/credentials` and `~/.aws/config` will not be read, nor will any\n * messages be sent to the Instance Metadata Service.\n *\n * @param init Configuration that is passed to each individual\n * provider\n *\n * @see fromEnv The function used to source credentials from\n * environment variables\n * @see fromSSO The function used to source credentials from\n * resolved SSO token cache\n * @see fromTokenFile The function used to source credentials from\n * token file\n * @see fromIni The function used to source credentials from INI\n * files\n * @see fromProcess The function used to sources credentials from\n * credential_process in INI files\n * @see fromInstanceMetadata The function used to source credentials from the\n * EC2 Instance Metadata Service\n * @see fromContainerMetadata The function used to source credentials from the\n * ECS Container Metadata Service\n */\nconst defaultProvider = (init = {}) => {\n const options = { profile: process.env[util_credentials_1.ENV_PROFILE], ...init };\n if (!options.loadedConfig)\n options.loadedConfig = shared_ini_file_loader_1.loadSharedConfigFiles(init);\n const providers = [\n credential_provider_sso_1.fromSSO(options),\n credential_provider_ini_1.fromIni(options),\n credential_provider_process_1.fromProcess(options),\n credential_provider_web_identity_1.fromTokenFile(options),\n remoteProvider(options),\n async () => {\n throw new property_provider_1.CredentialsProviderError(\"Could not load credentials from any providers\", false);\n },\n ];\n if (!options.profile)\n providers.unshift(credential_provider_env_1.fromEnv());\n const providerChain = property_provider_1.chain(...providers);\n return property_provider_1.memoize(providerChain, (credentials) => credentials.expiration !== undefined && credentials.expiration.getTime() - Date.now() < 300000, (credentials) => credentials.expiration !== undefined);\n};\nexports.defaultProvider = defaultProvider;\nconst remoteProvider = (init) => {\n if (process.env[credential_provider_imds_1.ENV_CMDS_RELATIVE_URI] || process.env[credential_provider_imds_1.ENV_CMDS_FULL_URI]) {\n return credential_provider_imds_1.fromContainerMetadata(init);\n }\n if (process.env[exports.ENV_IMDS_DISABLED]) {\n return () => Promise.reject(new property_provider_1.CredentialsProviderError(\"EC2 Instance Metadata Service access disabled\"));\n }\n return credential_provider_imds_1.fromInstanceMetadata(init);\n};\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozL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2NvbmZpZ2Agd2lsbCBub3QgYmUgcmVhZCwgbm9yIHdpbGwgYW55XG4gKiBtZXNzYWdlcyBiZSBzZW50IHRvIHRoZSBJbnN0YW5jZSBNZXRhZGF0YSBTZXJ2aWNlLlxuICpcbiAqIEBwYXJhbSBpbml0ICAgICAgICAgICAgICAgICAgQ29uZmlndXJhdGlvbiB0aGF0IGlzIHBhc3NlZCB0byBlYWNoIGluZGl2aWR1YWxcbiAqICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcHJvdmlkZXJcbiAqXG4gKiBAc2VlIGZyb21FbnYgICAgICAgICAgICAgICAgIFRoZSBmdW5jdGlvbiB1c2VkIHRvIHNvdXJjZSBjcmVkZW50aWFscyBmcm9tXG4gKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGVudmlyb25tZW50IHZhcmlhYmxlc1xuICogQHNlZSBmcm9tU1NPICAgICAgICAgICAgICAgICBUaGUgZnVuY3Rpb24gdXNlZCB0byBzb3VyY2UgY3JlZGVudGlhbHMgZnJvbVxuICogICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXNvbHZlZCBTU08gdG9rZW4gY2FjaGVcbiAqIEBzZWUgZnJvbVRva2VuRmlsZSAgICAgICAgICAgVGhlIGZ1bmN0aW9uIHVzZWQgdG8gc291cmNlIGNyZWRlbnRpYWxzIGZyb21cbiAqICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdG9rZW4gZmlsZVxuICogQHNlZSBmcm9tSW5pICAgICAgICAgICAgICAgICBUaGUgZnVuY3Rpb24gdXNlZCB0byBzb3VyY2UgY3JlZGVudGlhbHMgZnJvbSBJTklcbiAqICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZmlsZXNcbiAqIEBzZWUgZnJvbVByb2Nlc3MgICAgICAgICAgICAgVGhlIGZ1bmN0aW9uIHVzZWQgdG8gc291cmNlcyBjcmVkZW50aWFscyBmcm9tXG4gKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNyZWRlbnR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hdGEoaW5pdCk7XG59O1xuIl19","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.fromProcess = exports.ENV_PROFILE = void 0;\nconst property_provider_1 = require(\"@aws-sdk/property-provider\");\nconst util_credentials_1 = require(\"@aws-sdk/util-credentials\");\nconst child_process_1 = require(\"child_process\");\n/**\n * @internal\n */\nexports.ENV_PROFILE = \"AWS_PROFILE\";\n/**\n * Creates a credential provider that will read from a credential_process specified\n * in ini files.\n */\nconst fromProcess = (init = {}) => async () => {\n const profiles = await util_credentials_1.parseKnownFiles(init);\n return resolveProcessCredentials(util_credentials_1.getMasterProfileName(init), profiles);\n};\nexports.fromProcess = fromProcess;\nconst resolveProcessCredentials = async (profileName, profiles) => {\n const profile = profiles[profileName];\n if (profiles[profileName]) {\n const credentialProcess = profile[\"credential_process\"];\n if (credentialProcess !== undefined) {\n return await execPromise(credentialProcess)\n .then((processResult) => {\n let data;\n try {\n data = JSON.parse(processResult);\n }\n catch (_a) {\n throw Error(`Profile ${profileName} credential_process returned invalid JSON.`);\n }\n const { Version: version, AccessKeyId: accessKeyId, SecretAccessKey: secretAccessKey, SessionToken: sessionToken, Expiration: expiration, } = data;\n if (version !== 1) {\n throw Error(`Profile ${profileName} credential_process did not return Version 1.`);\n }\n if (accessKeyId === undefined || secretAccessKey === undefined) {\n throw Error(`Profile ${profileName} credential_process returned invalid credentials.`);\n }\n let expirationUnix;\n if (expiration) {\n const currentTime = new Date();\n const expireTime = new Date(expiration);\n if (expireTime < currentTime) {\n throw Error(`Profile ${profileName} credential_process returned expired credentials.`);\n }\n expirationUnix = Math.floor(new Date(expiration).valueOf() / 1000);\n }\n return {\n accessKeyId,\n secretAccessKey,\n sessionToken,\n expirationUnix,\n };\n })\n .catch((error) => {\n throw new property_provider_1.CredentialsProviderError(error.message);\n });\n }\n else {\n throw new property_provider_1.CredentialsProviderError(`Profile ${profileName} did not contain credential_process.`);\n }\n }\n else {\n // If the profile cannot be parsed or does not contain the default or\n // specified profile throw an error. This should be considered a terminal\n // resolution error if a profile has been specified by the user (whether via\n // a parameter, anenvironment variable, or another profile's `source_profile` key).\n throw new property_provider_1.CredentialsProviderError(`Profile ${profileName} could not be found in shared credentials file.`);\n }\n};\nconst execPromise = (command) => new Promise(function (resolve, reject) {\n child_process_1.exec(command, (error, stdout) => {\n if (error) {\n reject(error);\n return;\n }\n resolve(stdout.trim());\n });\n});\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvaW5kZXgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7O0FBQUEsa0VBQXNFO0FBR3RFLGdFQUFxRztBQUNyRyxpREFBcUM7QUFFckM7O0dBRUc7QUFDVSxRQUFBLFdBQVcsR0FBRyxhQUFhLENBQUM7QUFJekM7OztHQUdHO0FBQ0ksTUFBTSxXQUFXLEdBQ3RCLENBQUMsT0FBd0IsRUFBRSxFQUFzQixFQUFFLENBQ25ELEtBQUssSUFBSSxFQUFFO0lBQ1QsTUFBTSxRQUFRLEdBQUcsTUFBTSxrQ0FBZSxDQUFDLElBQUksQ0FBQyxDQUFDO0lBQzdDLE9BQU8seUJBQXlCLENBQUMsdUNBQW9CLENBQUMsSUFBSSxDQUFDLEVBQUUsUUFBUSxDQUFDLENBQUM7QUFDekUsQ0FBQyxDQUFDO0FBTFMsUUFBQSxXQUFXLGVBS3BCO0FBRUosTUFBTSx5QkFBeUIsR0FBRyxLQUFLLEVBQUUsV0FBbUIsRUFBRSxRQUF1QixFQUF3QixFQUFFO0lBQzdHLE1BQU0sT0FBTyxHQUFHLFFBQVEsQ0FBQyxXQUFXLENBQUMsQ0FBQztJQUV0QyxJQUFJLFFBQVEsQ0FBQyxXQUFXLENBQUMsRUFBRTtRQUN6QixNQUFNLGlCQUFpQixHQUFHLE9BQU8sQ0FBQyxvQkFBb0IsQ0FBQyxDQUFDO1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vzc0tleTogc2VjcmV0QWNjZXNzS2V5LFxuICAgICAgICAgICAgU2Vzc2lvblRva2VuOiBzZXNzaW9uVG9rZW4sXG4gICAgICAgICAgICBFeHBpcmF0aW9uOiBleHBpcmF0aW9uLFxuICAgICAgICAgIH0gPSBkYXRhO1xuXG4gICAgICAgICAgaWYgKHZlcnNpb24gIT09IDEpIHtcbiAgICAgICAgICAgIHRocm93IEVycm9yKGBQcm9maWxlICR7cHJvZmlsZU5hbWV9IGNyZWRlbnRpYWxfcHJvY2VzcyBkaWQgbm90IHJldHVybiBWZXJzaW9uIDEuYCk7XG4gICAgICAgICAgfVxuXG4gICAgICAgICAgaWYgKGFjY2Vzc0tleUlkID09PSB1bmRlZmluZWQgfHwgc2VjcmV0QWNjZXNzS2V5ID09PSB1bmRlZmluZWQpIHtcbiAgICAgICAgICAgIHRocm93IEVycm9yKGBQcm9maWxlICR7cHJvZmlsZU5hbWV9IGNyZWRlbnRpYWxfcHJvY2VzcyByZXR1cm5lZCBpbnZhbGlkIGNyZWRlbnRpYWxzLmApO1xuICAgICAgICAgIH1cblxuICAgICAgICAgIGxldCBleHBpcmF0aW9uVW5peDtcblxuICAgICAgICAgIGlmIChleHBpcmF0aW9uKSB7XG4gICAgICAgICAgICBjb25zdCBjdXJyZW50VGltZSA9IG5ldyBEYXRlKCk7XG4gICAgICAgICAgICBjb25zdCBleHBpcmVUaW1lID0gbmV3IERhdGUoZXhwaXJhdGlvbik7XG4gICAgICAgICAgICBpZiAoZXhwaXJlVGltZSA8IGN1cnJlbnRUaW1lKSB7XG4gICAgICAgICAgICAgIHRocm93IEVycm9yKGBQcm9maWxlICR7cHJvZmlsZU5hbWV9IGNyZWRlbnRpYWxfcHJvY2VzcyByZXR1cm5lZCBleHBpcmVkIGNyZWRlbnRpYWxzLmApO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgZXhwaXJhdGlvblVuaXggPSBNYXRoLmZsb29yKG5ldyBEYXRlKGV4cGlyYXRpb24pLnZhbHV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0gY291bGQgbm90IGJlIGZvdW5kIGluIHNoYXJlZCBjcmVkZW50aWFscyBmaWxlLmApO1xuICB9XG59O1xuXG5jb25zdCBleGVjUHJvbWlzZSA9IChjb21tYW5kOiBzdHJpbmcpID0+XG4gIG5ldyBQcm9taXNlKGZ1bmN0aW9uIChyZXNvbHZlLCByZWplY3QpIHtcbiAgICBleGVjKGNvbW1hbmQsIChlcnJvciwgc3Rkb3V0KSA9PiB7XG4gICAgICBpZiAoZXJyb3IpIHtcbiAgICAgICAgcmVqZWN0KGVycm9yKTtcbiAgICAgICAgcmV0dXJuO1xuICAgICAgfVxuXG4gICAgICByZXNvbHZlKHN0ZG91dC50cmltKCkpO1xuICAgIH0pO1xuICB9KTtcbiJdfQ==","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.isSsoProfile = exports.validateSsoProfile = exports.fromSSO = exports.EXPIRE_WINDOW_MS = void 0;\nconst client_sso_1 = require(\"@aws-sdk/client-sso\");\nconst property_provider_1 = require(\"@aws-sdk/property-provider\");\nconst shared_ini_file_loader_1 = require(\"@aws-sdk/shared-ini-file-loader\");\nconst util_credentials_1 = require(\"@aws-sdk/util-credentials\");\nconst crypto_1 = require(\"crypto\");\nconst fs_1 = require(\"fs\");\nconst path_1 = require(\"path\");\n/**\n * The time window (15 mins) that SDK will treat the SSO token expires in before the defined expiration date in token.\n * This is needed because server side may have invalidated the token before the defined expiration date.\n *\n * @internal\n */\nexports.EXPIRE_WINDOW_MS = 15 * 60 * 1000;\nconst SHOULD_FAIL_CREDENTIAL_CHAIN = false;\n/**\n * Creates a credential provider that will read from a credential_process specified\n * in ini files.\n */\nconst fromSSO = (init = {}) => async () => {\n const { ssoStartUrl, ssoAccountId, ssoRegion, ssoRoleName, ssoClient } = init;\n if (!ssoStartUrl && !ssoAccountId && !ssoRegion && !ssoRoleName) {\n // Load the SSO config from shared AWS config file.\n const profiles = await util_credentials_1.parseKnownFiles(init);\n const profileName = util_credentials_1.getMasterProfileName(init);\n const profile = profiles[profileName];\n if (!exports.isSsoProfile(profile)) {\n throw new property_provider_1.CredentialsProviderError(`Profile ${profileName} is not configured with SSO credentials.`);\n }\n const { sso_start_url, sso_account_id, sso_region, sso_role_name } = exports.validateSsoProfile(profile);\n return resolveSSOCredentials({\n ssoStartUrl: sso_start_url,\n ssoAccountId: sso_account_id,\n ssoRegion: sso_region,\n ssoRoleName: sso_role_name,\n ssoClient: ssoClient,\n });\n }\n else if (!ssoStartUrl || !ssoAccountId || !ssoRegion || !ssoRoleName) {\n throw new property_provider_1.CredentialsProviderError('Incomplete configuration. The fromSSO() argument hash must include \"ssoStartUrl\",' +\n ' \"ssoAccountId\", \"ssoRegion\", \"ssoRoleName\"');\n }\n else {\n return resolveSSOCredentials({ ssoStartUrl, ssoAccountId, ssoRegion, ssoRoleName, ssoClient });\n }\n};\nexports.fromSSO = fromSSO;\nconst resolveSSOCredentials = async ({ ssoStartUrl, ssoAccountId, ssoRegion, ssoRoleName, ssoClient, }) => {\n const hasher = crypto_1.createHash(\"sha1\");\n const cacheName = hasher.update(ssoStartUrl).digest(\"hex\");\n const tokenFile = path_1.join(shared_ini_file_loader_1.getHomeDir(), \".aws\", \"sso\", \"cache\", `${cacheName}.json`);\n let token;\n try {\n token = JSON.parse(fs_1.readFileSync(tokenFile, { encoding: \"utf-8\" }));\n if (new Date(token.expiresAt).getTime() - Date.now() <= exports.EXPIRE_WINDOW_MS) {\n throw new Error(\"SSO token is expired.\");\n }\n }\n catch (e) {\n throw new property_provider_1.CredentialsProviderError(`The SSO session associated with this profile has expired or is otherwise invalid. To refresh this SSO session ` +\n `run aws sso login with the corresponding profile.`, SHOULD_FAIL_CREDENTIAL_CHAIN);\n }\n const { accessToken } = token;\n const sso = ssoClient || new client_sso_1.SSOClient({ region: ssoRegion });\n let ssoResp;\n try {\n ssoResp = await sso.send(new client_sso_1.GetRoleCredentialsCommand({\n accountId: ssoAccountId,\n roleName: ssoRoleName,\n accessToken,\n }));\n }\n catch (e) {\n throw property_provider_1.CredentialsProviderError.from(e, SHOULD_FAIL_CREDENTIAL_CHAIN);\n }\n const { roleCredentials: { accessKeyId, secretAccessKey, sessionToken, expiration } = {} } = ssoResp;\n if (!accessKeyId || !secretAccessKey || !sessionToken || !expiration) {\n throw new property_provider_1.CredentialsProviderError(\"SSO returns an invalid temporary credential.\", SHOULD_FAIL_CREDENTIAL_CHAIN);\n }\n return { accessKeyId, secretAccessKey, sessionToken, expiration: new Date(expiration) };\n};\n/**\n * @internal\n */\nconst validateSsoProfile = (profile) => {\n const { sso_start_url, sso_account_id, sso_region, sso_role_name } = profile;\n if (!sso_start_url || !sso_account_id || !sso_region || !sso_role_name) {\n throw new property_provider_1.CredentialsProviderError(`Profile is configured with invalid SSO credentials. Required parameters \"sso_account_id\", \"sso_region\", ` +\n `\"sso_role_name\", \"sso_start_url\". Got ${Object.keys(profile).join(\", \")}\\nReference: https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-sso.html`, SHOULD_FAIL_CREDENTIAL_CHAIN);\n }\n return profile;\n};\nexports.validateSsoProfile = validateSsoProfile;\n/**\n * @internal\n */\nconst isSsoProfile = (arg) => arg &&\n (typeof arg.sso_start_url === \"string\" ||\n typeof arg.sso_account_id === \"string\" ||\n typeof arg.sso_region === \"string\" ||\n typeof arg.sso_role_name === \"string\");\nexports.isSsoProfile = isSsoProfile;\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvaW5kZXgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7O0FBQUEsb0RBQTRHO0FBQzVHLGtFQUFzRTtBQUN0RSw0RUFBc0U7QUFFdEUsZ0VBQXFHO0FBQ3JHLG1DQUFvQztBQUNwQywyQkFBa0M7QUFDbEMsK0JBQTRCO0FBRTVCOzs7OztHQUtHO0FBQ1UsUUFBQSxnQkFBZ0IsR0FBRyxF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wgXCJcbiAgICAgICAgKX1cXG5SZWZlcmVuY2U6IGh0dHBzOi8vZG9jcy5hd3MuYW1hem9uLmNvbS9jbGkvbGF0ZXN0L3VzZXJndWlkZS9jbGktY29uZmlndXJlLXNzby5odG1sYCxcbiAgICAgIFNIT1VMRF9GQUlMX0NSRURFTlRJQUxfQ0hBSU5cbiAgICApO1xuICB9XG4gIHJldHVybiBwcm9maWxlIGFzIFNzb1Byb2ZpbGU7XG59O1xuXG4vKipcbiAqIEBpbnRlcm5hbFxuICovXG5leHBvcnQgY29uc3QgaXNTc29Qcm9maWxlID0gKGFyZzogUHJvZmlsZSk6IGFyZyBpcyBQYXJ0aWFsPFNzb1Byb2ZpbGU+ID0+XG4gIGFyZyAmJlxuICAodHlwZW9mIGFyZy5zc29fc3RhcnRfdXJsID09PSBcInN0cmluZ1wiIHx8XG4gICAgdHlwZW9mIGFyZy5zc29fYWNjb3VudF9pZCA9PT0gXCJzdHJpbmdcIiB8fFxuICAgIHR5cGVvZiBhcmcuc3NvX3JlZ2lvbiA9PT0gXCJzdHJpbmdcIiB8fFxuICAgIHR5cGVvZiBhcmcuc3NvX3JvbGVfbmFtZSA9PT0gXCJzdHJpbmdcIik7XG4iXX0=","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.fromTokenFile = void 0;\nconst property_provider_1 = require(\"@aws-sdk/property-provider\");\nconst fs_1 = require(\"fs\");\nconst fromWebToken_1 = require(\"./fromWebToken\");\nconst ENV_TOKEN_FILE = \"AWS_WEB_IDENTITY_TOKEN_FILE\";\nconst ENV_ROLE_ARN = \"AWS_ROLE_ARN\";\nconst ENV_ROLE_SESSION_NAME = \"AWS_ROLE_SESSION_NAME\";\n/**\n * Represents OIDC credentials from a file on disk.\n */\nconst fromTokenFile = (init = {}) => async () => {\n return resolveTokenFile(init);\n};\nexports.fromTokenFile = fromTokenFile;\nconst resolveTokenFile = (init) => {\n var _a, _b, _c;\n const webIdentityTokenFile = (_a = init === null || init === void 0 ? void 0 : init.webIdentityTokenFile) !== null && _a !== void 0 ? _a : process.env[ENV_TOKEN_FILE];\n const roleArn = (_b = init === null || init === void 0 ? void 0 : init.roleArn) !== null && _b !== void 0 ? _b : process.env[ENV_ROLE_ARN];\n const roleSessionName = (_c = init === null || init === void 0 ? void 0 : init.roleSessionName) !== null && _c !== void 0 ? _c : process.env[ENV_ROLE_SESSION_NAME];\n if (!webIdentityTokenFile || !roleArn) {\n throw new property_provider_1.CredentialsProviderError(\"Web identity configuration not specified\");\n }\n return fromWebToken_1.fromWebToken({\n ...init,\n webIdentityToken: fs_1.readFileSync(webIdentityTokenFile, { encoding: \"ascii\" }),\n roleArn,\n roleSessionName,\n })();\n};\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZnJvbVRva2VuRmlsZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9mcm9tVG9rZW5GaWxlLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7OztBQUFBLGtFQUFzRTtBQUV0RSwyQkFBa0M7QUFFbEMsaURBQWdFO0FBRWhFLE1BQU0sY0FBYyxHQUFHLDZCQUE2QixDQUFDO0FBQ3JELE1BQU0sWUFBWSxHQUFHLGNBQWMsQ0FBQztBQUNwQyxNQUFNLHFCQUFxQixHQUFHLHVCQUF1QixDQUFDO0FBU3REOztHQUVHO0FBQ0ksTUFBTSxhQUFhLEdBQ3hCLENBQUMsT0FBMEIsRUFBRSxFQUFzQixFQUFFLENBQ3JELEtBQUssSUFBSSxFQUFFO0lBQ1QsT0FBTyxnQkFBZ0IsQ0FBQyxJQUFJLENBQUMsQ0FBQztBQUNoQyxDQUFDLENBQUM7QUFKUyxRQUFBLGFBQWEsaUJBSXRCO0FBRUosTUFBTSxnQkFBZ0IsR0FBRyxDQUFDLElBQXdCLEVBQXdCLEVBQUU7O0lBQzFFLE1BQU0sb0JBQW9CLEdBQUcsTUFBQSxJQUFJ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XNzLmVudltFTlZfUk9MRV9BUk5dO1xuICBjb25zdCByb2xlU2Vzc2lvbk5hbWUgPSBpbml0Py5yb2xlU2Vzc2lvbk5hbWUgPz8gcHJvY2Vzcy5lbnZbRU5WX1JPTEVfU0VTU0lPTl9OQU1FXTtcblxuICBpZiAoIXdlYklkZW50aXR5VG9rZW5GaWxlIHx8ICFyb2xlQXJuKSB7XG4gICAgdGhyb3cgbmV3IENyZWRlbnRpYWxzUHJvdmlkZXJFcnJvcihcIldlYiBpZGVudGl0eSBjb25maWd1cmF0aW9uIG5vdCBzcGVjaWZpZWRcIik7XG4gIH1cblxuICByZXR1cm4gZnJvbVdlYlRva2VuKHtcbiAgICAuLi5pbml0LFxuICAgIHdlYklkZW50aXR5VG9rZW46IHJlYWRGaWxlU3luYyh3ZWJJZGVudGl0eVRva2VuRmlsZSwgeyBlbmNvZGluZzogXCJhc2NpaVwiIH0pLFxuICAgIHJvbGVBcm4sXG4gICAgcm9sZVNlc3Npb25OYW1lLFxuICB9KSgpO1xufTtcbiJdfQ==","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.fromWebToken = void 0;\nconst property_provider_1 = require(\"@aws-sdk/property-provider\");\nconst fromWebToken = (init) => () => {\n const { roleArn, roleSessionName, webIdentityToken, providerId, policyArns, policy, durationSeconds, roleAssumerWithWebIdentity, } = init;\n if (!roleAssumerWithWebIdentity) {\n throw new property_provider_1.CredentialsProviderError(`Role Arn '${roleArn}' needs to be assumed with web identity,` +\n ` but no role assumption callback was provided.`, false);\n }\n return roleAssumerWithWebIdentity({\n RoleArn: roleArn,\n RoleSessionName: roleSessionName !== null && roleSessionName !== void 0 ? roleSessionName : `aws-sdk-js-session-${Date.now()}`,\n WebIdentityToken: webIdentityToken,\n ProviderId: providerId,\n PolicyArns: policyArns,\n Policy: policy,\n DurationSeconds: durationSeconds,\n });\n};\nexports.fromWebToken = fromWebToken;\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJm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vbmRzLFxuICAgIH0pO1xuICB9O1xuIl19","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst tslib_1 = require(\"tslib\");\ntslib_1.__exportStar(require(\"./fromTokenFile\"), exports);\ntslib_1.__exportStar(require(\"./fromWebToken\"), exports);\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvaW5kZXgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7O0FBQUEsMERBQWdDO0FBQ2hDLHlEQUErQiIsInNvdXJjZXNDb250ZW50IjpbImV4cG9ydCAqIGZyb20gXCIuL2Zyb21Ub2tlbkZpbGVcIjtcbmV4cG9ydCAqIGZyb20gXCIuL2Zyb21XZWJUb2tlblwiO1xuIl19","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.Hash = void 0;\nconst util_buffer_from_1 = require(\"@aws-sdk/util-buffer-from\");\nconst buffer_1 = require(\"buffer\");\nconst crypto_1 = require(\"crypto\");\nclass Hash {\n constructor(algorithmIdentifier, secret) {\n this.hash = secret ? crypto_1.createHmac(algorithmIdentifier, castSourceData(secret)) : crypto_1.createHash(algorithmIdentifier);\n }\n update(toHash, encoding) {\n this.hash.update(castSourceData(toHash, encoding));\n }\n digest() {\n return Promise.resolve(this.hash.digest());\n }\n}\nexports.Hash = Hash;\nfunction castSourceData(toCast, encoding) {\n if (buffer_1.Buffer.isBuffer(toCast)) {\n return toCast;\n }\n if (typeof toCast === \"string\") {\n return util_buffer_from_1.fromString(toCast, encoding);\n }\n if (ArrayBuffer.isView(toCast)) {\n return util_buffer_from_1.fromArrayBuffer(toCast.buffer, toCast.byteOffset, toCast.byteLength);\n }\n return util_buffer_from_1.fromArrayBuffer(toCast);\n}\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiL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GNhc3RTb3VyY2VEYXRhKHRvSGFzaCwgZW5jb2RpbmcpKTtcbiAgfVxuXG4gIGRpZ2VzdCgpOiBQcm9taXNlPFVpbnQ4QXJyYXk+IHtcbiAgICByZXR1cm4gUHJvbWlzZS5yZXNvbHZlKHRoaXMuaGFzaC5kaWdlc3QoKSk7XG4gIH1cbn1cblxuZnVuY3Rpb24gY2FzdFNvdXJjZURhdGEodG9DYXN0OiBTb3VyY2VEYXRhLCBlbmNvZGluZz86IFN0cmluZ0VuY29kaW5nKTogQnVmZmVyIHtcbiAgaWYgKEJ1ZmZlci5pc0J1ZmZlcih0b0Nhc3QpKSB7XG4gICAgcmV0dXJuIHRvQ2FzdDtcbiAgfVxuXG4gIGlmICh0eXBlb2YgdG9DYXN0ID09PSBcInN0cmluZ1wiKSB7XG4gICAgcmV0dXJuIGZyb21TdHJpbmcodG9DYXN0LCBlbmNvZGluZyk7XG4gIH1cblxuICBpZiAoQXJyYXlCdWZmZXIuaXNWaWV3KHRvQ2FzdCkpIHtcbiAgICByZXR1cm4gZnJvbUFycmF5QnVmZmVyKHRvQ2FzdC5idWZmZXIsIHRvQ2FzdC5ieXRlT2Zmc2V0LCB0b0Nhc3QuYnl0ZUxlbmd0aCk7XG4gIH1cblxuICByZXR1cm4gZnJvbUFycmF5QnVmZmVyKHRvQ2FzdCk7XG59XG4iXX0=","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.isArrayBuffer = void 0;\nconst isArrayBuffer = (arg) => (typeof ArrayBuffer === \"function\" && arg instanceof ArrayBuffer) ||\n Object.prototype.toString.call(arg) === \"[object ArrayBuffer]\";\nexports.isArrayBuffer = isArrayBuffer;\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvaW5kZXgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7O0FBQU8sTUFBTSxhQUFhLEdBQUcsQ0FBQyxHQUFRLEVBQXNCLEVBQUUsQ0FDNUQsQ0FBQyxPQUFPLFdBQVcsS0FBSyxVQUFVLElBQUksR0FBRyxZQUFZLFdBQVcsQ0FBQztJQUNqRSxNQUFNLENBQUMsU0FBUyxDQUFDLFFBQVEsQ0FBQyxJQUFJLENBQUMsR0FBRyxDQUFDLEtBQUssc0JBQXNCLENBQUM7QUFGcEQsUUFBQSxhQUFhLGlCQUV1QyIsInNvdXJjZXNDb250ZW50IjpbImV4cG9ydCBjb25zdCBpc0FycmF5QnVmZmVyID0gKGFyZzogYW55KTogYXJnIGlzIEFycmF5QnVmZmVyID0+XG4gICh0eXBlb2YgQXJyYXlCdWZmZXIgPT09IFwiZnVuY3Rpb25cIiAmJiBhcmcgaW5zdGFuY2VvZiBBcnJheUJ1ZmZlcikgfHxcbiAgT2JqZWN0LnByb3RvdHlwZS50b1N0cmluZy5jYWxsKGFyZykgPT09IFwiW29iamVjdCBBcnJheUJ1ZmZlcl1cIjtcbiJdfQ==","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.getContentLengthPlugin = exports.contentLengthMiddlewareOptions = exports.contentLengthMiddleware = void 0;\nconst protocol_http_1 = require(\"@aws-sdk/protocol-http\");\nconst CONTENT_LENGTH_HEADER = \"content-length\";\nfunction contentLengthMiddleware(bodyLengthChecker) {\n return (next) => async (args) => {\n const request = args.request;\n if (protocol_http_1.HttpRequest.isInstance(request)) {\n const { body, headers } = request;\n if (body &&\n Object.keys(headers)\n .map((str) => str.toLowerCase())\n .indexOf(CONTENT_LENGTH_HEADER) === -1) {\n const length = bodyLengthChecker(body);\n if (length !== undefined) {\n request.headers = {\n ...request.headers,\n [CONTENT_LENGTH_HEADER]: String(length),\n };\n }\n }\n }\n return next({\n ...args,\n request,\n });\n };\n}\nexports.contentLengthMiddleware = contentLengthMiddleware;\nexports.contentLengthMiddlewareOptions = {\n step: \"build\",\n tags: [\"SET_CONTENT_LENGTH\", \"CONTENT_LENGTH\"],\n name: \"contentLengthMiddleware\",\n override: true,\n};\nconst getContentLengthPlugin = (options) => ({\n applyToStack: (clientStack) => {\n clientStack.add(contentLengthMiddleware(options.bodyLengthChecker), exports.contentLengthMiddlewareOptions);\n },\n});\nexports.getContentLengthPlugin = getContentLengthPlugin;\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvaW5kZXgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7O0FBQUEsMERBQXFEO0FBWXJELE1BQU0scUJBQXFCLEdBQUcsZ0JBQWdCLENBQUM7QUFFL0MsU0FBZ0IsdUJBQXVCLENBQUMsaUJBQXVDO0lBQzdFLE9BQU8sQ0FBZ0MsSUFBK0IsRUFBNkIsRUFBRSxDQUNuRyxLQUFLLEVBQUUsSUFBZ0MsRUFBdUMsRUFBRTtRQUM5RSxNQUFNLE9BQU8sR0FBRyxJQUFJLENBQUMsT0FBTyxDQUFDO1FBQzdCLElBQUksMkJBQVcsQ0FBQyxVQUFVLENBQUMsT0FBTyxDQUFDLEVBQUU7WUFDbkMsTUFBTSxFQUFFLElBQUksRUFBRSxPQUFPLEVBQUUsR0FBRyxPQUFPLENBQUM7WUFDbEMsSUFDRSxJQUFJO2dCQUNKLE1BQU0sQ0FBQyxJQUFJLENBQUMsT0FBTyxDQUFDO3FCQUNqQixHQUFHLENBQUMsQ0FBQyxHQUFHLEVBQUUsRUFBRSxDQUFDLEdBQUcsQ0FBQyxXQUFXLEVBQUUsQ0FBQztxQkFDL0IsT0FBTyxDQUFDLHFCQUFxQixDQUFDLEtBQUssQ0FBQyxDQUFDLEVBQ3hDO2dCQUNBLE1BQU0sTUFBTSxHQUFHLGlCQUFpQixDQUFDLElBQUksQ0FBQyxDQUFDO2dCQUN2QyxJQUFJLE1BQU0sS0FBSyxTQUFTLEVBQUU7b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KGxlbmd0aCAhPT0gdW5kZWZpbmVkKSB7XG4gICAgICAgICAgICByZXF1ZXN0LmhlYWRlcnMgPSB7XG4gICAgICAgICAgICAgIC4uLnJlcXVlc3QuaGVhZGVycyxcbiAgICAgICAgICAgICAgW0NPTlRFTlRfTEVOR1RIX0hFQURFUl06IFN0cmluZyhsZW5ndGgpLFxuICAgICAgICAgICAgfTtcbiAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICAgIH1cblxuICAgICAgcmV0dXJuIG5leHQoe1xuICAgICAgICAuLi5hcmdzLFxuICAgICAgICByZXF1ZXN0LFxuICAgICAgfSk7XG4gICAgfTtcbn1cblxuZXhwb3J0IGNvbnN0IGNvbnRlbnRMZW5ndGhNaWRkbGV3YXJlT3B0aW9uczogQnVpbGRIYW5kbGVyT3B0aW9ucyA9IHtcbiAgc3RlcDogXCJidWlsZFwiLFxuICB0YWdzOiBbXCJTRVRfQ09OVEVOVF9MRU5HVEhcIiwgXCJDT05URU5UX0xFTkdUSFwiXSxcbiAgbmFtZTogXCJjb250ZW50TGVuZ3RoTWlkZGxld2FyZVwiLFxuICBvdmVycmlkZTogdHJ1ZSxcbn07XG5cbmV4cG9ydCBjb25zdCBnZXRDb250ZW50TGVuZ3RoUGx1Z2luID0gKG9wdGlvbnM6IHsgYm9keUxlbmd0aENoZWNrZXI6IEJvZHlMZW5ndGhDYWxjdWxhdG9yIH0pOiBQbHVnZ2FibGU8YW55LCBhbnk+ID0+ICh7XG4gIGFwcGx5VG9TdGFjazogKGNsaWVudFN0YWNrKSA9PiB7XG4gICAgY2xpZW50U3RhY2suYWRkKGNvbnRlbnRMZW5ndGhNaWRkbGV3YXJlKG9wdGlvbnMuYm9keUxlbmd0aENoZWNrZXIpLCBjb250ZW50TGVuZ3RoTWlkZGxld2FyZU9wdGlvbnMpO1xuICB9LFxufSk7XG4iXX0=","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.getHostHeaderPlugin = exports.hostHeaderMiddlewareOptions = exports.hostHeaderMiddleware = exports.resolveHostHeaderConfig = void 0;\nconst protocol_http_1 = require(\"@aws-sdk/protocol-http\");\nfunction resolveHostHeaderConfig(input) {\n return input;\n}\nexports.resolveHostHeaderConfig = resolveHostHeaderConfig;\nconst hostHeaderMiddleware = (options) => (next) => async (args) => {\n if (!protocol_http_1.HttpRequest.isInstance(args.request))\n return next(args);\n const { request } = args;\n const { handlerProtocol = \"\" } = options.requestHandler.metadata || {};\n //For H2 request, remove 'host' header and use ':authority' header instead\n //reference: https://nodejs.org/dist/latest-v13.x/docs/api/errors.html#ERR_HTTP2_INVALID_CONNECTION_HEADERS\n if (handlerProtocol.indexOf(\"h2\") >= 0 && !request.headers[\":authority\"]) {\n delete request.headers[\"host\"];\n request.headers[\":authority\"] = \"\";\n //non-H2 request and 'host' header is not set, set the 'host' header to request's hostname.\n }\n else if (!request.headers[\"host\"]) {\n request.headers[\"host\"] = request.hostname;\n }\n return next(args);\n};\nexports.hostHeaderMiddleware = hostHeaderMiddleware;\nexports.hostHeaderMiddlewareOptions = {\n name: \"hostHeaderMiddleware\",\n step: \"build\",\n priority: \"low\",\n tags: [\"HOST\"],\n override: true,\n};\nconst getHostHeaderPlugin = (options) => ({\n applyToStack: (clientStack) => {\n clientStack.add(exports.hostHeaderMiddleware(options), exports.hostHeaderMiddlewareOptions);\n },\n});\nexports.getHostHeaderPlugin = getHostHeaderPlugin;\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvaW5kZXgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7O0FBQUEsMERBQXFEO0FBYXJELFNBQWdCLHVCQUF1QixDQUNyQyxLQUFxRDtJQUVyRCxPQUFPLEtBQUssQ0FBQztBQUNmLENBQUM7QUFKRCwwREFJQztBQUVNLE1BQU0sb0JBQW9CLEdBQy9CLENBQThDLE9BQWl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0ZSByZXF1ZXN0LmhlYWRlcnNbXCJob3N0XCJdO1xuICAgICAgcmVxdWVzdC5oZWFkZXJzW1wiOmF1dGhvcml0eVwiXSA9IFwiXCI7XG4gICAgICAvL25vbi1IMiByZXF1ZXN0IGFuZCAnaG9zdCcgaGVhZGVyIGlzIG5vdCBzZXQsIHNldCB0aGUgJ2hvc3QnIGhlYWRlciB0byByZXF1ZXN0J3MgaG9zdG5hbWUuXG4gICAgfSBlbHNlIGlmICghcmVxdWVzdC5oZWFkZXJzW1wiaG9zdFwiXSkge1xuICAgICAgcmVxdWVzdC5oZWFkZXJzW1wiaG9zdFwiXSA9IHJlcXVlc3QuaG9zdG5hbWU7XG4gICAgfVxuICAgIHJldHVybiBuZXh0KGFyZ3MpO1xuICB9O1xuXG5leHBvcnQgY29uc3QgaG9zdEhlYWRlck1pZGRsZXdhcmVPcHRpb25zOiBCdWlsZEhhbmRsZXJPcHRpb25zICYgQWJzb2x1dGVMb2NhdGlvbiA9IHtcbiAgbmFtZTogXCJob3N0SGVhZGVyTWlkZGxld2FyZVwiLFxuICBzdGVwOiBcImJ1aWxkXCIsXG4gIHByaW9yaXR5OiBcImxvd1wiLFxuICB0YWdzOiBbXCJIT1NUXCJdLFxuICBvdmVycmlkZTogdHJ1ZSxcbn07XG5cbmV4cG9ydCBjb25zdCBnZXRIb3N0SGVhZGVyUGx1Z2luID0gKG9wdGlvbnM6IEhvc3RIZWFkZXJSZXNvbHZlZENvbmZpZyk6IFBsdWdnYWJsZTxhbnksIGFueT4gPT4gKHtcbiAgYXBwbHlUb1N0YWNrOiAoY2xpZW50U3RhY2spID0+IHtcbiAgICBjbGllbnRTdGFjay5hZGQoaG9zdEhlYWRlck1pZGRsZXdhcmUob3B0aW9ucyksIGhvc3RIZWFkZXJNaWRkbGV3YXJlT3B0aW9ucyk7XG4gIH0sXG59KTtcbiJdfQ==","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst tslib_1 = require(\"tslib\");\ntslib_1.__exportStar(require(\"./loggerMiddleware\"), exports);\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvaW5kZXgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7O0FBQUEsNkRBQW1DIiwic291cmNlc0NvbnRlbnQiOlsiZXhwb3J0ICogZnJvbSBcIi4vbG9nZ2VyTWlkZGxld2FyZVwiO1xuIl19","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.getLoggerPlugin = exports.loggerMiddlewareOptions = exports.loggerMiddleware = void 0;\nconst loggerMiddleware = () => (next, context) => async (args) => {\n const { clientName, commandName, inputFilterSensitiveLog, logger, outputFilterSensitiveLog } = context;\n const response = await next(args);\n if (!logger) {\n return response;\n }\n if (typeof logger.info === \"function\") {\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 }\n return response;\n};\nexports.loggerMiddleware = loggerMiddleware;\nexports.loggerMiddlewareOptions = {\n name: \"loggerMiddleware\",\n tags: [\"LOGGER\"],\n step: \"initialize\",\n override: true,\n};\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nconst getLoggerPlugin = (options) => ({\n applyToStack: (clientStack) => {\n clientStack.add(exports.loggerMiddleware(), exports.loggerMiddlewareOptions);\n },\n});\nexports.getLoggerPlugin = getLoggerPlugin;\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibG9nZ2VyTWlkZGxld2FyZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9sb2dnZXJNaWRkbGV3YXJlLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7OztBQVlPLE1BQU0sZ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QtbGluZSBAdHlwZXNjcmlwdC1lc2xpbnQvbm8tdW51c2VkLXZhcnNcbmV4cG9ydCBjb25zdCBnZXRMb2dnZXJQbHVnaW4gPSAob3B0aW9uczogYW55KTogUGx1Z2dhYmxlPGFueSwgYW55PiA9PiAoe1xuICBhcHBseVRvU3RhY2s6IChjbGllbnRTdGFjaykgPT4ge1xuICAgIGNsaWVudFN0YWNrLmFkZChsb2dnZXJNaWRkbGV3YXJlKCksIGxvZ2dlck1pZGRsZXdhcmVPcHRpb25zKTtcbiAgfSxcbn0pO1xuIl19","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.AdaptiveRetryStrategy = void 0;\nconst config_1 = require(\"./config\");\nconst DefaultRateLimiter_1 = require(\"./DefaultRateLimiter\");\nconst StandardRetryStrategy_1 = require(\"./StandardRetryStrategy\");\nclass AdaptiveRetryStrategy extends StandardRetryStrategy_1.StandardRetryStrategy {\n constructor(maxAttemptsProvider, options) {\n const { rateLimiter, ...superOptions } = options !== null && options !== void 0 ? options : {};\n super(maxAttemptsProvider, superOptions);\n this.rateLimiter = rateLimiter !== null && rateLimiter !== void 0 ? rateLimiter : new DefaultRateLimiter_1.DefaultRateLimiter();\n this.mode = config_1.RETRY_MODES.ADAPTIVE;\n }\n async retry(next, args) {\n return super.retry(next, args, {\n beforeRequest: async () => {\n return this.rateLimiter.getSendToken();\n },\n afterRequest: (response) => {\n this.rateLimiter.updateClientSendingRate(response);\n },\n });\n }\n}\nexports.AdaptiveRetryStrategy = AdaptiveRetryStrategy;\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiQWRhcHRpdmVSZXRyeVN0cmF0ZWd5LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vc3JjL0FkYXB0aXZlUmV0cnlTdHJhdGVneS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7QUFFQSxxQ0FBdUM7QUFDdkMsNkRBQ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RlTGltaXRlciA/PyBuZXcgRGVmYXVsdFJhdGVMaW1pdGVyKCk7XG4gICAgdGhpcy5tb2RlID0gUkVUUllfTU9ERVMuQURBUFRJVkU7XG4gIH1cblxuICBhc3luYyByZXRyeTxJbnB1dCBleHRlbmRzIG9iamVjdCwgT3VwdXQgZXh0ZW5kcyBNZXRhZGF0YUJlYXJlcj4oXG4gICAgbmV4dDogRmluYWxpemVIYW5kbGVyPElucHV0LCBPdXB1dD4sXG4gICAgYXJnczogRmluYWxpemVIYW5kbGVyQXJndW1lbnRzPElucHV0PlxuICApIHtcbiAgICByZXR1cm4gc3VwZXIucmV0cnkobmV4dCwgYXJncywge1xuICAgICAgYmVmb3JlUmVxdWVzdDogYXN5bmMgKCkgPT4ge1xuICAgICAgICByZXR1cm4gdGhpcy5yYXRlTGltaXRlci5nZXRTZW5kVG9rZW4oKTtcbiAgICAgIH0sXG4gICAgICBhZnRlclJlcXVlc3Q6IChyZXNwb25zZTogYW55KSA9PiB7XG4gICAgICAgIHRoaXMucmF0ZUxpbWl0ZXIudXBkYXRlQ2xpZW50U2VuZGluZ1JhdGUocmVzcG9uc2UpO1xuICAgICAgfSxcbiAgICB9KTtcbiAgfVxufVxuIl19","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.DefaultRateLimiter = void 0;\nconst service_error_classification_1 = require(\"@aws-sdk/service-error-classification\");\nclass DefaultRateLimiter {\n constructor(options) {\n var _a, _b, _c, _d, _e;\n // Pre-set state variables\n this.currentCapacity = 0;\n this.enabled = false;\n this.lastMaxRate = 0;\n this.measuredTxRate = 0;\n this.requestCount = 0;\n this.lastTimestamp = 0;\n this.timeWindow = 0;\n this.beta = (_a = options === null || options === void 0 ? void 0 : options.beta) !== null && _a !== void 0 ? _a : 0.7;\n this.minCapacity = (_b = options === null || options === void 0 ? void 0 : options.minCapacity) !== null && _b !== void 0 ? _b : 1;\n this.minFillRate = (_c = options === null || options === void 0 ? void 0 : options.minFillRate) !== null && _c !== void 0 ? _c : 0.5;\n this.scaleConstant = (_d = options === null || options === void 0 ? void 0 : options.scaleConstant) !== null && _d !== void 0 ? _d : 0.4;\n this.smooth = (_e = options === null || options === void 0 ? void 0 : options.smooth) !== null && _e !== void 0 ? _e : 0.8;\n const currentTimeInSeconds = this.getCurrentTimeInSeconds();\n this.lastThrottleTime = currentTimeInSeconds;\n this.lastTxRateBucket = Math.floor(this.getCurrentTimeInSeconds());\n this.fillRate = this.minFillRate;\n this.maxCapacity = this.minCapacity;\n }\n getCurrentTimeInSeconds() {\n return Date.now() / 1000;\n }\n async getSendToken() {\n return this.acquireTokenBucket(1);\n }\n async acquireTokenBucket(amount) {\n // Client side throttling is not enabled until we see a throttling error.\n if (!this.enabled) {\n return;\n }\n this.refillTokenBucket();\n if (amount > this.currentCapacity) {\n const delay = ((amount - this.currentCapacity) / this.fillRate) * 1000;\n await new Promise((resolve) => setTimeout(resolve, delay));\n }\n this.currentCapacity = this.currentCapacity - amount;\n }\n refillTokenBucket() {\n const timestamp = this.getCurrentTimeInSeconds();\n if (!this.lastTimestamp) {\n this.lastTimestamp = timestamp;\n return;\n }\n const fillAmount = (timestamp - this.lastTimestamp) * this.fillRate;\n this.currentCapacity = Math.min(this.maxCapacity, this.currentCapacity + fillAmount);\n this.lastTimestamp = timestamp;\n }\n updateClientSendingRate(response) {\n let calculatedRate;\n this.updateMeasuredRate();\n if (service_error_classification_1.isThrottlingError(response)) {\n const rateToUse = !this.enabled ? this.measuredTxRate : Math.min(this.measuredTxRate, this.fillRate);\n this.lastMaxRate = rateToUse;\n this.calculateTimeWindow();\n this.lastThrottleTime = this.getCurrentTimeInSeconds();\n calculatedRate = this.cubicThrottle(rateToUse);\n this.enableTokenBucket();\n }\n else {\n this.calculateTimeWindow();\n calculatedRate = this.cubicSuccess(this.getCurrentTimeInSeconds());\n }\n const newRate = Math.min(calculatedRate, 2 * this.measuredTxRate);\n this.updateTokenBucketRate(newRate);\n }\n calculateTimeWindow() {\n this.timeWindow = this.getPrecise(Math.pow((this.lastMaxRate * (1 - this.beta)) / this.scaleConstant, 1 / 3));\n }\n cubicThrottle(rateToUse) {\n return this.getPrecise(rateToUse * this.beta);\n }\n cubicSuccess(timestamp) {\n return this.getPrecise(this.scaleConstant * Math.pow(timestamp - this.lastThrottleTime - this.timeWindow, 3) + this.lastMaxRate);\n }\n enableTokenBucket() {\n this.enabled = true;\n }\n updateTokenBucketRate(newRate) {\n // Refill based on our current rate before we update to the new fill rate.\n this.refillTokenBucket();\n this.fillRate = Math.max(newRate, this.minFillRate);\n this.maxCapacity = Math.max(newRate, this.minCapacity);\n // When we scale down we can't have a current capacity that exceeds our maxCapacity.\n this.currentCapacity = Math.min(this.currentCapacity, this.maxCapacity);\n }\n updateMeasuredRate() {\n const t = this.getCurrentTimeInSeconds();\n const timeBucket = Math.floor(t * 2) / 2;\n this.requestCount++;\n if (timeBucket > this.lastTxRateBucket) {\n const currentRate = this.requestCount / (timeBucket - this.lastTxRateBucket);\n this.measuredTxRate = this.getPrecise(currentRate * this.smooth + this.measuredTxRate * (1 - this.smooth));\n this.requestCount = 0;\n this.lastTxRateBucket = timeBucket;\n }\n }\n getPrecise(num) {\n return parseFloat(num.toFixed(8));\n }\n}\nexports.DefaultRateLimiter = DefaultRateLimiter;\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiRGVmYXVsdFJhdGVMaW1pdGVyLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vc3JjL0RlZmF1bHRSYXRlTGltaXRlci50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7QUFBQSx3RkFBMEU7QUFZMUUsTUFBYSxrQkFBa0I7SUF1QjdCLFlBQVksT0FBbUM7O1FBZi9DLDBCQUEwQjtRQUNsQixvQkFBZSxHQUFHLENBQUMsQ0FBQztRQUNwQixZQUFPLEdBQUcsS0FBSyxDQUFDO1FBQ2hCLGdCQUFXLEdBQUcsQ0FBQyxDQU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iAgICAgIHRoaXMubGFzdFR4UmF0ZUJ1Y2tldCA9IHRpbWVCdWNrZXQ7XG4gICAgfVxuICB9XG5cbiAgcHJpdmF0ZSBnZXRQcmVjaXNlKG51bTogbnVtYmVyKSB7XG4gICAgcmV0dXJuIHBhcnNlRmxvYXQobnVtLnRvRml4ZWQoOCkpO1xuICB9XG59XG4iXX0=","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.StandardRetryStrategy = void 0;\nconst protocol_http_1 = require(\"@aws-sdk/protocol-http\");\nconst service_error_classification_1 = require(\"@aws-sdk/service-error-classification\");\nconst uuid_1 = require(\"uuid\");\nconst config_1 = require(\"./config\");\nconst constants_1 = require(\"./constants\");\nconst defaultRetryQuota_1 = require(\"./defaultRetryQuota\");\nconst delayDecider_1 = require(\"./delayDecider\");\nconst retryDecider_1 = require(\"./retryDecider\");\nclass StandardRetryStrategy {\n constructor(maxAttemptsProvider, options) {\n var _a, _b, _c;\n this.maxAttemptsProvider = maxAttemptsProvider;\n this.mode = config_1.RETRY_MODES.STANDARD;\n this.retryDecider = (_a = options === null || options === void 0 ? void 0 : options.retryDecider) !== null && _a !== void 0 ? _a : retryDecider_1.defaultRetryDecider;\n this.delayDecider = (_b = options === null || options === void 0 ? void 0 : options.delayDecider) !== null && _b !== void 0 ? _b : delayDecider_1.defaultDelayDecider;\n this.retryQuota = (_c = options === null || options === void 0 ? void 0 : options.retryQuota) !== null && _c !== void 0 ? _c : defaultRetryQuota_1.getDefaultRetryQuota(constants_1.INITIAL_RETRY_TOKENS);\n }\n shouldRetry(error, attempts, maxAttempts) {\n return attempts < maxAttempts && this.retryDecider(error) && this.retryQuota.hasRetryTokens(error);\n }\n async getMaxAttempts() {\n let maxAttempts;\n try {\n maxAttempts = await this.maxAttemptsProvider();\n }\n catch (error) {\n maxAttempts = config_1.DEFAULT_MAX_ATTEMPTS;\n }\n return maxAttempts;\n }\n async retry(next, args, options) {\n let retryTokenAmount;\n let attempts = 0;\n let totalDelay = 0;\n const maxAttempts = await this.getMaxAttempts();\n const { request } = args;\n if (protocol_http_1.HttpRequest.isInstance(request)) {\n request.headers[constants_1.INVOCATION_ID_HEADER] = uuid_1.v4();\n }\n while (true) {\n try {\n if (protocol_http_1.HttpRequest.isInstance(request)) {\n request.headers[constants_1.REQUEST_HEADER] = `attempt=${attempts + 1}; max=${maxAttempts}`;\n }\n if (options === null || options === void 0 ? void 0 : options.beforeRequest) {\n await options.beforeRequest();\n }\n const { response, output } = await next(args);\n if (options === null || options === void 0 ? void 0 : options.afterRequest) {\n options.afterRequest(response);\n }\n this.retryQuota.releaseRetryTokens(retryTokenAmount);\n output.$metadata.attempts = attempts + 1;\n output.$metadata.totalRetryDelay = totalDelay;\n return { response, output };\n }\n catch (e) {\n const err = asSdkError(e);\n attempts++;\n if (this.shouldRetry(err, attempts, maxAttempts)) {\n retryTokenAmount = this.retryQuota.retrieveRetryTokens(err);\n const delay = this.delayDecider(service_error_classification_1.isThrottlingError(err) ? constants_1.THROTTLING_RETRY_DELAY_BASE : constants_1.DEFAULT_RETRY_DELAY_BASE, attempts);\n totalDelay += delay;\n await new Promise((resolve) => setTimeout(resolve, delay));\n continue;\n }\n if (!err.$metadata) {\n err.$metadata = {};\n }\n err.$metadata.attempts = attempts;\n err.$metadata.totalRetryDelay = totalDelay;\n throw err;\n }\n }\n }\n}\nexports.StandardRetryStrategy = StandardRetryStrategy;\nconst asSdkError = (error) => {\n if (error instanceof Error)\n return error;\n if (error instanceof Object)\n return Object.assign(new Error(), error);\n if (typeof error === \"string\")\n return new Error(error);\n return new Error(`AWS SDK error wrapper for ${error}`);\n};\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiU3RhbmRhcmRSZXRyeVN0cmF0ZWd5LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vc3JjL1N0YW5kYXJkUmV0cnlTdHJhdGVneS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbm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gICAgICAgaXNUaHJvdHRsaW5nRXJyb3IoZXJyKSA/IFRIUk9UVExJTkdfUkVUUllfREVMQVlfQkFTRSA6IERFRkFVTFRfUkVUUllfREVMQVlfQkFTRSxcbiAgICAgICAgICAgIGF0dGVtcHRzXG4gICAgICAgICAgKTtcbiAgICAgICAgICB0b3RhbERlbGF5ICs9IGRlbGF5O1xuXG4gICAgICAgICAgYXdhaXQgbmV3IFByb21pc2UoKHJlc29sdmUpID0+IHNldFRpbWVvdXQocmVzb2x2ZSwgZGVsYXkpKTtcbiAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgfVxuXG4gICAgICAgIGlmICghZXJyLiRtZXRhZGF0YSkge1xuICAgICAgICAgIGVyci4kbWV0YWRhdGEgPSB7fTtcbiAgICAgICAgfVxuXG4gICAgICAgIGVyci4kbWV0YWRhdGEuYXR0ZW1wdHMgPSBhdHRlbXB0cztcbiAgICAgICAgZXJyLiRtZXRhZGF0YS50b3RhbFJldHJ5RGVsYXkgPSB0b3RhbERlbGF5O1xuICAgICAgICB0aHJvdyBlcnI7XG4gICAgICB9XG4gICAgfVxuICB9XG59XG5cbmNvbnN0IGFzU2RrRXJyb3IgPSAoZXJyb3I6IHVua25vd24pOiBTZGtFcnJvciA9PiB7XG4gIGlmIChlcnJvciBpbnN0YW5jZW9mIEVycm9yKSByZXR1cm4gZXJyb3I7XG4gIGlmIChlcnJvciBpbnN0YW5jZW9mIE9iamVjdCkgcmV0dXJuIE9iamVjdC5hc3NpZ24obmV3IEVycm9yKCksIGVycm9yKTtcbiAgaWYgKHR5cGVvZiBlcnJvciA9PT0gXCJzdHJpbmdcIikgcmV0dXJuIG5ldyBFcnJvcihlcnJvcik7XG4gIHJldHVybiBuZXcgRXJyb3IoYEFXUyBTREsgZXJyb3Igd3JhcHBlciBmb3IgJHtlcnJvcn1gKTtcbn07XG4iXX0=","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.DEFAULT_RETRY_MODE = exports.DEFAULT_MAX_ATTEMPTS = exports.RETRY_MODES = void 0;\nvar RETRY_MODES;\n(function (RETRY_MODES) {\n RETRY_MODES[\"STANDARD\"] = \"standard\";\n RETRY_MODES[\"ADAPTIVE\"] = \"adaptive\";\n})(RETRY_MODES = exports.RETRY_MODES || (exports.RETRY_MODES = {}));\n/**\n * The default value for how many HTTP requests an SDK should make for a\n * single SDK operation invocation before giving up\n */\nexports.DEFAULT_MAX_ATTEMPTS = 3;\n/**\n * The default retry algorithm to use.\n */\nexports.DEFAULT_RETRY_MODE = RETRY_MODES.STANDARD;\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY29uZmlnLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vc3JjL2NvbmZpZy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7QUFBQSxJQUFZLFdBR1g7QUFIRCxXQUFZLFdBQVc7SUFDckIsb0NBQXFCLENBQUE7SUFDckIsb0NBQXFCLENBQUE7QUFDdkIsQ0FBQyxFQUhXLFdBQVcsR0FBWCxtQkFBVyxLQUFYLG1CQUFXLFFBR3RCO0FBRUQ7OztHQUdHO0FBQ1UsUUFBQSxvQkFBb0IsR0FBRyxDQUFDLENBQUM7QUFFdEM7O0dBRUc7QUFDVSxRQUFBLGtCQUFrQixHQUFHLFdBQVcsQ0FBQyxRQUFRLENBQUMiLCJzb3VyY2VzQ29udGVudCI6WyJleHBvcnQgZW51bSBSRVRSWV9NT0RFUyB7XG4gIFNUQU5EQVJEID0gXCJzdGFuZGFyZFwiLFxuICBBREFQVElWRSA9IFwiYWRhcHRpdmVcIixcbn1cblxuLyoqXG4gKiBUaGUgZGVmYXVsdCB2YWx1ZSBmb3IgaG93IG1hbnkgSFRUUCByZXF1ZXN0cyBhbiBTREsgc2hvdWxkIG1ha2UgZm9yIGFcbiAqIHNpbmdsZSBTREsgb3BlcmF0aW9uIGludm9jYXRpb24gYmVmb3JlIGdpdmluZyB1cFxuICovXG5leHBvcnQgY29uc3QgREVGQVVMVF9NQVhfQVRURU1QVFMgPSAzO1xuXG4vKipcbiAqIFRoZSBkZWZhdWx0IHJldHJ5IGFsZ29yaXRobSB0byB1c2UuXG4gKi9cbmV4cG9ydCBjb25zdCBERUZBVUxUX1JFVFJZX01PREUgPSBSRVRSWV9NT0RFUy5TVEFOREFSRDtcbiJdfQ==","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.NODE_RETRY_MODE_CONFIG_OPTIONS = exports.CONFIG_RETRY_MODE = exports.ENV_RETRY_MODE = exports.resolveRetryConfig = exports.NODE_MAX_ATTEMPT_CONFIG_OPTIONS = exports.CONFIG_MAX_ATTEMPTS = exports.ENV_MAX_ATTEMPTS = void 0;\nconst AdaptiveRetryStrategy_1 = require(\"./AdaptiveRetryStrategy\");\nconst config_1 = require(\"./config\");\nconst StandardRetryStrategy_1 = require(\"./StandardRetryStrategy\");\nexports.ENV_MAX_ATTEMPTS = \"AWS_MAX_ATTEMPTS\";\nexports.CONFIG_MAX_ATTEMPTS = \"max_attempts\";\nexports.NODE_MAX_ATTEMPT_CONFIG_OPTIONS = {\n environmentVariableSelector: (env) => {\n const value = env[exports.ENV_MAX_ATTEMPTS];\n if (!value)\n return undefined;\n const maxAttempt = parseInt(value);\n if (Number.isNaN(maxAttempt)) {\n throw new Error(`Environment variable ${exports.ENV_MAX_ATTEMPTS} mast be a number, got \"${value}\"`);\n }\n return maxAttempt;\n },\n configFileSelector: (profile) => {\n const value = profile[exports.CONFIG_MAX_ATTEMPTS];\n if (!value)\n return undefined;\n const maxAttempt = parseInt(value);\n if (Number.isNaN(maxAttempt)) {\n throw new Error(`Shared config file entry ${exports.CONFIG_MAX_ATTEMPTS} mast be a number, got \"${value}\"`);\n }\n return maxAttempt;\n },\n default: config_1.DEFAULT_MAX_ATTEMPTS,\n};\nconst resolveRetryConfig = (input) => {\n const maxAttempts = normalizeMaxAttempts(input.maxAttempts);\n return {\n ...input,\n maxAttempts,\n retryStrategy: async () => {\n if (input.retryStrategy) {\n return input.retryStrategy;\n }\n const retryMode = await getRetryMode(input.retryMode);\n if (retryMode === config_1.RETRY_MODES.ADAPTIVE) {\n return new AdaptiveRetryStrategy_1.AdaptiveRetryStrategy(maxAttempts);\n }\n return new StandardRetryStrategy_1.StandardRetryStrategy(maxAttempts);\n },\n };\n};\nexports.resolveRetryConfig = resolveRetryConfig;\nconst getRetryMode = async (retryMode) => {\n if (typeof retryMode === \"string\") {\n return retryMode;\n }\n return await retryMode();\n};\nconst normalizeMaxAttempts = (maxAttempts = config_1.DEFAULT_MAX_ATTEMPTS) => {\n if (typeof maxAttempts === \"number\") {\n const promisified = Promise.resolve(maxAttempts);\n return () => promisified;\n }\n return maxAttempts;\n};\nexports.ENV_RETRY_MODE = \"AWS_RETRY_MODE\";\nexports.CONFIG_RETRY_MODE = \"retry_mode\";\nexports.NODE_RETRY_MODE_CONFIG_OPTIONS = {\n environmentVariableSelector: (env) => env[exports.ENV_RETRY_MODE],\n configFileSelector: (profile) => profile[exports.CONFIG_RETRY_MODE],\n default: config_1.DEFAULT_RETRY_MODE,\n};\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY29uZmlndXJhdGlvbnMuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvY29uZmlndXJhdGlvbnMudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7O0FBR0EsbUVBQWdFO0FBQ2hFLHFDQUFpRjtBQUNqRixtRUFBZ0U7QUFFbkQsUUFBQSxnQkFBZ0IsR0FBRyxrQkFBa0IsQ0FBQztBQUN0QyxRQUFBLG1CQUFtQixHQUFHLGNBQWMsQ0FBQztBQUVyQyxRQUFBLCtCQUErQixHQUFrQztJQUM1RSwyQkFBMkIsRUFBRSxDQUFDLEdBQUcsRUFBRSxFQUFFO1FBQ25DLE1BQU0sS0FBSyxHQUFHLEdBQUcsQ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ZpZWQgPSBQcm9taXNlLnJlc29sdmUobWF4QXR0ZW1wdHMpO1xuICAgIHJldHVybiAoKSA9PiBwcm9taXNpZmllZDtcbiAgfVxuICByZXR1cm4gbWF4QXR0ZW1wdHM7XG59O1xuXG5leHBvcnQgY29uc3QgRU5WX1JFVFJZX01PREUgPSBcIkFXU19SRVRSWV9NT0RFXCI7XG5leHBvcnQgY29uc3QgQ09ORklHX1JFVFJZX01PREUgPSBcInJldHJ5X21vZGVcIjtcblxuZXhwb3J0IGNvbnN0IE5PREVfUkVUUllfTU9ERV9DT05GSUdfT1BUSU9OUzogTG9hZGVkQ29uZmlnU2VsZWN0b3JzPHN0cmluZz4gPSB7XG4gIGVudmlyb25tZW50VmFyaWFibGVTZWxlY3RvcjogKGVudikgPT4gZW52W0VOVl9SRVRSWV9NT0RFXSxcbiAgY29uZmlnRmlsZVNlbGVjdG9yOiAocHJvZmlsZSkgPT4gcHJvZmlsZVtDT05GSUdfUkVUUllfTU9ERV0sXG4gIGRlZmF1bHQ6IERFRkFVTFRfUkVUUllfTU9ERSxcbn07XG4iXX0=","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.REQUEST_HEADER = exports.INVOCATION_ID_HEADER = exports.NO_RETRY_INCREMENT = exports.TIMEOUT_RETRY_COST = exports.RETRY_COST = exports.INITIAL_RETRY_TOKENS = exports.THROTTLING_RETRY_DELAY_BASE = exports.MAXIMUM_RETRY_DELAY = exports.DEFAULT_RETRY_DELAY_BASE = void 0;\n/**\n * The base number of milliseconds to use in calculating a suitable cool-down\n * time when a retryable error is encountered.\n */\nexports.DEFAULT_RETRY_DELAY_BASE = 100;\n/**\n * The maximum amount of time (in milliseconds) that will be used as a delay\n * between retry attempts.\n */\nexports.MAXIMUM_RETRY_DELAY = 20 * 1000;\n/**\n * The retry delay base (in milliseconds) to use when a throttling error is\n * encountered.\n */\nexports.THROTTLING_RETRY_DELAY_BASE = 500;\n/**\n * Initial number of retry tokens in Retry Quota\n */\nexports.INITIAL_RETRY_TOKENS = 500;\n/**\n * The total amount of retry tokens to be decremented from retry token balance.\n */\nexports.RETRY_COST = 5;\n/**\n * The total amount of retry tokens to be decremented from retry token balance\n * when a throttling error is encountered.\n */\nexports.TIMEOUT_RETRY_COST = 10;\n/**\n * The total amount of retry token to be incremented from retry token balance\n * if an SDK operation invocation succeeds without requiring a retry request.\n */\nexports.NO_RETRY_INCREMENT = 1;\n/**\n * Header name for SDK invocation ID\n */\nexports.INVOCATION_ID_HEADER = \"amz-sdk-invocation-id\";\n/**\n * Header name for request retry information.\n */\nexports.REQUEST_HEADER = \"amz-sdk-request\";\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY29uc3RhbnRzLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vc3JjL2NvbnN0YW50cy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7QUFBQTs7O0dBR0c7QUFDVSxRQUFBLHdCQUF3QixHQUFHLEdBQUcsQ0FBQztBQUU1Qzs7O0dBR0c7QUFDVSxRQUFBLG1CQUFtQixHQUFHLEVBQUUsR0FBRyxJQUFJLENBQUM7QUFFN0M7OztHQUdHO0FBQ1UsUUFBQSwyQkFBMkIsR0FBRyxHQUFHLENBQUM7QUFFL0M7O0dBRUc7QUFDVSxRQUFBLG9CQUFvQixHQUFHLEdBQUcsQ0FBQztBQUV4Qzs7R0FFRztBQUNVLFFBQUEsVUFBVSxHQUFHLENBQUMsQ0FBQztBQUU1Qjs7O0dBR0c7QUFDVSxRQUFBLGtCQUFrQixHQUFHLEVBQUUsQ0FBQztBQUVyQzs7O0dBR0c7QUFDVSxRQUFBLGtCQUFrQixHQUFHLENBQUMsQ0FBQztBQUVwQzs7R0FFRztBQUNVLFFBQUEsb0JBQW9CLEdBQUcsdUJBQXVCLENBQUM7QUFFNUQ7O0dBRUc7QUFDVSxRQUFBLGNBQWMsR0FBRyxpQkFBaUIsQ0FB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QgZnJvbSByZXRyeSB0b2tlbiBiYWxhbmNlXG4gKiB3aGVuIGEgdGhyb3R0bGluZyBlcnJvciBpcyBlbmNvdW50ZXJlZC5cbiAqL1xuZXhwb3J0IGNvbnN0IFRJTUVPVVRfUkVUUllfQ09TVCA9IDEwO1xuXG4vKipcbiAqIFRoZSB0b3RhbCBhbW91bnQgb2YgcmV0cnkgdG9rZW4gdG8gYmUgaW5jcmVtZW50ZWQgZnJvbSByZXRyeSB0b2tlbiBiYWxhbmNlXG4gKiBpZiBhbiBTREsgb3BlcmF0aW9uIGludm9jYXRpb24gc3VjY2VlZHMgd2l0aG91dCByZXF1aXJpbmcgYSByZXRyeSByZXF1ZXN0LlxuICovXG5leHBvcnQgY29uc3QgTk9fUkVUUllfSU5DUkVNRU5UID0gMTtcblxuLyoqXG4gKiBIZWFkZXIgbmFtZSBmb3IgU0RLIGludm9jYXRpb24gSURcbiAqL1xuZXhwb3J0IGNvbnN0IElOVk9DQVRJT05fSURfSEVBREVSID0gXCJhbXotc2RrLWludm9jYXRpb24taWRcIjtcblxuLyoqXG4gKiBIZWFkZXIgbmFtZSBmb3IgcmVxdWVzdCByZXRyeSBpbmZvcm1hdGlvbi5cbiAqL1xuZXhwb3J0IGNvbnN0IFJFUVVFU1RfSEVBREVSID0gXCJhbXotc2RrLXJlcXVlc3RcIjtcbiJdfQ==","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.getDefaultRetryQuota = void 0;\nconst constants_1 = require(\"./constants\");\nconst getDefaultRetryQuota = (initialRetryTokens, options) => {\n var _a, _b, _c;\n const MAX_CAPACITY = initialRetryTokens;\n const noRetryIncrement = (_a = options === null || options === void 0 ? void 0 : options.noRetryIncrement) !== null && _a !== void 0 ? _a : constants_1.NO_RETRY_INCREMENT;\n const retryCost = (_b = options === null || options === void 0 ? void 0 : options.retryCost) !== null && _b !== void 0 ? _b : constants_1.RETRY_COST;\n const timeoutRetryCost = (_c = options === null || options === void 0 ? void 0 : options.timeoutRetryCost) !== null && _c !== void 0 ? _c : constants_1.TIMEOUT_RETRY_COST;\n let availableCapacity = initialRetryTokens;\n const getCapacityAmount = (error) => (error.name === \"TimeoutError\" ? timeoutRetryCost : retryCost);\n const hasRetryTokens = (error) => getCapacityAmount(error) <= availableCapacity;\n const retrieveRetryTokens = (error) => {\n if (!hasRetryTokens(error)) {\n // retryStrategy should stop retrying, and return last error\n throw new Error(\"No retry token available\");\n }\n const capacityAmount = getCapacityAmount(error);\n availableCapacity -= capacityAmount;\n return capacityAmount;\n };\n const releaseRetryTokens = (capacityReleaseAmount) => {\n availableCapacity += capacityReleaseAmount !== null && capacityReleaseAmount !== void 0 ? capacityReleaseAmount : noRetryIncrement;\n availableCapacity = Math.min(availableCapacity, MAX_CAPACITY);\n };\n return Object.freeze({\n hasRetryTokens,\n retrieveRetryTokens,\n releaseRetryTokens,\n });\n};\nexports.getDefaultRetryQuota = getDefaultRetryQuota;\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZGVmYXVsdFJldHJ5UXVvdGEuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvZGVmYXVsdFJldHJ5UXVvdGEudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7O0FBRUEsMkNBQWlGO0FBc0IxRSxNQUFNLG9CQUFvQixHQUFHLENBQUMsa0JBQTBCLEVBQUUsT0FBa0MsRUFBYyxFQUFFOztJQUNqSCxNQUFNLFlBQVksR0FBRyxrQkFBa0IsQ0FBQztJQUN4QyxNQUFNLGdCQUFnQixHQUFHLE1BQUEsT0FBTyxhQUFQLE9BQU8sdUJBQVAsT0FBTyxDQUFFLGdCQUFnQixtQ0FBSSw4QkFBa0IsQ0FBQztJQUN6RSxNQUFNLFNBQVMsR0FBRyxNQUFBLE9BQU8sYUFBUCxPQUFPLHVCQUFQLE9BQU8sQ0FBRSxTQUFTLG1DQUFJLHNCQUFVLENBQUM7SUFDbk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G91bGQgc3RvcCByZXRyeWluZywgYW5kIHJldHVybiBsYXN0IGVycm9yXG4gICAgICB0aHJvdyBuZXcgRXJyb3IoXCJObyByZXRyeSB0b2tlbiBhdmFpbGFibGVcIik7XG4gICAgfVxuICAgIGNvbnN0IGNhcGFjaXR5QW1vdW50ID0gZ2V0Q2FwYWNpdHlBbW91bnQoZXJyb3IpO1xuICAgIGF2YWlsYWJsZUNhcGFjaXR5IC09IGNhcGFjaXR5QW1vdW50O1xuICAgIHJldHVybiBjYXBhY2l0eUFtb3VudDtcbiAgfTtcblxuICBjb25zdCByZWxlYXNlUmV0cnlUb2tlbnMgPSAoY2FwYWNpdHlSZWxlYXNlQW1vdW50PzogbnVtYmVyKSA9PiB7XG4gICAgYXZhaWxhYmxlQ2FwYWNpdHkgKz0gY2FwYWNpdHlSZWxlYXNlQW1vdW50ID8/IG5vUmV0cnlJbmNyZW1lbnQ7XG4gICAgYXZhaWxhYmxlQ2FwYWNpdHkgPSBNYXRoLm1pbihhdmFpbGFibGVDYXBhY2l0eSwgTUFYX0NBUEFDSVRZKTtcbiAgfTtcblxuICByZXR1cm4gT2JqZWN0LmZyZWV6ZSh7XG4gICAgaGFzUmV0cnlUb2tlbnMsXG4gICAgcmV0cmlldmVSZXRyeVRva2VucyxcbiAgICByZWxlYXNlUmV0cnlUb2tlbnMsXG4gIH0pO1xufTtcbiJdfQ==","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.defaultDelayDecider = void 0;\nconst constants_1 = require(\"./constants\");\n/**\n * Calculate a capped, fully-jittered exponential backoff time.\n */\nconst defaultDelayDecider = (delayBase, attempts) => Math.floor(Math.min(constants_1.MAXIMUM_RETRY_DELAY, Math.random() * 2 ** attempts * delayBase));\nexports.defaultDelayDecider = defaultDelayDecider;\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZGVsYXlEZWNpZGVyLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vc3JjL2RlbGF5RGVjaWRlci50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7QUFBQSwyQ0FBa0Q7QUFFbEQ7O0dBRUc7QUFDSSxNQUFNLG1CQUFtQixHQUFHLENBQUMsU0FBaUIsRUFBRSxRQUFnQixFQUFFLEVBQUUsQ0FDekUsSUFBSSxDQUFDLEtBQUssQ0FBQyxJQUFJLENBQUMsR0FBRyxDQUFDLCtCQUFtQixFQUFFLElBQUksQ0FBQyxNQUFNLEVBQUUsR0FBRyxDQUFDLElBQUksUUFBUSxHQUFHLFNBQVMsQ0FBQyxDQUFDLENBQUM7QUFEMUUsUUFBQSxtQkFBbUIsdUJBQ3VEIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHsgTUFYSU1VTV9SRVRSWV9ERUxBWSB9IGZyb20gXCIuL2NvbnN0YW50c1wiO1xuXG4vKipcbiAqIENhbGN1bGF0ZSBhIGNhcHBlZCwgZnVsbHktaml0dGVyZWQgZXhwb25lbnRpYWwgYmFja29mZiB0aW1lLlxuICovXG5leHBvcnQgY29uc3QgZGVmYXVsdERlbGF5RGVjaWRlciA9IChkZWxheUJhc2U6IG51bWJlciwgYXR0ZW1wdHM6IG51bWJlcikgPT5cbiAgTWF0aC5mbG9vcihNYXRoLm1pbihNQVhJTVVNX1JFVFJZX0RFTEFZLCBNYXRoLnJhbmRvbSgpICogMiAqKiBhdHRlbXB0cyAqIGRlbGF5QmFzZSkpO1xuIl19","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst tslib_1 = require(\"tslib\");\ntslib_1.__exportStar(require(\"./retryMiddleware\"), exports);\ntslib_1.__exportStar(require(\"./omitRetryHeadersMiddleware\"), exports);\ntslib_1.__exportStar(require(\"./StandardRetryStrategy\"), exports);\ntslib_1.__exportStar(require(\"./AdaptiveRetryStrategy\"), exports);\ntslib_1.__exportStar(require(\"./config\"), exports);\ntslib_1.__exportStar(require(\"./configurations\"), exports);\ntslib_1.__exportStar(require(\"./delayDecider\"), exports);\ntslib_1.__exportStar(require(\"./DefaultRateLimiter\"), exports);\ntslib_1.__exportStar(require(\"./retryDecider\"), exports);\ntslib_1.__exportStar(require(\"./types\"), exports);\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvaW5kZXgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7O0FBQUEsNERBQWtDO0FBQ2xDLHVFQUE2QztBQUM3QyxrRUFBd0M7QUFDeEMsa0VBQXdDO0FBQ3hDLG1EQUF5QjtBQUN6QiwyREFBaUM7QUFDakMseURBQStCO0FBQy9CLCtEQUFxQztBQUNyQyx5REFBK0I7QUFDL0Isa0RBQXdCIiwic291cmNlc0NvbnRlbnQiOlsiZXhwb3J0ICogZnJvbSBcIi4vcmV0cnlNaWRkbGV3YXJlXCI7XG5leHBvcnQgKiBmcm9tIFwiLi9vbWl0UmV0cnlIZWFkZXJzTWlkZGxld2FyZVwiO1xuZXhwb3J0ICogZnJvbSBcIi4vU3RhbmRhcmRSZXRyeVN0cmF0ZWd5XCI7XG5leHBvcnQgKiBmcm9tIFwiLi9BZGFwdGl2ZVJldHJ5U3RyYXRlZ3lcIjtcbmV4cG9ydCAqIGZyb20gXCIuL2NvbmZpZ1wiO1xuZXhwb3J0ICogZnJvbSBcIi4vY29uZmlndXJhdGlvbnNcIjtcbmV4cG9ydCAqIGZyb20gXCIuL2RlbGF5RGVjaWRlclwiO1xuZXhwb3J0ICogZnJvbSBcIi4vRGVmYXVsdFJhdGVMaW1pdGVyXCI7XG5leHBvcnQgKiBmcm9tIFwiLi9yZXRyeURlY2lkZXJcIjtcbmV4cG9ydCAqIGZyb20gXCIuL3R5cGVzXCI7XG4iXX0=","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.getOmitRetryHeadersPlugin = exports.omitRetryHeadersMiddlewareOptions = exports.omitRetryHeadersMiddleware = void 0;\nconst protocol_http_1 = require(\"@aws-sdk/protocol-http\");\nconst constants_1 = require(\"./constants\");\nconst omitRetryHeadersMiddleware = () => (next) => async (args) => {\n const { request } = args;\n if (protocol_http_1.HttpRequest.isInstance(request)) {\n delete request.headers[constants_1.INVOCATION_ID_HEADER];\n delete request.headers[constants_1.REQUEST_HEADER];\n }\n return next(args);\n};\nexports.omitRetryHeadersMiddleware = omitRetryHeadersMiddleware;\nexports.omitRetryHeadersMiddlewareOptions = {\n name: \"omitRetryHeadersMiddleware\",\n tags: [\"RETRY\", \"HEADERS\", \"OMIT_RETRY_HEADERS\"],\n relation: \"before\",\n toMiddleware: \"awsAuthMiddleware\",\n override: true,\n};\nconst getOmitRetryHeadersPlugin = (options) => ({\n applyToStack: (clientStack) => {\n clientStack.addRelativeTo(exports.omitRetryHeadersMiddleware(), exports.omitRetryHeadersMiddlewareOptions);\n },\n});\nexports.getOmitRetryHeadersPlugin = getOmitRetryHeadersPlugin;\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoib21pdFJldHJ5SGVhZGVyc01pZGRsZXdhcmUuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvb21pdFJldHJ5SGVhZGVyc01pZGRsZXdhcmUudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7O0FBQUEsMERBQXFEO0FBVXJELDJDQUFtRTtBQUU1RCxNQUFNLDBCQUEwQixHQUNyQyxHQUFHLEVBQUUsQ0FDTCxDQUFpRCxJQUFrQyxFQUFnQyxFQUFFLENBQ3JILEtBQUssRUFBRSxJQUFtQyxFQUEwQyxFQUFFO0lBQ3BGLE1BQU0sRUFBRSxPQUFPLEVBQUUsR0FBRyxJQUFJLENBQUM7SUFDekIsSUFBSSwyQkFBVyxDQUFDLFVBQVUsQ0FBQyxPQUFPLENBQUMsRUFBRTtRQUNuQyxPQ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dhcmVcIixcbiAgb3ZlcnJpZGU6IHRydWUsXG59O1xuXG5leHBvcnQgY29uc3QgZ2V0T21pdFJldHJ5SGVhZGVyc1BsdWdpbiA9IChvcHRpb25zOiB1bmtub3duKTogUGx1Z2dhYmxlPGFueSwgYW55PiA9PiAoe1xuICBhcHBseVRvU3RhY2s6IChjbGllbnRTdGFjaykgPT4ge1xuICAgIGNsaWVudFN0YWNrLmFkZFJlbGF0aXZlVG8ob21pdFJldHJ5SGVhZGVyc01pZGRsZXdhcmUoKSwgb21pdFJldHJ5SGVhZGVyc01pZGRsZXdhcmVPcHRpb25zKTtcbiAgfSxcbn0pO1xuIl19","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.defaultRetryDecider = void 0;\nconst service_error_classification_1 = require(\"@aws-sdk/service-error-classification\");\nconst defaultRetryDecider = (error) => {\n if (!error) {\n return false;\n }\n return service_error_classification_1.isRetryableByTrait(error) || service_error_classification_1.isClockSkewError(error) || service_error_classification_1.isThrottlingError(error) || service_error_classification_1.isTransientError(error);\n};\nexports.defaultRetryDecider = defaultRetryDecider;\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicmV0cnlEZWNpZGVyLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vc3JjL3JldHJ5RGVjaWRlci50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7QUFBQSx3RkFLK0M7QUFHeEMsTUFBTSxtQkFBbUIsR0FBRyxDQUFDLEtBQWUsRUFBRSxFQUFFO0lBQ3JELElBQUksQ0FBQyxLQUFLLEVBQUU7UUFDVixPQUFPLEtBQUssQ0FBQztLQUNkO0lBRUQsT0FBTyxpREFBa0IsQ0FBQyxLQUFLLENBQUMsSUFBSSwrQ0FBZ0IsQ0FBQyxLQUFLLENBQUMsSUFBSSxnREFBaUIsQ0FBQyxLQUFLLENBQUMsSUFBSSwrQ0FBZ0IsQ0FBQyxLQUFLLENBQUMsQ0FBQztBQUNySCxDQUFDLENBQUM7QUFOVyxRQUFBLG1CQUFtQix1QkFNOUIiLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQge1xuICBpc0Nsb2NrU2tld0Vycm9yLFxuICBpc1JldHJ5YWJsZUJ5VHJhaXQsXG4gIGlzVGhyb3R0bGluZ0Vycm9yLFxuICBpc1RyYW5zaWVudEVycm9yLFxufSBmcm9tIFwiQGF3cy1zZGsvc2VydmljZS1lcnJvci1jbGFzc2lmaWNhdGlvblwiO1xuaW1wb3J0IHsgU2RrRXJyb3IgfSBmcm9tIFwiQGF3cy1zZGsvdHlwZXNcIjtcblxuZXhwb3J0IGNvbnN0IGRlZmF1bHRSZXRyeURlY2lkZXIgPSAoZXJyb3I6IFNka0Vycm9yKSA9PiB7XG4gIGlmICghZXJyb3IpIHtcbiAgICByZXR1cm4gZmFsc2U7XG4gIH1cblxuICByZXR1cm4gaXNSZXRyeWFibGVCeVRyYWl0KGVycm9yKSB8fCBpc0Nsb2NrU2tld0Vycm9yKGVycm9yKSB8fCBpc1Rocm90dGxpbmdFcnJvcihlcnJvcikgfHwgaXNUcmFuc2llbnRFcnJvcihlcnJvcik7XG59O1xuIl19","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.getRetryPlugin = exports.retryMiddlewareOptions = exports.retryMiddleware = void 0;\nconst retryMiddleware = (options) => (next, context) => async (args) => {\n const retryStrategy = await options.retryStrategy();\n if (retryStrategy === null || retryStrategy === void 0 ? void 0 : retryStrategy.mode)\n context.userAgent = [...(context.userAgent || []), [\"cfg/retry-mode\", retryStrategy.mode]];\n return retryStrategy.retry(next, args);\n};\nexports.retryMiddleware = retryMiddleware;\nexports.retryMiddlewareOptions = {\n name: \"retryMiddleware\",\n tags: [\"RETRY\"],\n step: \"finalizeRequest\",\n priority: \"high\",\n override: true,\n};\nconst getRetryPlugin = (options) => ({\n applyToStack: (clientStack) => {\n clientStack.add(exports.retryMiddleware(options), exports.ret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wdXQ+PiA9PiB7XG4gICAgY29uc3QgcmV0cnlTdHJhdGVneSA9IGF3YWl0IG9wdGlvbnMucmV0cnlTdHJhdGVneSgpO1xuICAgIGlmIChyZXRyeVN0cmF0ZWd5Py5tb2RlKSBjb250ZXh0LnVzZXJBZ2VudCA9IFsuLi4oY29udGV4dC51c2VyQWdlbnQgfHwgW10pLCBbXCJjZmcvcmV0cnktbW9kZVwiLCByZXRyeVN0cmF0ZWd5Lm1vZGVdXTtcbiAgICByZXR1cm4gcmV0cnlTdHJhdGVneS5yZXRyeShuZXh0LCBhcmdzKTtcbiAgfTtcblxuZXhwb3J0IGNvbnN0IHJldHJ5TWlkZGxld2FyZU9wdGlvbnM6IEZpbmFsaXplUmVxdWVzdEhhbmRsZXJPcHRpb25zICYgQWJzb2x1dGVMb2NhdGlvbiA9IHtcbiAgbmFtZTogXCJyZXRyeU1pZGRsZXdhcmVcIixcbiAgdGFnczogW1wiUkVUUllcIl0sXG4gIHN0ZXA6IFwiZmluYWxpemVSZXF1ZXN0XCIsXG4gIHByaW9yaXR5OiBcImhpZ2hcIixcbiAgb3ZlcnJpZGU6IHRydWUsXG59O1xuXG5leHBvcnQgY29uc3QgZ2V0UmV0cnlQbHVnaW4gPSAob3B0aW9uczogUmV0cnlSZXNvbHZlZENvbmZpZyk6IFBsdWdnYWJsZTxhbnksIGFueT4gPT4gKHtcbiAgYXBwbHlUb1N0YWNrOiAoY2xpZW50U3RhY2spID0+IHtcbiAgICBjbGllbnRTdGFjay5hZGQocmV0cnlNaWRkbGV3YXJlKG9wdGlvbnMpLCByZXRyeU1pZGRsZXdhcmVPcHRpb25zKTtcbiAgfSxcbn0pO1xuIl19","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidHlwZXMuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvdHlwZXMudHMiXSwibmFtZX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4gUHJvbWlzZTx2b2lkPjtcblxuICAvKipcbiAgICogVXBkYXRlcyB0aGUgY2xpZW50IHNlbmRpbmcgcmF0ZSBiYXNlZCBvbiByZXNwb25zZS5cbiAgICogSWYgdGhlIHJlc3BvbnNlIHdhcyBzdWNjZXNzZnVsLCB0aGUgY2FwYWNpdHkgYW5kIGZpbGwgcmF0ZSBhcmUgaW5jcmVhc2VkLlxuICAgKiBJZiB0aGUgcmVzcG9uc2Ugd2FzIGEgdGhyb3R0bGluZyByZXNwb25zZSwgdGhlIGNhcGFjaXR5IGFuZCBmaWxsIHJhdGUgYXJlXG4gICAqIGRlY3JlYXNlZC4gVHJhbnNpZW50IGVycm9ycyBkbyBub3QgYWZmZWN0IHRoZSByYXRlIGxpbWl0ZXIuXG4gICAqL1xuICB1cGRhdGVDbGllbnRTZW5kaW5nUmF0ZTogKHJlc3BvbnNlOiBhbnkpID0+IHZvaWQ7XG59XG4iXX0=","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.resolveStsAuthConfig = void 0;\nconst middleware_signing_1 = require(\"@aws-sdk/middleware-signing\");\n/**\n * Set STS client constructor to `stsClientCtor` config parameter. It is used\n * for role assumers for STS client internally. See `clients/client-sts/defaultStsRoleAssumers.ts`\n * and `clients/client-sts/STSClient.ts`.\n */\nconst resolveStsAuthConfig = (input, { stsClientCtor }) => middleware_signing_1.resolveAwsAuthConfig({\n ...input,\n stsClientCtor,\n});\nexports.resolveStsAuthConfig = resolveStsAuthConfig;\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvaW5kZXgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7O0FBQUEsb0VBQThHO0FBMkI5Rzs7OztHQUlHO0FBQ0ksTUFBTSxvQkFBb0IsR0FBRyxDQUNsQyxLQUFrRCxFQUNsRCxFQUFFLG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cnVjdG9yLlxuICAgKiBAaW50ZXJuYWxcbiAgICovXG4gIHN0c0NsaWVudEN0b3I6IG5ldyAoY2xpZW50Q29uZmlnOiBhbnkpID0+IENsaWVudDxhbnksIGFueSwgYW55Pjtcbn1cblxuZXhwb3J0IGludGVyZmFjZSBTdHNBdXRoQ29uZmlnT3B0aW9ucyB7XG4gIC8qKlxuICAgKiBSZWZlcmVuY2UgdG8gU1RTQ2xpZW50IGNsYXNzIGNvbnN0cnVjdG9yLlxuICAgKi9cbiAgc3RzQ2xpZW50Q3RvcjogbmV3IChjbGllbnRDb25maWc6IGFueSkgPT4gQ2xpZW50PGFueSwgYW55LCBhbnk+O1xufVxuXG4vKipcbiAqIFNldCBTVFMgY2xpZW50IGNvbnN0cnVjdG9yIHRvIGBzdHNDbGllbnRDdG9yYCBjb25maWcgcGFyYW1ldGVyLiBJdCBpcyB1c2VkXG4gKiBmb3Igcm9sZSBhc3N1bWVycyBmb3IgU1RTIGNsaWVudCBpbnRlcm5hbGx5LiBTZWUgYGNsaWVudHMvY2xpZW50LXN0cy9kZWZhdWx0U3RzUm9sZUFzc3VtZXJzLnRzYFxuICogYW5kIGBjbGllbnRzL2NsaWVudC1zdHMvU1RTQ2xpZW50LnRzYC5cbiAqL1xuZXhwb3J0IGNvbnN0IHJlc29sdmVTdHNBdXRoQ29uZmlnID0gPFQ+KFxuICBpbnB1dDogVCAmIFByZXZpb3VzbHlSZXNvbHZlZCAmIFN0c0F1dGhJbnB1dENvbmZpZyxcbiAgeyBzdHNDbGllbnRDdG9yIH06IFN0c0F1dGhDb25maWdPcHRpb25zXG4pOiBUICYgU3RzQXV0aFJlc29sdmVkQ29uZmlnID0+XG4gIHJlc29sdmVBd3NBdXRoQ29uZmlnKHtcbiAgICAuLi5pbnB1dCxcbiAgICBzdHNDbGllbnRDdG9yLFxuICB9KTtcbiJdfQ==","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.deserializerMiddleware = void 0;\nconst deserializerMiddleware = (options, deserializer) => (next, context) => async (args) => {\n const { response } = await next(args);\n const parsed = await deserializer(response, options);\n return {\n response,\n output: parsed,\n };\n};\nexports.deserializerMiddleware = deserializerMiddleware;\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZGVzZXJpYWxpemVyTWlkZGxld2FyZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9kZXNlcmlhbGl6ZXJNaWRkbGV3YXJlLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7OztBQVNPLE1BQU0sc0JBQXNCLEdBQ2pDLENBQ0UsT0FBcUIsRUFDckIsWUFBMEQsRUFDcEIsRUFBRSxDQUMxQyxDQUFDLElBQXVDLEVBQUUsT0FBZ0MsRUFBcUMsRUFBRSxDQUNqSCxLQUFLLEVBQUUsSUFBd0MsRUFBNkMsRUFBRTtJQUM1RixNQUFNLEVBQUUsUUFBUSxFQUFFLEdBQUcsTUFBTSxJQUFJLENBQUMsSUFBSSxDQUFDLENBQUM7SUFDdEMsTUFBTSxNQUFNLEdBQUcsTUFBTSxZQUFZLENBQUMsUUFBUSxFQUFFLE9BQU8sQ0FBQyxDQUFDO0lBQ3JELE9BQU87UUFDTCxRQUFRO1FBQ1IsTUFBTSxFQUFFLE1BQWdCO0tBQ3pCLENBQUM7QUFDSixDQUFDLENBQUM7QUFiUyxRQUFBLHNCQUFzQiwwQkFhL0IiLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQge1xuICBEZXNlcmlhbGl6ZUhhbmRsZXIsXG4gIERlc2VyaWFsaXplSGFuZGxlckFyZ3VtZW50cyxcbiAgRGVzZXJpYWxpemVIYW5kbGVyT3V0cHV0LFxuICBEZXNlcmlhbGl6ZU1pZGRsZXdhcmUsXG4gIEhhbmRsZXJFeGVjdXRpb25Db250ZXh0LFxuICBSZXNwb25zZURlc2VyaWFsaXplcixcbn0gZnJvbSBcIkBhd3Mtc2RrL3R5cGVzXCI7XG5cbmV4cG9ydCBjb25zdCBkZXNlcmlhbGl6ZXJNaWRkbGV3YXJlID1cbiAgPElucHV0IGV4dGVuZHMgb2JqZWN0LCBPdXRwdXQgZXh0ZW5kcyBvYmplY3QsIFJ1bnRpbWVVdGlscyA9IGFueT4oXG4gICAgb3B0aW9uczogUnVudGltZVV0aWxzLFxuICAgIGRlc2VyaWFsaXplcjogUmVzcG9uc2VEZXNlcmlhbGl6ZXI8YW55LCBhbnksIFJ1bnRpbWVVdGlscz5cbiAgKTogRGVzZXJpYWxpemVNaWRkbGV3YXJlPElucHV0LCBPdXRwdXQ+ID0+XG4gIChuZXh0OiBEZXNlcmlhbGl6ZUhhbmRsZXI8SW5wdXQsIE91dHB1dD4sIGNvbnRleHQ6IEhhbmRsZXJFeGVjdXRpb25Db250ZXh0KTogRGVzZXJpYWxpemVIYW5kbGVyPElucHV0LCBPdXRwdXQ+ID0+XG4gIGFzeW5jIChhcmdzOiBEZXNlcmlhbGl6ZUhhbmRsZXJBcmd1bWVudHM8SW5wdXQ+KTogUHJvbWlzZTxEZXNlcmlhbGl6ZUhhbmRsZXJPdXRwdXQ8T3V0cHV0Pj4gPT4ge1xuICAgIGNvbnN0IHsgcmVzcG9uc2UgfSA9IGF3YWl0IG5leHQoYXJncyk7XG4gICAgY29uc3QgcGFyc2VkID0gYXdhaXQgZGVzZXJpYWxpemVyKHJlc3BvbnNlLCBvcHRpb25zKTtcbiAgICByZXR1cm4ge1xuICAgICAgcmVzcG9uc2UsXG4gICAgICBvdXRwdXQ6IHBhcnNlZCBhcyBPdXRwdXQsXG4gICAgfTtcbiAgfTtcbiJdfQ==","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst tslib_1 = require(\"tslib\");\ntslib_1.__exportStar(require(\"./deserializerMiddleware\"), exports);\ntslib_1.__exportStar(require(\"./serializerMiddleware\"), exports);\ntslib_1.__exportStar(require(\"./serdePlugin\"), exports);\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvaW5kZXgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7O0FBQUEsbUVBQXlDO0FBQ3pDLGlFQUF1QztBQUN2Qyx3REFBOEIiLCJzb3VyY2VzQ29udGVudCI6WyJleHBvcnQgKiBmcm9tIFwiLi9kZXNlcmlhbGl6ZXJNaWRkbGV3YXJlXCI7XG5leHBvcnQgKiBmcm9tIFwiLi9zZXJpYWxpemVyTWlkZGxld2FyZVwiO1xuZXhwb3J0ICogZnJvbSBcIi4vc2VyZGVQbHVnaW5cIjtcbiJdfQ==","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.getSerdePlugin = exports.serializerMiddlewareOption = exports.deserializerMiddlewareOption = void 0;\nconst deserializerMiddleware_1 = require(\"./deserializerMiddleware\");\nconst serializerMiddleware_1 = require(\"./serializerMiddleware\");\nexports.deserializerMiddlewareOption = {\n name: \"deserializerMiddleware\",\n step: \"deserialize\",\n tags: [\"DESERIALIZER\"],\n override: true,\n};\nexports.serializerMiddlewareOption = {\n name: \"serializerMiddleware\",\n step: \"serialize\",\n tags: [\"SERIALIZER\"],\n override: true,\n};\nfunction getSerdePlugin(config, serializer, deserializer) {\n return {\n applyToStack: (commandStack) => {\n commandStack.add(deserializerMiddleware_1.deserializerMiddleware(config, deserializer), exports.deserializerMiddlewareOption);\n commandStack.add(serializerMiddleware_1.serializerMiddleware(config, serializer), exports.serializerMiddlewareOption);\n },\n };\n}\nexports.getSerdePlugin = getSerdePlugin;\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic2VyZGVQbHVnaW4uanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvc2VyZGVQbHVnaW4udHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7O0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pYWxpemVyPE91dHB1dFR5cGUsIGFueSwgU2VyRGVDb250ZXh0PlxuKTogUGx1Z2dhYmxlPElucHV0VHlwZSwgT3V0cHV0VHlwZT4ge1xuICByZXR1cm4ge1xuICAgIGFwcGx5VG9TdGFjazogKGNvbW1hbmRTdGFjazogTWlkZGxld2FyZVN0YWNrPElucHV0VHlwZSwgT3V0cHV0VHlwZT4pID0+IHtcbiAgICAgIGNvbW1hbmRTdGFjay5hZGQoZGVzZXJpYWxpemVyTWlkZGxld2FyZShjb25maWcsIGRlc2VyaWFsaXplciksIGRlc2VyaWFsaXplck1pZGRsZXdhcmVPcHRpb24pO1xuICAgICAgY29tbWFuZFN0YWNrLmFkZChzZXJpYWxpemVyTWlkZGxld2FyZShjb25maWcsIHNlcmlhbGl6ZXIpLCBzZXJpYWxpemVyTWlkZGxld2FyZU9wdGlvbik7XG4gICAgfSxcbiAgfTtcbn1cbiJdfQ==","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.serializerMiddleware = void 0;\nconst serializerMiddleware = (options, serializer) => (next, context) => async (args) => {\n const request = await serializer(args.input, options);\n return next({\n ...args,\n request,\n });\n};\nexports.serializerMiddleware = serializerMiddleware;\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic2VyaWFsaXplck1pZGRsZXdhcmUuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvc2VyaWFsaXplck1pZGRsZXdhcmUudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7O0FBVU8sTUFBTSxvQkFBb0IsR0FDL0IsQ0FDRSxPQUFxQixFQUNyQixVQUFnRCxFQUNaLEVBQUUsQ0FDeEMsQ0FBQyxJQUFxQyxFQUFFLE9BQWdDLEVBQW1DLEVBQUUsQ0FDN0csS0FBSyxFQUFFLElBQXNDLEVBQTJDLEVBQUU7SUFDeEYsTUFBTSxPQUFPLEdBQUcsTUFBTSxVQUFVL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JPdXRwdXQ8T3V0cHV0Pj4gPT4ge1xuICAgIGNvbnN0IHJlcXVlc3QgPSBhd2FpdCBzZXJpYWxpemVyKGFyZ3MuaW5wdXQsIG9wdGlvbnMpO1xuICAgIHJldHVybiBuZXh0KHtcbiAgICAgIC4uLmFyZ3MsXG4gICAgICByZXF1ZXN0LFxuICAgIH0pO1xuICB9O1xuIl19","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.resolveSigV4AuthConfig = exports.resolveAwsAuthConfig = void 0;\nconst property_provider_1 = require(\"@aws-sdk/property-provider\");\nconst signature_v4_1 = require(\"@aws-sdk/signature-v4\");\n// 5 minutes buffer time the refresh the credential before it really expires\nconst CREDENTIAL_EXPIRE_WINDOW = 300000;\nconst resolveAwsAuthConfig = (input) => {\n const normalizedCreds = input.credentials\n ? normalizeCredentialProvider(input.credentials)\n : input.credentialDefaultProvider(input);\n const { signingEscapePath = true, systemClockOffset = input.systemClockOffset || 0, sha256 } = input;\n let signer;\n if (input.signer) {\n //if signer is supplied by user, normalize it to a function returning a promise for signer.\n signer = normalizeProvider(input.signer);\n }\n else {\n //construct a provider inferring signing from region.\n signer = () => normalizeProvider(input.region)()\n .then(async (region) => [(await input.regionInfoProvider(region)) || {}, region])\n .then(([regionInfo, region]) => {\n const { signingRegion, signingService } = regionInfo;\n //update client's singing region and signing service config if they are resolved.\n //signing region resolving order: user supplied signingRegion -> endpoints.json inferred region -> client region\n input.signingRegion = input.signingRegion || signingRegion || region;\n //signing name resolving order:\n //user supplied signingName -> endpoints.json inferred (credential scope -> model arnNamespace) -> model service id\n input.signingName = input.signingName || signingService || input.serviceId;\n return new signature_v4_1.SignatureV4({\n credentials: normalizedCreds,\n region: input.signingRegion,\n service: input.signingName,\n sha256,\n uriEscapePath: signingEscapePath,\n });\n });\n }\n return {\n ...input,\n systemClockOffset,\n signingEscapePath,\n credentials: normalizedCreds,\n signer,\n };\n};\nexports.resolveAwsAuthConfig = resolveAwsAuthConfig;\n// TODO: reduce code duplication\nconst resolveSigV4AuthConfig = (input) => {\n const normalizedCreds = input.credentials\n ? normalizeCredentialProvider(input.credentials)\n : input.credentialDefaultProvider(input);\n const { signingEscapePath = true, systemClockOffset = input.systemClockOffset || 0, sha256 } = input;\n let signer;\n if (input.signer) {\n //if signer is supplied by user, normalize it to a function returning a promise for signer.\n signer = normalizeProvider(input.signer);\n }\n else {\n signer = normalizeProvider(new signature_v4_1.SignatureV4({\n credentials: normalizedCreds,\n region: input.region,\n service: input.signingName,\n sha256,\n uriEscapePath: signingEscapePath,\n }));\n }\n return {\n ...input,\n systemClockOffset,\n signingEscapePath,\n credentials: normalizedCreds,\n signer,\n };\n};\nexports.resolveSigV4AuthConfig = resolveSigV4AuthConfig;\nconst normalizeProvider = (input) => {\n if (typeof input === \"object\") {\n const promisified = Promise.resolve(input);\n return () => promisified;\n }\n return input;\n};\nconst normalizeCredentialProvider = (credentials) => {\n if (typeof credentials === \"function\") {\n return property_provider_1.memoize(credentials, (credentials) => credentials.expiration !== undefined &&\n credentials.expiration.getTime() - Date.now() < CREDENTIAL_EXPIRE_WINDOW, (credentials) => credentials.expiration !== undefined);\n }\n return normalizeProvider(credentials);\n};\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY29uZmlndXJhdGlvbnMuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvY29uZmlndXJhdGlvbnMudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7O0FBQUEsa0VBQXFEO0FBQ3JELHdEQUFvRDtBQUdwRCw0RUFBNEU7QUFDNUUsTUFBTSx3QkFBd0IsR0FBRyxNQUFNLENBQUM7QUE2RmpDLE1BQU0sb0JBQW9CLEdBQUcsQ0FDbEMsS0FBa0QsRUFDdkIsRUFBRTtJQUM3QixNQUFNLGVBQWUsR0FBRyxLQUFLLENBQUMsV0FBVztRQUN2QyxDQUFDLENBQUMsMkJBQTJCLENBQUMs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gICAgKTtcbiAgfVxuICByZXR1cm4gbm9ybWFsaXplUHJvdmlkZXIoY3JlZGVudGlhbHMpO1xufTtcbiJdfQ==","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst tslib_1 = require(\"tslib\");\ntslib_1.__exportStar(require(\"./configurations\"), exports);\ntslib_1.__exportStar(require(\"./middleware\"), exports);\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvaW5kZXgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7O0FBQUEsMkRBQWlDO0FBQ2pDLHVEQUE2QiIsInNvdXJjZXNDb250ZW50IjpbImV4cG9ydCAqIGZyb20gXCIuL2NvbmZpZ3VyYXRpb25zXCI7XG5leHBvcnQgKiBmcm9tIFwiLi9taWRkbGV3YXJlXCI7XG4iXX0=","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.getSigV4AuthPlugin = exports.getAwsAuthPlugin = exports.awsAuthMiddlewareOptions = exports.awsAuthMiddleware = void 0;\nconst protocol_http_1 = require(\"@aws-sdk/protocol-http\");\nconst getSkewCorrectedDate_1 = require(\"./utils/getSkewCorrectedDate\");\nconst getUpdatedSystemClockOffset_1 = require(\"./utils/getUpdatedSystemClockOffset\");\nconst awsAuthMiddleware = (options) => (next, context) => async function (args) {\n if (!protocol_http_1.HttpRequest.isInstance(args.request))\n return next(args);\n const signer = await options.signer();\n const output = await next({\n ...args,\n request: await signer.sign(args.request, {\n signingDate: getSkewCorrectedDate_1.getSkewCorrectedDate(options.systemClockOffset),\n signingRegion: context[\"signing_region\"],\n signingService: context[\"signing_service\"],\n }),\n }).catch((error) => {\n if (error.ServerTime) {\n options.systemClockOffset = getUpdatedSystemClockOffset_1.getUpdatedSystemClockOffset(error.ServerTime, options.systemClockOffset);\n }\n throw error;\n });\n const { headers } = output.response;\n const dateHeader = headers && (headers.date || headers.Date);\n if (dateHeader) {\n options.systemClockOffset = getUpdatedSystemClockOffset_1.getUpdatedSystemClockOffset(dateHeader, options.systemClockOffset);\n }\n return output;\n};\nexports.awsAuthMiddleware = awsAuthMiddleware;\nexports.awsAuthMiddlewareOptions = {\n name: \"awsAuthMiddleware\",\n tags: [\"SIGNATURE\", \"AWSAUTH\"],\n relation: \"after\",\n toMiddleware: \"retryMiddleware\",\n override: true,\n};\nconst getAwsAuthPlugin = (options) => ({\n applyToStack: (clientStack) => {\n clientStack.addRelativeTo(exports.awsAuthMiddleware(options), exports.awsAuthMiddlewareOptions);\n },\n});\nexports.getAwsAuthPlugin = getAwsAuthPlugin;\nexports.getSigV4AuthPlugin = exports.getAwsAuthPlugin;\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibWlkZGxld2FyZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9taWRkbGV3YXJlLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7OztBQUFBLDBEQUFxRDtBQVlyRCx1RUFBb0U7QUFDcEUscUZBQWtGO0FBRTNFLE1BQU0saUJBQWlCLEdBQzVCLENBQ0UsT0FBOEIsRUFDWSxFQUFFLENBQzlDLENBQUMsSUFBb0MsRUFBRSxPQUFnQyxFQUFrQyxFQUFFLENBQ3pHLEtBQUssV0FBVyxJQUFxQztJQUNuRCxJQUFJLENBQUMsMkJBQVcsQ0FBQyxVQUFVLENBQUMsSUFBSSxDQUFDLE9BQU8sQ0FBQztRQUFFLE9BQU8sSUFBSSxDQUFDLElBQUksQ0FBQyxDQUFDO0lBQzdELE1BQU0sTUFBTSxHQUFHLE1BQU0sT0FBTyxDQUFDLE1BQU0sRUFBRSxDQUFDO0lBQ3RDLE1BQU0sTUFBTSxHQUFHLE1BQU0sSUFBSSxDQUFDO1FBQ3hCLEdBQUcsSUFBSTtRQUNQLE9BQU8sR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c29sdmVkQ29uZmlnKTogUGx1Z2dhYmxlPGFueSwgYW55PiA9PiAoe1xuICBhcHBseVRvU3RhY2s6IChjbGllbnRTdGFjaykgPT4ge1xuICAgIGNsaWVudFN0YWNrLmFkZFJlbGF0aXZlVG8oYXdzQXV0aE1pZGRsZXdhcmUob3B0aW9ucyksIGF3c0F1dGhNaWRkbGV3YXJlT3B0aW9ucyk7XG4gIH0sXG59KTtcblxuZXhwb3J0IGNvbnN0IGdldFNpZ1Y0QXV0aFBsdWdpbiA9IGdldEF3c0F1dGhQbHVnaW47XG4iXX0=","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.getSkewCorrectedDate = void 0;\n/**\n * Returns a date that is corrected for clock skew.\n *\n * @param systemClockOffset The offset of the system clock in milliseconds.\n */\nconst getSkewCorrectedDate = (systemClockOffset) => new Date(Date.now() + systemClockOffset);\nexports.getSkewCorrectedDate = getSkewCorrectedDate;\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZ2V0U2tld0NvcnJlY3RlZERhdGUuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi9zcmMvdXRpbHMvZ2V0U2tld0NvcnJlY3RlZERhdGUudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7O0FBQUE7Ozs7R0FJRztBQUNJLE1BQU0sb0JBQW9CLEdBQUcsQ0FBQyxpQkFBeUIsRUFBRSxFQUFFLENBQUMsSUFBSSxJQUFJLENBQUMsSUFBSSxDQUFDLEdBQUcsRUFBRSxHQUFHLGlCQUFpQixDQUFDLENBQUM7QUFBL0YsUUFBQSxvQkFBb0Isd0JBQTJFIiwic291cmNlc0NvbnRlbnQiOlsiLyoqXG4gKiBSZXR1cm5zIGEgZGF0ZSB0aGF0IGlzIGNvcnJlY3RlZCBmb3IgY2xvY2sgc2tldy5cbiAqXG4gKiBAcGFyYW0gc3lzdGVtQ2xvY2tPZmZzZXQgVGhlIG9mZnNldCBvZiB0aGUgc3lzdGVtIGNsb2NrIGluIG1pbGxpc2Vjb25kcy5cbiAqL1xuZXhwb3J0IGNvbnN0IGdldFNrZXdDb3JyZWN0ZWREYXRlID0gKHN5c3RlbUNsb2NrT2Zmc2V0OiBudW1iZXIpID0+IG5ldyBEYXRlKERhdGUubm93KCkgKyBzeXN0ZW1DbG9ja09mZnNldCk7XG4iXX0=","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.getUpdatedSystemClockOffset = void 0;\nconst isClockSkewed_1 = require(\"./isClockSkewed\");\n/**\n * If clock is skewed, it returns the difference between serverTime and current time.\n * If clock is not skewed, it returns currentSystemClockOffset.\n *\n * @param clockTime The string value of the server time.\n * @param currentSystemClockOffset The current system clock offset.\n */\nconst getUpdatedSystemClockOffset = (clockTime, currentSystemClockOffset) => {\n const clockTimeInMs = Date.parse(clockTime);\n if (isClockSkewed_1.isClockSkewed(clockTimeInMs, currentSystemClockOffset)) {\n return clockTimeInMs - Date.now();\n }\n return currentSystemClockOffset;\n};\nexports.getUpdatedSystemClockOffset = getUpdatedSystemClockOffset;\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZ2V0VXBkYXRlZFN5c3RlbUNsb2NrT2Zmc2V0LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vc3JjL3V0aWxzL2dldFVwZGF0ZWRTeXN0ZW1DbG9ja09mZnNldC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7QUFBQSxtREFBZ0Q7QUFFaEQ7Ozs7OztHQU1HO0FBQ0ksTUFBTSwyQkFBMkIsR0FBRyxDQUFDLFNBQWlCLEVBQUUsd0JBQWdDLEVBQVUsRUFBRTtJQUN6RyxNQUFNLGFBQWEsR0FBRyxJQUFJLENBQUMsS0FBSyxDQUFDLFNBQVMsQ0FBQyxDQUFDO0lBQzVDLElBQUksNkJBQWEsQ0FB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Q2xvY2tPZmZzZXQ7XG59O1xuIl19","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.isClockSkewed = void 0;\nconst getSkewCorrectedDate_1 = require(\"./getSkewCorrectedDate\");\n/**\n * Checks if the provided date is within the skew window of 300000ms.\n *\n * @param clockTime - The time to check for skew in milliseconds.\n * @param systemClockOffset - The offset of the system clock in milliseconds.\n */\nconst isClockSkewed = (clockTime, systemClockOffset) => Math.abs(getSkewCorrectedDate_1.getSkewCorrectedDate(systemClockOffset).getTime() - clockTime) >= 300000;\nexports.isClockSkewed = isClockSkewed;\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaXNDbG9ja1NrZXdlZC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3NyYy91dGlscy9pc0Nsb2NrU2tld2VkLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7OztBQUFBLGlFQUE4RDtBQUU5RDs7Ozs7R0FLRztBQUNJLE1BQU0sYUFBYSxHQUFHLENBQUMsU0FBaUIsRUFBRSxpQkFBeUIsRUFBRSxFQUFFLENBQzVFLElBQUksQ0FBQyxHQUFHLENBQUMsMkNBQW9CLENBQUMsaUJBQWlCLENBQUMsQ0FBQyxPQUFPLEVBQUUsR0FBRyxTQUFTLENBQUMsSUFBSSxNQUFNLENBQUM7QUFEdkUsUUFBQSxhQUFhLGlCQUMwRCIsInNvdXJjZXNDb250ZW50IjpbImltcG9ydCB7IGdldFNrZXdDb3JyZWN0ZWREYXRlIH0gZnJvbSBcIi4vZ2V0U2tld0NvcnJlY3RlZERhdGVcIjtcblxuLyoqXG4gKiBDaGVja3MgaWYgdGhlIHByb3ZpZGVkIGRhdGUgaXMgd2l0aGluIHRoZSBza2V3IHdpbmRvdyBvZiAzMDAwMDBtcy5cbiAqXG4gKiBAcGFyYW0gY2xvY2tUaW1lIC0gVGhlIHRpbWUgdG8gY2hlY2sgZm9yIHNrZXcgaW4gbWlsbGlzZWNvbmRzLlxuICogQHBhcmFtIHN5c3RlbUNsb2NrT2Zmc2V0IC0gVGhlIG9mZnNldCBvZiB0aGUgc3lzdGVtIGNsb2NrIGluIG1pbGxpc2Vjb25kcy5cbiAqL1xuZXhwb3J0IGNvbnN0IGlzQ2xvY2tTa2V3ZWQgPSAoY2xvY2tUaW1lOiBudW1iZXIsIHN5c3RlbUNsb2NrT2Zmc2V0OiBudW1iZXIpID0+XG4gIE1hdGguYWJzKGdldFNrZXdDb3JyZWN0ZWREYXRlKHN5c3RlbUNsb2NrT2Zmc2V0KS5nZXRUaW1lKCkgLSBjbG9ja1RpbWUpID49IDMwMDAwMDtcbiJdfQ==","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.constructStack = void 0;\nconst constructStack = () => {\n let absoluteEntries = [];\n let relativeEntries = [];\n const entriesNameSet = new Set();\n const sort = (entries) => entries.sort((a, b) => stepWeights[b.step] - stepWeights[a.step] ||\n priorityWeights[b.priority || \"normal\"] - priorityWeights[a.priority || \"normal\"]);\n const removeByName = (toRemove) => {\n let isRemoved = false;\n const filterCb = (entry) => {\n if (entry.name && entry.name === toRemove) {\n isRemoved = true;\n entriesNameSet.delete(toRemove);\n return false;\n }\n return true;\n };\n absoluteEntries = absoluteEntries.filter(filterCb);\n relativeEntries = relativeEntries.filter(filterCb);\n return isRemoved;\n };\n const removeByReference = (toRemove) => {\n let isRemoved = false;\n const filterCb = (entry) => {\n if (entry.middleware === toRemove) {\n isRemoved = true;\n if (entry.name)\n entriesNameSet.delete(entry.name);\n return false;\n }\n return true;\n };\n absoluteEntries = absoluteEntries.filter(filterCb);\n relativeEntries = relativeEntries.filter(filterCb);\n return isRemoved;\n };\n const cloneTo = (toStack) => {\n absoluteEntries.forEach((entry) => {\n //@ts-ignore\n toStack.add(entry.middleware, { ...entry });\n });\n relativeEntries.forEach((entry) => {\n //@ts-ignore\n toStack.addRelativeTo(entry.middleware, { ...entry });\n });\n return toStack;\n };\n const expandRelativeMiddlewareList = (from) => {\n const expandedMiddlewareList = [];\n from.before.forEach((entry) => {\n if (entry.before.length === 0 && entry.after.length === 0) {\n expandedMiddlewareList.push(entry);\n }\n else {\n expandedMiddlewareList.push(...expandRelativeMiddlewareList(entry));\n }\n });\n expandedMiddlewareList.push(from);\n from.after.reverse().forEach((entry) => {\n if (entry.before.length === 0 && entry.after.length === 0) {\n expandedMiddlewareList.push(entry);\n }\n else {\n expandedMiddlewareList.push(...expandRelativeMiddlewareList(entry));\n }\n });\n return expandedMiddlewareList;\n };\n /**\n * Get a final list of middleware in the order of being executed in the resolved handler.\n */\n const getMiddlewareList = () => {\n const normalizedAbsoluteEntries = [];\n const normalizedRelativeEntries = [];\n const normalizedEntriesNameMap = {};\n absoluteEntries.forEach((entry) => {\n const normalizedEntry = {\n ...entry,\n before: [],\n after: [],\n };\n if (normalizedEntry.name)\n normalizedEntriesNameMap[normalizedEntry.name] = normalizedEntry;\n normalizedAbsoluteEntries.push(normalizedEntry);\n });\n relativeEntries.forEach((entry) => {\n const normalizedEntry = {\n ...entry,\n before: [],\n after: [],\n };\n if (normalizedEntry.name)\n normalizedEntriesNameMap[normalizedEntry.name] = normalizedEntry;\n normalizedRelativeEntries.push(normalizedEntry);\n });\n normalizedRelativeEntries.forEach((entry) => {\n if (entry.toMiddleware) {\n const toMiddleware = normalizedEntriesNameMap[entry.toMiddleware];\n if (toMiddleware === undefined) {\n throw new Error(`${entry.toMiddleware} is not found when adding ${entry.name || \"anonymous\"} middleware ${entry.relation} ${entry.toMiddleware}`);\n }\n if (entry.relation === \"after\") {\n toMiddleware.after.push(entry);\n }\n if (entry.relation === \"before\") {\n toMiddleware.before.push(entry);\n }\n }\n });\n const mainChain = sort(normalizedAbsoluteEntries)\n .map(expandRelativeMiddlewareList)\n .reduce((wholeList, expendedMiddlewareList) => {\n // TODO: Replace it with Array.flat();\n wholeList.push(...expendedMiddlewareList);\n return wholeList;\n }, []);\n return mainChain.map((entry) => entry.middleware);\n };\n const stack = {\n add: (middleware, options = {}) => {\n const { name, override } = options;\n const entry = {\n step: \"initialize\",\n priority: \"normal\",\n middleware,\n ...options,\n };\n if (name) {\n if (entriesNameSet.has(name)) {\n if (!override)\n throw new Error(`Duplicate middleware name '${name}'`);\n const toOverrideIndex = absoluteEntries.findIndex((entry) => entry.name === name);\n const toOverride = absoluteEntries[toOverrideIndex];\n if (toOverride.step !== entry.step || toOverride.priority !== entry.priority) {\n throw new Error(`\"${name}\" middleware with ${toOverride.priority} priority in ${toOverride.step} step cannot be ` +\n `overridden by same-name middleware with ${entry.priority} priority in ${entry.step} step.`);\n }\n absoluteEntries.splice(toOverrideIndex, 1);\n }\n entriesNameSet.add(name);\n }\n absoluteEntries.push(entry);\n },\n addRelativeTo: (middleware, options) => {\n const { name, override } = options;\n const entry = {\n middleware,\n ...options,\n };\n if (name) {\n if (entriesNameSet.has(name)) {\n if (!override)\n throw new Error(`Duplicate middleware name '${name}'`);\n const toOverrideIndex = relativeEntries.findIndex((entry) => entry.name === name);\n const toOverride = relativeEntries[toOverrideIndex];\n if (toOverride.toMiddleware !== entry.toMiddleware || toOverride.relation !== entry.relation) {\n throw new Error(`\"${name}\" middleware ${toOverride.relation} \"${toOverride.toMiddleware}\" middleware cannot be overridden ` +\n `by same-name middleware ${entry.relation} \"${entry.toMiddleware}\" middleware.`);\n }\n relativeEntries.splice(toOverrideIndex, 1);\n }\n entriesNameSet.add(name);\n }\n relativeEntries.push(entry);\n },\n clone: () => cloneTo(exports.constructStack()),\n use: (plugin) => {\n plugin.applyToStack(stack);\n },\n remove: (toRemove) => {\n if (typeof toRemove === \"string\")\n return removeByName(toRemove);\n else\n return removeByReference(toRemove);\n },\n removeByTag: (toRemove) => {\n let isRemoved = false;\n const filterCb = (entry) => {\n const { tags, name } = entry;\n if (tags && tags.includes(toRemove)) {\n if (name)\n entriesNameSet.delete(name);\n isRemoved = true;\n return false;\n }\n return true;\n };\n absoluteEntries = absoluteEntries.filter(filterCb);\n relativeEntries = relativeEntries.filter(filterCb);\n return isRemoved;\n },\n concat: (from) => {\n const cloned = cloneTo(exports.constructStack());\n cloned.use(from);\n return cloned;\n },\n applyToStack: cloneTo,\n resolve: (handler, context) => {\n for (const middleware of getMiddlewareList().reverse()) {\n handler = middleware(handler, context);\n }\n return handler;\n },\n };\n return stack;\n};\nexports.constructStack = constructStack;\nconst stepWeights = {\n initialize: 5,\n serialize: 4,\n build: 3,\n finalizeRequest: 2,\n deserialize: 1,\n};\nconst priorityWeights = {\n high: 3,\n normal: 2,\n low: 1,\n};\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiTWlkZGxld2FyZVN0YWNrLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vc3JjL01pZGRsZXdhcmVTdGFjay50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7QUFnQk8sTUFBTSxjQUFjLEdBQUcsR0FBZ0YsRUFBRTtJQUM5RyxJQUFJLGVBQWUsR0FBNkMsRUFBRSxDQUFDO0lBQ25FLElBQUksZUFBZSxHQUE2QyxFQUFFLENBQUM7SUFDbkUsTUFBTSxjQUFjLEdBQWdCLElBQUksR0FBRyxFQUFFLENBQUM7SUFFOUMsTUFBTSxJQUFJLEdBQUcsQ0FBbUQsT0FBWSxFQUFPLEVBQUUsQ0FDbkYsT0FBTyxDQUFDLElBQUksQ0FDVixDQUFDLENBQUMsRUFBRSxDQUFDLEVBQUUsRUFBRSxDQUNQLFdBQVcsQ0FBQyxDQUFDLENBQUMsSUFBSSxDQUFDLEdBQUcsV0FBVyxDQUFDLENBQUMsQ0FBQyxJQUFJLENBQUM7UUFDekMsZUFBZSxDQUFDLENBQUMsQ0FBQyxRQUFRLElBQUksUUFBUSxDQUFDLEdBQUcsZUFBZSxDQUFDLENBQUMsQ0FBQyxRQUFRLElBQUksUUFBUSxDQUFDLENBQ3BGLENBQUM7SUFFSixNQUFNLFlBQV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HJ5Lm5hbWUpIG5vcm1hbGl6ZWRFbnRyaWVzTmFtZU1hcFtub3JtYWxpemVkRW50cnkubmFtZV0gPSBub3JtYWxpemVkRW50cnk7XG4gICAgICBub3JtYWxpemVkUmVsYXRpdmVFbnRyaWVzLnB1c2gobm9ybWFsaXplZEVudHJ5KTtcbiAgICB9KTtcblxuICAgIG5vcm1hbGl6ZWRSZWxhdGl2ZUVudHJpZXMuZm9yRWFjaCgoZW50cnkpID0+IHtcbiAgICAgIGlmIChlbnRyeS50b01pZGRsZXdhcmUpIHtcbiAgICAgICAgY29uc3QgdG9NaWRkbGV3YXJlID0gbm9ybWFsaXplZEVudHJpZXNOYW1lTWFwW2VudHJ5LnRvTWlkZGxld2FyZV07XG4gICAgICAgIGlmICh0b01pZGRsZXdhcmUgPT09IHVuZGVmaW5lZCkge1xuICAgICAgICAgIHRocm93IG5ldyBFcnJvcihcbiAgICAgICAgICAgIGAke2VudHJ5LnRvTWlkZGxld2FyZX0gaXMgbm90IGZvdW5kIHdoZW4gYWRkaW5nICR7ZW50cnkubmFtZSB8fCBcImFub255bW91c1wifSBtaWRkbGV3YXJlICR7ZW50cnkucmVsYXRpb259ICR7XG4gICAgICAgICAgICAgIGVudHJ5LnRvTWlkZGxld2FyZVxuICAgICAgICAgICAgfWBcbiAgICAgICAgICApO1xuICAgICAgICB9XG4gICAgICAgIGlmIChlbnRyeS5yZWxhdGlvbiA9PT0gXCJhZnRlclwiKSB7XG4gICAgICAgICAgdG9NaWRkbGV3YXJlLmFmdGVyLnB1c2goZW50cnkpO1xuICAgICAgICB9XG4gICAgICAgIGlmIChlbnRyeS5yZWxhdGlvbiA9PT0gXCJiZWZvcmVcIikge1xuICAgICAgICAgIHRvTWlkZGxld2FyZS5iZWZvcmUucHVzaChlbnRyeSk7XG4gICAgICAgIH1cbiAgICAgIH1cbiAgICB9KTtcblxuICAgIGNvbnN0IG1haW5DaGFpbiA9IHNvcnQobm9ybWFsaXplZEFic29sdXRlRW50cmllcylcbi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25zdCBtaWRkbGV3YXJlIG9mIGdldE1pZGRsZXdhcmVMaXN0KCkucmV2ZXJzZSgpKSB7XG4gICAgICAgIGhhbmRsZXIgPSBtaWRkbGV3YXJlKGhhbmRsZXIgYXMgSGFuZGxlcjxJbnB1dCwgT3V0cHV0VHlwZT4sIGNvbnRleHQpIGFzIGFueTtcbiAgICAgIH1cbiAgICAgIHJldHVybiBoYW5kbGVyIGFzIEhhbmRsZXI8SW5wdXRUeXBlLCBPdXRwdXRUeXBlPjtcbiAgICB9LFxuICB9O1xuICByZXR1cm4gc3RhY2s7XG59O1xuXG5jb25zdCBzdGVwV2VpZ2h0czogeyBba2V5IGluIFN0ZXBdOiBudW1iZXIgfSA9IHtcbiAgaW5pdGlhbGl6ZTogNSxcbiAgc2VyaWFsaXplOiA0LFxuICBidWlsZDogMyxcbiAgZmluYWxpemVSZXF1ZXN0OiAyLFxuICBkZXNlcmlhbGl6ZTogMSxcbn07XG5cbmNvbnN0IHByaW9yaXR5V2VpZ2h0czogeyBba2V5IGluIFByaW9yaXR5XTogbnVtYmVyIH0gPSB7XG4gIGhpZ2g6IDMsXG4gIG5vcm1hbDogMixcbiAgbG93OiAxLFxufTtcbiJdfQ==","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst tslib_1 = require(\"tslib\");\ntslib_1.__exportStar(require(\"./MiddlewareStack\"), exports);\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvaW5kZXgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7O0FBQUEsNERBQWtDIiwic291cmNlc0NvbnRlbnQiOlsiZXhwb3J0ICogZnJvbSBcIi4vTWlkZGxld2FyZVN0YWNrXCI7XG4iXX0=","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.resolveUserAgentConfig = void 0;\nfunction resolveUserAgentConfig(input) {\n return {\n ...input,\n customUserAgent: typeof input.customUserAgent === \"string\" ? [[input.customUserAgent]] : input.customUserAgent,\n };\n}\nexports.resolveUserAgentConfig = resolveUserAgentConfig;\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY29uZmlndXJhdGlvbnMuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvY29uZmlndXJhdGlvbnMudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7O0FBMEJBLFNBQWdCLHNCQUFzQixDQUNwQyxLQUFvRDtJQUVwRCxPQUFPO1FBQ0wsR0FBRyxLQUFLO1FBQ1IsZUFBZSxFQUFFLE9BQU8sS0FBSyxDQUFDLGVBQWUsS0FBSyxRQUFRLENBQUMsQ0FBQyxDQUFDLENBQUMsQ0FBQyxLQUFLLENBQUMsZUFBZSxDQUFDLENBQUMsQ0FBQyxDQUFDLENBQUMsS0FBSyxDQUFDLGVBQWU7S0FDL0csQ0FBQztBQUNKLENBQUM7QUFQRCx3REFPQyIsInNvdXJjZXNDb250ZW50IjpbImltcG9ydCB7IFByb3ZpZGVyLCBVc2VyQWdlbnQgfSBmcm9tIFwiQGF3cy1zZGsvdHlwZXNcIjtcbmV4cG9ydCBpbnRlcmZhY2UgVXNlckFnZW50SW5wdXRDb25maWcge1xuICAvKipcbiAgICogVGhlIGN1c3RvbSB1c2VyIGFnZW50IGhlYWRlciB0aGF0IHdvdWxkIGJlIGFwcGVuZGVkIHRvIGRlZmF1bHQgb25lXG4gICAqL1xuICBjdXN0b21Vc2VyQWdlbnQ/OiBzdHJpbmcgfCBVc2VyQWdlbnQ7XG59XG5pbnRlcmZhY2UgUHJldmlvdXNseVJlc29sdmVkIHtcbiAgZGVmYXVsdFVzZXJBZ2VudFByb3ZpZGVyOiBQcm92aWRlcjxVc2VyQWdlbnQ+O1xuICBydW50aW1lOiBzdHJpbmc7XG59XG5leHBvcnQgaW50ZXJmYWNlIFVzZXJBZ2VudFJlc29sdmVkQ29uZmlnIHtcbiAgLyoqXG4gICAqIFRoZSBwcm92aWRlciBwb3B1bGF0aW5nIGRlZmF1bHQgdHJhY2tpbmcgaW5mb3JtYXRpb24gdG8gYmUgc2VudCB3aXRoIGB1c2VyLWFnZW50YCwgYHgtYW16LXVzZXItYWdlbnRgIGhlYWRlci5cbiAgICogQGludGVybmFsXG4gICAqL1xuICBkZWZhdWx0VXNlckFnZW50UHJvdmlkZXI6IFByb3ZpZGVyPFVzZXJBZ2VudD47XG4gIC8qKlxuICAgKiBUaGUgY3VzdG9tIHVzZXIgYWdlbnQgaGVhZGVyIHRoYXQgd291bGQgYmUgYXBwZW5kZWQgdG8gZGVmYXVsdCBvbmVcbiAgICovXG4gIGN1c3RvbVVzZXJBZ2VudD86IFVzZXJBZ2VudDtcbiAgLyoqXG4gICAqIFRoZSBydW50aW1lIGVudmlyb25tZW50XG4gICAqL1xuICBydW50aW1lOiBzdHJpbmc7XG59XG5leHBvcnQgZnVuY3Rpb24gcmVzb2x2ZVVzZXJBZ2VudENvbmZpZzxUPihcbiAgaW5wdXQ6IFQgJiBQcmV2aW91c2x5UmVzb2x2ZWQgJiBVc2VyQWdlbnRJbnB1dENvbmZpZ1xuKTogVCAmIFVzZXJBZ2VudFJlc29sdmVkQ29uZmlnIHtcbiAgcmV0dXJuIHtcbiAgICAuLi5pbnB1dCxcbiAgICBjdXN0b21Vc2VyQWdlbnQ6IHR5cGVvZiBpbnB1dC5jdXN0b21Vc2VyQWdlbnQgPT09IFwic3RyaW5nXCIgPyBbW2lucHV0LmN1c3RvbVVzZXJBZ2VudF1dIDogaW5wdXQuY3VzdG9tVXNlckFnZW50LFxuICB9O1xufVxuIl19","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.UA_ESCAPE_REGEX = exports.SPACE = exports.X_AMZ_USER_AGENT = exports.USER_AGENT = void 0;\nexports.USER_AGENT = \"user-agent\";\nexports.X_AMZ_USER_AGENT = \"x-amz-user-agent\";\nexports.SPACE = \" \";\nexports.UA_ESCAPE_REGEX = /[^\\!\\#\\$\\%\\&\\'\\*\\+\\-\\.\\^\\_\\`\\|\\~\\d\\w]/g;\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY29uc3RhbnRzLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vc3JjL2NvbnN0YW50cy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7QUFBYSxRQUFBLFVBQVUsR0FBRyxZQUFZLENBQUM7QUFFMUIsUUFBQSxnQkFBZ0IsR0FBRyxrQkFBa0IsQ0FBQztBQUV0QyxRQUFBLEtBQUssR0FBRyxHQUFHLENBQUM7QUFFWixRQUFBLGVBQWUsR0FBRyx3Q0FBd0MsQ0FBQyIsInNvdXJjZXNDb250ZW50IjpbImV4cG9ydCBjb25zdCBVU0VSX0FHRU5UID0gXCJ1c2VyLWFnZW50XCI7XG5cbmV4cG9ydCBjb25zdCBYX0FNWl9VU0VSX0FHRU5UID0gXCJ4LWFtei11c2VyLWFnZW50XCI7XG5cbmV4cG9ydCBjb25zdCBTUEFDRSA9IFwiIFwiO1xuXG5leHBvcnQgY29uc3QgVUFfRVNDQVBFX1JFR0VYID0gL1teXFwhXFwjXFwkXFwlXFwmXFwnXFwqXFwrXFwtXFwuXFxeXFxfXFxgXFx8XFx+XFxkXFx3XS9nO1xuIl19","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst tslib_1 = require(\"tslib\");\ntslib_1.__exportStar(require(\"./configurations\"), exports);\ntslib_1.__exportStar(require(\"./user-agent-middleware\"), exports);\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvaW5kZXgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7O0FBQUEsMkRBQWlDO0FBQ2pDLGtFQUF3QyIsInNvdXJjZXNDb250ZW50IjpbImV4cG9ydCAqIGZyb20gXCIuL2NvbmZpZ3VyYXRpb25zXCI7XG5leHBvcnQgKiBmcm9tIFwiLi91c2VyLWFnZW50LW1pZGRsZXdhcmVcIjtcbiJdfQ==","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.getUserAgentPlugin = exports.getUserAgentMiddlewareOptions = exports.userAgentMiddleware = void 0;\nconst protocol_http_1 = require(\"@aws-sdk/protocol-http\");\nconst constants_1 = require(\"./constants\");\n/**\n * Build user agent header sections from:\n * 1. runtime-specific default user agent provider;\n * 2. custom user agent from `customUserAgent` client config;\n * 3. handler execution context set by internal SDK components;\n * The built user agent will be set to `x-amz-user-agent` header for ALL the\n * runtimes.\n * Please note that any override to the `user-agent` or `x-amz-user-agent` header\n * in the HTTP request is discouraged. Please use `customUserAgent` client\n * config or middleware setting the `userAgent` context to generate desired user\n * agent.\n */\nconst userAgentMiddleware = (options) => (next, context) => async (args) => {\n var _a, _b;\n const { request } = args;\n if (!protocol_http_1.HttpRequest.isInstance(request))\n return next(args);\n const { headers } = request;\n const userAgent = ((_a = context === null || context === void 0 ? void 0 : context.userAgent) === null || _a === void 0 ? void 0 : _a.map(escapeUserAgent)) || [];\n const defaultUserAgent = (await options.defaultUserAgentProvider()).map(escapeUserAgent);\n const customUserAgent = ((_b = options === null || options === void 0 ? void 0 : options.customUserAgent) === null || _b === void 0 ? void 0 : _b.map(escapeUserAgent)) || [];\n // Set value to AWS-specific user agent header\n const sdkUserAgentValue = [...defaultUserAgent, ...userAgent, ...customUserAgent].join(constants_1.SPACE);\n // Get value to be sent with non-AWS-specific user agent header.\n const normalUAValue = [\n ...defaultUserAgent.filter((section) => section.startsWith(\"aws-sdk-\")),\n ...customUserAgent,\n ].join(constants_1.SPACE);\n if (options.runtime !== \"browser\") {\n if (normalUAValue) {\n headers[constants_1.X_AMZ_USER_AGENT] = headers[constants_1.X_AMZ_USER_AGENT]\n ? `${headers[constants_1.USER_AGENT]} ${normalUAValue}`\n : normalUAValue;\n }\n headers[constants_1.USER_AGENT] = sdkUserAgentValue;\n }\n else {\n headers[constants_1.X_AMZ_USER_AGENT] = sdkUserAgentValue;\n }\n return next({\n ...args,\n request,\n });\n};\nexports.userAgentMiddleware = userAgentMiddleware;\n/**\n * Escape the each pair according to https://tools.ietf.org/html/rfc5234 and join the pair with pattern `name/version`.\n * User agent name may include prefix like `md/`, `api/`, `os/` etc., we should not escape the `/` after the prefix.\n * @private\n */\nconst escapeUserAgent = ([name, version]) => {\n const prefixSeparatorIndex = name.indexOf(\"/\");\n const prefix = name.substring(0, prefixSeparatorIndex); // If no prefix, prefix is just \"\"\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 .map((item) => item === null || item === void 0 ? void 0 : item.replace(constants_1.UA_ESCAPE_REGEX, \"_\"))\n .join(\"/\");\n};\nexports.getUserAgentMiddlewareOptions = {\n name: \"getUserAgentMiddleware\",\n step: \"build\",\n priority: \"low\",\n tags: [\"SET_USER_AGENT\", \"USER_AGENT\"],\n override: true,\n};\nconst getUserAgentPlugin = (config) => ({\n applyToStack: (clientStack) => {\n clientStack.add(exports.userAgentMiddleware(config), exports.getUserAgentMiddlewareOptions);\n },\n});\nexports.getUserAgentPlugin = getUserAgentPlugin;\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidXNlci1hZ2VudC1taWRkbGV3YXJlLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vc3JjL3VzZXItYWdlbnQtbWlkZGxld2FyZS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7QUFBQSwwREFBcUQ7QUFjckQsMkNBQW1GO0FBRW5GOzs7Ozs7Ozs7OztHQVdHO0FBQ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SlcbiAgICAuam9pbihcIi9cIik7XG59O1xuXG5leHBvcnQgY29uc3QgZ2V0VXNlckFnZW50TWlkZGxld2FyZU9wdGlvbnM6IEJ1aWxkSGFuZGxlck9wdGlvbnMgJiBBYnNvbHV0ZUxvY2F0aW9uID0ge1xuICBuYW1lOiBcImdldFVzZXJBZ2VudE1pZGRsZXdhcmVcIixcbiAgc3RlcDogXCJidWlsZFwiLFxuICBwcmlvcml0eTogXCJsb3dcIixcbiAgdGFnczogW1wiU0VUX1VTRVJfQUdFTlRcIiwgXCJVU0VSX0FHRU5UXCJdLFxuICBvdmVycmlkZTogdHJ1ZSxcbn07XG5cbmV4cG9ydCBjb25zdCBnZXRVc2VyQWdlbnRQbHVnaW4gPSAoY29uZmlnOiBVc2VyQWdlbnRSZXNvbHZlZENvbmZpZyk6IFBsdWdnYWJsZTxhbnksIGFueT4gPT4gKHtcbiAgYXBwbHlUb1N0YWNrOiAoY2xpZW50U3RhY2spID0+IHtcbiAgICBjbGllbnRTdGFjay5hZGQodXNlckFnZW50TWlkZGxld2FyZShjb25maWcpLCBnZXRVc2VyQWdlbnRNaWRkbGV3YXJlT3B0aW9ucyk7XG4gIH0sXG59KTtcbiJdfQ==","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.loadConfig = void 0;\nconst property_provider_1 = require(\"@aws-sdk/property-provider\");\nconst fromEnv_1 = require(\"./fromEnv\");\nconst fromSharedConfigFiles_1 = require(\"./fromSharedConfigFiles\");\nconst fromStatic_1 = require(\"./fromStatic\");\nconst loadConfig = ({ environmentVariableSelector, configFileSelector, default: defaultValue }, configuration = {}) => property_provider_1.memoize(property_provider_1.chain(fromEnv_1.fromEnv(environmentVariableSelector), fromSharedConfigFiles_1.fromSharedConfigFiles(configFileSelector, configuration), fromStatic_1.fromStatic(defaultValue)));\nexports.loadConfig = loadConfig;\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY29uZmlnTG9hZGVyLmp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Zyb21TdGF0aWMoZGVmYXVsdFZhbHVlKVxuICAgIClcbiAgKTtcbiJdfQ==","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.fromEnv = void 0;\nconst property_provider_1 = require(\"@aws-sdk/property-provider\");\n/**\n * Get config value given the environment variable name or getter from\n * environment variable.\n */\nconst fromEnv = (envVarSelector) => async () => {\n try {\n const config = envVarSelector(process.env);\n if (config === undefined) {\n throw new Error();\n }\n return config;\n }\n catch (e) {\n throw new property_provider_1.CredentialsProviderError(e.message || `Cannot load config from environment variables with getter: ${envVarSelector}`);\n }\n};\nexports.fromEnv = fromEnv;\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZnJvbUVudi5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9mcm9tRW52LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7OztBQUFBLGtFQUFzRTtBQUt0RTs7O0dBR0c7QUFDSSxNQUFNLE9BQU8sR0FDbEIsQ0FBYSxjQUFnQyxFQUFlLEVBQUUsQ0FDOUQsS0FBSyxJQUFJLEVBQUU7SUFDVCxJQUFJO1FBQ0YsTUFBTSxNQUFNLEdBQUcsY0FBYyxDQUFDLE9BQU8sQ0FBQyxHQUFHLENBQUMsQ0FBQztRQUMzQyxJQUFJLE1BQU0sS0FBSyxTQUFTLEVBQUU7WUFDeEIsTUFBTSxJQUFJLEtBQUssRUFBRSxDQUFDO1NBQ25CO1FBQ0QsT0FBTyxNQUFXLENBQUM7S0FDcEI7SUFBQyxPQUFPLENBQUMsRUFBRTtRQUNWLE1BQU0sSUFBSSw0Q0FBd0IsQ0FDaEMsQ0FBQyxDQUFDLE9BQU8sSUFBSSw4REFBOEQsY0FBYyxFQUFFLENBQzVGLENBQUM7S0FDSDtBQUNILENBQUMsQ0FBQztBQWRTLFFBQUEsT0FBTyxXQWNoQiIsInNvdXJjZXNDb250ZW50IjpbImltcG9ydCB7IENyZWRlbnRpYWxzUHJvdmlkZXJFcnJvciB9IGZyb20gXCJAYXdzLXNkay9wcm9wZXJ0eS1wcm92aWRlclwiO1xuaW1wb3J0IHsgUHJvdmlkZXIgfSBmcm9tIFwiQGF3cy1zZGsvdHlwZXNcIjtcblxuZXhwb3J0IHR5cGUgR2V0dGVyRnJvbUVudjxUPiA9IChlbnY6IE5vZGVKUy5Qcm9jZXNzRW52KSA9PiBUIHwgdW5kZWZpbmVkO1xuXG4vKipcbiAqIEdldCBjb25maWcgdmFsdWUgZ2l2ZW4gdGhlIGVudmlyb25tZW50IHZhcmlhYmxlIG5hbWUgb3IgZ2V0dGVyIGZyb21cbiAqIGVudmlyb25tZW50IHZhcmlhYmxlLlxuICovXG5leHBvcnQgY29uc3QgZnJvbUVudiA9XG4gIDxUID0gc3RyaW5nPihlbnZWYXJTZWxlY3RvcjogR2V0dGVyRnJvbUVudjxUPik6IFByb3ZpZGVyPFQ+ID0+XG4gIGFzeW5jICgpID0+IHtcbiAgICB0cnkge1xuICAgICAgY29uc3QgY29uZmlnID0gZW52VmFyU2VsZWN0b3IocHJvY2Vzcy5lbnYpO1xuICAgICAgaWYgKGNvbmZpZyA9PT0gdW5kZWZpbmVkKSB7XG4gICAgICAgIHRocm93IG5ldyBFcnJvcigpO1xuICAgICAgfVxuICAgICAgcmV0dXJuIGNvbmZpZyBhcyBUO1xuICAgIH0gY2F0Y2ggKGUpIHtcbiAgICAgIHRocm93IG5ldyBDcmVkZW50aWFsc1Byb3ZpZGVyRXJyb3IoXG4gICAgICAgIGUubWVzc2FnZSB8fCBgQ2Fubm90IGxvYWQgY29uZmlnIGZyb20gZW52aXJvbm1lbnQgdmFyaWFibGVzIHdpdGggZ2V0dGVyOiAke2VudlZhclNlbGVjdG9yfWBcbiAgICAgICk7XG4gICAgfVxuICB9O1xuIl19","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.fromSharedConfigFiles = exports.ENV_PROFILE = void 0;\nconst property_provider_1 = require(\"@aws-sdk/property-provider\");\nconst shared_ini_file_loader_1 = require(\"@aws-sdk/shared-ini-file-loader\");\nconst DEFAULT_PROFILE = \"default\";\nexports.ENV_PROFILE = \"AWS_PROFILE\";\n/**\n * Get config value from the shared config files with inferred profile name.\n */\nconst fromSharedConfigFiles = (configSelector, { preferredFile = \"config\", ...init } = {}) => async () => {\n const { loadedConfig = shared_ini_file_loader_1.loadSharedConfigFiles(init), profile = process.env[exports.ENV_PROFILE] || DEFAULT_PROFILE } = init;\n const { configFile, credentialsFile } = await loadedConfig;\n const profileFromCredentials = credentialsFile[profile] || {};\n const profileFromConfig = configFile[profile] || {};\n const mergedProfile = preferredFile === \"config\"\n ? { ...profileFromCredentials, ...profileFromConfig }\n : { ...profileFromConfig, ...profileFromCredentials };\n try {\n const configValue = configSelector(mergedProfile);\n if (configValue === undefined) {\n throw new Error();\n }\n return configValue;\n }\n catch (e) {\n throw new property_provider_1.CredentialsProviderError(e.message ||\n `Cannot load config for profile ${profile} in SDK configuration files with getter: ${configSelector}`);\n }\n};\nexports.fromSharedConfigFiles = fromSharedConfigFiles;\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZnJvbVNoYXJlZENvbmZpZ0ZpbGVzLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vc3JjL2Zyb21TaGFyZWRDb25maWdGaWxlcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7QUFBQSxrRUFBc0U7QUFDdEUsNEVBS3lDO0FBR3pDLE1BQU0sZUFBZSxHQUFHLFNBQVMsQ0FBQztBQUNyQixRQUFBLFdBQVcsR0FBRyxhQUFhLENBQUM7QUEwQnpDOztHQUVHO0FBQ0ksTUFBTSxxQkFBcUIsR0FDaEMsQ0FDRSxjQUFtQyxFQUNuQyxFQUFFLGFBQWEsR0FBRyxRQUFRLEVBQUUsR0FBRyxJQUFJLEtBQXVCLEVBQUUs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dhaXQgbG9hZGVkQ29uZmlnO1xuXG4gICAgY29uc3QgcHJvZmlsZUZyb21DcmVkZW50aWFscyA9IGNyZWRlbnRpYWxzRmlsZVtwcm9maWxlXSB8fCB7fTtcbiAgICBjb25zdCBwcm9maWxlRnJvbUNvbmZpZyA9IGNvbmZpZ0ZpbGVbcHJvZmlsZV0gfHwge307XG4gICAgY29uc3QgbWVyZ2VkUHJvZmlsZSA9XG4gICAgICBwcmVmZXJyZWRGaWxlID09PSBcImNvbmZpZ1wiXG4gICAgICAgID8geyAuLi5wcm9maWxlRnJvbUNyZWRlbnRpYWxzLCAuLi5wcm9maWxlRnJvbUNvbmZpZyB9XG4gICAgICAgIDogeyAuLi5wcm9maWxlRnJvbUNvbmZpZywgLi4ucHJvZmlsZUZyb21DcmVkZW50aWFscyB9O1xuXG4gICAgdHJ5IHtcbiAgICAgIGNvbnN0IGNvbmZpZ1ZhbHVlID0gY29uZmlnU2VsZWN0b3IobWVyZ2VkUHJvZmlsZSk7XG4gICAgICBpZiAoY29uZmlnVmFsdWUgPT09IHVuZGVmaW5lZCkge1xuICAgICAgICB0aHJvdyBuZXcgRXJyb3IoKTtcbiAgICAgIH1cbiAgICAgIHJldHVybiBjb25maWdWYWx1ZTtcbiAgICB9IGNhdGNoIChlKSB7XG4gICAgICB0aHJvdyBuZXcgQ3JlZGVudGlhbHNQcm92aWRlckVycm9yKFxuICAgICAgICBlLm1lc3NhZ2UgfHxcbiAgICAgICAgICBgQ2Fubm90IGxvYWQgY29uZmlnIGZvciBwcm9maWxlICR7cHJvZmlsZX0gaW4gU0RLIGNvbmZpZ3VyYXRpb24gZmlsZXMgd2l0aCBnZXR0ZXI6ICR7Y29uZmlnU2VsZWN0b3J9YFxuICAgICAgKTtcbiAgICB9XG4gIH07XG4iXX0=","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.fromStatic = void 0;\nconst property_provider_1 = require(\"@aws-sdk/property-provider\");\nconst isFunction = (func) => typeof func === \"function\";\nconst fromStatic = (defaultValue) => isFunction(defaultValue) ? async () => defaultValue() : property_provider_1.fromStatic(defaultValue);\nexports.fromStatic = fromStatic;\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZnJvbVN0YXRpYy5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9mcm9tU3RhdGljLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7OztBQUFBLGtFQUE2RTtBQUs3RSxNQUFNLFVBQVUsR0FBRyxDQUFJLElBQXlCLEVBQXFCLEVBQUUsQ0FBQyxPQUFPLElBQUksS0FBSyxVQUFVLENBQUM7QUFFNUYsTUFBTSxVQUFVLEdBQUcsQ0FBSSxZQUFpQyxFQUFlLEVBQUUsQ0FDOUUsVUFBVSxDQUFDLFlBQVksQ0FBQyxDQUFDLENBQUMsQ0FBQyxLQUFLLElBQUksRUFBRSxDQUFDLFlBQVksRUFBRSxDQUFDLENBQUMsQ0FBQyw4QkFBaUIsQ0FBQyxZQUFZLENBQUMsQ0FBQztBQUQ3RSxRQUFBLFVBQVUsY0FDbUUiLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgeyBmcm9tU3RhdGljIGFzIGNvbnZlcnRUb1Byb3ZpZGVyIH0gZnJvbSBcIkBhd3Mtc2RrL3Byb3BlcnR5LXByb3ZpZGVyXCI7XG5pbXBvcnQgeyBQcm92aWRlciB9IGZyb20gXCJAYXdzLXNkay90eXBlc1wiO1xuXG5leHBvcnQgdHlwZSBGcm9tU3RhdGljQ29uZmlnPFQ+ID0gVCB8ICgoKSA9PiBUKTtcbnR5cGUgR2V0dGVyPFQ+ID0gKCkgPT4gVDtcbmNvbnN0IGlzRnVuY3Rpb24gPSA8VD4oZnVuYzogRnJvbVN0YXRpY0NvbmZpZzxUPik6IGZ1bmMgaXMgR2V0dGVyPFQ+ID0+IHR5cGVvZiBmdW5jID09PSBcImZ1bmN0aW9uXCI7XG5cbmV4cG9ydCBjb25zdCBmcm9tU3RhdGljID0gPFQ+KGRlZmF1bHRWYWx1ZTogRnJvbVN0YXRpY0NvbmZpZzxUPik6IFByb3ZpZGVyPFQ+ID0+XG4gIGlzRnVuY3Rpb24oZGVmYXVsdFZhbHVlKSA/IGFzeW5jICgpID0+IGRlZmF1bHRWYWx1ZSgpIDogY29udmVydFRvUHJvdmlkZXIoZGVmYXVsdFZhbHVlKTtcbiJdfQ==","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst tslib_1 = require(\"tslib\");\ntslib_1.__exportStar(require(\"./configLoader\"), exports);\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvaW5kZXgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7O0FBQUEseURBQStCIiwic291cmNlc0NvbnRlbnQiOlsiZXhwb3J0ICogZnJvbSBcIi4vY29uZmlnTG9hZGVyXCI7XG4iXX0=","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.NODEJS_TIMEOUT_ERROR_CODES = void 0;\n/**\n * Node.js system error codes that indicate timeout.\n */\nexports.NODEJS_TIMEOUT_ERROR_CODES = [\"ECONNRESET\", \"EPIPE\", \"ETIMEDOUT\"];\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY29uc3RhbnRzLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vc3JjL2NvbnN0YW50cy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7QUFBQTs7R0FFRztBQUNVLFFBQUEsMEJBQTBCLEdBQUcsQ0FBQyxZQUFZLEVBQUUsT0FBTyxFQUFFLFdBQVcsQ0FBQyxDQUFDIiwic291cmNlc0NvbnRlbnQiOlsiLyoqXG4gKiBOb2RlLmpzIHN5c3RlbSBlcnJvciBjb2RlcyB0aGF0IGluZGljYXRlIHRpbWVvdXQuXG4gKi9cbmV4cG9ydCBjb25zdCBOT0RFSlNfVElNRU9VVF9FUlJPUl9DT0RFUyA9IFtcIkVDT05OUkVTRVRcIiwgXCJFUElQRVwiLCBcIkVUSU1FRE9VVFwiXTtcbiJdfQ==","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.getTransformedHeaders = void 0;\nconst getTransformedHeaders = (headers) => {\n const transformedHeaders = {};\n for (const name of Object.keys(headers)) {\n const headerValues = headers[name];\n transformedHeaders[name] = Array.isArray(headerValues) ? headerValues.join(\",\") : headerValues;\n }\n return transformedHeaders;\n};\nexports.getTransformedHeaders = getTransformedHeaders;\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZ2V0LXRyYW5zZm9ybWVkLWhlYWRlcnMuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvZ2V0LXRyYW5zZm9ybWVkLWhlYWRlcnMudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7O0FBR0EsTUFBTSxxQkFBcUIsR0FBRyxDQUFDLE9BQTRCLEVBQUUsRUFBRTtJQUM3RCxNQUFNLGtCQUFrQixHQUFjLEVBQUUsQ0FBQztJQUV6QyxLQUFLLE1BQU0sSUFBSSxJQUFJLE1BQU0sQ0FBQyxJQUFJLENBQUMsT0FBTyxDQUFDLEVBQUU7UUFDdkMsTUFBTSxZQUFZLEdBQVcsT0FBTyxDQUFDLElBQUksQ0FBQyxDQUFDO1FBQzNDLGtCQUFrQixDQUFDLElBQUksQ0FBQyxHQUFHLEtBQUssQ0FBQyxPQUFPLENBQUMsWUFBWSxDQUFDLENBQUMsQ0FBQyxDQUFDLFlBQVksQ0FBQyxJQUFJLENBQUMsR0FBRyxDQUFDLENBQUMsQ0FBQyxDQUFDLFlBQVksQ0FBQztLQUNoRztJQUVELE9BQU8sa0JBQWtCLENBQUM7QUFDNUIsQ0FBQyxDQUFDO0FBRU8sc0RBQXFCIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHsgSGVhZGVyQmFnIH0gZnJvbSBcIkBhd3Mtc2RrL3R5cGVzXCI7XG5pbXBvcnQgeyBJbmNvbWluZ0h0dHBIZWFkZXJzIH0gZnJvbSBcImh0dHAyXCI7XG5cbmNvbnN0IGdldFRyYW5zZm9ybWVkSGVhZGVycyA9IChoZWFkZXJzOiBJbmNvbWluZ0h0dHBIZWFkZXJzKSA9PiB7XG4gIGNvbnN0IHRyYW5zZm9ybWVkSGVhZGVyczogSGVhZGVyQmFnID0ge307XG5cbiAgZm9yIChjb25zdCBuYW1lIG9mIE9iamVjdC5rZXlzKGhlYWRlcnMpKSB7XG4gICAgY29uc3QgaGVhZGVyVmFsdWVzID0gPHN0cmluZz5oZWFkZXJzW25hbWVdO1xuICAgIHRyYW5zZm9ybWVkSGVhZGVyc1tuYW1lXSA9IEFycmF5LmlzQXJyYXkoaGVhZGVyVmFsdWVzKSA/IGhlYWRlclZhbHVlcy5qb2luKFwiLFwiKSA6IGhlYWRlclZhbHVlcztcbiAgfVxuXG4gIHJldHVybiB0cmFuc2Zvcm1lZEhlYWRlcnM7XG59O1xuXG5leHBvcnQgeyBnZXRUcmFuc2Zvcm1lZEhlYWRlcnMgfTtcbiJdfQ==","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst tslib_1 = require(\"tslib\");\ntslib_1.__exportStar(require(\"./node-http-handler\"), exports);\ntslib_1.__exportStar(require(\"./node-http2-handler\"), exports);\ntslib_1.__exportStar(require(\"./stream-collector\"), exports);\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvaW5kZXgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7O0FBQUEsOERBQW9DO0FBQ3BDLCtEQUFxQztBQUNyQyw2REFBbUMiLCJzb3VyY2VzQ29udGVudCI6WyJleHBvcnQgKiBmcm9tIFwiLi9ub2RlLWh0dHAtaGFuZGxlclwiO1xuZXhwb3J0ICogZnJvbSBcIi4vbm9kZS1odHRwMi1oYW5kbGVyXCI7XG5leHBvcnQgKiBmcm9tIFwiLi9zdHJlYW0tY29sbGVjdG9yXCI7XG4iXX0=","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.NodeHttpHandler = void 0;\nconst protocol_http_1 = require(\"@aws-sdk/protocol-http\");\nconst querystring_builder_1 = require(\"@aws-sdk/querystring-builder\");\nconst http_1 = require(\"http\");\nconst https_1 = require(\"https\");\nconst constants_1 = require(\"./constants\");\nconst get_transformed_headers_1 = require(\"./get-transformed-headers\");\nconst set_connection_timeout_1 = require(\"./set-connection-timeout\");\nconst set_socket_timeout_1 = require(\"./set-socket-timeout\");\nconst write_request_body_1 = require(\"./write-request-body\");\nclass NodeHttpHandler {\n constructor({ connectionTimeout, socketTimeout, httpAgent, httpsAgent } = {}) {\n // Node http handler is hard-coded to http/1.1: https://github.com/nodejs/node/blob/ff5664b83b89c55e4ab5d5f60068fb457f1f5872/lib/_http_server.js#L286\n this.metadata = { handlerProtocol: \"http/1.1\" };\n this.connectionTimeout = connectionTimeout;\n this.socketTimeout = socketTimeout;\n const keepAlive = true;\n const maxSockets = 50;\n this.httpAgent = httpAgent || new http_1.Agent({ keepAlive, maxSockets });\n this.httpsAgent = httpsAgent || new https_1.Agent({ keepAlive, maxSockets });\n }\n destroy() {\n this.httpAgent.destroy();\n this.httpsAgent.destroy();\n }\n handle(request, { abortSignal } = {}) {\n return new Promise((resolve, reject) => {\n // if the request was already aborted, prevent doing extra work\n if (abortSignal === null || abortSignal === void 0 ? void 0 : abortSignal.aborted) {\n const abortError = new Error(\"Request aborted\");\n abortError.name = \"AbortError\";\n reject(abortError);\n return;\n }\n // determine which http(s) client to use\n const isSSL = request.protocol === \"https:\";\n const queryString = querystring_builder_1.buildQueryString(request.query || {});\n const nodeHttpsOptions = {\n headers: request.headers,\n host: request.hostname,\n method: request.method,\n path: queryString ? `${request.path}?${queryString}` : request.path,\n port: request.port,\n agent: isSSL ? this.httpsAgent : this.httpAgent,\n };\n // create the http request\n const requestFunc = isSSL ? https_1.request : http_1.request;\n const req = requestFunc(nodeHttpsOptions, (res) => {\n const httpResponse = new protocol_http_1.HttpResponse({\n statusCode: res.statusCode || -1,\n headers: get_transformed_headers_1.getTransformedHeaders(res.headers),\n body: res,\n });\n resolve({ response: httpResponse });\n });\n req.on(\"error\", (err) => {\n if (constants_1.NODEJS_TIMEOUT_ERROR_CODES.includes(err.code)) {\n reject(Object.assign(err, { name: \"TimeoutError\" }));\n }\n else {\n reject(err);\n }\n });\n // wire-up any timeout logic\n set_connection_timeout_1.setConnectionTimeout(req, reject, this.connectionTimeout);\n set_socket_timeout_1.setSocketTimeout(req, reject, this.socketTimeout);\n // wire-up abort logic\n if (abortSignal) {\n abortSignal.onabort = () => {\n // ensure request is destroyed\n req.abort();\n const abortError = new Error(\"Request aborted\");\n abortError.name = \"AbortError\";\n reject(abortError);\n };\n }\n write_request_body_1.writeRequestBody(req, request);\n });\n }\n}\nexports.NodeHttpHandler = NodeHttpHandler;\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibm9kZS1odHRwLWhhbmRsZXIuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvbm9kZS1odHRwLWhhbmRsZXIudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7O0FBQUEsMERBQWdGO0FBQ2hGLHNFQUFnRTtBQUVoRSwrQkFBNEQ7QUFDNUQsaUNBQStFO0FBRS9FLDJDQUF5RDtBQUN6RCx1RUFBa0U7QUFDbEUscUVBQWdFO0FBQ2hFLDZEQUF3RDtBQUN4RCw2REFBd0Q7QUFzQnhELE1BQWEsZUF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WYgKGFib3J0U2lnbmFsKSB7XG4gICAgICAgIGFib3J0U2lnbmFsLm9uYWJvcnQgPSAoKSA9PiB7XG4gICAgICAgICAgLy8gZW5zdXJlIHJlcXVlc3QgaXMgZGVzdHJveWVkXG4gICAgICAgICAgcmVxLmFib3J0KCk7XG4gICAgICAgICAgY29uc3QgYWJvcnRFcnJvciA9IG5ldyBFcnJvcihcIlJlcXVlc3QgYWJvcnRlZFwiKTtcbiAgICAgICAgICBhYm9ydEVycm9yLm5hbWUgPSBcIkFib3J0RXJyb3JcIjtcbiAgICAgICAgICByZWplY3QoYWJvcnRFcnJvcik7XG4gICAgICAgIH07XG4gICAgICB9XG5cbiAgICAgIHdyaXRlUmVxdWVzdEJvZHkocmVxLCByZXF1ZXN0KTtcbiAgICB9KTtcbiAgfVxufVxuIl19","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.NodeHttp2Handler = void 0;\nconst protocol_http_1 = require(\"@aws-sdk/protocol-http\");\nconst querystring_builder_1 = require(\"@aws-sdk/querystring-builder\");\nconst http2_1 = require(\"http2\");\nconst get_transformed_headers_1 = require(\"./get-transformed-headers\");\nconst write_request_body_1 = require(\"./write-request-body\");\nclass NodeHttp2Handler {\n constructor({ requestTimeout, sessionTimeout, disableConcurrentStreams } = {}) {\n this.metadata = { handlerProtocol: \"h2\" };\n this.requestTimeout = requestTimeout;\n this.sessionTimeout = sessionTimeout;\n this.disableConcurrentStreams = disableConcurrentStreams;\n this.sessionCache = new Map();\n }\n destroy() {\n for (const sessions of this.sessionCache.values()) {\n sessions.forEach((session) => this.destroySession(session));\n }\n this.sessionCache.clear();\n }\n handle(request, { abortSignal } = {}) {\n return new Promise((resolve, rejectOriginal) => {\n // It's redundant to track fulfilled because promises use the first resolution/rejection\n // but avoids generating unnecessary stack traces in the \"close\" event handler.\n let fulfilled = false;\n // if the request was already aborted, prevent doing extra work\n if (abortSignal === null || abortSignal === void 0 ? void 0 : abortSignal.aborted) {\n fulfilled = true;\n const abortError = new Error(\"Request aborted\");\n abortError.name = \"AbortError\";\n rejectOriginal(abortError);\n return;\n }\n const { hostname, method, port, protocol, path, query } = request;\n const authority = `${protocol}//${hostname}${port ? `:${port}` : \"\"}`;\n const session = this.getSession(authority, this.disableConcurrentStreams || false);\n const reject = (err) => {\n if (this.disableConcurrentStreams) {\n this.destroySession(session);\n }\n fulfilled = true;\n rejectOriginal(err);\n };\n const queryString = querystring_builder_1.buildQueryString(query || {});\n // create the http2 request\n const req = session.request({\n ...request.headers,\n [http2_1.constants.HTTP2_HEADER_PATH]: queryString ? `${path}?${queryString}` : path,\n [http2_1.constants.HTTP2_HEADER_METHOD]: method,\n });\n req.on(\"response\", (headers) => {\n const httpResponse = new protocol_http_1.HttpResponse({\n statusCode: headers[\":status\"] || -1,\n headers: get_transformed_headers_1.getTransformedHeaders(headers),\n body: req,\n });\n fulfilled = true;\n resolve({ response: httpResponse });\n if (this.disableConcurrentStreams) {\n // Gracefully closes the Http2Session, allowing any existing streams to complete\n // on their own and preventing new Http2Stream instances from being created.\n session.close();\n this.deleteSessionFromCache(authority, session);\n }\n });\n const requestTimeout = this.requestTimeout;\n if (requestTimeout) {\n req.setTimeout(requestTimeout, () => {\n req.close();\n const timeoutError = new Error(`Stream timed out because of no activity for ${requestTimeout} ms`);\n timeoutError.name = \"TimeoutError\";\n reject(timeoutError);\n });\n }\n if (abortSignal) {\n abortSignal.onabort = () => {\n req.close();\n const abortError = new Error(\"Request aborted\");\n abortError.name = \"AbortError\";\n reject(abortError);\n };\n }\n // Set up handlers for errors\n req.on(\"frameError\", (type, code, id) => {\n reject(new Error(`Frame type id ${type} in stream id ${id} has failed with code ${code}.`));\n });\n req.on(\"error\", reject);\n req.on(\"aborted\", () => {\n reject(new Error(`HTTP/2 stream is abnormally aborted in mid-communication with result code ${req.rstCode}.`));\n });\n // The HTTP/2 error code used when closing the stream can be retrieved using the\n // http2stream.rstCode property. If the code is any value other than NGHTTP2_NO_ERROR (0),\n // an 'error' event will have also been emitted.\n req.on(\"close\", () => {\n if (this.disableConcurrentStreams) {\n session.destroy();\n }\n if (!fulfilled) {\n reject(new Error(\"Unexpected error: http2 request did not get a response\"));\n }\n });\n write_request_body_1.writeRequestBody(req, request);\n });\n }\n /**\n * Returns a session for the given URL.\n *\n * @param authority The URL to create a session for.\n * @param disableConcurrentStreams If true, a new session will be created for each request.\n * @returns A session for the given URL.\n */\n getSession(authority, disableConcurrentStreams) {\n const sessionCache = this.sessionCache;\n const existingSessions = sessionCache.get(authority) || [];\n // If concurrent streams are not disabled, we can use the existing session.\n if (existingSessions.length > 0 && !disableConcurrentStreams)\n return existingSessions[0];\n const newSession = http2_1.connect(authority);\n const destroySessionCb = () => {\n this.destroySession(newSession);\n this.deleteSessionFromCache(authority, newSession);\n };\n newSession.on(\"goaway\", destroySessionCb);\n newSession.on(\"error\", destroySessionCb);\n newSession.on(\"frameError\", destroySessionCb);\n const sessionTimeout = this.sessionTimeout;\n if (sessionTimeout) {\n newSession.setTimeout(sessionTimeout, destroySessionCb);\n }\n existingSessions.push(newSession);\n sessionCache.set(authority, existingSessions);\n return newSession;\n }\n /**\n * Destroys a session.\n * @param session The session to destroy.\n */\n destroySession(session) {\n if (!session.destroyed) {\n session.destroy();\n }\n }\n /**\n * Delete a session from the connection pool.\n * @param authority The authority of the session to delete.\n * @param session The session to delete.\n */\n deleteSessionFromCache(authority, session) {\n const existingSessions = this.sessionCache.get(authority) || [];\n if (!existingSessions.includes(session)) {\n // If the session is not in the cache, it has already been deleted.\n return;\n }\n this.sessionCache.set(authority, existingSessions.filter((s) => s !== session));\n }\n}\nexports.NodeHttp2Handler = NodeHttp2Handler;\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibm9kZS1odHRwMi1oYW5kbGVyLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vc3JjL25vZGUtaHR0cDItaGFuZGxlci50cyJdLCJuYW1lcyI6W10sIm1hcHBpbm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gZGVzdHJveVNlc3Npb24oc2Vzc2lvbjogQ2xpZW50SHR0cDJTZXNzaW9uKTogdm9pZCB7XG4gICAgaWYgKCFzZXNzaW9uLmRlc3Ryb3llZCkge1xuICAgICAgc2Vzc2lvbi5kZXN0cm95KCk7XG4gICAgfVxuICB9XG5cbiAgLyoqXG4gICAqIERlbGV0ZSBhIHNlc3Npb24gZnJvbSB0aGUgY29ubmVjdGlvbiBwb29sLlxuICAgKiBAcGFyYW0gYXV0aG9yaXR5IFRoZSBhdXRob3JpdHkgb2YgdGhlIHNlc3Npb24gdG8gZGVsZXRlLlxuICAgKiBAcGFyYW0gc2Vzc2lvbiBUaGUgc2Vzc2lvbiB0byBkZWxldGUuXG4gICAqL1xuICBwcml2YXRlIGRlbGV0ZVNlc3Npb25Gcm9tQ2FjaGUoYXV0aG9yaXR5OiBzdHJpbmcsIHNlc3Npb246IENsaWVudEh0dHAyU2Vzc2lvbik6IHZvaWQge1xuICAgIGNvbnN0IGV4aXN0aW5nU2Vzc2lvbnMgPSB0aGlzLnNlc3Npb25DYWNoZS5nZXQoYXV0aG9yaXR5KSB8fCBbXTtcbiAgICBpZiAoIWV4aXN0aW5nU2Vzc2lvbnMuaW5jbHVkZXMoc2Vzc2lvbikpIHtcbiAgICAgIC8vIElmIHRoZSBzZXNzaW9uIGlzIG5vdCBpbiB0aGUgY2FjaGUsIGl0IGhhcyBhbHJlYWR5IGJlZW4gZGVsZXRlZC5cbiAgICAgIHJldHVybjtcbiAgICB9XG4gICAgdGhpcy5zZXNzaW9uQ2FjaGUuc2V0KFxuICAgICAgYXV0aG9yaXR5LFxuICAgICAgZXhpc3RpbmdTZXNzaW9ucy5maWx0ZXIoKHMpID0+IHMgIT09IHNlc3Npb24pXG4gICAgKTtcbiAgfVxufVxuIl19","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.setConnectionTimeout = void 0;\nconst setConnectionTimeout = (request, reject, timeoutInMs = 0) => {\n if (!timeoutInMs) {\n return;\n }\n request.on(\"socket\", (socket) => {\n if (socket.connecting) {\n // Throw a connecting timeout error unless a connection is made within x time.\n const timeoutId = setTimeout(() => {\n // destroy the request.\n request.destroy();\n reject(Object.assign(new Error(`Socket timed out without establishing a connection within ${timeoutInMs} ms`), {\n name: \"TimeoutError\",\n }));\n }, timeoutInMs);\n // if the connection was established, cancel the timeout.\n socket.on(\"connect\", () => {\n clearTimeout(timeoutId);\n });\n }\n });\n};\nexports.setConnectionTimeout = setConnectionTimeout;\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic2V0LWNvbm5lY3Rpb24tdGltZW91dC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9zZXQtY29ubmVjdGlvbi10aW1lb3V0LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7OztBQUdPLE1BQU0sb0JBQW9CLEdBQUcsQ0FBQyxPQUFzQixFQUFFLE1BQTRCLEVBQUUsV0FBVyxHQUFHLENBQUMsRUFBRSxFQUFFO0lBQzVHLElBQUksQ0FBQyxXQUFXLEVBQUU7UUFDaEIsT0FBTztLQUNSO0lBRUQsT0FBTyxDQUFDLEVBQUUsQ0FBQyxRQUFRLEVBQUUsQ0FBQyxNQUFjLEVBQUUsRUFBRTtRQUN0QyxJQUFJLE1BQU0sQ0FBQyxVQUFVLEVBQUU7WUFDckIsOEVBQThFO1lBQzlFLE1BQU0sU0FBUyxHQUFHLFVBQVUsQ0FBQyxHQUFHLEVBQUU7Z0JBQ2hDLHVCQUF1QjtnQkFDdkIsT0FBTyxDQUFDLE9BQU8sRUFBRSxDQUFDO2dCQUNsQixNQUFNLENBQ0osTUFBTSxDQUFDLE1BQU0sQ0FBQyxJQUFJLEtBQUssQ0FBQyw2REFBNkQsV0FBVyxLQUFLLENBQUMsRUFBRTtvQkFDdEcsSUFBSSxFQUFFLGNBQWM7aUJBQ3JCLENBQUMsQ0FDSCxDQUFDO1lBQ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yBhIGNvbm5lY3Rpb24gd2l0aGluICR7dGltZW91dEluTXN9IG1zYCksIHtcbiAgICAgICAgICAgIG5hbWU6IFwiVGltZW91dEVycm9yXCIsXG4gICAgICAgICAgfSlcbiAgICAgICAgKTtcbiAgICAgIH0sIHRpbWVvdXRJbk1zKTtcblxuICAgICAgLy8gaWYgdGhlIGNvbm5lY3Rpb24gd2FzIGVzdGFibGlzaGVkLCBjYW5jZWwgdGhlIHRpbWVvdXQuXG4gICAgICBzb2NrZXQub24oXCJjb25uZWN0XCIsICgpID0+IHtcbiAgICAgICAgY2xlYXJUaW1lb3V0KHRpbWVvdXRJZCk7XG4gICAgICB9KTtcbiAgICB9XG4gIH0pO1xufTtcbiJdfQ==","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.setSocketTimeout = void 0;\nconst setSocketTimeout = (request, reject, timeoutInMs = 0) => {\n request.setTimeout(timeoutInMs, () => {\n // destroy the request\n request.destroy();\n reject(Object.assign(new Error(`Connection timed out after ${timeoutInMs} ms`), { name: \"TimeoutError\" }));\n });\n};\nexports.setSocketTimeout = setSocketTimeout;\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic2V0LXNvY2tldC10aW1lb3V0LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vc3JjL3NldC1zb2NrZXQtdGltZW91dC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7QUFFTyxNQUFNLGdCQUFnQixHQUFHLENBQUMsT0FBc0IsRUFBRSxNQUE0QixFQUFFLFdBQVcsR0FBRyxDQUFDLEVBQUUsRUFBRTtJQUN4RyxPQUFPLENBQUMsVUFBVSxDQUFDLFdBQVcsRUFBRSxHQUFHLEVBQUU7UUFDbkMsc0JBQXNCO1FBQ3RCLE9BQU8sQ0FBQyxPQUFPLEVBQUUsQ0FBQztRQUNsQixNQUFNLENBQUMsTUFBTSxDQUFDLE1BQU0sQ0FBQyxJQUFJLEtBQUssQ0FBQyw4QkFBOEIsV0FBVyxLQUFLLENBQUMsRUFBRSxFQUFFLElBQUksRUFBRSxjQUFjLEVBQUUsQ0FBQyxDQUFDLENBQUM7SUFDN0csQ0FBQyxDQUFDLENBQUM7QUFDTCxDQUFDLENBQUM7QUFOVyxRQUFBLGdCQUFnQixvQkFNM0IiLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgeyBDbGllbnRSZXF1ZXN0IH0gZnJvbSBcImh0dHBcIjtcblxuZXhwb3J0IGNvbnN0IHNldFNvY2tldFRpbWVvdXQgPSAocmVxdWVzdDogQ2xpZW50UmVxdWVzdCwgcmVqZWN0OiAoZXJyOiBFcnJvcikgPT4gdm9pZCwgdGltZW91dEluTXMgPSAwKSA9PiB7XG4gIHJlcXVlc3Quc2V0VGltZW91dCh0aW1lb3V0SW5NcywgKCkgPT4ge1xuICAgIC8vIGRlc3Ryb3kgdGhlIHJlcXVlc3RcbiAgICByZXF1ZXN0LmRlc3Ryb3koKTtcbiAgICByZWplY3QoT2JqZWN0LmFzc2lnbihuZXcgRXJyb3IoYENvbm5lY3Rpb24gdGltZWQgb3V0IGFmdGVyICR7dGltZW91dEluTXN9IG1zYCksIHsgbmFtZTogXCJUaW1lb3V0RXJyb3JcIiB9KSk7XG4gIH0pO1xufTtcbiJdfQ==","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.Collector = void 0;\nconst stream_1 = require(\"stream\");\nclass Collector extends stream_1.Writable {\n constructor() {\n super(...arguments);\n this.bufferedBytes = [];\n }\n _write(chunk, encoding, callback) {\n this.bufferedBytes.push(chunk);\n callback();\n }\n}\nexports.Collector = Collector;\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY29sbGVjdG9yLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vc3JjL3N0cmVhbS1jb2xsZWN0b3IvY29sbGVjdG9yLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7OztBQUFBLG1DQUFrQztBQUNsQyxNQUFhLFNBQVUsU0FBUSxpQkFBUTtJQUF2Qzs7UUFDa0Isa0JBQWEsR0FBYSxFQUFFLENBQUM7SUFLL0MsQ0FBQztJQUpDLE1BQU0sQ0FBQyxLQUFhLEVBQUUsUUFBZ0IsRUFBRSxRQUErQjtRQUNyRSxJQUFJLENBQUMsYUFBYSxDQUFDLElBQUksQ0FBQyxLQUFLLENBQUMsQ0FBQztRQUMvQixRQUFRLEVBQUUsQ0FBQztJQUNiLENBQUM7Q0FDRjtBQU5ELDhCQU1DIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHsgV3JpdGFibGUgfSBmcm9tIFwic3RyZWFtXCI7XG5leHBvcnQgY2xhc3MgQ29sbGVjdG9yIGV4dGVuZHMgV3JpdGFibGUge1xuICBwdWJsaWMgcmVhZG9ubHkgYnVmZmVyZWRCeXRlczogQnVmZmVyW10gPSBbXTtcbiAgX3dyaXRlKGNodW5rOiBCdWZmZXIsIGVuY29kaW5nOiBzdHJpbmcsIGNhbGxiYWNrOiAoZXJyPzogRXJyb3IpID0+IHZvaWQpIHtcbiAgICB0aGlzLmJ1ZmZlcmVkQnl0ZXMucHVzaChjaHVuayk7XG4gICAgY2FsbGJhY2soKTtcbiAgfVxufVxuIl19","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.streamCollector = void 0;\nconst collector_1 = require(\"./collector\");\nconst streamCollector = (stream) => new Promise((resolve, reject) => {\n const collector = new collector_1.Collector();\n stream.pipe(collector);\n stream.on(\"error\", (err) => {\n // if the source errors, the destination stream needs to manually end\n collector.end();\n reject(err);\n });\n collector.on(\"error\", reject);\n collector.on(\"finish\", function () {\n const bytes = new Uint8Array(Buffer.concat(this.bufferedBytes));\n resolve(bytes);\n });\n});\nexports.streamCollector = streamCollector;\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIj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cGVzXCI7XG5pbXBvcnQgeyBSZWFkYWJsZSB9IGZyb20gXCJzdHJlYW1cIjtcblxuaW1wb3J0IHsgQ29sbGVjdG9yIH0gZnJvbSBcIi4vY29sbGVjdG9yXCI7XG5cbmV4cG9ydCBjb25zdCBzdHJlYW1Db2xsZWN0b3I6IFN0cmVhbUNvbGxlY3RvciA9IChzdHJlYW06IFJlYWRhYmxlKTogUHJvbWlzZTxVaW50OEFycmF5PiA9PlxuICBuZXcgUHJvbWlzZSgocmVzb2x2ZSwgcmVqZWN0KSA9PiB7XG4gICAgY29uc3QgY29sbGVjdG9yID0gbmV3IENvbGxlY3RvcigpO1xuICAgIHN0cmVhbS5waXBlKGNvbGxlY3Rvcik7XG4gICAgc3RyZWFtLm9uKFwiZXJyb3JcIiwgKGVycikgPT4ge1xuICAgICAgLy8gaWYgdGhlIHNvdXJjZSBlcnJvcnMsIHRoZSBkZXN0aW5hdGlvbiBzdHJlYW0gbmVlZHMgdG8gbWFudWFsbHkgZW5kXG4gICAgICBjb2xsZWN0b3IuZW5kKCk7XG4gICAgICByZWplY3QoZXJyKTtcbiAgICB9KTtcbiAgICBjb2xsZWN0b3Iub24oXCJlcnJvclwiLCByZWplY3QpO1xuICAgIGNvbGxlY3Rvci5vbihcImZpbmlzaFwiLCBmdW5jdGlvbiAodGhpczogQ29sbGVjdG9yKSB7XG4gICAgICBjb25zdCBieXRlcyA9IG5ldyBVaW50OEFycmF5KEJ1ZmZlci5jb25jYXQodGhpcy5idWZmZXJlZEJ5dGVzKSk7XG4gICAgICByZXNvbHZlKGJ5dGVzKTtcbiAgICB9KTtcbiAgfSk7XG4iXX0=","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.writeRequestBody = void 0;\nconst stream_1 = require(\"stream\");\nfunction writeRequestBody(httpRequest, request) {\n const expect = request.headers[\"Expect\"] || request.headers[\"expect\"];\n if (expect === \"100-continue\") {\n httpRequest.on(\"continue\", () => {\n writeBody(httpRequest, request.body);\n });\n }\n else {\n writeBody(httpRequest, request.body);\n }\n}\nexports.writeRequestBody = writeRequestBody;\nfunction writeBody(httpRequest, body) {\n if (body instanceof stream_1.Readable) {\n // pipe automatically handles end\n body.pipe(httpRequest);\n }\n else if (body) {\n httpRequest.end(Buffer.from(body));\n }\n else {\n httpRequest.end();\n }\n}\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoid3JpdGUtcmVxdWVzdC1ib2R5LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vc3JjL3dyaXRlLXJlcXVlc3QtYm9keS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7QUFHQSxtQ0FBa0M7QUFFbEMsU0FBZ0IsZ0JBQWdCLENBQUMsV0FBOEMsRUFBRSxPQUFvQjtJQUNuRyxNQUFNLE1BQU0sR0FBRyxPQUFPLENBQUMsT0FBTyxDQUFDLFFBQVEsQ0FBQyxJQUFJLE9BQU8sQ0FBQyxPQUFPLENBQUMsUUFBUSxDQUFDLENBQUM7SUFDdEUsSUFBSSxNQUFNLEtBQUssY0FBYyxFQUFFO1FBQzdCLFdBQVcsQ0FBQyxFQUFFLENBQUMsVUFBVSxFQUFFLEdBQUcsRUFBRTtZQUM5QixTQUFTLENBQUMsV0FBVyxFQUFFLE9BQU8sQ0FBQyxJQUFJLENBQUMsQ0FBQztRQUN2QyxDQUFDLENBQUMsQ0FBQztLQUNKO1NBQU07UUFDTCxTQUFTLENBQUMsV0FBVyxFQUFFLE9BQU8sQ0FBQyxJQUFJLENBQUMsQ0FBQztLQUN0QztBQUNILENBQUM7QUFURCw0Q0FTQztBQUVELFNBQVMsU0FBUyxDQUNoQixXQUE4QyxFQUM5QyxJQUFxRTtJQUVyRSxJQUFJLElBQUksWUFBWSxpQkFBUSxFQUFFO1FBQzVCLGlDQUFpQztRQUNqQyxJQUFJLENBQUMsSUFBSSxDQUFDLFdBQVcsQ0FBQyxDQUFDO0tBQ3hC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sXG4gIGJvZHk/OiBzdHJpbmcgfCBBcnJheUJ1ZmZlciB8IEFycmF5QnVmZmVyVmlldyB8IFJlYWRhYmxlIHwgVWludDhBcnJheVxuKSB7XG4gIGlmIChib2R5IGluc3RhbmNlb2YgUmVhZGFibGUpIHtcbiAgICAvLyBwaXBlIGF1dG9tYXRpY2FsbHkgaGFuZGxlcyBlbmRcbiAgICBib2R5LnBpcGUoaHR0cFJlcXVlc3QpO1xuICB9IGVsc2UgaWYgKGJvZHkpIHtcbiAgICBodHRwUmVxdWVzdC5lbmQoQnVmZmVyLmZyb20oYm9keSkpO1xuICB9IGVsc2Uge1xuICAgIGh0dHBSZXF1ZXN0LmVuZCgpO1xuICB9XG59XG4iXX0=","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.CredentialsProviderError = exports.ProviderError = void 0;\n/**\n * An error representing a failure of an individual credential provider.\n *\n * This error class has special meaning to the {@link chain} method. If a\n * provider in the chain is rejected with an error, the chain will only proceed\n * to the next provider if the value of the `tryNextLink` property on the error\n * is truthy. This allows individual providers to halt the chain and also\n * ensures the chain will stop if an entirely unexpected error is encountered.\n *\n * @deprecated\n */\nclass ProviderError extends Error {\n constructor(message, tryNextLink = true) {\n super(message);\n this.tryNextLink = tryNextLink;\n }\n static from(error, tryNextLink = true) {\n Object.defineProperty(error, \"tryNextLink\", {\n value: tryNextLink,\n configurable: false,\n enumerable: false,\n writable: false,\n });\n return error;\n }\n}\nexports.ProviderError = ProviderError;\n/**\n * An error representing a failure of an individual credential provider.\n *\n * This error class has special meaning to the {@link chain} method. If a\n * provider in the chain is rejected with an error, the chain will only proceed\n * to the next provider if the value of the `tryNextLink` property on the error\n * is truthy. This allows individual providers to halt the chain and also\n * ensures the chain will stop if an entirely unexpected error is encountered.\n */\nclass CredentialsProviderError extends Error {\n constructor(message, tryNextLink = true) {\n super(message);\n this.tryNextLink = tryNextLink;\n this.name = \"CredentialsProviderError\";\n }\n static from(error, tryNextLink = true) {\n Object.defineProperty(error, \"tryNextLink\", {\n value: tryNextLink,\n configurable: false,\n enumerable: false,\n writable: false,\n });\n return error;\n }\n}\nexports.CredentialsProviderError = CredentialsProviderError;\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiUHJvdmlkZXJFcnJvci5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9Qcm92aWRlckVycm9yLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7OztBQUFBOzs7Ozs7Ozs7O0dBVUc7QUFDSCxNQUFhLGFBQWMsU0FBUSxLQUFLO0lBQ3RDLFlBQVksT0FBZSxFQUFrQixjQUF1QixJQUFJO1FBQ3RFLEtBQUssQ0FBQyxPQUFPLENBQUMsQ0FBQztRQUQ0QixnQkFBVyxHQUFYLFdBQVcsQ0FBZ0I7SUFFeEUsQ0FBQztJQUNELE1BQU0sQ0FBQyxJQUFJLENBQUMsS0FBWSxFQUFFLFdBQVcsR0FBRyxJQUFJO1FBQzFDLE1BQU0sQ0FBQyxjQUFjLENBQUMsS0FBSyxFQUFFLGFBQWEsRUFBRTtZQUMxQyxLQUFLLEVBQUUsV0FBVztZQUNsQixZQUFZLEVBQUUsS0FBSztZQUNuQixVQUFVLEVBQUUsS0FBSztZQUNqQixRQUFRLEVBQUUsS0FBSztTQUNoQixDQUFDLENBQUM7UUFDSCxPQUFPLEtBQXNCLENBQUM7SUFDaEMsQ0FBQztDQUNGO0FBYkQsc0NBYUM7QUFFRDs7Ozs7Ozs7R0FRRztBQUNILE1BQWEsd0JBQXlCLFNBQVEsS0FBSztJQUVqRCxZQUFZLE9BQWUsRUFBa0IsY0FBdUIsSUFBSTtRQUN0RSxLQUFLLENBQUMsT0FBTyxDQUFDLENBQUM7UUFENEIsZ0JBQVcsR0FBWCxXQUFXLENBQWdCO1FBRC9ELFNBQUksR0FBRywwQkFBMEIsQ0FBQztJQUczQyxDQUFDO0lBQ0QsTUFBTSxD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YWluIHdpbGwgc3RvcCBpZiBhbiBlbnRpcmVseSB1bmV4cGVjdGVkIGVycm9yIGlzIGVuY291bnRlcmVkLlxuICovXG5leHBvcnQgY2xhc3MgQ3JlZGVudGlhbHNQcm92aWRlckVycm9yIGV4dGVuZHMgRXJyb3Ige1xuICByZWFkb25seSBuYW1lID0gXCJDcmVkZW50aWFsc1Byb3ZpZGVyRXJyb3JcIjtcbiAgY29uc3RydWN0b3IobWVzc2FnZTogc3RyaW5nLCBwdWJsaWMgcmVhZG9ubHkgdHJ5TmV4dExpbms6IGJvb2xlYW4gPSB0cnVlKSB7XG4gICAgc3VwZXIobWVzc2FnZSk7XG4gIH1cbiAgc3RhdGljIGZyb20oZXJyb3I6IEVycm9yLCB0cnlOZXh0TGluayA9IHRydWUpOiBDcmVkZW50aWFsc1Byb3ZpZGVyRXJyb3Ige1xuICAgIE9iamVjdC5kZWZpbmVQcm9wZXJ0eShlcnJvciwgXCJ0cnlOZXh0TGlua1wiLCB7XG4gICAgICB2YWx1ZTogdHJ5TmV4dExpbmssXG4gICAgICBjb25maWd1cmFibGU6IGZhbHNlLFxuICAgICAgZW51bWVyYWJsZTogZmFsc2UsXG4gICAgICB3cml0YWJsZTogZmFsc2UsXG4gICAgfSk7XG4gICAgcmV0dXJuIGVycm9yIGFzIENyZWRlbnRpYWxzUHJvdmlkZXJFcnJvcjtcbiAgfVxufVxuIl19","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.chain = void 0;\nconst ProviderError_1 = require(\"./ProviderError\");\n/**\n * Compose a single credential provider function from multiple credential\n * providers. The first provider in the argument list will always be invoked;\n * subsequent providers in the list will be invoked in the order in which the\n * were received if the preceding provider did not successfully resolve.\n *\n * If no providers were received or no provider resolves successfully, the\n * returned promise will be rejected.\n */\nfunction chain(...providers) {\n return () => {\n let promise = Promise.reject(new ProviderError_1.ProviderError(\"No providers in chain\"));\n for (const provider of providers) {\n promise = promise.catch((err) => {\n if (err === null || err === void 0 ? void 0 : err.tryNextLink) {\n return provider();\n }\n throw err;\n });\n }\n return promise;\n };\n}\nexports.chain = chain;\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY2hhaW4uanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvY2hhaW4udHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7O0FBRUEsbURBQWdEO0FBRWhEOzs7Ozs7OztHQVFHO0FBQ0gsU0FBZ0IsS0FBSyxDQUFJLEdBQUcsU0FBNkI7SUFDdkQsT0FBTyxHQUFHLEVBQUU7UUFDVixJQUFJLE9BQU8sR0FBZSxPQUFPLENBQUMsTUFBTSxDQUFDLElBQUksNkJBQWEsQ0FBQyx1QkFBdUIsQ0FBQyxDQUFDLENBQUM7UUFDckYsS0FBSyxNQUFNLFFBQVEsSUFBSSxTQUFTLEVBQUU7WUFDaEMsT0FBTyxHQUFHLE9BQU8sQ0FBQyxLQUFLLENBQUMsQ0FBQyxHQUFRLEVBQUUsRUFBRTtnQkFDbkMsSUFBSSxHQUFHLGFBQUgsR0FBRyx1QkFBSCxHQUFHLENBQUUsV0FBVyxFQUFFO29CQUNwQixPQUFPLFFBQVEsRUFBRSxDQUFDO2lCQUNuQjtnQkFFRCxNQUFNLEdBQUcsQ0FBQztZQUNaLENBQUMsQ0FBQyxDQUFDO1NBQ0o7UUFFRCxPQUFPLE9BQU8sQ0FBQztJQUNqQixDQUFDLENBQUM7QUFDSixDQUFDO0FBZkQsc0JBZUMiLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgeyBQcm92aWRlciB9IGZyb20gXCJAYXdzLXNkay90eXBlc1wiO1xuXG5pbXBvcnQgeyBQcm92aWRlckVycm9yIH0gZnJvbSBcIi4vUHJvdmlkZXJFcnJvclwiO1xuXG4vKipcbiAqIENvbXBvc2UgYSBzaW5nbGUgY3JlZGVudGlhbCBwcm92aWRlciBmdW5jdGlvbiBmcm9tIG11bH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, \"__esModule\", { value: true });\nexports.fromStatic = void 0;\nconst fromStatic = (staticValue) => () => Promise.resolve(staticValue);\nexports.fromStatic = fromStatic;\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZnJvbVN0YXRpYy5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9mcm9tU3RhdGljLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7OztBQUVPLE1BQU0sVUFBVSxHQUNyQixDQUFJLFdBQWMsRUFBZSxFQUFFLENBQ25DLEdBQUcsRUFBRSxDQUNILE9BQU8sQ0FBQyxPQUFPLENBQUMsV0FBVyxDQUFDLENBQUM7QUFIcEIsUUFBQSxVQUFVLGNBR1UiLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgeyBQcm92aWRlciB9IGZyb20gXCJAYXdzLXNkay90eXBlc1wiO1xuXG5leHBvcnQgY29uc3QgZnJvbVN0YXRpYyA9XG4gIDxUPihzdGF0aWNWYWx1ZTogVCk6IFByb3ZpZGVyPFQ+ID0+XG4gICgpID0+XG4gICAgUHJvbWlzZS5yZXNvbHZlKHN0YXRpY1ZhbHVlKTtcbiJdfQ==","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst tslib_1 = require(\"tslib\");\ntslib_1.__exportStar(require(\"./chain\"), exports);\ntslib_1.__exportStar(require(\"./fromStatic\"), exports);\ntslib_1.__exportStar(require(\"./memoize\"), exports);\ntslib_1.__exportStar(require(\"./ProviderError\"), exports);\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvaW5kZXgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7O0FBQUEsa0RBQXdCO0FBQ3hCLHVEQUE2QjtBQUM3QixvREFBMEI7QUFDMUIsMERBQWdDIiwic291cmNlc0NvbnRlbnQiOlsiZXhwb3J0ICogZnJvbSBcIi4vY2hhaW5cIjtcbmV4cG9ydCAqIGZyb20gXCIuL2Zyb21TdGF0aWNcIjtcbmV4cG9ydCAqIGZyb20gXCIuL21lbW9pemVcIjtcbmV4cG9ydCAqIGZyb20gXCIuL1Byb3ZpZGVyRXJyb3JcIjtcbiJdfQ==","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.memoize = void 0;\nconst memoize = (provider, isExpired, requiresRefresh) => {\n let resolved;\n let pending;\n let hasResult;\n // Wrapper over supplied provider with side effect to handle concurrent invocation.\n const coalesceProvider = async () => {\n if (!pending) {\n pending = provider();\n }\n try {\n resolved = await pending;\n hasResult = true;\n }\n finally {\n pending = undefined;\n }\n return resolved;\n };\n if (isExpired === undefined) {\n // This is a static memoization; no need to incorporate refreshing\n return async () => {\n if (!hasResult) {\n resolved = await coalesceProvider();\n }\n return resolved;\n };\n }\n let isConstant = false;\n return async () => {\n if (!hasResult) {\n resolved = await coalesceProvider();\n }\n if (isConstant) {\n return resolved;\n }\n if (requiresRefresh && !requiresRefresh(resolved)) {\n isConstant = true;\n return resolved;\n }\n if (isExpired(resolved)) {\n await coalesceProvider();\n return resolved;\n }\n return resolved;\n };\n};\nexports.memoize = memoize;\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibWVtb2l6ZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9tZW1vaXplLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7OztBQTBDTyxNQUFNLE9BQU8sR0FBb0IsQ0FDdEMsUUFBcUIsRUFDckIsU0FBb0MsRUFDcEMsZUFBMEMsRUFDN0IsRUFBRTtJQUNmLElBQUksUUFBVyxDQUFDO0lBQ2hCLElBQUksT0FBK0IsQ0FBQztJQUNwQyxJQUFJLFNBQWtCLENBQUM7SUFDdkIsbUZBQ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bGQgYmUgY2FjaGVkLlxuICAgKiBAcGFyYW0gaXNFeHBpcmVkICAgICAgICAgQSBmdW5jdGlvbiB0aGF0IHdpbGwgZXZhbHVhdGUgdGhlIHJlc29sdmVkIHZhbHVlIGFuZFxuICAgKiAgICAgICAgICAgICAgICAgICAgICAgICAgZGV0ZXJtaW5lIGlmIGl0IGlzIGV4cGlyZWQuIEZvciBleGFtcGxlLCB3aGVuXG4gICAqICAgICAgICAgICAgICAgICAgICAgICAgICBtZW1vaXppbmcgQVdTIGNyZWRlbnRpYWwgcHJvdmlkZXJzLCB0aGlzIGZ1bmN0aW9uXG4gICAqICAgICAgICAgICAgICAgICAgICAgICAgICBzaG91bGQgcmV0dXJuIGB0cnVlYCB3aGVuIHRoZSBjcmVkZW50aWFsJ3NcbiAgICogICAgICAgICAgICAgICAgICAgICAgICAgIGV4cGlyYXRpb24gaXMgaW4gdGhlIHBhc3QgKG9yIHZlcnkgbmVhciBmdXR1cmUpIGFuZFxuICAgKiAgICAgICAgICAgICAgICAgICAgICAgICAgYGZhbHNlYCBvdGhlcndpc2UuXG4gICAqIEBwYXJhbSByZXF1aXJlc1JlZnJlc2ggICBBIGZ1bmN0aW9uIHRoYXQgd2lsbCBldmFsdWF0ZSB0aGUgcmVzb2x2ZWQgdmFsdWUgYW5kXG4gICAqICAgICAgICAgICAgICAgICAgICAgICAgICBkZXRlcm1pbmUgaWYgaXQgcmVwcmVzZW50cyBzdGF0aWMgdmFsdWUgb3Igb25lIHRoYXRcbiAgICogICAgICAgICAgICAgICAgICAgICAgICAgIHdpbGwgZXZlbnR1YWxseSBuZWVkIHRvIGJlIHJlZnJlc2hlZC4gRm9yIGV4YW1wbGUsXG4gICAqICAgICAgICAgICAgICAgICAgICAgICAgICBBV1MgY3JlZGVudGlhbHMgdGhhdCBoYXZlIG5vIGRlZmluZWQgZXhwaXJhdGlvbiB3aWxsXG4gICAqICAgICAgICAgICAgICAgICAgICAgICAgICBuZXZlciBuZWVkIHRvIGJlIHJlZ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HZlZDtcbiAgICB9XG4gICAgcmV0dXJuIHJlc29sdmVkO1xuICB9O1xufTtcbiJdfQ==","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaHR0cEhhbmRsZXIuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvaHR0cEhhbmRsZXIudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IiIsInNvdXJjZXNDb250ZW50IjpbImltcG9ydCB7IEh0dHBIYW5kbGVyT3B0aW9ucywgUmVxdWVzdEhhbmRsZXIgfSBmcm9tIFwiQGF3cy1zZGsvdHlwZXNcIjtcblxuaW1wb3J0IHsgSHR0cFJlcXVlc3QgfSBmcm9tIFwiLi9odHRwUmVxdWVzdFwiO1xuaW1wb3J0IHsgSHR0cFJlc3BvbnNlIH0gZnJvbSBcIi4vaHR0cFJlc3BvbnNlXCI7XG5cbmV4cG9ydCB0eXBlIEh0dHBIYW5kbGVyID0gUmVxdWVzdEhhbmRsZXI8SHR0cFJlcXVlc3QsIEh0dHBSZXNwb25zZSwgSHR0cEhhbmRsZXJPcHRpb25zPjtcbiJdfQ==","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.HttpRequest = void 0;\nclass HttpRequest {\n constructor(options) {\n this.method = options.method || \"GET\";\n this.hostname = options.hostname || \"localhost\";\n this.port = options.port;\n this.query = options.query || {};\n this.headers = options.headers || {};\n this.body = options.body;\n this.protocol = options.protocol\n ? options.protocol.substr(-1) !== \":\"\n ? `${options.protocol}:`\n : options.protocol\n : \"https:\";\n this.path = options.path ? (options.path.charAt(0) !== \"/\" ? `/${options.path}` : options.path) : \"/\";\n }\n static isInstance(request) {\n //determine if request is a valid httpRequest\n if (!request)\n return false;\n const req = request;\n return (\"method\" in req &&\n \"protocol\" in req &&\n \"hostname\" in req &&\n \"path\" in req &&\n typeof req[\"query\"] === \"object\" &&\n typeof req[\"headers\"] === \"object\");\n }\n clone() {\n const cloned = new HttpRequest({\n ...this,\n headers: { ...this.headers },\n });\n if (cloned.query)\n cloned.query = cloneQuery(cloned.query);\n return cloned;\n }\n}\nexports.HttpRequest = HttpRequest;\nfunction cloneQuery(query) {\n return Object.keys(query).reduce((carry, paramName) => {\n const param = query[paramName];\n return {\n ...carry,\n [paramName]: Array.isArray(param) ? [...param] : param,\n };\n }, {});\n}\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaHR0cFJlcXVlc3QuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvaHR0cFJlcXVlc3QudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7O0FBTUEsTUFBYSxXQUFXO0lBVXRCLFlBQVksT0FBMkI7UUFDckMsSUFBSSxDQUFDLE1BQU0sR0FBRyxPQUFPLENBQUMsTUFBTSxJQUFJLEtBQUssQ0FBQztRQUN0QyxJQUFJLENBQUMsUUFBUSxHQUFHLE9BQU8sQ0FBQyxRQUFRLElBQUksV0FBVyxDQUFDO1FBQ2hELElBQUksQ0FBQyxJQUFJLEdBQUcsT0FBTyxDQUFDLElBQUksQ0FBQztRQUN6QixJQUFJLENBQUMsS0FBSyxHQUFHLE9BQU8sQ0FBQyxLQUFLLElBQUksRUFBRSxDQUFDO1FBQ2pDLElBQUksQ0FBQyxPQUFPLEdBQUcsT0FBTyxDQUFDLE9BQU8sSUFBSSxFQUFFLENBQUM7UUFDckMsSUFBSSxDQUFDLElBQUksR0FBRyxPQUFPLENBQUMsSUFBSSxDQUFDO1FBQ3pCLElBQUksQ0FBQyxRQUFRLEdBQUcsT0FBTyxDQUFDLFFBQVE7WUFDOUIsQ0FBQyxDQUFDLE9BQU8sQ0FBQyxRQUFRLENBQUMsTUFBTSxDQUFDLENBQUMsQ0FBQyxDQUFDLEtBQUssR0FBRztnQkFDbkMsQ0FBQyxDQUFD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wYXJhbU5hbWVdO1xuICAgIHJldHVybiB7XG4gICAgICAuLi5jYXJyeSxcbiAgICAgIFtwYXJhbU5hbWVdOiBBcnJheS5pc0FycmF5KHBhcmFtKSA/IFsuLi5wYXJhbV0gOiBwYXJhbSxcbiAgICB9O1xuICB9LCB7fSk7XG59XG4iXX0=","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.HttpResponse = void 0;\nclass HttpResponse {\n constructor(options) {\n this.statusCode = options.statusCode;\n this.headers = options.headers || {};\n this.body = options.body;\n }\n static isInstance(response) {\n //determine if response is a valid HttpResponse\n if (!response)\n return false;\n const resp = response;\n return typeof resp.statusCode === \"number\" && typeof resp.headers === \"object\";\n }\n}\nexports.HttpResponse = HttpResponse;\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaHR0cFJlc3BvbnNlLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vc3JjL2h0dHBSZXNwb25zZS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7QUFRQSxNQUFhLFlBQVk7SUFLdkIsWUFBWSxPQUE0QjtRQUN0QyxJQUFJLENBQUMsVUFBVSxHQUFHLE9BQU8sQ0FBQyxVQUFVLENBQUM7UUFDckMsSUFBSSxDQUFDLE9BQU8sR0FBRyxPQUFPLENBQUMsT0FBTyxJQUFJLEVBQUUsQ0FBQztRQUNyQyxJQUFJLENBQUMsSUFBSSxHQUFHLE9BQU8sQ0FBQyxJQUFJLENBQUM7SUFDM0IsQ0FBQztJQUVELE1BQU0sQ0FBQyxVQUFVLENBQUMsUUFBaUI7UUFDakMsK0NBQStDO1FBQy9DLElBQUksQ0FBQyxRQUFRO1lBQUUsT0FBTyxLQUFLLENBQUM7UUFDNUIsTUFBTSxJQUFJLEdBQUcsUUFBZSxDQUFDO1FBQzdCLE9BQU8sT0FBTyxJQUFJLENBQUMsVUFBVSxLQUFLLFFBQVEsSUFBSSx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lwZW9mIHJlc3Auc3RhdHVzQ29kZSA9PT0gXCJudW1iZXJcIiAmJiB0eXBlb2YgcmVzcC5oZWFkZXJzID09PSBcIm9iamVjdFwiO1xuICB9XG59XG4iXX0=","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst tslib_1 = require(\"tslib\");\ntslib_1.__exportStar(require(\"./httpResponse\"), exports);\ntslib_1.__exportStar(require(\"./httpRequest\"), exports);\ntslib_1.__exportStar(require(\"./httpHandler\"), exports);\ntslib_1.__exportStar(require(\"./isValidHostname\"), exports);\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvaW5kZXgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7O0FBQUEseURBQStCO0FBQy9CLHdEQUE4QjtBQUM5Qix3REFBOEI7QUFDOUIsNERBQWtDIiwic291cmNlc0NvbnRlbnQiOlsiZXhwb3J0ICogZnJvbSBcIi4vaHR0cFJlc3BvbnNlXCI7XG5leHBvcnQgKiBmcm9tIFwiLi9odHRwUmVxdWVzdFwiO1xuZXhwb3J0ICogZnJvbSBcIi4vaHR0cEhhbmRsZXJcIjtcbmV4cG9ydCAqIGZyb20gXCIuL2lzVmFsaWRIb3N0bmFtZVwiO1xuIl19","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.isValidHostname = void 0;\nfunction isValidHostname(hostname) {\n const hostPattern = /^[a-z0-9][a-z0-9\\.\\-]*[a-z0-9]$/;\n return hostPattern.test(hostname);\n}\nexports.isValidHostname = isValidHostname;\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaXNWYWxpZEhvc3RuYW1lLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vc3JjL2lzVmFsaWRIb3N0bmFtZS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7QUFBQSxTQUFnQixlQUFlLENBQUMsUUFBZ0I7SUFDOUMsTUFBTSxXQUFXLEdBQUcsaUNBQWlDLENBQUM7SUFDdEQsT0FBTyxXQUFXLENBQUMsSUFBSSxDQUFDLFFBQVEsQ0FBQyxDQUFDO0FBQ3BDLENBQUM7QUFIRCwwQ0FHQyIsInNvdXJjZXNDb250ZW50IjpbImV4cG9ydCBmdW5jdGlvbiBpc1ZhbGlkSG9zdG5hbWUoaG9zdG5hbWU6IHN0cmluZyk6IGJvb2xlYW4ge1xuICBjb25zdCBob3N0UGF0dGVybiA9IC9eW2EtejAtOV1bYS16MC05XFwuXFwtXSpbYS16MC05XSQvO1xuICByZXR1cm4gaG9zdFBhdHRlcm4udGVzdChob3N0bmFtZSk7XG59XG4iXX0=","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.buildQueryString = void 0;\nconst util_uri_escape_1 = require(\"@aws-sdk/util-uri-escape\");\nfunction buildQueryString(query) {\n const parts = [];\n for (let key of Object.keys(query).sort()) {\n const value = query[key];\n key = util_uri_escape_1.escapeUri(key);\n if (Array.isArray(value)) {\n for (let i = 0, iLen = value.length; i < iLen; i++) {\n parts.push(`${key}=${util_uri_escape_1.escapeUri(value[i])}`);\n }\n }\n else {\n let qsEntry = key;\n if (value || typeof value === \"string\") {\n qsEntry += `=${util_uri_escape_1.escapeUri(value)}`;\n }\n parts.push(qsEntry);\n }\n }\n return parts.join(\"&\");\n}\nexports.buildQueryString = buildQueryString;\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvaW5kZXgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7O0FBQ0EsOERBQXFEO0FBRXJELFNBQWdCLGdCQUFnQixDQUFDLEtBQXdCO0lBQ3ZELE1BQU0sS0FBSy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SBmcm9tIFwiQGF3cy1zZGsvdXRpbC11cmktZXNjYXBlXCI7XG5cbmV4cG9ydCBmdW5jdGlvbiBidWlsZFF1ZXJ5U3RyaW5nKHF1ZXJ5OiBRdWVyeVBhcmFtZXRlckJhZyk6IHN0cmluZyB7XG4gIGNvbnN0IHBhcnRzOiBzdHJpbmdbXSA9IFtdO1xuICBmb3IgKGxldCBrZXkgb2YgT2JqZWN0LmtleXMocXVlcnkpLnNvcnQoKSkge1xuICAgIGNvbnN0IHZhbHVlID0gcXVlcnlba2V5XTtcbiAgICBrZXkgPSBlc2NhcGVVcmkoa2V5KTtcbiAgICBpZiAoQXJyYXkuaXNBcnJheSh2YWx1ZSkpIHtcbiAgICAgIGZvciAobGV0IGkgPSAwLCBpTGVuID0gdmFsdWUubGVuZ3RoOyBpIDwgaUxlbjsgaSsrKSB7XG4gICAgICAgIHBhcnRzLnB1c2goYCR7a2V5fT0ke2VzY2FwZVVyaSh2YWx1ZVtpXSl9YCk7XG4gICAgICB9XG4gICAgfSBlbHNlIHtcbiAgICAgIGxldCBxc0VudHJ5ID0ga2V5O1xuICAgICAgaWYgKHZhbHVlIHx8IHR5cGVvZiB2YWx1ZSA9PT0gXCJzdHJpbmdcIikge1xuICAgICAgICBxc0VudHJ5ICs9IGA9JHtlc2NhcGVVcmkodmFsdWUpfWA7XG4gICAgICB9XG4gICAgICBwYXJ0cy5wdXNoKHFzRW50cnkpO1xuICAgIH1cbiAgfVxuXG4gIHJldHVybiBwYXJ0cy5qb2luKFwiJlwiKTtcbn1cbiJdfQ==","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.parseQueryString = void 0;\nfunction parseQueryString(querystring) {\n const query = {};\n querystring = querystring.replace(/^\\?/, \"\");\n if (querystring) {\n for (const pair of querystring.split(\"&\")) {\n let [key, value = null] = pair.split(\"=\");\n key = decodeURIComponent(key);\n if (value) {\n value = decodeURIComponent(value);\n }\n if (!(key in query)) {\n query[key] = value;\n }\n else if (Array.isArray(query[key])) {\n query[key].push(value);\n }\n else {\n query[key] = [query[key], value];\n }\n }\n }\n return query;\n}\nexports.parseQueryString = parseQueryString;\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvaW5kZXgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7O0FBRUEsU0FBZ0IsZ0JBQWdCLENBQUMsV0FBbUI7SUFDbEQsTUFBTSxLQUFLLEdBQXNCLEVBQUUsQ0FBQztJQUNwQyxXQUFXLEdBQUcsV0FBVyxDQUFDLE9BQU8sQ0FBQyxLQUFLLEVBQUUsRUFBRSxDQUFDLENBQUM7SUFFN0MsSUFBSSxXQUFXLEVBQUU7UUFDZixLQUFLLE1BQU0sSUFBSSxJQUFJLFdBQVcsQ0FBQyxLQUFLLENBQUMsR0FBRyxDQUFDLEVBQUU7WUFDekMsSUFBSSxDQUFDLEdBQUcsRUFBRSxLQUFLLEdBQUcsSUFBSSxDQUFDLEdBQUcsSUFBSSxDQUFDLEtBQUssQ0FBQyxHQUFHLENBQUMsQ0FBQztZQUMxQyxHQUFHLEdBQUcsa0JBQWtCLENBQUMsR0FBRyxDQUFDLENBQUM7WUFDOUIsSUFBSSxLQUFLLEVBQUU7Z0JBQ1QsS0FBSyxHQUFHLGtCQUFrQixDQUFDLEtBQUssQ0FBQyxDQUFDO2FBQ25DO1lBQ0QsSUFBSSxDQUFDLENBQUMsR0FBRyxJQUFJLEtBQUssQ0FBQyxFQUFFO2dCQUNuQixLQUFLLENBQUMsR0FBRyxDQUFDLEdBQUcsS0FBSyxDQUFDO2FBQ3BCO2lCQUFNLElBQUksS0FBSyxDQUFDLE9BQU8sQ0FBQyxLQUFLLENBQUMsR0FBRyxDQUFDLENBQUMsRUFBRTtnQkFDbkMsS0FBSyxDQUFDLEdBQUcsQ0FBbUIsQ0FBQyxJQUFJLENBQUMsS0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c3RyaW5nKTtcbiAgICAgIH0gZWxzZSB7XG4gICAgICAgIHF1ZXJ5W2tleV0gPSBbcXVlcnlba2V5XSBhcyBzdHJpbmcsIHZhbHVlIGFzIHN0cmluZ107XG4gICAgICB9XG4gICAgfVxuICB9XG5cbiAgcmV0dXJuIHF1ZXJ5O1xufVxuIl19","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.TRANSIENT_ERROR_STATUS_CODES = exports.TRANSIENT_ERROR_CODES = exports.THROTTLING_ERROR_CODES = exports.CLOCK_SKEW_ERROR_CODES = void 0;\n/**\n * Errors encountered when the client clock and server clock cannot agree on the\n * current time.\n *\n * These errors are retryable, assuming the SDK has enabled clock skew\n * correction.\n */\nexports.CLOCK_SKEW_ERROR_CODES = [\n \"AuthFailure\",\n \"InvalidSignatureException\",\n \"RequestExpired\",\n \"RequestInTheFuture\",\n \"RequestTimeTooSkewed\",\n \"SignatureDoesNotMatch\",\n];\n/**\n * Errors that indicate the SDK is being throttled.\n *\n * These errors are always retryable.\n */\nexports.THROTTLING_ERROR_CODES = [\n \"BandwidthLimitExceeded\",\n \"EC2ThrottledException\",\n \"LimitExceededException\",\n \"PriorRequestNotComplete\",\n \"ProvisionedThroughputExceededException\",\n \"RequestLimitExceeded\",\n \"RequestThrottled\",\n \"RequestThrottledException\",\n \"SlowDown\",\n \"ThrottledException\",\n \"Throttling\",\n \"ThrottlingException\",\n \"TooManyRequestsException\",\n \"TransactionInProgressException\", // DynamoDB\n];\n/**\n * Error codes that indicate transient issues\n */\nexports.TRANSIENT_ERROR_CODES = [\"AbortError\", \"TimeoutError\", \"RequestTimeout\", \"RequestTimeoutException\"];\n/**\n * Error codes that indicate transient issues\n */\nexports.TRANSIENT_ERROR_STATUS_CODES = [500, 502, 503, 504];\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY29uc3RhbnRzLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi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LyBEeW5hbW9EQlxuXTtcblxuLyoqXG4gKiBFcnJvciBjb2RlcyB0aGF0IGluZGljYXRlIHRyYW5zaWVudCBpc3N1ZXNcbiAqL1xuZXhwb3J0IGNvbnN0IFRSQU5TSUVOVF9FUlJPUl9DT0RFUyA9IFtcIkFib3J0RXJyb3JcIiwgXCJUaW1lb3V0RXJyb3JcIiwgXCJSZXF1ZXN0VGltZW91dFwiLCBcIlJlcXVlc3RUaW1lb3V0RXhjZXB0aW9uXCJdO1xuXG4vKipcbiAqIEVycm9yIGNvZGVzIHRoYXQgaW5kaWNhdGUgdHJhbnNpZW50IGlzc3Vlc1xuICovXG5leHBvcnQgY29uc3QgVFJBTlNJRU5UX0VSUk9SX1NUQVRVU19DT0RFUyA9IFs1MDAsIDUwMiwgNTAzLCA1MDRdO1xuIl19","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.isTransientError = exports.isThrottlingError = exports.isClockSkewError = exports.isRetryableByTrait = void 0;\nconst constants_1 = require(\"./constants\");\nconst isRetryableByTrait = (error) => error.$retryable !== undefined;\nexports.isRetryableByTrait = isRetryableByTrait;\nconst isClockSkewError = (error) => constants_1.CLOCK_SKEW_ERROR_CODES.includes(error.name);\nexports.isClockSkewError = isClockSkewError;\nconst isThrottlingError = (error) => {\n var _a, _b;\n return ((_a = error.$metadata) === null || _a === void 0 ? void 0 : _a.httpStatusCode) === 429 ||\n constants_1.THROTTLING_ERROR_CODES.includes(error.name) ||\n ((_b = error.$retryable) === null || _b === void 0 ? void 0 : _b.throttling) == true;\n};\nexports.isThrottlingError = isThrottlingError;\nconst isTransientError = (error) => {\n var _a;\n return constants_1.TRANSIENT_ERROR_CODES.includes(error.name) ||\n constants_1.TRANSIENT_ERROR_STATUS_CODES.includes(((_a = error.$metadata) === null || _a === void 0 ? void 0 : _a.httpStatusCode) || 0);\n};\nexports.isTransientError = isTransientError;\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoia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, \"__esModule\", { value: true });\nexports.getHomeDir = exports.loadSharedConfigFiles = exports.ENV_CONFIG_PATH = exports.ENV_CREDENTIALS_PATH = void 0;\nconst fs_1 = require(\"fs\");\nconst os_1 = require(\"os\");\nconst path_1 = require(\"path\");\nexports.ENV_CREDENTIALS_PATH = \"AWS_SHARED_CREDENTIALS_FILE\";\nexports.ENV_CONFIG_PATH = \"AWS_CONFIG_FILE\";\nconst swallowError = () => ({});\nconst loadSharedConfigFiles = (init = {}) => {\n const { filepath = process.env[exports.ENV_CREDENTIALS_PATH] || path_1.join(exports.getHomeDir(), \".aws\", \"credentials\"), configFilepath = process.env[exports.ENV_CONFIG_PATH] || path_1.join(exports.getHomeDir(), \".aws\", \"config\"), } = init;\n return Promise.all([\n slurpFile(configFilepath).then(parseIni).then(normalizeConfigFile).catch(swallowError),\n slurpFile(filepath).then(parseIni).catch(swallowError),\n ]).then((parsedFiles) => {\n const [configFile, credentialsFile] = parsedFiles;\n return {\n configFile,\n credentialsFile,\n };\n });\n};\nexports.loadSharedConfigFiles = loadSharedConfigFiles;\nconst profileKeyRegex = /^profile\\s([\"'])?([^\\1]+)\\1$/;\nconst normalizeConfigFile = (data) => {\n const map = {};\n for (const key of Object.keys(data)) {\n let matches;\n if (key === \"default\") {\n map.default = data.default;\n }\n else if ((matches = profileKeyRegex.exec(key))) {\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n const [_1, _2, normalizedKey] = matches;\n if (normalizedKey) {\n map[normalizedKey] = data[key];\n }\n }\n }\n return map;\n};\nconst profileNameBlockList = [\"__proto__\", \"profile __proto__\"];\nconst parseIni = (iniData) => {\n const map = {};\n let currentSection;\n for (let line of iniData.split(/\\r?\\n/)) {\n line = line.split(/(^|\\s)[;#]/)[0]; // remove comments\n const section = line.match(/^\\s*\\[([^\\[\\]]+)]\\s*$/);\n if (section) {\n currentSection = section[1];\n if (profileNameBlockList.includes(currentSection)) {\n throw new Error(`Found invalid profile name \"${currentSection}\"`);\n }\n }\n else if (currentSection) {\n const item = line.match(/^\\s*(.+?)\\s*=\\s*(.+?)\\s*$/);\n if (item) {\n map[currentSection] = map[currentSection] || {};\n map[currentSection][item[1]] = item[2];\n }\n }\n }\n return map;\n};\nconst slurpFile = (path) => new Promise((resolve, reject) => {\n fs_1.readFile(path, \"utf8\", (err, data) => {\n if (err) {\n reject(err);\n }\n else {\n resolve(data);\n }\n });\n});\n/**\n * Get the HOME directory for the current runtime.\n *\n * @internal\n */\nconst getHomeDir = () => {\n const { HOME, USERPROFILE, HOMEPATH, HOMEDRIVE = `C:${path_1.sep}` } = process.env;\n if (HOME)\n return HOME;\n if (USERPROFILE)\n return USERPROFILE;\n if (HOMEPATH)\n return `${HOMEDRIVE}${HOMEPATH}`;\n return os_1.homedir();\n};\nexports.getHomeDir = getHomeDir;\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvaW5kZXgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7O0FBQUEsMkJBQThCO0FBQzlCLDJCQUE2QjtBQUM3QiwrQkFBaUM7QUFFcEIsUUFBQSxvQkFBb0IsR0FBRyw2QkFBNkIsQ0FBQztBQUNyRCxRQUFBLGVBQWUsR0FBRyxpQkFBaUIsQ0FBQztBQStCakQsTUFBTSxZQUFZLEdBQUcsR0FBRyxFQUFFLENBQUMsQ0FBQyxFQUFFLENBQUMsQ0FBQztBQUV6QixNQUFNLHFCQUFxQixHQUFHLENBQUMsT0FBeUIsRUFBRSxFQUE4QixFQUFFO0lBQy9GLE1BQU0sRUFDSixRQUFRLEdBQUcsT0FBTyxDQUFDLEdBQUcsQ0FBQyw0QkFBb0IsQ0FBQyxJQUFJLFdBQUksQ0FBQyxrQkFBVSxFQUFFLEVBQUUsTUFBTSxFQUFFLGFBQWEsQ0FBQyxFQUN6RixjQUFjLEdBQUcsT0FBTyxDQUFDLE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W1bMl07XG4gICAgICB9XG4gICAgfVxuICB9XG5cbiAgcmV0dXJuIG1hcDtcbn07XG5cbmNvbnN0IHNsdXJwRmlsZSA9IChwYXRoOiBzdHJpbmcpOiBQcm9taXNlPHN0cmluZz4gPT5cbiAgbmV3IFByb21pc2UoKHJlc29sdmUsIHJlamVjdCkgPT4ge1xuICAgIHJlYWRGaWxlKHBhdGgsIFwidXRmOFwiLCAoZXJyLCBkYXRhKSA9PiB7XG4gICAgICBpZiAoZXJyKSB7XG4gICAgICAgIHJlamVjdChlcnIpO1xuICAgICAgfSBlbHNlIHtcbiAgICAgICAgcmVzb2x2ZShkYXRhKTtcbiAgICAgIH1cbiAgICB9KTtcbiAgfSk7XG5cbi8qKlxuICogR2V0IHRoZSBIT01FIGRpcmVjdG9yeSBmb3IgdGhlIGN1cnJlbnQgcnVudGltZS5cbiAqXG4gKiBAaW50ZXJuYWxcbiAqL1xuZXhwb3J0IGNvbnN0IGdldEhvbWVEaXIgPSAoKTogc3RyaW5nID0+IHtcbiAgY29uc3QgeyBIT01FLCBVU0VSUFJPRklMRSwgSE9NRVBBVEgsIEhPTUVEUklWRSA9IGBDOiR7c2VwfWAgfSA9IHByb2Nlc3MuZW52O1xuXG4gIGlmIChIT01FKSByZXR1cm4gSE9NRTtcbiAgaWYgKFVTRVJQUk9GSUxFKSByZXR1cm4gVVNFUlBST0ZJTEU7XG4gIGlmIChIT01FUEFUSCkgcmV0dXJuIGAke0hPTUVEUklWRX0ke0hPTUVQQVRIfWA7XG5cbiAgcmV0dXJuIGhvbWVkaXIoKTtcbn07XG4iXX0=","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.SignatureV4 = void 0;\nconst util_hex_encoding_1 = require(\"@aws-sdk/util-hex-encoding\");\nconst constants_1 = require(\"./constants\");\nconst credentialDerivation_1 = require(\"./credentialDerivation\");\nconst getCanonicalHeaders_1 = require(\"./getCanonicalHeaders\");\nconst getCanonicalQuery_1 = require(\"./getCanonicalQuery\");\nconst getPayloadHash_1 = require(\"./getPayloadHash\");\nconst hasHeader_1 = require(\"./hasHeader\");\nconst moveHeadersToQuery_1 = require(\"./moveHeadersToQuery\");\nconst prepareRequest_1 = require(\"./prepareRequest\");\nconst utilDate_1 = require(\"./utilDate\");\nclass SignatureV4 {\n constructor({ applyChecksum, credentials, region, service, sha256, uriEscapePath = true, }) {\n this.service = service;\n this.sha256 = sha256;\n this.uriEscapePath = uriEscapePath;\n // default to true if applyChecksum isn't set\n this.applyChecksum = typeof applyChecksum === \"boolean\" ? applyChecksum : true;\n this.regionProvider = normalizeRegionProvider(region);\n this.credentialProvider = normalizeCredentialsProvider(credentials);\n }\n async presign(originalRequest, options = {}) {\n const { signingDate = new Date(), expiresIn = 3600, unsignableHeaders, unhoistableHeaders, signableHeaders, signingRegion, signingService, } = options;\n const credentials = await this.credentialProvider();\n const region = signingRegion !== null && signingRegion !== void 0 ? signingRegion : (await this.regionProvider());\n const { longDate, shortDate } = formatDate(signingDate);\n if (expiresIn > constants_1.MAX_PRESIGNED_TTL) {\n return Promise.reject(\"Signature version 4 presigned URLs\" + \" must have an expiration date less than one week in\" + \" the future\");\n }\n const scope = credentialDerivation_1.createScope(shortDate, region, signingService !== null && signingService !== void 0 ? signingService : this.service);\n const request = moveHeadersToQuery_1.moveHeadersToQuery(prepareRequest_1.prepareRequest(originalRequest), { unhoistableHeaders });\n if (credentials.sessionToken) {\n request.query[constants_1.TOKEN_QUERY_PARAM] = credentials.sessionToken;\n }\n request.query[constants_1.ALGORITHM_QUERY_PARAM] = constants_1.ALGORITHM_IDENTIFIER;\n request.query[constants_1.CREDENTIAL_QUERY_PARAM] = `${credentials.accessKeyId}/${scope}`;\n request.query[constants_1.AMZ_DATE_QUERY_PARAM] = longDate;\n request.query[constants_1.EXPIRES_QUERY_PARAM] = expiresIn.toString(10);\n const canonicalHeaders = getCanonicalHeaders_1.getCanonicalHeaders(request, unsignableHeaders, signableHeaders);\n request.query[constants_1.SIGNED_HEADERS_QUERY_PARAM] = getCanonicalHeaderList(canonicalHeaders);\n request.query[constants_1.SIGNATURE_QUERY_PARAM] = await this.getSignature(longDate, scope, this.getSigningKey(credentials, region, shortDate, signingService), this.createCanonicalRequest(request, canonicalHeaders, await getPayloadHash_1.getPayloadHash(originalRequest, this.sha256)));\n return request;\n }\n async sign(toSign, options) {\n if (typeof toSign === \"string\") {\n return this.signString(toSign, options);\n }\n else if (toSign.headers && toSign.payload) {\n return this.signEvent(toSign, options);\n }\n else {\n return this.signRequest(toSign, options);\n }\n }\n async signEvent({ headers, payload }, { signingDate = new Date(), priorSignature, signingRegion, signingService }) {\n const region = signingRegion !== null && signingRegion !== void 0 ? signingRegion : (await this.regionProvider());\n const { shortDate, longDate } = formatDate(signingDate);\n const scope = credentialDerivation_1.createScope(shortDate, region, signingService !== null && signingService !== void 0 ? signingService : this.service);\n const hashedPayload = await getPayloadHash_1.getPayloadHash({ headers: {}, body: payload }, this.sha256);\n const hash = new this.sha256();\n hash.update(headers);\n const hashedHeaders = util_hex_encoding_1.toHex(await hash.digest());\n const stringToSign = [\n constants_1.EVENT_ALGORITHM_IDENTIFIER,\n longDate,\n scope,\n priorSignature,\n hashedHeaders,\n hashedPayload,\n ].join(\"\\n\");\n return this.signString(stringToSign, { signingDate, signingRegion: region, signingService });\n }\n async signString(stringToSign, { signingDate = new Date(), signingRegion, signingService } = {}) {\n const credentials = await this.credentialProvider();\n const region = signingRegion !== null && signingRegion !== void 0 ? signingRegion : (await this.regionProvider());\n const { shortDate } = formatDate(signingDate);\n const hash = new this.sha256(await this.getSigningKey(credentials, region, shortDate, signingService));\n hash.update(stringToSign);\n return util_hex_encoding_1.toHex(await hash.digest());\n }\n async signRequest(requestToSign, { signingDate = new Date(), signableHeaders, unsignableHeaders, signingRegion, signingService, } = {}) {\n const credentials = await this.credentialProvider();\n const region = signingRegion !== null && signingRegion !== void 0 ? signingRegion : (await this.regionProvider());\n const request = prepareRequest_1.prepareRequest(requestToSign);\n const { longDate, shortDate } = formatDate(signingDate);\n const scope = credentialDerivation_1.createScope(shortDate, region, signingService !== null && signingService !== void 0 ? signingService : this.service);\n request.headers[constants_1.AMZ_DATE_HEADER] = longDate;\n if (credentials.sessionToken) {\n request.headers[constants_1.TOKEN_HEADER] = credentials.sessionToken;\n }\n const payloadHash = await getPayloadHash_1.getPayloadHash(request, this.sha256);\n if (!hasHeader_1.hasHeader(constants_1.SHA256_HEADER, request.headers) && this.applyChecksum) {\n request.headers[constants_1.SHA256_HEADER] = payloadHash;\n }\n const canonicalHeaders = getCanonicalHeaders_1.getCanonicalHeaders(request, unsignableHeaders, signableHeaders);\n const signature = await this.getSignature(longDate, scope, this.getSigningKey(credentials, region, shortDate, signingService), this.createCanonicalRequest(request, canonicalHeaders, payloadHash));\n request.headers[constants_1.AUTH_HEADER] =\n `${constants_1.ALGORITHM_IDENTIFIER} ` +\n `Credential=${credentials.accessKeyId}/${scope}, ` +\n `SignedHeaders=${getCanonicalHeaderList(canonicalHeaders)}, ` +\n `Signature=${signature}`;\n return request;\n }\n createCanonicalRequest(request, canonicalHeaders, payloadHash) {\n const sortedHeaders = Object.keys(canonicalHeaders).sort();\n return `${request.method}\n${this.getCanonicalPath(request)}\n${getCanonicalQuery_1.getCanonicalQuery(request)}\n${sortedHeaders.map((name) => `${name}:${canonicalHeaders[name]}`).join(\"\\n\")}\n\n${sortedHeaders.join(\";\")}\n${payloadHash}`;\n }\n async createStringToSign(longDate, credentialScope, canonicalRequest) {\n const hash = new this.sha256();\n hash.update(canonicalRequest);\n const hashedRequest = await hash.digest();\n return `${constants_1.ALGORITHM_IDENTIFIER}\n${longDate}\n${credentialScope}\n${util_hex_encoding_1.toHex(hashedRequest)}`;\n }\n getCanonicalPath({ path }) {\n if (this.uriEscapePath) {\n const doubleEncoded = encodeURIComponent(path.replace(/^\\//, \"\"));\n return `/${doubleEncoded.replace(/%2F/g, \"/\")}`;\n }\n return path;\n }\n async getSignature(longDate, credentialScope, keyPromise, canonicalRequest) {\n const stringToSign = await this.createStringToSign(longDate, credentialScope, canonicalRequest);\n const hash = new this.sha256(await keyPromise);\n hash.update(stringToSign);\n return util_hex_encoding_1.toHex(await hash.digest());\n }\n getSigningKey(credentials, region, shortDate, service) {\n return credentialDerivation_1.getSigningKey(this.sha256, credentials, shortDate, region, service || this.service);\n }\n}\nexports.SignatureV4 = SignatureV4;\nconst formatDate = (now) => {\n const longDate = utilDate_1.iso8601(now).replace(/[\\-:]/g, \"\");\n return {\n longDate,\n shortDate: longDate.substr(0, 8),\n };\n};\nconst getCanonicalHeaderList = (headers) => Object.keys(headers).sort().join(\";\");\nconst normalizeRegionProvider = (region) => {\n if (typeof region === \"string\") {\n const promisified = Promise.resolve(region);\n return () => promisified;\n }\n else {\n return region;\n }\n};\nconst normalizeCredentialsProvider = (credentials) => {\n if (typeof credentials === \"object\") {\n const promisified = Promise.resolve(credentials);\n return () => promisified;\n }\n else {\n return credentials;\n }\n};\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiU2lnbmF0dXJlVjQuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvU2lnbmF0dXJlVjQudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7O0FBaUJBLGtFQUFtRDtBQUVuRCwyQ0FlcUI7QUFDckIsaUVBQW9FO0FBQ3BFLCtEQUE0RDtBQUM1RCwyREFBd0Q7QUFDeEQscURBQWtEO0FBQ2xELDJDQUF3QztBQUN4Qyw2REFBMEQ7QUFDMUQscURBQWtEO0FBQ2xELHlDQUFxQztBQWtEckMsTUFBYSxXQUFXO0lBUXRCLFlBQVksRUFDVixhQUFhLEVBQ2IsV0FBVyxFQUNYLE1BQU0sRUFDTixPQUFPLEVBQ1AsTUFBTSxFQUNOLGFBQWEsR0FBRyxJQUFJLEdBQ29CO1FBQ3hDLElBQUksQ0FBQyxPQUFPLEdBQUcsT0FBTyxDQUFDO1FBQ3ZCLElBQUksQ0FBQyxNQUF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WFsaXplQ3JlZGVudGlhbHNQcm92aWRlciA9IChjcmVkZW50aWFsczogQ3JlZGVudGlhbHMgfCBQcm92aWRlcjxDcmVkZW50aWFscz4pOiBQcm92aWRlcjxDcmVkZW50aWFscz4gPT4ge1xuICBpZiAodHlwZW9mIGNyZWRlbnRpYWxzID09PSBcIm9iamVjdFwiKSB7XG4gICAgY29uc3QgcHJvbWlzaWZpZWQgPSBQcm9taXNlLnJlc29sdmUoY3JlZGVudGlhbHMpO1xuICAgIHJldHVybiAoKSA9PiBwcm9taXNpZmllZDtcbiAgfSBlbHNlIHtcbiAgICByZXR1cm4gY3JlZGVudGlhbHM7XG4gIH1cbn07XG4iXX0=","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.cloneRequest = void 0;\n/**\n * @internal\n */\nfunction cloneRequest({ headers, query, ...rest }) {\n return {\n ...rest,\n headers: { ...headers },\n query: query ? cloneQuery(query) : undefined,\n };\n}\nexports.cloneRequest = cloneRequest;\nfunction cloneQuery(query) {\n return Object.keys(query).reduce((carry, paramName) => {\n const param = query[paramName];\n return {\n ...carry,\n [paramName]: Array.isArray(param) ? [...param] : param,\n };\n }, {});\n}\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY2xvbmVSZXF1ZXN0LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vc3JjL2Nsb25lUmVxdWVzdC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7QUFFQTs7R0FFRztBQUNILFNBQWdCLFlBQVksQ0FBQyxFQUFFLE9BQU8sRUFBRSxLQUFLLEVBQUUsR0FBRyxJQUFJLEVBQWU7SUFDbkUsT0FBTztRQUNMLEdBQUcsSUFBSTtRQUNQLE9BQU8sRUFBRSxFQUFFLEdBQUcsT0FBTyxFQUFFO1FBQ3ZCLEtBQUssRUFBRSxLQUFLLENBQUMsQ0FBQyxDQUFDLFVBQVUsQ0FBQyxL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JhbWV0ZXJCYWcge1xuICByZXR1cm4gT2JqZWN0LmtleXMocXVlcnkpLnJlZHVjZSgoY2Fycnk6IFF1ZXJ5UGFyYW1ldGVyQmFnLCBwYXJhbU5hbWU6IHN0cmluZykgPT4ge1xuICAgIGNvbnN0IHBhcmFtID0gcXVlcnlbcGFyYW1OYW1lXTtcbiAgICByZXR1cm4ge1xuICAgICAgLi4uY2FycnksXG4gICAgICBbcGFyYW1OYW1lXTogQXJyYXkuaXNBcnJheShwYXJhbSkgPyBbLi4ucGFyYW1dIDogcGFyYW0sXG4gICAgfTtcbiAgfSwge30pO1xufVxuIl19","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.MAX_PRESIGNED_TTL = exports.KEY_TYPE_IDENTIFIER = exports.MAX_CACHE_SIZE = exports.UNSIGNED_PAYLOAD = exports.EVENT_ALGORITHM_IDENTIFIER = exports.ALGORITHM_IDENTIFIER = exports.UNSIGNABLE_PATTERNS = exports.SEC_HEADER_PATTERN = exports.PROXY_HEADER_PATTERN = exports.ALWAYS_UNSIGNABLE_HEADERS = exports.HOST_HEADER = exports.TOKEN_HEADER = exports.SHA256_HEADER = exports.SIGNATURE_HEADER = exports.GENERATED_HEADERS = exports.DATE_HEADER = exports.AMZ_DATE_HEADER = exports.AUTH_HEADER = exports.TOKEN_QUERY_PARAM = exports.SIGNATURE_QUERY_PARAM = exports.EXPIRES_QUERY_PARAM = exports.SIGNED_HEADERS_QUERY_PARAM = exports.AMZ_DATE_QUERY_PARAM = exports.CREDENTIAL_QUERY_PARAM = exports.ALGORITHM_QUERY_PARAM = void 0;\nexports.ALGORITHM_QUERY_PARAM = \"X-Amz-Algorithm\";\nexports.CREDENTIAL_QUERY_PARAM = \"X-Amz-Credential\";\nexports.AMZ_DATE_QUERY_PARAM = \"X-Amz-Date\";\nexports.SIGNED_HEADERS_QUERY_PARAM = \"X-Amz-SignedHeaders\";\nexports.EXPIRES_QUERY_PARAM = \"X-Amz-Expires\";\nexports.SIGNATURE_QUERY_PARAM = \"X-Amz-Signature\";\nexports.TOKEN_QUERY_PARAM = \"X-Amz-Security-Token\";\nexports.AUTH_HEADER = \"authorization\";\nexports.AMZ_DATE_HEADER = exports.AMZ_DATE_QUERY_PARAM.toLowerCase();\nexports.DATE_HEADER = \"date\";\nexports.GENERATED_HEADERS = [exports.AUTH_HEADER, exports.AMZ_DATE_HEADER, exports.DATE_HEADER];\nexports.SIGNATURE_HEADER = exports.SIGNATURE_QUERY_PARAM.toLowerCase();\nexports.SHA256_HEADER = \"x-amz-content-sha256\";\nexports.TOKEN_HEADER = exports.TOKEN_QUERY_PARAM.toLowerCase();\nexports.HOST_HEADER = \"host\";\nexports.ALWAYS_UNSIGNABLE_HEADERS = {\n authorization: true,\n \"cache-control\": true,\n connection: true,\n expect: true,\n from: true,\n \"keep-alive\": true,\n \"max-forwards\": true,\n pragma: true,\n referer: true,\n te: true,\n trailer: true,\n \"transfer-encoding\": true,\n upgrade: true,\n \"user-agent\": true,\n \"x-amzn-trace-id\": true,\n};\nexports.PROXY_HEADER_PATTERN = /^proxy-/;\nexports.SEC_HEADER_PATTERN = /^sec-/;\nexports.UNSIGNABLE_PATTERNS = [/^proxy-/i, /^sec-/i];\nexports.ALGORITHM_IDENTIFIER = \"AWS4-HMAC-SHA256\";\nexports.EVENT_ALGORITHM_IDENTIFIER = \"AWS4-HMAC-SHA256-PAYLOAD\";\nexports.UNSIGNED_PAYLOAD = \"UNSIGNED-PAYLOAD\";\nexports.MAX_CACHE_SIZE = 50;\nexports.KEY_TYPE_IDENTIFIER = \"aws4_request\";\nexports.MAX_PRESIGNED_TTL = 60 * 60 * 24 * 7;\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY29uc3RhbnRzLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vc3JjL2NvbnN0YW50cy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7QUFBYSxR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mVmZXJlcjogdHJ1ZSxcbiAgdGU6IHRydWUsXG4gIHRyYWlsZXI6IHRydWUsXG4gIFwidHJhbnNmZXItZW5jb2RpbmdcIjogdHJ1ZSxcbiAgdXBncmFkZTogdHJ1ZSxcbiAgXCJ1c2VyLWFnZW50XCI6IHRydWUsXG4gIFwieC1hbXpuLXRyYWNlLWlkXCI6IHRydWUsXG59O1xuXG5leHBvcnQgY29uc3QgUFJPWFlfSEVBREVSX1BBVFRFUk4gPSAvXnByb3h5LS87XG5cbmV4cG9ydCBjb25zdCBTRUNfSEVBREVSX1BBVFRFUk4gPSAvXnNlYy0vO1xuXG5leHBvcnQgY29uc3QgVU5TSUdOQUJMRV9QQVRURVJOUyA9IFsvXnByb3h5LS9pLCAvXnNlYy0vaV07XG5cbmV4cG9ydCBjb25zdCBBTEdPUklUSE1fSURFTlRJRklFUiA9IFwiQVdTNC1ITUFDLVNIQTI1NlwiO1xuXG5leHBvcnQgY29uc3QgRVZFTlRfQUxHT1JJVEhNX0lERU5USUZJRVIgPSBcIkFXUzQtSE1BQy1TSEEyNTYtUEFZTE9BRFwiO1xuXG5leHBvcnQgY29uc3QgVU5TSUdORURfUEFZTE9BRCA9IFwiVU5TSUdORUQtUEFZTE9BRFwiO1xuXG5leHBvcnQgY29uc3QgTUFYX0NBQ0hFX1NJWkUgPSA1MDtcbmV4cG9ydCBjb25zdCBLRVlfVFlQRV9JREVOVElGSUVSID0gXCJhd3M0X3JlcXVlc3RcIjtcblxuZXhwb3J0IGNvbnN0IE1BWF9QUkVTSUdORURfVFRMID0gNjAgKiA2MCAqIDI0ICogNztcbiJdfQ==","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.clearCredentialCache = exports.getSigningKey = exports.createScope = void 0;\nconst util_hex_encoding_1 = require(\"@aws-sdk/util-hex-encoding\");\nconst constants_1 = require(\"./constants\");\nconst signingKeyCache = {};\nconst cacheQueue = [];\n/**\n * Create a string describing the scope of credentials used to sign a request.\n *\n * @param shortDate The current calendar date in the form YYYYMMDD.\n * @param region The AWS region in which the service resides.\n * @param service The service to which the signed request is being sent.\n */\nfunction createScope(shortDate, region, service) {\n return `${shortDate}/${region}/${service}/${constants_1.KEY_TYPE_IDENTIFIER}`;\n}\nexports.createScope = createScope;\n/**\n * Derive a signing key from its composite parts\n *\n * @param sha256Constructor A constructor function that can instantiate SHA-256\n * hash objects.\n * @param credentials The credentials with which the request will be\n * signed.\n * @param shortDate The current calendar date in the form YYYYMMDD.\n * @param region The AWS region in which the service resides.\n * @param service The service to which the signed request is being\n * sent.\n */\nconst getSigningKey = async (sha256Constructor, credentials, shortDate, region, service) => {\n const credsHash = await hmac(sha256Constructor, credentials.secretAccessKey, credentials.accessKeyId);\n const cacheKey = `${shortDate}:${region}:${service}:${util_hex_encoding_1.toHex(credsHash)}:${credentials.sessionToken}`;\n if (cacheKey in signingKeyCache) {\n return signingKeyCache[cacheKey];\n }\n cacheQueue.push(cacheKey);\n while (cacheQueue.length > constants_1.MAX_CACHE_SIZE) {\n delete signingKeyCache[cacheQueue.shift()];\n }\n let key = `AWS4${credentials.secretAccessKey}`;\n for (const signable of [shortDate, region, service, constants_1.KEY_TYPE_IDENTIFIER]) {\n key = await hmac(sha256Constructor, key, signable);\n }\n return (signingKeyCache[cacheKey] = key);\n};\nexports.getSigningKey = getSigningKey;\n/**\n * @internal\n */\nfunction clearCredentialCache() {\n cacheQueue.length = 0;\n Object.keys(signingKeyCache).forEach((cacheKey) => {\n delete signingKeyCache[cacheKey];\n });\n}\nexports.clearCredentialCache = clearCredentialCache;\nfunction hmac(ctor, secret, data) {\n const hash = new ctor(secret);\n hash.update(data);\n return hash.digest();\n}\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY3JlZGVudGlhbERlcml2YXRpb24uanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvY3JlZGVudGlhbERlcml2YXRpb24udHMiXSwibmFtZXMiOltdLC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nN0cnVjdG9yLCBzZWNyZXQ6IFNvdXJjZURhdGEsIGRhdGE6IFNvdXJjZURhdGEpOiBQcm9taXNlPFVpbnQ4QXJyYXk+IHtcbiAgY29uc3QgaGFzaCA9IG5ldyBjdG9yKHNlY3JldCk7XG4gIGhhc2gudXBkYXRlKGRhdGEpO1xuICByZXR1cm4gaGFzaC5kaWdlc3QoKTtcbn1cbiJdfQ==","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.getCanonicalHeaders = void 0;\nconst constants_1 = require(\"./constants\");\n/**\n * @internal\n */\nfunction getCanonicalHeaders({ headers }, unsignableHeaders, signableHeaders) {\n const canonical = {};\n for (const headerName of Object.keys(headers).sort()) {\n const canonicalHeaderName = headerName.toLowerCase();\n if (canonicalHeaderName in constants_1.ALWAYS_UNSIGNABLE_HEADERS ||\n (unsignableHeaders === null || unsignableHeaders === void 0 ? void 0 : unsignableHeaders.has(canonicalHeaderName)) ||\n constants_1.PROXY_HEADER_PATTERN.test(canonicalHeaderName) ||\n constants_1.SEC_HEADER_PATTERN.test(canonicalHeaderName)) {\n if (!signableHeaders || (signableHeaders && !signableHeaders.has(canonicalHeaderName))) {\n continue;\n }\n }\n canonical[canonicalHeaderName] = headers[headerName].trim().replace(/\\s+/g, \" \");\n }\n return canonical;\n}\nexports.getCanonicalHeaders = getCanonicalHeaders;\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZ2V0Q2Fub25pY2FsSGVhZGVycy5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9nZXRDYW5vbmljYWxIZWFkZXJzLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7OztBQUVBLDJDQUFrRztBQUVsRzs7R0FFRztBQUNILFNBQWdCLG1CQUFtQixDQUNqQyxFQUFFLE9BQU8sRUFBZSxFQUN4QixpQkFBK0IsRUFDL0IsZUFBNkI7SUFFN0IsTUFBTSx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GNhbm9uaWNhbDtcbn1cbiJdfQ==","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.getCanonicalQuery = void 0;\nconst util_uri_escape_1 = require(\"@aws-sdk/util-uri-escape\");\nconst constants_1 = require(\"./constants\");\n/**\n * @internal\n */\nfunction getCanonicalQuery({ query = {} }) {\n const keys = [];\n const serialized = {};\n for (const key of Object.keys(query).sort()) {\n if (key.toLowerCase() === constants_1.SIGNATURE_HEADER) {\n continue;\n }\n keys.push(key);\n const value = query[key];\n if (typeof value === \"string\") {\n serialized[key] = `${util_uri_escape_1.escapeUri(key)}=${util_uri_escape_1.escapeUri(value)}`;\n }\n else if (Array.isArray(value)) {\n serialized[key] = value\n .slice(0)\n .sort()\n .reduce((encoded, value) => encoded.concat([`${util_uri_escape_1.escapeUri(key)}=${util_uri_escape_1.escapeUri(value)}`]), [])\n .join(\"&\");\n }\n }\n return keys\n .map((key) => serialized[key])\n .filter((serialized) => serialized) // omit any falsy values\n .join(\"&\");\n}\nexports.getCanonicalQuery = getCanonicalQuery;\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZ2V0Q2Fub25pY2FsUXVlcnkuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvZ2V0Q2Fub25pY2FsUXVlcnkudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7O0FBQ0EsOERBQXFEO0FBRXJELDJDQUErQztBQUUvQzs7R0FFRztBQUNILFNBQWdCLGlCQUFpQixDQUFDLEVBQUUsS0FBSyxHQUFHLEVBQUUsRUFBZTtJQUMzRCxNQUFNLElBQUksR0FBa0IsRUFBRSxDQUFDO0lBQy9CLE1BQU0sVUFBVSxHQUE4QixFQUFFLENBQUM7SUFDakQsS0FBSyxNQUFNLEdBQUcsSUFBSSxNQUFNLENBQUMsSUFBSSxDQUFDLEtBQUssQ0FBQyxDQUFDLElBQUksRUFBRSxFQUFFO1FBQz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ZGVkOiBBcnJheTxzdHJpbmc+LCB2YWx1ZTogc3RyaW5nKSA9PiBlbmNvZGVkLmNvbmNhdChbYCR7ZXNjYXBlVXJpKGtleSl9PSR7ZXNjYXBlVXJpKHZhbHVlKX1gXSksXG4gICAgICAgICAgW11cbiAgICAgICAgKVxuICAgICAgICAuam9pbihcIiZcIik7XG4gICAgfVxuICB9XG5cbiAgcmV0dXJuIGtleXNcbiAgICAubWFwKChrZXkpID0+IHNlcmlhbGl6ZWRba2V5XSlcbiAgICAuZmlsdGVyKChzZXJpYWxpemVkKSA9PiBzZXJpYWxpemVkKSAvLyBvbWl0IGFueSBmYWxzeSB2YWx1ZXNcbiAgICAuam9pbihcIiZcIik7XG59XG4iXX0=","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.getPayloadHash = void 0;\nconst is_array_buffer_1 = require(\"@aws-sdk/is-array-buffer\");\nconst util_hex_encoding_1 = require(\"@aws-sdk/util-hex-encoding\");\nconst constants_1 = require(\"./constants\");\n/**\n * @internal\n */\nasync function getPayloadHash({ headers, body }, hashConstructor) {\n for (const headerName of Object.keys(headers)) {\n if (headerName.toLowerCase() === constants_1.SHA256_HEADER) {\n return headers[headerName];\n }\n }\n if (body == undefined) {\n return \"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855\";\n }\n else if (typeof body === \"string\" || ArrayBuffer.isView(body) || is_array_buffer_1.isArrayBuffer(body)) {\n const hashCtor = new hashConstructor();\n hashCtor.update(body);\n return util_hex_encoding_1.toHex(await hashCtor.digest());\n }\n // As any defined body that is not a string or binary data is a stream, this\n // body is unsignable. Attempt to send the request with an unsigned payload,\n // which may or may not be accepted by the service.\n return constants_1.UNSIGNED_PAYLOAD;\n}\nexports.getPayloadHash = getPayloadHash;\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZ2V0UGF5bG9hZEhhc2guanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6Wy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XQgaGFzaEN0b3IuZGlnZXN0KCkpO1xuICB9XG5cbiAgLy8gQXMgYW55IGRlZmluZWQgYm9keSB0aGF0IGlzIG5vdCBhIHN0cmluZyBvciBiaW5hcnkgZGF0YSBpcyBhIHN0cmVhbSwgdGhpc1xuICAvLyBib2R5IGlzIHVuc2lnbmFibGUuIEF0dGVtcHQgdG8gc2VuZCB0aGUgcmVxdWVzdCB3aXRoIGFuIHVuc2lnbmVkIHBheWxvYWQsXG4gIC8vIHdoaWNoIG1heSBvciBtYXkgbm90IGJlIGFjY2VwdGVkIGJ5IHRoZSBzZXJ2aWNlLlxuICByZXR1cm4gVU5TSUdORURfUEFZTE9BRDtcbn1cbiJdfQ==","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.hasHeader = void 0;\nfunction hasHeader(soughtHeader, headers) {\n soughtHeader = soughtHeader.toLowerCase();\n for (const headerName of Object.keys(headers)) {\n if (soughtHeader === headerName.toLowerCase()) {\n return true;\n }\n }\n return false;\n}\nexports.hasHeader = hasHeader;\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaGFzSGVhZGVyLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vc3JjL2hhc0hlYWRlci50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7QUFFQSxTQUFnQixTQUFTLENBQUMsWUFBb0IsRUFBRSxPQUFrQjtJQUNoRSxZQUFZLEdBQUcsWUFBWSxDQUFDLFdBQVcsRUFBRSxDQUFDO0lBQzFDLEtBQUssTUFBTSxVQUFVLElBQUksTUFBTSxDQUFDLElBQUksQ0FBQyxPQUFPLENBQUMsRUFBRTtRQUM3QyxJQUFJLFlBQVksS0FBSyxVQUFVLENBQUMsV0FBVyxFQUFFLEVBQUU7WUFDN0MsT0FBTyxJQUFJLENBQUM7U0FDYjtLQUNGO0lBRUQsT0FBTyxLQUFLLENBQUM7QUFDZixDQUFDO0FBVEQsOEJBU0MiLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgeyBIZWFkZXJCYWcgfSBmcm9tIFwiQGF3cy1zZGsvdHlwZXNcIjtcblxuZXhwb3J0IGZ1bmN0aW9uIGhhc0hlYWRlcihzb3VnaHRIZWFkZXI6IHN0cmluZywgaGVhZGVyczogSGVhZGVyQmFnKTogYm9vbGVhbiB7XG4gIHNvdWdodEhlYWRlciA9IHNvdWdodEhlYWRlci50b0xvd2VyQ2FzZSgpO1xuICBmb3IgKGNvbnN0IGhlYWRlck5hbWUgb2YgT2JqZWN0LmtleXMoaGVhZGVycykpIHtcbiAgICBpZiAoc291Z2h0SGVhZGVyID09PSBoZWFkZXJOYW1lLnRvTG93ZXJDYXNlKCkpIHtcbiAgICAgIHJldHVybiB0cnVlO1xuICAgIH1cbiAgfVxuXG4gIHJldHVybiBmYWxzZTtcbn1cbiJdfQ==","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst tslib_1 = require(\"tslib\");\ntslib_1.__exportStar(require(\"./credentialDerivation\"), exports);\ntslib_1.__exportStar(require(\"./SignatureV4\"), exports);\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvaW5kZXgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7O0FBQUEsaUVBQXVDO0FBQ3ZDLHdEQUE4QiIsInNvdXJjZXNDb250ZW50IjpbImV4cG9ydCAqIGZyb20gXCIuL2NyZWRlbnRpYWxEZXJpdmF0aW9uXCI7XG5leHBvcnQgKiBmcm9tIFwiLi9TaWduYXR1cmVWNFwiO1xuIl19","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.moveHeadersToQuery = void 0;\nconst cloneRequest_1 = require(\"./cloneRequest\");\n/**\n * @internal\n */\nfunction moveHeadersToQuery(request, options = {}) {\n var _a;\n const { headers, query = {} } = typeof request.clone === \"function\" ? request.clone() : cloneRequest_1.cloneRequest(request);\n for (const name of Object.keys(headers)) {\n const lname = name.toLowerCase();\n if (lname.substr(0, 6) === \"x-amz-\" && !((_a = options.unhoistableHeaders) === null || _a === void 0 ? void 0 : _a.has(lname))) {\n query[name] = headers[name];\n delete headers[name];\n }\n }\n return {\n ...request,\n headers,\n query,\n };\n}\nexports.moveHeadersToQuery = moveHeadersToQuery;\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibW92ZUhlYWRlcnNUb1F1ZXJ5LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vc3JjL21vdmVIZWFkZXJzVG9RdWVyeS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7QUFFQSxpREFBOEM7QUFFOUM7O0dBRUc7QUFDSCxTQUFnQixrQkFBa0IsQ0FDaEMsT0FBb0IsRUFDcEIsVUFBZ0QsRUFBRTs7SUFFbEQsTUFBTSxFQUFFLE9BQU8sRUFBRSxLQUFLLEdBQUcsRUFBdUIsRUFBRSxHQUNoRCxPQUFRLE9BQWUsQ0FBQyxLQUFLLEtBQUssVUFBVSxDQUFDLENBQUMsQ0FBRSxPQUFlLENBQUMsS0FBSyxFQUFFLENBQUMsQ0FBQyxDQUFDLDJCQUFZLENBQUMsT0FBTyxDQUFDLENBQUM7SUFDbEcsS0FBSyxNQUFNLElBQUksSUFBSSxNQUFNLENBQUMsSUFBSSxDQUFDLE9BQU8sQ0FBQyxFQUFFO1FBQ3ZDLE1BQU0sS0FBSyxHQUFHLElBQUksQ0FBQyxXQUFXLEVBQUUsQ0FBQztRQUNqQyxJQUFJLEtBQUssQ0FBQyxNQUFNLENBQUMsQ0FBQyxFQUFFLENBQUMsQ0FBQyxLQUFLLFFBQVEsSUFBSSxDQUFDLENBQUEsTUFBQSxPQUFPLENBQUMsa0JBQWtCLDBDQUFFLEdBQUcsQ0FBQyx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nN0cigwLCA2KSA9PT0gXCJ4LWFtei1cIiAmJiAhb3B0aW9ucy51bmhvaXN0YWJsZUhlYWRlcnM/LmhhcyhsbmFtZSkpIHtcbiAgICAgIHF1ZXJ5W25hbWVdID0gaGVhZGVyc1tuYW1lXTtcbiAgICAgIGRlbGV0ZSBoZWFkZXJzW25hbWVdO1xuICAgIH1cbiAgfVxuXG4gIHJldHVybiB7XG4gICAgLi4ucmVxdWVzdCxcbiAgICBoZWFkZXJzLFxuICAgIHF1ZXJ5LFxuICB9O1xufVxuIl19","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.prepareRequest = void 0;\nconst cloneRequest_1 = require(\"./cloneRequest\");\nconst constants_1 = require(\"./constants\");\n/**\n * @internal\n */\nfunction prepareRequest(request) {\n // Create a clone of the request object that does not clone the body\n request = typeof request.clone === \"function\" ? request.clone() : cloneRequest_1.cloneRequest(request);\n for (const headerName of Object.keys(request.headers)) {\n if (constants_1.GENERATED_HEADERS.indexOf(headerName.toLowerCase()) > -1) {\n delete request.headers[headerName];\n }\n }\n return request;\n}\nexports.prepareRequest = prepareRequest;\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicHJlcGFyZVJlcXVlc3QuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvcHJlcGFyZVJlcXVlc3QudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7O0FBRUEsaURBQThDO0FBQzlDLDJDQUFnRDtBQUVoRDs7R0FFRztBQUNILFNBQWdCLGNBQWMsQ0FBQyxPQUFvQjtJQUNqRCxvRUFBb0U7SUFDcEUsT0FBTyxHQUFHLE9BQVEsT0FBZSxDQUFDLEtBQUssS0FBSyxVQUFVLENBQUMsQ0FBQyxDQUFFLE9BQWUsQ0FBQyxLQUFLLEVBQUUsQ0FBQyxDQUFDLENBQUMsMkJBQVksQ0FBQyxPQUFPLENBQUMsQ0FBQztJQUUx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aGVhZGVyTmFtZS50b0xvd2VyQ2FzZSgpKSA+IC0xKSB7XG4gICAgICBkZWxldGUgcmVxdWVzdC5oZWFkZXJzW2hlYWRlck5hbWVdO1xuICAgIH1cbiAgfVxuXG4gIHJldHVybiByZXF1ZXN0O1xufVxuIl19","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.toDate = exports.iso8601 = void 0;\nfunction iso8601(time) {\n return toDate(time)\n .toISOString()\n .replace(/\\.\\d{3}Z$/, \"Z\");\n}\nexports.iso8601 = iso8601;\nfunction toDate(time) {\n if (typeof time === \"number\") {\n return new Date(time * 1000);\n }\n if (typeof time === \"string\") {\n if (Number(time)) {\n return new Date(Number(time) * 1000);\n }\n return new Date(time);\n }\n return time;\n}\nexports.toDate = toDate;\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidXRpbERhdGUuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvdXRpbERhdGUudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7O0FBQUEsU0FBZ0IsT0FBTyxDQUFDLElBQTRCO0lBQ2xELE9BQU8sTUFBTSxDQUFDLElBQUksQ0FBQztTQUNoQixXQUFXLEVBQUU7U0FDYixPQUFPLENBQUMsV0FBVyxFQUFFLEdBQUcsQ0FBQyxDQUFDO0FBQy9CLENBQUM7QUFKRCwwQkFJQztBQUVELFNBQWdCLE1BQU0sQ0FBQyxJQUE0QjtJQUNqRCxJQUFJLE9BQU8sSUFBSSxLQUFLLFFBQVEsRUFBRTtRQUM1QixPQUFPLElBQUksSUFBSSxDQUFDLElBQUksR0FBRyxJQUFJLENBQUMsQ0FBQztLQUM5QjtJQUVELElBQUksT0FBTyxJQUFJLEtBQUssUUFBUSxFQUFFO1FBQzVCLElBQUksTUFBTSxDQUFDLElBQUksQ0FBQyxFQUFFO1lBQ2hCLE9BQU8sSUFBSSxJQUFJLENBQUMsTUFBTSxDQUFDLElBQUksQ0FBQyxHQUFHLElBQUksQ0FBQyxDQUFDO1NBQ3RDO1FBQ0QsT0FBTyxJQUFJLElBQUksQ0FBQyxJQUFJLENBQUMsQ0FBQztLQUN2QjtJQUVELE9BQU8sSUFBSSxDQUFDO0FBQ2QsQ0FBQztBQWJELHdCQWFDIiwic291cmNlc0NvbnRlbnQiOlsiZXhwb3J0IGZ1bmN0aW9uIGlzbzg2MDEodGltZTogbnVtYmVyIHwgc3RyaW5nIHwgRGF0ZSk6IHN0cmluZyB7XG4gIHJldHVybiB0b0RhdGUodGltZSlcbiAgICAudG9JU09TdHJpbmcoKVxuICAgIC5yZXBsYWNlKC9cXC5cXGR7M31aJC8sIFwiWlwiKTtcbn1cblxuZXhwb3J0IGZ1bmN0aW9uIHRvRGF0ZSh0aW1lOiBudW1iZXIgfCBzdHJpbmcgfCBEYXRlKTogRGF0ZSB7XG4gIGlmICh0eXBlb2YgdGltZSA9PT0gXCJudW1iZXJcIikge1xuICAgIHJldHVybiBuZXcgRGF0ZSh0aW1lICogMTAwMCk7XG4gIH1cblxuICBpZiAodHlwZW9mIHRpbWUgPT09IFwic3RyaW5nXCIpIHtcbiAgICBpZiAoTnVtYmVyKHRpbWUpKSB7XG4gICAgICByZXR1cm4gbmV3IERhdGUoTnVtYmVyKHRpbWUpICogMTAwMCk7XG4gICAgfVxuICAgIHJldHVybiBuZXcgRGF0ZSh0aW1lKTtcbiAgfVxuXG4gIHJldHVybiB0aW1lO1xufVxuIl19","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.Client = void 0;\nconst middleware_stack_1 = require(\"@aws-sdk/middleware-stack\");\nclass Client {\n constructor(config) {\n this.middlewareStack = middleware_stack_1.constructStack();\n this.config = config;\n }\n send(command, optionsOrCb, cb) {\n const options = typeof optionsOrCb !== \"function\" ? optionsOrCb : undefined;\n const callback = typeof optionsOrCb === \"function\" ? optionsOrCb : cb;\n const handler = command.resolveMiddleware(this.middlewareStack, this.config, options);\n if (callback) {\n handler(command)\n .then((result) => callback(null, result.output), (err) => callback(err))\n .catch(\n // prevent any errors thrown in the callback from triggering an\n // unhandled promise rejection\n () => { });\n }\n else {\n return handler(command).then((result) => result.output);\n }\n }\n destroy() {\n if (this.config.requestHandler.destroy)\n this.config.requestHandler.destroy();\n }\n}\nexports.Client = Client;\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY2xpZW50LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vc3JjL2NsaWVudC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7QUFBQSxnRUFBMkQ7QUFlM0QsTUFBYSxNQUFNO0lBU2pCLFlBQVksTUFBbUM7UUFGeEMsb0JBQWUsR0FBK0MsaUNBQWMsRUFBNkIsQ0FBQztRQUcvRyxJQUFJLENBQUMsTUFBTSxHQUFHLE1BQU0sQ0FBQztJQUN2QixDQUFDO0lBY0QsSUFBSSxDQUNGLE9BQStHLEVBQy9HLFdBQXNFLEVBQ3RFLEVBQTBDO1FBRTFDLE1BQU0sT0FBTyxHQUFHLE9BQU8sV0FBVyxLQUFLLFVBQVUsQ0FBQyxDQUFDLENBQUMsV0FBVyxDQUFDLENBQUMsQ0FBQyxTQUFTLENBQUM7UUFDNUUsTUFBTSxRQUFRLEdBQUcsT0FBTyxXQUFXLEtBQUssVUFBVSxDQUFDLENBQUMsQ0FBRSxXQUFxRCxDQUFDLENBQUMsQ0FBQyxFQUFFLENBQUM7UUFDakgsTUFBTSxPQUFPLEdBQUcsT0FBTyxDQUFDLGlCQUFpQixDQUFDLElBQUksQ0FBQyxlQUFzQixFQUFFLElBQUksQ0FBQyxNQUFNLEVBQUUsT0FBTyxDQUFDLENBQUM7UUFDN0YsSUFBSSxRQUFRLEVBQUU7WUFDWixPQUFPLENBQUMsT0FBTyxDQUFDO2lCQUNiLElBQUksQ0FDSCxDQUFDLE1BQU0sRUFBRSxFQUFFLENBQUMsUU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IC8vIHVuaGFuZGxlZCBwcm9taXNlIHJlamVjdGlvblxuICAgICAgICAgICgpID0+IHt9XG4gICAgICAgICk7XG4gICAgfSBlbHNlIHtcbiAgICAgIHJldHVybiBoYW5kbGVyKGNvbW1hbmQpLnRoZW4oKHJlc3VsdCkgPT4gcmVzdWx0Lm91dHB1dCk7XG4gICAgfVxuICB9XG5cbiAgZGVzdHJveSgpIHtcbiAgICBpZiAodGhpcy5jb25maWcucmVxdWVzdEhhbmRsZXIuZGVzdHJveSkgdGhpcy5jb25maWcucmVxdWVzdEhhbmRsZXIuZGVzdHJveSgpO1xuICB9XG59XG4iXX0=","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.Command = void 0;\nconst middleware_stack_1 = require(\"@aws-sdk/middleware-stack\");\nclass Command {\n constructor() {\n this.middlewareStack = middleware_stack_1.constructStack();\n }\n}\nexports.Command = Command;\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY29tbWFuZC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9jb21tYW5kLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7OztBQUFBLGdFQUEyRDtBQUczRCxNQUFzQixPQUFPO0lBQTdCO1FBU1csb0JBQWUsR0FBb0MsaUNBQWMsRUFBaUIsQ0FBQztJQU05RixDQUFDO0NBQUE7QUFmRCwwQkFlQyIsInNvdXJjZXNDb250ZW50IjpbImltcG9ydCB7IGNvbnN0cnVjdFN0YWNrIH0gZnJvbSBcIkBhd3Mtc2RrL21pZGRsZXdhcmUtc3RhY2tcIjtcbmltcG9ydCB7IENvbW1hbmQgYXMgSUNvbW1hbmQsIEhhbmRsZXIsIE1ldGFkYXRhQmVhcmVyLCBNaWRkbGV3YXJlU3RhY2sgYXMgSU1pZGRsZXdhcmVTdGFjayB9IGZyb20gXCJAYXdzLXNkay90eXBlc1wiO1xuXG5leHBvcnQgYWJzdHJhY3QgY2xhc3MgQ29tbWFuZDxcbiAgSW5wdXQgZXh0ZW5kcyBDbGllbnRJbnB1dCxcbiAgT3V0cHV0IGV4dGVuZHMgQ2xpZW50T3V0cHV0LFxuICBSZXNvbHZlZENsaWVudENvbmZpZ3VyYXRpb24sXG4gIENsaWVudElucHV0IGV4dGVuZHMgb2JqZWN0ID0gYW55LFxuICBDbGllbnRPdXRwdXQgZXh0ZW5kcyBNZXRhZGF0YUJlYXJlciA9IGFueVxuPiBpbXBsZW1lbnRzIElDb21tYW5kPENsaWVudElucHV0LCBJbnB1dCwgQ2xpZW50T3V0cHV0LCBPdXRwdXQsIFJlc29sdmVkQ2xpZW50Q29uZmlndXJhdGlvbj5cbntcbiAgYWJzdHJhY3QgaW5wdXQ6IElucHV0O1xuICByZWFkb25seSBtaWRkbGV3YXJlU3RhY2s6IElNaWRkbGV3YXJlU3RhY2s8SW5wdXQsIE91dHB1dD4gPSBjb25zdHJ1Y3RTdGFjazxJbnB1dCwgT3V0cHV0PigpO1xuICBhYnN0cmFjdCByZXNvbHZlTWlkZGxld2FyZShcbiAgICBzdGFjazogSU1pZGRsZXdhcmVTdGFjazxDbGllbnRJbnB1dCwgQ2xpZW50T3V0cHV0PixcbiAgICBjb25maWd1cmF0aW9uOiBSZXNvbHZlZENsaWVudENvbmZpZ3VyYXRpb24sXG4gICAgb3B0aW9uczogYW55XG4gICk6IEhhbmRsZXI8SW5wdXQsIE91dHB1dD47XG59XG4iXX0=","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.SENSITIVE_STRING = void 0;\nexports.SENSITIVE_STRING = \"***SensitiveInformation***\";\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY29uc3RhbnRzLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vc3JjL2NvbnN0YW50cy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7QUFBYSxRQUFBLGdCQUFnQixHQUFHLDRCQUE0QixDQUFDIiwic291cmNlc0NvbnRlbnQiOlsiZXhwb3J0IGNvbnN0IFNFTlNJVElWRV9TVFJJTkcgPSBcIioqKlNlbnNpdGl2ZUluZm9ybWF0aW9uKioqXCI7XG4iXX0=","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.parseEpochTimestamp = exports.parseRfc7231DateTime = exports.parseRfc3339DateTime = exports.dateToUtcString = void 0;\nconst parse_utils_1 = require(\"./parse-utils\");\n// Build indexes outside so we allocate them once.\nconst DAYS = [\"Sun\", \"Mon\", \"Tue\", \"Wed\", \"Thu\", \"Fri\", \"Sat\"];\n// These must be kept in order\n// prettier-ignore\nconst MONTHS = [\"Jan\", \"Feb\", \"Mar\", \"Apr\", \"May\", \"Jun\", \"Jul\", \"Aug\", \"Sep\", \"Oct\", \"Nov\", \"Dec\"];\n/**\n * Builds a proper UTC HttpDate timestamp from a Date object\n * since not all environments will have this as the expected\n * format.\n *\n * See: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toUTCString\n * > Prior to ECMAScript 2018, the format of the return value\n * > varied according to the platform. The most common return\n * > value was an RFC-1123 formatted date stamp, which is a\n * > slightly updated version of RFC-822 date stamps.\n */\nfunction dateToUtcString(date) {\n const year = date.getUTCFullYear();\n const month = date.getUTCMonth();\n const dayOfWeek = date.getUTCDay();\n const dayOfMonthInt = date.getUTCDate();\n const hoursInt = date.getUTCHours();\n const minutesInt = date.getUTCMinutes();\n const secondsInt = date.getUTCSeconds();\n // Build 0 prefixed strings for contents that need to be\n // two digits and where we get an integer back.\n const dayOfMonthString = dayOfMonthInt < 10 ? `0${dayOfMonthInt}` : `${dayOfMonthInt}`;\n const hoursString = hoursInt < 10 ? `0${hoursInt}` : `${hoursInt}`;\n const minutesString = minutesInt < 10 ? `0${minutesInt}` : `${minutesInt}`;\n const secondsString = secondsInt < 10 ? `0${secondsInt}` : `${secondsInt}`;\n return `${DAYS[dayOfWeek]}, ${dayOfMonthString} ${MONTHS[month]} ${year} ${hoursString}:${minutesString}:${secondsString} GMT`;\n}\nexports.dateToUtcString = dateToUtcString;\nconst RFC3339 = new RegExp(/^(?\\d{4})-(?\\d{2})-(?\\d{2})[tT](?\\d{2}):(?\\d{2}):(?\\d{2})(?:\\.(?\\d+))?[zZ]$/);\n/**\n * Parses a value into a Date. Returns undefined if the input is null or\n * undefined, throws an error if the input is not a string that can be parsed\n * as an RFC 3339 date.\n *\n * Input strings must conform to RFC3339 section 5.6, and cannot have a UTC\n * offset. Fractional precision is supported.\n *\n * {@see https://xml2rfc.tools.ietf.org/public/rfc/html/rfc3339.html#anchor14}\n *\n * @param value the value to parse\n * @return a Date or undefined\n */\nconst parseRfc3339DateTime = (value) => {\n if (value === null || value === undefined) {\n return undefined;\n }\n if (typeof value !== \"string\") {\n throw new TypeError(\"RFC-3339 date-times must be expressed as strings\");\n }\n const match = RFC3339.exec(value);\n if (!match || !match.groups) {\n throw new TypeError(\"Invalid RFC-3339 date-time value\");\n }\n const year = parse_utils_1.strictParseShort(stripLeadingZeroes(match.groups[\"Y\"]));\n const month = parseDateValue(match.groups[\"M\"], \"month\", 1, 12);\n const day = parseDateValue(match.groups[\"D\"], \"day\", 1, 31);\n return buildDate(year, month, day, match);\n};\nexports.parseRfc3339DateTime = parseRfc3339DateTime;\nconst 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{2}):(?\\d{2}):(?\\d{2})(?:\\.(?\\d+))? GMT$/);\nconst 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{2}):(?\\d{2}):(?\\d{2})(?:\\.(?\\d+))? GMT$/);\nconst 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{2}):(?\\d{2}):(?\\d{2})(?:\\.(?\\d+))? (?\\d{4})$/);\n/**\n * Parses a value into a Date. Returns undefined if the input is null or\n * undefined, throws an error if the input is not a string that can be parsed\n * as an RFC 7231 IMF-fixdate or obs-date.\n *\n * Input strings must conform to RFC7231 section 7.1.1.1. Fractional seconds are supported.\n *\n * {@see https://datatracker.ietf.org/doc/html/rfc7231.html#section-7.1.1.1}\n *\n * @param value the value to parse\n * @return a Date or undefined\n */\nconst parseRfc7231DateTime = (value) => {\n if (value === null || value === undefined) {\n return undefined;\n }\n if (typeof value !== \"string\") {\n throw new TypeError(\"RFC-7231 date-times must be expressed as strings\");\n }\n //allow customization of day parsing for asctime days, which can be left-padded with spaces\n let dayFn = (value) => parseDateValue(value, \"day\", 1, 31);\n //all formats other than RFC 850 use a four-digit year\n let yearFn = (value) => parse_utils_1.strictParseShort(stripLeadingZeroes(value));\n //RFC 850 dates need post-processing to adjust year values if they are too far in the future\n let dateAdjustmentFn = (value) => value;\n let match = IMF_FIXDATE.exec(value);\n if (!match || !match.groups) {\n match = RFC_850_DATE.exec(value);\n if (match && match.groups) {\n // RFC 850 dates use 2-digit years. So we parse the year specifically,\n // and then once we've constructed the entire date, we adjust it if the resultant date\n // is too far in the future.\n yearFn = parseTwoDigitYear;\n dateAdjustmentFn = adjustRfc850Year;\n }\n else {\n match = ASC_TIME.exec(value);\n if (match && match.groups) {\n dayFn = (value) => parseDateValue(value.trimLeft(), \"day\", 1, 31);\n }\n else {\n throw new TypeError(\"Invalid RFC-7231 date-time value\");\n }\n }\n }\n const year = yearFn(match.groups[\"Y\"]);\n const month = parseMonthByShortName(match.groups[\"M\"]);\n const day = dayFn(match.groups[\"D\"]);\n return dateAdjustmentFn(buildDate(year, month, day, match));\n};\nexports.parseRfc7231DateTime = parseRfc7231DateTime;\n/**\n * Parses a value into a Date. Returns undefined if the input is null or\n * undefined, throws an error if the input is not a number or a parseable string.\n *\n * Input strings must be an integer or floating point number. Fractional seconds are supported.\n *\n * @param value the value to parse\n * @return a Date or undefined\n */\nconst parseEpochTimestamp = (value) => {\n if (value === null || value === undefined) {\n return undefined;\n }\n let valueAsDouble;\n if (typeof value === \"number\") {\n valueAsDouble = value;\n }\n else if (typeof value === \"string\") {\n valueAsDouble = parse_utils_1.strictParseDouble(value);\n }\n else {\n throw new TypeError(\"Epoch timestamps must be expressed as floating point numbers or their string representation\");\n }\n if (Number.isNaN(valueAsDouble) || valueAsDouble === Infinity || valueAsDouble === -Infinity) {\n throw new TypeError(\"Epoch timestamps must be valid, non-Infinite, non-NaN numerics\");\n }\n return new Date(Math.round(valueAsDouble * 1000));\n};\nexports.parseEpochTimestamp = parseEpochTimestamp;\n/**\n * Build a date from a numeric year, month, date, and an match with named groups\n * \"H\", \"m\", s\", and \"frac\", representing hours, minutes, seconds, and optional fractional seconds.\n * @param year numeric year\n * @param month numeric month, 1-indexed\n * @param day numeric year\n * @param match match with groups \"H\", \"m\", s\", and \"frac\"\n */\nconst buildDate = (year, month, day, match) => {\n const adjustedMonth = month - 1; // JavaScript, and our internal data structures, expect 0-indexed months\n validateDayOfMonth(year, adjustedMonth, day);\n // Adjust month down by 1\n return new Date(Date.UTC(year, adjustedMonth, day, parseDateValue(match.groups[\"H\"], \"hour\", 0, 23), parseDateValue(match.groups[\"m\"], \"minute\", 0, 59), \n // seconds can go up to 60 for leap seconds\n parseDateValue(match.groups[\"s\"], \"seconds\", 0, 60), parseMilliseconds(match.groups[\"frac\"])));\n};\n/**\n * RFC 850 dates use a 2-digit year; start with the assumption that if it doesn't\n * match the current year, then it's a date in the future, then let adjustRfc850Year adjust\n * the final date back to the past if it's too far in the future.\n *\n * Example: in 2021, start with the assumption that '11' is '2111', and that '22' is '2022'.\n * adjustRfc850Year will adjust '11' to 2011, (as 2111 is more than 50 years in the future),\n * but keep '22' as 2022. in 2099, '11' will represent '2111', but '98' should be '2098'.\n * There's no description of an RFC 850 date being considered too far in the past in RFC-7231,\n * so it's entirely possible that 2011 is a valid interpretation of '11' in 2099.\n * @param value the 2 digit year to parse\n * @return number a year that is equal to or greater than the current UTC year\n */\nconst parseTwoDigitYear = (value) => {\n const thisYear = new Date().getUTCFullYear();\n const valueInThisCentury = Math.floor(thisYear / 100) * 100 + parse_utils_1.strictParseShort(stripLeadingZeroes(value));\n if (valueInThisCentury < thisYear) {\n // This may end up returning a year that adjustRfc850Year turns back by 100.\n // That's fine! We don't know the other components of the date yet, so there are\n // boundary conditions that only adjustRfc850Year can handle.\n return valueInThisCentury + 100;\n }\n return valueInThisCentury;\n};\nconst FIFTY_YEARS_IN_MILLIS = 50 * 365 * 24 * 60 * 60 * 1000;\n/**\n * Adjusts the year value found in RFC 850 dates according to the rules\n * expressed in RFC7231, which state:\n *\n *
Recipients of a timestamp value in rfc850-date format, which uses a\n * two-digit year, MUST interpret a timestamp that appears to be more\n * than 50 years in the future as representing the most recent year in\n * the past that had the same last two digits.
\n *\n * @param input a Date that assumes the two-digit year was in the future\n * @return a Date that is in the past if input is > 50 years in the future\n */\nconst adjustRfc850Year = (input) => {\n if (input.getTime() - new Date().getTime() > FIFTY_YEARS_IN_MILLIS) {\n return new Date(Date.UTC(input.getUTCFullYear() - 100, input.getUTCMonth(), input.getUTCDate(), input.getUTCHours(), input.getUTCMinutes(), input.getUTCSeconds(), input.getUTCMilliseconds()));\n }\n return input;\n};\nconst parseMonthByShortName = (value) => {\n const monthIdx = MONTHS.indexOf(value);\n if (monthIdx < 0) {\n throw new TypeError(`Invalid month: ${value}`);\n }\n return monthIdx + 1;\n};\nconst DAYS_IN_MONTH = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];\n/**\n * Validate the day is valid for the given month.\n * @param year the year\n * @param month the month (0-indexed)\n * @param day the day of the month\n */\nconst validateDayOfMonth = (year, month, day) => {\n let maxDays = DAYS_IN_MONTH[month];\n if (month === 1 && isLeapYear(year)) {\n maxDays = 29;\n }\n if (day > maxDays) {\n throw new TypeError(`Invalid day for ${MONTHS[month]} in ${year}: ${day}`);\n }\n};\nconst isLeapYear = (year) => {\n return year % 4 === 0 && (year % 100 !== 0 || year % 400 === 0);\n};\nconst parseDateValue = (value, type, lower, upper) => {\n const dateVal = parse_utils_1.strictParseByte(stripLeadingZeroes(value));\n if (dateVal < lower || dateVal > upper) {\n throw new TypeError(`${type} must be between ${lower} and ${upper}, inclusive`);\n }\n return dateVal;\n};\nconst parseMilliseconds = (value) => {\n if (value === null || value === undefined) {\n return 0;\n }\n return parse_utils_1.strictParseFloat32(\"0.\" + value) * 1000;\n};\nconst stripLeadingZeroes = (value) => {\n let idx = 0;\n while (idx < value.length - 1 && value.charAt(idx) === \"0\") {\n idx++;\n }\n if (idx === 0) {\n return value;\n }\n return value.slice(idx);\n};\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZGF0ZS11dGlscy5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9kYXRlLXV0aWxzLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7OztBQUFBLCtDQUF5RztBQUV6RyxrREFBa0Q7QUFDbEQsTUFBTSxJQUFJLEdBQWtCLENBQUMsS0FBSyxFQUFFLEtBQUssRUFBRSxLQUFLLEVBQUUsS0FBSyxFQUFFLEtBQUssRUFBRSxLQUFLLEVBQUUsS0FBSyxDQUFDLENBQUM7QUFFOUUsOEJBQThCO0FBQzlCLGtCQUFrQjtBQUNsQixNQUFNLE1BQU0sR0FBa0IsQ0FBQyxLQUFLLEVBQUUsS0FBSyxFQUFFLEtBQUssRUFBRSxLQUFLLEVBQUUsS0FBSyxFQUFFLEtBQUssRUFBRSxLQUFLLEVBQUUsS0FBSyxFQUFFLEtBQUssRUFBRSxLQUFLL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ufTtcblxuY29uc3QgcGFyc2VNaWxsaXNlY29uZHMgPSAodmFsdWU6IHN0cmluZyB8IHVuZGVmaW5lZCk6IG51bWJlciA9PiB7XG4gIGlmICh2YWx1ZSA9PT0gbnVsbCB8fCB2YWx1ZSA9PT0gdW5kZWZpbmVkKSB7XG4gICAgcmV0dXJuIDA7XG4gIH1cblxuICByZXR1cm4gc3RyaWN0UGFyc2VGbG9hdDMyKFwiMC5cIiArIHZhbHVlKSEgKiAxMDAwO1xufTtcblxuY29uc3Qgc3RyaXBMZWFkaW5nWmVyb2VzID0gKHZhbHVlOiBzdHJpbmcpOiBzdHJpbmcgPT4ge1xuICBsZXQgaWR4ID0gMDtcbiAgd2hpbGUgKGlkeCA8IHZhbHVlLmxlbmd0aCAtIDEgJiYgdmFsdWUuY2hhckF0KGlkeCkgPT09IFwiMFwiKSB7XG4gICAgaWR4Kys7XG4gIH1cbiAgaWYgKGlkeCA9PT0gMCkge1xuICAgIHJldHVybiB2YWx1ZTtcbiAgfVxuICByZXR1cm4gdmFsdWUuc2xpY2UoaWR4KTtcbn07XG4iXX0=","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.emitWarningIfUnsupportedVersion = void 0;\n// Stores whether the warning was already emitted.\nlet warningEmitted = false;\n/**\n * Emits warning if the provided Node.js version string is pending deprecation.\n *\n * @param {string} version - The Node.js version string.\n */\nconst emitWarningIfUnsupportedVersion = (version) => {\n if (version && !warningEmitted && parseInt(version.substring(1, version.indexOf(\".\"))) < 12) {\n warningEmitted = true;\n process.emitWarning(`The AWS SDK for JavaScript (v3) will\\n` +\n `no longer support Node.js ${version} as of January 1, 2022.\\n` +\n `To continue receiving updates to AWS services, bug fixes, and security\\n` +\n `updates please upgrade to Node.js 12.x or later.\\n\\n` +\n `More information can be found at: https://a.co/1l6FLnu`, `NodeDeprecationWarning`);\n }\n};\nexports.emitWarningIfUnsupportedVersion = emitWarningIfUnsupportedVersion;\n//# sourceMappingURL=data:application/json;base64,eyJ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FyYW0ge3N0cmluZ30gdmVyc2lvbiAtIFRoZSBOb2RlLmpzIHZlcnNpb24gc3RyaW5nLlxuICovXG5leHBvcnQgY29uc3QgZW1pdFdhcm5pbmdJZlVuc3VwcG9ydGVkVmVyc2lvbiA9ICh2ZXJzaW9uOiBzdHJpbmcpID0+IHtcbiAgaWYgKHZlcnNpb24gJiYgIXdhcm5pbmdFbWl0dGVkICYmIHBhcnNlSW50KHZlcnNpb24uc3Vic3RyaW5nKDEsIHZlcnNpb24uaW5kZXhPZihcIi5cIikpKSA8IDEyKSB7XG4gICAgd2FybmluZ0VtaXR0ZWQgPSB0cnVlO1xuICAgIHByb2Nlc3MuZW1pdFdhcm5pbmcoXG4gICAgICBgVGhlIEFXUyBTREsgZm9yIEphdmFTY3JpcHQgKHYzKSB3aWxsXFxuYCArXG4gICAgICAgIGBubyBsb25nZXIgc3VwcG9ydCBOb2RlLmpzICR7dmVyc2lvbn0gYXMgb2YgSmFudWFyeSAxLCAyMDIyLlxcbmAgK1xuICAgICAgICBgVG8gY29udGludWUgcmVjZWl2aW5nIHVwZGF0ZXMgdG8gQVdTIHNlcnZpY2VzLCBidWcgZml4ZXMsIGFuZCBzZWN1cml0eVxcbmAgK1xuICAgICAgICBgdXBkYXRlcyBwbGVhc2UgdXBncmFkZSB0byBOb2RlLmpzIDEyLnggb3IgbGF0ZXIuXFxuXFxuYCArXG4gICAgICAgIGBNb3JlIGluZm9ybWF0aW9uIGNhbiBiZSBmb3VuZCBhdDogaHR0cHM6Ly9hLmNvLzFsNkZMbnVgLFxuICAgICAgYE5vZGVEZXByZWNhdGlvbldhcm5pbmdgXG4gICAgKTtcbiAgfVxufTtcbiJdfQ==","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.extendedEncodeURIComponent = void 0;\n/**\n * Function that wraps encodeURIComponent to encode additional characters\n * to fully adhere to RFC 3986.\n */\nfunction extendedEncodeURIComponent(str) {\n return encodeURIComponent(str).replace(/[!'()*]/g, function (c) {\n return \"%\" + c.charCodeAt(0).toString(16).toUpperCase();\n });\n}\nexports.extendedEncodeURIComponent = extendedEncodeURIComponent;\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZXh0ZW5kZWQtZW5jb2RlLXVyaS1jb21wb25lbnQuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvZXh0ZW5kZWQtZW5jb2RlLXVyaS1jb21wb25lbnQudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7O0FBQUE7OztHQUdHO0FBQ0gsU0FBZ0IsMEJBQTBCLENBQUMsR0FBVztJQUNwRCxPQUFPLGtCQUFrQixDQUFDLEdBQUcsQ0FBQyxDQUFDLE9BQU8sQ0FBQyxVQUFVLEVBQUUsVUFBVSxDQUFDO1FBQzVELE9BQU8sR0FBRyxHQUFHLENBQUMsQ0FBQyxVQUFVLENBQUMsQ0FBQyxDQUFDLENBQUMsUUFBUSxDQUFDLEVBQUUsQ0FBQyxDQUFDLFdBQVcsRUFBRSxDQUFDO0lBQzFELENBQUMsQ0FBQyxDQUFDO0FBQ0wsQ0FBQztBQUpELGdFQUlDIiwic291cmNlc0NvbnRlbnQiOlsiLyoqXG4gKiBGdW5jdGlvbiB0aGF0IHdyYXBzIGVuY29kZVVSSUNvbXBvbmVudCB0byBlbmNvZGUgYWRkaXRpb25hbCBjaGFyYWN0ZXJzXG4gKiB0byBmdWxseSBhZGhlcmUgdG8gUkZDIDM5ODYuXG4gKi9cbmV4cG9ydCBmdW5jdGlvbiBleHRlbmRlZEVuY29kZVVSSUNvbXBvbmVudChzdHI6IHN0cmluZyk6IHN0cmluZyB7XG4gIHJldHVybiBlbmNvZGVVUklDb21wb25lbnQoc3RyKS5yZXBsYWNlKC9bIScoKSpdL2csIGZ1bmN0aW9uIChjKSB7XG4gICAgcmV0dXJuIFwiJVwiICsgYy5jaGFyQ29kZUF0KDApLnRvU3RyaW5nKDE2KS50b1VwcGVyQ2FzZSgpO1xuICB9KTtcbn1cbiJdfQ==","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.getArrayIfSingleItem = void 0;\n/**\n * The XML parser will set one K:V for a member that could\n * return multiple entries but only has one.\n */\nconst getArrayIfSingleItem = (mayBeArray) => Array.isArray(mayBeArray) ? mayBeArray : [mayBeArray];\nexports.getArrayIfSingleItem = getArrayIfSingleItem;\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZ2V0LWFycmF5LWlmLXNpbmdsZS1pdGVtLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vc3JjL2dldC1hcnJheS1pZi1zaW5nbGUtaXRlbS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7QUFBQTs7O0dBR0c7QUFDSSxNQUFNLG9CQUFvQixHQUFHLENBQUksVUFBYSxFQUFXLEVBQUUsQ0FDaEUsS0FBSyxDQUFDLE9BQU8sQ0FBQyxVQUFVLENBQUMsQ0FBQyxDQUFDLENBQUMsVUFBVSxDQUFDLENBQUMsQ0FBQyxDQUFDLFVBQVUsQ0FBQyxDQUFDO0FBRDNDLFFBQUEsb0JBQW9CLHdCQUN1QiIsInNvdXJjZXNDb250ZW50IjpbIi8qKlxuICogVGhlIFhNTCBwYXJzZXIgd2lsbCBzZXQgb25lIEs6ViBmb3IgYSBtZW1iZXIgdGhhdCBjb3VsZFxuICogcmV0dXJuIG11bHRpcGxlIGVudHJpZXMgYnV0IG9ubHkgaGFzIG9uZS5cbiAqL1xuZXhwb3J0IGNvbnN0IGdldEFycmF5SWZTaW5nbGVJdGVtID0gPFQ+KG1heUJlQXJyYXk6IFQpOiBUIHwgVFtdID0+XG4gIEFycmF5LmlzQXJyYXkobWF5QmVBcnJheSkgPyBtYXlCZUFycmF5IDogW21heUJlQXJyYXldO1xuIl19","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.getValueFromTextNode = void 0;\n/**\n * Recursively parses object and populates value is node from\n * \"#text\" key if it's available\n */\nconst getValueFromTextNode = (obj) => {\n const textNodeName = \"#text\";\n for (const key in obj) {\n if (obj.hasOwnProperty(key) && obj[key][textNodeName] !== undefined) {\n obj[key] = obj[key][textNodeName];\n }\n else if (typeof obj[key] === \"object\" && obj[key] !== null) {\n obj[key] = exports.getValueFromTextNode(obj[key]);\n }\n }\n return obj;\n};\nexports.getValueFromTextNode = getValueFromTextNode;\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZ2V0LXZhbHVlLWZyb20tdGV4dC1ub2RlLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vc3JjL2dldC12YWx1ZS1mcm9tLXRleHQtbm9kZS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7QUFBQTs7O0dBR0c7QUFDSSxNQUFNLG9CQUFvQixHQUFHLENBQUMsR0FBUSxFQUFFLEVBQUU7SUFDL0MsTUFBTSxZQUFZLEdBQUcsT0FBTyxDQUFDO0lBQzdCLEtBQUssTUFBTSxHQUFHLElBQUksR0FBRyxFQUFFO1FBQ3JCLElBQUksR0FBRyxDQUFDLGNBQWMsQ0FBQyxHQUFHLENBQUMsSUFBSSxHQUFHLENBQUMsR0FBRyxDQUFDLENBQUMsWUFBWSxDQUFDLEtBQUssU0FBUyxFQUFFO1lBQ25FLEdBQUcsQ0FBQyxHQUFHLENBQUMsR0FBRyxHQUFHLENBQUMsR0FBRyxDQUFDLENBQUMsWUFBWSxDQUFDLENBQUM7U0FDbkM7YUFBTSxJQUFJLE9BQU8sR0FBRyxDQUFDLEdBQUcsQ0FBQyxLQUFLLFFBQVEsSUFBSSxHQUFHLENBQUMsR0FBRyxDQUFDLEtBQUssSUFBSSxFQUFFO1lBQzVELEdBQUcsQ0FBQyxHQUFHLENBQUMsR0FBRyw0QkFBb0IsQ0FBQyxHQUFHLENBQUMsR0FBRyxDQUFDLENBQUMsQ0FBQztTQUMzQztLQUNGO0lBQ0QsT0FBTyxHQUFHLENBQUM7QUFDYixDQUFDLENBQUM7QUFWVyxRQUFBLG9CQUFvQix3QkFVL0IiLCJzb3VyY2VzQ29udGVudCI6WyIvKipcbiAqIFJlY3Vyc2l2ZWx5IHBhcnNlcyBvYmplY3QgYW5kIHBvcHVsYXRlcyB2YWx1ZSBpcyBub2RlIGZyb21cbiAqIFwiI3RleHRcIiBrZXkgaWYgaXQncyBhdmFpbGFibGVcbiAqL1xuZXhwb3J0IGNvbnN0IGdldFZhbHVlRnJvbVRleHROb2RlID0gKG9iajogYW55KSA9PiB7XG4gIGNvbnN0IHRleHROb2RlTmFtZSA9IFwiI3RleHRcIjtcbiAgZm9yIChjb25zdCBrZXkgaW4gb2JqKSB7XG4gICAgaWYgKG9iai5oYXNPd25Qcm9wZXJ0eShrZXkpICYmIG9ialtrZXldW3RleHROb2RlTmFtZV0gIT09IHVuZGVmaW5lZCkge1xuICAgICAgb2JqW2tleV0gPSBvYmpba2V5XVt0ZXh0Tm9kZU5hbWVdO1xuICAgIH0gZWxzZSBpZiAodHlwZW9mIG9ialtrZXldID09PSBcIm9iamVjdFwiICYmIG9ialtrZXldICE9PSBudWxsKSB7XG4gICAgICBvYmpba2V5XSA9IGdldFZhbHVlRnJvbVRleHROb2RlKG9ialtrZXldKTtcbiAgICB9XG4gIH1cbiAgcmV0dXJuIG9iajtcbn07XG4iXX0=","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst tslib_1 = require(\"tslib\");\ntslib_1.__exportStar(require(\"./client\"), exports);\ntslib_1.__exportStar(require(\"./command\"), exports);\ntslib_1.__exportStar(require(\"./emitWarningIfUnsupportedVersion\"), exports);\ntslib_1.__exportStar(require(\"./extended-encode-uri-component\"), exports);\ntslib_1.__exportStar(require(\"./get-array-if-single-item\"), exports);\ntslib_1.__exportStar(require(\"./get-value-from-text-node\"), exports);\ntslib_1.__exportStar(require(\"./lazy-json\"), exports);\ntslib_1.__exportStar(require(\"./parse-utils\"), exports);\ntslib_1.__exportStar(require(\"./ser-utils\"), exports);\ntslib_1.__exportStar(require(\"./date-utils\"), exports);\ntslib_1.__exportStar(require(\"./split-every\"), exports);\ntslib_1.__exportStar(require(\"./constants\"), exports);\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvaW5kZXgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7O0FBQUEsbURBQXlCO0FBQ3pCLG9EQUEwQjtBQUMxQiw0RUFBa0Q7QUFDbEQsMEVBQWdEO0FBQ2hELHFFQUEyQztBQUMzQyxxRUFBMkM7QUFDM0Msc0RBQTRCO0FBQzVCLHdEQUE4QjtBQUM5QixzREFBNEI7QUFDNUIsdURBQTZCO0FBQzdCLHdEQUE4QjtBQUM5QixzREFBNEIiLCJzb3VyY2VzQ29udGVudCI6WyJleHBvcnQgKiBmcm9tIFwiLi9jbGllbnRcIjtcbmV4cG9ydCAqIGZyb20gXCIuL2NvbW1hbmRcIjtcbmV4cG9ydCAqIGZyb20gXCIuL2VtaXRXYXJuaW5nSWZVbnN1cHBvcnRlZFZlcnNpb25cIjtcbmV4cG9ydCAqIGZyb20gXCIuL2V4dGVuZGVkLWVuY29kZS11cmktY29tcG9uZW50XCI7XG5leHBvcnQgKiBmcm9tIFwiLi9nZXQtYXJyYXktaWYtc2luZ2xlLWl0ZW1cIjtcbmV4cG9ydCAqIGZyb20gXCIuL2dldC12YWx1ZS1mcm9tLXRleHQtbm9kZVwiO1xuZXhwb3J0ICogZnJvbSBcIi4vbGF6eS1qc29uXCI7XG5leHBvcnQgKiBmcm9tIFwiLi9wYXJzZS11dGlsc1wiO1xuZXhwb3J0ICogZnJvbSBcIi4vc2VyLXV0aWxzXCI7XG5leHBvcnQgKiBmcm9tIFwiLi9kYXRlLXV0aWxzXCI7XG5leHBvcnQgKiBmcm9tIFwiLi9zcGxpdC1ldmVyeVwiO1xuZXhwb3J0ICogZnJvbSBcIi4vY29uc3RhbnRzXCI7XG5leHBvcnQgdHlwZSB7IERvY3VtZW50VHlwZSwgU2RrRXJyb3IsIFNtaXRoeUV4Y2VwdGlvbiB9IGZyb20gXCJAYXdzLXNkay90eXBlc1wiO1xuIl19","\"use strict\";\n/**\n * Lazy String holder for JSON typed contents.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.LazyJsonString = exports.StringWrapper = void 0;\n/**\n * Because of https://github.com/microsoft/tslib/issues/95,\n * TS 'extends' shim doesn't support extending native types like String.\n * So here we create StringWrapper that duplicate everything from String\n * class including its prototype chain. So we can extend from here.\n */\n// @ts-ignore StringWrapper implementation is not a simple constructor\nconst StringWrapper = function () {\n //@ts-ignore 'this' cannot be assigned to any, but Object.getPrototypeOf accepts any\n const Class = Object.getPrototypeOf(this).constructor;\n const Constructor = Function.bind.apply(String, [null, ...arguments]);\n //@ts-ignore Call wrapped String constructor directly, don't bother typing it.\n const instance = new Constructor();\n Object.setPrototypeOf(instance, Class.prototype);\n return instance;\n};\nexports.StringWrapper = StringWrapper;\nexports.StringWrapper.prototype = Object.create(String.prototype, {\n constructor: {\n value: exports.StringWrapper,\n enumerable: false,\n writable: true,\n configurable: true,\n },\n});\nObject.setPrototypeOf(exports.StringWrapper, String);\nclass LazyJsonString extends exports.StringWrapper {\n deserializeJSON() {\n return JSON.parse(super.toString());\n }\n toJSON() {\n return super.toString();\n }\n static fromObject(object) {\n if (object instanceof LazyJsonString) {\n return object;\n }\n else if (object instanceof String || typeof object === \"string\") {\n return new LazyJsonString(object);\n }\n return new LazyJsonString(JSON.stringify(object));\n }\n}\nexports.LazyJsonString = LazyJsonString;\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibGF6eS1qc29uLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4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IExhenlKc29uU3RyaW5nIGV4dGVuZHMgU3RyaW5nV3JhcHBlciB7XG4gIGRlc2VyaWFsaXplSlNPTigpOiBhbnkge1xuICAgIHJldHVybiBKU09OLnBhcnNlKHN1cGVyLnRvU3RyaW5nKCkpO1xuICB9XG5cbiAgdG9KU09OKCk6IHN0cmluZyB7XG4gICAgcmV0dXJuIHN1cGVyLnRvU3RyaW5nKCk7XG4gIH1cblxuICBzdGF0aWMgZnJvbU9iamVjdChvYmplY3Q6IGFueSk6IExhenlKc29uU3RyaW5nIHtcbiAgICBpZiAob2JqZWN0IGluc3RhbmNlb2YgTGF6eUpzb25TdHJpbmcpIHtcbiAgICAgIHJldHVybiBvYmplY3Q7XG4gICAgfSBlbHNlIGlmIChvYmplY3QgaW5zdGFuY2VvZiBTdHJpbmcgfHwgdHlwZW9mIG9iamVjdCA9PT0gXCJzdHJpbmdcIikge1xuICAgICAgcmV0dXJuIG5ldyBMYXp5SnNvblN0cmluZyhvYmplY3QpO1xuICAgIH1cbiAgICByZXR1cm4gbmV3IExhenlKc29uU3RyaW5nKEpTT04uc3RyaW5naWZ5KG9iamVjdCkpO1xuICB9XG59XG4iXX0=","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.strictParseByte = exports.strictParseShort = exports.strictParseInt32 = exports.strictParseInt = exports.strictParseLong = exports.limitedParseFloat32 = exports.limitedParseFloat = exports.handleFloat = exports.limitedParseDouble = exports.strictParseFloat32 = exports.strictParseFloat = exports.strictParseDouble = exports.expectUnion = exports.expectString = exports.expectObject = exports.expectNonNull = exports.expectByte = exports.expectShort = exports.expectInt32 = exports.expectInt = exports.expectLong = exports.expectFloat32 = exports.expectNumber = exports.expectBoolean = exports.parseBoolean = void 0;\n/**\n * Give an input string, strictly parses a boolean value.\n *\n * @param value The boolean string to parse.\n * @returns true for \"true\", false for \"false\", otherwise an error is thrown.\n */\nconst parseBoolean = (value) => {\n switch (value) {\n case \"true\":\n return true;\n case \"false\":\n return false;\n default:\n throw new Error(`Unable to parse boolean value \"${value}\"`);\n }\n};\nexports.parseBoolean = parseBoolean;\n/*\n * Asserts a value is a boolean and returns it.\n *\n * @param value A value that is expected to be a boolean.\n * @returns The value if it's a boolean, undefined if it's null/undefined,\n * otherwise an error is thrown.\n */\nconst expectBoolean = (value) => {\n if (value === null || value === undefined) {\n return undefined;\n }\n if (typeof value === \"boolean\") {\n return value;\n }\n throw new TypeError(`Expected boolean, got ${typeof value}`);\n};\nexports.expectBoolean = expectBoolean;\n/**\n * Asserts a value is a number and returns it.\n *\n * @param value A value that is expected to be a number.\n * @returns The value if it's a number, undefined if it's null/undefined,\n * otherwise an error is thrown.\n */\nconst expectNumber = (value) => {\n if (value === null || value === undefined) {\n return undefined;\n }\n if (typeof value === \"number\") {\n return value;\n }\n throw new TypeError(`Expected number, got ${typeof value}`);\n};\nexports.expectNumber = expectNumber;\nconst MAX_FLOAT = Math.ceil(2 ** 127 * (2 - 2 ** -23));\n/**\n * Asserts a value is a 32-bit float and returns it.\n *\n * @param value A value that is expected to be a 32-bit float.\n * @returns The value if it's a float, undefined if it's null/undefined,\n * otherwise an error is thrown.\n */\nconst expectFloat32 = (value) => {\n const expected = exports.expectNumber(value);\n if (expected !== undefined && !Number.isNaN(expected) && expected !== Infinity && expected !== -Infinity) {\n // IEEE-754 is an imperfect representation for floats. Consider the simple\n // value `0.1`. The representation in a 32-bit float would look like:\n //\n // 0 01111011 10011001100110011001101\n // Actual value: 0.100000001490116119384765625\n //\n // Note the repeating pattern of `1001` in the fraction part. The 64-bit\n // representation is similar:\n //\n // 0 01111111011 1001100110011001100110011001100110011001100110011010\n // Actual value: 0.100000000000000005551115123126\n //\n // So even for what we consider simple numbers, the representation differs\n // between the two formats. And it's non-obvious how one might look at the\n // 64-bit value (which is how JS represents numbers) and determine if it\n // can be represented reasonably in the 32-bit form. Primarily because you\n // can't know whether the intent was to represent `0.1` or the actual\n // value in memory. But even if you have both the decimal value and the\n // double value, that still doesn't communicate the intended precision.\n //\n // So rather than attempting to divine the intent of the caller, we instead\n // do some simple bounds checking to make sure the value is passingly\n // representable in a 32-bit float. It's not perfect, but it's good enough.\n // Perfect, even if possible to achieve, would likely be too costly to\n // be worth it.\n //\n // The maximum value of a 32-bit float. Since the 64-bit representation\n // could be more or less, we just round it up to the nearest whole number.\n // This further reduces our ability to be certain of the value, but it's\n // an acceptable tradeoff.\n //\n // Compare against the absolute value to simplify things.\n if (Math.abs(expected) > MAX_FLOAT) {\n throw new TypeError(`Expected 32-bit float, got ${value}`);\n }\n }\n return expected;\n};\nexports.expectFloat32 = expectFloat32;\n/**\n * Asserts a value is an integer and returns it.\n *\n * @param value A value that is expected to be an integer.\n * @returns The value if it's an integer, undefined if it's null/undefined,\n * otherwise an error is thrown.\n */\nconst expectLong = (value) => {\n if (value === null || value === undefined) {\n return undefined;\n }\n if (Number.isInteger(value) && !Number.isNaN(value)) {\n return value;\n }\n throw new TypeError(`Expected integer, got ${typeof value}`);\n};\nexports.expectLong = expectLong;\n/**\n * @deprecated Use expectLong\n */\nexports.expectInt = exports.expectLong;\n/**\n * Asserts a value is a 32-bit integer and returns it.\n *\n * @param value A value that is expected to be an integer.\n * @returns The value if it's an integer, undefined if it's null/undefined,\n * otherwise an error is thrown.\n */\nconst expectInt32 = (value) => expectSizedInt(value, 32);\nexports.expectInt32 = expectInt32;\n/**\n * Asserts a value is a 16-bit integer and returns it.\n *\n * @param value A value that is expected to be an integer.\n * @returns The value if it's an integer, undefined if it's null/undefined,\n * otherwise an error is thrown.\n */\nconst expectShort = (value) => expectSizedInt(value, 16);\nexports.expectShort = expectShort;\n/**\n * Asserts a value is an 8-bit integer and returns it.\n *\n * @param value A value that is expected to be an integer.\n * @returns The value if it's an integer, undefined if it's null/undefined,\n * otherwise an error is thrown.\n */\nconst expectByte = (value) => expectSizedInt(value, 8);\nexports.expectByte = expectByte;\nconst expectSizedInt = (value, size) => {\n const expected = exports.expectLong(value);\n if (expected !== undefined && castInt(expected, size) !== expected) {\n throw new TypeError(`Expected ${size}-bit integer, got ${value}`);\n }\n return expected;\n};\nconst castInt = (value, size) => {\n switch (size) {\n case 32:\n return Int32Array.of(value)[0];\n case 16:\n return Int16Array.of(value)[0];\n case 8:\n return Int8Array.of(value)[0];\n }\n};\n/**\n * Asserts a value is not null or undefined and returns it, or throws an error.\n *\n * @param value A value that is expected to be defined\n * @param location The location where we're expecting to find a defined object (optional)\n * @returns The value if it's not undefined, otherwise throws an error\n */\nconst expectNonNull = (value, location) => {\n if (value === null || value === undefined) {\n if (location) {\n throw new TypeError(`Expected a non-null value for ${location}`);\n }\n throw new TypeError(\"Expected a non-null value\");\n }\n return value;\n};\nexports.expectNonNull = expectNonNull;\n/**\n * Asserts a value is an JSON-like object and returns it. This is expected to be used\n * with values parsed from JSON (arrays, objects, numbers, strings, booleans).\n *\n * @param value A value that is expected to be an object\n * @returns The value if it's an object, undefined if it's null/undefined,\n * otherwise an error is thrown.\n */\nconst expectObject = (value) => {\n if (value === null || value === undefined) {\n return undefined;\n }\n if (typeof value === \"object\" && !Array.isArray(value)) {\n return value;\n }\n throw new TypeError(`Expected object, got ${typeof value}`);\n};\nexports.expectObject = expectObject;\n/**\n * Asserts a value is a string and returns it.\n *\n * @param value A value that is expected to be a string.\n * @returns The value if it's a string, undefined if it's null/undefined,\n * otherwise an error is thrown.\n */\nconst expectString = (value) => {\n if (value === null || value === undefined) {\n return undefined;\n }\n if (typeof value === \"string\") {\n return value;\n }\n throw new TypeError(`Expected string, got ${typeof value}`);\n};\nexports.expectString = expectString;\n/**\n * Asserts a value is a JSON-like object with only one non-null/non-undefined key and\n * returns it.\n *\n * @param value A value that is expected to be an object with exactly one non-null,\n * non-undefined key.\n * @return the value if it's a union, undefined if it's null/undefined, otherwise\n * an error is thrown.\n */\nconst expectUnion = (value) => {\n if (value === null || value === undefined) {\n return undefined;\n }\n const asObject = exports.expectObject(value);\n const setKeys = Object.entries(asObject)\n .filter(([_, v]) => v !== null && v !== undefined)\n .map(([k, _]) => k);\n if (setKeys.length === 0) {\n throw new TypeError(`Unions must have exactly one non-null member`);\n }\n if (setKeys.length > 1) {\n throw new TypeError(`Unions must have exactly one non-null member. Keys ${setKeys} were not null.`);\n }\n return asObject;\n};\nexports.expectUnion = expectUnion;\n/**\n * Parses a value into a double. If the value is null or undefined, undefined\n * will be returned. If the value is a string, it will be parsed by the standard\n * parseFloat with one exception: NaN may only be explicitly set as the string\n * \"NaN\", any implicit Nan values will result in an error being thrown. If any\n * other type is provided, an exception will be thrown.\n *\n * @param value A number or string representation of a double.\n * @returns The value as a number, or undefined if it's null/undefined.\n */\nconst strictParseDouble = (value) => {\n if (typeof value == \"string\") {\n return exports.expectNumber(parseNumber(value));\n }\n return exports.expectNumber(value);\n};\nexports.strictParseDouble = strictParseDouble;\n/**\n * @deprecated Use strictParseDouble\n */\nexports.strictParseFloat = exports.strictParseDouble;\n/**\n * Parses a value into a float. If the value is null or undefined, undefined\n * will be returned. If the value is a string, it will be parsed by the standard\n * parseFloat with one exception: NaN may only be explicitly set as the string\n * \"NaN\", any implicit Nan values will result in an error being thrown. If any\n * other type is provided, an exception will be thrown.\n *\n * @param value A number or string representation of a float.\n * @returns The value as a number, or undefined if it's null/undefined.\n */\nconst strictParseFloat32 = (value) => {\n if (typeof value == \"string\") {\n return exports.expectFloat32(parseNumber(value));\n }\n return exports.expectFloat32(value);\n};\nexports.strictParseFloat32 = strictParseFloat32;\n// This regex matches JSON-style numbers. In short:\n// * The integral may start with a negative sign, but not a positive one\n// * No leading 0 on the integral unless it's immediately followed by a '.'\n// * Exponent indicated by a case-insensitive 'E' optionally followed by a\n// positive/negative sign and some number of digits.\n// It also matches both positive and negative infinity as well and explicit NaN.\nconst NUMBER_REGEX = /(-?(?:0|[1-9]\\d*)(?:\\.\\d+)?(?:[eE][+-]?\\d+)?)|(-?Infinity)|(NaN)/g;\nconst parseNumber = (value) => {\n const matches = value.match(NUMBER_REGEX);\n if (matches === null || matches[0].length !== value.length) {\n throw new TypeError(`Expected real number, got implicit NaN`);\n }\n return parseFloat(value);\n};\n/**\n * Asserts a value is a number and returns it. If the value is a string\n * representation of a non-numeric number type (NaN, Infinity, -Infinity),\n * the value will be parsed. Any other string value will result in an exception\n * being thrown. Null or undefined will be returned as undefined. Any other\n * type will result in an exception being thrown.\n *\n * @param value A number or string representation of a non-numeric float.\n * @returns The value as a number, or undefined if it's null/undefined.\n */\nconst limitedParseDouble = (value) => {\n if (typeof value == \"string\") {\n return parseFloatString(value);\n }\n return exports.expectNumber(value);\n};\nexports.limitedParseDouble = limitedParseDouble;\n/**\n * @deprecated Use limitedParseDouble\n */\nexports.handleFloat = exports.limitedParseDouble;\n/**\n * @deprecated Use limitedParseDouble\n */\nexports.limitedParseFloat = exports.limitedParseDouble;\n/**\n * Asserts a value is a 32-bit float and returns it. If the value is a string\n * representation of a non-numeric number type (NaN, Infinity, -Infinity),\n * the value will be parsed. Any other string value will result in an exception\n * being thrown. Null or undefined will be returned as undefined. Any other\n * type will result in an exception being thrown.\n *\n * @param value A number or string representation of a non-numeric float.\n * @returns The value as a number, or undefined if it's null/undefined.\n */\nconst limitedParseFloat32 = (value) => {\n if (typeof value == \"string\") {\n return parseFloatString(value);\n }\n return exports.expectFloat32(value);\n};\nexports.limitedParseFloat32 = limitedParseFloat32;\nconst parseFloatString = (value) => {\n switch (value) {\n case \"NaN\":\n return NaN;\n case \"Infinity\":\n return Infinity;\n case \"-Infinity\":\n return -Infinity;\n default:\n throw new Error(`Unable to parse float value: ${value}`);\n }\n};\n/**\n * Parses a value into an integer. If the value is null or undefined, undefined\n * will be returned. If the value is a string, it will be parsed by parseFloat\n * and the result will be asserted to be an integer. If the parsed value is not\n * an integer, or the raw value is any type other than a string or number, an\n * exception will be thrown.\n *\n * @param value A number or string representation of an integer.\n * @returns The value as a number, or undefined if it's null/undefined.\n */\nconst strictParseLong = (value) => {\n if (typeof value === \"string\") {\n // parseInt can't be used here, because it will silently discard any\n // existing decimals. We want to instead throw an error if there are any.\n return exports.expectLong(parseNumber(value));\n }\n return exports.expectLong(value);\n};\nexports.strictParseLong = strictParseLong;\n/**\n * @deprecated Use strictParseLong\n */\nexports.strictParseInt = exports.strictParseLong;\n/**\n * Parses a value into a 32-bit integer. If the value is null or undefined, undefined\n * will be returned. If the value is a string, it will be parsed by parseFloat\n * and the result will be asserted to be an integer. If the parsed value is not\n * an integer, or the raw value is any type other than a string or number, an\n * exception will be thrown.\n *\n * @param value A number or string representation of a 32-bit integer.\n * @returns The value as a number, or undefined if it's null/undefined.\n */\nconst strictParseInt32 = (value) => {\n if (typeof value === \"string\") {\n // parseInt can't be used here, because it will silently discard any\n // existing decimals. We want to instead throw an error if there are any.\n return exports.expectInt32(parseNumber(value));\n }\n return exports.expectInt32(value);\n};\nexports.strictParseInt32 = strictParseInt32;\n/**\n * Parses a value into a 16-bit integer. If the value is null or undefined, undefined\n * will be returned. If the value is a string, it will be parsed by parseFloat\n * and the result will be asserted to be an integer. If the parsed value is not\n * an integer, or the raw value is any type other than a string or number, an\n * exception will be thrown.\n *\n * @param value A number or string representation of a 16-bit integer.\n * @returns The value as a number, or undefined if it's null/undefined.\n */\nconst strictParseShort = (value) => {\n if (typeof value === \"string\") {\n // parseInt can't be used here, because it will silently discard any\n // existing decimals. We want to instead throw an error if there are any.\n return exports.expectShort(parseNumber(value));\n }\n return exports.expectShort(value);\n};\nexports.strictParseShort = strictParseShort;\n/**\n * Parses a value into an 8-bit integer. If the value is null or undefined, undefined\n * will be returned. If the value is a string, it will be parsed by parseFloat\n * and the result will be asserted to be an integer. If the parsed value is not\n * an integer, or the raw value is any type other than a string or number, an\n * exception will be thrown.\n *\n * @param value A number or string representation of an 8-bit integer.\n * @returns The value as a number, or undefined if it's null/undefined.\n */\nconst strictParseByte = (value) => {\n if (typeof value === \"string\") {\n // parseInt can't be used here, because it will silently discard any\n // existing decimals. We want to instead throw an error if there are any.\n return exports.expectByte(parseNumber(value));\n }\n return exports.expectByte(value);\n};\nexports.strictParseByte = strictParseByte;\n//# sourceMappingURL=data:application/json;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C91bmRlZmluZWQuXG4gKi9cbmV4cG9ydCBjb25zdCBzdHJpY3RQYXJzZUJ5dGUgPSAodmFsdWU6IHN0cmluZyB8IG51bWJlcik6IG51bWJlciB8IHVuZGVmaW5lZCA9PiB7XG4gIGlmICh0eXBlb2YgdmFsdWUgPT09IFwic3RyaW5nXCIpIHtcbiAgICAvLyBwYXJzZUludCBjYW4ndCBiZSB1c2VkIGhlcmUsIGJlY2F1c2UgaXQgd2lsbCBzaWxlbnRseSBkaXNjYXJkIGFueVxuICAgIC8vIGV4aXN0aW5nIGRlY2ltYWxzLiBXZSB3YW50IHRvIGluc3RlYWQgdGhyb3cgYW4gZXJyb3IgaWYgdGhlcmUgYXJlIGFueS5cbiAgICByZXR1cm4gZXhwZWN0Qnl0ZShwYXJzZU51bWJlcih2YWx1ZSkpO1xuICB9XG4gIHJldHVybiBleHBlY3RCeXRlKHZhbHVlKTtcbn07XG4iXX0=","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.serializeFloat = void 0;\n/**\n * Serializes a number, turning non-numeric values into strings.\n *\n * @param value The number to serialize.\n * @returns A number, or a string if the given number was non-numeric.\n */\nconst serializeFloat = (value) => {\n // NaN is not equal to everything, including itself.\n if (value !== value) {\n return \"NaN\";\n }\n switch (value) {\n case Infinity:\n return \"Infinity\";\n case -Infinity:\n return \"-Infinity\";\n default:\n return value;\n }\n};\nexports.serializeFloat = serializeFloat;\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic2VyLXV0aWxzLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vc3JjL3Nlci11dGlscy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7QUFBQTs7Ozs7R0FLRztBQUNJLE1BQU0sY0FBYyxHQUFHLENBQUMsS0FBYSxFQUFtQixFQUFFO0lBQy9ELG9EQUFvRDtJQUNwRCxJQUFJLEtBQUssS0FBSyxLQUFLLEVBQUU7UUFDbkIsT0FBTyxLQUFLLENBQUM7S0FDZDtJQUNELFFBQVEsS0FBSyxFQUFFO1FBQ2IsS0FBSyxRQUFRO1lBQ1gsT0FBTyxVQUFVLENBQUM7UUFDcEIsS0FBSyxDQUFDLFFBQVE7WUFDWixPQUFPLFdBQVcsQ0FBQztRQUNyQjtZQUNFLE9BQU8sS0FBSyxDQUFDO0tBQ2hCO0FBQ0gsQ0FBQyxDQUFDO0FBYlcsUUFBQSxjQUFjLGtCQWF6QiIsInNvdXJjZXNDb250ZW50IjpbIi8qKlxuICogU2VyaWFsaXplcyBhIG51bWJlciwgdHVybmluZyBub24tbnVtZXJpYyB2YWx1ZXMgaW50byBzdHJpbmdzLlxuICpcbiAqIEBwYXJhbSB2YWx1ZSBUaGUgbnVtYmVyIHRvIHNlcmlhbGl6ZS5cbiAqIEByZXR1cm5zIEEgbnVtYmVyLCBvciBhIHN0cmluZyBpZiB0aGUgZ2l2ZW4gbnVtYmVyIHdhcyBub24tbnVtZXJpYy5cbiAqL1xuZXhwb3J0IGNvbnN0IHNlcmlhbGl6ZUZsb2F0ID0gKHZhbHVlOiBudW1iZXIpOiBzdHJpbmcgfCBudW1iZXIgPT4ge1xuICAvLyBOYU4gaXMgbm90IGVxdWFsIHRvIGV2ZXJ5dGhpbmcsIGluY2x1ZGluZyBpdHNlbGYuXG4gIGlmICh2YWx1ZSAhPT0gdmFsdWUpIHtcbiAgICByZXR1cm4gXCJOYU5cIjtcbiAgfVxuICBzd2l0Y2ggKHZhbHVlKSB7XG4gICAgY2FzZSBJbmZpbml0eTpcbiAgICAgIHJldHVybiBcIkluZmluaXR5XCI7XG4gICAgY2FzZSAtSW5maW5pdHk6XG4gICAgICByZXR1cm4gXCItSW5maW5pdHlcIjtcbiAgICBkZWZhdWx0OlxuICAgICAgcmV0dXJuIHZhbHVlO1xuICB9XG59O1xuIl19","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.splitEvery = void 0;\n/**\n * Given an input string, splits based on the delimiter after a given\n * number of delimiters has been encountered.\n *\n * @param value The input string to split.\n * @param delimiter The delimiter to split on.\n * @param numDelimiters The number of delimiters to have encountered to split.\n */\nfunction splitEvery(value, delimiter, numDelimiters) {\n // Fail if we don't have a clear number to split on.\n if (numDelimiters <= 0 || !Number.isInteger(numDelimiters)) {\n throw new Error(\"Invalid number of delimiters (\" + numDelimiters + \") for splitEvery.\");\n }\n const segments = value.split(delimiter);\n // Short circuit extra logic for the simple case.\n if (numDelimiters === 1) {\n return segments;\n }\n const compoundSegments = [];\n let currentSegment = \"\";\n for (let i = 0; i < segments.length; i++) {\n if (currentSegment === \"\") {\n // Start a new segment.\n currentSegment = segments[i];\n }\n else {\n // Compound the current segment with the delimiter.\n currentSegment += delimiter + segments[i];\n }\n if ((i + 1) % numDelimiters === 0) {\n // We encountered the right number of delimiters, so add the entry.\n compoundSegments.push(currentSegment);\n // And reset the current segment.\n currentSegment = \"\";\n }\n }\n // Handle any leftover segment portion.\n if (currentSegment !== \"\") {\n compoundSegments.push(currentSegment);\n }\n return compoundSegments;\n}\nexports.splitEvery = splitEvery;\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic3BsaXQtZXZlcnkuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvc3BsaXQtZXZlcnkudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7O0FBQUE7Ozs7Ozs7R0FPRztBQUNILFNBQWdCLFVBQVUsQ0FBQyxLQUFhLEVBQUUsU0FBaUIsRUFBRSxhQUFxQjtJQUNoRixvREFBb0Q7SUFDcEQsSUFBSSxhQUFhLElBQUksQ0FBQyxJQUFJLENBQUMsTUFBTSxDQUFDLFNBQVMsQ0FBQyxhQUFhLENBQUMsRUFBRTtRQUMxRCxNQUFNLElBQUksS0FBSyxDQUFDLGdDQUFnQyxHQUFHLGFBQWEsR0FBRyxtQkFBbUIsQ0FBQyxDQUFDO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QXJyYXk8c3RyaW5nPiA9IFtdO1xuICBsZXQgY3VycmVudFNlZ21lbnQgPSBcIlwiO1xuICBmb3IgKGxldCBpID0gMDsgaSA8IHNlZ21lbnRzLmxlbmd0aDsgaSsrKSB7XG4gICAgaWYgKGN1cnJlbnRTZWdtZW50ID09PSBcIlwiKSB7XG4gICAgICAvLyBTdGFydCBhIG5ldyBzZWdtZW50LlxuICAgICAgY3VycmVudFNlZ21lbnQgPSBzZWdtZW50c1tpXTtcbiAgICB9IGVsc2Uge1xuICAgICAgLy8gQ29tcG91bmQgdGhlIGN1cnJlbnQgc2VnbWVudCB3aXRoIHRoZSBkZWxpbWl0ZXIuXG4gICAgICBjdXJyZW50U2VnbWVudCArPSBkZWxpbWl0ZXIgKyBzZWdtZW50c1tpXTtcbiAgICB9XG5cbiAgICBpZiAoKGkgKyAxKSAlIG51bURlbGltaXRlcnMgPT09IDApIHtcbiAgICAgIC8vIFdlIGVuY291bnRlcmVkIHRoZSByaWdodCBudW1iZXIgb2YgZGVsaW1pdGVycywgc28gYWRkIHRoZSBlbnRyeS5cbiAgICAgIGNvbXBvdW5kU2VnbWVudHMucHVzaChjdXJyZW50U2VnbWVudCk7XG4gICAgICAvLyBBbmQgcmVzZXQgdGhlIGN1cnJlbnQgc2VnbWVudC5cbiAgICAgIGN1cnJlbnRTZWdtZW50ID0gXCJcIjtcbiAgICB9XG4gIH1cblxuICAvLyBIYW5kbGUgYW55IGxlZnRvdmVyIHNlZ21lbnQgcG9ydGlvbi5cbiAgaWYgKGN1cnJlbnRTZWdtZW50ICE9PSBcIlwiKSB7XG4gICAgY29tcG91bmRTZWdtZW50cy5wdXNoKGN1cnJlbnRTZWdtZW50KTtcbiAgfVxuXG4gIHJldHVybiBjb21wb3VuZFNlZ21lbnRzO1xufVxuIl19","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.parseUrl = void 0;\nconst querystring_parser_1 = require(\"@aws-sdk/querystring-parser\");\nconst parseUrl = (url) => {\n const { hostname, pathname, port, protocol, search } = new URL(url);\n let query;\n if (search) {\n query = querystring_parser_1.parseQueryString(search);\n }\n return {\n hostname,\n port: port ? parseInt(port) : undefined,\n protocol,\n path: pathname,\n query,\n };\n};\nexports.parseUrl = parseUrl;\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvaW5kZXgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7O0FBQUEsb0VBQStEO0FBR3hELE1BQU0sUUFBUSxHQUFjLENBQUMsR0FBVyxFQUFZLEVBQUU7SUFDM0QsTUFBTSxFQUFFLFFBQVEsRUFBRSxRQUFRLEVBQUUsSUFBSSxFQUFFLFFBQVEsRUFBRSxNQUFNLEVBQUUsR0FBRyxJQUFJLEdBQUcsQ0FBQyxHQUFHLENBQUMsQ0FBQztJQUVwRSxJQUFJLEtBQW9DLENBQUM7SUFDekMsSUFBSSxNQUFNLEVBQUU7UUFDVixLQUFLLEdBQUcscUNBQWdCLENBQUMsTUFBTSxDQUFDLENBQUM7S0FDbEM7SUFFRCxPQUFPO1FBQ0wsUUFBUTtRQUNSLElBQUksRUFBRSxJQUFJLENBQUMsQ0FBQyxDQUFDLFFBQVEsQ0FBQyxJQUFJLENBQUMsQ0FBQyxDQUFDLENBQUMsU0FBUztRQUN2QyxRQUFRO1FBQ1IsSUFBSSxFQUFFLFFBQVE7UUFDZCxLQUFLO0tBQ04sQ0FBQztBQUNKLENBQUMsQ0FBQztBQWZXLFFBQUEsUUFBUSxZQWVuQiIsInNvdXJjZXNDb250ZW50IjpbImltcG9ydCB7IHBhcnNlUXVlcnlTdHJpbmcgfSBmcm9tIFwiQGF3cy1zZGsvcXVlcnlzdHJpbmctcGFyc2VyXCI7XG5pbXBvcnQgeyBFbmRwb2ludCwgUXVlcnlQYXJhbWV0ZXJCYWcsIFVybFBhcnNlciB9IGZyb20gXCJAYXdzLXNkay90eXBlc1wiO1xuXG5leHBvcnQgY29uc3QgcGFyc2VVcmw6IFVybFBhcnNlciA9ICh1cmw6IHN0cmluZyk6IEVuZHBvaW50ID0+IHtcbiAgY29uc3QgeyBob3N0bmFtZSwgcGF0aG5hbWUsIHBvcnQsIHByb3RvY29sLCBzZWFyY2ggfSA9IG5ldyBVUkwodXJsKTtcblxuICBsZXQgcXVlcnk6IFF1ZXJ5UGFyYW1ldGVyQmFnIHwgdW5kZWZpbmVkO1xuICBpZiAoc2VhcmNoKSB7XG4gICAgcXVlcnkgPSBwYXJzZVF1ZXJ5U3RyaW5nKHNlYXJjaCk7XG4gIH1cblxuICByZXR1cm4ge1xuICAgIGhvc3RuYW1lLFxuICAgIHBvcnQ6IHBvcnQgPyBwYXJzZUludChwb3J0KSA6IHVuZGVmaW5lZCxcbiAgICBwcm90b2NvbCxcbiAgICBwYXRoOiBwYXRobmFtZSxcbiAgICBxdWVyeSxcbiAgfTtcbn07XG4iXX0=","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.toBase64 = exports.fromBase64 = void 0;\nconst util_buffer_from_1 = require(\"@aws-sdk/util-buffer-from\");\nconst BASE64_REGEX = /^[A-Za-z0-9+/]*={0,2}$/;\n/**\n * Converts a base-64 encoded string to a Uint8Array of bytes using Node.JS's\n * `buffer` module.\n *\n * @param input The base-64 encoded string\n */\nfunction fromBase64(input) {\n // Node's buffer module allows padding to be omitted, but we want to enforce\n // it. So here we ensure that the input represents a number of bits divisible\n // by 8. Each character represents 6 bits, so after reducing the fraction we\n // end up mulitplying by 3/4 and checking for a remainder.\n if ((input.length * 3) % 4 !== 0) {\n throw new TypeError(`Incorrect padding on base64 string.`);\n }\n // Node will just ingore invalid characters, so we need to make sure they're\n // properly rejected.\n if (!BASE64_REGEX.exec(input)) {\n throw new TypeError(`Invalid base64 string.`);\n }\n const buffer = util_buffer_from_1.fromString(input, \"base64\");\n return new Uint8Array(buffer.buffer, buffer.byteOffset, buffer.byteLength);\n}\nexports.fromBase64 = fromBase64;\n/**\n * Converts a Uint8Array of binary data to a base-64 encoded string using\n * Node.JS's `buffer` module.\n *\n * @param input The binary data to encode\n */\nfunction toBase64(input) {\n return util_buffer_from_1.fromArrayBuffer(input.buffer, input.byteOffset, input.byteLength).toString(\"base64\");\n}\nexports.toBase64 = toBase64;\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvaW5kZXgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7O0FBQUEsZ0VBQXdFO0FBRXhFLE1BQU0sWUFBWSxHQUFHLHdCQUF3QixDQUFDO0FBRTlDOzs7OztHQUtHO0FBQ0gsU0FBZ0IsVUFBVSxDQUFDLEtBQWE7SUFDdEMsNEVBQTRFO0lBQzVFLDZFQUE2RTtJQUM3RSw0RUFBNEU7SUFDNUUsMERBQTBEO0lBQzFELElBQUksQ0FBQyxLQUFLLENBQUMsTUFBTSxHQUFHLENBQUMsQ0FBQyxHQUFHLENBQUMsS0FBSyxDQUFDLEVBQUU7UUFDaEMsTUFBTSxJQUFJLFNBQVMsQ0FBQyxxQ0FBcUMsQ0FBQyxDQUFDO0tBQzVEO0lBRUQsNEVBQTRFO0lBQzVFLHFCQUFxQjtJQUNyQixJQUFJLENBQUMsWUFBWSxDQUFDLElBQUksQ0FBQyxLQUFLLENBQUMsRUFBRTtRQUM3QixNQUFNLElBQUksU0FBUyxDQUFDLHdCQUF3QixDQUFDLENBQUM7S0FDL0M7SUFFRCxNQUFNLE1BQU0sR0FBRyw2QkFBVSxDQUFDLEtBQUssRUFBRSxRQUFRLENBQUMsQ0FBQztJQUUzQyxPQUFPLElBQUksVUFBVSxDQUFDLE1BQU0sQ0FBQyxNQUFNLEVBQUUsTUFBTSxDQUFDLFVBQVUsRUFBRSxNQUFNLENBQUMsVUFBVSxDQUF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CBpbnB1dC5ieXRlTGVuZ3RoKS50b1N0cmluZyhcImJhc2U2NFwiKTtcbn1cbiJdfQ==","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.calculateBodyLength = void 0;\nconst fs_1 = require(\"fs\");\nfunction calculateBodyLength(body) {\n if (!body) {\n return 0;\n }\n if (typeof body === \"string\") {\n return Buffer.from(body).length;\n }\n else if (typeof body.byteLength === \"number\") {\n // handles Uint8Array, ArrayBuffer, Buffer, and ArrayBufferView\n return body.byteLength;\n }\n else if (typeof body.size === \"number\") {\n return body.size;\n }\n else if (typeof body.path === \"string\") {\n // handles fs readable streams\n return fs_1.lstatSync(body.path).size;\n }\n}\nexports.calculateBodyLength = calculateBodyLength;\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvaW5kZXgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7O0FBQUEsMkJBQStCO0FBRS9CLFNBQWdCLG1CQUFtQixDQUFDLElBQVM7SUFDM0MsSUFBSSxDQUFDLElBQUksRUFBRTtRQUNULE9BQU8sQ0FBQyxDQUFDO0tBQ1Y7SUFDRCxJQUFJLE9BQU8sSUFBSSxLQUFLLFFBQVEsRUFBRTtRQUM1QixPQUFPLE1BQU0sQ0FBQyxJQUFJLENBQUMsSUFBSSxDQUFDLENBQUMsTUFBTSxDQUFDO0tBQ2pDO1NBQU0sSUFBSSxPQUFPLElBQUksQ0FBQyxVQUFVLEtBQUssUUFBUSxFQUFFO1FBQzlDLCtEQUErRDtRQUMvRCxPQUFPLElBQUksQ0FBQyxVQUFVLENBQUM7S0FDeEI7U0FBTSxJQUFJLE9BQU8sSUFBSSxDQUFDLElBQUksS0FBSyxRQUFRLEVBQUU7UUFDeEMsT0FBTyxJQUFJLENBQUMsSUFBSSxDQUFDO0tBQ2xCO1NBQU0sSUFBSSxPQUFPLElBQUksQ0FBQyxJQUFJLEtBQUssUUFBUSxFQUFFO1FBQ3hDLDhCQUE4QjtRQUM5QixPQUFPLGNBQVMsQ0FBQyxJQUFJLENBQUMsSUFBSSxDQUFDLENBQUMsSUFBSSxDQUFDO0tBQ2xDO0FBQ0gsQ0FBQztBQWZELGtEQWVDIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHsgbHN0YXRTeW5jIH0gZnJvbSBcImZzXCI7XG5cbmV4cG9ydCBmdW5jdGlvbiBjYWxjdWxhdGVCb2R5TGVuZ3RoKGJvZHk6IGFueSk6IG51bWJlciB8IHVuZGVmaW5lZCB7XG4gIGlmICghYm9keSkge1xuICAgIHJldHVybiAwO1xuICB9XG4gIGlmICh0eXBlb2YgYm9keSA9PT0gXCJzdHJpbmdcIikge1xuICAgIHJldHVybiBCdWZmZXIuZnJvbShib2R5KS5sZW5ndGg7XG4gIH0gZWxzZSBpZiAodHlwZW9mIGJvZHkuYnl0ZUxlbmd0aCA9PT0gXCJudW1iZXJcIikge1xuICAgIC8vIGhhbmRsZXMgVWludDhBcnJheSwgQXJyYXlCdWZmZXIsIEJ1ZmZlciwgYW5kIEFycmF5QnVmZmVyVmlld1xuICAgIHJldHVybiBib2R5LmJ5dGVMZW5ndGg7XG4gIH0gZWxzZSBpZiAodHlwZW9mIGJvZHkuc2l6ZSA9PT0gXCJudW1iZXJcIikge1xuICAgIHJldHVybiBib2R5LnNpemU7XG4gIH0gZWxzZSBpZiAodHlwZW9mIGJvZHkucGF0aCA9PT0gXCJzdHJpbmdcIikge1xuICAgIC8vIGhhbmRsZXMgZnMgcmVhZGFibGUgc3RyZWFtc1xuICAgIHJldHVybiBsc3RhdFN5bmMoYm9keS5wYXRoKS5zaXplO1xuICB9XG59XG4iXX0=","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.fromString = exports.fromArrayBuffer = void 0;\nconst is_array_buffer_1 = require(\"@aws-sdk/is-array-buffer\");\nconst buffer_1 = require(\"buffer\");\nconst fromArrayBuffer = (input, offset = 0, length = input.byteLength - offset) => {\n if (!is_array_buffer_1.isArrayBuffer(input)) {\n throw new TypeError(`The \"input\" argument must be ArrayBuffer. Received type ${typeof input} (${input})`);\n }\n return buffer_1.Buffer.from(input, offset, length);\n};\nexports.fromArrayBuffer = fromArrayBuffer;\nconst fromString = (input, encoding) => {\n if (typeof input !== \"string\") {\n throw new TypeError(`The \"input\" argument must be of type string. Received type ${typeof input} (${input})`);\n }\n return encoding ? buffer_1.Buffer.from(input, encoding) : buffer_1.Buffer.from(input);\n};\nexports.fromString = fromString;\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvaW5kZXgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7O0FBQUEsOERBQXlEO0FBQ3pELG1DQUFnQztBQUV6QixNQUFNLGVBQWUsR0FBRyxDQUFDLEtBQWtCLEVBQUUsTUFBTSxHQUFHLENBQUMsRUFBRSxTQUFpQixLQUFLLENBQUMsVUFBVSxHQUFHLE1BQU0sRUFBVSxFQUFFO0lBQ3BILElBQUksQ0FBQywrQkFBYSxDQUFDLEtBQUssQ0FBQyxFQUFFO1FBQ3pCLE1BQU0sSUFBSSxTQUFTLENBQUMsMkRBQTJELE9BQU8sS0FBSyxLQUFLLEtBQUssR0FBRyxDQUFDLENBQUM7S0FDM0c7SUFFRCxPQUFPLGVBQU0sQ0FBQyxJQUFJLENBQUMsS0FBSyxFQUFFLE1BQU0sRUFBRSxNQUFNLENBQUMsQ0FBQztBQUM1QyxDQUFDLENBQUM7QUFOVyxRQUFBLGVBQWUsbUJBTTFCO0FBSUssTUFBTSxVQUFVLEdBQUcsQ0FBQyxLQUFhLEVBQUUsUUFBeUIsRUFBVSxFQUFFO0lBQzdFLElBQUksT0FBTyxLQUFLLEtBQUssUUFBUSxFQUFFO1FBQ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FwiO1xuXG5leHBvcnQgY29uc3QgZnJvbVN0cmluZyA9IChpbnB1dDogc3RyaW5nLCBlbmNvZGluZz86IFN0cmluZ0VuY29kaW5nKTogQnVmZmVyID0+IHtcbiAgaWYgKHR5cGVvZiBpbnB1dCAhPT0gXCJzdHJpbmdcIikge1xuICAgIHRocm93IG5ldyBUeXBlRXJyb3IoYFRoZSBcImlucHV0XCIgYXJndW1lbnQgbXVzdCBiZSBvZiB0eXBlIHN0cmluZy4gUmVjZWl2ZWQgdHlwZSAke3R5cGVvZiBpbnB1dH0gKCR7aW5wdXR9KWApO1xuICB9XG5cbiAgcmV0dXJuIGVuY29kaW5nID8gQnVmZmVyLmZyb20oaW5wdXQsIGVuY29kaW5nKSA6IEJ1ZmZlci5mcm9tKGlucHV0KTtcbn07XG4iXX0=","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.getMasterProfileName = exports.parseKnownFiles = exports.DEFAULT_PROFILE = exports.ENV_PROFILE = void 0;\nconst shared_ini_file_loader_1 = require(\"@aws-sdk/shared-ini-file-loader\");\nexports.ENV_PROFILE = \"AWS_PROFILE\";\nexports.DEFAULT_PROFILE = \"default\";\n/**\n * Load profiles from credentials and config INI files and normalize them into a\n * single profile list.\n *\n * @internal\n */\nconst parseKnownFiles = async (init) => {\n const { loadedConfig = shared_ini_file_loader_1.loadSharedConfigFiles(init) } = init;\n const parsedFiles = await loadedConfig;\n return {\n ...parsedFiles.configFile,\n ...parsedFiles.credentialsFile,\n };\n};\nexports.parseKnownFiles = parseKnownFiles;\n/**\n * @internal\n */\nconst getMasterProfileName = (init) => init.profile || process.env[exports.ENV_PROFILE] || exports.DEFAULT_PROFILE;\nexports.getMasterProfileName = getMasterProfileName;\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvaW5kZXgudHMiXSwibmFtZXMiOltdLC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nZXRNYXN0ZXJQcm9maWxlTmFtZSA9IChpbml0OiB7IHByb2ZpbGU/OiBzdHJpbmcgfSk6IHN0cmluZyA9PlxuICBpbml0LnByb2ZpbGUgfHwgcHJvY2Vzcy5lbnZbRU5WX1BST0ZJTEVdIHx8IERFRkFVTFRfUFJPRklMRTtcbiJdfQ==","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.toHex = exports.fromHex = void 0;\nconst 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}\n/**\n * Converts a hexadecimal encoded string to a Uint8Array of bytes.\n *\n * @param encoded The hexadecimal encoded string\n */\nfunction 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.substr(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}\nexports.fromHex = fromHex;\n/**\n * Converts a Uint8Array of binary data to a hexadecimal encoded string.\n *\n * @param bytes The binary data to encode\n */\nfunction 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}\nexports.toHex = toHex;\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvaW5kZXgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7O0FB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aGUgYmluYXJ5IGRhdGEgdG8gZW5jb2RlXG4gKi9cbmV4cG9ydCBmdW5jdGlvbiB0b0hleChieXRlczogVWludDhBcnJheSk6IHN0cmluZyB7XG4gIGxldCBvdXQgPSBcIlwiO1xuICBmb3IgKGxldCBpID0gMDsgaSA8IGJ5dGVzLmJ5dGVMZW5ndGg7IGkrKykge1xuICAgIG91dCArPSBTSE9SVF9UT19IRVhbYnl0ZXNbaV1dO1xuICB9XG5cbiAgcmV0dXJuIG91dDtcbn1cbiJdfQ==","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.escapeUriPath = void 0;\nconst escape_uri_1 = require(\"./escape-uri\");\nconst escapeUriPath = (uri) => uri.split(\"/\").map(escape_uri_1.escapeUri).join(\"/\");\nexports.escapeUriPath = escapeUriPath;\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZXNjYXBlLXVyaS1wYXRoLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vc3JjL2VzY2FwZS11cmktcGF0aC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7QUFBQSw2Q0FBeUM7QUFFbEMsTUFBTSxhQUFhLEdBQUcsQ0FBQyxHQUFXLEVBQVUsRUFBRSxDQUFDLEdBQUcsQ0FBQyxLQUFLLENBQUMsR0FBRyxDQUFDLENBQUMsR0FBRyxDQUFDLHNCQUFTLENBQUMsQ0FBQyxJQUFJLENBQUMsR0FBRyxDQUFDLENBQUM7QUFBakYsUUFBQSxhQUFhLGlCQUFvRSIsInNvdXJjZXNDb250ZW50IjpbImltcG9ydCB7IGVzY2FwZVVyaSB9IGZyb20gXCIuL2VzY2FwZS11cmlcIjtcblxuZXhwb3J0IGNvbnN0IGVzY2FwZVVyaVBhdGggPSAodXJpOiBzdHJpbmcpOiBzdHJpbmcgPT4gdXJpLnNwbGl0KFwiL1wiKS5tYXAoZXNjYXBlVXJpKS5qb2luKFwiL1wiKTtcbiJdfQ==","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.escapeUri = void 0;\nconst escapeUri = (uri) => \n// AWS percent-encodes some extra non-standard characters in a URI\nencodeURIComponent(uri).replace(/[!'()*]/g, hexEncode);\nexports.escapeUri = escapeUri;\nconst hexEncode = (c) => `%${c.charCodeAt(0).toString(16).toUpperCase()}`;\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZXNjYXBlLXVyaS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9lc2NhcGUtdXJpLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7OztBQUFPLE1BQU0sU0FBUyxHQUFHLENBQUMsR0FBVyxFQUFVLEVBQUU7QUFDL0Msa0VBQWtFO0FBQ2xFLGtCQUFrQixDQUFDLEdBQUcsQ0FBQyxDQUFDLE9BQU8sQ0FBQyxVQUFVLEVBQUUsU0FBUyxDQUFDLENBQUM7QUFGNUMsUUFBQSxTQUFTLGFBRW1DO0FBRXpELE1BQU0sU0FBUyxHQUFHLENBQUMsQ0FBUyxFQUFFLEVBQUUsQ0FBQyxJQUFJLENBQUMsQ0FBQyxVQUFVLENBQUMsQ0FBQyxDQUFDLENBQUMsUUFBUSxDQUFDLEVBQUUsQ0FBQyxDQUFDLFdBQVcsRUFBRSxFQUFFLENBQUMiLCJzb3VyY2VzQ29udGVudCI6WyJleHBvcnQgY29uc3QgZXNjYXBlVXJpID0gKHVyaTogc3RyaW5nKTogc3RyaW5nID0+XG4gIC8vIEFXUyBwZXJjZW50LWVuY29kZXMgc29tZSBleHRyYSBub24tc3RhbmRhcmQgY2hhcmFjdGVycyBpbiBhIFVSSVxuICBlbmNvZGVVUklDb21wb25lbnQodXJpKS5yZXBsYWNlKC9bIScoKSpdL2csIGhleEVuY29kZSk7XG5cbmNvbnN0IGhleEVuY29kZSA9IChjOiBzdHJpbmcpID0+IGAlJHtjLmNoYXJDb2RlQXQoMCkudG9TdHJpbmcoMTYpLnRvVXBwZXJDYXNlKCl9YDtcbiJdfQ==","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst tslib_1 = require(\"tslib\");\ntslib_1.__exportStar(require(\"./escape-uri\"), exports);\ntslib_1.__exportStar(require(\"./escape-uri-path\"), exports);\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvaW5kZXgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7O0FBQUEsdURBQTZCO0FBQzdCLDREQUFrQyIsInNvdXJjZXNDb250ZW50IjpbImV4cG9ydCAqIGZyb20gXCIuL2VzY2FwZS11cmlcIjtcbmV4cG9ydCAqIGZyb20gXCIuL2VzY2FwZS11cmktcGF0aFwiO1xuIl19","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.defaultUserAgent = exports.UA_APP_ID_INI_NAME = exports.UA_APP_ID_ENV_NAME = void 0;\nconst node_config_provider_1 = require(\"@aws-sdk/node-config-provider\");\nconst os_1 = require(\"os\");\nconst process_1 = require(\"process\");\nexports.UA_APP_ID_ENV_NAME = \"AWS_SDK_UA_APP_ID\";\nexports.UA_APP_ID_INI_NAME = \"sdk-ua-app-id\";\n/**\n * Collect metrics from runtime to put into user agent.\n */\nconst defaultUserAgent = ({ serviceId, clientVersion }) => {\n const sections = [\n // sdk-metadata\n [\"aws-sdk-js\", clientVersion],\n // os-metadata\n [`os/${os_1.platform()}`, os_1.release()],\n // language-metadata\n // ECMAScript edition doesn't matter in JS, so no version needed.\n [\"lang/js\"],\n [\"md/nodejs\", `${process_1.versions.node}`],\n ];\n if (serviceId) {\n // api-metadata\n // service Id may not appear in non-AWS clients\n sections.push([`api/${serviceId}`, clientVersion]);\n }\n if (process_1.env.AWS_EXECUTION_ENV) {\n // env-metadata\n sections.push([`exec-env/${process_1.env.AWS_EXECUTION_ENV}`]);\n }\n const appIdPromise = node_config_provider_1.loadConfig({\n environmentVariableSelector: (env) => env[exports.UA_APP_ID_ENV_NAME],\n configFileSelector: (profile) => profile[exports.UA_APP_ID_INI_NAME],\n default: undefined,\n })();\n let resolvedUserAgent = undefined;\n return async () => {\n if (!resolvedUserAgent) {\n const appId = await appIdPromise;\n resolvedUserAgent = appId ? [...sections, [`app/${appId}`]] : [...sections];\n }\n return resolvedUserAgent;\n };\n};\nexports.defaultUserAgent = defaultUserAgent;\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvaW5kZXgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7O0FBQUEsd0VBQTJEO0FBRTNELDJCQUF1QztBQUN2QyxxQ0FBd0M7QUFFM0IsUUFBQSxrQkFBa0IsR0FBRyxtQkFBbUIsQ0FBQztBQUN6QyxRQUFBLGtCQUFrQixHQUFHLGVBQWUsQ0FBQztBQU9sRDs7R0FFRztBQUNJLE1BQU0sZ0JBQWdCLEdBQUcsQ0FBQyxFQUFFLFNBQVMsRUFBRSxhQUFhLEVBQTJCLEVBQXVCLEVBQUU7SUFDN0csTUFBTSxRQUFRLEdBQWM7UUFDMUIsZUFBZTtRQUNmLENBQUMsWUFBWSxFQUFFLGFBQWEsQ0FBQztRQUM3QixjQUFjO1FBQ2QsQ0FBQyxNQUFNLGFBQVEsRUFBRSxFQUFFLEVBQUUsWUFBTyxFQUFFLENBQUM7UUFDL0Isb0JBQW9CO1FBQ3BCLGlFQUFpRTtRQUNqRSxDQUFDLFNBQVMsQ0FBQztRQUNYLENBQUMsV0FBVyxFQUFFLEdBQUcsa0JBQVEsQ0FBQyxJQUFJLEVBQUUsQ0FBQztLQUNsQyxDQUFDO0lBRUYsSUFBSSxTQUFTLEVBQU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/IFsuLi5zZWN0aW9ucywgW2BhcHAvJHthcHBJZH1gXV0gOiBbLi4uc2VjdGlvbnNdO1xuICAgIH1cbiAgICByZXR1cm4gcmVzb2x2ZWRVc2VyQWdlbnQ7XG4gIH07XG59O1xuIl19","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.toUtf8 = exports.fromUtf8 = void 0;\nconst util_buffer_from_1 = require(\"@aws-sdk/util-buffer-from\");\nconst fromUtf8 = (input) => {\n const buf = util_buffer_from_1.fromString(input, \"utf8\");\n return new Uint8Array(buf.buffer, buf.byteOffset, buf.byteLength / Uint8Array.BYTES_PER_ELEMENT);\n};\nexports.fromUtf8 = fromUtf8;\nconst toUtf8 = (input) => util_buffer_from_1.fromArrayBuffer(input.buffer, input.byteOffset, input.byteLength).toString(\"utf8\");\nexports.toUtf8 = toUtf8;\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvaW5kZXgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7O0FBQUEsZ0VBQXdFO0FBRWpFLE1BQU0sUUFBUSxHQUFHLENBQUMsS0FBYSxFQUFjLEVBQUU7SUFDcEQsTUFBTSxHQUFHLEdBQUcsNkJBQVUsQ0FBQyxLQUFLLEVBQUUsTUFBTSxDQUFDLENBQUM7SUFDdEMsT0FBTyxJQUFJLFVBQVUsQ0FBQyxHQUFHLENBQUMsTUFBTSxFQUFFLEdBQUcsQ0FBQyxVQUFVLEVBQUUsR0FBRyxDQUFDLFVBQVUsR0FBRyxVQUFVLENBQUMsaUJBQWlCLENBQUMsQ0FBQztBQUNuRyxDQUFDLENBQUM7QUFIVyxRQUFBLFFBQVEsWUFHbkI7QUFFSyxNQUFNLE1BQU0sR0FBRyxDQUFDLEtBQWlCLEVBQVUsRUFBRSxDQUNsRCxrQ0FBZSxDQUFDLEtBQUssQ0FBQyxNQUFNLEVBQUUsS0FBSyxDQUFDLFVBQVUsRUFBRSxLQUFLLENBQUMsVUFBVSxDQUFDLENBQUMsUUFBUSxDQUFDLE1BQU0sQ0FBQyxDQUFDO0FBRHhFLFFBQUEsTUFBTSxVQUNrRSIsInNvdXJjZXNDb250ZW50IjpbImltcG9ydCB7IGZyb21BcnJheUJ1ZmZlciwgZnJvbVN0cmluZyB9IGZyb20gXCJAYXdzLXNkay91dGlsLWJ1ZmZlci1mcm9tXCI7XG5cbmV4cG9ydCBjb25zdCBmcm9tVXRmOCA9IChpbnB1dDogc3RyaW5nKTogVWludDhBcnJheSA9PiB7XG4gIGNvbnN0IGJ1ZiA9IGZyb21TdHJpbmcoaW5wdXQsIFwidXRmOFwiKTtcbiAgcmV0dXJuIG5ldyBVaW50OEFycmF5KGJ1Zi5idWZmZXIsIGJ1Zi5ieXRlT2Zmc2V0LCBidWYuYnl0ZUxlbmd0aCAvIFVpbnQ4QXJyYXkuQllURVNfUEVSX0VMRU1FTlQpO1xufTtcblxuZXhwb3J0IGNvbnN0IHRvVXRmOCA9IChpbnB1dDogVWludDhBcnJheSk6IHN0cmluZyA9PlxuICBmcm9tQXJyYXlCdWZmZXIoaW5wdXQuYnVmZmVyLCBpbnB1dC5ieXRlT2Zmc2V0LCBpbnB1dC5ieXRlTGVuZ3RoKS50b1N0cmluZyhcInV0ZjhcIik7XG4iXX0=","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.createWaiter = void 0;\nconst poller_1 = require(\"./poller\");\nconst utils_1 = require(\"./utils\");\nconst waiter_1 = require(\"./waiter\");\nconst abortTimeout = async (abortSignal) => {\n return new Promise((resolve) => {\n abortSignal.onabort = () => resolve({ state: waiter_1.WaiterState.ABORTED });\n });\n};\n/**\n * Create a waiter promise that only resolves when:\n * 1. Abort controller is signaled\n * 2. Max wait time is reached\n * 3. `acceptorChecks` succeeds, or fails\n * Otherwise, it invokes `acceptorChecks` with exponential-backoff delay.\n *\n * @internal\n */\nconst createWaiter = async (options, input, acceptorChecks) => {\n const params = {\n ...waiter_1.waiterServiceDefaults,\n ...options,\n };\n utils_1.validateWaiterOptions(params);\n const exitConditions = [poller_1.runPolling(params, input, acceptorChecks)];\n if (options.abortController) {\n exitConditions.push(abortTimeout(options.abortController.signal));\n }\n if (options.abortSignal) {\n exitConditions.push(abortTimeout(options.abortSignal));\n }\n return Promise.race(exitConditions);\n};\nexports.createWaiter = createWaiter;\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY3JlYXRlV2FpdGVyLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vc3JjL2NyZWF0ZVdhaXRlci50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7QUFFQSxxQ0FBc0M7QUFDdEMsbUNBQWdEO0FBQ2hELHFDQUEyRjtBQUUzRixNQUFNLFlBQVksR0FBRyxLQUFLLEVBQUUsV0FBd0IsRUFBeUIsRUFBRTtJQUM3RSxPQUFPLElBQUksT0FBTyxDQUFDLENBQUMsT0FBTyxFQUFFLEVBQUU7UUFDN0IsV0FBVyxDQUFDLE9BQU8sR0FBRyxHQUFHLEVBQUUsQ0FBQyxPQUFPLENBQUMsRUFBRSxLQUFLLEVBQUUsb0JBQVcsQ0FBQyxPQUFPLEVBQUUsQ0FBQyxDQUFDO0lBQ3RFLENBQUMsQ0FBQyxDQUFDO0FBQ0wsQ0FBQyxDQUFDO0FBRUY7Ozs7Ozs7O0dBUUc7QUFDSSxNQUFNLFlBQVksR0FBRyxLQUFLLEVBQy9CLE9BQThCLEVBQzlCLEtBQVksRUFDWixjQUF1RSxFQUNoRCxFQUFFO0lBQ3pCLE1BQU0sTUFBTSxHQUFHO1FBQ2IsR0FBRyw4QkFBcUI7UUFDeEIsR0FBRyxPQUFPO0tBQ1gsQ0FBQztJQUNGLDZCQUFxQixDQUFDLE1BQU0sQ0FBQyxDQUFDO0lBRTlCLE1BQ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YWwpKTtcbiAgfVxuXG4gIGlmIChvcHRpb25zLmFib3J0U2lnbmFsKSB7XG4gICAgZXhpdENvbmRpdGlvbnMucHVzaChhYm9ydFRpbWVvdXQob3B0aW9ucy5hYm9ydFNpZ25hbCkpO1xuICB9XG5cbiAgcmV0dXJuIFByb21pc2UucmFjZShleGl0Q29uZGl0aW9ucyk7XG59O1xuIl19","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst tslib_1 = require(\"tslib\");\ntslib_1.__exportStar(require(\"./createWaiter\"), exports);\ntslib_1.__exportStar(require(\"./waiter\"), exports);\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvaW5kZXgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7O0FBQUEseURBQStCO0FBQy9CLG1EQUF5QiIsInNvdXJjZXNDb250ZW50IjpbImV4cG9ydCAqIGZyb20gXCIuL2NyZWF0ZVdhaXRlclwiO1xuZXhwb3J0ICogZnJvbSBcIi4vd2FpdGVyXCI7XG4iXX0=","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.runPolling = void 0;\nconst sleep_1 = require(\"./utils/sleep\");\nconst waiter_1 = require(\"./waiter\");\n/**\n * Reference: https://awslabs.github.io/smithy/1.0/spec/waiters.html#waiter-retries\n */\nconst exponentialBackoffWithJitter = (minDelay, maxDelay, attemptCeiling, attempt) => {\n if (attempt > attemptCeiling)\n return maxDelay;\n const delay = minDelay * 2 ** (attempt - 1);\n return randomInRange(minDelay, delay);\n};\nconst randomInRange = (min, max) => min + Math.random() * (max - min);\n/**\n * Function that runs polling as part of waiters. This will make one inital attempt and then\n * subsequent attempts with an increasing delay.\n * @param params options passed to the waiter.\n * @param client AWS SDK Client\n * @param input client input\n * @param stateChecker function that checks the acceptor states on each poll.\n */\nconst runPolling = async ({ minDelay, maxDelay, maxWaitTime, abortController, client, abortSignal }, input, acceptorChecks) => {\n var _a;\n const { state } = await acceptorChecks(client, input);\n if (state !== waiter_1.WaiterState.RETRY) {\n return { state };\n }\n let currentAttempt = 1;\n const waitUntil = Date.now() + maxWaitTime * 1000;\n // The max attempt number that the derived delay time tend to increase.\n // Pre-compute this number to avoid Number type overflow.\n const attemptCeiling = Math.log(maxDelay / minDelay) / Math.log(2) + 1;\n while (true) {\n if (((_a = abortController === null || abortController === void 0 ? void 0 : abortController.signal) === null || _a === void 0 ? void 0 : _a.aborted) || (abortSignal === null || abortSignal === void 0 ? void 0 : abortSignal.aborted)) {\n return { state: waiter_1.WaiterState.ABORTED };\n }\n const delay = exponentialBackoffWithJitter(minDelay, maxDelay, attemptCeiling, currentAttempt);\n // Resolve the promise explicitly at timeout or aborted. Otherwise this while loop will keep making API call until\n // `acceptorCheck` returns non-retry status, even with the Promise.race() outside.\n if (Date.now() + delay * 1000 > waitUntil) {\n return { state: waiter_1.WaiterState.TIMEOUT };\n }\n await sleep_1.sleep(delay);\n const { state } = await acceptorChecks(client, input);\n if (state !== waiter_1.WaiterState.RETRY) {\n return { state };\n }\n currentAttempt += 1;\n }\n};\nexports.runPolling = runPolling;\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicG9sbGVyLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vc3JjL3BvbGxlci50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7QUFBQSx5Q0FBc0M7QUFDdEMscUNBQW9FO0FBRXBFOztHQUVHO0FBQ0gsTUFBTSw0QkFBNEIsR0FBRyxDQUFDLFFBQWdCLEVBQUUsUUFBZ0IsRUFBRSxjQUFzQixFQUFFLE9BQWUsRUFBRSxFQUFFO0lBQ25ILElBQUksT0FBTyxHQUFHLGNBQWM7UUFBRSxPQUFPLFFBQVEsQ0FBQztJQUM5QyxNQUFNLEtBQUssR0FBRyxR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HN0YXRlOiBXYWl0ZXJTdGF0ZS5BQk9SVEVEIH07XG4gICAgfVxuICAgIGNvbnN0IGRlbGF5ID0gZXhwb25lbnRpYWxCYWNrb2ZmV2l0aEppdHRlcihtaW5EZWxheSwgbWF4RGVsYXksIGF0dGVtcHRDZWlsaW5nLCBjdXJyZW50QXR0ZW1wdCk7XG4gICAgLy8gUmVzb2x2ZSB0aGUgcHJvbWlzZSBleHBsaWNpdGx5IGF0IHRpbWVvdXQgb3IgYWJvcnRlZC4gT3RoZXJ3aXNlIHRoaXMgd2hpbGUgbG9vcCB3aWxsIGtlZXAgbWFraW5nIEFQSSBjYWxsIHVudGlsXG4gICAgLy8gYGFjY2VwdG9yQ2hlY2tgIHJldHVybnMgbm9uLXJldHJ5IHN0YXR1cywgZXZlbiB3aXRoIHRoZSBQcm9taXNlLnJhY2UoKSBvdXRzaWRlLlxuICAgIGlmIChEYXRlLm5vdygpICsgZGVsYXkgKiAxMDAwID4gd2FpdFVudGlsKSB7XG4gICAgICByZXR1cm4geyBzdGF0ZTogV2FpdGVyU3RhdGUuVElNRU9VVCB9O1xuICAgIH1cbiAgICBhd2FpdCBzbGVlcChkZWxheSk7XG4gICAgY29uc3QgeyBzdGF0ZSB9ID0gYXdhaXQgYWNjZXB0b3JDaGVja3MoY2xpZW50LCBpbnB1dCk7XG4gICAgaWYgKHN0YXRlICE9PSBXYWl0ZXJTdGF0ZS5SRVRSWSkge1xuICAgICAgcmV0dXJuIHsgc3RhdGUgfTtcbiAgICB9XG5cbiAgICBjdXJyZW50QXR0ZW1wdCArPSAxO1xuICB9XG59O1xuIl19","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst tslib_1 = require(\"tslib\");\ntslib_1.__exportStar(require(\"./sleep\"), exports);\ntslib_1.__exportStar(require(\"./validate\"), exports);\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi9zcmMvdXRpbHMvaW5kZXgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7O0FBQUEsa0RBQXdCO0FBQ3hCLHFEQUEyQiIsInNvdXJjZXNDb250ZW50IjpbImV4cG9ydCAqIGZyb20gXCIuL3NsZWVwXCI7XG5leHBvcnQgKiBmcm9tIFwiLi92YWxpZGF0ZVwiO1xuIl19","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.sleep = void 0;\nconst sleep = (seconds) => {\n return new Promise((resolve) => setTimeout(resolve, seconds * 1000));\n};\nexports.sleep = sleep;\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic2xlZXAuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi9zcmMvdXRpbHMvc2xlZXAudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7O0FBQU8sTUFBTSxLQUFLLEdBQUcsQ0FBQyxPQUFlLEVBQUUsRUFBRTtJQUN2QyxPQUFPLElBQUksT0FBTyxDQUFDLENBQUMsT0FBTyxFQUFFLEVBQUUsQ0FBQyxVQUFVLENBQUMsT0FBTyxFQUFFLE9BQU8sR0FBRyxJQUFJLENBQUMsQ0FBQyxDQUFDO0FBQ3ZFLENBQUMsQ0FBQztBQUZXLFFBQUEsS0FBSyxTQUVoQiIsInNvdXJjZXNDb250ZW50IjpbImV4cG9ydCBjb25zdCBzbGVlcCA9IChzZWNvbmRzOiBudW1iZXIpID0+IHtcbiAgcmV0dXJuIG5ldyBQcm9taXNlKChyZXNvbHZlKSA9PiBzZXRUaW1lb3V0KHJlc29sdmUsIHNlY29uZHMgKiAxMDAwKSk7XG59O1xuIl19","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.validateWaiterOptions = void 0;\n/**\n * Validates that waiter options are passed correctly\n * @param options a waiter configuration object\n */\nconst validateWaiterOptions = (options) => {\n if (options.maxWaitTime < 1) {\n throw new Error(`WaiterConfiguration.maxWaitTime must be greater than 0`);\n }\n else if (options.minDelay < 1) {\n throw new Error(`WaiterConfiguration.minDelay must be greater than 0`);\n }\n else if (options.maxDelay < 1) {\n throw new Error(`WaiterConfiguration.maxDelay must be greater than 0`);\n }\n else if (options.maxWaitTime <= options.minDelay) {\n throw new Error(`WaiterConfiguration.maxWaitTime [${options.maxWaitTime}] must be greater than WaiterConfiguration.minDelay [${options.minDelay}] for this waiter`);\n }\n else if (options.maxDelay < options.minDelay) {\n throw new Error(`WaiterConfiguration.maxDelay [${options.maxDelay}] must be greater than WaiterConfiguration.minDelay [${options.minDelay}] for this waiter`);\n }\n};\nexports.validateWaiterOptions = validateWaiterOptions;\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidmFsaWRhdGUuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi9zcmMvdXRpbHMvdmFsaWRhdGUudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7O0FBRUE7OztHQUdHO0FBQ0ksTUFBTSxxQkFBcUIsR0FBRyxDQUFTLE9BQThCLEVBQVEsRUFBRTtJQUNwRixJQUFJLE9BQU8sQ0FBQyxXQUFXLEdBQUcsQ0FBQyxFQUFFO1FBQzNCLE1BQU0sSUFBSSxLQUFLLENBQUMsd0RBQXdELENBQUMsQ0FBQztLQUMzRTtTQUFNLElBQUksT0FBTyxDQUFDLFFBQVEsR0FBRyxDQUFDLEVBQUU7UUFDL0IsTUFBTSxJQUFJLEtBQUssQ0FBQyxxREFBcUQsQ0FBQyxDQUFDO0tBQ3hFO1NBQU0sSUFBSSxPQUFPLENBQUMsUUFBUSxHQUFHLENBQUMsRUFBRTtRQUMvQixNQUFNLElBQUksS0FBSyxDQUFDLHFEQUFxRCxDQUFDLENBQUM7S0FDeEU7U0FBTSxJQUFJLE9BQU8sQ0FBQyxXQUFXLElBQUksT0FBTyxDQ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KG9wdGlvbnMubWF4RGVsYXkgPCAxKSB7XG4gICAgdGhyb3cgbmV3IEVycm9yKGBXYWl0ZXJDb25maWd1cmF0aW9uLm1heERlbGF5IG11c3QgYmUgZ3JlYXRlciB0aGFuIDBgKTtcbiAgfSBlbHNlIGlmIChvcHRpb25zLm1heFdhaXRUaW1lIDw9IG9wdGlvbnMubWluRGVsYXkpIHtcbiAgICB0aHJvdyBuZXcgRXJyb3IoXG4gICAgICBgV2FpdGVyQ29uZmlndXJhdGlvbi5tYXhXYWl0VGltZSBbJHtvcHRpb25zLm1heFdhaXRUaW1lfV0gbXVzdCBiZSBncmVhdGVyIHRoYW4gV2FpdGVyQ29uZmlndXJhdGlvbi5taW5EZWxheSBbJHtvcHRpb25zLm1pbkRlbGF5fV0gZm9yIHRoaXMgd2FpdGVyYFxuICAgICk7XG4gIH0gZWxzZSBpZiAob3B0aW9ucy5tYXhEZWxheSA8IG9wdGlvbnMubWluRGVsYXkpIHtcbiAgICB0aHJvdyBuZXcgRXJyb3IoXG4gICAgICBgV2FpdGVyQ29uZmlndXJhdGlvbi5tYXhEZWxheSBbJHtvcHRpb25zLm1heERlbGF5fV0gbXVzdCBiZSBncmVhdGVyIHRoYW4gV2FpdGVyQ29uZmlndXJhdGlvbi5taW5EZWxheSBbJHtvcHRpb25zLm1pbkRlbGF5fV0gZm9yIHRoaXMgd2FpdGVyYFxuICAgICk7XG4gIH1cbn07XG4iXX0=","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.checkExceptions = exports.WaiterState = exports.waiterServiceDefaults = void 0;\n/**\n * @private\n */\nexports.waiterServiceDefaults = {\n minDelay: 2,\n maxDelay: 120,\n};\nvar WaiterState;\n(function (WaiterState) {\n WaiterState[\"ABORTED\"] = \"ABORTED\";\n WaiterState[\"FAILURE\"] = \"FAILURE\";\n WaiterState[\"SUCCESS\"] = \"SUCCESS\";\n WaiterState[\"RETRY\"] = \"RETRY\";\n WaiterState[\"TIMEOUT\"] = \"TIMEOUT\";\n})(WaiterState = exports.WaiterState || (exports.WaiterState = {}));\n/**\n * Handles and throws exceptions resulting from the waiterResult\n * @param result WaiterResult\n */\nconst checkExceptions = (result) => {\n if (result.state === WaiterState.ABORTED) {\n const abortError = new Error(`${JSON.stringify({\n ...result,\n reason: \"Request was aborted\",\n })}`);\n abortError.name = \"AbortError\";\n throw abortError;\n }\n else if (result.state === WaiterState.TIMEOUT) {\n const timeoutError = new Error(`${JSON.stringify({\n ...result,\n reason: \"Waiter has timed out\",\n })}`);\n timeoutError.name = \"TimeoutError\";\n throw timeoutError;\n }\n else if (result.state !== WaiterState.SUCCESS) {\n throw new Error(`${JSON.stringify({ result })}`);\n }\n return result;\n};\nexports.checkExceptions = checkExceptions;\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoid2FpdGVyLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vc3JjL3dhaXRlci50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7QUFJQTs7R0FFRztBQUNVLFFBQUEscUJBQXFCLEdBQUc7SUFDbkMsUUFBUSxFQUFFLENBQUM7SUFDWCxRQUFRLEVBQUUsR0FBRztDQUNkLENBQUM7QUFRRixJQUFZLFdBTVg7QUFORCxXQUFZLFdBQVc7SUFDckIsa0NBQW1CLENBQUE7SUFDbkIsa0NBQW1CLENBQUE7SUFDbkIsa0NBQW1CLENBQUE7SUFDbkIsOEJBQWUsQ0FBQTtJQUNmLGtDQUFtQixDQUFBO0FBQ3JCLENBQUMsRUFOVyxXQUFXLEdBQVgsbUJBQVcsS0FBWCxtQkFBVyxRQU10QjtBQVdEOzs7R0FHRztBQUNJLE1BQU0sZUFBZSxHQUFHLENBQUMsTUFBb0IsRUFBZ0IsRUFBRTtJQUNwRSxJQUFJLE1BQU0sQ0FBQyxLQUFLLEtBQUssV0FBVyxDQUFDLE9BQU8sRUFBRTtRQUN4QyxNQUFNLFVBQVUsR0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haXRlclN0YXRlLkFCT1JURUQpIHtcbiAgICBjb25zdCBhYm9ydEVycm9yID0gbmV3IEVycm9yKFxuICAgICAgYCR7SlNPTi5zdHJpbmdpZnkoe1xuICAgICAgICAuLi5yZXN1bHQsXG4gICAgICAgIHJlYXNvbjogXCJSZXF1ZXN0IHdhcyBhYm9ydGVkXCIsXG4gICAgICB9KX1gXG4gICAgKTtcbiAgICBhYm9ydEVycm9yLm5hbWUgPSBcIkFib3J0RXJyb3JcIjtcbiAgICB0aHJvdyBhYm9ydEVycm9yO1xuICB9IGVsc2UgaWYgKHJlc3VsdC5zdGF0ZSA9PT0gV2FpdGVyU3RhdGUuVElNRU9VVCkge1xuICAgIGNvbnN0IHRpbWVvdXRFcnJvciA9IG5ldyBFcnJvcihcbiAgICAgIGAke0pTT04uc3RyaW5naWZ5KHtcbiAgICAgICAgLi4ucmVzdWx0LFxuICAgICAgICByZWFzb246IFwiV2FpdGVyIGhhcyB0aW1lZCBvdXRcIixcbiAgICAgIH0pfWBcbiAgICApO1xuICAgIHRpbWVvdXRFcnJvci5uYW1lID0gXCJUaW1lb3V0RXJyb3JcIjtcbiAgICB0aHJvdyB0aW1lb3V0RXJyb3I7XG4gIH0gZWxzZSBpZiAocmVzdWx0LnN0YXRlICE9PSBXYWl0ZXJTdGF0ZS5TVUNDRVNTKSB7XG4gICAgdGhyb3cgbmV3IEVycm9yKGAke0pTT04uc3RyaW5naWZ5KHsgcmVzdWx0IH0pfWApO1xuICB9XG4gIHJldHVybiByZXN1bHQ7XG59O1xuIl19","'use strict';\nmodule.exports = balanced;\nfunction balanced(a, b, str) {\n if (a instanceof RegExp) a = maybeMatch(a, str);\n if (b instanceof RegExp) b = maybeMatch(b, str);\n\n var r = range(a, b, str);\n\n return r && {\n start: r[0],\n end: r[1],\n pre: str.slice(0, r[0]),\n body: str.slice(r[0] + a.length, r[1]),\n post: str.slice(r[1] + b.length)\n };\n}\n\nfunction maybeMatch(reg, str) {\n var m = str.match(reg);\n return m ? m[0] : null;\n}\n\nbalanced.range = range;\nfunction range(a, b, str) {\n var begs, beg, left, right, result;\n var ai = str.indexOf(a);\n var bi = str.indexOf(b, ai + 1);\n var i = ai;\n\n if (ai >= 0 && bi > 0) {\n begs = [];\n left = str.length;\n\n while (i >= 0 && !result) {\n if (i == ai) {\n begs.push(i);\n ai = str.indexOf(a, i + 1);\n } else if (begs.length == 1) {\n result = [ begs.pop(), bi ];\n } else {\n beg = begs.pop();\n if (beg < left) {\n left = beg;\n right = bi;\n }\n\n bi = str.indexOf(b, i + 1);\n }\n\n i = ai < bi && ai >= 0 ? ai : bi;\n }\n\n if (begs.length) {\n result = [ left, right ];\n }\n }\n\n return result;\n}\n","var concatMap = require('concat-map');\nvar balanced = require('balanced-match');\n\nmodule.exports = expandTop;\n\nvar escSlash = '\\0SLASH'+Math.random()+'\\0';\nvar escOpen = '\\0OPEN'+Math.random()+'\\0';\nvar escClose = '\\0CLOSE'+Math.random()+'\\0';\nvar escComma = '\\0COMMA'+Math.random()+'\\0';\nvar escPeriod = '\\0PERIOD'+Math.random()+'\\0';\n\nfunction numeric(str) {\n return parseInt(str, 10) == str\n ? parseInt(str, 10)\n : str.charCodeAt(0);\n}\n\nfunction escapeBraces(str) {\n return str.split('\\\\\\\\').join(escSlash)\n .split('\\\\{').join(escOpen)\n .split('\\\\}').join(escClose)\n .split('\\\\,').join(escComma)\n .split('\\\\.').join(escPeriod);\n}\n\nfunction unescapeBraces(str) {\n return str.split(escSlash).join('\\\\')\n .split(escOpen).join('{')\n .split(escClose).join('}')\n .split(escComma).join(',')\n .split(escPeriod).join('.');\n}\n\n\n// Basically just str.split(\",\"), but handling cases\n// where we have nested braced sections, which should be\n// treated as individual members, like {a,{b,c},d}\nfunction parseCommaParts(str) {\n if (!str)\n return [''];\n\n var parts = [];\n var m = balanced('{', '}', str);\n\n if (!m)\n return str.split(',');\n\n var pre = m.pre;\n var body = m.body;\n var post = m.post;\n var p = pre.split(',');\n\n p[p.length-1] += '{' + body + '}';\n var postParts = parseCommaParts(post);\n if (post.length) {\n p[p.length-1] += postParts.shift();\n p.push.apply(p, postParts);\n }\n\n parts.push.apply(parts, p);\n\n return parts;\n}\n\nfunction expandTop(str) {\n if (!str)\n return [];\n\n // I don't know why Bash 4.3 does this, but it does.\n // Anything starting with {} will have the first two bytes preserved\n // but *only* at the top level, so {},a}b will not expand to anything,\n // but a{},b}c will be expanded to [a}c,abc].\n // One could argue that this is a bug in Bash, but since the goal of\n // this module is to match Bash's rules, we escape a leading {}\n if (str.substr(0, 2) === '{}') {\n str = '\\\\{\\\\}' + str.substr(2);\n }\n\n return expand(escapeBraces(str), true).map(unescapeBraces);\n}\n\nfunction identity(e) {\n return e;\n}\n\nfunction embrace(str) {\n return '{' + str + '}';\n}\nfunction isPadded(el) {\n return /^-?0\\d/.test(el);\n}\n\nfunction lte(i, y) {\n return i <= y;\n}\nfunction gte(i, y) {\n return i >= y;\n}\n\nfunction expand(str, isTop) {\n var expansions = [];\n\n var m = balanced('{', '}', str);\n if (!m || /\\$$/.test(m.pre)) return [str];\n\n var isNumericSequence = /^-?\\d+\\.\\.-?\\d+(?:\\.\\.-?\\d+)?$/.test(m.body);\n var isAlphaSequence = /^[a-zA-Z]\\.\\.[a-zA-Z](?:\\.\\.-?\\d+)?$/.test(m.body);\n var isSequence = isNumericSequence || isAlphaSequence;\n var isOptions = m.body.indexOf(',') >= 0;\n if (!isSequence && !isOptions) {\n // {a},b}\n if (m.post.match(/,.*\\}/)) {\n str = m.pre + '{' + m.body + escClose + m.post;\n return expand(str);\n }\n return [str];\n }\n\n var n;\n if (isSequence) {\n n = m.body.split(/\\.\\./);\n } else {\n n = parseCommaParts(m.body);\n if (n.length === 1) {\n // x{{a,b}}y ==> x{a}y x{b}y\n n = expand(n[0], false).map(embrace);\n if (n.length === 1) {\n var post = m.post.length\n ? expand(m.post, false)\n : [''];\n return post.map(function(p) {\n return m.pre + n[0] + p;\n });\n }\n }\n }\n\n // at this point, n is the parts, and we know it's not a comma set\n // with a single entry.\n\n // no need to expand pre, since it is guaranteed to be free of brace-sets\n var pre = m.pre;\n var post = m.post.length\n ? expand(m.post, false)\n : [''];\n\n var N;\n\n if (isSequence) {\n var x = numeric(n[0]);\n var y = numeric(n[1]);\n var width = Math.max(n[0].length, n[1].length)\n var incr = n.length == 3\n ? Math.abs(numeric(n[2]))\n : 1;\n var test = lte;\n var reverse = y < x;\n if (reverse) {\n incr *= -1;\n test = gte;\n }\n var pad = n.some(isPadded);\n\n N = [];\n\n for (var i = x; test(i, y); i += incr) {\n var c;\n if (isAlphaSequence) {\n c = String.fromCharCode(i);\n if (c === '\\\\')\n c = '';\n } else {\n c = String(i);\n if (pad) {\n var need = width - c.length;\n if (need > 0) {\n var z = new Array(need + 1).join('0');\n if (i < 0)\n c = '-' + z + c.slice(1);\n else\n c = z + c;\n }\n }\n }\n N.push(c);\n }\n } else {\n N = concatMap(n, function(el) { return expand(el, false) });\n }\n\n for (var j = 0; j < N.length; j++) {\n for (var k = 0; k < post.length; k++) {\n var expansion = pre + N[j] + post[k];\n if (!isTop || isSequence || expansion)\n expansions.push(expansion);\n }\n }\n\n return expansions;\n}\n\n","module.exports = function (xs, fn) {\n var res = [];\n for (var i = 0; i < xs.length; i++) {\n var x = fn(xs[i], i);\n if (isArray(x)) res.push.apply(res, x);\n else res.push(x);\n }\n return res;\n};\n\nvar isArray = Array.isArray || function (xs) {\n return Object.prototype.toString.call(xs) === '[object Array]';\n};\n","\"use strict\";\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.decodeHTML = exports.decodeHTMLStrict = exports.decodeXML = void 0;\nvar entities_json_1 = __importDefault(require(\"./maps/entities.json\"));\nvar legacy_json_1 = __importDefault(require(\"./maps/legacy.json\"));\nvar xml_json_1 = __importDefault(require(\"./maps/xml.json\"));\nvar decode_codepoint_1 = __importDefault(require(\"./decode_codepoint\"));\nvar strictEntityRe = /&(?:[a-zA-Z0-9]+|#[xX][\\da-fA-F]+|#\\d+);/g;\nexports.decodeXML = getStrictDecoder(xml_json_1.default);\nexports.decodeHTMLStrict = getStrictDecoder(entities_json_1.default);\nfunction getStrictDecoder(map) {\n var replace = getReplacer(map);\n return function (str) { return String(str).replace(strictEntityRe, replace); };\n}\nvar sorter = function (a, b) { return (a < b ? 1 : -1); };\nexports.decodeHTML = (function () {\n var legacy = Object.keys(legacy_json_1.default).sort(sorter);\n var keys = Object.keys(entities_json_1.default).sort(sorter);\n for (var i = 0, j = 0; i < keys.length; i++) {\n if (legacy[j] === keys[i]) {\n keys[i] += \";?\";\n j++;\n }\n else {\n keys[i] += \";\";\n }\n }\n var re = new RegExp(\"&(?:\" + keys.join(\"|\") + \"|#[xX][\\\\da-fA-F]+;?|#\\\\d+;?)\", \"g\");\n var replace = getReplacer(entities_json_1.default);\n function replacer(str) {\n if (str.substr(-1) !== \";\")\n str += \";\";\n return replace(str);\n }\n // TODO consider creating a merged map\n return function (str) { return String(str).replace(re, replacer); };\n})();\nfunction getReplacer(map) {\n return function replace(str) {\n if (str.charAt(1) === \"#\") {\n var secondChar = str.charAt(2);\n if (secondChar === \"X\" || secondChar === \"x\") {\n return decode_codepoint_1.default(parseInt(str.substr(3), 16));\n }\n return decode_codepoint_1.default(parseInt(str.substr(2), 10));\n }\n // eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing\n return map[str.slice(1, -1)] || str;\n };\n}\n","\"use strict\";\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar decode_json_1 = __importDefault(require(\"./maps/decode.json\"));\n// Adapted from https://github.com/mathiasbynens/he/blob/master/src/he.js#L94-L119\nvar fromCodePoint = \n// eslint-disable-next-line @typescript-eslint/no-unnecessary-condition\nString.fromCodePoint ||\n function (codePoint) {\n var output = \"\";\n if (codePoint > 0xffff) {\n codePoint -= 0x10000;\n output += String.fromCharCode(((codePoint >>> 10) & 0x3ff) | 0xd800);\n codePoint = 0xdc00 | (codePoint & 0x3ff);\n }\n output += String.fromCharCode(codePoint);\n return output;\n };\nfunction decodeCodePoint(codePoint) {\n if ((codePoint >= 0xd800 && codePoint <= 0xdfff) || codePoint > 0x10ffff) {\n return \"\\uFFFD\";\n }\n if (codePoint in decode_json_1.default) {\n codePoint = decode_json_1.default[codePoint];\n }\n return fromCodePoint(codePoint);\n}\nexports.default = decodeCodePoint;\n","\"use strict\";\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.escapeUTF8 = exports.escape = exports.encodeNonAsciiHTML = exports.encodeHTML = exports.encodeXML = void 0;\nvar xml_json_1 = __importDefault(require(\"./maps/xml.json\"));\nvar inverseXML = getInverseObj(xml_json_1.default);\nvar xmlReplacer = getInverseReplacer(inverseXML);\n/**\n * Encodes all non-ASCII characters, as well as characters not valid in XML\n * documents using XML entities.\n *\n * If a character has no equivalent entity, a\n * numeric hexadecimal reference (eg. `ü`) will be used.\n */\nexports.encodeXML = getASCIIEncoder(inverseXML);\nvar entities_json_1 = __importDefault(require(\"./maps/entities.json\"));\nvar inverseHTML = getInverseObj(entities_json_1.default);\nvar htmlReplacer = getInverseReplacer(inverseHTML);\n/**\n * Encodes all entities and non-ASCII characters in the input.\n *\n * This includes characters that are valid ASCII characters in HTML documents.\n * For example `#` will be encoded as `#`. To get a more compact output,\n * consider using the `encodeNonAsciiHTML` function.\n *\n * If a character has no equivalent entity, a\n * numeric hexadecimal reference (eg. `ü`) will be used.\n */\nexports.encodeHTML = getInverse(inverseHTML, htmlReplacer);\n/**\n * Encodes all non-ASCII characters, as well as characters not valid in HTML\n * documents using HTML entities.\n *\n * If a character has no equivalent entity, a\n * numeric hexadecimal reference (eg. `ü`) will be used.\n */\nexports.encodeNonAsciiHTML = getASCIIEncoder(inverseHTML);\nfunction getInverseObj(obj) {\n return Object.keys(obj)\n .sort()\n .reduce(function (inverse, name) {\n inverse[obj[name]] = \"&\" + name + \";\";\n return inverse;\n }, {});\n}\nfunction getInverseReplacer(inverse) {\n var single = [];\n var multiple = [];\n for (var _i = 0, _a = Object.keys(inverse); _i < _a.length; _i++) {\n var k = _a[_i];\n if (k.length === 1) {\n // Add value to single array\n single.push(\"\\\\\" + k);\n }\n else {\n // Add value to multiple array\n multiple.push(k);\n }\n }\n // Add ranges to single characters.\n single.sort();\n for (var start = 0; start < single.length - 1; start++) {\n // Find the end of a run of characters\n var end = start;\n while (end < single.length - 1 &&\n single[end].charCodeAt(1) + 1 === single[end + 1].charCodeAt(1)) {\n end += 1;\n }\n var count = 1 + end - start;\n // We want to replace at least three characters\n if (count < 3)\n continue;\n single.splice(start, count, single[start] + \"-\" + single[end]);\n }\n multiple.unshift(\"[\" + single.join(\"\") + \"]\");\n return new RegExp(multiple.join(\"|\"), \"g\");\n}\n// /[^\\0-\\x7F]/gu\nvar reNonASCII = /(?:[\\x80-\\uD7FF\\uE000-\\uFFFF]|[\\uD800-\\uDBFF][\\uDC00-\\uDFFF]|[\\uD800-\\uDBFF](?![\\uDC00-\\uDFFF])|(?:[^\\uD800-\\uDBFF]|^)[\\uDC00-\\uDFFF])/g;\nvar getCodePoint = \n// eslint-disable-next-line @typescript-eslint/no-unnecessary-condition\nString.prototype.codePointAt != null\n ? // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n function (str) { return str.codePointAt(0); }\n : // http://mathiasbynens.be/notes/javascript-encoding#surrogate-formulae\n function (c) {\n return (c.charCodeAt(0) - 0xd800) * 0x400 +\n c.charCodeAt(1) -\n 0xdc00 +\n 0x10000;\n };\nfunction singleCharReplacer(c) {\n return \"&#x\" + (c.length > 1 ? getCodePoint(c) : c.charCodeAt(0))\n .toString(16)\n .toUpperCase() + \";\";\n}\nfunction getInverse(inverse, re) {\n return function (data) {\n return data\n .replace(re, function (name) { return inverse[name]; })\n .replace(reNonASCII, singleCharReplacer);\n };\n}\nvar reEscapeChars = new RegExp(xmlReplacer.source + \"|\" + reNonASCII.source, \"g\");\n/**\n * Encodes all non-ASCII characters, as well as characters not valid in XML\n * documents using numeric hexadecimal reference (eg. `ü`).\n *\n * Have a look at `escapeUTF8` if you want a more concise output at the expense\n * of reduced transportability.\n *\n * @param data String to escape.\n */\nfunction escape(data) {\n return data.replace(reEscapeChars, singleCharReplacer);\n}\nexports.escape = escape;\n/**\n * Encodes all characters not valid in XML documents using numeric hexadecimal\n * reference (eg. `ü`).\n *\n * Note that the output will be character-set dependent.\n *\n * @param data String to escape.\n */\nfunction escapeUTF8(data) {\n return data.replace(xmlReplacer, singleCharReplacer);\n}\nexports.escapeUTF8 = escapeUTF8;\nfunction getASCIIEncoder(obj) {\n return function (data) {\n return data.replace(reEscapeChars, function (c) { return obj[c] || singleCharReplacer(c); });\n };\n}\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.decodeXMLStrict = exports.decodeHTML5Strict = exports.decodeHTML4Strict = exports.decodeHTML5 = exports.decodeHTML4 = exports.decodeHTMLStrict = exports.decodeHTML = exports.decodeXML = exports.encodeHTML5 = exports.encodeHTML4 = exports.escapeUTF8 = exports.escape = exports.encodeNonAsciiHTML = exports.encodeHTML = exports.encodeXML = exports.encode = exports.decodeStrict = exports.decode = void 0;\nvar decode_1 = require(\"./decode\");\nvar encode_1 = require(\"./encode\");\n/**\n * Decodes a string with entities.\n *\n * @param data String to decode.\n * @param level Optional level to decode at. 0 = XML, 1 = HTML. Default is 0.\n * @deprecated Use `decodeXML` or `decodeHTML` directly.\n */\nfunction decode(data, level) {\n return (!level || level <= 0 ? decode_1.decodeXML : decode_1.decodeHTML)(data);\n}\nexports.decode = decode;\n/**\n * Decodes a string with entities. Does not allow missing trailing semicolons for entities.\n *\n * @param data String to decode.\n * @param level Optional level to decode at. 0 = XML, 1 = HTML. Default is 0.\n * @deprecated Use `decodeHTMLStrict` or `decodeXML` directly.\n */\nfunction decodeStrict(data, level) {\n return (!level || level <= 0 ? decode_1.decodeXML : decode_1.decodeHTMLStrict)(data);\n}\nexports.decodeStrict = decodeStrict;\n/**\n * Encodes a string with entities.\n *\n * @param data String to encode.\n * @param level Optional level to encode at. 0 = XML, 1 = HTML. Default is 0.\n * @deprecated Use `encodeHTML`, `encodeXML` or `encodeNonAsciiHTML` directly.\n */\nfunction encode(data, level) {\n return (!level || level <= 0 ? encode_1.encodeXML : encode_1.encodeHTML)(data);\n}\nexports.encode = encode;\nvar encode_2 = require(\"./encode\");\nObject.defineProperty(exports, \"encodeXML\", { enumerable: true, get: function () { return encode_2.encodeXML; } });\nObject.defineProperty(exports, \"encodeHTML\", { enumerable: true, get: function () { return encode_2.encodeHTML; } });\nObject.defineProperty(exports, \"encodeNonAsciiHTML\", { enumerable: true, get: function () { return encode_2.encodeNonAsciiHTML; } });\nObject.defineProperty(exports, \"escape\", { enumerable: true, get: function () { return encode_2.escape; } });\nObject.defineProperty(exports, \"escapeUTF8\", { enumerable: true, get: function () { return encode_2.escapeUTF8; } });\n// Legacy aliases (deprecated)\nObject.defineProperty(exports, \"encodeHTML4\", { enumerable: true, get: function () { return encode_2.encodeHTML; } });\nObject.defineProperty(exports, \"encodeHTML5\", { enumerable: true, get: function () { return encode_2.encodeHTML; } });\nvar decode_2 = require(\"./decode\");\nObject.defineProperty(exports, \"decodeXML\", { enumerable: true, get: function () { return decode_2.decodeXML; } });\nObject.defineProperty(exports, \"decodeHTML\", { enumerable: true, get: function () { return decode_2.decodeHTML; } });\nObject.defineProperty(exports, \"decodeHTMLStrict\", { enumerable: true, get: function () { return decode_2.decodeHTMLStrict; } });\n// Legacy aliases (deprecated)\nObject.defineProperty(exports, \"decodeHTML4\", { enumerable: true, get: function () { return decode_2.decodeHTML; } });\nObject.defineProperty(exports, \"decodeHTML5\", { enumerable: true, get: function () { return decode_2.decodeHTML; } });\nObject.defineProperty(exports, \"decodeHTML4Strict\", { enumerable: true, get: function () { return decode_2.decodeHTMLStrict; } });\nObject.defineProperty(exports, \"decodeHTML5Strict\", { enumerable: true, get: function () { return decode_2.decodeHTMLStrict; } });\nObject.defineProperty(exports, \"decodeXMLStrict\", { enumerable: true, get: function () { return decode_2.decodeXML; } });\n","'use strict';\n//parse Empty Node as self closing node\nconst buildOptions = require('./util').buildOptions;\n\nconst defaultOptions = {\n attributeNamePrefix: '@_',\n attrNodeName: false,\n textNodeName: '#text',\n ignoreAttributes: true,\n cdataTagName: false,\n cdataPositionChar: '\\\\c',\n format: false,\n indentBy: ' ',\n supressEmptyNode: false,\n tagValueProcessor: function(a) {\n return a;\n },\n attrValueProcessor: function(a) {\n return a;\n },\n};\n\nconst props = [\n 'attributeNamePrefix',\n 'attrNodeName',\n 'textNodeName',\n 'ignoreAttributes',\n 'cdataTagName',\n 'cdataPositionChar',\n 'format',\n 'indentBy',\n 'supressEmptyNode',\n 'tagValueProcessor',\n 'attrValueProcessor',\n];\n\nfunction Parser(options) {\n this.options = buildOptions(options, defaultOptions, props);\n if (this.options.ignoreAttributes || this.options.attrNodeName) {\n this.isAttribute = function(/*a*/) {\n return false;\n };\n } else {\n this.attrPrefixLen = this.options.attributeNamePrefix.length;\n this.isAttribute = isAttribute;\n }\n if (this.options.cdataTagName) {\n this.isCDATA = isCDATA;\n } else {\n this.isCDATA = function(/*a*/) {\n return false;\n };\n }\n this.replaceCDATAstr = replaceCDATAstr;\n this.replaceCDATAarr = replaceCDATAarr;\n\n if (this.options.format) {\n this.indentate = indentate;\n this.tagEndChar = '>\\n';\n this.newLine = '\\n';\n } else {\n this.indentate = function() {\n return '';\n };\n this.tagEndChar = '>';\n this.newLine = '';\n }\n\n if (this.options.supressEmptyNode) {\n this.buildTextNode = buildEmptyTextNode;\n this.buildObjNode = buildEmptyObjNode;\n } else {\n this.buildTextNode = buildTextValNode;\n this.buildObjNode = buildObjectNode;\n }\n\n this.buildTextValNode = buildTextValNode;\n this.buildObjectNode = buildObjectNode;\n}\n\nParser.prototype.parse = function(jObj) {\n return this.j2x(jObj, 0).val;\n};\n\nParser.prototype.j2x = function(jObj, level) {\n let attrStr = '';\n let val = '';\n const keys = Object.keys(jObj);\n const len = keys.length;\n for (let i = 0; i < len; i++) {\n const key = keys[i];\n if (typeof jObj[key] === 'undefined') {\n // supress undefined node\n } else if (jObj[key] === null) {\n val += this.indentate(level) + '<' + key + '/' + this.tagEndChar;\n } else if (jObj[key] instanceof Date) {\n val += this.buildTextNode(jObj[key], key, '', level);\n } else if (typeof jObj[key] !== 'object') {\n //premitive type\n const attr = this.isAttribute(key);\n if (attr) {\n attrStr += ' ' + attr + '=\"' + this.options.attrValueProcessor('' + jObj[key]) + '\"';\n } else if (this.isCDATA(key)) {\n if (jObj[this.options.textNodeName]) {\n val += this.replaceCDATAstr(jObj[this.options.textNodeName], jObj[key]);\n } else {\n val += this.replaceCDATAstr('', jObj[key]);\n }\n } else {\n //tag value\n if (key === this.options.textNodeName) {\n if (jObj[this.options.cdataTagName]) {\n //value will added while processing cdata\n } else {\n val += this.options.tagValueProcessor('' + jObj[key]);\n }\n } else {\n val += this.buildTextNode(jObj[key], key, '', level);\n }\n }\n } else if (Array.isArray(jObj[key])) {\n //repeated nodes\n if (this.isCDATA(key)) {\n val += this.indentate(level);\n if (jObj[this.options.textNodeName]) {\n val += this.replaceCDATAarr(jObj[this.options.textNodeName], jObj[key]);\n } else {\n val += this.replaceCDATAarr('', jObj[key]);\n }\n } else {\n //nested nodes\n const arrLen = jObj[key].length;\n for (let j = 0; j < arrLen; j++) {\n const item = jObj[key][j];\n if (typeof item === 'undefined') {\n // supress undefined node\n } else if (item === null) {\n val += this.indentate(level) + '<' + key + '/' + this.tagEndChar;\n } else if (typeof item === 'object') {\n const result = this.j2x(item, level + 1);\n val += this.buildObjNode(result.val, key, result.attrStr, level);\n } else {\n val += this.buildTextNode(item, key, '', level);\n }\n }\n }\n } else {\n //nested node\n if (this.options.attrNodeName && key === this.options.attrNodeName) {\n const Ks = Object.keys(jObj[key]);\n const L = Ks.length;\n for (let j = 0; j < L; j++) {\n attrStr += ' ' + Ks[j] + '=\"' + this.options.attrValueProcessor('' + jObj[key][Ks[j]]) + '\"';\n }\n } else {\n const result = this.j2x(jObj[key], level + 1);\n val += this.buildObjNode(result.val, key, result.attrStr, level);\n }\n }\n }\n return {attrStr: attrStr, val: val};\n};\n\nfunction replaceCDATAstr(str, cdata) {\n str = this.options.tagValueProcessor('' + str);\n if (this.options.cdataPositionChar === '' || str === '') {\n return str + '');\n }\n return str + this.newLine;\n }\n}\n\nfunction buildObjectNode(val, key, attrStr, level) {\n if (attrStr && !val.includes('<')) {\n return (\n this.indentate(level) +\n '<' +\n key +\n attrStr +\n '>' +\n val +\n //+ this.newLine\n // + this.indentate(level)\n '' +\n this.options.tagValueProcessor(val) +\n ' 1) {\n jObj[tagName] = [];\n for (let tag in node.child[tagName]) {\n if (node.child[tagName].hasOwnProperty(tag)) {\n jObj[tagName].push(convertToJson(node.child[tagName][tag], options, tagName));\n }\n }\n } else {\n const result = convertToJson(node.child[tagName][0], options, tagName);\n const asArray = (options.arrayMode === true && typeof result === 'object') || util.isTagNameInArrayMode(tagName, options.arrayMode, parentTagName);\n jObj[tagName] = asArray ? [result] : result;\n }\n }\n\n //add value\n return jObj;\n};\n\nexports.convertToJson = convertToJson;\n","'use strict';\n\nconst util = require('./util');\nconst buildOptions = require('./util').buildOptions;\nconst x2j = require('./xmlstr2xmlnode');\n\n//TODO: do it later\nconst convertToJsonString = function(node, options) {\n options = buildOptions(options, x2j.defaultOptions, x2j.props);\n\n options.indentBy = options.indentBy || '';\n return _cToJsonStr(node, options, 0);\n};\n\nconst _cToJsonStr = function(node, options, level) {\n let jObj = '{';\n\n //traver through all the children\n const keys = Object.keys(node.child);\n\n for (let index = 0; index < keys.length; index++) {\n var tagname = keys[index];\n if (node.child[tagname] && node.child[tagname].length > 1) {\n jObj += '\"' + tagname + '\" : [ ';\n for (var tag in node.child[tagname]) {\n jObj += _cToJsonStr(node.child[tagname][tag], options) + ' , ';\n }\n jObj = jObj.substr(0, jObj.length - 1) + ' ] '; //remove extra comma in last\n } else {\n jObj += '\"' + tagname + '\" : ' + _cToJsonStr(node.child[tagname][0], options) + ' ,';\n }\n }\n util.merge(jObj, node.attrsMap);\n //add attrsMap as new children\n if (util.isEmptyObject(jObj)) {\n return util.isExist(node.val) ? node.val : '';\n } else {\n if (util.isExist(node.val)) {\n if (!(typeof node.val === 'string' && (node.val === '' || node.val === options.cdataPositionChar))) {\n jObj += '\"' + options.textNodeName + '\" : ' + stringval(node.val);\n }\n }\n }\n //add value\n if (jObj[jObj.length - 1] === ',') {\n jObj = jObj.substr(0, jObj.length - 2);\n }\n return jObj + '}';\n};\n\nfunction stringval(v) {\n if (v === true || v === false || !isNaN(v)) {\n return v;\n } else {\n return '\"' + v + '\"';\n }\n}\n\nfunction indentate(options, level) {\n return options.indentBy.repeat(level);\n}\n\nexports.convertToJsonString = convertToJsonString;\n","'use strict';\n\nconst nodeToJson = require('./node2json');\nconst xmlToNodeobj = require('./xmlstr2xmlnode');\nconst x2xmlnode = require('./xmlstr2xmlnode');\nconst buildOptions = require('./util').buildOptions;\nconst validator = require('./validator');\n\nexports.parse = function(xmlData, options, validationOption) {\n if( validationOption){\n if(validationOption === true) validationOption = {}\n \n const result = validator.validate(xmlData, validationOption);\n if (result !== true) {\n throw Error( result.err.msg)\n }\n }\n options = buildOptions(options, x2xmlnode.defaultOptions, x2xmlnode.props);\n const traversableObj = xmlToNodeobj.getTraversalObj(xmlData, options)\n //print(traversableObj, \" \");\n return nodeToJson.convertToJson(traversableObj, options);\n};\nexports.convertTonimn = require('./nimndata').convert2nimn;\nexports.getTraversalObj = xmlToNodeobj.getTraversalObj;\nexports.convertToJson = nodeToJson.convertToJson;\nexports.convertToJsonString = require('./node2json_str').convertToJsonString;\nexports.validate = validator.validate;\nexports.j2xParser = require('./json2xml');\nexports.parseToNimn = function(xmlData, schema, options) {\n return exports.convertTonimn(exports.getTraversalObj(xmlData, options), schema, options);\n};\n\n\nfunction print(xmlNode, indentation){\n if(xmlNode){\n console.log(indentation + \"{\")\n console.log(indentation + \" \\\"tagName\\\": \\\"\" + xmlNode.tagname + \"\\\", \");\n if(xmlNode.parent){\n console.log(indentation + \" \\\"parent\\\": \\\"\" + xmlNode.parent.tagname + \"\\\", \");\n }\n console.log(indentation + \" \\\"val\\\": \\\"\" + xmlNode.val + \"\\\", \");\n console.log(indentation + \" \\\"attrs\\\": \" + JSON.stringify(xmlNode.attrsMap,null,4) + \", \");\n\n if(xmlNode.child){\n console.log(indentation + \"\\\"child\\\": {\")\n const indentation2 = indentation + indentation;\n Object.keys(xmlNode.child).forEach( function(key) {\n const node = xmlNode.child[key];\n\n if(Array.isArray(node)){\n console.log(indentation + \"\\\"\"+key+\"\\\" :[\")\n node.forEach( function(item,index) {\n //console.log(indentation + \" \\\"\"+index+\"\\\" : [\")\n print(item, indentation2);\n })\n console.log(indentation + \"],\") \n }else{\n console.log(indentation + \" \\\"\"+key+\"\\\" : {\")\n print(node, indentation2);\n console.log(indentation + \"},\") \n }\n });\n console.log(indentation + \"},\")\n }\n console.log(indentation + \"},\")\n }\n}\n","'use strict';\n\nconst nameStartChar = ':A-Za-z_\\\\u00C0-\\\\u00D6\\\\u00D8-\\\\u00F6\\\\u00F8-\\\\u02FF\\\\u0370-\\\\u037D\\\\u037F-\\\\u1FFF\\\\u200C-\\\\u200D\\\\u2070-\\\\u218F\\\\u2C00-\\\\u2FEF\\\\u3001-\\\\uD7FF\\\\uF900-\\\\uFDCF\\\\uFDF0-\\\\uFFFD';\nconst nameChar = nameStartChar + '\\\\-.\\\\d\\\\u00B7\\\\u0300-\\\\u036F\\\\u203F-\\\\u2040';\nconst nameRegexp = '[' + nameStartChar + '][' + nameChar + ']*'\nconst regexName = new RegExp('^' + nameRegexp + '$');\n\nconst getAllMatches = function(string, regex) {\n const matches = [];\n let match = regex.exec(string);\n while (match) {\n const allmatches = [];\n const len = match.length;\n for (let index = 0; index < len; index++) {\n allmatches.push(match[index]);\n }\n matches.push(allmatches);\n match = regex.exec(string);\n }\n return matches;\n};\n\nconst isName = function(string) {\n const match = regexName.exec(string);\n return !(match === null || typeof match === 'undefined');\n};\n\nexports.isExist = function(v) {\n return typeof v !== 'undefined';\n};\n\nexports.isEmptyObject = function(obj) {\n return Object.keys(obj).length === 0;\n};\n\n/**\n * Copy all the properties of a into b.\n * @param {*} target\n * @param {*} a\n */\nexports.merge = function(target, a, arrayMode) {\n if (a) {\n const keys = Object.keys(a); // will return an array of own properties\n const len = keys.length; //don't make it inline\n for (let i = 0; i < len; i++) {\n if (arrayMode === 'strict') {\n target[keys[i]] = [ a[keys[i]] ];\n } else {\n target[keys[i]] = a[keys[i]];\n }\n }\n }\n};\n/* exports.merge =function (b,a){\n return Object.assign(b,a);\n} */\n\nexports.getValue = function(v) {\n if (exports.isExist(v)) {\n return v;\n } else {\n return '';\n }\n};\n\n// const fakeCall = function(a) {return a;};\n// const fakeCallNoReturn = function() {};\n\nexports.buildOptions = function(options, defaultOptions, props) {\n var newOptions = {};\n if (!options) {\n return defaultOptions; //if there are not options\n }\n\n for (let i = 0; i < props.length; i++) {\n if (options[props[i]] !== undefined) {\n newOptions[props[i]] = options[props[i]];\n } else {\n newOptions[props[i]] = defaultOptions[props[i]];\n }\n }\n return newOptions;\n};\n\n/**\n * Check if a tag name should be treated as array\n *\n * @param tagName the node tagname\n * @param arrayMode the array mode option\n * @param parentTagName the parent tag name\n * @returns {boolean} true if node should be parsed as array\n */\nexports.isTagNameInArrayMode = function (tagName, arrayMode, parentTagName) {\n if (arrayMode === false) {\n return false;\n } else if (arrayMode instanceof RegExp) {\n return arrayMode.test(tagName);\n } else if (typeof arrayMode === 'function') {\n return !!arrayMode(tagName, parentTagName);\n }\n\n return arrayMode === \"strict\";\n}\n\nexports.isName = isName;\nexports.getAllMatches = getAllMatches;\nexports.nameRegexp = nameRegexp;\n","'use strict';\n\nconst util = require('./util');\n\nconst defaultOptions = {\n allowBooleanAttributes: false, //A tag can have attributes without any value\n};\n\nconst props = ['allowBooleanAttributes'];\n\n//const tagsPattern = new RegExp(\"<\\\\/?([\\\\w:\\\\-_\\.]+)\\\\s*\\/?>\",\"g\");\nexports.validate = function (xmlData, options) {\n options = util.buildOptions(options, defaultOptions, props);\n\n //xmlData = xmlData.replace(/(\\r\\n|\\n|\\r)/gm,\"\");//make it single line\n //xmlData = xmlData.replace(/(^\\s*<\\?xml.*?\\?>)/g,\"\");//Remove XML starting tag\n //xmlData = xmlData.replace(/()/g,\"\");//Remove DOCTYPE\n const tags = [];\n let tagFound = false;\n\n //indicates that the root tag has been closed (aka. depth 0 has been reached)\n let reachedRoot = false;\n\n if (xmlData[0] === '\\ufeff') {\n // check for byte order mark (BOM)\n xmlData = xmlData.substr(1);\n }\n\n for (let i = 0; i < xmlData.length; i++) {\n\n if (xmlData[i] === '<' && xmlData[i+1] === '?') {\n i+=2;\n i = readPI(xmlData,i);\n if (i.err) return i;\n }else if (xmlData[i] === '<') {\n //starting of tag\n //read until you reach to '>' avoiding any '>' in attribute value\n\n i++;\n \n if (xmlData[i] === '!') {\n i = readCommentAndCDATA(xmlData, i);\n continue;\n } else {\n let closingTag = false;\n if (xmlData[i] === '/') {\n //closing tag\n closingTag = true;\n i++;\n }\n //read tagname\n let tagName = '';\n for (; i < xmlData.length &&\n xmlData[i] !== '>' &&\n xmlData[i] !== ' ' &&\n xmlData[i] !== '\\t' &&\n xmlData[i] !== '\\n' &&\n xmlData[i] !== '\\r'; i++\n ) {\n tagName += xmlData[i];\n }\n tagName = tagName.trim();\n //console.log(tagName);\n\n if (tagName[tagName.length - 1] === '/') {\n //self closing tag without attributes\n tagName = tagName.substring(0, tagName.length - 1);\n //continue;\n i--;\n }\n if (!validateTagName(tagName)) {\n let msg;\n if (tagName.trim().length === 0) {\n msg = \"There is an unnecessary space between tag name and backward slash ' 0) {\n return getErrorObject('InvalidTag', \"Closing tag '\"+tagName+\"' can't have attributes or invalid starting.\", getLineNumberForPosition(xmlData, i));\n } else {\n const otg = tags.pop();\n if (tagName !== otg) {\n return getErrorObject('InvalidTag', \"Closing tag '\"+otg+\"' is expected inplace of '\"+tagName+\"'.\", getLineNumberForPosition(xmlData, i));\n }\n\n //when there are no more tags, we reached the root level.\n if (tags.length == 0) {\n reachedRoot = true;\n }\n }\n } else {\n const isValid = validateAttributeString(attrStr, options);\n if (isValid !== true) {\n //the result from the nested function returns the position of the error within the attribute\n //in order to get the 'true' error line, we need to calculate the position where the attribute begins (i - attrStr.length) and then add the position within the attribute\n //this gives us the absolute index in the entire xml, which we can use to find the line at last\n return getErrorObject(isValid.err.code, isValid.err.msg, getLineNumberForPosition(xmlData, i - attrStr.length + isValid.err.line));\n }\n\n //if the root level has been reached before ...\n if (reachedRoot === true) {\n return getErrorObject('InvalidXml', 'Multiple possible root nodes found.', getLineNumberForPosition(xmlData, i));\n } else {\n tags.push(tagName);\n }\n tagFound = true;\n }\n\n //skip tag text value\n //It may include comments and CDATA value\n for (i++; i < xmlData.length; i++) {\n if (xmlData[i] === '<') {\n if (xmlData[i + 1] === '!') {\n //comment or CADATA\n i++;\n i = readCommentAndCDATA(xmlData, i);\n continue;\n } else if (xmlData[i+1] === '?') {\n i = readPI(xmlData, ++i);\n if (i.err) return i;\n } else{\n break;\n }\n } else if (xmlData[i] === '&') {\n const afterAmp = validateAmpersand(xmlData, i);\n if (afterAmp == -1)\n return getErrorObject('InvalidChar', \"char '&' is not expected.\", getLineNumberForPosition(xmlData, i));\n i = afterAmp;\n }\n } //end of reading tag text value\n if (xmlData[i] === '<') {\n i--;\n }\n }\n } else {\n if (xmlData[i] === ' ' || xmlData[i] === '\\t' || xmlData[i] === '\\n' || xmlData[i] === '\\r') {\n continue;\n }\n return getErrorObject('InvalidChar', \"char '\"+xmlData[i]+\"' is not expected.\", getLineNumberForPosition(xmlData, i));\n }\n }\n\n if (!tagFound) {\n return getErrorObject('InvalidXml', 'Start tag expected.', 1);\n } else if (tags.length > 0) {\n return getErrorObject('InvalidXml', \"Invalid '\"+JSON.stringify(tags, null, 4).replace(/\\r?\\n/g, '')+\"' found.\", 1);\n }\n\n return true;\n};\n\n/**\n * Read Processing insstructions and skip\n * @param {*} xmlData\n * @param {*} i\n */\nfunction readPI(xmlData, i) {\n var start = i;\n for (; i < xmlData.length; i++) {\n if (xmlData[i] == '?' || xmlData[i] == ' ') {\n //tagname\n var tagname = xmlData.substr(start, i - start);\n if (i > 5 && tagname === 'xml') {\n return getErrorObject('InvalidXml', 'XML declaration allowed only at the start of the document.', getLineNumberForPosition(xmlData, i));\n } else if (xmlData[i] == '?' && xmlData[i + 1] == '>') {\n //check if valid attribut string\n i++;\n break;\n } else {\n continue;\n }\n }\n }\n return i;\n}\n\nfunction readCommentAndCDATA(xmlData, i) {\n if (xmlData.length > i + 5 && xmlData[i + 1] === '-' && xmlData[i + 2] === '-') {\n //comment\n for (i += 3; i < xmlData.length; i++) {\n if (xmlData[i] === '-' && xmlData[i + 1] === '-' && xmlData[i + 2] === '>') {\n i += 2;\n break;\n }\n }\n } else if (\n xmlData.length > i + 8 &&\n xmlData[i + 1] === 'D' &&\n xmlData[i + 2] === 'O' &&\n xmlData[i + 3] === 'C' &&\n xmlData[i + 4] === 'T' &&\n xmlData[i + 5] === 'Y' &&\n xmlData[i + 6] === 'P' &&\n xmlData[i + 7] === 'E'\n ) {\n let angleBracketsCount = 1;\n for (i += 8; i < xmlData.length; i++) {\n if (xmlData[i] === '<') {\n angleBracketsCount++;\n } else if (xmlData[i] === '>') {\n angleBracketsCount--;\n if (angleBracketsCount === 0) {\n break;\n }\n }\n }\n } else if (\n xmlData.length > i + 9 &&\n xmlData[i + 1] === '[' &&\n xmlData[i + 2] === 'C' &&\n xmlData[i + 3] === 'D' &&\n xmlData[i + 4] === 'A' &&\n xmlData[i + 5] === 'T' &&\n xmlData[i + 6] === 'A' &&\n xmlData[i + 7] === '['\n ) {\n for (i += 8; i < xmlData.length; i++) {\n if (xmlData[i] === ']' && xmlData[i + 1] === ']' && xmlData[i + 2] === '>') {\n i += 2;\n break;\n }\n }\n }\n\n return i;\n}\n\nvar doubleQuote = '\"';\nvar singleQuote = \"'\";\n\n/**\n * Keep reading xmlData until '<' is found outside the attribute value.\n * @param {string} xmlData\n * @param {number} i\n */\nfunction readAttributeStr(xmlData, i) {\n let attrStr = '';\n let startChar = '';\n let tagClosed = false;\n for (; i < xmlData.length; i++) {\n if (xmlData[i] === doubleQuote || xmlData[i] === singleQuote) {\n if (startChar === '') {\n startChar = xmlData[i];\n } else if (startChar !== xmlData[i]) {\n //if vaue is enclosed with double quote then single quotes are allowed inside the value and vice versa\n continue;\n } else {\n startChar = '';\n }\n } else if (xmlData[i] === '>') {\n if (startChar === '') {\n tagClosed = true;\n break;\n }\n }\n attrStr += xmlData[i];\n }\n if (startChar !== '') {\n return false;\n }\n\n return {\n value: attrStr,\n index: i,\n tagClosed: tagClosed\n };\n}\n\n/**\n * Select all the attributes whether valid or invalid.\n */\nconst validAttrStrRegxp = new RegExp('(\\\\s*)([^\\\\s=]+)(\\\\s*=)?(\\\\s*([\\'\"])(([\\\\s\\\\S])*?)\\\\5)?', 'g');\n\n//attr, =\"sd\", a=\"amit's\", a=\"sd\"b=\"saf\", ab cd=\"\"\n\nfunction validateAttributeString(attrStr, options) {\n //console.log(\"start:\"+attrStr+\":end\");\n\n //if(attrStr.trim().length === 0) return true; //empty string\n\n const matches = util.getAllMatches(attrStr, validAttrStrRegxp);\n const attrNames = {};\n\n for (let i = 0; i < matches.length; i++) {\n if (matches[i][1].length === 0) {\n //nospace before attribute name: a=\"sd\"b=\"saf\"\n return getErrorObject('InvalidAttr', \"Attribute '\"+matches[i][2]+\"' has no space in starting.\", getPositionFromMatch(attrStr, matches[i][0]))\n } else if (matches[i][3] === undefined && !options.allowBooleanAttributes) {\n //independent attribute: ab\n return getErrorObject('InvalidAttr', \"boolean attribute '\"+matches[i][2]+\"' is not allowed.\", getPositionFromMatch(attrStr, matches[i][0]));\n }\n /* else if(matches[i][6] === undefined){//attribute without value: ab=\n return { err: { code:\"InvalidAttr\",msg:\"attribute \" + matches[i][2] + \" has no value assigned.\"}};\n } */\n const attrName = matches[i][2];\n if (!validateAttrName(attrName)) {\n return getErrorObject('InvalidAttr', \"Attribute '\"+attrName+\"' is an invalid name.\", getPositionFromMatch(attrStr, matches[i][0]));\n }\n if (!attrNames.hasOwnProperty(attrName)) {\n //check for duplicate attribute.\n attrNames[attrName] = 1;\n } else {\n return getErrorObject('InvalidAttr', \"Attribute '\"+attrName+\"' is repeated.\", getPositionFromMatch(attrStr, matches[i][0]));\n }\n }\n\n return true;\n}\n\nfunction validateNumberAmpersand(xmlData, i) {\n let re = /\\d/;\n if (xmlData[i] === 'x') {\n i++;\n re = /[\\da-fA-F]/;\n }\n for (; i < xmlData.length; i++) {\n if (xmlData[i] === ';')\n return i;\n if (!xmlData[i].match(re))\n break;\n }\n return -1;\n}\n\nfunction validateAmpersand(xmlData, i) {\n // https://www.w3.org/TR/xml/#dt-charref\n i++;\n if (xmlData[i] === ';')\n return -1;\n if (xmlData[i] === '#') {\n i++;\n return validateNumberAmpersand(xmlData, i);\n }\n let count = 0;\n for (; i < xmlData.length; i++, count++) {\n if (xmlData[i].match(/\\w/) && count < 20)\n continue;\n if (xmlData[i] === ';')\n break;\n return -1;\n }\n return i;\n}\n\nfunction getErrorObject(code, message, lineNumber) {\n return {\n err: {\n code: code,\n msg: message,\n line: lineNumber,\n },\n };\n}\n\nfunction validateAttrName(attrName) {\n return util.isName(attrName);\n}\n\n// const startsWithXML = /^xml/i;\n\nfunction validateTagName(tagname) {\n return util.isName(tagname) /* && !tagname.match(startsWithXML) */;\n}\n\n//this function returns the line number for the character at the given index\nfunction getLineNumberForPosition(xmlData, index) {\n var lines = xmlData.substring(0, index).split(/\\r?\\n/);\n return lines.length;\n}\n\n//this function returns the position of the last character of match within attrStr\nfunction getPositionFromMatch(attrStr, match) {\n return attrStr.indexOf(match) + match.length;\n}\n","'use strict';\n\nmodule.exports = function(tagname, parent, val) {\n this.tagname = tagname;\n this.parent = parent;\n this.child = {}; //child tags\n this.attrsMap = {}; //attributes map\n this.val = val; //text only\n this.addChild = function(child) {\n if (Array.isArray(this.child[child.tagname])) {\n //already presents\n this.child[child.tagname].push(child);\n } else {\n this.child[child.tagname] = [child];\n }\n };\n};\n","'use strict';\n\nconst util = require('./util');\nconst buildOptions = require('./util').buildOptions;\nconst xmlNode = require('./xmlNode');\nconst regx =\n '<((!\\\\[CDATA\\\\[([\\\\s\\\\S]*?)(]]>))|((NAME:)?(NAME))([^>]*)>|((\\\\/)(NAME)\\\\s*>))([^<]*)'\n .replace(/NAME/g, util.nameRegexp);\n\n//const tagsRegx = new RegExp(\"<(\\\\/?[\\\\w:\\\\-\\._]+)([^>]*)>(\\\\s*\"+cdataRegx+\")*([^<]+)?\",\"g\");\n//const tagsRegx = new RegExp(\"<(\\\\/?)((\\\\w*:)?([\\\\w:\\\\-\\._]+))([^>]*)>([^<]*)(\"+cdataRegx+\"([^<]*))*([^<]+)?\",\"g\");\n\n//polyfill\nif (!Number.parseInt && window.parseInt) {\n Number.parseInt = window.parseInt;\n}\nif (!Number.parseFloat && window.parseFloat) {\n Number.parseFloat = window.parseFloat;\n}\n\nconst defaultOptions = {\n attributeNamePrefix: '@_',\n attrNodeName: false,\n textNodeName: '#text',\n ignoreAttributes: true,\n ignoreNameSpace: false,\n allowBooleanAttributes: false, //a tag can have attributes without any value\n //ignoreRootElement : false,\n parseNodeValue: true,\n parseAttributeValue: false,\n arrayMode: false,\n trimValues: true, //Trim string values of tag and attributes\n cdataTagName: false,\n cdataPositionChar: '\\\\c',\n tagValueProcessor: function(a, tagName) {\n return a;\n },\n attrValueProcessor: function(a, attrName) {\n return a;\n },\n stopNodes: []\n //decodeStrict: false,\n};\n\nexports.defaultOptions = defaultOptions;\n\nconst props = [\n 'attributeNamePrefix',\n 'attrNodeName',\n 'textNodeName',\n 'ignoreAttributes',\n 'ignoreNameSpace',\n 'allowBooleanAttributes',\n 'parseNodeValue',\n 'parseAttributeValue',\n 'arrayMode',\n 'trimValues',\n 'cdataTagName',\n 'cdataPositionChar',\n 'tagValueProcessor',\n 'attrValueProcessor',\n 'parseTrueNumberOnly',\n 'stopNodes'\n];\nexports.props = props;\n\n/**\n * Trim -> valueProcessor -> parse value\n * @param {string} tagName\n * @param {string} val\n * @param {object} options\n */\nfunction processTagValue(tagName, val, options) {\n if (val) {\n if (options.trimValues) {\n val = val.trim();\n }\n val = options.tagValueProcessor(val, tagName);\n val = parseValue(val, options.parseNodeValue, options.parseTrueNumberOnly);\n }\n\n return val;\n}\n\nfunction resolveNameSpace(tagname, options) {\n if (options.ignoreNameSpace) {\n const tags = tagname.split(':');\n const prefix = tagname.charAt(0) === '/' ? '/' : '';\n if (tags[0] === 'xmlns') {\n return '';\n }\n if (tags.length === 2) {\n tagname = prefix + tags[1];\n }\n }\n return tagname;\n}\n\nfunction parseValue(val, shouldParse, parseTrueNumberOnly) {\n if (shouldParse && typeof val === 'string') {\n let parsed;\n if (val.trim() === '' || isNaN(val)) {\n parsed = val === 'true' ? true : val === 'false' ? false : val;\n } else {\n if (val.indexOf('0x') !== -1) {\n //support hexa decimal\n parsed = Number.parseInt(val, 16);\n } else if (val.indexOf('.') !== -1) {\n parsed = Number.parseFloat(val);\n val = val.replace(/\\.?0+$/, \"\");\n } else {\n parsed = Number.parseInt(val, 10);\n }\n if (parseTrueNumberOnly) {\n parsed = String(parsed) === val ? parsed : val;\n }\n }\n return parsed;\n } else {\n if (util.isExist(val)) {\n return val;\n } else {\n return '';\n }\n }\n}\n\n//TODO: change regex to capture NS\n//const attrsRegx = new RegExp(\"([\\\\w\\\\-\\\\.\\\\:]+)\\\\s*=\\\\s*(['\\\"])((.|\\n)*?)\\\\2\",\"gm\");\nconst attrsRegx = new RegExp('([^\\\\s=]+)\\\\s*(=\\\\s*([\\'\"])(.*?)\\\\3)?', 'g');\n\nfunction buildAttributesMap(attrStr, options) {\n if (!options.ignoreAttributes && typeof attrStr === 'string') {\n attrStr = attrStr.replace(/\\r?\\n/g, ' ');\n //attrStr = attrStr || attrStr.trim();\n\n const matches = util.getAllMatches(attrStr, attrsRegx);\n const len = matches.length; //don't make it inline\n const attrs = {};\n for (let i = 0; i < len; i++) {\n const attrName = resolveNameSpace(matches[i][1], options);\n if (attrName.length) {\n if (matches[i][4] !== undefined) {\n if (options.trimValues) {\n matches[i][4] = matches[i][4].trim();\n }\n matches[i][4] = options.attrValueProcessor(matches[i][4], attrName);\n attrs[options.attributeNamePrefix + attrName] = parseValue(\n matches[i][4],\n options.parseAttributeValue,\n options.parseTrueNumberOnly\n );\n } else if (options.allowBooleanAttributes) {\n attrs[options.attributeNamePrefix + attrName] = true;\n }\n }\n }\n if (!Object.keys(attrs).length) {\n return;\n }\n if (options.attrNodeName) {\n const attrCollection = {};\n attrCollection[options.attrNodeName] = attrs;\n return attrCollection;\n }\n return attrs;\n }\n}\n\nconst getTraversalObj = function(xmlData, options) {\n xmlData = xmlData.replace(/\\r\\n?/g, \"\\n\");\n options = buildOptions(options, defaultOptions, props);\n const xmlObj = new xmlNode('!xml');\n let currentNode = xmlObj;\n let textData = \"\";\n\n//function match(xmlData){\n for(let i=0; i< xmlData.length; i++){\n const ch = xmlData[i];\n if(ch === '<'){\n if( xmlData[i+1] === '/') {//Closing Tag\n const closeIndex = findClosingIndex(xmlData, \">\", i, \"Closing Tag is not closed.\")\n let tagName = xmlData.substring(i+2,closeIndex).trim();\n\n if(options.ignoreNameSpace){\n const colonIndex = tagName.indexOf(\":\");\n if(colonIndex !== -1){\n tagName = tagName.substr(colonIndex+1);\n }\n }\n\n /* if (currentNode.parent) {\n currentNode.parent.val = util.getValue(currentNode.parent.val) + '' + processTagValue2(tagName, textData , options);\n } */\n if(currentNode){\n if(currentNode.val){\n currentNode.val = util.getValue(currentNode.val) + '' + processTagValue(tagName, textData , options);\n }else{\n currentNode.val = processTagValue(tagName, textData , options);\n }\n }\n\n if (options.stopNodes.length && options.stopNodes.includes(currentNode.tagname)) {\n currentNode.child = []\n if (currentNode.attrsMap == undefined) { currentNode.attrsMap = {}}\n currentNode.val = xmlData.substr(currentNode.startIndex + 1, i - currentNode.startIndex - 1)\n }\n currentNode = currentNode.parent;\n textData = \"\";\n i = closeIndex;\n } else if( xmlData[i+1] === '?') {\n i = findClosingIndex(xmlData, \"?>\", i, \"Pi Tag is not closed.\")\n } else if(xmlData.substr(i + 1, 3) === '!--') {\n i = findClosingIndex(xmlData, \"-->\", i, \"Comment is not closed.\")\n } else if( xmlData.substr(i + 1, 2) === '!D') {\n const closeIndex = findClosingIndex(xmlData, \">\", i, \"DOCTYPE is not closed.\")\n const tagExp = xmlData.substring(i, closeIndex);\n if(tagExp.indexOf(\"[\") >= 0){\n i = xmlData.indexOf(\"]>\", i) + 1;\n }else{\n i = closeIndex;\n }\n }else if(xmlData.substr(i + 1, 2) === '![') {\n const closeIndex = findClosingIndex(xmlData, \"]]>\", i, \"CDATA is not closed.\") - 2\n const tagExp = xmlData.substring(i + 9,closeIndex);\n\n //considerations\n //1. CDATA will always have parent node\n //2. A tag with CDATA is not a leaf node so it's value would be string type.\n if(textData){\n currentNode.val = util.getValue(currentNode.val) + '' + processTagValue(currentNode.tagname, textData , options);\n textData = \"\";\n }\n\n if (options.cdataTagName) {\n //add cdata node\n const childNode = new xmlNode(options.cdataTagName, currentNode, tagExp);\n currentNode.addChild(childNode);\n //for backtracking\n currentNode.val = util.getValue(currentNode.val) + options.cdataPositionChar;\n //add rest value to parent node\n if (tagExp) {\n childNode.val = tagExp;\n }\n } else {\n currentNode.val = (currentNode.val || '') + (tagExp || '');\n }\n\n i = closeIndex + 2;\n }else {//Opening tag\n const result = closingIndexForOpeningTag(xmlData, i+1)\n let tagExp = result.data;\n const closeIndex = result.index;\n const separatorIndex = tagExp.indexOf(\" \");\n let tagName = tagExp;\n let shouldBuildAttributesMap = true;\n if(separatorIndex !== -1){\n tagName = tagExp.substr(0, separatorIndex).replace(/\\s\\s*$/, '');\n tagExp = tagExp.substr(separatorIndex + 1);\n }\n\n if(options.ignoreNameSpace){\n const colonIndex = tagName.indexOf(\":\");\n if(colonIndex !== -1){\n tagName = tagName.substr(colonIndex+1);\n shouldBuildAttributesMap = tagName !== result.data.substr(colonIndex + 1);\n }\n }\n\n //save text to parent node\n if (currentNode && textData) {\n if(currentNode.tagname !== '!xml'){\n currentNode.val = util.getValue(currentNode.val) + '' + processTagValue( currentNode.tagname, textData, options);\n }\n }\n\n if(tagExp.length > 0 && tagExp.lastIndexOf(\"/\") === tagExp.length - 1){//selfClosing tag\n\n if(tagName[tagName.length - 1] === \"/\"){ //remove trailing '/'\n tagName = tagName.substr(0, tagName.length - 1);\n tagExp = tagName;\n }else{\n tagExp = tagExp.substr(0, tagExp.length - 1);\n }\n\n const childNode = new xmlNode(tagName, currentNode, '');\n if(tagName !== tagExp){\n childNode.attrsMap = buildAttributesMap(tagExp, options);\n }\n currentNode.addChild(childNode);\n }else{//opening tag\n\n const childNode = new xmlNode( tagName, currentNode );\n if (options.stopNodes.length && options.stopNodes.includes(childNode.tagname)) {\n childNode.startIndex=closeIndex;\n }\n if(tagName !== tagExp && shouldBuildAttributesMap){\n childNode.attrsMap = buildAttributesMap(tagExp, options);\n }\n currentNode.addChild(childNode);\n currentNode = childNode;\n }\n textData = \"\";\n i = closeIndex;\n }\n }else{\n textData += xmlData[i];\n }\n }\n return xmlObj;\n}\n\nfunction closingIndexForOpeningTag(data, i){\n let attrBoundary;\n let tagExp = \"\";\n for (let index = i; index < data.length; index++) {\n let ch = data[index];\n if (attrBoundary) {\n if (ch === attrBoundary) attrBoundary = \"\";//reset\n } else if (ch === '\"' || ch === \"'\") {\n attrBoundary = ch;\n } else if (ch === '>') {\n return {\n data: tagExp,\n index: index\n }\n } else if (ch === '\\t') {\n ch = \" \"\n }\n tagExp += ch;\n }\n}\n\nfunction findClosingIndex(xmlData, str, i, errMsg){\n const closingIndex = xmlData.indexOf(str, i);\n if(closingIndex === -1){\n throw new Error(errMsg)\n }else{\n return closingIndex + str.length - 1;\n }\n}\n\nexports.getTraversalObj = getTraversalObj;\n","module.exports = realpath\nrealpath.realpath = realpath\nrealpath.sync = realpathSync\nrealpath.realpathSync = realpathSync\nrealpath.monkeypatch = monkeypatch\nrealpath.unmonkeypatch = unmonkeypatch\n\nvar fs = require('fs')\nvar origRealpath = fs.realpath\nvar origRealpathSync = fs.realpathSync\n\nvar version = process.version\nvar ok = /^v[0-5]\\./.test(version)\nvar old = require('./old.js')\n\nfunction newError (er) {\n return er && er.syscall === 'realpath' && (\n er.code === 'ELOOP' ||\n er.code === 'ENOMEM' ||\n er.code === 'ENAMETOOLONG'\n )\n}\n\nfunction realpath (p, cache, cb) {\n if (ok) {\n return origRealpath(p, cache, cb)\n }\n\n if (typeof cache === 'function') {\n cb = cache\n cache = null\n }\n origRealpath(p, cache, function (er, result) {\n if (newError(er)) {\n old.realpath(p, cache, cb)\n } else {\n cb(er, result)\n }\n })\n}\n\nfunction realpathSync (p, cache) {\n if (ok) {\n return origRealpathSync(p, cache)\n }\n\n try {\n return origRealpathSync(p, cache)\n } catch (er) {\n if (newError(er)) {\n return old.realpathSync(p, cache)\n } else {\n throw er\n }\n }\n}\n\nfunction monkeypatch () {\n fs.realpath = realpath\n fs.realpathSync = realpathSync\n}\n\nfunction unmonkeypatch () {\n fs.realpath = origRealpath\n fs.realpathSync = origRealpathSync\n}\n","// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n\nvar pathModule = require('path');\nvar isWindows = process.platform === 'win32';\nvar fs = require('fs');\n\n// JavaScript implementation of realpath, ported from node pre-v6\n\nvar DEBUG = process.env.NODE_DEBUG && /fs/.test(process.env.NODE_DEBUG);\n\nfunction rethrow() {\n // Only enable in debug mode. A backtrace uses ~1000 bytes of heap space and\n // is fairly slow to generate.\n var callback;\n if (DEBUG) {\n var backtrace = new Error;\n callback = debugCallback;\n } else\n callback = missingCallback;\n\n return callback;\n\n function debugCallback(err) {\n if (err) {\n backtrace.message = err.message;\n err = backtrace;\n missingCallback(err);\n }\n }\n\n function missingCallback(err) {\n if (err) {\n if (process.throwDeprecation)\n throw err; // Forgot a callback but don't know where? Use NODE_DEBUG=fs\n else if (!process.noDeprecation) {\n var msg = 'fs: missing callback ' + (err.stack || err.message);\n if (process.traceDeprecation)\n console.trace(msg);\n else\n console.error(msg);\n }\n }\n }\n}\n\nfunction maybeCallback(cb) {\n return typeof cb === 'function' ? cb : rethrow();\n}\n\nvar normalize = pathModule.normalize;\n\n// Regexp that finds the next partion of a (partial) path\n// result is [base_with_slash, base], e.g. ['somedir/', 'somedir']\nif (isWindows) {\n var nextPartRe = /(.*?)(?:[\\/\\\\]+|$)/g;\n} else {\n var nextPartRe = /(.*?)(?:[\\/]+|$)/g;\n}\n\n// Regex to find the device root, including trailing slash. E.g. 'c:\\\\'.\nif (isWindows) {\n var splitRootRe = /^(?:[a-zA-Z]:|[\\\\\\/]{2}[^\\\\\\/]+[\\\\\\/][^\\\\\\/]+)?[\\\\\\/]*/;\n} else {\n var splitRootRe = /^[\\/]*/;\n}\n\nexports.realpathSync = function realpathSync(p, cache) {\n // make p is absolute\n p = pathModule.resolve(p);\n\n if (cache && Object.prototype.hasOwnProperty.call(cache, p)) {\n return cache[p];\n }\n\n var original = p,\n seenLinks = {},\n knownHard = {};\n\n // current character position in p\n var pos;\n // the partial path so far, including a trailing slash if any\n var current;\n // the partial path without a trailing slash (except when pointing at a root)\n var base;\n // the partial path scanned in the previous round, with slash\n var previous;\n\n start();\n\n function start() {\n // Skip over roots\n var m = splitRootRe.exec(p);\n pos = m[0].length;\n current = m[0];\n base = m[0];\n previous = '';\n\n // On windows, check that the root exists. On unix there is no need.\n if (isWindows && !knownHard[base]) {\n fs.lstatSync(base);\n knownHard[base] = true;\n }\n }\n\n // walk down the path, swapping out linked pathparts for their real\n // values\n // NB: p.length changes.\n while (pos < p.length) {\n // find the next part\n nextPartRe.lastIndex = pos;\n var result = nextPartRe.exec(p);\n previous = current;\n current += result[0];\n base = previous + result[1];\n pos = nextPartRe.lastIndex;\n\n // continue if not a symlink\n if (knownHard[base] || (cache && cache[base] === base)) {\n continue;\n }\n\n var resolvedLink;\n if (cache && Object.prototype.hasOwnProperty.call(cache, base)) {\n // some known symbolic link. no need to stat again.\n resolvedLink = cache[base];\n } else {\n var stat = fs.lstatSync(base);\n if (!stat.isSymbolicLink()) {\n knownHard[base] = true;\n if (cache) cache[base] = base;\n continue;\n }\n\n // read the link if it wasn't read before\n // dev/ino always return 0 on windows, so skip the check.\n var linkTarget = null;\n if (!isWindows) {\n var id = stat.dev.toString(32) + ':' + stat.ino.toString(32);\n if (seenLinks.hasOwnProperty(id)) {\n linkTarget = seenLinks[id];\n }\n }\n if (linkTarget === null) {\n fs.statSync(base);\n linkTarget = fs.readlinkSync(base);\n }\n resolvedLink = pathModule.resolve(previous, linkTarget);\n // track this, if given a cache.\n if (cache) cache[base] = resolvedLink;\n if (!isWindows) seenLinks[id] = linkTarget;\n }\n\n // resolve the link, then start over\n p = pathModule.resolve(resolvedLink, p.slice(pos));\n start();\n }\n\n if (cache) cache[original] = p;\n\n return p;\n};\n\n\nexports.realpath = function realpath(p, cache, cb) {\n if (typeof cb !== 'function') {\n cb = maybeCallback(cache);\n cache = null;\n }\n\n // make p is absolute\n p = pathModule.resolve(p);\n\n if (cache && Object.prototype.hasOwnProperty.call(cache, p)) {\n return process.nextTick(cb.bind(null, null, cache[p]));\n }\n\n var original = p,\n seenLinks = {},\n knownHard = {};\n\n // current character position in p\n var pos;\n // the partial path so far, including a trailing slash if any\n var current;\n // the partial path without a trailing slash (except when pointing at a root)\n var base;\n // the partial path scanned in the previous round, with slash\n var previous;\n\n start();\n\n function start() {\n // Skip over roots\n var m = splitRootRe.exec(p);\n pos = m[0].length;\n current = m[0];\n base = m[0];\n previous = '';\n\n // On windows, check that the root exists. On unix there is no need.\n if (isWindows && !knownHard[base]) {\n fs.lstat(base, function(err) {\n if (err) return cb(err);\n knownHard[base] = true;\n LOOP();\n });\n } else {\n process.nextTick(LOOP);\n }\n }\n\n // walk down the path, swapping out linked pathparts for their real\n // values\n function LOOP() {\n // stop if scanned past end of path\n if (pos >= p.length) {\n if (cache) cache[original] = p;\n return cb(null, p);\n }\n\n // find the next part\n nextPartRe.lastIndex = pos;\n var result = nextPartRe.exec(p);\n previous = current;\n current += result[0];\n base = previous + result[1];\n pos = nextPartRe.lastIndex;\n\n // continue if not a symlink\n if (knownHard[base] || (cache && cache[base] === base)) {\n return process.nextTick(LOOP);\n }\n\n if (cache && Object.prototype.hasOwnProperty.call(cache, base)) {\n // known symbolic link. no need to stat again.\n return gotResolvedLink(cache[base]);\n }\n\n return fs.lstat(base, gotStat);\n }\n\n function gotStat(err, stat) {\n if (err) return cb(err);\n\n // if not a symlink, skip to the next path part\n if (!stat.isSymbolicLink()) {\n knownHard[base] = true;\n if (cache) cache[base] = base;\n return process.nextTick(LOOP);\n }\n\n // stat & read the link if not read before\n // call gotTarget as soon as the link target is known\n // dev/ino always return 0 on windows, so skip the check.\n if (!isWindows) {\n var id = stat.dev.toString(32) + ':' + stat.ino.toString(32);\n if (seenLinks.hasOwnProperty(id)) {\n return gotTarget(null, seenLinks[id], base);\n }\n }\n fs.stat(base, function(err) {\n if (err) return cb(err);\n\n fs.readlink(base, function(err, target) {\n if (!isWindows) seenLinks[id] = target;\n gotTarget(err, target);\n });\n });\n }\n\n function gotTarget(err, target, base) {\n if (err) return cb(err);\n\n var resolvedLink = pathModule.resolve(previous, target);\n if (cache) cache[base] = resolvedLink;\n gotResolvedLink(resolvedLink);\n }\n\n function gotResolvedLink(resolvedLink) {\n // resolve the link, then start over\n p = pathModule.resolve(resolvedLink, p.slice(pos));\n start();\n }\n};\n","exports.alphasort = alphasort\nexports.alphasorti = alphasorti\nexports.setopts = setopts\nexports.ownProp = ownProp\nexports.makeAbs = makeAbs\nexports.finish = finish\nexports.mark = mark\nexports.isIgnored = isIgnored\nexports.childrenIgnored = childrenIgnored\n\nfunction ownProp (obj, field) {\n return Object.prototype.hasOwnProperty.call(obj, field)\n}\n\nvar path = require(\"path\")\nvar minimatch = require(\"minimatch\")\nvar isAbsolute = require(\"path-is-absolute\")\nvar Minimatch = minimatch.Minimatch\n\nfunction alphasorti (a, b) {\n return a.toLowerCase().localeCompare(b.toLowerCase())\n}\n\nfunction alphasort (a, b) {\n return a.localeCompare(b)\n}\n\nfunction setupIgnores (self, options) {\n self.ignore = options.ignore || []\n\n if (!Array.isArray(self.ignore))\n self.ignore = [self.ignore]\n\n if (self.ignore.length) {\n self.ignore = self.ignore.map(ignoreMap)\n }\n}\n\n// ignore patterns are always in dot:true mode.\nfunction ignoreMap (pattern) {\n var gmatcher = null\n if (pattern.slice(-3) === '/**') {\n var gpattern = pattern.replace(/(\\/\\*\\*)+$/, '')\n gmatcher = new Minimatch(gpattern, { dot: true })\n }\n\n return {\n matcher: new Minimatch(pattern, { dot: true }),\n gmatcher: gmatcher\n }\n}\n\nfunction setopts (self, pattern, options) {\n if (!options)\n options = {}\n\n // base-matching: just use globstar for that.\n if (options.matchBase && -1 === pattern.indexOf(\"/\")) {\n if (options.noglobstar) {\n throw new Error(\"base matching requires globstar\")\n }\n pattern = \"**/\" + pattern\n }\n\n self.silent = !!options.silent\n self.pattern = pattern\n self.strict = options.strict !== false\n self.realpath = !!options.realpath\n self.realpathCache = options.realpathCache || Object.create(null)\n self.follow = !!options.follow\n self.dot = !!options.dot\n self.mark = !!options.mark\n self.nodir = !!options.nodir\n if (self.nodir)\n self.mark = true\n self.sync = !!options.sync\n self.nounique = !!options.nounique\n self.nonull = !!options.nonull\n self.nosort = !!options.nosort\n self.nocase = !!options.nocase\n self.stat = !!options.stat\n self.noprocess = !!options.noprocess\n self.absolute = !!options.absolute\n\n self.maxLength = options.maxLength || Infinity\n self.cache = options.cache || Object.create(null)\n self.statCache = options.statCache || Object.create(null)\n self.symlinks = options.symlinks || Object.create(null)\n\n setupIgnores(self, options)\n\n self.changedCwd = false\n var cwd = process.cwd()\n if (!ownProp(options, \"cwd\"))\n self.cwd = cwd\n else {\n self.cwd = path.resolve(options.cwd)\n self.changedCwd = self.cwd !== cwd\n }\n\n self.root = options.root || path.resolve(self.cwd, \"/\")\n self.root = path.resolve(self.root)\n if (process.platform === \"win32\")\n self.root = self.root.replace(/\\\\/g, \"/\")\n\n // TODO: is an absolute `cwd` supposed to be resolved against `root`?\n // e.g. { cwd: '/test', root: __dirname } === path.join(__dirname, '/test')\n self.cwdAbs = isAbsolute(self.cwd) ? self.cwd : makeAbs(self, self.cwd)\n if (process.platform === \"win32\")\n self.cwdAbs = self.cwdAbs.replace(/\\\\/g, \"/\")\n self.nomount = !!options.nomount\n\n // disable comments and negation in Minimatch.\n // Note that they are not supported in Glob itself anyway.\n options.nonegate = true\n options.nocomment = true\n\n self.minimatch = new Minimatch(pattern, options)\n self.options = self.minimatch.options\n}\n\nfunction finish (self) {\n var nou = self.nounique\n var all = nou ? [] : Object.create(null)\n\n for (var i = 0, l = self.matches.length; i < l; i ++) {\n var matches = self.matches[i]\n if (!matches || Object.keys(matches).length === 0) {\n if (self.nonull) {\n // do like the shell, and spit out the literal glob\n var literal = self.minimatch.globSet[i]\n if (nou)\n all.push(literal)\n else\n all[literal] = true\n }\n } else {\n // had matches\n var m = Object.keys(matches)\n if (nou)\n all.push.apply(all, m)\n else\n m.forEach(function (m) {\n all[m] = true\n })\n }\n }\n\n if (!nou)\n all = Object.keys(all)\n\n if (!self.nosort)\n all = all.sort(self.nocase ? alphasorti : alphasort)\n\n // at *some* point we statted all of these\n if (self.mark) {\n for (var i = 0; i < all.length; i++) {\n all[i] = self._mark(all[i])\n }\n if (self.nodir) {\n all = all.filter(function (e) {\n var notDir = !(/\\/$/.test(e))\n var c = self.cache[e] || self.cache[makeAbs(self, e)]\n if (notDir && c)\n notDir = c !== 'DIR' && !Array.isArray(c)\n return notDir\n })\n }\n }\n\n if (self.ignore.length)\n all = all.filter(function(m) {\n return !isIgnored(self, m)\n })\n\n self.found = all\n}\n\nfunction mark (self, p) {\n var abs = makeAbs(self, p)\n var c = self.cache[abs]\n var m = p\n if (c) {\n var isDir = c === 'DIR' || Array.isArray(c)\n var slash = p.slice(-1) === '/'\n\n if (isDir && !slash)\n m += '/'\n else if (!isDir && slash)\n m = m.slice(0, -1)\n\n if (m !== p) {\n var mabs = makeAbs(self, m)\n self.statCache[mabs] = self.statCache[abs]\n self.cache[mabs] = self.cache[abs]\n }\n }\n\n return m\n}\n\n// lotta situps...\nfunction makeAbs (self, f) {\n var abs = f\n if (f.charAt(0) === '/') {\n abs = path.join(self.root, f)\n } else if (isAbsolute(f) || f === '') {\n abs = f\n } else if (self.changedCwd) {\n abs = path.resolve(self.cwd, f)\n } else {\n abs = path.resolve(f)\n }\n\n if (process.platform === 'win32')\n abs = abs.replace(/\\\\/g, '/')\n\n return abs\n}\n\n\n// Return true, if pattern ends with globstar '**', for the accompanying parent directory.\n// Ex:- If node_modules/** is the pattern, add 'node_modules' to ignore list along with it's contents\nfunction isIgnored (self, path) {\n if (!self.ignore.length)\n return false\n\n return self.ignore.some(function(item) {\n return item.matcher.match(path) || !!(item.gmatcher && item.gmatcher.match(path))\n })\n}\n\nfunction childrenIgnored (self, path) {\n if (!self.ignore.length)\n return false\n\n return self.ignore.some(function(item) {\n return !!(item.gmatcher && item.gmatcher.match(path))\n })\n}\n","// Approach:\n//\n// 1. Get the minimatch set\n// 2. For each pattern in the set, PROCESS(pattern, false)\n// 3. Store matches per-set, then uniq them\n//\n// PROCESS(pattern, inGlobStar)\n// Get the first [n] items from pattern that are all strings\n// Join these together. This is PREFIX.\n// If there is no more remaining, then stat(PREFIX) and\n// add to matches if it succeeds. END.\n//\n// If inGlobStar and PREFIX is symlink and points to dir\n// set ENTRIES = []\n// else readdir(PREFIX) as ENTRIES\n// If fail, END\n//\n// with ENTRIES\n// If pattern[n] is GLOBSTAR\n// // handle the case where the globstar match is empty\n// // by pruning it out, and testing the resulting pattern\n// PROCESS(pattern[0..n] + pattern[n+1 .. $], false)\n// // handle other cases.\n// for ENTRY in ENTRIES (not dotfiles)\n// // attach globstar + tail onto the entry\n// // Mark that this entry is a globstar match\n// PROCESS(pattern[0..n] + ENTRY + pattern[n .. $], true)\n//\n// else // not globstar\n// for ENTRY in ENTRIES (not dotfiles, unless pattern[n] is dot)\n// Test ENTRY against pattern[n]\n// If fails, continue\n// If passes, PROCESS(pattern[0..n] + item + pattern[n+1 .. $])\n//\n// Caveat:\n// Cache all stats and readdirs results to minimize syscall. Since all\n// we ever care about is existence and directory-ness, we can just keep\n// `true` for files, and [children,...] for directories, or `false` for\n// things that don't exist.\n\nmodule.exports = glob\n\nvar fs = require('fs')\nvar rp = require('fs.realpath')\nvar minimatch = require('minimatch')\nvar Minimatch = minimatch.Minimatch\nvar inherits = require('inherits')\nvar EE = require('events').EventEmitter\nvar path = require('path')\nvar assert = require('assert')\nvar isAbsolute = require('path-is-absolute')\nvar globSync = require('./sync.js')\nvar common = require('./common.js')\nvar alphasort = common.alphasort\nvar alphasorti = common.alphasorti\nvar setopts = common.setopts\nvar ownProp = common.ownProp\nvar inflight = require('inflight')\nvar util = require('util')\nvar childrenIgnored = common.childrenIgnored\nvar isIgnored = common.isIgnored\n\nvar once = require('once')\n\nfunction glob (pattern, options, cb) {\n if (typeof options === 'function') cb = options, options = {}\n if (!options) options = {}\n\n if (options.sync) {\n if (cb)\n throw new TypeError('callback provided to sync glob')\n return globSync(pattern, options)\n }\n\n return new Glob(pattern, options, cb)\n}\n\nglob.sync = globSync\nvar GlobSync = glob.GlobSync = globSync.GlobSync\n\n// old api surface\nglob.glob = glob\n\nfunction extend (origin, add) {\n if (add === null || typeof add !== 'object') {\n return origin\n }\n\n var keys = Object.keys(add)\n var i = keys.length\n while (i--) {\n origin[keys[i]] = add[keys[i]]\n }\n return origin\n}\n\nglob.hasMagic = function (pattern, options_) {\n var options = extend({}, options_)\n options.noprocess = true\n\n var g = new Glob(pattern, options)\n var set = g.minimatch.set\n\n if (!pattern)\n return false\n\n if (set.length > 1)\n return true\n\n for (var j = 0; j < set[0].length; j++) {\n if (typeof set[0][j] !== 'string')\n return true\n }\n\n return false\n}\n\nglob.Glob = Glob\ninherits(Glob, EE)\nfunction Glob (pattern, options, cb) {\n if (typeof options === 'function') {\n cb = options\n options = null\n }\n\n if (options && options.sync) {\n if (cb)\n throw new TypeError('callback provided to sync glob')\n return new GlobSync(pattern, options)\n }\n\n if (!(this instanceof Glob))\n return new Glob(pattern, options, cb)\n\n setopts(this, pattern, options)\n this._didRealPath = false\n\n // process each pattern in the minimatch set\n var n = this.minimatch.set.length\n\n // The matches are stored as {: true,...} so that\n // duplicates are automagically pruned.\n // Later, we do an Object.keys() on these.\n // Keep them as a list so we can fill in when nonull is set.\n this.matches = new Array(n)\n\n if (typeof cb === 'function') {\n cb = once(cb)\n this.on('error', cb)\n this.on('end', function (matches) {\n cb(null, matches)\n })\n }\n\n var self = this\n this._processing = 0\n\n this._emitQueue = []\n this._processQueue = []\n this.paused = false\n\n if (this.noprocess)\n return this\n\n if (n === 0)\n return done()\n\n var sync = true\n for (var i = 0; i < n; i ++) {\n this._process(this.minimatch.set[i], i, false, done)\n }\n sync = false\n\n function done () {\n --self._processing\n if (self._processing <= 0) {\n if (sync) {\n process.nextTick(function () {\n self._finish()\n })\n } else {\n self._finish()\n }\n }\n }\n}\n\nGlob.prototype._finish = function () {\n assert(this instanceof Glob)\n if (this.aborted)\n return\n\n if (this.realpath && !this._didRealpath)\n return this._realpath()\n\n common.finish(this)\n this.emit('end', this.found)\n}\n\nGlob.prototype._realpath = function () {\n if (this._didRealpath)\n return\n\n this._didRealpath = true\n\n var n = this.matches.length\n if (n === 0)\n return this._finish()\n\n var self = this\n for (var i = 0; i < this.matches.length; i++)\n this._realpathSet(i, next)\n\n function next () {\n if (--n === 0)\n self._finish()\n }\n}\n\nGlob.prototype._realpathSet = function (index, cb) {\n var matchset = this.matches[index]\n if (!matchset)\n return cb()\n\n var found = Object.keys(matchset)\n var self = this\n var n = found.length\n\n if (n === 0)\n return cb()\n\n var set = this.matches[index] = Object.create(null)\n found.forEach(function (p, i) {\n // If there's a problem with the stat, then it means that\n // one or more of the links in the realpath couldn't be\n // resolved. just return the abs value in that case.\n p = self._makeAbs(p)\n rp.realpath(p, self.realpathCache, function (er, real) {\n if (!er)\n set[real] = true\n else if (er.syscall === 'stat')\n set[p] = true\n else\n self.emit('error', er) // srsly wtf right here\n\n if (--n === 0) {\n self.matches[index] = set\n cb()\n }\n })\n })\n}\n\nGlob.prototype._mark = function (p) {\n return common.mark(this, p)\n}\n\nGlob.prototype._makeAbs = function (f) {\n return common.makeAbs(this, f)\n}\n\nGlob.prototype.abort = function () {\n this.aborted = true\n this.emit('abort')\n}\n\nGlob.prototype.pause = function () {\n if (!this.paused) {\n this.paused = true\n this.emit('pause')\n }\n}\n\nGlob.prototype.resume = function () {\n if (this.paused) {\n this.emit('resume')\n this.paused = false\n if (this._emitQueue.length) {\n var eq = this._emitQueue.slice(0)\n this._emitQueue.length = 0\n for (var i = 0; i < eq.length; i ++) {\n var e = eq[i]\n this._emitMatch(e[0], e[1])\n }\n }\n if (this._processQueue.length) {\n var pq = this._processQueue.slice(0)\n this._processQueue.length = 0\n for (var i = 0; i < pq.length; i ++) {\n var p = pq[i]\n this._processing--\n this._process(p[0], p[1], p[2], p[3])\n }\n }\n }\n}\n\nGlob.prototype._process = function (pattern, index, inGlobStar, cb) {\n assert(this instanceof Glob)\n assert(typeof cb === 'function')\n\n if (this.aborted)\n return\n\n this._processing++\n if (this.paused) {\n this._processQueue.push([pattern, index, inGlobStar, cb])\n return\n }\n\n //console.error('PROCESS %d', this._processing, pattern)\n\n // Get the first [n] parts of pattern that are all strings.\n var n = 0\n while (typeof pattern[n] === 'string') {\n n ++\n }\n // now n is the index of the first one that is *not* a string.\n\n // see if there's anything else\n var prefix\n switch (n) {\n // if not, then this is rather simple\n case pattern.length:\n this._processSimple(pattern.join('/'), index, cb)\n return\n\n case 0:\n // pattern *starts* with some non-trivial item.\n // going to readdir(cwd), but not include the prefix in matches.\n prefix = null\n break\n\n default:\n // pattern has some string bits in the front.\n // whatever it starts with, whether that's 'absolute' like /foo/bar,\n // or 'relative' like '../baz'\n prefix = pattern.slice(0, n).join('/')\n break\n }\n\n var remain = pattern.slice(n)\n\n // get the list of entries.\n var read\n if (prefix === null)\n read = '.'\n else if (isAbsolute(prefix) || isAbsolute(pattern.join('/'))) {\n if (!prefix || !isAbsolute(prefix))\n prefix = '/' + prefix\n read = prefix\n } else\n read = prefix\n\n var abs = this._makeAbs(read)\n\n //if ignored, skip _processing\n if (childrenIgnored(this, read))\n return cb()\n\n var isGlobStar = remain[0] === minimatch.GLOBSTAR\n if (isGlobStar)\n this._processGlobStar(prefix, read, abs, remain, index, inGlobStar, cb)\n else\n this._processReaddir(prefix, read, abs, remain, index, inGlobStar, cb)\n}\n\nGlob.prototype._processReaddir = function (prefix, read, abs, remain, index, inGlobStar, cb) {\n var self = this\n this._readdir(abs, inGlobStar, function (er, entries) {\n return self._processReaddir2(prefix, read, abs, remain, index, inGlobStar, entries, cb)\n })\n}\n\nGlob.prototype._processReaddir2 = function (prefix, read, abs, remain, index, inGlobStar, entries, cb) {\n\n // if the abs isn't a dir, then nothing can match!\n if (!entries)\n return cb()\n\n // It will only match dot entries if it starts with a dot, or if\n // dot is set. Stuff like @(.foo|.bar) isn't allowed.\n var pn = remain[0]\n var negate = !!this.minimatch.negate\n var rawGlob = pn._glob\n var dotOk = this.dot || rawGlob.charAt(0) === '.'\n\n var matchedEntries = []\n for (var i = 0; i < entries.length; i++) {\n var e = entries[i]\n if (e.charAt(0) !== '.' || dotOk) {\n var m\n if (negate && !prefix) {\n m = !e.match(pn)\n } else {\n m = e.match(pn)\n }\n if (m)\n matchedEntries.push(e)\n }\n }\n\n //console.error('prd2', prefix, entries, remain[0]._glob, matchedEntries)\n\n var len = matchedEntries.length\n // If there are no matched entries, then nothing matches.\n if (len === 0)\n return cb()\n\n // if this is the last remaining pattern bit, then no need for\n // an additional stat *unless* the user has specified mark or\n // stat explicitly. We know they exist, since readdir returned\n // them.\n\n if (remain.length === 1 && !this.mark && !this.stat) {\n if (!this.matches[index])\n this.matches[index] = Object.create(null)\n\n for (var i = 0; i < len; i ++) {\n var e = matchedEntries[i]\n if (prefix) {\n if (prefix !== '/')\n e = prefix + '/' + e\n else\n e = prefix + e\n }\n\n if (e.charAt(0) === '/' && !this.nomount) {\n e = path.join(this.root, e)\n }\n this._emitMatch(index, e)\n }\n // This was the last one, and no stats were needed\n return cb()\n }\n\n // now test all matched entries as stand-ins for that part\n // of the pattern.\n remain.shift()\n for (var i = 0; i < len; i ++) {\n var e = matchedEntries[i]\n var newPattern\n if (prefix) {\n if (prefix !== '/')\n e = prefix + '/' + e\n else\n e = prefix + e\n }\n this._process([e].concat(remain), index, inGlobStar, cb)\n }\n cb()\n}\n\nGlob.prototype._emitMatch = function (index, e) {\n if (this.aborted)\n return\n\n if (isIgnored(this, e))\n return\n\n if (this.paused) {\n this._emitQueue.push([index, e])\n return\n }\n\n var abs = isAbsolute(e) ? e : this._makeAbs(e)\n\n if (this.mark)\n e = this._mark(e)\n\n if (this.absolute)\n e = abs\n\n if (this.matches[index][e])\n return\n\n if (this.nodir) {\n var c = this.cache[abs]\n if (c === 'DIR' || Array.isArray(c))\n return\n }\n\n this.matches[index][e] = true\n\n var st = this.statCache[abs]\n if (st)\n this.emit('stat', e, st)\n\n this.emit('match', e)\n}\n\nGlob.prototype._readdirInGlobStar = function (abs, cb) {\n if (this.aborted)\n return\n\n // follow all symlinked directories forever\n // just proceed as if this is a non-globstar situation\n if (this.follow)\n return this._readdir(abs, false, cb)\n\n var lstatkey = 'lstat\\0' + abs\n var self = this\n var lstatcb = inflight(lstatkey, lstatcb_)\n\n if (lstatcb)\n fs.lstat(abs, lstatcb)\n\n function lstatcb_ (er, lstat) {\n if (er && er.code === 'ENOENT')\n return cb()\n\n var isSym = lstat && lstat.isSymbolicLink()\n self.symlinks[abs] = isSym\n\n // If it's not a symlink or a dir, then it's definitely a regular file.\n // don't bother doing a readdir in that case.\n if (!isSym && lstat && !lstat.isDirectory()) {\n self.cache[abs] = 'FILE'\n cb()\n } else\n self._readdir(abs, false, cb)\n }\n}\n\nGlob.prototype._readdir = function (abs, inGlobStar, cb) {\n if (this.aborted)\n return\n\n cb = inflight('readdir\\0'+abs+'\\0'+inGlobStar, cb)\n if (!cb)\n return\n\n //console.error('RD %j %j', +inGlobStar, abs)\n if (inGlobStar && !ownProp(this.symlinks, abs))\n return this._readdirInGlobStar(abs, cb)\n\n if (ownProp(this.cache, abs)) {\n var c = this.cache[abs]\n if (!c || c === 'FILE')\n return cb()\n\n if (Array.isArray(c))\n return cb(null, c)\n }\n\n var self = this\n fs.readdir(abs, readdirCb(this, abs, cb))\n}\n\nfunction readdirCb (self, abs, cb) {\n return function (er, entries) {\n if (er)\n self._readdirError(abs, er, cb)\n else\n self._readdirEntries(abs, entries, cb)\n }\n}\n\nGlob.prototype._readdirEntries = function (abs, entries, cb) {\n if (this.aborted)\n return\n\n // if we haven't asked to stat everything, then just\n // assume that everything in there exists, so we can avoid\n // having to stat it a second time.\n if (!this.mark && !this.stat) {\n for (var i = 0; i < entries.length; i ++) {\n var e = entries[i]\n if (abs === '/')\n e = abs + e\n else\n e = abs + '/' + e\n this.cache[e] = true\n }\n }\n\n this.cache[abs] = entries\n return cb(null, entries)\n}\n\nGlob.prototype._readdirError = function (f, er, cb) {\n if (this.aborted)\n return\n\n // handle errors, and cache the information\n switch (er.code) {\n case 'ENOTSUP': // https://github.com/isaacs/node-glob/issues/205\n case 'ENOTDIR': // totally normal. means it *does* exist.\n var abs = this._makeAbs(f)\n this.cache[abs] = 'FILE'\n if (abs === this.cwdAbs) {\n var error = new Error(er.code + ' invalid cwd ' + this.cwd)\n error.path = this.cwd\n error.code = er.code\n this.emit('error', error)\n this.abort()\n }\n break\n\n case 'ENOENT': // not terribly unusual\n case 'ELOOP':\n case 'ENAMETOOLONG':\n case 'UNKNOWN':\n this.cache[this._makeAbs(f)] = false\n break\n\n default: // some unusual error. Treat as failure.\n this.cache[this._makeAbs(f)] = false\n if (this.strict) {\n this.emit('error', er)\n // If the error is handled, then we abort\n // if not, we threw out of here\n this.abort()\n }\n if (!this.silent)\n console.error('glob error', er)\n break\n }\n\n return cb()\n}\n\nGlob.prototype._processGlobStar = function (prefix, read, abs, remain, index, inGlobStar, cb) {\n var self = this\n this._readdir(abs, inGlobStar, function (er, entries) {\n self._processGlobStar2(prefix, read, abs, remain, index, inGlobStar, entries, cb)\n })\n}\n\n\nGlob.prototype._processGlobStar2 = function (prefix, read, abs, remain, index, inGlobStar, entries, cb) {\n //console.error('pgs2', prefix, remain[0], entries)\n\n // no entries means not a dir, so it can never have matches\n // foo.txt/** doesn't match foo.txt\n if (!entries)\n return cb()\n\n // test without the globstar, and with every child both below\n // and replacing the globstar.\n var remainWithoutGlobStar = remain.slice(1)\n var gspref = prefix ? [ prefix ] : []\n var noGlobStar = gspref.concat(remainWithoutGlobStar)\n\n // the noGlobStar pattern exits the inGlobStar state\n this._process(noGlobStar, index, false, cb)\n\n var isSym = this.symlinks[abs]\n var len = entries.length\n\n // If it's a symlink, and we're in a globstar, then stop\n if (isSym && inGlobStar)\n return cb()\n\n for (var i = 0; i < len; i++) {\n var e = entries[i]\n if (e.charAt(0) === '.' && !this.dot)\n continue\n\n // these two cases enter the inGlobStar state\n var instead = gspref.concat(entries[i], remainWithoutGlobStar)\n this._process(instead, index, true, cb)\n\n var below = gspref.concat(entries[i], remain)\n this._process(below, index, true, cb)\n }\n\n cb()\n}\n\nGlob.prototype._processSimple = function (prefix, index, cb) {\n // XXX review this. Shouldn't it be doing the mounting etc\n // before doing stat? kinda weird?\n var self = this\n this._stat(prefix, function (er, exists) {\n self._processSimple2(prefix, index, er, exists, cb)\n })\n}\nGlob.prototype._processSimple2 = function (prefix, index, er, exists, cb) {\n\n //console.error('ps2', prefix, exists)\n\n if (!this.matches[index])\n this.matches[index] = Object.create(null)\n\n // If it doesn't exist, then just mark the lack of results\n if (!exists)\n return cb()\n\n if (prefix && isAbsolute(prefix) && !this.nomount) {\n var trail = /[\\/\\\\]$/.test(prefix)\n if (prefix.charAt(0) === '/') {\n prefix = path.join(this.root, prefix)\n } else {\n prefix = path.resolve(this.root, prefix)\n if (trail)\n prefix += '/'\n }\n }\n\n if (process.platform === 'win32')\n prefix = prefix.replace(/\\\\/g, '/')\n\n // Mark this as a match\n this._emitMatch(index, prefix)\n cb()\n}\n\n// Returns either 'DIR', 'FILE', or false\nGlob.prototype._stat = function (f, cb) {\n var abs = this._makeAbs(f)\n var needDir = f.slice(-1) === '/'\n\n if (f.length > this.maxLength)\n return cb()\n\n if (!this.stat && ownProp(this.cache, abs)) {\n var c = this.cache[abs]\n\n if (Array.isArray(c))\n c = 'DIR'\n\n // It exists, but maybe not how we need it\n if (!needDir || c === 'DIR')\n return cb(null, c)\n\n if (needDir && c === 'FILE')\n return cb()\n\n // otherwise we have to stat, because maybe c=true\n // if we know it exists, but not what it is.\n }\n\n var exists\n var stat = this.statCache[abs]\n if (stat !== undefined) {\n if (stat === false)\n return cb(null, stat)\n else {\n var type = stat.isDirectory() ? 'DIR' : 'FILE'\n if (needDir && type === 'FILE')\n return cb()\n else\n return cb(null, type, stat)\n }\n }\n\n var self = this\n var statcb = inflight('stat\\0' + abs, lstatcb_)\n if (statcb)\n fs.lstat(abs, statcb)\n\n function lstatcb_ (er, lstat) {\n if (lstat && lstat.isSymbolicLink()) {\n // If it's a symlink, then treat it as the target, unless\n // the target does not exist, then treat it as a file.\n return fs.stat(abs, function (er, stat) {\n if (er)\n self._stat2(f, abs, null, lstat, cb)\n else\n self._stat2(f, abs, er, stat, cb)\n })\n } else {\n self._stat2(f, abs, er, lstat, cb)\n }\n }\n}\n\nGlob.prototype._stat2 = function (f, abs, er, stat, cb) {\n if (er && (er.code === 'ENOENT' || er.code === 'ENOTDIR')) {\n this.statCache[abs] = false\n return cb()\n }\n\n var needDir = f.slice(-1) === '/'\n this.statCache[abs] = stat\n\n if (abs.slice(-1) === '/' && stat && !stat.isDirectory())\n return cb(null, false, stat)\n\n var c = true\n if (stat)\n c = stat.isDirectory() ? 'DIR' : 'FILE'\n this.cache[abs] = this.cache[abs] || c\n\n if (needDir && c === 'FILE')\n return cb()\n\n return cb(null, c, stat)\n}\n","module.exports = globSync\nglobSync.GlobSync = GlobSync\n\nvar fs = require('fs')\nvar rp = require('fs.realpath')\nvar minimatch = require('minimatch')\nvar Minimatch = minimatch.Minimatch\nvar Glob = require('./glob.js').Glob\nvar util = require('util')\nvar path = require('path')\nvar assert = require('assert')\nvar isAbsolute = require('path-is-absolute')\nvar common = require('./common.js')\nvar alphasort = common.alphasort\nvar alphasorti = common.alphasorti\nvar setopts = common.setopts\nvar ownProp = common.ownProp\nvar childrenIgnored = common.childrenIgnored\nvar isIgnored = common.isIgnored\n\nfunction globSync (pattern, options) {\n if (typeof options === 'function' || arguments.length === 3)\n throw new TypeError('callback provided to sync glob\\n'+\n 'See: https://github.com/isaacs/node-glob/issues/167')\n\n return new GlobSync(pattern, options).found\n}\n\nfunction GlobSync (pattern, options) {\n if (!pattern)\n throw new Error('must provide pattern')\n\n if (typeof options === 'function' || arguments.length === 3)\n throw new TypeError('callback provided to sync glob\\n'+\n 'See: https://github.com/isaacs/node-glob/issues/167')\n\n if (!(this instanceof GlobSync))\n return new GlobSync(pattern, options)\n\n setopts(this, pattern, options)\n\n if (this.noprocess)\n return this\n\n var n = this.minimatch.set.length\n this.matches = new Array(n)\n for (var i = 0; i < n; i ++) {\n this._process(this.minimatch.set[i], i, false)\n }\n this._finish()\n}\n\nGlobSync.prototype._finish = function () {\n assert(this instanceof GlobSync)\n if (this.realpath) {\n var self = this\n this.matches.forEach(function (matchset, index) {\n var set = self.matches[index] = Object.create(null)\n for (var p in matchset) {\n try {\n p = self._makeAbs(p)\n var real = rp.realpathSync(p, self.realpathCache)\n set[real] = true\n } catch (er) {\n if (er.syscall === 'stat')\n set[self._makeAbs(p)] = true\n else\n throw er\n }\n }\n })\n }\n common.finish(this)\n}\n\n\nGlobSync.prototype._process = function (pattern, index, inGlobStar) {\n assert(this instanceof GlobSync)\n\n // Get the first [n] parts of pattern that are all strings.\n var n = 0\n while (typeof pattern[n] === 'string') {\n n ++\n }\n // now n is the index of the first one that is *not* a string.\n\n // See if there's anything else\n var prefix\n switch (n) {\n // if not, then this is rather simple\n case pattern.length:\n this._processSimple(pattern.join('/'), index)\n return\n\n case 0:\n // pattern *starts* with some non-trivial item.\n // going to readdir(cwd), but not include the prefix in matches.\n prefix = null\n break\n\n default:\n // pattern has some string bits in the front.\n // whatever it starts with, whether that's 'absolute' like /foo/bar,\n // or 'relative' like '../baz'\n prefix = pattern.slice(0, n).join('/')\n break\n }\n\n var remain = pattern.slice(n)\n\n // get the list of entries.\n var read\n if (prefix === null)\n read = '.'\n else if (isAbsolute(prefix) || isAbsolute(pattern.join('/'))) {\n if (!prefix || !isAbsolute(prefix))\n prefix = '/' + prefix\n read = prefix\n } else\n read = prefix\n\n var abs = this._makeAbs(read)\n\n //if ignored, skip processing\n if (childrenIgnored(this, read))\n return\n\n var isGlobStar = remain[0] === minimatch.GLOBSTAR\n if (isGlobStar)\n this._processGlobStar(prefix, read, abs, remain, index, inGlobStar)\n else\n this._processReaddir(prefix, read, abs, remain, index, inGlobStar)\n}\n\n\nGlobSync.prototype._processReaddir = function (prefix, read, abs, remain, index, inGlobStar) {\n var entries = this._readdir(abs, inGlobStar)\n\n // if the abs isn't a dir, then nothing can match!\n if (!entries)\n return\n\n // It will only match dot entries if it starts with a dot, or if\n // dot is set. Stuff like @(.foo|.bar) isn't allowed.\n var pn = remain[0]\n var negate = !!this.minimatch.negate\n var rawGlob = pn._glob\n var dotOk = this.dot || rawGlob.charAt(0) === '.'\n\n var matchedEntries = []\n for (var i = 0; i < entries.length; i++) {\n var e = entries[i]\n if (e.charAt(0) !== '.' || dotOk) {\n var m\n if (negate && !prefix) {\n m = !e.match(pn)\n } else {\n m = e.match(pn)\n }\n if (m)\n matchedEntries.push(e)\n }\n }\n\n var len = matchedEntries.length\n // If there are no matched entries, then nothing matches.\n if (len === 0)\n return\n\n // if this is the last remaining pattern bit, then no need for\n // an additional stat *unless* the user has specified mark or\n // stat explicitly. We know they exist, since readdir returned\n // them.\n\n if (remain.length === 1 && !this.mark && !this.stat) {\n if (!this.matches[index])\n this.matches[index] = Object.create(null)\n\n for (var i = 0; i < len; i ++) {\n var e = matchedEntries[i]\n if (prefix) {\n if (prefix.slice(-1) !== '/')\n e = prefix + '/' + e\n else\n e = prefix + e\n }\n\n if (e.charAt(0) === '/' && !this.nomount) {\n e = path.join(this.root, e)\n }\n this._emitMatch(index, e)\n }\n // This was the last one, and no stats were needed\n return\n }\n\n // now test all matched entries as stand-ins for that part\n // of the pattern.\n remain.shift()\n for (var i = 0; i < len; i ++) {\n var e = matchedEntries[i]\n var newPattern\n if (prefix)\n newPattern = [prefix, e]\n else\n newPattern = [e]\n this._process(newPattern.concat(remain), index, inGlobStar)\n }\n}\n\n\nGlobSync.prototype._emitMatch = function (index, e) {\n if (isIgnored(this, e))\n return\n\n var abs = this._makeAbs(e)\n\n if (this.mark)\n e = this._mark(e)\n\n if (this.absolute) {\n e = abs\n }\n\n if (this.matches[index][e])\n return\n\n if (this.nodir) {\n var c = this.cache[abs]\n if (c === 'DIR' || Array.isArray(c))\n return\n }\n\n this.matches[index][e] = true\n\n if (this.stat)\n this._stat(e)\n}\n\n\nGlobSync.prototype._readdirInGlobStar = function (abs) {\n // follow all symlinked directories forever\n // just proceed as if this is a non-globstar situation\n if (this.follow)\n return this._readdir(abs, false)\n\n var entries\n var lstat\n var stat\n try {\n lstat = fs.lstatSync(abs)\n } catch (er) {\n if (er.code === 'ENOENT') {\n // lstat failed, doesn't exist\n return null\n }\n }\n\n var isSym = lstat && lstat.isSymbolicLink()\n this.symlinks[abs] = isSym\n\n // If it's not a symlink or a dir, then it's definitely a regular file.\n // don't bother doing a readdir in that case.\n if (!isSym && lstat && !lstat.isDirectory())\n this.cache[abs] = 'FILE'\n else\n entries = this._readdir(abs, false)\n\n return entries\n}\n\nGlobSync.prototype._readdir = function (abs, inGlobStar) {\n var entries\n\n if (inGlobStar && !ownProp(this.symlinks, abs))\n return this._readdirInGlobStar(abs)\n\n if (ownProp(this.cache, abs)) {\n var c = this.cache[abs]\n if (!c || c === 'FILE')\n return null\n\n if (Array.isArray(c))\n return c\n }\n\n try {\n return this._readdirEntries(abs, fs.readdirSync(abs))\n } catch (er) {\n this._readdirError(abs, er)\n return null\n }\n}\n\nGlobSync.prototype._readdirEntries = function (abs, entries) {\n // if we haven't asked to stat everything, then just\n // assume that everything in there exists, so we can avoid\n // having to stat it a second time.\n if (!this.mark && !this.stat) {\n for (var i = 0; i < entries.length; i ++) {\n var e = entries[i]\n if (abs === '/')\n e = abs + e\n else\n e = abs + '/' + e\n this.cache[e] = true\n }\n }\n\n this.cache[abs] = entries\n\n // mark and cache dir-ness\n return entries\n}\n\nGlobSync.prototype._readdirError = function (f, er) {\n // handle errors, and cache the information\n switch (er.code) {\n case 'ENOTSUP': // https://github.com/isaacs/node-glob/issues/205\n case 'ENOTDIR': // totally normal. means it *does* exist.\n var abs = this._makeAbs(f)\n this.cache[abs] = 'FILE'\n if (abs === this.cwdAbs) {\n var error = new Error(er.code + ' invalid cwd ' + this.cwd)\n error.path = this.cwd\n error.code = er.code\n throw error\n }\n break\n\n case 'ENOENT': // not terribly unusual\n case 'ELOOP':\n case 'ENAMETOOLONG':\n case 'UNKNOWN':\n this.cache[this._makeAbs(f)] = false\n break\n\n default: // some unusual error. Treat as failure.\n this.cache[this._makeAbs(f)] = false\n if (this.strict)\n throw er\n if (!this.silent)\n console.error('glob error', er)\n break\n }\n}\n\nGlobSync.prototype._processGlobStar = function (prefix, read, abs, remain, index, inGlobStar) {\n\n var entries = this._readdir(abs, inGlobStar)\n\n // no entries means not a dir, so it can never have matches\n // foo.txt/** doesn't match foo.txt\n if (!entries)\n return\n\n // test without the globstar, and with every child both below\n // and replacing the globstar.\n var remainWithoutGlobStar = remain.slice(1)\n var gspref = prefix ? [ prefix ] : []\n var noGlobStar = gspref.concat(remainWithoutGlobStar)\n\n // the noGlobStar pattern exits the inGlobStar state\n this._process(noGlobStar, index, false)\n\n var len = entries.length\n var isSym = this.symlinks[abs]\n\n // If it's a symlink, and we're in a globstar, then stop\n if (isSym && inGlobStar)\n return\n\n for (var i = 0; i < len; i++) {\n var e = entries[i]\n if (e.charAt(0) === '.' && !this.dot)\n continue\n\n // these two cases enter the inGlobStar state\n var instead = gspref.concat(entries[i], remainWithoutGlobStar)\n this._process(instead, index, true)\n\n var below = gspref.concat(entries[i], remain)\n this._process(below, index, true)\n }\n}\n\nGlobSync.prototype._processSimple = function (prefix, index) {\n // XXX review this. Shouldn't it be doing the mounting etc\n // before doing stat? kinda weird?\n var exists = this._stat(prefix)\n\n if (!this.matches[index])\n this.matches[index] = Object.create(null)\n\n // If it doesn't exist, then just mark the lack of results\n if (!exists)\n return\n\n if (prefix && isAbsolute(prefix) && !this.nomount) {\n var trail = /[\\/\\\\]$/.test(prefix)\n if (prefix.charAt(0) === '/') {\n prefix = path.join(this.root, prefix)\n } else {\n prefix = path.resolve(this.root, prefix)\n if (trail)\n prefix += '/'\n }\n }\n\n if (process.platform === 'win32')\n prefix = prefix.replace(/\\\\/g, '/')\n\n // Mark this as a match\n this._emitMatch(index, prefix)\n}\n\n// Returns either 'DIR', 'FILE', or false\nGlobSync.prototype._stat = function (f) {\n var abs = this._makeAbs(f)\n var needDir = f.slice(-1) === '/'\n\n if (f.length > this.maxLength)\n return false\n\n if (!this.stat && ownProp(this.cache, abs)) {\n var c = this.cache[abs]\n\n if (Array.isArray(c))\n c = 'DIR'\n\n // It exists, but maybe not how we need it\n if (!needDir || c === 'DIR')\n return c\n\n if (needDir && c === 'FILE')\n return false\n\n // otherwise we have to stat, because maybe c=true\n // if we know it exists, but not what it is.\n }\n\n var exists\n var stat = this.statCache[abs]\n if (!stat) {\n var lstat\n try {\n lstat = fs.lstatSync(abs)\n } catch (er) {\n if (er && (er.code === 'ENOENT' || er.code === 'ENOTDIR')) {\n this.statCache[abs] = false\n return false\n }\n }\n\n if (lstat && lstat.isSymbolicLink()) {\n try {\n stat = fs.statSync(abs)\n } catch (er) {\n stat = lstat\n }\n } else {\n stat = lstat\n }\n }\n\n this.statCache[abs] = stat\n\n var c = true\n if (stat)\n c = stat.isDirectory() ? 'DIR' : 'FILE'\n\n this.cache[abs] = this.cache[abs] || c\n\n if (needDir && c === 'FILE')\n return false\n\n return c\n}\n\nGlobSync.prototype._mark = function (p) {\n return common.mark(this, p)\n}\n\nGlobSync.prototype._makeAbs = function (f) {\n return common.makeAbs(this, f)\n}\n","var wrappy = require('wrappy')\nvar reqs = Object.create(null)\nvar once = require('once')\n\nmodule.exports = wrappy(inflight)\n\nfunction inflight (key, cb) {\n if (reqs[key]) {\n reqs[key].push(cb)\n return null\n } else {\n reqs[key] = [cb]\n return makeres(key)\n }\n}\n\nfunction makeres (key) {\n return once(function RES () {\n var cbs = reqs[key]\n var len = cbs.length\n var args = slice(arguments)\n\n // XXX It's somewhat ambiguous whether a new callback added in this\n // pass should be queued for later execution if something in the\n // list of callbacks throws, or if it should just be discarded.\n // However, it's such an edge case that it hardly matters, and either\n // choice is likely as surprising as the other.\n // As it happens, we do go ahead and schedule it for later execution.\n try {\n for (var i = 0; i < len; i++) {\n cbs[i].apply(null, args)\n }\n } finally {\n if (cbs.length > len) {\n // added more in the interim.\n // de-zalgo, just in case, but don't call again.\n cbs.splice(0, len)\n process.nextTick(function () {\n RES.apply(null, args)\n })\n } else {\n delete reqs[key]\n }\n }\n })\n}\n\nfunction slice (args) {\n var length = args.length\n var array = []\n\n for (var i = 0; i < length; i++) array[i] = args[i]\n return array\n}\n","try {\n var util = require('util');\n /* istanbul ignore next */\n if (typeof util.inherits !== 'function') throw '';\n module.exports = util.inherits;\n} catch (e) {\n /* istanbul ignore next */\n module.exports = require('./inherits_browser.js');\n}\n","if (typeof Object.create === 'function') {\n // implementation from standard node.js 'util' module\n module.exports = function inherits(ctor, superCtor) {\n if (superCtor) {\n ctor.super_ = superCtor\n ctor.prototype = Object.create(superCtor.prototype, {\n constructor: {\n value: ctor,\n enumerable: false,\n writable: true,\n configurable: true\n }\n })\n }\n };\n} else {\n // old school shim for old browsers\n module.exports = function inherits(ctor, superCtor) {\n if (superCtor) {\n ctor.super_ = superCtor\n var TempCtor = function () {}\n TempCtor.prototype = superCtor.prototype\n ctor.prototype = new TempCtor()\n ctor.prototype.constructor = ctor\n }\n }\n}\n","/**\n * @license\n * Lodash \n * Copyright OpenJS Foundation and other contributors \n * Released under MIT license \n * Based on Underscore.js 1.8.3 \n * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors\n */\n;(function() {\n\n /** Used as a safe reference for `undefined` in pre-ES5 environments. */\n var undefined;\n\n /** Used as the semantic version number. */\n var VERSION = '4.17.21';\n\n /** Used as the size to enable large array optimizations. */\n var LARGE_ARRAY_SIZE = 200;\n\n /** Error message constants. */\n var CORE_ERROR_TEXT = 'Unsupported core-js use. Try https://npms.io/search?q=ponyfill.',\n FUNC_ERROR_TEXT = 'Expected a function',\n INVALID_TEMPL_VAR_ERROR_TEXT = 'Invalid `variable` option passed into `_.template`';\n\n /** Used to stand-in for `undefined` hash values. */\n var HASH_UNDEFINED = '__lodash_hash_undefined__';\n\n /** Used as the maximum memoize cache size. */\n var MAX_MEMOIZE_SIZE = 500;\n\n /** Used as the internal argument placeholder. */\n var PLACEHOLDER = '__lodash_placeholder__';\n\n /** Used to compose bitmasks for cloning. */\n var CLONE_DEEP_FLAG = 1,\n CLONE_FLAT_FLAG = 2,\n CLONE_SYMBOLS_FLAG = 4;\n\n /** Used to compose bitmasks for value comparisons. */\n var COMPARE_PARTIAL_FLAG = 1,\n COMPARE_UNORDERED_FLAG = 2;\n\n /** Used to compose bitmasks for function metadata. */\n var WRAP_BIND_FLAG = 1,\n WRAP_BIND_KEY_FLAG = 2,\n WRAP_CURRY_BOUND_FLAG = 4,\n WRAP_CURRY_FLAG = 8,\n WRAP_CURRY_RIGHT_FLAG = 16,\n WRAP_PARTIAL_FLAG = 32,\n WRAP_PARTIAL_RIGHT_FLAG = 64,\n WRAP_ARY_FLAG = 128,\n WRAP_REARG_FLAG = 256,\n WRAP_FLIP_FLAG = 512;\n\n /** Used as default options for `_.truncate`. */\n var DEFAULT_TRUNC_LENGTH = 30,\n DEFAULT_TRUNC_OMISSION = '...';\n\n /** Used to detect hot functions by number of calls within a span of milliseconds. */\n var HOT_COUNT = 800,\n HOT_SPAN = 16;\n\n /** Used to indicate the type of lazy iteratees. */\n var LAZY_FILTER_FLAG = 1,\n LAZY_MAP_FLAG = 2,\n LAZY_WHILE_FLAG = 3;\n\n /** Used as references for various `Number` constants. */\n var INFINITY = 1 / 0,\n MAX_SAFE_INTEGER = 9007199254740991,\n MAX_INTEGER = 1.7976931348623157e+308,\n NAN = 0 / 0;\n\n /** Used as references for the maximum length and index of an array. */\n var MAX_ARRAY_LENGTH = 4294967295,\n MAX_ARRAY_INDEX = MAX_ARRAY_LENGTH - 1,\n HALF_MAX_ARRAY_LENGTH = MAX_ARRAY_LENGTH >>> 1;\n\n /** Used to associate wrap methods with their bit flags. */\n var wrapFlags = [\n ['ary', WRAP_ARY_FLAG],\n ['bind', WRAP_BIND_FLAG],\n ['bindKey', WRAP_BIND_KEY_FLAG],\n ['curry', WRAP_CURRY_FLAG],\n ['curryRight', WRAP_CURRY_RIGHT_FLAG],\n ['flip', WRAP_FLIP_FLAG],\n ['partial', WRAP_PARTIAL_FLAG],\n ['partialRight', WRAP_PARTIAL_RIGHT_FLAG],\n ['rearg', WRAP_REARG_FLAG]\n ];\n\n /** `Object#toString` result references. */\n var argsTag = '[object Arguments]',\n arrayTag = '[object Array]',\n asyncTag = '[object AsyncFunction]',\n boolTag = '[object Boolean]',\n dateTag = '[object Date]',\n domExcTag = '[object DOMException]',\n errorTag = '[object Error]',\n funcTag = '[object Function]',\n genTag = '[object GeneratorFunction]',\n mapTag = '[object Map]',\n numberTag = '[object Number]',\n nullTag = '[object Null]',\n objectTag = '[object Object]',\n promiseTag = '[object Promise]',\n proxyTag = '[object Proxy]',\n regexpTag = '[object RegExp]',\n setTag = '[object Set]',\n stringTag = '[object String]',\n symbolTag = '[object Symbol]',\n undefinedTag = '[object Undefined]',\n weakMapTag = '[object WeakMap]',\n weakSetTag = '[object WeakSet]';\n\n var arrayBufferTag = '[object ArrayBuffer]',\n dataViewTag = '[object DataView]',\n float32Tag = '[object Float32Array]',\n float64Tag = '[object Float64Array]',\n int8Tag = '[object Int8Array]',\n int16Tag = '[object Int16Array]',\n int32Tag = '[object Int32Array]',\n uint8Tag = '[object Uint8Array]',\n uint8ClampedTag = '[object Uint8ClampedArray]',\n uint16Tag = '[object Uint16Array]',\n uint32Tag = '[object Uint32Array]';\n\n /** Used to match empty string literals in compiled template source. */\n var reEmptyStringLeading = /\\b__p \\+= '';/g,\n reEmptyStringMiddle = /\\b(__p \\+=) '' \\+/g,\n reEmptyStringTrailing = /(__e\\(.*?\\)|\\b__t\\)) \\+\\n'';/g;\n\n /** Used to match HTML entities and HTML characters. */\n var reEscapedHtml = /&(?:amp|lt|gt|quot|#39);/g,\n reUnescapedHtml = /[&<>\"']/g,\n reHasEscapedHtml = RegExp(reEscapedHtml.source),\n reHasUnescapedHtml = RegExp(reUnescapedHtml.source);\n\n /** Used to match template delimiters. */\n var reEscape = /<%-([\\s\\S]+?)%>/g,\n reEvaluate = /<%([\\s\\S]+?)%>/g,\n reInterpolate = /<%=([\\s\\S]+?)%>/g;\n\n /** Used to match property names within property paths. */\n var reIsDeepProp = /\\.|\\[(?:[^[\\]]*|([\"'])(?:(?!\\1)[^\\\\]|\\\\.)*?\\1)\\]/,\n reIsPlainProp = /^\\w*$/,\n rePropName = /[^.[\\]]+|\\[(?:(-?\\d+(?:\\.\\d+)?)|([\"'])((?:(?!\\2)[^\\\\]|\\\\.)*?)\\2)\\]|(?=(?:\\.|\\[\\])(?:\\.|\\[\\]|$))/g;\n\n /**\n * Used to match `RegExp`\n * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).\n */\n var reRegExpChar = /[\\\\^$.*+?()[\\]{}|]/g,\n reHasRegExpChar = RegExp(reRegExpChar.source);\n\n /** Used to match leading whitespace. */\n var reTrimStart = /^\\s+/;\n\n /** Used to match a single whitespace character. */\n var reWhitespace = /\\s/;\n\n /** Used to match wrap detail comments. */\n var reWrapComment = /\\{(?:\\n\\/\\* \\[wrapped with .+\\] \\*\\/)?\\n?/,\n reWrapDetails = /\\{\\n\\/\\* \\[wrapped with (.+)\\] \\*/,\n reSplitDetails = /,? & /;\n\n /** Used to match words composed of alphanumeric characters. */\n var reAsciiWord = /[^\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\x7f]+/g;\n\n /**\n * Used to validate the `validate` option in `_.template` variable.\n *\n * Forbids characters which could potentially change the meaning of the function argument definition:\n * - \"(),\" (modification of function parameters)\n * - \"=\" (default value)\n * - \"[]{}\" (destructuring of function parameters)\n * - \"/\" (beginning of a comment)\n * - whitespace\n */\n var reForbiddenIdentifierChars = /[()=,{}\\[\\]\\/\\s]/;\n\n /** Used to match backslashes in property paths. */\n var reEscapeChar = /\\\\(\\\\)?/g;\n\n /**\n * Used to match\n * [ES template delimiters](http://ecma-international.org/ecma-262/7.0/#sec-template-literal-lexical-components).\n */\n var reEsTemplate = /\\$\\{([^\\\\}]*(?:\\\\.[^\\\\}]*)*)\\}/g;\n\n /** Used to match `RegExp` flags from their coerced string values. */\n var reFlags = /\\w*$/;\n\n /** Used to detect bad signed hexadecimal string values. */\n var reIsBadHex = /^[-+]0x[0-9a-f]+$/i;\n\n /** Used to detect binary string values. */\n var reIsBinary = /^0b[01]+$/i;\n\n /** Used to detect host constructors (Safari). */\n var reIsHostCtor = /^\\[object .+?Constructor\\]$/;\n\n /** Used to detect octal string values. */\n var reIsOctal = /^0o[0-7]+$/i;\n\n /** Used to detect unsigned integer values. */\n var reIsUint = /^(?:0|[1-9]\\d*)$/;\n\n /** Used to match Latin Unicode letters (excluding mathematical operators). */\n var reLatin = /[\\xc0-\\xd6\\xd8-\\xf6\\xf8-\\xff\\u0100-\\u017f]/g;\n\n /** Used to ensure capturing order of template delimiters. */\n var reNoMatch = /($^)/;\n\n /** Used to match unescaped characters in compiled string literals. */\n var reUnescapedString = /['\\n\\r\\u2028\\u2029\\\\]/g;\n\n /** Used to compose unicode character classes. */\n var rsAstralRange = '\\\\ud800-\\\\udfff',\n rsComboMarksRange = '\\\\u0300-\\\\u036f',\n reComboHalfMarksRange = '\\\\ufe20-\\\\ufe2f',\n rsComboSymbolsRange = '\\\\u20d0-\\\\u20ff',\n rsComboRange = rsComboMarksRange + reComboHalfMarksRange + rsComboSymbolsRange,\n rsDingbatRange = '\\\\u2700-\\\\u27bf',\n rsLowerRange = 'a-z\\\\xdf-\\\\xf6\\\\xf8-\\\\xff',\n rsMathOpRange = '\\\\xac\\\\xb1\\\\xd7\\\\xf7',\n rsNonCharRange = '\\\\x00-\\\\x2f\\\\x3a-\\\\x40\\\\x5b-\\\\x60\\\\x7b-\\\\xbf',\n rsPunctuationRange = '\\\\u2000-\\\\u206f',\n rsSpaceRange = ' \\\\t\\\\x0b\\\\f\\\\xa0\\\\ufeff\\\\n\\\\r\\\\u2028\\\\u2029\\\\u1680\\\\u180e\\\\u2000\\\\u2001\\\\u2002\\\\u2003\\\\u2004\\\\u2005\\\\u2006\\\\u2007\\\\u2008\\\\u2009\\\\u200a\\\\u202f\\\\u205f\\\\u3000',\n rsUpperRange = 'A-Z\\\\xc0-\\\\xd6\\\\xd8-\\\\xde',\n rsVarRange = '\\\\ufe0e\\\\ufe0f',\n rsBreakRange = rsMathOpRange + rsNonCharRange + rsPunctuationRange + rsSpaceRange;\n\n /** Used to compose unicode capture groups. */\n var rsApos = \"['\\u2019]\",\n rsAstral = '[' + rsAstralRange + ']',\n rsBreak = '[' + rsBreakRange + ']',\n rsCombo = '[' + rsComboRange + ']',\n rsDigits = '\\\\d+',\n rsDingbat = '[' + rsDingbatRange + ']',\n rsLower = '[' + rsLowerRange + ']',\n rsMisc = '[^' + rsAstralRange + rsBreakRange + rsDigits + rsDingbatRange + rsLowerRange + rsUpperRange + ']',\n rsFitz = '\\\\ud83c[\\\\udffb-\\\\udfff]',\n rsModifier = '(?:' + rsCombo + '|' + rsFitz + ')',\n rsNonAstral = '[^' + rsAstralRange + ']',\n rsRegional = '(?:\\\\ud83c[\\\\udde6-\\\\uddff]){2}',\n rsSurrPair = '[\\\\ud800-\\\\udbff][\\\\udc00-\\\\udfff]',\n rsUpper = '[' + rsUpperRange + ']',\n rsZWJ = '\\\\u200d';\n\n /** Used to compose unicode regexes. */\n var rsMiscLower = '(?:' + rsLower + '|' + rsMisc + ')',\n rsMiscUpper = '(?:' + rsUpper + '|' + rsMisc + ')',\n rsOptContrLower = '(?:' + rsApos + '(?:d|ll|m|re|s|t|ve))?',\n rsOptContrUpper = '(?:' + rsApos + '(?:D|LL|M|RE|S|T|VE))?',\n reOptMod = rsModifier + '?',\n rsOptVar = '[' + rsVarRange + ']?',\n rsOptJoin = '(?:' + rsZWJ + '(?:' + [rsNonAstral, rsRegional, rsSurrPair].join('|') + ')' + rsOptVar + reOptMod + ')*',\n rsOrdLower = '\\\\d*(?:1st|2nd|3rd|(?![123])\\\\dth)(?=\\\\b|[A-Z_])',\n rsOrdUpper = '\\\\d*(?:1ST|2ND|3RD|(?![123])\\\\dTH)(?=\\\\b|[a-z_])',\n rsSeq = rsOptVar + reOptMod + rsOptJoin,\n rsEmoji = '(?:' + [rsDingbat, rsRegional, rsSurrPair].join('|') + ')' + rsSeq,\n rsSymbol = '(?:' + [rsNonAstral + rsCombo + '?', rsCombo, rsRegional, rsSurrPair, rsAstral].join('|') + ')';\n\n /** Used to match apostrophes. */\n var reApos = RegExp(rsApos, 'g');\n\n /**\n * Used to match [combining diacritical marks](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks) and\n * [combining diacritical marks for symbols](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks_for_Symbols).\n */\n var reComboMark = RegExp(rsCombo, 'g');\n\n /** Used to match [string symbols](https://mathiasbynens.be/notes/javascript-unicode). */\n var reUnicode = RegExp(rsFitz + '(?=' + rsFitz + ')|' + rsSymbol + rsSeq, 'g');\n\n /** Used to match complex or compound words. */\n var reUnicodeWord = RegExp([\n rsUpper + '?' + rsLower + '+' + rsOptContrLower + '(?=' + [rsBreak, rsUpper, '$'].join('|') + ')',\n rsMiscUpper + '+' + rsOptContrUpper + '(?=' + [rsBreak, rsUpper + rsMiscLower, '$'].join('|') + ')',\n rsUpper + '?' + rsMiscLower + '+' + rsOptContrLower,\n rsUpper + '+' + rsOptContrUpper,\n rsOrdUpper,\n rsOrdLower,\n rsDigits,\n rsEmoji\n ].join('|'), 'g');\n\n /** Used to detect strings with [zero-width joiners or code points from the astral planes](http://eev.ee/blog/2015/09/12/dark-corners-of-unicode/). */\n var reHasUnicode = RegExp('[' + rsZWJ + rsAstralRange + rsComboRange + rsVarRange + ']');\n\n /** Used to detect strings that need a more robust regexp to match words. */\n var reHasUnicodeWord = /[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;\n\n /** Used to assign default `context` object properties. */\n var contextProps = [\n 'Array', 'Buffer', 'DataView', 'Date', 'Error', 'Float32Array', 'Float64Array',\n 'Function', 'Int8Array', 'Int16Array', 'Int32Array', 'Map', 'Math', 'Object',\n 'Promise', 'RegExp', 'Set', 'String', 'Symbol', 'TypeError', 'Uint8Array',\n 'Uint8ClampedArray', 'Uint16Array', 'Uint32Array', 'WeakMap',\n '_', 'clearTimeout', 'isFinite', 'parseInt', 'setTimeout'\n ];\n\n /** Used to make template sourceURLs easier to identify. */\n var templateCounter = -1;\n\n /** Used to identify `toStringTag` values of typed arrays. */\n var typedArrayTags = {};\n typedArrayTags[float32Tag] = typedArrayTags[float64Tag] =\n typedArrayTags[int8Tag] = typedArrayTags[int16Tag] =\n typedArrayTags[int32Tag] = typedArrayTags[uint8Tag] =\n typedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] =\n typedArrayTags[uint32Tag] = true;\n typedArrayTags[argsTag] = typedArrayTags[arrayTag] =\n typedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] =\n typedArrayTags[dataViewTag] = typedArrayTags[dateTag] =\n typedArrayTags[errorTag] = typedArrayTags[funcTag] =\n typedArrayTags[mapTag] = typedArrayTags[numberTag] =\n typedArrayTags[objectTag] = typedArrayTags[regexpTag] =\n typedArrayTags[setTag] = typedArrayTags[stringTag] =\n typedArrayTags[weakMapTag] = false;\n\n /** Used to identify `toStringTag` values supported by `_.clone`. */\n var cloneableTags = {};\n cloneableTags[argsTag] = cloneableTags[arrayTag] =\n cloneableTags[arrayBufferTag] = cloneableTags[dataViewTag] =\n cloneableTags[boolTag] = cloneableTags[dateTag] =\n cloneableTags[float32Tag] = cloneableTags[float64Tag] =\n cloneableTags[int8Tag] = cloneableTags[int16Tag] =\n cloneableTags[int32Tag] = cloneableTags[mapTag] =\n cloneableTags[numberTag] = cloneableTags[objectTag] =\n cloneableTags[regexpTag] = cloneableTags[setTag] =\n cloneableTags[stringTag] = cloneableTags[symbolTag] =\n cloneableTags[uint8Tag] = cloneableTags[uint8ClampedTag] =\n cloneableTags[uint16Tag] = cloneableTags[uint32Tag] = true;\n cloneableTags[errorTag] = cloneableTags[funcTag] =\n cloneableTags[weakMapTag] = false;\n\n /** Used to map Latin Unicode letters to basic Latin letters. */\n var deburredLetters = {\n // Latin-1 Supplement block.\n '\\xc0': 'A', '\\xc1': 'A', '\\xc2': 'A', '\\xc3': 'A', '\\xc4': 'A', '\\xc5': 'A',\n '\\xe0': 'a', '\\xe1': 'a', '\\xe2': 'a', '\\xe3': 'a', '\\xe4': 'a', '\\xe5': 'a',\n '\\xc7': 'C', '\\xe7': 'c',\n '\\xd0': 'D', '\\xf0': 'd',\n '\\xc8': 'E', '\\xc9': 'E', '\\xca': 'E', '\\xcb': 'E',\n '\\xe8': 'e', '\\xe9': 'e', '\\xea': 'e', '\\xeb': 'e',\n '\\xcc': 'I', '\\xcd': 'I', '\\xce': 'I', '\\xcf': 'I',\n '\\xec': 'i', '\\xed': 'i', '\\xee': 'i', '\\xef': 'i',\n '\\xd1': 'N', '\\xf1': 'n',\n '\\xd2': 'O', '\\xd3': 'O', '\\xd4': 'O', '\\xd5': 'O', '\\xd6': 'O', '\\xd8': 'O',\n '\\xf2': 'o', '\\xf3': 'o', '\\xf4': 'o', '\\xf5': 'o', '\\xf6': 'o', '\\xf8': 'o',\n '\\xd9': 'U', '\\xda': 'U', '\\xdb': 'U', '\\xdc': 'U',\n '\\xf9': 'u', '\\xfa': 'u', '\\xfb': 'u', '\\xfc': 'u',\n '\\xdd': 'Y', '\\xfd': 'y', '\\xff': 'y',\n '\\xc6': 'Ae', '\\xe6': 'ae',\n '\\xde': 'Th', '\\xfe': 'th',\n '\\xdf': 'ss',\n // Latin Extended-A block.\n '\\u0100': 'A', '\\u0102': 'A', '\\u0104': 'A',\n '\\u0101': 'a', '\\u0103': 'a', '\\u0105': 'a',\n '\\u0106': 'C', '\\u0108': 'C', '\\u010a': 'C', '\\u010c': 'C',\n '\\u0107': 'c', '\\u0109': 'c', '\\u010b': 'c', '\\u010d': 'c',\n '\\u010e': 'D', '\\u0110': 'D', '\\u010f': 'd', '\\u0111': 'd',\n '\\u0112': 'E', '\\u0114': 'E', '\\u0116': 'E', '\\u0118': 'E', '\\u011a': 'E',\n '\\u0113': 'e', '\\u0115': 'e', '\\u0117': 'e', '\\u0119': 'e', '\\u011b': 'e',\n '\\u011c': 'G', '\\u011e': 'G', '\\u0120': 'G', '\\u0122': 'G',\n '\\u011d': 'g', '\\u011f': 'g', '\\u0121': 'g', '\\u0123': 'g',\n '\\u0124': 'H', '\\u0126': 'H', '\\u0125': 'h', '\\u0127': 'h',\n '\\u0128': 'I', '\\u012a': 'I', '\\u012c': 'I', '\\u012e': 'I', '\\u0130': 'I',\n '\\u0129': 'i', '\\u012b': 'i', '\\u012d': 'i', '\\u012f': 'i', '\\u0131': 'i',\n '\\u0134': 'J', '\\u0135': 'j',\n '\\u0136': 'K', '\\u0137': 'k', '\\u0138': 'k',\n '\\u0139': 'L', '\\u013b': 'L', '\\u013d': 'L', '\\u013f': 'L', '\\u0141': 'L',\n '\\u013a': 'l', '\\u013c': 'l', '\\u013e': 'l', '\\u0140': 'l', '\\u0142': 'l',\n '\\u0143': 'N', '\\u0145': 'N', '\\u0147': 'N', '\\u014a': 'N',\n '\\u0144': 'n', '\\u0146': 'n', '\\u0148': 'n', '\\u014b': 'n',\n '\\u014c': 'O', '\\u014e': 'O', '\\u0150': 'O',\n '\\u014d': 'o', '\\u014f': 'o', '\\u0151': 'o',\n '\\u0154': 'R', '\\u0156': 'R', '\\u0158': 'R',\n '\\u0155': 'r', '\\u0157': 'r', '\\u0159': 'r',\n '\\u015a': 'S', '\\u015c': 'S', '\\u015e': 'S', '\\u0160': 'S',\n '\\u015b': 's', '\\u015d': 's', '\\u015f': 's', '\\u0161': 's',\n '\\u0162': 'T', '\\u0164': 'T', '\\u0166': 'T',\n '\\u0163': 't', '\\u0165': 't', '\\u0167': 't',\n '\\u0168': 'U', '\\u016a': 'U', '\\u016c': 'U', '\\u016e': 'U', '\\u0170': 'U', '\\u0172': 'U',\n '\\u0169': 'u', '\\u016b': 'u', '\\u016d': 'u', '\\u016f': 'u', '\\u0171': 'u', '\\u0173': 'u',\n '\\u0174': 'W', '\\u0175': 'w',\n '\\u0176': 'Y', '\\u0177': 'y', '\\u0178': 'Y',\n '\\u0179': 'Z', '\\u017b': 'Z', '\\u017d': 'Z',\n '\\u017a': 'z', '\\u017c': 'z', '\\u017e': 'z',\n '\\u0132': 'IJ', '\\u0133': 'ij',\n '\\u0152': 'Oe', '\\u0153': 'oe',\n '\\u0149': \"'n\", '\\u017f': 's'\n };\n\n /** Used to map characters to HTML entities. */\n var htmlEscapes = {\n '&': '&',\n '<': '<',\n '>': '>',\n '\"': '"',\n \"'\": '''\n };\n\n /** Used to map HTML entities to characters. */\n var htmlUnescapes = {\n '&': '&',\n '<': '<',\n '>': '>',\n '"': '\"',\n ''': \"'\"\n };\n\n /** Used to escape characters for inclusion in compiled string literals. */\n var stringEscapes = {\n '\\\\': '\\\\',\n \"'\": \"'\",\n '\\n': 'n',\n '\\r': 'r',\n '\\u2028': 'u2028',\n '\\u2029': 'u2029'\n };\n\n /** Built-in method references without a dependency on `root`. */\n var freeParseFloat = parseFloat,\n freeParseInt = parseInt;\n\n /** Detect free variable `global` from Node.js. */\n var freeGlobal = typeof global == 'object' && global && global.Object === Object && global;\n\n /** Detect free variable `self`. */\n var freeSelf = typeof self == 'object' && self && self.Object === Object && self;\n\n /** Used as a reference to the global object. */\n var root = freeGlobal || freeSelf || Function('return this')();\n\n /** Detect free variable `exports`. */\n var freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;\n\n /** Detect free variable `module`. */\n var freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;\n\n /** Detect the popular CommonJS extension `module.exports`. */\n var moduleExports = freeModule && freeModule.exports === freeExports;\n\n /** Detect free variable `process` from Node.js. */\n var freeProcess = moduleExports && freeGlobal.process;\n\n /** Used to access faster Node.js helpers. */\n var nodeUtil = (function() {\n try {\n // Use `util.types` for Node.js 10+.\n var types = freeModule && freeModule.require && freeModule.require('util').types;\n\n if (types) {\n return types;\n }\n\n // Legacy `process.binding('util')` for Node.js < 10.\n return freeProcess && freeProcess.binding && freeProcess.binding('util');\n } catch (e) {}\n }());\n\n /* Node.js helper references. */\n var nodeIsArrayBuffer = nodeUtil && nodeUtil.isArrayBuffer,\n nodeIsDate = nodeUtil && nodeUtil.isDate,\n nodeIsMap = nodeUtil && nodeUtil.isMap,\n nodeIsRegExp = nodeUtil && nodeUtil.isRegExp,\n nodeIsSet = nodeUtil && nodeUtil.isSet,\n nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray;\n\n /*--------------------------------------------------------------------------*/\n\n /**\n * A faster alternative to `Function#apply`, this function invokes `func`\n * with the `this` binding of `thisArg` and the arguments of `args`.\n *\n * @private\n * @param {Function} func The function to invoke.\n * @param {*} thisArg The `this` binding of `func`.\n * @param {Array} args The arguments to invoke `func` with.\n * @returns {*} Returns the result of `func`.\n */\n function apply(func, thisArg, args) {\n switch (args.length) {\n case 0: return func.call(thisArg);\n case 1: return func.call(thisArg, args[0]);\n case 2: return func.call(thisArg, args[0], args[1]);\n case 3: return func.call(thisArg, args[0], args[1], args[2]);\n }\n return func.apply(thisArg, args);\n }\n\n /**\n * A specialized version of `baseAggregator` for arrays.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} setter The function to set `accumulator` values.\n * @param {Function} iteratee The iteratee to transform keys.\n * @param {Object} accumulator The initial aggregated object.\n * @returns {Function} Returns `accumulator`.\n */\n function arrayAggregator(array, setter, iteratee, accumulator) {\n var index = -1,\n length = array == null ? 0 : array.length;\n\n while (++index < length) {\n var value = array[index];\n setter(accumulator, value, iteratee(value), array);\n }\n return accumulator;\n }\n\n /**\n * A specialized version of `_.forEach` for arrays without support for\n * iteratee shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array} Returns `array`.\n */\n function arrayEach(array, iteratee) {\n var index = -1,\n length = array == null ? 0 : array.length;\n\n while (++index < length) {\n if (iteratee(array[index], index, array) === false) {\n break;\n }\n }\n return array;\n }\n\n /**\n * A specialized version of `_.forEachRight` for arrays without support for\n * iteratee shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array} Returns `array`.\n */\n function arrayEachRight(array, iteratee) {\n var length = array == null ? 0 : array.length;\n\n while (length--) {\n if (iteratee(array[length], length, array) === false) {\n break;\n }\n }\n return array;\n }\n\n /**\n * A specialized version of `_.every` for arrays without support for\n * iteratee shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} predicate The function invoked per iteration.\n * @returns {boolean} Returns `true` if all elements pass the predicate check,\n * else `false`.\n */\n function arrayEvery(array, predicate) {\n var index = -1,\n length = array == null ? 0 : array.length;\n\n while (++index < length) {\n if (!predicate(array[index], index, array)) {\n return false;\n }\n }\n return true;\n }\n\n /**\n * A specialized version of `_.filter` for arrays without support for\n * iteratee shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} predicate The function invoked per iteration.\n * @returns {Array} Returns the new filtered array.\n */\n function arrayFilter(array, predicate) {\n var index = -1,\n length = array == null ? 0 : array.length,\n resIndex = 0,\n result = [];\n\n while (++index < length) {\n var value = array[index];\n if (predicate(value, index, array)) {\n result[resIndex++] = value;\n }\n }\n return result;\n }\n\n /**\n * A specialized version of `_.includes` for arrays without support for\n * specifying an index to search from.\n *\n * @private\n * @param {Array} [array] The array to inspect.\n * @param {*} target The value to search for.\n * @returns {boolean} Returns `true` if `target` is found, else `false`.\n */\n function arrayIncludes(array, value) {\n var length = array == null ? 0 : array.length;\n return !!length && baseIndexOf(array, value, 0) > -1;\n }\n\n /**\n * This function is like `arrayIncludes` except that it accepts a comparator.\n *\n * @private\n * @param {Array} [array] The array to inspect.\n * @param {*} target The value to search for.\n * @param {Function} comparator The comparator invoked per element.\n * @returns {boolean} Returns `true` if `target` is found, else `false`.\n */\n function arrayIncludesWith(array, value, comparator) {\n var index = -1,\n length = array == null ? 0 : array.length;\n\n while (++index < length) {\n if (comparator(value, array[index])) {\n return true;\n }\n }\n return false;\n }\n\n /**\n * A specialized version of `_.map` for arrays without support for iteratee\n * shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array} Returns the new mapped array.\n */\n function arrayMap(array, iteratee) {\n var index = -1,\n length = array == null ? 0 : array.length,\n result = Array(length);\n\n while (++index < length) {\n result[index] = iteratee(array[index], index, array);\n }\n return result;\n }\n\n /**\n * Appends the elements of `values` to `array`.\n *\n * @private\n * @param {Array} array The array to modify.\n * @param {Array} values The values to append.\n * @returns {Array} Returns `array`.\n */\n function arrayPush(array, values) {\n var index = -1,\n length = values.length,\n offset = array.length;\n\n while (++index < length) {\n array[offset + index] = values[index];\n }\n return array;\n }\n\n /**\n * A specialized version of `_.reduce` for arrays without support for\n * iteratee shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @param {*} [accumulator] The initial value.\n * @param {boolean} [initAccum] Specify using the first element of `array` as\n * the initial value.\n * @returns {*} Returns the accumulated value.\n */\n function arrayReduce(array, iteratee, accumulator, initAccum) {\n var index = -1,\n length = array == null ? 0 : array.length;\n\n if (initAccum && length) {\n accumulator = array[++index];\n }\n while (++index < length) {\n accumulator = iteratee(accumulator, array[index], index, array);\n }\n return accumulator;\n }\n\n /**\n * A specialized version of `_.reduceRight` for arrays without support for\n * iteratee shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @param {*} [accumulator] The initial value.\n * @param {boolean} [initAccum] Specify using the last element of `array` as\n * the initial value.\n * @returns {*} Returns the accumulated value.\n */\n function arrayReduceRight(array, iteratee, accumulator, initAccum) {\n var length = array == null ? 0 : array.length;\n if (initAccum && length) {\n accumulator = array[--length];\n }\n while (length--) {\n accumulator = iteratee(accumulator, array[length], length, array);\n }\n return accumulator;\n }\n\n /**\n * A specialized version of `_.some` for arrays without support for iteratee\n * shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} predicate The function invoked per iteration.\n * @returns {boolean} Returns `true` if any element passes the predicate check,\n * else `false`.\n */\n function arraySome(array, predicate) {\n var index = -1,\n length = array == null ? 0 : array.length;\n\n while (++index < length) {\n if (predicate(array[index], index, array)) {\n return true;\n }\n }\n return false;\n }\n\n /**\n * Gets the size of an ASCII `string`.\n *\n * @private\n * @param {string} string The string inspect.\n * @returns {number} Returns the string size.\n */\n var asciiSize = baseProperty('length');\n\n /**\n * Converts an ASCII `string` to an array.\n *\n * @private\n * @param {string} string The string to convert.\n * @returns {Array} Returns the converted array.\n */\n function asciiToArray(string) {\n return string.split('');\n }\n\n /**\n * Splits an ASCII `string` into an array of its words.\n *\n * @private\n * @param {string} The string to inspect.\n * @returns {Array} Returns the words of `string`.\n */\n function asciiWords(string) {\n return string.match(reAsciiWord) || [];\n }\n\n /**\n * The base implementation of methods like `_.findKey` and `_.findLastKey`,\n * without support for iteratee shorthands, which iterates over `collection`\n * using `eachFunc`.\n *\n * @private\n * @param {Array|Object} collection The collection to inspect.\n * @param {Function} predicate The function invoked per iteration.\n * @param {Function} eachFunc The function to iterate over `collection`.\n * @returns {*} Returns the found element or its key, else `undefined`.\n */\n function baseFindKey(collection, predicate, eachFunc) {\n var result;\n eachFunc(collection, function(value, key, collection) {\n if (predicate(value, key, collection)) {\n result = key;\n return false;\n }\n });\n return result;\n }\n\n /**\n * The base implementation of `_.findIndex` and `_.findLastIndex` without\n * support for iteratee shorthands.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {Function} predicate The function invoked per iteration.\n * @param {number} fromIndex The index to search from.\n * @param {boolean} [fromRight] Specify iterating from right to left.\n * @returns {number} Returns the index of the matched value, else `-1`.\n */\n function baseFindIndex(array, predicate, fromIndex, fromRight) {\n var length = array.length,\n index = fromIndex + (fromRight ? 1 : -1);\n\n while ((fromRight ? index-- : ++index < length)) {\n if (predicate(array[index], index, array)) {\n return index;\n }\n }\n return -1;\n }\n\n /**\n * The base implementation of `_.indexOf` without `fromIndex` bounds checks.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {*} value The value to search for.\n * @param {number} fromIndex The index to search from.\n * @returns {number} Returns the index of the matched value, else `-1`.\n */\n function baseIndexOf(array, value, fromIndex) {\n return value === value\n ? strictIndexOf(array, value, fromIndex)\n : baseFindIndex(array, baseIsNaN, fromIndex);\n }\n\n /**\n * This function is like `baseIndexOf` except that it accepts a comparator.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {*} value The value to search for.\n * @param {number} fromIndex The index to search from.\n * @param {Function} comparator The comparator invoked per element.\n * @returns {number} Returns the index of the matched value, else `-1`.\n */\n function baseIndexOfWith(array, value, fromIndex, comparator) {\n var index = fromIndex - 1,\n length = array.length;\n\n while (++index < length) {\n if (comparator(array[index], value)) {\n return index;\n }\n }\n return -1;\n }\n\n /**\n * The base implementation of `_.isNaN` without support for number objects.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is `NaN`, else `false`.\n */\n function baseIsNaN(value) {\n return value !== value;\n }\n\n /**\n * The base implementation of `_.mean` and `_.meanBy` without support for\n * iteratee shorthands.\n *\n * @private\n * @param {Array} array The array to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {number} Returns the mean.\n */\n function baseMean(array, iteratee) {\n var length = array == null ? 0 : array.length;\n return length ? (baseSum(array, iteratee) / length) : NAN;\n }\n\n /**\n * The base implementation of `_.property` without support for deep paths.\n *\n * @private\n * @param {string} key The key of the property to get.\n * @returns {Function} Returns the new accessor function.\n */\n function baseProperty(key) {\n return function(object) {\n return object == null ? undefined : object[key];\n };\n }\n\n /**\n * The base implementation of `_.propertyOf` without support for deep paths.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Function} Returns the new accessor function.\n */\n function basePropertyOf(object) {\n return function(key) {\n return object == null ? undefined : object[key];\n };\n }\n\n /**\n * The base implementation of `_.reduce` and `_.reduceRight`, without support\n * for iteratee shorthands, which iterates over `collection` using `eachFunc`.\n *\n * @private\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @param {*} accumulator The initial value.\n * @param {boolean} initAccum Specify using the first or last element of\n * `collection` as the initial value.\n * @param {Function} eachFunc The function to iterate over `collection`.\n * @returns {*} Returns the accumulated value.\n */\n function baseReduce(collection, iteratee, accumulator, initAccum, eachFunc) {\n eachFunc(collection, function(value, index, collection) {\n accumulator = initAccum\n ? (initAccum = false, value)\n : iteratee(accumulator, value, index, collection);\n });\n return accumulator;\n }\n\n /**\n * The base implementation of `_.sortBy` which uses `comparer` to define the\n * sort order of `array` and replaces criteria objects with their corresponding\n * values.\n *\n * @private\n * @param {Array} array The array to sort.\n * @param {Function} comparer The function to define sort order.\n * @returns {Array} Returns `array`.\n */\n function baseSortBy(array, comparer) {\n var length = array.length;\n\n array.sort(comparer);\n while (length--) {\n array[length] = array[length].value;\n }\n return array;\n }\n\n /**\n * The base implementation of `_.sum` and `_.sumBy` without support for\n * iteratee shorthands.\n *\n * @private\n * @param {Array} array The array to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {number} Returns the sum.\n */\n function baseSum(array, iteratee) {\n var result,\n index = -1,\n length = array.length;\n\n while (++index < length) {\n var current = iteratee(array[index]);\n if (current !== undefined) {\n result = result === undefined ? current : (result + current);\n }\n }\n return result;\n }\n\n /**\n * The base implementation of `_.times` without support for iteratee shorthands\n * or max array length checks.\n *\n * @private\n * @param {number} n The number of times to invoke `iteratee`.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array} Returns the array of results.\n */\n function baseTimes(n, iteratee) {\n var index = -1,\n result = Array(n);\n\n while (++index < n) {\n result[index] = iteratee(index);\n }\n return result;\n }\n\n /**\n * The base implementation of `_.toPairs` and `_.toPairsIn` which creates an array\n * of key-value pairs for `object` corresponding to the property names of `props`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {Array} props The property names to get values for.\n * @returns {Object} Returns the key-value pairs.\n */\n function baseToPairs(object, props) {\n return arrayMap(props, function(key) {\n return [key, object[key]];\n });\n }\n\n /**\n * The base implementation of `_.trim`.\n *\n * @private\n * @param {string} string The string to trim.\n * @returns {string} Returns the trimmed string.\n */\n function baseTrim(string) {\n return string\n ? string.slice(0, trimmedEndIndex(string) + 1).replace(reTrimStart, '')\n : string;\n }\n\n /**\n * The base implementation of `_.unary` without support for storing metadata.\n *\n * @private\n * @param {Function} func The function to cap arguments for.\n * @returns {Function} Returns the new capped function.\n */\n function baseUnary(func) {\n return function(value) {\n return func(value);\n };\n }\n\n /**\n * The base implementation of `_.values` and `_.valuesIn` which creates an\n * array of `object` property values corresponding to the property names\n * of `props`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {Array} props The property names to get values for.\n * @returns {Object} Returns the array of property values.\n */\n function baseValues(object, props) {\n return arrayMap(props, function(key) {\n return object[key];\n });\n }\n\n /**\n * Checks if a `cache` value for `key` exists.\n *\n * @private\n * @param {Object} cache The cache to query.\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\n function cacheHas(cache, key) {\n return cache.has(key);\n }\n\n /**\n * Used by `_.trim` and `_.trimStart` to get the index of the first string symbol\n * that is not found in the character symbols.\n *\n * @private\n * @param {Array} strSymbols The string symbols to inspect.\n * @param {Array} chrSymbols The character symbols to find.\n * @returns {number} Returns the index of the first unmatched string symbol.\n */\n function charsStartIndex(strSymbols, chrSymbols) {\n var index = -1,\n length = strSymbols.length;\n\n while (++index < length && baseIndexOf(chrSymbols, strSymbols[index], 0) > -1) {}\n return index;\n }\n\n /**\n * Used by `_.trim` and `_.trimEnd` to get the index of the last string symbol\n * that is not found in the character symbols.\n *\n * @private\n * @param {Array} strSymbols The string symbols to inspect.\n * @param {Array} chrSymbols The character symbols to find.\n * @returns {number} Returns the index of the last unmatched string symbol.\n */\n function charsEndIndex(strSymbols, chrSymbols) {\n var index = strSymbols.length;\n\n while (index-- && baseIndexOf(chrSymbols, strSymbols[index], 0) > -1) {}\n return index;\n }\n\n /**\n * Gets the number of `placeholder` occurrences in `array`.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {*} placeholder The placeholder to search for.\n * @returns {number} Returns the placeholder count.\n */\n function countHolders(array, placeholder) {\n var length = array.length,\n result = 0;\n\n while (length--) {\n if (array[length] === placeholder) {\n ++result;\n }\n }\n return result;\n }\n\n /**\n * Used by `_.deburr` to convert Latin-1 Supplement and Latin Extended-A\n * letters to basic Latin letters.\n *\n * @private\n * @param {string} letter The matched letter to deburr.\n * @returns {string} Returns the deburred letter.\n */\n var deburrLetter = basePropertyOf(deburredLetters);\n\n /**\n * Used by `_.escape` to convert characters to HTML entities.\n *\n * @private\n * @param {string} chr The matched character to escape.\n * @returns {string} Returns the escaped character.\n */\n var escapeHtmlChar = basePropertyOf(htmlEscapes);\n\n /**\n * Used by `_.template` to escape characters for inclusion in compiled string literals.\n *\n * @private\n * @param {string} chr The matched character to escape.\n * @returns {string} Returns the escaped character.\n */\n function escapeStringChar(chr) {\n return '\\\\' + stringEscapes[chr];\n }\n\n /**\n * Gets the value at `key` of `object`.\n *\n * @private\n * @param {Object} [object] The object to query.\n * @param {string} key The key of the property to get.\n * @returns {*} Returns the property value.\n */\n function getValue(object, key) {\n return object == null ? undefined : object[key];\n }\n\n /**\n * Checks if `string` contains Unicode symbols.\n *\n * @private\n * @param {string} string The string to inspect.\n * @returns {boolean} Returns `true` if a symbol is found, else `false`.\n */\n function hasUnicode(string) {\n return reHasUnicode.test(string);\n }\n\n /**\n * Checks if `string` contains a word composed of Unicode symbols.\n *\n * @private\n * @param {string} string The string to inspect.\n * @returns {boolean} Returns `true` if a word is found, else `false`.\n */\n function hasUnicodeWord(string) {\n return reHasUnicodeWord.test(string);\n }\n\n /**\n * Converts `iterator` to an array.\n *\n * @private\n * @param {Object} iterator The iterator to convert.\n * @returns {Array} Returns the converted array.\n */\n function iteratorToArray(iterator) {\n var data,\n result = [];\n\n while (!(data = iterator.next()).done) {\n result.push(data.value);\n }\n return result;\n }\n\n /**\n * Converts `map` to its key-value pairs.\n *\n * @private\n * @param {Object} map The map to convert.\n * @returns {Array} Returns the key-value pairs.\n */\n function mapToArray(map) {\n var index = -1,\n result = Array(map.size);\n\n map.forEach(function(value, key) {\n result[++index] = [key, value];\n });\n return result;\n }\n\n /**\n * Creates a unary function that invokes `func` with its argument transformed.\n *\n * @private\n * @param {Function} func The function to wrap.\n * @param {Function} transform The argument transform.\n * @returns {Function} Returns the new function.\n */\n function overArg(func, transform) {\n return function(arg) {\n return func(transform(arg));\n };\n }\n\n /**\n * Replaces all `placeholder` elements in `array` with an internal placeholder\n * and returns an array of their indexes.\n *\n * @private\n * @param {Array} array The array to modify.\n * @param {*} placeholder The placeholder to replace.\n * @returns {Array} Returns the new array of placeholder indexes.\n */\n function replaceHolders(array, placeholder) {\n var index = -1,\n length = array.length,\n resIndex = 0,\n result = [];\n\n while (++index < length) {\n var value = array[index];\n if (value === placeholder || value === PLACEHOLDER) {\n array[index] = PLACEHOLDER;\n result[resIndex++] = index;\n }\n }\n return result;\n }\n\n /**\n * Converts `set` to an array of its values.\n *\n * @private\n * @param {Object} set The set to convert.\n * @returns {Array} Returns the values.\n */\n function setToArray(set) {\n var index = -1,\n result = Array(set.size);\n\n set.forEach(function(value) {\n result[++index] = value;\n });\n return result;\n }\n\n /**\n * Converts `set` to its value-value pairs.\n *\n * @private\n * @param {Object} set The set to convert.\n * @returns {Array} Returns the value-value pairs.\n */\n function setToPairs(set) {\n var index = -1,\n result = Array(set.size);\n\n set.forEach(function(value) {\n result[++index] = [value, value];\n });\n return result;\n }\n\n /**\n * A specialized version of `_.indexOf` which performs strict equality\n * comparisons of values, i.e. `===`.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {*} value The value to search for.\n * @param {number} fromIndex The index to search from.\n * @returns {number} Returns the index of the matched value, else `-1`.\n */\n function strictIndexOf(array, value, fromIndex) {\n var index = fromIndex - 1,\n length = array.length;\n\n while (++index < length) {\n if (array[index] === value) {\n return index;\n }\n }\n return -1;\n }\n\n /**\n * A specialized version of `_.lastIndexOf` which performs strict equality\n * comparisons of values, i.e. `===`.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {*} value The value to search for.\n * @param {number} fromIndex The index to search from.\n * @returns {number} Returns the index of the matched value, else `-1`.\n */\n function strictLastIndexOf(array, value, fromIndex) {\n var index = fromIndex + 1;\n while (index--) {\n if (array[index] === value) {\n return index;\n }\n }\n return index;\n }\n\n /**\n * Gets the number of symbols in `string`.\n *\n * @private\n * @param {string} string The string to inspect.\n * @returns {number} Returns the string size.\n */\n function stringSize(string) {\n return hasUnicode(string)\n ? unicodeSize(string)\n : asciiSize(string);\n }\n\n /**\n * Converts `string` to an array.\n *\n * @private\n * @param {string} string The string to convert.\n * @returns {Array} Returns the converted array.\n */\n function stringToArray(string) {\n return hasUnicode(string)\n ? unicodeToArray(string)\n : asciiToArray(string);\n }\n\n /**\n * Used by `_.trim` and `_.trimEnd` to get the index of the last non-whitespace\n * character of `string`.\n *\n * @private\n * @param {string} string The string to inspect.\n * @returns {number} Returns the index of the last non-whitespace character.\n */\n function trimmedEndIndex(string) {\n var index = string.length;\n\n while (index-- && reWhitespace.test(string.charAt(index))) {}\n return index;\n }\n\n /**\n * Used by `_.unescape` to convert HTML entities to characters.\n *\n * @private\n * @param {string} chr The matched character to unescape.\n * @returns {string} Returns the unescaped character.\n */\n var unescapeHtmlChar = basePropertyOf(htmlUnescapes);\n\n /**\n * Gets the size of a Unicode `string`.\n *\n * @private\n * @param {string} string The string inspect.\n * @returns {number} Returns the string size.\n */\n function unicodeSize(string) {\n var result = reUnicode.lastIndex = 0;\n while (reUnicode.test(string)) {\n ++result;\n }\n return result;\n }\n\n /**\n * Converts a Unicode `string` to an array.\n *\n * @private\n * @param {string} string The string to convert.\n * @returns {Array} Returns the converted array.\n */\n function unicodeToArray(string) {\n return string.match(reUnicode) || [];\n }\n\n /**\n * Splits a Unicode `string` into an array of its words.\n *\n * @private\n * @param {string} The string to inspect.\n * @returns {Array} Returns the words of `string`.\n */\n function unicodeWords(string) {\n return string.match(reUnicodeWord) || [];\n }\n\n /*--------------------------------------------------------------------------*/\n\n /**\n * Create a new pristine `lodash` function using the `context` object.\n *\n * @static\n * @memberOf _\n * @since 1.1.0\n * @category Util\n * @param {Object} [context=root] The context object.\n * @returns {Function} Returns a new `lodash` function.\n * @example\n *\n * _.mixin({ 'foo': _.constant('foo') });\n *\n * var lodash = _.runInContext();\n * lodash.mixin({ 'bar': lodash.constant('bar') });\n *\n * _.isFunction(_.foo);\n * // => true\n * _.isFunction(_.bar);\n * // => false\n *\n * lodash.isFunction(lodash.foo);\n * // => false\n * lodash.isFunction(lodash.bar);\n * // => true\n *\n * // Create a suped-up `defer` in Node.js.\n * var defer = _.runInContext({ 'setTimeout': setImmediate }).defer;\n */\n var runInContext = (function runInContext(context) {\n context = context == null ? root : _.defaults(root.Object(), context, _.pick(root, contextProps));\n\n /** Built-in constructor references. */\n var Array = context.Array,\n Date = context.Date,\n Error = context.Error,\n Function = context.Function,\n Math = context.Math,\n Object = context.Object,\n RegExp = context.RegExp,\n String = context.String,\n TypeError = context.TypeError;\n\n /** Used for built-in method references. */\n var arrayProto = Array.prototype,\n funcProto = Function.prototype,\n objectProto = Object.prototype;\n\n /** Used to detect overreaching core-js shims. */\n var coreJsData = context['__core-js_shared__'];\n\n /** Used to resolve the decompiled source of functions. */\n var funcToString = funcProto.toString;\n\n /** Used to check objects for own properties. */\n var hasOwnProperty = objectProto.hasOwnProperty;\n\n /** Used to generate unique IDs. */\n var idCounter = 0;\n\n /** Used to detect methods masquerading as native. */\n var maskSrcKey = (function() {\n var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || '');\n return uid ? ('Symbol(src)_1.' + uid) : '';\n }());\n\n /**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\n var nativeObjectToString = objectProto.toString;\n\n /** Used to infer the `Object` constructor. */\n var objectCtorString = funcToString.call(Object);\n\n /** Used to restore the original `_` reference in `_.noConflict`. */\n var oldDash = root._;\n\n /** Used to detect if a method is native. */\n var reIsNative = RegExp('^' +\n funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\\\$&')\n .replace(/hasOwnProperty|(function).*?(?=\\\\\\()| for .+?(?=\\\\\\])/g, '$1.*?') + '$'\n );\n\n /** Built-in value references. */\n var Buffer = moduleExports ? context.Buffer : undefined,\n Symbol = context.Symbol,\n Uint8Array = context.Uint8Array,\n allocUnsafe = Buffer ? Buffer.allocUnsafe : undefined,\n getPrototype = overArg(Object.getPrototypeOf, Object),\n objectCreate = Object.create,\n propertyIsEnumerable = objectProto.propertyIsEnumerable,\n splice = arrayProto.splice,\n spreadableSymbol = Symbol ? Symbol.isConcatSpreadable : undefined,\n symIterator = Symbol ? Symbol.iterator : undefined,\n symToStringTag = Symbol ? Symbol.toStringTag : undefined;\n\n var defineProperty = (function() {\n try {\n var func = getNative(Object, 'defineProperty');\n func({}, '', {});\n return func;\n } catch (e) {}\n }());\n\n /** Mocked built-ins. */\n var ctxClearTimeout = context.clearTimeout !== root.clearTimeout && context.clearTimeout,\n ctxNow = Date && Date.now !== root.Date.now && Date.now,\n ctxSetTimeout = context.setTimeout !== root.setTimeout && context.setTimeout;\n\n /* Built-in method references for those with the same name as other `lodash` methods. */\n var nativeCeil = Math.ceil,\n nativeFloor = Math.floor,\n nativeGetSymbols = Object.getOwnPropertySymbols,\n nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined,\n nativeIsFinite = context.isFinite,\n nativeJoin = arrayProto.join,\n nativeKeys = overArg(Object.keys, Object),\n nativeMax = Math.max,\n nativeMin = Math.min,\n nativeNow = Date.now,\n nativeParseInt = context.parseInt,\n nativeRandom = Math.random,\n nativeReverse = arrayProto.reverse;\n\n /* Built-in method references that are verified to be native. */\n var DataView = getNative(context, 'DataView'),\n Map = getNative(context, 'Map'),\n Promise = getNative(context, 'Promise'),\n Set = getNative(context, 'Set'),\n WeakMap = getNative(context, 'WeakMap'),\n nativeCreate = getNative(Object, 'create');\n\n /** Used to store function metadata. */\n var metaMap = WeakMap && new WeakMap;\n\n /** Used to lookup unminified function names. */\n var realNames = {};\n\n /** Used to detect maps, sets, and weakmaps. */\n var dataViewCtorString = toSource(DataView),\n mapCtorString = toSource(Map),\n promiseCtorString = toSource(Promise),\n setCtorString = toSource(Set),\n weakMapCtorString = toSource(WeakMap);\n\n /** Used to convert symbols to primitives and strings. */\n var symbolProto = Symbol ? Symbol.prototype : undefined,\n symbolValueOf = symbolProto ? symbolProto.valueOf : undefined,\n symbolToString = symbolProto ? symbolProto.toString : undefined;\n\n /*------------------------------------------------------------------------*/\n\n /**\n * Creates a `lodash` object which wraps `value` to enable implicit method\n * chain sequences. Methods that operate on and return arrays, collections,\n * and functions can be chained together. Methods that retrieve a single value\n * or may return a primitive value will automatically end the chain sequence\n * and return the unwrapped value. Otherwise, the value must be unwrapped\n * with `_#value`.\n *\n * Explicit chain sequences, which must be unwrapped with `_#value`, may be\n * enabled using `_.chain`.\n *\n * The execution of chained methods is lazy, that is, it's deferred until\n * `_#value` is implicitly or explicitly called.\n *\n * Lazy evaluation allows several methods to support shortcut fusion.\n * Shortcut fusion is an optimization to merge iteratee calls; this avoids\n * the creation of intermediate arrays and can greatly reduce the number of\n * iteratee executions. Sections of a chain sequence qualify for shortcut\n * fusion if the section is applied to an array and iteratees accept only\n * one argument. The heuristic for whether a section qualifies for shortcut\n * fusion is subject to change.\n *\n * Chaining is supported in custom builds as long as the `_#value` method is\n * directly or indirectly included in the build.\n *\n * In addition to lodash methods, wrappers have `Array` and `String` methods.\n *\n * The wrapper `Array` methods are:\n * `concat`, `join`, `pop`, `push`, `shift`, `sort`, `splice`, and `unshift`\n *\n * The wrapper `String` methods are:\n * `replace` and `split`\n *\n * The wrapper methods that support shortcut fusion are:\n * `at`, `compact`, `drop`, `dropRight`, `dropWhile`, `filter`, `find`,\n * `findLast`, `head`, `initial`, `last`, `map`, `reject`, `reverse`, `slice`,\n * `tail`, `take`, `takeRight`, `takeRightWhile`, `takeWhile`, and `toArray`\n *\n * The chainable wrapper methods are:\n * `after`, `ary`, `assign`, `assignIn`, `assignInWith`, `assignWith`, `at`,\n * `before`, `bind`, `bindAll`, `bindKey`, `castArray`, `chain`, `chunk`,\n * `commit`, `compact`, `concat`, `conforms`, `constant`, `countBy`, `create`,\n * `curry`, `debounce`, `defaults`, `defaultsDeep`, `defer`, `delay`,\n * `difference`, `differenceBy`, `differenceWith`, `drop`, `dropRight`,\n * `dropRightWhile`, `dropWhile`, `extend`, `extendWith`, `fill`, `filter`,\n * `flatMap`, `flatMapDeep`, `flatMapDepth`, `flatten`, `flattenDeep`,\n * `flattenDepth`, `flip`, `flow`, `flowRight`, `fromPairs`, `functions`,\n * `functionsIn`, `groupBy`, `initial`, `intersection`, `intersectionBy`,\n * `intersectionWith`, `invert`, `invertBy`, `invokeMap`, `iteratee`, `keyBy`,\n * `keys`, `keysIn`, `map`, `mapKeys`, `mapValues`, `matches`, `matchesProperty`,\n * `memoize`, `merge`, `mergeWith`, `method`, `methodOf`, `mixin`, `negate`,\n * `nthArg`, `omit`, `omitBy`, `once`, `orderBy`, `over`, `overArgs`,\n * `overEvery`, `overSome`, `partial`, `partialRight`, `partition`, `pick`,\n * `pickBy`, `plant`, `property`, `propertyOf`, `pull`, `pullAll`, `pullAllBy`,\n * `pullAllWith`, `pullAt`, `push`, `range`, `rangeRight`, `rearg`, `reject`,\n * `remove`, `rest`, `reverse`, `sampleSize`, `set`, `setWith`, `shuffle`,\n * `slice`, `sort`, `sortBy`, `splice`, `spread`, `tail`, `take`, `takeRight`,\n * `takeRightWhile`, `takeWhile`, `tap`, `throttle`, `thru`, `toArray`,\n * `toPairs`, `toPairsIn`, `toPath`, `toPlainObject`, `transform`, `unary`,\n * `union`, `unionBy`, `unionWith`, `uniq`, `uniqBy`, `uniqWith`, `unset`,\n * `unshift`, `unzip`, `unzipWith`, `update`, `updateWith`, `values`,\n * `valuesIn`, `without`, `wrap`, `xor`, `xorBy`, `xorWith`, `zip`,\n * `zipObject`, `zipObjectDeep`, and `zipWith`\n *\n * The wrapper methods that are **not** chainable by default are:\n * `add`, `attempt`, `camelCase`, `capitalize`, `ceil`, `clamp`, `clone`,\n * `cloneDeep`, `cloneDeepWith`, `cloneWith`, `conformsTo`, `deburr`,\n * `defaultTo`, `divide`, `each`, `eachRight`, `endsWith`, `eq`, `escape`,\n * `escapeRegExp`, `every`, `find`, `findIndex`, `findKey`, `findLast`,\n * `findLastIndex`, `findLastKey`, `first`, `floor`, `forEach`, `forEachRight`,\n * `forIn`, `forInRight`, `forOwn`, `forOwnRight`, `get`, `gt`, `gte`, `has`,\n * `hasIn`, `head`, `identity`, `includes`, `indexOf`, `inRange`, `invoke`,\n * `isArguments`, `isArray`, `isArrayBuffer`, `isArrayLike`, `isArrayLikeObject`,\n * `isBoolean`, `isBuffer`, `isDate`, `isElement`, `isEmpty`, `isEqual`,\n * `isEqualWith`, `isError`, `isFinite`, `isFunction`, `isInteger`, `isLength`,\n * `isMap`, `isMatch`, `isMatchWith`, `isNaN`, `isNative`, `isNil`, `isNull`,\n * `isNumber`, `isObject`, `isObjectLike`, `isPlainObject`, `isRegExp`,\n * `isSafeInteger`, `isSet`, `isString`, `isUndefined`, `isTypedArray`,\n * `isWeakMap`, `isWeakSet`, `join`, `kebabCase`, `last`, `lastIndexOf`,\n * `lowerCase`, `lowerFirst`, `lt`, `lte`, `max`, `maxBy`, `mean`, `meanBy`,\n * `min`, `minBy`, `multiply`, `noConflict`, `noop`, `now`, `nth`, `pad`,\n * `padEnd`, `padStart`, `parseInt`, `pop`, `random`, `reduce`, `reduceRight`,\n * `repeat`, `result`, `round`, `runInContext`, `sample`, `shift`, `size`,\n * `snakeCase`, `some`, `sortedIndex`, `sortedIndexBy`, `sortedLastIndex`,\n * `sortedLastIndexBy`, `startCase`, `startsWith`, `stubArray`, `stubFalse`,\n * `stubObject`, `stubString`, `stubTrue`, `subtract`, `sum`, `sumBy`,\n * `template`, `times`, `toFinite`, `toInteger`, `toJSON`, `toLength`,\n * `toLower`, `toNumber`, `toSafeInteger`, `toString`, `toUpper`, `trim`,\n * `trimEnd`, `trimStart`, `truncate`, `unescape`, `uniqueId`, `upperCase`,\n * `upperFirst`, `value`, and `words`\n *\n * @name _\n * @constructor\n * @category Seq\n * @param {*} value The value to wrap in a `lodash` instance.\n * @returns {Object} Returns the new `lodash` wrapper instance.\n * @example\n *\n * function square(n) {\n * return n * n;\n * }\n *\n * var wrapped = _([1, 2, 3]);\n *\n * // Returns an unwrapped value.\n * wrapped.reduce(_.add);\n * // => 6\n *\n * // Returns a wrapped value.\n * var squares = wrapped.map(square);\n *\n * _.isArray(squares);\n * // => false\n *\n * _.isArray(squares.value());\n * // => true\n */\n function lodash(value) {\n if (isObjectLike(value) && !isArray(value) && !(value instanceof LazyWrapper)) {\n if (value instanceof LodashWrapper) {\n return value;\n }\n if (hasOwnProperty.call(value, '__wrapped__')) {\n return wrapperClone(value);\n }\n }\n return new LodashWrapper(value);\n }\n\n /**\n * The base implementation of `_.create` without support for assigning\n * properties to the created object.\n *\n * @private\n * @param {Object} proto The object to inherit from.\n * @returns {Object} Returns the new object.\n */\n var baseCreate = (function() {\n function object() {}\n return function(proto) {\n if (!isObject(proto)) {\n return {};\n }\n if (objectCreate) {\n return objectCreate(proto);\n }\n object.prototype = proto;\n var result = new object;\n object.prototype = undefined;\n return result;\n };\n }());\n\n /**\n * The function whose prototype chain sequence wrappers inherit from.\n *\n * @private\n */\n function baseLodash() {\n // No operation performed.\n }\n\n /**\n * The base constructor for creating `lodash` wrapper objects.\n *\n * @private\n * @param {*} value The value to wrap.\n * @param {boolean} [chainAll] Enable explicit method chain sequences.\n */\n function LodashWrapper(value, chainAll) {\n this.__wrapped__ = value;\n this.__actions__ = [];\n this.__chain__ = !!chainAll;\n this.__index__ = 0;\n this.__values__ = undefined;\n }\n\n /**\n * By default, the template delimiters used by lodash are like those in\n * embedded Ruby (ERB) as well as ES2015 template strings. Change the\n * following template settings to use alternative delimiters.\n *\n * @static\n * @memberOf _\n * @type {Object}\n */\n lodash.templateSettings = {\n\n /**\n * Used to detect `data` property values to be HTML-escaped.\n *\n * @memberOf _.templateSettings\n * @type {RegExp}\n */\n 'escape': reEscape,\n\n /**\n * Used to detect code to be evaluated.\n *\n * @memberOf _.templateSettings\n * @type {RegExp}\n */\n 'evaluate': reEvaluate,\n\n /**\n * Used to detect `data` property values to inject.\n *\n * @memberOf _.templateSettings\n * @type {RegExp}\n */\n 'interpolate': reInterpolate,\n\n /**\n * Used to reference the data object in the template text.\n *\n * @memberOf _.templateSettings\n * @type {string}\n */\n 'variable': '',\n\n /**\n * Used to import variables into the compiled template.\n *\n * @memberOf _.templateSettings\n * @type {Object}\n */\n 'imports': {\n\n /**\n * A reference to the `lodash` function.\n *\n * @memberOf _.templateSettings.imports\n * @type {Function}\n */\n '_': lodash\n }\n };\n\n // Ensure wrappers are instances of `baseLodash`.\n lodash.prototype = baseLodash.prototype;\n lodash.prototype.constructor = lodash;\n\n LodashWrapper.prototype = baseCreate(baseLodash.prototype);\n LodashWrapper.prototype.constructor = LodashWrapper;\n\n /*------------------------------------------------------------------------*/\n\n /**\n * Creates a lazy wrapper object which wraps `value` to enable lazy evaluation.\n *\n * @private\n * @constructor\n * @param {*} value The value to wrap.\n */\n function LazyWrapper(value) {\n this.__wrapped__ = value;\n this.__actions__ = [];\n this.__dir__ = 1;\n this.__filtered__ = false;\n this.__iteratees__ = [];\n this.__takeCount__ = MAX_ARRAY_LENGTH;\n this.__views__ = [];\n }\n\n /**\n * Creates a clone of the lazy wrapper object.\n *\n * @private\n * @name clone\n * @memberOf LazyWrapper\n * @returns {Object} Returns the cloned `LazyWrapper` object.\n */\n function lazyClone() {\n var result = new LazyWrapper(this.__wrapped__);\n result.__actions__ = copyArray(this.__actions__);\n result.__dir__ = this.__dir__;\n result.__filtered__ = this.__filtered__;\n result.__iteratees__ = copyArray(this.__iteratees__);\n result.__takeCount__ = this.__takeCount__;\n result.__views__ = copyArray(this.__views__);\n return result;\n }\n\n /**\n * Reverses the direction of lazy iteration.\n *\n * @private\n * @name reverse\n * @memberOf LazyWrapper\n * @returns {Object} Returns the new reversed `LazyWrapper` object.\n */\n function lazyReverse() {\n if (this.__filtered__) {\n var result = new LazyWrapper(this);\n result.__dir__ = -1;\n result.__filtered__ = true;\n } else {\n result = this.clone();\n result.__dir__ *= -1;\n }\n return result;\n }\n\n /**\n * Extracts the unwrapped value from its lazy wrapper.\n *\n * @private\n * @name value\n * @memberOf LazyWrapper\n * @returns {*} Returns the unwrapped value.\n */\n function lazyValue() {\n var array = this.__wrapped__.value(),\n dir = this.__dir__,\n isArr = isArray(array),\n isRight = dir < 0,\n arrLength = isArr ? array.length : 0,\n view = getView(0, arrLength, this.__views__),\n start = view.start,\n end = view.end,\n length = end - start,\n index = isRight ? end : (start - 1),\n iteratees = this.__iteratees__,\n iterLength = iteratees.length,\n resIndex = 0,\n takeCount = nativeMin(length, this.__takeCount__);\n\n if (!isArr || (!isRight && arrLength == length && takeCount == length)) {\n return baseWrapperValue(array, this.__actions__);\n }\n var result = [];\n\n outer:\n while (length-- && resIndex < takeCount) {\n index += dir;\n\n var iterIndex = -1,\n value = array[index];\n\n while (++iterIndex < iterLength) {\n var data = iteratees[iterIndex],\n iteratee = data.iteratee,\n type = data.type,\n computed = iteratee(value);\n\n if (type == LAZY_MAP_FLAG) {\n value = computed;\n } else if (!computed) {\n if (type == LAZY_FILTER_FLAG) {\n continue outer;\n } else {\n break outer;\n }\n }\n }\n result[resIndex++] = value;\n }\n return result;\n }\n\n // Ensure `LazyWrapper` is an instance of `baseLodash`.\n LazyWrapper.prototype = baseCreate(baseLodash.prototype);\n LazyWrapper.prototype.constructor = LazyWrapper;\n\n /*------------------------------------------------------------------------*/\n\n /**\n * Creates a hash object.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\n function Hash(entries) {\n var index = -1,\n length = entries == null ? 0 : entries.length;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n }\n\n /**\n * Removes all key-value entries from the hash.\n *\n * @private\n * @name clear\n * @memberOf Hash\n */\n function hashClear() {\n this.__data__ = nativeCreate ? nativeCreate(null) : {};\n this.size = 0;\n }\n\n /**\n * Removes `key` and its value from the hash.\n *\n * @private\n * @name delete\n * @memberOf Hash\n * @param {Object} hash The hash to modify.\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\n function hashDelete(key) {\n var result = this.has(key) && delete this.__data__[key];\n this.size -= result ? 1 : 0;\n return result;\n }\n\n /**\n * Gets the hash value for `key`.\n *\n * @private\n * @name get\n * @memberOf Hash\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\n function hashGet(key) {\n var data = this.__data__;\n if (nativeCreate) {\n var result = data[key];\n return result === HASH_UNDEFINED ? undefined : result;\n }\n return hasOwnProperty.call(data, key) ? data[key] : undefined;\n }\n\n /**\n * Checks if a hash value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf Hash\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\n function hashHas(key) {\n var data = this.__data__;\n return nativeCreate ? (data[key] !== undefined) : hasOwnProperty.call(data, key);\n }\n\n /**\n * Sets the hash `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf Hash\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the hash instance.\n */\n function hashSet(key, value) {\n var data = this.__data__;\n this.size += this.has(key) ? 0 : 1;\n data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value;\n return this;\n }\n\n // Add methods to `Hash`.\n Hash.prototype.clear = hashClear;\n Hash.prototype['delete'] = hashDelete;\n Hash.prototype.get = hashGet;\n Hash.prototype.has = hashHas;\n Hash.prototype.set = hashSet;\n\n /*------------------------------------------------------------------------*/\n\n /**\n * Creates an list cache object.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\n function ListCache(entries) {\n var index = -1,\n length = entries == null ? 0 : entries.length;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n }\n\n /**\n * Removes all key-value entries from the list cache.\n *\n * @private\n * @name clear\n * @memberOf ListCache\n */\n function listCacheClear() {\n this.__data__ = [];\n this.size = 0;\n }\n\n /**\n * Removes `key` and its value from the list cache.\n *\n * @private\n * @name delete\n * @memberOf ListCache\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\n function listCacheDelete(key) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n if (index < 0) {\n return false;\n }\n var lastIndex = data.length - 1;\n if (index == lastIndex) {\n data.pop();\n } else {\n splice.call(data, index, 1);\n }\n --this.size;\n return true;\n }\n\n /**\n * Gets the list cache value for `key`.\n *\n * @private\n * @name get\n * @memberOf ListCache\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\n function listCacheGet(key) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n return index < 0 ? undefined : data[index][1];\n }\n\n /**\n * Checks if a list cache value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf ListCache\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\n function listCacheHas(key) {\n return assocIndexOf(this.__data__, key) > -1;\n }\n\n /**\n * Sets the list cache `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf ListCache\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the list cache instance.\n */\n function listCacheSet(key, value) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n if (index < 0) {\n ++this.size;\n data.push([key, value]);\n } else {\n data[index][1] = value;\n }\n return this;\n }\n\n // Add methods to `ListCache`.\n ListCache.prototype.clear = listCacheClear;\n ListCache.prototype['delete'] = listCacheDelete;\n ListCache.prototype.get = listCacheGet;\n ListCache.prototype.has = listCacheHas;\n ListCache.prototype.set = listCacheSet;\n\n /*------------------------------------------------------------------------*/\n\n /**\n * Creates a map cache object to store key-value pairs.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\n function MapCache(entries) {\n var index = -1,\n length = entries == null ? 0 : entries.length;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n }\n\n /**\n * Removes all key-value entries from the map.\n *\n * @private\n * @name clear\n * @memberOf MapCache\n */\n function mapCacheClear() {\n this.size = 0;\n this.__data__ = {\n 'hash': new Hash,\n 'map': new (Map || ListCache),\n 'string': new Hash\n };\n }\n\n /**\n * Removes `key` and its value from the map.\n *\n * @private\n * @name delete\n * @memberOf MapCache\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\n function mapCacheDelete(key) {\n var result = getMapData(this, key)['delete'](key);\n this.size -= result ? 1 : 0;\n return result;\n }\n\n /**\n * Gets the map value for `key`.\n *\n * @private\n * @name get\n * @memberOf MapCache\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\n function mapCacheGet(key) {\n return getMapData(this, key).get(key);\n }\n\n /**\n * Checks if a map value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf MapCache\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\n function mapCacheHas(key) {\n return getMapData(this, key).has(key);\n }\n\n /**\n * Sets the map `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf MapCache\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the map cache instance.\n */\n function mapCacheSet(key, value) {\n var data = getMapData(this, key),\n size = data.size;\n\n data.set(key, value);\n this.size += data.size == size ? 0 : 1;\n return this;\n }\n\n // Add methods to `MapCache`.\n MapCache.prototype.clear = mapCacheClear;\n MapCache.prototype['delete'] = mapCacheDelete;\n MapCache.prototype.get = mapCacheGet;\n MapCache.prototype.has = mapCacheHas;\n MapCache.prototype.set = mapCacheSet;\n\n /*------------------------------------------------------------------------*/\n\n /**\n *\n * Creates an array cache object to store unique values.\n *\n * @private\n * @constructor\n * @param {Array} [values] The values to cache.\n */\n function SetCache(values) {\n var index = -1,\n length = values == null ? 0 : values.length;\n\n this.__data__ = new MapCache;\n while (++index < length) {\n this.add(values[index]);\n }\n }\n\n /**\n * Adds `value` to the array cache.\n *\n * @private\n * @name add\n * @memberOf SetCache\n * @alias push\n * @param {*} value The value to cache.\n * @returns {Object} Returns the cache instance.\n */\n function setCacheAdd(value) {\n this.__data__.set(value, HASH_UNDEFINED);\n return this;\n }\n\n /**\n * Checks if `value` is in the array cache.\n *\n * @private\n * @name has\n * @memberOf SetCache\n * @param {*} value The value to search for.\n * @returns {number} Returns `true` if `value` is found, else `false`.\n */\n function setCacheHas(value) {\n return this.__data__.has(value);\n }\n\n // Add methods to `SetCache`.\n SetCache.prototype.add = SetCache.prototype.push = setCacheAdd;\n SetCache.prototype.has = setCacheHas;\n\n /*------------------------------------------------------------------------*/\n\n /**\n * Creates a stack cache object to store key-value pairs.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\n function Stack(entries) {\n var data = this.__data__ = new ListCache(entries);\n this.size = data.size;\n }\n\n /**\n * Removes all key-value entries from the stack.\n *\n * @private\n * @name clear\n * @memberOf Stack\n */\n function stackClear() {\n this.__data__ = new ListCache;\n this.size = 0;\n }\n\n /**\n * Removes `key` and its value from the stack.\n *\n * @private\n * @name delete\n * @memberOf Stack\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\n function stackDelete(key) {\n var data = this.__data__,\n result = data['delete'](key);\n\n this.size = data.size;\n return result;\n }\n\n /**\n * Gets the stack value for `key`.\n *\n * @private\n * @name get\n * @memberOf Stack\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\n function stackGet(key) {\n return this.__data__.get(key);\n }\n\n /**\n * Checks if a stack value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf Stack\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\n function stackHas(key) {\n return this.__data__.has(key);\n }\n\n /**\n * Sets the stack `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf Stack\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the stack cache instance.\n */\n function stackSet(key, value) {\n var data = this.__data__;\n if (data instanceof ListCache) {\n var pairs = data.__data__;\n if (!Map || (pairs.length < LARGE_ARRAY_SIZE - 1)) {\n pairs.push([key, value]);\n this.size = ++data.size;\n return this;\n }\n data = this.__data__ = new MapCache(pairs);\n }\n data.set(key, value);\n this.size = data.size;\n return this;\n }\n\n // Add methods to `Stack`.\n Stack.prototype.clear = stackClear;\n Stack.prototype['delete'] = stackDelete;\n Stack.prototype.get = stackGet;\n Stack.prototype.has = stackHas;\n Stack.prototype.set = stackSet;\n\n /*------------------------------------------------------------------------*/\n\n /**\n * Creates an array of the enumerable property names of the array-like `value`.\n *\n * @private\n * @param {*} value The value to query.\n * @param {boolean} inherited Specify returning inherited property names.\n * @returns {Array} Returns the array of property names.\n */\n function arrayLikeKeys(value, inherited) {\n var isArr = isArray(value),\n isArg = !isArr && isArguments(value),\n isBuff = !isArr && !isArg && isBuffer(value),\n isType = !isArr && !isArg && !isBuff && isTypedArray(value),\n skipIndexes = isArr || isArg || isBuff || isType,\n result = skipIndexes ? baseTimes(value.length, String) : [],\n length = result.length;\n\n for (var key in value) {\n if ((inherited || hasOwnProperty.call(value, key)) &&\n !(skipIndexes && (\n // Safari 9 has enumerable `arguments.length` in strict mode.\n key == 'length' ||\n // Node.js 0.10 has enumerable non-index properties on buffers.\n (isBuff && (key == 'offset' || key == 'parent')) ||\n // PhantomJS 2 has enumerable non-index properties on typed arrays.\n (isType && (key == 'buffer' || key == 'byteLength' || key == 'byteOffset')) ||\n // Skip index properties.\n isIndex(key, length)\n ))) {\n result.push(key);\n }\n }\n return result;\n }\n\n /**\n * A specialized version of `_.sample` for arrays.\n *\n * @private\n * @param {Array} array The array to sample.\n * @returns {*} Returns the random element.\n */\n function arraySample(array) {\n var length = array.length;\n return length ? array[baseRandom(0, length - 1)] : undefined;\n }\n\n /**\n * A specialized version of `_.sampleSize` for arrays.\n *\n * @private\n * @param {Array} array The array to sample.\n * @param {number} n The number of elements to sample.\n * @returns {Array} Returns the random elements.\n */\n function arraySampleSize(array, n) {\n return shuffleSelf(copyArray(array), baseClamp(n, 0, array.length));\n }\n\n /**\n * A specialized version of `_.shuffle` for arrays.\n *\n * @private\n * @param {Array} array The array to shuffle.\n * @returns {Array} Returns the new shuffled array.\n */\n function arrayShuffle(array) {\n return shuffleSelf(copyArray(array));\n }\n\n /**\n * This function is like `assignValue` except that it doesn't assign\n * `undefined` values.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {string} key The key of the property to assign.\n * @param {*} value The value to assign.\n */\n function assignMergeValue(object, key, value) {\n if ((value !== undefined && !eq(object[key], value)) ||\n (value === undefined && !(key in object))) {\n baseAssignValue(object, key, value);\n }\n }\n\n /**\n * Assigns `value` to `key` of `object` if the existing value is not equivalent\n * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * for equality comparisons.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {string} key The key of the property to assign.\n * @param {*} value The value to assign.\n */\n function assignValue(object, key, value) {\n var objValue = object[key];\n if (!(hasOwnProperty.call(object, key) && eq(objValue, value)) ||\n (value === undefined && !(key in object))) {\n baseAssignValue(object, key, value);\n }\n }\n\n /**\n * Gets the index at which the `key` is found in `array` of key-value pairs.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {*} key The key to search for.\n * @returns {number} Returns the index of the matched value, else `-1`.\n */\n function assocIndexOf(array, key) {\n var length = array.length;\n while (length--) {\n if (eq(array[length][0], key)) {\n return length;\n }\n }\n return -1;\n }\n\n /**\n * Aggregates elements of `collection` on `accumulator` with keys transformed\n * by `iteratee` and values set by `setter`.\n *\n * @private\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} setter The function to set `accumulator` values.\n * @param {Function} iteratee The iteratee to transform keys.\n * @param {Object} accumulator The initial aggregated object.\n * @returns {Function} Returns `accumulator`.\n */\n function baseAggregator(collection, setter, iteratee, accumulator) {\n baseEach(collection, function(value, key, collection) {\n setter(accumulator, value, iteratee(value), collection);\n });\n return accumulator;\n }\n\n /**\n * The base implementation of `_.assign` without support for multiple sources\n * or `customizer` functions.\n *\n * @private\n * @param {Object} object The destination object.\n * @param {Object} source The source object.\n * @returns {Object} Returns `object`.\n */\n function baseAssign(object, source) {\n return object && copyObject(source, keys(source), object);\n }\n\n /**\n * The base implementation of `_.assignIn` without support for multiple sources\n * or `customizer` functions.\n *\n * @private\n * @param {Object} object The destination object.\n * @param {Object} source The source object.\n * @returns {Object} Returns `object`.\n */\n function baseAssignIn(object, source) {\n return object && copyObject(source, keysIn(source), object);\n }\n\n /**\n * The base implementation of `assignValue` and `assignMergeValue` without\n * value checks.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {string} key The key of the property to assign.\n * @param {*} value The value to assign.\n */\n function baseAssignValue(object, key, value) {\n if (key == '__proto__' && defineProperty) {\n defineProperty(object, key, {\n 'configurable': true,\n 'enumerable': true,\n 'value': value,\n 'writable': true\n });\n } else {\n object[key] = value;\n }\n }\n\n /**\n * The base implementation of `_.at` without support for individual paths.\n *\n * @private\n * @param {Object} object The object to iterate over.\n * @param {string[]} paths The property paths to pick.\n * @returns {Array} Returns the picked elements.\n */\n function baseAt(object, paths) {\n var index = -1,\n length = paths.length,\n result = Array(length),\n skip = object == null;\n\n while (++index < length) {\n result[index] = skip ? undefined : get(object, paths[index]);\n }\n return result;\n }\n\n /**\n * The base implementation of `_.clamp` which doesn't coerce arguments.\n *\n * @private\n * @param {number} number The number to clamp.\n * @param {number} [lower] The lower bound.\n * @param {number} upper The upper bound.\n * @returns {number} Returns the clamped number.\n */\n function baseClamp(number, lower, upper) {\n if (number === number) {\n if (upper !== undefined) {\n number = number <= upper ? number : upper;\n }\n if (lower !== undefined) {\n number = number >= lower ? number : lower;\n }\n }\n return number;\n }\n\n /**\n * The base implementation of `_.clone` and `_.cloneDeep` which tracks\n * traversed objects.\n *\n * @private\n * @param {*} value The value to clone.\n * @param {boolean} bitmask The bitmask flags.\n * 1 - Deep clone\n * 2 - Flatten inherited properties\n * 4 - Clone symbols\n * @param {Function} [customizer] The function to customize cloning.\n * @param {string} [key] The key of `value`.\n * @param {Object} [object] The parent object of `value`.\n * @param {Object} [stack] Tracks traversed objects and their clone counterparts.\n * @returns {*} Returns the cloned value.\n */\n function baseClone(value, bitmask, customizer, key, object, stack) {\n var result,\n isDeep = bitmask & CLONE_DEEP_FLAG,\n isFlat = bitmask & CLONE_FLAT_FLAG,\n isFull = bitmask & CLONE_SYMBOLS_FLAG;\n\n if (customizer) {\n result = object ? customizer(value, key, object, stack) : customizer(value);\n }\n if (result !== undefined) {\n return result;\n }\n if (!isObject(value)) {\n return value;\n }\n var isArr = isArray(value);\n if (isArr) {\n result = initCloneArray(value);\n if (!isDeep) {\n return copyArray(value, result);\n }\n } else {\n var tag = getTag(value),\n isFunc = tag == funcTag || tag == genTag;\n\n if (isBuffer(value)) {\n return cloneBuffer(value, isDeep);\n }\n if (tag == objectTag || tag == argsTag || (isFunc && !object)) {\n result = (isFlat || isFunc) ? {} : initCloneObject(value);\n if (!isDeep) {\n return isFlat\n ? copySymbolsIn(value, baseAssignIn(result, value))\n : copySymbols(value, baseAssign(result, value));\n }\n } else {\n if (!cloneableTags[tag]) {\n return object ? value : {};\n }\n result = initCloneByTag(value, tag, isDeep);\n }\n }\n // Check for circular references and return its corresponding clone.\n stack || (stack = new Stack);\n var stacked = stack.get(value);\n if (stacked) {\n return stacked;\n }\n stack.set(value, result);\n\n if (isSet(value)) {\n value.forEach(function(subValue) {\n result.add(baseClone(subValue, bitmask, customizer, subValue, value, stack));\n });\n } else if (isMap(value)) {\n value.forEach(function(subValue, key) {\n result.set(key, baseClone(subValue, bitmask, customizer, key, value, stack));\n });\n }\n\n var keysFunc = isFull\n ? (isFlat ? getAllKeysIn : getAllKeys)\n : (isFlat ? keysIn : keys);\n\n var props = isArr ? undefined : keysFunc(value);\n arrayEach(props || value, function(subValue, key) {\n if (props) {\n key = subValue;\n subValue = value[key];\n }\n // Recursively populate clone (susceptible to call stack limits).\n assignValue(result, key, baseClone(subValue, bitmask, customizer, key, value, stack));\n });\n return result;\n }\n\n /**\n * The base implementation of `_.conforms` which doesn't clone `source`.\n *\n * @private\n * @param {Object} source The object of property predicates to conform to.\n * @returns {Function} Returns the new spec function.\n */\n function baseConforms(source) {\n var props = keys(source);\n return function(object) {\n return baseConformsTo(object, source, props);\n };\n }\n\n /**\n * The base implementation of `_.conformsTo` which accepts `props` to check.\n *\n * @private\n * @param {Object} object The object to inspect.\n * @param {Object} source The object of property predicates to conform to.\n * @returns {boolean} Returns `true` if `object` conforms, else `false`.\n */\n function baseConformsTo(object, source, props) {\n var length = props.length;\n if (object == null) {\n return !length;\n }\n object = Object(object);\n while (length--) {\n var key = props[length],\n predicate = source[key],\n value = object[key];\n\n if ((value === undefined && !(key in object)) || !predicate(value)) {\n return false;\n }\n }\n return true;\n }\n\n /**\n * The base implementation of `_.delay` and `_.defer` which accepts `args`\n * to provide to `func`.\n *\n * @private\n * @param {Function} func The function to delay.\n * @param {number} wait The number of milliseconds to delay invocation.\n * @param {Array} args The arguments to provide to `func`.\n * @returns {number|Object} Returns the timer id or timeout object.\n */\n function baseDelay(func, wait, args) {\n if (typeof func != 'function') {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n return setTimeout(function() { func.apply(undefined, args); }, wait);\n }\n\n /**\n * The base implementation of methods like `_.difference` without support\n * for excluding multiple arrays or iteratee shorthands.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {Array} values The values to exclude.\n * @param {Function} [iteratee] The iteratee invoked per element.\n * @param {Function} [comparator] The comparator invoked per element.\n * @returns {Array} Returns the new array of filtered values.\n */\n function baseDifference(array, values, iteratee, comparator) {\n var index = -1,\n includes = arrayIncludes,\n isCommon = true,\n length = array.length,\n result = [],\n valuesLength = values.length;\n\n if (!length) {\n return result;\n }\n if (iteratee) {\n values = arrayMap(values, baseUnary(iteratee));\n }\n if (comparator) {\n includes = arrayIncludesWith;\n isCommon = false;\n }\n else if (values.length >= LARGE_ARRAY_SIZE) {\n includes = cacheHas;\n isCommon = false;\n values = new SetCache(values);\n }\n outer:\n while (++index < length) {\n var value = array[index],\n computed = iteratee == null ? value : iteratee(value);\n\n value = (comparator || value !== 0) ? value : 0;\n if (isCommon && computed === computed) {\n var valuesIndex = valuesLength;\n while (valuesIndex--) {\n if (values[valuesIndex] === computed) {\n continue outer;\n }\n }\n result.push(value);\n }\n else if (!includes(values, computed, comparator)) {\n result.push(value);\n }\n }\n return result;\n }\n\n /**\n * The base implementation of `_.forEach` without support for iteratee shorthands.\n *\n * @private\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array|Object} Returns `collection`.\n */\n var baseEach = createBaseEach(baseForOwn);\n\n /**\n * The base implementation of `_.forEachRight` without support for iteratee shorthands.\n *\n * @private\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array|Object} Returns `collection`.\n */\n var baseEachRight = createBaseEach(baseForOwnRight, true);\n\n /**\n * The base implementation of `_.every` without support for iteratee shorthands.\n *\n * @private\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} predicate The function invoked per iteration.\n * @returns {boolean} Returns `true` if all elements pass the predicate check,\n * else `false`\n */\n function baseEvery(collection, predicate) {\n var result = true;\n baseEach(collection, function(value, index, collection) {\n result = !!predicate(value, index, collection);\n return result;\n });\n return result;\n }\n\n /**\n * The base implementation of methods like `_.max` and `_.min` which accepts a\n * `comparator` to determine the extremum value.\n *\n * @private\n * @param {Array} array The array to iterate over.\n * @param {Function} iteratee The iteratee invoked per iteration.\n * @param {Function} comparator The comparator used to compare values.\n * @returns {*} Returns the extremum value.\n */\n function baseExtremum(array, iteratee, comparator) {\n var index = -1,\n length = array.length;\n\n while (++index < length) {\n var value = array[index],\n current = iteratee(value);\n\n if (current != null && (computed === undefined\n ? (current === current && !isSymbol(current))\n : comparator(current, computed)\n )) {\n var computed = current,\n result = value;\n }\n }\n return result;\n }\n\n /**\n * The base implementation of `_.fill` without an iteratee call guard.\n *\n * @private\n * @param {Array} array The array to fill.\n * @param {*} value The value to fill `array` with.\n * @param {number} [start=0] The start position.\n * @param {number} [end=array.length] The end position.\n * @returns {Array} Returns `array`.\n */\n function baseFill(array, value, start, end) {\n var length = array.length;\n\n start = toInteger(start);\n if (start < 0) {\n start = -start > length ? 0 : (length + start);\n }\n end = (end === undefined || end > length) ? length : toInteger(end);\n if (end < 0) {\n end += length;\n }\n end = start > end ? 0 : toLength(end);\n while (start < end) {\n array[start++] = value;\n }\n return array;\n }\n\n /**\n * The base implementation of `_.filter` without support for iteratee shorthands.\n *\n * @private\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} predicate The function invoked per iteration.\n * @returns {Array} Returns the new filtered array.\n */\n function baseFilter(collection, predicate) {\n var result = [];\n baseEach(collection, function(value, index, collection) {\n if (predicate(value, index, collection)) {\n result.push(value);\n }\n });\n return result;\n }\n\n /**\n * The base implementation of `_.flatten` with support for restricting flattening.\n *\n * @private\n * @param {Array} array The array to flatten.\n * @param {number} depth The maximum recursion depth.\n * @param {boolean} [predicate=isFlattenable] The function invoked per iteration.\n * @param {boolean} [isStrict] Restrict to values that pass `predicate` checks.\n * @param {Array} [result=[]] The initial result value.\n * @returns {Array} Returns the new flattened array.\n */\n function baseFlatten(array, depth, predicate, isStrict, result) {\n var index = -1,\n length = array.length;\n\n predicate || (predicate = isFlattenable);\n result || (result = []);\n\n while (++index < length) {\n var value = array[index];\n if (depth > 0 && predicate(value)) {\n if (depth > 1) {\n // Recursively flatten arrays (susceptible to call stack limits).\n baseFlatten(value, depth - 1, predicate, isStrict, result);\n } else {\n arrayPush(result, value);\n }\n } else if (!isStrict) {\n result[result.length] = value;\n }\n }\n return result;\n }\n\n /**\n * The base implementation of `baseForOwn` which iterates over `object`\n * properties returned by `keysFunc` and invokes `iteratee` for each property.\n * Iteratee functions may exit iteration early by explicitly returning `false`.\n *\n * @private\n * @param {Object} object The object to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @param {Function} keysFunc The function to get the keys of `object`.\n * @returns {Object} Returns `object`.\n */\n var baseFor = createBaseFor();\n\n /**\n * This function is like `baseFor` except that it iterates over properties\n * in the opposite order.\n *\n * @private\n * @param {Object} object The object to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @param {Function} keysFunc The function to get the keys of `object`.\n * @returns {Object} Returns `object`.\n */\n var baseForRight = createBaseFor(true);\n\n /**\n * The base implementation of `_.forOwn` without support for iteratee shorthands.\n *\n * @private\n * @param {Object} object The object to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Object} Returns `object`.\n */\n function baseForOwn(object, iteratee) {\n return object && baseFor(object, iteratee, keys);\n }\n\n /**\n * The base implementation of `_.forOwnRight` without support for iteratee shorthands.\n *\n * @private\n * @param {Object} object The object to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Object} Returns `object`.\n */\n function baseForOwnRight(object, iteratee) {\n return object && baseForRight(object, iteratee, keys);\n }\n\n /**\n * The base implementation of `_.functions` which creates an array of\n * `object` function property names filtered from `props`.\n *\n * @private\n * @param {Object} object The object to inspect.\n * @param {Array} props The property names to filter.\n * @returns {Array} Returns the function names.\n */\n function baseFunctions(object, props) {\n return arrayFilter(props, function(key) {\n return isFunction(object[key]);\n });\n }\n\n /**\n * The base implementation of `_.get` without support for default values.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {Array|string} path The path of the property to get.\n * @returns {*} Returns the resolved value.\n */\n function baseGet(object, path) {\n path = castPath(path, object);\n\n var index = 0,\n length = path.length;\n\n while (object != null && index < length) {\n object = object[toKey(path[index++])];\n }\n return (index && index == length) ? object : undefined;\n }\n\n /**\n * The base implementation of `getAllKeys` and `getAllKeysIn` which uses\n * `keysFunc` and `symbolsFunc` to get the enumerable property names and\n * symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {Function} keysFunc The function to get the keys of `object`.\n * @param {Function} symbolsFunc The function to get the symbols of `object`.\n * @returns {Array} Returns the array of property names and symbols.\n */\n function baseGetAllKeys(object, keysFunc, symbolsFunc) {\n var result = keysFunc(object);\n return isArray(object) ? result : arrayPush(result, symbolsFunc(object));\n }\n\n /**\n * The base implementation of `getTag` without fallbacks for buggy environments.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the `toStringTag`.\n */\n function baseGetTag(value) {\n if (value == null) {\n return value === undefined ? undefinedTag : nullTag;\n }\n return (symToStringTag && symToStringTag in Object(value))\n ? getRawTag(value)\n : objectToString(value);\n }\n\n /**\n * The base implementation of `_.gt` which doesn't coerce arguments.\n *\n * @private\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if `value` is greater than `other`,\n * else `false`.\n */\n function baseGt(value, other) {\n return value > other;\n }\n\n /**\n * The base implementation of `_.has` without support for deep paths.\n *\n * @private\n * @param {Object} [object] The object to query.\n * @param {Array|string} key The key to check.\n * @returns {boolean} Returns `true` if `key` exists, else `false`.\n */\n function baseHas(object, key) {\n return object != null && hasOwnProperty.call(object, key);\n }\n\n /**\n * The base implementation of `_.hasIn` without support for deep paths.\n *\n * @private\n * @param {Object} [object] The object to query.\n * @param {Array|string} key The key to check.\n * @returns {boolean} Returns `true` if `key` exists, else `false`.\n */\n function baseHasIn(object, key) {\n return object != null && key in Object(object);\n }\n\n /**\n * The base implementation of `_.inRange` which doesn't coerce arguments.\n *\n * @private\n * @param {number} number The number to check.\n * @param {number} start The start of the range.\n * @param {number} end The end of the range.\n * @returns {boolean} Returns `true` if `number` is in the range, else `false`.\n */\n function baseInRange(number, start, end) {\n return number >= nativeMin(start, end) && number < nativeMax(start, end);\n }\n\n /**\n * The base implementation of methods like `_.intersection`, without support\n * for iteratee shorthands, that accepts an array of arrays to inspect.\n *\n * @private\n * @param {Array} arrays The arrays to inspect.\n * @param {Function} [iteratee] The iteratee invoked per element.\n * @param {Function} [comparator] The comparator invoked per element.\n * @returns {Array} Returns the new array of shared values.\n */\n function baseIntersection(arrays, iteratee, comparator) {\n var includes = comparator ? arrayIncludesWith : arrayIncludes,\n length = arrays[0].length,\n othLength = arrays.length,\n othIndex = othLength,\n caches = Array(othLength),\n maxLength = Infinity,\n result = [];\n\n while (othIndex--) {\n var array = arrays[othIndex];\n if (othIndex && iteratee) {\n array = arrayMap(array, baseUnary(iteratee));\n }\n maxLength = nativeMin(array.length, maxLength);\n caches[othIndex] = !comparator && (iteratee || (length >= 120 && array.length >= 120))\n ? new SetCache(othIndex && array)\n : undefined;\n }\n array = arrays[0];\n\n var index = -1,\n seen = caches[0];\n\n outer:\n while (++index < length && result.length < maxLength) {\n var value = array[index],\n computed = iteratee ? iteratee(value) : value;\n\n value = (comparator || value !== 0) ? value : 0;\n if (!(seen\n ? cacheHas(seen, computed)\n : includes(result, computed, comparator)\n )) {\n othIndex = othLength;\n while (--othIndex) {\n var cache = caches[othIndex];\n if (!(cache\n ? cacheHas(cache, computed)\n : includes(arrays[othIndex], computed, comparator))\n ) {\n continue outer;\n }\n }\n if (seen) {\n seen.push(computed);\n }\n result.push(value);\n }\n }\n return result;\n }\n\n /**\n * The base implementation of `_.invert` and `_.invertBy` which inverts\n * `object` with values transformed by `iteratee` and set by `setter`.\n *\n * @private\n * @param {Object} object The object to iterate over.\n * @param {Function} setter The function to set `accumulator` values.\n * @param {Function} iteratee The iteratee to transform values.\n * @param {Object} accumulator The initial inverted object.\n * @returns {Function} Returns `accumulator`.\n */\n function baseInverter(object, setter, iteratee, accumulator) {\n baseForOwn(object, function(value, key, object) {\n setter(accumulator, iteratee(value), key, object);\n });\n return accumulator;\n }\n\n /**\n * The base implementation of `_.invoke` without support for individual\n * method arguments.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {Array|string} path The path of the method to invoke.\n * @param {Array} args The arguments to invoke the method with.\n * @returns {*} Returns the result of the invoked method.\n */\n function baseInvoke(object, path, args) {\n path = castPath(path, object);\n object = parent(object, path);\n var func = object == null ? object : object[toKey(last(path))];\n return func == null ? undefined : apply(func, object, args);\n }\n\n /**\n * The base implementation of `_.isArguments`.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an `arguments` object,\n */\n function baseIsArguments(value) {\n return isObjectLike(value) && baseGetTag(value) == argsTag;\n }\n\n /**\n * The base implementation of `_.isArrayBuffer` without Node.js optimizations.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an array buffer, else `false`.\n */\n function baseIsArrayBuffer(value) {\n return isObjectLike(value) && baseGetTag(value) == arrayBufferTag;\n }\n\n /**\n * The base implementation of `_.isDate` without Node.js optimizations.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a date object, else `false`.\n */\n function baseIsDate(value) {\n return isObjectLike(value) && baseGetTag(value) == dateTag;\n }\n\n /**\n * The base implementation of `_.isEqual` which supports partial comparisons\n * and tracks traversed objects.\n *\n * @private\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @param {boolean} bitmask The bitmask flags.\n * 1 - Unordered comparison\n * 2 - Partial comparison\n * @param {Function} [customizer] The function to customize comparisons.\n * @param {Object} [stack] Tracks traversed `value` and `other` objects.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n */\n function baseIsEqual(value, other, bitmask, customizer, stack) {\n if (value === other) {\n return true;\n }\n if (value == null || other == null || (!isObjectLike(value) && !isObjectLike(other))) {\n return value !== value && other !== other;\n }\n return baseIsEqualDeep(value, other, bitmask, customizer, baseIsEqual, stack);\n }\n\n /**\n * A specialized version of `baseIsEqual` for arrays and objects which performs\n * deep comparisons and tracks traversed objects enabling objects with circular\n * references to be compared.\n *\n * @private\n * @param {Object} object The object to compare.\n * @param {Object} other The other object to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} [stack] Tracks traversed `object` and `other` objects.\n * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\n */\n function baseIsEqualDeep(object, other, bitmask, customizer, equalFunc, stack) {\n var objIsArr = isArray(object),\n othIsArr = isArray(other),\n objTag = objIsArr ? arrayTag : getTag(object),\n othTag = othIsArr ? arrayTag : getTag(other);\n\n objTag = objTag == argsTag ? objectTag : objTag;\n othTag = othTag == argsTag ? objectTag : othTag;\n\n var objIsObj = objTag == objectTag,\n othIsObj = othTag == objectTag,\n isSameTag = objTag == othTag;\n\n if (isSameTag && isBuffer(object)) {\n if (!isBuffer(other)) {\n return false;\n }\n objIsArr = true;\n objIsObj = false;\n }\n if (isSameTag && !objIsObj) {\n stack || (stack = new Stack);\n return (objIsArr || isTypedArray(object))\n ? equalArrays(object, other, bitmask, customizer, equalFunc, stack)\n : equalByTag(object, other, objTag, bitmask, customizer, equalFunc, stack);\n }\n if (!(bitmask & COMPARE_PARTIAL_FLAG)) {\n var objIsWrapped = objIsObj && hasOwnProperty.call(object, '__wrapped__'),\n othIsWrapped = othIsObj && hasOwnProperty.call(other, '__wrapped__');\n\n if (objIsWrapped || othIsWrapped) {\n var objUnwrapped = objIsWrapped ? object.value() : object,\n othUnwrapped = othIsWrapped ? other.value() : other;\n\n stack || (stack = new Stack);\n return equalFunc(objUnwrapped, othUnwrapped, bitmask, customizer, stack);\n }\n }\n if (!isSameTag) {\n return false;\n }\n stack || (stack = new Stack);\n return equalObjects(object, other, bitmask, customizer, equalFunc, stack);\n }\n\n /**\n * The base implementation of `_.isMap` without Node.js optimizations.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a map, else `false`.\n */\n function baseIsMap(value) {\n return isObjectLike(value) && getTag(value) == mapTag;\n }\n\n /**\n * The base implementation of `_.isMatch` without support for iteratee shorthands.\n *\n * @private\n * @param {Object} object The object to inspect.\n * @param {Object} source The object of property values to match.\n * @param {Array} matchData The property names, values, and compare flags to match.\n * @param {Function} [customizer] The function to customize comparisons.\n * @returns {boolean} Returns `true` if `object` is a match, else `false`.\n */\n function baseIsMatch(object, source, matchData, customizer) {\n var index = matchData.length,\n length = index,\n noCustomizer = !customizer;\n\n if (object == null) {\n return !length;\n }\n object = Object(object);\n while (index--) {\n var data = matchData[index];\n if ((noCustomizer && data[2])\n ? data[1] !== object[data[0]]\n : !(data[0] in object)\n ) {\n return false;\n }\n }\n while (++index < length) {\n data = matchData[index];\n var key = data[0],\n objValue = object[key],\n srcValue = data[1];\n\n if (noCustomizer && data[2]) {\n if (objValue === undefined && !(key in object)) {\n return false;\n }\n } else {\n var stack = new Stack;\n if (customizer) {\n var result = customizer(objValue, srcValue, key, object, source, stack);\n }\n if (!(result === undefined\n ? baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG, customizer, stack)\n : result\n )) {\n return false;\n }\n }\n }\n return true;\n }\n\n /**\n * The base implementation of `_.isNative` without bad shim checks.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a native function,\n * else `false`.\n */\n function baseIsNative(value) {\n if (!isObject(value) || isMasked(value)) {\n return false;\n }\n var pattern = isFunction(value) ? reIsNative : reIsHostCtor;\n return pattern.test(toSource(value));\n }\n\n /**\n * The base implementation of `_.isRegExp` without Node.js optimizations.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a regexp, else `false`.\n */\n function baseIsRegExp(value) {\n return isObjectLike(value) && baseGetTag(value) == regexpTag;\n }\n\n /**\n * The base implementation of `_.isSet` without Node.js optimizations.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a set, else `false`.\n */\n function baseIsSet(value) {\n return isObjectLike(value) && getTag(value) == setTag;\n }\n\n /**\n * The base implementation of `_.isTypedArray` without Node.js optimizations.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.\n */\n function baseIsTypedArray(value) {\n return isObjectLike(value) &&\n isLength(value.length) && !!typedArrayTags[baseGetTag(value)];\n }\n\n /**\n * The base implementation of `_.iteratee`.\n *\n * @private\n * @param {*} [value=_.identity] The value to convert to an iteratee.\n * @returns {Function} Returns the iteratee.\n */\n function baseIteratee(value) {\n // Don't store the `typeof` result in a variable to avoid a JIT bug in Safari 9.\n // See https://bugs.webkit.org/show_bug.cgi?id=156034 for more details.\n if (typeof value == 'function') {\n return value;\n }\n if (value == null) {\n return identity;\n }\n if (typeof value == 'object') {\n return isArray(value)\n ? baseMatchesProperty(value[0], value[1])\n : baseMatches(value);\n }\n return property(value);\n }\n\n /**\n * The base implementation of `_.keys` which doesn't treat sparse arrays as dense.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n */\n function baseKeys(object) {\n if (!isPrototype(object)) {\n return nativeKeys(object);\n }\n var result = [];\n for (var key in Object(object)) {\n if (hasOwnProperty.call(object, key) && key != 'constructor') {\n result.push(key);\n }\n }\n return result;\n }\n\n /**\n * The base implementation of `_.keysIn` which doesn't treat sparse arrays as dense.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n */\n function baseKeysIn(object) {\n if (!isObject(object)) {\n return nativeKeysIn(object);\n }\n var isProto = isPrototype(object),\n result = [];\n\n for (var key in object) {\n if (!(key == 'constructor' && (isProto || !hasOwnProperty.call(object, key)))) {\n result.push(key);\n }\n }\n return result;\n }\n\n /**\n * The base implementation of `_.lt` which doesn't coerce arguments.\n *\n * @private\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if `value` is less than `other`,\n * else `false`.\n */\n function baseLt(value, other) {\n return value < other;\n }\n\n /**\n * The base implementation of `_.map` without support for iteratee shorthands.\n *\n * @private\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array} Returns the new mapped array.\n */\n function baseMap(collection, iteratee) {\n var index = -1,\n result = isArrayLike(collection) ? Array(collection.length) : [];\n\n baseEach(collection, function(value, key, collection) {\n result[++index] = iteratee(value, key, collection);\n });\n return result;\n }\n\n /**\n * The base implementation of `_.matches` which doesn't clone `source`.\n *\n * @private\n * @param {Object} source The object of property values to match.\n * @returns {Function} Returns the new spec function.\n */\n function baseMatches(source) {\n var matchData = getMatchData(source);\n if (matchData.length == 1 && matchData[0][2]) {\n return matchesStrictComparable(matchData[0][0], matchData[0][1]);\n }\n return function(object) {\n return object === source || baseIsMatch(object, source, matchData);\n };\n }\n\n /**\n * The base implementation of `_.matchesProperty` which doesn't clone `srcValue`.\n *\n * @private\n * @param {string} path The path of the property to get.\n * @param {*} srcValue The value to match.\n * @returns {Function} Returns the new spec function.\n */\n function baseMatchesProperty(path, srcValue) {\n if (isKey(path) && isStrictComparable(srcValue)) {\n return matchesStrictComparable(toKey(path), srcValue);\n }\n return function(object) {\n var objValue = get(object, path);\n return (objValue === undefined && objValue === srcValue)\n ? hasIn(object, path)\n : baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG);\n };\n }\n\n /**\n * The base implementation of `_.merge` without support for multiple sources.\n *\n * @private\n * @param {Object} object The destination object.\n * @param {Object} source The source object.\n * @param {number} srcIndex The index of `source`.\n * @param {Function} [customizer] The function to customize merged values.\n * @param {Object} [stack] Tracks traversed source values and their merged\n * counterparts.\n */\n function baseMerge(object, source, srcIndex, customizer, stack) {\n if (object === source) {\n return;\n }\n baseFor(source, function(srcValue, key) {\n stack || (stack = new Stack);\n if (isObject(srcValue)) {\n baseMergeDeep(object, source, key, srcIndex, baseMerge, customizer, stack);\n }\n else {\n var newValue = customizer\n ? customizer(safeGet(object, key), srcValue, (key + ''), object, source, stack)\n : undefined;\n\n if (newValue === undefined) {\n newValue = srcValue;\n }\n assignMergeValue(object, key, newValue);\n }\n }, keysIn);\n }\n\n /**\n * A specialized version of `baseMerge` for arrays and objects which performs\n * deep merges and tracks traversed objects enabling objects with circular\n * references to be merged.\n *\n * @private\n * @param {Object} object The destination object.\n * @param {Object} source The source object.\n * @param {string} key The key of the value to merge.\n * @param {number} srcIndex The index of `source`.\n * @param {Function} mergeFunc The function to merge values.\n * @param {Function} [customizer] The function to customize assigned values.\n * @param {Object} [stack] Tracks traversed source values and their merged\n * counterparts.\n */\n function baseMergeDeep(object, source, key, srcIndex, mergeFunc, customizer, stack) {\n var objValue = safeGet(object, key),\n srcValue = safeGet(source, key),\n stacked = stack.get(srcValue);\n\n if (stacked) {\n assignMergeValue(object, key, stacked);\n return;\n }\n var newValue = customizer\n ? customizer(objValue, srcValue, (key + ''), object, source, stack)\n : undefined;\n\n var isCommon = newValue === undefined;\n\n if (isCommon) {\n var isArr = isArray(srcValue),\n isBuff = !isArr && isBuffer(srcValue),\n isTyped = !isArr && !isBuff && isTypedArray(srcValue);\n\n newValue = srcValue;\n if (isArr || isBuff || isTyped) {\n if (isArray(objValue)) {\n newValue = objValue;\n }\n else if (isArrayLikeObject(objValue)) {\n newValue = copyArray(objValue);\n }\n else if (isBuff) {\n isCommon = false;\n newValue = cloneBuffer(srcValue, true);\n }\n else if (isTyped) {\n isCommon = false;\n newValue = cloneTypedArray(srcValue, true);\n }\n else {\n newValue = [];\n }\n }\n else if (isPlainObject(srcValue) || isArguments(srcValue)) {\n newValue = objValue;\n if (isArguments(objValue)) {\n newValue = toPlainObject(objValue);\n }\n else if (!isObject(objValue) || isFunction(objValue)) {\n newValue = initCloneObject(srcValue);\n }\n }\n else {\n isCommon = false;\n }\n }\n if (isCommon) {\n // Recursively merge objects and arrays (susceptible to call stack limits).\n stack.set(srcValue, newValue);\n mergeFunc(newValue, srcValue, srcIndex, customizer, stack);\n stack['delete'](srcValue);\n }\n assignMergeValue(object, key, newValue);\n }\n\n /**\n * The base implementation of `_.nth` which doesn't coerce arguments.\n *\n * @private\n * @param {Array} array The array to query.\n * @param {number} n The index of the element to return.\n * @returns {*} Returns the nth element of `array`.\n */\n function baseNth(array, n) {\n var length = array.length;\n if (!length) {\n return;\n }\n n += n < 0 ? length : 0;\n return isIndex(n, length) ? array[n] : undefined;\n }\n\n /**\n * The base implementation of `_.orderBy` without param guards.\n *\n * @private\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function[]|Object[]|string[]} iteratees The iteratees to sort by.\n * @param {string[]} orders The sort orders of `iteratees`.\n * @returns {Array} Returns the new sorted array.\n */\n function baseOrderBy(collection, iteratees, orders) {\n if (iteratees.length) {\n iteratees = arrayMap(iteratees, function(iteratee) {\n if (isArray(iteratee)) {\n return function(value) {\n return baseGet(value, iteratee.length === 1 ? iteratee[0] : iteratee);\n }\n }\n return iteratee;\n });\n } else {\n iteratees = [identity];\n }\n\n var index = -1;\n iteratees = arrayMap(iteratees, baseUnary(getIteratee()));\n\n var result = baseMap(collection, function(value, key, collection) {\n var criteria = arrayMap(iteratees, function(iteratee) {\n return iteratee(value);\n });\n return { 'criteria': criteria, 'index': ++index, 'value': value };\n });\n\n return baseSortBy(result, function(object, other) {\n return compareMultiple(object, other, orders);\n });\n }\n\n /**\n * The base implementation of `_.pick` without support for individual\n * property identifiers.\n *\n * @private\n * @param {Object} object The source object.\n * @param {string[]} paths The property paths to pick.\n * @returns {Object} Returns the new object.\n */\n function basePick(object, paths) {\n return basePickBy(object, paths, function(value, path) {\n return hasIn(object, path);\n });\n }\n\n /**\n * The base implementation of `_.pickBy` without support for iteratee shorthands.\n *\n * @private\n * @param {Object} object The source object.\n * @param {string[]} paths The property paths to pick.\n * @param {Function} predicate The function invoked per property.\n * @returns {Object} Returns the new object.\n */\n function basePickBy(object, paths, predicate) {\n var index = -1,\n length = paths.length,\n result = {};\n\n while (++index < length) {\n var path = paths[index],\n value = baseGet(object, path);\n\n if (predicate(value, path)) {\n baseSet(result, castPath(path, object), value);\n }\n }\n return result;\n }\n\n /**\n * A specialized version of `baseProperty` which supports deep paths.\n *\n * @private\n * @param {Array|string} path The path of the property to get.\n * @returns {Function} Returns the new accessor function.\n */\n function basePropertyDeep(path) {\n return function(object) {\n return baseGet(object, path);\n };\n }\n\n /**\n * The base implementation of `_.pullAllBy` without support for iteratee\n * shorthands.\n *\n * @private\n * @param {Array} array The array to modify.\n * @param {Array} values The values to remove.\n * @param {Function} [iteratee] The iteratee invoked per element.\n * @param {Function} [comparator] The comparator invoked per element.\n * @returns {Array} Returns `array`.\n */\n function basePullAll(array, values, iteratee, comparator) {\n var indexOf = comparator ? baseIndexOfWith : baseIndexOf,\n index = -1,\n length = values.length,\n seen = array;\n\n if (array === values) {\n values = copyArray(values);\n }\n if (iteratee) {\n seen = arrayMap(array, baseUnary(iteratee));\n }\n while (++index < length) {\n var fromIndex = 0,\n value = values[index],\n computed = iteratee ? iteratee(value) : value;\n\n while ((fromIndex = indexOf(seen, computed, fromIndex, comparator)) > -1) {\n if (seen !== array) {\n splice.call(seen, fromIndex, 1);\n }\n splice.call(array, fromIndex, 1);\n }\n }\n return array;\n }\n\n /**\n * The base implementation of `_.pullAt` without support for individual\n * indexes or capturing the removed elements.\n *\n * @private\n * @param {Array} array The array to modify.\n * @param {number[]} indexes The indexes of elements to remove.\n * @returns {Array} Returns `array`.\n */\n function basePullAt(array, indexes) {\n var length = array ? indexes.length : 0,\n lastIndex = length - 1;\n\n while (length--) {\n var index = indexes[length];\n if (length == lastIndex || index !== previous) {\n var previous = index;\n if (isIndex(index)) {\n splice.call(array, index, 1);\n } else {\n baseUnset(array, index);\n }\n }\n }\n return array;\n }\n\n /**\n * The base implementation of `_.random` without support for returning\n * floating-point numbers.\n *\n * @private\n * @param {number} lower The lower bound.\n * @param {number} upper The upper bound.\n * @returns {number} Returns the random number.\n */\n function baseRandom(lower, upper) {\n return lower + nativeFloor(nativeRandom() * (upper - lower + 1));\n }\n\n /**\n * The base implementation of `_.range` and `_.rangeRight` which doesn't\n * coerce arguments.\n *\n * @private\n * @param {number} start The start of the range.\n * @param {number} end The end of the range.\n * @param {number} step The value to increment or decrement by.\n * @param {boolean} [fromRight] Specify iterating from right to left.\n * @returns {Array} Returns the range of numbers.\n */\n function baseRange(start, end, step, fromRight) {\n var index = -1,\n length = nativeMax(nativeCeil((end - start) / (step || 1)), 0),\n result = Array(length);\n\n while (length--) {\n result[fromRight ? length : ++index] = start;\n start += step;\n }\n return result;\n }\n\n /**\n * The base implementation of `_.repeat` which doesn't coerce arguments.\n *\n * @private\n * @param {string} string The string to repeat.\n * @param {number} n The number of times to repeat the string.\n * @returns {string} Returns the repeated string.\n */\n function baseRepeat(string, n) {\n var result = '';\n if (!string || n < 1 || n > MAX_SAFE_INTEGER) {\n return result;\n }\n // Leverage the exponentiation by squaring algorithm for a faster repeat.\n // See https://en.wikipedia.org/wiki/Exponentiation_by_squaring for more details.\n do {\n if (n % 2) {\n result += string;\n }\n n = nativeFloor(n / 2);\n if (n) {\n string += string;\n }\n } while (n);\n\n return result;\n }\n\n /**\n * The base implementation of `_.rest` which doesn't validate or coerce arguments.\n *\n * @private\n * @param {Function} func The function to apply a rest parameter to.\n * @param {number} [start=func.length-1] The start position of the rest parameter.\n * @returns {Function} Returns the new function.\n */\n function baseRest(func, start) {\n return setToString(overRest(func, start, identity), func + '');\n }\n\n /**\n * The base implementation of `_.sample`.\n *\n * @private\n * @param {Array|Object} collection The collection to sample.\n * @returns {*} Returns the random element.\n */\n function baseSample(collection) {\n return arraySample(values(collection));\n }\n\n /**\n * The base implementation of `_.sampleSize` without param guards.\n *\n * @private\n * @param {Array|Object} collection The collection to sample.\n * @param {number} n The number of elements to sample.\n * @returns {Array} Returns the random elements.\n */\n function baseSampleSize(collection, n) {\n var array = values(collection);\n return shuffleSelf(array, baseClamp(n, 0, array.length));\n }\n\n /**\n * The base implementation of `_.set`.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {Array|string} path The path of the property to set.\n * @param {*} value The value to set.\n * @param {Function} [customizer] The function to customize path creation.\n * @returns {Object} Returns `object`.\n */\n function baseSet(object, path, value, customizer) {\n if (!isObject(object)) {\n return object;\n }\n path = castPath(path, object);\n\n var index = -1,\n length = path.length,\n lastIndex = length - 1,\n nested = object;\n\n while (nested != null && ++index < length) {\n var key = toKey(path[index]),\n newValue = value;\n\n if (key === '__proto__' || key === 'constructor' || key === 'prototype') {\n return object;\n }\n\n if (index != lastIndex) {\n var objValue = nested[key];\n newValue = customizer ? customizer(objValue, key, nested) : undefined;\n if (newValue === undefined) {\n newValue = isObject(objValue)\n ? objValue\n : (isIndex(path[index + 1]) ? [] : {});\n }\n }\n assignValue(nested, key, newValue);\n nested = nested[key];\n }\n return object;\n }\n\n /**\n * The base implementation of `setData` without support for hot loop shorting.\n *\n * @private\n * @param {Function} func The function to associate metadata with.\n * @param {*} data The metadata.\n * @returns {Function} Returns `func`.\n */\n var baseSetData = !metaMap ? identity : function(func, data) {\n metaMap.set(func, data);\n return func;\n };\n\n /**\n * The base implementation of `setToString` without support for hot loop shorting.\n *\n * @private\n * @param {Function} func The function to modify.\n * @param {Function} string The `toString` result.\n * @returns {Function} Returns `func`.\n */\n var baseSetToString = !defineProperty ? identity : function(func, string) {\n return defineProperty(func, 'toString', {\n 'configurable': true,\n 'enumerable': false,\n 'value': constant(string),\n 'writable': true\n });\n };\n\n /**\n * The base implementation of `_.shuffle`.\n *\n * @private\n * @param {Array|Object} collection The collection to shuffle.\n * @returns {Array} Returns the new shuffled array.\n */\n function baseShuffle(collection) {\n return shuffleSelf(values(collection));\n }\n\n /**\n * The base implementation of `_.slice` without an iteratee call guard.\n *\n * @private\n * @param {Array} array The array to slice.\n * @param {number} [start=0] The start position.\n * @param {number} [end=array.length] The end position.\n * @returns {Array} Returns the slice of `array`.\n */\n function baseSlice(array, start, end) {\n var index = -1,\n length = array.length;\n\n if (start < 0) {\n start = -start > length ? 0 : (length + start);\n }\n end = end > length ? length : end;\n if (end < 0) {\n end += length;\n }\n length = start > end ? 0 : ((end - start) >>> 0);\n start >>>= 0;\n\n var result = Array(length);\n while (++index < length) {\n result[index] = array[index + start];\n }\n return result;\n }\n\n /**\n * The base implementation of `_.some` without support for iteratee shorthands.\n *\n * @private\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} predicate The function invoked per iteration.\n * @returns {boolean} Returns `true` if any element passes the predicate check,\n * else `false`.\n */\n function baseSome(collection, predicate) {\n var result;\n\n baseEach(collection, function(value, index, collection) {\n result = predicate(value, index, collection);\n return !result;\n });\n return !!result;\n }\n\n /**\n * The base implementation of `_.sortedIndex` and `_.sortedLastIndex` which\n * performs a binary search of `array` to determine the index at which `value`\n * should be inserted into `array` in order to maintain its sort order.\n *\n * @private\n * @param {Array} array The sorted array to inspect.\n * @param {*} value The value to evaluate.\n * @param {boolean} [retHighest] Specify returning the highest qualified index.\n * @returns {number} Returns the index at which `value` should be inserted\n * into `array`.\n */\n function baseSortedIndex(array, value, retHighest) {\n var low = 0,\n high = array == null ? low : array.length;\n\n if (typeof value == 'number' && value === value && high <= HALF_MAX_ARRAY_LENGTH) {\n while (low < high) {\n var mid = (low + high) >>> 1,\n computed = array[mid];\n\n if (computed !== null && !isSymbol(computed) &&\n (retHighest ? (computed <= value) : (computed < value))) {\n low = mid + 1;\n } else {\n high = mid;\n }\n }\n return high;\n }\n return baseSortedIndexBy(array, value, identity, retHighest);\n }\n\n /**\n * The base implementation of `_.sortedIndexBy` and `_.sortedLastIndexBy`\n * which invokes `iteratee` for `value` and each element of `array` to compute\n * their sort ranking. The iteratee is invoked with one argument; (value).\n *\n * @private\n * @param {Array} array The sorted array to inspect.\n * @param {*} value The value to evaluate.\n * @param {Function} iteratee The iteratee invoked per element.\n * @param {boolean} [retHighest] Specify returning the highest qualified index.\n * @returns {number} Returns the index at which `value` should be inserted\n * into `array`.\n */\n function baseSortedIndexBy(array, value, iteratee, retHighest) {\n var low = 0,\n high = array == null ? 0 : array.length;\n if (high === 0) {\n return 0;\n }\n\n value = iteratee(value);\n var valIsNaN = value !== value,\n valIsNull = value === null,\n valIsSymbol = isSymbol(value),\n valIsUndefined = value === undefined;\n\n while (low < high) {\n var mid = nativeFloor((low + high) / 2),\n computed = iteratee(array[mid]),\n othIsDefined = computed !== undefined,\n othIsNull = computed === null,\n othIsReflexive = computed === computed,\n othIsSymbol = isSymbol(computed);\n\n if (valIsNaN) {\n var setLow = retHighest || othIsReflexive;\n } else if (valIsUndefined) {\n setLow = othIsReflexive && (retHighest || othIsDefined);\n } else if (valIsNull) {\n setLow = othIsReflexive && othIsDefined && (retHighest || !othIsNull);\n } else if (valIsSymbol) {\n setLow = othIsReflexive && othIsDefined && !othIsNull && (retHighest || !othIsSymbol);\n } else if (othIsNull || othIsSymbol) {\n setLow = false;\n } else {\n setLow = retHighest ? (computed <= value) : (computed < value);\n }\n if (setLow) {\n low = mid + 1;\n } else {\n high = mid;\n }\n }\n return nativeMin(high, MAX_ARRAY_INDEX);\n }\n\n /**\n * The base implementation of `_.sortedUniq` and `_.sortedUniqBy` without\n * support for iteratee shorthands.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {Function} [iteratee] The iteratee invoked per element.\n * @returns {Array} Returns the new duplicate free array.\n */\n function baseSortedUniq(array, iteratee) {\n var index = -1,\n length = array.length,\n resIndex = 0,\n result = [];\n\n while (++index < length) {\n var value = array[index],\n computed = iteratee ? iteratee(value) : value;\n\n if (!index || !eq(computed, seen)) {\n var seen = computed;\n result[resIndex++] = value === 0 ? 0 : value;\n }\n }\n return result;\n }\n\n /**\n * The base implementation of `_.toNumber` which doesn't ensure correct\n * conversions of binary, hexadecimal, or octal string values.\n *\n * @private\n * @param {*} value The value to process.\n * @returns {number} Returns the number.\n */\n function baseToNumber(value) {\n if (typeof value == 'number') {\n return value;\n }\n if (isSymbol(value)) {\n return NAN;\n }\n return +value;\n }\n\n /**\n * The base implementation of `_.toString` which doesn't convert nullish\n * values to empty strings.\n *\n * @private\n * @param {*} value The value to process.\n * @returns {string} Returns the string.\n */\n function baseToString(value) {\n // Exit early for strings to avoid a performance hit in some environments.\n if (typeof value == 'string') {\n return value;\n }\n if (isArray(value)) {\n // Recursively convert values (susceptible to call stack limits).\n return arrayMap(value, baseToString) + '';\n }\n if (isSymbol(value)) {\n return symbolToString ? symbolToString.call(value) : '';\n }\n var result = (value + '');\n return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;\n }\n\n /**\n * The base implementation of `_.uniqBy` without support for iteratee shorthands.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {Function} [iteratee] The iteratee invoked per element.\n * @param {Function} [comparator] The comparator invoked per element.\n * @returns {Array} Returns the new duplicate free array.\n */\n function baseUniq(array, iteratee, comparator) {\n var index = -1,\n includes = arrayIncludes,\n length = array.length,\n isCommon = true,\n result = [],\n seen = result;\n\n if (comparator) {\n isCommon = false;\n includes = arrayIncludesWith;\n }\n else if (length >= LARGE_ARRAY_SIZE) {\n var set = iteratee ? null : createSet(array);\n if (set) {\n return setToArray(set);\n }\n isCommon = false;\n includes = cacheHas;\n seen = new SetCache;\n }\n else {\n seen = iteratee ? [] : result;\n }\n outer:\n while (++index < length) {\n var value = array[index],\n computed = iteratee ? iteratee(value) : value;\n\n value = (comparator || value !== 0) ? value : 0;\n if (isCommon && computed === computed) {\n var seenIndex = seen.length;\n while (seenIndex--) {\n if (seen[seenIndex] === computed) {\n continue outer;\n }\n }\n if (iteratee) {\n seen.push(computed);\n }\n result.push(value);\n }\n else if (!includes(seen, computed, comparator)) {\n if (seen !== result) {\n seen.push(computed);\n }\n result.push(value);\n }\n }\n return result;\n }\n\n /**\n * The base implementation of `_.unset`.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {Array|string} path The property path to unset.\n * @returns {boolean} Returns `true` if the property is deleted, else `false`.\n */\n function baseUnset(object, path) {\n path = castPath(path, object);\n object = parent(object, path);\n return object == null || delete object[toKey(last(path))];\n }\n\n /**\n * The base implementation of `_.update`.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {Array|string} path The path of the property to update.\n * @param {Function} updater The function to produce the updated value.\n * @param {Function} [customizer] The function to customize path creation.\n * @returns {Object} Returns `object`.\n */\n function baseUpdate(object, path, updater, customizer) {\n return baseSet(object, path, updater(baseGet(object, path)), customizer);\n }\n\n /**\n * The base implementation of methods like `_.dropWhile` and `_.takeWhile`\n * without support for iteratee shorthands.\n *\n * @private\n * @param {Array} array The array to query.\n * @param {Function} predicate The function invoked per iteration.\n * @param {boolean} [isDrop] Specify dropping elements instead of taking them.\n * @param {boolean} [fromRight] Specify iterating from right to left.\n * @returns {Array} Returns the slice of `array`.\n */\n function baseWhile(array, predicate, isDrop, fromRight) {\n var length = array.length,\n index = fromRight ? length : -1;\n\n while ((fromRight ? index-- : ++index < length) &&\n predicate(array[index], index, array)) {}\n\n return isDrop\n ? baseSlice(array, (fromRight ? 0 : index), (fromRight ? index + 1 : length))\n : baseSlice(array, (fromRight ? index + 1 : 0), (fromRight ? length : index));\n }\n\n /**\n * The base implementation of `wrapperValue` which returns the result of\n * performing a sequence of actions on the unwrapped `value`, where each\n * successive action is supplied the return value of the previous.\n *\n * @private\n * @param {*} value The unwrapped value.\n * @param {Array} actions Actions to perform to resolve the unwrapped value.\n * @returns {*} Returns the resolved value.\n */\n function baseWrapperValue(value, actions) {\n var result = value;\n if (result instanceof LazyWrapper) {\n result = result.value();\n }\n return arrayReduce(actions, function(result, action) {\n return action.func.apply(action.thisArg, arrayPush([result], action.args));\n }, result);\n }\n\n /**\n * The base implementation of methods like `_.xor`, without support for\n * iteratee shorthands, that accepts an array of arrays to inspect.\n *\n * @private\n * @param {Array} arrays The arrays to inspect.\n * @param {Function} [iteratee] The iteratee invoked per element.\n * @param {Function} [comparator] The comparator invoked per element.\n * @returns {Array} Returns the new array of values.\n */\n function baseXor(arrays, iteratee, comparator) {\n var length = arrays.length;\n if (length < 2) {\n return length ? baseUniq(arrays[0]) : [];\n }\n var index = -1,\n result = Array(length);\n\n while (++index < length) {\n var array = arrays[index],\n othIndex = -1;\n\n while (++othIndex < length) {\n if (othIndex != index) {\n result[index] = baseDifference(result[index] || array, arrays[othIndex], iteratee, comparator);\n }\n }\n }\n return baseUniq(baseFlatten(result, 1), iteratee, comparator);\n }\n\n /**\n * This base implementation of `_.zipObject` which assigns values using `assignFunc`.\n *\n * @private\n * @param {Array} props The property identifiers.\n * @param {Array} values The property values.\n * @param {Function} assignFunc The function to assign values.\n * @returns {Object} Returns the new object.\n */\n function baseZipObject(props, values, assignFunc) {\n var index = -1,\n length = props.length,\n valsLength = values.length,\n result = {};\n\n while (++index < length) {\n var value = index < valsLength ? values[index] : undefined;\n assignFunc(result, props[index], value);\n }\n return result;\n }\n\n /**\n * Casts `value` to an empty array if it's not an array like object.\n *\n * @private\n * @param {*} value The value to inspect.\n * @returns {Array|Object} Returns the cast array-like object.\n */\n function castArrayLikeObject(value) {\n return isArrayLikeObject(value) ? value : [];\n }\n\n /**\n * Casts `value` to `identity` if it's not a function.\n *\n * @private\n * @param {*} value The value to inspect.\n * @returns {Function} Returns cast function.\n */\n function castFunction(value) {\n return typeof value == 'function' ? value : identity;\n }\n\n /**\n * Casts `value` to a path array if it's not one.\n *\n * @private\n * @param {*} value The value to inspect.\n * @param {Object} [object] The object to query keys on.\n * @returns {Array} Returns the cast property path array.\n */\n function castPath(value, object) {\n if (isArray(value)) {\n return value;\n }\n return isKey(value, object) ? [value] : stringToPath(toString(value));\n }\n\n /**\n * A `baseRest` alias which can be replaced with `identity` by module\n * replacement plugins.\n *\n * @private\n * @type {Function}\n * @param {Function} func The function to apply a rest parameter to.\n * @returns {Function} Returns the new function.\n */\n var castRest = baseRest;\n\n /**\n * Casts `array` to a slice if it's needed.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {number} start The start position.\n * @param {number} [end=array.length] The end position.\n * @returns {Array} Returns the cast slice.\n */\n function castSlice(array, start, end) {\n var length = array.length;\n end = end === undefined ? length : end;\n return (!start && end >= length) ? array : baseSlice(array, start, end);\n }\n\n /**\n * A simple wrapper around the global [`clearTimeout`](https://mdn.io/clearTimeout).\n *\n * @private\n * @param {number|Object} id The timer id or timeout object of the timer to clear.\n */\n var clearTimeout = ctxClearTimeout || function(id) {\n return root.clearTimeout(id);\n };\n\n /**\n * Creates a clone of `buffer`.\n *\n * @private\n * @param {Buffer} buffer The buffer to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Buffer} Returns the cloned buffer.\n */\n function cloneBuffer(buffer, isDeep) {\n if (isDeep) {\n return buffer.slice();\n }\n var length = buffer.length,\n result = allocUnsafe ? allocUnsafe(length) : new buffer.constructor(length);\n\n buffer.copy(result);\n return result;\n }\n\n /**\n * Creates a clone of `arrayBuffer`.\n *\n * @private\n * @param {ArrayBuffer} arrayBuffer The array buffer to clone.\n * @returns {ArrayBuffer} Returns the cloned array buffer.\n */\n function cloneArrayBuffer(arrayBuffer) {\n var result = new arrayBuffer.constructor(arrayBuffer.byteLength);\n new Uint8Array(result).set(new Uint8Array(arrayBuffer));\n return result;\n }\n\n /**\n * Creates a clone of `dataView`.\n *\n * @private\n * @param {Object} dataView The data view to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Object} Returns the cloned data view.\n */\n function cloneDataView(dataView, isDeep) {\n var buffer = isDeep ? cloneArrayBuffer(dataView.buffer) : dataView.buffer;\n return new dataView.constructor(buffer, dataView.byteOffset, dataView.byteLength);\n }\n\n /**\n * Creates a clone of `regexp`.\n *\n * @private\n * @param {Object} regexp The regexp to clone.\n * @returns {Object} Returns the cloned regexp.\n */\n function cloneRegExp(regexp) {\n var result = new regexp.constructor(regexp.source, reFlags.exec(regexp));\n result.lastIndex = regexp.lastIndex;\n return result;\n }\n\n /**\n * Creates a clone of the `symbol` object.\n *\n * @private\n * @param {Object} symbol The symbol object to clone.\n * @returns {Object} Returns the cloned symbol object.\n */\n function cloneSymbol(symbol) {\n return symbolValueOf ? Object(symbolValueOf.call(symbol)) : {};\n }\n\n /**\n * Creates a clone of `typedArray`.\n *\n * @private\n * @param {Object} typedArray The typed array to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Object} Returns the cloned typed array.\n */\n function cloneTypedArray(typedArray, isDeep) {\n var buffer = isDeep ? cloneArrayBuffer(typedArray.buffer) : typedArray.buffer;\n return new typedArray.constructor(buffer, typedArray.byteOffset, typedArray.length);\n }\n\n /**\n * Compares values to sort them in ascending order.\n *\n * @private\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {number} Returns the sort order indicator for `value`.\n */\n function compareAscending(value, other) {\n if (value !== other) {\n var valIsDefined = value !== undefined,\n valIsNull = value === null,\n valIsReflexive = value === value,\n valIsSymbol = isSymbol(value);\n\n var othIsDefined = other !== undefined,\n othIsNull = other === null,\n othIsReflexive = other === other,\n othIsSymbol = isSymbol(other);\n\n if ((!othIsNull && !othIsSymbol && !valIsSymbol && value > other) ||\n (valIsSymbol && othIsDefined && othIsReflexive && !othIsNull && !othIsSymbol) ||\n (valIsNull && othIsDefined && othIsReflexive) ||\n (!valIsDefined && othIsReflexive) ||\n !valIsReflexive) {\n return 1;\n }\n if ((!valIsNull && !valIsSymbol && !othIsSymbol && value < other) ||\n (othIsSymbol && valIsDefined && valIsReflexive && !valIsNull && !valIsSymbol) ||\n (othIsNull && valIsDefined && valIsReflexive) ||\n (!othIsDefined && valIsReflexive) ||\n !othIsReflexive) {\n return -1;\n }\n }\n return 0;\n }\n\n /**\n * Used by `_.orderBy` to compare multiple properties of a value to another\n * and stable sort them.\n *\n * If `orders` is unspecified, all values are sorted in ascending order. Otherwise,\n * specify an order of \"desc\" for descending or \"asc\" for ascending sort order\n * of corresponding values.\n *\n * @private\n * @param {Object} object The object to compare.\n * @param {Object} other The other object to compare.\n * @param {boolean[]|string[]} orders The order to sort by for each property.\n * @returns {number} Returns the sort order indicator for `object`.\n */\n function compareMultiple(object, other, orders) {\n var index = -1,\n objCriteria = object.criteria,\n othCriteria = other.criteria,\n length = objCriteria.length,\n ordersLength = orders.length;\n\n while (++index < length) {\n var result = compareAscending(objCriteria[index], othCriteria[index]);\n if (result) {\n if (index >= ordersLength) {\n return result;\n }\n var order = orders[index];\n return result * (order == 'desc' ? -1 : 1);\n }\n }\n // Fixes an `Array#sort` bug in the JS engine embedded in Adobe applications\n // that causes it, under certain circumstances, to provide the same value for\n // `object` and `other`. See https://github.com/jashkenas/underscore/pull/1247\n // for more details.\n //\n // This also ensures a stable sort in V8 and other engines.\n // See https://bugs.chromium.org/p/v8/issues/detail?id=90 for more details.\n return object.index - other.index;\n }\n\n /**\n * Creates an array that is the composition of partially applied arguments,\n * placeholders, and provided arguments into a single array of arguments.\n *\n * @private\n * @param {Array} args The provided arguments.\n * @param {Array} partials The arguments to prepend to those provided.\n * @param {Array} holders The `partials` placeholder indexes.\n * @params {boolean} [isCurried] Specify composing for a curried function.\n * @returns {Array} Returns the new array of composed arguments.\n */\n function composeArgs(args, partials, holders, isCurried) {\n var argsIndex = -1,\n argsLength = args.length,\n holdersLength = holders.length,\n leftIndex = -1,\n leftLength = partials.length,\n rangeLength = nativeMax(argsLength - holdersLength, 0),\n result = Array(leftLength + rangeLength),\n isUncurried = !isCurried;\n\n while (++leftIndex < leftLength) {\n result[leftIndex] = partials[leftIndex];\n }\n while (++argsIndex < holdersLength) {\n if (isUncurried || argsIndex < argsLength) {\n result[holders[argsIndex]] = args[argsIndex];\n }\n }\n while (rangeLength--) {\n result[leftIndex++] = args[argsIndex++];\n }\n return result;\n }\n\n /**\n * This function is like `composeArgs` except that the arguments composition\n * is tailored for `_.partialRight`.\n *\n * @private\n * @param {Array} args The provided arguments.\n * @param {Array} partials The arguments to append to those provided.\n * @param {Array} holders The `partials` placeholder indexes.\n * @params {boolean} [isCurried] Specify composing for a curried function.\n * @returns {Array} Returns the new array of composed arguments.\n */\n function composeArgsRight(args, partials, holders, isCurried) {\n var argsIndex = -1,\n argsLength = args.length,\n holdersIndex = -1,\n holdersLength = holders.length,\n rightIndex = -1,\n rightLength = partials.length,\n rangeLength = nativeMax(argsLength - holdersLength, 0),\n result = Array(rangeLength + rightLength),\n isUncurried = !isCurried;\n\n while (++argsIndex < rangeLength) {\n result[argsIndex] = args[argsIndex];\n }\n var offset = argsIndex;\n while (++rightIndex < rightLength) {\n result[offset + rightIndex] = partials[rightIndex];\n }\n while (++holdersIndex < holdersLength) {\n if (isUncurried || argsIndex < argsLength) {\n result[offset + holders[holdersIndex]] = args[argsIndex++];\n }\n }\n return result;\n }\n\n /**\n * Copies the values of `source` to `array`.\n *\n * @private\n * @param {Array} source The array to copy values from.\n * @param {Array} [array=[]] The array to copy values to.\n * @returns {Array} Returns `array`.\n */\n function copyArray(source, array) {\n var index = -1,\n length = source.length;\n\n array || (array = Array(length));\n while (++index < length) {\n array[index] = source[index];\n }\n return array;\n }\n\n /**\n * Copies properties of `source` to `object`.\n *\n * @private\n * @param {Object} source The object to copy properties from.\n * @param {Array} props The property identifiers to copy.\n * @param {Object} [object={}] The object to copy properties to.\n * @param {Function} [customizer] The function to customize copied values.\n * @returns {Object} Returns `object`.\n */\n function copyObject(source, props, object, customizer) {\n var isNew = !object;\n object || (object = {});\n\n var index = -1,\n length = props.length;\n\n while (++index < length) {\n var key = props[index];\n\n var newValue = customizer\n ? customizer(object[key], source[key], key, object, source)\n : undefined;\n\n if (newValue === undefined) {\n newValue = source[key];\n }\n if (isNew) {\n baseAssignValue(object, key, newValue);\n } else {\n assignValue(object, key, newValue);\n }\n }\n return object;\n }\n\n /**\n * Copies own symbols of `source` to `object`.\n *\n * @private\n * @param {Object} source The object to copy symbols from.\n * @param {Object} [object={}] The object to copy symbols to.\n * @returns {Object} Returns `object`.\n */\n function copySymbols(source, object) {\n return copyObject(source, getSymbols(source), object);\n }\n\n /**\n * Copies own and inherited symbols of `source` to `object`.\n *\n * @private\n * @param {Object} source The object to copy symbols from.\n * @param {Object} [object={}] The object to copy symbols to.\n * @returns {Object} Returns `object`.\n */\n function copySymbolsIn(source, object) {\n return copyObject(source, getSymbolsIn(source), object);\n }\n\n /**\n * Creates a function like `_.groupBy`.\n *\n * @private\n * @param {Function} setter The function to set accumulator values.\n * @param {Function} [initializer] The accumulator object initializer.\n * @returns {Function} Returns the new aggregator function.\n */\n function createAggregator(setter, initializer) {\n return function(collection, iteratee) {\n var func = isArray(collection) ? arrayAggregator : baseAggregator,\n accumulator = initializer ? initializer() : {};\n\n return func(collection, setter, getIteratee(iteratee, 2), accumulator);\n };\n }\n\n /**\n * Creates a function like `_.assign`.\n *\n * @private\n * @param {Function} assigner The function to assign values.\n * @returns {Function} Returns the new assigner function.\n */\n function createAssigner(assigner) {\n return baseRest(function(object, sources) {\n var index = -1,\n length = sources.length,\n customizer = length > 1 ? sources[length - 1] : undefined,\n guard = length > 2 ? sources[2] : undefined;\n\n customizer = (assigner.length > 3 && typeof customizer == 'function')\n ? (length--, customizer)\n : undefined;\n\n if (guard && isIterateeCall(sources[0], sources[1], guard)) {\n customizer = length < 3 ? undefined : customizer;\n length = 1;\n }\n object = Object(object);\n while (++index < length) {\n var source = sources[index];\n if (source) {\n assigner(object, source, index, customizer);\n }\n }\n return object;\n });\n }\n\n /**\n * Creates a `baseEach` or `baseEachRight` function.\n *\n * @private\n * @param {Function} eachFunc The function to iterate over a collection.\n * @param {boolean} [fromRight] Specify iterating from right to left.\n * @returns {Function} Returns the new base function.\n */\n function createBaseEach(eachFunc, fromRight) {\n return function(collection, iteratee) {\n if (collection == null) {\n return collection;\n }\n if (!isArrayLike(collection)) {\n return eachFunc(collection, iteratee);\n }\n var length = collection.length,\n index = fromRight ? length : -1,\n iterable = Object(collection);\n\n while ((fromRight ? index-- : ++index < length)) {\n if (iteratee(iterable[index], index, iterable) === false) {\n break;\n }\n }\n return collection;\n };\n }\n\n /**\n * Creates a base function for methods like `_.forIn` and `_.forOwn`.\n *\n * @private\n * @param {boolean} [fromRight] Specify iterating from right to left.\n * @returns {Function} Returns the new base function.\n */\n function createBaseFor(fromRight) {\n return function(object, iteratee, keysFunc) {\n var index = -1,\n iterable = Object(object),\n props = keysFunc(object),\n length = props.length;\n\n while (length--) {\n var key = props[fromRight ? length : ++index];\n if (iteratee(iterable[key], key, iterable) === false) {\n break;\n }\n }\n return object;\n };\n }\n\n /**\n * Creates a function that wraps `func` to invoke it with the optional `this`\n * binding of `thisArg`.\n *\n * @private\n * @param {Function} func The function to wrap.\n * @param {number} bitmask The bitmask flags. See `createWrap` for more details.\n * @param {*} [thisArg] The `this` binding of `func`.\n * @returns {Function} Returns the new wrapped function.\n */\n function createBind(func, bitmask, thisArg) {\n var isBind = bitmask & WRAP_BIND_FLAG,\n Ctor = createCtor(func);\n\n function wrapper() {\n var fn = (this && this !== root && this instanceof wrapper) ? Ctor : func;\n return fn.apply(isBind ? thisArg : this, arguments);\n }\n return wrapper;\n }\n\n /**\n * Creates a function like `_.lowerFirst`.\n *\n * @private\n * @param {string} methodName The name of the `String` case method to use.\n * @returns {Function} Returns the new case function.\n */\n function createCaseFirst(methodName) {\n return function(string) {\n string = toString(string);\n\n var strSymbols = hasUnicode(string)\n ? stringToArray(string)\n : undefined;\n\n var chr = strSymbols\n ? strSymbols[0]\n : string.charAt(0);\n\n var trailing = strSymbols\n ? castSlice(strSymbols, 1).join('')\n : string.slice(1);\n\n return chr[methodName]() + trailing;\n };\n }\n\n /**\n * Creates a function like `_.camelCase`.\n *\n * @private\n * @param {Function} callback The function to combine each word.\n * @returns {Function} Returns the new compounder function.\n */\n function createCompounder(callback) {\n return function(string) {\n return arrayReduce(words(deburr(string).replace(reApos, '')), callback, '');\n };\n }\n\n /**\n * Creates a function that produces an instance of `Ctor` regardless of\n * whether it was invoked as part of a `new` expression or by `call` or `apply`.\n *\n * @private\n * @param {Function} Ctor The constructor to wrap.\n * @returns {Function} Returns the new wrapped function.\n */\n function createCtor(Ctor) {\n return function() {\n // Use a `switch` statement to work with class constructors. See\n // http://ecma-international.org/ecma-262/7.0/#sec-ecmascript-function-objects-call-thisargument-argumentslist\n // for more details.\n var args = arguments;\n switch (args.length) {\n case 0: return new Ctor;\n case 1: return new Ctor(args[0]);\n case 2: return new Ctor(args[0], args[1]);\n case 3: return new Ctor(args[0], args[1], args[2]);\n case 4: return new Ctor(args[0], args[1], args[2], args[3]);\n case 5: return new Ctor(args[0], args[1], args[2], args[3], args[4]);\n case 6: return new Ctor(args[0], args[1], args[2], args[3], args[4], args[5]);\n case 7: return new Ctor(args[0], args[1], args[2], args[3], args[4], args[5], args[6]);\n }\n var thisBinding = baseCreate(Ctor.prototype),\n result = Ctor.apply(thisBinding, args);\n\n // Mimic the constructor's `return` behavior.\n // See https://es5.github.io/#x13.2.2 for more details.\n return isObject(result) ? result : thisBinding;\n };\n }\n\n /**\n * Creates a function that wraps `func` to enable currying.\n *\n * @private\n * @param {Function} func The function to wrap.\n * @param {number} bitmask The bitmask flags. See `createWrap` for more details.\n * @param {number} arity The arity of `func`.\n * @returns {Function} Returns the new wrapped function.\n */\n function createCurry(func, bitmask, arity) {\n var Ctor = createCtor(func);\n\n function wrapper() {\n var length = arguments.length,\n args = Array(length),\n index = length,\n placeholder = getHolder(wrapper);\n\n while (index--) {\n args[index] = arguments[index];\n }\n var holders = (length < 3 && args[0] !== placeholder && args[length - 1] !== placeholder)\n ? []\n : replaceHolders(args, placeholder);\n\n length -= holders.length;\n if (length < arity) {\n return createRecurry(\n func, bitmask, createHybrid, wrapper.placeholder, undefined,\n args, holders, undefined, undefined, arity - length);\n }\n var fn = (this && this !== root && this instanceof wrapper) ? Ctor : func;\n return apply(fn, this, args);\n }\n return wrapper;\n }\n\n /**\n * Creates a `_.find` or `_.findLast` function.\n *\n * @private\n * @param {Function} findIndexFunc The function to find the collection index.\n * @returns {Function} Returns the new find function.\n */\n function createFind(findIndexFunc) {\n return function(collection, predicate, fromIndex) {\n var iterable = Object(collection);\n if (!isArrayLike(collection)) {\n var iteratee = getIteratee(predicate, 3);\n collection = keys(collection);\n predicate = function(key) { return iteratee(iterable[key], key, iterable); };\n }\n var index = findIndexFunc(collection, predicate, fromIndex);\n return index > -1 ? iterable[iteratee ? collection[index] : index] : undefined;\n };\n }\n\n /**\n * Creates a `_.flow` or `_.flowRight` function.\n *\n * @private\n * @param {boolean} [fromRight] Specify iterating from right to left.\n * @returns {Function} Returns the new flow function.\n */\n function createFlow(fromRight) {\n return flatRest(function(funcs) {\n var length = funcs.length,\n index = length,\n prereq = LodashWrapper.prototype.thru;\n\n if (fromRight) {\n funcs.reverse();\n }\n while (index--) {\n var func = funcs[index];\n if (typeof func != 'function') {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n if (prereq && !wrapper && getFuncName(func) == 'wrapper') {\n var wrapper = new LodashWrapper([], true);\n }\n }\n index = wrapper ? index : length;\n while (++index < length) {\n func = funcs[index];\n\n var funcName = getFuncName(func),\n data = funcName == 'wrapper' ? getData(func) : undefined;\n\n if (data && isLaziable(data[0]) &&\n data[1] == (WRAP_ARY_FLAG | WRAP_CURRY_FLAG | WRAP_PARTIAL_FLAG | WRAP_REARG_FLAG) &&\n !data[4].length && data[9] == 1\n ) {\n wrapper = wrapper[getFuncName(data[0])].apply(wrapper, data[3]);\n } else {\n wrapper = (func.length == 1 && isLaziable(func))\n ? wrapper[funcName]()\n : wrapper.thru(func);\n }\n }\n return function() {\n var args = arguments,\n value = args[0];\n\n if (wrapper && args.length == 1 && isArray(value)) {\n return wrapper.plant(value).value();\n }\n var index = 0,\n result = length ? funcs[index].apply(this, args) : value;\n\n while (++index < length) {\n result = funcs[index].call(this, result);\n }\n return result;\n };\n });\n }\n\n /**\n * Creates a function that wraps `func` to invoke it with optional `this`\n * binding of `thisArg`, partial application, and currying.\n *\n * @private\n * @param {Function|string} func The function or method name to wrap.\n * @param {number} bitmask The bitmask flags. See `createWrap` for more details.\n * @param {*} [thisArg] The `this` binding of `func`.\n * @param {Array} [partials] The arguments to prepend to those provided to\n * the new function.\n * @param {Array} [holders] The `partials` placeholder indexes.\n * @param {Array} [partialsRight] The arguments to append to those provided\n * to the new function.\n * @param {Array} [holdersRight] The `partialsRight` placeholder indexes.\n * @param {Array} [argPos] The argument positions of the new function.\n * @param {number} [ary] The arity cap of `func`.\n * @param {number} [arity] The arity of `func`.\n * @returns {Function} Returns the new wrapped function.\n */\n function createHybrid(func, bitmask, thisArg, partials, holders, partialsRight, holdersRight, argPos, ary, arity) {\n var isAry = bitmask & WRAP_ARY_FLAG,\n isBind = bitmask & WRAP_BIND_FLAG,\n isBindKey = bitmask & WRAP_BIND_KEY_FLAG,\n isCurried = bitmask & (WRAP_CURRY_FLAG | WRAP_CURRY_RIGHT_FLAG),\n isFlip = bitmask & WRAP_FLIP_FLAG,\n Ctor = isBindKey ? undefined : createCtor(func);\n\n function wrapper() {\n var length = arguments.length,\n args = Array(length),\n index = length;\n\n while (index--) {\n args[index] = arguments[index];\n }\n if (isCurried) {\n var placeholder = getHolder(wrapper),\n holdersCount = countHolders(args, placeholder);\n }\n if (partials) {\n args = composeArgs(args, partials, holders, isCurried);\n }\n if (partialsRight) {\n args = composeArgsRight(args, partialsRight, holdersRight, isCurried);\n }\n length -= holdersCount;\n if (isCurried && length < arity) {\n var newHolders = replaceHolders(args, placeholder);\n return createRecurry(\n func, bitmask, createHybrid, wrapper.placeholder, thisArg,\n args, newHolders, argPos, ary, arity - length\n );\n }\n var thisBinding = isBind ? thisArg : this,\n fn = isBindKey ? thisBinding[func] : func;\n\n length = args.length;\n if (argPos) {\n args = reorder(args, argPos);\n } else if (isFlip && length > 1) {\n args.reverse();\n }\n if (isAry && ary < length) {\n args.length = ary;\n }\n if (this && this !== root && this instanceof wrapper) {\n fn = Ctor || createCtor(fn);\n }\n return fn.apply(thisBinding, args);\n }\n return wrapper;\n }\n\n /**\n * Creates a function like `_.invertBy`.\n *\n * @private\n * @param {Function} setter The function to set accumulator values.\n * @param {Function} toIteratee The function to resolve iteratees.\n * @returns {Function} Returns the new inverter function.\n */\n function createInverter(setter, toIteratee) {\n return function(object, iteratee) {\n return baseInverter(object, setter, toIteratee(iteratee), {});\n };\n }\n\n /**\n * Creates a function that performs a mathematical operation on two values.\n *\n * @private\n * @param {Function} operator The function to perform the operation.\n * @param {number} [defaultValue] The value used for `undefined` arguments.\n * @returns {Function} Returns the new mathematical operation function.\n */\n function createMathOperation(operator, defaultValue) {\n return function(value, other) {\n var result;\n if (value === undefined && other === undefined) {\n return defaultValue;\n }\n if (value !== undefined) {\n result = value;\n }\n if (other !== undefined) {\n if (result === undefined) {\n return other;\n }\n if (typeof value == 'string' || typeof other == 'string') {\n value = baseToString(value);\n other = baseToString(other);\n } else {\n value = baseToNumber(value);\n other = baseToNumber(other);\n }\n result = operator(value, other);\n }\n return result;\n };\n }\n\n /**\n * Creates a function like `_.over`.\n *\n * @private\n * @param {Function} arrayFunc The function to iterate over iteratees.\n * @returns {Function} Returns the new over function.\n */\n function createOver(arrayFunc) {\n return flatRest(function(iteratees) {\n iteratees = arrayMap(iteratees, baseUnary(getIteratee()));\n return baseRest(function(args) {\n var thisArg = this;\n return arrayFunc(iteratees, function(iteratee) {\n return apply(iteratee, thisArg, args);\n });\n });\n });\n }\n\n /**\n * Creates the padding for `string` based on `length`. The `chars` string\n * is truncated if the number of characters exceeds `length`.\n *\n * @private\n * @param {number} length The padding length.\n * @param {string} [chars=' '] The string used as padding.\n * @returns {string} Returns the padding for `string`.\n */\n function createPadding(length, chars) {\n chars = chars === undefined ? ' ' : baseToString(chars);\n\n var charsLength = chars.length;\n if (charsLength < 2) {\n return charsLength ? baseRepeat(chars, length) : chars;\n }\n var result = baseRepeat(chars, nativeCeil(length / stringSize(chars)));\n return hasUnicode(chars)\n ? castSlice(stringToArray(result), 0, length).join('')\n : result.slice(0, length);\n }\n\n /**\n * Creates a function that wraps `func` to invoke it with the `this` binding\n * of `thisArg` and `partials` prepended to the arguments it receives.\n *\n * @private\n * @param {Function} func The function to wrap.\n * @param {number} bitmask The bitmask flags. See `createWrap` for more details.\n * @param {*} thisArg The `this` binding of `func`.\n * @param {Array} partials The arguments to prepend to those provided to\n * the new function.\n * @returns {Function} Returns the new wrapped function.\n */\n function createPartial(func, bitmask, thisArg, partials) {\n var isBind = bitmask & WRAP_BIND_FLAG,\n Ctor = createCtor(func);\n\n function wrapper() {\n var argsIndex = -1,\n argsLength = arguments.length,\n leftIndex = -1,\n leftLength = partials.length,\n args = Array(leftLength + argsLength),\n fn = (this && this !== root && this instanceof wrapper) ? Ctor : func;\n\n while (++leftIndex < leftLength) {\n args[leftIndex] = partials[leftIndex];\n }\n while (argsLength--) {\n args[leftIndex++] = arguments[++argsIndex];\n }\n return apply(fn, isBind ? thisArg : this, args);\n }\n return wrapper;\n }\n\n /**\n * Creates a `_.range` or `_.rangeRight` function.\n *\n * @private\n * @param {boolean} [fromRight] Specify iterating from right to left.\n * @returns {Function} Returns the new range function.\n */\n function createRange(fromRight) {\n return function(start, end, step) {\n if (step && typeof step != 'number' && isIterateeCall(start, end, step)) {\n end = step = undefined;\n }\n // Ensure the sign of `-0` is preserved.\n start = toFinite(start);\n if (end === undefined) {\n end = start;\n start = 0;\n } else {\n end = toFinite(end);\n }\n step = step === undefined ? (start < end ? 1 : -1) : toFinite(step);\n return baseRange(start, end, step, fromRight);\n };\n }\n\n /**\n * Creates a function that performs a relational operation on two values.\n *\n * @private\n * @param {Function} operator The function to perform the operation.\n * @returns {Function} Returns the new relational operation function.\n */\n function createRelationalOperation(operator) {\n return function(value, other) {\n if (!(typeof value == 'string' && typeof other == 'string')) {\n value = toNumber(value);\n other = toNumber(other);\n }\n return operator(value, other);\n };\n }\n\n /**\n * Creates a function that wraps `func` to continue currying.\n *\n * @private\n * @param {Function} func The function to wrap.\n * @param {number} bitmask The bitmask flags. See `createWrap` for more details.\n * @param {Function} wrapFunc The function to create the `func` wrapper.\n * @param {*} placeholder The placeholder value.\n * @param {*} [thisArg] The `this` binding of `func`.\n * @param {Array} [partials] The arguments to prepend to those provided to\n * the new function.\n * @param {Array} [holders] The `partials` placeholder indexes.\n * @param {Array} [argPos] The argument positions of the new function.\n * @param {number} [ary] The arity cap of `func`.\n * @param {number} [arity] The arity of `func`.\n * @returns {Function} Returns the new wrapped function.\n */\n function createRecurry(func, bitmask, wrapFunc, placeholder, thisArg, partials, holders, argPos, ary, arity) {\n var isCurry = bitmask & WRAP_CURRY_FLAG,\n newHolders = isCurry ? holders : undefined,\n newHoldersRight = isCurry ? undefined : holders,\n newPartials = isCurry ? partials : undefined,\n newPartialsRight = isCurry ? undefined : partials;\n\n bitmask |= (isCurry ? WRAP_PARTIAL_FLAG : WRAP_PARTIAL_RIGHT_FLAG);\n bitmask &= ~(isCurry ? WRAP_PARTIAL_RIGHT_FLAG : WRAP_PARTIAL_FLAG);\n\n if (!(bitmask & WRAP_CURRY_BOUND_FLAG)) {\n bitmask &= ~(WRAP_BIND_FLAG | WRAP_BIND_KEY_FLAG);\n }\n var newData = [\n func, bitmask, thisArg, newPartials, newHolders, newPartialsRight,\n newHoldersRight, argPos, ary, arity\n ];\n\n var result = wrapFunc.apply(undefined, newData);\n if (isLaziable(func)) {\n setData(result, newData);\n }\n result.placeholder = placeholder;\n return setWrapToString(result, func, bitmask);\n }\n\n /**\n * Creates a function like `_.round`.\n *\n * @private\n * @param {string} methodName The name of the `Math` method to use when rounding.\n * @returns {Function} Returns the new round function.\n */\n function createRound(methodName) {\n var func = Math[methodName];\n return function(number, precision) {\n number = toNumber(number);\n precision = precision == null ? 0 : nativeMin(toInteger(precision), 292);\n if (precision && nativeIsFinite(number)) {\n // Shift with exponential notation to avoid floating-point issues.\n // See [MDN](https://mdn.io/round#Examples) for more details.\n var pair = (toString(number) + 'e').split('e'),\n value = func(pair[0] + 'e' + (+pair[1] + precision));\n\n pair = (toString(value) + 'e').split('e');\n return +(pair[0] + 'e' + (+pair[1] - precision));\n }\n return func(number);\n };\n }\n\n /**\n * Creates a set object of `values`.\n *\n * @private\n * @param {Array} values The values to add to the set.\n * @returns {Object} Returns the new set.\n */\n var createSet = !(Set && (1 / setToArray(new Set([,-0]))[1]) == INFINITY) ? noop : function(values) {\n return new Set(values);\n };\n\n /**\n * Creates a `_.toPairs` or `_.toPairsIn` function.\n *\n * @private\n * @param {Function} keysFunc The function to get the keys of a given object.\n * @returns {Function} Returns the new pairs function.\n */\n function createToPairs(keysFunc) {\n return function(object) {\n var tag = getTag(object);\n if (tag == mapTag) {\n return mapToArray(object);\n }\n if (tag == setTag) {\n return setToPairs(object);\n }\n return baseToPairs(object, keysFunc(object));\n };\n }\n\n /**\n * Creates a function that either curries or invokes `func` with optional\n * `this` binding and partially applied arguments.\n *\n * @private\n * @param {Function|string} func The function or method name to wrap.\n * @param {number} bitmask The bitmask flags.\n * 1 - `_.bind`\n * 2 - `_.bindKey`\n * 4 - `_.curry` or `_.curryRight` of a bound function\n * 8 - `_.curry`\n * 16 - `_.curryRight`\n * 32 - `_.partial`\n * 64 - `_.partialRight`\n * 128 - `_.rearg`\n * 256 - `_.ary`\n * 512 - `_.flip`\n * @param {*} [thisArg] The `this` binding of `func`.\n * @param {Array} [partials] The arguments to be partially applied.\n * @param {Array} [holders] The `partials` placeholder indexes.\n * @param {Array} [argPos] The argument positions of the new function.\n * @param {number} [ary] The arity cap of `func`.\n * @param {number} [arity] The arity of `func`.\n * @returns {Function} Returns the new wrapped function.\n */\n function createWrap(func, bitmask, thisArg, partials, holders, argPos, ary, arity) {\n var isBindKey = bitmask & WRAP_BIND_KEY_FLAG;\n if (!isBindKey && typeof func != 'function') {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n var length = partials ? partials.length : 0;\n if (!length) {\n bitmask &= ~(WRAP_PARTIAL_FLAG | WRAP_PARTIAL_RIGHT_FLAG);\n partials = holders = undefined;\n }\n ary = ary === undefined ? ary : nativeMax(toInteger(ary), 0);\n arity = arity === undefined ? arity : toInteger(arity);\n length -= holders ? holders.length : 0;\n\n if (bitmask & WRAP_PARTIAL_RIGHT_FLAG) {\n var partialsRight = partials,\n holdersRight = holders;\n\n partials = holders = undefined;\n }\n var data = isBindKey ? undefined : getData(func);\n\n var newData = [\n func, bitmask, thisArg, partials, holders, partialsRight, holdersRight,\n argPos, ary, arity\n ];\n\n if (data) {\n mergeData(newData, data);\n }\n func = newData[0];\n bitmask = newData[1];\n thisArg = newData[2];\n partials = newData[3];\n holders = newData[4];\n arity = newData[9] = newData[9] === undefined\n ? (isBindKey ? 0 : func.length)\n : nativeMax(newData[9] - length, 0);\n\n if (!arity && bitmask & (WRAP_CURRY_FLAG | WRAP_CURRY_RIGHT_FLAG)) {\n bitmask &= ~(WRAP_CURRY_FLAG | WRAP_CURRY_RIGHT_FLAG);\n }\n if (!bitmask || bitmask == WRAP_BIND_FLAG) {\n var result = createBind(func, bitmask, thisArg);\n } else if (bitmask == WRAP_CURRY_FLAG || bitmask == WRAP_CURRY_RIGHT_FLAG) {\n result = createCurry(func, bitmask, arity);\n } else if ((bitmask == WRAP_PARTIAL_FLAG || bitmask == (WRAP_BIND_FLAG | WRAP_PARTIAL_FLAG)) && !holders.length) {\n result = createPartial(func, bitmask, thisArg, partials);\n } else {\n result = createHybrid.apply(undefined, newData);\n }\n var setter = data ? baseSetData : setData;\n return setWrapToString(setter(result, newData), func, bitmask);\n }\n\n /**\n * Used by `_.defaults` to customize its `_.assignIn` use to assign properties\n * of source objects to the destination object for all destination properties\n * that resolve to `undefined`.\n *\n * @private\n * @param {*} objValue The destination value.\n * @param {*} srcValue The source value.\n * @param {string} key The key of the property to assign.\n * @param {Object} object The parent object of `objValue`.\n * @returns {*} Returns the value to assign.\n */\n function customDefaultsAssignIn(objValue, srcValue, key, object) {\n if (objValue === undefined ||\n (eq(objValue, objectProto[key]) && !hasOwnProperty.call(object, key))) {\n return srcValue;\n }\n return objValue;\n }\n\n /**\n * Used by `_.defaultsDeep` to customize its `_.merge` use to merge source\n * objects into destination objects that are passed thru.\n *\n * @private\n * @param {*} objValue The destination value.\n * @param {*} srcValue The source value.\n * @param {string} key The key of the property to merge.\n * @param {Object} object The parent object of `objValue`.\n * @param {Object} source The parent object of `srcValue`.\n * @param {Object} [stack] Tracks traversed source values and their merged\n * counterparts.\n * @returns {*} Returns the value to assign.\n */\n function customDefaultsMerge(objValue, srcValue, key, object, source, stack) {\n if (isObject(objValue) && isObject(srcValue)) {\n // Recursively merge objects and arrays (susceptible to call stack limits).\n stack.set(srcValue, objValue);\n baseMerge(objValue, srcValue, undefined, customDefaultsMerge, stack);\n stack['delete'](srcValue);\n }\n return objValue;\n }\n\n /**\n * Used by `_.omit` to customize its `_.cloneDeep` use to only clone plain\n * objects.\n *\n * @private\n * @param {*} value The value to inspect.\n * @param {string} key The key of the property to inspect.\n * @returns {*} Returns the uncloned value or `undefined` to defer cloning to `_.cloneDeep`.\n */\n function customOmitClone(value) {\n return isPlainObject(value) ? undefined : value;\n }\n\n /**\n * A specialized version of `baseIsEqualDeep` for arrays with support for\n * partial deep comparisons.\n *\n * @private\n * @param {Array} array The array to compare.\n * @param {Array} other The other array to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} stack Tracks traversed `array` and `other` objects.\n * @returns {boolean} Returns `true` if the arrays are equivalent, else `false`.\n */\n function equalArrays(array, other, bitmask, customizer, equalFunc, stack) {\n var isPartial = bitmask & COMPARE_PARTIAL_FLAG,\n arrLength = array.length,\n othLength = other.length;\n\n if (arrLength != othLength && !(isPartial && othLength > arrLength)) {\n return false;\n }\n // Check that cyclic values are equal.\n var arrStacked = stack.get(array);\n var othStacked = stack.get(other);\n if (arrStacked && othStacked) {\n return arrStacked == other && othStacked == array;\n }\n var index = -1,\n result = true,\n seen = (bitmask & COMPARE_UNORDERED_FLAG) ? new SetCache : undefined;\n\n stack.set(array, other);\n stack.set(other, array);\n\n // Ignore non-index properties.\n while (++index < arrLength) {\n var arrValue = array[index],\n othValue = other[index];\n\n if (customizer) {\n var compared = isPartial\n ? customizer(othValue, arrValue, index, other, array, stack)\n : customizer(arrValue, othValue, index, array, other, stack);\n }\n if (compared !== undefined) {\n if (compared) {\n continue;\n }\n result = false;\n break;\n }\n // Recursively compare arrays (susceptible to call stack limits).\n if (seen) {\n if (!arraySome(other, function(othValue, othIndex) {\n if (!cacheHas(seen, othIndex) &&\n (arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack))) {\n return seen.push(othIndex);\n }\n })) {\n result = false;\n break;\n }\n } else if (!(\n arrValue === othValue ||\n equalFunc(arrValue, othValue, bitmask, customizer, stack)\n )) {\n result = false;\n break;\n }\n }\n stack['delete'](array);\n stack['delete'](other);\n return result;\n }\n\n /**\n * A specialized version of `baseIsEqualDeep` for comparing objects of\n * the same `toStringTag`.\n *\n * **Note:** This function only supports comparing values with tags of\n * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`.\n *\n * @private\n * @param {Object} object The object to compare.\n * @param {Object} other The other object to compare.\n * @param {string} tag The `toStringTag` of the objects to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} stack Tracks traversed `object` and `other` objects.\n * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\n */\n function equalByTag(object, other, tag, bitmask, customizer, equalFunc, stack) {\n switch (tag) {\n case dataViewTag:\n if ((object.byteLength != other.byteLength) ||\n (object.byteOffset != other.byteOffset)) {\n return false;\n }\n object = object.buffer;\n other = other.buffer;\n\n case arrayBufferTag:\n if ((object.byteLength != other.byteLength) ||\n !equalFunc(new Uint8Array(object), new Uint8Array(other))) {\n return false;\n }\n return true;\n\n case boolTag:\n case dateTag:\n case numberTag:\n // Coerce booleans to `1` or `0` and dates to milliseconds.\n // Invalid dates are coerced to `NaN`.\n return eq(+object, +other);\n\n case errorTag:\n return object.name == other.name && object.message == other.message;\n\n case regexpTag:\n case stringTag:\n // Coerce regexes to strings and treat strings, primitives and objects,\n // as equal. See http://www.ecma-international.org/ecma-262/7.0/#sec-regexp.prototype.tostring\n // for more details.\n return object == (other + '');\n\n case mapTag:\n var convert = mapToArray;\n\n case setTag:\n var isPartial = bitmask & COMPARE_PARTIAL_FLAG;\n convert || (convert = setToArray);\n\n if (object.size != other.size && !isPartial) {\n return false;\n }\n // Assume cyclic values are equal.\n var stacked = stack.get(object);\n if (stacked) {\n return stacked == other;\n }\n bitmask |= COMPARE_UNORDERED_FLAG;\n\n // Recursively compare objects (susceptible to call stack limits).\n stack.set(object, other);\n var result = equalArrays(convert(object), convert(other), bitmask, customizer, equalFunc, stack);\n stack['delete'](object);\n return result;\n\n case symbolTag:\n if (symbolValueOf) {\n return symbolValueOf.call(object) == symbolValueOf.call(other);\n }\n }\n return false;\n }\n\n /**\n * A specialized version of `baseIsEqualDeep` for objects with support for\n * partial deep comparisons.\n *\n * @private\n * @param {Object} object The object to compare.\n * @param {Object} other The other object to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} stack Tracks traversed `object` and `other` objects.\n * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\n */\n function equalObjects(object, other, bitmask, customizer, equalFunc, stack) {\n var isPartial = bitmask & COMPARE_PARTIAL_FLAG,\n objProps = getAllKeys(object),\n objLength = objProps.length,\n othProps = getAllKeys(other),\n othLength = othProps.length;\n\n if (objLength != othLength && !isPartial) {\n return false;\n }\n var index = objLength;\n while (index--) {\n var key = objProps[index];\n if (!(isPartial ? key in other : hasOwnProperty.call(other, key))) {\n return false;\n }\n }\n // Check that cyclic values are equal.\n var objStacked = stack.get(object);\n var othStacked = stack.get(other);\n if (objStacked && othStacked) {\n return objStacked == other && othStacked == object;\n }\n var result = true;\n stack.set(object, other);\n stack.set(other, object);\n\n var skipCtor = isPartial;\n while (++index < objLength) {\n key = objProps[index];\n var objValue = object[key],\n othValue = other[key];\n\n if (customizer) {\n var compared = isPartial\n ? customizer(othValue, objValue, key, other, object, stack)\n : customizer(objValue, othValue, key, object, other, stack);\n }\n // Recursively compare objects (susceptible to call stack limits).\n if (!(compared === undefined\n ? (objValue === othValue || equalFunc(objValue, othValue, bitmask, customizer, stack))\n : compared\n )) {\n result = false;\n break;\n }\n skipCtor || (skipCtor = key == 'constructor');\n }\n if (result && !skipCtor) {\n var objCtor = object.constructor,\n othCtor = other.constructor;\n\n // Non `Object` object instances with different constructors are not equal.\n if (objCtor != othCtor &&\n ('constructor' in object && 'constructor' in other) &&\n !(typeof objCtor == 'function' && objCtor instanceof objCtor &&\n typeof othCtor == 'function' && othCtor instanceof othCtor)) {\n result = false;\n }\n }\n stack['delete'](object);\n stack['delete'](other);\n return result;\n }\n\n /**\n * A specialized version of `baseRest` which flattens the rest array.\n *\n * @private\n * @param {Function} func The function to apply a rest parameter to.\n * @returns {Function} Returns the new function.\n */\n function flatRest(func) {\n return setToString(overRest(func, undefined, flatten), func + '');\n }\n\n /**\n * Creates an array of own enumerable property names and symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names and symbols.\n */\n function getAllKeys(object) {\n return baseGetAllKeys(object, keys, getSymbols);\n }\n\n /**\n * Creates an array of own and inherited enumerable property names and\n * symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names and symbols.\n */\n function getAllKeysIn(object) {\n return baseGetAllKeys(object, keysIn, getSymbolsIn);\n }\n\n /**\n * Gets metadata for `func`.\n *\n * @private\n * @param {Function} func The function to query.\n * @returns {*} Returns the metadata for `func`.\n */\n var getData = !metaMap ? noop : function(func) {\n return metaMap.get(func);\n };\n\n /**\n * Gets the name of `func`.\n *\n * @private\n * @param {Function} func The function to query.\n * @returns {string} Returns the function name.\n */\n function getFuncName(func) {\n var result = (func.name + ''),\n array = realNames[result],\n length = hasOwnProperty.call(realNames, result) ? array.length : 0;\n\n while (length--) {\n var data = array[length],\n otherFunc = data.func;\n if (otherFunc == null || otherFunc == func) {\n return data.name;\n }\n }\n return result;\n }\n\n /**\n * Gets the argument placeholder value for `func`.\n *\n * @private\n * @param {Function} func The function to inspect.\n * @returns {*} Returns the placeholder value.\n */\n function getHolder(func) {\n var object = hasOwnProperty.call(lodash, 'placeholder') ? lodash : func;\n return object.placeholder;\n }\n\n /**\n * Gets the appropriate \"iteratee\" function. If `_.iteratee` is customized,\n * this function returns the custom method, otherwise it returns `baseIteratee`.\n * If arguments are provided, the chosen function is invoked with them and\n * its result is returned.\n *\n * @private\n * @param {*} [value] The value to convert to an iteratee.\n * @param {number} [arity] The arity of the created iteratee.\n * @returns {Function} Returns the chosen function or its result.\n */\n function getIteratee() {\n var result = lodash.iteratee || iteratee;\n result = result === iteratee ? baseIteratee : result;\n return arguments.length ? result(arguments[0], arguments[1]) : result;\n }\n\n /**\n * Gets the data for `map`.\n *\n * @private\n * @param {Object} map The map to query.\n * @param {string} key The reference key.\n * @returns {*} Returns the map data.\n */\n function getMapData(map, key) {\n var data = map.__data__;\n return isKeyable(key)\n ? data[typeof key == 'string' ? 'string' : 'hash']\n : data.map;\n }\n\n /**\n * Gets the property names, values, and compare flags of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the match data of `object`.\n */\n function getMatchData(object) {\n var result = keys(object),\n length = result.length;\n\n while (length--) {\n var key = result[length],\n value = object[key];\n\n result[length] = [key, value, isStrictComparable(value)];\n }\n return result;\n }\n\n /**\n * Gets the native function at `key` of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {string} key The key of the method to get.\n * @returns {*} Returns the function if it's native, else `undefined`.\n */\n function getNative(object, key) {\n var value = getValue(object, key);\n return baseIsNative(value) ? value : undefined;\n }\n\n /**\n * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the raw `toStringTag`.\n */\n function getRawTag(value) {\n var isOwn = hasOwnProperty.call(value, symToStringTag),\n tag = value[symToStringTag];\n\n try {\n value[symToStringTag] = undefined;\n var unmasked = true;\n } catch (e) {}\n\n var result = nativeObjectToString.call(value);\n if (unmasked) {\n if (isOwn) {\n value[symToStringTag] = tag;\n } else {\n delete value[symToStringTag];\n }\n }\n return result;\n }\n\n /**\n * Creates an array of the own enumerable symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of symbols.\n */\n var getSymbols = !nativeGetSymbols ? stubArray : function(object) {\n if (object == null) {\n return [];\n }\n object = Object(object);\n return arrayFilter(nativeGetSymbols(object), function(symbol) {\n return propertyIsEnumerable.call(object, symbol);\n });\n };\n\n /**\n * Creates an array of the own and inherited enumerable symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of symbols.\n */\n var getSymbolsIn = !nativeGetSymbols ? stubArray : function(object) {\n var result = [];\n while (object) {\n arrayPush(result, getSymbols(object));\n object = getPrototype(object);\n }\n return result;\n };\n\n /**\n * Gets the `toStringTag` of `value`.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the `toStringTag`.\n */\n var getTag = baseGetTag;\n\n // Fallback for data views, maps, sets, and weak maps in IE 11 and promises in Node.js < 6.\n if ((DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag) ||\n (Map && getTag(new Map) != mapTag) ||\n (Promise && getTag(Promise.resolve()) != promiseTag) ||\n (Set && getTag(new Set) != setTag) ||\n (WeakMap && getTag(new WeakMap) != weakMapTag)) {\n getTag = function(value) {\n var result = baseGetTag(value),\n Ctor = result == objectTag ? value.constructor : undefined,\n ctorString = Ctor ? toSource(Ctor) : '';\n\n if (ctorString) {\n switch (ctorString) {\n case dataViewCtorString: return dataViewTag;\n case mapCtorString: return mapTag;\n case promiseCtorString: return promiseTag;\n case setCtorString: return setTag;\n case weakMapCtorString: return weakMapTag;\n }\n }\n return result;\n };\n }\n\n /**\n * Gets the view, applying any `transforms` to the `start` and `end` positions.\n *\n * @private\n * @param {number} start The start of the view.\n * @param {number} end The end of the view.\n * @param {Array} transforms The transformations to apply to the view.\n * @returns {Object} Returns an object containing the `start` and `end`\n * positions of the view.\n */\n function getView(start, end, transforms) {\n var index = -1,\n length = transforms.length;\n\n while (++index < length) {\n var data = transforms[index],\n size = data.size;\n\n switch (data.type) {\n case 'drop': start += size; break;\n case 'dropRight': end -= size; break;\n case 'take': end = nativeMin(end, start + size); break;\n case 'takeRight': start = nativeMax(start, end - size); break;\n }\n }\n return { 'start': start, 'end': end };\n }\n\n /**\n * Extracts wrapper details from the `source` body comment.\n *\n * @private\n * @param {string} source The source to inspect.\n * @returns {Array} Returns the wrapper details.\n */\n function getWrapDetails(source) {\n var match = source.match(reWrapDetails);\n return match ? match[1].split(reSplitDetails) : [];\n }\n\n /**\n * Checks if `path` exists on `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {Array|string} path The path to check.\n * @param {Function} hasFunc The function to check properties.\n * @returns {boolean} Returns `true` if `path` exists, else `false`.\n */\n function hasPath(object, path, hasFunc) {\n path = castPath(path, object);\n\n var index = -1,\n length = path.length,\n result = false;\n\n while (++index < length) {\n var key = toKey(path[index]);\n if (!(result = object != null && hasFunc(object, key))) {\n break;\n }\n object = object[key];\n }\n if (result || ++index != length) {\n return result;\n }\n length = object == null ? 0 : object.length;\n return !!length && isLength(length) && isIndex(key, length) &&\n (isArray(object) || isArguments(object));\n }\n\n /**\n * Initializes an array clone.\n *\n * @private\n * @param {Array} array The array to clone.\n * @returns {Array} Returns the initialized clone.\n */\n function initCloneArray(array) {\n var length = array.length,\n result = new array.constructor(length);\n\n // Add properties assigned by `RegExp#exec`.\n if (length && typeof array[0] == 'string' && hasOwnProperty.call(array, 'index')) {\n result.index = array.index;\n result.input = array.input;\n }\n return result;\n }\n\n /**\n * Initializes an object clone.\n *\n * @private\n * @param {Object} object The object to clone.\n * @returns {Object} Returns the initialized clone.\n */\n function initCloneObject(object) {\n return (typeof object.constructor == 'function' && !isPrototype(object))\n ? baseCreate(getPrototype(object))\n : {};\n }\n\n /**\n * Initializes an object clone based on its `toStringTag`.\n *\n * **Note:** This function only supports cloning values with tags of\n * `Boolean`, `Date`, `Error`, `Map`, `Number`, `RegExp`, `Set`, or `String`.\n *\n * @private\n * @param {Object} object The object to clone.\n * @param {string} tag The `toStringTag` of the object to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Object} Returns the initialized clone.\n */\n function initCloneByTag(object, tag, isDeep) {\n var Ctor = object.constructor;\n switch (tag) {\n case arrayBufferTag:\n return cloneArrayBuffer(object);\n\n case boolTag:\n case dateTag:\n return new Ctor(+object);\n\n case dataViewTag:\n return cloneDataView(object, isDeep);\n\n case float32Tag: case float64Tag:\n case int8Tag: case int16Tag: case int32Tag:\n case uint8Tag: case uint8ClampedTag: case uint16Tag: case uint32Tag:\n return cloneTypedArray(object, isDeep);\n\n case mapTag:\n return new Ctor;\n\n case numberTag:\n case stringTag:\n return new Ctor(object);\n\n case regexpTag:\n return cloneRegExp(object);\n\n case setTag:\n return new Ctor;\n\n case symbolTag:\n return cloneSymbol(object);\n }\n }\n\n /**\n * Inserts wrapper `details` in a comment at the top of the `source` body.\n *\n * @private\n * @param {string} source The source to modify.\n * @returns {Array} details The details to insert.\n * @returns {string} Returns the modified source.\n */\n function insertWrapDetails(source, details) {\n var length = details.length;\n if (!length) {\n return source;\n }\n var lastIndex = length - 1;\n details[lastIndex] = (length > 1 ? '& ' : '') + details[lastIndex];\n details = details.join(length > 2 ? ', ' : ' ');\n return source.replace(reWrapComment, '{\\n/* [wrapped with ' + details + '] */\\n');\n }\n\n /**\n * Checks if `value` is a flattenable `arguments` object or array.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is flattenable, else `false`.\n */\n function isFlattenable(value) {\n return isArray(value) || isArguments(value) ||\n !!(spreadableSymbol && value && value[spreadableSymbol]);\n }\n\n /**\n * Checks if `value` is a valid array-like index.\n *\n * @private\n * @param {*} value The value to check.\n * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.\n * @returns {boolean} Returns `true` if `value` is a valid index, else `false`.\n */\n function isIndex(value, length) {\n var type = typeof value;\n length = length == null ? MAX_SAFE_INTEGER : length;\n\n return !!length &&\n (type == 'number' ||\n (type != 'symbol' && reIsUint.test(value))) &&\n (value > -1 && value % 1 == 0 && value < length);\n }\n\n /**\n * Checks if the given arguments are from an iteratee call.\n *\n * @private\n * @param {*} value The potential iteratee value argument.\n * @param {*} index The potential iteratee index or key argument.\n * @param {*} object The potential iteratee object argument.\n * @returns {boolean} Returns `true` if the arguments are from an iteratee call,\n * else `false`.\n */\n function isIterateeCall(value, index, object) {\n if (!isObject(object)) {\n return false;\n }\n var type = typeof index;\n if (type == 'number'\n ? (isArrayLike(object) && isIndex(index, object.length))\n : (type == 'string' && index in object)\n ) {\n return eq(object[index], value);\n }\n return false;\n }\n\n /**\n * Checks if `value` is a property name and not a property path.\n *\n * @private\n * @param {*} value The value to check.\n * @param {Object} [object] The object to query keys on.\n * @returns {boolean} Returns `true` if `value` is a property name, else `false`.\n */\n function isKey(value, object) {\n if (isArray(value)) {\n return false;\n }\n var type = typeof value;\n if (type == 'number' || type == 'symbol' || type == 'boolean' ||\n value == null || isSymbol(value)) {\n return true;\n }\n return reIsPlainProp.test(value) || !reIsDeepProp.test(value) ||\n (object != null && value in Object(object));\n }\n\n /**\n * Checks if `value` is suitable for use as unique object key.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is suitable, else `false`.\n */\n function isKeyable(value) {\n var type = typeof value;\n return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean')\n ? (value !== '__proto__')\n : (value === null);\n }\n\n /**\n * Checks if `func` has a lazy counterpart.\n *\n * @private\n * @param {Function} func The function to check.\n * @returns {boolean} Returns `true` if `func` has a lazy counterpart,\n * else `false`.\n */\n function isLaziable(func) {\n var funcName = getFuncName(func),\n other = lodash[funcName];\n\n if (typeof other != 'function' || !(funcName in LazyWrapper.prototype)) {\n return false;\n }\n if (func === other) {\n return true;\n }\n var data = getData(other);\n return !!data && func === data[0];\n }\n\n /**\n * Checks if `func` has its source masked.\n *\n * @private\n * @param {Function} func The function to check.\n * @returns {boolean} Returns `true` if `func` is masked, else `false`.\n */\n function isMasked(func) {\n return !!maskSrcKey && (maskSrcKey in func);\n }\n\n /**\n * Checks if `func` is capable of being masked.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `func` is maskable, else `false`.\n */\n var isMaskable = coreJsData ? isFunction : stubFalse;\n\n /**\n * Checks if `value` is likely a prototype object.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a prototype, else `false`.\n */\n function isPrototype(value) {\n var Ctor = value && value.constructor,\n proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto;\n\n return value === proto;\n }\n\n /**\n * Checks if `value` is suitable for strict equality comparisons, i.e. `===`.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` if suitable for strict\n * equality comparisons, else `false`.\n */\n function isStrictComparable(value) {\n return value === value && !isObject(value);\n }\n\n /**\n * A specialized version of `matchesProperty` for source values suitable\n * for strict equality comparisons, i.e. `===`.\n *\n * @private\n * @param {string} key The key of the property to get.\n * @param {*} srcValue The value to match.\n * @returns {Function} Returns the new spec function.\n */\n function matchesStrictComparable(key, srcValue) {\n return function(object) {\n if (object == null) {\n return false;\n }\n return object[key] === srcValue &&\n (srcValue !== undefined || (key in Object(object)));\n };\n }\n\n /**\n * A specialized version of `_.memoize` which clears the memoized function's\n * cache when it exceeds `MAX_MEMOIZE_SIZE`.\n *\n * @private\n * @param {Function} func The function to have its output memoized.\n * @returns {Function} Returns the new memoized function.\n */\n function memoizeCapped(func) {\n var result = memoize(func, function(key) {\n if (cache.size === MAX_MEMOIZE_SIZE) {\n cache.clear();\n }\n return key;\n });\n\n var cache = result.cache;\n return result;\n }\n\n /**\n * Merges the function metadata of `source` into `data`.\n *\n * Merging metadata reduces the number of wrappers used to invoke a function.\n * This is possible because methods like `_.bind`, `_.curry`, and `_.partial`\n * may be applied regardless of execution order. Methods like `_.ary` and\n * `_.rearg` modify function arguments, making the order in which they are\n * executed important, preventing the merging of metadata. However, we make\n * an exception for a safe combined case where curried functions have `_.ary`\n * and or `_.rearg` applied.\n *\n * @private\n * @param {Array} data The destination metadata.\n * @param {Array} source The source metadata.\n * @returns {Array} Returns `data`.\n */\n function mergeData(data, source) {\n var bitmask = data[1],\n srcBitmask = source[1],\n newBitmask = bitmask | srcBitmask,\n isCommon = newBitmask < (WRAP_BIND_FLAG | WRAP_BIND_KEY_FLAG | WRAP_ARY_FLAG);\n\n var isCombo =\n ((srcBitmask == WRAP_ARY_FLAG) && (bitmask == WRAP_CURRY_FLAG)) ||\n ((srcBitmask == WRAP_ARY_FLAG) && (bitmask == WRAP_REARG_FLAG) && (data[7].length <= source[8])) ||\n ((srcBitmask == (WRAP_ARY_FLAG | WRAP_REARG_FLAG)) && (source[7].length <= source[8]) && (bitmask == WRAP_CURRY_FLAG));\n\n // Exit early if metadata can't be merged.\n if (!(isCommon || isCombo)) {\n return data;\n }\n // Use source `thisArg` if available.\n if (srcBitmask & WRAP_BIND_FLAG) {\n data[2] = source[2];\n // Set when currying a bound function.\n newBitmask |= bitmask & WRAP_BIND_FLAG ? 0 : WRAP_CURRY_BOUND_FLAG;\n }\n // Compose partial arguments.\n var value = source[3];\n if (value) {\n var partials = data[3];\n data[3] = partials ? composeArgs(partials, value, source[4]) : value;\n data[4] = partials ? replaceHolders(data[3], PLACEHOLDER) : source[4];\n }\n // Compose partial right arguments.\n value = source[5];\n if (value) {\n partials = data[5];\n data[5] = partials ? composeArgsRight(partials, value, source[6]) : value;\n data[6] = partials ? replaceHolders(data[5], PLACEHOLDER) : source[6];\n }\n // Use source `argPos` if available.\n value = source[7];\n if (value) {\n data[7] = value;\n }\n // Use source `ary` if it's smaller.\n if (srcBitmask & WRAP_ARY_FLAG) {\n data[8] = data[8] == null ? source[8] : nativeMin(data[8], source[8]);\n }\n // Use source `arity` if one is not provided.\n if (data[9] == null) {\n data[9] = source[9];\n }\n // Use source `func` and merge bitmasks.\n data[0] = source[0];\n data[1] = newBitmask;\n\n return data;\n }\n\n /**\n * This function is like\n * [`Object.keys`](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)\n * except that it includes inherited enumerable properties.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n */\n function nativeKeysIn(object) {\n var result = [];\n if (object != null) {\n for (var key in Object(object)) {\n result.push(key);\n }\n }\n return result;\n }\n\n /**\n * Converts `value` to a string using `Object.prototype.toString`.\n *\n * @private\n * @param {*} value The value to convert.\n * @returns {string} Returns the converted string.\n */\n function objectToString(value) {\n return nativeObjectToString.call(value);\n }\n\n /**\n * A specialized version of `baseRest` which transforms the rest array.\n *\n * @private\n * @param {Function} func The function to apply a rest parameter to.\n * @param {number} [start=func.length-1] The start position of the rest parameter.\n * @param {Function} transform The rest array transform.\n * @returns {Function} Returns the new function.\n */\n function overRest(func, start, transform) {\n start = nativeMax(start === undefined ? (func.length - 1) : start, 0);\n return function() {\n var args = arguments,\n index = -1,\n length = nativeMax(args.length - start, 0),\n array = Array(length);\n\n while (++index < length) {\n array[index] = args[start + index];\n }\n index = -1;\n var otherArgs = Array(start + 1);\n while (++index < start) {\n otherArgs[index] = args[index];\n }\n otherArgs[start] = transform(array);\n return apply(func, this, otherArgs);\n };\n }\n\n /**\n * Gets the parent value at `path` of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {Array} path The path to get the parent value of.\n * @returns {*} Returns the parent value.\n */\n function parent(object, path) {\n return path.length < 2 ? object : baseGet(object, baseSlice(path, 0, -1));\n }\n\n /**\n * Reorder `array` according to the specified indexes where the element at\n * the first index is assigned as the first element, the element at\n * the second index is assigned as the second element, and so on.\n *\n * @private\n * @param {Array} array The array to reorder.\n * @param {Array} indexes The arranged array indexes.\n * @returns {Array} Returns `array`.\n */\n function reorder(array, indexes) {\n var arrLength = array.length,\n length = nativeMin(indexes.length, arrLength),\n oldArray = copyArray(array);\n\n while (length--) {\n var index = indexes[length];\n array[length] = isIndex(index, arrLength) ? oldArray[index] : undefined;\n }\n return array;\n }\n\n /**\n * Gets the value at `key`, unless `key` is \"__proto__\" or \"constructor\".\n *\n * @private\n * @param {Object} object The object to query.\n * @param {string} key The key of the property to get.\n * @returns {*} Returns the property value.\n */\n function safeGet(object, key) {\n if (key === 'constructor' && typeof object[key] === 'function') {\n return;\n }\n\n if (key == '__proto__') {\n return;\n }\n\n return object[key];\n }\n\n /**\n * Sets metadata for `func`.\n *\n * **Note:** If this function becomes hot, i.e. is invoked a lot in a short\n * period of time, it will trip its breaker and transition to an identity\n * function to avoid garbage collection pauses in V8. See\n * [V8 issue 2070](https://bugs.chromium.org/p/v8/issues/detail?id=2070)\n * for more details.\n *\n * @private\n * @param {Function} func The function to associate metadata with.\n * @param {*} data The metadata.\n * @returns {Function} Returns `func`.\n */\n var setData = shortOut(baseSetData);\n\n /**\n * A simple wrapper around the global [`setTimeout`](https://mdn.io/setTimeout).\n *\n * @private\n * @param {Function} func The function to delay.\n * @param {number} wait The number of milliseconds to delay invocation.\n * @returns {number|Object} Returns the timer id or timeout object.\n */\n var setTimeout = ctxSetTimeout || function(func, wait) {\n return root.setTimeout(func, wait);\n };\n\n /**\n * Sets the `toString` method of `func` to return `string`.\n *\n * @private\n * @param {Function} func The function to modify.\n * @param {Function} string The `toString` result.\n * @returns {Function} Returns `func`.\n */\n var setToString = shortOut(baseSetToString);\n\n /**\n * Sets the `toString` method of `wrapper` to mimic the source of `reference`\n * with wrapper details in a comment at the top of the source body.\n *\n * @private\n * @param {Function} wrapper The function to modify.\n * @param {Function} reference The reference function.\n * @param {number} bitmask The bitmask flags. See `createWrap` for more details.\n * @returns {Function} Returns `wrapper`.\n */\n function setWrapToString(wrapper, reference, bitmask) {\n var source = (reference + '');\n return setToString(wrapper, insertWrapDetails(source, updateWrapDetails(getWrapDetails(source), bitmask)));\n }\n\n /**\n * Creates a function that'll short out and invoke `identity` instead\n * of `func` when it's called `HOT_COUNT` or more times in `HOT_SPAN`\n * milliseconds.\n *\n * @private\n * @param {Function} func The function to restrict.\n * @returns {Function} Returns the new shortable function.\n */\n function shortOut(func) {\n var count = 0,\n lastCalled = 0;\n\n return function() {\n var stamp = nativeNow(),\n remaining = HOT_SPAN - (stamp - lastCalled);\n\n lastCalled = stamp;\n if (remaining > 0) {\n if (++count >= HOT_COUNT) {\n return arguments[0];\n }\n } else {\n count = 0;\n }\n return func.apply(undefined, arguments);\n };\n }\n\n /**\n * A specialized version of `_.shuffle` which mutates and sets the size of `array`.\n *\n * @private\n * @param {Array} array The array to shuffle.\n * @param {number} [size=array.length] The size of `array`.\n * @returns {Array} Returns `array`.\n */\n function shuffleSelf(array, size) {\n var index = -1,\n length = array.length,\n lastIndex = length - 1;\n\n size = size === undefined ? length : size;\n while (++index < size) {\n var rand = baseRandom(index, lastIndex),\n value = array[rand];\n\n array[rand] = array[index];\n array[index] = value;\n }\n array.length = size;\n return array;\n }\n\n /**\n * Converts `string` to a property path array.\n *\n * @private\n * @param {string} string The string to convert.\n * @returns {Array} Returns the property path array.\n */\n var stringToPath = memoizeCapped(function(string) {\n var result = [];\n if (string.charCodeAt(0) === 46 /* . */) {\n result.push('');\n }\n string.replace(rePropName, function(match, number, quote, subString) {\n result.push(quote ? subString.replace(reEscapeChar, '$1') : (number || match));\n });\n return result;\n });\n\n /**\n * Converts `value` to a string key if it's not a string or symbol.\n *\n * @private\n * @param {*} value The value to inspect.\n * @returns {string|symbol} Returns the key.\n */\n function toKey(value) {\n if (typeof value == 'string' || isSymbol(value)) {\n return value;\n }\n var result = (value + '');\n return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;\n }\n\n /**\n * Converts `func` to its source code.\n *\n * @private\n * @param {Function} func The function to convert.\n * @returns {string} Returns the source code.\n */\n function toSource(func) {\n if (func != null) {\n try {\n return funcToString.call(func);\n } catch (e) {}\n try {\n return (func + '');\n } catch (e) {}\n }\n return '';\n }\n\n /**\n * Updates wrapper `details` based on `bitmask` flags.\n *\n * @private\n * @returns {Array} details The details to modify.\n * @param {number} bitmask The bitmask flags. See `createWrap` for more details.\n * @returns {Array} Returns `details`.\n */\n function updateWrapDetails(details, bitmask) {\n arrayEach(wrapFlags, function(pair) {\n var value = '_.' + pair[0];\n if ((bitmask & pair[1]) && !arrayIncludes(details, value)) {\n details.push(value);\n }\n });\n return details.sort();\n }\n\n /**\n * Creates a clone of `wrapper`.\n *\n * @private\n * @param {Object} wrapper The wrapper to clone.\n * @returns {Object} Returns the cloned wrapper.\n */\n function wrapperClone(wrapper) {\n if (wrapper instanceof LazyWrapper) {\n return wrapper.clone();\n }\n var result = new LodashWrapper(wrapper.__wrapped__, wrapper.__chain__);\n result.__actions__ = copyArray(wrapper.__actions__);\n result.__index__ = wrapper.__index__;\n result.__values__ = wrapper.__values__;\n return result;\n }\n\n /*------------------------------------------------------------------------*/\n\n /**\n * Creates an array of elements split into groups the length of `size`.\n * If `array` can't be split evenly, the final chunk will be the remaining\n * elements.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Array\n * @param {Array} array The array to process.\n * @param {number} [size=1] The length of each chunk\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n * @returns {Array} Returns the new array of chunks.\n * @example\n *\n * _.chunk(['a', 'b', 'c', 'd'], 2);\n * // => [['a', 'b'], ['c', 'd']]\n *\n * _.chunk(['a', 'b', 'c', 'd'], 3);\n * // => [['a', 'b', 'c'], ['d']]\n */\n function chunk(array, size, guard) {\n if ((guard ? isIterateeCall(array, size, guard) : size === undefined)) {\n size = 1;\n } else {\n size = nativeMax(toInteger(size), 0);\n }\n var length = array == null ? 0 : array.length;\n if (!length || size < 1) {\n return [];\n }\n var index = 0,\n resIndex = 0,\n result = Array(nativeCeil(length / size));\n\n while (index < length) {\n result[resIndex++] = baseSlice(array, index, (index += size));\n }\n return result;\n }\n\n /**\n * Creates an array with all falsey values removed. The values `false`, `null`,\n * `0`, `\"\"`, `undefined`, and `NaN` are falsey.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Array\n * @param {Array} array The array to compact.\n * @returns {Array} Returns the new array of filtered values.\n * @example\n *\n * _.compact([0, 1, false, 2, '', 3]);\n * // => [1, 2, 3]\n */\n function compact(array) {\n var index = -1,\n length = array == null ? 0 : array.length,\n resIndex = 0,\n result = [];\n\n while (++index < length) {\n var value = array[index];\n if (value) {\n result[resIndex++] = value;\n }\n }\n return result;\n }\n\n /**\n * Creates a new array concatenating `array` with any additional arrays\n * and/or values.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {Array} array The array to concatenate.\n * @param {...*} [values] The values to concatenate.\n * @returns {Array} Returns the new concatenated array.\n * @example\n *\n * var array = [1];\n * var other = _.concat(array, 2, [3], [[4]]);\n *\n * console.log(other);\n * // => [1, 2, 3, [4]]\n *\n * console.log(array);\n * // => [1]\n */\n function concat() {\n var length = arguments.length;\n if (!length) {\n return [];\n }\n var args = Array(length - 1),\n array = arguments[0],\n index = length;\n\n while (index--) {\n args[index - 1] = arguments[index];\n }\n return arrayPush(isArray(array) ? copyArray(array) : [array], baseFlatten(args, 1));\n }\n\n /**\n * Creates an array of `array` values not included in the other given arrays\n * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * for equality comparisons. The order and references of result values are\n * determined by the first array.\n *\n * **Note:** Unlike `_.pullAll`, this method returns a new array.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Array\n * @param {Array} array The array to inspect.\n * @param {...Array} [values] The values to exclude.\n * @returns {Array} Returns the new array of filtered values.\n * @see _.without, _.xor\n * @example\n *\n * _.difference([2, 1], [2, 3]);\n * // => [1]\n */\n var difference = baseRest(function(array, values) {\n return isArrayLikeObject(array)\n ? baseDifference(array, baseFlatten(values, 1, isArrayLikeObject, true))\n : [];\n });\n\n /**\n * This method is like `_.difference` except that it accepts `iteratee` which\n * is invoked for each element of `array` and `values` to generate the criterion\n * by which they're compared. The order and references of result values are\n * determined by the first array. The iteratee is invoked with one argument:\n * (value).\n *\n * **Note:** Unlike `_.pullAllBy`, this method returns a new array.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {Array} array The array to inspect.\n * @param {...Array} [values] The values to exclude.\n * @param {Function} [iteratee=_.identity] The iteratee invoked per element.\n * @returns {Array} Returns the new array of filtered values.\n * @example\n *\n * _.differenceBy([2.1, 1.2], [2.3, 3.4], Math.floor);\n * // => [1.2]\n *\n * // The `_.property` iteratee shorthand.\n * _.differenceBy([{ 'x': 2 }, { 'x': 1 }], [{ 'x': 1 }], 'x');\n * // => [{ 'x': 2 }]\n */\n var differenceBy = baseRest(function(array, values) {\n var iteratee = last(values);\n if (isArrayLikeObject(iteratee)) {\n iteratee = undefined;\n }\n return isArrayLikeObject(array)\n ? baseDifference(array, baseFlatten(values, 1, isArrayLikeObject, true), getIteratee(iteratee, 2))\n : [];\n });\n\n /**\n * This method is like `_.difference` except that it accepts `comparator`\n * which is invoked to compare elements of `array` to `values`. The order and\n * references of result values are determined by the first array. The comparator\n * is invoked with two arguments: (arrVal, othVal).\n *\n * **Note:** Unlike `_.pullAllWith`, this method returns a new array.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {Array} array The array to inspect.\n * @param {...Array} [values] The values to exclude.\n * @param {Function} [comparator] The comparator invoked per element.\n * @returns {Array} Returns the new array of filtered values.\n * @example\n *\n * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }];\n *\n * _.differenceWith(objects, [{ 'x': 1, 'y': 2 }], _.isEqual);\n * // => [{ 'x': 2, 'y': 1 }]\n */\n var differenceWith = baseRest(function(array, values) {\n var comparator = last(values);\n if (isArrayLikeObject(comparator)) {\n comparator = undefined;\n }\n return isArrayLikeObject(array)\n ? baseDifference(array, baseFlatten(values, 1, isArrayLikeObject, true), undefined, comparator)\n : [];\n });\n\n /**\n * Creates a slice of `array` with `n` elements dropped from the beginning.\n *\n * @static\n * @memberOf _\n * @since 0.5.0\n * @category Array\n * @param {Array} array The array to query.\n * @param {number} [n=1] The number of elements to drop.\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n * @returns {Array} Returns the slice of `array`.\n * @example\n *\n * _.drop([1, 2, 3]);\n * // => [2, 3]\n *\n * _.drop([1, 2, 3], 2);\n * // => [3]\n *\n * _.drop([1, 2, 3], 5);\n * // => []\n *\n * _.drop([1, 2, 3], 0);\n * // => [1, 2, 3]\n */\n function drop(array, n, guard) {\n var length = array == null ? 0 : array.length;\n if (!length) {\n return [];\n }\n n = (guard || n === undefined) ? 1 : toInteger(n);\n return baseSlice(array, n < 0 ? 0 : n, length);\n }\n\n /**\n * Creates a slice of `array` with `n` elements dropped from the end.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Array\n * @param {Array} array The array to query.\n * @param {number} [n=1] The number of elements to drop.\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n * @returns {Array} Returns the slice of `array`.\n * @example\n *\n * _.dropRight([1, 2, 3]);\n * // => [1, 2]\n *\n * _.dropRight([1, 2, 3], 2);\n * // => [1]\n *\n * _.dropRight([1, 2, 3], 5);\n * // => []\n *\n * _.dropRight([1, 2, 3], 0);\n * // => [1, 2, 3]\n */\n function dropRight(array, n, guard) {\n var length = array == null ? 0 : array.length;\n if (!length) {\n return [];\n }\n n = (guard || n === undefined) ? 1 : toInteger(n);\n n = length - n;\n return baseSlice(array, 0, n < 0 ? 0 : n);\n }\n\n /**\n * Creates a slice of `array` excluding elements dropped from the end.\n * Elements are dropped until `predicate` returns falsey. The predicate is\n * invoked with three arguments: (value, index, array).\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Array\n * @param {Array} array The array to query.\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\n * @returns {Array} Returns the slice of `array`.\n * @example\n *\n * var users = [\n * { 'user': 'barney', 'active': true },\n * { 'user': 'fred', 'active': false },\n * { 'user': 'pebbles', 'active': false }\n * ];\n *\n * _.dropRightWhile(users, function(o) { return !o.active; });\n * // => objects for ['barney']\n *\n * // The `_.matches` iteratee shorthand.\n * _.dropRightWhile(users, { 'user': 'pebbles', 'active': false });\n * // => objects for ['barney', 'fred']\n *\n * // The `_.matchesProperty` iteratee shorthand.\n * _.dropRightWhile(users, ['active', false]);\n * // => objects for ['barney']\n *\n * // The `_.property` iteratee shorthand.\n * _.dropRightWhile(users, 'active');\n * // => objects for ['barney', 'fred', 'pebbles']\n */\n function dropRightWhile(array, predicate) {\n return (array && array.length)\n ? baseWhile(array, getIteratee(predicate, 3), true, true)\n : [];\n }\n\n /**\n * Creates a slice of `array` excluding elements dropped from the beginning.\n * Elements are dropped until `predicate` returns falsey. The predicate is\n * invoked with three arguments: (value, index, array).\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Array\n * @param {Array} array The array to query.\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\n * @returns {Array} Returns the slice of `array`.\n * @example\n *\n * var users = [\n * { 'user': 'barney', 'active': false },\n * { 'user': 'fred', 'active': false },\n * { 'user': 'pebbles', 'active': true }\n * ];\n *\n * _.dropWhile(users, function(o) { return !o.active; });\n * // => objects for ['pebbles']\n *\n * // The `_.matches` iteratee shorthand.\n * _.dropWhile(users, { 'user': 'barney', 'active': false });\n * // => objects for ['fred', 'pebbles']\n *\n * // The `_.matchesProperty` iteratee shorthand.\n * _.dropWhile(users, ['active', false]);\n * // => objects for ['pebbles']\n *\n * // The `_.property` iteratee shorthand.\n * _.dropWhile(users, 'active');\n * // => objects for ['barney', 'fred', 'pebbles']\n */\n function dropWhile(array, predicate) {\n return (array && array.length)\n ? baseWhile(array, getIteratee(predicate, 3), true)\n : [];\n }\n\n /**\n * Fills elements of `array` with `value` from `start` up to, but not\n * including, `end`.\n *\n * **Note:** This method mutates `array`.\n *\n * @static\n * @memberOf _\n * @since 3.2.0\n * @category Array\n * @param {Array} array The array to fill.\n * @param {*} value The value to fill `array` with.\n * @param {number} [start=0] The start position.\n * @param {number} [end=array.length] The end position.\n * @returns {Array} Returns `array`.\n * @example\n *\n * var array = [1, 2, 3];\n *\n * _.fill(array, 'a');\n * console.log(array);\n * // => ['a', 'a', 'a']\n *\n * _.fill(Array(3), 2);\n * // => [2, 2, 2]\n *\n * _.fill([4, 6, 8, 10], '*', 1, 3);\n * // => [4, '*', '*', 10]\n */\n function fill(array, value, start, end) {\n var length = array == null ? 0 : array.length;\n if (!length) {\n return [];\n }\n if (start && typeof start != 'number' && isIterateeCall(array, value, start)) {\n start = 0;\n end = length;\n }\n return baseFill(array, value, start, end);\n }\n\n /**\n * This method is like `_.find` except that it returns the index of the first\n * element `predicate` returns truthy for instead of the element itself.\n *\n * @static\n * @memberOf _\n * @since 1.1.0\n * @category Array\n * @param {Array} array The array to inspect.\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\n * @param {number} [fromIndex=0] The index to search from.\n * @returns {number} Returns the index of the found element, else `-1`.\n * @example\n *\n * var users = [\n * { 'user': 'barney', 'active': false },\n * { 'user': 'fred', 'active': false },\n * { 'user': 'pebbles', 'active': true }\n * ];\n *\n * _.findIndex(users, function(o) { return o.user == 'barney'; });\n * // => 0\n *\n * // The `_.matches` iteratee shorthand.\n * _.findIndex(users, { 'user': 'fred', 'active': false });\n * // => 1\n *\n * // The `_.matchesProperty` iteratee shorthand.\n * _.findIndex(users, ['active', false]);\n * // => 0\n *\n * // The `_.property` iteratee shorthand.\n * _.findIndex(users, 'active');\n * // => 2\n */\n function findIndex(array, predicate, fromIndex) {\n var length = array == null ? 0 : array.length;\n if (!length) {\n return -1;\n }\n var index = fromIndex == null ? 0 : toInteger(fromIndex);\n if (index < 0) {\n index = nativeMax(length + index, 0);\n }\n return baseFindIndex(array, getIteratee(predicate, 3), index);\n }\n\n /**\n * This method is like `_.findIndex` except that it iterates over elements\n * of `collection` from right to left.\n *\n * @static\n * @memberOf _\n * @since 2.0.0\n * @category Array\n * @param {Array} array The array to inspect.\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\n * @param {number} [fromIndex=array.length-1] The index to search from.\n * @returns {number} Returns the index of the found element, else `-1`.\n * @example\n *\n * var users = [\n * { 'user': 'barney', 'active': true },\n * { 'user': 'fred', 'active': false },\n * { 'user': 'pebbles', 'active': false }\n * ];\n *\n * _.findLastIndex(users, function(o) { return o.user == 'pebbles'; });\n * // => 2\n *\n * // The `_.matches` iteratee shorthand.\n * _.findLastIndex(users, { 'user': 'barney', 'active': true });\n * // => 0\n *\n * // The `_.matchesProperty` iteratee shorthand.\n * _.findLastIndex(users, ['active', false]);\n * // => 2\n *\n * // The `_.property` iteratee shorthand.\n * _.findLastIndex(users, 'active');\n * // => 0\n */\n function findLastIndex(array, predicate, fromIndex) {\n var length = array == null ? 0 : array.length;\n if (!length) {\n return -1;\n }\n var index = length - 1;\n if (fromIndex !== undefined) {\n index = toInteger(fromIndex);\n index = fromIndex < 0\n ? nativeMax(length + index, 0)\n : nativeMin(index, length - 1);\n }\n return baseFindIndex(array, getIteratee(predicate, 3), index, true);\n }\n\n /**\n * Flattens `array` a single level deep.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Array\n * @param {Array} array The array to flatten.\n * @returns {Array} Returns the new flattened array.\n * @example\n *\n * _.flatten([1, [2, [3, [4]], 5]]);\n * // => [1, 2, [3, [4]], 5]\n */\n function flatten(array) {\n var length = array == null ? 0 : array.length;\n return length ? baseFlatten(array, 1) : [];\n }\n\n /**\n * Recursively flattens `array`.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Array\n * @param {Array} array The array to flatten.\n * @returns {Array} Returns the new flattened array.\n * @example\n *\n * _.flattenDeep([1, [2, [3, [4]], 5]]);\n * // => [1, 2, 3, 4, 5]\n */\n function flattenDeep(array) {\n var length = array == null ? 0 : array.length;\n return length ? baseFlatten(array, INFINITY) : [];\n }\n\n /**\n * Recursively flatten `array` up to `depth` times.\n *\n * @static\n * @memberOf _\n * @since 4.4.0\n * @category Array\n * @param {Array} array The array to flatten.\n * @param {number} [depth=1] The maximum recursion depth.\n * @returns {Array} Returns the new flattened array.\n * @example\n *\n * var array = [1, [2, [3, [4]], 5]];\n *\n * _.flattenDepth(array, 1);\n * // => [1, 2, [3, [4]], 5]\n *\n * _.flattenDepth(array, 2);\n * // => [1, 2, 3, [4], 5]\n */\n function flattenDepth(array, depth) {\n var length = array == null ? 0 : array.length;\n if (!length) {\n return [];\n }\n depth = depth === undefined ? 1 : toInteger(depth);\n return baseFlatten(array, depth);\n }\n\n /**\n * The inverse of `_.toPairs`; this method returns an object composed\n * from key-value `pairs`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {Array} pairs The key-value pairs.\n * @returns {Object} Returns the new object.\n * @example\n *\n * _.fromPairs([['a', 1], ['b', 2]]);\n * // => { 'a': 1, 'b': 2 }\n */\n function fromPairs(pairs) {\n var index = -1,\n length = pairs == null ? 0 : pairs.length,\n result = {};\n\n while (++index < length) {\n var pair = pairs[index];\n result[pair[0]] = pair[1];\n }\n return result;\n }\n\n /**\n * Gets the first element of `array`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @alias first\n * @category Array\n * @param {Array} array The array to query.\n * @returns {*} Returns the first element of `array`.\n * @example\n *\n * _.head([1, 2, 3]);\n * // => 1\n *\n * _.head([]);\n * // => undefined\n */\n function head(array) {\n return (array && array.length) ? array[0] : undefined;\n }\n\n /**\n * Gets the index at which the first occurrence of `value` is found in `array`\n * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * for equality comparisons. If `fromIndex` is negative, it's used as the\n * offset from the end of `array`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Array\n * @param {Array} array The array to inspect.\n * @param {*} value The value to search for.\n * @param {number} [fromIndex=0] The index to search from.\n * @returns {number} Returns the index of the matched value, else `-1`.\n * @example\n *\n * _.indexOf([1, 2, 1, 2], 2);\n * // => 1\n *\n * // Search from the `fromIndex`.\n * _.indexOf([1, 2, 1, 2], 2, 2);\n * // => 3\n */\n function indexOf(array, value, fromIndex) {\n var length = array == null ? 0 : array.length;\n if (!length) {\n return -1;\n }\n var index = fromIndex == null ? 0 : toInteger(fromIndex);\n if (index < 0) {\n index = nativeMax(length + index, 0);\n }\n return baseIndexOf(array, value, index);\n }\n\n /**\n * Gets all but the last element of `array`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Array\n * @param {Array} array The array to query.\n * @returns {Array} Returns the slice of `array`.\n * @example\n *\n * _.initial([1, 2, 3]);\n * // => [1, 2]\n */\n function initial(array) {\n var length = array == null ? 0 : array.length;\n return length ? baseSlice(array, 0, -1) : [];\n }\n\n /**\n * Creates an array of unique values that are included in all given arrays\n * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * for equality comparisons. The order and references of result values are\n * determined by the first array.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Array\n * @param {...Array} [arrays] The arrays to inspect.\n * @returns {Array} Returns the new array of intersecting values.\n * @example\n *\n * _.intersection([2, 1], [2, 3]);\n * // => [2]\n */\n var intersection = baseRest(function(arrays) {\n var mapped = arrayMap(arrays, castArrayLikeObject);\n return (mapped.length && mapped[0] === arrays[0])\n ? baseIntersection(mapped)\n : [];\n });\n\n /**\n * This method is like `_.intersection` except that it accepts `iteratee`\n * which is invoked for each element of each `arrays` to generate the criterion\n * by which they're compared. The order and references of result values are\n * determined by the first array. The iteratee is invoked with one argument:\n * (value).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {...Array} [arrays] The arrays to inspect.\n * @param {Function} [iteratee=_.identity] The iteratee invoked per element.\n * @returns {Array} Returns the new array of intersecting values.\n * @example\n *\n * _.intersectionBy([2.1, 1.2], [2.3, 3.4], Math.floor);\n * // => [2.1]\n *\n * // The `_.property` iteratee shorthand.\n * _.intersectionBy([{ 'x': 1 }], [{ 'x': 2 }, { 'x': 1 }], 'x');\n * // => [{ 'x': 1 }]\n */\n var intersectionBy = baseRest(function(arrays) {\n var iteratee = last(arrays),\n mapped = arrayMap(arrays, castArrayLikeObject);\n\n if (iteratee === last(mapped)) {\n iteratee = undefined;\n } else {\n mapped.pop();\n }\n return (mapped.length && mapped[0] === arrays[0])\n ? baseIntersection(mapped, getIteratee(iteratee, 2))\n : [];\n });\n\n /**\n * This method is like `_.intersection` except that it accepts `comparator`\n * which is invoked to compare elements of `arrays`. The order and references\n * of result values are determined by the first array. The comparator is\n * invoked with two arguments: (arrVal, othVal).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {...Array} [arrays] The arrays to inspect.\n * @param {Function} [comparator] The comparator invoked per element.\n * @returns {Array} Returns the new array of intersecting values.\n * @example\n *\n * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }];\n * var others = [{ 'x': 1, 'y': 1 }, { 'x': 1, 'y': 2 }];\n *\n * _.intersectionWith(objects, others, _.isEqual);\n * // => [{ 'x': 1, 'y': 2 }]\n */\n var intersectionWith = baseRest(function(arrays) {\n var comparator = last(arrays),\n mapped = arrayMap(arrays, castArrayLikeObject);\n\n comparator = typeof comparator == 'function' ? comparator : undefined;\n if (comparator) {\n mapped.pop();\n }\n return (mapped.length && mapped[0] === arrays[0])\n ? baseIntersection(mapped, undefined, comparator)\n : [];\n });\n\n /**\n * Converts all elements in `array` into a string separated by `separator`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {Array} array The array to convert.\n * @param {string} [separator=','] The element separator.\n * @returns {string} Returns the joined string.\n * @example\n *\n * _.join(['a', 'b', 'c'], '~');\n * // => 'a~b~c'\n */\n function join(array, separator) {\n return array == null ? '' : nativeJoin.call(array, separator);\n }\n\n /**\n * Gets the last element of `array`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Array\n * @param {Array} array The array to query.\n * @returns {*} Returns the last element of `array`.\n * @example\n *\n * _.last([1, 2, 3]);\n * // => 3\n */\n function last(array) {\n var length = array == null ? 0 : array.length;\n return length ? array[length - 1] : undefined;\n }\n\n /**\n * This method is like `_.indexOf` except that it iterates over elements of\n * `array` from right to left.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Array\n * @param {Array} array The array to inspect.\n * @param {*} value The value to search for.\n * @param {number} [fromIndex=array.length-1] The index to search from.\n * @returns {number} Returns the index of the matched value, else `-1`.\n * @example\n *\n * _.lastIndexOf([1, 2, 1, 2], 2);\n * // => 3\n *\n * // Search from the `fromIndex`.\n * _.lastIndexOf([1, 2, 1, 2], 2, 2);\n * // => 1\n */\n function lastIndexOf(array, value, fromIndex) {\n var length = array == null ? 0 : array.length;\n if (!length) {\n return -1;\n }\n var index = length;\n if (fromIndex !== undefined) {\n index = toInteger(fromIndex);\n index = index < 0 ? nativeMax(length + index, 0) : nativeMin(index, length - 1);\n }\n return value === value\n ? strictLastIndexOf(array, value, index)\n : baseFindIndex(array, baseIsNaN, index, true);\n }\n\n /**\n * Gets the element at index `n` of `array`. If `n` is negative, the nth\n * element from the end is returned.\n *\n * @static\n * @memberOf _\n * @since 4.11.0\n * @category Array\n * @param {Array} array The array to query.\n * @param {number} [n=0] The index of the element to return.\n * @returns {*} Returns the nth element of `array`.\n * @example\n *\n * var array = ['a', 'b', 'c', 'd'];\n *\n * _.nth(array, 1);\n * // => 'b'\n *\n * _.nth(array, -2);\n * // => 'c';\n */\n function nth(array, n) {\n return (array && array.length) ? baseNth(array, toInteger(n)) : undefined;\n }\n\n /**\n * Removes all given values from `array` using\n * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * for equality comparisons.\n *\n * **Note:** Unlike `_.without`, this method mutates `array`. Use `_.remove`\n * to remove elements from an array by predicate.\n *\n * @static\n * @memberOf _\n * @since 2.0.0\n * @category Array\n * @param {Array} array The array to modify.\n * @param {...*} [values] The values to remove.\n * @returns {Array} Returns `array`.\n * @example\n *\n * var array = ['a', 'b', 'c', 'a', 'b', 'c'];\n *\n * _.pull(array, 'a', 'c');\n * console.log(array);\n * // => ['b', 'b']\n */\n var pull = baseRest(pullAll);\n\n /**\n * This method is like `_.pull` except that it accepts an array of values to remove.\n *\n * **Note:** Unlike `_.difference`, this method mutates `array`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {Array} array The array to modify.\n * @param {Array} values The values to remove.\n * @returns {Array} Returns `array`.\n * @example\n *\n * var array = ['a', 'b', 'c', 'a', 'b', 'c'];\n *\n * _.pullAll(array, ['a', 'c']);\n * console.log(array);\n * // => ['b', 'b']\n */\n function pullAll(array, values) {\n return (array && array.length && values && values.length)\n ? basePullAll(array, values)\n : array;\n }\n\n /**\n * This method is like `_.pullAll` except that it accepts `iteratee` which is\n * invoked for each element of `array` and `values` to generate the criterion\n * by which they're compared. The iteratee is invoked with one argument: (value).\n *\n * **Note:** Unlike `_.differenceBy`, this method mutates `array`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {Array} array The array to modify.\n * @param {Array} values The values to remove.\n * @param {Function} [iteratee=_.identity] The iteratee invoked per element.\n * @returns {Array} Returns `array`.\n * @example\n *\n * var array = [{ 'x': 1 }, { 'x': 2 }, { 'x': 3 }, { 'x': 1 }];\n *\n * _.pullAllBy(array, [{ 'x': 1 }, { 'x': 3 }], 'x');\n * console.log(array);\n * // => [{ 'x': 2 }]\n */\n function pullAllBy(array, values, iteratee) {\n return (array && array.length && values && values.length)\n ? basePullAll(array, values, getIteratee(iteratee, 2))\n : array;\n }\n\n /**\n * This method is like `_.pullAll` except that it accepts `comparator` which\n * is invoked to compare elements of `array` to `values`. The comparator is\n * invoked with two arguments: (arrVal, othVal).\n *\n * **Note:** Unlike `_.differenceWith`, this method mutates `array`.\n *\n * @static\n * @memberOf _\n * @since 4.6.0\n * @category Array\n * @param {Array} array The array to modify.\n * @param {Array} values The values to remove.\n * @param {Function} [comparator] The comparator invoked per element.\n * @returns {Array} Returns `array`.\n * @example\n *\n * var array = [{ 'x': 1, 'y': 2 }, { 'x': 3, 'y': 4 }, { 'x': 5, 'y': 6 }];\n *\n * _.pullAllWith(array, [{ 'x': 3, 'y': 4 }], _.isEqual);\n * console.log(array);\n * // => [{ 'x': 1, 'y': 2 }, { 'x': 5, 'y': 6 }]\n */\n function pullAllWith(array, values, comparator) {\n return (array && array.length && values && values.length)\n ? basePullAll(array, values, undefined, comparator)\n : array;\n }\n\n /**\n * Removes elements from `array` corresponding to `indexes` and returns an\n * array of removed elements.\n *\n * **Note:** Unlike `_.at`, this method mutates `array`.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Array\n * @param {Array} array The array to modify.\n * @param {...(number|number[])} [indexes] The indexes of elements to remove.\n * @returns {Array} Returns the new array of removed elements.\n * @example\n *\n * var array = ['a', 'b', 'c', 'd'];\n * var pulled = _.pullAt(array, [1, 3]);\n *\n * console.log(array);\n * // => ['a', 'c']\n *\n * console.log(pulled);\n * // => ['b', 'd']\n */\n var pullAt = flatRest(function(array, indexes) {\n var length = array == null ? 0 : array.length,\n result = baseAt(array, indexes);\n\n basePullAt(array, arrayMap(indexes, function(index) {\n return isIndex(index, length) ? +index : index;\n }).sort(compareAscending));\n\n return result;\n });\n\n /**\n * Removes all elements from `array` that `predicate` returns truthy for\n * and returns an array of the removed elements. The predicate is invoked\n * with three arguments: (value, index, array).\n *\n * **Note:** Unlike `_.filter`, this method mutates `array`. Use `_.pull`\n * to pull elements from an array by value.\n *\n * @static\n * @memberOf _\n * @since 2.0.0\n * @category Array\n * @param {Array} array The array to modify.\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\n * @returns {Array} Returns the new array of removed elements.\n * @example\n *\n * var array = [1, 2, 3, 4];\n * var evens = _.remove(array, function(n) {\n * return n % 2 == 0;\n * });\n *\n * console.log(array);\n * // => [1, 3]\n *\n * console.log(evens);\n * // => [2, 4]\n */\n function remove(array, predicate) {\n var result = [];\n if (!(array && array.length)) {\n return result;\n }\n var index = -1,\n indexes = [],\n length = array.length;\n\n predicate = getIteratee(predicate, 3);\n while (++index < length) {\n var value = array[index];\n if (predicate(value, index, array)) {\n result.push(value);\n indexes.push(index);\n }\n }\n basePullAt(array, indexes);\n return result;\n }\n\n /**\n * Reverses `array` so that the first element becomes the last, the second\n * element becomes the second to last, and so on.\n *\n * **Note:** This method mutates `array` and is based on\n * [`Array#reverse`](https://mdn.io/Array/reverse).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {Array} array The array to modify.\n * @returns {Array} Returns `array`.\n * @example\n *\n * var array = [1, 2, 3];\n *\n * _.reverse(array);\n * // => [3, 2, 1]\n *\n * console.log(array);\n * // => [3, 2, 1]\n */\n function reverse(array) {\n return array == null ? array : nativeReverse.call(array);\n }\n\n /**\n * Creates a slice of `array` from `start` up to, but not including, `end`.\n *\n * **Note:** This method is used instead of\n * [`Array#slice`](https://mdn.io/Array/slice) to ensure dense arrays are\n * returned.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Array\n * @param {Array} array The array to slice.\n * @param {number} [start=0] The start position.\n * @param {number} [end=array.length] The end position.\n * @returns {Array} Returns the slice of `array`.\n */\n function slice(array, start, end) {\n var length = array == null ? 0 : array.length;\n if (!length) {\n return [];\n }\n if (end && typeof end != 'number' && isIterateeCall(array, start, end)) {\n start = 0;\n end = length;\n }\n else {\n start = start == null ? 0 : toInteger(start);\n end = end === undefined ? length : toInteger(end);\n }\n return baseSlice(array, start, end);\n }\n\n /**\n * Uses a binary search to determine the lowest index at which `value`\n * should be inserted into `array` in order to maintain its sort order.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Array\n * @param {Array} array The sorted array to inspect.\n * @param {*} value The value to evaluate.\n * @returns {number} Returns the index at which `value` should be inserted\n * into `array`.\n * @example\n *\n * _.sortedIndex([30, 50], 40);\n * // => 1\n */\n function sortedIndex(array, value) {\n return baseSortedIndex(array, value);\n }\n\n /**\n * This method is like `_.sortedIndex` except that it accepts `iteratee`\n * which is invoked for `value` and each element of `array` to compute their\n * sort ranking. The iteratee is invoked with one argument: (value).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {Array} array The sorted array to inspect.\n * @param {*} value The value to evaluate.\n * @param {Function} [iteratee=_.identity] The iteratee invoked per element.\n * @returns {number} Returns the index at which `value` should be inserted\n * into `array`.\n * @example\n *\n * var objects = [{ 'x': 4 }, { 'x': 5 }];\n *\n * _.sortedIndexBy(objects, { 'x': 4 }, function(o) { return o.x; });\n * // => 0\n *\n * // The `_.property` iteratee shorthand.\n * _.sortedIndexBy(objects, { 'x': 4 }, 'x');\n * // => 0\n */\n function sortedIndexBy(array, value, iteratee) {\n return baseSortedIndexBy(array, value, getIteratee(iteratee, 2));\n }\n\n /**\n * This method is like `_.indexOf` except that it performs a binary\n * search on a sorted `array`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {Array} array The array to inspect.\n * @param {*} value The value to search for.\n * @returns {number} Returns the index of the matched value, else `-1`.\n * @example\n *\n * _.sortedIndexOf([4, 5, 5, 5, 6], 5);\n * // => 1\n */\n function sortedIndexOf(array, value) {\n var length = array == null ? 0 : array.length;\n if (length) {\n var index = baseSortedIndex(array, value);\n if (index < length && eq(array[index], value)) {\n return index;\n }\n }\n return -1;\n }\n\n /**\n * This method is like `_.sortedIndex` except that it returns the highest\n * index at which `value` should be inserted into `array` in order to\n * maintain its sort order.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Array\n * @param {Array} array The sorted array to inspect.\n * @param {*} value The value to evaluate.\n * @returns {number} Returns the index at which `value` should be inserted\n * into `array`.\n * @example\n *\n * _.sortedLastIndex([4, 5, 5, 5, 6], 5);\n * // => 4\n */\n function sortedLastIndex(array, value) {\n return baseSortedIndex(array, value, true);\n }\n\n /**\n * This method is like `_.sortedLastIndex` except that it accepts `iteratee`\n * which is invoked for `value` and each element of `array` to compute their\n * sort ranking. The iteratee is invoked with one argument: (value).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {Array} array The sorted array to inspect.\n * @param {*} value The value to evaluate.\n * @param {Function} [iteratee=_.identity] The iteratee invoked per element.\n * @returns {number} Returns the index at which `value` should be inserted\n * into `array`.\n * @example\n *\n * var objects = [{ 'x': 4 }, { 'x': 5 }];\n *\n * _.sortedLastIndexBy(objects, { 'x': 4 }, function(o) { return o.x; });\n * // => 1\n *\n * // The `_.property` iteratee shorthand.\n * _.sortedLastIndexBy(objects, { 'x': 4 }, 'x');\n * // => 1\n */\n function sortedLastIndexBy(array, value, iteratee) {\n return baseSortedIndexBy(array, value, getIteratee(iteratee, 2), true);\n }\n\n /**\n * This method is like `_.lastIndexOf` except that it performs a binary\n * search on a sorted `array`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {Array} array The array to inspect.\n * @param {*} value The value to search for.\n * @returns {number} Returns the index of the matched value, else `-1`.\n * @example\n *\n * _.sortedLastIndexOf([4, 5, 5, 5, 6], 5);\n * // => 3\n */\n function sortedLastIndexOf(array, value) {\n var length = array == null ? 0 : array.length;\n if (length) {\n var index = baseSortedIndex(array, value, true) - 1;\n if (eq(array[index], value)) {\n return index;\n }\n }\n return -1;\n }\n\n /**\n * This method is like `_.uniq` except that it's designed and optimized\n * for sorted arrays.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {Array} array The array to inspect.\n * @returns {Array} Returns the new duplicate free array.\n * @example\n *\n * _.sortedUniq([1, 1, 2]);\n * // => [1, 2]\n */\n function sortedUniq(array) {\n return (array && array.length)\n ? baseSortedUniq(array)\n : [];\n }\n\n /**\n * This method is like `_.uniqBy` except that it's designed and optimized\n * for sorted arrays.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {Array} array The array to inspect.\n * @param {Function} [iteratee] The iteratee invoked per element.\n * @returns {Array} Returns the new duplicate free array.\n * @example\n *\n * _.sortedUniqBy([1.1, 1.2, 2.3, 2.4], Math.floor);\n * // => [1.1, 2.3]\n */\n function sortedUniqBy(array, iteratee) {\n return (array && array.length)\n ? baseSortedUniq(array, getIteratee(iteratee, 2))\n : [];\n }\n\n /**\n * Gets all but the first element of `array`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {Array} array The array to query.\n * @returns {Array} Returns the slice of `array`.\n * @example\n *\n * _.tail([1, 2, 3]);\n * // => [2, 3]\n */\n function tail(array) {\n var length = array == null ? 0 : array.length;\n return length ? baseSlice(array, 1, length) : [];\n }\n\n /**\n * Creates a slice of `array` with `n` elements taken from the beginning.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Array\n * @param {Array} array The array to query.\n * @param {number} [n=1] The number of elements to take.\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n * @returns {Array} Returns the slice of `array`.\n * @example\n *\n * _.take([1, 2, 3]);\n * // => [1]\n *\n * _.take([1, 2, 3], 2);\n * // => [1, 2]\n *\n * _.take([1, 2, 3], 5);\n * // => [1, 2, 3]\n *\n * _.take([1, 2, 3], 0);\n * // => []\n */\n function take(array, n, guard) {\n if (!(array && array.length)) {\n return [];\n }\n n = (guard || n === undefined) ? 1 : toInteger(n);\n return baseSlice(array, 0, n < 0 ? 0 : n);\n }\n\n /**\n * Creates a slice of `array` with `n` elements taken from the end.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Array\n * @param {Array} array The array to query.\n * @param {number} [n=1] The number of elements to take.\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n * @returns {Array} Returns the slice of `array`.\n * @example\n *\n * _.takeRight([1, 2, 3]);\n * // => [3]\n *\n * _.takeRight([1, 2, 3], 2);\n * // => [2, 3]\n *\n * _.takeRight([1, 2, 3], 5);\n * // => [1, 2, 3]\n *\n * _.takeRight([1, 2, 3], 0);\n * // => []\n */\n function takeRight(array, n, guard) {\n var length = array == null ? 0 : array.length;\n if (!length) {\n return [];\n }\n n = (guard || n === undefined) ? 1 : toInteger(n);\n n = length - n;\n return baseSlice(array, n < 0 ? 0 : n, length);\n }\n\n /**\n * Creates a slice of `array` with elements taken from the end. Elements are\n * taken until `predicate` returns falsey. The predicate is invoked with\n * three arguments: (value, index, array).\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Array\n * @param {Array} array The array to query.\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\n * @returns {Array} Returns the slice of `array`.\n * @example\n *\n * var users = [\n * { 'user': 'barney', 'active': true },\n * { 'user': 'fred', 'active': false },\n * { 'user': 'pebbles', 'active': false }\n * ];\n *\n * _.takeRightWhile(users, function(o) { return !o.active; });\n * // => objects for ['fred', 'pebbles']\n *\n * // The `_.matches` iteratee shorthand.\n * _.takeRightWhile(users, { 'user': 'pebbles', 'active': false });\n * // => objects for ['pebbles']\n *\n * // The `_.matchesProperty` iteratee shorthand.\n * _.takeRightWhile(users, ['active', false]);\n * // => objects for ['fred', 'pebbles']\n *\n * // The `_.property` iteratee shorthand.\n * _.takeRightWhile(users, 'active');\n * // => []\n */\n function takeRightWhile(array, predicate) {\n return (array && array.length)\n ? baseWhile(array, getIteratee(predicate, 3), false, true)\n : [];\n }\n\n /**\n * Creates a slice of `array` with elements taken from the beginning. Elements\n * are taken until `predicate` returns falsey. The predicate is invoked with\n * three arguments: (value, index, array).\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Array\n * @param {Array} array The array to query.\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\n * @returns {Array} Returns the slice of `array`.\n * @example\n *\n * var users = [\n * { 'user': 'barney', 'active': false },\n * { 'user': 'fred', 'active': false },\n * { 'user': 'pebbles', 'active': true }\n * ];\n *\n * _.takeWhile(users, function(o) { return !o.active; });\n * // => objects for ['barney', 'fred']\n *\n * // The `_.matches` iteratee shorthand.\n * _.takeWhile(users, { 'user': 'barney', 'active': false });\n * // => objects for ['barney']\n *\n * // The `_.matchesProperty` iteratee shorthand.\n * _.takeWhile(users, ['active', false]);\n * // => objects for ['barney', 'fred']\n *\n * // The `_.property` iteratee shorthand.\n * _.takeWhile(users, 'active');\n * // => []\n */\n function takeWhile(array, predicate) {\n return (array && array.length)\n ? baseWhile(array, getIteratee(predicate, 3))\n : [];\n }\n\n /**\n * Creates an array of unique values, in order, from all given arrays using\n * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * for equality comparisons.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Array\n * @param {...Array} [arrays] The arrays to inspect.\n * @returns {Array} Returns the new array of combined values.\n * @example\n *\n * _.union([2], [1, 2]);\n * // => [2, 1]\n */\n var union = baseRest(function(arrays) {\n return baseUniq(baseFlatten(arrays, 1, isArrayLikeObject, true));\n });\n\n /**\n * This method is like `_.union` except that it accepts `iteratee` which is\n * invoked for each element of each `arrays` to generate the criterion by\n * which uniqueness is computed. Result values are chosen from the first\n * array in which the value occurs. The iteratee is invoked with one argument:\n * (value).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {...Array} [arrays] The arrays to inspect.\n * @param {Function} [iteratee=_.identity] The iteratee invoked per element.\n * @returns {Array} Returns the new array of combined values.\n * @example\n *\n * _.unionBy([2.1], [1.2, 2.3], Math.floor);\n * // => [2.1, 1.2]\n *\n * // The `_.property` iteratee shorthand.\n * _.unionBy([{ 'x': 1 }], [{ 'x': 2 }, { 'x': 1 }], 'x');\n * // => [{ 'x': 1 }, { 'x': 2 }]\n */\n var unionBy = baseRest(function(arrays) {\n var iteratee = last(arrays);\n if (isArrayLikeObject(iteratee)) {\n iteratee = undefined;\n }\n return baseUniq(baseFlatten(arrays, 1, isArrayLikeObject, true), getIteratee(iteratee, 2));\n });\n\n /**\n * This method is like `_.union` except that it accepts `comparator` which\n * is invoked to compare elements of `arrays`. Result values are chosen from\n * the first array in which the value occurs. The comparator is invoked\n * with two arguments: (arrVal, othVal).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {...Array} [arrays] The arrays to inspect.\n * @param {Function} [comparator] The comparator invoked per element.\n * @returns {Array} Returns the new array of combined values.\n * @example\n *\n * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }];\n * var others = [{ 'x': 1, 'y': 1 }, { 'x': 1, 'y': 2 }];\n *\n * _.unionWith(objects, others, _.isEqual);\n * // => [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }, { 'x': 1, 'y': 1 }]\n */\n var unionWith = baseRest(function(arrays) {\n var comparator = last(arrays);\n comparator = typeof comparator == 'function' ? comparator : undefined;\n return baseUniq(baseFlatten(arrays, 1, isArrayLikeObject, true), undefined, comparator);\n });\n\n /**\n * Creates a duplicate-free version of an array, using\n * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * for equality comparisons, in which only the first occurrence of each element\n * is kept. The order of result values is determined by the order they occur\n * in the array.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Array\n * @param {Array} array The array to inspect.\n * @returns {Array} Returns the new duplicate free array.\n * @example\n *\n * _.uniq([2, 1, 2]);\n * // => [2, 1]\n */\n function uniq(array) {\n return (array && array.length) ? baseUniq(array) : [];\n }\n\n /**\n * This method is like `_.uniq` except that it accepts `iteratee` which is\n * invoked for each element in `array` to generate the criterion by which\n * uniqueness is computed. The order of result values is determined by the\n * order they occur in the array. The iteratee is invoked with one argument:\n * (value).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {Array} array The array to inspect.\n * @param {Function} [iteratee=_.identity] The iteratee invoked per element.\n * @returns {Array} Returns the new duplicate free array.\n * @example\n *\n * _.uniqBy([2.1, 1.2, 2.3], Math.floor);\n * // => [2.1, 1.2]\n *\n * // The `_.property` iteratee shorthand.\n * _.uniqBy([{ 'x': 1 }, { 'x': 2 }, { 'x': 1 }], 'x');\n * // => [{ 'x': 1 }, { 'x': 2 }]\n */\n function uniqBy(array, iteratee) {\n return (array && array.length) ? baseUniq(array, getIteratee(iteratee, 2)) : [];\n }\n\n /**\n * This method is like `_.uniq` except that it accepts `comparator` which\n * is invoked to compare elements of `array`. The order of result values is\n * determined by the order they occur in the array.The comparator is invoked\n * with two arguments: (arrVal, othVal).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {Array} array The array to inspect.\n * @param {Function} [comparator] The comparator invoked per element.\n * @returns {Array} Returns the new duplicate free array.\n * @example\n *\n * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }, { 'x': 1, 'y': 2 }];\n *\n * _.uniqWith(objects, _.isEqual);\n * // => [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }]\n */\n function uniqWith(array, comparator) {\n comparator = typeof comparator == 'function' ? comparator : undefined;\n return (array && array.length) ? baseUniq(array, undefined, comparator) : [];\n }\n\n /**\n * This method is like `_.zip` except that it accepts an array of grouped\n * elements and creates an array regrouping the elements to their pre-zip\n * configuration.\n *\n * @static\n * @memberOf _\n * @since 1.2.0\n * @category Array\n * @param {Array} array The array of grouped elements to process.\n * @returns {Array} Returns the new array of regrouped elements.\n * @example\n *\n * var zipped = _.zip(['a', 'b'], [1, 2], [true, false]);\n * // => [['a', 1, true], ['b', 2, false]]\n *\n * _.unzip(zipped);\n * // => [['a', 'b'], [1, 2], [true, false]]\n */\n function unzip(array) {\n if (!(array && array.length)) {\n return [];\n }\n var length = 0;\n array = arrayFilter(array, function(group) {\n if (isArrayLikeObject(group)) {\n length = nativeMax(group.length, length);\n return true;\n }\n });\n return baseTimes(length, function(index) {\n return arrayMap(array, baseProperty(index));\n });\n }\n\n /**\n * This method is like `_.unzip` except that it accepts `iteratee` to specify\n * how regrouped values should be combined. The iteratee is invoked with the\n * elements of each group: (...group).\n *\n * @static\n * @memberOf _\n * @since 3.8.0\n * @category Array\n * @param {Array} array The array of grouped elements to process.\n * @param {Function} [iteratee=_.identity] The function to combine\n * regrouped values.\n * @returns {Array} Returns the new array of regrouped elements.\n * @example\n *\n * var zipped = _.zip([1, 2], [10, 20], [100, 200]);\n * // => [[1, 10, 100], [2, 20, 200]]\n *\n * _.unzipWith(zipped, _.add);\n * // => [3, 30, 300]\n */\n function unzipWith(array, iteratee) {\n if (!(array && array.length)) {\n return [];\n }\n var result = unzip(array);\n if (iteratee == null) {\n return result;\n }\n return arrayMap(result, function(group) {\n return apply(iteratee, undefined, group);\n });\n }\n\n /**\n * Creates an array excluding all given values using\n * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * for equality comparisons.\n *\n * **Note:** Unlike `_.pull`, this method returns a new array.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Array\n * @param {Array} array The array to inspect.\n * @param {...*} [values] The values to exclude.\n * @returns {Array} Returns the new array of filtered values.\n * @see _.difference, _.xor\n * @example\n *\n * _.without([2, 1, 2, 3], 1, 2);\n * // => [3]\n */\n var without = baseRest(function(array, values) {\n return isArrayLikeObject(array)\n ? baseDifference(array, values)\n : [];\n });\n\n /**\n * Creates an array of unique values that is the\n * [symmetric difference](https://en.wikipedia.org/wiki/Symmetric_difference)\n * of the given arrays. The order of result values is determined by the order\n * they occur in the arrays.\n *\n * @static\n * @memberOf _\n * @since 2.4.0\n * @category Array\n * @param {...Array} [arrays] The arrays to inspect.\n * @returns {Array} Returns the new array of filtered values.\n * @see _.difference, _.without\n * @example\n *\n * _.xor([2, 1], [2, 3]);\n * // => [1, 3]\n */\n var xor = baseRest(function(arrays) {\n return baseXor(arrayFilter(arrays, isArrayLikeObject));\n });\n\n /**\n * This method is like `_.xor` except that it accepts `iteratee` which is\n * invoked for each element of each `arrays` to generate the criterion by\n * which by which they're compared. The order of result values is determined\n * by the order they occur in the arrays. The iteratee is invoked with one\n * argument: (value).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {...Array} [arrays] The arrays to inspect.\n * @param {Function} [iteratee=_.identity] The iteratee invoked per element.\n * @returns {Array} Returns the new array of filtered values.\n * @example\n *\n * _.xorBy([2.1, 1.2], [2.3, 3.4], Math.floor);\n * // => [1.2, 3.4]\n *\n * // The `_.property` iteratee shorthand.\n * _.xorBy([{ 'x': 1 }], [{ 'x': 2 }, { 'x': 1 }], 'x');\n * // => [{ 'x': 2 }]\n */\n var xorBy = baseRest(function(arrays) {\n var iteratee = last(arrays);\n if (isArrayLikeObject(iteratee)) {\n iteratee = undefined;\n }\n return baseXor(arrayFilter(arrays, isArrayLikeObject), getIteratee(iteratee, 2));\n });\n\n /**\n * This method is like `_.xor` except that it accepts `comparator` which is\n * invoked to compare elements of `arrays`. The order of result values is\n * determined by the order they occur in the arrays. The comparator is invoked\n * with two arguments: (arrVal, othVal).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {...Array} [arrays] The arrays to inspect.\n * @param {Function} [comparator] The comparator invoked per element.\n * @returns {Array} Returns the new array of filtered values.\n * @example\n *\n * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }];\n * var others = [{ 'x': 1, 'y': 1 }, { 'x': 1, 'y': 2 }];\n *\n * _.xorWith(objects, others, _.isEqual);\n * // => [{ 'x': 2, 'y': 1 }, { 'x': 1, 'y': 1 }]\n */\n var xorWith = baseRest(function(arrays) {\n var comparator = last(arrays);\n comparator = typeof comparator == 'function' ? comparator : undefined;\n return baseXor(arrayFilter(arrays, isArrayLikeObject), undefined, comparator);\n });\n\n /**\n * Creates an array of grouped elements, the first of which contains the\n * first elements of the given arrays, the second of which contains the\n * second elements of the given arrays, and so on.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Array\n * @param {...Array} [arrays] The arrays to process.\n * @returns {Array} Returns the new array of grouped elements.\n * @example\n *\n * _.zip(['a', 'b'], [1, 2], [true, false]);\n * // => [['a', 1, true], ['b', 2, false]]\n */\n var zip = baseRest(unzip);\n\n /**\n * This method is like `_.fromPairs` except that it accepts two arrays,\n * one of property identifiers and one of corresponding values.\n *\n * @static\n * @memberOf _\n * @since 0.4.0\n * @category Array\n * @param {Array} [props=[]] The property identifiers.\n * @param {Array} [values=[]] The property values.\n * @returns {Object} Returns the new object.\n * @example\n *\n * _.zipObject(['a', 'b'], [1, 2]);\n * // => { 'a': 1, 'b': 2 }\n */\n function zipObject(props, values) {\n return baseZipObject(props || [], values || [], assignValue);\n }\n\n /**\n * This method is like `_.zipObject` except that it supports property paths.\n *\n * @static\n * @memberOf _\n * @since 4.1.0\n * @category Array\n * @param {Array} [props=[]] The property identifiers.\n * @param {Array} [values=[]] The property values.\n * @returns {Object} Returns the new object.\n * @example\n *\n * _.zipObjectDeep(['a.b[0].c', 'a.b[1].d'], [1, 2]);\n * // => { 'a': { 'b': [{ 'c': 1 }, { 'd': 2 }] } }\n */\n function zipObjectDeep(props, values) {\n return baseZipObject(props || [], values || [], baseSet);\n }\n\n /**\n * This method is like `_.zip` except that it accepts `iteratee` to specify\n * how grouped values should be combined. The iteratee is invoked with the\n * elements of each group: (...group).\n *\n * @static\n * @memberOf _\n * @since 3.8.0\n * @category Array\n * @param {...Array} [arrays] The arrays to process.\n * @param {Function} [iteratee=_.identity] The function to combine\n * grouped values.\n * @returns {Array} Returns the new array of grouped elements.\n * @example\n *\n * _.zipWith([1, 2], [10, 20], [100, 200], function(a, b, c) {\n * return a + b + c;\n * });\n * // => [111, 222]\n */\n var zipWith = baseRest(function(arrays) {\n var length = arrays.length,\n iteratee = length > 1 ? arrays[length - 1] : undefined;\n\n iteratee = typeof iteratee == 'function' ? (arrays.pop(), iteratee) : undefined;\n return unzipWith(arrays, iteratee);\n });\n\n /*------------------------------------------------------------------------*/\n\n /**\n * Creates a `lodash` wrapper instance that wraps `value` with explicit method\n * chain sequences enabled. The result of such sequences must be unwrapped\n * with `_#value`.\n *\n * @static\n * @memberOf _\n * @since 1.3.0\n * @category Seq\n * @param {*} value The value to wrap.\n * @returns {Object} Returns the new `lodash` wrapper instance.\n * @example\n *\n * var users = [\n * { 'user': 'barney', 'age': 36 },\n * { 'user': 'fred', 'age': 40 },\n * { 'user': 'pebbles', 'age': 1 }\n * ];\n *\n * var youngest = _\n * .chain(users)\n * .sortBy('age')\n * .map(function(o) {\n * return o.user + ' is ' + o.age;\n * })\n * .head()\n * .value();\n * // => 'pebbles is 1'\n */\n function chain(value) {\n var result = lodash(value);\n result.__chain__ = true;\n return result;\n }\n\n /**\n * This method invokes `interceptor` and returns `value`. The interceptor\n * is invoked with one argument; (value). The purpose of this method is to\n * \"tap into\" a method chain sequence in order to modify intermediate results.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Seq\n * @param {*} value The value to provide to `interceptor`.\n * @param {Function} interceptor The function to invoke.\n * @returns {*} Returns `value`.\n * @example\n *\n * _([1, 2, 3])\n * .tap(function(array) {\n * // Mutate input array.\n * array.pop();\n * })\n * .reverse()\n * .value();\n * // => [2, 1]\n */\n function tap(value, interceptor) {\n interceptor(value);\n return value;\n }\n\n /**\n * This method is like `_.tap` except that it returns the result of `interceptor`.\n * The purpose of this method is to \"pass thru\" values replacing intermediate\n * results in a method chain sequence.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Seq\n * @param {*} value The value to provide to `interceptor`.\n * @param {Function} interceptor The function to invoke.\n * @returns {*} Returns the result of `interceptor`.\n * @example\n *\n * _(' abc ')\n * .chain()\n * .trim()\n * .thru(function(value) {\n * return [value];\n * })\n * .value();\n * // => ['abc']\n */\n function thru(value, interceptor) {\n return interceptor(value);\n }\n\n /**\n * This method is the wrapper version of `_.at`.\n *\n * @name at\n * @memberOf _\n * @since 1.0.0\n * @category Seq\n * @param {...(string|string[])} [paths] The property paths to pick.\n * @returns {Object} Returns the new `lodash` wrapper instance.\n * @example\n *\n * var object = { 'a': [{ 'b': { 'c': 3 } }, 4] };\n *\n * _(object).at(['a[0].b.c', 'a[1]']).value();\n * // => [3, 4]\n */\n var wrapperAt = flatRest(function(paths) {\n var length = paths.length,\n start = length ? paths[0] : 0,\n value = this.__wrapped__,\n interceptor = function(object) { return baseAt(object, paths); };\n\n if (length > 1 || this.__actions__.length ||\n !(value instanceof LazyWrapper) || !isIndex(start)) {\n return this.thru(interceptor);\n }\n value = value.slice(start, +start + (length ? 1 : 0));\n value.__actions__.push({\n 'func': thru,\n 'args': [interceptor],\n 'thisArg': undefined\n });\n return new LodashWrapper(value, this.__chain__).thru(function(array) {\n if (length && !array.length) {\n array.push(undefined);\n }\n return array;\n });\n });\n\n /**\n * Creates a `lodash` wrapper instance with explicit method chain sequences enabled.\n *\n * @name chain\n * @memberOf _\n * @since 0.1.0\n * @category Seq\n * @returns {Object} Returns the new `lodash` wrapper instance.\n * @example\n *\n * var users = [\n * { 'user': 'barney', 'age': 36 },\n * { 'user': 'fred', 'age': 40 }\n * ];\n *\n * // A sequence without explicit chaining.\n * _(users).head();\n * // => { 'user': 'barney', 'age': 36 }\n *\n * // A sequence with explicit chaining.\n * _(users)\n * .chain()\n * .head()\n * .pick('user')\n * .value();\n * // => { 'user': 'barney' }\n */\n function wrapperChain() {\n return chain(this);\n }\n\n /**\n * Executes the chain sequence and returns the wrapped result.\n *\n * @name commit\n * @memberOf _\n * @since 3.2.0\n * @category Seq\n * @returns {Object} Returns the new `lodash` wrapper instance.\n * @example\n *\n * var array = [1, 2];\n * var wrapped = _(array).push(3);\n *\n * console.log(array);\n * // => [1, 2]\n *\n * wrapped = wrapped.commit();\n * console.log(array);\n * // => [1, 2, 3]\n *\n * wrapped.last();\n * // => 3\n *\n * console.log(array);\n * // => [1, 2, 3]\n */\n function wrapperCommit() {\n return new LodashWrapper(this.value(), this.__chain__);\n }\n\n /**\n * Gets the next value on a wrapped object following the\n * [iterator protocol](https://mdn.io/iteration_protocols#iterator).\n *\n * @name next\n * @memberOf _\n * @since 4.0.0\n * @category Seq\n * @returns {Object} Returns the next iterator value.\n * @example\n *\n * var wrapped = _([1, 2]);\n *\n * wrapped.next();\n * // => { 'done': false, 'value': 1 }\n *\n * wrapped.next();\n * // => { 'done': false, 'value': 2 }\n *\n * wrapped.next();\n * // => { 'done': true, 'value': undefined }\n */\n function wrapperNext() {\n if (this.__values__ === undefined) {\n this.__values__ = toArray(this.value());\n }\n var done = this.__index__ >= this.__values__.length,\n value = done ? undefined : this.__values__[this.__index__++];\n\n return { 'done': done, 'value': value };\n }\n\n /**\n * Enables the wrapper to be iterable.\n *\n * @name Symbol.iterator\n * @memberOf _\n * @since 4.0.0\n * @category Seq\n * @returns {Object} Returns the wrapper object.\n * @example\n *\n * var wrapped = _([1, 2]);\n *\n * wrapped[Symbol.iterator]() === wrapped;\n * // => true\n *\n * Array.from(wrapped);\n * // => [1, 2]\n */\n function wrapperToIterator() {\n return this;\n }\n\n /**\n * Creates a clone of the chain sequence planting `value` as the wrapped value.\n *\n * @name plant\n * @memberOf _\n * @since 3.2.0\n * @category Seq\n * @param {*} value The value to plant.\n * @returns {Object} Returns the new `lodash` wrapper instance.\n * @example\n *\n * function square(n) {\n * return n * n;\n * }\n *\n * var wrapped = _([1, 2]).map(square);\n * var other = wrapped.plant([3, 4]);\n *\n * other.value();\n * // => [9, 16]\n *\n * wrapped.value();\n * // => [1, 4]\n */\n function wrapperPlant(value) {\n var result,\n parent = this;\n\n while (parent instanceof baseLodash) {\n var clone = wrapperClone(parent);\n clone.__index__ = 0;\n clone.__values__ = undefined;\n if (result) {\n previous.__wrapped__ = clone;\n } else {\n result = clone;\n }\n var previous = clone;\n parent = parent.__wrapped__;\n }\n previous.__wrapped__ = value;\n return result;\n }\n\n /**\n * This method is the wrapper version of `_.reverse`.\n *\n * **Note:** This method mutates the wrapped array.\n *\n * @name reverse\n * @memberOf _\n * @since 0.1.0\n * @category Seq\n * @returns {Object} Returns the new `lodash` wrapper instance.\n * @example\n *\n * var array = [1, 2, 3];\n *\n * _(array).reverse().value()\n * // => [3, 2, 1]\n *\n * console.log(array);\n * // => [3, 2, 1]\n */\n function wrapperReverse() {\n var value = this.__wrapped__;\n if (value instanceof LazyWrapper) {\n var wrapped = value;\n if (this.__actions__.length) {\n wrapped = new LazyWrapper(this);\n }\n wrapped = wrapped.reverse();\n wrapped.__actions__.push({\n 'func': thru,\n 'args': [reverse],\n 'thisArg': undefined\n });\n return new LodashWrapper(wrapped, this.__chain__);\n }\n return this.thru(reverse);\n }\n\n /**\n * Executes the chain sequence to resolve the unwrapped value.\n *\n * @name value\n * @memberOf _\n * @since 0.1.0\n * @alias toJSON, valueOf\n * @category Seq\n * @returns {*} Returns the resolved unwrapped value.\n * @example\n *\n * _([1, 2, 3]).value();\n * // => [1, 2, 3]\n */\n function wrapperValue() {\n return baseWrapperValue(this.__wrapped__, this.__actions__);\n }\n\n /*------------------------------------------------------------------------*/\n\n /**\n * Creates an object composed of keys generated from the results of running\n * each element of `collection` thru `iteratee`. The corresponding value of\n * each key is the number of times the key was returned by `iteratee`. The\n * iteratee is invoked with one argument: (value).\n *\n * @static\n * @memberOf _\n * @since 0.5.0\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} [iteratee=_.identity] The iteratee to transform keys.\n * @returns {Object} Returns the composed aggregate object.\n * @example\n *\n * _.countBy([6.1, 4.2, 6.3], Math.floor);\n * // => { '4': 1, '6': 2 }\n *\n * // The `_.property` iteratee shorthand.\n * _.countBy(['one', 'two', 'three'], 'length');\n * // => { '3': 2, '5': 1 }\n */\n var countBy = createAggregator(function(result, value, key) {\n if (hasOwnProperty.call(result, key)) {\n ++result[key];\n } else {\n baseAssignValue(result, key, 1);\n }\n });\n\n /**\n * Checks if `predicate` returns truthy for **all** elements of `collection`.\n * Iteration is stopped once `predicate` returns falsey. The predicate is\n * invoked with three arguments: (value, index|key, collection).\n *\n * **Note:** This method returns `true` for\n * [empty collections](https://en.wikipedia.org/wiki/Empty_set) because\n * [everything is true](https://en.wikipedia.org/wiki/Vacuous_truth) of\n * elements of empty collections.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n * @returns {boolean} Returns `true` if all elements pass the predicate check,\n * else `false`.\n * @example\n *\n * _.every([true, 1, null, 'yes'], Boolean);\n * // => false\n *\n * var users = [\n * { 'user': 'barney', 'age': 36, 'active': false },\n * { 'user': 'fred', 'age': 40, 'active': false }\n * ];\n *\n * // The `_.matches` iteratee shorthand.\n * _.every(users, { 'user': 'barney', 'active': false });\n * // => false\n *\n * // The `_.matchesProperty` iteratee shorthand.\n * _.every(users, ['active', false]);\n * // => true\n *\n * // The `_.property` iteratee shorthand.\n * _.every(users, 'active');\n * // => false\n */\n function every(collection, predicate, guard) {\n var func = isArray(collection) ? arrayEvery : baseEvery;\n if (guard && isIterateeCall(collection, predicate, guard)) {\n predicate = undefined;\n }\n return func(collection, getIteratee(predicate, 3));\n }\n\n /**\n * Iterates over elements of `collection`, returning an array of all elements\n * `predicate` returns truthy for. The predicate is invoked with three\n * arguments: (value, index|key, collection).\n *\n * **Note:** Unlike `_.remove`, this method returns a new array.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\n * @returns {Array} Returns the new filtered array.\n * @see _.reject\n * @example\n *\n * var users = [\n * { 'user': 'barney', 'age': 36, 'active': true },\n * { 'user': 'fred', 'age': 40, 'active': false }\n * ];\n *\n * _.filter(users, function(o) { return !o.active; });\n * // => objects for ['fred']\n *\n * // The `_.matches` iteratee shorthand.\n * _.filter(users, { 'age': 36, 'active': true });\n * // => objects for ['barney']\n *\n * // The `_.matchesProperty` iteratee shorthand.\n * _.filter(users, ['active', false]);\n * // => objects for ['fred']\n *\n * // The `_.property` iteratee shorthand.\n * _.filter(users, 'active');\n * // => objects for ['barney']\n *\n * // Combining several predicates using `_.overEvery` or `_.overSome`.\n * _.filter(users, _.overSome([{ 'age': 36 }, ['age', 40]]));\n * // => objects for ['fred', 'barney']\n */\n function filter(collection, predicate) {\n var func = isArray(collection) ? arrayFilter : baseFilter;\n return func(collection, getIteratee(predicate, 3));\n }\n\n /**\n * Iterates over elements of `collection`, returning the first element\n * `predicate` returns truthy for. The predicate is invoked with three\n * arguments: (value, index|key, collection).\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Collection\n * @param {Array|Object} collection The collection to inspect.\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\n * @param {number} [fromIndex=0] The index to search from.\n * @returns {*} Returns the matched element, else `undefined`.\n * @example\n *\n * var users = [\n * { 'user': 'barney', 'age': 36, 'active': true },\n * { 'user': 'fred', 'age': 40, 'active': false },\n * { 'user': 'pebbles', 'age': 1, 'active': true }\n * ];\n *\n * _.find(users, function(o) { return o.age < 40; });\n * // => object for 'barney'\n *\n * // The `_.matches` iteratee shorthand.\n * _.find(users, { 'age': 1, 'active': true });\n * // => object for 'pebbles'\n *\n * // The `_.matchesProperty` iteratee shorthand.\n * _.find(users, ['active', false]);\n * // => object for 'fred'\n *\n * // The `_.property` iteratee shorthand.\n * _.find(users, 'active');\n * // => object for 'barney'\n */\n var find = createFind(findIndex);\n\n /**\n * This method is like `_.find` except that it iterates over elements of\n * `collection` from right to left.\n *\n * @static\n * @memberOf _\n * @since 2.0.0\n * @category Collection\n * @param {Array|Object} collection The collection to inspect.\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\n * @param {number} [fromIndex=collection.length-1] The index to search from.\n * @returns {*} Returns the matched element, else `undefined`.\n * @example\n *\n * _.findLast([1, 2, 3, 4], function(n) {\n * return n % 2 == 1;\n * });\n * // => 3\n */\n var findLast = createFind(findLastIndex);\n\n /**\n * Creates a flattened array of values by running each element in `collection`\n * thru `iteratee` and flattening the mapped results. The iteratee is invoked\n * with three arguments: (value, index|key, collection).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n * @returns {Array} Returns the new flattened array.\n * @example\n *\n * function duplicate(n) {\n * return [n, n];\n * }\n *\n * _.flatMap([1, 2], duplicate);\n * // => [1, 1, 2, 2]\n */\n function flatMap(collection, iteratee) {\n return baseFlatten(map(collection, iteratee), 1);\n }\n\n /**\n * This method is like `_.flatMap` except that it recursively flattens the\n * mapped results.\n *\n * @static\n * @memberOf _\n * @since 4.7.0\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n * @returns {Array} Returns the new flattened array.\n * @example\n *\n * function duplicate(n) {\n * return [[[n, n]]];\n * }\n *\n * _.flatMapDeep([1, 2], duplicate);\n * // => [1, 1, 2, 2]\n */\n function flatMapDeep(collection, iteratee) {\n return baseFlatten(map(collection, iteratee), INFINITY);\n }\n\n /**\n * This method is like `_.flatMap` except that it recursively flattens the\n * mapped results up to `depth` times.\n *\n * @static\n * @memberOf _\n * @since 4.7.0\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n * @param {number} [depth=1] The maximum recursion depth.\n * @returns {Array} Returns the new flattened array.\n * @example\n *\n * function duplicate(n) {\n * return [[[n, n]]];\n * }\n *\n * _.flatMapDepth([1, 2], duplicate, 2);\n * // => [[1, 1], [2, 2]]\n */\n function flatMapDepth(collection, iteratee, depth) {\n depth = depth === undefined ? 1 : toInteger(depth);\n return baseFlatten(map(collection, iteratee), depth);\n }\n\n /**\n * Iterates over elements of `collection` and invokes `iteratee` for each element.\n * The iteratee is invoked with three arguments: (value, index|key, collection).\n * Iteratee functions may exit iteration early by explicitly returning `false`.\n *\n * **Note:** As with other \"Collections\" methods, objects with a \"length\"\n * property are iterated like arrays. To avoid this behavior use `_.forIn`\n * or `_.forOwn` for object iteration.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @alias each\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n * @returns {Array|Object} Returns `collection`.\n * @see _.forEachRight\n * @example\n *\n * _.forEach([1, 2], function(value) {\n * console.log(value);\n * });\n * // => Logs `1` then `2`.\n *\n * _.forEach({ 'a': 1, 'b': 2 }, function(value, key) {\n * console.log(key);\n * });\n * // => Logs 'a' then 'b' (iteration order is not guaranteed).\n */\n function forEach(collection, iteratee) {\n var func = isArray(collection) ? arrayEach : baseEach;\n return func(collection, getIteratee(iteratee, 3));\n }\n\n /**\n * This method is like `_.forEach` except that it iterates over elements of\n * `collection` from right to left.\n *\n * @static\n * @memberOf _\n * @since 2.0.0\n * @alias eachRight\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n * @returns {Array|Object} Returns `collection`.\n * @see _.forEach\n * @example\n *\n * _.forEachRight([1, 2], function(value) {\n * console.log(value);\n * });\n * // => Logs `2` then `1`.\n */\n function forEachRight(collection, iteratee) {\n var func = isArray(collection) ? arrayEachRight : baseEachRight;\n return func(collection, getIteratee(iteratee, 3));\n }\n\n /**\n * Creates an object composed of keys generated from the results of running\n * each element of `collection` thru `iteratee`. The order of grouped values\n * is determined by the order they occur in `collection`. The corresponding\n * value of each key is an array of elements responsible for generating the\n * key. The iteratee is invoked with one argument: (value).\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} [iteratee=_.identity] The iteratee to transform keys.\n * @returns {Object} Returns the composed aggregate object.\n * @example\n *\n * _.groupBy([6.1, 4.2, 6.3], Math.floor);\n * // => { '4': [4.2], '6': [6.1, 6.3] }\n *\n * // The `_.property` iteratee shorthand.\n * _.groupBy(['one', 'two', 'three'], 'length');\n * // => { '3': ['one', 'two'], '5': ['three'] }\n */\n var groupBy = createAggregator(function(result, value, key) {\n if (hasOwnProperty.call(result, key)) {\n result[key].push(value);\n } else {\n baseAssignValue(result, key, [value]);\n }\n });\n\n /**\n * Checks if `value` is in `collection`. If `collection` is a string, it's\n * checked for a substring of `value`, otherwise\n * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * is used for equality comparisons. If `fromIndex` is negative, it's used as\n * the offset from the end of `collection`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Collection\n * @param {Array|Object|string} collection The collection to inspect.\n * @param {*} value The value to search for.\n * @param {number} [fromIndex=0] The index to search from.\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.reduce`.\n * @returns {boolean} Returns `true` if `value` is found, else `false`.\n * @example\n *\n * _.includes([1, 2, 3], 1);\n * // => true\n *\n * _.includes([1, 2, 3], 1, 2);\n * // => false\n *\n * _.includes({ 'a': 1, 'b': 2 }, 1);\n * // => true\n *\n * _.includes('abcd', 'bc');\n * // => true\n */\n function includes(collection, value, fromIndex, guard) {\n collection = isArrayLike(collection) ? collection : values(collection);\n fromIndex = (fromIndex && !guard) ? toInteger(fromIndex) : 0;\n\n var length = collection.length;\n if (fromIndex < 0) {\n fromIndex = nativeMax(length + fromIndex, 0);\n }\n return isString(collection)\n ? (fromIndex <= length && collection.indexOf(value, fromIndex) > -1)\n : (!!length && baseIndexOf(collection, value, fromIndex) > -1);\n }\n\n /**\n * Invokes the method at `path` of each element in `collection`, returning\n * an array of the results of each invoked method. Any additional arguments\n * are provided to each invoked method. If `path` is a function, it's invoked\n * for, and `this` bound to, each element in `collection`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Array|Function|string} path The path of the method to invoke or\n * the function invoked per iteration.\n * @param {...*} [args] The arguments to invoke each method with.\n * @returns {Array} Returns the array of results.\n * @example\n *\n * _.invokeMap([[5, 1, 7], [3, 2, 1]], 'sort');\n * // => [[1, 5, 7], [1, 2, 3]]\n *\n * _.invokeMap([123, 456], String.prototype.split, '');\n * // => [['1', '2', '3'], ['4', '5', '6']]\n */\n var invokeMap = baseRest(function(collection, path, args) {\n var index = -1,\n isFunc = typeof path == 'function',\n result = isArrayLike(collection) ? Array(collection.length) : [];\n\n baseEach(collection, function(value) {\n result[++index] = isFunc ? apply(path, value, args) : baseInvoke(value, path, args);\n });\n return result;\n });\n\n /**\n * Creates an object composed of keys generated from the results of running\n * each element of `collection` thru `iteratee`. The corresponding value of\n * each key is the last element responsible for generating the key. The\n * iteratee is invoked with one argument: (value).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} [iteratee=_.identity] The iteratee to transform keys.\n * @returns {Object} Returns the composed aggregate object.\n * @example\n *\n * var array = [\n * { 'dir': 'left', 'code': 97 },\n * { 'dir': 'right', 'code': 100 }\n * ];\n *\n * _.keyBy(array, function(o) {\n * return String.fromCharCode(o.code);\n * });\n * // => { 'a': { 'dir': 'left', 'code': 97 }, 'd': { 'dir': 'right', 'code': 100 } }\n *\n * _.keyBy(array, 'dir');\n * // => { 'left': { 'dir': 'left', 'code': 97 }, 'right': { 'dir': 'right', 'code': 100 } }\n */\n var keyBy = createAggregator(function(result, value, key) {\n baseAssignValue(result, key, value);\n });\n\n /**\n * Creates an array of values by running each element in `collection` thru\n * `iteratee`. The iteratee is invoked with three arguments:\n * (value, index|key, collection).\n *\n * Many lodash methods are guarded to work as iteratees for methods like\n * `_.every`, `_.filter`, `_.map`, `_.mapValues`, `_.reject`, and `_.some`.\n *\n * The guarded methods are:\n * `ary`, `chunk`, `curry`, `curryRight`, `drop`, `dropRight`, `every`,\n * `fill`, `invert`, `parseInt`, `random`, `range`, `rangeRight`, `repeat`,\n * `sampleSize`, `slice`, `some`, `sortBy`, `split`, `take`, `takeRight`,\n * `template`, `trim`, `trimEnd`, `trimStart`, and `words`\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n * @returns {Array} Returns the new mapped array.\n * @example\n *\n * function square(n) {\n * return n * n;\n * }\n *\n * _.map([4, 8], square);\n * // => [16, 64]\n *\n * _.map({ 'a': 4, 'b': 8 }, square);\n * // => [16, 64] (iteration order is not guaranteed)\n *\n * var users = [\n * { 'user': 'barney' },\n * { 'user': 'fred' }\n * ];\n *\n * // The `_.property` iteratee shorthand.\n * _.map(users, 'user');\n * // => ['barney', 'fred']\n */\n function map(collection, iteratee) {\n var func = isArray(collection) ? arrayMap : baseMap;\n return func(collection, getIteratee(iteratee, 3));\n }\n\n /**\n * This method is like `_.sortBy` except that it allows specifying the sort\n * orders of the iteratees to sort by. If `orders` is unspecified, all values\n * are sorted in ascending order. Otherwise, specify an order of \"desc\" for\n * descending or \"asc\" for ascending sort order of corresponding values.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Array[]|Function[]|Object[]|string[]} [iteratees=[_.identity]]\n * The iteratees to sort by.\n * @param {string[]} [orders] The sort orders of `iteratees`.\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.reduce`.\n * @returns {Array} Returns the new sorted array.\n * @example\n *\n * var users = [\n * { 'user': 'fred', 'age': 48 },\n * { 'user': 'barney', 'age': 34 },\n * { 'user': 'fred', 'age': 40 },\n * { 'user': 'barney', 'age': 36 }\n * ];\n *\n * // Sort by `user` in ascending order and by `age` in descending order.\n * _.orderBy(users, ['user', 'age'], ['asc', 'desc']);\n * // => objects for [['barney', 36], ['barney', 34], ['fred', 48], ['fred', 40]]\n */\n function orderBy(collection, iteratees, orders, guard) {\n if (collection == null) {\n return [];\n }\n if (!isArray(iteratees)) {\n iteratees = iteratees == null ? [] : [iteratees];\n }\n orders = guard ? undefined : orders;\n if (!isArray(orders)) {\n orders = orders == null ? [] : [orders];\n }\n return baseOrderBy(collection, iteratees, orders);\n }\n\n /**\n * Creates an array of elements split into two groups, the first of which\n * contains elements `predicate` returns truthy for, the second of which\n * contains elements `predicate` returns falsey for. The predicate is\n * invoked with one argument: (value).\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\n * @returns {Array} Returns the array of grouped elements.\n * @example\n *\n * var users = [\n * { 'user': 'barney', 'age': 36, 'active': false },\n * { 'user': 'fred', 'age': 40, 'active': true },\n * { 'user': 'pebbles', 'age': 1, 'active': false }\n * ];\n *\n * _.partition(users, function(o) { return o.active; });\n * // => objects for [['fred'], ['barney', 'pebbles']]\n *\n * // The `_.matches` iteratee shorthand.\n * _.partition(users, { 'age': 1, 'active': false });\n * // => objects for [['pebbles'], ['barney', 'fred']]\n *\n * // The `_.matchesProperty` iteratee shorthand.\n * _.partition(users, ['active', false]);\n * // => objects for [['barney', 'pebbles'], ['fred']]\n *\n * // The `_.property` iteratee shorthand.\n * _.partition(users, 'active');\n * // => objects for [['fred'], ['barney', 'pebbles']]\n */\n var partition = createAggregator(function(result, value, key) {\n result[key ? 0 : 1].push(value);\n }, function() { return [[], []]; });\n\n /**\n * Reduces `collection` to a value which is the accumulated result of running\n * each element in `collection` thru `iteratee`, where each successive\n * invocation is supplied the return value of the previous. If `accumulator`\n * is not given, the first element of `collection` is used as the initial\n * value. The iteratee is invoked with four arguments:\n * (accumulator, value, index|key, collection).\n *\n * Many lodash methods are guarded to work as iteratees for methods like\n * `_.reduce`, `_.reduceRight`, and `_.transform`.\n *\n * The guarded methods are:\n * `assign`, `defaults`, `defaultsDeep`, `includes`, `merge`, `orderBy`,\n * and `sortBy`\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n * @param {*} [accumulator] The initial value.\n * @returns {*} Returns the accumulated value.\n * @see _.reduceRight\n * @example\n *\n * _.reduce([1, 2], function(sum, n) {\n * return sum + n;\n * }, 0);\n * // => 3\n *\n * _.reduce({ 'a': 1, 'b': 2, 'c': 1 }, function(result, value, key) {\n * (result[value] || (result[value] = [])).push(key);\n * return result;\n * }, {});\n * // => { '1': ['a', 'c'], '2': ['b'] } (iteration order is not guaranteed)\n */\n function reduce(collection, iteratee, accumulator) {\n var func = isArray(collection) ? arrayReduce : baseReduce,\n initAccum = arguments.length < 3;\n\n return func(collection, getIteratee(iteratee, 4), accumulator, initAccum, baseEach);\n }\n\n /**\n * This method is like `_.reduce` except that it iterates over elements of\n * `collection` from right to left.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n * @param {*} [accumulator] The initial value.\n * @returns {*} Returns the accumulated value.\n * @see _.reduce\n * @example\n *\n * var array = [[0, 1], [2, 3], [4, 5]];\n *\n * _.reduceRight(array, function(flattened, other) {\n * return flattened.concat(other);\n * }, []);\n * // => [4, 5, 2, 3, 0, 1]\n */\n function reduceRight(collection, iteratee, accumulator) {\n var func = isArray(collection) ? arrayReduceRight : baseReduce,\n initAccum = arguments.length < 3;\n\n return func(collection, getIteratee(iteratee, 4), accumulator, initAccum, baseEachRight);\n }\n\n /**\n * The opposite of `_.filter`; this method returns the elements of `collection`\n * that `predicate` does **not** return truthy for.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\n * @returns {Array} Returns the new filtered array.\n * @see _.filter\n * @example\n *\n * var users = [\n * { 'user': 'barney', 'age': 36, 'active': false },\n * { 'user': 'fred', 'age': 40, 'active': true }\n * ];\n *\n * _.reject(users, function(o) { return !o.active; });\n * // => objects for ['fred']\n *\n * // The `_.matches` iteratee shorthand.\n * _.reject(users, { 'age': 40, 'active': true });\n * // => objects for ['barney']\n *\n * // The `_.matchesProperty` iteratee shorthand.\n * _.reject(users, ['active', false]);\n * // => objects for ['fred']\n *\n * // The `_.property` iteratee shorthand.\n * _.reject(users, 'active');\n * // => objects for ['barney']\n */\n function reject(collection, predicate) {\n var func = isArray(collection) ? arrayFilter : baseFilter;\n return func(collection, negate(getIteratee(predicate, 3)));\n }\n\n /**\n * Gets a random element from `collection`.\n *\n * @static\n * @memberOf _\n * @since 2.0.0\n * @category Collection\n * @param {Array|Object} collection The collection to sample.\n * @returns {*} Returns the random element.\n * @example\n *\n * _.sample([1, 2, 3, 4]);\n * // => 2\n */\n function sample(collection) {\n var func = isArray(collection) ? arraySample : baseSample;\n return func(collection);\n }\n\n /**\n * Gets `n` random elements at unique keys from `collection` up to the\n * size of `collection`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Collection\n * @param {Array|Object} collection The collection to sample.\n * @param {number} [n=1] The number of elements to sample.\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n * @returns {Array} Returns the random elements.\n * @example\n *\n * _.sampleSize([1, 2, 3], 2);\n * // => [3, 1]\n *\n * _.sampleSize([1, 2, 3], 4);\n * // => [2, 3, 1]\n */\n function sampleSize(collection, n, guard) {\n if ((guard ? isIterateeCall(collection, n, guard) : n === undefined)) {\n n = 1;\n } else {\n n = toInteger(n);\n }\n var func = isArray(collection) ? arraySampleSize : baseSampleSize;\n return func(collection, n);\n }\n\n /**\n * Creates an array of shuffled values, using a version of the\n * [Fisher-Yates shuffle](https://en.wikipedia.org/wiki/Fisher-Yates_shuffle).\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Collection\n * @param {Array|Object} collection The collection to shuffle.\n * @returns {Array} Returns the new shuffled array.\n * @example\n *\n * _.shuffle([1, 2, 3, 4]);\n * // => [4, 1, 3, 2]\n */\n function shuffle(collection) {\n var func = isArray(collection) ? arrayShuffle : baseShuffle;\n return func(collection);\n }\n\n /**\n * Gets the size of `collection` by returning its length for array-like\n * values or the number of own enumerable string keyed properties for objects.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Collection\n * @param {Array|Object|string} collection The collection to inspect.\n * @returns {number} Returns the collection size.\n * @example\n *\n * _.size([1, 2, 3]);\n * // => 3\n *\n * _.size({ 'a': 1, 'b': 2 });\n * // => 2\n *\n * _.size('pebbles');\n * // => 7\n */\n function size(collection) {\n if (collection == null) {\n return 0;\n }\n if (isArrayLike(collection)) {\n return isString(collection) ? stringSize(collection) : collection.length;\n }\n var tag = getTag(collection);\n if (tag == mapTag || tag == setTag) {\n return collection.size;\n }\n return baseKeys(collection).length;\n }\n\n /**\n * Checks if `predicate` returns truthy for **any** element of `collection`.\n * Iteration is stopped once `predicate` returns truthy. The predicate is\n * invoked with three arguments: (value, index|key, collection).\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n * @returns {boolean} Returns `true` if any element passes the predicate check,\n * else `false`.\n * @example\n *\n * _.some([null, 0, 'yes', false], Boolean);\n * // => true\n *\n * var users = [\n * { 'user': 'barney', 'active': true },\n * { 'user': 'fred', 'active': false }\n * ];\n *\n * // The `_.matches` iteratee shorthand.\n * _.some(users, { 'user': 'barney', 'active': false });\n * // => false\n *\n * // The `_.matchesProperty` iteratee shorthand.\n * _.some(users, ['active', false]);\n * // => true\n *\n * // The `_.property` iteratee shorthand.\n * _.some(users, 'active');\n * // => true\n */\n function some(collection, predicate, guard) {\n var func = isArray(collection) ? arraySome : baseSome;\n if (guard && isIterateeCall(collection, predicate, guard)) {\n predicate = undefined;\n }\n return func(collection, getIteratee(predicate, 3));\n }\n\n /**\n * Creates an array of elements, sorted in ascending order by the results of\n * running each element in a collection thru each iteratee. This method\n * performs a stable sort, that is, it preserves the original sort order of\n * equal elements. The iteratees are invoked with one argument: (value).\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {...(Function|Function[])} [iteratees=[_.identity]]\n * The iteratees to sort by.\n * @returns {Array} Returns the new sorted array.\n * @example\n *\n * var users = [\n * { 'user': 'fred', 'age': 48 },\n * { 'user': 'barney', 'age': 36 },\n * { 'user': 'fred', 'age': 30 },\n * { 'user': 'barney', 'age': 34 }\n * ];\n *\n * _.sortBy(users, [function(o) { return o.user; }]);\n * // => objects for [['barney', 36], ['barney', 34], ['fred', 48], ['fred', 30]]\n *\n * _.sortBy(users, ['user', 'age']);\n * // => objects for [['barney', 34], ['barney', 36], ['fred', 30], ['fred', 48]]\n */\n var sortBy = baseRest(function(collection, iteratees) {\n if (collection == null) {\n return [];\n }\n var length = iteratees.length;\n if (length > 1 && isIterateeCall(collection, iteratees[0], iteratees[1])) {\n iteratees = [];\n } else if (length > 2 && isIterateeCall(iteratees[0], iteratees[1], iteratees[2])) {\n iteratees = [iteratees[0]];\n }\n return baseOrderBy(collection, baseFlatten(iteratees, 1), []);\n });\n\n /*------------------------------------------------------------------------*/\n\n /**\n * Gets the timestamp of the number of milliseconds that have elapsed since\n * the Unix epoch (1 January 1970 00:00:00 UTC).\n *\n * @static\n * @memberOf _\n * @since 2.4.0\n * @category Date\n * @returns {number} Returns the timestamp.\n * @example\n *\n * _.defer(function(stamp) {\n * console.log(_.now() - stamp);\n * }, _.now());\n * // => Logs the number of milliseconds it took for the deferred invocation.\n */\n var now = ctxNow || function() {\n return root.Date.now();\n };\n\n /*------------------------------------------------------------------------*/\n\n /**\n * The opposite of `_.before`; this method creates a function that invokes\n * `func` once it's called `n` or more times.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Function\n * @param {number} n The number of calls before `func` is invoked.\n * @param {Function} func The function to restrict.\n * @returns {Function} Returns the new restricted function.\n * @example\n *\n * var saves = ['profile', 'settings'];\n *\n * var done = _.after(saves.length, function() {\n * console.log('done saving!');\n * });\n *\n * _.forEach(saves, function(type) {\n * asyncSave({ 'type': type, 'complete': done });\n * });\n * // => Logs 'done saving!' after the two async saves have completed.\n */\n function after(n, func) {\n if (typeof func != 'function') {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n n = toInteger(n);\n return function() {\n if (--n < 1) {\n return func.apply(this, arguments);\n }\n };\n }\n\n /**\n * Creates a function that invokes `func`, with up to `n` arguments,\n * ignoring any additional arguments.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Function\n * @param {Function} func The function to cap arguments for.\n * @param {number} [n=func.length] The arity cap.\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n * @returns {Function} Returns the new capped function.\n * @example\n *\n * _.map(['6', '8', '10'], _.ary(parseInt, 1));\n * // => [6, 8, 10]\n */\n function ary(func, n, guard) {\n n = guard ? undefined : n;\n n = (func && n == null) ? func.length : n;\n return createWrap(func, WRAP_ARY_FLAG, undefined, undefined, undefined, undefined, n);\n }\n\n /**\n * Creates a function that invokes `func`, with the `this` binding and arguments\n * of the created function, while it's called less than `n` times. Subsequent\n * calls to the created function return the result of the last `func` invocation.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Function\n * @param {number} n The number of calls at which `func` is no longer invoked.\n * @param {Function} func The function to restrict.\n * @returns {Function} Returns the new restricted function.\n * @example\n *\n * jQuery(element).on('click', _.before(5, addContactToList));\n * // => Allows adding up to 4 contacts to the list.\n */\n function before(n, func) {\n var result;\n if (typeof func != 'function') {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n n = toInteger(n);\n return function() {\n if (--n > 0) {\n result = func.apply(this, arguments);\n }\n if (n <= 1) {\n func = undefined;\n }\n return result;\n };\n }\n\n /**\n * Creates a function that invokes `func` with the `this` binding of `thisArg`\n * and `partials` prepended to the arguments it receives.\n *\n * The `_.bind.placeholder` value, which defaults to `_` in monolithic builds,\n * may be used as a placeholder for partially applied arguments.\n *\n * **Note:** Unlike native `Function#bind`, this method doesn't set the \"length\"\n * property of bound functions.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Function\n * @param {Function} func The function to bind.\n * @param {*} thisArg The `this` binding of `func`.\n * @param {...*} [partials] The arguments to be partially applied.\n * @returns {Function} Returns the new bound function.\n * @example\n *\n * function greet(greeting, punctuation) {\n * return greeting + ' ' + this.user + punctuation;\n * }\n *\n * var object = { 'user': 'fred' };\n *\n * var bound = _.bind(greet, object, 'hi');\n * bound('!');\n * // => 'hi fred!'\n *\n * // Bound with placeholders.\n * var bound = _.bind(greet, object, _, '!');\n * bound('hi');\n * // => 'hi fred!'\n */\n var bind = baseRest(function(func, thisArg, partials) {\n var bitmask = WRAP_BIND_FLAG;\n if (partials.length) {\n var holders = replaceHolders(partials, getHolder(bind));\n bitmask |= WRAP_PARTIAL_FLAG;\n }\n return createWrap(func, bitmask, thisArg, partials, holders);\n });\n\n /**\n * Creates a function that invokes the method at `object[key]` with `partials`\n * prepended to the arguments it receives.\n *\n * This method differs from `_.bind` by allowing bound functions to reference\n * methods that may be redefined or don't yet exist. See\n * [Peter Michaux's article](http://peter.michaux.ca/articles/lazy-function-definition-pattern)\n * for more details.\n *\n * The `_.bindKey.placeholder` value, which defaults to `_` in monolithic\n * builds, may be used as a placeholder for partially applied arguments.\n *\n * @static\n * @memberOf _\n * @since 0.10.0\n * @category Function\n * @param {Object} object The object to invoke the method on.\n * @param {string} key The key of the method.\n * @param {...*} [partials] The arguments to be partially applied.\n * @returns {Function} Returns the new bound function.\n * @example\n *\n * var object = {\n * 'user': 'fred',\n * 'greet': function(greeting, punctuation) {\n * return greeting + ' ' + this.user + punctuation;\n * }\n * };\n *\n * var bound = _.bindKey(object, 'greet', 'hi');\n * bound('!');\n * // => 'hi fred!'\n *\n * object.greet = function(greeting, punctuation) {\n * return greeting + 'ya ' + this.user + punctuation;\n * };\n *\n * bound('!');\n * // => 'hiya fred!'\n *\n * // Bound with placeholders.\n * var bound = _.bindKey(object, 'greet', _, '!');\n * bound('hi');\n * // => 'hiya fred!'\n */\n var bindKey = baseRest(function(object, key, partials) {\n var bitmask = WRAP_BIND_FLAG | WRAP_BIND_KEY_FLAG;\n if (partials.length) {\n var holders = replaceHolders(partials, getHolder(bindKey));\n bitmask |= WRAP_PARTIAL_FLAG;\n }\n return createWrap(key, bitmask, object, partials, holders);\n });\n\n /**\n * Creates a function that accepts arguments of `func` and either invokes\n * `func` returning its result, if at least `arity` number of arguments have\n * been provided, or returns a function that accepts the remaining `func`\n * arguments, and so on. The arity of `func` may be specified if `func.length`\n * is not sufficient.\n *\n * The `_.curry.placeholder` value, which defaults to `_` in monolithic builds,\n * may be used as a placeholder for provided arguments.\n *\n * **Note:** This method doesn't set the \"length\" property of curried functions.\n *\n * @static\n * @memberOf _\n * @since 2.0.0\n * @category Function\n * @param {Function} func The function to curry.\n * @param {number} [arity=func.length] The arity of `func`.\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n * @returns {Function} Returns the new curried function.\n * @example\n *\n * var abc = function(a, b, c) {\n * return [a, b, c];\n * };\n *\n * var curried = _.curry(abc);\n *\n * curried(1)(2)(3);\n * // => [1, 2, 3]\n *\n * curried(1, 2)(3);\n * // => [1, 2, 3]\n *\n * curried(1, 2, 3);\n * // => [1, 2, 3]\n *\n * // Curried with placeholders.\n * curried(1)(_, 3)(2);\n * // => [1, 2, 3]\n */\n function curry(func, arity, guard) {\n arity = guard ? undefined : arity;\n var result = createWrap(func, WRAP_CURRY_FLAG, undefined, undefined, undefined, undefined, undefined, arity);\n result.placeholder = curry.placeholder;\n return result;\n }\n\n /**\n * This method is like `_.curry` except that arguments are applied to `func`\n * in the manner of `_.partialRight` instead of `_.partial`.\n *\n * The `_.curryRight.placeholder` value, which defaults to `_` in monolithic\n * builds, may be used as a placeholder for provided arguments.\n *\n * **Note:** This method doesn't set the \"length\" property of curried functions.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Function\n * @param {Function} func The function to curry.\n * @param {number} [arity=func.length] The arity of `func`.\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n * @returns {Function} Returns the new curried function.\n * @example\n *\n * var abc = function(a, b, c) {\n * return [a, b, c];\n * };\n *\n * var curried = _.curryRight(abc);\n *\n * curried(3)(2)(1);\n * // => [1, 2, 3]\n *\n * curried(2, 3)(1);\n * // => [1, 2, 3]\n *\n * curried(1, 2, 3);\n * // => [1, 2, 3]\n *\n * // Curried with placeholders.\n * curried(3)(1, _)(2);\n * // => [1, 2, 3]\n */\n function curryRight(func, arity, guard) {\n arity = guard ? undefined : arity;\n var result = createWrap(func, WRAP_CURRY_RIGHT_FLAG, undefined, undefined, undefined, undefined, undefined, arity);\n result.placeholder = curryRight.placeholder;\n return result;\n }\n\n /**\n * Creates a debounced function that delays invoking `func` until after `wait`\n * milliseconds have elapsed since the last time the debounced function was\n * invoked. The debounced function comes with a `cancel` method to cancel\n * delayed `func` invocations and a `flush` method to immediately invoke them.\n * Provide `options` to indicate whether `func` should be invoked on the\n * leading and/or trailing edge of the `wait` timeout. The `func` is invoked\n * with the last arguments provided to the debounced function. Subsequent\n * calls to the debounced function return the result of the last `func`\n * invocation.\n *\n * **Note:** If `leading` and `trailing` options are `true`, `func` is\n * invoked on the trailing edge of the timeout only if the debounced function\n * is invoked more than once during the `wait` timeout.\n *\n * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred\n * until to the next tick, similar to `setTimeout` with a timeout of `0`.\n *\n * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)\n * for details over the differences between `_.debounce` and `_.throttle`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Function\n * @param {Function} func The function to debounce.\n * @param {number} [wait=0] The number of milliseconds to delay.\n * @param {Object} [options={}] The options object.\n * @param {boolean} [options.leading=false]\n * Specify invoking on the leading edge of the timeout.\n * @param {number} [options.maxWait]\n * The maximum time `func` is allowed to be delayed before it's invoked.\n * @param {boolean} [options.trailing=true]\n * Specify invoking on the trailing edge of the timeout.\n * @returns {Function} Returns the new debounced function.\n * @example\n *\n * // Avoid costly calculations while the window size is in flux.\n * jQuery(window).on('resize', _.debounce(calculateLayout, 150));\n *\n * // Invoke `sendMail` when clicked, debouncing subsequent calls.\n * jQuery(element).on('click', _.debounce(sendMail, 300, {\n * 'leading': true,\n * 'trailing': false\n * }));\n *\n * // Ensure `batchLog` is invoked once after 1 second of debounced calls.\n * var debounced = _.debounce(batchLog, 250, { 'maxWait': 1000 });\n * var source = new EventSource('/stream');\n * jQuery(source).on('message', debounced);\n *\n * // Cancel the trailing debounced invocation.\n * jQuery(window).on('popstate', debounced.cancel);\n */\n function debounce(func, wait, options) {\n var lastArgs,\n lastThis,\n maxWait,\n result,\n timerId,\n lastCallTime,\n lastInvokeTime = 0,\n leading = false,\n maxing = false,\n trailing = true;\n\n if (typeof func != 'function') {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n wait = toNumber(wait) || 0;\n if (isObject(options)) {\n leading = !!options.leading;\n maxing = 'maxWait' in options;\n maxWait = maxing ? nativeMax(toNumber(options.maxWait) || 0, wait) : maxWait;\n trailing = 'trailing' in options ? !!options.trailing : trailing;\n }\n\n function invokeFunc(time) {\n var args = lastArgs,\n thisArg = lastThis;\n\n lastArgs = lastThis = undefined;\n lastInvokeTime = time;\n result = func.apply(thisArg, args);\n return result;\n }\n\n function leadingEdge(time) {\n // Reset any `maxWait` timer.\n lastInvokeTime = time;\n // Start the timer for the trailing edge.\n timerId = setTimeout(timerExpired, wait);\n // Invoke the leading edge.\n return leading ? invokeFunc(time) : result;\n }\n\n function remainingWait(time) {\n var timeSinceLastCall = time - lastCallTime,\n timeSinceLastInvoke = time - lastInvokeTime,\n timeWaiting = wait - timeSinceLastCall;\n\n return maxing\n ? nativeMin(timeWaiting, maxWait - timeSinceLastInvoke)\n : timeWaiting;\n }\n\n function shouldInvoke(time) {\n var timeSinceLastCall = time - lastCallTime,\n timeSinceLastInvoke = time - lastInvokeTime;\n\n // Either this is the first call, activity has stopped and we're at the\n // trailing edge, the system time has gone backwards and we're treating\n // it as the trailing edge, or we've hit the `maxWait` limit.\n return (lastCallTime === undefined || (timeSinceLastCall >= wait) ||\n (timeSinceLastCall < 0) || (maxing && timeSinceLastInvoke >= maxWait));\n }\n\n function timerExpired() {\n var time = now();\n if (shouldInvoke(time)) {\n return trailingEdge(time);\n }\n // Restart the timer.\n timerId = setTimeout(timerExpired, remainingWait(time));\n }\n\n function trailingEdge(time) {\n timerId = undefined;\n\n // Only invoke if we have `lastArgs` which means `func` has been\n // debounced at least once.\n if (trailing && lastArgs) {\n return invokeFunc(time);\n }\n lastArgs = lastThis = undefined;\n return result;\n }\n\n function cancel() {\n if (timerId !== undefined) {\n clearTimeout(timerId);\n }\n lastInvokeTime = 0;\n lastArgs = lastCallTime = lastThis = timerId = undefined;\n }\n\n function flush() {\n return timerId === undefined ? result : trailingEdge(now());\n }\n\n function debounced() {\n var time = now(),\n isInvoking = shouldInvoke(time);\n\n lastArgs = arguments;\n lastThis = this;\n lastCallTime = time;\n\n if (isInvoking) {\n if (timerId === undefined) {\n return leadingEdge(lastCallTime);\n }\n if (maxing) {\n // Handle invocations in a tight loop.\n clearTimeout(timerId);\n timerId = setTimeout(timerExpired, wait);\n return invokeFunc(lastCallTime);\n }\n }\n if (timerId === undefined) {\n timerId = setTimeout(timerExpired, wait);\n }\n return result;\n }\n debounced.cancel = cancel;\n debounced.flush = flush;\n return debounced;\n }\n\n /**\n * Defers invoking the `func` until the current call stack has cleared. Any\n * additional arguments are provided to `func` when it's invoked.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Function\n * @param {Function} func The function to defer.\n * @param {...*} [args] The arguments to invoke `func` with.\n * @returns {number} Returns the timer id.\n * @example\n *\n * _.defer(function(text) {\n * console.log(text);\n * }, 'deferred');\n * // => Logs 'deferred' after one millisecond.\n */\n var defer = baseRest(function(func, args) {\n return baseDelay(func, 1, args);\n });\n\n /**\n * Invokes `func` after `wait` milliseconds. Any additional arguments are\n * provided to `func` when it's invoked.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Function\n * @param {Function} func The function to delay.\n * @param {number} wait The number of milliseconds to delay invocation.\n * @param {...*} [args] The arguments to invoke `func` with.\n * @returns {number} Returns the timer id.\n * @example\n *\n * _.delay(function(text) {\n * console.log(text);\n * }, 1000, 'later');\n * // => Logs 'later' after one second.\n */\n var delay = baseRest(function(func, wait, args) {\n return baseDelay(func, toNumber(wait) || 0, args);\n });\n\n /**\n * Creates a function that invokes `func` with arguments reversed.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Function\n * @param {Function} func The function to flip arguments for.\n * @returns {Function} Returns the new flipped function.\n * @example\n *\n * var flipped = _.flip(function() {\n * return _.toArray(arguments);\n * });\n *\n * flipped('a', 'b', 'c', 'd');\n * // => ['d', 'c', 'b', 'a']\n */\n function flip(func) {\n return createWrap(func, WRAP_FLIP_FLAG);\n }\n\n /**\n * Creates a function that memoizes the result of `func`. If `resolver` is\n * provided, it determines the cache key for storing the result based on the\n * arguments provided to the memoized function. By default, the first argument\n * provided to the memoized function is used as the map cache key. The `func`\n * is invoked with the `this` binding of the memoized function.\n *\n * **Note:** The cache is exposed as the `cache` property on the memoized\n * function. Its creation may be customized by replacing the `_.memoize.Cache`\n * constructor with one whose instances implement the\n * [`Map`](http://ecma-international.org/ecma-262/7.0/#sec-properties-of-the-map-prototype-object)\n * method interface of `clear`, `delete`, `get`, `has`, and `set`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Function\n * @param {Function} func The function to have its output memoized.\n * @param {Function} [resolver] The function to resolve the cache key.\n * @returns {Function} Returns the new memoized function.\n * @example\n *\n * var object = { 'a': 1, 'b': 2 };\n * var other = { 'c': 3, 'd': 4 };\n *\n * var values = _.memoize(_.values);\n * values(object);\n * // => [1, 2]\n *\n * values(other);\n * // => [3, 4]\n *\n * object.a = 2;\n * values(object);\n * // => [1, 2]\n *\n * // Modify the result cache.\n * values.cache.set(object, ['a', 'b']);\n * values(object);\n * // => ['a', 'b']\n *\n * // Replace `_.memoize.Cache`.\n * _.memoize.Cache = WeakMap;\n */\n function memoize(func, resolver) {\n if (typeof func != 'function' || (resolver != null && typeof resolver != 'function')) {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n var memoized = function() {\n var args = arguments,\n key = resolver ? resolver.apply(this, args) : args[0],\n cache = memoized.cache;\n\n if (cache.has(key)) {\n return cache.get(key);\n }\n var result = func.apply(this, args);\n memoized.cache = cache.set(key, result) || cache;\n return result;\n };\n memoized.cache = new (memoize.Cache || MapCache);\n return memoized;\n }\n\n // Expose `MapCache`.\n memoize.Cache = MapCache;\n\n /**\n * Creates a function that negates the result of the predicate `func`. The\n * `func` predicate is invoked with the `this` binding and arguments of the\n * created function.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Function\n * @param {Function} predicate The predicate to negate.\n * @returns {Function} Returns the new negated function.\n * @example\n *\n * function isEven(n) {\n * return n % 2 == 0;\n * }\n *\n * _.filter([1, 2, 3, 4, 5, 6], _.negate(isEven));\n * // => [1, 3, 5]\n */\n function negate(predicate) {\n if (typeof predicate != 'function') {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n return function() {\n var args = arguments;\n switch (args.length) {\n case 0: return !predicate.call(this);\n case 1: return !predicate.call(this, args[0]);\n case 2: return !predicate.call(this, args[0], args[1]);\n case 3: return !predicate.call(this, args[0], args[1], args[2]);\n }\n return !predicate.apply(this, args);\n };\n }\n\n /**\n * Creates a function that is restricted to invoking `func` once. Repeat calls\n * to the function return the value of the first invocation. The `func` is\n * invoked with the `this` binding and arguments of the created function.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Function\n * @param {Function} func The function to restrict.\n * @returns {Function} Returns the new restricted function.\n * @example\n *\n * var initialize = _.once(createApplication);\n * initialize();\n * initialize();\n * // => `createApplication` is invoked once\n */\n function once(func) {\n return before(2, func);\n }\n\n /**\n * Creates a function that invokes `func` with its arguments transformed.\n *\n * @static\n * @since 4.0.0\n * @memberOf _\n * @category Function\n * @param {Function} func The function to wrap.\n * @param {...(Function|Function[])} [transforms=[_.identity]]\n * The argument transforms.\n * @returns {Function} Returns the new function.\n * @example\n *\n * function doubled(n) {\n * return n * 2;\n * }\n *\n * function square(n) {\n * return n * n;\n * }\n *\n * var func = _.overArgs(function(x, y) {\n * return [x, y];\n * }, [square, doubled]);\n *\n * func(9, 3);\n * // => [81, 6]\n *\n * func(10, 5);\n * // => [100, 10]\n */\n var overArgs = castRest(function(func, transforms) {\n transforms = (transforms.length == 1 && isArray(transforms[0]))\n ? arrayMap(transforms[0], baseUnary(getIteratee()))\n : arrayMap(baseFlatten(transforms, 1), baseUnary(getIteratee()));\n\n var funcsLength = transforms.length;\n return baseRest(function(args) {\n var index = -1,\n length = nativeMin(args.length, funcsLength);\n\n while (++index < length) {\n args[index] = transforms[index].call(this, args[index]);\n }\n return apply(func, this, args);\n });\n });\n\n /**\n * Creates a function that invokes `func` with `partials` prepended to the\n * arguments it receives. This method is like `_.bind` except it does **not**\n * alter the `this` binding.\n *\n * The `_.partial.placeholder` value, which defaults to `_` in monolithic\n * builds, may be used as a placeholder for partially applied arguments.\n *\n * **Note:** This method doesn't set the \"length\" property of partially\n * applied functions.\n *\n * @static\n * @memberOf _\n * @since 0.2.0\n * @category Function\n * @param {Function} func The function to partially apply arguments to.\n * @param {...*} [partials] The arguments to be partially applied.\n * @returns {Function} Returns the new partially applied function.\n * @example\n *\n * function greet(greeting, name) {\n * return greeting + ' ' + name;\n * }\n *\n * var sayHelloTo = _.partial(greet, 'hello');\n * sayHelloTo('fred');\n * // => 'hello fred'\n *\n * // Partially applied with placeholders.\n * var greetFred = _.partial(greet, _, 'fred');\n * greetFred('hi');\n * // => 'hi fred'\n */\n var partial = baseRest(function(func, partials) {\n var holders = replaceHolders(partials, getHolder(partial));\n return createWrap(func, WRAP_PARTIAL_FLAG, undefined, partials, holders);\n });\n\n /**\n * This method is like `_.partial` except that partially applied arguments\n * are appended to the arguments it receives.\n *\n * The `_.partialRight.placeholder` value, which defaults to `_` in monolithic\n * builds, may be used as a placeholder for partially applied arguments.\n *\n * **Note:** This method doesn't set the \"length\" property of partially\n * applied functions.\n *\n * @static\n * @memberOf _\n * @since 1.0.0\n * @category Function\n * @param {Function} func The function to partially apply arguments to.\n * @param {...*} [partials] The arguments to be partially applied.\n * @returns {Function} Returns the new partially applied function.\n * @example\n *\n * function greet(greeting, name) {\n * return greeting + ' ' + name;\n * }\n *\n * var greetFred = _.partialRight(greet, 'fred');\n * greetFred('hi');\n * // => 'hi fred'\n *\n * // Partially applied with placeholders.\n * var sayHelloTo = _.partialRight(greet, 'hello', _);\n * sayHelloTo('fred');\n * // => 'hello fred'\n */\n var partialRight = baseRest(function(func, partials) {\n var holders = replaceHolders(partials, getHolder(partialRight));\n return createWrap(func, WRAP_PARTIAL_RIGHT_FLAG, undefined, partials, holders);\n });\n\n /**\n * Creates a function that invokes `func` with arguments arranged according\n * to the specified `indexes` where the argument value at the first index is\n * provided as the first argument, the argument value at the second index is\n * provided as the second argument, and so on.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Function\n * @param {Function} func The function to rearrange arguments for.\n * @param {...(number|number[])} indexes The arranged argument indexes.\n * @returns {Function} Returns the new function.\n * @example\n *\n * var rearged = _.rearg(function(a, b, c) {\n * return [a, b, c];\n * }, [2, 0, 1]);\n *\n * rearged('b', 'c', 'a')\n * // => ['a', 'b', 'c']\n */\n var rearg = flatRest(function(func, indexes) {\n return createWrap(func, WRAP_REARG_FLAG, undefined, undefined, undefined, indexes);\n });\n\n /**\n * Creates a function that invokes `func` with the `this` binding of the\n * created function and arguments from `start` and beyond provided as\n * an array.\n *\n * **Note:** This method is based on the\n * [rest parameter](https://mdn.io/rest_parameters).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Function\n * @param {Function} func The function to apply a rest parameter to.\n * @param {number} [start=func.length-1] The start position of the rest parameter.\n * @returns {Function} Returns the new function.\n * @example\n *\n * var say = _.rest(function(what, names) {\n * return what + ' ' + _.initial(names).join(', ') +\n * (_.size(names) > 1 ? ', & ' : '') + _.last(names);\n * });\n *\n * say('hello', 'fred', 'barney', 'pebbles');\n * // => 'hello fred, barney, & pebbles'\n */\n function rest(func, start) {\n if (typeof func != 'function') {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n start = start === undefined ? start : toInteger(start);\n return baseRest(func, start);\n }\n\n /**\n * Creates a function that invokes `func` with the `this` binding of the\n * create function and an array of arguments much like\n * [`Function#apply`](http://www.ecma-international.org/ecma-262/7.0/#sec-function.prototype.apply).\n *\n * **Note:** This method is based on the\n * [spread operator](https://mdn.io/spread_operator).\n *\n * @static\n * @memberOf _\n * @since 3.2.0\n * @category Function\n * @param {Function} func The function to spread arguments over.\n * @param {number} [start=0] The start position of the spread.\n * @returns {Function} Returns the new function.\n * @example\n *\n * var say = _.spread(function(who, what) {\n * return who + ' says ' + what;\n * });\n *\n * say(['fred', 'hello']);\n * // => 'fred says hello'\n *\n * var numbers = Promise.all([\n * Promise.resolve(40),\n * Promise.resolve(36)\n * ]);\n *\n * numbers.then(_.spread(function(x, y) {\n * return x + y;\n * }));\n * // => a Promise of 76\n */\n function spread(func, start) {\n if (typeof func != 'function') {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n start = start == null ? 0 : nativeMax(toInteger(start), 0);\n return baseRest(function(args) {\n var array = args[start],\n otherArgs = castSlice(args, 0, start);\n\n if (array) {\n arrayPush(otherArgs, array);\n }\n return apply(func, this, otherArgs);\n });\n }\n\n /**\n * Creates a throttled function that only invokes `func` at most once per\n * every `wait` milliseconds. The throttled function comes with a `cancel`\n * method to cancel delayed `func` invocations and a `flush` method to\n * immediately invoke them. Provide `options` to indicate whether `func`\n * should be invoked on the leading and/or trailing edge of the `wait`\n * timeout. The `func` is invoked with the last arguments provided to the\n * throttled function. Subsequent calls to the throttled function return the\n * result of the last `func` invocation.\n *\n * **Note:** If `leading` and `trailing` options are `true`, `func` is\n * invoked on the trailing edge of the timeout only if the throttled function\n * is invoked more than once during the `wait` timeout.\n *\n * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred\n * until to the next tick, similar to `setTimeout` with a timeout of `0`.\n *\n * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)\n * for details over the differences between `_.throttle` and `_.debounce`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Function\n * @param {Function} func The function to throttle.\n * @param {number} [wait=0] The number of milliseconds to throttle invocations to.\n * @param {Object} [options={}] The options object.\n * @param {boolean} [options.leading=true]\n * Specify invoking on the leading edge of the timeout.\n * @param {boolean} [options.trailing=true]\n * Specify invoking on the trailing edge of the timeout.\n * @returns {Function} Returns the new throttled function.\n * @example\n *\n * // Avoid excessively updating the position while scrolling.\n * jQuery(window).on('scroll', _.throttle(updatePosition, 100));\n *\n * // Invoke `renewToken` when the click event is fired, but not more than once every 5 minutes.\n * var throttled = _.throttle(renewToken, 300000, { 'trailing': false });\n * jQuery(element).on('click', throttled);\n *\n * // Cancel the trailing throttled invocation.\n * jQuery(window).on('popstate', throttled.cancel);\n */\n function throttle(func, wait, options) {\n var leading = true,\n trailing = true;\n\n if (typeof func != 'function') {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n if (isObject(options)) {\n leading = 'leading' in options ? !!options.leading : leading;\n trailing = 'trailing' in options ? !!options.trailing : trailing;\n }\n return debounce(func, wait, {\n 'leading': leading,\n 'maxWait': wait,\n 'trailing': trailing\n });\n }\n\n /**\n * Creates a function that accepts up to one argument, ignoring any\n * additional arguments.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Function\n * @param {Function} func The function to cap arguments for.\n * @returns {Function} Returns the new capped function.\n * @example\n *\n * _.map(['6', '8', '10'], _.unary(parseInt));\n * // => [6, 8, 10]\n */\n function unary(func) {\n return ary(func, 1);\n }\n\n /**\n * Creates a function that provides `value` to `wrapper` as its first\n * argument. Any additional arguments provided to the function are appended\n * to those provided to the `wrapper`. The wrapper is invoked with the `this`\n * binding of the created function.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Function\n * @param {*} value The value to wrap.\n * @param {Function} [wrapper=identity] The wrapper function.\n * @returns {Function} Returns the new function.\n * @example\n *\n * var p = _.wrap(_.escape, function(func, text) {\n * return '

' + func(text) + '

';\n * });\n *\n * p('fred, barney, & pebbles');\n * // => '

fred, barney, & pebbles

'\n */\n function wrap(value, wrapper) {\n return partial(castFunction(wrapper), value);\n }\n\n /*------------------------------------------------------------------------*/\n\n /**\n * Casts `value` as an array if it's not one.\n *\n * @static\n * @memberOf _\n * @since 4.4.0\n * @category Lang\n * @param {*} value The value to inspect.\n * @returns {Array} Returns the cast array.\n * @example\n *\n * _.castArray(1);\n * // => [1]\n *\n * _.castArray({ 'a': 1 });\n * // => [{ 'a': 1 }]\n *\n * _.castArray('abc');\n * // => ['abc']\n *\n * _.castArray(null);\n * // => [null]\n *\n * _.castArray(undefined);\n * // => [undefined]\n *\n * _.castArray();\n * // => []\n *\n * var array = [1, 2, 3];\n * console.log(_.castArray(array) === array);\n * // => true\n */\n function castArray() {\n if (!arguments.length) {\n return [];\n }\n var value = arguments[0];\n return isArray(value) ? value : [value];\n }\n\n /**\n * Creates a shallow clone of `value`.\n *\n * **Note:** This method is loosely based on the\n * [structured clone algorithm](https://mdn.io/Structured_clone_algorithm)\n * and supports cloning arrays, array buffers, booleans, date objects, maps,\n * numbers, `Object` objects, regexes, sets, strings, symbols, and typed\n * arrays. The own enumerable properties of `arguments` objects are cloned\n * as plain objects. An empty object is returned for uncloneable values such\n * as error objects, functions, DOM nodes, and WeakMaps.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to clone.\n * @returns {*} Returns the cloned value.\n * @see _.cloneDeep\n * @example\n *\n * var objects = [{ 'a': 1 }, { 'b': 2 }];\n *\n * var shallow = _.clone(objects);\n * console.log(shallow[0] === objects[0]);\n * // => true\n */\n function clone(value) {\n return baseClone(value, CLONE_SYMBOLS_FLAG);\n }\n\n /**\n * This method is like `_.clone` except that it accepts `customizer` which\n * is invoked to produce the cloned value. If `customizer` returns `undefined`,\n * cloning is handled by the method instead. The `customizer` is invoked with\n * up to four arguments; (value [, index|key, object, stack]).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to clone.\n * @param {Function} [customizer] The function to customize cloning.\n * @returns {*} Returns the cloned value.\n * @see _.cloneDeepWith\n * @example\n *\n * function customizer(value) {\n * if (_.isElement(value)) {\n * return value.cloneNode(false);\n * }\n * }\n *\n * var el = _.cloneWith(document.body, customizer);\n *\n * console.log(el === document.body);\n * // => false\n * console.log(el.nodeName);\n * // => 'BODY'\n * console.log(el.childNodes.length);\n * // => 0\n */\n function cloneWith(value, customizer) {\n customizer = typeof customizer == 'function' ? customizer : undefined;\n return baseClone(value, CLONE_SYMBOLS_FLAG, customizer);\n }\n\n /**\n * This method is like `_.clone` except that it recursively clones `value`.\n *\n * @static\n * @memberOf _\n * @since 1.0.0\n * @category Lang\n * @param {*} value The value to recursively clone.\n * @returns {*} Returns the deep cloned value.\n * @see _.clone\n * @example\n *\n * var objects = [{ 'a': 1 }, { 'b': 2 }];\n *\n * var deep = _.cloneDeep(objects);\n * console.log(deep[0] === objects[0]);\n * // => false\n */\n function cloneDeep(value) {\n return baseClone(value, CLONE_DEEP_FLAG | CLONE_SYMBOLS_FLAG);\n }\n\n /**\n * This method is like `_.cloneWith` except that it recursively clones `value`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to recursively clone.\n * @param {Function} [customizer] The function to customize cloning.\n * @returns {*} Returns the deep cloned value.\n * @see _.cloneWith\n * @example\n *\n * function customizer(value) {\n * if (_.isElement(value)) {\n * return value.cloneNode(true);\n * }\n * }\n *\n * var el = _.cloneDeepWith(document.body, customizer);\n *\n * console.log(el === document.body);\n * // => false\n * console.log(el.nodeName);\n * // => 'BODY'\n * console.log(el.childNodes.length);\n * // => 20\n */\n function cloneDeepWith(value, customizer) {\n customizer = typeof customizer == 'function' ? customizer : undefined;\n return baseClone(value, CLONE_DEEP_FLAG | CLONE_SYMBOLS_FLAG, customizer);\n }\n\n /**\n * Checks if `object` conforms to `source` by invoking the predicate\n * properties of `source` with the corresponding property values of `object`.\n *\n * **Note:** This method is equivalent to `_.conforms` when `source` is\n * partially applied.\n *\n * @static\n * @memberOf _\n * @since 4.14.0\n * @category Lang\n * @param {Object} object The object to inspect.\n * @param {Object} source The object of property predicates to conform to.\n * @returns {boolean} Returns `true` if `object` conforms, else `false`.\n * @example\n *\n * var object = { 'a': 1, 'b': 2 };\n *\n * _.conformsTo(object, { 'b': function(n) { return n > 1; } });\n * // => true\n *\n * _.conformsTo(object, { 'b': function(n) { return n > 2; } });\n * // => false\n */\n function conformsTo(object, source) {\n return source == null || baseConformsTo(object, source, keys(source));\n }\n\n /**\n * Performs a\n * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * comparison between two values to determine if they are equivalent.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n * @example\n *\n * var object = { 'a': 1 };\n * var other = { 'a': 1 };\n *\n * _.eq(object, object);\n * // => true\n *\n * _.eq(object, other);\n * // => false\n *\n * _.eq('a', 'a');\n * // => true\n *\n * _.eq('a', Object('a'));\n * // => false\n *\n * _.eq(NaN, NaN);\n * // => true\n */\n function eq(value, other) {\n return value === other || (value !== value && other !== other);\n }\n\n /**\n * Checks if `value` is greater than `other`.\n *\n * @static\n * @memberOf _\n * @since 3.9.0\n * @category Lang\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if `value` is greater than `other`,\n * else `false`.\n * @see _.lt\n * @example\n *\n * _.gt(3, 1);\n * // => true\n *\n * _.gt(3, 3);\n * // => false\n *\n * _.gt(1, 3);\n * // => false\n */\n var gt = createRelationalOperation(baseGt);\n\n /**\n * Checks if `value` is greater than or equal to `other`.\n *\n * @static\n * @memberOf _\n * @since 3.9.0\n * @category Lang\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if `value` is greater than or equal to\n * `other`, else `false`.\n * @see _.lte\n * @example\n *\n * _.gte(3, 1);\n * // => true\n *\n * _.gte(3, 3);\n * // => true\n *\n * _.gte(1, 3);\n * // => false\n */\n var gte = createRelationalOperation(function(value, other) {\n return value >= other;\n });\n\n /**\n * Checks if `value` is likely an `arguments` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an `arguments` object,\n * else `false`.\n * @example\n *\n * _.isArguments(function() { return arguments; }());\n * // => true\n *\n * _.isArguments([1, 2, 3]);\n * // => false\n */\n var isArguments = baseIsArguments(function() { return arguments; }()) ? baseIsArguments : function(value) {\n return isObjectLike(value) && hasOwnProperty.call(value, 'callee') &&\n !propertyIsEnumerable.call(value, 'callee');\n };\n\n /**\n * Checks if `value` is classified as an `Array` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an array, else `false`.\n * @example\n *\n * _.isArray([1, 2, 3]);\n * // => true\n *\n * _.isArray(document.body.children);\n * // => false\n *\n * _.isArray('abc');\n * // => false\n *\n * _.isArray(_.noop);\n * // => false\n */\n var isArray = Array.isArray;\n\n /**\n * Checks if `value` is classified as an `ArrayBuffer` object.\n *\n * @static\n * @memberOf _\n * @since 4.3.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an array buffer, else `false`.\n * @example\n *\n * _.isArrayBuffer(new ArrayBuffer(2));\n * // => true\n *\n * _.isArrayBuffer(new Array(2));\n * // => false\n */\n var isArrayBuffer = nodeIsArrayBuffer ? baseUnary(nodeIsArrayBuffer) : baseIsArrayBuffer;\n\n /**\n * Checks if `value` is array-like. A value is considered array-like if it's\n * not a function and has a `value.length` that's an integer greater than or\n * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is array-like, else `false`.\n * @example\n *\n * _.isArrayLike([1, 2, 3]);\n * // => true\n *\n * _.isArrayLike(document.body.children);\n * // => true\n *\n * _.isArrayLike('abc');\n * // => true\n *\n * _.isArrayLike(_.noop);\n * // => false\n */\n function isArrayLike(value) {\n return value != null && isLength(value.length) && !isFunction(value);\n }\n\n /**\n * This method is like `_.isArrayLike` except that it also checks if `value`\n * is an object.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an array-like object,\n * else `false`.\n * @example\n *\n * _.isArrayLikeObject([1, 2, 3]);\n * // => true\n *\n * _.isArrayLikeObject(document.body.children);\n * // => true\n *\n * _.isArrayLikeObject('abc');\n * // => false\n *\n * _.isArrayLikeObject(_.noop);\n * // => false\n */\n function isArrayLikeObject(value) {\n return isObjectLike(value) && isArrayLike(value);\n }\n\n /**\n * Checks if `value` is classified as a boolean primitive or object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a boolean, else `false`.\n * @example\n *\n * _.isBoolean(false);\n * // => true\n *\n * _.isBoolean(null);\n * // => false\n */\n function isBoolean(value) {\n return value === true || value === false ||\n (isObjectLike(value) && baseGetTag(value) == boolTag);\n }\n\n /**\n * Checks if `value` is a buffer.\n *\n * @static\n * @memberOf _\n * @since 4.3.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a buffer, else `false`.\n * @example\n *\n * _.isBuffer(new Buffer(2));\n * // => true\n *\n * _.isBuffer(new Uint8Array(2));\n * // => false\n */\n var isBuffer = nativeIsBuffer || stubFalse;\n\n /**\n * Checks if `value` is classified as a `Date` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a date object, else `false`.\n * @example\n *\n * _.isDate(new Date);\n * // => true\n *\n * _.isDate('Mon April 23 2012');\n * // => false\n */\n var isDate = nodeIsDate ? baseUnary(nodeIsDate) : baseIsDate;\n\n /**\n * Checks if `value` is likely a DOM element.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a DOM element, else `false`.\n * @example\n *\n * _.isElement(document.body);\n * // => true\n *\n * _.isElement('');\n * // => false\n */\n function isElement(value) {\n return isObjectLike(value) && value.nodeType === 1 && !isPlainObject(value);\n }\n\n /**\n * Checks if `value` is an empty object, collection, map, or set.\n *\n * Objects are considered empty if they have no own enumerable string keyed\n * properties.\n *\n * Array-like values such as `arguments` objects, arrays, buffers, strings, or\n * jQuery-like collections are considered empty if they have a `length` of `0`.\n * Similarly, maps and sets are considered empty if they have a `size` of `0`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is empty, else `false`.\n * @example\n *\n * _.isEmpty(null);\n * // => true\n *\n * _.isEmpty(true);\n * // => true\n *\n * _.isEmpty(1);\n * // => true\n *\n * _.isEmpty([1, 2, 3]);\n * // => false\n *\n * _.isEmpty({ 'a': 1 });\n * // => false\n */\n function isEmpty(value) {\n if (value == null) {\n return true;\n }\n if (isArrayLike(value) &&\n (isArray(value) || typeof value == 'string' || typeof value.splice == 'function' ||\n isBuffer(value) || isTypedArray(value) || isArguments(value))) {\n return !value.length;\n }\n var tag = getTag(value);\n if (tag == mapTag || tag == setTag) {\n return !value.size;\n }\n if (isPrototype(value)) {\n return !baseKeys(value).length;\n }\n for (var key in value) {\n if (hasOwnProperty.call(value, key)) {\n return false;\n }\n }\n return true;\n }\n\n /**\n * Performs a deep comparison between two values to determine if they are\n * equivalent.\n *\n * **Note:** This method supports comparing arrays, array buffers, booleans,\n * date objects, error objects, maps, numbers, `Object` objects, regexes,\n * sets, strings, symbols, and typed arrays. `Object` objects are compared\n * by their own, not inherited, enumerable properties. Functions and DOM\n * nodes are compared by strict equality, i.e. `===`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n * @example\n *\n * var object = { 'a': 1 };\n * var other = { 'a': 1 };\n *\n * _.isEqual(object, other);\n * // => true\n *\n * object === other;\n * // => false\n */\n function isEqual(value, other) {\n return baseIsEqual(value, other);\n }\n\n /**\n * This method is like `_.isEqual` except that it accepts `customizer` which\n * is invoked to compare values. If `customizer` returns `undefined`, comparisons\n * are handled by the method instead. The `customizer` is invoked with up to\n * six arguments: (objValue, othValue [, index|key, object, other, stack]).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @param {Function} [customizer] The function to customize comparisons.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n * @example\n *\n * function isGreeting(value) {\n * return /^h(?:i|ello)$/.test(value);\n * }\n *\n * function customizer(objValue, othValue) {\n * if (isGreeting(objValue) && isGreeting(othValue)) {\n * return true;\n * }\n * }\n *\n * var array = ['hello', 'goodbye'];\n * var other = ['hi', 'goodbye'];\n *\n * _.isEqualWith(array, other, customizer);\n * // => true\n */\n function isEqualWith(value, other, customizer) {\n customizer = typeof customizer == 'function' ? customizer : undefined;\n var result = customizer ? customizer(value, other) : undefined;\n return result === undefined ? baseIsEqual(value, other, undefined, customizer) : !!result;\n }\n\n /**\n * Checks if `value` is an `Error`, `EvalError`, `RangeError`, `ReferenceError`,\n * `SyntaxError`, `TypeError`, or `URIError` object.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an error object, else `false`.\n * @example\n *\n * _.isError(new Error);\n * // => true\n *\n * _.isError(Error);\n * // => false\n */\n function isError(value) {\n if (!isObjectLike(value)) {\n return false;\n }\n var tag = baseGetTag(value);\n return tag == errorTag || tag == domExcTag ||\n (typeof value.message == 'string' && typeof value.name == 'string' && !isPlainObject(value));\n }\n\n /**\n * Checks if `value` is a finite primitive number.\n *\n * **Note:** This method is based on\n * [`Number.isFinite`](https://mdn.io/Number/isFinite).\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a finite number, else `false`.\n * @example\n *\n * _.isFinite(3);\n * // => true\n *\n * _.isFinite(Number.MIN_VALUE);\n * // => true\n *\n * _.isFinite(Infinity);\n * // => false\n *\n * _.isFinite('3');\n * // => false\n */\n function isFinite(value) {\n return typeof value == 'number' && nativeIsFinite(value);\n }\n\n /**\n * Checks if `value` is classified as a `Function` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a function, else `false`.\n * @example\n *\n * _.isFunction(_);\n * // => true\n *\n * _.isFunction(/abc/);\n * // => false\n */\n function isFunction(value) {\n if (!isObject(value)) {\n return false;\n }\n // The use of `Object#toString` avoids issues with the `typeof` operator\n // in Safari 9 which returns 'object' for typed arrays and other constructors.\n var tag = baseGetTag(value);\n return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag;\n }\n\n /**\n * Checks if `value` is an integer.\n *\n * **Note:** This method is based on\n * [`Number.isInteger`](https://mdn.io/Number/isInteger).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an integer, else `false`.\n * @example\n *\n * _.isInteger(3);\n * // => true\n *\n * _.isInteger(Number.MIN_VALUE);\n * // => false\n *\n * _.isInteger(Infinity);\n * // => false\n *\n * _.isInteger('3');\n * // => false\n */\n function isInteger(value) {\n return typeof value == 'number' && value == toInteger(value);\n }\n\n /**\n * Checks if `value` is a valid array-like length.\n *\n * **Note:** This method is loosely based on\n * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a valid length, else `false`.\n * @example\n *\n * _.isLength(3);\n * // => true\n *\n * _.isLength(Number.MIN_VALUE);\n * // => false\n *\n * _.isLength(Infinity);\n * // => false\n *\n * _.isLength('3');\n * // => false\n */\n function isLength(value) {\n return typeof value == 'number' &&\n value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;\n }\n\n /**\n * Checks if `value` is the\n * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)\n * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an object, else `false`.\n * @example\n *\n * _.isObject({});\n * // => true\n *\n * _.isObject([1, 2, 3]);\n * // => true\n *\n * _.isObject(_.noop);\n * // => true\n *\n * _.isObject(null);\n * // => false\n */\n function isObject(value) {\n var type = typeof value;\n return value != null && (type == 'object' || type == 'function');\n }\n\n /**\n * Checks if `value` is object-like. A value is object-like if it's not `null`\n * and has a `typeof` result of \"object\".\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is object-like, else `false`.\n * @example\n *\n * _.isObjectLike({});\n * // => true\n *\n * _.isObjectLike([1, 2, 3]);\n * // => true\n *\n * _.isObjectLike(_.noop);\n * // => false\n *\n * _.isObjectLike(null);\n * // => false\n */\n function isObjectLike(value) {\n return value != null && typeof value == 'object';\n }\n\n /**\n * Checks if `value` is classified as a `Map` object.\n *\n * @static\n * @memberOf _\n * @since 4.3.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a map, else `false`.\n * @example\n *\n * _.isMap(new Map);\n * // => true\n *\n * _.isMap(new WeakMap);\n * // => false\n */\n var isMap = nodeIsMap ? baseUnary(nodeIsMap) : baseIsMap;\n\n /**\n * Performs a partial deep comparison between `object` and `source` to\n * determine if `object` contains equivalent property values.\n *\n * **Note:** This method is equivalent to `_.matches` when `source` is\n * partially applied.\n *\n * Partial comparisons will match empty array and empty object `source`\n * values against any array or object value, respectively. See `_.isEqual`\n * for a list of supported value comparisons.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Lang\n * @param {Object} object The object to inspect.\n * @param {Object} source The object of property values to match.\n * @returns {boolean} Returns `true` if `object` is a match, else `false`.\n * @example\n *\n * var object = { 'a': 1, 'b': 2 };\n *\n * _.isMatch(object, { 'b': 2 });\n * // => true\n *\n * _.isMatch(object, { 'b': 1 });\n * // => false\n */\n function isMatch(object, source) {\n return object === source || baseIsMatch(object, source, getMatchData(source));\n }\n\n /**\n * This method is like `_.isMatch` except that it accepts `customizer` which\n * is invoked to compare values. If `customizer` returns `undefined`, comparisons\n * are handled by the method instead. The `customizer` is invoked with five\n * arguments: (objValue, srcValue, index|key, object, source).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {Object} object The object to inspect.\n * @param {Object} source The object of property values to match.\n * @param {Function} [customizer] The function to customize comparisons.\n * @returns {boolean} Returns `true` if `object` is a match, else `false`.\n * @example\n *\n * function isGreeting(value) {\n * return /^h(?:i|ello)$/.test(value);\n * }\n *\n * function customizer(objValue, srcValue) {\n * if (isGreeting(objValue) && isGreeting(srcValue)) {\n * return true;\n * }\n * }\n *\n * var object = { 'greeting': 'hello' };\n * var source = { 'greeting': 'hi' };\n *\n * _.isMatchWith(object, source, customizer);\n * // => true\n */\n function isMatchWith(object, source, customizer) {\n customizer = typeof customizer == 'function' ? customizer : undefined;\n return baseIsMatch(object, source, getMatchData(source), customizer);\n }\n\n /**\n * Checks if `value` is `NaN`.\n *\n * **Note:** This method is based on\n * [`Number.isNaN`](https://mdn.io/Number/isNaN) and is not the same as\n * global [`isNaN`](https://mdn.io/isNaN) which returns `true` for\n * `undefined` and other non-number values.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is `NaN`, else `false`.\n * @example\n *\n * _.isNaN(NaN);\n * // => true\n *\n * _.isNaN(new Number(NaN));\n * // => true\n *\n * isNaN(undefined);\n * // => true\n *\n * _.isNaN(undefined);\n * // => false\n */\n function isNaN(value) {\n // An `NaN` primitive is the only value that is not equal to itself.\n // Perform the `toStringTag` check first to avoid errors with some\n // ActiveX objects in IE.\n return isNumber(value) && value != +value;\n }\n\n /**\n * Checks if `value` is a pristine native function.\n *\n * **Note:** This method can't reliably detect native functions in the presence\n * of the core-js package because core-js circumvents this kind of detection.\n * Despite multiple requests, the core-js maintainer has made it clear: any\n * attempt to fix the detection will be obstructed. As a result, we're left\n * with little choice but to throw an error. Unfortunately, this also affects\n * packages, like [babel-polyfill](https://www.npmjs.com/package/babel-polyfill),\n * which rely on core-js.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a native function,\n * else `false`.\n * @example\n *\n * _.isNative(Array.prototype.push);\n * // => true\n *\n * _.isNative(_);\n * // => false\n */\n function isNative(value) {\n if (isMaskable(value)) {\n throw new Error(CORE_ERROR_TEXT);\n }\n return baseIsNative(value);\n }\n\n /**\n * Checks if `value` is `null`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is `null`, else `false`.\n * @example\n *\n * _.isNull(null);\n * // => true\n *\n * _.isNull(void 0);\n * // => false\n */\n function isNull(value) {\n return value === null;\n }\n\n /**\n * Checks if `value` is `null` or `undefined`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is nullish, else `false`.\n * @example\n *\n * _.isNil(null);\n * // => true\n *\n * _.isNil(void 0);\n * // => true\n *\n * _.isNil(NaN);\n * // => false\n */\n function isNil(value) {\n return value == null;\n }\n\n /**\n * Checks if `value` is classified as a `Number` primitive or object.\n *\n * **Note:** To exclude `Infinity`, `-Infinity`, and `NaN`, which are\n * classified as numbers, use the `_.isFinite` method.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a number, else `false`.\n * @example\n *\n * _.isNumber(3);\n * // => true\n *\n * _.isNumber(Number.MIN_VALUE);\n * // => true\n *\n * _.isNumber(Infinity);\n * // => true\n *\n * _.isNumber('3');\n * // => false\n */\n function isNumber(value) {\n return typeof value == 'number' ||\n (isObjectLike(value) && baseGetTag(value) == numberTag);\n }\n\n /**\n * Checks if `value` is a plain object, that is, an object created by the\n * `Object` constructor or one with a `[[Prototype]]` of `null`.\n *\n * @static\n * @memberOf _\n * @since 0.8.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a plain object, else `false`.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * }\n *\n * _.isPlainObject(new Foo);\n * // => false\n *\n * _.isPlainObject([1, 2, 3]);\n * // => false\n *\n * _.isPlainObject({ 'x': 0, 'y': 0 });\n * // => true\n *\n * _.isPlainObject(Object.create(null));\n * // => true\n */\n function isPlainObject(value) {\n if (!isObjectLike(value) || baseGetTag(value) != objectTag) {\n return false;\n }\n var proto = getPrototype(value);\n if (proto === null) {\n return true;\n }\n var Ctor = hasOwnProperty.call(proto, 'constructor') && proto.constructor;\n return typeof Ctor == 'function' && Ctor instanceof Ctor &&\n funcToString.call(Ctor) == objectCtorString;\n }\n\n /**\n * Checks if `value` is classified as a `RegExp` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a regexp, else `false`.\n * @example\n *\n * _.isRegExp(/abc/);\n * // => true\n *\n * _.isRegExp('/abc/');\n * // => false\n */\n var isRegExp = nodeIsRegExp ? baseUnary(nodeIsRegExp) : baseIsRegExp;\n\n /**\n * Checks if `value` is a safe integer. An integer is safe if it's an IEEE-754\n * double precision number which isn't the result of a rounded unsafe integer.\n *\n * **Note:** This method is based on\n * [`Number.isSafeInteger`](https://mdn.io/Number/isSafeInteger).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a safe integer, else `false`.\n * @example\n *\n * _.isSafeInteger(3);\n * // => true\n *\n * _.isSafeInteger(Number.MIN_VALUE);\n * // => false\n *\n * _.isSafeInteger(Infinity);\n * // => false\n *\n * _.isSafeInteger('3');\n * // => false\n */\n function isSafeInteger(value) {\n return isInteger(value) && value >= -MAX_SAFE_INTEGER && value <= MAX_SAFE_INTEGER;\n }\n\n /**\n * Checks if `value` is classified as a `Set` object.\n *\n * @static\n * @memberOf _\n * @since 4.3.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a set, else `false`.\n * @example\n *\n * _.isSet(new Set);\n * // => true\n *\n * _.isSet(new WeakSet);\n * // => false\n */\n var isSet = nodeIsSet ? baseUnary(nodeIsSet) : baseIsSet;\n\n /**\n * Checks if `value` is classified as a `String` primitive or object.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a string, else `false`.\n * @example\n *\n * _.isString('abc');\n * // => true\n *\n * _.isString(1);\n * // => false\n */\n function isString(value) {\n return typeof value == 'string' ||\n (!isArray(value) && isObjectLike(value) && baseGetTag(value) == stringTag);\n }\n\n /**\n * Checks if `value` is classified as a `Symbol` primitive or object.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a symbol, else `false`.\n * @example\n *\n * _.isSymbol(Symbol.iterator);\n * // => true\n *\n * _.isSymbol('abc');\n * // => false\n */\n function isSymbol(value) {\n return typeof value == 'symbol' ||\n (isObjectLike(value) && baseGetTag(value) == symbolTag);\n }\n\n /**\n * Checks if `value` is classified as a typed array.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.\n * @example\n *\n * _.isTypedArray(new Uint8Array);\n * // => true\n *\n * _.isTypedArray([]);\n * // => false\n */\n var isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray;\n\n /**\n * Checks if `value` is `undefined`.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is `undefined`, else `false`.\n * @example\n *\n * _.isUndefined(void 0);\n * // => true\n *\n * _.isUndefined(null);\n * // => false\n */\n function isUndefined(value) {\n return value === undefined;\n }\n\n /**\n * Checks if `value` is classified as a `WeakMap` object.\n *\n * @static\n * @memberOf _\n * @since 4.3.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a weak map, else `false`.\n * @example\n *\n * _.isWeakMap(new WeakMap);\n * // => true\n *\n * _.isWeakMap(new Map);\n * // => false\n */\n function isWeakMap(value) {\n return isObjectLike(value) && getTag(value) == weakMapTag;\n }\n\n /**\n * Checks if `value` is classified as a `WeakSet` object.\n *\n * @static\n * @memberOf _\n * @since 4.3.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a weak set, else `false`.\n * @example\n *\n * _.isWeakSet(new WeakSet);\n * // => true\n *\n * _.isWeakSet(new Set);\n * // => false\n */\n function isWeakSet(value) {\n return isObjectLike(value) && baseGetTag(value) == weakSetTag;\n }\n\n /**\n * Checks if `value` is less than `other`.\n *\n * @static\n * @memberOf _\n * @since 3.9.0\n * @category Lang\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if `value` is less than `other`,\n * else `false`.\n * @see _.gt\n * @example\n *\n * _.lt(1, 3);\n * // => true\n *\n * _.lt(3, 3);\n * // => false\n *\n * _.lt(3, 1);\n * // => false\n */\n var lt = createRelationalOperation(baseLt);\n\n /**\n * Checks if `value` is less than or equal to `other`.\n *\n * @static\n * @memberOf _\n * @since 3.9.0\n * @category Lang\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if `value` is less than or equal to\n * `other`, else `false`.\n * @see _.gte\n * @example\n *\n * _.lte(1, 3);\n * // => true\n *\n * _.lte(3, 3);\n * // => true\n *\n * _.lte(3, 1);\n * // => false\n */\n var lte = createRelationalOperation(function(value, other) {\n return value <= other;\n });\n\n /**\n * Converts `value` to an array.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Lang\n * @param {*} value The value to convert.\n * @returns {Array} Returns the converted array.\n * @example\n *\n * _.toArray({ 'a': 1, 'b': 2 });\n * // => [1, 2]\n *\n * _.toArray('abc');\n * // => ['a', 'b', 'c']\n *\n * _.toArray(1);\n * // => []\n *\n * _.toArray(null);\n * // => []\n */\n function toArray(value) {\n if (!value) {\n return [];\n }\n if (isArrayLike(value)) {\n return isString(value) ? stringToArray(value) : copyArray(value);\n }\n if (symIterator && value[symIterator]) {\n return iteratorToArray(value[symIterator]());\n }\n var tag = getTag(value),\n func = tag == mapTag ? mapToArray : (tag == setTag ? setToArray : values);\n\n return func(value);\n }\n\n /**\n * Converts `value` to a finite number.\n *\n * @static\n * @memberOf _\n * @since 4.12.0\n * @category Lang\n * @param {*} value The value to convert.\n * @returns {number} Returns the converted number.\n * @example\n *\n * _.toFinite(3.2);\n * // => 3.2\n *\n * _.toFinite(Number.MIN_VALUE);\n * // => 5e-324\n *\n * _.toFinite(Infinity);\n * // => 1.7976931348623157e+308\n *\n * _.toFinite('3.2');\n * // => 3.2\n */\n function toFinite(value) {\n if (!value) {\n return value === 0 ? value : 0;\n }\n value = toNumber(value);\n if (value === INFINITY || value === -INFINITY) {\n var sign = (value < 0 ? -1 : 1);\n return sign * MAX_INTEGER;\n }\n return value === value ? value : 0;\n }\n\n /**\n * Converts `value` to an integer.\n *\n * **Note:** This method is loosely based on\n * [`ToInteger`](http://www.ecma-international.org/ecma-262/7.0/#sec-tointeger).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to convert.\n * @returns {number} Returns the converted integer.\n * @example\n *\n * _.toInteger(3.2);\n * // => 3\n *\n * _.toInteger(Number.MIN_VALUE);\n * // => 0\n *\n * _.toInteger(Infinity);\n * // => 1.7976931348623157e+308\n *\n * _.toInteger('3.2');\n * // => 3\n */\n function toInteger(value) {\n var result = toFinite(value),\n remainder = result % 1;\n\n return result === result ? (remainder ? result - remainder : result) : 0;\n }\n\n /**\n * Converts `value` to an integer suitable for use as the length of an\n * array-like object.\n *\n * **Note:** This method is based on\n * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to convert.\n * @returns {number} Returns the converted integer.\n * @example\n *\n * _.toLength(3.2);\n * // => 3\n *\n * _.toLength(Number.MIN_VALUE);\n * // => 0\n *\n * _.toLength(Infinity);\n * // => 4294967295\n *\n * _.toLength('3.2');\n * // => 3\n */\n function toLength(value) {\n return value ? baseClamp(toInteger(value), 0, MAX_ARRAY_LENGTH) : 0;\n }\n\n /**\n * Converts `value` to a number.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to process.\n * @returns {number} Returns the number.\n * @example\n *\n * _.toNumber(3.2);\n * // => 3.2\n *\n * _.toNumber(Number.MIN_VALUE);\n * // => 5e-324\n *\n * _.toNumber(Infinity);\n * // => Infinity\n *\n * _.toNumber('3.2');\n * // => 3.2\n */\n function toNumber(value) {\n if (typeof value == 'number') {\n return value;\n }\n if (isSymbol(value)) {\n return NAN;\n }\n if (isObject(value)) {\n var other = typeof value.valueOf == 'function' ? value.valueOf() : value;\n value = isObject(other) ? (other + '') : other;\n }\n if (typeof value != 'string') {\n return value === 0 ? value : +value;\n }\n value = baseTrim(value);\n var isBinary = reIsBinary.test(value);\n return (isBinary || reIsOctal.test(value))\n ? freeParseInt(value.slice(2), isBinary ? 2 : 8)\n : (reIsBadHex.test(value) ? NAN : +value);\n }\n\n /**\n * Converts `value` to a plain object flattening inherited enumerable string\n * keyed properties of `value` to own properties of the plain object.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Lang\n * @param {*} value The value to convert.\n * @returns {Object} Returns the converted plain object.\n * @example\n *\n * function Foo() {\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.assign({ 'a': 1 }, new Foo);\n * // => { 'a': 1, 'b': 2 }\n *\n * _.assign({ 'a': 1 }, _.toPlainObject(new Foo));\n * // => { 'a': 1, 'b': 2, 'c': 3 }\n */\n function toPlainObject(value) {\n return copyObject(value, keysIn(value));\n }\n\n /**\n * Converts `value` to a safe integer. A safe integer can be compared and\n * represented correctly.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to convert.\n * @returns {number} Returns the converted integer.\n * @example\n *\n * _.toSafeInteger(3.2);\n * // => 3\n *\n * _.toSafeInteger(Number.MIN_VALUE);\n * // => 0\n *\n * _.toSafeInteger(Infinity);\n * // => 9007199254740991\n *\n * _.toSafeInteger('3.2');\n * // => 3\n */\n function toSafeInteger(value) {\n return value\n ? baseClamp(toInteger(value), -MAX_SAFE_INTEGER, MAX_SAFE_INTEGER)\n : (value === 0 ? value : 0);\n }\n\n /**\n * Converts `value` to a string. An empty string is returned for `null`\n * and `undefined` values. The sign of `-0` is preserved.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to convert.\n * @returns {string} Returns the converted string.\n * @example\n *\n * _.toString(null);\n * // => ''\n *\n * _.toString(-0);\n * // => '-0'\n *\n * _.toString([1, 2, 3]);\n * // => '1,2,3'\n */\n function toString(value) {\n return value == null ? '' : baseToString(value);\n }\n\n /*------------------------------------------------------------------------*/\n\n /**\n * Assigns own enumerable string keyed properties of source objects to the\n * destination object. Source objects are applied from left to right.\n * Subsequent sources overwrite property assignments of previous sources.\n *\n * **Note:** This method mutates `object` and is loosely based on\n * [`Object.assign`](https://mdn.io/Object/assign).\n *\n * @static\n * @memberOf _\n * @since 0.10.0\n * @category Object\n * @param {Object} object The destination object.\n * @param {...Object} [sources] The source objects.\n * @returns {Object} Returns `object`.\n * @see _.assignIn\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * }\n *\n * function Bar() {\n * this.c = 3;\n * }\n *\n * Foo.prototype.b = 2;\n * Bar.prototype.d = 4;\n *\n * _.assign({ 'a': 0 }, new Foo, new Bar);\n * // => { 'a': 1, 'c': 3 }\n */\n var assign = createAssigner(function(object, source) {\n if (isPrototype(source) || isArrayLike(source)) {\n copyObject(source, keys(source), object);\n return;\n }\n for (var key in source) {\n if (hasOwnProperty.call(source, key)) {\n assignValue(object, key, source[key]);\n }\n }\n });\n\n /**\n * This method is like `_.assign` except that it iterates over own and\n * inherited source properties.\n *\n * **Note:** This method mutates `object`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @alias extend\n * @category Object\n * @param {Object} object The destination object.\n * @param {...Object} [sources] The source objects.\n * @returns {Object} Returns `object`.\n * @see _.assign\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * }\n *\n * function Bar() {\n * this.c = 3;\n * }\n *\n * Foo.prototype.b = 2;\n * Bar.prototype.d = 4;\n *\n * _.assignIn({ 'a': 0 }, new Foo, new Bar);\n * // => { 'a': 1, 'b': 2, 'c': 3, 'd': 4 }\n */\n var assignIn = createAssigner(function(object, source) {\n copyObject(source, keysIn(source), object);\n });\n\n /**\n * This method is like `_.assignIn` except that it accepts `customizer`\n * which is invoked to produce the assigned values. If `customizer` returns\n * `undefined`, assignment is handled by the method instead. The `customizer`\n * is invoked with five arguments: (objValue, srcValue, key, object, source).\n *\n * **Note:** This method mutates `object`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @alias extendWith\n * @category Object\n * @param {Object} object The destination object.\n * @param {...Object} sources The source objects.\n * @param {Function} [customizer] The function to customize assigned values.\n * @returns {Object} Returns `object`.\n * @see _.assignWith\n * @example\n *\n * function customizer(objValue, srcValue) {\n * return _.isUndefined(objValue) ? srcValue : objValue;\n * }\n *\n * var defaults = _.partialRight(_.assignInWith, customizer);\n *\n * defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 });\n * // => { 'a': 1, 'b': 2 }\n */\n var assignInWith = createAssigner(function(object, source, srcIndex, customizer) {\n copyObject(source, keysIn(source), object, customizer);\n });\n\n /**\n * This method is like `_.assign` except that it accepts `customizer`\n * which is invoked to produce the assigned values. If `customizer` returns\n * `undefined`, assignment is handled by the method instead. The `customizer`\n * is invoked with five arguments: (objValue, srcValue, key, object, source).\n *\n * **Note:** This method mutates `object`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Object\n * @param {Object} object The destination object.\n * @param {...Object} sources The source objects.\n * @param {Function} [customizer] The function to customize assigned values.\n * @returns {Object} Returns `object`.\n * @see _.assignInWith\n * @example\n *\n * function customizer(objValue, srcValue) {\n * return _.isUndefined(objValue) ? srcValue : objValue;\n * }\n *\n * var defaults = _.partialRight(_.assignWith, customizer);\n *\n * defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 });\n * // => { 'a': 1, 'b': 2 }\n */\n var assignWith = createAssigner(function(object, source, srcIndex, customizer) {\n copyObject(source, keys(source), object, customizer);\n });\n\n /**\n * Creates an array of values corresponding to `paths` of `object`.\n *\n * @static\n * @memberOf _\n * @since 1.0.0\n * @category Object\n * @param {Object} object The object to iterate over.\n * @param {...(string|string[])} [paths] The property paths to pick.\n * @returns {Array} Returns the picked values.\n * @example\n *\n * var object = { 'a': [{ 'b': { 'c': 3 } }, 4] };\n *\n * _.at(object, ['a[0].b.c', 'a[1]']);\n * // => [3, 4]\n */\n var at = flatRest(baseAt);\n\n /**\n * Creates an object that inherits from the `prototype` object. If a\n * `properties` object is given, its own enumerable string keyed properties\n * are assigned to the created object.\n *\n * @static\n * @memberOf _\n * @since 2.3.0\n * @category Object\n * @param {Object} prototype The object to inherit from.\n * @param {Object} [properties] The properties to assign to the object.\n * @returns {Object} Returns the new object.\n * @example\n *\n * function Shape() {\n * this.x = 0;\n * this.y = 0;\n * }\n *\n * function Circle() {\n * Shape.call(this);\n * }\n *\n * Circle.prototype = _.create(Shape.prototype, {\n * 'constructor': Circle\n * });\n *\n * var circle = new Circle;\n * circle instanceof Circle;\n * // => true\n *\n * circle instanceof Shape;\n * // => true\n */\n function create(prototype, properties) {\n var result = baseCreate(prototype);\n return properties == null ? result : baseAssign(result, properties);\n }\n\n /**\n * Assigns own and inherited enumerable string keyed properties of source\n * objects to the destination object for all destination properties that\n * resolve to `undefined`. Source objects are applied from left to right.\n * Once a property is set, additional values of the same property are ignored.\n *\n * **Note:** This method mutates `object`.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Object\n * @param {Object} object The destination object.\n * @param {...Object} [sources] The source objects.\n * @returns {Object} Returns `object`.\n * @see _.defaultsDeep\n * @example\n *\n * _.defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 });\n * // => { 'a': 1, 'b': 2 }\n */\n var defaults = baseRest(function(object, sources) {\n object = Object(object);\n\n var index = -1;\n var length = sources.length;\n var guard = length > 2 ? sources[2] : undefined;\n\n if (guard && isIterateeCall(sources[0], sources[1], guard)) {\n length = 1;\n }\n\n while (++index < length) {\n var source = sources[index];\n var props = keysIn(source);\n var propsIndex = -1;\n var propsLength = props.length;\n\n while (++propsIndex < propsLength) {\n var key = props[propsIndex];\n var value = object[key];\n\n if (value === undefined ||\n (eq(value, objectProto[key]) && !hasOwnProperty.call(object, key))) {\n object[key] = source[key];\n }\n }\n }\n\n return object;\n });\n\n /**\n * This method is like `_.defaults` except that it recursively assigns\n * default properties.\n *\n * **Note:** This method mutates `object`.\n *\n * @static\n * @memberOf _\n * @since 3.10.0\n * @category Object\n * @param {Object} object The destination object.\n * @param {...Object} [sources] The source objects.\n * @returns {Object} Returns `object`.\n * @see _.defaults\n * @example\n *\n * _.defaultsDeep({ 'a': { 'b': 2 } }, { 'a': { 'b': 1, 'c': 3 } });\n * // => { 'a': { 'b': 2, 'c': 3 } }\n */\n var defaultsDeep = baseRest(function(args) {\n args.push(undefined, customDefaultsMerge);\n return apply(mergeWith, undefined, args);\n });\n\n /**\n * This method is like `_.find` except that it returns the key of the first\n * element `predicate` returns truthy for instead of the element itself.\n *\n * @static\n * @memberOf _\n * @since 1.1.0\n * @category Object\n * @param {Object} object The object to inspect.\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\n * @returns {string|undefined} Returns the key of the matched element,\n * else `undefined`.\n * @example\n *\n * var users = {\n * 'barney': { 'age': 36, 'active': true },\n * 'fred': { 'age': 40, 'active': false },\n * 'pebbles': { 'age': 1, 'active': true }\n * };\n *\n * _.findKey(users, function(o) { return o.age < 40; });\n * // => 'barney' (iteration order is not guaranteed)\n *\n * // The `_.matches` iteratee shorthand.\n * _.findKey(users, { 'age': 1, 'active': true });\n * // => 'pebbles'\n *\n * // The `_.matchesProperty` iteratee shorthand.\n * _.findKey(users, ['active', false]);\n * // => 'fred'\n *\n * // The `_.property` iteratee shorthand.\n * _.findKey(users, 'active');\n * // => 'barney'\n */\n function findKey(object, predicate) {\n return baseFindKey(object, getIteratee(predicate, 3), baseForOwn);\n }\n\n /**\n * This method is like `_.findKey` except that it iterates over elements of\n * a collection in the opposite order.\n *\n * @static\n * @memberOf _\n * @since 2.0.0\n * @category Object\n * @param {Object} object The object to inspect.\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\n * @returns {string|undefined} Returns the key of the matched element,\n * else `undefined`.\n * @example\n *\n * var users = {\n * 'barney': { 'age': 36, 'active': true },\n * 'fred': { 'age': 40, 'active': false },\n * 'pebbles': { 'age': 1, 'active': true }\n * };\n *\n * _.findLastKey(users, function(o) { return o.age < 40; });\n * // => returns 'pebbles' assuming `_.findKey` returns 'barney'\n *\n * // The `_.matches` iteratee shorthand.\n * _.findLastKey(users, { 'age': 36, 'active': true });\n * // => 'barney'\n *\n * // The `_.matchesProperty` iteratee shorthand.\n * _.findLastKey(users, ['active', false]);\n * // => 'fred'\n *\n * // The `_.property` iteratee shorthand.\n * _.findLastKey(users, 'active');\n * // => 'pebbles'\n */\n function findLastKey(object, predicate) {\n return baseFindKey(object, getIteratee(predicate, 3), baseForOwnRight);\n }\n\n /**\n * Iterates over own and inherited enumerable string keyed properties of an\n * object and invokes `iteratee` for each property. The iteratee is invoked\n * with three arguments: (value, key, object). Iteratee functions may exit\n * iteration early by explicitly returning `false`.\n *\n * @static\n * @memberOf _\n * @since 0.3.0\n * @category Object\n * @param {Object} object The object to iterate over.\n * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n * @returns {Object} Returns `object`.\n * @see _.forInRight\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.forIn(new Foo, function(value, key) {\n * console.log(key);\n * });\n * // => Logs 'a', 'b', then 'c' (iteration order is not guaranteed).\n */\n function forIn(object, iteratee) {\n return object == null\n ? object\n : baseFor(object, getIteratee(iteratee, 3), keysIn);\n }\n\n /**\n * This method is like `_.forIn` except that it iterates over properties of\n * `object` in the opposite order.\n *\n * @static\n * @memberOf _\n * @since 2.0.0\n * @category Object\n * @param {Object} object The object to iterate over.\n * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n * @returns {Object} Returns `object`.\n * @see _.forIn\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.forInRight(new Foo, function(value, key) {\n * console.log(key);\n * });\n * // => Logs 'c', 'b', then 'a' assuming `_.forIn` logs 'a', 'b', then 'c'.\n */\n function forInRight(object, iteratee) {\n return object == null\n ? object\n : baseForRight(object, getIteratee(iteratee, 3), keysIn);\n }\n\n /**\n * Iterates over own enumerable string keyed properties of an object and\n * invokes `iteratee` for each property. The iteratee is invoked with three\n * arguments: (value, key, object). Iteratee functions may exit iteration\n * early by explicitly returning `false`.\n *\n * @static\n * @memberOf _\n * @since 0.3.0\n * @category Object\n * @param {Object} object The object to iterate over.\n * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n * @returns {Object} Returns `object`.\n * @see _.forOwnRight\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.forOwn(new Foo, function(value, key) {\n * console.log(key);\n * });\n * // => Logs 'a' then 'b' (iteration order is not guaranteed).\n */\n function forOwn(object, iteratee) {\n return object && baseForOwn(object, getIteratee(iteratee, 3));\n }\n\n /**\n * This method is like `_.forOwn` except that it iterates over properties of\n * `object` in the opposite order.\n *\n * @static\n * @memberOf _\n * @since 2.0.0\n * @category Object\n * @param {Object} object The object to iterate over.\n * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n * @returns {Object} Returns `object`.\n * @see _.forOwn\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.forOwnRight(new Foo, function(value, key) {\n * console.log(key);\n * });\n * // => Logs 'b' then 'a' assuming `_.forOwn` logs 'a' then 'b'.\n */\n function forOwnRight(object, iteratee) {\n return object && baseForOwnRight(object, getIteratee(iteratee, 3));\n }\n\n /**\n * Creates an array of function property names from own enumerable properties\n * of `object`.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Object\n * @param {Object} object The object to inspect.\n * @returns {Array} Returns the function names.\n * @see _.functionsIn\n * @example\n *\n * function Foo() {\n * this.a = _.constant('a');\n * this.b = _.constant('b');\n * }\n *\n * Foo.prototype.c = _.constant('c');\n *\n * _.functions(new Foo);\n * // => ['a', 'b']\n */\n function functions(object) {\n return object == null ? [] : baseFunctions(object, keys(object));\n }\n\n /**\n * Creates an array of function property names from own and inherited\n * enumerable properties of `object`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Object\n * @param {Object} object The object to inspect.\n * @returns {Array} Returns the function names.\n * @see _.functions\n * @example\n *\n * function Foo() {\n * this.a = _.constant('a');\n * this.b = _.constant('b');\n * }\n *\n * Foo.prototype.c = _.constant('c');\n *\n * _.functionsIn(new Foo);\n * // => ['a', 'b', 'c']\n */\n function functionsIn(object) {\n return object == null ? [] : baseFunctions(object, keysIn(object));\n }\n\n /**\n * Gets the value at `path` of `object`. If the resolved value is\n * `undefined`, the `defaultValue` is returned in its place.\n *\n * @static\n * @memberOf _\n * @since 3.7.0\n * @category Object\n * @param {Object} object The object to query.\n * @param {Array|string} path The path of the property to get.\n * @param {*} [defaultValue] The value returned for `undefined` resolved values.\n * @returns {*} Returns the resolved value.\n * @example\n *\n * var object = { 'a': [{ 'b': { 'c': 3 } }] };\n *\n * _.get(object, 'a[0].b.c');\n * // => 3\n *\n * _.get(object, ['a', '0', 'b', 'c']);\n * // => 3\n *\n * _.get(object, 'a.b.c', 'default');\n * // => 'default'\n */\n function get(object, path, defaultValue) {\n var result = object == null ? undefined : baseGet(object, path);\n return result === undefined ? defaultValue : result;\n }\n\n /**\n * Checks if `path` is a direct property of `object`.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Object\n * @param {Object} object The object to query.\n * @param {Array|string} path The path to check.\n * @returns {boolean} Returns `true` if `path` exists, else `false`.\n * @example\n *\n * var object = { 'a': { 'b': 2 } };\n * var other = _.create({ 'a': _.create({ 'b': 2 }) });\n *\n * _.has(object, 'a');\n * // => true\n *\n * _.has(object, 'a.b');\n * // => true\n *\n * _.has(object, ['a', 'b']);\n * // => true\n *\n * _.has(other, 'a');\n * // => false\n */\n function has(object, path) {\n return object != null && hasPath(object, path, baseHas);\n }\n\n /**\n * Checks if `path` is a direct or inherited property of `object`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Object\n * @param {Object} object The object to query.\n * @param {Array|string} path The path to check.\n * @returns {boolean} Returns `true` if `path` exists, else `false`.\n * @example\n *\n * var object = _.create({ 'a': _.create({ 'b': 2 }) });\n *\n * _.hasIn(object, 'a');\n * // => true\n *\n * _.hasIn(object, 'a.b');\n * // => true\n *\n * _.hasIn(object, ['a', 'b']);\n * // => true\n *\n * _.hasIn(object, 'b');\n * // => false\n */\n function hasIn(object, path) {\n return object != null && hasPath(object, path, baseHasIn);\n }\n\n /**\n * Creates an object composed of the inverted keys and values of `object`.\n * If `object` contains duplicate values, subsequent values overwrite\n * property assignments of previous values.\n *\n * @static\n * @memberOf _\n * @since 0.7.0\n * @category Object\n * @param {Object} object The object to invert.\n * @returns {Object} Returns the new inverted object.\n * @example\n *\n * var object = { 'a': 1, 'b': 2, 'c': 1 };\n *\n * _.invert(object);\n * // => { '1': 'c', '2': 'b' }\n */\n var invert = createInverter(function(result, value, key) {\n if (value != null &&\n typeof value.toString != 'function') {\n value = nativeObjectToString.call(value);\n }\n\n result[value] = key;\n }, constant(identity));\n\n /**\n * This method is like `_.invert` except that the inverted object is generated\n * from the results of running each element of `object` thru `iteratee`. The\n * corresponding inverted value of each inverted key is an array of keys\n * responsible for generating the inverted value. The iteratee is invoked\n * with one argument: (value).\n *\n * @static\n * @memberOf _\n * @since 4.1.0\n * @category Object\n * @param {Object} object The object to invert.\n * @param {Function} [iteratee=_.identity] The iteratee invoked per element.\n * @returns {Object} Returns the new inverted object.\n * @example\n *\n * var object = { 'a': 1, 'b': 2, 'c': 1 };\n *\n * _.invertBy(object);\n * // => { '1': ['a', 'c'], '2': ['b'] }\n *\n * _.invertBy(object, function(value) {\n * return 'group' + value;\n * });\n * // => { 'group1': ['a', 'c'], 'group2': ['b'] }\n */\n var invertBy = createInverter(function(result, value, key) {\n if (value != null &&\n typeof value.toString != 'function') {\n value = nativeObjectToString.call(value);\n }\n\n if (hasOwnProperty.call(result, value)) {\n result[value].push(key);\n } else {\n result[value] = [key];\n }\n }, getIteratee);\n\n /**\n * Invokes the method at `path` of `object`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Object\n * @param {Object} object The object to query.\n * @param {Array|string} path The path of the method to invoke.\n * @param {...*} [args] The arguments to invoke the method with.\n * @returns {*} Returns the result of the invoked method.\n * @example\n *\n * var object = { 'a': [{ 'b': { 'c': [1, 2, 3, 4] } }] };\n *\n * _.invoke(object, 'a[0].b.c.slice', 1, 3);\n * // => [2, 3]\n */\n var invoke = baseRest(baseInvoke);\n\n /**\n * Creates an array of the own enumerable property names of `object`.\n *\n * **Note:** Non-object values are coerced to objects. See the\n * [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)\n * for more details.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Object\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.keys(new Foo);\n * // => ['a', 'b'] (iteration order is not guaranteed)\n *\n * _.keys('hi');\n * // => ['0', '1']\n */\n function keys(object) {\n return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object);\n }\n\n /**\n * Creates an array of the own and inherited enumerable property names of `object`.\n *\n * **Note:** Non-object values are coerced to objects.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Object\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.keysIn(new Foo);\n * // => ['a', 'b', 'c'] (iteration order is not guaranteed)\n */\n function keysIn(object) {\n return isArrayLike(object) ? arrayLikeKeys(object, true) : baseKeysIn(object);\n }\n\n /**\n * The opposite of `_.mapValues`; this method creates an object with the\n * same values as `object` and keys generated by running each own enumerable\n * string keyed property of `object` thru `iteratee`. The iteratee is invoked\n * with three arguments: (value, key, object).\n *\n * @static\n * @memberOf _\n * @since 3.8.0\n * @category Object\n * @param {Object} object The object to iterate over.\n * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n * @returns {Object} Returns the new mapped object.\n * @see _.mapValues\n * @example\n *\n * _.mapKeys({ 'a': 1, 'b': 2 }, function(value, key) {\n * return key + value;\n * });\n * // => { 'a1': 1, 'b2': 2 }\n */\n function mapKeys(object, iteratee) {\n var result = {};\n iteratee = getIteratee(iteratee, 3);\n\n baseForOwn(object, function(value, key, object) {\n baseAssignValue(result, iteratee(value, key, object), value);\n });\n return result;\n }\n\n /**\n * Creates an object with the same keys as `object` and values generated\n * by running each own enumerable string keyed property of `object` thru\n * `iteratee`. The iteratee is invoked with three arguments:\n * (value, key, object).\n *\n * @static\n * @memberOf _\n * @since 2.4.0\n * @category Object\n * @param {Object} object The object to iterate over.\n * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n * @returns {Object} Returns the new mapped object.\n * @see _.mapKeys\n * @example\n *\n * var users = {\n * 'fred': { 'user': 'fred', 'age': 40 },\n * 'pebbles': { 'user': 'pebbles', 'age': 1 }\n * };\n *\n * _.mapValues(users, function(o) { return o.age; });\n * // => { 'fred': 40, 'pebbles': 1 } (iteration order is not guaranteed)\n *\n * // The `_.property` iteratee shorthand.\n * _.mapValues(users, 'age');\n * // => { 'fred': 40, 'pebbles': 1 } (iteration order is not guaranteed)\n */\n function mapValues(object, iteratee) {\n var result = {};\n iteratee = getIteratee(iteratee, 3);\n\n baseForOwn(object, function(value, key, object) {\n baseAssignValue(result, key, iteratee(value, key, object));\n });\n return result;\n }\n\n /**\n * This method is like `_.assign` except that it recursively merges own and\n * inherited enumerable string keyed properties of source objects into the\n * destination object. Source properties that resolve to `undefined` are\n * skipped if a destination value exists. Array and plain object properties\n * are merged recursively. Other objects and value types are overridden by\n * assignment. Source objects are applied from left to right. Subsequent\n * sources overwrite property assignments of previous sources.\n *\n * **Note:** This method mutates `object`.\n *\n * @static\n * @memberOf _\n * @since 0.5.0\n * @category Object\n * @param {Object} object The destination object.\n * @param {...Object} [sources] The source objects.\n * @returns {Object} Returns `object`.\n * @example\n *\n * var object = {\n * 'a': [{ 'b': 2 }, { 'd': 4 }]\n * };\n *\n * var other = {\n * 'a': [{ 'c': 3 }, { 'e': 5 }]\n * };\n *\n * _.merge(object, other);\n * // => { 'a': [{ 'b': 2, 'c': 3 }, { 'd': 4, 'e': 5 }] }\n */\n var merge = createAssigner(function(object, source, srcIndex) {\n baseMerge(object, source, srcIndex);\n });\n\n /**\n * This method is like `_.merge` except that it accepts `customizer` which\n * is invoked to produce the merged values of the destination and source\n * properties. If `customizer` returns `undefined`, merging is handled by the\n * method instead. The `customizer` is invoked with six arguments:\n * (objValue, srcValue, key, object, source, stack).\n *\n * **Note:** This method mutates `object`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Object\n * @param {Object} object The destination object.\n * @param {...Object} sources The source objects.\n * @param {Function} customizer The function to customize assigned values.\n * @returns {Object} Returns `object`.\n * @example\n *\n * function customizer(objValue, srcValue) {\n * if (_.isArray(objValue)) {\n * return objValue.concat(srcValue);\n * }\n * }\n *\n * var object = { 'a': [1], 'b': [2] };\n * var other = { 'a': [3], 'b': [4] };\n *\n * _.mergeWith(object, other, customizer);\n * // => { 'a': [1, 3], 'b': [2, 4] }\n */\n var mergeWith = createAssigner(function(object, source, srcIndex, customizer) {\n baseMerge(object, source, srcIndex, customizer);\n });\n\n /**\n * The opposite of `_.pick`; this method creates an object composed of the\n * own and inherited enumerable property paths of `object` that are not omitted.\n *\n * **Note:** This method is considerably slower than `_.pick`.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Object\n * @param {Object} object The source object.\n * @param {...(string|string[])} [paths] The property paths to omit.\n * @returns {Object} Returns the new object.\n * @example\n *\n * var object = { 'a': 1, 'b': '2', 'c': 3 };\n *\n * _.omit(object, ['a', 'c']);\n * // => { 'b': '2' }\n */\n var omit = flatRest(function(object, paths) {\n var result = {};\n if (object == null) {\n return result;\n }\n var isDeep = false;\n paths = arrayMap(paths, function(path) {\n path = castPath(path, object);\n isDeep || (isDeep = path.length > 1);\n return path;\n });\n copyObject(object, getAllKeysIn(object), result);\n if (isDeep) {\n result = baseClone(result, CLONE_DEEP_FLAG | CLONE_FLAT_FLAG | CLONE_SYMBOLS_FLAG, customOmitClone);\n }\n var length = paths.length;\n while (length--) {\n baseUnset(result, paths[length]);\n }\n return result;\n });\n\n /**\n * The opposite of `_.pickBy`; this method creates an object composed of\n * the own and inherited enumerable string keyed properties of `object` that\n * `predicate` doesn't return truthy for. The predicate is invoked with two\n * arguments: (value, key).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Object\n * @param {Object} object The source object.\n * @param {Function} [predicate=_.identity] The function invoked per property.\n * @returns {Object} Returns the new object.\n * @example\n *\n * var object = { 'a': 1, 'b': '2', 'c': 3 };\n *\n * _.omitBy(object, _.isNumber);\n * // => { 'b': '2' }\n */\n function omitBy(object, predicate) {\n return pickBy(object, negate(getIteratee(predicate)));\n }\n\n /**\n * Creates an object composed of the picked `object` properties.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Object\n * @param {Object} object The source object.\n * @param {...(string|string[])} [paths] The property paths to pick.\n * @returns {Object} Returns the new object.\n * @example\n *\n * var object = { 'a': 1, 'b': '2', 'c': 3 };\n *\n * _.pick(object, ['a', 'c']);\n * // => { 'a': 1, 'c': 3 }\n */\n var pick = flatRest(function(object, paths) {\n return object == null ? {} : basePick(object, paths);\n });\n\n /**\n * Creates an object composed of the `object` properties `predicate` returns\n * truthy for. The predicate is invoked with two arguments: (value, key).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Object\n * @param {Object} object The source object.\n * @param {Function} [predicate=_.identity] The function invoked per property.\n * @returns {Object} Returns the new object.\n * @example\n *\n * var object = { 'a': 1, 'b': '2', 'c': 3 };\n *\n * _.pickBy(object, _.isNumber);\n * // => { 'a': 1, 'c': 3 }\n */\n function pickBy(object, predicate) {\n if (object == null) {\n return {};\n }\n var props = arrayMap(getAllKeysIn(object), function(prop) {\n return [prop];\n });\n predicate = getIteratee(predicate);\n return basePickBy(object, props, function(value, path) {\n return predicate(value, path[0]);\n });\n }\n\n /**\n * This method is like `_.get` except that if the resolved value is a\n * function it's invoked with the `this` binding of its parent object and\n * its result is returned.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Object\n * @param {Object} object The object to query.\n * @param {Array|string} path The path of the property to resolve.\n * @param {*} [defaultValue] The value returned for `undefined` resolved values.\n * @returns {*} Returns the resolved value.\n * @example\n *\n * var object = { 'a': [{ 'b': { 'c1': 3, 'c2': _.constant(4) } }] };\n *\n * _.result(object, 'a[0].b.c1');\n * // => 3\n *\n * _.result(object, 'a[0].b.c2');\n * // => 4\n *\n * _.result(object, 'a[0].b.c3', 'default');\n * // => 'default'\n *\n * _.result(object, 'a[0].b.c3', _.constant('default'));\n * // => 'default'\n */\n function result(object, path, defaultValue) {\n path = castPath(path, object);\n\n var index = -1,\n length = path.length;\n\n // Ensure the loop is entered when path is empty.\n if (!length) {\n length = 1;\n object = undefined;\n }\n while (++index < length) {\n var value = object == null ? undefined : object[toKey(path[index])];\n if (value === undefined) {\n index = length;\n value = defaultValue;\n }\n object = isFunction(value) ? value.call(object) : value;\n }\n return object;\n }\n\n /**\n * Sets the value at `path` of `object`. If a portion of `path` doesn't exist,\n * it's created. Arrays are created for missing index properties while objects\n * are created for all other missing properties. Use `_.setWith` to customize\n * `path` creation.\n *\n * **Note:** This method mutates `object`.\n *\n * @static\n * @memberOf _\n * @since 3.7.0\n * @category Object\n * @param {Object} object The object to modify.\n * @param {Array|string} path The path of the property to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns `object`.\n * @example\n *\n * var object = { 'a': [{ 'b': { 'c': 3 } }] };\n *\n * _.set(object, 'a[0].b.c', 4);\n * console.log(object.a[0].b.c);\n * // => 4\n *\n * _.set(object, ['x', '0', 'y', 'z'], 5);\n * console.log(object.x[0].y.z);\n * // => 5\n */\n function set(object, path, value) {\n return object == null ? object : baseSet(object, path, value);\n }\n\n /**\n * This method is like `_.set` except that it accepts `customizer` which is\n * invoked to produce the objects of `path`. If `customizer` returns `undefined`\n * path creation is handled by the method instead. The `customizer` is invoked\n * with three arguments: (nsValue, key, nsObject).\n *\n * **Note:** This method mutates `object`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Object\n * @param {Object} object The object to modify.\n * @param {Array|string} path The path of the property to set.\n * @param {*} value The value to set.\n * @param {Function} [customizer] The function to customize assigned values.\n * @returns {Object} Returns `object`.\n * @example\n *\n * var object = {};\n *\n * _.setWith(object, '[0][1]', 'a', Object);\n * // => { '0': { '1': 'a' } }\n */\n function setWith(object, path, value, customizer) {\n customizer = typeof customizer == 'function' ? customizer : undefined;\n return object == null ? object : baseSet(object, path, value, customizer);\n }\n\n /**\n * Creates an array of own enumerable string keyed-value pairs for `object`\n * which can be consumed by `_.fromPairs`. If `object` is a map or set, its\n * entries are returned.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @alias entries\n * @category Object\n * @param {Object} object The object to query.\n * @returns {Array} Returns the key-value pairs.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.toPairs(new Foo);\n * // => [['a', 1], ['b', 2]] (iteration order is not guaranteed)\n */\n var toPairs = createToPairs(keys);\n\n /**\n * Creates an array of own and inherited enumerable string keyed-value pairs\n * for `object` which can be consumed by `_.fromPairs`. If `object` is a map\n * or set, its entries are returned.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @alias entriesIn\n * @category Object\n * @param {Object} object The object to query.\n * @returns {Array} Returns the key-value pairs.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.toPairsIn(new Foo);\n * // => [['a', 1], ['b', 2], ['c', 3]] (iteration order is not guaranteed)\n */\n var toPairsIn = createToPairs(keysIn);\n\n /**\n * An alternative to `_.reduce`; this method transforms `object` to a new\n * `accumulator` object which is the result of running each of its own\n * enumerable string keyed properties thru `iteratee`, with each invocation\n * potentially mutating the `accumulator` object. If `accumulator` is not\n * provided, a new object with the same `[[Prototype]]` will be used. The\n * iteratee is invoked with four arguments: (accumulator, value, key, object).\n * Iteratee functions may exit iteration early by explicitly returning `false`.\n *\n * @static\n * @memberOf _\n * @since 1.3.0\n * @category Object\n * @param {Object} object The object to iterate over.\n * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n * @param {*} [accumulator] The custom accumulator value.\n * @returns {*} Returns the accumulated value.\n * @example\n *\n * _.transform([2, 3, 4], function(result, n) {\n * result.push(n *= n);\n * return n % 2 == 0;\n * }, []);\n * // => [4, 9]\n *\n * _.transform({ 'a': 1, 'b': 2, 'c': 1 }, function(result, value, key) {\n * (result[value] || (result[value] = [])).push(key);\n * }, {});\n * // => { '1': ['a', 'c'], '2': ['b'] }\n */\n function transform(object, iteratee, accumulator) {\n var isArr = isArray(object),\n isArrLike = isArr || isBuffer(object) || isTypedArray(object);\n\n iteratee = getIteratee(iteratee, 4);\n if (accumulator == null) {\n var Ctor = object && object.constructor;\n if (isArrLike) {\n accumulator = isArr ? new Ctor : [];\n }\n else if (isObject(object)) {\n accumulator = isFunction(Ctor) ? baseCreate(getPrototype(object)) : {};\n }\n else {\n accumulator = {};\n }\n }\n (isArrLike ? arrayEach : baseForOwn)(object, function(value, index, object) {\n return iteratee(accumulator, value, index, object);\n });\n return accumulator;\n }\n\n /**\n * Removes the property at `path` of `object`.\n *\n * **Note:** This method mutates `object`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Object\n * @param {Object} object The object to modify.\n * @param {Array|string} path The path of the property to unset.\n * @returns {boolean} Returns `true` if the property is deleted, else `false`.\n * @example\n *\n * var object = { 'a': [{ 'b': { 'c': 7 } }] };\n * _.unset(object, 'a[0].b.c');\n * // => true\n *\n * console.log(object);\n * // => { 'a': [{ 'b': {} }] };\n *\n * _.unset(object, ['a', '0', 'b', 'c']);\n * // => true\n *\n * console.log(object);\n * // => { 'a': [{ 'b': {} }] };\n */\n function unset(object, path) {\n return object == null ? true : baseUnset(object, path);\n }\n\n /**\n * This method is like `_.set` except that accepts `updater` to produce the\n * value to set. Use `_.updateWith` to customize `path` creation. The `updater`\n * is invoked with one argument: (value).\n *\n * **Note:** This method mutates `object`.\n *\n * @static\n * @memberOf _\n * @since 4.6.0\n * @category Object\n * @param {Object} object The object to modify.\n * @param {Array|string} path The path of the property to set.\n * @param {Function} updater The function to produce the updated value.\n * @returns {Object} Returns `object`.\n * @example\n *\n * var object = { 'a': [{ 'b': { 'c': 3 } }] };\n *\n * _.update(object, 'a[0].b.c', function(n) { return n * n; });\n * console.log(object.a[0].b.c);\n * // => 9\n *\n * _.update(object, 'x[0].y.z', function(n) { return n ? n + 1 : 0; });\n * console.log(object.x[0].y.z);\n * // => 0\n */\n function update(object, path, updater) {\n return object == null ? object : baseUpdate(object, path, castFunction(updater));\n }\n\n /**\n * This method is like `_.update` except that it accepts `customizer` which is\n * invoked to produce the objects of `path`. If `customizer` returns `undefined`\n * path creation is handled by the method instead. The `customizer` is invoked\n * with three arguments: (nsValue, key, nsObject).\n *\n * **Note:** This method mutates `object`.\n *\n * @static\n * @memberOf _\n * @since 4.6.0\n * @category Object\n * @param {Object} object The object to modify.\n * @param {Array|string} path The path of the property to set.\n * @param {Function} updater The function to produce the updated value.\n * @param {Function} [customizer] The function to customize assigned values.\n * @returns {Object} Returns `object`.\n * @example\n *\n * var object = {};\n *\n * _.updateWith(object, '[0][1]', _.constant('a'), Object);\n * // => { '0': { '1': 'a' } }\n */\n function updateWith(object, path, updater, customizer) {\n customizer = typeof customizer == 'function' ? customizer : undefined;\n return object == null ? object : baseUpdate(object, path, castFunction(updater), customizer);\n }\n\n /**\n * Creates an array of the own enumerable string keyed property values of `object`.\n *\n * **Note:** Non-object values are coerced to objects.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Object\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property values.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.values(new Foo);\n * // => [1, 2] (iteration order is not guaranteed)\n *\n * _.values('hi');\n * // => ['h', 'i']\n */\n function values(object) {\n return object == null ? [] : baseValues(object, keys(object));\n }\n\n /**\n * Creates an array of the own and inherited enumerable string keyed property\n * values of `object`.\n *\n * **Note:** Non-object values are coerced to objects.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Object\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property values.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.valuesIn(new Foo);\n * // => [1, 2, 3] (iteration order is not guaranteed)\n */\n function valuesIn(object) {\n return object == null ? [] : baseValues(object, keysIn(object));\n }\n\n /*------------------------------------------------------------------------*/\n\n /**\n * Clamps `number` within the inclusive `lower` and `upper` bounds.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Number\n * @param {number} number The number to clamp.\n * @param {number} [lower] The lower bound.\n * @param {number} upper The upper bound.\n * @returns {number} Returns the clamped number.\n * @example\n *\n * _.clamp(-10, -5, 5);\n * // => -5\n *\n * _.clamp(10, -5, 5);\n * // => 5\n */\n function clamp(number, lower, upper) {\n if (upper === undefined) {\n upper = lower;\n lower = undefined;\n }\n if (upper !== undefined) {\n upper = toNumber(upper);\n upper = upper === upper ? upper : 0;\n }\n if (lower !== undefined) {\n lower = toNumber(lower);\n lower = lower === lower ? lower : 0;\n }\n return baseClamp(toNumber(number), lower, upper);\n }\n\n /**\n * Checks if `n` is between `start` and up to, but not including, `end`. If\n * `end` is not specified, it's set to `start` with `start` then set to `0`.\n * If `start` is greater than `end` the params are swapped to support\n * negative ranges.\n *\n * @static\n * @memberOf _\n * @since 3.3.0\n * @category Number\n * @param {number} number The number to check.\n * @param {number} [start=0] The start of the range.\n * @param {number} end The end of the range.\n * @returns {boolean} Returns `true` if `number` is in the range, else `false`.\n * @see _.range, _.rangeRight\n * @example\n *\n * _.inRange(3, 2, 4);\n * // => true\n *\n * _.inRange(4, 8);\n * // => true\n *\n * _.inRange(4, 2);\n * // => false\n *\n * _.inRange(2, 2);\n * // => false\n *\n * _.inRange(1.2, 2);\n * // => true\n *\n * _.inRange(5.2, 4);\n * // => false\n *\n * _.inRange(-3, -2, -6);\n * // => true\n */\n function inRange(number, start, end) {\n start = toFinite(start);\n if (end === undefined) {\n end = start;\n start = 0;\n } else {\n end = toFinite(end);\n }\n number = toNumber(number);\n return baseInRange(number, start, end);\n }\n\n /**\n * Produces a random number between the inclusive `lower` and `upper` bounds.\n * If only one argument is provided a number between `0` and the given number\n * is returned. If `floating` is `true`, or either `lower` or `upper` are\n * floats, a floating-point number is returned instead of an integer.\n *\n * **Note:** JavaScript follows the IEEE-754 standard for resolving\n * floating-point values which can produce unexpected results.\n *\n * @static\n * @memberOf _\n * @since 0.7.0\n * @category Number\n * @param {number} [lower=0] The lower bound.\n * @param {number} [upper=1] The upper bound.\n * @param {boolean} [floating] Specify returning a floating-point number.\n * @returns {number} Returns the random number.\n * @example\n *\n * _.random(0, 5);\n * // => an integer between 0 and 5\n *\n * _.random(5);\n * // => also an integer between 0 and 5\n *\n * _.random(5, true);\n * // => a floating-point number between 0 and 5\n *\n * _.random(1.2, 5.2);\n * // => a floating-point number between 1.2 and 5.2\n */\n function random(lower, upper, floating) {\n if (floating && typeof floating != 'boolean' && isIterateeCall(lower, upper, floating)) {\n upper = floating = undefined;\n }\n if (floating === undefined) {\n if (typeof upper == 'boolean') {\n floating = upper;\n upper = undefined;\n }\n else if (typeof lower == 'boolean') {\n floating = lower;\n lower = undefined;\n }\n }\n if (lower === undefined && upper === undefined) {\n lower = 0;\n upper = 1;\n }\n else {\n lower = toFinite(lower);\n if (upper === undefined) {\n upper = lower;\n lower = 0;\n } else {\n upper = toFinite(upper);\n }\n }\n if (lower > upper) {\n var temp = lower;\n lower = upper;\n upper = temp;\n }\n if (floating || lower % 1 || upper % 1) {\n var rand = nativeRandom();\n return nativeMin(lower + (rand * (upper - lower + freeParseFloat('1e-' + ((rand + '').length - 1)))), upper);\n }\n return baseRandom(lower, upper);\n }\n\n /*------------------------------------------------------------------------*/\n\n /**\n * Converts `string` to [camel case](https://en.wikipedia.org/wiki/CamelCase).\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category String\n * @param {string} [string=''] The string to convert.\n * @returns {string} Returns the camel cased string.\n * @example\n *\n * _.camelCase('Foo Bar');\n * // => 'fooBar'\n *\n * _.camelCase('--foo-bar--');\n * // => 'fooBar'\n *\n * _.camelCase('__FOO_BAR__');\n * // => 'fooBar'\n */\n var camelCase = createCompounder(function(result, word, index) {\n word = word.toLowerCase();\n return result + (index ? capitalize(word) : word);\n });\n\n /**\n * Converts the first character of `string` to upper case and the remaining\n * to lower case.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category String\n * @param {string} [string=''] The string to capitalize.\n * @returns {string} Returns the capitalized string.\n * @example\n *\n * _.capitalize('FRED');\n * // => 'Fred'\n */\n function capitalize(string) {\n return upperFirst(toString(string).toLowerCase());\n }\n\n /**\n * Deburrs `string` by converting\n * [Latin-1 Supplement](https://en.wikipedia.org/wiki/Latin-1_Supplement_(Unicode_block)#Character_table)\n * and [Latin Extended-A](https://en.wikipedia.org/wiki/Latin_Extended-A)\n * letters to basic Latin letters and removing\n * [combining diacritical marks](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks).\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category String\n * @param {string} [string=''] The string to deburr.\n * @returns {string} Returns the deburred string.\n * @example\n *\n * _.deburr('déjà vu');\n * // => 'deja vu'\n */\n function deburr(string) {\n string = toString(string);\n return string && string.replace(reLatin, deburrLetter).replace(reComboMark, '');\n }\n\n /**\n * Checks if `string` ends with the given target string.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category String\n * @param {string} [string=''] The string to inspect.\n * @param {string} [target] The string to search for.\n * @param {number} [position=string.length] The position to search up to.\n * @returns {boolean} Returns `true` if `string` ends with `target`,\n * else `false`.\n * @example\n *\n * _.endsWith('abc', 'c');\n * // => true\n *\n * _.endsWith('abc', 'b');\n * // => false\n *\n * _.endsWith('abc', 'b', 2);\n * // => true\n */\n function endsWith(string, target, position) {\n string = toString(string);\n target = baseToString(target);\n\n var length = string.length;\n position = position === undefined\n ? length\n : baseClamp(toInteger(position), 0, length);\n\n var end = position;\n position -= target.length;\n return position >= 0 && string.slice(position, end) == target;\n }\n\n /**\n * Converts the characters \"&\", \"<\", \">\", '\"', and \"'\" in `string` to their\n * corresponding HTML entities.\n *\n * **Note:** No other characters are escaped. To escape additional\n * characters use a third-party library like [_he_](https://mths.be/he).\n *\n * Though the \">\" character is escaped for symmetry, characters like\n * \">\" and \"/\" don't need escaping in HTML and have no special meaning\n * unless they're part of a tag or unquoted attribute value. See\n * [Mathias Bynens's article](https://mathiasbynens.be/notes/ambiguous-ampersands)\n * (under \"semi-related fun fact\") for more details.\n *\n * When working with HTML you should always\n * [quote attribute values](http://wonko.com/post/html-escaping) to reduce\n * XSS vectors.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category String\n * @param {string} [string=''] The string to escape.\n * @returns {string} Returns the escaped string.\n * @example\n *\n * _.escape('fred, barney, & pebbles');\n * // => 'fred, barney, & pebbles'\n */\n function escape(string) {\n string = toString(string);\n return (string && reHasUnescapedHtml.test(string))\n ? string.replace(reUnescapedHtml, escapeHtmlChar)\n : string;\n }\n\n /**\n * Escapes the `RegExp` special characters \"^\", \"$\", \"\\\", \".\", \"*\", \"+\",\n * \"?\", \"(\", \")\", \"[\", \"]\", \"{\", \"}\", and \"|\" in `string`.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category String\n * @param {string} [string=''] The string to escape.\n * @returns {string} Returns the escaped string.\n * @example\n *\n * _.escapeRegExp('[lodash](https://lodash.com/)');\n * // => '\\[lodash\\]\\(https://lodash\\.com/\\)'\n */\n function escapeRegExp(string) {\n string = toString(string);\n return (string && reHasRegExpChar.test(string))\n ? string.replace(reRegExpChar, '\\\\$&')\n : string;\n }\n\n /**\n * Converts `string` to\n * [kebab case](https://en.wikipedia.org/wiki/Letter_case#Special_case_styles).\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category String\n * @param {string} [string=''] The string to convert.\n * @returns {string} Returns the kebab cased string.\n * @example\n *\n * _.kebabCase('Foo Bar');\n * // => 'foo-bar'\n *\n * _.kebabCase('fooBar');\n * // => 'foo-bar'\n *\n * _.kebabCase('__FOO_BAR__');\n * // => 'foo-bar'\n */\n var kebabCase = createCompounder(function(result, word, index) {\n return result + (index ? '-' : '') + word.toLowerCase();\n });\n\n /**\n * Converts `string`, as space separated words, to lower case.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category String\n * @param {string} [string=''] The string to convert.\n * @returns {string} Returns the lower cased string.\n * @example\n *\n * _.lowerCase('--Foo-Bar--');\n * // => 'foo bar'\n *\n * _.lowerCase('fooBar');\n * // => 'foo bar'\n *\n * _.lowerCase('__FOO_BAR__');\n * // => 'foo bar'\n */\n var lowerCase = createCompounder(function(result, word, index) {\n return result + (index ? ' ' : '') + word.toLowerCase();\n });\n\n /**\n * Converts the first character of `string` to lower case.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category String\n * @param {string} [string=''] The string to convert.\n * @returns {string} Returns the converted string.\n * @example\n *\n * _.lowerFirst('Fred');\n * // => 'fred'\n *\n * _.lowerFirst('FRED');\n * // => 'fRED'\n */\n var lowerFirst = createCaseFirst('toLowerCase');\n\n /**\n * Pads `string` on the left and right sides if it's shorter than `length`.\n * Padding characters are truncated if they can't be evenly divided by `length`.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category String\n * @param {string} [string=''] The string to pad.\n * @param {number} [length=0] The padding length.\n * @param {string} [chars=' '] The string used as padding.\n * @returns {string} Returns the padded string.\n * @example\n *\n * _.pad('abc', 8);\n * // => ' abc '\n *\n * _.pad('abc', 8, '_-');\n * // => '_-abc_-_'\n *\n * _.pad('abc', 3);\n * // => 'abc'\n */\n function pad(string, length, chars) {\n string = toString(string);\n length = toInteger(length);\n\n var strLength = length ? stringSize(string) : 0;\n if (!length || strLength >= length) {\n return string;\n }\n var mid = (length - strLength) / 2;\n return (\n createPadding(nativeFloor(mid), chars) +\n string +\n createPadding(nativeCeil(mid), chars)\n );\n }\n\n /**\n * Pads `string` on the right side if it's shorter than `length`. Padding\n * characters are truncated if they exceed `length`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category String\n * @param {string} [string=''] The string to pad.\n * @param {number} [length=0] The padding length.\n * @param {string} [chars=' '] The string used as padding.\n * @returns {string} Returns the padded string.\n * @example\n *\n * _.padEnd('abc', 6);\n * // => 'abc '\n *\n * _.padEnd('abc', 6, '_-');\n * // => 'abc_-_'\n *\n * _.padEnd('abc', 3);\n * // => 'abc'\n */\n function padEnd(string, length, chars) {\n string = toString(string);\n length = toInteger(length);\n\n var strLength = length ? stringSize(string) : 0;\n return (length && strLength < length)\n ? (string + createPadding(length - strLength, chars))\n : string;\n }\n\n /**\n * Pads `string` on the left side if it's shorter than `length`. Padding\n * characters are truncated if they exceed `length`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category String\n * @param {string} [string=''] The string to pad.\n * @param {number} [length=0] The padding length.\n * @param {string} [chars=' '] The string used as padding.\n * @returns {string} Returns the padded string.\n * @example\n *\n * _.padStart('abc', 6);\n * // => ' abc'\n *\n * _.padStart('abc', 6, '_-');\n * // => '_-_abc'\n *\n * _.padStart('abc', 3);\n * // => 'abc'\n */\n function padStart(string, length, chars) {\n string = toString(string);\n length = toInteger(length);\n\n var strLength = length ? stringSize(string) : 0;\n return (length && strLength < length)\n ? (createPadding(length - strLength, chars) + string)\n : string;\n }\n\n /**\n * Converts `string` to an integer of the specified radix. If `radix` is\n * `undefined` or `0`, a `radix` of `10` is used unless `value` is a\n * hexadecimal, in which case a `radix` of `16` is used.\n *\n * **Note:** This method aligns with the\n * [ES5 implementation](https://es5.github.io/#x15.1.2.2) of `parseInt`.\n *\n * @static\n * @memberOf _\n * @since 1.1.0\n * @category String\n * @param {string} string The string to convert.\n * @param {number} [radix=10] The radix to interpret `value` by.\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n * @returns {number} Returns the converted integer.\n * @example\n *\n * _.parseInt('08');\n * // => 8\n *\n * _.map(['6', '08', '10'], _.parseInt);\n * // => [6, 8, 10]\n */\n function parseInt(string, radix, guard) {\n if (guard || radix == null) {\n radix = 0;\n } else if (radix) {\n radix = +radix;\n }\n return nativeParseInt(toString(string).replace(reTrimStart, ''), radix || 0);\n }\n\n /**\n * Repeats the given string `n` times.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category String\n * @param {string} [string=''] The string to repeat.\n * @param {number} [n=1] The number of times to repeat the string.\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n * @returns {string} Returns the repeated string.\n * @example\n *\n * _.repeat('*', 3);\n * // => '***'\n *\n * _.repeat('abc', 2);\n * // => 'abcabc'\n *\n * _.repeat('abc', 0);\n * // => ''\n */\n function repeat(string, n, guard) {\n if ((guard ? isIterateeCall(string, n, guard) : n === undefined)) {\n n = 1;\n } else {\n n = toInteger(n);\n }\n return baseRepeat(toString(string), n);\n }\n\n /**\n * Replaces matches for `pattern` in `string` with `replacement`.\n *\n * **Note:** This method is based on\n * [`String#replace`](https://mdn.io/String/replace).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category String\n * @param {string} [string=''] The string to modify.\n * @param {RegExp|string} pattern The pattern to replace.\n * @param {Function|string} replacement The match replacement.\n * @returns {string} Returns the modified string.\n * @example\n *\n * _.replace('Hi Fred', 'Fred', 'Barney');\n * // => 'Hi Barney'\n */\n function replace() {\n var args = arguments,\n string = toString(args[0]);\n\n return args.length < 3 ? string : string.replace(args[1], args[2]);\n }\n\n /**\n * Converts `string` to\n * [snake case](https://en.wikipedia.org/wiki/Snake_case).\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category String\n * @param {string} [string=''] The string to convert.\n * @returns {string} Returns the snake cased string.\n * @example\n *\n * _.snakeCase('Foo Bar');\n * // => 'foo_bar'\n *\n * _.snakeCase('fooBar');\n * // => 'foo_bar'\n *\n * _.snakeCase('--FOO-BAR--');\n * // => 'foo_bar'\n */\n var snakeCase = createCompounder(function(result, word, index) {\n return result + (index ? '_' : '') + word.toLowerCase();\n });\n\n /**\n * Splits `string` by `separator`.\n *\n * **Note:** This method is based on\n * [`String#split`](https://mdn.io/String/split).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category String\n * @param {string} [string=''] The string to split.\n * @param {RegExp|string} separator The separator pattern to split by.\n * @param {number} [limit] The length to truncate results to.\n * @returns {Array} Returns the string segments.\n * @example\n *\n * _.split('a-b-c', '-', 2);\n * // => ['a', 'b']\n */\n function split(string, separator, limit) {\n if (limit && typeof limit != 'number' && isIterateeCall(string, separator, limit)) {\n separator = limit = undefined;\n }\n limit = limit === undefined ? MAX_ARRAY_LENGTH : limit >>> 0;\n if (!limit) {\n return [];\n }\n string = toString(string);\n if (string && (\n typeof separator == 'string' ||\n (separator != null && !isRegExp(separator))\n )) {\n separator = baseToString(separator);\n if (!separator && hasUnicode(string)) {\n return castSlice(stringToArray(string), 0, limit);\n }\n }\n return string.split(separator, limit);\n }\n\n /**\n * Converts `string` to\n * [start case](https://en.wikipedia.org/wiki/Letter_case#Stylistic_or_specialised_usage).\n *\n * @static\n * @memberOf _\n * @since 3.1.0\n * @category String\n * @param {string} [string=''] The string to convert.\n * @returns {string} Returns the start cased string.\n * @example\n *\n * _.startCase('--foo-bar--');\n * // => 'Foo Bar'\n *\n * _.startCase('fooBar');\n * // => 'Foo Bar'\n *\n * _.startCase('__FOO_BAR__');\n * // => 'FOO BAR'\n */\n var startCase = createCompounder(function(result, word, index) {\n return result + (index ? ' ' : '') + upperFirst(word);\n });\n\n /**\n * Checks if `string` starts with the given target string.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category String\n * @param {string} [string=''] The string to inspect.\n * @param {string} [target] The string to search for.\n * @param {number} [position=0] The position to search from.\n * @returns {boolean} Returns `true` if `string` starts with `target`,\n * else `false`.\n * @example\n *\n * _.startsWith('abc', 'a');\n * // => true\n *\n * _.startsWith('abc', 'b');\n * // => false\n *\n * _.startsWith('abc', 'b', 1);\n * // => true\n */\n function startsWith(string, target, position) {\n string = toString(string);\n position = position == null\n ? 0\n : baseClamp(toInteger(position), 0, string.length);\n\n target = baseToString(target);\n return string.slice(position, position + target.length) == target;\n }\n\n /**\n * Creates a compiled template function that can interpolate data properties\n * in \"interpolate\" delimiters, HTML-escape interpolated data properties in\n * \"escape\" delimiters, and execute JavaScript in \"evaluate\" delimiters. Data\n * properties may be accessed as free variables in the template. If a setting\n * object is given, it takes precedence over `_.templateSettings` values.\n *\n * **Note:** In the development build `_.template` utilizes\n * [sourceURLs](http://www.html5rocks.com/en/tutorials/developertools/sourcemaps/#toc-sourceurl)\n * for easier debugging.\n *\n * For more information on precompiling templates see\n * [lodash's custom builds documentation](https://lodash.com/custom-builds).\n *\n * For more information on Chrome extension sandboxes see\n * [Chrome's extensions documentation](https://developer.chrome.com/extensions/sandboxingEval).\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category String\n * @param {string} [string=''] The template string.\n * @param {Object} [options={}] The options object.\n * @param {RegExp} [options.escape=_.templateSettings.escape]\n * The HTML \"escape\" delimiter.\n * @param {RegExp} [options.evaluate=_.templateSettings.evaluate]\n * The \"evaluate\" delimiter.\n * @param {Object} [options.imports=_.templateSettings.imports]\n * An object to import into the template as free variables.\n * @param {RegExp} [options.interpolate=_.templateSettings.interpolate]\n * The \"interpolate\" delimiter.\n * @param {string} [options.sourceURL='lodash.templateSources[n]']\n * The sourceURL of the compiled template.\n * @param {string} [options.variable='obj']\n * The data object variable name.\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n * @returns {Function} Returns the compiled template function.\n * @example\n *\n * // Use the \"interpolate\" delimiter to create a compiled template.\n * var compiled = _.template('hello <%= user %>!');\n * compiled({ 'user': 'fred' });\n * // => 'hello fred!'\n *\n * // Use the HTML \"escape\" delimiter to escape data property values.\n * var compiled = _.template('<%- value %>');\n * compiled({ 'value': '