{"version":3,"sources":["webpack:///./node_modules/aws-sdk/lib/dynamodb/set.js","webpack:///./node_modules/aws-sdk/lib/protocol/json.js","webpack:///./node_modules/aws-sdk/lib/util.js","webpack:///./node_modules/aws-sdk/lib/signers/request_signer.js","webpack:///./node_modules/aws-sdk/clients/inspector.js","webpack:///./node_modules/aws-sdk/lib/xml/browser_parser.js","webpack:///./node_modules/jmespath/jmespath.js","webpack:///./node_modules/aws-sdk/lib/model/resource_waiter.js","webpack:///./node_modules/aws-sdk/clients/directconnect.js","webpack:///./node_modules/aws-sdk/clients/translate.js","webpack:///./node_modules/aws-sdk/clients/iam.js","webpack:///./node_modules/aws-sdk/lib/signers/v2.js","webpack:///./node_modules/aws-sdk/clients/dynamodbstreams.js","webpack:///./node_modules/aws-sdk/clients/apigateway.js","webpack:///./node_modules/aws-sdk/vendor/endpoint-cache/index.js","webpack:///./node_modules/aws-sdk/lib/signers/v4_credentials.js","webpack:///./node_modules/aws-sdk/lib/services/iotdata.js","webpack:///./node_modules/aws-sdk/clients/iotanalytics.js","webpack:///./node_modules/aws-sdk/lib/signers/presign.js","webpack:///./node_modules/aws-sdk/clients/elb.js","webpack:///./node_modules/aws-sdk/lib/services/machinelearning.js","webpack:///./node_modules/aws-sdk/lib/dynamodb/converter.js","webpack:///./node_modules/aws-sdk/clients/browser_default.js","webpack:///./node_modules/aws-sdk/clients/codepipeline.js","webpack:///./node_modules/aws-sdk/clients/kinesis.js","webpack:///./node_modules/aws-sdk/lib/json/builder.js","webpack:///./node_modules/aws-sdk/clients/emr.js","webpack:///./node_modules/aws-sdk/lib/protocol/rest.js","webpack:///./node_modules/aws-sdk/lib/signers/v4.js","webpack:///./node_modules/util/node_modules/inherits/inherits_browser.js","webpack:///./node_modules/aws-sdk/clients/comprehend.js","webpack:///./node_modules/aws-sdk/clients/forecastservice.js","webpack:///./node_modules/aws-sdk/lib/dynamodb/numberValue.js","webpack:///./node_modules/aws-sdk/lib/services/ec2.js","webpack:///./node_modules/aws-sdk/lib/http/xhr.js","webpack:///./node_modules/aws-sdk/clients/codebuild.js","webpack:///./node_modules/util/util.js","webpack:///./node_modules/aws-sdk/clients/lexruntime.js","webpack:///./node_modules/aws-sdk/lib/services/lambda.js","webpack:///./node_modules/aws-sdk/clients/firehose.js","webpack:///./node_modules/aws-sdk/node_modules/uuid/v1.js","webpack:///./node_modules/aws-sdk/clients/kinesisvideomedia.js","webpack:///./node_modules/aws-sdk/lib/event-stream/buffered-create-event-stream.js","webpack:///./node_modules/aws-sdk/lib/signers/v3.js","webpack:///./node_modules/aws-sdk/clients/resourcegroups.js","webpack:///./node_modules/aws-sdk/clients/cloudhsm.js","webpack:///./node_modules/aws-sdk/lib/services/apigateway.js","webpack:///./node_modules/aws-sdk/lib/http.js","webpack:///./node_modules/aws-sdk/clients/configservice.js","webpack:///./node_modules/aws-sdk/clients/cloudwatchlogs.js","webpack:///./node_modules/aws-sdk/lib/core.js","webpack:///./node_modules/aws-sdk/lib/xml/escape-element.js","webpack:///./node_modules/aws-sdk/lib/browser.js","webpack:///./node_modules/aws-sdk/lib/signers/s3.js","webpack:///./node_modules/aws-sdk/lib/credentials/temporary_credentials.js","webpack:///./node_modules/aws-sdk/clients/mediastoredata.js","webpack:///./node_modules/aws-sdk/clients/xray.js","webpack:///./node_modules/aws-sdk/lib/model/paginator.js","webpack:///./node_modules/aws-sdk/lib/model/collection.js","webpack:///./node_modules/aws-sdk/lib/param_validator.js","webpack:///./node_modules/aws-sdk/clients/personalize.js","webpack:///./node_modules/aws-sdk/lib/services/s3.js","webpack:///./node_modules/aws-sdk/clients/gamelift.js","webpack:///./node_modules/aws-sdk/lib/signers/v3https.js","webpack:///./node_modules/aws-sdk/lib/discover_endpoint.js","webpack:///./node_modules/aws-sdk/lib/services/route53.js","webpack:///./node_modules/aws-sdk/lib/dynamodb/translator.js","webpack:///./node_modules/aws-sdk/lib/credentials/web_identity_credentials.js","webpack:///./node_modules/aws-sdk/node_modules/uuid/lib/bytesToUuid.js","webpack:///./node_modules/aws-sdk/clients/devicefarm.js","webpack:///./node_modules/aws-sdk/lib/services/cloudfront.js","webpack:///./node_modules/aws-sdk/clients/waf.js","webpack:///./node_modules/aws-sdk/clients/connect.js","webpack:///./node_modules/aws-sdk/clients/efs.js","webpack:///./node_modules/aws-sdk/clients/cloudfront.js","webpack:///./node_modules/aws-sdk/lib/api_loader.js","webpack:///./node_modules/aws-sdk/lib/polly/presigner.js","webpack:///./node_modules/aws-sdk/clients/lexmodelbuildingservice.js","webpack:///./node_modules/aws-sdk/lib/config_regional_endpoint.js","webpack:///./node_modules/aws-sdk/lib/xml/xml-node.js","webpack:///./node_modules/aws-sdk/lib/response.js","webpack:///./node_modules/aws-sdk/node_modules/uuid/lib/rng-browser.js","webpack:///./node_modules/aws-sdk/clients/kinesisvideosignalingchannels.js","webpack:///./node_modules/aws-sdk/clients/route53domains.js","webpack:///./node_modules/aws-sdk/clients/mobileanalytics.js","webpack:///./node_modules/aws-sdk/clients/iotdata.js","webpack:///./node_modules/aws-sdk/lib/config.js","webpack:///./node_modules/aws-sdk/clients/ecr.js","webpack:///./node_modules/aws-sdk/lib/xml/xml-text.js","webpack:///./node_modules/aws-sdk/clients/rekognition.js","webpack:///./node_modules/aws-sdk/lib/event-stream/parse-event.js","webpack:///./node_modules/aws-sdk/clients/costexplorer.js","webpack:///./node_modules/aws-sdk/clients/route53.js","webpack:///./node_modules/aws-sdk/lib/protocol/rest_xml.js","webpack:///./node_modules/aws-sdk/lib/sequential_executor.js","webpack:///./node_modules/aws-sdk/lib/query/query_param_serializer.js","webpack:///./node_modules/aws-sdk/clients/opsworks.js","webpack:///./node_modules/aws-sdk/vendor/endpoint-cache/utils/LRU.js","webpack:///./node_modules/aws-sdk/lib/json/parser.js","webpack:///./node_modules/aws-sdk/clients/comprehendmedical.js","webpack:///./node_modules/aws-sdk/lib/request.js","webpack:///./node_modules/aws-sdk/clients/ecs.js","webpack:///./node_modules/aws-sdk/lib/credentials/cognito_identity_credentials.js","webpack:///./node_modules/aws-sdk/lib/service.js","webpack:///./node_modules/aws-sdk/clients/cognitoidentityserviceprovider.js","webpack:///./node_modules/aws-sdk/clients/rds.js","webpack:///./node_modules/aws-sdk/clients/cognitoidentity.js","webpack:///./node_modules/aws-sdk/lib/protocol/helpers.js","webpack:///./src/classes/s3helper.js","webpack:///./node_modules/aws-sdk/clients/redshift.js","webpack:///./node_modules/aws-sdk/clients/lambda.js","webpack:///./node_modules/aws-sdk/clients/secretsmanager.js","webpack:///./node_modules/aws-sdk/clients/ssm.js","webpack:///./node_modules/aws-sdk/clients/polly.js","webpack:///./node_modules/aws-sdk/lib/services/sqs.js","webpack:///./node_modules/aws-sdk/lib/browser_loader.js","webpack:///./node_modules/aws-sdk/lib/event-stream/split-message.js","webpack:///./node_modules/aws-sdk/lib/xml/escape-attribute.js","webpack:///./node_modules/aws-sdk/clients/servicecatalog.js","webpack:///./node_modules/aws-sdk/node_modules/uuid/index.js","webpack:///./node_modules/aws-sdk/clients/personalizeevents.js","webpack:///./node_modules/aws-sdk/clients/dynamodb.js","webpack:///./node_modules/aws-sdk/lib/model/shape.js","webpack:///./node_modules/aws-sdk/lib/event-stream/int64.js","webpack:///./node_modules/aws-sdk/lib/browserHashUtils.js","webpack:///./node_modules/aws-sdk/lib/services/polly.js","webpack:///./node_modules/aws-sdk/clients/machinelearning.js","webpack:///./node_modules/aws-sdk/clients/codecommit.js","webpack:///./node_modules/aws-sdk/clients/cloudtrail.js","webpack:///./node_modules/aws-sdk/lib/resource_waiter.js","webpack:///./node_modules/aws-sdk/clients/cognitosync.js","webpack:///./node_modules/aws-sdk/clients/autoscaling.js","webpack:///./node_modules/aws-sdk/node_modules/uuid/v4.js","webpack:///./node_modules/aws-sdk/lib/s3/managed_upload.js","webpack:///./node_modules/aws-sdk/lib/services/dynamodb.js","webpack:///./node_modules/aws-sdk/clients/storagegateway.js","webpack:///./node_modules/aws-sdk/lib/credentials/chainable_temporary_credentials.js","webpack:///./node_modules/aws-sdk/clients/personalizeruntime.js","webpack:///./node_modules/aws-sdk/clients/s3.js","webpack:///./node_modules/aws-sdk/clients/elbv2.js","webpack:///./node_modules/aws-sdk/lib/event_listeners.js","webpack:///./node_modules/aws-sdk/clients/cloudformation.js","webpack:///./node_modules/aws-sdk/lib/credentials/credential_provider_chain.js","webpack:///./node_modules/aws-sdk/clients/acm.js","webpack:///./node_modules/aws-sdk/lib/credentials/saml_credentials.js","webpack:///./node_modules/aws-sdk/clients/kinesisvideoarchivedmedia.js","webpack:///./node_modules/aws-sdk/clients/sns.js","webpack:///./node_modules/aws-sdk/clients/mturk.js","webpack:///./node_modules/aws-sdk/lib/rds/signer.js","webpack:///./node_modules/aws-sdk/lib/xml/builder.js","webpack:///./node_modules/aws-sdk/clients/cloudwatch.js","webpack:///./node_modules/aws-sdk/lib/browserSha1.js","webpack:///./node_modules/aws-sdk/clients/forecastqueryservice.js","webpack:///./node_modules/aws-sdk/lib/browserMd5.js","webpack:///./node_modules/aws-sdk/lib/services/sts.js","webpack:///./node_modules/aws-sdk/lib/browserSha256.js","webpack:///./node_modules/aws-sdk/lib/services/s3util.js","webpack:///./node_modules/aws-sdk/lib/protocol/query.js","webpack:///./node_modules/aws-sdk/clients/pricing.js","webpack:///./node_modules/aws-sdk/clients/workdocs.js","webpack:///./node_modules/aws-sdk/lib/cloudfront/signer.js","webpack:///./node_modules/aws-sdk/clients/cloudwatchevents.js","webpack:///./node_modules/aws-sdk/clients/kms.js","webpack:///./node_modules/util/support/isBufferBrowser.js","webpack:///./node_modules/aws-sdk/clients/kinesisvideo.js","webpack:///./node_modules/aws-sdk/lib/model/operation.js","webpack:///./node_modules/aws-sdk/lib/realclock/browserClock.js","webpack:///./node_modules/aws-sdk/clients/iot.js","webpack:///./node_modules/aws-sdk/clients/applicationautoscaling.js","webpack:///./node_modules/aws-sdk/lib/region_config.js","webpack:///./node_modules/aws-sdk/lib/dynamodb/document_client.js","webpack:///./node_modules/aws-sdk/lib/dynamodb/types.js","webpack:///./node_modules/aws-sdk/clients/ec2.js","webpack:///./node_modules/aws-sdk/lib/event-stream/parse-message.js","webpack:///./node_modules/aws-sdk/clients/elastictranscoder.js","webpack:///./node_modules/aws-sdk/clients/cur.js","webpack:///./node_modules/aws-sdk/lib/browserCryptoLib.js","webpack:///./node_modules/aws-sdk/clients/marketplacecommerceanalytics.js","webpack:///./node_modules/aws-sdk/lib/services/rds.js","webpack:///./node_modules/aws-sdk/lib/model/api.js","webpack:///./node_modules/aws-sdk/lib/event-stream/event-message-chunker.js","webpack:///./node_modules/aws-sdk/clients/codedeploy.js","webpack:///./node_modules/aws-sdk/clients/sts.js","webpack:///./node_modules/aws-sdk/lib/credentials.js","webpack:///./node_modules/aws-sdk/clients/sqs.js","webpack:///./node_modules/aws-sdk/lib/state_machine.js","webpack:///./node_modules/aws-sdk/lib/protocol/rest_json.js","webpack:///./node_modules/aws-sdk/clients/elasticache.js","webpack:///./node_modules/aws-sdk/clients/elasticbeanstalk.js","webpack:///./node_modules/aws-sdk/lib/browserHmac.js","webpack:///./node_modules/aws-sdk/clients/ses.js"],"names":["util","typeOf","memberTypeToSetType","DynamoDBSet","inherit","constructor","list","options","this","wrapperName","initialize","validate","self","values","concat","detectType","type","error","Error","code","message","length","i","toJSON","module","exports","JsonBuilder","JsonParser","populateHostPrefix","buildRequest","req","httpRequest","api","service","target","targetPrefix","operations","operation","name","version","jsonVersion","input","builder","body","build","params","headers","extractError","resp","httpResponse","split","e","JSON","parse","toString","__type","Code","pop","Message","statusCode","statusMessage","extractData","request","config","convertResponseTypes","data","shape","output","parser","AWS","environment","engine","isBrowser","navigator","userAgent","process","platform","AWS_EXECUTION_ENV","agent","VERSION","uriEscape","string","encodeURIComponent","replace","escape","ch","charCodeAt","toUpperCase","uriEscapePath","parts","arrayEach","part","push","join","urlParse","url","urlFormat","format","queryStringParse","qs","querystring","queryParamsToString","items","sortedKeys","Object","keys","sort","value","ename","result","Array","isArray","vals","item","undefined","readFileSync","path","base64","encode","buf","buffer","toBuffer","decode","encoding","Buffer","from","Uint8Array","alloc","size","fill","toStream","isBuffer","readable","stream","pos","_read","end","slice","buffers","offset","copy","byteLength","lstatSync","object","upperFirst","substr","lowerFirst","toLowerCase","ini","currentSection","map","line","section","match","fn","noop","callback","err","makeAsync","expectedArgs","args","prototype","call","arguments","apply","date","getDate","systemClockOffset","Date","getTime","iso8601","toISOString","rfc822","toUTCString","unixTimestamp","formatter","parseTimestamp","crypto","crc32Table","crc32","tbl","crc","readUInt8","hmac","key","digest","lib","createHmac","update","md5","hash","sha256","algorithm","createHash","sliceFn","arraySliceFn","ArrayBuffer","on","chunk","FileReader","out","index","reader","onerror","onload","_continueReading","back","readAsArrayBuffer","toHex","abort","each","iterFunction","hasOwnProperty","ret","array","idx","parseInt","obj1","obj2","merge","dupe","isEmpty","obj","prop","webkitSlice","mozSlice","isType","typeName","str","originalError","stack","defineProperty","writable","enumerable","String","time","klass","features","newObject","ctor","__super__","mixin","hideProperties","props","configurable","property","isValue","opts","get","memoizedProperty","cachedValue","hoistPayloadMember","operationName","payload","hasEventOutput","payloadMember","members","responsePayload","computeSha256","done","isNode","Stream","fs","settings","start","createReadStream","sha","isClockSkewed","serverTime","Math","abs","applyClockOffset","extractRequestId","requestId","ResponseMetadata","RequestId","addPromises","constructors","PromiseDependency","deletePromises","getPromisesDependency","Promise","ind","deletePromisesFromClass","addPromisesToClass","promisifyMethod","methodName","resolve","reject","isDualstackAvailable","metadata","serviceIdentifier","dualstackAvailable","calculateRetryDelay","retryCount","retryDelayOptions","customBackoff","base","delay","random","pow","handleRequestWithRetries","cb","http","HttpClient","getInstance","httpOptions","errCallback","maxRetries","retryable","setTimeout","sendRequest","retryAfter","handleRequest","defer","uuid","v4","convertPayloadToString","rules","nextTick","setImmediate","getRequestPayloadShape","getProfilesFromSharedConfig","iniLoader","filename","profiles","profilesFromConfig","configOptInEnv","loadFrom","isConfig","sharedConfigFileEnv","profilesFromCreds","sharedCredentialsFileEnv","profileNames","objectAssign","source","ARN","indexOf","arn","matched","partition","region","accountId","resource","arnObject","defaultProfile","imdsDisabledEnv","Signers","RequestSigner","setServiceClientId","id","serviceClientId","getServiceClientId","getVersion","V2","V3","V4","S3","V3Https","Service","apiLoader","services","Inspector","defineService","model","paginators","pagination","Shape","DomXmlParser","getElementByTagName","xml","tag","elements","getElementsByTagName","iLen","parentNode","parseXml","parseStructure","parseMap","parseList","parseUnknown","parseScalar","memberName","memberShape","isXmlAttribute","attributes","textContent","xmlChild","flattened","xmlNoDefaultLists","defaultValue","xmlKey","xmlValue","tagName","child","firstElementChild","nodeName","nextElementSibling","member","getAttribute","create","text","toType","childNodes","window","DOMParser","parseFromString","syntaxError","documentElement","isError","errorElement","ActiveXObject","async","loadXML","isObject","strictDeepEqual","first","second","firstType","keysSeen","key2","isFalse","objValues","trimLeft","TYPE_NUMBER","TYPE_ANY","TYPE_STRING","TYPE_ARRAY","TYPE_OBJECT","TYPE_BOOLEAN","TYPE_EXPREF","TYPE_NULL","TYPE_ARRAY_NUMBER","TYPE_ARRAY_STRING","TOK_EOF","TOK_UNQUOTEDIDENTIFIER","TOK_QUOTEDIDENTIFIER","TOK_RBRACKET","TOK_RPAREN","TOK_COMMA","TOK_COLON","TOK_RBRACE","TOK_NUMBER","TOK_CURRENT","TOK_EXPREF","TOK_PIPE","TOK_OR","TOK_AND","TOK_EQ","TOK_GT","TOK_LT","TOK_GTE","TOK_LTE","TOK_NE","TOK_FLATTEN","TOK_STAR","TOK_FILTER","TOK_DOT","TOK_NOT","TOK_LBRACE","TOK_LBRACKET","TOK_LPAREN","TOK_LITERAL","basicTokens","operatorStartToken","skipChars","isAlpha","isNum","isAlphaNum","Lexer","tokenize","identifier","token","tokens","_current","_consumeUnquotedIdentifier","_consumeNumber","_consumeLBracket","_consumeQuotedIdentifier","_consumeRawStringLiteral","literal","_consumeLiteral","_consumeOperator","maxLength","current","startingChar","literalString","_looksLikeJSON","startingChars","jsonLiterals","numberLooking","ex","bindingPower","Parser","TreeInterpreter","runtime","Runtime","interpreter","_interpreter","functionTable","_func","_functionAbs","_signature","types","avg","_functionAvg","ceil","_functionCeil","contains","_functionContains","_functionEndsWith","floor","_functionFloor","_functionLength","_functionMap","max","_functionMax","_functionMerge","variadic","_functionMaxBy","sum","_functionSum","_functionStartsWith","min","_functionMin","_functionMinBy","_functionType","_functionKeys","_functionValues","_functionSort","_functionSortBy","_functionJoin","reverse","_functionReverse","_functionToArray","_functionToString","_functionToNumber","_functionNotNull","compile","ast","lexer","search","expression","node","_loadTokens","_lookahead","t","_lookaheadToken","rbp","leftToken","_advance","left","nud","currentToken","led","number","right","Not","children","_parseProjectionRHS","Star","_parseMultiselectHash","Flatten","_parseIndexExpression","_projectIfSlice","_parseMultiselectList","Expref","_match","_errorToken","tokenName","Dot","_parseDotRHS","Pipe","Or","And","condition","Filter","leftNode","rightNode","_parseComparator","tokenType","_parseSliceExpression","indexExpr","comparator","lookahead","exprTokens","expressions","keyToken","keyName","pairs","identifierTypes","visit","field","collected","sliceParams","computed","computeSliceParams","stop","step","filtered","finalResults","j","original","merged","resolvedArgs","callFunction","refNode","jmespathType","arrayLength","stepValueNegative","capSliceRange","actualValue","functionEntry","_validateArgs","signature","pluralized","currentSpec","actualType","typeMatched","_getTypeName","_typeMatches","actual","expected","argValue","subtype","lastIndexOf","searchStr","suffix","originalStr","reversedStr","reversedArray","inputArray","mapped","exprefNode","maxElement","localeCompare","minElement","listToSum","joinChar","listJoin","stringify","convertedValue","isNaN","sortedArray","requiredType","that","decorated","a","b","exprA","exprB","maxRecord","resolvedArray","keyFunction","createKeyFunction","maxNumber","Infinity","minRecord","minNumber","allowedTypes","keyFunc","x","msg","ResourceWaiter","waiter","forEach","DirectConnect","Translate","IAM","waiters","addAuthorization","credentials","r","Timestamp","SignatureVersion","SignatureMethod","AWSAccessKeyId","accessKeyId","sessionToken","SecurityToken","Signature","secretAccessKey","stringToSign","method","endpoint","host","pathname","DynamoDBStreams","APIGateway","LRU_1","CACHE_SIZE","EndpointCache","maxSize","cache","LRUCache","put","keyString","getKeyString","endpointRecord","populateValue","now","records","record","Expire","remove","identifiers","identifierNames","identifierName","endpoints","Address","CachePeriodInMinutes","empty","cachedSecret","cacheQueue","maxCacheEntries","v4Identifier","createScope","serviceName","getSigningKey","shouldCache","credsIdentifier","cacheKey","kDate","kRegion","kService","signingKey","shift","emptyCache","blobPayloadOutputOps","IotData","validateService","setupRequestListeners","addListener","validateResponseBody","bodyCheck","trim","charAt","IoTAnalytics","expiresHeader","signedUrlBuilder","expires","signerClass","getSignerClass","getSkewCorrectedDate","signedUrlSigner","parsedUrl","queryParams","auth","rest","Presign","sign","expireTime","removeListener","EventListeners","Core","SET_CONTENT_LENGTH","COMPUTE_SHA256","emit","response","ELB","MachineLearning","buildEndpoint","PredictEndpoint","Endpoint","NumberValue","formatList","L","DynamoDB","Converter","convertNumber","wrapNumbers","Number","formatMap","M","formatted","formatSet","convertEmptyValues","filterEmptySetValues","set","nonEmptyValues","potentiallyEmptyTypes","Binary","convertInput","S","N","B","BOOL","NULL","marshall","convertOutput","unmarshall","ACM","ApplicationAutoScaling","AutoScaling","CloudFormation","CloudFront","CloudHSM","CloudTrail","CloudWatch","CloudWatchEvents","CloudWatchLogs","CodeBuild","CodeCommit","CodeDeploy","CodePipeline","CognitoIdentity","CognitoIdentityServiceProvider","CognitoSync","ConfigService","CUR","DeviceFarm","EC2","ECR","ECS","EFS","ElastiCache","ElasticBeanstalk","ELBv2","EMR","ElasticTranscoder","Firehose","GameLift","Iot","Kinesis","KMS","Lambda","LexRuntime","MarketplaceCommerceAnalytics","MTurk","MobileAnalytics","OpsWorks","Polly","RDS","Redshift","Rekognition","Route53","Route53Domains","ServiceCatalog","SES","SNS","SQS","SSM","StorageGateway","STS","XRay","WAF","WorkDocs","LexModelBuildingService","Pricing","CostExplorer","MediaStoreData","Comprehend","KinesisVideoArchivedMedia","KinesisVideoMedia","KinesisVideo","ResourceGroups","Connect","SecretsManager","ComprehendMedical","Personalize","PersonalizeEvents","PersonalizeRuntime","ForecastService","ForecastQueryService","KinesisVideoSignalingChannels","translate","translateStructure","translateMap","translateList","translateScalar","structure","struct","location","locationName","isLocationName","toWireFormat","populateMethod","httpMethod","generateURI","endpointPath","operationPath","uri","queryString","queryStringSet","paramValue","regex","RegExp","_","plus","val","populateURI","httpPath","populateHeaders","memberValue","isJsonValue","k","v","header","pattern","v4Credentials","signatureCache","signatureVersion","datetime","isPresigned","updateForPresigned","addHeaders","authorization","credString","credentialString","signedHeaders","isSignableHeader","lowerKey","sep","hexEncodedHash","canonicalString","canonicalHeaders","hexEncodedBodyHash","canonicalHeaderValues","unsignableHeaders","superCtor","super_","TempCtor","DynamoDBNumberValue","toNumber","Query","EXTRACT_ERROR","onAsync","buildCopySnapshotPresignedUrl","PresignedUrl","_subRequest","DestinationRegion","SourceRegion","svc","newReq","presign","XML","Errors","RequestID","EventEmitter","XHRClient","emitter","href","protocol","hostname","port","xhr","XMLHttpRequest","headersEmitted","addEventListener","status","readyState","HEADERS_RECEIVED","parseHeaders","getAllResponseHeaders","statusText","DONE","finishRequest","upload","evt","open","xhrAsync","setRequestHeader","timeout","xhrWithCredentials","withCredentials","responseType","send","rawHeaders","substring","ab","view","responseText","streamsApiVersion","getOwnPropertyDescriptors","descriptors","getOwnPropertyDescriptor","formatRegExp","f","isString","objects","inspect","len","isNull","deprecate","noDeprecation","warned","deprecated","throwDeprecation","traceDeprecation","console","trace","debugEnviron","debugs","ctx","seen","stylize","stylizeNoColor","depth","colors","isBoolean","showHidden","_extend","isUndefined","customInspect","stylizeWithColor","formatValue","styleType","style","styles","arrayToHash","recurseTimes","isFunction","primitive","formatPrimitive","visibleKeys","getOwnPropertyNames","formatError","isRegExp","isDate","braces","n","formatArray","formatProperty","reduceToSingleString","simple","isNumber","l","desc","reduce","prev","cur","numLinesEst","ar","arg","isNullOrUndefined","isSymbol","re","objectToString","d","isPrimitive","o","pad","debuglog","NODE_DEBUG","test","pid","months","timestamp","getHours","getMinutes","getSeconds","getMonth","log","inherits","origin","add","kCustomPromisifiedSymbol","Symbol","callbackifyOnRejected","reason","newReason","callbackify","TypeError","callbackified","maybeCb","then","rej","setPrototypeOf","getPrototypeOf","defineProperties","promisify","promiseResolve","promiseReject","promise","custom","_nodeId","_clockseq","rng","bytesToUuid","_lastMSecs","_lastNSecs","v1","clockseq","seedBytes","msecs","nsecs","dt","tl","tmh","eventMessageChunker","parseEvent","createEventStream","eventMessages","events","headersToSign","h","setAcceptHeader","Accept","exportType","useSSL","sslEnabled","HttpRequest","_userAgent","setUserAgent","getUserAgentHeaderName","prefix","appendToUserAgent","agentPartial","getUserAgent","query","updateEndpoint","endpointStr","newEndpoint","HttpResponse","streaming","createUnbufferedStream","singleton","_hidden","Protocol","Json","Rest","RestJson","RestXml","Builder","Model","Api","Operation","Paginator","SequentialExecutor","endpointCacheSize","escapeElement","subResources","responseHeaders","canonicalizedAmzHeaders","canonicalizedResource","amzHeaders","virtualHostedBucket","resources","param","subresource","decodeURIComponent","res","secret","TemporaryCredentials","Credentials","masterCredentials","loadMasterCredentials","expired","RoleArn","RoleSessionName","refresh","coalesceRefresh","load","createClients","assumeRole","getSessionToken","credentialsFrom","paginator","input_token","limit_key","more_results","output_token","result_key","memoize","factory","nameTr","Collection","iterable","ParamValidator","validation","context","errors","validateMember","fail","validateStructure","paramName","validateType","required","memberContext","validateList","validateMap","validateScalar","validateRange","mapCount","validateString","validatePayload","validateNumber","validTypes","validateEnum","validatePattern","validateUri","descriptor","acceptedTypes","foundInvalidType","acceptedType","vowel","castedValue","parseFloat","Blob","resolveRegionalEndpointsFlag","s3util","regionUtil","operationsWith200StatusCodeError","regionRedirectErrorCodes","getSignatureVersion","defaultApiVersion","userDefinedVersion","_originalConfig","regionDefinedVersion","getSigningName","_super","_parsedArn","messages","s3BucketEndpoint","shouldDisableBodySigning","s3DisableBodySigning","prependListener","validateScheme","validateBucketName","optInUsEast1RegionalEndpoint","VALIDATE_REGION","addContentType","computeContentMd5","computeSseCustomerKeyMd5","addExpect100Continue","extractErrorFrom200Response","prepareSignedUrl","disableBodySigning","isArnInParam","Bucket","validateS3AccessPointArn","validateArnResourceType","validateOutpostsAccessPointArn","validateOutpostsArn","validateArnRegion","validateArnAccount","validateArnService","populateUriFromAccessPointArn","validatePopulateUriFromArn","validateBucketEndpoint","correctBucketRegionFromCache","requestBucketRegion","reqRegionForNetworkingError","scheme","sensitive","SSECustomerKey","CopySourceSSECustomerKey","bucket","Key","slashIndex","isValidAccelerateOperation","invalidOperations","s3UsEast1RegionalEndpoint","env","sharedConfig","clientConfig","insertPoint","regionalEndpoint","pathStyleBucketName","useAccelerateEndpoint","useDualstack","removeVirtualHostedBucketFromPath","encodedS3Key","accessPointArn","isOutpostArn","outpostsSuffix","outpostId","dualStackSuffix","dnsSuffix","getEndpointSuffix","useArnRegion","s3UseArnRegion","accessPoint","encodedArn","Body","contentType","replaceFn","charsetName","charset","computableChecksumOperations","putBucketCors","putBucketLifecycle","putBucketLifecycleConfiguration","putBucketTagging","deleteObjects","putBucketReplication","putObjectLegalHold","putObjectRetention","putObjectLockConfiguration","willComputeChecksums","computeChecksums","ContentMD5","bucketName","s3ForcePathStyle","dnsCompatibleBucketName","retryableError","_requestRegionForBucket","bucketRegionCache","updateReqBucketRegion","s3Config","newConfig","Host","_asm","currentState","LocationConstraint","createBucketConfiguration","CreateBucketConfiguration","clearBucketRegionCache","extractRequestIds","cachedRegion","codes","304","403","400","404","Region","reqOperation","reqParams","MaxKeys","regionReq","getRegionReq","listObjects","buckets","requestRegion","extendedRequestId","cfId","getSignedUrl","Expires","makeRequest","createPresignedPost","boundParams","finalizePost","fields","preparePostFields","Fields","Conditions","getCredentials","conditions","expiresInSeconds","signingDate","shortDate","scope","credential","Policy","preparePostPolicy","valueOf","expiration","noPresignedContentLength","ContentLength","createBucket","copiedParams","globalEndpoint","uploader","ManagedUpload","getSignedUrlPromise","endpointDiscoveryEnabledEnvs","getCacheKey","serviceId","marshallCustomIdentifiersHelper","endpointDiscoveryId","marshallCustomIdentifiers","optionalDiscoverEndpoint","operationModel","inputShape","endpointCache","endpointRequest","endpointOperation","Identifiers","addApiVersionHeader","VALIDATE_PARAMETERS","RETRY_CHECK","Endpoints","requestQueue","requiredDiscoverEndpoint","cacheKeyStr","pendingRequests","requestContext","apiVersion","invalidateCachedEndpoints","hasCustomEndpoint","client","endpointDiscoveryEnabled","svcConfig","Boolean","isFalsy","resolveEndpointDiscoveryConfig","configFile","sharedFileConfig","AWS_PROFILE","endpoint_discovery_enabled","discoverEndpoint","isEndpointDiscoveryRequired","endpointDiscoveryRequired","isEnabled","hasRequiredEndpointDiscovery","addNamedListener","className","invalidateCachedEndpoint","sanitizeUrl","convert","Translator","attrValue","translateInput","mode","translateOutput","WebIdentityCredentials","_clientConfig","assumeRoleWithWebIdentity","stsConfig","byteToHex","bth","Presigner","bindServiceObject","_operations","modifyInputMembers","modifiedInput","convertPostToGet","getSynthesizeSpeechUrl","removeAllListeners","validateRegionalEndpointsFlagValue","configValue","errorOptions","originalConfig","resolved","envFlag","profile","fileFlag","escapeAttribute","XmlNode","addAttribute","addChildNode","removeAttribute","hasChildren","xmlText","attributeNames","attributeName","attribute","c","jmespath","Response","redirectCount","numRetries","maxRedirects","nextPage","paginationConfig","hasNextPage","nextPageTokens","inputTokens","inputToken","cacheNextPageTokens","moreResults","exprs","outputToken","expr","getRandomValues","bind","msCrypto","rnds8","rnds","PromisesDependency","Config","extractCredentials","finish","credError","getAsyncCredentials","getStaticCredentials","credentialProvider","creds","allowUnknownKeys","hasService","loadFromPath","clear","fileSystemCreds","FileSystemCredentials","chain","CredentialProviderChain","providers","unshift","logger","apiVersions","paramValidation","correctClockSkew","customUserAgent","dynamoDbCrc32","clientSideMonitoring","hostPrefixEnabled","stsRegionalEndpoints","setPromisesDependency","dep","Request","XmlText","parseMessage","parsedMessage","messageType","parseError","eventType","eventModel","eventPayloadMemberName","payloadShape","eventHeaderNames","eventHeaderMemberNames","errorCode","errorMessage","populateBody","rootElement","toXML","isEventStream","isStreaming","_events","listeners","eventName","listener","toHead","_isAsync","position","splice","eventArgs","doneCallback","count","callListeners","prevError","callNextListener","_haltHandlersOnError","addListeners","event","callbacks","addNamedAsyncListener","addNamedListeners","QueryParamSerializer","ucfirst","isQueryName","serializeStructure","serializeMember","serializeMap","valueName","serializeList","memberRules","serialize","LinkedListNode","nodeMap","sizeLimit","prependToList","headerNode","next","tailNode","removeFromTail","prevNode","detachFromList","key_1","newNode","shapeMembers","AcceptorStateMachine","domain","hardErrorStates","success","complete","isTerminalState","machine","fsm","setupStates","transition","Domain","domainEmitter","domainThrown","addState","isGlobalEndpoint","signingRegion","active","startTime","states","emitEvent","runTo","state","didCallback","_abortCallback","eachPage","wrappedCallback","eachItem","resultKey","continueIteration","isPageable","streams","PassThrough","sent","HTTP_DATA","HTTP_ERROR","expectedLen","shouldCheckContentLength","receivedLen","checkContentLengthAndEmit","httpStream","lengthAccumulator","_write","unpipe","pipe","eventParameters","origEmit","toGet","toUnauthenticated","_unAuthenticated","VALIDATE_CREDENTIALS","SIGN","buildAsGet","haltHandlersOnError","CognitoIdentityCredentials","localStorageKey","_identityId","loadCachedId","IdentityId","identityId","getId","clearIdOnNotAuthorized","getCredentialsFromSTS","getCredentialsForIdentity","clearCachedId","poolId","IdentityPoolId","loginId","LoginId","storage","cognito","loadCredentials","AccessKeyId","SecretKey","SessionToken","Expiration","cacheId","getOpenIdToken","WebIdentityToken","Token","webIdentityCredentials","webErr","sts","getStorage","Logins","actualProviders","cachedProviders","intersect","filter","cognitoConfig","setStorage","localStorage","regionConfig","clientCount","loadServiceClass","ServiceClass","_clientId","configureEndpoint","endpointFromTemplate","setEndpoint","addDefaultMonitoringListeners","_clientSideMonitoring","publisher","eventHandler","serviceConfig","apiConfig","defineServiceApi","getLatestServiceClass","getLatestServiceVersion","selectedVersion","defaultRetryCount","customizeRequests","customRequestHandler","addAllRequestListeners","attachMonitoringEmitter","makeUnauthenticatedRequest","waitFor","wait","serviceInterface","CorePost","Logger","apiCallEvent","monitoringEvent","Type","Version","endpointPrefix","MaxRetriesExceeded","UserAgent","FinalHttpStatusCode","FinalAwsException","FinalAwsExceptionMessage","FinalSdkException","FinalSdkExceptionMessage","apiAttemptEvent","Fqdn","HttpStatusCode","AccessKey","XAmznRequestId","XAmzRequestId","XAmzId2","attemptFailEvent","AwsException","AwsExceptionMessage","SdkException","SdkExceptionMessage","attemptTimestamp","attemptStartRealTime","attemptLatency","callStartRealTime","callTimestamp","attemptCount","addToHead","realClock","round","AttemptLatency","AttemptCount","latency","Latency","signingName","authtype","successfulResponse","retryDelays","timeoutError","networkingError","expiredCredentialsError","throttledError","clockSkewError","newServerTime","throwException","defineMethods","versions","_serviceMap","addVersions","Publisher","configProvider","publisherConfig","enabled","superclass","setApi","isApi","attachOn","baseClass","hasEndpointDiscover","hostPrefix","hostPrefixNotation","expandHostPrefix","prependEndpointPrefix","validateHostname","isEndpointOperation","hostLabel","labels","hostPattern","label","s3helper","_classCallCheck","_createClass","_gets3Image","_asyncToGenerator","regeneratorRuntime","mark","_callee","wrap","_context","Aws","VUE_APP_AWS_ACCESS_KEY","VUE_APP_AWS_SECRET_ACCESS_KEY","Auth","_config","identityPoolId","userPool","userPoolId","abrupt","Storage","level","gets3Image","_x","file","verifySendMessageChecksum","verifySendMessageBatchChecksum","verifyReceiveMessageChecksum","MD5OfMessageBody","MessageBody","calculatedMd5","calculateChecksum","throwInvalidChecksumError","MessageId","entries","messageIds","Successful","entry","Id","Entries","isChecksumValid","Messages","MD5OfBody","ids","checksum","QueueUrl","matches","browser","PRELUDE_MEMBER_LENGTH","PRELUDE_LENGTH","CHECKSUM_LENGTH","MINIMUM_MESSAGE_LENGTH","splitMessage","readUInt32BE","expectedPreludeChecksum","expectedMessageChecksum","headersStart","headersEnd","enum","xmlName","queryName","requiresLength","isComposite","idempotencyToken","jsonvalue","eventstream","eventpayload","eventheader","timestampFormat","isTimestampFormatSet","endpointdiscoveryid","documentation","documentationUrl","xmlAttribute","CompositeShape","StructureShape","requiredMap","firstInit","isShape","xmlOrder","memberNames","isEventPayload","isEventHeader","resultWrapper","xmlNamespace","ListShape","oldName","MapShape","TimestampShape","StringShape","nullLessProtocols","FloatShape","IntegerShape","BinaryShape","isSensitive","secureBuf","Base64Shape","BooleanShape","normalizedTypes","character","double","long","short","biginteger","bigdecimal","blob","refShape","shapes","filteredKeys","InlineShape","origType","Int64","bytes","negate","fromNumber","remaining","negative","isView","viewStrings","isEmptyData","convertToBuffer","byteOffset","BYTES_PER_ELEMENT","CHECK_ACCEPTORS","_waiter","acceptors","acceptorMatched","acceptor","matcher","matchers","argument","setSuccess","setError","loadWaiterConfig","pathAll","results","numResults","pathAny","retryDelay","$waiter","maxAttempts","ii","completeInfo","fillQueue","configure","partSize","minPartSize","queueSize","leavePartsOnError","tags","validateBody","adjustTotalBytes","maxTotalParts","failed","runFill","fillBuffer","fillStream","partBuffers","cleanup","isDoneChunking","numParts","totalPartNumbers","doneParts","finishMultiPart","singlePart","totalBytes","newPartSize","partPos","totalChunkedBytes","totalUploadedBytes","activeParts","multipartReq","partBufferLength","bodyLen","nextChunk","endPos","read","pbuf","isDoneSending","partNumber","Tagging","getTaggingHeader","putObject","_managedUpload","progress","finishSinglePart","ETag","UploadId","uploadPart","queueChunks","createMultipartUpload","kvPairStrings","Value","partParams","PartNumber","partInfo","_lastUploadedBytes","resume","abortMultipartUpload","completeParams","MultipartUpload","Parts","completeMultipartUpload","Location","putObjectTagging","TagSet","httpReq","info","loaded","total","EXTRACT_DATA","checkCrc32","crc32IsValid","ChainableTemporaryCredentials","tokenCodeFn","SerialNumber","getTokenCode","tokenCode","TokenCode","DISCOVER_ENDPOINT","getOperationAuthtype","addAsync","dnsHostRegex","idempotentMembers","SignerClass","signer","signedAt","httpResp","errCode","executeSend","timeDiff","numBytes","dateHeader","redirect","willRetry","isDNSError","errno","getSystemErrorName","buildMessage","write","filterSensitiveLog","subShapeName","subShape","delta","ansi","isTTY","censoredParams","defaultProviders","resolveCallbacks","resolveNext","provider","getErr","resolvePromise","SAMLCredentials","assumeRoleWithSAML","requiredAuthTokenOptions","username","Signer","convertUrlToAuthToken","getAuthToken","hasCallback","optionsValidation","validateAuthTokenOptions","serviceOptions","modifyRequestForAuthToken","Action","DBUser","XmlBuilder","serializeScalar","element","applyNamespaces","entryKey","entryValue","isRoot","xmlNamespaceUri","xmlNamespacePrefix","noEmpty","hashUtils","BLOCK_SIZE","DIGEST_LENGTH","Uint32Array","Sha1","h0","h1","h2","h3","h4","block","totalLength","finished","byte","processBlock","s","outView","DataView","setUint32","w","temp","Md5","bufferLength","bytesHashed","cmn","q","ff","gg","hh","sourceData","setUint8","hashBuffer","_a","undecoratedLength","bitsHashed","buff","getUint32","ENV_REGIONAL_ENDPOINT_ENABLED","CONFIG_REGIONAL_ENDPOINT_ENABLED","SecretAccessKey","optInRegionalEndpoint","KEY","MAX_HASHABLE_LENGTH","Sha256","Int32Array","bufferView","state0","state1","state2","state3","state4","state5","state6","state7","u","t1_1","t2_1","t1","t2","inputMembers","parsedArn","exec","delimiter","accessPointPrefix","loadUseArnRegionConfig","regionFromArn","clientRegion","envName","configName","ipAddress","dots","origRules","tmp","_XAMZRequestId","requestIdShape","base64Encode","queryEncode","replacements","signPolicy","policy","privateKey","createSign","signWithCannedPolicy","keyPairId","Statement","Resource","Condition","DateLessThan","signWithCustomPolicy","determineScheme","getRtmpUrl","rtmpUrl","parsed","getResource","handleError","handleSuccess","getSignedCookie","signatureHash","cookieHash","signedUrl","requestUri","endpointdiscovery","isIdempotent","hasEventStream","topLevelShape","performance","generateRegionPrefix","derivedKeys","regionPrefix","applyConfig","patterns","regionRegexes","defaultSuffix","regexes","regionPattern","DocumentClient","putItem","Item","makeServiceRequest","setupRequest","setupResponse","serviceClientOperationsMap","batchGet","batchWrite","delete","scan","transactGet","transactWrite","createSet","getTranslator","translator","rawParams","outputShape","isBinary","BOOLEAN_TAG","BYTE_TAG","SHORT_TAG","INT_TAG","LONG_TAG","BINARY_TAG","STRING_TAG","TIMESTAMP_TAG","UUID_TAG","nameLength","readInt8","readInt16BE","readInt32BE","binaryLength","readUInt16BE","stringLength","uuidChars","Hmac","alg","crossRegionOperations","PreSignedUrl","doesParamValidation","buildCrossRegionPresignedUrl","destinationRegion","addEndpointOperation","endpointoperation","serviceAbbreviation","serviceFullName","refreshCallbacks","expiryWindow","needsRefresh","currentTime","adjustedTime","sync","getPromise","refreshPromise","finalState","bindObject","inputError","accept","acceptState","failState","applyContentTypeHeader","hashCtor","outer","inner","bufferFromSecret","bufferHash","toHash"],"mappings":"gp0BAAA,IAAIA,EAAO,EAAQ,QAAWA,KAC1BC,EAAS,EAAQ,QAAWA,OAK5BC,EAAsB,CACxB,OAAU,SACV,OAAU,SACV,YAAe,SACf,OAAU,UAMRC,EAAcH,EAAKI,QAAQ,CAE7BC,YAAa,SAAaC,EAAMC,GAC9BA,EAAUA,GAAW,GACrBC,KAAKC,YAAc,MACnBD,KAAKE,WAAWJ,EAAMC,EAAQI,WAGhCD,WAAY,SAASJ,EAAMK,GACzB,IAAIC,EAAOJ,KACXI,EAAKC,OAAS,GAAGC,OAAOR,GACxBM,EAAKG,aACDJ,GACFC,EAAKD,YAITI,WAAY,WAEV,GADAP,KAAKQ,KAAOd,EAAoBD,EAAOO,KAAKK,OAAO,MAC9CL,KAAKQ,KACR,MAAMhB,EAAKiB,MAAM,IAAIC,MAAS,CAC5BC,KAAM,iBACNC,QAAS,uDAKfT,SAAU,WAIR,IAHA,IAAIC,EAAOJ,KACPa,EAAST,EAAKC,OAAOQ,OACrBR,EAASD,EAAKC,OACTS,EAAI,EAAGA,EAAID,EAAQC,IAC1B,GAAIpB,EAAoBD,EAAOY,EAAOS,OAASV,EAAKI,KAClD,MAAMhB,EAAKiB,MAAM,IAAIC,MAAS,CAC5BC,KAAM,cACNC,QAASR,EAAKI,KAAO,iBAAmBf,EAAOY,EAAOS,IAAM,YASpEC,OAAQ,WACN,IAAIX,EAAOJ,KACX,OAAOI,EAAKC,UAQhBW,EAAOC,QAAUtB,G,uBCtEjB,IAAIH,EAAO,EAAQ,Q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K,iitBCnD7B,EAAQ,QACR,IAAItD,EAAM,EAAQ,QACdkS,EAAUlS,EAAIkS,QACdC,EAAYnS,EAAImS,UAEpBA,EAAUC,SAAS,OAAS,GAC5BpS,EAAIiwB,IAAM/d,EAAQI,cAAc,MAAO,CAAC,eACxCnQ,OAAO+H,eAAeiI,EAAUC,SAAS,OAAQ,aAAc,CAC7DjH,IAAK,WACH,IAAIoH,EAAQ,EAAQ,QAGpB,OAFAA,EAAMC,WAAa,EAAQ,QAA4CC,WACvEF,EAAMiT,QAAU,EAAQ,QAA0CA,QAC3DjT,GAETnI,YAAY,EACZW,cAAc,IAGhB5N,EAAOC,QAAU4C,EAAIiwB,K","file":"js/chunk-08526659.d2bb98b5.js","sourcesContent":["var util = require('../core').util;\nvar typeOf = require('./types').typeOf;\n\n/**\n * @api private\n */\nvar memberTypeToSetType = {\n 'String': 'String',\n 'Number': 'Number',\n 'NumberValue': 'Number',\n 'Binary': 'Binary'\n};\n\n/**\n * @api private\n */\nvar DynamoDBSet = util.inherit({\n\n constructor: function Set(list, options) {\n options = options || {};\n this.wrapperName = 'Set';\n this.initialize(list, options.validate);\n },\n\n initialize: function(list, validate) {\n var self = this;\n self.values = [].concat(list);\n self.detectType();\n if (validate) {\n self.validate();\n }\n },\n\n detectType: function() {\n this.type = memberTypeToSetType[typeOf(this.values[0])];\n if (!this.type) {\n throw util.error(new Error(), {\n code: 'InvalidSetType',\n message: 'Sets can contain string, number, or binary values'\n });\n }\n },\n\n validate: function() {\n var self = this;\n var length = self.values.length;\n var values = self.values;\n for (var i = 0; i < length; i++) {\n if (memberTypeToSetType[typeOf(values[i])] !== self.type) {\n throw util.error(new Error(), {\n code: 'InvalidType',\n message: self.type + ' Set contains ' + typeOf(values[i]) + ' value'\n });\n }\n }\n },\n\n /**\n * Render the underlying values only when converting to JSON.\n */\n toJSON: function() {\n var self = this;\n return self.values;\n }\n\n});\n\n/**\n * @api private\n */\nmodule.exports = DynamoDBSet;\n","var util = require('../util');\nvar JsonBuilder = require('../json/builder');\nvar JsonParser = require('../json/parser');\nvar populateHostPrefix = require('./helpers').populateHostPrefix;\n\nfunction buildRequest(req) {\n var httpRequest = req.httpRequest;\n var api = req.service.api;\n var target = api.targetPrefix + '.' + api.operations[req.operation].name;\n var version = api.jsonVersion || '1.0';\n var input = api.operations[req.operation].input;\n var builder = new JsonBuilder();\n\n if (version === 1) version = '1.0';\n httpRequest.body = builder.build(req.params || {}, input);\n httpRequest.headers['Content-Type'] = 'application/x-amz-json-' + version;\n httpRequest.headers['X-Amz-Target'] = target;\n\n populateHostPrefix(req);\n}\n\nfunction extractError(resp) {\n var error = {};\n var httpResponse = resp.httpResponse;\n\n error.code = httpResponse.headers['x-amzn-errortype'] || 'UnknownError';\n if (typeof error.code === 'string') {\n error.code = error.code.split(':')[0];\n }\n\n if (httpResponse.body.length > 0) {\n try {\n var e = JSON.parse(httpResponse.body.toString());\n var code = e.__type || e.code || e.Code;\n if (code) {\n error.code = code.split('#').pop();\n }\n if (error.code === 'RequestEntityTooLarge') {\n error.message = 'Request body must be less than 1 MB';\n } else {\n error.message = (e.message || e.Message || null);\n }\n } catch (e) {\n error.statusCode = httpResponse.statusCode;\n error.message = httpResponse.statusMessage;\n }\n } else {\n error.statusCode = httpResponse.statusCode;\n error.message = httpResponse.statusCode.toString();\n }\n\n resp.error = util.error(new Error(), error);\n}\n\nfunction extractData(resp) {\n var body = resp.httpResponse.body.toString() || '{}';\n if (resp.request.service.config.convertResponseTypes === false) {\n resp.data = JSON.parse(body);\n } else {\n var operation = resp.request.service.api.operations[resp.request.operation];\n var shape = operation.output || {};\n var parser = new JsonParser();\n resp.data = parser.parse(body, shape);\n }\n}\n\n/**\n * @api private\n */\nmodule.exports = {\n buildRequest: buildRequest,\n extractError: extractError,\n extractData: extractData\n};\n","/* eslint guard-for-in:0 */\nvar AWS;\n\n/**\n * A set of utility methods for use with the AWS SDK.\n *\n * @!attribute abort\n * Return this value from an iterator function {each} or {arrayEach}\n * to break out of the iteration.\n * @example Breaking out of an iterator function\n * AWS.util.each({a: 1, b: 2, c: 3}, function(key, value) {\n * if (key == 'b') return AWS.util.abort;\n * });\n * @see each\n * @see arrayEach\n * @api private\n */\nvar util = {\n environment: 'nodejs',\n engine: function engine() {\n if (util.isBrowser() && typeof navigator !== 'undefined') {\n return navigator.userAgent;\n } else {\n var engine = process.platform + '/' + process.version;\n if (process.env.AWS_EXECUTION_ENV) {\n engine += ' exec-env/' + process.env.AWS_EXECUTION_ENV;\n }\n return engine;\n }\n },\n\n userAgent: function userAgent() {\n var name = util.environment;\n var agent = 'aws-sdk-' + name + '/' + require('./core').VERSION;\n if (name === 'nodejs') agent += ' ' + util.engine();\n return agent;\n },\n\n uriEscape: function uriEscape(string) {\n var output = encodeURIComponent(string);\n output = output.replace(/[^A-Za-z0-9_.~\\-%]+/g, escape);\n\n // AWS percent-encodes some extra non-standard characters in a URI\n output = output.replace(/[*]/g, function(ch) {\n return '%' + ch.charCodeAt(0).toString(16).toUpperCase();\n });\n\n return output;\n },\n\n uriEscapePath: function uriEscapePath(string) {\n var parts = [];\n util.arrayEach(string.split('/'), function (part) {\n parts.push(util.uriEscape(part));\n });\n return parts.join('/');\n },\n\n urlParse: function urlParse(url) {\n return util.url.parse(url);\n },\n\n urlFormat: function urlFormat(url) {\n return util.url.format(url);\n },\n\n queryStringParse: function queryStringParse(qs) {\n return util.querystring.parse(qs);\n },\n\n queryParamsToString: function queryParamsToString(params) {\n var items = [];\n var escape = util.uriEscape;\n var sortedKeys = Object.keys(params).sort();\n\n util.arrayEach(sortedKeys, function(name) {\n var value = params[name];\n var ename = escape(name);\n var result = ename + '=';\n if (Array.isArray(value)) {\n var vals = [];\n util.arrayEach(value, function(item) { vals.push(escape(item)); });\n result = ename + '=' + vals.sort().join('&' + ename + '=');\n } else if (value !== undefined && value !== null) {\n result = ename + '=' + escape(value);\n }\n items.push(result);\n });\n\n return items.join('&');\n },\n\n readFileSync: function readFileSync(path) {\n if (util.isBrowser()) return null;\n return require('fs').readFileSync(path, 'utf-8');\n },\n\n base64: {\n encode: function encode64(string) {\n if (typeof string === 'number') {\n throw util.error(new Error('Cannot base64 encode number ' + string));\n }\n if (string === null || typeof string === 'undefined') {\n return string;\n }\n var buf = util.buffer.toBuffer(string);\n return buf.toString('base64');\n },\n\n decode: function decode64(string) {\n if (typeof string === 'number') {\n throw util.error(new Error('Cannot base64 decode number ' + string));\n }\n if (string === null || typeof string === 'undefined') {\n return string;\n }\n return util.buffer.toBuffer(string, 'base64');\n }\n\n },\n\n buffer: {\n /**\n * Buffer constructor for Node buffer and buffer pollyfill\n */\n toBuffer: function(data, encoding) {\n return (typeof util.Buffer.from === 'function' && util.Buffer.from !== Uint8Array.from) ?\n util.Buffer.from(data, encoding) : new util.Buffer(data, encoding);\n },\n\n alloc: function(size, fill, encoding) {\n if (typeof size !== 'number') {\n throw new Error('size passed to alloc must be a number.');\n }\n if (typeof util.Buffer.alloc === 'function') {\n return util.Buffer.alloc(size, fill, encoding);\n } else {\n var buf = new util.Buffer(size);\n if (fill !== undefined && typeof buf.fill === 'function') {\n buf.fill(fill, undefined, undefined, encoding);\n }\n return buf;\n }\n },\n\n toStream: function toStream(buffer) {\n if (!util.Buffer.isBuffer(buffer)) buffer = util.buffer.toBuffer(buffer);\n\n var readable = new (util.stream.Readable)();\n var pos = 0;\n readable._read = function(size) {\n if (pos >= buffer.length) return readable.push(null);\n\n var end = pos + size;\n if (end > buffer.length) end = buffer.length;\n readable.push(buffer.slice(pos, end));\n pos = end;\n };\n\n return readable;\n },\n\n /**\n * Concatenates a list of Buffer objects.\n */\n concat: function(buffers) {\n var length = 0,\n offset = 0,\n buffer = null, i;\n\n for (i = 0; i < buffers.length; i++) {\n length += buffers[i].length;\n }\n\n buffer = util.buffer.alloc(length);\n\n for (i = 0; i < buffers.length; i++) {\n buffers[i].copy(buffer, offset);\n offset += buffers[i].length;\n }\n\n return buffer;\n }\n },\n\n string: {\n byteLength: function byteLength(string) {\n if (string === null || string === undefined) return 0;\n if (typeof string === 'string') string = util.buffer.toBuffer(string);\n\n if (typeof string.byteLength === 'number') {\n return string.byteLength;\n } else if (typeof string.length === 'number') {\n return string.length;\n } else if (typeof string.size === 'number') {\n return string.size;\n } else if (typeof string.path === 'string') {\n return require('fs').lstatSync(string.path).size;\n } else {\n throw util.error(new Error('Cannot determine length of ' + string),\n { object: string });\n }\n },\n\n upperFirst: function upperFirst(string) {\n return string[0].toUpperCase() + string.substr(1);\n },\n\n lowerFirst: function lowerFirst(string) {\n return string[0].toLowerCase() + string.substr(1);\n }\n },\n\n ini: {\n parse: function string(ini) {\n var currentSection, map = {};\n util.arrayEach(ini.split(/\\r?\\n/), function(line) {\n line = line.split(/(^|\\s)[;#]/)[0]; // remove comments\n var section = line.match(/^\\s*\\[([^\\[\\]]+)\\]\\s*$/);\n if (section) {\n currentSection = section[1];\n if (currentSection === '__proto__' || currentSection.split(/\\s/)[1] === '__proto__') {\n throw util.error(\n new Error('Cannot load profile name \\'' + currentSection + '\\' from shared ini file.')\n );\n }\n } else if (currentSection) {\n var 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\n return map;\n }\n },\n\n fn: {\n noop: function() {},\n callback: function (err) { if (err) throw err; },\n\n /**\n * Turn a synchronous function into as \"async\" function by making it call\n * a callback. The underlying function is called with all but the last argument,\n * which is treated as the callback. The callback is passed passed a first argument\n * of null on success to mimick standard node callbacks.\n */\n makeAsync: function makeAsync(fn, expectedArgs) {\n if (expectedArgs && expectedArgs <= fn.length) {\n return fn;\n }\n\n return function() {\n var args = Array.prototype.slice.call(arguments, 0);\n var callback = args.pop();\n var result = fn.apply(null, args);\n callback(result);\n };\n }\n },\n\n /**\n * Date and time utility functions.\n */\n date: {\n\n /**\n * @return [Date] the current JavaScript date object. Since all\n * AWS services rely on this date object, you can override\n * this function to provide a special time value to AWS service\n * requests.\n */\n getDate: function getDate() {\n if (!AWS) AWS = require('./core');\n if (AWS.config.systemClockOffset) { // use offset when non-zero\n return new Date(new Date().getTime() + AWS.config.systemClockOffset);\n } else {\n return new Date();\n }\n },\n\n /**\n * @return [String] the date in ISO-8601 format\n */\n iso8601: function iso8601(date) {\n if (date === undefined) { date = util.date.getDate(); }\n return date.toISOString().replace(/\\.\\d{3}Z$/, 'Z');\n },\n\n /**\n * @return [String] the date in RFC 822 format\n */\n rfc822: function rfc822(date) {\n if (date === undefined) { date = util.date.getDate(); }\n return date.toUTCString();\n },\n\n /**\n * @return [Integer] the UNIX timestamp value for the current time\n */\n unixTimestamp: function unixTimestamp(date) {\n if (date === undefined) { date = util.date.getDate(); }\n return date.getTime() / 1000;\n },\n\n /**\n * @param [String,number,Date] date\n * @return [Date]\n */\n from: function format(date) {\n if (typeof date === 'number') {\n return new Date(date * 1000); // unix timestamp\n } else {\n return new Date(date);\n }\n },\n\n /**\n * Given a Date or date-like value, this function formats the\n * date into a string of the requested value.\n * @param [String,number,Date] date\n * @param [String] formatter Valid formats are:\n # * 'iso8601'\n # * 'rfc822'\n # * 'unixTimestamp'\n * @return [String]\n */\n format: function format(date, formatter) {\n if (!formatter) formatter = 'iso8601';\n return util.date[formatter](util.date.from(date));\n },\n\n parseTimestamp: function parseTimestamp(value) {\n if (typeof value === 'number') { // unix timestamp (number)\n return new Date(value * 1000);\n } else if (value.match(/^\\d+$/)) { // unix timestamp\n return new Date(value * 1000);\n } else if (value.match(/^\\d{4}/)) { // iso8601\n return new Date(value);\n } else if (value.match(/^\\w{3},/)) { // rfc822\n return new Date(value);\n } else {\n throw util.error(\n new Error('unhandled timestamp format: ' + value),\n {code: 'TimestampParserError'});\n }\n }\n\n },\n\n crypto: {\n crc32Table: [\n 0x00000000, 0x77073096, 0xEE0E612C, 0x990951BA, 0x076DC419,\n 0x706AF48F, 0xE963A535, 0x9E6495A3, 0x0EDB8832, 0x79DCB8A4,\n 0xE0D5E91E, 0x97D2D988, 0x09B64C2B, 0x7EB17CBD, 0xE7B82D07,\n 0x90BF1D91, 0x1DB71064, 0x6AB020F2, 0xF3B97148, 0x84BE41DE,\n 0x1ADAD47D, 0x6DDDE4EB, 0xF4D4B551, 0x83D385C7, 0x136C9856,\n 0x646BA8C0, 0xFD62F97A, 0x8A65C9EC, 0x14015C4F, 0x63066CD9,\n 0xFA0F3D63, 0x8D080DF5, 0x3B6E20C8, 0x4C69105E, 0xD56041E4,\n 0xA2677172, 0x3C03E4D1, 0x4B04D447, 0xD20D85FD, 0xA50AB56B,\n 0x35B5A8FA, 0x42B2986C, 0xDBBBC9D6, 0xACBCF940, 0x32D86CE3,\n 0x45DF5C75, 0xDCD60DCF, 0xABD13D59, 0x26D930AC, 0x51DE003A,\n 0xC8D75180, 0xBFD06116, 0x21B4F4B5, 0x56B3C423, 0xCFBA9599,\n 0xB8BDA50F, 0x2802B89E, 0x5F058808, 0xC60CD9B2, 0xB10BE924,\n 0x2F6F7C87, 0x58684C11, 0xC1611DAB, 0xB6662D3D, 0x76DC4190,\n 0x01DB7106, 0x98D220BC, 0xEFD5102A, 0x71B18589, 0x06B6B51F,\n 0x9FBFE4A5, 0xE8B8D433, 0x7807C9A2, 0x0F00F934, 0x9609A88E,\n 0xE10E9818, 0x7F6A0DBB, 0x086D3D2D, 0x91646C97, 0xE6635C01,\n 0x6B6B51F4, 0x1C6C6162, 0x856530D8, 0xF262004E, 0x6C0695ED,\n 0x1B01A57B, 0x8208F4C1, 0xF50FC457, 0x65B0D9C6, 0x12B7E950,\n 0x8BBEB8EA, 0xFCB9887C, 0x62DD1DDF, 0x15DA2D49, 0x8CD37CF3,\n 0xFBD44C65, 0x4DB26158, 0x3AB551CE, 0xA3BC0074, 0xD4BB30E2,\n 0x4ADFA541, 0x3DD895D7, 0xA4D1C46D, 0xD3D6F4FB, 0x4369E96A,\n 0x346ED9FC, 0xAD678846, 0xDA60B8D0, 0x44042D73, 0x33031DE5,\n 0xAA0A4C5F, 0xDD0D7CC9, 0x5005713C, 0x270241AA, 0xBE0B1010,\n 0xC90C2086, 0x5768B525, 0x206F85B3, 0xB966D409, 0xCE61E49F,\n 0x5EDEF90E, 0x29D9C998, 0xB0D09822, 0xC7D7A8B4, 0x59B33D17,\n 0x2EB40D81, 0xB7BD5C3B, 0xC0BA6CAD, 0xEDB88320, 0x9ABFB3B6,\n 0x03B6E20C, 0x74B1D29A, 0xEAD54739, 0x9DD277AF, 0x04DB2615,\n 0x73DC1683, 0xE3630B12, 0x94643B84, 0x0D6D6A3E, 0x7A6A5AA8,\n 0xE40ECF0B, 0x9309FF9D, 0x0A00AE27, 0x7D079EB1, 0xF00F9344,\n 0x8708A3D2, 0x1E01F268, 0x6906C2FE, 0xF762575D, 0x806567CB,\n 0x196C3671, 0x6E6B06E7, 0xFED41B76, 0x89D32BE0, 0x10DA7A5A,\n 0x67DD4ACC, 0xF9B9DF6F, 0x8EBEEFF9, 0x17B7BE43, 0x60B08ED5,\n 0xD6D6A3E8, 0xA1D1937E, 0x38D8C2C4, 0x4FDFF252, 0xD1BB67F1,\n 0xA6BC5767, 0x3FB506DD, 0x48B2364B, 0xD80D2BDA, 0xAF0A1B4C,\n 0x36034AF6, 0x41047A60, 0xDF60EFC3, 0xA867DF55, 0x316E8EEF,\n 0x4669BE79, 0xCB61B38C, 0xBC66831A, 0x256FD2A0, 0x5268E236,\n 0xCC0C7795, 0xBB0B4703, 0x220216B9, 0x5505262F, 0xC5BA3BBE,\n 0xB2BD0B28, 0x2BB45A92, 0x5CB36A04, 0xC2D7FFA7, 0xB5D0CF31,\n 0x2CD99E8B, 0x5BDEAE1D, 0x9B64C2B0, 0xEC63F226, 0x756AA39C,\n 0x026D930A, 0x9C0906A9, 0xEB0E363F, 0x72076785, 0x05005713,\n 0x95BF4A82, 0xE2B87A14, 0x7BB12BAE, 0x0CB61B38, 0x92D28E9B,\n 0xE5D5BE0D, 0x7CDCEFB7, 0x0BDBDF21, 0x86D3D2D4, 0xF1D4E242,\n 0x68DDB3F8, 0x1FDA836E, 0x81BE16CD, 0xF6B9265B, 0x6FB077E1,\n 0x18B74777, 0x88085AE6, 0xFF0F6A70, 0x66063BCA, 0x11010B5C,\n 0x8F659EFF, 0xF862AE69, 0x616BFFD3, 0x166CCF45, 0xA00AE278,\n 0xD70DD2EE, 0x4E048354, 0x3903B3C2, 0xA7672661, 0xD06016F7,\n 0x4969474D, 0x3E6E77DB, 0xAED16A4A, 0xD9D65ADC, 0x40DF0B66,\n 0x37D83BF0, 0xA9BCAE53, 0xDEBB9EC5, 0x47B2CF7F, 0x30B5FFE9,\n 0xBDBDF21C, 0xCABAC28A, 0x53B39330, 0x24B4A3A6, 0xBAD03605,\n 0xCDD70693, 0x54DE5729, 0x23D967BF, 0xB3667A2E, 0xC4614AB8,\n 0x5D681B02, 0x2A6F2B94, 0xB40BBE37, 0xC30C8EA1, 0x5A05DF1B,\n 0x2D02EF8D],\n\n crc32: function crc32(data) {\n var tbl = util.crypto.crc32Table;\n var crc = 0 ^ -1;\n\n if (typeof data === 'string') {\n data = util.buffer.toBuffer(data);\n }\n\n for (var i = 0; i < data.length; i++) {\n var code = data.readUInt8(i);\n crc = (crc >>> 8) ^ tbl[(crc ^ code) & 0xFF];\n }\n return (crc ^ -1) >>> 0;\n },\n\n hmac: function hmac(key, string, digest, fn) {\n if (!digest) digest = 'binary';\n if (digest === 'buffer') { digest = undefined; }\n if (!fn) fn = 'sha256';\n if (typeof string === 'string') string = util.buffer.toBuffer(string);\n return util.crypto.lib.createHmac(fn, key).update(string).digest(digest);\n },\n\n md5: function md5(data, digest, callback) {\n return util.crypto.hash('md5', data, digest, callback);\n },\n\n sha256: function sha256(data, digest, callback) {\n return util.crypto.hash('sha256', data, digest, callback);\n },\n\n hash: function(algorithm, data, digest, callback) {\n var hash = util.crypto.createHash(algorithm);\n if (!digest) { digest = 'binary'; }\n if (digest === 'buffer') { digest = undefined; }\n if (typeof data === 'string') data = util.buffer.toBuffer(data);\n var sliceFn = util.arraySliceFn(data);\n var isBuffer = util.Buffer.isBuffer(data);\n //Identifying objects with an ArrayBuffer as buffers\n if (util.isBrowser() && typeof ArrayBuffer !== 'undefined' && data && data.buffer instanceof ArrayBuffer) isBuffer = true;\n\n if (callback && typeof data === 'object' &&\n typeof data.on === 'function' && !isBuffer) {\n data.on('data', function(chunk) { hash.update(chunk); });\n data.on('error', function(err) { callback(err); });\n data.on('end', function() { callback(null, hash.digest(digest)); });\n } else if (callback && sliceFn && !isBuffer &&\n typeof FileReader !== 'undefined') {\n // this might be a File/Blob\n var index = 0, size = 1024 * 512;\n var reader = new FileReader();\n reader.onerror = function() {\n callback(new Error('Failed to read data.'));\n };\n reader.onload = function() {\n var buf = new util.Buffer(new Uint8Array(reader.result));\n hash.update(buf);\n index += buf.length;\n reader._continueReading();\n };\n reader._continueReading = function() {\n if (index >= data.size) {\n callback(null, hash.digest(digest));\n return;\n }\n\n var back = index + size;\n if (back > data.size) back = data.size;\n reader.readAsArrayBuffer(sliceFn.call(data, index, back));\n };\n\n reader._continueReading();\n } else {\n if (util.isBrowser() && typeof data === 'object' && !isBuffer) {\n data = new util.Buffer(new Uint8Array(data));\n }\n var out = hash.update(data).digest(digest);\n if (callback) callback(null, out);\n return out;\n }\n },\n\n toHex: function toHex(data) {\n var out = [];\n for (var i = 0; i < data.length; i++) {\n out.push(('0' + data.charCodeAt(i).toString(16)).substr(-2, 2));\n }\n return out.join('');\n },\n\n createHash: function createHash(algorithm) {\n return util.crypto.lib.createHash(algorithm);\n }\n\n },\n\n /** @!ignore */\n\n /* Abort constant */\n abort: {},\n\n each: function each(object, iterFunction) {\n for (var key in object) {\n if (Object.prototype.hasOwnProperty.call(object, key)) {\n var ret = iterFunction.call(this, key, object[key]);\n if (ret === util.abort) break;\n }\n }\n },\n\n arrayEach: function arrayEach(array, iterFunction) {\n for (var idx in array) {\n if (Object.prototype.hasOwnProperty.call(array, idx)) {\n var ret = iterFunction.call(this, array[idx], parseInt(idx, 10));\n if (ret === util.abort) break;\n }\n }\n },\n\n update: function update(obj1, obj2) {\n util.each(obj2, function iterator(key, item) {\n obj1[key] = item;\n });\n return obj1;\n },\n\n merge: function merge(obj1, obj2) {\n return util.update(util.copy(obj1), obj2);\n },\n\n copy: function copy(object) {\n if (object === null || object === undefined) return object;\n var dupe = {};\n // jshint forin:false\n for (var key in object) {\n dupe[key] = object[key];\n }\n return dupe;\n },\n\n isEmpty: function isEmpty(obj) {\n for (var prop in obj) {\n if (Object.prototype.hasOwnProperty.call(obj, prop)) {\n return false;\n }\n }\n return true;\n },\n\n arraySliceFn: function arraySliceFn(obj) {\n var fn = obj.slice || obj.webkitSlice || obj.mozSlice;\n return typeof fn === 'function' ? fn : null;\n },\n\n isType: function isType(obj, type) {\n // handle cross-\"frame\" objects\n if (typeof type === 'function') type = util.typeName(type);\n return Object.prototype.toString.call(obj) === '[object ' + type + ']';\n },\n\n typeName: function typeName(type) {\n if (Object.prototype.hasOwnProperty.call(type, 'name')) return type.name;\n var str = type.toString();\n var match = str.match(/^\\s*function (.+)\\(/);\n return match ? match[1] : str;\n },\n\n error: function error(err, options) {\n var originalError = null;\n if (typeof err.message === 'string' && err.message !== '') {\n if (typeof options === 'string' || (options && options.message)) {\n originalError = util.copy(err);\n originalError.message = err.message;\n }\n }\n err.message = err.message || null;\n\n if (typeof options === 'string') {\n err.message = options;\n } else if (typeof options === 'object' && options !== null) {\n util.update(err, options);\n if (options.message)\n err.message = options.message;\n if (options.code || options.name)\n err.code = options.code || options.name;\n if (options.stack)\n err.stack = options.stack;\n }\n\n if (typeof Object.defineProperty === 'function') {\n Object.defineProperty(err, 'name', {writable: true, enumerable: false});\n Object.defineProperty(err, 'message', {enumerable: true});\n }\n\n err.name = String(options && options.name || err.name || err.code || 'Error');\n err.time = new Date();\n\n if (originalError) err.originalError = originalError;\n\n return err;\n },\n\n /**\n * @api private\n */\n inherit: function inherit(klass, features) {\n var newObject = null;\n if (features === undefined) {\n features = klass;\n klass = Object;\n newObject = {};\n } else {\n var ctor = function ConstructorWrapper() {};\n ctor.prototype = klass.prototype;\n newObject = new ctor();\n }\n\n // constructor not supplied, create pass-through ctor\n if (features.constructor === Object) {\n features.constructor = function() {\n if (klass !== Object) {\n return klass.apply(this, arguments);\n }\n };\n }\n\n features.constructor.prototype = newObject;\n util.update(features.constructor.prototype, features);\n features.constructor.__super__ = klass;\n return features.constructor;\n },\n\n /**\n * @api private\n */\n mixin: function mixin() {\n var klass = arguments[0];\n for (var i = 1; i < arguments.length; i++) {\n // jshint forin:false\n for (var prop in arguments[i].prototype) {\n var fn = arguments[i].prototype[prop];\n if (prop !== 'constructor') {\n klass.prototype[prop] = fn;\n }\n }\n }\n return klass;\n },\n\n /**\n * @api private\n */\n hideProperties: function hideProperties(obj, props) {\n if (typeof Object.defineProperty !== 'function') return;\n\n util.arrayEach(props, function (key) {\n Object.defineProperty(obj, key, {\n enumerable: false, writable: true, configurable: true });\n });\n },\n\n /**\n * @api private\n */\n property: function property(obj, name, value, enumerable, isValue) {\n var opts = {\n configurable: true,\n enumerable: enumerable !== undefined ? enumerable : true\n };\n if (typeof value === 'function' && !isValue) {\n opts.get = value;\n }\n else {\n opts.value = value; opts.writable = true;\n }\n\n Object.defineProperty(obj, name, opts);\n },\n\n /**\n * @api private\n */\n memoizedProperty: function memoizedProperty(obj, name, get, enumerable) {\n var cachedValue = null;\n\n // build enumerable attribute for each value with lazy accessor.\n util.property(obj, name, function() {\n if (cachedValue === null) {\n cachedValue = get();\n }\n return cachedValue;\n }, enumerable);\n },\n\n /**\n * TODO Remove in major version revision\n * This backfill populates response data without the\n * top-level payload name.\n *\n * @api private\n */\n hoistPayloadMember: function hoistPayloadMember(resp) {\n var req = resp.request;\n var operationName = req.operation;\n var operation = req.service.api.operations[operationName];\n var output = operation.output;\n if (output.payload && !operation.hasEventOutput) {\n var payloadMember = output.members[output.payload];\n var responsePayload = resp.data[output.payload];\n if (payloadMember.type === 'structure') {\n util.each(responsePayload, function(key, value) {\n util.property(resp.data, key, value, false);\n });\n }\n }\n },\n\n /**\n * Compute SHA-256 checksums of streams\n *\n * @api private\n */\n computeSha256: function computeSha256(body, done) {\n if (util.isNode()) {\n var Stream = util.stream.Stream;\n var fs = require('fs');\n if (typeof Stream === 'function' && body instanceof Stream) {\n if (typeof body.path === 'string') { // assume file object\n var settings = {};\n if (typeof body.start === 'number') {\n settings.start = body.start;\n }\n if (typeof body.end === 'number') {\n settings.end = body.end;\n }\n body = fs.createReadStream(body.path, settings);\n } else { // TODO support other stream types\n return done(new Error('Non-file stream objects are ' +\n 'not supported with SigV4'));\n }\n }\n }\n\n util.crypto.sha256(body, 'hex', function(err, sha) {\n if (err) done(err);\n else done(null, sha);\n });\n },\n\n /**\n * @api private\n */\n isClockSkewed: function isClockSkewed(serverTime) {\n if (serverTime) {\n util.property(AWS.config, 'isClockSkewed',\n Math.abs(new Date().getTime() - serverTime) >= 300000, false);\n return AWS.config.isClockSkewed;\n }\n },\n\n applyClockOffset: function applyClockOffset(serverTime) {\n if (serverTime)\n AWS.config.systemClockOffset = serverTime - new Date().getTime();\n },\n\n /**\n * @api private\n */\n extractRequestId: function extractRequestId(resp) {\n var requestId = resp.httpResponse.headers['x-amz-request-id'] ||\n resp.httpResponse.headers['x-amzn-requestid'];\n\n if (!requestId && resp.data && resp.data.ResponseMetadata) {\n requestId = resp.data.ResponseMetadata.RequestId;\n }\n\n if (requestId) {\n resp.requestId = requestId;\n }\n\n if (resp.error) {\n resp.error.requestId = requestId;\n }\n },\n\n /**\n * @api private\n */\n addPromises: function addPromises(constructors, PromiseDependency) {\n var deletePromises = false;\n if (PromiseDependency === undefined && AWS && AWS.config) {\n PromiseDependency = AWS.config.getPromisesDependency();\n }\n if (PromiseDependency === undefined && typeof Promise !== 'undefined') {\n PromiseDependency = Promise;\n }\n if (typeof PromiseDependency !== 'function') deletePromises = true;\n if (!Array.isArray(constructors)) constructors = [constructors];\n\n for (var ind = 0; ind < constructors.length; ind++) {\n var constructor = constructors[ind];\n if (deletePromises) {\n if (constructor.deletePromisesFromClass) {\n constructor.deletePromisesFromClass();\n }\n } else if (constructor.addPromisesToClass) {\n constructor.addPromisesToClass(PromiseDependency);\n }\n }\n },\n\n /**\n * @api private\n * Return a function that will return a promise whose fate is decided by the\n * callback behavior of the given method with `methodName`. The method to be\n * promisified should conform to node.js convention of accepting a callback as\n * last argument and calling that callback with error as the first argument\n * and success value on the second argument.\n */\n promisifyMethod: function promisifyMethod(methodName, PromiseDependency) {\n return function promise() {\n var self = this;\n var args = Array.prototype.slice.call(arguments);\n return new PromiseDependency(function(resolve, reject) {\n args.push(function(err, data) {\n if (err) {\n reject(err);\n } else {\n resolve(data);\n }\n });\n self[methodName].apply(self, args);\n });\n };\n },\n\n /**\n * @api private\n */\n isDualstackAvailable: function isDualstackAvailable(service) {\n if (!service) return false;\n var metadata = require('../apis/metadata.json');\n if (typeof service !== 'string') service = service.serviceIdentifier;\n if (typeof service !== 'string' || !metadata.hasOwnProperty(service)) return false;\n return !!metadata[service].dualstackAvailable;\n },\n\n /**\n * @api private\n */\n calculateRetryDelay: function calculateRetryDelay(retryCount, retryDelayOptions, err) {\n if (!retryDelayOptions) retryDelayOptions = {};\n var customBackoff = retryDelayOptions.customBackoff || null;\n if (typeof customBackoff === 'function') {\n return customBackoff(retryCount, err);\n }\n var base = typeof retryDelayOptions.base === 'number' ? retryDelayOptions.base : 100;\n var delay = Math.random() * (Math.pow(2, retryCount) * base);\n return delay;\n },\n\n /**\n * @api private\n */\n handleRequestWithRetries: function handleRequestWithRetries(httpRequest, options, cb) {\n if (!options) options = {};\n var http = AWS.HttpClient.getInstance();\n var httpOptions = options.httpOptions || {};\n var retryCount = 0;\n\n var errCallback = function(err) {\n var maxRetries = options.maxRetries || 0;\n if (err && err.code === 'TimeoutError') err.retryable = true;\n\n // Call `calculateRetryDelay()` only when relevant, see #3401\n if (err && err.retryable && retryCount < maxRetries) {\n var delay = util.calculateRetryDelay(retryCount, options.retryDelayOptions, err);\n if (delay >= 0) {\n retryCount++;\n setTimeout(sendRequest, delay + (err.retryAfter || 0));\n return;\n }\n }\n cb(err);\n };\n\n var sendRequest = function() {\n var data = '';\n http.handleRequest(httpRequest, httpOptions, function(httpResponse) {\n httpResponse.on('data', function(chunk) { data += chunk.toString(); });\n httpResponse.on('end', function() {\n var statusCode = httpResponse.statusCode;\n if (statusCode < 300) {\n cb(null, data);\n } else {\n var retryAfter = parseInt(httpResponse.headers['retry-after'], 10) * 1000 || 0;\n var err = util.error(new Error(),\n {\n statusCode: statusCode,\n retryable: statusCode >= 500 || statusCode === 429\n }\n );\n if (retryAfter && err.retryable) err.retryAfter = retryAfter;\n errCallback(err);\n }\n });\n }, errCallback);\n };\n\n AWS.util.defer(sendRequest);\n },\n\n /**\n * @api private\n */\n uuid: {\n v4: function uuidV4() {\n return require('uuid').v4();\n }\n },\n\n /**\n * @api private\n */\n convertPayloadToString: function convertPayloadToString(resp) {\n var req = resp.request;\n var operation = req.operation;\n var rules = req.service.api.operations[operation].output || {};\n if (rules.payload && resp.data[rules.payload]) {\n resp.data[rules.payload] = resp.data[rules.payload].toString();\n }\n },\n\n /**\n * @api private\n */\n defer: function defer(callback) {\n if (typeof process === 'object' && typeof process.nextTick === 'function') {\n process.nextTick(callback);\n } else if (typeof setImmediate === 'function') {\n setImmediate(callback);\n } else {\n setTimeout(callback, 0);\n }\n },\n\n /**\n * @api private\n */\n getRequestPayloadShape: function getRequestPayloadShape(req) {\n var operations = req.service.api.operations;\n if (!operations) return undefined;\n var operation = (operations || {})[req.operation];\n if (!operation || !operation.input || !operation.input.payload) return undefined;\n return operation.input.members[operation.input.payload];\n },\n\n getProfilesFromSharedConfig: function getProfilesFromSharedConfig(iniLoader, filename) {\n var profiles = {};\n var profilesFromConfig = {};\n if (process.env[util.configOptInEnv]) {\n var profilesFromConfig = iniLoader.loadFrom({\n isConfig: true,\n filename: process.env[util.sharedConfigFileEnv]\n });\n }\n var profilesFromCreds= {};\n try {\n var profilesFromCreds = iniLoader.loadFrom({\n filename: filename ||\n (process.env[util.configOptInEnv] && process.env[util.sharedCredentialsFileEnv])\n });\n } catch (error) {\n // if using config, assume it is fully descriptive without a credentials file:\n if (!process.env[util.configOptInEnv]) throw error;\n }\n for (var i = 0, profileNames = Object.keys(profilesFromConfig); i < profileNames.length; i++) {\n profiles[profileNames[i]] = objectAssign(profiles[profileNames[i]] || {}, profilesFromConfig[profileNames[i]]);\n }\n for (var i = 0, profileNames = Object.keys(profilesFromCreds); i < profileNames.length; i++) {\n profiles[profileNames[i]] = objectAssign(profiles[profileNames[i]] || {}, profilesFromCreds[profileNames[i]]);\n }\n return profiles;\n\n /**\n * Roughly the semantics of `Object.assign(target, source)`\n */\n function objectAssign(target, source) {\n for (var i = 0, keys = Object.keys(source); i < keys.length; i++) {\n target[keys[i]] = source[keys[i]];\n }\n return target;\n }\n },\n\n /**\n * @api private\n */\n ARN: {\n validate: function validateARN(str) {\n return str && str.indexOf('arn:') === 0 && str.split(':').length >= 6;\n },\n parse: function parseARN(arn) {\n var matched = arn.split(':');\n return {\n partition: matched[1],\n service: matched[2],\n region: matched[3],\n accountId: matched[4],\n resource: matched.slice(5).join(':')\n };\n },\n build: function buildARN(arnObject) {\n if (\n arnObject.service === undefined ||\n arnObject.region === undefined ||\n arnObject.accountId === undefined ||\n arnObject.resource === undefined\n ) throw util.error(new Error('Input ARN object is invalid'));\n return 'arn:'+ (arnObject.partition || 'aws') + ':' + arnObject.service +\n ':' + arnObject.region + ':' + arnObject.accountId + ':' + arnObject.resource;\n }\n },\n\n /**\n * @api private\n */\n defaultProfile: 'default',\n\n /**\n * @api private\n */\n configOptInEnv: 'AWS_SDK_LOAD_CONFIG',\n\n /**\n * @api private\n */\n sharedCredentialsFileEnv: 'AWS_SHARED_CREDENTIALS_FILE',\n\n /**\n * @api private\n */\n sharedConfigFileEnv: 'AWS_CONFIG_FILE',\n\n /**\n * @api private\n */\n imdsDisabledEnv: 'AWS_EC2_METADATA_DISABLED'\n};\n\n/**\n * @api private\n */\nmodule.exports = util;\n","var AWS = require('../core');\n\nvar inherit = AWS.util.inherit;\n\n/**\n * @api private\n */\nAWS.Signers.RequestSigner = inherit({\n constructor: function RequestSigner(request) {\n this.request = request;\n },\n\n setServiceClientId: function setServiceClientId(id) {\n this.serviceClientId = id;\n },\n\n getServiceClientId: function getServiceClientId() {\n return this.serviceClientId;\n }\n});\n\nAWS.Signers.RequestSigner.getVersion = function getVersion(version) {\n switch (version) {\n case 'v2': return AWS.Signers.V2;\n case 'v3': return AWS.Signers.V3;\n case 's3v4': return AWS.Signers.V4;\n case 'v4': return AWS.Signers.V4;\n case 's3': return AWS.Signers.S3;\n case 'v3https': return AWS.Signers.V3Https;\n }\n throw new Error('Unknown signing version ' + version);\n};\n\nrequire('./v2');\nrequire('./v3');\nrequire('./v3https');\nrequire('./v4');\nrequire('./s3');\nrequire('./presign');\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['inspector'] = {};\nAWS.Inspector = Service.defineService('inspector', ['2015-08-18*', '2016-02-16']);\nObject.defineProperty(apiLoader.services['inspector'], '2016-02-16', {\n get: function get() {\n var model = require('../apis/inspector-2016-02-16.min.json');\n model.paginators = require('../apis/inspector-2016-02-16.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.Inspector;\n","var util = require('../util');\nvar Shape = require('../model/shape');\n\nfunction DomXmlParser() { }\n\nDomXmlParser.prototype.parse = function(xml, shape) {\n if (xml.replace(/^\\s+/, '') === '') return {};\n\n var result, error;\n try {\n if (window.DOMParser) {\n try {\n var parser = new DOMParser();\n result = parser.parseFromString(xml, 'text/xml');\n } catch (syntaxError) {\n throw util.error(new Error('Parse error in document'),\n {\n originalError: syntaxError,\n code: 'XMLParserError',\n retryable: true\n });\n }\n\n if (result.documentElement === null) {\n throw util.error(new Error('Cannot parse empty document.'),\n {\n code: 'XMLParserError',\n retryable: true\n });\n }\n\n var isError = result.getElementsByTagName('parsererror')[0];\n if (isError && (isError.parentNode === result ||\n isError.parentNode.nodeName === 'body' ||\n isError.parentNode.parentNode === result ||\n isError.parentNode.parentNode.nodeName === 'body')) {\n var errorElement = isError.getElementsByTagName('div')[0] || isError;\n throw util.error(new Error(errorElement.textContent || 'Parser error in document'),\n {\n code: 'XMLParserError',\n retryable: true\n });\n }\n } else if (window.ActiveXObject) {\n result = new window.ActiveXObject('Microsoft.XMLDOM');\n result.async = false;\n\n if (!result.loadXML(xml)) {\n throw util.error(new Error('Parse error in document'),\n {\n code: 'XMLParserError',\n retryable: true\n });\n }\n } else {\n throw new Error('Cannot load XML parser');\n }\n } catch (e) {\n error = e;\n }\n\n if (result && result.documentElement && !error) {\n var data = parseXml(result.documentElement, shape);\n var metadata = getElementByTagName(result.documentElement, 'ResponseMetadata');\n if (metadata) {\n data.ResponseMetadata = parseXml(metadata, {});\n }\n return data;\n } else if (error) {\n throw util.error(error || new Error(), {code: 'XMLParserError', retryable: true});\n } else { // empty xml document\n return {};\n }\n};\n\nfunction getElementByTagName(xml, tag) {\n var elements = xml.getElementsByTagName(tag);\n for (var i = 0, iLen = elements.length; i < iLen; i++) {\n if (elements[i].parentNode === xml) {\n return elements[i];\n }\n }\n}\n\nfunction parseXml(xml, shape) {\n if (!shape) shape = {};\n switch (shape.type) {\n case 'structure': return parseStructure(xml, shape);\n case 'map': return parseMap(xml, shape);\n case 'list': return parseList(xml, shape);\n case undefined: case null: return parseUnknown(xml);\n default: return parseScalar(xml, shape);\n }\n}\n\nfunction parseStructure(xml, shape) {\n var data = {};\n if (xml === null) return data;\n\n util.each(shape.members, function(memberName, memberShape) {\n if (memberShape.isXmlAttribute) {\n if (Object.prototype.hasOwnProperty.call(xml.attributes, memberShape.name)) {\n var value = xml.attributes[memberShape.name].value;\n data[memberName] = parseXml({textContent: value}, memberShape);\n }\n } else {\n var xmlChild = memberShape.flattened ? xml :\n getElementByTagName(xml, memberShape.name);\n if (xmlChild) {\n data[memberName] = parseXml(xmlChild, memberShape);\n } else if (\n !memberShape.flattened &&\n memberShape.type === 'list' &&\n !shape.api.xmlNoDefaultLists) {\n data[memberName] = memberShape.defaultValue;\n }\n }\n });\n\n return data;\n}\n\nfunction parseMap(xml, shape) {\n var data = {};\n var xmlKey = shape.key.name || 'key';\n var xmlValue = shape.value.name || 'value';\n var tagName = shape.flattened ? shape.name : 'entry';\n\n var child = xml.firstElementChild;\n while (child) {\n if (child.nodeName === tagName) {\n var key = getElementByTagName(child, xmlKey).textContent;\n var value = getElementByTagName(child, xmlValue);\n data[key] = parseXml(value, shape.value);\n }\n child = child.nextElementSibling;\n }\n return data;\n}\n\nfunction parseList(xml, shape) {\n var data = [];\n var tagName = shape.flattened ? shape.name : (shape.member.name || 'member');\n\n var child = xml.firstElementChild;\n while (child) {\n if (child.nodeName === tagName) {\n data.push(parseXml(child, shape.member));\n }\n child = child.nextElementSibling;\n }\n return data;\n}\n\nfunction parseScalar(xml, shape) {\n if (xml.getAttribute) {\n var encoding = xml.getAttribute('encoding');\n if (encoding === 'base64') {\n shape = new Shape.create({type: encoding});\n }\n }\n\n var text = xml.textContent;\n if (text === '') text = null;\n if (typeof shape.toType === 'function') {\n return shape.toType(text);\n } else {\n return text;\n }\n}\n\nfunction parseUnknown(xml) {\n if (xml === undefined || xml === null) return '';\n\n // empty object\n if (!xml.firstElementChild) {\n if (xml.parentNode.parentNode === null) return {};\n if (xml.childNodes.length === 0) return '';\n else return xml.textContent;\n }\n\n // object, parse as structure\n var shape = {type: 'structure', members: {}};\n var child = xml.firstElementChild;\n while (child) {\n var tag = child.nodeName;\n if (Object.prototype.hasOwnProperty.call(shape.members, tag)) {\n // multiple tags of the same name makes it a list\n shape.members[tag].type = 'list';\n } else {\n shape.members[tag] = {name: tag};\n }\n child = child.nextElementSibling;\n }\n return parseStructure(xml, shape);\n}\n\n/**\n * @api private\n */\nmodule.exports = DomXmlParser;\n","(function(exports) {\n \"use strict\";\n\n function isArray(obj) {\n if (obj !== null) {\n return Object.prototype.toString.call(obj) === \"[object Array]\";\n } else {\n return false;\n }\n }\n\n function isObject(obj) {\n if (obj !== null) {\n return Object.prototype.toString.call(obj) === \"[object Object]\";\n } else {\n return false;\n }\n }\n\n function strictDeepEqual(first, second) {\n // Check the scalar case first.\n if (first === second) {\n return true;\n }\n\n // Check if they are the same type.\n var firstType = Object.prototype.toString.call(first);\n if (firstType !== Object.prototype.toString.call(second)) {\n return false;\n }\n // We know that first and second have the same type so we can just check the\n // first type from now on.\n if (isArray(first) === true) {\n // Short circuit if they're not the same length;\n if (first.length !== second.length) {\n return false;\n }\n for (var i = 0; i < first.length; i++) {\n if (strictDeepEqual(first[i], second[i]) === false) {\n return false;\n }\n }\n return true;\n }\n if (isObject(first) === true) {\n // An object is equal if it has the same key/value pairs.\n var keysSeen = {};\n for (var key in first) {\n if (hasOwnProperty.call(first, key)) {\n if (strictDeepEqual(first[key], second[key]) === false) {\n return false;\n }\n keysSeen[key] = true;\n }\n }\n // Now check that there aren't any keys in second that weren't\n // in first.\n for (var key2 in second) {\n if (hasOwnProperty.call(second, key2)) {\n if (keysSeen[key2] !== true) {\n return false;\n }\n }\n }\n return true;\n }\n return false;\n }\n\n function isFalse(obj) {\n // From the spec:\n // A false value corresponds to the following values:\n // Empty list\n // Empty object\n // Empty string\n // False boolean\n // null value\n\n // First check the scalar values.\n if (obj === \"\" || obj === false || obj === null) {\n return true;\n } else if (isArray(obj) && obj.length === 0) {\n // Check for an empty array.\n return true;\n } else if (isObject(obj)) {\n // Check for an empty object.\n for (var key in obj) {\n // If there are any keys, then\n // the object is not empty so the object\n // is not false.\n if (obj.hasOwnProperty(key)) {\n return false;\n }\n }\n return true;\n } else {\n return false;\n }\n }\n\n function objValues(obj) {\n var keys = Object.keys(obj);\n var values = [];\n for (var i = 0; i < keys.length; i++) {\n values.push(obj[keys[i]]);\n }\n return values;\n }\n\n function merge(a, b) {\n var merged = {};\n for (var key in a) {\n merged[key] = a[key];\n }\n for (var key2 in b) {\n merged[key2] = b[key2];\n }\n return merged;\n }\n\n var trimLeft;\n if (typeof String.prototype.trimLeft === \"function\") {\n trimLeft = function(str) {\n return str.trimLeft();\n };\n } else {\n trimLeft = function(str) {\n return str.match(/^\\s*(.*)/)[1];\n };\n }\n\n // Type constants used to define functions.\n var TYPE_NUMBER = 0;\n var TYPE_ANY = 1;\n var TYPE_STRING = 2;\n var TYPE_ARRAY = 3;\n var TYPE_OBJECT = 4;\n var TYPE_BOOLEAN = 5;\n var TYPE_EXPREF = 6;\n var TYPE_NULL = 7;\n var TYPE_ARRAY_NUMBER = 8;\n var TYPE_ARRAY_STRING = 9;\n\n var TOK_EOF = \"EOF\";\n var TOK_UNQUOTEDIDENTIFIER = \"UnquotedIdentifier\";\n var TOK_QUOTEDIDENTIFIER = \"QuotedIdentifier\";\n var TOK_RBRACKET = \"Rbracket\";\n var TOK_RPAREN = \"Rparen\";\n var TOK_COMMA = \"Comma\";\n var TOK_COLON = \"Colon\";\n var TOK_RBRACE = \"Rbrace\";\n var TOK_NUMBER = \"Number\";\n var TOK_CURRENT = \"Current\";\n var TOK_EXPREF = \"Expref\";\n var TOK_PIPE = \"Pipe\";\n var TOK_OR = \"Or\";\n var TOK_AND = \"And\";\n var TOK_EQ = \"EQ\";\n var TOK_GT = \"GT\";\n var TOK_LT = \"LT\";\n var TOK_GTE = \"GTE\";\n var TOK_LTE = \"LTE\";\n var TOK_NE = \"NE\";\n var TOK_FLATTEN = \"Flatten\";\n var TOK_STAR = \"Star\";\n var TOK_FILTER = \"Filter\";\n var TOK_DOT = \"Dot\";\n var TOK_NOT = \"Not\";\n var TOK_LBRACE = \"Lbrace\";\n var TOK_LBRACKET = \"Lbracket\";\n var TOK_LPAREN= \"Lparen\";\n var TOK_LITERAL= \"Literal\";\n\n // The \"&\", \"[\", \"<\", \">\" tokens\n // are not in basicToken because\n // there are two token variants\n // (\"&&\", \"[?\", \"<=\", \">=\"). This is specially handled\n // below.\n\n var basicTokens = {\n \".\": TOK_DOT,\n \"*\": TOK_STAR,\n \",\": TOK_COMMA,\n \":\": TOK_COLON,\n \"{\": TOK_LBRACE,\n \"}\": TOK_RBRACE,\n \"]\": TOK_RBRACKET,\n \"(\": TOK_LPAREN,\n \")\": TOK_RPAREN,\n \"@\": TOK_CURRENT\n };\n\n var operatorStartToken = {\n \"<\": true,\n \">\": true,\n \"=\": true,\n \"!\": true\n };\n\n var skipChars = {\n \" \": true,\n \"\\t\": true,\n \"\\n\": true\n };\n\n\n function isAlpha(ch) {\n return (ch >= \"a\" && ch <= \"z\") ||\n (ch >= \"A\" && ch <= \"Z\") ||\n ch === \"_\";\n }\n\n function isNum(ch) {\n return (ch >= \"0\" && ch <= \"9\") ||\n ch === \"-\";\n }\n function isAlphaNum(ch) {\n return (ch >= \"a\" && ch <= \"z\") ||\n (ch >= \"A\" && ch <= \"Z\") ||\n (ch >= \"0\" && ch <= \"9\") ||\n ch === \"_\";\n }\n\n function Lexer() {\n }\n Lexer.prototype = {\n tokenize: function(stream) {\n var tokens = [];\n this._current = 0;\n var start;\n var identifier;\n var token;\n while (this._current < stream.length) {\n if (isAlpha(stream[this._current])) {\n start = this._current;\n identifier = this._consumeUnquotedIdentifier(stream);\n tokens.push({type: TOK_UNQUOTEDIDENTIFIER,\n value: identifier,\n start: start});\n } else if (basicTokens[stream[this._current]] !== undefined) {\n tokens.push({type: basicTokens[stream[this._current]],\n value: stream[this._current],\n start: this._current});\n this._current++;\n } else if (isNum(stream[this._current])) {\n token = this._consumeNumber(stream);\n tokens.push(token);\n } else if (stream[this._current] === \"[\") {\n // No need to increment this._current. This happens\n // in _consumeLBracket\n token = this._consumeLBracket(stream);\n tokens.push(token);\n } else if (stream[this._current] === \"\\\"\") {\n start = this._current;\n identifier = this._consumeQuotedIdentifier(stream);\n tokens.push({type: TOK_QUOTEDIDENTIFIER,\n value: identifier,\n start: start});\n } else if (stream[this._current] === \"'\") {\n start = this._current;\n identifier = this._consumeRawStringLiteral(stream);\n tokens.push({type: TOK_LITERAL,\n value: identifier,\n start: start});\n } else if (stream[this._current] === \"`\") {\n start = this._current;\n var literal = this._consumeLiteral(stream);\n tokens.push({type: TOK_LITERAL,\n value: literal,\n start: start});\n } else if (operatorStartToken[stream[this._current]] !== undefined) {\n tokens.push(this._consumeOperator(stream));\n } else if (skipChars[stream[this._current]] !== undefined) {\n // Ignore whitespace.\n this._current++;\n } else if (stream[this._current] === \"&\") {\n start = this._current;\n this._current++;\n if (stream[this._current] === \"&\") {\n this._current++;\n tokens.push({type: TOK_AND, value: \"&&\", start: start});\n } else {\n tokens.push({type: TOK_EXPREF, value: \"&\", start: start});\n }\n } else if (stream[this._current] === \"|\") {\n start = this._current;\n this._current++;\n if (stream[this._current] === \"|\") {\n this._current++;\n tokens.push({type: TOK_OR, value: \"||\", start: start});\n } else {\n tokens.push({type: TOK_PIPE, value: \"|\", start: start});\n }\n } else {\n var error = new Error(\"Unknown character:\" + stream[this._current]);\n error.name = \"LexerError\";\n throw error;\n }\n }\n return tokens;\n },\n\n _consumeUnquotedIdentifier: function(stream) {\n var start = this._current;\n this._current++;\n while (this._current < stream.length && isAlphaNum(stream[this._current])) {\n this._current++;\n }\n return stream.slice(start, this._current);\n },\n\n _consumeQuotedIdentifier: function(stream) {\n var start = this._current;\n this._current++;\n var maxLength = stream.length;\n while (stream[this._current] !== \"\\\"\" && this._current < maxLength) {\n // You can escape a double quote and you can escape an escape.\n var current = this._current;\n if (stream[current] === \"\\\\\" && (stream[current + 1] === \"\\\\\" ||\n stream[current + 1] === \"\\\"\")) {\n current += 2;\n } else {\n current++;\n }\n this._current = current;\n }\n this._current++;\n return JSON.parse(stream.slice(start, this._current));\n },\n\n _consumeRawStringLiteral: function(stream) {\n var start = this._current;\n this._current++;\n var maxLength = stream.length;\n while (stream[this._current] !== \"'\" && this._current < maxLength) {\n // You can escape a single quote and you can escape an escape.\n var current = this._current;\n if (stream[current] === \"\\\\\" && (stream[current + 1] === \"\\\\\" ||\n stream[current + 1] === \"'\")) {\n current += 2;\n } else {\n current++;\n }\n this._current = current;\n }\n this._current++;\n var literal = stream.slice(start + 1, this._current - 1);\n return literal.replace(\"\\\\'\", \"'\");\n },\n\n _consumeNumber: function(stream) {\n var start = this._current;\n this._current++;\n var maxLength = stream.length;\n while (isNum(stream[this._current]) && this._current < maxLength) {\n this._current++;\n }\n var value = parseInt(stream.slice(start, this._current));\n return {type: TOK_NUMBER, value: value, start: start};\n },\n\n _consumeLBracket: function(stream) {\n var start = this._current;\n this._current++;\n if (stream[this._current] === \"?\") {\n this._current++;\n return {type: TOK_FILTER, value: \"[?\", start: start};\n } else if (stream[this._current] === \"]\") {\n this._current++;\n return {type: TOK_FLATTEN, value: \"[]\", start: start};\n } else {\n return {type: TOK_LBRACKET, value: \"[\", start: start};\n }\n },\n\n _consumeOperator: function(stream) {\n var start = this._current;\n var startingChar = stream[start];\n this._current++;\n if (startingChar === \"!\") {\n if (stream[this._current] === \"=\") {\n this._current++;\n return {type: TOK_NE, value: \"!=\", start: start};\n } else {\n return {type: TOK_NOT, value: \"!\", start: start};\n }\n } else if (startingChar === \"<\") {\n if (stream[this._current] === \"=\") {\n this._current++;\n return {type: TOK_LTE, value: \"<=\", start: start};\n } else {\n return {type: TOK_LT, value: \"<\", start: start};\n }\n } else if (startingChar === \">\") {\n if (stream[this._current] === \"=\") {\n this._current++;\n return {type: TOK_GTE, value: \">=\", start: start};\n } else {\n return {type: TOK_GT, value: \">\", start: start};\n }\n } else if (startingChar === \"=\") {\n if (stream[this._current] === \"=\") {\n this._current++;\n return {type: TOK_EQ, value: \"==\", start: start};\n }\n }\n },\n\n _consumeLiteral: function(stream) {\n this._current++;\n var start = this._current;\n var maxLength = stream.length;\n var literal;\n while(stream[this._current] !== \"`\" && this._current < maxLength) {\n // You can escape a literal char or you can escape the escape.\n var current = this._current;\n if (stream[current] === \"\\\\\" && (stream[current + 1] === \"\\\\\" ||\n stream[current + 1] === \"`\")) {\n current += 2;\n } else {\n current++;\n }\n this._current = current;\n }\n var literalString = trimLeft(stream.slice(start, this._current));\n literalString = literalString.replace(\"\\\\`\", \"`\");\n if (this._looksLikeJSON(literalString)) {\n literal = JSON.parse(literalString);\n } else {\n // Try to JSON parse it as \"\"\n literal = JSON.parse(\"\\\"\" + literalString + \"\\\"\");\n }\n // +1 gets us to the ending \"`\", +1 to move on to the next char.\n this._current++;\n return literal;\n },\n\n _looksLikeJSON: function(literalString) {\n var startingChars = \"[{\\\"\";\n var jsonLiterals = [\"true\", \"false\", \"null\"];\n var numberLooking = \"-0123456789\";\n\n if (literalString === \"\") {\n return false;\n } else if (startingChars.indexOf(literalString[0]) >= 0) {\n return true;\n } else if (jsonLiterals.indexOf(literalString) >= 0) {\n return true;\n } else if (numberLooking.indexOf(literalString[0]) >= 0) {\n try {\n JSON.parse(literalString);\n return true;\n } catch (ex) {\n return false;\n }\n } else {\n return false;\n }\n }\n };\n\n var bindingPower = {};\n bindingPower[TOK_EOF] = 0;\n bindingPower[TOK_UNQUOTEDIDENTIFIER] = 0;\n bindingPower[TOK_QUOTEDIDENTIFIER] = 0;\n bindingPower[TOK_RBRACKET] = 0;\n bindingPower[TOK_RPAREN] = 0;\n bindingPower[TOK_COMMA] = 0;\n bindingPower[TOK_RBRACE] = 0;\n bindingPower[TOK_NUMBER] = 0;\n bindingPower[TOK_CURRENT] = 0;\n bindingPower[TOK_EXPREF] = 0;\n bindingPower[TOK_PIPE] = 1;\n bindingPower[TOK_OR] = 2;\n bindingPower[TOK_AND] = 3;\n bindingPower[TOK_EQ] = 5;\n bindingPower[TOK_GT] = 5;\n bindingPower[TOK_LT] = 5;\n bindingPower[TOK_GTE] = 5;\n bindingPower[TOK_LTE] = 5;\n bindingPower[TOK_NE] = 5;\n bindingPower[TOK_FLATTEN] = 9;\n bindingPower[TOK_STAR] = 20;\n bindingPower[TOK_FILTER] = 21;\n bindingPower[TOK_DOT] = 40;\n bindingPower[TOK_NOT] = 45;\n bindingPower[TOK_LBRACE] = 50;\n bindingPower[TOK_LBRACKET] = 55;\n bindingPower[TOK_LPAREN] = 60;\n\n function Parser() {\n }\n\n Parser.prototype = {\n parse: function(expression) {\n this._loadTokens(expression);\n this.index = 0;\n var ast = this.expression(0);\n if (this._lookahead(0) !== TOK_EOF) {\n var t = this._lookaheadToken(0);\n var error = new Error(\n \"Unexpected token type: \" + t.type + \", value: \" + t.value);\n error.name = \"ParserError\";\n throw error;\n }\n return ast;\n },\n\n _loadTokens: function(expression) {\n var lexer = new Lexer();\n var tokens = lexer.tokenize(expression);\n tokens.push({type: TOK_EOF, value: \"\", start: expression.length});\n this.tokens = tokens;\n },\n\n expression: function(rbp) {\n var leftToken = this._lookaheadToken(0);\n this._advance();\n var left = this.nud(leftToken);\n var currentToken = this._lookahead(0);\n while (rbp < bindingPower[currentToken]) {\n this._advance();\n left = this.led(currentToken, left);\n currentToken = this._lookahead(0);\n }\n return left;\n },\n\n _lookahead: function(number) {\n return this.tokens[this.index + number].type;\n },\n\n _lookaheadToken: function(number) {\n return this.tokens[this.index + number];\n },\n\n _advance: function() {\n this.index++;\n },\n\n nud: function(token) {\n var left;\n var right;\n var expression;\n switch (token.type) {\n case TOK_LITERAL:\n return {type: \"Literal\", value: token.value};\n case TOK_UNQUOTEDIDENTIFIER:\n return {type: \"Field\", name: token.value};\n case TOK_QUOTEDIDENTIFIER:\n var node = {type: \"Field\", name: token.value};\n if (this._lookahead(0) === TOK_LPAREN) {\n throw new Error(\"Quoted identifier not allowed for function names.\");\n } else {\n return node;\n }\n break;\n case TOK_NOT:\n right = this.expression(bindingPower.Not);\n return {type: \"NotExpression\", children: [right]};\n case TOK_STAR:\n left = {type: \"Identity\"};\n right = null;\n if (this._lookahead(0) === TOK_RBRACKET) {\n // This can happen in a multiselect,\n // [a, b, *]\n right = {type: \"Identity\"};\n } else {\n right = this._parseProjectionRHS(bindingPower.Star);\n }\n return {type: \"ValueProjection\", children: [left, right]};\n case TOK_FILTER:\n return this.led(token.type, {type: \"Identity\"});\n case TOK_LBRACE:\n return this._parseMultiselectHash();\n case TOK_FLATTEN:\n left = {type: TOK_FLATTEN, children: [{type: \"Identity\"}]};\n right = this._parseProjectionRHS(bindingPower.Flatten);\n return {type: \"Projection\", children: [left, right]};\n case TOK_LBRACKET:\n if (this._lookahead(0) === TOK_NUMBER || this._lookahead(0) === TOK_COLON) {\n right = this._parseIndexExpression();\n return this._projectIfSlice({type: \"Identity\"}, right);\n } else if (this._lookahead(0) === TOK_STAR &&\n this._lookahead(1) === TOK_RBRACKET) {\n this._advance();\n this._advance();\n right = this._parseProjectionRHS(bindingPower.Star);\n return {type: \"Projection\",\n children: [{type: \"Identity\"}, right]};\n } else {\n return this._parseMultiselectList();\n }\n break;\n case TOK_CURRENT:\n return {type: TOK_CURRENT};\n case TOK_EXPREF:\n expression = this.expression(bindingPower.Expref);\n return {type: \"ExpressionReference\", children: [expression]};\n case TOK_LPAREN:\n var args = [];\n while (this._lookahead(0) !== TOK_RPAREN) {\n if (this._lookahead(0) === TOK_CURRENT) {\n expression = {type: TOK_CURRENT};\n this._advance();\n } else {\n expression = this.expression(0);\n }\n args.push(expression);\n }\n this._match(TOK_RPAREN);\n return args[0];\n default:\n this._errorToken(token);\n }\n },\n\n led: function(tokenName, left) {\n var right;\n switch(tokenName) {\n case TOK_DOT:\n var rbp = bindingPower.Dot;\n if (this._lookahead(0) !== TOK_STAR) {\n right = this._parseDotRHS(rbp);\n return {type: \"Subexpression\", children: [left, right]};\n } else {\n // Creating a projection.\n this._advance();\n right = this._parseProjectionRHS(rbp);\n return {type: \"ValueProjection\", children: [left, right]};\n }\n break;\n case TOK_PIPE:\n right = this.expression(bindingPower.Pipe);\n return {type: TOK_PIPE, children: [left, right]};\n case TOK_OR:\n right = this.expression(bindingPower.Or);\n return {type: \"OrExpression\", children: [left, right]};\n case TOK_AND:\n right = this.expression(bindingPower.And);\n return {type: \"AndExpression\", children: [left, right]};\n case TOK_LPAREN:\n var name = left.name;\n var args = [];\n var expression, node;\n while (this._lookahead(0) !== TOK_RPAREN) {\n if (this._lookahead(0) === TOK_CURRENT) {\n expression = {type: TOK_CURRENT};\n this._advance();\n } else {\n expression = this.expression(0);\n }\n if (this._lookahead(0) === TOK_COMMA) {\n this._match(TOK_COMMA);\n }\n args.push(expression);\n }\n this._match(TOK_RPAREN);\n node = {type: \"Function\", name: name, children: args};\n return node;\n case TOK_FILTER:\n var condition = this.expression(0);\n this._match(TOK_RBRACKET);\n if (this._lookahead(0) === TOK_FLATTEN) {\n right = {type: \"Identity\"};\n } else {\n right = this._parseProjectionRHS(bindingPower.Filter);\n }\n return {type: \"FilterProjection\", children: [left, right, condition]};\n case TOK_FLATTEN:\n var leftNode = {type: TOK_FLATTEN, children: [left]};\n var rightNode = this._parseProjectionRHS(bindingPower.Flatten);\n return {type: \"Projection\", children: [leftNode, rightNode]};\n case TOK_EQ:\n case TOK_NE:\n case TOK_GT:\n case TOK_GTE:\n case TOK_LT:\n case TOK_LTE:\n return this._parseComparator(left, tokenName);\n case TOK_LBRACKET:\n var token = this._lookaheadToken(0);\n if (token.type === TOK_NUMBER || token.type === TOK_COLON) {\n right = this._parseIndexExpression();\n return this._projectIfSlice(left, right);\n } else {\n this._match(TOK_STAR);\n this._match(TOK_RBRACKET);\n right = this._parseProjectionRHS(bindingPower.Star);\n return {type: \"Projection\", children: [left, right]};\n }\n break;\n default:\n this._errorToken(this._lookaheadToken(0));\n }\n },\n\n _match: function(tokenType) {\n if (this._lookahead(0) === tokenType) {\n this._advance();\n } else {\n var t = this._lookaheadToken(0);\n var error = new Error(\"Expected \" + tokenType + \", got: \" + t.type);\n error.name = \"ParserError\";\n throw error;\n }\n },\n\n _errorToken: function(token) {\n var error = new Error(\"Invalid token (\" +\n token.type + \"): \\\"\" +\n token.value + \"\\\"\");\n error.name = \"ParserError\";\n throw error;\n },\n\n\n _parseIndexExpression: function() {\n if (this._lookahead(0) === TOK_COLON || this._lookahead(1) === TOK_COLON) {\n return this._parseSliceExpression();\n } else {\n var node = {\n type: \"Index\",\n value: this._lookaheadToken(0).value};\n this._advance();\n this._match(TOK_RBRACKET);\n return node;\n }\n },\n\n _projectIfSlice: function(left, right) {\n var indexExpr = {type: \"IndexExpression\", children: [left, right]};\n if (right.type === \"Slice\") {\n return {\n type: \"Projection\",\n children: [indexExpr, this._parseProjectionRHS(bindingPower.Star)]\n };\n } else {\n return indexExpr;\n }\n },\n\n _parseSliceExpression: function() {\n // [start:end:step] where each part is optional, as well as the last\n // colon.\n var parts = [null, null, null];\n var index = 0;\n var currentToken = this._lookahead(0);\n while (currentToken !== TOK_RBRACKET && index < 3) {\n if (currentToken === TOK_COLON) {\n index++;\n this._advance();\n } else if (currentToken === TOK_NUMBER) {\n parts[index] = this._lookaheadToken(0).value;\n this._advance();\n } else {\n var t = this._lookahead(0);\n var error = new Error(\"Syntax error, unexpected token: \" +\n t.value + \"(\" + t.type + \")\");\n error.name = \"Parsererror\";\n throw error;\n }\n currentToken = this._lookahead(0);\n }\n this._match(TOK_RBRACKET);\n return {\n type: \"Slice\",\n children: parts\n };\n },\n\n _parseComparator: function(left, comparator) {\n var right = this.expression(bindingPower[comparator]);\n return {type: \"Comparator\", name: comparator, children: [left, right]};\n },\n\n _parseDotRHS: function(rbp) {\n var lookahead = this._lookahead(0);\n var exprTokens = [TOK_UNQUOTEDIDENTIFIER, TOK_QUOTEDIDENTIFIER, TOK_STAR];\n if (exprTokens.indexOf(lookahead) >= 0) {\n return this.expression(rbp);\n } else if (lookahead === TOK_LBRACKET) {\n this._match(TOK_LBRACKET);\n return this._parseMultiselectList();\n } else if (lookahead === TOK_LBRACE) {\n this._match(TOK_LBRACE);\n return this._parseMultiselectHash();\n }\n },\n\n _parseProjectionRHS: function(rbp) {\n var right;\n if (bindingPower[this._lookahead(0)] < 10) {\n right = {type: \"Identity\"};\n } else if (this._lookahead(0) === TOK_LBRACKET) {\n right = this.expression(rbp);\n } else if (this._lookahead(0) === TOK_FILTER) {\n right = this.expression(rbp);\n } else if (this._lookahead(0) === TOK_DOT) {\n this._match(TOK_DOT);\n right = this._parseDotRHS(rbp);\n } else {\n var t = this._lookaheadToken(0);\n var error = new Error(\"Sytanx error, unexpected token: \" +\n t.value + \"(\" + t.type + \")\");\n error.name = \"ParserError\";\n throw error;\n }\n return right;\n },\n\n _parseMultiselectList: function() {\n var expressions = [];\n while (this._lookahead(0) !== TOK_RBRACKET) {\n var expression = this.expression(0);\n expressions.push(expression);\n if (this._lookahead(0) === TOK_COMMA) {\n this._match(TOK_COMMA);\n if (this._lookahead(0) === TOK_RBRACKET) {\n throw new Error(\"Unexpected token Rbracket\");\n }\n }\n }\n this._match(TOK_RBRACKET);\n return {type: \"MultiSelectList\", children: expressions};\n },\n\n _parseMultiselectHash: function() {\n var pairs = [];\n var identifierTypes = [TOK_UNQUOTEDIDENTIFIER, TOK_QUOTEDIDENTIFIER];\n var keyToken, keyName, value, node;\n for (;;) {\n keyToken = this._lookaheadToken(0);\n if (identifierTypes.indexOf(keyToken.type) < 0) {\n throw new Error(\"Expecting an identifier token, got: \" +\n keyToken.type);\n }\n keyName = keyToken.value;\n this._advance();\n this._match(TOK_COLON);\n value = this.expression(0);\n node = {type: \"KeyValuePair\", name: keyName, value: value};\n pairs.push(node);\n if (this._lookahead(0) === TOK_COMMA) {\n this._match(TOK_COMMA);\n } else if (this._lookahead(0) === TOK_RBRACE) {\n this._match(TOK_RBRACE);\n break;\n }\n }\n return {type: \"MultiSelectHash\", children: pairs};\n }\n };\n\n\n function TreeInterpreter(runtime) {\n this.runtime = runtime;\n }\n\n TreeInterpreter.prototype = {\n search: function(node, value) {\n return this.visit(node, value);\n },\n\n visit: function(node, value) {\n var matched, current, result, first, second, field, left, right, collected, i;\n switch (node.type) {\n case \"Field\":\n if (value === null ) {\n return null;\n } else if (isObject(value)) {\n field = value[node.name];\n if (field === undefined) {\n return null;\n } else {\n return field;\n }\n } else {\n return null;\n }\n break;\n case \"Subexpression\":\n result = this.visit(node.children[0], value);\n for (i = 1; i < node.children.length; i++) {\n result = this.visit(node.children[1], result);\n if (result === null) {\n return null;\n }\n }\n return result;\n case \"IndexExpression\":\n left = this.visit(node.children[0], value);\n right = this.visit(node.children[1], left);\n return right;\n case \"Index\":\n if (!isArray(value)) {\n return null;\n }\n var index = node.value;\n if (index < 0) {\n index = value.length + index;\n }\n result = value[index];\n if (result === undefined) {\n result = null;\n }\n return result;\n case \"Slice\":\n if (!isArray(value)) {\n return null;\n }\n var sliceParams = node.children.slice(0);\n var computed = this.computeSliceParams(value.length, sliceParams);\n var start = computed[0];\n var stop = computed[1];\n var step = computed[2];\n result = [];\n if (step > 0) {\n for (i = start; i < stop; i += step) {\n result.push(value[i]);\n }\n } else {\n for (i = start; i > stop; i += step) {\n result.push(value[i]);\n }\n }\n return result;\n case \"Projection\":\n // Evaluate left child.\n var base = this.visit(node.children[0], value);\n if (!isArray(base)) {\n return null;\n }\n collected = [];\n for (i = 0; i < base.length; i++) {\n current = this.visit(node.children[1], base[i]);\n if (current !== null) {\n collected.push(current);\n }\n }\n return collected;\n case \"ValueProjection\":\n // Evaluate left child.\n base = this.visit(node.children[0], value);\n if (!isObject(base)) {\n return null;\n }\n collected = [];\n var values = objValues(base);\n for (i = 0; i < values.length; i++) {\n current = this.visit(node.children[1], values[i]);\n if (current !== null) {\n collected.push(current);\n }\n }\n return collected;\n case \"FilterProjection\":\n base = this.visit(node.children[0], value);\n if (!isArray(base)) {\n return null;\n }\n var filtered = [];\n var finalResults = [];\n for (i = 0; i < base.length; i++) {\n matched = this.visit(node.children[2], base[i]);\n if (!isFalse(matched)) {\n filtered.push(base[i]);\n }\n }\n for (var j = 0; j < filtered.length; j++) {\n current = this.visit(node.children[1], filtered[j]);\n if (current !== null) {\n finalResults.push(current);\n }\n }\n return finalResults;\n case \"Comparator\":\n first = this.visit(node.children[0], value);\n second = this.visit(node.children[1], value);\n switch(node.name) {\n case TOK_EQ:\n result = strictDeepEqual(first, second);\n break;\n case TOK_NE:\n result = !strictDeepEqual(first, second);\n break;\n case TOK_GT:\n result = first > second;\n break;\n case TOK_GTE:\n result = first >= second;\n break;\n case TOK_LT:\n result = first < second;\n break;\n case TOK_LTE:\n result = first <= second;\n break;\n default:\n throw new Error(\"Unknown comparator: \" + node.name);\n }\n return result;\n case TOK_FLATTEN:\n var original = this.visit(node.children[0], value);\n if (!isArray(original)) {\n return null;\n }\n var merged = [];\n for (i = 0; i < original.length; i++) {\n current = original[i];\n if (isArray(current)) {\n merged.push.apply(merged, current);\n } else {\n merged.push(current);\n }\n }\n return merged;\n case \"Identity\":\n return value;\n case \"MultiSelectList\":\n if (value === null) {\n return null;\n }\n collected = [];\n for (i = 0; i < node.children.length; i++) {\n collected.push(this.visit(node.children[i], value));\n }\n return collected;\n case \"MultiSelectHash\":\n if (value === null) {\n return null;\n }\n collected = {};\n var child;\n for (i = 0; i < node.children.length; i++) {\n child = node.children[i];\n collected[child.name] = this.visit(child.value, value);\n }\n return collected;\n case \"OrExpression\":\n matched = this.visit(node.children[0], value);\n if (isFalse(matched)) {\n matched = this.visit(node.children[1], value);\n }\n return matched;\n case \"AndExpression\":\n first = this.visit(node.children[0], value);\n\n if (isFalse(first) === true) {\n return first;\n }\n return this.visit(node.children[1], value);\n case \"NotExpression\":\n first = this.visit(node.children[0], value);\n return isFalse(first);\n case \"Literal\":\n return node.value;\n case TOK_PIPE:\n left = this.visit(node.children[0], value);\n return this.visit(node.children[1], left);\n case TOK_CURRENT:\n return value;\n case \"Function\":\n var resolvedArgs = [];\n for (i = 0; i < node.children.length; i++) {\n resolvedArgs.push(this.visit(node.children[i], value));\n }\n return this.runtime.callFunction(node.name, resolvedArgs);\n case \"ExpressionReference\":\n var refNode = node.children[0];\n // Tag the node with a specific attribute so the type\n // checker verify the type.\n refNode.jmespathType = TOK_EXPREF;\n return refNode;\n default:\n throw new Error(\"Unknown node type: \" + node.type);\n }\n },\n\n computeSliceParams: function(arrayLength, sliceParams) {\n var start = sliceParams[0];\n var stop = sliceParams[1];\n var step = sliceParams[2];\n var computed = [null, null, null];\n if (step === null) {\n step = 1;\n } else if (step === 0) {\n var error = new Error(\"Invalid slice, step cannot be 0\");\n error.name = \"RuntimeError\";\n throw error;\n }\n var stepValueNegative = step < 0 ? true : false;\n\n if (start === null) {\n start = stepValueNegative ? arrayLength - 1 : 0;\n } else {\n start = this.capSliceRange(arrayLength, start, step);\n }\n\n if (stop === null) {\n stop = stepValueNegative ? -1 : arrayLength;\n } else {\n stop = this.capSliceRange(arrayLength, stop, step);\n }\n computed[0] = start;\n computed[1] = stop;\n computed[2] = step;\n return computed;\n },\n\n capSliceRange: function(arrayLength, actualValue, step) {\n if (actualValue < 0) {\n actualValue += arrayLength;\n if (actualValue < 0) {\n actualValue = step < 0 ? -1 : 0;\n }\n } else if (actualValue >= arrayLength) {\n actualValue = step < 0 ? arrayLength - 1 : arrayLength;\n }\n return actualValue;\n }\n\n };\n\n function Runtime(interpreter) {\n this._interpreter = interpreter;\n this.functionTable = {\n // name: [function, ]\n // The can be:\n //\n // {\n // args: [[type1, type2], [type1, type2]],\n // variadic: true|false\n // }\n //\n // Each arg in the arg list is a list of valid types\n // (if the function is overloaded and supports multiple\n // types. If the type is \"any\" then no type checking\n // occurs on the argument. Variadic is optional\n // and if not provided is assumed to be false.\n abs: {_func: this._functionAbs, _signature: [{types: [TYPE_NUMBER]}]},\n avg: {_func: this._functionAvg, _signature: [{types: [TYPE_ARRAY_NUMBER]}]},\n ceil: {_func: this._functionCeil, _signature: [{types: [TYPE_NUMBER]}]},\n contains: {\n _func: this._functionContains,\n _signature: [{types: [TYPE_STRING, TYPE_ARRAY]},\n {types: [TYPE_ANY]}]},\n \"ends_with\": {\n _func: this._functionEndsWith,\n _signature: [{types: [TYPE_STRING]}, {types: [TYPE_STRING]}]},\n floor: {_func: this._functionFloor, _signature: [{types: [TYPE_NUMBER]}]},\n length: {\n _func: this._functionLength,\n _signature: [{types: [TYPE_STRING, TYPE_ARRAY, TYPE_OBJECT]}]},\n map: {\n _func: this._functionMap,\n _signature: [{types: [TYPE_EXPREF]}, {types: [TYPE_ARRAY]}]},\n max: {\n _func: this._functionMax,\n _signature: [{types: [TYPE_ARRAY_NUMBER, TYPE_ARRAY_STRING]}]},\n \"merge\": {\n _func: this._functionMerge,\n _signature: [{types: [TYPE_OBJECT], variadic: true}]\n },\n \"max_by\": {\n _func: this._functionMaxBy,\n _signature: [{types: [TYPE_ARRAY]}, {types: [TYPE_EXPREF]}]\n },\n sum: {_func: this._functionSum, _signature: [{types: [TYPE_ARRAY_NUMBER]}]},\n \"starts_with\": {\n _func: this._functionStartsWith,\n _signature: [{types: [TYPE_STRING]}, {types: [TYPE_STRING]}]},\n min: {\n _func: this._functionMin,\n _signature: [{types: [TYPE_ARRAY_NUMBER, TYPE_ARRAY_STRING]}]},\n \"min_by\": {\n _func: this._functionMinBy,\n _signature: [{types: [TYPE_ARRAY]}, {types: [TYPE_EXPREF]}]\n },\n type: {_func: this._functionType, _signature: [{types: [TYPE_ANY]}]},\n keys: {_func: this._functionKeys, _signature: [{types: [TYPE_OBJECT]}]},\n values: {_func: this._functionValues, _signature: [{types: [TYPE_OBJECT]}]},\n sort: {_func: this._functionSort, _signature: [{types: [TYPE_ARRAY_STRING, TYPE_ARRAY_NUMBER]}]},\n \"sort_by\": {\n _func: this._functionSortBy,\n _signature: [{types: [TYPE_ARRAY]}, {types: [TYPE_EXPREF]}]\n },\n join: {\n _func: this._functionJoin,\n _signature: [\n {types: [TYPE_STRING]},\n {types: [TYPE_ARRAY_STRING]}\n ]\n },\n reverse: {\n _func: this._functionReverse,\n _signature: [{types: [TYPE_STRING, TYPE_ARRAY]}]},\n \"to_array\": {_func: this._functionToArray, _signature: [{types: [TYPE_ANY]}]},\n \"to_string\": {_func: this._functionToString, _signature: [{types: [TYPE_ANY]}]},\n \"to_number\": {_func: this._functionToNumber, _signature: [{types: [TYPE_ANY]}]},\n \"not_null\": {\n _func: this._functionNotNull,\n _signature: [{types: [TYPE_ANY], variadic: true}]\n }\n };\n }\n\n Runtime.prototype = {\n callFunction: function(name, resolvedArgs) {\n var functionEntry = this.functionTable[name];\n if (functionEntry === undefined) {\n throw new Error(\"Unknown function: \" + name + \"()\");\n }\n this._validateArgs(name, resolvedArgs, functionEntry._signature);\n return functionEntry._func.call(this, resolvedArgs);\n },\n\n _validateArgs: function(name, args, signature) {\n // Validating the args requires validating\n // the correct arity and the correct type of each arg.\n // If the last argument is declared as variadic, then we need\n // a minimum number of args to be required. Otherwise it has to\n // be an exact amount.\n var pluralized;\n if (signature[signature.length - 1].variadic) {\n if (args.length < signature.length) {\n pluralized = signature.length === 1 ? \" argument\" : \" arguments\";\n throw new Error(\"ArgumentError: \" + name + \"() \" +\n \"takes at least\" + signature.length + pluralized +\n \" but received \" + args.length);\n }\n } else if (args.length !== signature.length) {\n pluralized = signature.length === 1 ? \" argument\" : \" arguments\";\n throw new Error(\"ArgumentError: \" + name + \"() \" +\n \"takes \" + signature.length + pluralized +\n \" but received \" + args.length);\n }\n var currentSpec;\n var actualType;\n var typeMatched;\n for (var i = 0; i < signature.length; i++) {\n typeMatched = false;\n currentSpec = signature[i].types;\n actualType = this._getTypeName(args[i]);\n for (var j = 0; j < currentSpec.length; j++) {\n if (this._typeMatches(actualType, currentSpec[j], args[i])) {\n typeMatched = true;\n break;\n }\n }\n if (!typeMatched) {\n throw new Error(\"TypeError: \" + name + \"() \" +\n \"expected argument \" + (i + 1) +\n \" to be type \" + currentSpec +\n \" but received type \" + actualType +\n \" instead.\");\n }\n }\n },\n\n _typeMatches: function(actual, expected, argValue) {\n if (expected === TYPE_ANY) {\n return true;\n }\n if (expected === TYPE_ARRAY_STRING ||\n expected === TYPE_ARRAY_NUMBER ||\n expected === TYPE_ARRAY) {\n // The expected type can either just be array,\n // or it can require a specific subtype (array of numbers).\n //\n // The simplest case is if \"array\" with no subtype is specified.\n if (expected === TYPE_ARRAY) {\n return actual === TYPE_ARRAY;\n } else if (actual === TYPE_ARRAY) {\n // Otherwise we need to check subtypes.\n // I think this has potential to be improved.\n var subtype;\n if (expected === TYPE_ARRAY_NUMBER) {\n subtype = TYPE_NUMBER;\n } else if (expected === TYPE_ARRAY_STRING) {\n subtype = TYPE_STRING;\n }\n for (var i = 0; i < argValue.length; i++) {\n if (!this._typeMatches(\n this._getTypeName(argValue[i]), subtype,\n argValue[i])) {\n return false;\n }\n }\n return true;\n }\n } else {\n return actual === expected;\n }\n },\n _getTypeName: function(obj) {\n switch (Object.prototype.toString.call(obj)) {\n case \"[object String]\":\n return TYPE_STRING;\n case \"[object Number]\":\n return TYPE_NUMBER;\n case \"[object Array]\":\n return TYPE_ARRAY;\n case \"[object Boolean]\":\n return TYPE_BOOLEAN;\n case \"[object Null]\":\n return TYPE_NULL;\n case \"[object Object]\":\n // Check if it's an expref. If it has, it's been\n // tagged with a jmespathType attr of 'Expref';\n if (obj.jmespathType === TOK_EXPREF) {\n return TYPE_EXPREF;\n } else {\n return TYPE_OBJECT;\n }\n }\n },\n\n _functionStartsWith: function(resolvedArgs) {\n return resolvedArgs[0].lastIndexOf(resolvedArgs[1]) === 0;\n },\n\n _functionEndsWith: function(resolvedArgs) {\n var searchStr = resolvedArgs[0];\n var suffix = resolvedArgs[1];\n return searchStr.indexOf(suffix, searchStr.length - suffix.length) !== -1;\n },\n\n _functionReverse: function(resolvedArgs) {\n var typeName = this._getTypeName(resolvedArgs[0]);\n if (typeName === TYPE_STRING) {\n var originalStr = resolvedArgs[0];\n var reversedStr = \"\";\n for (var i = originalStr.length - 1; i >= 0; i--) {\n reversedStr += originalStr[i];\n }\n return reversedStr;\n } else {\n var reversedArray = resolvedArgs[0].slice(0);\n reversedArray.reverse();\n return reversedArray;\n }\n },\n\n _functionAbs: function(resolvedArgs) {\n return Math.abs(resolvedArgs[0]);\n },\n\n _functionCeil: function(resolvedArgs) {\n return Math.ceil(resolvedArgs[0]);\n },\n\n _functionAvg: function(resolvedArgs) {\n var sum = 0;\n var inputArray = resolvedArgs[0];\n for (var i = 0; i < inputArray.length; i++) {\n sum += inputArray[i];\n }\n return sum / inputArray.length;\n },\n\n _functionContains: function(resolvedArgs) {\n return resolvedArgs[0].indexOf(resolvedArgs[1]) >= 0;\n },\n\n _functionFloor: function(resolvedArgs) {\n return Math.floor(resolvedArgs[0]);\n },\n\n _functionLength: function(resolvedArgs) {\n if (!isObject(resolvedArgs[0])) {\n return resolvedArgs[0].length;\n } else {\n // As far as I can tell, there's no way to get the length\n // of an object without O(n) iteration through the object.\n return Object.keys(resolvedArgs[0]).length;\n }\n },\n\n _functionMap: function(resolvedArgs) {\n var mapped = [];\n var interpreter = this._interpreter;\n var exprefNode = resolvedArgs[0];\n var elements = resolvedArgs[1];\n for (var i = 0; i < elements.length; i++) {\n mapped.push(interpreter.visit(exprefNode, elements[i]));\n }\n return mapped;\n },\n\n _functionMerge: function(resolvedArgs) {\n var merged = {};\n for (var i = 0; i < resolvedArgs.length; i++) {\n var current = resolvedArgs[i];\n for (var key in current) {\n merged[key] = current[key];\n }\n }\n return merged;\n },\n\n _functionMax: function(resolvedArgs) {\n if (resolvedArgs[0].length > 0) {\n var typeName = this._getTypeName(resolvedArgs[0][0]);\n if (typeName === TYPE_NUMBER) {\n return Math.max.apply(Math, resolvedArgs[0]);\n } else {\n var elements = resolvedArgs[0];\n var maxElement = elements[0];\n for (var i = 1; i < elements.length; i++) {\n if (maxElement.localeCompare(elements[i]) < 0) {\n maxElement = elements[i];\n }\n }\n return maxElement;\n }\n } else {\n return null;\n }\n },\n\n _functionMin: function(resolvedArgs) {\n if (resolvedArgs[0].length > 0) {\n var typeName = this._getTypeName(resolvedArgs[0][0]);\n if (typeName === TYPE_NUMBER) {\n return Math.min.apply(Math, resolvedArgs[0]);\n } else {\n var elements = resolvedArgs[0];\n var minElement = elements[0];\n for (var i = 1; i < elements.length; i++) {\n if (elements[i].localeCompare(minElement) < 0) {\n minElement = elements[i];\n }\n }\n return minElement;\n }\n } else {\n return null;\n }\n },\n\n _functionSum: function(resolvedArgs) {\n var sum = 0;\n var listToSum = resolvedArgs[0];\n for (var i = 0; i < listToSum.length; i++) {\n sum += listToSum[i];\n }\n return sum;\n },\n\n _functionType: function(resolvedArgs) {\n switch (this._getTypeName(resolvedArgs[0])) {\n case TYPE_NUMBER:\n return \"number\";\n case TYPE_STRING:\n return \"string\";\n case TYPE_ARRAY:\n return \"array\";\n case TYPE_OBJECT:\n return \"object\";\n case TYPE_BOOLEAN:\n return \"boolean\";\n case TYPE_EXPREF:\n return \"expref\";\n case TYPE_NULL:\n return \"null\";\n }\n },\n\n _functionKeys: function(resolvedArgs) {\n return Object.keys(resolvedArgs[0]);\n },\n\n _functionValues: function(resolvedArgs) {\n var obj = resolvedArgs[0];\n var keys = Object.keys(obj);\n var values = [];\n for (var i = 0; i < keys.length; i++) {\n values.push(obj[keys[i]]);\n }\n return values;\n },\n\n _functionJoin: function(resolvedArgs) {\n var joinChar = resolvedArgs[0];\n var listJoin = resolvedArgs[1];\n return listJoin.join(joinChar);\n },\n\n _functionToArray: function(resolvedArgs) {\n if (this._getTypeName(resolvedArgs[0]) === TYPE_ARRAY) {\n return resolvedArgs[0];\n } else {\n return [resolvedArgs[0]];\n }\n },\n\n _functionToString: function(resolvedArgs) {\n if (this._getTypeName(resolvedArgs[0]) === TYPE_STRING) {\n return resolvedArgs[0];\n } else {\n return JSON.stringify(resolvedArgs[0]);\n }\n },\n\n _functionToNumber: function(resolvedArgs) {\n var typeName = this._getTypeName(resolvedArgs[0]);\n var convertedValue;\n if (typeName === TYPE_NUMBER) {\n return resolvedArgs[0];\n } else if (typeName === TYPE_STRING) {\n convertedValue = +resolvedArgs[0];\n if (!isNaN(convertedValue)) {\n return convertedValue;\n }\n }\n return null;\n },\n\n _functionNotNull: function(resolvedArgs) {\n for (var i = 0; i < resolvedArgs.length; i++) {\n if (this._getTypeName(resolvedArgs[i]) !== TYPE_NULL) {\n return resolvedArgs[i];\n }\n }\n return null;\n },\n\n _functionSort: function(resolvedArgs) {\n var sortedArray = resolvedArgs[0].slice(0);\n sortedArray.sort();\n return sortedArray;\n },\n\n _functionSortBy: function(resolvedArgs) {\n var sortedArray = resolvedArgs[0].slice(0);\n if (sortedArray.length === 0) {\n return sortedArray;\n }\n var interpreter = this._interpreter;\n var exprefNode = resolvedArgs[1];\n var requiredType = this._getTypeName(\n interpreter.visit(exprefNode, sortedArray[0]));\n if ([TYPE_NUMBER, TYPE_STRING].indexOf(requiredType) < 0) {\n throw new Error(\"TypeError\");\n }\n var that = this;\n // In order to get a stable sort out of an unstable\n // sort algorithm, we decorate/sort/undecorate (DSU)\n // by creating a new list of [index, element] pairs.\n // In the cmp function, if the evaluated elements are\n // equal, then the index will be used as the tiebreaker.\n // After the decorated list has been sorted, it will be\n // undecorated to extract the original elements.\n var decorated = [];\n for (var i = 0; i < sortedArray.length; i++) {\n decorated.push([i, sortedArray[i]]);\n }\n decorated.sort(function(a, b) {\n var exprA = interpreter.visit(exprefNode, a[1]);\n var exprB = interpreter.visit(exprefNode, b[1]);\n if (that._getTypeName(exprA) !== requiredType) {\n throw new Error(\n \"TypeError: expected \" + requiredType + \", received \" +\n that._getTypeName(exprA));\n } else if (that._getTypeName(exprB) !== requiredType) {\n throw new Error(\n \"TypeError: expected \" + requiredType + \", received \" +\n that._getTypeName(exprB));\n }\n if (exprA > exprB) {\n return 1;\n } else if (exprA < exprB) {\n return -1;\n } else {\n // If they're equal compare the items by their\n // order to maintain relative order of equal keys\n // (i.e. to get a stable sort).\n return a[0] - b[0];\n }\n });\n // Undecorate: extract out the original list elements.\n for (var j = 0; j < decorated.length; j++) {\n sortedArray[j] = decorated[j][1];\n }\n return sortedArray;\n },\n\n _functionMaxBy: function(resolvedArgs) {\n var exprefNode = resolvedArgs[1];\n var resolvedArray = resolvedArgs[0];\n var keyFunction = this.createKeyFunction(exprefNode, [TYPE_NUMBER, TYPE_STRING]);\n var maxNumber = -Infinity;\n var maxRecord;\n var current;\n for (var i = 0; i < resolvedArray.length; i++) {\n current = keyFunction(resolvedArray[i]);\n if (current > maxNumber) {\n maxNumber = current;\n maxRecord = resolvedArray[i];\n }\n }\n return maxRecord;\n },\n\n _functionMinBy: function(resolvedArgs) {\n var exprefNode = resolvedArgs[1];\n var resolvedArray = resolvedArgs[0];\n var keyFunction = this.createKeyFunction(exprefNode, [TYPE_NUMBER, TYPE_STRING]);\n var minNumber = Infinity;\n var minRecord;\n var current;\n for (var i = 0; i < resolvedArray.length; i++) {\n current = keyFunction(resolvedArray[i]);\n if (current < minNumber) {\n minNumber = current;\n minRecord = resolvedArray[i];\n }\n }\n return minRecord;\n },\n\n createKeyFunction: function(exprefNode, allowedTypes) {\n var that = this;\n var interpreter = this._interpreter;\n var keyFunc = function(x) {\n var current = interpreter.visit(exprefNode, x);\n if (allowedTypes.indexOf(that._getTypeName(current)) < 0) {\n var msg = \"TypeError: expected one of \" + allowedTypes +\n \", received \" + that._getTypeName(current);\n throw new Error(msg);\n }\n return current;\n };\n return keyFunc;\n }\n\n };\n\n function compile(stream) {\n var parser = new Parser();\n var ast = parser.parse(stream);\n return ast;\n }\n\n function tokenize(stream) {\n var lexer = new Lexer();\n return lexer.tokenize(stream);\n }\n\n function search(data, expression) {\n var parser = new Parser();\n // This needs to be improved. Both the interpreter and runtime depend on\n // each other. The runtime needs the interpreter to support exprefs.\n // There's likely a clean way to avoid the cyclic dependency.\n var runtime = new Runtime();\n var interpreter = new TreeInterpreter(runtime);\n runtime._interpreter = interpreter;\n var node = parser.parse(expression);\n return interpreter.search(node, data);\n }\n\n exports.tokenize = tokenize;\n exports.compile = compile;\n exports.search = search;\n exports.strictDeepEqual = strictDeepEqual;\n})(typeof exports === \"undefined\" ? this.jmespath = {} : exports);\n","var util = require('../util');\nvar property = util.property;\n\nfunction ResourceWaiter(name, waiter, options) {\n options = options || {};\n property(this, 'name', name);\n property(this, 'api', options.api, false);\n\n if (waiter.operation) {\n property(this, 'operation', util.string.lowerFirst(waiter.operation));\n }\n\n var self = this;\n var keys = [\n 'type',\n 'description',\n 'delay',\n 'maxAttempts',\n 'acceptors'\n ];\n\n keys.forEach(function(key) {\n var value = waiter[key];\n if (value) {\n property(self, key, value);\n }\n });\n}\n\n/**\n * @api private\n */\nmodule.exports = ResourceWaiter;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['directconnect'] = {};\nAWS.DirectConnect = Service.defineService('directconnect', ['2012-10-25']);\nObject.defineProperty(apiLoader.services['directconnect'], '2012-10-25', {\n get: function get() {\n var model = require('../apis/directconnect-2012-10-25.min.json');\n model.paginators = require('../apis/directconnect-2012-10-25.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.DirectConnect;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['translate'] = {};\nAWS.Translate = Service.defineService('translate', ['2017-07-01']);\nObject.defineProperty(apiLoader.services['translate'], '2017-07-01', {\n get: function get() {\n var model = require('../apis/translate-2017-07-01.min.json');\n model.paginators = require('../apis/translate-2017-07-01.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.Translate;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['iam'] = {};\nAWS.IAM = Service.defineService('iam', ['2010-05-08']);\nObject.defineProperty(apiLoader.services['iam'], '2010-05-08', {\n get: function get() {\n var model = require('../apis/iam-2010-05-08.min.json');\n model.paginators = require('../apis/iam-2010-05-08.paginators.json').pagination;\n model.waiters = require('../apis/iam-2010-05-08.waiters2.json').waiters;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.IAM;\n","var AWS = require('../core');\nvar inherit = AWS.util.inherit;\n\n/**\n * @api private\n */\nAWS.Signers.V2 = inherit(AWS.Signers.RequestSigner, {\n addAuthorization: function addAuthorization(credentials, date) {\n\n if (!date) date = AWS.util.date.getDate();\n\n var r = this.request;\n\n r.params.Timestamp = AWS.util.date.iso8601(date);\n r.params.SignatureVersion = '2';\n r.params.SignatureMethod = 'HmacSHA256';\n r.params.AWSAccessKeyId = credentials.accessKeyId;\n\n if (credentials.sessionToken) {\n r.params.SecurityToken = credentials.sessionToken;\n }\n\n delete r.params.Signature; // delete old Signature for re-signing\n r.params.Signature = this.signature(credentials);\n\n r.body = AWS.util.queryParamsToString(r.params);\n r.headers['Content-Length'] = r.body.length;\n },\n\n signature: function signature(credentials) {\n return AWS.util.crypto.hmac(credentials.secretAccessKey, this.stringToSign(), 'base64');\n },\n\n stringToSign: function stringToSign() {\n var parts = [];\n parts.push(this.request.method);\n parts.push(this.request.endpoint.host.toLowerCase());\n parts.push(this.request.pathname());\n parts.push(AWS.util.queryParamsToString(this.request.params));\n return parts.join('\\n');\n }\n\n});\n\n/**\n * @api private\n */\nmodule.exports = AWS.Signers.V2;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['dynamodbstreams'] = {};\nAWS.DynamoDBStreams = Service.defineService('dynamodbstreams', ['2012-08-10']);\nObject.defineProperty(apiLoader.services['dynamodbstreams'], '2012-08-10', {\n get: function get() {\n var model = require('../apis/streams.dynamodb-2012-08-10.min.json');\n model.paginators = require('../apis/streams.dynamodb-2012-08-10.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.DynamoDBStreams;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['apigateway'] = {};\nAWS.APIGateway = Service.defineService('apigateway', ['2015-07-09']);\nrequire('../lib/services/apigateway');\nObject.defineProperty(apiLoader.services['apigateway'], '2015-07-09', {\n get: function get() {\n var model = require('../apis/apigateway-2015-07-09.min.json');\n model.paginators = require('../apis/apigateway-2015-07-09.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.APIGateway;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar LRU_1 = require(\"./utils/LRU\");\nvar CACHE_SIZE = 1000;\n/**\n * Inspired node-lru-cache[https://github.com/isaacs/node-lru-cache]\n */\nvar EndpointCache = /** @class */ (function () {\n function EndpointCache(maxSize) {\n if (maxSize === void 0) { maxSize = CACHE_SIZE; }\n this.maxSize = maxSize;\n this.cache = new LRU_1.LRUCache(maxSize);\n }\n ;\n Object.defineProperty(EndpointCache.prototype, \"size\", {\n get: function () {\n return this.cache.length;\n },\n enumerable: true,\n configurable: true\n });\n EndpointCache.prototype.put = function (key, value) {\n var keyString = typeof key !== 'string' ? EndpointCache.getKeyString(key) : key;\n var endpointRecord = this.populateValue(value);\n this.cache.put(keyString, endpointRecord);\n };\n EndpointCache.prototype.get = function (key) {\n var keyString = typeof key !== 'string' ? EndpointCache.getKeyString(key) : key;\n var now = Date.now();\n var records = this.cache.get(keyString);\n if (records) {\n for (var i = 0; i < records.length; i++) {\n var record = records[i];\n if (record.Expire < now) {\n this.cache.remove(keyString);\n return undefined;\n }\n }\n }\n return records;\n };\n EndpointCache.getKeyString = function (key) {\n var identifiers = [];\n var identifierNames = Object.keys(key).sort();\n for (var i = 0; i < identifierNames.length; i++) {\n var identifierName = identifierNames[i];\n if (key[identifierName] === undefined)\n continue;\n identifiers.push(key[identifierName]);\n }\n return identifiers.join(' ');\n };\n EndpointCache.prototype.populateValue = function (endpoints) {\n var now = Date.now();\n return endpoints.map(function (endpoint) { return ({\n Address: endpoint.Address || '',\n Expire: now + (endpoint.CachePeriodInMinutes || 1) * 60 * 1000\n }); });\n };\n EndpointCache.prototype.empty = function () {\n this.cache.empty();\n };\n EndpointCache.prototype.remove = function (key) {\n var keyString = typeof key !== 'string' ? EndpointCache.getKeyString(key) : key;\n this.cache.remove(keyString);\n };\n return EndpointCache;\n}());\nexports.EndpointCache = EndpointCache;","var AWS = require('../core');\n\n/**\n * @api private\n */\nvar cachedSecret = {};\n\n/**\n * @api private\n */\nvar cacheQueue = [];\n\n/**\n * @api private\n */\nvar maxCacheEntries = 50;\n\n/**\n * @api private\n */\nvar v4Identifier = 'aws4_request';\n\n/**\n * @api private\n */\nmodule.exports = {\n /**\n * @api private\n *\n * @param date [String]\n * @param region [String]\n * @param serviceName [String]\n * @return [String]\n */\n createScope: function createScope(date, region, serviceName) {\n return [\n date.substr(0, 8),\n region,\n serviceName,\n v4Identifier\n ].join('/');\n },\n\n /**\n * @api private\n *\n * @param credentials [Credentials]\n * @param date [String]\n * @param region [String]\n * @param service [String]\n * @param shouldCache [Boolean]\n * @return [String]\n */\n getSigningKey: function getSigningKey(\n credentials,\n date,\n region,\n service,\n shouldCache\n ) {\n var credsIdentifier = AWS.util.crypto\n .hmac(credentials.secretAccessKey, credentials.accessKeyId, 'base64');\n var cacheKey = [credsIdentifier, date, region, service].join('_');\n shouldCache = shouldCache !== false;\n if (shouldCache && (cacheKey in cachedSecret)) {\n return cachedSecret[cacheKey];\n }\n\n var kDate = AWS.util.crypto.hmac(\n 'AWS4' + credentials.secretAccessKey,\n date,\n 'buffer'\n );\n var kRegion = AWS.util.crypto.hmac(kDate, region, 'buffer');\n var kService = AWS.util.crypto.hmac(kRegion, service, 'buffer');\n\n var signingKey = AWS.util.crypto.hmac(kService, v4Identifier, 'buffer');\n if (shouldCache) {\n cachedSecret[cacheKey] = signingKey;\n cacheQueue.push(cacheKey);\n if (cacheQueue.length > maxCacheEntries) {\n // remove the oldest entry (not the least recently used)\n delete cachedSecret[cacheQueue.shift()];\n }\n }\n\n return signingKey;\n },\n\n /**\n * @api private\n *\n * Empties the derived signing key cache. Made available for testing purposes\n * only.\n */\n emptyCache: function emptyCache() {\n cachedSecret = {};\n cacheQueue = [];\n }\n};\n","var AWS = require('../core');\n\n/**\n * @api private\n */\nvar blobPayloadOutputOps = [\n 'deleteThingShadow',\n 'getThingShadow',\n 'updateThingShadow'\n];\n\n/**\n * Constructs a service interface object. Each API operation is exposed as a\n * function on service.\n *\n * ### Sending a Request Using IotData\n *\n * ```javascript\n * var iotdata = new AWS.IotData({endpoint: 'my.host.tld'});\n * iotdata.getThingShadow(params, function (err, data) {\n * if (err) console.log(err, err.stack); // an error occurred\n * else console.log(data); // successful response\n * });\n * ```\n *\n * ### Locking the API Version\n *\n * In order to ensure that the IotData object uses this specific API,\n * you can construct the object by passing the `apiVersion` option to the\n * constructor:\n *\n * ```javascript\n * var iotdata = new AWS.IotData({\n * endpoint: 'my.host.tld',\n * apiVersion: '2015-05-28'\n * });\n * ```\n *\n * You can also set the API version globally in `AWS.config.apiVersions` using\n * the **iotdata** service identifier:\n *\n * ```javascript\n * AWS.config.apiVersions = {\n * iotdata: '2015-05-28',\n * // other service API versions\n * };\n *\n * var iotdata = new AWS.IotData({endpoint: 'my.host.tld'});\n * ```\n *\n * @note You *must* provide an `endpoint` configuration parameter when\n * constructing this service. See {constructor} for more information.\n *\n * @!method constructor(options = {})\n * Constructs a service object. This object has one method for each\n * API operation.\n *\n * @example Constructing a IotData object\n * var iotdata = new AWS.IotData({endpoint: 'my.host.tld'});\n * @note You *must* provide an `endpoint` when constructing this service.\n * @option (see AWS.Config.constructor)\n *\n * @service iotdata\n * @version 2015-05-28\n */\nAWS.util.update(AWS.IotData.prototype, {\n /**\n * @api private\n */\n validateService: function validateService() {\n if (!this.config.endpoint || this.config.endpoint.indexOf('{') >= 0) {\n var msg = 'AWS.IotData requires an explicit ' +\n '`endpoint\\' configuration option.';\n throw AWS.util.error(new Error(),\n {name: 'InvalidEndpoint', message: msg});\n }\n },\n\n /**\n * @api private\n */\n setupRequestListeners: function setupRequestListeners(request) {\n request.addListener('validateResponse', this.validateResponseBody);\n if (blobPayloadOutputOps.indexOf(request.operation) > -1) {\n request.addListener('extractData', AWS.util.convertPayloadToString);\n }\n },\n\n /**\n * @api private\n */\n validateResponseBody: function validateResponseBody(resp) {\n var body = resp.httpResponse.body.toString() || '{}';\n var bodyCheck = body.trim();\n if (!bodyCheck || bodyCheck.charAt(0) !== '{') {\n resp.httpResponse.body = '';\n }\n }\n\n});\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['iotanalytics'] = {};\nAWS.IoTAnalytics = Service.defineService('iotanalytics', ['2017-11-27']);\nObject.defineProperty(apiLoader.services['iotanalytics'], '2017-11-27', {\n get: function get() {\n var model = require('../apis/iotanalytics-2017-11-27.min.json');\n model.paginators = require('../apis/iotanalytics-2017-11-27.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.IoTAnalytics;\n","var AWS = require('../core');\nvar inherit = AWS.util.inherit;\n\n/**\n * @api private\n */\nvar expiresHeader = 'presigned-expires';\n\n/**\n * @api private\n */\nfunction signedUrlBuilder(request) {\n var expires = request.httpRequest.headers[expiresHeader];\n var signerClass = request.service.getSignerClass(request);\n\n delete request.httpRequest.headers['User-Agent'];\n delete request.httpRequest.headers['X-Amz-User-Agent'];\n\n if (signerClass === AWS.Signers.V4) {\n if (expires > 604800) { // one week expiry is invalid\n var message = 'Presigning does not support expiry time greater ' +\n 'than a week with SigV4 signing.';\n throw AWS.util.error(new Error(), {\n code: 'InvalidExpiryTime', message: message, retryable: false\n });\n }\n request.httpRequest.headers[expiresHeader] = expires;\n } else if (signerClass === AWS.Signers.S3) {\n var now = request.service ? request.service.getSkewCorrectedDate() : AWS.util.date.getDate();\n request.httpRequest.headers[expiresHeader] = parseInt(\n AWS.util.date.unixTimestamp(now) + expires, 10).toString();\n } else {\n throw AWS.util.error(new Error(), {\n message: 'Presigning only supports S3 or SigV4 signing.',\n code: 'UnsupportedSigner', retryable: false\n });\n }\n}\n\n/**\n * @api private\n */\nfunction signedUrlSigner(request) {\n var endpoint = request.httpRequest.endpoint;\n var parsedUrl = AWS.util.urlParse(request.httpRequest.path);\n var queryParams = {};\n\n if (parsedUrl.search) {\n queryParams = AWS.util.queryStringParse(parsedUrl.search.substr(1));\n }\n\n var auth = request.httpRequest.headers['Authorization'].split(' ');\n if (auth[0] === 'AWS') {\n auth = auth[1].split(':');\n queryParams['Signature'] = auth.pop();\n queryParams['AWSAccessKeyId'] = auth.join(':');\n\n AWS.util.each(request.httpRequest.headers, function (key, value) {\n if (key === expiresHeader) key = 'Expires';\n if (key.indexOf('x-amz-meta-') === 0) {\n // Delete existing, potentially not normalized key\n delete queryParams[key];\n key = key.toLowerCase();\n }\n queryParams[key] = value;\n });\n delete request.httpRequest.headers[expiresHeader];\n delete queryParams['Authorization'];\n delete queryParams['Host'];\n } else if (auth[0] === 'AWS4-HMAC-SHA256') { // SigV4 signing\n auth.shift();\n var rest = auth.join(' ');\n var signature = rest.match(/Signature=(.*?)(?:,|\\s|\\r?\\n|$)/)[1];\n queryParams['X-Amz-Signature'] = signature;\n delete queryParams['Expires'];\n }\n\n // build URL\n endpoint.pathname = parsedUrl.pathname;\n endpoint.search = AWS.util.queryParamsToString(queryParams);\n}\n\n/**\n * @api private\n */\nAWS.Signers.Presign = inherit({\n /**\n * @api private\n */\n sign: function sign(request, expireTime, callback) {\n request.httpRequest.headers[expiresHeader] = expireTime || 3600;\n request.on('build', signedUrlBuilder);\n request.on('sign', signedUrlSigner);\n request.removeListener('afterBuild',\n AWS.EventListeners.Core.SET_CONTENT_LENGTH);\n request.removeListener('afterBuild',\n AWS.EventListeners.Core.COMPUTE_SHA256);\n\n request.emit('beforePresign', [request]);\n\n if (callback) {\n request.build(function() {\n if (this.response.error) callback(this.response.error);\n else {\n callback(null, AWS.util.urlFormat(request.httpRequest.endpoint));\n }\n });\n } else {\n request.build();\n if (request.response.error) throw request.response.error;\n return AWS.util.urlFormat(request.httpRequest.endpoint);\n }\n }\n});\n\n/**\n * @api private\n */\nmodule.exports = AWS.Signers.Presign;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['elb'] = {};\nAWS.ELB = Service.defineService('elb', ['2012-06-01']);\nObject.defineProperty(apiLoader.services['elb'], '2012-06-01', {\n get: function get() {\n var model = require('../apis/elasticloadbalancing-2012-06-01.min.json');\n model.paginators = require('../apis/elasticloadbalancing-2012-06-01.paginators.json').pagination;\n model.waiters = require('../apis/elasticloadbalancing-2012-06-01.waiters2.json').waiters;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.ELB;\n","var AWS = require('../core');\n\nAWS.util.update(AWS.MachineLearning.prototype, {\n /**\n * @api private\n */\n setupRequestListeners: function setupRequestListeners(request) {\n if (request.operation === 'predict') {\n request.addListener('build', this.buildEndpoint);\n }\n },\n\n /**\n * Updates request endpoint from PredictEndpoint\n * @api private\n */\n buildEndpoint: function buildEndpoint(request) {\n var url = request.params.PredictEndpoint;\n if (url) {\n request.httpRequest.endpoint = new AWS.Endpoint(url);\n }\n }\n\n});\n","var AWS = require('../core');\nvar util = AWS.util;\nvar typeOf = require('./types').typeOf;\nvar DynamoDBSet = require('./set');\nvar NumberValue = require('./numberValue');\n\nAWS.DynamoDB.Converter = {\n /**\n * Convert a JavaScript value to its equivalent DynamoDB AttributeValue type\n *\n * @param data [any] The data to convert to a DynamoDB AttributeValue\n * @param options [map]\n * @option options convertEmptyValues [Boolean] Whether to automatically\n * convert empty strings, blobs,\n * and sets to `null`\n * @option options wrapNumbers [Boolean] Whether to return numbers as a\n * NumberValue object instead of\n * converting them to native JavaScript\n * numbers. This allows for the safe\n * round-trip transport of numbers of\n * arbitrary size.\n * @return [map] An object in the Amazon DynamoDB AttributeValue format\n *\n * @see AWS.DynamoDB.Converter.marshall AWS.DynamoDB.Converter.marshall to\n * convert entire records (rather than individual attributes)\n */\n input: function convertInput(data, options) {\n options = options || {};\n var type = typeOf(data);\n if (type === 'Object') {\n return formatMap(data, options);\n } else if (type === 'Array') {\n return formatList(data, options);\n } else if (type === 'Set') {\n return formatSet(data, options);\n } else if (type === 'String') {\n if (data.length === 0 && options.convertEmptyValues) {\n return convertInput(null);\n }\n return { S: data };\n } else if (type === 'Number' || type === 'NumberValue') {\n return { N: data.toString() };\n } else if (type === 'Binary') {\n if (data.length === 0 && options.convertEmptyValues) {\n return convertInput(null);\n }\n return { B: data };\n } else if (type === 'Boolean') {\n return { BOOL: data };\n } else if (type === 'null') {\n return { NULL: true };\n } else if (type !== 'undefined' && type !== 'Function') {\n // this value has a custom constructor\n return formatMap(data, options);\n }\n },\n\n /**\n * Convert a JavaScript object into a DynamoDB record.\n *\n * @param data [any] The data to convert to a DynamoDB record\n * @param options [map]\n * @option options convertEmptyValues [Boolean] Whether to automatically\n * convert empty strings, blobs,\n * and sets to `null`\n * @option options wrapNumbers [Boolean] Whether to return numbers as a\n * NumberValue object instead of\n * converting them to native JavaScript\n * numbers. This allows for the safe\n * round-trip transport of numbers of\n * arbitrary size.\n *\n * @return [map] An object in the DynamoDB record format.\n *\n * @example Convert a JavaScript object into a DynamoDB record\n * var marshalled = AWS.DynamoDB.Converter.marshall({\n * string: 'foo',\n * list: ['fizz', 'buzz', 'pop'],\n * map: {\n * nestedMap: {\n * key: 'value',\n * }\n * },\n * number: 123,\n * nullValue: null,\n * boolValue: true,\n * stringSet: new DynamoDBSet(['foo', 'bar', 'baz'])\n * });\n */\n marshall: function marshallItem(data, options) {\n return AWS.DynamoDB.Converter.input(data, options).M;\n },\n\n /**\n * Convert a DynamoDB AttributeValue object to its equivalent JavaScript type.\n *\n * @param data [map] An object in the Amazon DynamoDB AttributeValue format\n * @param options [map]\n * @option options convertEmptyValues [Boolean] Whether to automatically\n * convert empty strings, blobs,\n * and sets to `null`\n * @option options wrapNumbers [Boolean] Whether to return numbers as a\n * NumberValue object instead of\n * converting them to native JavaScript\n * numbers. This allows for the safe\n * round-trip transport of numbers of\n * arbitrary size.\n *\n * @return [Object|Array|String|Number|Boolean|null]\n *\n * @see AWS.DynamoDB.Converter.unmarshall AWS.DynamoDB.Converter.unmarshall to\n * convert entire records (rather than individual attributes)\n */\n output: function convertOutput(data, options) {\n options = options || {};\n var list, map, i;\n for (var type in data) {\n var values = data[type];\n if (type === 'M') {\n map = {};\n for (var key in values) {\n map[key] = convertOutput(values[key], options);\n }\n return map;\n } else if (type === 'L') {\n list = [];\n for (i = 0; i < values.length; i++) {\n list.push(convertOutput(values[i], options));\n }\n return list;\n } else if (type === 'SS') {\n list = [];\n for (i = 0; i < values.length; i++) {\n list.push(values[i] + '');\n }\n return new DynamoDBSet(list);\n } else if (type === 'NS') {\n list = [];\n for (i = 0; i < values.length; i++) {\n list.push(convertNumber(values[i], options.wrapNumbers));\n }\n return new DynamoDBSet(list);\n } else if (type === 'BS') {\n list = [];\n for (i = 0; i < values.length; i++) {\n list.push(AWS.util.buffer.toBuffer(values[i]));\n }\n return new DynamoDBSet(list);\n } else if (type === 'S') {\n return values + '';\n } else if (type === 'N') {\n return convertNumber(values, options.wrapNumbers);\n } else if (type === 'B') {\n return util.buffer.toBuffer(values);\n } else if (type === 'BOOL') {\n return (values === 'true' || values === 'TRUE' || values === true);\n } else if (type === 'NULL') {\n return null;\n }\n }\n },\n\n /**\n * Convert a DynamoDB record into a JavaScript object.\n *\n * @param data [any] The DynamoDB record\n * @param options [map]\n * @option options convertEmptyValues [Boolean] Whether to automatically\n * convert empty strings, blobs,\n * and sets to `null`\n * @option options wrapNumbers [Boolean] Whether to return numbers as a\n * NumberValue object instead of\n * converting them to native JavaScript\n * numbers. This allows for the safe\n * round-trip transport of numbers of\n * arbitrary size.\n *\n * @return [map] An object whose properties have been converted from\n * DynamoDB's AttributeValue format into their corresponding native\n * JavaScript types.\n *\n * @example Convert a record received from a DynamoDB stream\n * var unmarshalled = AWS.DynamoDB.Converter.unmarshall({\n * string: {S: 'foo'},\n * list: {L: [{S: 'fizz'}, {S: 'buzz'}, {S: 'pop'}]},\n * map: {\n * M: {\n * nestedMap: {\n * M: {\n * key: {S: 'value'}\n * }\n * }\n * }\n * },\n * number: {N: '123'},\n * nullValue: {NULL: true},\n * boolValue: {BOOL: true}\n * });\n */\n unmarshall: function unmarshall(data, options) {\n return AWS.DynamoDB.Converter.output({M: data}, options);\n }\n};\n\n/**\n * @api private\n * @param data [Array]\n * @param options [map]\n */\nfunction formatList(data, options) {\n var list = {L: []};\n for (var i = 0; i < data.length; i++) {\n list['L'].push(AWS.DynamoDB.Converter.input(data[i], options));\n }\n return list;\n}\n\n/**\n * @api private\n * @param value [String]\n * @param wrapNumbers [Boolean]\n */\nfunction convertNumber(value, wrapNumbers) {\n return wrapNumbers ? new NumberValue(value) : Number(value);\n}\n\n/**\n * @api private\n * @param data [map]\n * @param options [map]\n */\nfunction formatMap(data, options) {\n var map = {M: {}};\n for (var key in data) {\n var formatted = AWS.DynamoDB.Converter.input(data[key], options);\n if (formatted !== void 0) {\n map['M'][key] = formatted;\n }\n }\n return map;\n}\n\n/**\n * @api private\n */\nfunction formatSet(data, options) {\n options = options || {};\n var values = data.values;\n if (options.convertEmptyValues) {\n values = filterEmptySetValues(data);\n if (values.length === 0) {\n return AWS.DynamoDB.Converter.input(null);\n }\n }\n\n var map = {};\n switch (data.type) {\n case 'String': map['SS'] = values; break;\n case 'Binary': map['BS'] = values; break;\n case 'Number': map['NS'] = values.map(function (value) {\n return value.toString();\n });\n }\n return map;\n}\n\n/**\n * @api private\n */\nfunction filterEmptySetValues(set) {\n var nonEmptyValues = [];\n var potentiallyEmptyTypes = {\n String: true,\n Binary: true,\n Number: false\n };\n if (potentiallyEmptyTypes[set.type]) {\n for (var i = 0; i < set.values.length; i++) {\n if (set.values[i].length === 0) {\n continue;\n }\n nonEmptyValues.push(set.values[i]);\n }\n\n return nonEmptyValues;\n }\n\n return set.values;\n}\n\n/**\n * @api private\n */\nmodule.exports = AWS.DynamoDB.Converter;\n","require('../lib/node_loader');\nmodule.exports = {\n ACM: require('./acm'),\n APIGateway: require('./apigateway'),\n ApplicationAutoScaling: require('./applicationautoscaling'),\n AutoScaling: require('./autoscaling'),\n CloudFormation: require('./cloudformation'),\n CloudFront: require('./cloudfront'),\n CloudHSM: require('./cloudhsm'),\n CloudTrail: require('./cloudtrail'),\n CloudWatch: require('./cloudwatch'),\n CloudWatchEvents: require('./cloudwatchevents'),\n CloudWatchLogs: require('./cloudwatchlogs'),\n CodeBuild: require('./codebuild'),\n CodeCommit: require('./codecommit'),\n CodeDeploy: require('./codedeploy'),\n CodePipeline: require('./codepipeline'),\n CognitoIdentity: require('./cognitoidentity'),\n CognitoIdentityServiceProvider: require('./cognitoidentityserviceprovider'),\n CognitoSync: require('./cognitosync'),\n ConfigService: require('./configservice'),\n CUR: require('./cur'),\n DeviceFarm: require('./devicefarm'),\n DirectConnect: require('./directconnect'),\n DynamoDB: require('./dynamodb'),\n DynamoDBStreams: require('./dynamodbstreams'),\n EC2: require('./ec2'),\n ECR: require('./ecr'),\n ECS: require('./ecs'),\n EFS: require('./efs'),\n ElastiCache: require('./elasticache'),\n ElasticBeanstalk: require('./elasticbeanstalk'),\n ELB: require('./elb'),\n ELBv2: require('./elbv2'),\n EMR: require('./emr'),\n ElasticTranscoder: require('./elastictranscoder'),\n Firehose: require('./firehose'),\n GameLift: require('./gamelift'),\n IAM: require('./iam'),\n Inspector: require('./inspector'),\n Iot: require('./iot'),\n IotData: require('./iotdata'),\n Kinesis: require('./kinesis'),\n KMS: require('./kms'),\n Lambda: require('./lambda'),\n LexRuntime: require('./lexruntime'),\n MachineLearning: require('./machinelearning'),\n MarketplaceCommerceAnalytics: require('./marketplacecommerceanalytics'),\n MTurk: require('./mturk'),\n MobileAnalytics: require('./mobileanalytics'),\n OpsWorks: require('./opsworks'),\n Polly: require('./polly'),\n RDS: require('./rds'),\n Redshift: require('./redshift'),\n Rekognition: require('./rekognition'),\n Route53: require('./route53'),\n Route53Domains: require('./route53domains'),\n S3: require('./s3'),\n ServiceCatalog: require('./servicecatalog'),\n SES: require('./ses'),\n SNS: require('./sns'),\n SQS: require('./sqs'),\n SSM: require('./ssm'),\n StorageGateway: require('./storagegateway'),\n STS: require('./sts'),\n XRay: require('./xray'),\n WAF: require('./waf'),\n WorkDocs: require('./workdocs'),\n LexModelBuildingService: require('./lexmodelbuildingservice'),\n Pricing: require('./pricing'),\n CostExplorer: require('./costexplorer'),\n MediaStoreData: require('./mediastoredata'),\n Comprehend: require('./comprehend'),\n KinesisVideoArchivedMedia: require('./kinesisvideoarchivedmedia'),\n KinesisVideoMedia: require('./kinesisvideomedia'),\n KinesisVideo: require('./kinesisvideo'),\n Translate: require('./translate'),\n ResourceGroups: require('./resourcegroups'),\n Connect: require('./connect'),\n SecretsManager: require('./secretsmanager'),\n IoTAnalytics: require('./iotanalytics'),\n ComprehendMedical: require('./comprehendmedical'),\n Personalize: require('./personalize'),\n PersonalizeEvents: require('./personalizeevents'),\n PersonalizeRuntime: require('./personalizeruntime'),\n ForecastService: require('./forecastservice'),\n ForecastQueryService: require('./forecastqueryservice'),\n KinesisVideoSignalingChannels: require('./kinesisvideosignalingchannels')\n};","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['codepipeline'] = {};\nAWS.CodePipeline = Service.defineService('codepipeline', ['2015-07-09']);\nObject.defineProperty(apiLoader.services['codepipeline'], '2015-07-09', {\n get: function get() {\n var model = require('../apis/codepipeline-2015-07-09.min.json');\n model.paginators = require('../apis/codepipeline-2015-07-09.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.CodePipeline;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['kinesis'] = {};\nAWS.Kinesis = Service.defineService('kinesis', ['2013-12-02']);\nObject.defineProperty(apiLoader.services['kinesis'], '2013-12-02', {\n get: function get() {\n var model = require('../apis/kinesis-2013-12-02.min.json');\n model.paginators = require('../apis/kinesis-2013-12-02.paginators.json').pagination;\n model.waiters = require('../apis/kinesis-2013-12-02.waiters2.json').waiters;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.Kinesis;\n","var util = require('../util');\n\nfunction JsonBuilder() { }\n\nJsonBuilder.prototype.build = function(value, shape) {\n return JSON.stringify(translate(value, shape));\n};\n\nfunction translate(value, shape) {\n if (!shape || value === undefined || value === null) return undefined;\n\n switch (shape.type) {\n case 'structure': return translateStructure(value, shape);\n case 'map': return translateMap(value, shape);\n case 'list': return translateList(value, shape);\n default: return translateScalar(value, shape);\n }\n}\n\nfunction translateStructure(structure, shape) {\n var struct = {};\n util.each(structure, function(name, value) {\n var memberShape = shape.members[name];\n if (memberShape) {\n if (memberShape.location !== 'body') return;\n var locationName = memberShape.isLocationName ? memberShape.name : name;\n var result = translate(value, memberShape);\n if (result !== undefined) struct[locationName] = result;\n }\n });\n return struct;\n}\n\nfunction translateList(list, shape) {\n var out = [];\n util.arrayEach(list, function(value) {\n var result = translate(value, shape.member);\n if (result !== undefined) out.push(result);\n });\n return out;\n}\n\nfunction translateMap(map, shape) {\n var out = {};\n util.each(map, function(key, value) {\n var result = translate(value, shape.value);\n if (result !== undefined) out[key] = result;\n });\n return out;\n}\n\nfunction translateScalar(value, shape) {\n return shape.toWireFormat(value);\n}\n\n/**\n * @api private\n */\nmodule.exports = JsonBuilder;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['emr'] = {};\nAWS.EMR = Service.defineService('emr', ['2009-03-31']);\nObject.defineProperty(apiLoader.services['emr'], '2009-03-31', {\n get: function get() {\n var model = require('../apis/elasticmapreduce-2009-03-31.min.json');\n model.paginators = require('../apis/elasticmapreduce-2009-03-31.paginators.json').pagination;\n model.waiters = require('../apis/elasticmapreduce-2009-03-31.waiters2.json').waiters;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.EMR;\n","var util = require('../util');\nvar populateHostPrefix = require('./helpers').populateHostPrefix;\n\nfunction populateMethod(req) {\n req.httpRequest.method = req.service.api.operations[req.operation].httpMethod;\n}\n\nfunction generateURI(endpointPath, operationPath, input, params) {\n var uri = [endpointPath, operationPath].join('/');\n uri = uri.replace(/\\/+/g, '/');\n\n var queryString = {}, queryStringSet = false;\n util.each(input.members, function (name, member) {\n var paramValue = params[name];\n if (paramValue === null || paramValue === undefined) return;\n if (member.location === 'uri') {\n var regex = new RegExp('\\\\{' + member.name + '(\\\\+)?\\\\}');\n uri = uri.replace(regex, function(_, plus) {\n var fn = plus ? util.uriEscapePath : util.uriEscape;\n return fn(String(paramValue));\n });\n } else if (member.location === 'querystring') {\n queryStringSet = true;\n\n if (member.type === 'list') {\n queryString[member.name] = paramValue.map(function(val) {\n return util.uriEscape(member.member.toWireFormat(val).toString());\n });\n } else if (member.type === 'map') {\n util.each(paramValue, function(key, value) {\n if (Array.isArray(value)) {\n queryString[key] = value.map(function(val) {\n return util.uriEscape(String(val));\n });\n } else {\n queryString[key] = util.uriEscape(String(value));\n }\n });\n } else {\n queryString[member.name] = util.uriEscape(member.toWireFormat(paramValue).toString());\n }\n }\n });\n\n if (queryStringSet) {\n uri += (uri.indexOf('?') >= 0 ? '&' : '?');\n var parts = [];\n util.arrayEach(Object.keys(queryString).sort(), function(key) {\n if (!Array.isArray(queryString[key])) {\n queryString[key] = [queryString[key]];\n }\n for (var i = 0; i < queryString[key].length; i++) {\n parts.push(util.uriEscape(String(key)) + '=' + queryString[key][i]);\n }\n });\n uri += parts.join('&');\n }\n\n return uri;\n}\n\nfunction populateURI(req) {\n var operation = req.service.api.operations[req.operation];\n var input = operation.input;\n\n var uri = generateURI(req.httpRequest.endpoint.path, operation.httpPath, input, req.params);\n req.httpRequest.path = uri;\n}\n\nfunction populateHeaders(req) {\n var operation = req.service.api.operations[req.operation];\n util.each(operation.input.members, function (name, member) {\n var value = req.params[name];\n if (value === null || value === undefined) return;\n\n if (member.location === 'headers' && member.type === 'map') {\n util.each(value, function(key, memberValue) {\n req.httpRequest.headers[member.name + key] = memberValue;\n });\n } else if (member.location === 'header') {\n value = member.toWireFormat(value).toString();\n if (member.isJsonValue) {\n value = util.base64.encode(value);\n }\n req.httpRequest.headers[member.name] = value;\n }\n });\n}\n\nfunction buildRequest(req) {\n populateMethod(req);\n populateURI(req);\n populateHeaders(req);\n populateHostPrefix(req);\n}\n\nfunction extractError() {\n}\n\nfunction extractData(resp) {\n var req = resp.request;\n var data = {};\n var r = resp.httpResponse;\n var operation = req.service.api.operations[req.operation];\n var output = operation.output;\n\n // normalize headers names to lower-cased keys for matching\n var headers = {};\n util.each(r.headers, function (k, v) {\n headers[k.toLowerCase()] = v;\n });\n\n util.each(output.members, function(name, member) {\n var header = (member.name || name).toLowerCase();\n if (member.location === 'headers' && member.type === 'map') {\n data[name] = {};\n var location = member.isLocationName ? member.name : '';\n var pattern = new RegExp('^' + location + '(.+)', 'i');\n util.each(r.headers, function (k, v) {\n var result = k.match(pattern);\n if (result !== null) {\n data[name][result[1]] = v;\n }\n });\n } else if (member.location === 'header') {\n if (headers[header] !== undefined) {\n var value = member.isJsonValue ?\n util.base64.decode(headers[header]) :\n headers[header];\n data[name] = member.toType(value);\n }\n } else if (member.location === 'statusCode') {\n data[name] = parseInt(r.statusCode, 10);\n }\n });\n\n resp.data = data;\n}\n\n/**\n * @api private\n */\nmodule.exports = {\n buildRequest: buildRequest,\n extractError: extractError,\n extractData: extractData,\n generateURI: generateURI\n};\n","var AWS = require('../core');\nvar v4Credentials = require('./v4_credentials');\nvar inherit = AWS.util.inherit;\n\n/**\n * @api private\n */\nvar expiresHeader = 'presigned-expires';\n\n/**\n * @api private\n */\nAWS.Signers.V4 = inherit(AWS.Signers.RequestSigner, {\n constructor: function V4(request, serviceName, options) {\n AWS.Signers.RequestSigner.call(this, request);\n this.serviceName = serviceName;\n options = options || {};\n this.signatureCache = typeof options.signatureCache === 'boolean' ? options.signatureCache : true;\n this.operation = options.operation;\n this.signatureVersion = options.signatureVersion;\n },\n\n algorithm: 'AWS4-HMAC-SHA256',\n\n addAuthorization: function addAuthorization(credentials, date) {\n var datetime = AWS.util.date.iso8601(date).replace(/[:\\-]|\\.\\d{3}/g, '');\n\n if (this.isPresigned()) {\n this.updateForPresigned(credentials, datetime);\n } else {\n this.addHeaders(credentials, datetime);\n }\n\n this.request.headers['Authorization'] =\n this.authorization(credentials, datetime);\n },\n\n addHeaders: function addHeaders(credentials, datetime) {\n this.request.headers['X-Amz-Date'] = datetime;\n if (credentials.sessionToken) {\n this.request.headers['x-amz-security-token'] = credentials.sessionToken;\n }\n },\n\n updateForPresigned: function updateForPresigned(credentials, datetime) {\n var credString = this.credentialString(datetime);\n var qs = {\n 'X-Amz-Date': datetime,\n 'X-Amz-Algorithm': this.algorithm,\n 'X-Amz-Credential': credentials.accessKeyId + '/' + credString,\n 'X-Amz-Expires': this.request.headers[expiresHeader],\n 'X-Amz-SignedHeaders': this.signedHeaders()\n };\n\n if (credentials.sessionToken) {\n qs['X-Amz-Security-Token'] = credentials.sessionToken;\n }\n\n if (this.request.headers['Content-Type']) {\n qs['Content-Type'] = this.request.headers['Content-Type'];\n }\n if (this.request.headers['Content-MD5']) {\n qs['Content-MD5'] = this.request.headers['Content-MD5'];\n }\n if (this.request.headers['Cache-Control']) {\n qs['Cache-Control'] = this.request.headers['Cache-Control'];\n }\n\n // need to pull in any other X-Amz-* headers\n AWS.util.each.call(this, this.request.headers, function(key, value) {\n if (key === expiresHeader) return;\n if (this.isSignableHeader(key)) {\n var lowerKey = key.toLowerCase();\n // Metadata should be normalized\n if (lowerKey.indexOf('x-amz-meta-') === 0) {\n qs[lowerKey] = value;\n } else if (lowerKey.indexOf('x-amz-') === 0) {\n qs[key] = value;\n }\n }\n });\n\n var sep = this.request.path.indexOf('?') >= 0 ? '&' : '?';\n this.request.path += sep + AWS.util.queryParamsToString(qs);\n },\n\n authorization: function authorization(credentials, datetime) {\n var parts = [];\n var credString = this.credentialString(datetime);\n parts.push(this.algorithm + ' Credential=' +\n credentials.accessKeyId + '/' + credString);\n parts.push('SignedHeaders=' + this.signedHeaders());\n parts.push('Signature=' + this.signature(credentials, datetime));\n return parts.join(', ');\n },\n\n signature: function signature(credentials, datetime) {\n var signingKey = v4Credentials.getSigningKey(\n credentials,\n datetime.substr(0, 8),\n this.request.region,\n this.serviceName,\n this.signatureCache\n );\n return AWS.util.crypto.hmac(signingKey, this.stringToSign(datetime), 'hex');\n },\n\n stringToSign: function stringToSign(datetime) {\n var parts = [];\n parts.push('AWS4-HMAC-SHA256');\n parts.push(datetime);\n parts.push(this.credentialString(datetime));\n parts.push(this.hexEncodedHash(this.canonicalString()));\n return parts.join('\\n');\n },\n\n canonicalString: function canonicalString() {\n var parts = [], pathname = this.request.pathname();\n if (this.serviceName !== 's3' && this.signatureVersion !== 's3v4') pathname = AWS.util.uriEscapePath(pathname);\n\n parts.push(this.request.method);\n parts.push(pathname);\n parts.push(this.request.search());\n parts.push(this.canonicalHeaders() + '\\n');\n parts.push(this.signedHeaders());\n parts.push(this.hexEncodedBodyHash());\n return parts.join('\\n');\n },\n\n canonicalHeaders: function canonicalHeaders() {\n var headers = [];\n AWS.util.each.call(this, this.request.headers, function (key, item) {\n headers.push([key, item]);\n });\n headers.sort(function (a, b) {\n return a[0].toLowerCase() < b[0].toLowerCase() ? -1 : 1;\n });\n var parts = [];\n AWS.util.arrayEach.call(this, headers, function (item) {\n var key = item[0].toLowerCase();\n if (this.isSignableHeader(key)) {\n var value = item[1];\n if (typeof value === 'undefined' || value === null || typeof value.toString !== 'function') {\n throw AWS.util.error(new Error('Header ' + key + ' contains invalid value'), {\n code: 'InvalidHeader'\n });\n }\n parts.push(key + ':' +\n this.canonicalHeaderValues(value.toString()));\n }\n });\n return parts.join('\\n');\n },\n\n canonicalHeaderValues: function canonicalHeaderValues(values) {\n return values.replace(/\\s+/g, ' ').replace(/^\\s+|\\s+$/g, '');\n },\n\n signedHeaders: function signedHeaders() {\n var keys = [];\n AWS.util.each.call(this, this.request.headers, function (key) {\n key = key.toLowerCase();\n if (this.isSignableHeader(key)) keys.push(key);\n });\n return keys.sort().join(';');\n },\n\n credentialString: function credentialString(datetime) {\n return v4Credentials.createScope(\n datetime.substr(0, 8),\n this.request.region,\n this.serviceName\n );\n },\n\n hexEncodedHash: function hash(string) {\n return AWS.util.crypto.sha256(string, 'hex');\n },\n\n hexEncodedBodyHash: function hexEncodedBodyHash() {\n var request = this.request;\n if (this.isPresigned() && this.serviceName === 's3' && !request.body) {\n return 'UNSIGNED-PAYLOAD';\n } else if (request.headers['X-Amz-Content-Sha256']) {\n return request.headers['X-Amz-Content-Sha256'];\n } else {\n return this.hexEncodedHash(this.request.body || '');\n }\n },\n\n unsignableHeaders: [\n 'authorization',\n 'content-type',\n 'content-length',\n 'user-agent',\n expiresHeader,\n 'expect',\n 'x-amzn-trace-id'\n ],\n\n isSignableHeader: function isSignableHeader(key) {\n if (key.toLowerCase().indexOf('x-amz-') === 0) return true;\n return this.unsignableHeaders.indexOf(key) < 0;\n },\n\n isPresigned: function isPresigned() {\n return this.request.headers[expiresHeader] ? true : false;\n }\n\n});\n\n/**\n * @api private\n */\nmodule.exports = AWS.Signers.V4;\n","if (typeof Object.create === 'function') {\n // implementation from standard node.js 'util' module\n module.exports = function inherits(ctor, 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} else {\n // old school shim for old browsers\n module.exports = function inherits(ctor, 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","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['comprehend'] = {};\nAWS.Comprehend = Service.defineService('comprehend', ['2017-11-27']);\nObject.defineProperty(apiLoader.services['comprehend'], '2017-11-27', {\n get: function get() {\n var model = require('../apis/comprehend-2017-11-27.min.json');\n model.paginators = require('../apis/comprehend-2017-11-27.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.Comprehend;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['forecastservice'] = {};\nAWS.ForecastService = Service.defineService('forecastservice', ['2018-06-26']);\nObject.defineProperty(apiLoader.services['forecastservice'], '2018-06-26', {\n get: function get() {\n var model = require('../apis/forecast-2018-06-26.min.json');\n model.paginators = require('../apis/forecast-2018-06-26.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.ForecastService;\n","var util = require('../core').util;\n\n/**\n * An object recognizable as a numeric value that stores the underlying number\n * as a string.\n *\n * Intended to be a deserialization target for the DynamoDB Document Client when\n * the `wrapNumbers` flag is set. This allows for numeric values that lose\n * precision when converted to JavaScript's `number` type.\n */\nvar DynamoDBNumberValue = util.inherit({\n constructor: function NumberValue(value) {\n this.wrapperName = 'NumberValue';\n this.value = value.toString();\n },\n\n /**\n * Render the underlying value as a number when converting to JSON.\n */\n toJSON: function () {\n return this.toNumber();\n },\n\n /**\n * Convert the underlying value to a JavaScript number.\n */\n toNumber: function () {\n return Number(this.value);\n },\n\n /**\n * Return a string representing the unaltered value provided to the\n * constructor.\n */\n toString: function () {\n return this.value;\n }\n});\n\n/**\n * @api private\n */\nmodule.exports = DynamoDBNumberValue;\n","var AWS = require('../core');\n\nAWS.util.update(AWS.EC2.prototype, {\n /**\n * @api private\n */\n setupRequestListeners: function setupRequestListeners(request) {\n request.removeListener('extractError', AWS.EventListeners.Query.EXTRACT_ERROR);\n request.addListener('extractError', this.extractError);\n\n if (request.operation === 'copySnapshot') {\n request.onAsync('validate', this.buildCopySnapshotPresignedUrl);\n }\n },\n\n /**\n * @api private\n */\n buildCopySnapshotPresignedUrl: function buildCopySnapshotPresignedUrl(req, done) {\n if (req.params.PresignedUrl || req._subRequest) {\n return done();\n }\n\n req.params = AWS.util.copy(req.params);\n req.params.DestinationRegion = req.service.config.region;\n\n var config = AWS.util.copy(req.service.config);\n delete config.endpoint;\n config.region = req.params.SourceRegion;\n var svc = new req.service.constructor(config);\n var newReq = svc[req.operation](req.params);\n newReq._subRequest = true;\n newReq.presign(function(err, url) {\n if (err) done(err);\n else {\n req.params.PresignedUrl = url;\n done();\n }\n });\n },\n\n /**\n * @api private\n */\n extractError: function extractError(resp) {\n // EC2 nests the error code and message deeper than other AWS Query services.\n var httpResponse = resp.httpResponse;\n var data = new AWS.XML.Parser().parse(httpResponse.body.toString() || '');\n if (data.Errors) {\n resp.error = AWS.util.error(new Error(), {\n code: data.Errors.Error.Code,\n message: data.Errors.Error.Message\n });\n } else {\n resp.error = AWS.util.error(new Error(), {\n code: httpResponse.statusCode,\n message: null\n });\n }\n resp.error.requestId = data.RequestID || null;\n }\n});\n","var AWS = require('../core');\nvar EventEmitter = require('events').EventEmitter;\nrequire('../http');\n\n/**\n * @api private\n */\nAWS.XHRClient = AWS.util.inherit({\n handleRequest: function handleRequest(httpRequest, httpOptions, callback, errCallback) {\n var self = this;\n var endpoint = httpRequest.endpoint;\n var emitter = new EventEmitter();\n var href = endpoint.protocol + '//' + endpoint.hostname;\n if (endpoint.port !== 80 && endpoint.port !== 443) {\n href += ':' + endpoint.port;\n }\n href += httpRequest.path;\n\n var xhr = new XMLHttpRequest(), headersEmitted = false;\n httpRequest.stream = xhr;\n\n xhr.addEventListener('readystatechange', function() {\n try {\n if (xhr.status === 0) return; // 0 code is invalid\n } catch (e) { return; }\n\n if (this.readyState >= this.HEADERS_RECEIVED && !headersEmitted) {\n emitter.statusCode = xhr.status;\n emitter.headers = self.parseHeaders(xhr.getAllResponseHeaders());\n emitter.emit(\n 'headers',\n emitter.statusCode,\n emitter.headers,\n xhr.statusText\n );\n headersEmitted = true;\n }\n if (this.readyState === this.DONE) {\n self.finishRequest(xhr, emitter);\n }\n }, false);\n xhr.upload.addEventListener('progress', function (evt) {\n emitter.emit('sendProgress', evt);\n });\n xhr.addEventListener('progress', function (evt) {\n emitter.emit('receiveProgress', evt);\n }, false);\n xhr.addEventListener('timeout', function () {\n errCallback(AWS.util.error(new Error('Timeout'), {code: 'TimeoutError'}));\n }, false);\n xhr.addEventListener('error', function () {\n errCallback(AWS.util.error(new Error('Network Failure'), {\n code: 'NetworkingError'\n }));\n }, false);\n xhr.addEventListener('abort', function () {\n errCallback(AWS.util.error(new Error('Request aborted'), {\n code: 'RequestAbortedError'\n }));\n }, false);\n\n callback(emitter);\n xhr.open(httpRequest.method, href, httpOptions.xhrAsync !== false);\n AWS.util.each(httpRequest.headers, function (key, value) {\n if (key !== 'Content-Length' && key !== 'User-Agent' && key !== 'Host') {\n xhr.setRequestHeader(key, value);\n }\n });\n\n if (httpOptions.timeout && httpOptions.xhrAsync !== false) {\n xhr.timeout = httpOptions.timeout;\n }\n\n if (httpOptions.xhrWithCredentials) {\n xhr.withCredentials = true;\n }\n try { xhr.responseType = 'arraybuffer'; } catch (e) {}\n\n try {\n if (httpRequest.body) {\n xhr.send(httpRequest.body);\n } else {\n xhr.send();\n }\n } catch (err) {\n if (httpRequest.body && typeof httpRequest.body.buffer === 'object') {\n xhr.send(httpRequest.body.buffer); // send ArrayBuffer directly\n } else {\n throw err;\n }\n }\n\n return emitter;\n },\n\n parseHeaders: function parseHeaders(rawHeaders) {\n var headers = {};\n AWS.util.arrayEach(rawHeaders.split(/\\r?\\n/), function (line) {\n var key = line.split(':', 1)[0];\n var value = line.substring(key.length + 2);\n if (key.length > 0) headers[key.toLowerCase()] = value;\n });\n return headers;\n },\n\n finishRequest: function finishRequest(xhr, emitter) {\n var buffer;\n if (xhr.responseType === 'arraybuffer' && xhr.response) {\n var ab = xhr.response;\n buffer = new AWS.util.Buffer(ab.byteLength);\n var view = new Uint8Array(ab);\n for (var i = 0; i < buffer.length; ++i) {\n buffer[i] = view[i];\n }\n }\n\n try {\n if (!buffer && typeof xhr.responseText === 'string') {\n buffer = new AWS.util.Buffer(xhr.responseText);\n }\n } catch (e) {}\n\n if (buffer) emitter.emit('data', buffer);\n emitter.emit('end');\n }\n});\n\n/**\n * @api private\n */\nAWS.HttpClient.prototype = AWS.XHRClient.prototype;\n\n/**\n * @api private\n */\nAWS.HttpClient.streamsApiVersion = 1;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['codebuild'] = {};\nAWS.CodeBuild = Service.defineService('codebuild', ['2016-10-06']);\nObject.defineProperty(apiLoader.services['codebuild'], '2016-10-06', {\n get: function get() {\n var model = require('../apis/codebuild-2016-10-06.min.json');\n model.paginators = require('../apis/codebuild-2016-10-06.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.CodeBuild;\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 getOwnPropertyDescriptors = Object.getOwnPropertyDescriptors ||\n function getOwnPropertyDescriptors(obj) {\n var keys = Object.keys(obj);\n var descriptors = {};\n for (var i = 0; i < keys.length; i++) {\n descriptors[keys[i]] = Object.getOwnPropertyDescriptor(obj, keys[i]);\n }\n return descriptors;\n };\n\nvar formatRegExp = /%[sdj%]/g;\nexports.format = function(f) {\n if (!isString(f)) {\n var objects = [];\n for (var i = 0; i < arguments.length; i++) {\n objects.push(inspect(arguments[i]));\n }\n return objects.join(' ');\n }\n\n var i = 1;\n var args = arguments;\n var len = args.length;\n var str = String(f).replace(formatRegExp, function(x) {\n if (x === '%%') return '%';\n if (i >= len) return x;\n switch (x) {\n case '%s': return String(args[i++]);\n case '%d': return Number(args[i++]);\n case '%j':\n try {\n return JSON.stringify(args[i++]);\n } catch (_) {\n return '[Circular]';\n }\n default:\n return x;\n }\n });\n for (var x = args[i]; i < len; x = args[++i]) {\n if (isNull(x) || !isObject(x)) {\n str += ' ' + x;\n } else {\n str += ' ' + inspect(x);\n }\n }\n return str;\n};\n\n\n// Mark that a method should not be used.\n// Returns a modified function which warns once by default.\n// If --no-deprecation is set, then it is a no-op.\nexports.deprecate = function(fn, msg) {\n if (typeof process !== 'undefined' && process.noDeprecation === true) {\n return fn;\n }\n\n // Allow for deprecating things in the process of starting up.\n if (typeof process === 'undefined') {\n return function() {\n return exports.deprecate(fn, msg).apply(this, arguments);\n };\n }\n\n var warned = false;\n function deprecated() {\n if (!warned) {\n if (process.throwDeprecation) {\n throw new Error(msg);\n } else if (process.traceDeprecation) {\n console.trace(msg);\n } else {\n console.error(msg);\n }\n warned = true;\n }\n return fn.apply(this, arguments);\n }\n\n return deprecated;\n};\n\n\nvar debugs = {};\nvar debugEnviron;\nexports.debuglog = function(set) {\n if (isUndefined(debugEnviron))\n debugEnviron = process.env.NODE_DEBUG || '';\n set = set.toUpperCase();\n if (!debugs[set]) {\n if (new RegExp('\\\\b' + set + '\\\\b', 'i').test(debugEnviron)) {\n var pid = process.pid;\n debugs[set] = function() {\n var msg = exports.format.apply(exports, arguments);\n console.error('%s %d: %s', set, pid, msg);\n };\n } else {\n debugs[set] = function() {};\n }\n }\n return debugs[set];\n};\n\n\n/**\n * Echos the value of a value. Trys to print the value out\n * in the best way possible given the different types.\n *\n * @param {Object} obj The object to print out.\n * @param {Object} opts Optional options object that alters the output.\n */\n/* legacy: obj, showHidden, depth, colors*/\nfunction inspect(obj, opts) {\n // default options\n var ctx = {\n seen: [],\n stylize: stylizeNoColor\n };\n // legacy...\n if (arguments.length >= 3) ctx.depth = arguments[2];\n if (arguments.length >= 4) ctx.colors = arguments[3];\n if (isBoolean(opts)) {\n // legacy...\n ctx.showHidden = opts;\n } else if (opts) {\n // got an \"options\" object\n exports._extend(ctx, opts);\n }\n // set default options\n if (isUndefined(ctx.showHidden)) ctx.showHidden = false;\n if (isUndefined(ctx.depth)) ctx.depth = 2;\n if (isUndefined(ctx.colors)) ctx.colors = false;\n if (isUndefined(ctx.customInspect)) ctx.customInspect = true;\n if (ctx.colors) ctx.stylize = stylizeWithColor;\n return formatValue(ctx, obj, ctx.depth);\n}\nexports.inspect = inspect;\n\n\n// http://en.wikipedia.org/wiki/ANSI_escape_code#graphics\ninspect.colors = {\n 'bold' : [1, 22],\n 'italic' : [3, 23],\n 'underline' : [4, 24],\n 'inverse' : [7, 27],\n 'white' : [37, 39],\n 'grey' : [90, 39],\n 'black' : [30, 39],\n 'blue' : [34, 39],\n 'cyan' : [36, 39],\n 'green' : [32, 39],\n 'magenta' : [35, 39],\n 'red' : [31, 39],\n 'yellow' : [33, 39]\n};\n\n// Don't use 'blue' not visible on cmd.exe\ninspect.styles = {\n 'special': 'cyan',\n 'number': 'yellow',\n 'boolean': 'yellow',\n 'undefined': 'grey',\n 'null': 'bold',\n 'string': 'green',\n 'date': 'magenta',\n // \"name\": intentionally not styling\n 'regexp': 'red'\n};\n\n\nfunction stylizeWithColor(str, styleType) {\n var style = inspect.styles[styleType];\n\n if (style) {\n return '\\u001b[' + inspect.colors[style][0] + 'm' + str +\n '\\u001b[' + inspect.colors[style][1] + 'm';\n } else {\n return str;\n }\n}\n\n\nfunction stylizeNoColor(str, styleType) {\n return str;\n}\n\n\nfunction arrayToHash(array) {\n var hash = {};\n\n array.forEach(function(val, idx) {\n hash[val] = true;\n });\n\n return hash;\n}\n\n\nfunction formatValue(ctx, value, recurseTimes) {\n // Provide a hook for user-specified inspect functions.\n // Check that value is an object with an inspect function on it\n if (ctx.customInspect &&\n value &&\n isFunction(value.inspect) &&\n // Filter out the util module, it's inspect function is special\n value.inspect !== exports.inspect &&\n // Also filter out any prototype objects using the circular check.\n !(value.constructor && value.constructor.prototype === value)) {\n var ret = value.inspect(recurseTimes, ctx);\n if (!isString(ret)) {\n ret = formatValue(ctx, ret, recurseTimes);\n }\n return ret;\n }\n\n // Primitive types cannot have properties\n var primitive = formatPrimitive(ctx, value);\n if (primitive) {\n return primitive;\n }\n\n // Look up the keys of the object.\n var keys = Object.keys(value);\n var visibleKeys = arrayToHash(keys);\n\n if (ctx.showHidden) {\n keys = Object.getOwnPropertyNames(value);\n }\n\n // IE doesn't make error fields non-enumerable\n // http://msdn.microsoft.com/en-us/library/ie/dww52sbt(v=vs.94).aspx\n if (isError(value)\n && (keys.indexOf('message') >= 0 || keys.indexOf('description') >= 0)) {\n return formatError(value);\n }\n\n // Some type of object without properties can be shortcutted.\n if (keys.length === 0) {\n if (isFunction(value)) {\n var name = value.name ? ': ' + value.name : '';\n return ctx.stylize('[Function' + name + ']', 'special');\n }\n if (isRegExp(value)) {\n return ctx.stylize(RegExp.prototype.toString.call(value), 'regexp');\n }\n if (isDate(value)) {\n return ctx.stylize(Date.prototype.toString.call(value), 'date');\n }\n if (isError(value)) {\n return formatError(value);\n }\n }\n\n var base = '', array = false, braces = ['{', '}'];\n\n // Make Array say that they are Array\n if (isArray(value)) {\n array = true;\n braces = ['[', ']'];\n }\n\n // Make functions say that they are functions\n if (isFunction(value)) {\n var n = value.name ? ': ' + value.name : '';\n base = ' [Function' + n + ']';\n }\n\n // Make RegExps say that they are RegExps\n if (isRegExp(value)) {\n base = ' ' + RegExp.prototype.toString.call(value);\n }\n\n // Make dates with properties first say the date\n if (isDate(value)) {\n base = ' ' + Date.prototype.toUTCString.call(value);\n }\n\n // Make error with message first say the error\n if (isError(value)) {\n base = ' ' + formatError(value);\n }\n\n if (keys.length === 0 && (!array || value.length == 0)) {\n return braces[0] + base + braces[1];\n }\n\n if (recurseTimes < 0) {\n if (isRegExp(value)) {\n return ctx.stylize(RegExp.prototype.toString.call(value), 'regexp');\n } else {\n return ctx.stylize('[Object]', 'special');\n }\n }\n\n ctx.seen.push(value);\n\n var output;\n if (array) {\n output = formatArray(ctx, value, recurseTimes, visibleKeys, keys);\n } else {\n output = keys.map(function(key) {\n return formatProperty(ctx, value, recurseTimes, visibleKeys, key, array);\n });\n }\n\n ctx.seen.pop();\n\n return reduceToSingleString(output, base, braces);\n}\n\n\nfunction formatPrimitive(ctx, value) {\n if (isUndefined(value))\n return ctx.stylize('undefined', 'undefined');\n if (isString(value)) {\n var simple = '\\'' + JSON.stringify(value).replace(/^\"|\"$/g, '')\n .replace(/'/g, \"\\\\'\")\n .replace(/\\\\\"/g, '\"') + '\\'';\n return ctx.stylize(simple, 'string');\n }\n if (isNumber(value))\n return ctx.stylize('' + value, 'number');\n if (isBoolean(value))\n return ctx.stylize('' + value, 'boolean');\n // For some reason typeof null is \"object\", so special case here.\n if (isNull(value))\n return ctx.stylize('null', 'null');\n}\n\n\nfunction formatError(value) {\n return '[' + Error.prototype.toString.call(value) + ']';\n}\n\n\nfunction formatArray(ctx, value, recurseTimes, visibleKeys, keys) {\n var output = [];\n for (var i = 0, l = value.length; i < l; ++i) {\n if (hasOwnProperty(value, String(i))) {\n output.push(formatProperty(ctx, value, recurseTimes, visibleKeys,\n String(i), true));\n } else {\n output.push('');\n }\n }\n keys.forEach(function(key) {\n if (!key.match(/^\\d+$/)) {\n output.push(formatProperty(ctx, value, recurseTimes, visibleKeys,\n key, true));\n }\n });\n return output;\n}\n\n\nfunction formatProperty(ctx, value, recurseTimes, visibleKeys, key, array) {\n var name, str, desc;\n desc = Object.getOwnPropertyDescriptor(value, key) || { value: value[key] };\n if (desc.get) {\n if (desc.set) {\n str = ctx.stylize('[Getter/Setter]', 'special');\n } else {\n str = ctx.stylize('[Getter]', 'special');\n }\n } else {\n if (desc.set) {\n str = ctx.stylize('[Setter]', 'special');\n }\n }\n if (!hasOwnProperty(visibleKeys, key)) {\n name = '[' + key + ']';\n }\n if (!str) {\n if (ctx.seen.indexOf(desc.value) < 0) {\n if (isNull(recurseTimes)) {\n str = formatValue(ctx, desc.value, null);\n } else {\n str = formatValue(ctx, desc.value, recurseTimes - 1);\n }\n if (str.indexOf('\\n') > -1) {\n if (array) {\n str = str.split('\\n').map(function(line) {\n return ' ' + line;\n }).join('\\n').substr(2);\n } else {\n str = '\\n' + str.split('\\n').map(function(line) {\n return ' ' + line;\n }).join('\\n');\n }\n }\n } else {\n str = ctx.stylize('[Circular]', 'special');\n }\n }\n if (isUndefined(name)) {\n if (array && key.match(/^\\d+$/)) {\n return str;\n }\n name = JSON.stringify('' + key);\n if (name.match(/^\"([a-zA-Z_][a-zA-Z_0-9]*)\"$/)) {\n name = name.substr(1, name.length - 2);\n name = ctx.stylize(name, 'name');\n } else {\n name = name.replace(/'/g, \"\\\\'\")\n .replace(/\\\\\"/g, '\"')\n .replace(/(^\"|\"$)/g, \"'\");\n name = ctx.stylize(name, 'string');\n }\n }\n\n return name + ': ' + str;\n}\n\n\nfunction reduceToSingleString(output, base, braces) {\n var numLinesEst = 0;\n var length = output.reduce(function(prev, cur) {\n numLinesEst++;\n if (cur.indexOf('\\n') >= 0) numLinesEst++;\n return prev + cur.replace(/\\u001b\\[\\d\\d?m/g, '').length + 1;\n }, 0);\n\n if (length > 60) {\n return braces[0] +\n (base === '' ? '' : base + '\\n ') +\n ' ' +\n output.join(',\\n ') +\n ' ' +\n braces[1];\n }\n\n return braces[0] + base + ' ' + output.join(', ') + ' ' + braces[1];\n}\n\n\n// NOTE: These type checking functions intentionally don't use `instanceof`\n// because it is fragile and can be easily faked with `Object.create()`.\nfunction isArray(ar) {\n return Array.isArray(ar);\n}\nexports.isArray = isArray;\n\nfunction isBoolean(arg) {\n return typeof arg === 'boolean';\n}\nexports.isBoolean = isBoolean;\n\nfunction isNull(arg) {\n return arg === null;\n}\nexports.isNull = isNull;\n\nfunction isNullOrUndefined(arg) {\n return arg == null;\n}\nexports.isNullOrUndefined = isNullOrUndefined;\n\nfunction isNumber(arg) {\n return typeof arg === 'number';\n}\nexports.isNumber = isNumber;\n\nfunction isString(arg) {\n return typeof arg === 'string';\n}\nexports.isString = isString;\n\nfunction isSymbol(arg) {\n return typeof arg === 'symbol';\n}\nexports.isSymbol = isSymbol;\n\nfunction isUndefined(arg) {\n return arg === void 0;\n}\nexports.isUndefined = isUndefined;\n\nfunction isRegExp(re) {\n return isObject(re) && objectToString(re) === '[object RegExp]';\n}\nexports.isRegExp = isRegExp;\n\nfunction isObject(arg) {\n return typeof arg === 'object' && arg !== null;\n}\nexports.isObject = isObject;\n\nfunction isDate(d) {\n return isObject(d) && objectToString(d) === '[object Date]';\n}\nexports.isDate = isDate;\n\nfunction isError(e) {\n return isObject(e) &&\n (objectToString(e) === '[object Error]' || e instanceof Error);\n}\nexports.isError = isError;\n\nfunction isFunction(arg) {\n return typeof arg === 'function';\n}\nexports.isFunction = isFunction;\n\nfunction isPrimitive(arg) {\n return arg === null ||\n typeof arg === 'boolean' ||\n typeof arg === 'number' ||\n typeof arg === 'string' ||\n typeof arg === 'symbol' || // ES6 symbol\n typeof arg === 'undefined';\n}\nexports.isPrimitive = isPrimitive;\n\nexports.isBuffer = require('./support/isBuffer');\n\nfunction objectToString(o) {\n return Object.prototype.toString.call(o);\n}\n\n\nfunction pad(n) {\n return n < 10 ? '0' + n.toString(10) : n.toString(10);\n}\n\n\nvar months = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep',\n 'Oct', 'Nov', 'Dec'];\n\n// 26 Feb 16:19:34\nfunction timestamp() {\n var d = new Date();\n var time = [pad(d.getHours()),\n pad(d.getMinutes()),\n pad(d.getSeconds())].join(':');\n return [d.getDate(), months[d.getMonth()], time].join(' ');\n}\n\n\n// log is just a thin wrapper to console.log that prepends a timestamp\nexports.log = function() {\n console.log('%s - %s', timestamp(), exports.format.apply(exports, arguments));\n};\n\n\n/**\n * Inherit the prototype methods from one constructor into another.\n *\n * The Function.prototype.inherits from lang.js rewritten as a standalone\n * function (not on Function.prototype). NOTE: If this file is to be loaded\n * during bootstrapping this function needs to be rewritten using some native\n * functions as prototype setup using normal JavaScript does not work as\n * expected during bootstrapping (see mirror.js in r114903).\n *\n * @param {function} ctor Constructor function which needs to inherit the\n * prototype.\n * @param {function} superCtor Constructor function to inherit prototype from.\n */\nexports.inherits = require('inherits');\n\nexports._extend = function(origin, add) {\n // Don't do anything if add isn't an object\n if (!add || !isObject(add)) return origin;\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\nfunction hasOwnProperty(obj, prop) {\n return Object.prototype.hasOwnProperty.call(obj, prop);\n}\n\nvar kCustomPromisifiedSymbol = typeof Symbol !== 'undefined' ? Symbol('util.promisify.custom') : undefined;\n\nexports.promisify = function promisify(original) {\n if (typeof original !== 'function')\n throw new TypeError('The \"original\" argument must be of type Function');\n\n if (kCustomPromisifiedSymbol && original[kCustomPromisifiedSymbol]) {\n var fn = original[kCustomPromisifiedSymbol];\n if (typeof fn !== 'function') {\n throw new TypeError('The \"util.promisify.custom\" argument must be of type Function');\n }\n Object.defineProperty(fn, kCustomPromisifiedSymbol, {\n value: fn, enumerable: false, writable: false, configurable: true\n });\n return fn;\n }\n\n function fn() {\n var promiseResolve, promiseReject;\n var promise = new Promise(function (resolve, reject) {\n promiseResolve = resolve;\n promiseReject = reject;\n });\n\n var args = [];\n for (var i = 0; i < arguments.length; i++) {\n args.push(arguments[i]);\n }\n args.push(function (err, value) {\n if (err) {\n promiseReject(err);\n } else {\n promiseResolve(value);\n }\n });\n\n try {\n original.apply(this, args);\n } catch (err) {\n promiseReject(err);\n }\n\n return promise;\n }\n\n Object.setPrototypeOf(fn, Object.getPrototypeOf(original));\n\n if (kCustomPromisifiedSymbol) Object.defineProperty(fn, kCustomPromisifiedSymbol, {\n value: fn, enumerable: false, writable: false, configurable: true\n });\n return Object.defineProperties(\n fn,\n getOwnPropertyDescriptors(original)\n );\n}\n\nexports.promisify.custom = kCustomPromisifiedSymbol\n\nfunction callbackifyOnRejected(reason, cb) {\n // `!reason` guard inspired by bluebird (Ref: https://goo.gl/t5IS6M).\n // Because `null` is a special error value in callbacks which means \"no error\n // occurred\", we error-wrap so the callback consumer can distinguish between\n // \"the promise rejected with null\" or \"the promise fulfilled with undefined\".\n if (!reason) {\n var newReason = new Error('Promise was rejected with a falsy value');\n newReason.reason = reason;\n reason = newReason;\n }\n return cb(reason);\n}\n\nfunction callbackify(original) {\n if (typeof original !== 'function') {\n throw new TypeError('The \"original\" argument must be of type Function');\n }\n\n // We DO NOT return the promise as it gives the user a false sense that\n // the promise is actually somehow related to the callback's execution\n // and that the callback throwing will reject the promise.\n function callbackified() {\n var args = [];\n for (var i = 0; i < arguments.length; i++) {\n args.push(arguments[i]);\n }\n\n var maybeCb = args.pop();\n if (typeof maybeCb !== 'function') {\n throw new TypeError('The last argument must be of type Function');\n }\n var self = this;\n var cb = function() {\n return maybeCb.apply(self, arguments);\n };\n // In true node style we process the callback on `nextTick` with all the\n // implications (stack, `uncaughtException`, `async_hooks`)\n original.apply(this, args)\n .then(function(ret) { process.nextTick(cb, null, ret) },\n function(rej) { process.nextTick(callbackifyOnRejected, rej, cb) });\n }\n\n Object.setPrototypeOf(callbackified, Object.getPrototypeOf(original));\n Object.defineProperties(callbackified,\n getOwnPropertyDescriptors(original));\n return callbackified;\n}\nexports.callbackify = callbackify;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['lexruntime'] = {};\nAWS.LexRuntime = Service.defineService('lexruntime', ['2016-11-28']);\nObject.defineProperty(apiLoader.services['lexruntime'], '2016-11-28', {\n get: function get() {\n var model = require('../apis/runtime.lex-2016-11-28.min.json');\n model.paginators = require('../apis/runtime.lex-2016-11-28.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.LexRuntime;\n","var AWS = require('../core');\n\nAWS.util.update(AWS.Lambda.prototype, {\n /**\n * @api private\n */\n setupRequestListeners: function setupRequestListeners(request) {\n if (request.operation === 'invoke') {\n request.addListener('extractData', AWS.util.convertPayloadToString);\n }\n }\n});\n\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['firehose'] = {};\nAWS.Firehose = Service.defineService('firehose', ['2015-08-04']);\nObject.defineProperty(apiLoader.services['firehose'], '2015-08-04', {\n get: function get() {\n var model = require('../apis/firehose-2015-08-04.min.json');\n model.paginators = require('../apis/firehose-2015-08-04.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.Firehose;\n","var rng = require('./lib/rng');\nvar bytesToUuid = require('./lib/bytesToUuid');\n\n// **`v1()` - Generate time-based UUID**\n//\n// Inspired by https://github.com/LiosK/UUID.js\n// and http://docs.python.org/library/uuid.html\n\nvar _nodeId;\nvar _clockseq;\n\n// Previous uuid creation time\nvar _lastMSecs = 0;\nvar _lastNSecs = 0;\n\n// See https://github.com/broofa/node-uuid for API details\nfunction v1(options, buf, offset) {\n var i = buf && offset || 0;\n var b = buf || [];\n\n options = options || {};\n var node = options.node || _nodeId;\n var clockseq = options.clockseq !== undefined ? options.clockseq : _clockseq;\n\n // node and clockseq need to be initialized to random values if they're not\n // specified. We do this lazily to minimize issues related to insufficient\n // system entropy. See #189\n if (node == null || clockseq == null) {\n var seedBytes = rng();\n if (node == null) {\n // Per 4.5, create and 48-bit node id, (47 random bits + multicast bit = 1)\n node = _nodeId = [\n seedBytes[0] | 0x01,\n seedBytes[1], seedBytes[2], seedBytes[3], seedBytes[4], seedBytes[5]\n ];\n }\n if (clockseq == null) {\n // Per 4.2.2, randomize (14 bit) clockseq\n clockseq = _clockseq = (seedBytes[6] << 8 | seedBytes[7]) & 0x3fff;\n }\n }\n\n // UUID timestamps are 100 nano-second units since the Gregorian epoch,\n // (1582-10-15 00:00). JSNumbers aren't precise enough for this, so\n // time is handled internally as 'msecs' (integer milliseconds) and 'nsecs'\n // (100-nanoseconds offset from msecs) since unix epoch, 1970-01-01 00:00.\n var msecs = options.msecs !== undefined ? options.msecs : new Date().getTime();\n\n // Per 4.2.1.2, use count of uuid's generated during the current clock\n // cycle to simulate higher resolution clock\n var nsecs = options.nsecs !== undefined ? options.nsecs : _lastNSecs + 1;\n\n // Time since last uuid creation (in msecs)\n var dt = (msecs - _lastMSecs) + (nsecs - _lastNSecs)/10000;\n\n // Per 4.2.1.2, Bump clockseq on clock regression\n if (dt < 0 && options.clockseq === undefined) {\n clockseq = clockseq + 1 & 0x3fff;\n }\n\n // Reset nsecs if clock regresses (new clockseq) or we've moved onto a new\n // time interval\n if ((dt < 0 || msecs > _lastMSecs) && options.nsecs === undefined) {\n nsecs = 0;\n }\n\n // Per 4.2.1.2 Throw error if too many uuids are requested\n if (nsecs >= 10000) {\n throw new Error('uuid.v1(): Can\\'t create more than 10M uuids/sec');\n }\n\n _lastMSecs = msecs;\n _lastNSecs = nsecs;\n _clockseq = clockseq;\n\n // Per 4.1.4 - Convert from unix epoch to Gregorian epoch\n msecs += 12219292800000;\n\n // `time_low`\n var tl = ((msecs & 0xfffffff) * 10000 + nsecs) % 0x100000000;\n b[i++] = tl >>> 24 & 0xff;\n b[i++] = tl >>> 16 & 0xff;\n b[i++] = tl >>> 8 & 0xff;\n b[i++] = tl & 0xff;\n\n // `time_mid`\n var tmh = (msecs / 0x100000000 * 10000) & 0xfffffff;\n b[i++] = tmh >>> 8 & 0xff;\n b[i++] = tmh & 0xff;\n\n // `time_high_and_version`\n b[i++] = tmh >>> 24 & 0xf | 0x10; // include version\n b[i++] = tmh >>> 16 & 0xff;\n\n // `clock_seq_hi_and_reserved` (Per 4.2.2 - include variant)\n b[i++] = clockseq >>> 8 | 0x80;\n\n // `clock_seq_low`\n b[i++] = clockseq & 0xff;\n\n // `node`\n for (var n = 0; n < 6; ++n) {\n b[i + n] = node[n];\n }\n\n return buf ? buf : bytesToUuid(b);\n}\n\nmodule.exports = v1;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['kinesisvideomedia'] = {};\nAWS.KinesisVideoMedia = Service.defineService('kinesisvideomedia', ['2017-09-30']);\nObject.defineProperty(apiLoader.services['kinesisvideomedia'], '2017-09-30', {\n get: function get() {\n var model = require('../apis/kinesis-video-media-2017-09-30.min.json');\n model.paginators = require('../apis/kinesis-video-media-2017-09-30.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.KinesisVideoMedia;\n","var eventMessageChunker = require('../event-stream/event-message-chunker').eventMessageChunker;\nvar parseEvent = require('./parse-event').parseEvent;\n\nfunction createEventStream(body, parser, model) {\n var eventMessages = eventMessageChunker(body);\n\n var events = [];\n\n for (var i = 0; i < eventMessages.length; i++) {\n events.push(parseEvent(parser, eventMessages[i], model));\n }\n\n return events;\n}\n\n/**\n * @api private\n */\nmodule.exports = {\n createEventStream: createEventStream\n};\n","var AWS = require('../core');\nvar inherit = AWS.util.inherit;\n\n/**\n * @api private\n */\nAWS.Signers.V3 = inherit(AWS.Signers.RequestSigner, {\n addAuthorization: function addAuthorization(credentials, date) {\n\n var datetime = AWS.util.date.rfc822(date);\n\n this.request.headers['X-Amz-Date'] = datetime;\n\n if (credentials.sessionToken) {\n this.request.headers['x-amz-security-token'] = credentials.sessionToken;\n }\n\n this.request.headers['X-Amzn-Authorization'] =\n this.authorization(credentials, datetime);\n\n },\n\n authorization: function authorization(credentials) {\n return 'AWS3 ' +\n 'AWSAccessKeyId=' + credentials.accessKeyId + ',' +\n 'Algorithm=HmacSHA256,' +\n 'SignedHeaders=' + this.signedHeaders() + ',' +\n 'Signature=' + this.signature(credentials);\n },\n\n signedHeaders: function signedHeaders() {\n var headers = [];\n AWS.util.arrayEach(this.headersToSign(), function iterator(h) {\n headers.push(h.toLowerCase());\n });\n return headers.sort().join(';');\n },\n\n canonicalHeaders: function canonicalHeaders() {\n var headers = this.request.headers;\n var parts = [];\n AWS.util.arrayEach(this.headersToSign(), function iterator(h) {\n parts.push(h.toLowerCase().trim() + ':' + String(headers[h]).trim());\n });\n return parts.sort().join('\\n') + '\\n';\n },\n\n headersToSign: function headersToSign() {\n var headers = [];\n AWS.util.each(this.request.headers, function iterator(k) {\n if (k === 'Host' || k === 'Content-Encoding' || k.match(/^X-Amz/i)) {\n headers.push(k);\n }\n });\n return headers;\n },\n\n signature: function signature(credentials) {\n return AWS.util.crypto.hmac(credentials.secretAccessKey, this.stringToSign(), 'base64');\n },\n\n stringToSign: function stringToSign() {\n var parts = [];\n parts.push(this.request.method);\n parts.push('/');\n parts.push('');\n parts.push(this.canonicalHeaders());\n parts.push(this.request.body);\n return AWS.util.crypto.sha256(parts.join('\\n'));\n }\n\n});\n\n/**\n * @api private\n */\nmodule.exports = AWS.Signers.V3;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['resourcegroups'] = {};\nAWS.ResourceGroups = Service.defineService('resourcegroups', ['2017-11-27']);\nObject.defineProperty(apiLoader.services['resourcegroups'], '2017-11-27', {\n get: function get() {\n var model = require('../apis/resource-groups-2017-11-27.min.json');\n model.paginators = require('../apis/resource-groups-2017-11-27.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.ResourceGroups;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['cloudhsm'] = {};\nAWS.CloudHSM = Service.defineService('cloudhsm', ['2014-05-30']);\nObject.defineProperty(apiLoader.services['cloudhsm'], '2014-05-30', {\n get: function get() {\n var model = require('../apis/cloudhsm-2014-05-30.min.json');\n model.paginators = require('../apis/cloudhsm-2014-05-30.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.CloudHSM;\n","var AWS = require('../core');\n\nAWS.util.update(AWS.APIGateway.prototype, {\n/**\n * Sets the Accept header to application/json.\n *\n * @api private\n */\n setAcceptHeader: function setAcceptHeader(req) {\n var httpRequest = req.httpRequest;\n if (!httpRequest.headers.Accept) {\n httpRequest.headers['Accept'] = 'application/json';\n }\n },\n\n /**\n * @api private\n */\n setupRequestListeners: function setupRequestListeners(request) {\n request.addListener('build', this.setAcceptHeader);\n if (request.operation === 'getExport') {\n var params = request.params || {};\n if (params.exportType === 'swagger') {\n request.addListener('extractData', AWS.util.convertPayloadToString);\n }\n }\n }\n});\n\n","var AWS = require('./core');\nvar inherit = AWS.util.inherit;\n\n/**\n * The endpoint that a service will talk to, for example,\n * `'https://ec2.ap-southeast-1.amazonaws.com'`. If\n * you need to override an endpoint for a service, you can\n * set the endpoint on a service by passing the endpoint\n * object with the `endpoint` option key:\n *\n * ```javascript\n * var ep = new AWS.Endpoint('awsproxy.example.com');\n * var s3 = new AWS.S3({endpoint: ep});\n * s3.service.endpoint.hostname == 'awsproxy.example.com'\n * ```\n *\n * Note that if you do not specify a protocol, the protocol will\n * be selected based on your current {AWS.config} configuration.\n *\n * @!attribute protocol\n * @return [String] the protocol (http or https) of the endpoint\n * URL\n * @!attribute hostname\n * @return [String] the host portion of the endpoint, e.g.,\n * example.com\n * @!attribute host\n * @return [String] the host portion of the endpoint including\n * the port, e.g., example.com:80\n * @!attribute port\n * @return [Integer] the port of the endpoint\n * @!attribute href\n * @return [String] the full URL of the endpoint\n */\nAWS.Endpoint = inherit({\n\n /**\n * @overload Endpoint(endpoint)\n * Constructs a new endpoint given an endpoint URL. If the\n * URL omits a protocol (http or https), the default protocol\n * set in the global {AWS.config} will be used.\n * @param endpoint [String] the URL to construct an endpoint from\n */\n constructor: function Endpoint(endpoint, config) {\n AWS.util.hideProperties(this, ['slashes', 'auth', 'hash', 'search', 'query']);\n\n if (typeof endpoint === 'undefined' || endpoint === null) {\n throw new Error('Invalid endpoint: ' + endpoint);\n } else if (typeof endpoint !== 'string') {\n return AWS.util.copy(endpoint);\n }\n\n if (!endpoint.match(/^http/)) {\n var useSSL = config && config.sslEnabled !== undefined ?\n config.sslEnabled : AWS.config.sslEnabled;\n endpoint = (useSSL ? 'https' : 'http') + '://' + endpoint;\n }\n\n AWS.util.update(this, AWS.util.urlParse(endpoint));\n\n // Ensure the port property is set as an integer\n if (this.port) {\n this.port = parseInt(this.port, 10);\n } else {\n this.port = this.protocol === 'https:' ? 443 : 80;\n }\n }\n\n});\n\n/**\n * The low level HTTP request object, encapsulating all HTTP header\n * and body data sent by a service request.\n *\n * @!attribute method\n * @return [String] the HTTP method of the request\n * @!attribute path\n * @return [String] the path portion of the URI, e.g.,\n * \"/list/?start=5&num=10\"\n * @!attribute headers\n * @return [map]\n * a map of header keys and their respective values\n * @!attribute body\n * @return [String] the request body payload\n * @!attribute endpoint\n * @return [AWS.Endpoint] the endpoint for the request\n * @!attribute region\n * @api private\n * @return [String] the region, for signing purposes only.\n */\nAWS.HttpRequest = inherit({\n\n /**\n * @api private\n */\n constructor: function HttpRequest(endpoint, region) {\n endpoint = new AWS.Endpoint(endpoint);\n this.method = 'POST';\n this.path = endpoint.path || '/';\n this.headers = {};\n this.body = '';\n this.endpoint = endpoint;\n this.region = region;\n this._userAgent = '';\n this.setUserAgent();\n },\n\n /**\n * @api private\n */\n setUserAgent: function setUserAgent() {\n this._userAgent = this.headers[this.getUserAgentHeaderName()] = AWS.util.userAgent();\n },\n\n getUserAgentHeaderName: function getUserAgentHeaderName() {\n var prefix = AWS.util.isBrowser() ? 'X-Amz-' : '';\n return prefix + 'User-Agent';\n },\n\n /**\n * @api private\n */\n appendToUserAgent: function appendToUserAgent(agentPartial) {\n if (typeof agentPartial === 'string' && agentPartial) {\n this._userAgent += ' ' + agentPartial;\n }\n this.headers[this.getUserAgentHeaderName()] = this._userAgent;\n },\n\n /**\n * @api private\n */\n getUserAgent: function getUserAgent() {\n return this._userAgent;\n },\n\n /**\n * @return [String] the part of the {path} excluding the\n * query string\n */\n pathname: function pathname() {\n return this.path.split('?', 1)[0];\n },\n\n /**\n * @return [String] the query string portion of the {path}\n */\n search: function search() {\n var query = this.path.split('?', 2)[1];\n if (query) {\n query = AWS.util.queryStringParse(query);\n return AWS.util.queryParamsToString(query);\n }\n return '';\n },\n\n /**\n * @api private\n * update httpRequest endpoint with endpoint string\n */\n updateEndpoint: function updateEndpoint(endpointStr) {\n var newEndpoint = new AWS.Endpoint(endpointStr);\n this.endpoint = newEndpoint;\n this.path = newEndpoint.path || '/';\n if (this.headers['Host']) {\n this.headers['Host'] = newEndpoint.host;\n }\n }\n});\n\n/**\n * The low level HTTP response object, encapsulating all HTTP header\n * and body data returned from the request.\n *\n * @!attribute statusCode\n * @return [Integer] the HTTP status code of the response (e.g., 200, 404)\n * @!attribute headers\n * @return [map]\n * a map of response header keys and their respective values\n * @!attribute body\n * @return [String] the response body payload\n * @!attribute [r] streaming\n * @return [Boolean] whether this response is being streamed at a low-level.\n * Defaults to `false` (buffered reads). Do not modify this manually, use\n * {createUnbufferedStream} to convert the stream to unbuffered mode\n * instead.\n */\nAWS.HttpResponse = inherit({\n\n /**\n * @api private\n */\n constructor: function HttpResponse() {\n this.statusCode = undefined;\n this.headers = {};\n this.body = undefined;\n this.streaming = false;\n this.stream = null;\n },\n\n /**\n * Disables buffering on the HTTP response and returns the stream for reading.\n * @return [Stream, XMLHttpRequest, null] the underlying stream object.\n * Use this object to directly read data off of the stream.\n * @note This object is only available after the {AWS.Request~httpHeaders}\n * event has fired. This method must be called prior to\n * {AWS.Request~httpData}.\n * @example Taking control of a stream\n * request.on('httpHeaders', function(statusCode, headers) {\n * if (statusCode < 300) {\n * if (headers.etag === 'xyz') {\n * // pipe the stream, disabling buffering\n * var stream = this.response.httpResponse.createUnbufferedStream();\n * stream.pipe(process.stdout);\n * } else { // abort this request and set a better error message\n * this.abort();\n * this.response.error = new Error('Invalid ETag');\n * }\n * }\n * }).send(console.log);\n */\n createUnbufferedStream: function createUnbufferedStream() {\n this.streaming = true;\n return this.stream;\n }\n});\n\n\nAWS.HttpClient = inherit({});\n\n/**\n * @api private\n */\nAWS.HttpClient.getInstance = function getInstance() {\n if (this.singleton === undefined) {\n this.singleton = new this();\n }\n return this.singleton;\n};\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['configservice'] = {};\nAWS.ConfigService = Service.defineService('configservice', ['2014-11-12']);\nObject.defineProperty(apiLoader.services['configservice'], '2014-11-12', {\n get: function get() {\n var model = require('../apis/config-2014-11-12.min.json');\n model.paginators = require('../apis/config-2014-11-12.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.ConfigService;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['cloudwatchlogs'] = {};\nAWS.CloudWatchLogs = Service.defineService('cloudwatchlogs', ['2014-03-28']);\nObject.defineProperty(apiLoader.services['cloudwatchlogs'], '2014-03-28', {\n get: function get() {\n var model = require('../apis/logs-2014-03-28.min.json');\n model.paginators = require('../apis/logs-2014-03-28.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.CloudWatchLogs;\n","/**\n * The main AWS namespace\n */\nvar AWS = { util: require('./util') };\n\n/**\n * @api private\n * @!macro [new] nobrowser\n * @note This feature is not supported in the browser environment of the SDK.\n */\nvar _hidden = {}; _hidden.toString(); // hack to parse macro\n\n/**\n * @api private\n */\nmodule.exports = AWS;\n\nAWS.util.update(AWS, {\n\n /**\n * @constant\n */\n VERSION: '2.834.0',\n\n /**\n * @api private\n */\n Signers: {},\n\n /**\n * @api private\n */\n Protocol: {\n Json: require('./protocol/json'),\n Query: require('./protocol/query'),\n Rest: require('./protocol/rest'),\n RestJson: require('./protocol/rest_json'),\n RestXml: require('./protocol/rest_xml')\n },\n\n /**\n * @api private\n */\n XML: {\n Builder: require('./xml/builder'),\n Parser: null // conditionally set based on environment\n },\n\n /**\n * @api private\n */\n JSON: {\n Builder: require('./json/builder'),\n Parser: require('./json/parser')\n },\n\n /**\n * @api private\n */\n Model: {\n Api: require('./model/api'),\n Operation: require('./model/operation'),\n Shape: require('./model/shape'),\n Paginator: require('./model/paginator'),\n ResourceWaiter: require('./model/resource_waiter')\n },\n\n /**\n * @api private\n */\n apiLoader: require('./api_loader'),\n\n /**\n * @api private\n */\n EndpointCache: require('../vendor/endpoint-cache').EndpointCache\n});\nrequire('./sequential_executor');\nrequire('./service');\nrequire('./config');\nrequire('./http');\nrequire('./event_listeners');\nrequire('./request');\nrequire('./response');\nrequire('./resource_waiter');\nrequire('./signers/request_signer');\nrequire('./param_validator');\n\n/**\n * @readonly\n * @return [AWS.SequentialExecutor] a collection of global event listeners that\n * are attached to every sent request.\n * @see AWS.Request AWS.Request for a list of events to listen for\n * @example Logging the time taken to send a request\n * AWS.events.on('send', function startSend(resp) {\n * resp.startTime = new Date().getTime();\n * }).on('complete', function calculateTime(resp) {\n * var time = (new Date().getTime() - resp.startTime) / 1000;\n * console.log('Request took ' + time + ' seconds');\n * });\n *\n * new AWS.S3().listBuckets(); // prints 'Request took 0.285 seconds'\n */\nAWS.events = new AWS.SequentialExecutor();\n\n//create endpoint cache lazily\nAWS.util.memoizedProperty(AWS, 'endpointCache', function() {\n return new AWS.EndpointCache(AWS.config.endpointCacheSize);\n}, true);\n","/**\n * Escapes characters that can not be in an XML element.\n */\nfunction escapeElement(value) {\n return value.replace(/&/g, '&').replace(//g, '>');\n}\n\n/**\n * @api private\n */\nmodule.exports = {\n escapeElement: escapeElement\n};\n","require('./browser_loader');\n\nvar AWS = require('./core');\n\nif (typeof window !== 'undefined') window.AWS = AWS;\nif (typeof module !== 'undefined') {\n /**\n * @api private\n */\n module.exports = AWS;\n}\nif (typeof self !== 'undefined') self.AWS = AWS;\n\n/**\n * @private\n * DO NOT REMOVE\n * browser builder will strip out this line if services are supplied on the command line.\n */\nrequire('../clients/browser_default');\n","var AWS = require('../core');\nvar inherit = AWS.util.inherit;\n\n/**\n * @api private\n */\nAWS.Signers.S3 = inherit(AWS.Signers.RequestSigner, {\n /**\n * When building the stringToSign, these sub resource params should be\n * part of the canonical resource string with their NON-decoded values\n */\n subResources: {\n 'acl': 1,\n 'accelerate': 1,\n 'analytics': 1,\n 'cors': 1,\n 'lifecycle': 1,\n 'delete': 1,\n 'inventory': 1,\n 'location': 1,\n 'logging': 1,\n 'metrics': 1,\n 'notification': 1,\n 'partNumber': 1,\n 'policy': 1,\n 'requestPayment': 1,\n 'replication': 1,\n 'restore': 1,\n 'tagging': 1,\n 'torrent': 1,\n 'uploadId': 1,\n 'uploads': 1,\n 'versionId': 1,\n 'versioning': 1,\n 'versions': 1,\n 'website': 1\n },\n\n // when building the stringToSign, these querystring params should be\n // part of the canonical resource string with their NON-encoded values\n responseHeaders: {\n 'response-content-type': 1,\n 'response-content-language': 1,\n 'response-expires': 1,\n 'response-cache-control': 1,\n 'response-content-disposition': 1,\n 'response-content-encoding': 1\n },\n\n addAuthorization: function addAuthorization(credentials, date) {\n if (!this.request.headers['presigned-expires']) {\n this.request.headers['X-Amz-Date'] = AWS.util.date.rfc822(date);\n }\n\n if (credentials.sessionToken) {\n // presigned URLs require this header to be lowercased\n this.request.headers['x-amz-security-token'] = credentials.sessionToken;\n }\n\n var signature = this.sign(credentials.secretAccessKey, this.stringToSign());\n var auth = 'AWS ' + credentials.accessKeyId + ':' + signature;\n\n this.request.headers['Authorization'] = auth;\n },\n\n stringToSign: function stringToSign() {\n var r = this.request;\n\n var parts = [];\n parts.push(r.method);\n parts.push(r.headers['Content-MD5'] || '');\n parts.push(r.headers['Content-Type'] || '');\n\n // This is the \"Date\" header, but we use X-Amz-Date.\n // The S3 signing mechanism requires us to pass an empty\n // string for this Date header regardless.\n parts.push(r.headers['presigned-expires'] || '');\n\n var headers = this.canonicalizedAmzHeaders();\n if (headers) parts.push(headers);\n parts.push(this.canonicalizedResource());\n\n return parts.join('\\n');\n\n },\n\n canonicalizedAmzHeaders: function canonicalizedAmzHeaders() {\n\n var amzHeaders = [];\n\n AWS.util.each(this.request.headers, function (name) {\n if (name.match(/^x-amz-/i))\n amzHeaders.push(name);\n });\n\n amzHeaders.sort(function (a, b) {\n return a.toLowerCase() < b.toLowerCase() ? -1 : 1;\n });\n\n var parts = [];\n AWS.util.arrayEach.call(this, amzHeaders, function (name) {\n parts.push(name.toLowerCase() + ':' + String(this.request.headers[name]));\n });\n\n return parts.join('\\n');\n\n },\n\n canonicalizedResource: function canonicalizedResource() {\n\n var r = this.request;\n\n var parts = r.path.split('?');\n var path = parts[0];\n var querystring = parts[1];\n\n var resource = '';\n\n if (r.virtualHostedBucket)\n resource += '/' + r.virtualHostedBucket;\n\n resource += path;\n\n if (querystring) {\n\n // collect a list of sub resources and query params that need to be signed\n var resources = [];\n\n AWS.util.arrayEach.call(this, querystring.split('&'), function (param) {\n var name = param.split('=')[0];\n var value = param.split('=')[1];\n if (this.subResources[name] || this.responseHeaders[name]) {\n var subresource = { name: name };\n if (value !== undefined) {\n if (this.subResources[name]) {\n subresource.value = value;\n } else {\n subresource.value = decodeURIComponent(value);\n }\n }\n resources.push(subresource);\n }\n });\n\n resources.sort(function (a, b) { return a.name < b.name ? -1 : 1; });\n\n if (resources.length) {\n\n querystring = [];\n AWS.util.arrayEach(resources, function (res) {\n if (res.value === undefined) {\n querystring.push(res.name);\n } else {\n querystring.push(res.name + '=' + res.value);\n }\n });\n\n resource += '?' + querystring.join('&');\n }\n\n }\n\n return resource;\n\n },\n\n sign: function sign(secret, string) {\n return AWS.util.crypto.hmac(secret, string, 'base64', 'sha1');\n }\n});\n\n/**\n * @api private\n */\nmodule.exports = AWS.Signers.S3;\n","var AWS = require('../core');\nvar STS = require('../../clients/sts');\n\n/**\n * Represents temporary credentials retrieved from {AWS.STS}. Without any\n * extra parameters, credentials will be fetched from the\n * {AWS.STS.getSessionToken} operation. If an IAM role is provided, the\n * {AWS.STS.assumeRole} operation will be used to fetch credentials for the\n * role instead.\n *\n * @note AWS.TemporaryCredentials is deprecated, but remains available for\n * backwards compatibility. {AWS.ChainableTemporaryCredentials} is the\n * preferred class for temporary credentials.\n *\n * To setup temporary credentials, configure a set of master credentials\n * using the standard credentials providers (environment, EC2 instance metadata,\n * or from the filesystem), then set the global credentials to a new\n * temporary credentials object:\n *\n * ```javascript\n * // Note that environment credentials are loaded by default,\n * // the following line is shown for clarity:\n * AWS.config.credentials = new AWS.EnvironmentCredentials('AWS');\n *\n * // Now set temporary credentials seeded from the master credentials\n * AWS.config.credentials = new AWS.TemporaryCredentials();\n *\n * // subsequent requests will now use temporary credentials from AWS STS.\n * new AWS.S3().listBucket(function(err, data) { ... });\n * ```\n *\n * @!attribute masterCredentials\n * @return [AWS.Credentials] the master (non-temporary) credentials used to\n * get and refresh temporary credentials from AWS STS.\n * @note (see constructor)\n */\nAWS.TemporaryCredentials = AWS.util.inherit(AWS.Credentials, {\n /**\n * Creates a new temporary credentials object.\n *\n * @note In order to create temporary credentials, you first need to have\n * \"master\" credentials configured in {AWS.Config.credentials}. These\n * master credentials are necessary to retrieve the temporary credentials,\n * as well as refresh the credentials when they expire.\n * @param params [map] a map of options that are passed to the\n * {AWS.STS.assumeRole} or {AWS.STS.getSessionToken} operations.\n * If a `RoleArn` parameter is passed in, credentials will be based on the\n * IAM role.\n * @param masterCredentials [AWS.Credentials] the master (non-temporary) credentials\n * used to get and refresh temporary credentials from AWS STS.\n * @example Creating a new credentials object for generic temporary credentials\n * AWS.config.credentials = new AWS.TemporaryCredentials();\n * @example Creating a new credentials object for an IAM role\n * AWS.config.credentials = new AWS.TemporaryCredentials({\n * RoleArn: 'arn:aws:iam::1234567890:role/TemporaryCredentials',\n * });\n * @see AWS.STS.assumeRole\n * @see AWS.STS.getSessionToken\n */\n constructor: function TemporaryCredentials(params, masterCredentials) {\n AWS.Credentials.call(this);\n this.loadMasterCredentials(masterCredentials);\n this.expired = true;\n\n this.params = params || {};\n if (this.params.RoleArn) {\n this.params.RoleSessionName =\n this.params.RoleSessionName || 'temporary-credentials';\n }\n },\n\n /**\n * Refreshes credentials using {AWS.STS.assumeRole} or\n * {AWS.STS.getSessionToken}, depending on whether an IAM role ARN was passed\n * to the credentials {constructor}.\n *\n * @callback callback function(err)\n * Called when the STS service responds (or fails). When\n * this callback is called with no error, it means that the credentials\n * information has been loaded into the object (as the `accessKeyId`,\n * `secretAccessKey`, and `sessionToken` properties).\n * @param err [Error] if an error occurred, this value will be filled\n * @see get\n */\n refresh: function refresh (callback) {\n this.coalesceRefresh(callback || AWS.util.fn.callback);\n },\n\n /**\n * @api private\n */\n load: function load (callback) {\n var self = this;\n self.createClients();\n self.masterCredentials.get(function () {\n self.service.config.credentials = self.masterCredentials;\n var operation = self.params.RoleArn ?\n self.service.assumeRole : self.service.getSessionToken;\n operation.call(self.service, function (err, data) {\n if (!err) {\n self.service.credentialsFrom(data, self);\n }\n callback(err);\n });\n });\n },\n\n /**\n * @api private\n */\n loadMasterCredentials: function loadMasterCredentials (masterCredentials) {\n this.masterCredentials = masterCredentials || AWS.config.credentials;\n while (this.masterCredentials.masterCredentials) {\n this.masterCredentials = this.masterCredentials.masterCredentials;\n }\n\n if (typeof this.masterCredentials.get !== 'function') {\n this.masterCredentials = new AWS.Credentials(this.masterCredentials);\n }\n },\n\n /**\n * @api private\n */\n createClients: function () {\n this.service = this.service || new STS({params: this.params});\n }\n\n});\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['mediastoredata'] = {};\nAWS.MediaStoreData = Service.defineService('mediastoredata', ['2017-09-01']);\nObject.defineProperty(apiLoader.services['mediastoredata'], '2017-09-01', {\n get: function get() {\n var model = require('../apis/mediastore-data-2017-09-01.min.json');\n model.paginators = require('../apis/mediastore-data-2017-09-01.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.MediaStoreData;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['xray'] = {};\nAWS.XRay = Service.defineService('xray', ['2016-04-12']);\nObject.defineProperty(apiLoader.services['xray'], '2016-04-12', {\n get: function get() {\n var model = require('../apis/xray-2016-04-12.min.json');\n model.paginators = require('../apis/xray-2016-04-12.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.XRay;\n","var property = require('../util').property;\n\nfunction Paginator(name, paginator) {\n property(this, 'inputToken', paginator.input_token);\n property(this, 'limitKey', paginator.limit_key);\n property(this, 'moreResults', paginator.more_results);\n property(this, 'outputToken', paginator.output_token);\n property(this, 'resultKey', paginator.result_key);\n}\n\n/**\n * @api private\n */\nmodule.exports = Paginator;\n","var memoizedProperty = require('../util').memoizedProperty;\n\nfunction memoize(name, value, factory, nameTr) {\n memoizedProperty(this, nameTr(name), function() {\n return factory(name, value);\n });\n}\n\nfunction Collection(iterable, options, factory, nameTr, callback) {\n nameTr = nameTr || String;\n var self = this;\n\n for (var id in iterable) {\n if (Object.prototype.hasOwnProperty.call(iterable, id)) {\n memoize.call(self, id, iterable[id], factory, nameTr);\n if (callback) callback(id, iterable[id]);\n }\n }\n}\n\n/**\n * @api private\n */\nmodule.exports = Collection;\n","var AWS = require('./core');\n\n/**\n * @api private\n */\nAWS.ParamValidator = AWS.util.inherit({\n /**\n * Create a new validator object.\n *\n * @param validation [Boolean|map] whether input parameters should be\n * validated against the operation description before sending the\n * request. Pass a map to enable any of the following specific\n * validation features:\n *\n * * **min** [Boolean] — Validates that a value meets the min\n * constraint. This is enabled by default when paramValidation is set\n * to `true`.\n * * **max** [Boolean] — Validates that a value meets the max\n * constraint.\n * * **pattern** [Boolean] — Validates that a string value matches a\n * regular expression.\n * * **enum** [Boolean] — Validates that a string value matches one\n * of the allowable enum values.\n */\n constructor: function ParamValidator(validation) {\n if (validation === true || validation === undefined) {\n validation = {'min': true};\n }\n this.validation = validation;\n },\n\n validate: function validate(shape, params, context) {\n this.errors = [];\n this.validateMember(shape, params || {}, context || 'params');\n\n if (this.errors.length > 1) {\n var msg = this.errors.join('\\n* ');\n msg = 'There were ' + this.errors.length +\n ' validation errors:\\n* ' + msg;\n throw AWS.util.error(new Error(msg),\n {code: 'MultipleValidationErrors', errors: this.errors});\n } else if (this.errors.length === 1) {\n throw this.errors[0];\n } else {\n return true;\n }\n },\n\n fail: function fail(code, message) {\n this.errors.push(AWS.util.error(new Error(message), {code: code}));\n },\n\n validateStructure: function validateStructure(shape, params, context) {\n this.validateType(params, context, ['object'], 'structure');\n\n var paramName;\n for (var i = 0; shape.required && i < shape.required.length; i++) {\n paramName = shape.required[i];\n var value = params[paramName];\n if (value === undefined || value === null) {\n this.fail('MissingRequiredParameter',\n 'Missing required key \\'' + paramName + '\\' in ' + context);\n }\n }\n\n // validate hash members\n for (paramName in params) {\n if (!Object.prototype.hasOwnProperty.call(params, paramName)) continue;\n\n var paramValue = params[paramName],\n memberShape = shape.members[paramName];\n\n if (memberShape !== undefined) {\n var memberContext = [context, paramName].join('.');\n this.validateMember(memberShape, paramValue, memberContext);\n } else if (paramValue !== undefined && paramValue !== null) {\n this.fail('UnexpectedParameter',\n 'Unexpected key \\'' + paramName + '\\' found in ' + context);\n }\n }\n\n return true;\n },\n\n validateMember: function validateMember(shape, param, context) {\n switch (shape.type) {\n case 'structure':\n return this.validateStructure(shape, param, context);\n case 'list':\n return this.validateList(shape, param, context);\n case 'map':\n return this.validateMap(shape, param, context);\n default:\n return this.validateScalar(shape, param, context);\n }\n },\n\n validateList: function validateList(shape, params, context) {\n if (this.validateType(params, context, [Array])) {\n this.validateRange(shape, params.length, context, 'list member count');\n // validate array members\n for (var i = 0; i < params.length; i++) {\n this.validateMember(shape.member, params[i], context + '[' + i + ']');\n }\n }\n },\n\n validateMap: function validateMap(shape, params, context) {\n if (this.validateType(params, context, ['object'], 'map')) {\n // Build up a count of map members to validate range traits.\n var mapCount = 0;\n for (var param in params) {\n if (!Object.prototype.hasOwnProperty.call(params, param)) continue;\n // Validate any map key trait constraints\n this.validateMember(shape.key, param,\n context + '[key=\\'' + param + '\\']');\n this.validateMember(shape.value, params[param],\n context + '[\\'' + param + '\\']');\n mapCount++;\n }\n this.validateRange(shape, mapCount, context, 'map member count');\n }\n },\n\n validateScalar: function validateScalar(shape, value, context) {\n switch (shape.type) {\n case null:\n case undefined:\n case 'string':\n return this.validateString(shape, value, context);\n case 'base64':\n case 'binary':\n return this.validatePayload(value, context);\n case 'integer':\n case 'float':\n return this.validateNumber(shape, value, context);\n case 'boolean':\n return this.validateType(value, context, ['boolean']);\n case 'timestamp':\n return this.validateType(value, context, [Date,\n /^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?Z$/, 'number'],\n 'Date object, ISO-8601 string, or a UNIX timestamp');\n default:\n return this.fail('UnkownType', 'Unhandled type ' +\n shape.type + ' for ' + context);\n }\n },\n\n validateString: function validateString(shape, value, context) {\n var validTypes = ['string'];\n if (shape.isJsonValue) {\n validTypes = validTypes.concat(['number', 'object', 'boolean']);\n }\n if (value !== null && this.validateType(value, context, validTypes)) {\n this.validateEnum(shape, value, context);\n this.validateRange(shape, value.length, context, 'string length');\n this.validatePattern(shape, value, context);\n this.validateUri(shape, value, context);\n }\n },\n\n validateUri: function validateUri(shape, value, context) {\n if (shape['location'] === 'uri') {\n if (value.length === 0) {\n this.fail('UriParameterError', 'Expected uri parameter to have length >= 1,'\n + ' but found \"' + value +'\" for ' + context);\n }\n }\n },\n\n validatePattern: function validatePattern(shape, value, context) {\n if (this.validation['pattern'] && shape['pattern'] !== undefined) {\n if (!(new RegExp(shape['pattern'])).test(value)) {\n this.fail('PatternMatchError', 'Provided value \"' + value + '\" '\n + 'does not match regex pattern /' + shape['pattern'] + '/ for '\n + context);\n }\n }\n },\n\n validateRange: function validateRange(shape, value, context, descriptor) {\n if (this.validation['min']) {\n if (shape['min'] !== undefined && value < shape['min']) {\n this.fail('MinRangeError', 'Expected ' + descriptor + ' >= '\n + shape['min'] + ', but found ' + value + ' for ' + context);\n }\n }\n if (this.validation['max']) {\n if (shape['max'] !== undefined && value > shape['max']) {\n this.fail('MaxRangeError', 'Expected ' + descriptor + ' <= '\n + shape['max'] + ', but found ' + value + ' for ' + context);\n }\n }\n },\n\n validateEnum: function validateRange(shape, value, context) {\n if (this.validation['enum'] && shape['enum'] !== undefined) {\n // Fail if the string value is not present in the enum list\n if (shape['enum'].indexOf(value) === -1) {\n this.fail('EnumError', 'Found string value of ' + value + ', but '\n + 'expected ' + shape['enum'].join('|') + ' for ' + context);\n }\n }\n },\n\n validateType: function validateType(value, context, acceptedTypes, type) {\n // We will not log an error for null or undefined, but we will return\n // false so that callers know that the expected type was not strictly met.\n if (value === null || value === undefined) return false;\n\n var foundInvalidType = false;\n for (var i = 0; i < acceptedTypes.length; i++) {\n if (typeof acceptedTypes[i] === 'string') {\n if (typeof value === acceptedTypes[i]) return true;\n } else if (acceptedTypes[i] instanceof RegExp) {\n if ((value || '').toString().match(acceptedTypes[i])) return true;\n } else {\n if (value instanceof acceptedTypes[i]) return true;\n if (AWS.util.isType(value, acceptedTypes[i])) return true;\n if (!type && !foundInvalidType) acceptedTypes = acceptedTypes.slice();\n acceptedTypes[i] = AWS.util.typeName(acceptedTypes[i]);\n }\n foundInvalidType = true;\n }\n\n var acceptedType = type;\n if (!acceptedType) {\n acceptedType = acceptedTypes.join(', ').replace(/,([^,]+)$/, ', or$1');\n }\n\n var vowel = acceptedType.match(/^[aeiou]/i) ? 'n' : '';\n this.fail('InvalidParameterType', 'Expected ' + context + ' to be a' +\n vowel + ' ' + acceptedType);\n return false;\n },\n\n validateNumber: function validateNumber(shape, value, context) {\n if (value === null || value === undefined) return;\n if (typeof value === 'string') {\n var castedValue = parseFloat(value);\n if (castedValue.toString() === value) value = castedValue;\n }\n if (this.validateType(value, context, ['number'])) {\n this.validateRange(shape, value, context, 'numeric value');\n }\n },\n\n validatePayload: function validatePayload(value, context) {\n if (value === null || value === undefined) return;\n if (typeof value === 'string') return;\n if (value && typeof value.byteLength === 'number') return; // typed arrays\n if (AWS.util.isNode()) { // special check for buffer/stream in Node.js\n var Stream = AWS.util.stream.Stream;\n if (AWS.util.Buffer.isBuffer(value) || value instanceof Stream) return;\n } else {\n if (typeof Blob !== void 0 && value instanceof Blob) return;\n }\n\n var types = ['Buffer', 'Stream', 'File', 'Blob', 'ArrayBuffer', 'DataView'];\n if (value) {\n for (var i = 0; i < types.length; i++) {\n if (AWS.util.isType(value, types[i])) return;\n if (AWS.util.typeName(value.constructor) === types[i]) return;\n }\n }\n\n this.fail('InvalidParameterType', 'Expected ' + context + ' to be a ' +\n 'string, Buffer, Stream, Blob, or typed array object');\n }\n});\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['personalize'] = {};\nAWS.Personalize = Service.defineService('personalize', ['2018-05-22']);\nObject.defineProperty(apiLoader.services['personalize'], '2018-05-22', {\n get: function get() {\n var model = require('../apis/personalize-2018-05-22.min.json');\n model.paginators = require('../apis/personalize-2018-05-22.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.Personalize;\n","var AWS = require('../core');\nvar v4Credentials = require('../signers/v4_credentials');\nvar resolveRegionalEndpointsFlag = require('../config_regional_endpoint');\nvar s3util = require('./s3util');\nvar regionUtil = require('../region_config');\n\n// Pull in managed upload extension\nrequire('../s3/managed_upload');\n\n/**\n * @api private\n */\nvar operationsWith200StatusCodeError = {\n 'completeMultipartUpload': true,\n 'copyObject': true,\n 'uploadPartCopy': true\n};\n\n/**\n * @api private\n */\n var regionRedirectErrorCodes = [\n 'AuthorizationHeaderMalformed', // non-head operations on virtual-hosted global bucket endpoints\n 'BadRequest', // head operations on virtual-hosted global bucket endpoints\n 'PermanentRedirect', // non-head operations on path-style or regional endpoints\n 301 // head operations on path-style or regional endpoints\n ];\n\nAWS.util.update(AWS.S3.prototype, {\n /**\n * @api private\n */\n getSignatureVersion: function getSignatureVersion(request) {\n var defaultApiVersion = this.api.signatureVersion;\n var userDefinedVersion = this._originalConfig ? this._originalConfig.signatureVersion : null;\n var regionDefinedVersion = this.config.signatureVersion;\n var isPresigned = request ? request.isPresigned() : false;\n /*\n 1) User defined version specified:\n a) always return user defined version\n 2) No user defined version specified:\n a) If not using presigned urls, default to V4\n b) If using presigned urls, default to lowest version the region supports\n */\n if (userDefinedVersion) {\n userDefinedVersion = userDefinedVersion === 'v2' ? 's3' : userDefinedVersion;\n return userDefinedVersion;\n }\n if (isPresigned !== true) {\n defaultApiVersion = 'v4';\n } else if (regionDefinedVersion) {\n defaultApiVersion = regionDefinedVersion;\n }\n return defaultApiVersion;\n },\n\n /**\n * @api private\n */\n getSigningName: function getSigningName() {\n var _super = AWS.Service.prototype.getSigningName;\n return (this._parsedArn && this._parsedArn.service)\n ? this._parsedArn.service\n : _super.call(this);\n },\n\n /**\n * @api private\n */\n getSignerClass: function getSignerClass(request) {\n var signatureVersion = this.getSignatureVersion(request);\n return AWS.Signers.RequestSigner.getVersion(signatureVersion);\n },\n\n /**\n * @api private\n */\n validateService: function validateService() {\n var msg;\n var messages = [];\n\n // default to us-east-1 when no region is provided\n if (!this.config.region) this.config.region = 'us-east-1';\n\n if (!this.config.endpoint && this.config.s3BucketEndpoint) {\n messages.push('An endpoint must be provided when configuring ' +\n '`s3BucketEndpoint` to true.');\n }\n if (messages.length === 1) {\n msg = messages[0];\n } else if (messages.length > 1) {\n msg = 'Multiple configuration errors:\\n' + messages.join('\\n');\n }\n if (msg) {\n throw AWS.util.error(new Error(),\n {name: 'InvalidEndpoint', message: msg});\n }\n },\n\n /**\n * @api private\n */\n shouldDisableBodySigning: function shouldDisableBodySigning(request) {\n var signerClass = this.getSignerClass();\n if (this.config.s3DisableBodySigning === true && signerClass === AWS.Signers.V4\n && request.httpRequest.endpoint.protocol === 'https:') {\n return true;\n }\n return false;\n },\n\n /**\n * @api private\n */\n setupRequestListeners: function setupRequestListeners(request) {\n var prependListener = true;\n request.addListener('validate', this.validateScheme);\n request.addListener('validate', this.validateBucketName, prependListener);\n request.addListener('validate', this.optInUsEast1RegionalEndpoint, prependListener);\n\n request.removeListener('validate',\n AWS.EventListeners.Core.VALIDATE_REGION);\n request.addListener('build', this.addContentType);\n request.addListener('build', this.computeContentMd5);\n request.addListener('build', this.computeSseCustomerKeyMd5);\n request.addListener('build', this.populateURI);\n request.addListener('afterBuild', this.addExpect100Continue);\n request.addListener('extractError', this.extractError);\n request.addListener('extractData', AWS.util.hoistPayloadMember);\n request.addListener('extractData', this.extractData);\n request.addListener('extractData', this.extractErrorFrom200Response);\n request.addListener('beforePresign', this.prepareSignedUrl);\n if (this.shouldDisableBodySigning(request)) {\n request.removeListener('afterBuild', AWS.EventListeners.Core.COMPUTE_SHA256);\n request.addListener('afterBuild', this.disableBodySigning);\n }\n //deal with ARNs supplied to Bucket\n if (request.operation !== 'createBucket' && s3util.isArnInParam(request, 'Bucket')) {\n // avoid duplicate parsing in the future\n request.service._parsedArn = AWS.util.ARN.parse(request.params.Bucket);\n\n request.removeListener('validate', this.validateBucketName);\n request.removeListener('build', this.populateURI);\n if (request.service._parsedArn.service === 's3') {\n request.addListener('validate', s3util.validateS3AccessPointArn);\n request.addListener('validate', this.validateArnResourceType);\n } else if (request.service._parsedArn.service === 's3-outposts') {\n request.addListener('validate', s3util.validateOutpostsAccessPointArn);\n request.addListener('validate', s3util.validateOutpostsArn);\n }\n request.addListener('validate', s3util.validateArnRegion);\n request.addListener('validate', s3util.validateArnAccount);\n request.addListener('validate', s3util.validateArnService);\n request.addListener('build', this.populateUriFromAccessPointArn);\n request.addListener('build', s3util.validatePopulateUriFromArn);\n return;\n }\n //listeners regarding region inference\n request.addListener('validate', this.validateBucketEndpoint);\n request.addListener('validate', this.correctBucketRegionFromCache);\n request.onAsync('extractError', this.requestBucketRegion);\n if (AWS.util.isBrowser()) {\n request.onAsync('retry', this.reqRegionForNetworkingError);\n }\n },\n\n /**\n * @api private\n */\n validateScheme: function(req) {\n var params = req.params,\n scheme = req.httpRequest.endpoint.protocol,\n sensitive = params.SSECustomerKey || params.CopySourceSSECustomerKey;\n if (sensitive && scheme !== 'https:') {\n var msg = 'Cannot send SSE keys over HTTP. Set \\'sslEnabled\\'' +\n 'to \\'true\\' in your configuration';\n throw AWS.util.error(new Error(),\n { code: 'ConfigError', message: msg });\n }\n },\n\n /**\n * @api private\n */\n validateBucketEndpoint: function(req) {\n if (!req.params.Bucket && req.service.config.s3BucketEndpoint) {\n var msg = 'Cannot send requests to root API with `s3BucketEndpoint` set.';\n throw AWS.util.error(new Error(),\n { code: 'ConfigError', message: msg });\n }\n },\n\n /**\n * Validate resource-type supplied in S3 ARN\n */\n validateArnResourceType: function validateArnResourceType(req) {\n var resource = req.service._parsedArn.resource;\n\n if (\n resource.indexOf('accesspoint:') !== 0 &&\n resource.indexOf('accesspoint/') !== 0\n ) {\n throw AWS.util.error(new Error(), {\n code: 'InvalidARN',\n message: 'ARN resource should begin with \\'accesspoint/\\''\n });\n }\n },\n\n /**\n * @api private\n */\n validateBucketName: function validateBucketName(req) {\n var service = req.service;\n var signatureVersion = service.getSignatureVersion(req);\n var bucket = req.params && req.params.Bucket;\n var key = req.params && req.params.Key;\n var slashIndex = bucket && bucket.indexOf('/');\n if (bucket && slashIndex >= 0) {\n if (typeof key === 'string' && slashIndex > 0) {\n req.params = AWS.util.copy(req.params);\n // Need to include trailing slash to match sigv2 behavior\n var prefix = bucket.substr(slashIndex + 1) || '';\n req.params.Key = prefix + '/' + key;\n req.params.Bucket = bucket.substr(0, slashIndex);\n } else if (signatureVersion === 'v4') {\n var msg = 'Bucket names cannot contain forward slashes. Bucket: ' + bucket;\n throw AWS.util.error(new Error(),\n { code: 'InvalidBucket', message: msg });\n }\n }\n },\n\n /**\n * @api private\n */\n isValidAccelerateOperation: function isValidAccelerateOperation(operation) {\n var invalidOperations = [\n 'createBucket',\n 'deleteBucket',\n 'listBuckets'\n ];\n return invalidOperations.indexOf(operation) === -1;\n },\n\n /**\n * When us-east-1 region endpoint configuration is set, in stead of sending request to\n * global endpoint(e.g. 's3.amazonaws.com'), we will send request to\n * 's3.us-east-1.amazonaws.com'.\n * @api private\n */\n optInUsEast1RegionalEndpoint: function optInUsEast1RegionalEndpoint(req) {\n var service = req.service;\n var config = service.config;\n config.s3UsEast1RegionalEndpoint = resolveRegionalEndpointsFlag(service._originalConfig, {\n env: 'AWS_S3_US_EAST_1_REGIONAL_ENDPOINT',\n sharedConfig: 's3_us_east_1_regional_endpoint',\n clientConfig: 's3UsEast1RegionalEndpoint'\n });\n if (\n !(service._originalConfig || {}).endpoint &&\n req.httpRequest.region === 'us-east-1' &&\n config.s3UsEast1RegionalEndpoint === 'regional' &&\n req.httpRequest.endpoint.hostname.indexOf('s3.amazonaws.com') >= 0\n ) {\n var insertPoint = config.endpoint.indexOf('.amazonaws.com');\n regionalEndpoint = config.endpoint.substring(0, insertPoint) +\n '.us-east-1' + config.endpoint.substring(insertPoint);\n req.httpRequest.updateEndpoint(regionalEndpoint);\n }\n },\n\n /**\n * S3 prefers dns-compatible bucket names to be moved from the uri path\n * to the hostname as a sub-domain. This is not possible, even for dns-compat\n * buckets when using SSL and the bucket name contains a dot ('.'). The\n * ssl wildcard certificate is only 1-level deep.\n *\n * @api private\n */\n populateURI: function populateURI(req) {\n var httpRequest = req.httpRequest;\n var b = req.params.Bucket;\n var service = req.service;\n var endpoint = httpRequest.endpoint;\n if (b) {\n if (!service.pathStyleBucketName(b)) {\n if (service.config.useAccelerateEndpoint && service.isValidAccelerateOperation(req.operation)) {\n if (service.config.useDualstack) {\n endpoint.hostname = b + '.s3-accelerate.dualstack.amazonaws.com';\n } else {\n endpoint.hostname = b + '.s3-accelerate.amazonaws.com';\n }\n } else if (!service.config.s3BucketEndpoint) {\n endpoint.hostname =\n b + '.' + endpoint.hostname;\n }\n\n var port = endpoint.port;\n if (port !== 80 && port !== 443) {\n endpoint.host = endpoint.hostname + ':' +\n endpoint.port;\n } else {\n endpoint.host = endpoint.hostname;\n }\n\n httpRequest.virtualHostedBucket = b; // needed for signing the request\n service.removeVirtualHostedBucketFromPath(req);\n }\n }\n },\n\n /**\n * Takes the bucket name out of the path if bucket is virtual-hosted\n *\n * @api private\n */\n removeVirtualHostedBucketFromPath: function removeVirtualHostedBucketFromPath(req) {\n var httpRequest = req.httpRequest;\n var bucket = httpRequest.virtualHostedBucket;\n if (bucket && httpRequest.path) {\n if (req.params && req.params.Key) {\n var encodedS3Key = '/' + AWS.util.uriEscapePath(req.params.Key);\n if (httpRequest.path.indexOf(encodedS3Key) === 0 && (httpRequest.path.length === encodedS3Key.length || httpRequest.path[encodedS3Key.length] === '?')) {\n //path only contains key or path contains only key and querystring\n return;\n }\n }\n httpRequest.path = httpRequest.path.replace(new RegExp('/' + bucket), '');\n if (httpRequest.path[0] !== '/') {\n httpRequest.path = '/' + httpRequest.path;\n }\n }\n },\n\n /**\n * When user supply an access point ARN in the Bucket parameter, we need to\n * populate the URI according to the ARN.\n */\n populateUriFromAccessPointArn: function populateUriFromAccessPointArn(req) {\n var accessPointArn = req.service._parsedArn;\n\n var isOutpostArn = accessPointArn.service === 's3-outposts';\n\n var outpostsSuffix = isOutpostArn ? '.' + accessPointArn.outpostId: '';\n var serviceName = isOutpostArn ? 's3-outposts': 's3-accesspoint';\n var dualStackSuffix = !isOutpostArn && req.service.config.useDualstack ? '.dualstack' : '';\n\n var endpoint = req.httpRequest.endpoint;\n var dnsSuffix = regionUtil.getEndpointSuffix(accessPointArn.region);\n var useArnRegion = req.service.config.s3UseArnRegion;\n\n endpoint.hostname = [\n accessPointArn.accessPoint + '-' + accessPointArn.accountId + outpostsSuffix,\n serviceName + dualStackSuffix,\n useArnRegion ? accessPointArn.region : req.service.config.region,\n dnsSuffix\n ].join('.');\n endpoint.host = endpoint.hostname;\n\n var encodedArn = AWS.util.uriEscape(req.params.Bucket);\n var path = req.httpRequest.path;\n //remove the Bucket value from path\n req.httpRequest.path = path.replace(new RegExp('/' + encodedArn), '');\n if (req.httpRequest.path[0] !== '/') {\n req.httpRequest.path = '/' + req.httpRequest.path;\n }\n req.httpRequest.region = accessPointArn.region; //region used to sign\n },\n\n /**\n * Adds Expect: 100-continue header if payload is greater-or-equal 1MB\n * @api private\n */\n addExpect100Continue: function addExpect100Continue(req) {\n var len = req.httpRequest.headers['Content-Length'];\n if (AWS.util.isNode() && (len >= 1024 * 1024 || req.params.Body instanceof AWS.util.stream.Stream)) {\n req.httpRequest.headers['Expect'] = '100-continue';\n }\n },\n\n /**\n * Adds a default content type if none is supplied.\n *\n * @api private\n */\n addContentType: function addContentType(req) {\n var httpRequest = req.httpRequest;\n if (httpRequest.method === 'GET' || httpRequest.method === 'HEAD') {\n // Content-Type is not set in GET/HEAD requests\n delete httpRequest.headers['Content-Type'];\n return;\n }\n\n if (!httpRequest.headers['Content-Type']) { // always have a Content-Type\n httpRequest.headers['Content-Type'] = 'application/octet-stream';\n }\n\n var contentType = httpRequest.headers['Content-Type'];\n if (AWS.util.isBrowser()) {\n if (typeof httpRequest.body === 'string' && !contentType.match(/;\\s*charset=/)) {\n var charset = '; charset=UTF-8';\n httpRequest.headers['Content-Type'] += charset;\n } else {\n var replaceFn = function(_, prefix, charsetName) {\n return prefix + charsetName.toUpperCase();\n };\n\n httpRequest.headers['Content-Type'] =\n contentType.replace(/(;\\s*charset=)(.+)$/, replaceFn);\n }\n }\n },\n\n /**\n * @api private\n */\n computableChecksumOperations: {\n putBucketCors: true,\n putBucketLifecycle: true,\n putBucketLifecycleConfiguration: true,\n putBucketTagging: true,\n deleteObjects: true,\n putBucketReplication: true,\n putObjectLegalHold: true,\n putObjectRetention: true,\n putObjectLockConfiguration: true\n },\n\n /**\n * Checks whether checksums should be computed for the request.\n * If the request requires checksums to be computed, this will always\n * return true, otherwise it depends on whether {AWS.Config.computeChecksums}\n * is set.\n *\n * @param req [AWS.Request] the request to check against\n * @return [Boolean] whether to compute checksums for a request.\n * @api private\n */\n willComputeChecksums: function willComputeChecksums(req) {\n if (this.computableChecksumOperations[req.operation]) return true;\n if (!this.config.computeChecksums) return false;\n\n // TODO: compute checksums for Stream objects\n if (!AWS.util.Buffer.isBuffer(req.httpRequest.body) &&\n typeof req.httpRequest.body !== 'string') {\n return false;\n }\n\n var rules = req.service.api.operations[req.operation].input.members;\n\n // Sha256 signing disabled, and not a presigned url\n if (req.service.shouldDisableBodySigning(req) && !Object.prototype.hasOwnProperty.call(req.httpRequest.headers, 'presigned-expires')) {\n if (rules.ContentMD5 && !req.params.ContentMD5) {\n return true;\n }\n }\n\n // V4 signer uses SHA256 signatures so only compute MD5 if it is required\n if (req.service.getSignerClass(req) === AWS.Signers.V4) {\n if (rules.ContentMD5 && !rules.ContentMD5.required) return false;\n }\n\n if (rules.ContentMD5 && !req.params.ContentMD5) return true;\n },\n\n /**\n * A listener that computes the Content-MD5 and sets it in the header.\n * @see AWS.S3.willComputeChecksums\n * @api private\n */\n computeContentMd5: function computeContentMd5(req) {\n if (req.service.willComputeChecksums(req)) {\n var md5 = AWS.util.crypto.md5(req.httpRequest.body, 'base64');\n req.httpRequest.headers['Content-MD5'] = md5;\n }\n },\n\n /**\n * @api private\n */\n computeSseCustomerKeyMd5: function computeSseCustomerKeyMd5(req) {\n var keys = {\n SSECustomerKey: 'x-amz-server-side-encryption-customer-key-MD5',\n CopySourceSSECustomerKey: 'x-amz-copy-source-server-side-encryption-customer-key-MD5'\n };\n AWS.util.each(keys, function(key, header) {\n if (req.params[key]) {\n var value = AWS.util.crypto.md5(req.params[key], 'base64');\n req.httpRequest.headers[header] = value;\n }\n });\n },\n\n /**\n * Returns true if the bucket name should be left in the URI path for\n * a request to S3. This function takes into account the current\n * endpoint protocol (e.g. http or https).\n *\n * @api private\n */\n pathStyleBucketName: function pathStyleBucketName(bucketName) {\n // user can force path style requests via the configuration\n if (this.config.s3ForcePathStyle) return true;\n if (this.config.s3BucketEndpoint) return false;\n\n if (s3util.dnsCompatibleBucketName(bucketName)) {\n return (this.config.sslEnabled && bucketName.match(/\\./)) ? true : false;\n } else {\n return true; // not dns compatible names must always use path style\n }\n },\n\n /**\n * For COPY operations, some can be error even with status code 200.\n * SDK treats the response as exception when response body indicates\n * an exception or body is empty.\n *\n * @api private\n */\n extractErrorFrom200Response: function extractErrorFrom200Response(resp) {\n if (!operationsWith200StatusCodeError[resp.request.operation]) return;\n var httpResponse = resp.httpResponse;\n if (httpResponse.body && httpResponse.body.toString().match('')) {\n // Response body with '...' indicates an exception.\n // Get S3 client object. In ManagedUpload, this.service refers to\n // S3 client object.\n resp.data = null;\n var service = this.service ? this.service : this;\n service.extractError(resp);\n throw resp.error;\n } else if (!httpResponse.body || !httpResponse.body.toString().match(/<[\\w_]/)) {\n // When body is empty or incomplete, S3 might stop the request on detecting client\n // side aborting the request.\n resp.data = null;\n throw AWS.util.error(new Error(), {\n code: 'InternalError',\n message: 'S3 aborted request'\n });\n }\n },\n\n /**\n * @return [Boolean] whether the error can be retried\n * @api private\n */\n retryableError: function retryableError(error, request) {\n if (operationsWith200StatusCodeError[request.operation] &&\n error.statusCode === 200) {\n return true;\n } else if (request._requestRegionForBucket &&\n request.service.bucketRegionCache[request._requestRegionForBucket]) {\n return false;\n } else if (error && error.code === 'RequestTimeout') {\n return true;\n } else if (error &&\n regionRedirectErrorCodes.indexOf(error.code) != -1 &&\n error.region && error.region != request.httpRequest.region) {\n request.httpRequest.region = error.region;\n if (error.statusCode === 301) {\n request.service.updateReqBucketRegion(request);\n }\n return true;\n } else {\n var _super = AWS.Service.prototype.retryableError;\n return _super.call(this, error, request);\n }\n },\n\n /**\n * Updates httpRequest with region. If region is not provided, then\n * the httpRequest will be updated based on httpRequest.region\n *\n * @api private\n */\n updateReqBucketRegion: function updateReqBucketRegion(request, region) {\n var httpRequest = request.httpRequest;\n if (typeof region === 'string' && region.length) {\n httpRequest.region = region;\n }\n if (!httpRequest.endpoint.host.match(/s3(?!-accelerate).*\\.amazonaws\\.com$/)) {\n return;\n }\n var service = request.service;\n var s3Config = service.config;\n var s3BucketEndpoint = s3Config.s3BucketEndpoint;\n if (s3BucketEndpoint) {\n delete s3Config.s3BucketEndpoint;\n }\n var newConfig = AWS.util.copy(s3Config);\n delete newConfig.endpoint;\n newConfig.region = httpRequest.region;\n\n httpRequest.endpoint = (new AWS.S3(newConfig)).endpoint;\n service.populateURI(request);\n s3Config.s3BucketEndpoint = s3BucketEndpoint;\n httpRequest.headers.Host = httpRequest.endpoint.host;\n\n if (request._asm.currentState === 'validate') {\n request.removeListener('build', service.populateURI);\n request.addListener('build', service.removeVirtualHostedBucketFromPath);\n }\n },\n\n /**\n * Provides a specialized parser for getBucketLocation -- all other\n * operations are parsed by the super class.\n *\n * @api private\n */\n extractData: function extractData(resp) {\n var req = resp.request;\n if (req.operation === 'getBucketLocation') {\n var match = resp.httpResponse.body.toString().match(/>(.+)<\\/Location/);\n delete resp.data['_'];\n if (match) {\n resp.data.LocationConstraint = match[1];\n } else {\n resp.data.LocationConstraint = '';\n }\n }\n var bucket = req.params.Bucket || null;\n if (req.operation === 'deleteBucket' && typeof bucket === 'string' && !resp.error) {\n req.service.clearBucketRegionCache(bucket);\n } else {\n var headers = resp.httpResponse.headers || {};\n var region = headers['x-amz-bucket-region'] || null;\n if (!region && req.operation === 'createBucket' && !resp.error) {\n var createBucketConfiguration = req.params.CreateBucketConfiguration;\n if (!createBucketConfiguration) {\n region = 'us-east-1';\n } else if (createBucketConfiguration.LocationConstraint === 'EU') {\n region = 'eu-west-1';\n } else {\n region = createBucketConfiguration.LocationConstraint;\n }\n }\n if (region) {\n if (bucket && region !== req.service.bucketRegionCache[bucket]) {\n req.service.bucketRegionCache[bucket] = region;\n }\n }\n }\n req.service.extractRequestIds(resp);\n },\n\n /**\n * Extracts an error object from the http response.\n *\n * @api private\n */\n extractError: function extractError(resp) {\n var codes = {\n 304: 'NotModified',\n 403: 'Forbidden',\n 400: 'BadRequest',\n 404: 'NotFound'\n };\n\n var req = resp.request;\n var code = resp.httpResponse.statusCode;\n var body = resp.httpResponse.body || '';\n\n var headers = resp.httpResponse.headers || {};\n var region = headers['x-amz-bucket-region'] || null;\n var bucket = req.params.Bucket || null;\n var bucketRegionCache = req.service.bucketRegionCache;\n if (region && bucket && region !== bucketRegionCache[bucket]) {\n bucketRegionCache[bucket] = region;\n }\n\n var cachedRegion;\n if (codes[code] && body.length === 0) {\n if (bucket && !region) {\n cachedRegion = bucketRegionCache[bucket] || null;\n if (cachedRegion !== req.httpRequest.region) {\n region = cachedRegion;\n }\n }\n resp.error = AWS.util.error(new Error(), {\n code: codes[code],\n message: null,\n region: region\n });\n } else {\n var data = new AWS.XML.Parser().parse(body.toString());\n\n if (data.Region && !region) {\n region = data.Region;\n if (bucket && region !== bucketRegionCache[bucket]) {\n bucketRegionCache[bucket] = region;\n }\n } else if (bucket && !region && !data.Region) {\n cachedRegion = bucketRegionCache[bucket] || null;\n if (cachedRegion !== req.httpRequest.region) {\n region = cachedRegion;\n }\n }\n\n resp.error = AWS.util.error(new Error(), {\n code: data.Code || code,\n message: data.Message || null,\n region: region\n });\n }\n req.service.extractRequestIds(resp);\n },\n\n /**\n * If region was not obtained synchronously, then send async request\n * to get bucket region for errors resulting from wrong region.\n *\n * @api private\n */\n requestBucketRegion: function requestBucketRegion(resp, done) {\n var error = resp.error;\n var req = resp.request;\n var bucket = req.params.Bucket || null;\n\n if (!error || !bucket || error.region || req.operation === 'listObjects' ||\n (AWS.util.isNode() && req.operation === 'headBucket') ||\n (error.statusCode === 400 && req.operation !== 'headObject') ||\n regionRedirectErrorCodes.indexOf(error.code) === -1) {\n return done();\n }\n var reqOperation = AWS.util.isNode() ? 'headBucket' : 'listObjects';\n var reqParams = {Bucket: bucket};\n if (reqOperation === 'listObjects') reqParams.MaxKeys = 0;\n var regionReq = req.service[reqOperation](reqParams);\n regionReq._requestRegionForBucket = bucket;\n regionReq.send(function() {\n var region = req.service.bucketRegionCache[bucket] || null;\n error.region = region;\n done();\n });\n },\n\n /**\n * For browser only. If NetworkingError received, will attempt to obtain\n * the bucket region.\n *\n * @api private\n */\n reqRegionForNetworkingError: function reqRegionForNetworkingError(resp, done) {\n if (!AWS.util.isBrowser()) {\n return done();\n }\n var error = resp.error;\n var request = resp.request;\n var bucket = request.params.Bucket;\n if (!error || error.code !== 'NetworkingError' || !bucket ||\n request.httpRequest.region === 'us-east-1') {\n return done();\n }\n var service = request.service;\n var bucketRegionCache = service.bucketRegionCache;\n var cachedRegion = bucketRegionCache[bucket] || null;\n\n if (cachedRegion && cachedRegion !== request.httpRequest.region) {\n service.updateReqBucketRegion(request, cachedRegion);\n done();\n } else if (!s3util.dnsCompatibleBucketName(bucket)) {\n service.updateReqBucketRegion(request, 'us-east-1');\n if (bucketRegionCache[bucket] !== 'us-east-1') {\n bucketRegionCache[bucket] = 'us-east-1';\n }\n done();\n } else if (request.httpRequest.virtualHostedBucket) {\n var getRegionReq = service.listObjects({Bucket: bucket, MaxKeys: 0});\n service.updateReqBucketRegion(getRegionReq, 'us-east-1');\n getRegionReq._requestRegionForBucket = bucket;\n\n getRegionReq.send(function() {\n var region = service.bucketRegionCache[bucket] || null;\n if (region && region !== request.httpRequest.region) {\n service.updateReqBucketRegion(request, region);\n }\n done();\n });\n } else {\n // DNS-compatible path-style\n // (s3ForcePathStyle or bucket name with dot over https)\n // Cannot obtain region information for this case\n done();\n }\n },\n\n /**\n * Cache for bucket region.\n *\n * @api private\n */\n bucketRegionCache: {},\n\n /**\n * Clears bucket region cache.\n *\n * @api private\n */\n clearBucketRegionCache: function(buckets) {\n var bucketRegionCache = this.bucketRegionCache;\n if (!buckets) {\n buckets = Object.keys(bucketRegionCache);\n } else if (typeof buckets === 'string') {\n buckets = [buckets];\n }\n for (var i = 0; i < buckets.length; i++) {\n delete bucketRegionCache[buckets[i]];\n }\n return bucketRegionCache;\n },\n\n /**\n * Corrects request region if bucket's cached region is different\n *\n * @api private\n */\n correctBucketRegionFromCache: function correctBucketRegionFromCache(req) {\n var bucket = req.params.Bucket || null;\n if (bucket) {\n var service = req.service;\n var requestRegion = req.httpRequest.region;\n var cachedRegion = service.bucketRegionCache[bucket];\n if (cachedRegion && cachedRegion !== requestRegion) {\n service.updateReqBucketRegion(req, cachedRegion);\n }\n }\n },\n\n /**\n * Extracts S3 specific request ids from the http response.\n *\n * @api private\n */\n extractRequestIds: function extractRequestIds(resp) {\n var extendedRequestId = resp.httpResponse.headers ? resp.httpResponse.headers['x-amz-id-2'] : null;\n var cfId = resp.httpResponse.headers ? resp.httpResponse.headers['x-amz-cf-id'] : null;\n resp.extendedRequestId = extendedRequestId;\n resp.cfId = cfId;\n\n if (resp.error) {\n resp.error.requestId = resp.requestId || null;\n resp.error.extendedRequestId = extendedRequestId;\n resp.error.cfId = cfId;\n }\n },\n\n /**\n * Get a pre-signed URL for a given operation name.\n *\n * @note You must ensure that you have static or previously resolved\n * credentials if you call this method synchronously (with no callback),\n * otherwise it may not properly sign the request. If you cannot guarantee\n * this (you are using an asynchronous credential provider, i.e., EC2\n * IAM roles), you should always call this method with an asynchronous\n * callback.\n * @note Not all operation parameters are supported when using pre-signed\n * URLs. Certain parameters, such as `SSECustomerKey`, `ACL`, `Expires`,\n * `ContentLength`, or `Tagging` must be provided as headers when sending a\n * request. If you are using pre-signed URLs to upload from a browser and\n * need to use these fields, see {createPresignedPost}.\n * @note The default signer allows altering the request by adding corresponding\n * headers to set some parameters (e.g. Range) and these added parameters\n * won't be signed. You must use signatureVersion v4 to to include these\n * parameters in the signed portion of the URL and enforce exact matching\n * between headers and signed params in the URL.\n * @note This operation cannot be used with a promise. See note above regarding\n * asynchronous credentials and use with a callback.\n * @param operation [String] the name of the operation to call\n * @param params [map] parameters to pass to the operation. See the given\n * operation for the expected operation parameters. In addition, you can\n * also pass the \"Expires\" parameter to inform S3 how long the URL should\n * work for.\n * @option params Expires [Integer] (900) the number of seconds to expire\n * the pre-signed URL operation in. Defaults to 15 minutes.\n * @param callback [Function] if a callback is provided, this function will\n * pass the URL as the second parameter (after the error parameter) to\n * the callback function.\n * @return [String] if called synchronously (with no callback), returns the\n * signed URL.\n * @return [null] nothing is returned if a callback is provided.\n * @example Pre-signing a getObject operation (synchronously)\n * var params = {Bucket: 'bucket', Key: 'key'};\n * var url = s3.getSignedUrl('getObject', params);\n * console.log('The URL is', url);\n * @example Pre-signing a putObject (asynchronously)\n * var params = {Bucket: 'bucket', Key: 'key'};\n * s3.getSignedUrl('putObject', params, function (err, url) {\n * console.log('The URL is', url);\n * });\n * @example Pre-signing a putObject operation with a specific payload\n * var params = {Bucket: 'bucket', Key: 'key', Body: 'body'};\n * var url = s3.getSignedUrl('putObject', params);\n * console.log('The URL is', url);\n * @example Passing in a 1-minute expiry time for a pre-signed URL\n * var params = {Bucket: 'bucket', Key: 'key', Expires: 60};\n * var url = s3.getSignedUrl('getObject', params);\n * console.log('The URL is', url); // expires in 60 seconds\n */\n getSignedUrl: function getSignedUrl(operation, params, callback) {\n params = AWS.util.copy(params || {});\n var expires = params.Expires || 900;\n\n if (typeof expires !== 'number') {\n throw AWS.util.error(new Error(),\n { code: 'InvalidParameterException', message: 'The expiration must be a number, received ' + typeof expires });\n }\n\n delete params.Expires; // we can't validate this\n var request = this.makeRequest(operation, params);\n\n if (callback) {\n AWS.util.defer(function() {\n request.presign(expires, callback);\n });\n } else {\n return request.presign(expires, callback);\n }\n },\n\n /**\n * @!method getSignedUrlPromise()\n * Returns a 'thenable' promise that will be resolved with a pre-signed URL\n * for a given operation name.\n *\n * Two callbacks can be provided to the `then` method on the returned promise.\n * The first callback will be called if the promise is fulfilled, and the second\n * callback will be called if the promise is rejected.\n * @note Not all operation parameters are supported when using pre-signed\n * URLs. Certain parameters, such as `SSECustomerKey`, `ACL`, `Expires`,\n * `ContentLength`, or `Tagging` must be provided as headers when sending a\n * request. If you are using pre-signed URLs to upload from a browser and\n * need to use these fields, see {createPresignedPost}.\n * @param operation [String] the name of the operation to call\n * @param params [map] parameters to pass to the operation. See the given\n * operation for the expected operation parameters. In addition, you can\n * also pass the \"Expires\" parameter to inform S3 how long the URL should\n * work for.\n * @option params Expires [Integer] (900) the number of seconds to expire\n * the pre-signed URL operation in. Defaults to 15 minutes.\n * @callback fulfilledCallback function(url)\n * Called if the promise is fulfilled.\n * @param url [String] the signed url\n * @callback rejectedCallback function(err)\n * Called if the promise is rejected.\n * @param err [Error] if an error occurred, this value will be filled\n * @return [Promise] A promise that represents the state of the `refresh` call.\n * @example Pre-signing a getObject operation\n * var params = {Bucket: 'bucket', Key: 'key'};\n * var promise = s3.getSignedUrlPromise('getObject', params);\n * promise.then(function(url) {\n * console.log('The URL is', url);\n * }, function(err) { ... });\n * @example Pre-signing a putObject operation with a specific payload\n * var params = {Bucket: 'bucket', Key: 'key', Body: 'body'};\n * var promise = s3.getSignedUrlPromise('putObject', params);\n * promise.then(function(url) {\n * console.log('The URL is', url);\n * }, function(err) { ... });\n * @example Passing in a 1-minute expiry time for a pre-signed URL\n * var params = {Bucket: 'bucket', Key: 'key', Expires: 60};\n * var promise = s3.getSignedUrlPromise('getObject', params);\n * promise.then(function(url) {\n * console.log('The URL is', url);\n * }, function(err) { ... });\n */\n\n /**\n * Get a pre-signed POST policy to support uploading to S3 directly from an\n * HTML form.\n *\n * @param params [map]\n * @option params Bucket [String] The bucket to which the post should be\n * uploaded\n * @option params Expires [Integer] (3600) The number of seconds for which\n * the presigned policy should be valid.\n * @option params Conditions [Array] An array of conditions that must be met\n * for the presigned policy to allow the\n * upload. This can include required tags,\n * the accepted range for content lengths,\n * etc.\n * @see http://docs.aws.amazon.com/AmazonS3/latest/API/sigv4-HTTPPOSTConstructPolicy.html\n * @option params Fields [map] Fields to include in the form. All\n * values passed in as fields will be\n * signed as exact match conditions.\n * @param callback [Function]\n *\n * @note All fields passed in when creating presigned post data will be signed\n * as exact match conditions. Any fields that will be interpolated by S3\n * must be added to the fields hash after signing, and an appropriate\n * condition for such fields must be explicitly added to the Conditions\n * array passed to this function before signing.\n *\n * @example Presiging post data with a known key\n * var params = {\n * Bucket: 'bucket',\n * Fields: {\n * key: 'key'\n * }\n * };\n * s3.createPresignedPost(params, function(err, data) {\n * if (err) {\n * console.error('Presigning post data encountered an error', err);\n * } else {\n * console.log('The post data is', data);\n * }\n * });\n *\n * @example Presigning post data with an interpolated key\n * var params = {\n * Bucket: 'bucket',\n * Conditions: [\n * ['starts-with', '$key', 'path/to/uploads/']\n * ]\n * };\n * s3.createPresignedPost(params, function(err, data) {\n * if (err) {\n * console.error('Presigning post data encountered an error', err);\n * } else {\n * data.Fields.key = 'path/to/uploads/${filename}';\n * console.log('The post data is', data);\n * }\n * });\n *\n * @note You must ensure that you have static or previously resolved\n * credentials if you call this method synchronously (with no callback),\n * otherwise it may not properly sign the request. If you cannot guarantee\n * this (you are using an asynchronous credential provider, i.e., EC2\n * IAM roles), you should always call this method with an asynchronous\n * callback.\n *\n * @return [map] If called synchronously (with no callback), returns a hash\n * with the url to set as the form action and a hash of fields\n * to include in the form.\n * @return [null] Nothing is returned if a callback is provided.\n *\n * @callback callback function (err, data)\n * @param err [Error] the error object returned from the policy signer\n * @param data [map] The data necessary to construct an HTML form\n * @param data.url [String] The URL to use as the action of the form\n * @param data.fields [map] A hash of fields that must be included in the\n * form for the upload to succeed. This hash will\n * include the signed POST policy, your access key\n * ID and security token (if present), etc. These\n * may be safely included as input elements of type\n * 'hidden.'\n */\n createPresignedPost: function createPresignedPost(params, callback) {\n if (typeof params === 'function' && callback === undefined) {\n callback = params;\n params = null;\n }\n\n params = AWS.util.copy(params || {});\n var boundParams = this.config.params || {};\n var bucket = params.Bucket || boundParams.Bucket,\n self = this,\n config = this.config,\n endpoint = AWS.util.copy(this.endpoint);\n if (!config.s3BucketEndpoint) {\n endpoint.pathname = '/' + bucket;\n }\n\n function finalizePost() {\n return {\n url: AWS.util.urlFormat(endpoint),\n fields: self.preparePostFields(\n config.credentials,\n config.region,\n bucket,\n params.Fields,\n params.Conditions,\n params.Expires\n )\n };\n }\n\n if (callback) {\n config.getCredentials(function (err) {\n if (err) {\n callback(err);\n } else {\n try {\n callback(null, finalizePost());\n } catch (err) {\n callback(err);\n }\n }\n });\n } else {\n return finalizePost();\n }\n },\n\n /**\n * @api private\n */\n preparePostFields: function preparePostFields(\n credentials,\n region,\n bucket,\n fields,\n conditions,\n expiresInSeconds\n ) {\n var now = this.getSkewCorrectedDate();\n if (!credentials || !region || !bucket) {\n throw new Error('Unable to create a POST object policy without a bucket,'\n + ' region, and credentials');\n }\n fields = AWS.util.copy(fields || {});\n conditions = (conditions || []).slice(0);\n expiresInSeconds = expiresInSeconds || 3600;\n\n var signingDate = AWS.util.date.iso8601(now).replace(/[:\\-]|\\.\\d{3}/g, '');\n var shortDate = signingDate.substr(0, 8);\n var scope = v4Credentials.createScope(shortDate, region, 's3');\n var credential = credentials.accessKeyId + '/' + scope;\n\n fields['bucket'] = bucket;\n fields['X-Amz-Algorithm'] = 'AWS4-HMAC-SHA256';\n fields['X-Amz-Credential'] = credential;\n fields['X-Amz-Date'] = signingDate;\n if (credentials.sessionToken) {\n fields['X-Amz-Security-Token'] = credentials.sessionToken;\n }\n for (var field in fields) {\n if (fields.hasOwnProperty(field)) {\n var condition = {};\n condition[field] = fields[field];\n conditions.push(condition);\n }\n }\n\n fields.Policy = this.preparePostPolicy(\n new Date(now.valueOf() + expiresInSeconds * 1000),\n conditions\n );\n fields['X-Amz-Signature'] = AWS.util.crypto.hmac(\n v4Credentials.getSigningKey(credentials, shortDate, region, 's3', true),\n fields.Policy,\n 'hex'\n );\n\n return fields;\n },\n\n /**\n * @api private\n */\n preparePostPolicy: function preparePostPolicy(expiration, conditions) {\n return AWS.util.base64.encode(JSON.stringify({\n expiration: AWS.util.date.iso8601(expiration),\n conditions: conditions\n }));\n },\n\n /**\n * @api private\n */\n prepareSignedUrl: function prepareSignedUrl(request) {\n request.addListener('validate', request.service.noPresignedContentLength);\n request.removeListener('build', request.service.addContentType);\n if (!request.params.Body) {\n // no Content-MD5/SHA-256 if body is not provided\n request.removeListener('build', request.service.computeContentMd5);\n } else {\n request.addListener('afterBuild', AWS.EventListeners.Core.COMPUTE_SHA256);\n }\n },\n\n /**\n * @api private\n * @param request\n */\n disableBodySigning: function disableBodySigning(request) {\n var headers = request.httpRequest.headers;\n // Add the header to anything that isn't a presigned url, unless that presigned url had a body defined\n if (!Object.prototype.hasOwnProperty.call(headers, 'presigned-expires')) {\n headers['X-Amz-Content-Sha256'] = 'UNSIGNED-PAYLOAD';\n }\n },\n\n /**\n * @api private\n */\n noPresignedContentLength: function noPresignedContentLength(request) {\n if (request.params.ContentLength !== undefined) {\n throw AWS.util.error(new Error(), {code: 'UnexpectedParameter',\n message: 'ContentLength is not supported in pre-signed URLs.'});\n }\n },\n\n createBucket: function createBucket(params, callback) {\n // When creating a bucket *outside* the classic region, the location\n // constraint must be set for the bucket and it must match the endpoint.\n // This chunk of code will set the location constraint param based\n // on the region (when possible), but it will not override a passed-in\n // location constraint.\n if (typeof params === 'function' || !params) {\n callback = callback || params;\n params = {};\n }\n var hostname = this.endpoint.hostname;\n // copy params so that appending keys does not unintentioinallly\n // mutate params object argument passed in by user\n var copiedParams = AWS.util.copy(params);\n\n if (hostname !== this.api.globalEndpoint && !params.CreateBucketConfiguration) {\n copiedParams.CreateBucketConfiguration = { LocationConstraint: this.config.region };\n }\n return this.makeRequest('createBucket', copiedParams, callback);\n },\n\n /**\n * @see AWS.S3.ManagedUpload\n * @overload upload(params = {}, [options], [callback])\n * Uploads an arbitrarily sized buffer, blob, or stream, using intelligent\n * concurrent handling of parts if the payload is large enough. You can\n * configure the concurrent queue size by setting `options`. Note that this\n * is the only operation for which the SDK can retry requests with stream\n * bodies.\n *\n * @param (see AWS.S3.putObject)\n * @option (see AWS.S3.ManagedUpload.constructor)\n * @return [AWS.S3.ManagedUpload] the managed upload object that can call\n * `send()` or track progress.\n * @example Uploading a stream object\n * var params = {Bucket: 'bucket', Key: 'key', Body: stream};\n * s3.upload(params, function(err, data) {\n * console.log(err, data);\n * });\n * @example Uploading a stream with concurrency of 1 and partSize of 10mb\n * var params = {Bucket: 'bucket', Key: 'key', Body: stream};\n * var options = {partSize: 10 * 1024 * 1024, queueSize: 1};\n * s3.upload(params, options, function(err, data) {\n * console.log(err, data);\n * });\n * @callback callback function(err, data)\n * @param err [Error] an error or null if no error occurred.\n * @param data [map] The response data from the successful upload:\n * @param data.Location [String] the URL of the uploaded object\n * @param data.ETag [String] the ETag of the uploaded object\n * @param data.Bucket [String] the bucket to which the object was uploaded\n * @param data.Key [String] the key to which the object was uploaded\n */\n upload: function upload(params, options, callback) {\n if (typeof options === 'function' && callback === undefined) {\n callback = options;\n options = null;\n }\n\n options = options || {};\n options = AWS.util.merge(options || {}, {service: this, params: params});\n\n var uploader = new AWS.S3.ManagedUpload(options);\n if (typeof callback === 'function') uploader.send(callback);\n return uploader;\n }\n});\n\n/**\n * @api private\n */\nAWS.S3.addPromisesToClass = function addPromisesToClass(PromiseDependency) {\n this.prototype.getSignedUrlPromise = AWS.util.promisifyMethod('getSignedUrl', PromiseDependency);\n};\n\n/**\n * @api private\n */\nAWS.S3.deletePromisesFromClass = function deletePromisesFromClass() {\n delete this.prototype.getSignedUrlPromise;\n};\n\nAWS.util.addPromises(AWS.S3);\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['gamelift'] = {};\nAWS.GameLift = Service.defineService('gamelift', ['2015-10-01']);\nObject.defineProperty(apiLoader.services['gamelift'], '2015-10-01', {\n get: function get() {\n var model = require('../apis/gamelift-2015-10-01.min.json');\n model.paginators = require('../apis/gamelift-2015-10-01.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.GameLift;\n","var AWS = require('../core');\nvar inherit = AWS.util.inherit;\n\nrequire('./v3');\n\n/**\n * @api private\n */\nAWS.Signers.V3Https = inherit(AWS.Signers.V3, {\n authorization: function authorization(credentials) {\n return 'AWS3-HTTPS ' +\n 'AWSAccessKeyId=' + credentials.accessKeyId + ',' +\n 'Algorithm=HmacSHA256,' +\n 'Signature=' + this.signature(credentials);\n },\n\n stringToSign: function stringToSign() {\n return this.request.headers['X-Amz-Date'];\n }\n});\n\n/**\n * @api private\n */\nmodule.exports = AWS.Signers.V3Https;\n","var AWS = require('./core');\nvar util = require('./util');\nvar endpointDiscoveryEnabledEnvs = ['AWS_ENABLE_ENDPOINT_DISCOVERY', 'AWS_ENDPOINT_DISCOVERY_ENABLED'];\n\n/**\n * Generate key (except resources and operation part) to index the endpoints in the cache\n * If input shape has endpointdiscoveryid trait then use\n * accessKey + operation + resources + region + service as cache key\n * If input shape doesn't have endpointdiscoveryid trait then use\n * accessKey + region + service as cache key\n * @return [map] object with keys to index endpoints.\n * @api private\n */\nfunction getCacheKey(request) {\n var service = request.service;\n var api = service.api || {};\n var operations = api.operations;\n var identifiers = {};\n if (service.config.region) {\n identifiers.region = service.config.region;\n }\n if (api.serviceId) {\n identifiers.serviceId = api.serviceId;\n }\n if (service.config.credentials.accessKeyId) {\n identifiers.accessKeyId = service.config.credentials.accessKeyId;\n }\n return identifiers;\n}\n\n/**\n * Recursive helper for marshallCustomIdentifiers().\n * Looks for required string input members that have 'endpointdiscoveryid' trait.\n * @api private\n */\nfunction marshallCustomIdentifiersHelper(result, params, shape) {\n if (!shape || params === undefined || params === null) return;\n if (shape.type === 'structure' && shape.required && shape.required.length > 0) {\n util.arrayEach(shape.required, function(name) {\n var memberShape = shape.members[name];\n if (memberShape.endpointDiscoveryId === true) {\n var locationName = memberShape.isLocationName ? memberShape.name : name;\n result[locationName] = String(params[name]);\n } else {\n marshallCustomIdentifiersHelper(result, params[name], memberShape);\n }\n });\n }\n}\n\n/**\n * Get custom identifiers for cache key.\n * Identifies custom identifiers by checking each shape's `endpointDiscoveryId` trait.\n * @param [object] request object\n * @param [object] input shape of the given operation's api\n * @api private\n */\nfunction marshallCustomIdentifiers(request, shape) {\n var identifiers = {};\n marshallCustomIdentifiersHelper(identifiers, request.params, shape);\n return identifiers;\n}\n\n/**\n * Call endpoint discovery operation when it's optional.\n * When endpoint is available in cache then use the cached endpoints. If endpoints\n * are unavailable then use regional endpoints and call endpoint discovery operation\n * asynchronously. This is turned off by default.\n * @param [object] request object\n * @api private\n */\nfunction optionalDiscoverEndpoint(request) {\n var service = request.service;\n var api = service.api;\n var operationModel = api.operations ? api.operations[request.operation] : undefined;\n var inputShape = operationModel ? operationModel.input : undefined;\n\n var identifiers = marshallCustomIdentifiers(request, inputShape);\n var cacheKey = getCacheKey(request);\n if (Object.keys(identifiers).length > 0) {\n cacheKey = util.update(cacheKey, identifiers);\n if (operationModel) cacheKey.operation = operationModel.name;\n }\n var endpoints = AWS.endpointCache.get(cacheKey);\n if (endpoints && endpoints.length === 1 && endpoints[0].Address === '') {\n //endpoint operation is being made but response not yet received\n //or endpoint operation just failed in 1 minute\n return;\n } else if (endpoints && endpoints.length > 0) {\n //found endpoint record from cache\n request.httpRequest.updateEndpoint(endpoints[0].Address);\n } else {\n //endpoint record not in cache or outdated. make discovery operation\n var endpointRequest = service.makeRequest(api.endpointOperation, {\n Operation: operationModel.name,\n Identifiers: identifiers,\n });\n addApiVersionHeader(endpointRequest);\n endpointRequest.removeListener('validate', AWS.EventListeners.Core.VALIDATE_PARAMETERS);\n endpointRequest.removeListener('retry', AWS.EventListeners.Core.RETRY_CHECK);\n //put in a placeholder for endpoints already requested, prevent\n //too much in-flight calls\n AWS.endpointCache.put(cacheKey, [{\n Address: '',\n CachePeriodInMinutes: 1\n }]);\n endpointRequest.send(function(err, data) {\n if (data && data.Endpoints) {\n AWS.endpointCache.put(cacheKey, data.Endpoints);\n } else if (err) {\n AWS.endpointCache.put(cacheKey, [{\n Address: '',\n CachePeriodInMinutes: 1 //not to make more endpoint operation in next 1 minute\n }]);\n }\n });\n }\n}\n\nvar requestQueue = {};\n\n/**\n * Call endpoint discovery operation when it's required.\n * When endpoint is available in cache then use cached ones. If endpoints are\n * unavailable then SDK should call endpoint operation then use returned new\n * endpoint for the api call. SDK will automatically attempt to do endpoint\n * discovery. This is turned off by default\n * @param [object] request object\n * @api private\n */\nfunction requiredDiscoverEndpoint(request, done) {\n var service = request.service;\n var api = service.api;\n var operationModel = api.operations ? api.operations[request.operation] : undefined;\n var inputShape = operationModel ? operationModel.input : undefined;\n\n var identifiers = marshallCustomIdentifiers(request, inputShape);\n var cacheKey = getCacheKey(request);\n if (Object.keys(identifiers).length > 0) {\n cacheKey = util.update(cacheKey, identifiers);\n if (operationModel) cacheKey.operation = operationModel.name;\n }\n var cacheKeyStr = AWS.EndpointCache.getKeyString(cacheKey);\n var endpoints = AWS.endpointCache.get(cacheKeyStr); //endpoint cache also accepts string keys\n if (endpoints && endpoints.length === 1 && endpoints[0].Address === '') {\n //endpoint operation is being made but response not yet received\n //push request object to a pending queue\n if (!requestQueue[cacheKeyStr]) requestQueue[cacheKeyStr] = [];\n requestQueue[cacheKeyStr].push({request: request, callback: done});\n return;\n } else if (endpoints && endpoints.length > 0) {\n request.httpRequest.updateEndpoint(endpoints[0].Address);\n done();\n } else {\n var endpointRequest = service.makeRequest(api.endpointOperation, {\n Operation: operationModel.name,\n Identifiers: identifiers,\n });\n endpointRequest.removeListener('validate', AWS.EventListeners.Core.VALIDATE_PARAMETERS);\n addApiVersionHeader(endpointRequest);\n\n //put in a placeholder for endpoints already requested, prevent\n //too much in-flight calls\n AWS.endpointCache.put(cacheKeyStr, [{\n Address: '',\n CachePeriodInMinutes: 60 //long-live cache\n }]);\n endpointRequest.send(function(err, data) {\n if (err) {\n request.response.error = util.error(err, { retryable: false });\n AWS.endpointCache.remove(cacheKey);\n\n //fail all the pending requests in batch\n if (requestQueue[cacheKeyStr]) {\n var pendingRequests = requestQueue[cacheKeyStr];\n util.arrayEach(pendingRequests, function(requestContext) {\n requestContext.request.response.error = util.error(err, { retryable: false });\n requestContext.callback();\n });\n delete requestQueue[cacheKeyStr];\n }\n } else if (data) {\n AWS.endpointCache.put(cacheKeyStr, data.Endpoints);\n request.httpRequest.updateEndpoint(data.Endpoints[0].Address);\n\n //update the endpoint for all the pending requests in batch\n if (requestQueue[cacheKeyStr]) {\n var pendingRequests = requestQueue[cacheKeyStr];\n util.arrayEach(pendingRequests, function(requestContext) {\n requestContext.request.httpRequest.updateEndpoint(data.Endpoints[0].Address);\n requestContext.callback();\n });\n delete requestQueue[cacheKeyStr];\n }\n }\n done();\n });\n }\n}\n\n/**\n * add api version header to endpoint operation\n * @api private\n */\nfunction addApiVersionHeader(endpointRequest) {\n var api = endpointRequest.service.api;\n var apiVersion = api.apiVersion;\n if (apiVersion && !endpointRequest.httpRequest.headers['x-amz-api-version']) {\n endpointRequest.httpRequest.headers['x-amz-api-version'] = apiVersion;\n }\n}\n\n/**\n * If api call gets invalid endpoint exception, SDK should attempt to remove the invalid\n * endpoint from cache.\n * @api private\n */\nfunction invalidateCachedEndpoints(response) {\n var error = response.error;\n var httpResponse = response.httpResponse;\n if (error &&\n (error.code === 'InvalidEndpointException' || httpResponse.statusCode === 421)\n ) {\n var request = response.request;\n var operations = request.service.api.operations || {};\n var inputShape = operations[request.operation] ? operations[request.operation].input : undefined;\n var identifiers = marshallCustomIdentifiers(request, inputShape);\n var cacheKey = getCacheKey(request);\n if (Object.keys(identifiers).length > 0) {\n cacheKey = util.update(cacheKey, identifiers);\n if (operations[request.operation]) cacheKey.operation = operations[request.operation].name;\n }\n AWS.endpointCache.remove(cacheKey);\n }\n}\n\n/**\n * If endpoint is explicitly configured, SDK should not do endpoint discovery in anytime.\n * @param [object] client Service client object.\n * @api private\n */\nfunction hasCustomEndpoint(client) {\n //if set endpoint is set for specific client, enable endpoint discovery will raise an error.\n if (client._originalConfig && client._originalConfig.endpoint && client._originalConfig.endpointDiscoveryEnabled === true) {\n throw util.error(new Error(), {\n code: 'ConfigurationException',\n message: 'Custom endpoint is supplied; endpointDiscoveryEnabled must not be true.'\n });\n };\n var svcConfig = AWS.config[client.serviceIdentifier] || {};\n return Boolean(AWS.config.endpoint || svcConfig.endpoint || (client._originalConfig && client._originalConfig.endpoint));\n}\n\n/**\n * @api private\n */\nfunction isFalsy(value) {\n return ['false', '0'].indexOf(value) >= 0;\n}\n\n/**\n * If endpoint discovery should perform for this request when no operation requires endpoint\n * discovery for the given service.\n * SDK performs config resolution in order like below:\n * 1. If set in client configuration.\n * 2. If set in env AWS_ENABLE_ENDPOINT_DISCOVERY.\n * 3. If set in shared ini config file with key 'endpoint_discovery_enabled'.\n * @param [object] request request object.\n * @returns [boolean|undefined] if endpoint discovery config is not set in any source, this\n * function returns undefined\n * @api private\n */\nfunction resolveEndpointDiscoveryConfig(request) {\n var service = request.service || {};\n if (service.config.endpointDiscoveryEnabled !== undefined) {\n return service.config.endpointDiscoveryEnabled;\n }\n\n //shared ini file is only available in Node\n //not to check env in browser\n if (util.isBrowser()) return undefined;\n\n // If any of recognized endpoint discovery config env is set\n for (var i = 0; i < endpointDiscoveryEnabledEnvs.length; i++) {\n var env = endpointDiscoveryEnabledEnvs[i];\n if (Object.prototype.hasOwnProperty.call(process.env, env)) {\n if (process.env[env] === '' || process.env[env] === undefined) {\n throw util.error(new Error(), {\n code: 'ConfigurationException',\n message: 'environmental variable ' + env + ' cannot be set to nothing'\n });\n }\n return !isFalsy(process.env[env]);\n }\n }\n\n var configFile = {};\n try {\n configFile = AWS.util.iniLoader ? AWS.util.iniLoader.loadFrom({\n isConfig: true,\n filename: process.env[AWS.util.sharedConfigFileEnv]\n }) : {};\n } catch (e) {}\n var sharedFileConfig = configFile[\n process.env.AWS_PROFILE || AWS.util.defaultProfile\n ] || {};\n if (Object.prototype.hasOwnProperty.call(sharedFileConfig, 'endpoint_discovery_enabled')) {\n if (sharedFileConfig.endpoint_discovery_enabled === undefined) {\n throw util.error(new Error(), {\n code: 'ConfigurationException',\n message: 'config file entry \\'endpoint_discovery_enabled\\' cannot be set to nothing'\n });\n }\n return !isFalsy(sharedFileConfig.endpoint_discovery_enabled);\n }\n return undefined;\n}\n\n/**\n * attach endpoint discovery logic to request object\n * @param [object] request\n * @api private\n */\nfunction discoverEndpoint(request, done) {\n var service = request.service || {};\n if (hasCustomEndpoint(service) || request.isPresigned()) return done();\n\n var operations = service.api.operations || {};\n var operationModel = operations[request.operation];\n var isEndpointDiscoveryRequired = operationModel ? operationModel.endpointDiscoveryRequired : 'NULL';\n var isEnabled = resolveEndpointDiscoveryConfig(request);\n var hasRequiredEndpointDiscovery = service.api.hasRequiredEndpointDiscovery;\n if (isEnabled || hasRequiredEndpointDiscovery) {\n // Once a customer enables endpoint discovery, the SDK should start appending\n // the string endpoint-discovery to the user-agent on all requests.\n request.httpRequest.appendToUserAgent('endpoint-discovery');\n }\n switch (isEndpointDiscoveryRequired) {\n case 'OPTIONAL':\n if (isEnabled || hasRequiredEndpointDiscovery) {\n // For a given service; if at least one operation requires endpoint discovery then the SDK must enable endpoint discovery\n // by default for all operations of that service, including operations where endpoint discovery is optional.\n optionalDiscoverEndpoint(request);\n request.addNamedListener('INVALIDATE_CACHED_ENDPOINTS', 'extractError', invalidateCachedEndpoints);\n }\n done();\n break;\n case 'REQUIRED':\n if (isEnabled === false) {\n // For a given operation; if endpoint discovery is required and it has been disabled on the SDK client,\n // then the SDK must return a clear and actionable exception.\n request.response.error = util.error(new Error(), {\n code: 'ConfigurationException',\n message: 'Endpoint Discovery is disabled but ' + service.api.className + '.' + request.operation +\n '() requires it. Please check your configurations.'\n });\n done();\n break;\n }\n request.addNamedListener('INVALIDATE_CACHED_ENDPOINTS', 'extractError', invalidateCachedEndpoints);\n requiredDiscoverEndpoint(request, done);\n break;\n case 'NULL':\n default:\n done();\n break;\n }\n}\n\nmodule.exports = {\n discoverEndpoint: discoverEndpoint,\n requiredDiscoverEndpoint: requiredDiscoverEndpoint,\n optionalDiscoverEndpoint: optionalDiscoverEndpoint,\n marshallCustomIdentifiers: marshallCustomIdentifiers,\n getCacheKey: getCacheKey,\n invalidateCachedEndpoint: invalidateCachedEndpoints,\n};\n","var AWS = require('../core');\n\nAWS.util.update(AWS.Route53.prototype, {\n /**\n * @api private\n */\n setupRequestListeners: function setupRequestListeners(request) {\n request.on('build', this.sanitizeUrl);\n },\n\n /**\n * @api private\n */\n sanitizeUrl: function sanitizeUrl(request) {\n var path = request.httpRequest.path;\n request.httpRequest.path = path.replace(/\\/%2F\\w+%2F/, '/');\n },\n\n /**\n * @return [Boolean] whether the error can be retried\n * @api private\n */\n retryableError: function retryableError(error) {\n if (error.code === 'PriorRequestNotComplete' &&\n error.statusCode === 400) {\n return true;\n } else {\n var _super = AWS.Service.prototype.retryableError;\n return _super.call(this, error);\n }\n }\n});\n","var util = require('../core').util;\nvar convert = require('./converter');\n\nvar Translator = function(options) {\n options = options || {};\n this.attrValue = options.attrValue;\n this.convertEmptyValues = Boolean(options.convertEmptyValues);\n this.wrapNumbers = Boolean(options.wrapNumbers);\n};\n\nTranslator.prototype.translateInput = function(value, shape) {\n this.mode = 'input';\n return this.translate(value, shape);\n};\n\nTranslator.prototype.translateOutput = function(value, shape) {\n this.mode = 'output';\n return this.translate(value, shape);\n};\n\nTranslator.prototype.translate = function(value, shape) {\n var self = this;\n if (!shape || value === undefined) return undefined;\n\n if (shape.shape === self.attrValue) {\n return convert[self.mode](value, {\n convertEmptyValues: self.convertEmptyValues,\n wrapNumbers: self.wrapNumbers,\n });\n }\n switch (shape.type) {\n case 'structure': return self.translateStructure(value, shape);\n case 'map': return self.translateMap(value, shape);\n case 'list': return self.translateList(value, shape);\n default: return self.translateScalar(value, shape);\n }\n};\n\nTranslator.prototype.translateStructure = function(structure, shape) {\n var self = this;\n if (structure == null) return undefined;\n\n var struct = {};\n util.each(structure, function(name, value) {\n var memberShape = shape.members[name];\n if (memberShape) {\n var result = self.translate(value, memberShape);\n if (result !== undefined) struct[name] = result;\n }\n });\n return struct;\n};\n\nTranslator.prototype.translateList = function(list, shape) {\n var self = this;\n if (list == null) return undefined;\n\n var out = [];\n util.arrayEach(list, function(value) {\n var result = self.translate(value, shape.member);\n if (result === undefined) out.push(null);\n else out.push(result);\n });\n return out;\n};\n\nTranslator.prototype.translateMap = function(map, shape) {\n var self = this;\n if (map == null) return undefined;\n\n var out = {};\n util.each(map, function(key, value) {\n var result = self.translate(value, shape.value);\n if (result === undefined) out[key] = null;\n else out[key] = result;\n });\n return out;\n};\n\nTranslator.prototype.translateScalar = function(value, shape) {\n return shape.toType(value);\n};\n\n/**\n * @api private\n */\nmodule.exports = Translator;\n","var AWS = require('../core');\nvar STS = require('../../clients/sts');\n\n/**\n * Represents credentials retrieved from STS Web Identity Federation support.\n *\n * By default this provider gets credentials using the\n * {AWS.STS.assumeRoleWithWebIdentity} service operation. This operation\n * requires a `RoleArn` containing the ARN of the IAM trust policy for the\n * application for which credentials will be given. In addition, the\n * `WebIdentityToken` must be set to the token provided by the identity\n * provider. See {constructor} for an example on creating a credentials\n * object with proper `RoleArn` and `WebIdentityToken` values.\n *\n * ## Refreshing Credentials from Identity Service\n *\n * In addition to AWS credentials expiring after a given amount of time, the\n * login token from the identity provider will also expire. Once this token\n * expires, it will not be usable to refresh AWS credentials, and another\n * token will be needed. The SDK does not manage refreshing of the token value,\n * but this can be done through a \"refresh token\" supported by most identity\n * providers. Consult the documentation for the identity provider for refreshing\n * tokens. Once the refreshed token is acquired, you should make sure to update\n * this new token in the credentials object's {params} property. The following\n * code will update the WebIdentityToken, assuming you have retrieved an updated\n * token from the identity provider:\n *\n * ```javascript\n * AWS.config.credentials.params.WebIdentityToken = updatedToken;\n * ```\n *\n * Future calls to `credentials.refresh()` will now use the new token.\n *\n * @!attribute params\n * @return [map] the map of params passed to\n * {AWS.STS.assumeRoleWithWebIdentity}. To update the token, set the\n * `params.WebIdentityToken` property.\n * @!attribute data\n * @return [map] the raw data response from the call to\n * {AWS.STS.assumeRoleWithWebIdentity}. Use this if you want to get\n * access to other properties from the response.\n */\nAWS.WebIdentityCredentials = AWS.util.inherit(AWS.Credentials, {\n /**\n * Creates a new credentials object.\n * @param (see AWS.STS.assumeRoleWithWebIdentity)\n * @example Creating a new credentials object\n * AWS.config.credentials = new AWS.WebIdentityCredentials({\n * RoleArn: 'arn:aws:iam::1234567890:role/WebIdentity',\n * WebIdentityToken: 'ABCDEFGHIJKLMNOP', // token from identity service\n * RoleSessionName: 'web' // optional name, defaults to web-identity\n * }, {\n * // optionally provide configuration to apply to the underlying AWS.STS service client\n * // if configuration is not provided, then configuration will be pulled from AWS.config\n *\n * // specify timeout options\n * httpOptions: {\n * timeout: 100\n * }\n * });\n * @see AWS.STS.assumeRoleWithWebIdentity\n * @see AWS.Config\n */\n constructor: function WebIdentityCredentials(params, clientConfig) {\n AWS.Credentials.call(this);\n this.expired = true;\n this.params = params;\n this.params.RoleSessionName = this.params.RoleSessionName || 'web-identity';\n this.data = null;\n this._clientConfig = AWS.util.copy(clientConfig || {});\n },\n\n /**\n * Refreshes credentials using {AWS.STS.assumeRoleWithWebIdentity}\n *\n * @callback callback function(err)\n * Called when the STS service responds (or fails). When\n * this callback is called with no error, it means that the credentials\n * information has been loaded into the object (as the `accessKeyId`,\n * `secretAccessKey`, and `sessionToken` properties).\n * @param err [Error] if an error occurred, this value will be filled\n * @see get\n */\n refresh: function refresh(callback) {\n this.coalesceRefresh(callback || AWS.util.fn.callback);\n },\n\n /**\n * @api private\n */\n load: function load(callback) {\n var self = this;\n self.createClients();\n self.service.assumeRoleWithWebIdentity(function (err, data) {\n self.data = null;\n if (!err) {\n self.data = data;\n self.service.credentialsFrom(data, self);\n }\n callback(err);\n });\n },\n\n /**\n * @api private\n */\n createClients: function() {\n if (!this.service) {\n var stsConfig = AWS.util.merge({}, this._clientConfig);\n stsConfig.params = this.params;\n this.service = new STS(stsConfig);\n }\n }\n\n});\n","/**\n * Convert array of 16 byte values to UUID string format of the form:\n * XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX\n */\nvar byteToHex = [];\nfor (var i = 0; i < 256; ++i) {\n byteToHex[i] = (i + 0x100).toString(16).substr(1);\n}\n\nfunction bytesToUuid(buf, offset) {\n var i = offset || 0;\n var bth = byteToHex;\n // join used to fix memory issue caused by concatenation: https://bugs.chromium.org/p/v8/issues/detail?id=3175#c4\n return ([bth[buf[i++]], bth[buf[i++]], \n\tbth[buf[i++]], bth[buf[i++]], '-',\n\tbth[buf[i++]], bth[buf[i++]], '-',\n\tbth[buf[i++]], bth[buf[i++]], '-',\n\tbth[buf[i++]], bth[buf[i++]], '-',\n\tbth[buf[i++]], bth[buf[i++]],\n\tbth[buf[i++]], bth[buf[i++]],\n\tbth[buf[i++]], bth[buf[i++]]]).join('');\n}\n\nmodule.exports = bytesToUuid;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['devicefarm'] = {};\nAWS.DeviceFarm = Service.defineService('devicefarm', ['2015-06-23']);\nObject.defineProperty(apiLoader.services['devicefarm'], '2015-06-23', {\n get: function get() {\n var model = require('../apis/devicefarm-2015-06-23.min.json');\n model.paginators = require('../apis/devicefarm-2015-06-23.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.DeviceFarm;\n","var AWS = require('../core');\n\n// pull in CloudFront signer\nrequire('../cloudfront/signer');\n\nAWS.util.update(AWS.CloudFront.prototype, {\n\n setupRequestListeners: function setupRequestListeners(request) {\n request.addListener('extractData', AWS.util.hoistPayloadMember);\n }\n\n});\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['waf'] = {};\nAWS.WAF = Service.defineService('waf', ['2015-08-24']);\nObject.defineProperty(apiLoader.services['waf'], '2015-08-24', {\n get: function get() {\n var model = require('../apis/waf-2015-08-24.min.json');\n model.paginators = require('../apis/waf-2015-08-24.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.WAF;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['connect'] = {};\nAWS.Connect = Service.defineService('connect', ['2017-08-08']);\nObject.defineProperty(apiLoader.services['connect'], '2017-08-08', {\n get: function get() {\n var model = require('../apis/connect-2017-08-08.min.json');\n model.paginators = require('../apis/connect-2017-08-08.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.Connect;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['efs'] = {};\nAWS.EFS = Service.defineService('efs', ['2015-02-01']);\nObject.defineProperty(apiLoader.services['efs'], '2015-02-01', {\n get: function get() {\n var model = require('../apis/elasticfilesystem-2015-02-01.min.json');\n model.paginators = require('../apis/elasticfilesystem-2015-02-01.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.EFS;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['cloudfront'] = {};\nAWS.CloudFront = Service.defineService('cloudfront', ['2013-05-12*', '2013-11-11*', '2014-05-31*', '2014-10-21*', '2014-11-06*', '2015-04-17*', '2015-07-27*', '2015-09-17*', '2016-01-13*', '2016-01-28*', '2016-08-01*', '2016-08-20*', '2016-09-07*', '2016-09-29*', '2016-11-25', '2016-11-25*', '2017-03-25', '2017-03-25*', '2017-10-30', '2017-10-30*', '2018-06-18', '2018-06-18*', '2018-11-05', '2018-11-05*', '2019-03-26', '2019-03-26*', '2020-05-31']);\nrequire('../lib/services/cloudfront');\nObject.defineProperty(apiLoader.services['cloudfront'], '2016-11-25', {\n get: function get() {\n var model = require('../apis/cloudfront-2016-11-25.min.json');\n model.paginators = require('../apis/cloudfront-2016-11-25.paginators.json').pagination;\n model.waiters = require('../apis/cloudfront-2016-11-25.waiters2.json').waiters;\n return model;\n },\n enumerable: true,\n configurable: true\n});\nObject.defineProperty(apiLoader.services['cloudfront'], '2017-03-25', {\n get: function get() {\n var model = require('../apis/cloudfront-2017-03-25.min.json');\n model.paginators = require('../apis/cloudfront-2017-03-25.paginators.json').pagination;\n model.waiters = require('../apis/cloudfront-2017-03-25.waiters2.json').waiters;\n return model;\n },\n enumerable: true,\n configurable: true\n});\nObject.defineProperty(apiLoader.services['cloudfront'], '2017-10-30', {\n get: function get() {\n var model = require('../apis/cloudfront-2017-10-30.min.json');\n model.paginators = require('../apis/cloudfront-2017-10-30.paginators.json').pagination;\n model.waiters = require('../apis/cloudfront-2017-10-30.waiters2.json').waiters;\n return model;\n },\n enumerable: true,\n configurable: true\n});\nObject.defineProperty(apiLoader.services['cloudfront'], '2018-06-18', {\n get: function get() {\n var model = require('../apis/cloudfront-2018-06-18.min.json');\n model.paginators = require('../apis/cloudfront-2018-06-18.paginators.json').pagination;\n model.waiters = require('../apis/cloudfront-2018-06-18.waiters2.json').waiters;\n return model;\n },\n enumerable: true,\n configurable: true\n});\nObject.defineProperty(apiLoader.services['cloudfront'], '2018-11-05', {\n get: function get() {\n var model = require('../apis/cloudfront-2018-11-05.min.json');\n model.paginators = require('../apis/cloudfront-2018-11-05.paginators.json').pagination;\n model.waiters = require('../apis/cloudfront-2018-11-05.waiters2.json').waiters;\n return model;\n },\n enumerable: true,\n configurable: true\n});\nObject.defineProperty(apiLoader.services['cloudfront'], '2019-03-26', {\n get: function get() {\n var model = require('../apis/cloudfront-2019-03-26.min.json');\n model.paginators = require('../apis/cloudfront-2019-03-26.paginators.json').pagination;\n model.waiters = require('../apis/cloudfront-2019-03-26.waiters2.json').waiters;\n return model;\n },\n enumerable: true,\n configurable: true\n});\nObject.defineProperty(apiLoader.services['cloudfront'], '2020-05-31', {\n get: function get() {\n var model = require('../apis/cloudfront-2020-05-31.min.json');\n model.paginators = require('../apis/cloudfront-2020-05-31.paginators.json').pagination;\n model.waiters = require('../apis/cloudfront-2020-05-31.waiters2.json').waiters;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.CloudFront;\n","function apiLoader(svc, version) {\n if (!apiLoader.services.hasOwnProperty(svc)) {\n throw new Error('InvalidService: Failed to load api for ' + svc);\n }\n return apiLoader.services[svc][version];\n}\n\n/**\n * @api private\n *\n * This member of AWS.apiLoader is private, but changing it will necessitate a\n * change to ../scripts/services-table-generator.ts\n */\napiLoader.services = {};\n\n/**\n * @api private\n */\nmodule.exports = apiLoader;\n","var AWS = require('../core');\nvar rest = AWS.Protocol.Rest;\n\n/**\n * A presigner object can be used to generate presigned urls for the Polly service.\n */\nAWS.Polly.Presigner = AWS.util.inherit({\n /**\n * Creates a presigner object with a set of configuration options.\n *\n * @option options params [map] An optional map of parameters to bind to every\n * request sent by this service object.\n * @option options service [AWS.Polly] An optional pre-configured instance\n * of the AWS.Polly service object to use for requests. The object may\n * bound parameters used by the presigner.\n * @see AWS.Polly.constructor\n */\n constructor: function Signer(options) {\n options = options || {};\n this.options = options;\n this.service = options.service;\n this.bindServiceObject(options);\n this._operations = {};\n },\n\n /**\n * @api private\n */\n bindServiceObject: function bindServiceObject(options) {\n options = options || {};\n if (!this.service) {\n this.service = new AWS.Polly(options);\n } else {\n var config = AWS.util.copy(this.service.config);\n this.service = new this.service.constructor.__super__(config);\n this.service.config.params = AWS.util.merge(this.service.config.params || {}, options.params);\n }\n },\n\n /**\n * @api private\n */\n modifyInputMembers: function modifyInputMembers(input) {\n // make copies of the input so we don't overwrite the api\n // need to be careful to copy anything we access/modify\n var modifiedInput = AWS.util.copy(input);\n modifiedInput.members = AWS.util.copy(input.members);\n AWS.util.each(input.members, function(name, member) {\n modifiedInput.members[name] = AWS.util.copy(member);\n // update location and locationName\n if (!member.location || member.location === 'body') {\n modifiedInput.members[name].location = 'querystring';\n modifiedInput.members[name].locationName = name;\n }\n });\n return modifiedInput;\n },\n\n /**\n * @api private\n */\n convertPostToGet: function convertPostToGet(req) {\n // convert method\n req.httpRequest.method = 'GET';\n\n var operation = req.service.api.operations[req.operation];\n // get cached operation input first\n var input = this._operations[req.operation];\n if (!input) {\n // modify the original input\n this._operations[req.operation] = input = this.modifyInputMembers(operation.input);\n }\n\n var uri = rest.generateURI(req.httpRequest.endpoint.path, operation.httpPath, input, req.params);\n\n req.httpRequest.path = uri;\n req.httpRequest.body = '';\n\n // don't need these headers on a GET request\n delete req.httpRequest.headers['Content-Length'];\n delete req.httpRequest.headers['Content-Type'];\n },\n\n /**\n * @overload getSynthesizeSpeechUrl(params = {}, [expires = 3600], [callback])\n * Generate a presigned url for {AWS.Polly.synthesizeSpeech}.\n * @note You must ensure that you have static or previously resolved\n * credentials if you call this method synchronously (with no callback),\n * otherwise it may not properly sign the request. If you cannot guarantee\n * this (you are using an asynchronous credential provider, i.e., EC2\n * IAM roles), you should always call this method with an asynchronous\n * callback.\n * @param params [map] parameters to pass to the operation. See the {AWS.Polly.synthesizeSpeech}\n * operation for the expected operation parameters.\n * @param expires [Integer] (3600) the number of seconds to expire the pre-signed URL operation in.\n * Defaults to 1 hour.\n * @return [string] if called synchronously (with no callback), returns the signed URL.\n * @return [null] nothing is returned if a callback is provided.\n * @callback callback function (err, url)\n * If a callback is supplied, it is called when a signed URL has been generated.\n * @param err [Error] the error object returned from the presigner.\n * @param url [String] the signed URL.\n * @see AWS.Polly.synthesizeSpeech\n */\n getSynthesizeSpeechUrl: function getSynthesizeSpeechUrl(params, expires, callback) {\n var self = this;\n var request = this.service.makeRequest('synthesizeSpeech', params);\n // remove existing build listeners\n request.removeAllListeners('build');\n request.on('build', function(req) {\n self.convertPostToGet(req);\n });\n return request.presign(expires, callback);\n }\n});\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['lexmodelbuildingservice'] = {};\nAWS.LexModelBuildingService = Service.defineService('lexmodelbuildingservice', ['2017-04-19']);\nObject.defineProperty(apiLoader.services['lexmodelbuildingservice'], '2017-04-19', {\n get: function get() {\n var model = require('../apis/lex-models-2017-04-19.min.json');\n model.paginators = require('../apis/lex-models-2017-04-19.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.LexModelBuildingService;\n","var AWS = require('./core');\n/**\n * @api private\n */\nfunction validateRegionalEndpointsFlagValue(configValue, errorOptions) {\n if (typeof configValue !== 'string') return undefined;\n else if (['legacy', 'regional'].indexOf(configValue.toLowerCase()) >= 0) {\n return configValue.toLowerCase();\n } else {\n throw AWS.util.error(new Error(), errorOptions);\n }\n}\n\n/**\n * Resolve the configuration value for regional endpoint from difference sources: client\n * config, environmental variable, shared config file. Value can be case-insensitive\n * 'legacy' or 'reginal'.\n * @param originalConfig user-supplied config object to resolve\n * @param options a map of config property names from individual configuration source\n * - env: name of environmental variable that refers to the config\n * - sharedConfig: name of shared configuration file property that refers to the config\n * - clientConfig: name of client configuration property that refers to the config\n *\n * @api private\n */\nfunction resolveRegionalEndpointsFlag(originalConfig, options) {\n originalConfig = originalConfig || {};\n //validate config value\n var resolved;\n if (originalConfig[options.clientConfig]) {\n resolved = validateRegionalEndpointsFlagValue(originalConfig[options.clientConfig], {\n code: 'InvalidConfiguration',\n message: 'invalid \"' + options.clientConfig + '\" configuration. Expect \"legacy\" ' +\n ' or \"regional\". Got \"' + originalConfig[options.clientConfig] + '\".'\n });\n if (resolved) return resolved;\n }\n if (!AWS.util.isNode()) return resolved;\n //validate environmental variable\n if (Object.prototype.hasOwnProperty.call(process.env, options.env)) {\n var envFlag = process.env[options.env];\n resolved = validateRegionalEndpointsFlagValue(envFlag, {\n code: 'InvalidEnvironmentalVariable',\n message: 'invalid ' + options.env + ' environmental variable. Expect \"legacy\" ' +\n ' or \"regional\". Got \"' + process.env[options.env] + '\".'\n });\n if (resolved) return resolved;\n }\n //validate shared config file\n var profile = {};\n try {\n var profiles = AWS.util.getProfilesFromSharedConfig(AWS.util.iniLoader);\n profile = profiles[process.env.AWS_PROFILE || AWS.util.defaultProfile];\n } catch (e) {};\n if (profile && Object.prototype.hasOwnProperty.call(profile, options.sharedConfig)) {\n var fileFlag = profile[options.sharedConfig];\n resolved = validateRegionalEndpointsFlagValue(fileFlag, {\n code: 'InvalidConfiguration',\n message: 'invalid ' + options.sharedConfig + ' profile config. Expect \"legacy\" ' +\n ' or \"regional\". Got \"' + profile[options.sharedConfig] + '\".'\n });\n if (resolved) return resolved;\n }\n return resolved;\n}\n\nmodule.exports = resolveRegionalEndpointsFlag;\n","var escapeAttribute = require('./escape-attribute').escapeAttribute;\n\n/**\n * Represents an XML node.\n * @api private\n */\nfunction XmlNode(name, children) {\n if (children === void 0) { children = []; }\n this.name = name;\n this.children = children;\n this.attributes = {};\n}\nXmlNode.prototype.addAttribute = function (name, value) {\n this.attributes[name] = value;\n return this;\n};\nXmlNode.prototype.addChildNode = function (child) {\n this.children.push(child);\n return this;\n};\nXmlNode.prototype.removeAttribute = function (name) {\n delete this.attributes[name];\n return this;\n};\nXmlNode.prototype.toString = function () {\n var hasChildren = Boolean(this.children.length);\n var xmlText = '<' + this.name;\n // add attributes\n var attributes = this.attributes;\n for (var i = 0, attributeNames = Object.keys(attributes); i < attributeNames.length; i++) {\n var attributeName = attributeNames[i];\n var attribute = attributes[attributeName];\n if (typeof attribute !== 'undefined' && attribute !== null) {\n xmlText += ' ' + attributeName + '=\\\"' + escapeAttribute('' + attribute) + '\\\"';\n }\n }\n return xmlText += !hasChildren ? '/>' : '>' + this.children.map(function (c) { return c.toString(); }).join('') + '';\n};\n\n/**\n * @api private\n */\nmodule.exports = {\n XmlNode: XmlNode\n};\n","var AWS = require('./core');\nvar inherit = AWS.util.inherit;\nvar jmespath = require('jmespath');\n\n/**\n * This class encapsulates the response information\n * from a service request operation sent through {AWS.Request}.\n * The response object has two main properties for getting information\n * back from a request:\n *\n * ## The `data` property\n *\n * The `response.data` property contains the serialized object data\n * retrieved from the service request. For instance, for an\n * Amazon DynamoDB `listTables` method call, the response data might\n * look like:\n *\n * ```\n * > resp.data\n * { TableNames:\n * [ 'table1', 'table2', ... ] }\n * ```\n *\n * The `data` property can be null if an error occurs (see below).\n *\n * ## The `error` property\n *\n * In the event of a service error (or transfer error), the\n * `response.error` property will be filled with the given\n * error data in the form:\n *\n * ```\n * { code: 'SHORT_UNIQUE_ERROR_CODE',\n * message: 'Some human readable error message' }\n * ```\n *\n * In the case of an error, the `data` property will be `null`.\n * Note that if you handle events that can be in a failure state,\n * you should always check whether `response.error` is set\n * before attempting to access the `response.data` property.\n *\n * @!attribute data\n * @readonly\n * @!group Data Properties\n * @note Inside of a {AWS.Request~httpData} event, this\n * property contains a single raw packet instead of the\n * full de-serialized service response.\n * @return [Object] the de-serialized response data\n * from the service.\n *\n * @!attribute error\n * An structure containing information about a service\n * or networking error.\n * @readonly\n * @!group Data Properties\n * @note This attribute is only filled if a service or\n * networking error occurs.\n * @return [Error]\n * * code [String] a unique short code representing the\n * error that was emitted.\n * * message [String] a longer human readable error message\n * * retryable [Boolean] whether the error message is\n * retryable.\n * * statusCode [Numeric] in the case of a request that reached the service,\n * this value contains the response status code.\n * * time [Date] the date time object when the error occurred.\n * * hostname [String] set when a networking error occurs to easily\n * identify the endpoint of the request.\n * * region [String] set when a networking error occurs to easily\n * identify the region of the request.\n *\n * @!attribute requestId\n * @readonly\n * @!group Data Properties\n * @return [String] the unique request ID associated with the response.\n * Log this value when debugging requests for AWS support.\n *\n * @!attribute retryCount\n * @readonly\n * @!group Operation Properties\n * @return [Integer] the number of retries that were\n * attempted before the request was completed.\n *\n * @!attribute redirectCount\n * @readonly\n * @!group Operation Properties\n * @return [Integer] the number of redirects that were\n * followed before the request was completed.\n *\n * @!attribute httpResponse\n * @readonly\n * @!group HTTP Properties\n * @return [AWS.HttpResponse] the raw HTTP response object\n * containing the response headers and body information\n * from the server.\n *\n * @see AWS.Request\n */\nAWS.Response = inherit({\n\n /**\n * @api private\n */\n constructor: function Response(request) {\n this.request = request;\n this.data = null;\n this.error = null;\n this.retryCount = 0;\n this.redirectCount = 0;\n this.httpResponse = new AWS.HttpResponse();\n if (request) {\n this.maxRetries = request.service.numRetries();\n this.maxRedirects = request.service.config.maxRedirects;\n }\n },\n\n /**\n * Creates a new request for the next page of response data, calling the\n * callback with the page data if a callback is provided.\n *\n * @callback callback function(err, data)\n * Called when a page of data is returned from the next request.\n *\n * @param err [Error] an error object, if an error occurred in the request\n * @param data [Object] the next page of data, or null, if there are no\n * more pages left.\n * @return [AWS.Request] the request object for the next page of data\n * @return [null] if no callback is provided and there are no pages left\n * to retrieve.\n * @since v1.4.0\n */\n nextPage: function nextPage(callback) {\n var config;\n var service = this.request.service;\n var operation = this.request.operation;\n try {\n config = service.paginationConfig(operation, true);\n } catch (e) { this.error = e; }\n\n if (!this.hasNextPage()) {\n if (callback) callback(this.error, null);\n else if (this.error) throw this.error;\n return null;\n }\n\n var params = AWS.util.copy(this.request.params);\n if (!this.nextPageTokens) {\n return callback ? callback(null, null) : null;\n } else {\n var inputTokens = config.inputToken;\n if (typeof inputTokens === 'string') inputTokens = [inputTokens];\n for (var i = 0; i < inputTokens.length; i++) {\n params[inputTokens[i]] = this.nextPageTokens[i];\n }\n return service.makeRequest(this.request.operation, params, callback);\n }\n },\n\n /**\n * @return [Boolean] whether more pages of data can be returned by further\n * requests\n * @since v1.4.0\n */\n hasNextPage: function hasNextPage() {\n this.cacheNextPageTokens();\n if (this.nextPageTokens) return true;\n if (this.nextPageTokens === undefined) return undefined;\n else return false;\n },\n\n /**\n * @api private\n */\n cacheNextPageTokens: function cacheNextPageTokens() {\n if (Object.prototype.hasOwnProperty.call(this, 'nextPageTokens')) return this.nextPageTokens;\n this.nextPageTokens = undefined;\n\n var config = this.request.service.paginationConfig(this.request.operation);\n if (!config) return this.nextPageTokens;\n\n this.nextPageTokens = null;\n if (config.moreResults) {\n if (!jmespath.search(this.data, config.moreResults)) {\n return this.nextPageTokens;\n }\n }\n\n var exprs = config.outputToken;\n if (typeof exprs === 'string') exprs = [exprs];\n AWS.util.arrayEach.call(this, exprs, function (expr) {\n var output = jmespath.search(this.data, expr);\n if (output) {\n this.nextPageTokens = this.nextPageTokens || [];\n this.nextPageTokens.push(output);\n }\n });\n\n return this.nextPageTokens;\n }\n\n});\n","// Unique ID creation requires a high quality random # generator. In the\n// browser this is a little complicated due to unknown quality of Math.random()\n// and inconsistent support for the `crypto` API. We do the best we can via\n// feature-detection\n\n// getRandomValues needs to be invoked in a context where \"this\" is a Crypto\n// implementation. Also, find the complete implementation of crypto on IE11.\nvar getRandomValues = (typeof(crypto) != 'undefined' && crypto.getRandomValues && crypto.getRandomValues.bind(crypto)) ||\n (typeof(msCrypto) != 'undefined' && typeof window.msCrypto.getRandomValues == 'function' && msCrypto.getRandomValues.bind(msCrypto));\n\nif (getRandomValues) {\n // WHATWG crypto RNG - http://wiki.whatwg.org/wiki/Crypto\n var rnds8 = new Uint8Array(16); // eslint-disable-line no-undef\n\n module.exports = function whatwgRNG() {\n getRandomValues(rnds8);\n return rnds8;\n };\n} else {\n // Math.random()-based (RNG)\n //\n // If all else fails, use Math.random(). It's fast, but is of unspecified\n // quality.\n var rnds = new Array(16);\n\n module.exports = function mathRNG() {\n for (var i = 0, r; i < 16; i++) {\n if ((i & 0x03) === 0) r = Math.random() * 0x100000000;\n rnds[i] = r >>> ((i & 0x03) << 3) & 0xff;\n }\n\n return rnds;\n };\n}\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['kinesisvideosignalingchannels'] = {};\nAWS.KinesisVideoSignalingChannels = Service.defineService('kinesisvideosignalingchannels', ['2019-12-04']);\nObject.defineProperty(apiLoader.services['kinesisvideosignalingchannels'], '2019-12-04', {\n get: function get() {\n var model = require('../apis/kinesis-video-signaling-2019-12-04.min.json');\n model.paginators = require('../apis/kinesis-video-signaling-2019-12-04.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.KinesisVideoSignalingChannels;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['route53domains'] = {};\nAWS.Route53Domains = Service.defineService('route53domains', ['2014-05-15']);\nObject.defineProperty(apiLoader.services['route53domains'], '2014-05-15', {\n get: function get() {\n var model = require('../apis/route53domains-2014-05-15.min.json');\n model.paginators = require('../apis/route53domains-2014-05-15.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.Route53Domains;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['mobileanalytics'] = {};\nAWS.MobileAnalytics = Service.defineService('mobileanalytics', ['2014-06-05']);\nObject.defineProperty(apiLoader.services['mobileanalytics'], '2014-06-05', {\n get: function get() {\n var model = require('../apis/mobileanalytics-2014-06-05.min.json');\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.MobileAnalytics;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['iotdata'] = {};\nAWS.IotData = Service.defineService('iotdata', ['2015-05-28']);\nrequire('../lib/services/iotdata');\nObject.defineProperty(apiLoader.services['iotdata'], '2015-05-28', {\n get: function get() {\n var model = require('../apis/iot-data-2015-05-28.min.json');\n model.paginators = require('../apis/iot-data-2015-05-28.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.IotData;\n","var AWS = require('./core');\nrequire('./credentials');\nrequire('./credentials/credential_provider_chain');\nvar PromisesDependency;\n\n/**\n * The main configuration class used by all service objects to set\n * the region, credentials, and other options for requests.\n *\n * By default, credentials and region settings are left unconfigured.\n * This should be configured by the application before using any\n * AWS service APIs.\n *\n * In order to set global configuration options, properties should\n * be assigned to the global {AWS.config} object.\n *\n * @see AWS.config\n *\n * @!group General Configuration Options\n *\n * @!attribute credentials\n * @return [AWS.Credentials] the AWS credentials to sign requests with.\n *\n * @!attribute region\n * @example Set the global region setting to us-west-2\n * AWS.config.update({region: 'us-west-2'});\n * @return [AWS.Credentials] The region to send service requests to.\n * @see http://docs.amazonwebservices.com/general/latest/gr/rande.html\n * A list of available endpoints for each AWS service\n *\n * @!attribute maxRetries\n * @return [Integer] the maximum amount of retries to perform for a\n * service request. By default this value is calculated by the specific\n * service object that the request is being made to.\n *\n * @!attribute maxRedirects\n * @return [Integer] the maximum amount of redirects to follow for a\n * service request. Defaults to 10.\n *\n * @!attribute paramValidation\n * @return [Boolean|map] whether input parameters should be validated against\n * the operation description before sending the request. Defaults to true.\n * Pass a map to enable any of the following specific validation features:\n *\n * * **min** [Boolean] — Validates that a value meets the min\n * constraint. This is enabled by default when paramValidation is set\n * to `true`.\n * * **max** [Boolean] — Validates that a value meets the max\n * constraint.\n * * **pattern** [Boolean] — Validates that a string value matches a\n * regular expression.\n * * **enum** [Boolean] — Validates that a string value matches one\n * of the allowable enum values.\n *\n * @!attribute computeChecksums\n * @return [Boolean] whether to compute checksums for payload bodies when\n * the service accepts it (currently supported in S3 only).\n *\n * @!attribute convertResponseTypes\n * @return [Boolean] whether types are converted when parsing response data.\n * Currently only supported for JSON based services. Turning this off may\n * improve performance on large response payloads. Defaults to `true`.\n *\n * @!attribute correctClockSkew\n * @return [Boolean] whether to apply a clock skew correction and retry\n * requests that fail because of an skewed client clock. Defaults to\n * `false`.\n *\n * @!attribute sslEnabled\n * @return [Boolean] whether SSL is enabled for requests\n *\n * @!attribute s3ForcePathStyle\n * @return [Boolean] whether to force path style URLs for S3 objects\n *\n * @!attribute s3BucketEndpoint\n * @note Setting this configuration option requires an `endpoint` to be\n * provided explicitly to the service constructor.\n * @return [Boolean] whether the provided endpoint addresses an individual\n * bucket (false if it addresses the root API endpoint).\n *\n * @!attribute s3DisableBodySigning\n * @return [Boolean] whether to disable S3 body signing when using signature version `v4`.\n * Body signing can only be disabled when using https. Defaults to `true`.\n *\n * @!attribute s3UsEast1RegionalEndpoint\n * @return ['legacy'|'regional'] when region is set to 'us-east-1', whether to send s3\n * request to global endpoints or 'us-east-1' regional endpoints. This config is only\n * applicable to S3 client;\n * Defaults to 'legacy'\n * @!attribute s3UseArnRegion\n * @return [Boolean] whether to override the request region with the region inferred\n * from requested resource's ARN. Only available for S3 buckets\n * Defaults to `true`\n *\n * @!attribute useAccelerateEndpoint\n * @note This configuration option is only compatible with S3 while accessing\n * dns-compatible buckets.\n * @return [Boolean] Whether to use the Accelerate endpoint with the S3 service.\n * Defaults to `false`.\n *\n * @!attribute retryDelayOptions\n * @example Set the base retry delay for all services to 300 ms\n * AWS.config.update({retryDelayOptions: {base: 300}});\n * // Delays with maxRetries = 3: 300, 600, 1200\n * @example Set a custom backoff function to provide delay values on retries\n * AWS.config.update({retryDelayOptions: {customBackoff: function(retryCount, err) {\n * // returns delay in ms\n * }}});\n * @return [map] A set of options to configure the retry delay on retryable errors.\n * Currently supported options are:\n *\n * * **base** [Integer] — The base number of milliseconds to use in the\n * exponential backoff for operation retries. Defaults to 100 ms for all services except\n * DynamoDB, where it defaults to 50ms.\n *\n * * **customBackoff ** [function] — A custom function that accepts a\n * retry count and error and returns the amount of time to delay in\n * milliseconds. If the result is a non-zero negative value, no further\n * retry attempts will be made. The `base` option will be ignored if this\n * option is supplied. The function is only called for retryable errors.\n *\n * @!attribute httpOptions\n * @return [map] A set of options to pass to the low-level HTTP request.\n * Currently supported options are:\n *\n * * **proxy** [String] — the URL to proxy requests through\n * * **agent** [http.Agent, https.Agent] — the Agent object to perform\n * HTTP requests with. Used for connection pooling. Note that for\n * SSL connections, a special Agent object is used in order to enable\n * peer certificate verification. This feature is only supported in the\n * Node.js environment.\n * * **connectTimeout** [Integer] — Sets the socket to timeout after\n * failing to establish a connection with the server after\n * `connectTimeout` milliseconds. This timeout has no effect once a socket\n * connection has been established.\n * * **timeout** [Integer] — The number of milliseconds a request can\n * take before automatically being terminated.\n * Defaults to two minutes (120000).\n * * **xhrAsync** [Boolean] — Whether the SDK will send asynchronous\n * HTTP requests. Used in the browser environment only. Set to false to\n * send requests synchronously. Defaults to true (async on).\n * * **xhrWithCredentials** [Boolean] — Sets the \"withCredentials\"\n * property of an XMLHttpRequest object. Used in the browser environment\n * only. Defaults to false.\n * @!attribute logger\n * @return [#write,#log] an object that responds to .write() (like a stream)\n * or .log() (like the console object) in order to log information about\n * requests\n *\n * @!attribute systemClockOffset\n * @return [Number] an offset value in milliseconds to apply to all signing\n * times. Use this to compensate for clock skew when your system may be\n * out of sync with the service time. Note that this configuration option\n * can only be applied to the global `AWS.config` object and cannot be\n * overridden in service-specific configuration. Defaults to 0 milliseconds.\n *\n * @!attribute signatureVersion\n * @return [String] the signature version to sign requests with (overriding\n * the API configuration). Possible values are: 'v2', 'v3', 'v4'.\n *\n * @!attribute signatureCache\n * @return [Boolean] whether the signature to sign requests with (overriding\n * the API configuration) is cached. Only applies to the signature version 'v4'.\n * Defaults to `true`.\n *\n * @!attribute endpointDiscoveryEnabled\n * @return [Boolean|undefined] whether to call operations with endpoints\n * given by service dynamically. Setting this config to `true` will enable\n * endpoint discovery for all applicable operations. Setting it to `false`\n * will explicitly disable endpoint discovery even though operations that\n * require endpoint discovery will presumably fail. Leaving it to\n * `undefined` means SDK only do endpoint discovery when it's required.\n * Defaults to `undefined`\n *\n * @!attribute endpointCacheSize\n * @return [Number] the size of the global cache storing endpoints from endpoint\n * discovery operations. Once endpoint cache is created, updating this setting\n * cannot change existing cache size.\n * Defaults to 1000\n *\n * @!attribute hostPrefixEnabled\n * @return [Boolean] whether to marshal request parameters to the prefix of\n * hostname. Defaults to `true`.\n *\n * @!attribute stsRegionalEndpoints\n * @return ['legacy'|'regional'] whether to send sts request to global endpoints or\n * regional endpoints.\n * Defaults to 'legacy'\n */\nAWS.Config = AWS.util.inherit({\n /**\n * @!endgroup\n */\n\n /**\n * Creates a new configuration object. This is the object that passes\n * option data along to service requests, including credentials, security,\n * region information, and some service specific settings.\n *\n * @example Creating a new configuration object with credentials and region\n * var config = new AWS.Config({\n * accessKeyId: 'AKID', secretAccessKey: 'SECRET', region: 'us-west-2'\n * });\n * @option options accessKeyId [String] your AWS access key ID.\n * @option options secretAccessKey [String] your AWS secret access key.\n * @option options sessionToken [AWS.Credentials] the optional AWS\n * session token to sign requests with.\n * @option options credentials [AWS.Credentials] the AWS credentials\n * to sign requests with. You can either specify this object, or\n * specify the accessKeyId and secretAccessKey options directly.\n * @option options credentialProvider [AWS.CredentialProviderChain] the\n * provider chain used to resolve credentials if no static `credentials`\n * property is set.\n * @option options region [String] the region to send service requests to.\n * See {region} for more information.\n * @option options maxRetries [Integer] the maximum amount of retries to\n * attempt with a request. See {maxRetries} for more information.\n * @option options maxRedirects [Integer] the maximum amount of redirects to\n * follow with a request. See {maxRedirects} for more information.\n * @option options sslEnabled [Boolean] whether to enable SSL for\n * requests.\n * @option options paramValidation [Boolean|map] whether input parameters\n * should be validated against the operation description before sending\n * the request. Defaults to true. Pass a map to enable any of the\n * following specific validation features:\n *\n * * **min** [Boolean] — Validates that a value meets the min\n * constraint. This is enabled by default when paramValidation is set\n * to `true`.\n * * **max** [Boolean] — Validates that a value meets the max\n * constraint.\n * * **pattern** [Boolean] — Validates that a string value matches a\n * regular expression.\n * * **enum** [Boolean] — Validates that a string value matches one\n * of the allowable enum values.\n * @option options computeChecksums [Boolean] whether to compute checksums\n * for payload bodies when the service accepts it (currently supported\n * in S3 only)\n * @option options convertResponseTypes [Boolean] whether types are converted\n * when parsing response data. Currently only supported for JSON based\n * services. Turning this off may improve performance on large response\n * payloads. Defaults to `true`.\n * @option options correctClockSkew [Boolean] whether to apply a clock skew\n * correction and retry requests that fail because of an skewed client\n * clock. Defaults to `false`.\n * @option options s3ForcePathStyle [Boolean] whether to force path\n * style URLs for S3 objects.\n * @option options s3BucketEndpoint [Boolean] whether the provided endpoint\n * addresses an individual bucket (false if it addresses the root API\n * endpoint). Note that setting this configuration option requires an\n * `endpoint` to be provided explicitly to the service constructor.\n * @option options s3DisableBodySigning [Boolean] whether S3 body signing\n * should be disabled when using signature version `v4`. Body signing\n * can only be disabled when using https. Defaults to `true`.\n * @option options s3UsEast1RegionalEndpoint ['legacy'|'regional'] when region\n * is set to 'us-east-1', whether to send s3 request to global endpoints or\n * 'us-east-1' regional endpoints. This config is only applicable to S3 client.\n * Defaults to `legacy`\n * @option options s3UseArnRegion [Boolean] whether to override the request region\n * with the region inferred from requested resource's ARN. Only available for S3 buckets\n * Defaults to `true`\n *\n * @option options retryDelayOptions [map] A set of options to configure\n * the retry delay on retryable errors. Currently supported options are:\n *\n * * **base** [Integer] — The base number of milliseconds to use in the\n * exponential backoff for operation retries. Defaults to 100 ms for all\n * services except DynamoDB, where it defaults to 50ms.\n * * **customBackoff ** [function] — A custom function that accepts a\n * retry count and error and returns the amount of time to delay in\n * milliseconds. If the result is a non-zero negative value, no further\n * retry attempts will be made. The `base` option will be ignored if this\n * option is supplied. The function is only called for retryable errors.\n * @option options httpOptions [map] A set of options to pass to the low-level\n * HTTP request. Currently supported options are:\n *\n * * **proxy** [String] — the URL to proxy requests through\n * * **agent** [http.Agent, https.Agent] — the Agent object to perform\n * HTTP requests with. Used for connection pooling. Defaults to the global\n * agent (`http.globalAgent`) for non-SSL connections. Note that for\n * SSL connections, a special Agent object is used in order to enable\n * peer certificate verification. This feature is only available in the\n * Node.js environment.\n * * **connectTimeout** [Integer] — Sets the socket to timeout after\n * failing to establish a connection with the server after\n * `connectTimeout` milliseconds. This timeout has no effect once a socket\n * connection has been established.\n * * **timeout** [Integer] — Sets the socket to timeout after timeout\n * milliseconds of inactivity on the socket. Defaults to two minutes\n * (120000).\n * * **xhrAsync** [Boolean] — Whether the SDK will send asynchronous\n * HTTP requests. Used in the browser environment only. Set to false to\n * send requests synchronously. Defaults to true (async on).\n * * **xhrWithCredentials** [Boolean] — Sets the \"withCredentials\"\n * property of an XMLHttpRequest object. Used in the browser environment\n * only. Defaults to false.\n * @option options apiVersion [String, Date] a String in YYYY-MM-DD format\n * (or a date) that represents the latest possible API version that can be\n * used in all services (unless overridden by `apiVersions`). Specify\n * 'latest' to use the latest possible version.\n * @option options apiVersions [map] a map of service\n * identifiers (the lowercase service class name) with the API version to\n * use when instantiating a service. Specify 'latest' for each individual\n * that can use the latest available version.\n * @option options logger [#write,#log] an object that responds to .write()\n * (like a stream) or .log() (like the console object) in order to log\n * information about requests\n * @option options systemClockOffset [Number] an offset value in milliseconds\n * to apply to all signing times. Use this to compensate for clock skew\n * when your system may be out of sync with the service time. Note that\n * this configuration option can only be applied to the global `AWS.config`\n * object and cannot be overridden in service-specific configuration.\n * Defaults to 0 milliseconds.\n * @option options signatureVersion [String] the signature version to sign\n * requests with (overriding the API configuration). Possible values are:\n * 'v2', 'v3', 'v4'.\n * @option options signatureCache [Boolean] whether the signature to sign\n * requests with (overriding the API configuration) is cached. Only applies\n * to the signature version 'v4'. Defaults to `true`.\n * @option options dynamoDbCrc32 [Boolean] whether to validate the CRC32\n * checksum of HTTP response bodies returned by DynamoDB. Default: `true`.\n * @option options useAccelerateEndpoint [Boolean] Whether to use the\n * S3 Transfer Acceleration endpoint with the S3 service. Default: `false`.\n * @option options clientSideMonitoring [Boolean] whether to collect and\n * publish this client's performance metrics of all its API requests.\n * @option options endpointDiscoveryEnabled [Boolean|undefined] whether to\n * call operations with endpoints given by service dynamically. Setting this\n * config to `true` will enable endpoint discovery for all applicable operations.\n * Setting it to `false` will explicitly disable endpoint discovery even though\n * operations that require endpoint discovery will presumably fail. Leaving it\n * to `undefined` means SDK will only do endpoint discovery when it's required.\n * Defaults to `undefined`\n * @option options endpointCacheSize [Number] the size of the global cache storing\n * endpoints from endpoint discovery operations. Once endpoint cache is created,\n * updating this setting cannot change existing cache size.\n * Defaults to 1000\n * @option options hostPrefixEnabled [Boolean] whether to marshal request\n * parameters to the prefix of hostname.\n * Defaults to `true`.\n * @option options stsRegionalEndpoints ['legacy'|'regional'] whether to send sts request\n * to global endpoints or regional endpoints.\n * Defaults to 'legacy'.\n */\n constructor: function Config(options) {\n if (options === undefined) options = {};\n options = this.extractCredentials(options);\n\n AWS.util.each.call(this, this.keys, function (key, value) {\n this.set(key, options[key], value);\n });\n },\n\n /**\n * @!group Managing Credentials\n */\n\n /**\n * Loads credentials from the configuration object. This is used internally\n * by the SDK to ensure that refreshable {Credentials} objects are properly\n * refreshed and loaded when sending a request. If you want to ensure that\n * your credentials are loaded prior to a request, you can use this method\n * directly to provide accurate credential data stored in the object.\n *\n * @note If you configure the SDK with static or environment credentials,\n * the credential data should already be present in {credentials} attribute.\n * This method is primarily necessary to load credentials from asynchronous\n * sources, or sources that can refresh credentials periodically.\n * @example Getting your access key\n * AWS.config.getCredentials(function(err) {\n * if (err) console.log(err.stack); // credentials not loaded\n * else console.log(\"Access Key:\", AWS.config.credentials.accessKeyId);\n * })\n * @callback callback function(err)\n * Called when the {credentials} have been properly set on the configuration\n * object.\n *\n * @param err [Error] if this is set, credentials were not successfully\n * loaded and this error provides information why.\n * @see credentials\n * @see Credentials\n */\n getCredentials: function getCredentials(callback) {\n var self = this;\n\n function finish(err) {\n callback(err, err ? null : self.credentials);\n }\n\n function credError(msg, err) {\n return new AWS.util.error(err || new Error(), {\n code: 'CredentialsError',\n message: msg,\n name: 'CredentialsError'\n });\n }\n\n function getAsyncCredentials() {\n self.credentials.get(function(err) {\n if (err) {\n var msg = 'Could not load credentials from ' +\n self.credentials.constructor.name;\n err = credError(msg, err);\n }\n finish(err);\n });\n }\n\n function getStaticCredentials() {\n var err = null;\n if (!self.credentials.accessKeyId || !self.credentials.secretAccessKey) {\n err = credError('Missing credentials');\n }\n finish(err);\n }\n\n if (self.credentials) {\n if (typeof self.credentials.get === 'function') {\n getAsyncCredentials();\n } else { // static credentials\n getStaticCredentials();\n }\n } else if (self.credentialProvider) {\n self.credentialProvider.resolve(function(err, creds) {\n if (err) {\n err = credError('Could not load credentials from any providers', err);\n }\n self.credentials = creds;\n finish(err);\n });\n } else {\n finish(credError('No credentials to load'));\n }\n },\n\n /**\n * @!group Loading and Setting Configuration Options\n */\n\n /**\n * @overload update(options, allowUnknownKeys = false)\n * Updates the current configuration object with new options.\n *\n * @example Update maxRetries property of a configuration object\n * config.update({maxRetries: 10});\n * @param [Object] options a map of option keys and values.\n * @param [Boolean] allowUnknownKeys whether unknown keys can be set on\n * the configuration object. Defaults to `false`.\n * @see constructor\n */\n update: function update(options, allowUnknownKeys) {\n allowUnknownKeys = allowUnknownKeys || false;\n options = this.extractCredentials(options);\n AWS.util.each.call(this, options, function (key, value) {\n if (allowUnknownKeys || Object.prototype.hasOwnProperty.call(this.keys, key) ||\n AWS.Service.hasService(key)) {\n this.set(key, value);\n }\n });\n },\n\n /**\n * Loads configuration data from a JSON file into this config object.\n * @note Loading configuration will reset all existing configuration\n * on the object.\n * @!macro nobrowser\n * @param path [String] the path relative to your process's current\n * working directory to load configuration from.\n * @return [AWS.Config] the same configuration object\n */\n loadFromPath: function loadFromPath(path) {\n this.clear();\n\n var options = JSON.parse(AWS.util.readFileSync(path));\n var fileSystemCreds = new AWS.FileSystemCredentials(path);\n var chain = new AWS.CredentialProviderChain();\n chain.providers.unshift(fileSystemCreds);\n chain.resolve(function (err, creds) {\n if (err) throw err;\n else options.credentials = creds;\n });\n\n this.constructor(options);\n\n return this;\n },\n\n /**\n * Clears configuration data on this object\n *\n * @api private\n */\n clear: function clear() {\n /*jshint forin:false */\n AWS.util.each.call(this, this.keys, function (key) {\n delete this[key];\n });\n\n // reset credential provider\n this.set('credentials', undefined);\n this.set('credentialProvider', undefined);\n },\n\n /**\n * Sets a property on the configuration object, allowing for a\n * default value\n * @api private\n */\n set: function set(property, value, defaultValue) {\n if (value === undefined) {\n if (defaultValue === undefined) {\n defaultValue = this.keys[property];\n }\n if (typeof defaultValue === 'function') {\n this[property] = defaultValue.call(this);\n } else {\n this[property] = defaultValue;\n }\n } else if (property === 'httpOptions' && this[property]) {\n // deep merge httpOptions\n this[property] = AWS.util.merge(this[property], value);\n } else {\n this[property] = value;\n }\n },\n\n /**\n * All of the keys with their default values.\n *\n * @constant\n * @api private\n */\n keys: {\n credentials: null,\n credentialProvider: null,\n region: null,\n logger: null,\n apiVersions: {},\n apiVersion: null,\n endpoint: undefined,\n httpOptions: {\n timeout: 120000\n },\n maxRetries: undefined,\n maxRedirects: 10,\n paramValidation: true,\n sslEnabled: true,\n s3ForcePathStyle: false,\n s3BucketEndpoint: false,\n s3DisableBodySigning: true,\n s3UsEast1RegionalEndpoint: 'legacy',\n s3UseArnRegion: undefined,\n computeChecksums: true,\n convertResponseTypes: true,\n correctClockSkew: false,\n customUserAgent: null,\n dynamoDbCrc32: true,\n systemClockOffset: 0,\n signatureVersion: null,\n signatureCache: true,\n retryDelayOptions: {},\n useAccelerateEndpoint: false,\n clientSideMonitoring: false,\n endpointDiscoveryEnabled: undefined,\n endpointCacheSize: 1000,\n hostPrefixEnabled: true,\n stsRegionalEndpoints: 'legacy'\n },\n\n /**\n * Extracts accessKeyId, secretAccessKey and sessionToken\n * from a configuration hash.\n *\n * @api private\n */\n extractCredentials: function extractCredentials(options) {\n if (options.accessKeyId && options.secretAccessKey) {\n options = AWS.util.copy(options);\n options.credentials = new AWS.Credentials(options);\n }\n return options;\n },\n\n /**\n * Sets the promise dependency the SDK will use wherever Promises are returned.\n * Passing `null` will force the SDK to use native Promises if they are available.\n * If native Promises are not available, passing `null` will have no effect.\n * @param [Constructor] dep A reference to a Promise constructor\n */\n setPromisesDependency: function setPromisesDependency(dep) {\n PromisesDependency = dep;\n // if null was passed in, we should try to use native promises\n if (dep === null && typeof Promise === 'function') {\n PromisesDependency = Promise;\n }\n var constructors = [AWS.Request, AWS.Credentials, AWS.CredentialProviderChain];\n if (AWS.S3) {\n constructors.push(AWS.S3);\n if (AWS.S3.ManagedUpload) {\n constructors.push(AWS.S3.ManagedUpload);\n }\n }\n AWS.util.addPromises(constructors, PromisesDependency);\n },\n\n /**\n * Gets the promise dependency set by `AWS.config.setPromisesDependency`.\n */\n getPromisesDependency: function getPromisesDependency() {\n return PromisesDependency;\n }\n});\n\n/**\n * @return [AWS.Config] The global configuration object singleton instance\n * @readonly\n * @see AWS.Config\n */\nAWS.config = new AWS.Config();\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['ecr'] = {};\nAWS.ECR = Service.defineService('ecr', ['2015-09-21']);\nObject.defineProperty(apiLoader.services['ecr'], '2015-09-21', {\n get: function get() {\n var model = require('../apis/ecr-2015-09-21.min.json');\n model.paginators = require('../apis/ecr-2015-09-21.paginators.json').pagination;\n model.waiters = require('../apis/ecr-2015-09-21.waiters2.json').waiters;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.ECR;\n","var escapeElement = require('./escape-element').escapeElement;\n\n/**\n * Represents an XML text value.\n * @api private\n */\nfunction XmlText(value) {\n this.value = value;\n}\n\nXmlText.prototype.toString = function () {\n return escapeElement('' + this.value);\n};\n\n/**\n * @api private\n */\nmodule.exports = {\n XmlText: XmlText\n};\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['rekognition'] = {};\nAWS.Rekognition = Service.defineService('rekognition', ['2016-06-27']);\nObject.defineProperty(apiLoader.services['rekognition'], '2016-06-27', {\n get: function get() {\n var model = require('../apis/rekognition-2016-06-27.min.json');\n model.paginators = require('../apis/rekognition-2016-06-27.paginators.json').pagination;\n model.waiters = require('../apis/rekognition-2016-06-27.waiters2.json').waiters;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.Rekognition;\n","var parseMessage = require('./parse-message').parseMessage;\n\n/**\n *\n * @param {*} parser\n * @param {Buffer} message\n * @param {*} shape\n * @api private\n */\nfunction parseEvent(parser, message, shape) {\n var parsedMessage = parseMessage(message);\n\n // check if message is an event or error\n var messageType = parsedMessage.headers[':message-type'];\n if (messageType) {\n if (messageType.value === 'error') {\n throw parseError(parsedMessage);\n } else if (messageType.value !== 'event') {\n // not sure how to parse non-events/non-errors, ignore for now\n return;\n }\n }\n\n // determine event type\n var eventType = parsedMessage.headers[':event-type'];\n // check that the event type is modeled\n var eventModel = shape.members[eventType.value];\n if (!eventModel) {\n return;\n }\n\n var result = {};\n // check if an event payload exists\n var eventPayloadMemberName = eventModel.eventPayloadMemberName;\n if (eventPayloadMemberName) {\n var payloadShape = eventModel.members[eventPayloadMemberName];\n // if the shape is binary, return the byte array\n if (payloadShape.type === 'binary') {\n result[eventPayloadMemberName] = parsedMessage.body;\n } else {\n result[eventPayloadMemberName] = parser.parse(parsedMessage.body.toString(), payloadShape);\n }\n }\n\n // read event headers\n var eventHeaderNames = eventModel.eventHeaderMemberNames;\n for (var i = 0; i < eventHeaderNames.length; i++) {\n var name = eventHeaderNames[i];\n if (parsedMessage.headers[name]) {\n // parse the header!\n result[name] = eventModel.members[name].toType(parsedMessage.headers[name].value);\n }\n }\n\n var output = {};\n output[eventType.value] = result;\n return output;\n}\n\nfunction parseError(message) {\n var errorCode = message.headers[':error-code'];\n var errorMessage = message.headers[':error-message'];\n var error = new Error(errorMessage.value || errorMessage);\n error.code = error.name = errorCode.value || errorCode;\n return error;\n}\n\n/**\n * @api private\n */\nmodule.exports = {\n parseEvent: parseEvent\n};\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['costexplorer'] = {};\nAWS.CostExplorer = Service.defineService('costexplorer', ['2017-10-25']);\nObject.defineProperty(apiLoader.services['costexplorer'], '2017-10-25', {\n get: function get() {\n var model = require('../apis/ce-2017-10-25.min.json');\n model.paginators = require('../apis/ce-2017-10-25.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.CostExplorer;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['route53'] = {};\nAWS.Route53 = Service.defineService('route53', ['2013-04-01']);\nrequire('../lib/services/route53');\nObject.defineProperty(apiLoader.services['route53'], '2013-04-01', {\n get: function get() {\n var model = require('../apis/route53-2013-04-01.min.json');\n model.paginators = require('../apis/route53-2013-04-01.paginators.json').pagination;\n model.waiters = require('../apis/route53-2013-04-01.waiters2.json').waiters;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.Route53;\n","var AWS = require('../core');\nvar util = require('../util');\nvar Rest = require('./rest');\n\nfunction populateBody(req) {\n var input = req.service.api.operations[req.operation].input;\n var builder = new AWS.XML.Builder();\n var params = req.params;\n\n var payload = input.payload;\n if (payload) {\n var payloadMember = input.members[payload];\n params = params[payload];\n if (params === undefined) return;\n\n if (payloadMember.type === 'structure') {\n var rootElement = payloadMember.name;\n req.httpRequest.body = builder.toXML(params, payloadMember, rootElement, true);\n } else { // non-xml payload\n req.httpRequest.body = params;\n }\n } else {\n req.httpRequest.body = builder.toXML(params, input, input.name ||\n input.shape || util.string.upperFirst(req.operation) + 'Request');\n }\n}\n\nfunction buildRequest(req) {\n Rest.buildRequest(req);\n\n // never send body payload on GET/HEAD\n if (['GET', 'HEAD'].indexOf(req.httpRequest.method) < 0) {\n populateBody(req);\n }\n}\n\nfunction extractError(resp) {\n Rest.extractError(resp);\n\n var data;\n try {\n data = new AWS.XML.Parser().parse(resp.httpResponse.body.toString());\n } catch (e) {\n data = {\n Code: resp.httpResponse.statusCode,\n Message: resp.httpResponse.statusMessage\n };\n }\n\n if (data.Errors) data = data.Errors;\n if (data.Error) data = data.Error;\n if (data.Code) {\n resp.error = util.error(new Error(), {\n code: data.Code,\n message: data.Message\n });\n } else {\n resp.error = util.error(new Error(), {\n code: resp.httpResponse.statusCode,\n message: null\n });\n }\n}\n\nfunction extractData(resp) {\n Rest.extractData(resp);\n\n var parser;\n var req = resp.request;\n var body = resp.httpResponse.body;\n var operation = req.service.api.operations[req.operation];\n var output = operation.output;\n\n var hasEventOutput = operation.hasEventOutput;\n\n var payload = output.payload;\n if (payload) {\n var payloadMember = output.members[payload];\n if (payloadMember.isEventStream) {\n parser = new AWS.XML.Parser();\n resp.data[payload] = util.createEventStream(\n AWS.HttpClient.streamsApiVersion === 2 ? resp.httpResponse.stream : resp.httpResponse.body,\n parser,\n payloadMember\n );\n } else if (payloadMember.type === 'structure') {\n parser = new AWS.XML.Parser();\n resp.data[payload] = parser.parse(body.toString(), payloadMember);\n } else if (payloadMember.type === 'binary' || payloadMember.isStreaming) {\n resp.data[payload] = body;\n } else {\n resp.data[payload] = payloadMember.toType(body);\n }\n } else if (body.length > 0) {\n parser = new AWS.XML.Parser();\n var data = parser.parse(body.toString(), output);\n util.update(resp.data, data);\n }\n}\n\n/**\n * @api private\n */\nmodule.exports = {\n buildRequest: buildRequest,\n extractError: extractError,\n extractData: extractData\n};\n","var AWS = require('./core');\n\n/**\n * @api private\n * @!method on(eventName, callback)\n * Registers an event listener callback for the event given by `eventName`.\n * Parameters passed to the callback function depend on the individual event\n * being triggered. See the event documentation for those parameters.\n *\n * @param eventName [String] the event name to register the listener for\n * @param callback [Function] the listener callback function\n * @param toHead [Boolean] attach the listener callback to the head of callback array if set to true.\n * Default to be false.\n * @return [AWS.SequentialExecutor] the same object for chaining\n */\nAWS.SequentialExecutor = AWS.util.inherit({\n\n constructor: function SequentialExecutor() {\n this._events = {};\n },\n\n /**\n * @api private\n */\n listeners: function listeners(eventName) {\n return this._events[eventName] ? this._events[eventName].slice(0) : [];\n },\n\n on: function on(eventName, listener, toHead) {\n if (this._events[eventName]) {\n toHead ?\n this._events[eventName].unshift(listener) :\n this._events[eventName].push(listener);\n } else {\n this._events[eventName] = [listener];\n }\n return this;\n },\n\n onAsync: function onAsync(eventName, listener, toHead) {\n listener._isAsync = true;\n return this.on(eventName, listener, toHead);\n },\n\n removeListener: function removeListener(eventName, listener) {\n var listeners = this._events[eventName];\n if (listeners) {\n var length = listeners.length;\n var position = -1;\n for (var i = 0; i < length; ++i) {\n if (listeners[i] === listener) {\n position = i;\n }\n }\n if (position > -1) {\n listeners.splice(position, 1);\n }\n }\n return this;\n },\n\n removeAllListeners: function removeAllListeners(eventName) {\n if (eventName) {\n delete this._events[eventName];\n } else {\n this._events = {};\n }\n return this;\n },\n\n /**\n * @api private\n */\n emit: function emit(eventName, eventArgs, doneCallback) {\n if (!doneCallback) doneCallback = function() { };\n var listeners = this.listeners(eventName);\n var count = listeners.length;\n this.callListeners(listeners, eventArgs, doneCallback);\n return count > 0;\n },\n\n /**\n * @api private\n */\n callListeners: function callListeners(listeners, args, doneCallback, prevError) {\n var self = this;\n var error = prevError || null;\n\n function callNextListener(err) {\n if (err) {\n error = AWS.util.error(error || new Error(), err);\n if (self._haltHandlersOnError) {\n return doneCallback.call(self, error);\n }\n }\n self.callListeners(listeners, args, doneCallback, error);\n }\n\n while (listeners.length > 0) {\n var listener = listeners.shift();\n if (listener._isAsync) { // asynchronous listener\n listener.apply(self, args.concat([callNextListener]));\n return; // stop here, callNextListener will continue\n } else { // synchronous listener\n try {\n listener.apply(self, args);\n } catch (err) {\n error = AWS.util.error(error || new Error(), err);\n }\n if (error && self._haltHandlersOnError) {\n doneCallback.call(self, error);\n return;\n }\n }\n }\n doneCallback.call(self, error);\n },\n\n /**\n * Adds or copies a set of listeners from another list of\n * listeners or SequentialExecutor object.\n *\n * @param listeners [map>, AWS.SequentialExecutor]\n * a list of events and callbacks, or an event emitter object\n * containing listeners to add to this emitter object.\n * @return [AWS.SequentialExecutor] the emitter object, for chaining.\n * @example Adding listeners from a map of listeners\n * emitter.addListeners({\n * event1: [function() { ... }, function() { ... }],\n * event2: [function() { ... }]\n * });\n * emitter.emit('event1'); // emitter has event1\n * emitter.emit('event2'); // emitter has event2\n * @example Adding listeners from another emitter object\n * var emitter1 = new AWS.SequentialExecutor();\n * emitter1.on('event1', function() { ... });\n * emitter1.on('event2', function() { ... });\n * var emitter2 = new AWS.SequentialExecutor();\n * emitter2.addListeners(emitter1);\n * emitter2.emit('event1'); // emitter2 has event1\n * emitter2.emit('event2'); // emitter2 has event2\n */\n addListeners: function addListeners(listeners) {\n var self = this;\n\n // extract listeners if parameter is an SequentialExecutor object\n if (listeners._events) listeners = listeners._events;\n\n AWS.util.each(listeners, function(event, callbacks) {\n if (typeof callbacks === 'function') callbacks = [callbacks];\n AWS.util.arrayEach(callbacks, function(callback) {\n self.on(event, callback);\n });\n });\n\n return self;\n },\n\n /**\n * Registers an event with {on} and saves the callback handle function\n * as a property on the emitter object using a given `name`.\n *\n * @param name [String] the property name to set on this object containing\n * the callback function handle so that the listener can be removed in\n * the future.\n * @param (see on)\n * @return (see on)\n * @example Adding a named listener DATA_CALLBACK\n * var listener = function() { doSomething(); };\n * emitter.addNamedListener('DATA_CALLBACK', 'data', listener);\n *\n * // the following prints: true\n * console.log(emitter.DATA_CALLBACK == listener);\n */\n addNamedListener: function addNamedListener(name, eventName, callback, toHead) {\n this[name] = callback;\n this.addListener(eventName, callback, toHead);\n return this;\n },\n\n /**\n * @api private\n */\n addNamedAsyncListener: function addNamedAsyncListener(name, eventName, callback, toHead) {\n callback._isAsync = true;\n return this.addNamedListener(name, eventName, callback, toHead);\n },\n\n /**\n * Helper method to add a set of named listeners using\n * {addNamedListener}. The callback contains a parameter\n * with a handle to the `addNamedListener` method.\n *\n * @callback callback function(add)\n * The callback function is called immediately in order to provide\n * the `add` function to the block. This simplifies the addition of\n * a large group of named listeners.\n * @param add [Function] the {addNamedListener} function to call\n * when registering listeners.\n * @example Adding a set of named listeners\n * emitter.addNamedListeners(function(add) {\n * add('DATA_CALLBACK', 'data', function() { ... });\n * add('OTHER', 'otherEvent', function() { ... });\n * add('LAST', 'lastEvent', function() { ... });\n * });\n *\n * // these properties are now set:\n * emitter.DATA_CALLBACK;\n * emitter.OTHER;\n * emitter.LAST;\n */\n addNamedListeners: function addNamedListeners(callback) {\n var self = this;\n callback(\n function() {\n self.addNamedListener.apply(self, arguments);\n },\n function() {\n self.addNamedAsyncListener.apply(self, arguments);\n }\n );\n return this;\n }\n});\n\n/**\n * {on} is the prefered method.\n * @api private\n */\nAWS.SequentialExecutor.prototype.addListener = AWS.SequentialExecutor.prototype.on;\n\n/**\n * @api private\n */\nmodule.exports = AWS.SequentialExecutor;\n","var util = require('../util');\n\nfunction QueryParamSerializer() {\n}\n\nQueryParamSerializer.prototype.serialize = function(params, shape, fn) {\n serializeStructure('', params, shape, fn);\n};\n\nfunction ucfirst(shape) {\n if (shape.isQueryName || shape.api.protocol !== 'ec2') {\n return shape.name;\n } else {\n return shape.name[0].toUpperCase() + shape.name.substr(1);\n }\n}\n\nfunction serializeStructure(prefix, struct, rules, fn) {\n util.each(rules.members, function(name, member) {\n var value = struct[name];\n if (value === null || value === undefined) return;\n\n var memberName = ucfirst(member);\n memberName = prefix ? prefix + '.' + memberName : memberName;\n serializeMember(memberName, value, member, fn);\n });\n}\n\nfunction serializeMap(name, map, rules, fn) {\n var i = 1;\n util.each(map, function (key, value) {\n var prefix = rules.flattened ? '.' : '.entry.';\n var position = prefix + (i++) + '.';\n var keyName = position + (rules.key.name || 'key');\n var valueName = position + (rules.value.name || 'value');\n serializeMember(name + keyName, key, rules.key, fn);\n serializeMember(name + valueName, value, rules.value, fn);\n });\n}\n\nfunction serializeList(name, list, rules, fn) {\n var memberRules = rules.member || {};\n\n if (list.length === 0) {\n fn.call(this, name, null);\n return;\n }\n\n util.arrayEach(list, function (v, n) {\n var suffix = '.' + (n + 1);\n if (rules.api.protocol === 'ec2') {\n // Do nothing for EC2\n suffix = suffix + ''; // make linter happy\n } else if (rules.flattened) {\n if (memberRules.name) {\n var parts = name.split('.');\n parts.pop();\n parts.push(ucfirst(memberRules));\n name = parts.join('.');\n }\n } else {\n suffix = '.' + (memberRules.name ? memberRules.name : 'member') + suffix;\n }\n serializeMember(name + suffix, v, memberRules, fn);\n });\n}\n\nfunction serializeMember(name, value, rules, fn) {\n if (value === null || value === undefined) return;\n if (rules.type === 'structure') {\n serializeStructure(name, value, rules, fn);\n } else if (rules.type === 'list') {\n serializeList(name, value, rules, fn);\n } else if (rules.type === 'map') {\n serializeMap(name, value, rules, fn);\n } else {\n fn(name, rules.toWireFormat(value).toString());\n }\n}\n\n/**\n * @api private\n */\nmodule.exports = QueryParamSerializer;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['opsworks'] = {};\nAWS.OpsWorks = Service.defineService('opsworks', ['2013-02-18']);\nObject.defineProperty(apiLoader.services['opsworks'], '2013-02-18', {\n get: function get() {\n var model = require('../apis/opsworks-2013-02-18.min.json');\n model.paginators = require('../apis/opsworks-2013-02-18.paginators.json').pagination;\n model.waiters = require('../apis/opsworks-2013-02-18.waiters2.json').waiters;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.OpsWorks;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar LinkedListNode = /** @class */ (function () {\n function LinkedListNode(key, value) {\n this.key = key;\n this.value = value;\n }\n return LinkedListNode;\n}());\nvar LRUCache = /** @class */ (function () {\n function LRUCache(size) {\n this.nodeMap = {};\n this.size = 0;\n if (typeof size !== 'number' || size < 1) {\n throw new Error('Cache size can only be positive number');\n }\n this.sizeLimit = size;\n }\n Object.defineProperty(LRUCache.prototype, \"length\", {\n get: function () {\n return this.size;\n },\n enumerable: true,\n configurable: true\n });\n LRUCache.prototype.prependToList = function (node) {\n if (!this.headerNode) {\n this.tailNode = node;\n }\n else {\n this.headerNode.prev = node;\n node.next = this.headerNode;\n }\n this.headerNode = node;\n this.size++;\n };\n LRUCache.prototype.removeFromTail = function () {\n if (!this.tailNode) {\n return undefined;\n }\n var node = this.tailNode;\n var prevNode = node.prev;\n if (prevNode) {\n prevNode.next = undefined;\n }\n node.prev = undefined;\n this.tailNode = prevNode;\n this.size--;\n return node;\n };\n LRUCache.prototype.detachFromList = function (node) {\n if (this.headerNode === node) {\n this.headerNode = node.next;\n }\n if (this.tailNode === node) {\n this.tailNode = node.prev;\n }\n if (node.prev) {\n node.prev.next = node.next;\n }\n if (node.next) {\n node.next.prev = node.prev;\n }\n node.next = undefined;\n node.prev = undefined;\n this.size--;\n };\n LRUCache.prototype.get = function (key) {\n if (this.nodeMap[key]) {\n var node = this.nodeMap[key];\n this.detachFromList(node);\n this.prependToList(node);\n return node.value;\n }\n };\n LRUCache.prototype.remove = function (key) {\n if (this.nodeMap[key]) {\n var node = this.nodeMap[key];\n this.detachFromList(node);\n delete this.nodeMap[key];\n }\n };\n LRUCache.prototype.put = function (key, value) {\n if (this.nodeMap[key]) {\n this.remove(key);\n }\n else if (this.size === this.sizeLimit) {\n var tailNode = this.removeFromTail();\n var key_1 = tailNode.key;\n delete this.nodeMap[key_1];\n }\n var newNode = new LinkedListNode(key, value);\n this.nodeMap[key] = newNode;\n this.prependToList(newNode);\n };\n LRUCache.prototype.empty = function () {\n var keys = Object.keys(this.nodeMap);\n for (var i = 0; i < keys.length; i++) {\n var key = keys[i];\n var node = this.nodeMap[key];\n this.detachFromList(node);\n delete this.nodeMap[key];\n }\n };\n return LRUCache;\n}());\nexports.LRUCache = LRUCache;","var util = require('../util');\n\nfunction JsonParser() { }\n\nJsonParser.prototype.parse = function(value, shape) {\n return translate(JSON.parse(value), shape);\n};\n\nfunction translate(value, shape) {\n if (!shape || value === undefined) return undefined;\n\n switch (shape.type) {\n case 'structure': return translateStructure(value, shape);\n case 'map': return translateMap(value, shape);\n case 'list': return translateList(value, shape);\n default: return translateScalar(value, shape);\n }\n}\n\nfunction translateStructure(structure, shape) {\n if (structure == null) return undefined;\n\n var struct = {};\n var shapeMembers = shape.members;\n util.each(shapeMembers, function(name, memberShape) {\n var locationName = memberShape.isLocationName ? memberShape.name : name;\n if (Object.prototype.hasOwnProperty.call(structure, locationName)) {\n var value = structure[locationName];\n var result = translate(value, memberShape);\n if (result !== undefined) struct[name] = result;\n }\n });\n return struct;\n}\n\nfunction translateList(list, shape) {\n if (list == null) return undefined;\n\n var out = [];\n util.arrayEach(list, function(value) {\n var result = translate(value, shape.member);\n if (result === undefined) out.push(null);\n else out.push(result);\n });\n return out;\n}\n\nfunction translateMap(map, shape) {\n if (map == null) return undefined;\n\n var out = {};\n util.each(map, function(key, value) {\n var result = translate(value, shape.value);\n if (result === undefined) out[key] = null;\n else out[key] = result;\n });\n return out;\n}\n\nfunction translateScalar(value, shape) {\n return shape.toType(value);\n}\n\n/**\n * @api private\n */\nmodule.exports = JsonParser;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['comprehendmedical'] = {};\nAWS.ComprehendMedical = Service.defineService('comprehendmedical', ['2018-10-30']);\nObject.defineProperty(apiLoader.services['comprehendmedical'], '2018-10-30', {\n get: function get() {\n var model = require('../apis/comprehendmedical-2018-10-30.min.json');\n model.paginators = require('../apis/comprehendmedical-2018-10-30.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.ComprehendMedical;\n","var AWS = require('./core');\nvar AcceptorStateMachine = require('./state_machine');\nvar inherit = AWS.util.inherit;\nvar domain = AWS.util.domain;\nvar jmespath = require('jmespath');\n\n/**\n * @api private\n */\nvar hardErrorStates = {success: 1, error: 1, complete: 1};\n\nfunction isTerminalState(machine) {\n return Object.prototype.hasOwnProperty.call(hardErrorStates, machine._asm.currentState);\n}\n\nvar fsm = new AcceptorStateMachine();\nfsm.setupStates = function() {\n var transition = function(_, done) {\n var self = this;\n self._haltHandlersOnError = false;\n\n self.emit(self._asm.currentState, function(err) {\n if (err) {\n if (isTerminalState(self)) {\n if (domain && self.domain instanceof domain.Domain) {\n err.domainEmitter = self;\n err.domain = self.domain;\n err.domainThrown = false;\n self.domain.emit('error', err);\n } else {\n throw err;\n }\n } else {\n self.response.error = err;\n done(err);\n }\n } else {\n done(self.response.error);\n }\n });\n\n };\n\n this.addState('validate', 'build', 'error', transition);\n this.addState('build', 'afterBuild', 'restart', transition);\n this.addState('afterBuild', 'sign', 'restart', transition);\n this.addState('sign', 'send', 'retry', transition);\n this.addState('retry', 'afterRetry', 'afterRetry', transition);\n this.addState('afterRetry', 'sign', 'error', transition);\n this.addState('send', 'validateResponse', 'retry', transition);\n this.addState('validateResponse', 'extractData', 'extractError', transition);\n this.addState('extractError', 'extractData', 'retry', transition);\n this.addState('extractData', 'success', 'retry', transition);\n this.addState('restart', 'build', 'error', transition);\n this.addState('success', 'complete', 'complete', transition);\n this.addState('error', 'complete', 'complete', transition);\n this.addState('complete', null, null, transition);\n};\nfsm.setupStates();\n\n/**\n * ## Asynchronous Requests\n *\n * All requests made through the SDK are asynchronous and use a\n * callback interface. Each service method that kicks off a request\n * returns an `AWS.Request` object that you can use to register\n * callbacks.\n *\n * For example, the following service method returns the request\n * object as \"request\", which can be used to register callbacks:\n *\n * ```javascript\n * // request is an AWS.Request object\n * var request = ec2.describeInstances();\n *\n * // register callbacks on request to retrieve response data\n * request.on('success', function(response) {\n * console.log(response.data);\n * });\n * ```\n *\n * When a request is ready to be sent, the {send} method should\n * be called:\n *\n * ```javascript\n * request.send();\n * ```\n *\n * Since registered callbacks may or may not be idempotent, requests should only\n * be sent once. To perform the same operation multiple times, you will need to\n * create multiple request objects, each with its own registered callbacks.\n *\n * ## Removing Default Listeners for Events\n *\n * Request objects are built with default listeners for the various events,\n * depending on the service type. In some cases, you may want to remove\n * some built-in listeners to customize behaviour. Doing this requires\n * access to the built-in listener functions, which are exposed through\n * the {AWS.EventListeners.Core} namespace. For instance, you may\n * want to customize the HTTP handler used when sending a request. In this\n * case, you can remove the built-in listener associated with the 'send'\n * event, the {AWS.EventListeners.Core.SEND} listener and add your own.\n *\n * ## Multiple Callbacks and Chaining\n *\n * You can register multiple callbacks on any request object. The\n * callbacks can be registered for different events, or all for the\n * same event. In addition, you can chain callback registration, for\n * example:\n *\n * ```javascript\n * request.\n * on('success', function(response) {\n * console.log(\"Success!\");\n * }).\n * on('error', function(error, response) {\n * console.log(\"Error!\");\n * }).\n * on('complete', function(response) {\n * console.log(\"Always!\");\n * }).\n * send();\n * ```\n *\n * The above example will print either \"Success! Always!\", or \"Error! Always!\",\n * depending on whether the request succeeded or not.\n *\n * @!attribute httpRequest\n * @readonly\n * @!group HTTP Properties\n * @return [AWS.HttpRequest] the raw HTTP request object\n * containing request headers and body information\n * sent by the service.\n *\n * @!attribute startTime\n * @readonly\n * @!group Operation Properties\n * @return [Date] the time that the request started\n *\n * @!group Request Building Events\n *\n * @!event validate(request)\n * Triggered when a request is being validated. Listeners\n * should throw an error if the request should not be sent.\n * @param request [Request] the request object being sent\n * @see AWS.EventListeners.Core.VALIDATE_CREDENTIALS\n * @see AWS.EventListeners.Core.VALIDATE_REGION\n * @example Ensuring that a certain parameter is set before sending a request\n * var req = s3.putObject(params);\n * req.on('validate', function() {\n * if (!req.params.Body.match(/^Hello\\s/)) {\n * throw new Error('Body must start with \"Hello \"');\n * }\n * });\n * req.send(function(err, data) { ... });\n *\n * @!event build(request)\n * Triggered when the request payload is being built. Listeners\n * should fill the necessary information to send the request\n * over HTTP.\n * @param (see AWS.Request~validate)\n * @example Add a custom HTTP header to a request\n * var req = s3.putObject(params);\n * req.on('build', function() {\n * req.httpRequest.headers['Custom-Header'] = 'value';\n * });\n * req.send(function(err, data) { ... });\n *\n * @!event sign(request)\n * Triggered when the request is being signed. Listeners should\n * add the correct authentication headers and/or adjust the body,\n * depending on the authentication mechanism being used.\n * @param (see AWS.Request~validate)\n *\n * @!group Request Sending Events\n *\n * @!event send(response)\n * Triggered when the request is ready to be sent. Listeners\n * should call the underlying transport layer to initiate\n * the sending of the request.\n * @param response [Response] the response object\n * @context [Request] the request object that was sent\n * @see AWS.EventListeners.Core.SEND\n *\n * @!event retry(response)\n * Triggered when a request failed and might need to be retried or redirected.\n * If the response is retryable, the listener should set the\n * `response.error.retryable` property to `true`, and optionally set\n * `response.error.retryDelay` to the millisecond delay for the next attempt.\n * In the case of a redirect, `response.error.redirect` should be set to\n * `true` with `retryDelay` set to an optional delay on the next request.\n *\n * If a listener decides that a request should not be retried,\n * it should set both `retryable` and `redirect` to false.\n *\n * Note that a retryable error will be retried at most\n * {AWS.Config.maxRetries} times (based on the service object's config).\n * Similarly, a request that is redirected will only redirect at most\n * {AWS.Config.maxRedirects} times.\n *\n * @param (see AWS.Request~send)\n * @context (see AWS.Request~send)\n * @example Adding a custom retry for a 404 response\n * request.on('retry', function(response) {\n * // this resource is not yet available, wait 10 seconds to get it again\n * if (response.httpResponse.statusCode === 404 && response.error) {\n * response.error.retryable = true; // retry this error\n * response.error.retryDelay = 10000; // wait 10 seconds\n * }\n * });\n *\n * @!group Data Parsing Events\n *\n * @!event extractError(response)\n * Triggered on all non-2xx requests so that listeners can extract\n * error details from the response body. Listeners to this event\n * should set the `response.error` property.\n * @param (see AWS.Request~send)\n * @context (see AWS.Request~send)\n *\n * @!event extractData(response)\n * Triggered in successful requests to allow listeners to\n * de-serialize the response body into `response.data`.\n * @param (see AWS.Request~send)\n * @context (see AWS.Request~send)\n *\n * @!group Completion Events\n *\n * @!event success(response)\n * Triggered when the request completed successfully.\n * `response.data` will contain the response data and\n * `response.error` will be null.\n * @param (see AWS.Request~send)\n * @context (see AWS.Request~send)\n *\n * @!event error(error, response)\n * Triggered when an error occurs at any point during the\n * request. `response.error` will contain details about the error\n * that occurred. `response.data` will be null.\n * @param error [Error] the error object containing details about\n * the error that occurred.\n * @param (see AWS.Request~send)\n * @context (see AWS.Request~send)\n *\n * @!event complete(response)\n * Triggered whenever a request cycle completes. `response.error`\n * should be checked, since the request may have failed.\n * @param (see AWS.Request~send)\n * @context (see AWS.Request~send)\n *\n * @!group HTTP Events\n *\n * @!event httpHeaders(statusCode, headers, response, statusMessage)\n * Triggered when headers are sent by the remote server\n * @param statusCode [Integer] the HTTP response code\n * @param headers [map] the response headers\n * @param (see AWS.Request~send)\n * @param statusMessage [String] A status message corresponding to the HTTP\n * response code\n * @context (see AWS.Request~send)\n *\n * @!event httpData(chunk, response)\n * Triggered when data is sent by the remote server\n * @param chunk [Buffer] the buffer data containing the next data chunk\n * from the server\n * @param (see AWS.Request~send)\n * @context (see AWS.Request~send)\n * @see AWS.EventListeners.Core.HTTP_DATA\n *\n * @!event httpUploadProgress(progress, response)\n * Triggered when the HTTP request has uploaded more data\n * @param progress [map] An object containing the `loaded` and `total` bytes\n * of the request.\n * @param (see AWS.Request~send)\n * @context (see AWS.Request~send)\n * @note This event will not be emitted in Node.js 0.8.x.\n *\n * @!event httpDownloadProgress(progress, response)\n * Triggered when the HTTP request has downloaded more data\n * @param progress [map] An object containing the `loaded` and `total` bytes\n * of the request.\n * @param (see AWS.Request~send)\n * @context (see AWS.Request~send)\n * @note This event will not be emitted in Node.js 0.8.x.\n *\n * @!event httpError(error, response)\n * Triggered when the HTTP request failed\n * @param error [Error] the error object that was thrown\n * @param (see AWS.Request~send)\n * @context (see AWS.Request~send)\n *\n * @!event httpDone(response)\n * Triggered when the server is finished sending data\n * @param (see AWS.Request~send)\n * @context (see AWS.Request~send)\n *\n * @see AWS.Response\n */\nAWS.Request = inherit({\n\n /**\n * Creates a request for an operation on a given service with\n * a set of input parameters.\n *\n * @param service [AWS.Service] the service to perform the operation on\n * @param operation [String] the operation to perform on the service\n * @param params [Object] parameters to send to the operation.\n * See the operation's documentation for the format of the\n * parameters.\n */\n constructor: function Request(service, operation, params) {\n var endpoint = service.endpoint;\n var region = service.config.region;\n var customUserAgent = service.config.customUserAgent;\n\n if (service.isGlobalEndpoint) {\n if (service.signingRegion) {\n region = service.signingRegion;\n } else {\n region = 'us-east-1';\n }\n }\n\n this.domain = domain && domain.active;\n this.service = service;\n this.operation = operation;\n this.params = params || {};\n this.httpRequest = new AWS.HttpRequest(endpoint, region);\n this.httpRequest.appendToUserAgent(customUserAgent);\n this.startTime = service.getSkewCorrectedDate();\n\n this.response = new AWS.Response(this);\n this._asm = new AcceptorStateMachine(fsm.states, 'validate');\n this._haltHandlersOnError = false;\n\n AWS.SequentialExecutor.call(this);\n this.emit = this.emitEvent;\n },\n\n /**\n * @!group Sending a Request\n */\n\n /**\n * @overload send(callback = null)\n * Sends the request object.\n *\n * @callback callback function(err, data)\n * If a callback is supplied, it is called when a response is returned\n * from the service.\n * @context [AWS.Request] the request object being sent.\n * @param err [Error] the error object returned from the request.\n * Set to `null` if the request is successful.\n * @param data [Object] the de-serialized data returned from\n * the request. Set to `null` if a request error occurs.\n * @example Sending a request with a callback\n * request = s3.putObject({Bucket: 'bucket', Key: 'key'});\n * request.send(function(err, data) { console.log(err, data); });\n * @example Sending a request with no callback (using event handlers)\n * request = s3.putObject({Bucket: 'bucket', Key: 'key'});\n * request.on('complete', function(response) { ... }); // register a callback\n * request.send();\n */\n send: function send(callback) {\n if (callback) {\n // append to user agent\n this.httpRequest.appendToUserAgent('callback');\n this.on('complete', function (resp) {\n callback.call(resp, resp.error, resp.data);\n });\n }\n this.runTo();\n\n return this.response;\n },\n\n /**\n * @!method promise()\n * Sends the request and returns a 'thenable' promise.\n *\n * Two callbacks can be provided to the `then` method on the returned promise.\n * The first callback will be called if the promise is fulfilled, and the second\n * callback will be called if the promise is rejected.\n * @callback fulfilledCallback function(data)\n * Called if the promise is fulfilled.\n * @param data [Object] the de-serialized data returned from the request.\n * @callback rejectedCallback function(error)\n * Called if the promise is rejected.\n * @param error [Error] the error object returned from the request.\n * @return [Promise] A promise that represents the state of the request.\n * @example Sending a request using promises.\n * var request = s3.putObject({Bucket: 'bucket', Key: 'key'});\n * var result = request.promise();\n * result.then(function(data) { ... }, function(error) { ... });\n */\n\n /**\n * @api private\n */\n build: function build(callback) {\n return this.runTo('send', callback);\n },\n\n /**\n * @api private\n */\n runTo: function runTo(state, done) {\n this._asm.runTo(state, done, this);\n return this;\n },\n\n /**\n * Aborts a request, emitting the error and complete events.\n *\n * @!macro nobrowser\n * @example Aborting a request after sending\n * var params = {\n * Bucket: 'bucket', Key: 'key',\n * Body: Buffer.alloc(1024 * 1024 * 5) // 5MB payload\n * };\n * var request = s3.putObject(params);\n * request.send(function (err, data) {\n * if (err) console.log(\"Error:\", err.code, err.message);\n * else console.log(data);\n * });\n *\n * // abort request in 1 second\n * setTimeout(request.abort.bind(request), 1000);\n *\n * // prints \"Error: RequestAbortedError Request aborted by user\"\n * @return [AWS.Request] the same request object, for chaining.\n * @since v1.4.0\n */\n abort: function abort() {\n this.removeAllListeners('validateResponse');\n this.removeAllListeners('extractError');\n this.on('validateResponse', function addAbortedError(resp) {\n resp.error = AWS.util.error(new Error('Request aborted by user'), {\n code: 'RequestAbortedError', retryable: false\n });\n });\n\n if (this.httpRequest.stream && !this.httpRequest.stream.didCallback) { // abort HTTP stream\n this.httpRequest.stream.abort();\n if (this.httpRequest._abortCallback) {\n this.httpRequest._abortCallback();\n } else {\n this.removeAllListeners('send'); // haven't sent yet, so let's not\n }\n }\n\n return this;\n },\n\n /**\n * Iterates over each page of results given a pageable request, calling\n * the provided callback with each page of data. After all pages have been\n * retrieved, the callback is called with `null` data.\n *\n * @note This operation can generate multiple requests to a service.\n * @example Iterating over multiple pages of objects in an S3 bucket\n * var pages = 1;\n * s3.listObjects().eachPage(function(err, data) {\n * if (err) return;\n * console.log(\"Page\", pages++);\n * console.log(data);\n * });\n * @example Iterating over multiple pages with an asynchronous callback\n * s3.listObjects(params).eachPage(function(err, data, done) {\n * doSomethingAsyncAndOrExpensive(function() {\n * // The next page of results isn't fetched until done is called\n * done();\n * });\n * });\n * @callback callback function(err, data, [doneCallback])\n * Called with each page of resulting data from the request. If the\n * optional `doneCallback` is provided in the function, it must be called\n * when the callback is complete.\n *\n * @param err [Error] an error object, if an error occurred.\n * @param data [Object] a single page of response data. If there is no\n * more data, this object will be `null`.\n * @param doneCallback [Function] an optional done callback. If this\n * argument is defined in the function declaration, it should be called\n * when the next page is ready to be retrieved. This is useful for\n * controlling serial pagination across asynchronous operations.\n * @return [Boolean] if the callback returns `false`, pagination will\n * stop.\n *\n * @see AWS.Request.eachItem\n * @see AWS.Response.nextPage\n * @since v1.4.0\n */\n eachPage: function eachPage(callback) {\n // Make all callbacks async-ish\n callback = AWS.util.fn.makeAsync(callback, 3);\n\n function wrappedCallback(response) {\n callback.call(response, response.error, response.data, function (result) {\n if (result === false) return;\n\n if (response.hasNextPage()) {\n response.nextPage().on('complete', wrappedCallback).send();\n } else {\n callback.call(response, null, null, AWS.util.fn.noop);\n }\n });\n }\n\n this.on('complete', wrappedCallback).send();\n },\n\n /**\n * Enumerates over individual items of a request, paging the responses if\n * necessary.\n *\n * @api experimental\n * @since v1.4.0\n */\n eachItem: function eachItem(callback) {\n var self = this;\n function wrappedCallback(err, data) {\n if (err) return callback(err, null);\n if (data === null) return callback(null, null);\n\n var config = self.service.paginationConfig(self.operation);\n var resultKey = config.resultKey;\n if (Array.isArray(resultKey)) resultKey = resultKey[0];\n var items = jmespath.search(data, resultKey);\n var continueIteration = true;\n AWS.util.arrayEach(items, function(item) {\n continueIteration = callback(null, item);\n if (continueIteration === false) {\n return AWS.util.abort;\n }\n });\n return continueIteration;\n }\n\n this.eachPage(wrappedCallback);\n },\n\n /**\n * @return [Boolean] whether the operation can return multiple pages of\n * response data.\n * @see AWS.Response.eachPage\n * @since v1.4.0\n */\n isPageable: function isPageable() {\n return this.service.paginationConfig(this.operation) ? true : false;\n },\n\n /**\n * Sends the request and converts the request object into a readable stream\n * that can be read from or piped into a writable stream.\n *\n * @note The data read from a readable stream contains only\n * the raw HTTP body contents.\n * @example Manually reading from a stream\n * request.createReadStream().on('data', function(data) {\n * console.log(\"Got data:\", data.toString());\n * });\n * @example Piping a request body into a file\n * var out = fs.createWriteStream('/path/to/outfile.jpg');\n * s3.service.getObject(params).createReadStream().pipe(out);\n * @return [Stream] the readable stream object that can be piped\n * or read from (by registering 'data' event listeners).\n * @!macro nobrowser\n */\n createReadStream: function createReadStream() {\n var streams = AWS.util.stream;\n var req = this;\n var stream = null;\n\n if (AWS.HttpClient.streamsApiVersion === 2) {\n stream = new streams.PassThrough();\n process.nextTick(function() { req.send(); });\n } else {\n stream = new streams.Stream();\n stream.readable = true;\n\n stream.sent = false;\n stream.on('newListener', function(event) {\n if (!stream.sent && event === 'data') {\n stream.sent = true;\n process.nextTick(function() { req.send(); });\n }\n });\n }\n\n this.on('error', function(err) {\n stream.emit('error', err);\n });\n\n this.on('httpHeaders', function streamHeaders(statusCode, headers, resp) {\n if (statusCode < 300) {\n req.removeListener('httpData', AWS.EventListeners.Core.HTTP_DATA);\n req.removeListener('httpError', AWS.EventListeners.Core.HTTP_ERROR);\n req.on('httpError', function streamHttpError(error) {\n resp.error = error;\n resp.error.retryable = false;\n });\n\n var shouldCheckContentLength = false;\n var expectedLen;\n if (req.httpRequest.method !== 'HEAD') {\n expectedLen = parseInt(headers['content-length'], 10);\n }\n if (expectedLen !== undefined && !isNaN(expectedLen) && expectedLen >= 0) {\n shouldCheckContentLength = true;\n var receivedLen = 0;\n }\n\n var checkContentLengthAndEmit = function checkContentLengthAndEmit() {\n if (shouldCheckContentLength && receivedLen !== expectedLen) {\n stream.emit('error', AWS.util.error(\n new Error('Stream content length mismatch. Received ' +\n receivedLen + ' of ' + expectedLen + ' bytes.'),\n { code: 'StreamContentLengthMismatch' }\n ));\n } else if (AWS.HttpClient.streamsApiVersion === 2) {\n stream.end();\n } else {\n stream.emit('end');\n }\n };\n\n var httpStream = resp.httpResponse.createUnbufferedStream();\n\n if (AWS.HttpClient.streamsApiVersion === 2) {\n if (shouldCheckContentLength) {\n var lengthAccumulator = new streams.PassThrough();\n lengthAccumulator._write = function(chunk) {\n if (chunk && chunk.length) {\n receivedLen += chunk.length;\n }\n return streams.PassThrough.prototype._write.apply(this, arguments);\n };\n\n lengthAccumulator.on('end', checkContentLengthAndEmit);\n stream.on('error', function(err) {\n shouldCheckContentLength = false;\n httpStream.unpipe(lengthAccumulator);\n lengthAccumulator.emit('end');\n lengthAccumulator.end();\n });\n httpStream.pipe(lengthAccumulator).pipe(stream, { end: false });\n } else {\n httpStream.pipe(stream);\n }\n } else {\n\n if (shouldCheckContentLength) {\n httpStream.on('data', function(arg) {\n if (arg && arg.length) {\n receivedLen += arg.length;\n }\n });\n }\n\n httpStream.on('data', function(arg) {\n stream.emit('data', arg);\n });\n httpStream.on('end', checkContentLengthAndEmit);\n }\n\n httpStream.on('error', function(err) {\n shouldCheckContentLength = false;\n stream.emit('error', err);\n });\n }\n });\n\n return stream;\n },\n\n /**\n * @param [Array,Response] args This should be the response object,\n * or an array of args to send to the event.\n * @api private\n */\n emitEvent: function emit(eventName, args, done) {\n if (typeof args === 'function') { done = args; args = null; }\n if (!done) done = function() { };\n if (!args) args = this.eventParameters(eventName, this.response);\n\n var origEmit = AWS.SequentialExecutor.prototype.emit;\n origEmit.call(this, eventName, args, function (err) {\n if (err) this.response.error = err;\n done.call(this, err);\n });\n },\n\n /**\n * @api private\n */\n eventParameters: function eventParameters(eventName) {\n switch (eventName) {\n case 'restart':\n case 'validate':\n case 'sign':\n case 'build':\n case 'afterValidate':\n case 'afterBuild':\n return [this];\n case 'error':\n return [this.response.error, this.response];\n default:\n return [this.response];\n }\n },\n\n /**\n * @api private\n */\n presign: function presign(expires, callback) {\n if (!callback && typeof expires === 'function') {\n callback = expires;\n expires = null;\n }\n return new AWS.Signers.Presign().sign(this.toGet(), expires, callback);\n },\n\n /**\n * @api private\n */\n isPresigned: function isPresigned() {\n return Object.prototype.hasOwnProperty.call(this.httpRequest.headers, 'presigned-expires');\n },\n\n /**\n * @api private\n */\n toUnauthenticated: function toUnauthenticated() {\n this._unAuthenticated = true;\n this.removeListener('validate', AWS.EventListeners.Core.VALIDATE_CREDENTIALS);\n this.removeListener('sign', AWS.EventListeners.Core.SIGN);\n return this;\n },\n\n /**\n * @api private\n */\n toGet: function toGet() {\n if (this.service.api.protocol === 'query' ||\n this.service.api.protocol === 'ec2') {\n this.removeListener('build', this.buildAsGet);\n this.addListener('build', this.buildAsGet);\n }\n return this;\n },\n\n /**\n * @api private\n */\n buildAsGet: function buildAsGet(request) {\n request.httpRequest.method = 'GET';\n request.httpRequest.path = request.service.endpoint.path +\n '?' + request.httpRequest.body;\n request.httpRequest.body = '';\n\n // don't need these headers on a GET request\n delete request.httpRequest.headers['Content-Length'];\n delete request.httpRequest.headers['Content-Type'];\n },\n\n /**\n * @api private\n */\n haltHandlersOnError: function haltHandlersOnError() {\n this._haltHandlersOnError = true;\n }\n});\n\n/**\n * @api private\n */\nAWS.Request.addPromisesToClass = function addPromisesToClass(PromiseDependency) {\n this.prototype.promise = function promise() {\n var self = this;\n // append to user agent\n this.httpRequest.appendToUserAgent('promise');\n return new PromiseDependency(function(resolve, reject) {\n self.on('complete', function(resp) {\n if (resp.error) {\n reject(resp.error);\n } else {\n // define $response property so that it is not enumerable\n // this prevents circular reference errors when stringifying the JSON object\n resolve(Object.defineProperty(\n resp.data || {},\n '$response',\n {value: resp}\n ));\n }\n });\n self.runTo();\n });\n };\n};\n\n/**\n * @api private\n */\nAWS.Request.deletePromisesFromClass = function deletePromisesFromClass() {\n delete this.prototype.promise;\n};\n\nAWS.util.addPromises(AWS.Request);\n\nAWS.util.mixin(AWS.Request, AWS.SequentialExecutor);\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['ecs'] = {};\nAWS.ECS = Service.defineService('ecs', ['2014-11-13']);\nObject.defineProperty(apiLoader.services['ecs'], '2014-11-13', {\n get: function get() {\n var model = require('../apis/ecs-2014-11-13.min.json');\n model.paginators = require('../apis/ecs-2014-11-13.paginators.json').pagination;\n model.waiters = require('../apis/ecs-2014-11-13.waiters2.json').waiters;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.ECS;\n","var AWS = require('../core');\nvar CognitoIdentity = require('../../clients/cognitoidentity');\nvar STS = require('../../clients/sts');\n\n/**\n * Represents credentials retrieved from STS Web Identity Federation using\n * the Amazon Cognito Identity service.\n *\n * By default this provider gets credentials using the\n * {AWS.CognitoIdentity.getCredentialsForIdentity} service operation, which\n * requires either an `IdentityId` or an `IdentityPoolId` (Amazon Cognito\n * Identity Pool ID), which is used to call {AWS.CognitoIdentity.getId} to\n * obtain an `IdentityId`. If the identity or identity pool is not configured in\n * the Amazon Cognito Console to use IAM roles with the appropriate permissions,\n * then additionally a `RoleArn` is required containing the ARN of the IAM trust\n * policy for the Amazon Cognito role that the user will log into. If a `RoleArn`\n * is provided, then this provider gets credentials using the\n * {AWS.STS.assumeRoleWithWebIdentity} service operation, after first getting an\n * Open ID token from {AWS.CognitoIdentity.getOpenIdToken}.\n *\n * In addition, if this credential provider is used to provide authenticated\n * login, the `Logins` map may be set to the tokens provided by the respective\n * identity providers. See {constructor} for an example on creating a credentials\n * object with proper property values.\n *\n * ## Refreshing Credentials from Identity Service\n *\n * In addition to AWS credentials expiring after a given amount of time, the\n * login token from the identity provider will also expire. Once this token\n * expires, it will not be usable to refresh AWS credentials, and another\n * token will be needed. The SDK does not manage refreshing of the token value,\n * but this can be done through a \"refresh token\" supported by most identity\n * providers. Consult the documentation for the identity provider for refreshing\n * tokens. Once the refreshed token is acquired, you should make sure to update\n * this new token in the credentials object's {params} property. The following\n * code will update the WebIdentityToken, assuming you have retrieved an updated\n * token from the identity provider:\n *\n * ```javascript\n * AWS.config.credentials.params.Logins['graph.facebook.com'] = updatedToken;\n * ```\n *\n * Future calls to `credentials.refresh()` will now use the new token.\n *\n * @!attribute params\n * @return [map] the map of params passed to\n * {AWS.CognitoIdentity.getId},\n * {AWS.CognitoIdentity.getOpenIdToken}, and\n * {AWS.STS.assumeRoleWithWebIdentity}. To update the token, set the\n * `params.WebIdentityToken` property.\n * @!attribute data\n * @return [map] the raw data response from the call to\n * {AWS.CognitoIdentity.getCredentialsForIdentity}, or\n * {AWS.STS.assumeRoleWithWebIdentity}. Use this if you want to get\n * access to other properties from the response.\n * @!attribute identityId\n * @return [String] the Cognito ID returned by the last call to\n * {AWS.CognitoIdentity.getOpenIdToken}. This ID represents the actual\n * final resolved identity ID from Amazon Cognito.\n */\nAWS.CognitoIdentityCredentials = AWS.util.inherit(AWS.Credentials, {\n /**\n * @api private\n */\n localStorageKey: {\n id: 'aws.cognito.identity-id.',\n providers: 'aws.cognito.identity-providers.'\n },\n\n /**\n * Creates a new credentials object.\n * @example Creating a new credentials object\n * AWS.config.credentials = new AWS.CognitoIdentityCredentials({\n *\n * // either IdentityPoolId or IdentityId is required\n * // See the IdentityPoolId param for AWS.CognitoIdentity.getID (linked below)\n * // See the IdentityId param for AWS.CognitoIdentity.getCredentialsForIdentity\n * // or AWS.CognitoIdentity.getOpenIdToken (linked below)\n * IdentityPoolId: 'us-east-1:1699ebc0-7900-4099-b910-2df94f52a030',\n * IdentityId: 'us-east-1:128d0a74-c82f-4553-916d-90053e4a8b0f'\n *\n * // optional, only necessary when the identity pool is not configured\n * // to use IAM roles in the Amazon Cognito Console\n * // See the RoleArn param for AWS.STS.assumeRoleWithWebIdentity (linked below)\n * RoleArn: 'arn:aws:iam::1234567890:role/MYAPP-CognitoIdentity',\n *\n * // optional tokens, used for authenticated login\n * // See the Logins param for AWS.CognitoIdentity.getID (linked below)\n * Logins: {\n * 'graph.facebook.com': 'FBTOKEN',\n * 'www.amazon.com': 'AMAZONTOKEN',\n * 'accounts.google.com': 'GOOGLETOKEN',\n * 'api.twitter.com': 'TWITTERTOKEN',\n * 'www.digits.com': 'DIGITSTOKEN'\n * },\n *\n * // optional name, defaults to web-identity\n * // See the RoleSessionName param for AWS.STS.assumeRoleWithWebIdentity (linked below)\n * RoleSessionName: 'web',\n *\n * // optional, only necessary when application runs in a browser\n * // and multiple users are signed in at once, used for caching\n * LoginId: 'example@gmail.com'\n *\n * }, {\n * // optionally provide configuration to apply to the underlying service clients\n * // if configuration is not provided, then configuration will be pulled from AWS.config\n *\n * // region should match the region your identity pool is located in\n * region: 'us-east-1',\n *\n * // specify timeout options\n * httpOptions: {\n * timeout: 100\n * }\n * });\n * @see AWS.CognitoIdentity.getId\n * @see AWS.CognitoIdentity.getCredentialsForIdentity\n * @see AWS.STS.assumeRoleWithWebIdentity\n * @see AWS.CognitoIdentity.getOpenIdToken\n * @see AWS.Config\n * @note If a region is not provided in the global AWS.config, or\n * specified in the `clientConfig` to the CognitoIdentityCredentials\n * constructor, you may encounter a 'Missing credentials in config' error\n * when calling making a service call.\n */\n constructor: function CognitoIdentityCredentials(params, clientConfig) {\n AWS.Credentials.call(this);\n this.expired = true;\n this.params = params;\n this.data = null;\n this._identityId = null;\n this._clientConfig = AWS.util.copy(clientConfig || {});\n this.loadCachedId();\n var self = this;\n Object.defineProperty(this, 'identityId', {\n get: function() {\n self.loadCachedId();\n return self._identityId || self.params.IdentityId;\n },\n set: function(identityId) {\n self._identityId = identityId;\n }\n });\n },\n\n /**\n * Refreshes credentials using {AWS.CognitoIdentity.getCredentialsForIdentity},\n * or {AWS.STS.assumeRoleWithWebIdentity}.\n *\n * @callback callback function(err)\n * Called when the STS service responds (or fails). When\n * this callback is called with no error, it means that the credentials\n * information has been loaded into the object (as the `accessKeyId`,\n * `secretAccessKey`, and `sessionToken` properties).\n * @param err [Error] if an error occurred, this value will be filled\n * @see AWS.Credentials.get\n */\n refresh: function refresh(callback) {\n this.coalesceRefresh(callback || AWS.util.fn.callback);\n },\n\n /**\n * @api private\n * @param callback\n */\n load: function load(callback) {\n var self = this;\n self.createClients();\n self.data = null;\n self._identityId = null;\n self.getId(function(err) {\n if (!err) {\n if (!self.params.RoleArn) {\n self.getCredentialsForIdentity(callback);\n } else {\n self.getCredentialsFromSTS(callback);\n }\n } else {\n self.clearIdOnNotAuthorized(err);\n callback(err);\n }\n });\n },\n\n /**\n * Clears the cached Cognito ID associated with the currently configured\n * identity pool ID. Use this to manually invalidate your cache if\n * the identity pool ID was deleted.\n */\n clearCachedId: function clearCache() {\n this._identityId = null;\n delete this.params.IdentityId;\n\n var poolId = this.params.IdentityPoolId;\n var loginId = this.params.LoginId || '';\n delete this.storage[this.localStorageKey.id + poolId + loginId];\n delete this.storage[this.localStorageKey.providers + poolId + loginId];\n },\n\n /**\n * @api private\n */\n clearIdOnNotAuthorized: function clearIdOnNotAuthorized(err) {\n var self = this;\n if (err.code == 'NotAuthorizedException') {\n self.clearCachedId();\n }\n },\n\n /**\n * Retrieves a Cognito ID, loading from cache if it was already retrieved\n * on this device.\n *\n * @callback callback function(err, identityId)\n * @param err [Error, null] an error object if the call failed or null if\n * it succeeded.\n * @param identityId [String, null] if successful, the callback will return\n * the Cognito ID.\n * @note If not loaded explicitly, the Cognito ID is loaded and stored in\n * localStorage in the browser environment of a device.\n * @api private\n */\n getId: function getId(callback) {\n var self = this;\n if (typeof self.params.IdentityId === 'string') {\n return callback(null, self.params.IdentityId);\n }\n\n self.cognito.getId(function(err, data) {\n if (!err && data.IdentityId) {\n self.params.IdentityId = data.IdentityId;\n callback(null, data.IdentityId);\n } else {\n callback(err);\n }\n });\n },\n\n\n /**\n * @api private\n */\n loadCredentials: function loadCredentials(data, credentials) {\n if (!data || !credentials) return;\n credentials.expired = false;\n credentials.accessKeyId = data.Credentials.AccessKeyId;\n credentials.secretAccessKey = data.Credentials.SecretKey;\n credentials.sessionToken = data.Credentials.SessionToken;\n credentials.expireTime = data.Credentials.Expiration;\n },\n\n /**\n * @api private\n */\n getCredentialsForIdentity: function getCredentialsForIdentity(callback) {\n var self = this;\n self.cognito.getCredentialsForIdentity(function(err, data) {\n if (!err) {\n self.cacheId(data);\n self.data = data;\n self.loadCredentials(self.data, self);\n } else {\n self.clearIdOnNotAuthorized(err);\n }\n callback(err);\n });\n },\n\n /**\n * @api private\n */\n getCredentialsFromSTS: function getCredentialsFromSTS(callback) {\n var self = this;\n self.cognito.getOpenIdToken(function(err, data) {\n if (!err) {\n self.cacheId(data);\n self.params.WebIdentityToken = data.Token;\n self.webIdentityCredentials.refresh(function(webErr) {\n if (!webErr) {\n self.data = self.webIdentityCredentials.data;\n self.sts.credentialsFrom(self.data, self);\n }\n callback(webErr);\n });\n } else {\n self.clearIdOnNotAuthorized(err);\n callback(err);\n }\n });\n },\n\n /**\n * @api private\n */\n loadCachedId: function loadCachedId() {\n var self = this;\n\n // in the browser we source default IdentityId from localStorage\n if (AWS.util.isBrowser() && !self.params.IdentityId) {\n var id = self.getStorage('id');\n if (id && self.params.Logins) {\n var actualProviders = Object.keys(self.params.Logins);\n var cachedProviders =\n (self.getStorage('providers') || '').split(',');\n\n // only load ID if at least one provider used this ID before\n var intersect = cachedProviders.filter(function(n) {\n return actualProviders.indexOf(n) !== -1;\n });\n if (intersect.length !== 0) {\n self.params.IdentityId = id;\n }\n } else if (id) {\n self.params.IdentityId = id;\n }\n }\n },\n\n /**\n * @api private\n */\n createClients: function() {\n var clientConfig = this._clientConfig;\n this.webIdentityCredentials = this.webIdentityCredentials ||\n new AWS.WebIdentityCredentials(this.params, clientConfig);\n if (!this.cognito) {\n var cognitoConfig = AWS.util.merge({}, clientConfig);\n cognitoConfig.params = this.params;\n this.cognito = new CognitoIdentity(cognitoConfig);\n }\n this.sts = this.sts || new STS(clientConfig);\n },\n\n /**\n * @api private\n */\n cacheId: function cacheId(data) {\n this._identityId = data.IdentityId;\n this.params.IdentityId = this._identityId;\n\n // cache this IdentityId in browser localStorage if possible\n if (AWS.util.isBrowser()) {\n this.setStorage('id', data.IdentityId);\n\n if (this.params.Logins) {\n this.setStorage('providers', Object.keys(this.params.Logins).join(','));\n }\n }\n },\n\n /**\n * @api private\n */\n getStorage: function getStorage(key) {\n return this.storage[this.localStorageKey[key] + this.params.IdentityPoolId + (this.params.LoginId || '')];\n },\n\n /**\n * @api private\n */\n setStorage: function setStorage(key, val) {\n try {\n this.storage[this.localStorageKey[key] + this.params.IdentityPoolId + (this.params.LoginId || '')] = val;\n } catch (_) {}\n },\n\n /**\n * @api private\n */\n storage: (function() {\n try {\n var storage = AWS.util.isBrowser() && window.localStorage !== null && typeof window.localStorage === 'object' ?\n window.localStorage : {};\n\n // Test set/remove which would throw an error in Safari's private browsing\n storage['aws.test-storage'] = 'foobar';\n delete storage['aws.test-storage'];\n\n return storage;\n } catch (_) {\n return {};\n }\n })()\n});\n","var AWS = require('./core');\nvar Api = require('./model/api');\nvar regionConfig = require('./region_config');\n\nvar inherit = AWS.util.inherit;\nvar clientCount = 0;\n\n/**\n * The service class representing an AWS service.\n *\n * @class_abstract This class is an abstract class.\n *\n * @!attribute apiVersions\n * @return [Array] the list of API versions supported by this service.\n * @readonly\n */\nAWS.Service = inherit({\n /**\n * Create a new service object with a configuration object\n *\n * @param config [map] a map of configuration options\n */\n constructor: function Service(config) {\n if (!this.loadServiceClass) {\n throw AWS.util.error(new Error(),\n 'Service must be constructed with `new\\' operator');\n }\n var ServiceClass = this.loadServiceClass(config || {});\n if (ServiceClass) {\n var originalConfig = AWS.util.copy(config);\n var svc = new ServiceClass(config);\n Object.defineProperty(svc, '_originalConfig', {\n get: function() { return originalConfig; },\n enumerable: false,\n configurable: true\n });\n svc._clientId = ++clientCount;\n return svc;\n }\n this.initialize(config);\n },\n\n /**\n * @api private\n */\n initialize: function initialize(config) {\n var svcConfig = AWS.config[this.serviceIdentifier];\n this.config = new AWS.Config(AWS.config);\n if (svcConfig) this.config.update(svcConfig, true);\n if (config) this.config.update(config, true);\n\n this.validateService();\n if (!this.config.endpoint) regionConfig.configureEndpoint(this);\n\n this.config.endpoint = this.endpointFromTemplate(this.config.endpoint);\n this.setEndpoint(this.config.endpoint);\n //enable attaching listeners to service client\n AWS.SequentialExecutor.call(this);\n AWS.Service.addDefaultMonitoringListeners(this);\n if ((this.config.clientSideMonitoring || AWS.Service._clientSideMonitoring) && this.publisher) {\n var publisher = this.publisher;\n this.addNamedListener('PUBLISH_API_CALL', 'apiCall', function PUBLISH_API_CALL(event) {\n process.nextTick(function() {publisher.eventHandler(event);});\n });\n this.addNamedListener('PUBLISH_API_ATTEMPT', 'apiCallAttempt', function PUBLISH_API_ATTEMPT(event) {\n process.nextTick(function() {publisher.eventHandler(event);});\n });\n }\n },\n\n /**\n * @api private\n */\n validateService: function validateService() {\n },\n\n /**\n * @api private\n */\n loadServiceClass: function loadServiceClass(serviceConfig) {\n var config = serviceConfig;\n if (!AWS.util.isEmpty(this.api)) {\n return null;\n } else if (config.apiConfig) {\n return AWS.Service.defineServiceApi(this.constructor, config.apiConfig);\n } else if (!this.constructor.services) {\n return null;\n } else {\n config = new AWS.Config(AWS.config);\n config.update(serviceConfig, true);\n var version = config.apiVersions[this.constructor.serviceIdentifier];\n version = version || config.apiVersion;\n return this.getLatestServiceClass(version);\n }\n },\n\n /**\n * @api private\n */\n getLatestServiceClass: function getLatestServiceClass(version) {\n version = this.getLatestServiceVersion(version);\n if (this.constructor.services[version] === null) {\n AWS.Service.defineServiceApi(this.constructor, version);\n }\n\n return this.constructor.services[version];\n },\n\n /**\n * @api private\n */\n getLatestServiceVersion: function getLatestServiceVersion(version) {\n if (!this.constructor.services || this.constructor.services.length === 0) {\n throw new Error('No services defined on ' +\n this.constructor.serviceIdentifier);\n }\n\n if (!version) {\n version = 'latest';\n } else if (AWS.util.isType(version, Date)) {\n version = AWS.util.date.iso8601(version).split('T')[0];\n }\n\n if (Object.hasOwnProperty(this.constructor.services, version)) {\n return version;\n }\n\n var keys = Object.keys(this.constructor.services).sort();\n var selectedVersion = null;\n for (var i = keys.length - 1; i >= 0; i--) {\n // versions that end in \"*\" are not available on disk and can be\n // skipped, so do not choose these as selectedVersions\n if (keys[i][keys[i].length - 1] !== '*') {\n selectedVersion = keys[i];\n }\n if (keys[i].substr(0, 10) <= version) {\n return selectedVersion;\n }\n }\n\n throw new Error('Could not find ' + this.constructor.serviceIdentifier +\n ' API to satisfy version constraint `' + version + '\\'');\n },\n\n /**\n * @api private\n */\n api: {},\n\n /**\n * @api private\n */\n defaultRetryCount: 3,\n\n /**\n * @api private\n */\n customizeRequests: function customizeRequests(callback) {\n if (!callback) {\n this.customRequestHandler = null;\n } else if (typeof callback === 'function') {\n this.customRequestHandler = callback;\n } else {\n throw new Error('Invalid callback type \\'' + typeof callback + '\\' provided in customizeRequests');\n }\n },\n\n /**\n * Calls an operation on a service with the given input parameters.\n *\n * @param operation [String] the name of the operation to call on the service.\n * @param params [map] a map of input options for the operation\n * @callback callback function(err, data)\n * If a callback is supplied, it is called when a response is returned\n * from the service.\n * @param err [Error] the error object returned from the request.\n * Set to `null` if the request is successful.\n * @param data [Object] the de-serialized data returned from\n * the request. Set to `null` if a request error occurs.\n */\n makeRequest: function makeRequest(operation, params, callback) {\n if (typeof params === 'function') {\n callback = params;\n params = null;\n }\n\n params = params || {};\n if (this.config.params) { // copy only toplevel bound params\n var rules = this.api.operations[operation];\n if (rules) {\n params = AWS.util.copy(params);\n AWS.util.each(this.config.params, function(key, value) {\n if (rules.input.members[key]) {\n if (params[key] === undefined || params[key] === null) {\n params[key] = value;\n }\n }\n });\n }\n }\n\n var request = new AWS.Request(this, operation, params);\n this.addAllRequestListeners(request);\n this.attachMonitoringEmitter(request);\n if (callback) request.send(callback);\n return request;\n },\n\n /**\n * Calls an operation on a service with the given input parameters, without\n * any authentication data. This method is useful for \"public\" API operations.\n *\n * @param operation [String] the name of the operation to call on the service.\n * @param params [map] a map of input options for the operation\n * @callback callback function(err, data)\n * If a callback is supplied, it is called when a response is returned\n * from the service.\n * @param err [Error] the error object returned from the request.\n * Set to `null` if the request is successful.\n * @param data [Object] the de-serialized data returned from\n * the request. Set to `null` if a request error occurs.\n */\n makeUnauthenticatedRequest: function makeUnauthenticatedRequest(operation, params, callback) {\n if (typeof params === 'function') {\n callback = params;\n params = {};\n }\n\n var request = this.makeRequest(operation, params).toUnauthenticated();\n return callback ? request.send(callback) : request;\n },\n\n /**\n * Waits for a given state\n *\n * @param state [String] the state on the service to wait for\n * @param params [map] a map of parameters to pass with each request\n * @option params $waiter [map] a map of configuration options for the waiter\n * @option params $waiter.delay [Number] The number of seconds to wait between\n * requests\n * @option params $waiter.maxAttempts [Number] The maximum number of requests\n * to send while waiting\n * @callback callback function(err, data)\n * If a callback is supplied, it is called when a response is returned\n * from the service.\n * @param err [Error] the error object returned from the request.\n * Set to `null` if the request is successful.\n * @param data [Object] the de-serialized data returned from\n * the request. Set to `null` if a request error occurs.\n */\n waitFor: function waitFor(state, params, callback) {\n var waiter = new AWS.ResourceWaiter(this, state);\n return waiter.wait(params, callback);\n },\n\n /**\n * @api private\n */\n addAllRequestListeners: function addAllRequestListeners(request) {\n var list = [AWS.events, AWS.EventListeners.Core, this.serviceInterface(),\n AWS.EventListeners.CorePost];\n for (var i = 0; i < list.length; i++) {\n if (list[i]) request.addListeners(list[i]);\n }\n\n // disable parameter validation\n if (!this.config.paramValidation) {\n request.removeListener('validate',\n AWS.EventListeners.Core.VALIDATE_PARAMETERS);\n }\n\n if (this.config.logger) { // add logging events\n request.addListeners(AWS.EventListeners.Logger);\n }\n\n this.setupRequestListeners(request);\n // call prototype's customRequestHandler\n if (typeof this.constructor.prototype.customRequestHandler === 'function') {\n this.constructor.prototype.customRequestHandler(request);\n }\n // call instance's customRequestHandler\n if (Object.prototype.hasOwnProperty.call(this, 'customRequestHandler') && typeof this.customRequestHandler === 'function') {\n this.customRequestHandler(request);\n }\n },\n\n /**\n * Event recording metrics for a whole API call.\n * @returns {object} a subset of api call metrics\n * @api private\n */\n apiCallEvent: function apiCallEvent(request) {\n var api = request.service.api.operations[request.operation];\n var monitoringEvent = {\n Type: 'ApiCall',\n Api: api ? api.name : request.operation,\n Version: 1,\n Service: request.service.api.serviceId || request.service.api.endpointPrefix,\n Region: request.httpRequest.region,\n MaxRetriesExceeded: 0,\n UserAgent: request.httpRequest.getUserAgent(),\n };\n var response = request.response;\n if (response.httpResponse.statusCode) {\n monitoringEvent.FinalHttpStatusCode = response.httpResponse.statusCode;\n }\n if (response.error) {\n var error = response.error;\n var statusCode = response.httpResponse.statusCode;\n if (statusCode > 299) {\n if (error.code) monitoringEvent.FinalAwsException = error.code;\n if (error.message) monitoringEvent.FinalAwsExceptionMessage = error.message;\n } else {\n if (error.code || error.name) monitoringEvent.FinalSdkException = error.code || error.name;\n if (error.message) monitoringEvent.FinalSdkExceptionMessage = error.message;\n }\n }\n return monitoringEvent;\n },\n\n /**\n * Event recording metrics for an API call attempt.\n * @returns {object} a subset of api call attempt metrics\n * @api private\n */\n apiAttemptEvent: function apiAttemptEvent(request) {\n var api = request.service.api.operations[request.operation];\n var monitoringEvent = {\n Type: 'ApiCallAttempt',\n Api: api ? api.name : request.operation,\n Version: 1,\n Service: request.service.api.serviceId || request.service.api.endpointPrefix,\n Fqdn: request.httpRequest.endpoint.hostname,\n UserAgent: request.httpRequest.getUserAgent(),\n };\n var response = request.response;\n if (response.httpResponse.statusCode) {\n monitoringEvent.HttpStatusCode = response.httpResponse.statusCode;\n }\n if (\n !request._unAuthenticated &&\n request.service.config.credentials &&\n request.service.config.credentials.accessKeyId\n ) {\n monitoringEvent.AccessKey = request.service.config.credentials.accessKeyId;\n }\n if (!response.httpResponse.headers) return monitoringEvent;\n if (request.httpRequest.headers['x-amz-security-token']) {\n monitoringEvent.SessionToken = request.httpRequest.headers['x-amz-security-token'];\n }\n if (response.httpResponse.headers['x-amzn-requestid']) {\n monitoringEvent.XAmznRequestId = response.httpResponse.headers['x-amzn-requestid'];\n }\n if (response.httpResponse.headers['x-amz-request-id']) {\n monitoringEvent.XAmzRequestId = response.httpResponse.headers['x-amz-request-id'];\n }\n if (response.httpResponse.headers['x-amz-id-2']) {\n monitoringEvent.XAmzId2 = response.httpResponse.headers['x-amz-id-2'];\n }\n return monitoringEvent;\n },\n\n /**\n * Add metrics of failed request.\n * @api private\n */\n attemptFailEvent: function attemptFailEvent(request) {\n var monitoringEvent = this.apiAttemptEvent(request);\n var response = request.response;\n var error = response.error;\n if (response.httpResponse.statusCode > 299 ) {\n if (error.code) monitoringEvent.AwsException = error.code;\n if (error.message) monitoringEvent.AwsExceptionMessage = error.message;\n } else {\n if (error.code || error.name) monitoringEvent.SdkException = error.code || error.name;\n if (error.message) monitoringEvent.SdkExceptionMessage = error.message;\n }\n return monitoringEvent;\n },\n\n /**\n * Attach listeners to request object to fetch metrics of each request\n * and emit data object through \\'ApiCall\\' and \\'ApiCallAttempt\\' events.\n * @api private\n */\n attachMonitoringEmitter: function attachMonitoringEmitter(request) {\n var attemptTimestamp; //timestamp marking the beginning of a request attempt\n var attemptStartRealTime; //Start time of request attempt. Used to calculating attemptLatency\n var attemptLatency; //latency from request sent out to http response reaching SDK\n var callStartRealTime; //Start time of API call. Used to calculating API call latency\n var attemptCount = 0; //request.retryCount is not reliable here\n var region; //region cache region for each attempt since it can be updated in plase (e.g. s3)\n var callTimestamp; //timestamp when the request is created\n var self = this;\n var addToHead = true;\n\n request.on('validate', function () {\n callStartRealTime = AWS.util.realClock.now();\n callTimestamp = Date.now();\n }, addToHead);\n request.on('sign', function () {\n attemptStartRealTime = AWS.util.realClock.now();\n attemptTimestamp = Date.now();\n region = request.httpRequest.region;\n attemptCount++;\n }, addToHead);\n request.on('validateResponse', function() {\n attemptLatency = Math.round(AWS.util.realClock.now() - attemptStartRealTime);\n });\n request.addNamedListener('API_CALL_ATTEMPT', 'success', function API_CALL_ATTEMPT() {\n var apiAttemptEvent = self.apiAttemptEvent(request);\n apiAttemptEvent.Timestamp = attemptTimestamp;\n apiAttemptEvent.AttemptLatency = attemptLatency >= 0 ? attemptLatency : 0;\n apiAttemptEvent.Region = region;\n self.emit('apiCallAttempt', [apiAttemptEvent]);\n });\n request.addNamedListener('API_CALL_ATTEMPT_RETRY', 'retry', function API_CALL_ATTEMPT_RETRY() {\n var apiAttemptEvent = self.attemptFailEvent(request);\n apiAttemptEvent.Timestamp = attemptTimestamp;\n //attemptLatency may not be available if fail before response\n attemptLatency = attemptLatency ||\n Math.round(AWS.util.realClock.now() - attemptStartRealTime);\n apiAttemptEvent.AttemptLatency = attemptLatency >= 0 ? attemptLatency : 0;\n apiAttemptEvent.Region = region;\n self.emit('apiCallAttempt', [apiAttemptEvent]);\n });\n request.addNamedListener('API_CALL', 'complete', function API_CALL() {\n var apiCallEvent = self.apiCallEvent(request);\n apiCallEvent.AttemptCount = attemptCount;\n if (apiCallEvent.AttemptCount <= 0) return;\n apiCallEvent.Timestamp = callTimestamp;\n var latency = Math.round(AWS.util.realClock.now() - callStartRealTime);\n apiCallEvent.Latency = latency >= 0 ? latency : 0;\n var response = request.response;\n if (\n response.error &&\n response.error.retryable &&\n typeof response.retryCount === 'number' &&\n typeof response.maxRetries === 'number' &&\n (response.retryCount >= response.maxRetries)\n ) {\n apiCallEvent.MaxRetriesExceeded = 1;\n }\n self.emit('apiCall', [apiCallEvent]);\n });\n },\n\n /**\n * Override this method to setup any custom request listeners for each\n * new request to the service.\n *\n * @method_abstract This is an abstract method.\n */\n setupRequestListeners: function setupRequestListeners(request) {\n },\n\n /**\n * Gets the signing name for a given request\n * @api private\n */\n getSigningName: function getSigningName() {\n return this.api.signingName || this.api.endpointPrefix;\n },\n\n /**\n * Gets the signer class for a given request\n * @api private\n */\n getSignerClass: function getSignerClass(request) {\n var version;\n // get operation authtype if present\n var operation = null;\n var authtype = '';\n if (request) {\n var operations = request.service.api.operations || {};\n operation = operations[request.operation] || null;\n authtype = operation ? operation.authtype : '';\n }\n if (this.config.signatureVersion) {\n version = this.config.signatureVersion;\n } else if (authtype === 'v4' || authtype === 'v4-unsigned-body') {\n version = 'v4';\n } else {\n version = this.api.signatureVersion;\n }\n return AWS.Signers.RequestSigner.getVersion(version);\n },\n\n /**\n * @api private\n */\n serviceInterface: function serviceInterface() {\n switch (this.api.protocol) {\n case 'ec2': return AWS.EventListeners.Query;\n case 'query': return AWS.EventListeners.Query;\n case 'json': return AWS.EventListeners.Json;\n case 'rest-json': return AWS.EventListeners.RestJson;\n case 'rest-xml': return AWS.EventListeners.RestXml;\n }\n if (this.api.protocol) {\n throw new Error('Invalid service `protocol\\' ' +\n this.api.protocol + ' in API config');\n }\n },\n\n /**\n * @api private\n */\n successfulResponse: function successfulResponse(resp) {\n return resp.httpResponse.statusCode < 300;\n },\n\n /**\n * How many times a failed request should be retried before giving up.\n * the defaultRetryCount can be overriden by service classes.\n *\n * @api private\n */\n numRetries: function numRetries() {\n if (this.config.maxRetries !== undefined) {\n return this.config.maxRetries;\n } else {\n return this.defaultRetryCount;\n }\n },\n\n /**\n * @api private\n */\n retryDelays: function retryDelays(retryCount, err) {\n return AWS.util.calculateRetryDelay(retryCount, this.config.retryDelayOptions, err);\n },\n\n /**\n * @api private\n */\n retryableError: function retryableError(error) {\n if (this.timeoutError(error)) return true;\n if (this.networkingError(error)) return true;\n if (this.expiredCredentialsError(error)) return true;\n if (this.throttledError(error)) return true;\n if (error.statusCode >= 500) return true;\n return false;\n },\n\n /**\n * @api private\n */\n networkingError: function networkingError(error) {\n return error.code === 'NetworkingError';\n },\n\n /**\n * @api private\n */\n timeoutError: function timeoutError(error) {\n return error.code === 'TimeoutError';\n },\n\n /**\n * @api private\n */\n expiredCredentialsError: function expiredCredentialsError(error) {\n // TODO : this only handles *one* of the expired credential codes\n return (error.code === 'ExpiredTokenException');\n },\n\n /**\n * @api private\n */\n clockSkewError: function clockSkewError(error) {\n switch (error.code) {\n case 'RequestTimeTooSkewed':\n case 'RequestExpired':\n case 'InvalidSignatureException':\n case 'SignatureDoesNotMatch':\n case 'AuthFailure':\n case 'RequestInTheFuture':\n return true;\n default: return false;\n }\n },\n\n /**\n * @api private\n */\n getSkewCorrectedDate: function getSkewCorrectedDate() {\n return new Date(Date.now() + this.config.systemClockOffset);\n },\n\n /**\n * @api private\n */\n applyClockOffset: function applyClockOffset(newServerTime) {\n if (newServerTime) {\n this.config.systemClockOffset = newServerTime - Date.now();\n }\n },\n\n /**\n * @api private\n */\n isClockSkewed: function isClockSkewed(newServerTime) {\n if (newServerTime) {\n return Math.abs(this.getSkewCorrectedDate().getTime() - newServerTime) >= 300000;\n }\n },\n\n /**\n * @api private\n */\n throttledError: function throttledError(error) {\n // this logic varies between services\n if (error.statusCode === 429) return true;\n switch (error.code) {\n case 'ProvisionedThroughputExceededException':\n case 'Throttling':\n case 'ThrottlingException':\n case 'RequestLimitExceeded':\n case 'RequestThrottled':\n case 'RequestThrottledException':\n case 'TooManyRequestsException':\n case 'TransactionInProgressException': //dynamodb\n case 'EC2ThrottledException':\n return true;\n default:\n return false;\n }\n },\n\n /**\n * @api private\n */\n endpointFromTemplate: function endpointFromTemplate(endpoint) {\n if (typeof endpoint !== 'string') return endpoint;\n\n var e = endpoint;\n e = e.replace(/\\{service\\}/g, this.api.endpointPrefix);\n e = e.replace(/\\{region\\}/g, this.config.region);\n e = e.replace(/\\{scheme\\}/g, this.config.sslEnabled ? 'https' : 'http');\n return e;\n },\n\n /**\n * @api private\n */\n setEndpoint: function setEndpoint(endpoint) {\n this.endpoint = new AWS.Endpoint(endpoint, this.config);\n },\n\n /**\n * @api private\n */\n paginationConfig: function paginationConfig(operation, throwException) {\n var paginator = this.api.operations[operation].paginator;\n if (!paginator) {\n if (throwException) {\n var e = new Error();\n throw AWS.util.error(e, 'No pagination configuration for ' + operation);\n }\n return null;\n }\n\n return paginator;\n }\n});\n\nAWS.util.update(AWS.Service, {\n\n /**\n * Adds one method for each operation described in the api configuration\n *\n * @api private\n */\n defineMethods: function defineMethods(svc) {\n AWS.util.each(svc.prototype.api.operations, function iterator(method) {\n if (svc.prototype[method]) return;\n var operation = svc.prototype.api.operations[method];\n if (operation.authtype === 'none') {\n svc.prototype[method] = function (params, callback) {\n return this.makeUnauthenticatedRequest(method, params, callback);\n };\n } else {\n svc.prototype[method] = function (params, callback) {\n return this.makeRequest(method, params, callback);\n };\n }\n });\n },\n\n /**\n * Defines a new Service class using a service identifier and list of versions\n * including an optional set of features (functions) to apply to the class\n * prototype.\n *\n * @param serviceIdentifier [String] the identifier for the service\n * @param versions [Array] a list of versions that work with this\n * service\n * @param features [Object] an object to attach to the prototype\n * @return [Class] the service class defined by this function.\n */\n defineService: function defineService(serviceIdentifier, versions, features) {\n AWS.Service._serviceMap[serviceIdentifier] = true;\n if (!Array.isArray(versions)) {\n features = versions;\n versions = [];\n }\n\n var svc = inherit(AWS.Service, features || {});\n\n if (typeof serviceIdentifier === 'string') {\n AWS.Service.addVersions(svc, versions);\n\n var identifier = svc.serviceIdentifier || serviceIdentifier;\n svc.serviceIdentifier = identifier;\n } else { // defineService called with an API\n svc.prototype.api = serviceIdentifier;\n AWS.Service.defineMethods(svc);\n }\n AWS.SequentialExecutor.call(this.prototype);\n //util.clientSideMonitoring is only available in node\n if (!this.prototype.publisher && AWS.util.clientSideMonitoring) {\n var Publisher = AWS.util.clientSideMonitoring.Publisher;\n var configProvider = AWS.util.clientSideMonitoring.configProvider;\n var publisherConfig = configProvider();\n this.prototype.publisher = new Publisher(publisherConfig);\n if (publisherConfig.enabled) {\n //if csm is enabled in environment, SDK should send all metrics\n AWS.Service._clientSideMonitoring = true;\n }\n }\n AWS.SequentialExecutor.call(svc.prototype);\n AWS.Service.addDefaultMonitoringListeners(svc.prototype);\n return svc;\n },\n\n /**\n * @api private\n */\n addVersions: function addVersions(svc, versions) {\n if (!Array.isArray(versions)) versions = [versions];\n\n svc.services = svc.services || {};\n for (var i = 0; i < versions.length; i++) {\n if (svc.services[versions[i]] === undefined) {\n svc.services[versions[i]] = null;\n }\n }\n\n svc.apiVersions = Object.keys(svc.services).sort();\n },\n\n /**\n * @api private\n */\n defineServiceApi: function defineServiceApi(superclass, version, apiConfig) {\n var svc = inherit(superclass, {\n serviceIdentifier: superclass.serviceIdentifier\n });\n\n function setApi(api) {\n if (api.isApi) {\n svc.prototype.api = api;\n } else {\n svc.prototype.api = new Api(api, {\n serviceIdentifier: superclass.serviceIdentifier\n });\n }\n }\n\n if (typeof version === 'string') {\n if (apiConfig) {\n setApi(apiConfig);\n } else {\n try {\n setApi(AWS.apiLoader(superclass.serviceIdentifier, version));\n } catch (err) {\n throw AWS.util.error(err, {\n message: 'Could not find API configuration ' +\n superclass.serviceIdentifier + '-' + version\n });\n }\n }\n if (!Object.prototype.hasOwnProperty.call(superclass.services, version)) {\n superclass.apiVersions = superclass.apiVersions.concat(version).sort();\n }\n superclass.services[version] = svc;\n } else {\n setApi(version);\n }\n\n AWS.Service.defineMethods(svc);\n return svc;\n },\n\n /**\n * @api private\n */\n hasService: function(identifier) {\n return Object.prototype.hasOwnProperty.call(AWS.Service._serviceMap, identifier);\n },\n\n /**\n * @param attachOn attach default monitoring listeners to object\n *\n * Each monitoring event should be emitted from service client to service constructor prototype and then\n * to global service prototype like bubbling up. These default monitoring events listener will transfer\n * the monitoring events to the upper layer.\n * @api private\n */\n addDefaultMonitoringListeners: function addDefaultMonitoringListeners(attachOn) {\n attachOn.addNamedListener('MONITOR_EVENTS_BUBBLE', 'apiCallAttempt', function EVENTS_BUBBLE(event) {\n var baseClass = Object.getPrototypeOf(attachOn);\n if (baseClass._events) baseClass.emit('apiCallAttempt', [event]);\n });\n attachOn.addNamedListener('CALL_EVENTS_BUBBLE', 'apiCall', function CALL_EVENTS_BUBBLE(event) {\n var baseClass = Object.getPrototypeOf(attachOn);\n if (baseClass._events) baseClass.emit('apiCall', [event]);\n });\n },\n\n /**\n * @api private\n */\n _serviceMap: {}\n});\n\nAWS.util.mixin(AWS.Service, AWS.SequentialExecutor);\n\n/**\n * @api private\n */\nmodule.exports = AWS.Service;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['cognitoidentityserviceprovider'] = {};\nAWS.CognitoIdentityServiceProvider = Service.defineService('cognitoidentityserviceprovider', ['2016-04-18']);\nObject.defineProperty(apiLoader.services['cognitoidentityserviceprovider'], '2016-04-18', {\n get: function get() {\n var model = require('../apis/cognito-idp-2016-04-18.min.json');\n model.paginators = require('../apis/cognito-idp-2016-04-18.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.CognitoIdentityServiceProvider;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['rds'] = {};\nAWS.RDS = Service.defineService('rds', ['2013-01-10', '2013-02-12', '2013-09-09', '2014-09-01', '2014-09-01*', '2014-10-31']);\nrequire('../lib/services/rds');\nObject.defineProperty(apiLoader.services['rds'], '2013-01-10', {\n get: function get() {\n var model = require('../apis/rds-2013-01-10.min.json');\n model.paginators = require('../apis/rds-2013-01-10.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\nObject.defineProperty(apiLoader.services['rds'], '2013-02-12', {\n get: function get() {\n var model = require('../apis/rds-2013-02-12.min.json');\n model.paginators = require('../apis/rds-2013-02-12.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\nObject.defineProperty(apiLoader.services['rds'], '2013-09-09', {\n get: function get() {\n var model = require('../apis/rds-2013-09-09.min.json');\n model.paginators = require('../apis/rds-2013-09-09.paginators.json').pagination;\n model.waiters = require('../apis/rds-2013-09-09.waiters2.json').waiters;\n return model;\n },\n enumerable: true,\n configurable: true\n});\nObject.defineProperty(apiLoader.services['rds'], '2014-09-01', {\n get: function get() {\n var model = require('../apis/rds-2014-09-01.min.json');\n model.paginators = require('../apis/rds-2014-09-01.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\nObject.defineProperty(apiLoader.services['rds'], '2014-10-31', {\n get: function get() {\n var model = require('../apis/rds-2014-10-31.min.json');\n model.paginators = require('../apis/rds-2014-10-31.paginators.json').pagination;\n model.waiters = require('../apis/rds-2014-10-31.waiters2.json').waiters;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.RDS;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['cognitoidentity'] = {};\nAWS.CognitoIdentity = Service.defineService('cognitoidentity', ['2014-06-30']);\nObject.defineProperty(apiLoader.services['cognitoidentity'], '2014-06-30', {\n get: function get() {\n var model = require('../apis/cognito-identity-2014-06-30.min.json');\n model.paginators = require('../apis/cognito-identity-2014-06-30.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.CognitoIdentity;\n","var util = require('../util');\nvar AWS = require('../core');\n\n/**\n * Prepend prefix defined by API model to endpoint that's already\n * constructed. This feature does not apply to operations using\n * endpoint discovery and can be disabled.\n * @api private\n */\nfunction populateHostPrefix(request) {\n var enabled = request.service.config.hostPrefixEnabled;\n if (!enabled) return request;\n var operationModel = request.service.api.operations[request.operation];\n //don't marshal host prefix when operation has endpoint discovery traits\n if (hasEndpointDiscover(request)) return request;\n if (operationModel.endpoint && operationModel.endpoint.hostPrefix) {\n var hostPrefixNotation = operationModel.endpoint.hostPrefix;\n var hostPrefix = expandHostPrefix(hostPrefixNotation, request.params, operationModel.input);\n prependEndpointPrefix(request.httpRequest.endpoint, hostPrefix);\n validateHostname(request.httpRequest.endpoint.hostname);\n }\n return request;\n}\n\n/**\n * @api private\n */\nfunction hasEndpointDiscover(request) {\n var api = request.service.api;\n var operationModel = api.operations[request.operation];\n var isEndpointOperation = api.endpointOperation && (api.endpointOperation === util.string.lowerFirst(operationModel.name));\n return (operationModel.endpointDiscoveryRequired !== 'NULL' || isEndpointOperation === true);\n}\n\n/**\n * @api private\n */\nfunction expandHostPrefix(hostPrefixNotation, params, shape) {\n util.each(shape.members, function(name, member) {\n if (member.hostLabel === true) {\n if (typeof params[name] !== 'string' || params[name] === '') {\n throw util.error(new Error(), {\n message: 'Parameter ' + name + ' should be a non-empty string.',\n code: 'InvalidParameter'\n });\n }\n var regex = new RegExp('\\\\{' + name + '\\\\}', 'g');\n hostPrefixNotation = hostPrefixNotation.replace(regex, params[name]);\n }\n });\n return hostPrefixNotation;\n}\n\n/**\n * @api private\n */\nfunction prependEndpointPrefix(endpoint, prefix) {\n if (endpoint.host) {\n endpoint.host = prefix + endpoint.host;\n }\n if (endpoint.hostname) {\n endpoint.hostname = prefix + endpoint.hostname;\n }\n}\n\n/**\n * @api private\n */\nfunction validateHostname(hostname) {\n var labels = hostname.split('.');\n //Reference: https://tools.ietf.org/html/rfc1123#section-2\n var hostPattern = /^[a-zA-Z0-9]{1}$|^[a-zA-Z0-9][a-zA-Z0-9\\-]*[a-zA-Z0-9]$/;\n util.arrayEach(labels, function(label) {\n if (!label.length || label.length < 1 || label.length > 63) {\n throw util.error(new Error(), {\n code: 'ValidationError',\n message: 'Hostname label length should be between 1 to 63 characters, inclusive.'\n });\n }\n if (!hostPattern.test(label)) {\n throw AWS.util.error(new Error(),\n {code: 'ValidationError', message: label + ' is not hostname compatible.'});\n }\n });\n}\n\nmodule.exports = {\n populateHostPrefix: populateHostPrefix\n};\n","import { Storage, Auth } from \"aws-amplify\";\nimport Aws from \"aws-sdk\";\nexport class s3helper {\n constructor() {}\n\n static generateS3Key(filename) {\n let file = `${Date.now()}-${filename}`;\n file = file.replace(/\\s/g, \"\");\n return file;\n }\n\n async gets3Image(key) {\n Aws.config.update({\n accessKeyId: process.env.VUE_APP_AWS_ACCESS_KEY,\n secretAccessKey: process.env.VUE_APP_AWS_SECRET_ACCESS_KEY,\n region: Auth._config.region,\n identityPoolId: Auth.userPool.userPoolId,\n });\n return new Promise((resolve, reject) => {\n Storage.get(key, {\n level: \"public\",\n }).then((result) => {\n resolve(result);\n });\n });\n }\n}\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['redshift'] = {};\nAWS.Redshift = Service.defineService('redshift', ['2012-12-01']);\nObject.defineProperty(apiLoader.services['redshift'], '2012-12-01', {\n get: function get() {\n var model = require('../apis/redshift-2012-12-01.min.json');\n model.paginators = require('../apis/redshift-2012-12-01.paginators.json').pagination;\n model.waiters = require('../apis/redshift-2012-12-01.waiters2.json').waiters;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.Redshift;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['lambda'] = {};\nAWS.Lambda = Service.defineService('lambda', ['2014-11-11', '2015-03-31']);\nrequire('../lib/services/lambda');\nObject.defineProperty(apiLoader.services['lambda'], '2014-11-11', {\n get: function get() {\n var model = require('../apis/lambda-2014-11-11.min.json');\n model.paginators = require('../apis/lambda-2014-11-11.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\nObject.defineProperty(apiLoader.services['lambda'], '2015-03-31', {\n get: function get() {\n var model = require('../apis/lambda-2015-03-31.min.json');\n model.paginators = require('../apis/lambda-2015-03-31.paginators.json').pagination;\n model.waiters = require('../apis/lambda-2015-03-31.waiters2.json').waiters;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.Lambda;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['secretsmanager'] = {};\nAWS.SecretsManager = Service.defineService('secretsmanager', ['2017-10-17']);\nObject.defineProperty(apiLoader.services['secretsmanager'], '2017-10-17', {\n get: function get() {\n var model = require('../apis/secretsmanager-2017-10-17.min.json');\n model.paginators = require('../apis/secretsmanager-2017-10-17.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.SecretsManager;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['ssm'] = {};\nAWS.SSM = Service.defineService('ssm', ['2014-11-06']);\nObject.defineProperty(apiLoader.services['ssm'], '2014-11-06', {\n get: function get() {\n var model = require('../apis/ssm-2014-11-06.min.json');\n model.paginators = require('../apis/ssm-2014-11-06.paginators.json').pagination;\n model.waiters = require('../apis/ssm-2014-11-06.waiters2.json').waiters;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.SSM;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['polly'] = {};\nAWS.Polly = Service.defineService('polly', ['2016-06-10']);\nrequire('../lib/services/polly');\nObject.defineProperty(apiLoader.services['polly'], '2016-06-10', {\n get: function get() {\n var model = require('../apis/polly-2016-06-10.min.json');\n model.paginators = require('../apis/polly-2016-06-10.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.Polly;\n","var AWS = require('../core');\n\nAWS.util.update(AWS.SQS.prototype, {\n /**\n * @api private\n */\n setupRequestListeners: function setupRequestListeners(request) {\n request.addListener('build', this.buildEndpoint);\n\n if (request.service.config.computeChecksums) {\n if (request.operation === 'sendMessage') {\n request.addListener('extractData', this.verifySendMessageChecksum);\n } else if (request.operation === 'sendMessageBatch') {\n request.addListener('extractData', this.verifySendMessageBatchChecksum);\n } else if (request.operation === 'receiveMessage') {\n request.addListener('extractData', this.verifyReceiveMessageChecksum);\n }\n }\n },\n\n /**\n * @api private\n */\n verifySendMessageChecksum: function verifySendMessageChecksum(response) {\n if (!response.data) return;\n\n var md5 = response.data.MD5OfMessageBody;\n var body = this.params.MessageBody;\n var calculatedMd5 = this.service.calculateChecksum(body);\n if (calculatedMd5 !== md5) {\n var msg = 'Got \"' + response.data.MD5OfMessageBody +\n '\", expecting \"' + calculatedMd5 + '\".';\n this.service.throwInvalidChecksumError(response,\n [response.data.MessageId], msg);\n }\n },\n\n /**\n * @api private\n */\n verifySendMessageBatchChecksum: function verifySendMessageBatchChecksum(response) {\n if (!response.data) return;\n\n var service = this.service;\n var entries = {};\n var errors = [];\n var messageIds = [];\n AWS.util.arrayEach(response.data.Successful, function (entry) {\n entries[entry.Id] = entry;\n });\n AWS.util.arrayEach(this.params.Entries, function (entry) {\n if (entries[entry.Id]) {\n var md5 = entries[entry.Id].MD5OfMessageBody;\n var body = entry.MessageBody;\n if (!service.isChecksumValid(md5, body)) {\n errors.push(entry.Id);\n messageIds.push(entries[entry.Id].MessageId);\n }\n }\n });\n\n if (errors.length > 0) {\n service.throwInvalidChecksumError(response, messageIds,\n 'Invalid messages: ' + errors.join(', '));\n }\n },\n\n /**\n * @api private\n */\n verifyReceiveMessageChecksum: function verifyReceiveMessageChecksum(response) {\n if (!response.data) return;\n\n var service = this.service;\n var messageIds = [];\n AWS.util.arrayEach(response.data.Messages, function(message) {\n var md5 = message.MD5OfBody;\n var body = message.Body;\n if (!service.isChecksumValid(md5, body)) {\n messageIds.push(message.MessageId);\n }\n });\n\n if (messageIds.length > 0) {\n service.throwInvalidChecksumError(response, messageIds,\n 'Invalid messages: ' + messageIds.join(', '));\n }\n },\n\n /**\n * @api private\n */\n throwInvalidChecksumError: function throwInvalidChecksumError(response, ids, message) {\n response.error = AWS.util.error(new Error(), {\n retryable: true,\n code: 'InvalidChecksum',\n messageIds: ids,\n message: response.request.operation +\n ' returned an invalid MD5 response. ' + message\n });\n },\n\n /**\n * @api private\n */\n isChecksumValid: function isChecksumValid(checksum, data) {\n return this.calculateChecksum(data) === checksum;\n },\n\n /**\n * @api private\n */\n calculateChecksum: function calculateChecksum(data) {\n return AWS.util.crypto.md5(data, 'hex');\n },\n\n /**\n * @api private\n */\n buildEndpoint: function buildEndpoint(request) {\n var url = request.httpRequest.params.QueueUrl;\n if (url) {\n request.httpRequest.endpoint = new AWS.Endpoint(url);\n\n // signature version 4 requires the region name to be set,\n // sqs queue urls contain the region name\n var matches = request.httpRequest.endpoint.host.match(/^sqs\\.(.+?)\\./);\n if (matches) request.httpRequest.region = matches[1];\n }\n }\n});\n","var util = require('./util');\n\n// browser specific modules\nutil.crypto.lib = require('./browserCryptoLib');\nutil.Buffer = require('buffer/').Buffer;\nutil.url = require('url/');\nutil.querystring = require('querystring/');\nutil.realClock = require('./realclock/browserClock');\nutil.environment = 'js';\nutil.createEventStream = require('./event-stream/buffered-create-event-stream').createEventStream;\nutil.isBrowser = function() { return true; };\nutil.isNode = function() { return false; };\n\nvar AWS = require('./core');\n\n/**\n * @api private\n */\nmodule.exports = AWS;\n\nrequire('./credentials');\nrequire('./credentials/credential_provider_chain');\nrequire('./credentials/temporary_credentials');\nrequire('./credentials/chainable_temporary_credentials');\nrequire('./credentials/web_identity_credentials');\nrequire('./credentials/cognito_identity_credentials');\nrequire('./credentials/saml_credentials');\n\n// Load the DOMParser XML parser\nAWS.XML.Parser = require('./xml/browser_parser');\n\n// Load the XHR HttpClient\nrequire('./http/xhr');\n\nif (typeof process === 'undefined') {\n var process = {\n browser: true\n };\n}\n","var util = require('../core').util;\nvar toBuffer = util.buffer.toBuffer;\n\n// All prelude components are unsigned, 32-bit integers\nvar PRELUDE_MEMBER_LENGTH = 4;\n// The prelude consists of two components\nvar PRELUDE_LENGTH = PRELUDE_MEMBER_LENGTH * 2;\n// Checksums are always CRC32 hashes.\nvar CHECKSUM_LENGTH = 4;\n// Messages must include a full prelude, a prelude checksum, and a message checksum\nvar MINIMUM_MESSAGE_LENGTH = PRELUDE_LENGTH + CHECKSUM_LENGTH * 2;\n\n/**\n * @api private\n *\n * @param {Buffer} message\n */\nfunction splitMessage(message) {\n if (!util.Buffer.isBuffer(message)) message = toBuffer(message);\n\n if (message.length < MINIMUM_MESSAGE_LENGTH) {\n throw new Error('Provided message too short to accommodate event stream message overhead');\n }\n\n if (message.length !== message.readUInt32BE(0)) {\n throw new Error('Reported message length does not match received message length');\n }\n\n var expectedPreludeChecksum = message.readUInt32BE(PRELUDE_LENGTH);\n\n if (\n expectedPreludeChecksum !== util.crypto.crc32(\n message.slice(0, PRELUDE_LENGTH)\n )\n ) {\n throw new Error(\n 'The prelude checksum specified in the message (' +\n expectedPreludeChecksum +\n ') does not match the calculated CRC32 checksum.'\n );\n }\n\n var expectedMessageChecksum = message.readUInt32BE(message.length - CHECKSUM_LENGTH);\n\n if (\n expectedMessageChecksum !== util.crypto.crc32(\n message.slice(0, message.length - CHECKSUM_LENGTH)\n )\n ) {\n throw new Error(\n 'The message checksum did not match the expected value of ' +\n expectedMessageChecksum\n );\n }\n\n var headersStart = PRELUDE_LENGTH + CHECKSUM_LENGTH;\n var headersEnd = headersStart + message.readUInt32BE(PRELUDE_MEMBER_LENGTH);\n\n return {\n headers: message.slice(headersStart, headersEnd),\n body: message.slice(headersEnd, message.length - CHECKSUM_LENGTH),\n };\n}\n\n/**\n * @api private\n */\nmodule.exports = {\n splitMessage: splitMessage\n};\n","/**\n * Escapes characters that can not be in an XML attribute.\n */\nfunction escapeAttribute(value) {\n return value.replace(/&/g, '&').replace(/'/g, ''').replace(//g, '>').replace(/\"/g, '"');\n}\n\n/**\n * @api private\n */\nmodule.exports = {\n escapeAttribute: escapeAttribute\n};\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['servicecatalog'] = {};\nAWS.ServiceCatalog = Service.defineService('servicecatalog', ['2015-12-10']);\nObject.defineProperty(apiLoader.services['servicecatalog'], '2015-12-10', {\n get: function get() {\n var model = require('../apis/servicecatalog-2015-12-10.min.json');\n model.paginators = require('../apis/servicecatalog-2015-12-10.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.ServiceCatalog;\n","var v1 = require('./v1');\nvar v4 = require('./v4');\n\nvar uuid = v4;\nuuid.v1 = v1;\nuuid.v4 = v4;\n\nmodule.exports = uuid;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['personalizeevents'] = {};\nAWS.PersonalizeEvents = Service.defineService('personalizeevents', ['2018-03-22']);\nObject.defineProperty(apiLoader.services['personalizeevents'], '2018-03-22', {\n get: function get() {\n var model = require('../apis/personalize-events-2018-03-22.min.json');\n model.paginators = require('../apis/personalize-events-2018-03-22.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.PersonalizeEvents;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['dynamodb'] = {};\nAWS.DynamoDB = Service.defineService('dynamodb', ['2011-12-05', '2012-08-10']);\nrequire('../lib/services/dynamodb');\nObject.defineProperty(apiLoader.services['dynamodb'], '2011-12-05', {\n get: function get() {\n var model = require('../apis/dynamodb-2011-12-05.min.json');\n model.paginators = require('../apis/dynamodb-2011-12-05.paginators.json').pagination;\n model.waiters = require('../apis/dynamodb-2011-12-05.waiters2.json').waiters;\n return model;\n },\n enumerable: true,\n configurable: true\n});\nObject.defineProperty(apiLoader.services['dynamodb'], '2012-08-10', {\n get: function get() {\n var model = require('../apis/dynamodb-2012-08-10.min.json');\n model.paginators = require('../apis/dynamodb-2012-08-10.paginators.json').pagination;\n model.waiters = require('../apis/dynamodb-2012-08-10.waiters2.json').waiters;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.DynamoDB;\n","var Collection = require('./collection');\n\nvar util = require('../util');\n\nfunction property(obj, name, value) {\n if (value !== null && value !== undefined) {\n util.property.apply(this, arguments);\n }\n}\n\nfunction memoizedProperty(obj, name) {\n if (!obj.constructor.prototype[name]) {\n util.memoizedProperty.apply(this, arguments);\n }\n}\n\nfunction Shape(shape, options, memberName) {\n options = options || {};\n\n property(this, 'shape', shape.shape);\n property(this, 'api', options.api, false);\n property(this, 'type', shape.type);\n property(this, 'enum', shape.enum);\n property(this, 'min', shape.min);\n property(this, 'max', shape.max);\n property(this, 'pattern', shape.pattern);\n property(this, 'location', shape.location || this.location || 'body');\n property(this, 'name', this.name || shape.xmlName || shape.queryName ||\n shape.locationName || memberName);\n property(this, 'isStreaming', shape.streaming || this.isStreaming || false);\n property(this, 'requiresLength', shape.requiresLength, false);\n property(this, 'isComposite', shape.isComposite || false);\n property(this, 'isShape', true, false);\n property(this, 'isQueryName', Boolean(shape.queryName), false);\n property(this, 'isLocationName', Boolean(shape.locationName), false);\n property(this, 'isIdempotent', shape.idempotencyToken === true);\n property(this, 'isJsonValue', shape.jsonvalue === true);\n property(this, 'isSensitive', shape.sensitive === true || shape.prototype && shape.prototype.sensitive === true);\n property(this, 'isEventStream', Boolean(shape.eventstream), false);\n property(this, 'isEvent', Boolean(shape.event), false);\n property(this, 'isEventPayload', Boolean(shape.eventpayload), false);\n property(this, 'isEventHeader', Boolean(shape.eventheader), false);\n property(this, 'isTimestampFormatSet', Boolean(shape.timestampFormat) || shape.prototype && shape.prototype.isTimestampFormatSet === true, false);\n property(this, 'endpointDiscoveryId', Boolean(shape.endpointdiscoveryid), false);\n property(this, 'hostLabel', Boolean(shape.hostLabel), false);\n\n if (options.documentation) {\n property(this, 'documentation', shape.documentation);\n property(this, 'documentationUrl', shape.documentationUrl);\n }\n\n if (shape.xmlAttribute) {\n property(this, 'isXmlAttribute', shape.xmlAttribute || false);\n }\n\n // type conversion and parsing\n property(this, 'defaultValue', null);\n this.toWireFormat = function(value) {\n if (value === null || value === undefined) return '';\n return value;\n };\n this.toType = function(value) { return value; };\n}\n\n/**\n * @api private\n */\nShape.normalizedTypes = {\n character: 'string',\n double: 'float',\n long: 'integer',\n short: 'integer',\n biginteger: 'integer',\n bigdecimal: 'float',\n blob: 'binary'\n};\n\n/**\n * @api private\n */\nShape.types = {\n 'structure': StructureShape,\n 'list': ListShape,\n 'map': MapShape,\n 'boolean': BooleanShape,\n 'timestamp': TimestampShape,\n 'float': FloatShape,\n 'integer': IntegerShape,\n 'string': StringShape,\n 'base64': Base64Shape,\n 'binary': BinaryShape\n};\n\nShape.resolve = function resolve(shape, options) {\n if (shape.shape) {\n var refShape = options.api.shapes[shape.shape];\n if (!refShape) {\n throw new Error('Cannot find shape reference: ' + shape.shape);\n }\n\n return refShape;\n } else {\n return null;\n }\n};\n\nShape.create = function create(shape, options, memberName) {\n if (shape.isShape) return shape;\n\n var refShape = Shape.resolve(shape, options);\n if (refShape) {\n var filteredKeys = Object.keys(shape);\n if (!options.documentation) {\n filteredKeys = filteredKeys.filter(function(name) {\n return !name.match(/documentation/);\n });\n }\n\n // create an inline shape with extra members\n var InlineShape = function() {\n refShape.constructor.call(this, shape, options, memberName);\n };\n InlineShape.prototype = refShape;\n return new InlineShape();\n } else {\n // set type if not set\n if (!shape.type) {\n if (shape.members) shape.type = 'structure';\n else if (shape.member) shape.type = 'list';\n else if (shape.key) shape.type = 'map';\n else shape.type = 'string';\n }\n\n // normalize types\n var origType = shape.type;\n if (Shape.normalizedTypes[shape.type]) {\n shape.type = Shape.normalizedTypes[shape.type];\n }\n\n if (Shape.types[shape.type]) {\n return new Shape.types[shape.type](shape, options, memberName);\n } else {\n throw new Error('Unrecognized shape type: ' + origType);\n }\n }\n};\n\nfunction CompositeShape(shape) {\n Shape.apply(this, arguments);\n property(this, 'isComposite', true);\n\n if (shape.flattened) {\n property(this, 'flattened', shape.flattened || false);\n }\n}\n\nfunction StructureShape(shape, options) {\n var self = this;\n var requiredMap = null, firstInit = !this.isShape;\n\n CompositeShape.apply(this, arguments);\n\n if (firstInit) {\n property(this, 'defaultValue', function() { return {}; });\n property(this, 'members', {});\n property(this, 'memberNames', []);\n property(this, 'required', []);\n property(this, 'isRequired', function() { return false; });\n }\n\n if (shape.members) {\n property(this, 'members', new Collection(shape.members, options, function(name, member) {\n return Shape.create(member, options, name);\n }));\n memoizedProperty(this, 'memberNames', function() {\n return shape.xmlOrder || Object.keys(shape.members);\n });\n\n if (shape.event) {\n memoizedProperty(this, 'eventPayloadMemberName', function() {\n var members = self.members;\n var memberNames = self.memberNames;\n // iterate over members to find ones that are event payloads\n for (var i = 0, iLen = memberNames.length; i < iLen; i++) {\n if (members[memberNames[i]].isEventPayload) {\n return memberNames[i];\n }\n }\n });\n\n memoizedProperty(this, 'eventHeaderMemberNames', function() {\n var members = self.members;\n var memberNames = self.memberNames;\n var eventHeaderMemberNames = [];\n // iterate over members to find ones that are event headers\n for (var i = 0, iLen = memberNames.length; i < iLen; i++) {\n if (members[memberNames[i]].isEventHeader) {\n eventHeaderMemberNames.push(memberNames[i]);\n }\n }\n return eventHeaderMemberNames;\n });\n }\n }\n\n if (shape.required) {\n property(this, 'required', shape.required);\n property(this, 'isRequired', function(name) {\n if (!requiredMap) {\n requiredMap = {};\n for (var i = 0; i < shape.required.length; i++) {\n requiredMap[shape.required[i]] = true;\n }\n }\n\n return requiredMap[name];\n }, false, true);\n }\n\n property(this, 'resultWrapper', shape.resultWrapper || null);\n\n if (shape.payload) {\n property(this, 'payload', shape.payload);\n }\n\n if (typeof shape.xmlNamespace === 'string') {\n property(this, 'xmlNamespaceUri', shape.xmlNamespace);\n } else if (typeof shape.xmlNamespace === 'object') {\n property(this, 'xmlNamespacePrefix', shape.xmlNamespace.prefix);\n property(this, 'xmlNamespaceUri', shape.xmlNamespace.uri);\n }\n}\n\nfunction ListShape(shape, options) {\n var self = this, firstInit = !this.isShape;\n CompositeShape.apply(this, arguments);\n\n if (firstInit) {\n property(this, 'defaultValue', function() { return []; });\n }\n\n if (shape.member) {\n memoizedProperty(this, 'member', function() {\n return Shape.create(shape.member, options);\n });\n }\n\n if (this.flattened) {\n var oldName = this.name;\n memoizedProperty(this, 'name', function() {\n return self.member.name || oldName;\n });\n }\n}\n\nfunction MapShape(shape, options) {\n var firstInit = !this.isShape;\n CompositeShape.apply(this, arguments);\n\n if (firstInit) {\n property(this, 'defaultValue', function() { return {}; });\n property(this, 'key', Shape.create({type: 'string'}, options));\n property(this, 'value', Shape.create({type: 'string'}, options));\n }\n\n if (shape.key) {\n memoizedProperty(this, 'key', function() {\n return Shape.create(shape.key, options);\n });\n }\n if (shape.value) {\n memoizedProperty(this, 'value', function() {\n return Shape.create(shape.value, options);\n });\n }\n}\n\nfunction TimestampShape(shape) {\n var self = this;\n Shape.apply(this, arguments);\n\n if (shape.timestampFormat) {\n property(this, 'timestampFormat', shape.timestampFormat);\n } else if (self.isTimestampFormatSet && this.timestampFormat) {\n property(this, 'timestampFormat', this.timestampFormat);\n } else if (this.location === 'header') {\n property(this, 'timestampFormat', 'rfc822');\n } else if (this.location === 'querystring') {\n property(this, 'timestampFormat', 'iso8601');\n } else if (this.api) {\n switch (this.api.protocol) {\n case 'json':\n case 'rest-json':\n property(this, 'timestampFormat', 'unixTimestamp');\n break;\n case 'rest-xml':\n case 'query':\n case 'ec2':\n property(this, 'timestampFormat', 'iso8601');\n break;\n }\n }\n\n this.toType = function(value) {\n if (value === null || value === undefined) return null;\n if (typeof value.toUTCString === 'function') return value;\n return typeof value === 'string' || typeof value === 'number' ?\n util.date.parseTimestamp(value) : null;\n };\n\n this.toWireFormat = function(value) {\n return util.date.format(value, self.timestampFormat);\n };\n}\n\nfunction StringShape() {\n Shape.apply(this, arguments);\n\n var nullLessProtocols = ['rest-xml', 'query', 'ec2'];\n this.toType = function(value) {\n value = this.api && nullLessProtocols.indexOf(this.api.protocol) > -1 ?\n value || '' : value;\n if (this.isJsonValue) {\n return JSON.parse(value);\n }\n\n return value && typeof value.toString === 'function' ?\n value.toString() : value;\n };\n\n this.toWireFormat = function(value) {\n return this.isJsonValue ? JSON.stringify(value) : value;\n };\n}\n\nfunction FloatShape() {\n Shape.apply(this, arguments);\n\n this.toType = function(value) {\n if (value === null || value === undefined) return null;\n return parseFloat(value);\n };\n this.toWireFormat = this.toType;\n}\n\nfunction IntegerShape() {\n Shape.apply(this, arguments);\n\n this.toType = function(value) {\n if (value === null || value === undefined) return null;\n return parseInt(value, 10);\n };\n this.toWireFormat = this.toType;\n}\n\nfunction BinaryShape() {\n Shape.apply(this, arguments);\n this.toType = function(value) {\n var buf = util.base64.decode(value);\n if (this.isSensitive && util.isNode() && typeof util.Buffer.alloc === 'function') {\n /* Node.js can create a Buffer that is not isolated.\n * i.e. buf.byteLength !== buf.buffer.byteLength\n * This means that the sensitive data is accessible to anyone with access to buf.buffer.\n * If this is the node shared Buffer, then other code within this process _could_ find this secret.\n * Copy sensitive data to an isolated Buffer and zero the sensitive data.\n * While this is safe to do here, copying this code somewhere else may produce unexpected results.\n */\n var secureBuf = util.Buffer.alloc(buf.length, buf);\n buf.fill(0);\n buf = secureBuf;\n }\n return buf;\n };\n this.toWireFormat = util.base64.encode;\n}\n\nfunction Base64Shape() {\n BinaryShape.apply(this, arguments);\n}\n\nfunction BooleanShape() {\n Shape.apply(this, arguments);\n\n this.toType = function(value) {\n if (typeof value === 'boolean') return value;\n if (value === null || value === undefined) return null;\n return value === 'true';\n };\n}\n\n/**\n * @api private\n */\nShape.shapes = {\n StructureShape: StructureShape,\n ListShape: ListShape,\n MapShape: MapShape,\n StringShape: StringShape,\n BooleanShape: BooleanShape,\n Base64Shape: Base64Shape\n};\n\n/**\n * @api private\n */\nmodule.exports = Shape;\n","var util = require('../core').util;\nvar toBuffer = util.buffer.toBuffer;\n\n/**\n * A lossless representation of a signed, 64-bit integer. Instances of this\n * class may be used in arithmetic expressions as if they were numeric\n * primitives, but the binary representation will be preserved unchanged as the\n * `bytes` property of the object. The bytes should be encoded as big-endian,\n * two's complement integers.\n * @param {Buffer} bytes\n *\n * @api private\n */\nfunction Int64(bytes) {\n if (bytes.length !== 8) {\n throw new Error('Int64 buffers must be exactly 8 bytes');\n }\n if (!util.Buffer.isBuffer(bytes)) bytes = toBuffer(bytes);\n\n this.bytes = bytes;\n}\n\n/**\n * @param {number} number\n * @returns {Int64}\n *\n * @api private\n */\nInt64.fromNumber = function(number) {\n if (number > 9223372036854775807 || number < -9223372036854775808) {\n throw new Error(\n number + ' is too large (or, if negative, too small) to represent as an Int64'\n );\n }\n\n var bytes = new Uint8Array(8);\n for (\n var i = 7, remaining = Math.abs(Math.round(number));\n i > -1 && remaining > 0;\n i--, remaining /= 256\n ) {\n bytes[i] = remaining;\n }\n\n if (number < 0) {\n negate(bytes);\n }\n\n return new Int64(bytes);\n};\n\n/**\n * @returns {number}\n *\n * @api private\n */\nInt64.prototype.valueOf = function() {\n var bytes = this.bytes.slice(0);\n var negative = bytes[0] & 128;\n if (negative) {\n negate(bytes);\n }\n\n return parseInt(bytes.toString('hex'), 16) * (negative ? -1 : 1);\n};\n\nInt64.prototype.toString = function() {\n return String(this.valueOf());\n};\n\n/**\n * @param {Buffer} bytes\n *\n * @api private\n */\nfunction negate(bytes) {\n for (var i = 0; i < 8; i++) {\n bytes[i] ^= 0xFF;\n }\n for (var i = 7; i > -1; i--) {\n bytes[i]++;\n if (bytes[i] !== 0) {\n break;\n }\n }\n}\n\n/**\n * @api private\n */\nmodule.exports = {\n Int64: Int64\n};\n","var Buffer = require('buffer/').Buffer;\n\n/**\n * This is a polyfill for the static method `isView` of `ArrayBuffer`, which is\n * e.g. missing in IE 10.\n *\n * @api private\n */\nif (\n typeof ArrayBuffer !== 'undefined' &&\n typeof ArrayBuffer.isView === 'undefined'\n) {\n ArrayBuffer.isView = function(arg) {\n return viewStrings.indexOf(Object.prototype.toString.call(arg)) > -1;\n };\n}\n\n/**\n * @api private\n */\nvar viewStrings = [\n '[object Int8Array]',\n '[object Uint8Array]',\n '[object Uint8ClampedArray]',\n '[object Int16Array]',\n '[object Uint16Array]',\n '[object Int32Array]',\n '[object Uint32Array]',\n '[object Float32Array]',\n '[object Float64Array]',\n '[object DataView]',\n];\n\n/**\n * @api private\n */\nfunction isEmptyData(data) {\n if (typeof data === 'string') {\n return data.length === 0;\n }\n return data.byteLength === 0;\n}\n\n/**\n * @api private\n */\nfunction convertToBuffer(data) {\n if (typeof data === 'string') {\n data = new Buffer(data, 'utf8');\n }\n\n if (ArrayBuffer.isView(data)) {\n return new Uint8Array(data.buffer, data.byteOffset, data.byteLength / Uint8Array.BYTES_PER_ELEMENT);\n }\n\n return new Uint8Array(data);\n}\n\n/**\n * @api private\n */\nmodule.exports = exports = {\n isEmptyData: isEmptyData,\n convertToBuffer: convertToBuffer,\n};\n","require('../polly/presigner');\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['machinelearning'] = {};\nAWS.MachineLearning = Service.defineService('machinelearning', ['2014-12-12']);\nrequire('../lib/services/machinelearning');\nObject.defineProperty(apiLoader.services['machinelearning'], '2014-12-12', {\n get: function get() {\n var model = require('../apis/machinelearning-2014-12-12.min.json');\n model.paginators = require('../apis/machinelearning-2014-12-12.paginators.json').pagination;\n model.waiters = require('../apis/machinelearning-2014-12-12.waiters2.json').waiters;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.MachineLearning;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['codecommit'] = {};\nAWS.CodeCommit = Service.defineService('codecommit', ['2015-04-13']);\nObject.defineProperty(apiLoader.services['codecommit'], '2015-04-13', {\n get: function get() {\n var model = require('../apis/codecommit-2015-04-13.min.json');\n model.paginators = require('../apis/codecommit-2015-04-13.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.CodeCommit;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['cloudtrail'] = {};\nAWS.CloudTrail = Service.defineService('cloudtrail', ['2013-11-01']);\nObject.defineProperty(apiLoader.services['cloudtrail'], '2013-11-01', {\n get: function get() {\n var model = require('../apis/cloudtrail-2013-11-01.min.json');\n model.paginators = require('../apis/cloudtrail-2013-11-01.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.CloudTrail;\n","/**\n * Copyright 2012-2013 Amazon.com, Inc. or its affiliates. All Rights Reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\"). You\n * may not use this file except in compliance with the License. A copy of\n * the License is located at\n *\n * http://aws.amazon.com/apache2.0/\n *\n * or in the \"license\" file accompanying this file. This file is\n * distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF\n * ANY KIND, either express or implied. See the License for the specific\n * language governing permissions and limitations under the License.\n */\n\nvar AWS = require('./core');\nvar inherit = AWS.util.inherit;\nvar jmespath = require('jmespath');\n\n/**\n * @api private\n */\nfunction CHECK_ACCEPTORS(resp) {\n var waiter = resp.request._waiter;\n var acceptors = waiter.config.acceptors;\n var acceptorMatched = false;\n var state = 'retry';\n\n acceptors.forEach(function(acceptor) {\n if (!acceptorMatched) {\n var matcher = waiter.matchers[acceptor.matcher];\n if (matcher && matcher(resp, acceptor.expected, acceptor.argument)) {\n acceptorMatched = true;\n state = acceptor.state;\n }\n }\n });\n\n if (!acceptorMatched && resp.error) state = 'failure';\n\n if (state === 'success') {\n waiter.setSuccess(resp);\n } else {\n waiter.setError(resp, state === 'retry');\n }\n}\n\n/**\n * @api private\n */\nAWS.ResourceWaiter = inherit({\n /**\n * Waits for a given state on a service object\n * @param service [Service] the service object to wait on\n * @param state [String] the state (defined in waiter configuration) to wait\n * for.\n * @example Create a waiter for running EC2 instances\n * var ec2 = new AWS.EC2;\n * var waiter = new AWS.ResourceWaiter(ec2, 'instanceRunning');\n */\n constructor: function constructor(service, state) {\n this.service = service;\n this.state = state;\n this.loadWaiterConfig(this.state);\n },\n\n service: null,\n\n state: null,\n\n config: null,\n\n matchers: {\n path: function(resp, expected, argument) {\n try {\n var result = jmespath.search(resp.data, argument);\n } catch (err) {\n return false;\n }\n\n return jmespath.strictDeepEqual(result,expected);\n },\n\n pathAll: function(resp, expected, argument) {\n try {\n var results = jmespath.search(resp.data, argument);\n } catch (err) {\n return false;\n }\n\n if (!Array.isArray(results)) results = [results];\n var numResults = results.length;\n if (!numResults) return false;\n for (var ind = 0 ; ind < numResults; ind++) {\n if (!jmespath.strictDeepEqual(results[ind], expected)) {\n return false;\n }\n }\n return true;\n },\n\n pathAny: function(resp, expected, argument) {\n try {\n var results = jmespath.search(resp.data, argument);\n } catch (err) {\n return false;\n }\n\n if (!Array.isArray(results)) results = [results];\n var numResults = results.length;\n for (var ind = 0 ; ind < numResults; ind++) {\n if (jmespath.strictDeepEqual(results[ind], expected)) {\n return true;\n }\n }\n return false;\n },\n\n status: function(resp, expected) {\n var statusCode = resp.httpResponse.statusCode;\n return (typeof statusCode === 'number') && (statusCode === expected);\n },\n\n error: function(resp, expected) {\n if (typeof expected === 'string' && resp.error) {\n return expected === resp.error.code;\n }\n // if expected is not string, can be boolean indicating presence of error\n return expected === !!resp.error;\n }\n },\n\n listeners: new AWS.SequentialExecutor().addNamedListeners(function(add) {\n add('RETRY_CHECK', 'retry', function(resp) {\n var waiter = resp.request._waiter;\n if (resp.error && resp.error.code === 'ResourceNotReady') {\n resp.error.retryDelay = (waiter.config.delay || 0) * 1000;\n }\n });\n\n add('CHECK_OUTPUT', 'extractData', CHECK_ACCEPTORS);\n\n add('CHECK_ERROR', 'extractError', CHECK_ACCEPTORS);\n }),\n\n /**\n * @return [AWS.Request]\n */\n wait: function wait(params, callback) {\n if (typeof params === 'function') {\n callback = params; params = undefined;\n }\n\n if (params && params.$waiter) {\n params = AWS.util.copy(params);\n if (typeof params.$waiter.delay === 'number') {\n this.config.delay = params.$waiter.delay;\n }\n if (typeof params.$waiter.maxAttempts === 'number') {\n this.config.maxAttempts = params.$waiter.maxAttempts;\n }\n delete params.$waiter;\n }\n\n var request = this.service.makeRequest(this.config.operation, params);\n request._waiter = this;\n request.response.maxRetries = this.config.maxAttempts;\n request.addListeners(this.listeners);\n\n if (callback) request.send(callback);\n return request;\n },\n\n setSuccess: function setSuccess(resp) {\n resp.error = null;\n resp.data = resp.data || {};\n resp.request.removeAllListeners('extractData');\n },\n\n setError: function setError(resp, retryable) {\n resp.data = null;\n resp.error = AWS.util.error(resp.error || new Error(), {\n code: 'ResourceNotReady',\n message: 'Resource is not in the state ' + this.state,\n retryable: retryable\n });\n },\n\n /**\n * Loads waiter configuration from API configuration\n *\n * @api private\n */\n loadWaiterConfig: function loadWaiterConfig(state) {\n if (!this.service.api.waiters[state]) {\n throw new AWS.util.error(new Error(), {\n code: 'StateNotFoundError',\n message: 'State ' + state + ' not found.'\n });\n }\n\n this.config = AWS.util.copy(this.service.api.waiters[state]);\n }\n});\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['cognitosync'] = {};\nAWS.CognitoSync = Service.defineService('cognitosync', ['2014-06-30']);\nObject.defineProperty(apiLoader.services['cognitosync'], '2014-06-30', {\n get: function get() {\n var model = require('../apis/cognito-sync-2014-06-30.min.json');\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.CognitoSync;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['autoscaling'] = {};\nAWS.AutoScaling = Service.defineService('autoscaling', ['2011-01-01']);\nObject.defineProperty(apiLoader.services['autoscaling'], '2011-01-01', {\n get: function get() {\n var model = require('../apis/autoscaling-2011-01-01.min.json');\n model.paginators = require('../apis/autoscaling-2011-01-01.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.AutoScaling;\n","var rng = require('./lib/rng');\nvar bytesToUuid = require('./lib/bytesToUuid');\n\nfunction v4(options, buf, offset) {\n var i = buf && offset || 0;\n\n if (typeof(options) == 'string') {\n buf = options === 'binary' ? new Array(16) : null;\n options = null;\n }\n options = options || {};\n\n var rnds = options.random || (options.rng || rng)();\n\n // Per 4.4, set bits for version and `clock_seq_hi_and_reserved`\n rnds[6] = (rnds[6] & 0x0f) | 0x40;\n rnds[8] = (rnds[8] & 0x3f) | 0x80;\n\n // Copy bytes to buffer, if provided\n if (buf) {\n for (var ii = 0; ii < 16; ++ii) {\n buf[i + ii] = rnds[ii];\n }\n }\n\n return buf || bytesToUuid(rnds);\n}\n\nmodule.exports = v4;\n","var AWS = require('../core');\nvar byteLength = AWS.util.string.byteLength;\nvar Buffer = AWS.util.Buffer;\n\n/**\n * The managed uploader allows for easy and efficient uploading of buffers,\n * blobs, or streams, using a configurable amount of concurrency to perform\n * multipart uploads where possible. This abstraction also enables uploading\n * streams of unknown size due to the use of multipart uploads.\n *\n * To construct a managed upload object, see the {constructor} function.\n *\n * ## Tracking upload progress\n *\n * The managed upload object can also track progress by attaching an\n * 'httpUploadProgress' listener to the upload manager. This event is similar\n * to {AWS.Request~httpUploadProgress} but groups all concurrent upload progress\n * into a single event. See {AWS.S3.ManagedUpload~httpUploadProgress} for more\n * information.\n *\n * ## Handling Multipart Cleanup\n *\n * By default, this class will automatically clean up any multipart uploads\n * when an individual part upload fails. This behavior can be disabled in order\n * to manually handle failures by setting the `leavePartsOnError` configuration\n * option to `true` when initializing the upload object.\n *\n * @!event httpUploadProgress(progress)\n * Triggered when the uploader has uploaded more data.\n * @note The `total` property may not be set if the stream being uploaded has\n * not yet finished chunking. In this case the `total` will be undefined\n * until the total stream size is known.\n * @note This event will not be emitted in Node.js 0.8.x.\n * @param progress [map] An object containing the `loaded` and `total` bytes\n * of the request and the `key` of the S3 object. Note that `total` may be undefined until the payload\n * size is known.\n * @context (see AWS.Request~send)\n */\nAWS.S3.ManagedUpload = AWS.util.inherit({\n /**\n * Creates a managed upload object with a set of configuration options.\n *\n * @note A \"Body\" parameter is required to be set prior to calling {send}.\n * @note In Node.js, sending \"Body\" as {https://nodejs.org/dist/latest/docs/api/stream.html#stream_object_mode object-mode stream}\n * may result in upload hangs. Using buffer stream is preferable.\n * @option options params [map] a map of parameters to pass to the upload\n * requests. The \"Body\" parameter is required to be specified either on\n * the service or in the params option.\n * @note ContentMD5 should not be provided when using the managed upload object.\n * Instead, setting \"computeChecksums\" to true will enable automatic ContentMD5 generation\n * by the managed upload object.\n * @option options queueSize [Number] (4) the size of the concurrent queue\n * manager to upload parts in parallel. Set to 1 for synchronous uploading\n * of parts. Note that the uploader will buffer at most queueSize * partSize\n * bytes into memory at any given time.\n * @option options partSize [Number] (5mb) the size in bytes for each\n * individual part to be uploaded. Adjust the part size to ensure the number\n * of parts does not exceed {maxTotalParts}. See {minPartSize} for the\n * minimum allowed part size.\n * @option options leavePartsOnError [Boolean] (false) whether to abort the\n * multipart upload if an error occurs. Set to true if you want to handle\n * failures manually.\n * @option options service [AWS.S3] an optional S3 service object to use for\n * requests. This object might have bound parameters used by the uploader.\n * @option options tags [Array] The tags to apply to the uploaded object.\n * Each tag should have a `Key` and `Value` keys.\n * @example Creating a default uploader for a stream object\n * var upload = new AWS.S3.ManagedUpload({\n * params: {Bucket: 'bucket', Key: 'key', Body: stream}\n * });\n * @example Creating an uploader with concurrency of 1 and partSize of 10mb\n * var upload = new AWS.S3.ManagedUpload({\n * partSize: 10 * 1024 * 1024, queueSize: 1,\n * params: {Bucket: 'bucket', Key: 'key', Body: stream}\n * });\n * @example Creating an uploader with tags\n * var upload = new AWS.S3.ManagedUpload({\n * params: {Bucket: 'bucket', Key: 'key', Body: stream},\n * tags: [{Key: 'tag1', Value: 'value1'}, {Key: 'tag2', Value: 'value2'}]\n * });\n * @see send\n */\n constructor: function ManagedUpload(options) {\n var self = this;\n AWS.SequentialExecutor.call(self);\n self.body = null;\n self.sliceFn = null;\n self.callback = null;\n self.parts = {};\n self.completeInfo = [];\n self.fillQueue = function() {\n self.callback(new Error('Unsupported body payload ' + typeof self.body));\n };\n\n self.configure(options);\n },\n\n /**\n * @api private\n */\n configure: function configure(options) {\n options = options || {};\n this.partSize = this.minPartSize;\n\n if (options.queueSize) this.queueSize = options.queueSize;\n if (options.partSize) this.partSize = options.partSize;\n if (options.leavePartsOnError) this.leavePartsOnError = true;\n if (options.tags) {\n if (!Array.isArray(options.tags)) {\n throw new Error('Tags must be specified as an array; ' +\n typeof options.tags + ' provided.');\n }\n this.tags = options.tags;\n }\n\n if (this.partSize < this.minPartSize) {\n throw new Error('partSize must be greater than ' +\n this.minPartSize);\n }\n\n this.service = options.service;\n this.bindServiceObject(options.params);\n this.validateBody();\n this.adjustTotalBytes();\n },\n\n /**\n * @api private\n */\n leavePartsOnError: false,\n\n /**\n * @api private\n */\n queueSize: 4,\n\n /**\n * @api private\n */\n partSize: null,\n\n /**\n * @readonly\n * @return [Number] the minimum number of bytes for an individual part\n * upload.\n */\n minPartSize: 1024 * 1024 * 5,\n\n /**\n * @readonly\n * @return [Number] the maximum allowed number of parts in a multipart upload.\n */\n maxTotalParts: 10000,\n\n /**\n * Initiates the managed upload for the payload.\n *\n * @callback callback function(err, data)\n * @param err [Error] an error or null if no error occurred.\n * @param data [map] The response data from the successful upload:\n * * `Location` (String) the URL of the uploaded object\n * * `ETag` (String) the ETag of the uploaded object\n * * `Bucket` (String) the bucket to which the object was uploaded\n * * `Key` (String) the key to which the object was uploaded\n * @example Sending a managed upload object\n * var params = {Bucket: 'bucket', Key: 'key', Body: stream};\n * var upload = new AWS.S3.ManagedUpload({params: params});\n * upload.send(function(err, data) {\n * console.log(err, data);\n * });\n */\n send: function(callback) {\n var self = this;\n self.failed = false;\n self.callback = callback || function(err) { if (err) throw err; };\n\n var runFill = true;\n if (self.sliceFn) {\n self.fillQueue = self.fillBuffer;\n } else if (AWS.util.isNode()) {\n var Stream = AWS.util.stream.Stream;\n if (self.body instanceof Stream) {\n runFill = false;\n self.fillQueue = self.fillStream;\n self.partBuffers = [];\n self.body.\n on('error', function(err) { self.cleanup(err); }).\n on('readable', function() { self.fillQueue(); }).\n on('end', function() {\n self.isDoneChunking = true;\n self.numParts = self.totalPartNumbers;\n self.fillQueue.call(self);\n\n if (self.isDoneChunking && self.totalPartNumbers >= 1 && self.doneParts === self.numParts) {\n self.finishMultiPart();\n }\n });\n }\n }\n\n if (runFill) self.fillQueue.call(self);\n },\n\n /**\n * @!method promise()\n * Returns a 'thenable' promise.\n *\n * Two callbacks can be provided to the `then` method on the returned promise.\n * The first callback will be called if the promise is fulfilled, and the second\n * callback will be called if the promise is rejected.\n * @callback fulfilledCallback function(data)\n * Called if the promise is fulfilled.\n * @param data [map] The response data from the successful upload:\n * `Location` (String) the URL of the uploaded object\n * `ETag` (String) the ETag of the uploaded object\n * `Bucket` (String) the bucket to which the object was uploaded\n * `Key` (String) the key to which the object was uploaded\n * @callback rejectedCallback function(err)\n * Called if the promise is rejected.\n * @param err [Error] an error or null if no error occurred.\n * @return [Promise] A promise that represents the state of the upload request.\n * @example Sending an upload request using promises.\n * var upload = s3.upload({Bucket: 'bucket', Key: 'key', Body: stream});\n * var promise = upload.promise();\n * promise.then(function(data) { ... }, function(err) { ... });\n */\n\n /**\n * Aborts a managed upload, including all concurrent upload requests.\n * @note By default, calling this function will cleanup a multipart upload\n * if one was created. To leave the multipart upload around after aborting\n * a request, configure `leavePartsOnError` to `true` in the {constructor}.\n * @note Calling {abort} in the browser environment will not abort any requests\n * that are already in flight. If a multipart upload was created, any parts\n * not yet uploaded will not be sent, and the multipart upload will be cleaned up.\n * @example Aborting an upload\n * var params = {\n * Bucket: 'bucket', Key: 'key',\n * Body: Buffer.alloc(1024 * 1024 * 25) // 25MB payload\n * };\n * var upload = s3.upload(params);\n * upload.send(function (err, data) {\n * if (err) console.log(\"Error:\", err.code, err.message);\n * else console.log(data);\n * });\n *\n * // abort request in 1 second\n * setTimeout(upload.abort.bind(upload), 1000);\n */\n abort: function() {\n var self = this;\n //abort putObject request\n if (self.isDoneChunking === true && self.totalPartNumbers === 1 && self.singlePart) {\n self.singlePart.abort();\n } else {\n self.cleanup(AWS.util.error(new Error('Request aborted by user'), {\n code: 'RequestAbortedError', retryable: false\n }));\n }\n },\n\n /**\n * @api private\n */\n validateBody: function validateBody() {\n var self = this;\n self.body = self.service.config.params.Body;\n if (typeof self.body === 'string') {\n self.body = AWS.util.buffer.toBuffer(self.body);\n } else if (!self.body) {\n throw new Error('params.Body is required');\n }\n self.sliceFn = AWS.util.arraySliceFn(self.body);\n },\n\n /**\n * @api private\n */\n bindServiceObject: function bindServiceObject(params) {\n params = params || {};\n var self = this;\n // bind parameters to new service object\n if (!self.service) {\n self.service = new AWS.S3({params: params});\n } else {\n var service = self.service;\n var config = AWS.util.copy(service._originalConfig || {});\n config.signatureVersion = service.getSignatureVersion();\n self.service = new service.constructor.__super__(config);\n self.service.config.params =\n AWS.util.merge(self.service.config.params || {}, params);\n }\n },\n\n /**\n * @api private\n */\n adjustTotalBytes: function adjustTotalBytes() {\n var self = this;\n try { // try to get totalBytes\n self.totalBytes = byteLength(self.body);\n } catch (e) { }\n\n // try to adjust partSize if we know payload length\n if (self.totalBytes) {\n var newPartSize = Math.ceil(self.totalBytes / self.maxTotalParts);\n if (newPartSize > self.partSize) self.partSize = newPartSize;\n } else {\n self.totalBytes = undefined;\n }\n },\n\n /**\n * @api private\n */\n isDoneChunking: false,\n\n /**\n * @api private\n */\n partPos: 0,\n\n /**\n * @api private\n */\n totalChunkedBytes: 0,\n\n /**\n * @api private\n */\n totalUploadedBytes: 0,\n\n /**\n * @api private\n */\n totalBytes: undefined,\n\n /**\n * @api private\n */\n numParts: 0,\n\n /**\n * @api private\n */\n totalPartNumbers: 0,\n\n /**\n * @api private\n */\n activeParts: 0,\n\n /**\n * @api private\n */\n doneParts: 0,\n\n /**\n * @api private\n */\n parts: null,\n\n /**\n * @api private\n */\n completeInfo: null,\n\n /**\n * @api private\n */\n failed: false,\n\n /**\n * @api private\n */\n multipartReq: null,\n\n /**\n * @api private\n */\n partBuffers: null,\n\n /**\n * @api private\n */\n partBufferLength: 0,\n\n /**\n * @api private\n */\n fillBuffer: function fillBuffer() {\n var self = this;\n var bodyLen = byteLength(self.body);\n\n if (bodyLen === 0) {\n self.isDoneChunking = true;\n self.numParts = 1;\n self.nextChunk(self.body);\n return;\n }\n\n while (self.activeParts < self.queueSize && self.partPos < bodyLen) {\n var endPos = Math.min(self.partPos + self.partSize, bodyLen);\n var buf = self.sliceFn.call(self.body, self.partPos, endPos);\n self.partPos += self.partSize;\n\n if (byteLength(buf) < self.partSize || self.partPos === bodyLen) {\n self.isDoneChunking = true;\n self.numParts = self.totalPartNumbers + 1;\n }\n self.nextChunk(buf);\n }\n },\n\n /**\n * @api private\n */\n fillStream: function fillStream() {\n var self = this;\n if (self.activeParts >= self.queueSize) return;\n\n var buf = self.body.read(self.partSize - self.partBufferLength) ||\n self.body.read();\n if (buf) {\n self.partBuffers.push(buf);\n self.partBufferLength += buf.length;\n self.totalChunkedBytes += buf.length;\n }\n\n if (self.partBufferLength >= self.partSize) {\n // if we have single buffer we avoid copyfull concat\n var pbuf = self.partBuffers.length === 1 ?\n self.partBuffers[0] : Buffer.concat(self.partBuffers);\n self.partBuffers = [];\n self.partBufferLength = 0;\n\n // if we have more than partSize, push the rest back on the queue\n if (pbuf.length > self.partSize) {\n var rest = pbuf.slice(self.partSize);\n self.partBuffers.push(rest);\n self.partBufferLength += rest.length;\n pbuf = pbuf.slice(0, self.partSize);\n }\n\n self.nextChunk(pbuf);\n }\n\n if (self.isDoneChunking && !self.isDoneSending) {\n // if we have single buffer we avoid copyfull concat\n pbuf = self.partBuffers.length === 1 ?\n self.partBuffers[0] : Buffer.concat(self.partBuffers);\n self.partBuffers = [];\n self.partBufferLength = 0;\n self.totalBytes = self.totalChunkedBytes;\n self.isDoneSending = true;\n\n if (self.numParts === 0 || pbuf.length > 0) {\n self.numParts++;\n self.nextChunk(pbuf);\n }\n }\n\n self.body.read(0);\n },\n\n /**\n * @api private\n */\n nextChunk: function nextChunk(chunk) {\n var self = this;\n if (self.failed) return null;\n\n var partNumber = ++self.totalPartNumbers;\n if (self.isDoneChunking && partNumber === 1) {\n var params = {Body: chunk};\n if (this.tags) {\n params.Tagging = this.getTaggingHeader();\n }\n var req = self.service.putObject(params);\n req._managedUpload = self;\n req.on('httpUploadProgress', self.progress).send(self.finishSinglePart);\n self.singlePart = req; //save the single part request\n return null;\n } else if (self.service.config.params.ContentMD5) {\n var err = AWS.util.error(new Error('The Content-MD5 you specified is invalid for multi-part uploads.'), {\n code: 'InvalidDigest', retryable: false\n });\n\n self.cleanup(err);\n return null;\n }\n\n if (self.completeInfo[partNumber] && self.completeInfo[partNumber].ETag !== null) {\n return null; // Already uploaded this part.\n }\n\n self.activeParts++;\n if (!self.service.config.params.UploadId) {\n\n if (!self.multipartReq) { // create multipart\n self.multipartReq = self.service.createMultipartUpload();\n self.multipartReq.on('success', function(resp) {\n self.service.config.params.UploadId = resp.data.UploadId;\n self.multipartReq = null;\n });\n self.queueChunks(chunk, partNumber);\n self.multipartReq.on('error', function(err) {\n self.cleanup(err);\n });\n self.multipartReq.send();\n } else {\n self.queueChunks(chunk, partNumber);\n }\n } else { // multipart is created, just send\n self.uploadPart(chunk, partNumber);\n }\n },\n\n /**\n * @api private\n */\n getTaggingHeader: function getTaggingHeader() {\n var kvPairStrings = [];\n for (var i = 0; i < this.tags.length; i++) {\n kvPairStrings.push(AWS.util.uriEscape(this.tags[i].Key) + '=' +\n AWS.util.uriEscape(this.tags[i].Value));\n }\n\n return kvPairStrings.join('&');\n },\n\n /**\n * @api private\n */\n uploadPart: function uploadPart(chunk, partNumber) {\n var self = this;\n\n var partParams = {\n Body: chunk,\n ContentLength: AWS.util.string.byteLength(chunk),\n PartNumber: partNumber\n };\n\n var partInfo = {ETag: null, PartNumber: partNumber};\n self.completeInfo[partNumber] = partInfo;\n\n var req = self.service.uploadPart(partParams);\n self.parts[partNumber] = req;\n req._lastUploadedBytes = 0;\n req._managedUpload = self;\n req.on('httpUploadProgress', self.progress);\n req.send(function(err, data) {\n delete self.parts[partParams.PartNumber];\n self.activeParts--;\n\n if (!err && (!data || !data.ETag)) {\n var message = 'No access to ETag property on response.';\n if (AWS.util.isBrowser()) {\n message += ' Check CORS configuration to expose ETag header.';\n }\n\n err = AWS.util.error(new Error(message), {\n code: 'ETagMissing', retryable: false\n });\n }\n if (err) return self.cleanup(err);\n //prevent sending part being returned twice (https://github.com/aws/aws-sdk-js/issues/2304)\n if (self.completeInfo[partNumber] && self.completeInfo[partNumber].ETag !== null) return null;\n partInfo.ETag = data.ETag;\n self.doneParts++;\n if (self.isDoneChunking && self.doneParts === self.numParts) {\n self.finishMultiPart();\n } else {\n self.fillQueue.call(self);\n }\n });\n },\n\n /**\n * @api private\n */\n queueChunks: function queueChunks(chunk, partNumber) {\n var self = this;\n self.multipartReq.on('success', function() {\n self.uploadPart(chunk, partNumber);\n });\n },\n\n /**\n * @api private\n */\n cleanup: function cleanup(err) {\n var self = this;\n if (self.failed) return;\n\n // clean up stream\n if (typeof self.body.removeAllListeners === 'function' &&\n typeof self.body.resume === 'function') {\n self.body.removeAllListeners('readable');\n self.body.removeAllListeners('end');\n self.body.resume();\n }\n\n // cleanup multipartReq listeners\n if (self.multipartReq) {\n self.multipartReq.removeAllListeners('success');\n self.multipartReq.removeAllListeners('error');\n self.multipartReq.removeAllListeners('complete');\n delete self.multipartReq;\n }\n\n if (self.service.config.params.UploadId && !self.leavePartsOnError) {\n self.service.abortMultipartUpload().send();\n } else if (self.leavePartsOnError) {\n self.isDoneChunking = false;\n }\n\n AWS.util.each(self.parts, function(partNumber, part) {\n part.removeAllListeners('complete');\n part.abort();\n });\n\n self.activeParts = 0;\n self.partPos = 0;\n self.numParts = 0;\n self.totalPartNumbers = 0;\n self.parts = {};\n self.failed = true;\n self.callback(err);\n },\n\n /**\n * @api private\n */\n finishMultiPart: function finishMultiPart() {\n var self = this;\n var completeParams = { MultipartUpload: { Parts: self.completeInfo.slice(1) } };\n self.service.completeMultipartUpload(completeParams, function(err, data) {\n if (err) {\n return self.cleanup(err);\n }\n\n if (data && typeof data.Location === 'string') {\n data.Location = data.Location.replace(/%2F/g, '/');\n }\n\n if (Array.isArray(self.tags)) {\n for (var i = 0; i < self.tags.length; i++) {\n self.tags[i].Value = String(self.tags[i].Value);\n }\n self.service.putObjectTagging(\n {Tagging: {TagSet: self.tags}},\n function(e, d) {\n if (e) {\n self.callback(e);\n } else {\n self.callback(e, data);\n }\n }\n );\n } else {\n self.callback(err, data);\n }\n });\n },\n\n /**\n * @api private\n */\n finishSinglePart: function finishSinglePart(err, data) {\n var upload = this.request._managedUpload;\n var httpReq = this.request.httpRequest;\n var endpoint = httpReq.endpoint;\n if (err) return upload.callback(err);\n data.Location =\n [endpoint.protocol, '//', endpoint.host, httpReq.path].join('');\n data.key = this.request.params.Key; // will stay undocumented\n data.Key = this.request.params.Key;\n data.Bucket = this.request.params.Bucket;\n upload.callback(err, data);\n },\n\n /**\n * @api private\n */\n progress: function progress(info) {\n var upload = this._managedUpload;\n if (this.operation === 'putObject') {\n info.part = 1;\n info.key = this.params.Key;\n } else {\n upload.totalUploadedBytes += info.loaded - this._lastUploadedBytes;\n this._lastUploadedBytes = info.loaded;\n info = {\n loaded: upload.totalUploadedBytes,\n total: upload.totalBytes,\n part: this.params.PartNumber,\n key: this.params.Key\n };\n }\n upload.emit('httpUploadProgress', [info]);\n }\n});\n\nAWS.util.mixin(AWS.S3.ManagedUpload, AWS.SequentialExecutor);\n\n/**\n * @api private\n */\nAWS.S3.ManagedUpload.addPromisesToClass = function addPromisesToClass(PromiseDependency) {\n this.prototype.promise = AWS.util.promisifyMethod('send', PromiseDependency);\n};\n\n/**\n * @api private\n */\nAWS.S3.ManagedUpload.deletePromisesFromClass = function deletePromisesFromClass() {\n delete this.prototype.promise;\n};\n\nAWS.util.addPromises(AWS.S3.ManagedUpload);\n\n/**\n * @api private\n */\nmodule.exports = AWS.S3.ManagedUpload;\n","var AWS = require('../core');\nrequire('../dynamodb/document_client');\n\nAWS.util.update(AWS.DynamoDB.prototype, {\n /**\n * @api private\n */\n setupRequestListeners: function setupRequestListeners(request) {\n if (request.service.config.dynamoDbCrc32) {\n request.removeListener('extractData', AWS.EventListeners.Json.EXTRACT_DATA);\n request.addListener('extractData', this.checkCrc32);\n request.addListener('extractData', AWS.EventListeners.Json.EXTRACT_DATA);\n }\n },\n\n /**\n * @api private\n */\n checkCrc32: function checkCrc32(resp) {\n if (!resp.httpResponse.streaming && !resp.request.service.crc32IsValid(resp)) {\n resp.data = null;\n resp.error = AWS.util.error(new Error(), {\n code: 'CRC32CheckFailed',\n message: 'CRC32 integrity check failed',\n retryable: true\n });\n resp.request.haltHandlersOnError();\n throw (resp.error);\n }\n },\n\n /**\n * @api private\n */\n crc32IsValid: function crc32IsValid(resp) {\n var crc = resp.httpResponse.headers['x-amz-crc32'];\n if (!crc) return true; // no (valid) CRC32 header\n return parseInt(crc, 10) === AWS.util.crypto.crc32(resp.httpResponse.body);\n },\n\n /**\n * @api private\n */\n defaultRetryCount: 10,\n\n /**\n * @api private\n */\n retryDelays: function retryDelays(retryCount, err) {\n var retryDelayOptions = AWS.util.copy(this.config.retryDelayOptions);\n\n if (typeof retryDelayOptions.base !== 'number') {\n retryDelayOptions.base = 50; // default for dynamodb\n }\n var delay = AWS.util.calculateRetryDelay(retryCount, retryDelayOptions, err);\n return delay;\n }\n});\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['storagegateway'] = {};\nAWS.StorageGateway = Service.defineService('storagegateway', ['2013-06-30']);\nObject.defineProperty(apiLoader.services['storagegateway'], '2013-06-30', {\n get: function get() {\n var model = require('../apis/storagegateway-2013-06-30.min.json');\n model.paginators = require('../apis/storagegateway-2013-06-30.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.StorageGateway;\n","var AWS = require('../core');\nvar STS = require('../../clients/sts');\n\n/**\n * Represents temporary credentials retrieved from {AWS.STS}. Without any\n * extra parameters, credentials will be fetched from the\n * {AWS.STS.getSessionToken} operation. If an IAM role is provided, the\n * {AWS.STS.assumeRole} operation will be used to fetch credentials for the\n * role instead.\n *\n * AWS.ChainableTemporaryCredentials differs from AWS.TemporaryCredentials in\n * the way masterCredentials and refreshes are handled.\n * AWS.ChainableTemporaryCredentials refreshes expired credentials using the\n * masterCredentials passed by the user to support chaining of STS credentials.\n * However, AWS.TemporaryCredentials recursively collapses the masterCredentials\n * during instantiation, precluding the ability to refresh credentials which\n * require intermediate, temporary credentials.\n *\n * For example, if the application should use RoleA, which must be assumed from\n * RoleB, and the environment provides credentials which can assume RoleB, then\n * AWS.ChainableTemporaryCredentials must be used to support refreshing the\n * temporary credentials for RoleA:\n *\n * ```javascript\n * var roleACreds = new AWS.ChainableTemporaryCredentials({\n * params: {RoleArn: 'RoleA'},\n * masterCredentials: new AWS.ChainableTemporaryCredentials({\n * params: {RoleArn: 'RoleB'},\n * masterCredentials: new AWS.EnvironmentCredentials('AWS')\n * })\n * });\n * ```\n *\n * If AWS.TemporaryCredentials had been used in the previous example,\n * `roleACreds` would fail to refresh because `roleACreds` would\n * use the environment credentials for the AssumeRole request.\n *\n * Another difference is that AWS.ChainableTemporaryCredentials creates the STS\n * service instance during instantiation while AWS.TemporaryCredentials creates\n * the STS service instance during the first refresh. Creating the service\n * instance during instantiation effectively captures the master credentials\n * from the global config, so that subsequent changes to the global config do\n * not affect the master credentials used to refresh the temporary credentials.\n *\n * This allows an instance of AWS.ChainableTemporaryCredentials to be assigned\n * to AWS.config.credentials:\n *\n * ```javascript\n * var envCreds = new AWS.EnvironmentCredentials('AWS');\n * AWS.config.credentials = envCreds;\n * // masterCredentials will be envCreds\n * AWS.config.credentials = new AWS.ChainableTemporaryCredentials({\n * params: {RoleArn: '...'}\n * });\n * ```\n *\n * Similarly, to use the CredentialProviderChain's default providers as the\n * master credentials, simply create a new instance of\n * AWS.ChainableTemporaryCredentials:\n *\n * ```javascript\n * AWS.config.credentials = new ChainableTemporaryCredentials({\n * params: {RoleArn: '...'}\n * });\n * ```\n *\n * @!attribute service\n * @return [AWS.STS] the STS service instance used to\n * get and refresh temporary credentials from AWS STS.\n * @note (see constructor)\n */\nAWS.ChainableTemporaryCredentials = AWS.util.inherit(AWS.Credentials, {\n /**\n * Creates a new temporary credentials object.\n *\n * @param options [map] a set of options\n * @option options params [map] ({}) a map of options that are passed to the\n * {AWS.STS.assumeRole} or {AWS.STS.getSessionToken} operations.\n * If a `RoleArn` parameter is passed in, credentials will be based on the\n * IAM role. If a `SerialNumber` parameter is passed in, {tokenCodeFn} must\n * also be passed in or an error will be thrown.\n * @option options masterCredentials [AWS.Credentials] the master credentials\n * used to get and refresh temporary credentials from AWS STS. By default,\n * AWS.config.credentials or AWS.config.credentialProvider will be used.\n * @option options tokenCodeFn [Function] (null) Function to provide\n * `TokenCode`, if `SerialNumber` is provided for profile in {params}. Function\n * is called with value of `SerialNumber` and `callback`, and should provide\n * the `TokenCode` or an error to the callback in the format\n * `callback(err, token)`.\n * @example Creating a new credentials object for generic temporary credentials\n * AWS.config.credentials = new AWS.ChainableTemporaryCredentials();\n * @example Creating a new credentials object for an IAM role\n * AWS.config.credentials = new AWS.ChainableTemporaryCredentials({\n * params: {\n * RoleArn: 'arn:aws:iam::1234567890:role/TemporaryCredentials'\n * }\n * });\n * @see AWS.STS.assumeRole\n * @see AWS.STS.getSessionToken\n */\n constructor: function ChainableTemporaryCredentials(options) {\n AWS.Credentials.call(this);\n options = options || {};\n this.errorCode = 'ChainableTemporaryCredentialsProviderFailure';\n this.expired = true;\n this.tokenCodeFn = null;\n\n var params = AWS.util.copy(options.params) || {};\n if (params.RoleArn) {\n params.RoleSessionName = params.RoleSessionName || 'temporary-credentials';\n }\n if (params.SerialNumber) {\n if (!options.tokenCodeFn || (typeof options.tokenCodeFn !== 'function')) {\n throw new AWS.util.error(\n new Error('tokenCodeFn must be a function when params.SerialNumber is given'),\n {code: this.errorCode}\n );\n } else {\n this.tokenCodeFn = options.tokenCodeFn;\n }\n }\n var config = AWS.util.merge(\n {\n params: params,\n credentials: options.masterCredentials || AWS.config.credentials\n },\n options.stsConfig || {}\n );\n this.service = new STS(config);\n },\n\n /**\n * Refreshes credentials using {AWS.STS.assumeRole} or\n * {AWS.STS.getSessionToken}, depending on whether an IAM role ARN was passed\n * to the credentials {constructor}.\n *\n * @callback callback function(err)\n * Called when the STS service responds (or fails). When\n * this callback is called with no error, it means that the credentials\n * information has been loaded into the object (as the `accessKeyId`,\n * `secretAccessKey`, and `sessionToken` properties).\n * @param err [Error] if an error occurred, this value will be filled\n * @see AWS.Credentials.get\n */\n refresh: function refresh(callback) {\n this.coalesceRefresh(callback || AWS.util.fn.callback);\n },\n\n /**\n * @api private\n * @param callback\n */\n load: function load(callback) {\n var self = this;\n var operation = self.service.config.params.RoleArn ? 'assumeRole' : 'getSessionToken';\n this.getTokenCode(function (err, tokenCode) {\n var params = {};\n if (err) {\n callback(err);\n return;\n }\n if (tokenCode) {\n params.TokenCode = tokenCode;\n }\n self.service[operation](params, function (err, data) {\n if (!err) {\n self.service.credentialsFrom(data, self);\n }\n callback(err);\n });\n });\n },\n\n /**\n * @api private\n */\n getTokenCode: function getTokenCode(callback) {\n var self = this;\n if (this.tokenCodeFn) {\n this.tokenCodeFn(this.service.config.params.SerialNumber, function (err, token) {\n if (err) {\n var message = err;\n if (err instanceof Error) {\n message = err.message;\n }\n callback(\n AWS.util.error(\n new Error('Error fetching MFA token: ' + message),\n { code: self.errorCode}\n )\n );\n return;\n }\n callback(null, token);\n });\n } else {\n callback(null);\n }\n }\n});\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['personalizeruntime'] = {};\nAWS.PersonalizeRuntime = Service.defineService('personalizeruntime', ['2018-05-22']);\nObject.defineProperty(apiLoader.services['personalizeruntime'], '2018-05-22', {\n get: function get() {\n var model = require('../apis/personalize-runtime-2018-05-22.min.json');\n model.paginators = require('../apis/personalize-runtime-2018-05-22.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.PersonalizeRuntime;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['s3'] = {};\nAWS.S3 = Service.defineService('s3', ['2006-03-01']);\nrequire('../lib/services/s3');\nObject.defineProperty(apiLoader.services['s3'], '2006-03-01', {\n get: function get() {\n var model = require('../apis/s3-2006-03-01.min.json');\n model.paginators = require('../apis/s3-2006-03-01.paginators.json').pagination;\n model.waiters = require('../apis/s3-2006-03-01.waiters2.json').waiters;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.S3;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['elbv2'] = {};\nAWS.ELBv2 = Service.defineService('elbv2', ['2015-12-01']);\nObject.defineProperty(apiLoader.services['elbv2'], '2015-12-01', {\n get: function get() {\n var model = require('../apis/elasticloadbalancingv2-2015-12-01.min.json');\n model.paginators = require('../apis/elasticloadbalancingv2-2015-12-01.paginators.json').pagination;\n model.waiters = require('../apis/elasticloadbalancingv2-2015-12-01.waiters2.json').waiters;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.ELBv2;\n","var AWS = require('./core');\nvar SequentialExecutor = require('./sequential_executor');\nvar DISCOVER_ENDPOINT = require('./discover_endpoint').discoverEndpoint;\n/**\n * The namespace used to register global event listeners for request building\n * and sending.\n */\nAWS.EventListeners = {\n /**\n * @!attribute VALIDATE_CREDENTIALS\n * A request listener that validates whether the request is being\n * sent with credentials.\n * Handles the {AWS.Request~validate 'validate' Request event}\n * @example Sending a request without validating credentials\n * var listener = AWS.EventListeners.Core.VALIDATE_CREDENTIALS;\n * request.removeListener('validate', listener);\n * @readonly\n * @return [Function]\n * @!attribute VALIDATE_REGION\n * A request listener that validates whether the region is set\n * for a request.\n * Handles the {AWS.Request~validate 'validate' Request event}\n * @example Sending a request without validating region configuration\n * var listener = AWS.EventListeners.Core.VALIDATE_REGION;\n * request.removeListener('validate', listener);\n * @readonly\n * @return [Function]\n * @!attribute VALIDATE_PARAMETERS\n * A request listener that validates input parameters in a request.\n * Handles the {AWS.Request~validate 'validate' Request event}\n * @example Sending a request without validating parameters\n * var listener = AWS.EventListeners.Core.VALIDATE_PARAMETERS;\n * request.removeListener('validate', listener);\n * @example Disable parameter validation globally\n * AWS.EventListeners.Core.removeListener('validate',\n * AWS.EventListeners.Core.VALIDATE_REGION);\n * @readonly\n * @return [Function]\n * @!attribute SEND\n * A request listener that initiates the HTTP connection for a\n * request being sent. Handles the {AWS.Request~send 'send' Request event}\n * @example Replacing the HTTP handler\n * var listener = AWS.EventListeners.Core.SEND;\n * request.removeListener('send', listener);\n * request.on('send', function(response) {\n * customHandler.send(response);\n * });\n * @return [Function]\n * @readonly\n * @!attribute HTTP_DATA\n * A request listener that reads data from the HTTP connection in order\n * to build the response data.\n * Handles the {AWS.Request~httpData 'httpData' Request event}.\n * Remove this handler if you are overriding the 'httpData' event and\n * do not want extra data processing and buffering overhead.\n * @example Disabling default data processing\n * var listener = AWS.EventListeners.Core.HTTP_DATA;\n * request.removeListener('httpData', listener);\n * @return [Function]\n * @readonly\n */\n Core: {} /* doc hack */\n};\n\n/**\n * @api private\n */\nfunction getOperationAuthtype(req) {\n if (!req.service.api.operations) {\n return '';\n }\n var operation = req.service.api.operations[req.operation];\n return operation ? operation.authtype : '';\n}\n\nAWS.EventListeners = {\n Core: new SequentialExecutor().addNamedListeners(function(add, addAsync) {\n addAsync('VALIDATE_CREDENTIALS', 'validate',\n function VALIDATE_CREDENTIALS(req, done) {\n if (!req.service.api.signatureVersion && !req.service.config.signatureVersion) return done(); // none\n req.service.config.getCredentials(function(err) {\n if (err) {\n req.response.error = AWS.util.error(err,\n {code: 'CredentialsError', message: 'Missing credentials in config, if using AWS_CONFIG_FILE, set AWS_SDK_LOAD_CONFIG=1'});\n }\n done();\n });\n });\n\n add('VALIDATE_REGION', 'validate', function VALIDATE_REGION(req) {\n if (!req.service.isGlobalEndpoint) {\n var dnsHostRegex = new RegExp(/^([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9-]{0,61}[a-zA-Z0-9])$/);\n if (!req.service.config.region) {\n req.response.error = AWS.util.error(new Error(),\n {code: 'ConfigError', message: 'Missing region in config'});\n } else if (!dnsHostRegex.test(req.service.config.region)) {\n req.response.error = AWS.util.error(new Error(),\n {code: 'ConfigError', message: 'Invalid region in config'});\n }\n }\n });\n\n add('BUILD_IDEMPOTENCY_TOKENS', 'validate', function BUILD_IDEMPOTENCY_TOKENS(req) {\n if (!req.service.api.operations) {\n return;\n }\n var operation = req.service.api.operations[req.operation];\n if (!operation) {\n return;\n }\n var idempotentMembers = operation.idempotentMembers;\n if (!idempotentMembers.length) {\n return;\n }\n // creates a copy of params so user's param object isn't mutated\n var params = AWS.util.copy(req.params);\n for (var i = 0, iLen = idempotentMembers.length; i < iLen; i++) {\n if (!params[idempotentMembers[i]]) {\n // add the member\n params[idempotentMembers[i]] = AWS.util.uuid.v4();\n }\n }\n req.params = params;\n });\n\n add('VALIDATE_PARAMETERS', 'validate', function VALIDATE_PARAMETERS(req) {\n if (!req.service.api.operations) {\n return;\n }\n var rules = req.service.api.operations[req.operation].input;\n var validation = req.service.config.paramValidation;\n new AWS.ParamValidator(validation).validate(rules, req.params);\n });\n\n addAsync('COMPUTE_SHA256', 'afterBuild', function COMPUTE_SHA256(req, done) {\n req.haltHandlersOnError();\n if (!req.service.api.operations) {\n return;\n }\n var operation = req.service.api.operations[req.operation];\n var authtype = operation ? operation.authtype : '';\n if (!req.service.api.signatureVersion && !authtype && !req.service.config.signatureVersion) return done(); // none\n if (req.service.getSignerClass(req) === AWS.Signers.V4) {\n var body = req.httpRequest.body || '';\n if (authtype.indexOf('unsigned-body') >= 0) {\n req.httpRequest.headers['X-Amz-Content-Sha256'] = 'UNSIGNED-PAYLOAD';\n return done();\n }\n AWS.util.computeSha256(body, function(err, sha) {\n if (err) {\n done(err);\n }\n else {\n req.httpRequest.headers['X-Amz-Content-Sha256'] = sha;\n done();\n }\n });\n } else {\n done();\n }\n });\n\n add('SET_CONTENT_LENGTH', 'afterBuild', function SET_CONTENT_LENGTH(req) {\n var authtype = getOperationAuthtype(req);\n var payloadMember = AWS.util.getRequestPayloadShape(req);\n if (req.httpRequest.headers['Content-Length'] === undefined) {\n try {\n var length = AWS.util.string.byteLength(req.httpRequest.body);\n req.httpRequest.headers['Content-Length'] = length;\n } catch (err) {\n if (payloadMember && payloadMember.isStreaming) {\n if (payloadMember.requiresLength) {\n //streaming payload requires length(s3, glacier)\n throw err;\n } else if (authtype.indexOf('unsigned-body') >= 0) {\n //unbounded streaming payload(lex, mediastore)\n req.httpRequest.headers['Transfer-Encoding'] = 'chunked';\n return;\n } else {\n throw err;\n }\n }\n throw err;\n }\n }\n });\n\n add('SET_HTTP_HOST', 'afterBuild', function SET_HTTP_HOST(req) {\n req.httpRequest.headers['Host'] = req.httpRequest.endpoint.host;\n });\n\n add('RESTART', 'restart', function RESTART() {\n var err = this.response.error;\n if (!err || !err.retryable) return;\n\n this.httpRequest = new AWS.HttpRequest(\n this.service.endpoint,\n this.service.region\n );\n\n if (this.response.retryCount < this.service.config.maxRetries) {\n this.response.retryCount++;\n } else {\n this.response.error = null;\n }\n });\n\n var addToHead = true;\n addAsync('DISCOVER_ENDPOINT', 'sign', DISCOVER_ENDPOINT, addToHead);\n\n addAsync('SIGN', 'sign', function SIGN(req, done) {\n var service = req.service;\n var operations = req.service.api.operations || {};\n var operation = operations[req.operation];\n var authtype = operation ? operation.authtype : '';\n if (!service.api.signatureVersion && !authtype && !service.config.signatureVersion) return done(); // none\n\n service.config.getCredentials(function (err, credentials) {\n if (err) {\n req.response.error = err;\n return done();\n }\n\n try {\n var date = service.getSkewCorrectedDate();\n var SignerClass = service.getSignerClass(req);\n var signer = new SignerClass(req.httpRequest,\n service.getSigningName(),\n {\n signatureCache: service.config.signatureCache,\n operation: operation,\n signatureVersion: service.api.signatureVersion\n });\n signer.setServiceClientId(service._clientId);\n\n // clear old authorization headers\n delete req.httpRequest.headers['Authorization'];\n delete req.httpRequest.headers['Date'];\n delete req.httpRequest.headers['X-Amz-Date'];\n\n // add new authorization\n signer.addAuthorization(credentials, date);\n req.signedAt = date;\n } catch (e) {\n req.response.error = e;\n }\n done();\n });\n });\n\n add('VALIDATE_RESPONSE', 'validateResponse', function VALIDATE_RESPONSE(resp) {\n if (this.service.successfulResponse(resp, this)) {\n resp.data = {};\n resp.error = null;\n } else {\n resp.data = null;\n resp.error = AWS.util.error(new Error(),\n {code: 'UnknownError', message: 'An unknown error occurred.'});\n }\n });\n\n addAsync('SEND', 'send', function SEND(resp, done) {\n resp.httpResponse._abortCallback = done;\n resp.error = null;\n resp.data = null;\n\n function callback(httpResp) {\n resp.httpResponse.stream = httpResp;\n var stream = resp.request.httpRequest.stream;\n var service = resp.request.service;\n var api = service.api;\n var operationName = resp.request.operation;\n var operation = api.operations[operationName] || {};\n\n httpResp.on('headers', function onHeaders(statusCode, headers, statusMessage) {\n resp.request.emit(\n 'httpHeaders',\n [statusCode, headers, resp, statusMessage]\n );\n\n if (!resp.httpResponse.streaming) {\n if (AWS.HttpClient.streamsApiVersion === 2) { // streams2 API check\n // if we detect event streams, we're going to have to\n // return the stream immediately\n if (operation.hasEventOutput && service.successfulResponse(resp)) {\n // skip reading the IncomingStream\n resp.request.emit('httpDone');\n done();\n return;\n }\n\n httpResp.on('readable', function onReadable() {\n var data = httpResp.read();\n if (data !== null) {\n resp.request.emit('httpData', [data, resp]);\n }\n });\n } else { // legacy streams API\n httpResp.on('data', function onData(data) {\n resp.request.emit('httpData', [data, resp]);\n });\n }\n }\n });\n\n httpResp.on('end', function onEnd() {\n if (!stream || !stream.didCallback) {\n if (AWS.HttpClient.streamsApiVersion === 2 && (operation.hasEventOutput && service.successfulResponse(resp))) {\n // don't concatenate response chunks when streaming event stream data when response is successful\n return;\n }\n resp.request.emit('httpDone');\n done();\n }\n });\n }\n\n function progress(httpResp) {\n httpResp.on('sendProgress', function onSendProgress(value) {\n resp.request.emit('httpUploadProgress', [value, resp]);\n });\n\n httpResp.on('receiveProgress', function onReceiveProgress(value) {\n resp.request.emit('httpDownloadProgress', [value, resp]);\n });\n }\n\n function error(err) {\n if (err.code !== 'RequestAbortedError') {\n var errCode = err.code === 'TimeoutError' ? err.code : 'NetworkingError';\n err = AWS.util.error(err, {\n code: errCode,\n region: resp.request.httpRequest.region,\n hostname: resp.request.httpRequest.endpoint.hostname,\n retryable: true\n });\n }\n resp.error = err;\n resp.request.emit('httpError', [resp.error, resp], function() {\n done();\n });\n }\n\n function executeSend() {\n var http = AWS.HttpClient.getInstance();\n var httpOptions = resp.request.service.config.httpOptions || {};\n try {\n var stream = http.handleRequest(resp.request.httpRequest, httpOptions,\n callback, error);\n progress(stream);\n } catch (err) {\n error(err);\n }\n }\n var timeDiff = (resp.request.service.getSkewCorrectedDate() - this.signedAt) / 1000;\n if (timeDiff >= 60 * 10) { // if we signed 10min ago, re-sign\n this.emit('sign', [this], function(err) {\n if (err) done(err);\n else executeSend();\n });\n } else {\n executeSend();\n }\n });\n\n add('HTTP_HEADERS', 'httpHeaders',\n function HTTP_HEADERS(statusCode, headers, resp, statusMessage) {\n resp.httpResponse.statusCode = statusCode;\n resp.httpResponse.statusMessage = statusMessage;\n resp.httpResponse.headers = headers;\n resp.httpResponse.body = AWS.util.buffer.toBuffer('');\n resp.httpResponse.buffers = [];\n resp.httpResponse.numBytes = 0;\n var dateHeader = headers.date || headers.Date;\n var service = resp.request.service;\n if (dateHeader) {\n var serverTime = Date.parse(dateHeader);\n if (service.config.correctClockSkew\n && service.isClockSkewed(serverTime)) {\n service.applyClockOffset(serverTime);\n }\n }\n });\n\n add('HTTP_DATA', 'httpData', function HTTP_DATA(chunk, resp) {\n if (chunk) {\n if (AWS.util.isNode()) {\n resp.httpResponse.numBytes += chunk.length;\n\n var total = resp.httpResponse.headers['content-length'];\n var progress = { loaded: resp.httpResponse.numBytes, total: total };\n resp.request.emit('httpDownloadProgress', [progress, resp]);\n }\n\n resp.httpResponse.buffers.push(AWS.util.buffer.toBuffer(chunk));\n }\n });\n\n add('HTTP_DONE', 'httpDone', function HTTP_DONE(resp) {\n // convert buffers array into single buffer\n if (resp.httpResponse.buffers && resp.httpResponse.buffers.length > 0) {\n var body = AWS.util.buffer.concat(resp.httpResponse.buffers);\n resp.httpResponse.body = body;\n }\n delete resp.httpResponse.numBytes;\n delete resp.httpResponse.buffers;\n });\n\n add('FINALIZE_ERROR', 'retry', function FINALIZE_ERROR(resp) {\n if (resp.httpResponse.statusCode) {\n resp.error.statusCode = resp.httpResponse.statusCode;\n if (resp.error.retryable === undefined) {\n resp.error.retryable = this.service.retryableError(resp.error, this);\n }\n }\n });\n\n add('INVALIDATE_CREDENTIALS', 'retry', function INVALIDATE_CREDENTIALS(resp) {\n if (!resp.error) return;\n switch (resp.error.code) {\n case 'RequestExpired': // EC2 only\n case 'ExpiredTokenException':\n case 'ExpiredToken':\n resp.error.retryable = true;\n resp.request.service.config.credentials.expired = true;\n }\n });\n\n add('EXPIRED_SIGNATURE', 'retry', function EXPIRED_SIGNATURE(resp) {\n var err = resp.error;\n if (!err) return;\n if (typeof err.code === 'string' && typeof err.message === 'string') {\n if (err.code.match(/Signature/) && err.message.match(/expired/)) {\n resp.error.retryable = true;\n }\n }\n });\n\n add('CLOCK_SKEWED', 'retry', function CLOCK_SKEWED(resp) {\n if (!resp.error) return;\n if (this.service.clockSkewError(resp.error)\n && this.service.config.correctClockSkew) {\n resp.error.retryable = true;\n }\n });\n\n add('REDIRECT', 'retry', function REDIRECT(resp) {\n if (resp.error && resp.error.statusCode >= 300 &&\n resp.error.statusCode < 400 && resp.httpResponse.headers['location']) {\n this.httpRequest.endpoint =\n new AWS.Endpoint(resp.httpResponse.headers['location']);\n this.httpRequest.headers['Host'] = this.httpRequest.endpoint.host;\n resp.error.redirect = true;\n resp.error.retryable = true;\n }\n });\n\n add('RETRY_CHECK', 'retry', function RETRY_CHECK(resp) {\n if (resp.error) {\n if (resp.error.redirect && resp.redirectCount < resp.maxRedirects) {\n resp.error.retryDelay = 0;\n } else if (resp.retryCount < resp.maxRetries) {\n resp.error.retryDelay = this.service.retryDelays(resp.retryCount, resp.error) || 0;\n }\n }\n });\n\n addAsync('RESET_RETRY_STATE', 'afterRetry', function RESET_RETRY_STATE(resp, done) {\n var delay, willRetry = false;\n\n if (resp.error) {\n delay = resp.error.retryDelay || 0;\n if (resp.error.retryable && resp.retryCount < resp.maxRetries) {\n resp.retryCount++;\n willRetry = true;\n } else if (resp.error.redirect && resp.redirectCount < resp.maxRedirects) {\n resp.redirectCount++;\n willRetry = true;\n }\n }\n\n // delay < 0 is a signal from customBackoff to skip retries\n if (willRetry && delay >= 0) {\n resp.error = null;\n setTimeout(done, delay);\n } else {\n done();\n }\n });\n }),\n\n CorePost: new SequentialExecutor().addNamedListeners(function(add) {\n add('EXTRACT_REQUEST_ID', 'extractData', AWS.util.extractRequestId);\n add('EXTRACT_REQUEST_ID', 'extractError', AWS.util.extractRequestId);\n\n add('ENOTFOUND_ERROR', 'httpError', function ENOTFOUND_ERROR(err) {\n function isDNSError(err) {\n return err.errno === 'ENOTFOUND' ||\n typeof err.errno === 'number' &&\n typeof AWS.util.getSystemErrorName === 'function' &&\n ['EAI_NONAME', 'EAI_NODATA'].indexOf(AWS.util.getSystemErrorName(err.errno) >= 0);\n }\n if (err.code === 'NetworkingError' && isDNSError(err)) {\n var message = 'Inaccessible host: `' + err.hostname +\n '\\'. This service may not be available in the `' + err.region +\n '\\' region.';\n this.response.error = AWS.util.error(new Error(message), {\n code: 'UnknownEndpoint',\n region: err.region,\n hostname: err.hostname,\n retryable: true,\n originalError: err\n });\n }\n });\n }),\n\n Logger: new SequentialExecutor().addNamedListeners(function(add) {\n add('LOG_REQUEST', 'complete', function LOG_REQUEST(resp) {\n var req = resp.request;\n var logger = req.service.config.logger;\n if (!logger) return;\n function filterSensitiveLog(inputShape, shape) {\n if (!shape) {\n return shape;\n }\n if (inputShape.isSensitive) {\n return '***SensitiveInformation***';\n }\n switch (inputShape.type) {\n case 'structure':\n var struct = {};\n AWS.util.each(shape, function(subShapeName, subShape) {\n if (Object.prototype.hasOwnProperty.call(inputShape.members, subShapeName)) {\n struct[subShapeName] = filterSensitiveLog(inputShape.members[subShapeName], subShape);\n } else {\n struct[subShapeName] = subShape;\n }\n });\n return struct;\n case 'list':\n var list = [];\n AWS.util.arrayEach(shape, function(subShape, index) {\n list.push(filterSensitiveLog(inputShape.member, subShape));\n });\n return list;\n case 'map':\n var map = {};\n AWS.util.each(shape, function(key, value) {\n map[key] = filterSensitiveLog(inputShape.value, value);\n });\n return map;\n default:\n return shape;\n }\n }\n\n function buildMessage() {\n var time = resp.request.service.getSkewCorrectedDate().getTime();\n var delta = (time - req.startTime.getTime()) / 1000;\n var ansi = logger.isTTY ? true : false;\n var status = resp.httpResponse.statusCode;\n var censoredParams = req.params;\n if (\n req.service.api.operations &&\n req.service.api.operations[req.operation] &&\n req.service.api.operations[req.operation].input\n ) {\n var inputShape = req.service.api.operations[req.operation].input;\n censoredParams = filterSensitiveLog(inputShape, req.params);\n }\n var params = require('util').inspect(censoredParams, true, null);\n var message = '';\n if (ansi) message += '\\x1B[33m';\n message += '[AWS ' + req.service.serviceIdentifier + ' ' + status;\n message += ' ' + delta.toString() + 's ' + resp.retryCount + ' retries]';\n if (ansi) message += '\\x1B[0;1m';\n message += ' ' + AWS.util.string.lowerFirst(req.operation);\n message += '(' + params + ')';\n if (ansi) message += '\\x1B[0m';\n return message;\n }\n\n var line = buildMessage();\n if (typeof logger.log === 'function') {\n logger.log(line);\n } else if (typeof logger.write === 'function') {\n logger.write(line + '\\n');\n }\n });\n }),\n\n Json: new SequentialExecutor().addNamedListeners(function(add) {\n var svc = require('./protocol/json');\n add('BUILD', 'build', svc.buildRequest);\n add('EXTRACT_DATA', 'extractData', svc.extractData);\n add('EXTRACT_ERROR', 'extractError', svc.extractError);\n }),\n\n Rest: new SequentialExecutor().addNamedListeners(function(add) {\n var svc = require('./protocol/rest');\n add('BUILD', 'build', svc.buildRequest);\n add('EXTRACT_DATA', 'extractData', svc.extractData);\n add('EXTRACT_ERROR', 'extractError', svc.extractError);\n }),\n\n RestJson: new SequentialExecutor().addNamedListeners(function(add) {\n var svc = require('./protocol/rest_json');\n add('BUILD', 'build', svc.buildRequest);\n add('EXTRACT_DATA', 'extractData', svc.extractData);\n add('EXTRACT_ERROR', 'extractError', svc.extractError);\n }),\n\n RestXml: new SequentialExecutor().addNamedListeners(function(add) {\n var svc = require('./protocol/rest_xml');\n add('BUILD', 'build', svc.buildRequest);\n add('EXTRACT_DATA', 'extractData', svc.extractData);\n add('EXTRACT_ERROR', 'extractError', svc.extractError);\n }),\n\n Query: new SequentialExecutor().addNamedListeners(function(add) {\n var svc = require('./protocol/query');\n add('BUILD', 'build', svc.buildRequest);\n add('EXTRACT_DATA', 'extractData', svc.extractData);\n add('EXTRACT_ERROR', 'extractError', svc.extractError);\n })\n};\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['cloudformation'] = {};\nAWS.CloudFormation = Service.defineService('cloudformation', ['2010-05-15']);\nObject.defineProperty(apiLoader.services['cloudformation'], '2010-05-15', {\n get: function get() {\n var model = require('../apis/cloudformation-2010-05-15.min.json');\n model.paginators = require('../apis/cloudformation-2010-05-15.paginators.json').pagination;\n model.waiters = require('../apis/cloudformation-2010-05-15.waiters2.json').waiters;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.CloudFormation;\n","var AWS = require('../core');\n\n/**\n * Creates a credential provider chain that searches for AWS credentials\n * in a list of credential providers specified by the {providers} property.\n *\n * By default, the chain will use the {defaultProviders} to resolve credentials.\n * These providers will look in the environment using the\n * {AWS.EnvironmentCredentials} class with the 'AWS' and 'AMAZON' prefixes.\n *\n * ## Setting Providers\n *\n * Each provider in the {providers} list should be a function that returns\n * a {AWS.Credentials} object, or a hardcoded credentials object. The function\n * form allows for delayed execution of the credential construction.\n *\n * ## Resolving Credentials from a Chain\n *\n * Call {resolve} to return the first valid credential object that can be\n * loaded by the provider chain.\n *\n * For example, to resolve a chain with a custom provider that checks a file\n * on disk after the set of {defaultProviders}:\n *\n * ```javascript\n * var diskProvider = new AWS.FileSystemCredentials('./creds.json');\n * var chain = new AWS.CredentialProviderChain();\n * chain.providers.push(diskProvider);\n * chain.resolve();\n * ```\n *\n * The above code will return the `diskProvider` object if the\n * file contains credentials and the `defaultProviders` do not contain\n * any credential settings.\n *\n * @!attribute providers\n * @return [Array]\n * a list of credentials objects or functions that return credentials\n * objects. If the provider is a function, the function will be\n * executed lazily when the provider needs to be checked for valid\n * credentials. By default, this object will be set to the\n * {defaultProviders}.\n * @see defaultProviders\n */\nAWS.CredentialProviderChain = AWS.util.inherit(AWS.Credentials, {\n\n /**\n * Creates a new CredentialProviderChain with a default set of providers\n * specified by {defaultProviders}.\n */\n constructor: function CredentialProviderChain(providers) {\n if (providers) {\n this.providers = providers;\n } else {\n this.providers = AWS.CredentialProviderChain.defaultProviders.slice(0);\n }\n this.resolveCallbacks = [];\n },\n\n /**\n * @!method resolvePromise()\n * Returns a 'thenable' promise.\n * Resolves the provider chain by searching for the first set of\n * credentials in {providers}.\n *\n * Two callbacks can be provided to the `then` method on the returned promise.\n * The first callback will be called if the promise is fulfilled, and the second\n * callback will be called if the promise is rejected.\n * @callback fulfilledCallback function(credentials)\n * Called if the promise is fulfilled and the provider resolves the chain\n * to a credentials object\n * @param credentials [AWS.Credentials] the credentials object resolved\n * by the provider chain.\n * @callback rejectedCallback function(error)\n * Called if the promise is rejected.\n * @param err [Error] the error object returned if no credentials are found.\n * @return [Promise] A promise that represents the state of the `resolve` method call.\n * @example Calling the `resolvePromise` method.\n * var promise = chain.resolvePromise();\n * promise.then(function(credentials) { ... }, function(err) { ... });\n */\n\n /**\n * Resolves the provider chain by searching for the first set of\n * credentials in {providers}.\n *\n * @callback callback function(err, credentials)\n * Called when the provider resolves the chain to a credentials object\n * or null if no credentials can be found.\n *\n * @param err [Error] the error object returned if no credentials are\n * found.\n * @param credentials [AWS.Credentials] the credentials object resolved\n * by the provider chain.\n * @return [AWS.CredentialProviderChain] the provider, for chaining.\n */\n resolve: function resolve(callback) {\n var self = this;\n if (self.providers.length === 0) {\n callback(new Error('No providers'));\n return self;\n }\n\n if (self.resolveCallbacks.push(callback) === 1) {\n var index = 0;\n var providers = self.providers.slice(0);\n\n function resolveNext(err, creds) {\n if ((!err && creds) || index === providers.length) {\n AWS.util.arrayEach(self.resolveCallbacks, function (callback) {\n callback(err, creds);\n });\n self.resolveCallbacks.length = 0;\n return;\n }\n\n var provider = providers[index++];\n if (typeof provider === 'function') {\n creds = provider.call();\n } else {\n creds = provider;\n }\n\n if (creds.get) {\n creds.get(function (getErr) {\n resolveNext(getErr, getErr ? null : creds);\n });\n } else {\n resolveNext(null, creds);\n }\n }\n\n resolveNext();\n }\n\n return self;\n }\n});\n\n/**\n * The default set of providers used by a vanilla CredentialProviderChain.\n *\n * In the browser:\n *\n * ```javascript\n * AWS.CredentialProviderChain.defaultProviders = []\n * ```\n *\n * In Node.js:\n *\n * ```javascript\n * AWS.CredentialProviderChain.defaultProviders = [\n * function () { return new AWS.EnvironmentCredentials('AWS'); },\n * function () { return new AWS.EnvironmentCredentials('AMAZON'); },\n * function () { return new AWS.SharedIniFileCredentials(); },\n * function () { return new AWS.ECSCredentials(); },\n * function () { return new AWS.ProcessCredentials(); },\n * function () { return new AWS.TokenFileWebIdentityCredentials(); },\n * function () { return new AWS.EC2MetadataCredentials() }\n * ]\n * ```\n */\nAWS.CredentialProviderChain.defaultProviders = [];\n\n/**\n * @api private\n */\nAWS.CredentialProviderChain.addPromisesToClass = function addPromisesToClass(PromiseDependency) {\n this.prototype.resolvePromise = AWS.util.promisifyMethod('resolve', PromiseDependency);\n};\n\n/**\n * @api private\n */\nAWS.CredentialProviderChain.deletePromisesFromClass = function deletePromisesFromClass() {\n delete this.prototype.resolvePromise;\n};\n\nAWS.util.addPromises(AWS.CredentialProviderChain);\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['acm'] = {};\nAWS.ACM = Service.defineService('acm', ['2015-12-08']);\nObject.defineProperty(apiLoader.services['acm'], '2015-12-08', {\n get: function get() {\n var model = require('../apis/acm-2015-12-08.min.json');\n model.paginators = require('../apis/acm-2015-12-08.paginators.json').pagination;\n model.waiters = require('../apis/acm-2015-12-08.waiters2.json').waiters;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.ACM;\n","var AWS = require('../core');\nvar STS = require('../../clients/sts');\n\n/**\n * Represents credentials retrieved from STS SAML support.\n *\n * By default this provider gets credentials using the\n * {AWS.STS.assumeRoleWithSAML} service operation. This operation\n * requires a `RoleArn` containing the ARN of the IAM trust policy for the\n * application for which credentials will be given, as well as a `PrincipalArn`\n * representing the ARN for the SAML identity provider. In addition, the\n * `SAMLAssertion` must be set to the token provided by the identity\n * provider. See {constructor} for an example on creating a credentials\n * object with proper `RoleArn`, `PrincipalArn`, and `SAMLAssertion` values.\n *\n * ## Refreshing Credentials from Identity Service\n *\n * In addition to AWS credentials expiring after a given amount of time, the\n * login token from the identity provider will also expire. Once this token\n * expires, it will not be usable to refresh AWS credentials, and another\n * token will be needed. The SDK does not manage refreshing of the token value,\n * but this can be done through a \"refresh token\" supported by most identity\n * providers. Consult the documentation for the identity provider for refreshing\n * tokens. Once the refreshed token is acquired, you should make sure to update\n * this new token in the credentials object's {params} property. The following\n * code will update the SAMLAssertion, assuming you have retrieved an updated\n * token from the identity provider:\n *\n * ```javascript\n * AWS.config.credentials.params.SAMLAssertion = updatedToken;\n * ```\n *\n * Future calls to `credentials.refresh()` will now use the new token.\n *\n * @!attribute params\n * @return [map] the map of params passed to\n * {AWS.STS.assumeRoleWithSAML}. To update the token, set the\n * `params.SAMLAssertion` property.\n */\nAWS.SAMLCredentials = AWS.util.inherit(AWS.Credentials, {\n /**\n * Creates a new credentials object.\n * @param (see AWS.STS.assumeRoleWithSAML)\n * @example Creating a new credentials object\n * AWS.config.credentials = new AWS.SAMLCredentials({\n * RoleArn: 'arn:aws:iam::1234567890:role/SAMLRole',\n * PrincipalArn: 'arn:aws:iam::1234567890:role/SAMLPrincipal',\n * SAMLAssertion: 'base64-token', // base64-encoded token from IdP\n * });\n * @see AWS.STS.assumeRoleWithSAML\n */\n constructor: function SAMLCredentials(params) {\n AWS.Credentials.call(this);\n this.expired = true;\n this.params = params;\n },\n\n /**\n * Refreshes credentials using {AWS.STS.assumeRoleWithSAML}\n *\n * @callback callback function(err)\n * Called when the STS service responds (or fails). When\n * this callback is called with no error, it means that the credentials\n * information has been loaded into the object (as the `accessKeyId`,\n * `secretAccessKey`, and `sessionToken` properties).\n * @param err [Error] if an error occurred, this value will be filled\n * @see get\n */\n refresh: function refresh(callback) {\n this.coalesceRefresh(callback || AWS.util.fn.callback);\n },\n\n /**\n * @api private\n */\n load: function load(callback) {\n var self = this;\n self.createClients();\n self.service.assumeRoleWithSAML(function (err, data) {\n if (!err) {\n self.service.credentialsFrom(data, self);\n }\n callback(err);\n });\n },\n\n /**\n * @api private\n */\n createClients: function() {\n this.service = this.service || new STS({params: this.params});\n }\n\n});\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['kinesisvideoarchivedmedia'] = {};\nAWS.KinesisVideoArchivedMedia = Service.defineService('kinesisvideoarchivedmedia', ['2017-09-30']);\nObject.defineProperty(apiLoader.services['kinesisvideoarchivedmedia'], '2017-09-30', {\n get: function get() {\n var model = require('../apis/kinesis-video-archived-media-2017-09-30.min.json');\n model.paginators = require('../apis/kinesis-video-archived-media-2017-09-30.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.KinesisVideoArchivedMedia;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['sns'] = {};\nAWS.SNS = Service.defineService('sns', ['2010-03-31']);\nObject.defineProperty(apiLoader.services['sns'], '2010-03-31', {\n get: function get() {\n var model = require('../apis/sns-2010-03-31.min.json');\n model.paginators = require('../apis/sns-2010-03-31.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.SNS;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['mturk'] = {};\nAWS.MTurk = Service.defineService('mturk', ['2017-01-17']);\nObject.defineProperty(apiLoader.services['mturk'], '2017-01-17', {\n get: function get() {\n var model = require('../apis/mturk-requester-2017-01-17.min.json');\n model.paginators = require('../apis/mturk-requester-2017-01-17.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.MTurk;\n","var AWS = require('../core');\n\n/**\n * @api private\n */\nvar service = null;\n\n/**\n * @api private\n */\nvar api = {\n signatureVersion: 'v4',\n signingName: 'rds-db',\n operations: {}\n};\n\n/**\n * @api private\n */\nvar requiredAuthTokenOptions = {\n region: 'string',\n hostname: 'string',\n port: 'number',\n username: 'string'\n};\n\n/**\n * A signer object can be used to generate an auth token to a database.\n */\nAWS.RDS.Signer = AWS.util.inherit({\n /**\n * Creates a signer object can be used to generate an auth token.\n *\n * @option options credentials [AWS.Credentials] the AWS credentials\n * to sign requests with. Uses the default credential provider chain\n * if not specified.\n * @option options hostname [String] the hostname of the database to connect to.\n * @option options port [Number] the port number the database is listening on.\n * @option options region [String] the region the database is located in.\n * @option options username [String] the username to login as.\n * @example Passing in options to constructor\n * var signer = new AWS.RDS.Signer({\n * credentials: new AWS.SharedIniFileCredentials({profile: 'default'}),\n * region: 'us-east-1',\n * hostname: 'db.us-east-1.rds.amazonaws.com',\n * port: 8000,\n * username: 'name'\n * });\n */\n constructor: function Signer(options) {\n this.options = options || {};\n },\n\n /**\n * @api private\n * Strips the protocol from a url.\n */\n convertUrlToAuthToken: function convertUrlToAuthToken(url) {\n // we are always using https as the protocol\n var protocol = 'https://';\n if (url.indexOf(protocol) === 0) {\n return url.substring(protocol.length);\n }\n },\n\n /**\n * @overload getAuthToken(options = {}, [callback])\n * Generate an auth token to a database.\n * @note You must ensure that you have static or previously resolved\n * credentials if you call this method synchronously (with no callback),\n * otherwise it may not properly sign the request. If you cannot guarantee\n * this (you are using an asynchronous credential provider, i.e., EC2\n * IAM roles), you should always call this method with an asynchronous\n * callback.\n *\n * @param options [map] The fields to use when generating an auth token.\n * Any options specified here will be merged on top of any options passed\n * to AWS.RDS.Signer:\n *\n * * **credentials** (AWS.Credentials) — the AWS credentials\n * to sign requests with. Uses the default credential provider chain\n * if not specified.\n * * **hostname** (String) — the hostname of the database to connect to.\n * * **port** (Number) — the port number the database is listening on.\n * * **region** (String) — the region the database is located in.\n * * **username** (String) — the username to login as.\n * @return [String] if called synchronously (with no callback), returns the\n * auth token.\n * @return [null] nothing is returned if a callback is provided.\n * @callback callback function (err, token)\n * If a callback is supplied, it is called when an auth token has been generated.\n * @param err [Error] the error object returned from the signer.\n * @param token [String] the auth token.\n *\n * @example Generating an auth token synchronously\n * var signer = new AWS.RDS.Signer({\n * // configure options\n * region: 'us-east-1',\n * username: 'default',\n * hostname: 'db.us-east-1.amazonaws.com',\n * port: 8000\n * });\n * var token = signer.getAuthToken({\n * // these options are merged with those defined when creating the signer, overriding in the case of a duplicate option\n * // credentials are not specified here or when creating the signer, so default credential provider will be used\n * username: 'test' // overriding username\n * });\n * @example Generating an auth token asynchronously\n * var signer = new AWS.RDS.Signer({\n * // configure options\n * region: 'us-east-1',\n * username: 'default',\n * hostname: 'db.us-east-1.amazonaws.com',\n * port: 8000\n * });\n * signer.getAuthToken({\n * // these options are merged with those defined when creating the signer, overriding in the case of a duplicate option\n * // credentials are not specified here or when creating the signer, so default credential provider will be used\n * username: 'test' // overriding username\n * }, function(err, token) {\n * if (err) {\n * // handle error\n * } else {\n * // use token\n * }\n * });\n *\n */\n getAuthToken: function getAuthToken(options, callback) {\n if (typeof options === 'function' && callback === undefined) {\n callback = options;\n options = {};\n }\n var self = this;\n var hasCallback = typeof callback === 'function';\n // merge options with existing options\n options = AWS.util.merge(this.options, options);\n // validate options\n var optionsValidation = this.validateAuthTokenOptions(options);\n if (optionsValidation !== true) {\n if (hasCallback) {\n return callback(optionsValidation, null);\n }\n throw optionsValidation;\n }\n\n // 15 minutes\n var expires = 900;\n // create service to generate a request from\n var serviceOptions = {\n region: options.region,\n endpoint: new AWS.Endpoint(options.hostname + ':' + options.port),\n paramValidation: false,\n signatureVersion: 'v4'\n };\n if (options.credentials) {\n serviceOptions.credentials = options.credentials;\n }\n service = new AWS.Service(serviceOptions);\n // ensure the SDK is using sigv4 signing (config is not enough)\n service.api = api;\n\n var request = service.makeRequest();\n // add listeners to request to properly build auth token\n this.modifyRequestForAuthToken(request, options);\n\n if (hasCallback) {\n request.presign(expires, function(err, url) {\n if (url) {\n url = self.convertUrlToAuthToken(url);\n }\n callback(err, url);\n });\n } else {\n var url = request.presign(expires);\n return this.convertUrlToAuthToken(url);\n }\n },\n\n /**\n * @api private\n * Modifies a request to allow the presigner to generate an auth token.\n */\n modifyRequestForAuthToken: function modifyRequestForAuthToken(request, options) {\n request.on('build', request.buildAsGet);\n var httpRequest = request.httpRequest;\n httpRequest.body = AWS.util.queryParamsToString({\n Action: 'connect',\n DBUser: options.username\n });\n },\n\n /**\n * @api private\n * Validates that the options passed in contain all the keys with values of the correct type that\n * are needed to generate an auth token.\n */\n validateAuthTokenOptions: function validateAuthTokenOptions(options) {\n // iterate over all keys in options\n var message = '';\n options = options || {};\n for (var key in requiredAuthTokenOptions) {\n if (!Object.prototype.hasOwnProperty.call(requiredAuthTokenOptions, key)) {\n continue;\n }\n if (typeof options[key] !== requiredAuthTokenOptions[key]) {\n message += 'option \\'' + key + '\\' should have been type \\'' + requiredAuthTokenOptions[key] + '\\', was \\'' + typeof options[key] + '\\'.\\n';\n }\n }\n if (message.length) {\n return AWS.util.error(new Error(), {\n code: 'InvalidParameter',\n message: message\n });\n }\n return true;\n }\n});\n","var util = require('../util');\nvar XmlNode = require('./xml-node').XmlNode;\nvar XmlText = require('./xml-text').XmlText;\n\nfunction XmlBuilder() { }\n\nXmlBuilder.prototype.toXML = function(params, shape, rootElement, noEmpty) {\n var xml = new XmlNode(rootElement);\n applyNamespaces(xml, shape, true);\n serialize(xml, params, shape);\n return xml.children.length > 0 || noEmpty ? xml.toString() : '';\n};\n\nfunction serialize(xml, value, shape) {\n switch (shape.type) {\n case 'structure': return serializeStructure(xml, value, shape);\n case 'map': return serializeMap(xml, value, shape);\n case 'list': return serializeList(xml, value, shape);\n default: return serializeScalar(xml, value, shape);\n }\n}\n\nfunction serializeStructure(xml, params, shape) {\n util.arrayEach(shape.memberNames, function(memberName) {\n var memberShape = shape.members[memberName];\n if (memberShape.location !== 'body') return;\n\n var value = params[memberName];\n var name = memberShape.name;\n if (value !== undefined && value !== null) {\n if (memberShape.isXmlAttribute) {\n xml.addAttribute(name, value);\n } else if (memberShape.flattened) {\n serialize(xml, value, memberShape);\n } else {\n var element = new XmlNode(name);\n xml.addChildNode(element);\n applyNamespaces(element, memberShape);\n serialize(element, value, memberShape);\n }\n }\n });\n}\n\nfunction serializeMap(xml, map, shape) {\n var xmlKey = shape.key.name || 'key';\n var xmlValue = shape.value.name || 'value';\n\n util.each(map, function(key, value) {\n var entry = new XmlNode(shape.flattened ? shape.name : 'entry');\n xml.addChildNode(entry);\n\n var entryKey = new XmlNode(xmlKey);\n var entryValue = new XmlNode(xmlValue);\n entry.addChildNode(entryKey);\n entry.addChildNode(entryValue);\n\n serialize(entryKey, key, shape.key);\n serialize(entryValue, value, shape.value);\n });\n}\n\nfunction serializeList(xml, list, shape) {\n if (shape.flattened) {\n util.arrayEach(list, function(value) {\n var name = shape.member.name || shape.name;\n var element = new XmlNode(name);\n xml.addChildNode(element);\n serialize(element, value, shape.member);\n });\n } else {\n util.arrayEach(list, function(value) {\n var name = shape.member.name || 'member';\n var element = new XmlNode(name);\n xml.addChildNode(element);\n serialize(element, value, shape.member);\n });\n }\n}\n\nfunction serializeScalar(xml, value, shape) {\n xml.addChildNode(\n new XmlText(shape.toWireFormat(value))\n );\n}\n\nfunction applyNamespaces(xml, shape, isRoot) {\n var uri, prefix = 'xmlns';\n if (shape.xmlNamespaceUri) {\n uri = shape.xmlNamespaceUri;\n if (shape.xmlNamespacePrefix) prefix += ':' + shape.xmlNamespacePrefix;\n } else if (isRoot && shape.api.xmlNamespaceUri) {\n uri = shape.api.xmlNamespaceUri;\n }\n\n if (uri) xml.addAttribute(prefix, uri);\n}\n\n/**\n * @api private\n */\nmodule.exports = XmlBuilder;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['cloudwatch'] = {};\nAWS.CloudWatch = Service.defineService('cloudwatch', ['2010-08-01']);\nObject.defineProperty(apiLoader.services['cloudwatch'], '2010-08-01', {\n get: function get() {\n var model = require('../apis/monitoring-2010-08-01.min.json');\n model.paginators = require('../apis/monitoring-2010-08-01.paginators.json').pagination;\n model.waiters = require('../apis/monitoring-2010-08-01.waiters2.json').waiters;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.CloudWatch;\n","var Buffer = require('buffer/').Buffer;\nvar hashUtils = require('./browserHashUtils');\n\nvar BLOCK_SIZE = 64;\n\nvar DIGEST_LENGTH = 20;\n\nvar KEY = new Uint32Array([\n 0x5a827999,\n 0x6ed9eba1,\n 0x8f1bbcdc | 0,\n 0xca62c1d6 | 0\n]);\n\nvar INIT = [\n 0x6a09e667,\n 0xbb67ae85,\n 0x3c6ef372,\n 0xa54ff53a,\n 0x510e527f,\n 0x9b05688c,\n 0x1f83d9ab,\n 0x5be0cd19,\n];\n\nvar MAX_HASHABLE_LENGTH = Math.pow(2, 53) - 1;\n\n/**\n * @api private\n */\nfunction Sha1() {\n this.h0 = 0x67452301;\n this.h1 = 0xEFCDAB89;\n this.h2 = 0x98BADCFE;\n this.h3 = 0x10325476;\n this.h4 = 0xC3D2E1F0;\n // The first 64 bytes (16 words) is the data chunk\n this.block = new Uint32Array(80);\n this.offset = 0;\n this.shift = 24;\n this.totalLength = 0;\n}\n\n/**\n * @api private\n */\nmodule.exports = exports = Sha1;\n\nSha1.BLOCK_SIZE = BLOCK_SIZE;\n\nSha1.prototype.update = function (data) {\n if (this.finished) {\n throw new Error('Attempted to update an already finished hash.');\n }\n\n if (hashUtils.isEmptyData(data)) {\n return this;\n }\n\n data = hashUtils.convertToBuffer(data);\n\n var length = data.length;\n this.totalLength += length * 8;\n for (var i = 0; i < length; i++) {\n this.write(data[i]);\n }\n\n return this;\n};\n\nSha1.prototype.write = function write(byte) {\n this.block[this.offset] |= (byte & 0xff) << this.shift;\n if (this.shift) {\n this.shift -= 8;\n } else {\n this.offset++;\n this.shift = 24;\n }\n\n if (this.offset === 16) this.processBlock();\n};\n\nSha1.prototype.digest = function (encoding) {\n // Pad\n this.write(0x80);\n if (this.offset > 14 || (this.offset === 14 && this.shift < 24)) {\n this.processBlock();\n }\n this.offset = 14;\n this.shift = 24;\n\n // 64-bit length big-endian\n this.write(0x00); // numbers this big aren't accurate in javascript anyway\n this.write(0x00); // ..So just hard-code to zero.\n this.write(this.totalLength > 0xffffffffff ? this.totalLength / 0x10000000000 : 0x00);\n this.write(this.totalLength > 0xffffffff ? this.totalLength / 0x100000000 : 0x00);\n for (var s = 24; s >= 0; s -= 8) {\n this.write(this.totalLength >> s);\n }\n // The value in state is little-endian rather than big-endian, so flip\n // each word into a new Uint8Array\n var out = new Buffer(DIGEST_LENGTH);\n var outView = new DataView(out.buffer);\n outView.setUint32(0, this.h0, false);\n outView.setUint32(4, this.h1, false);\n outView.setUint32(8, this.h2, false);\n outView.setUint32(12, this.h3, false);\n outView.setUint32(16, this.h4, false);\n\n return encoding ? out.toString(encoding) : out;\n};\n\nSha1.prototype.processBlock = function processBlock() {\n // Extend the sixteen 32-bit words into eighty 32-bit words:\n for (var i = 16; i < 80; i++) {\n var w = this.block[i - 3] ^ this.block[i - 8] ^ this.block[i - 14] ^ this.block[i - 16];\n this.block[i] = (w << 1) | (w >>> 31);\n }\n\n // Initialize hash value for this chunk:\n var a = this.h0;\n var b = this.h1;\n var c = this.h2;\n var d = this.h3;\n var e = this.h4;\n var f, k;\n\n // Main loop:\n for (i = 0; i < 80; i++) {\n if (i < 20) {\n f = d ^ (b & (c ^ d));\n k = 0x5A827999;\n }\n else if (i < 40) {\n f = b ^ c ^ d;\n k = 0x6ED9EBA1;\n }\n else if (i < 60) {\n f = (b & c) | (d & (b | c));\n k = 0x8F1BBCDC;\n }\n else {\n f = b ^ c ^ d;\n k = 0xCA62C1D6;\n }\n var temp = (a << 5 | a >>> 27) + f + e + k + (this.block[i]|0);\n e = d;\n d = c;\n c = (b << 30 | b >>> 2);\n b = a;\n a = temp;\n }\n\n // Add this chunk's hash to result so far:\n this.h0 = (this.h0 + a) | 0;\n this.h1 = (this.h1 + b) | 0;\n this.h2 = (this.h2 + c) | 0;\n this.h3 = (this.h3 + d) | 0;\n this.h4 = (this.h4 + e) | 0;\n\n // The block is now reusable.\n this.offset = 0;\n for (i = 0; i < 16; i++) {\n this.block[i] = 0;\n }\n};\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['forecastqueryservice'] = {};\nAWS.ForecastQueryService = Service.defineService('forecastqueryservice', ['2018-06-26']);\nObject.defineProperty(apiLoader.services['forecastqueryservice'], '2018-06-26', {\n get: function get() {\n var model = require('../apis/forecastquery-2018-06-26.min.json');\n model.paginators = require('../apis/forecastquery-2018-06-26.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.ForecastQueryService;\n","var hashUtils = require('./browserHashUtils');\nvar Buffer = require('buffer/').Buffer;\n\nvar BLOCK_SIZE = 64;\n\nvar DIGEST_LENGTH = 16;\n\nvar INIT = [\n 0x67452301,\n 0xefcdab89,\n 0x98badcfe,\n 0x10325476,\n];\n\n/**\n * @api private\n */\nfunction Md5() {\n this.state = [\n 0x67452301,\n 0xefcdab89,\n 0x98badcfe,\n 0x10325476,\n ];\n this.buffer = new DataView(new ArrayBuffer(BLOCK_SIZE));\n this.bufferLength = 0;\n this.bytesHashed = 0;\n this.finished = false;\n}\n\n/**\n * @api private\n */\nmodule.exports = exports = Md5;\n\nMd5.BLOCK_SIZE = BLOCK_SIZE;\n\nMd5.prototype.update = function (sourceData) {\n if (hashUtils.isEmptyData(sourceData)) {\n return this;\n } else if (this.finished) {\n throw new Error('Attempted to update an already finished hash.');\n }\n\n var data = hashUtils.convertToBuffer(sourceData);\n var position = 0;\n var byteLength = data.byteLength;\n this.bytesHashed += byteLength;\n while (byteLength > 0) {\n this.buffer.setUint8(this.bufferLength++, data[position++]);\n byteLength--;\n if (this.bufferLength === BLOCK_SIZE) {\n this.hashBuffer();\n this.bufferLength = 0;\n }\n }\n\n return this;\n};\n\nMd5.prototype.digest = function (encoding) {\n if (!this.finished) {\n var _a = this, buffer = _a.buffer, undecoratedLength = _a.bufferLength, bytesHashed = _a.bytesHashed;\n var bitsHashed = bytesHashed * 8;\n buffer.setUint8(this.bufferLength++, 128);\n // Ensure the final block has enough room for the hashed length\n if (undecoratedLength % BLOCK_SIZE >= BLOCK_SIZE - 8) {\n for (var i = this.bufferLength; i < BLOCK_SIZE; i++) {\n buffer.setUint8(i, 0);\n }\n this.hashBuffer();\n this.bufferLength = 0;\n }\n for (var i = this.bufferLength; i < BLOCK_SIZE - 8; i++) {\n buffer.setUint8(i, 0);\n }\n buffer.setUint32(BLOCK_SIZE - 8, bitsHashed >>> 0, true);\n buffer.setUint32(BLOCK_SIZE - 4, Math.floor(bitsHashed / 0x100000000), true);\n this.hashBuffer();\n this.finished = true;\n }\n var out = new DataView(new ArrayBuffer(DIGEST_LENGTH));\n for (var i = 0; i < 4; i++) {\n out.setUint32(i * 4, this.state[i], true);\n }\n var buff = new Buffer(out.buffer, out.byteOffset, out.byteLength);\n return encoding ? buff.toString(encoding) : buff;\n};\n\nMd5.prototype.hashBuffer = function () {\n var _a = this, buffer = _a.buffer, state = _a.state;\n var a = state[0], b = state[1], c = state[2], d = state[3];\n a = ff(a, b, c, d, buffer.getUint32(0, true), 7, 0xd76aa478);\n d = ff(d, a, b, c, buffer.getUint32(4, true), 12, 0xe8c7b756);\n c = ff(c, d, a, b, buffer.getUint32(8, true), 17, 0x242070db);\n b = ff(b, c, d, a, buffer.getUint32(12, true), 22, 0xc1bdceee);\n a = ff(a, b, c, d, buffer.getUint32(16, true), 7, 0xf57c0faf);\n d = ff(d, a, b, c, buffer.getUint32(20, true), 12, 0x4787c62a);\n c = ff(c, d, a, b, buffer.getUint32(24, true), 17, 0xa8304613);\n b = ff(b, c, d, a, buffer.getUint32(28, true), 22, 0xfd469501);\n a = ff(a, b, c, d, buffer.getUint32(32, true), 7, 0x698098d8);\n d = ff(d, a, b, c, buffer.getUint32(36, true), 12, 0x8b44f7af);\n c = ff(c, d, a, b, buffer.getUint32(40, true), 17, 0xffff5bb1);\n b = ff(b, c, d, a, buffer.getUint32(44, true), 22, 0x895cd7be);\n a = ff(a, b, c, d, buffer.getUint32(48, true), 7, 0x6b901122);\n d = ff(d, a, b, c, buffer.getUint32(52, true), 12, 0xfd987193);\n c = ff(c, d, a, b, buffer.getUint32(56, true), 17, 0xa679438e);\n b = ff(b, c, d, a, buffer.getUint32(60, true), 22, 0x49b40821);\n a = gg(a, b, c, d, buffer.getUint32(4, true), 5, 0xf61e2562);\n d = gg(d, a, b, c, buffer.getUint32(24, true), 9, 0xc040b340);\n c = gg(c, d, a, b, buffer.getUint32(44, true), 14, 0x265e5a51);\n b = gg(b, c, d, a, buffer.getUint32(0, true), 20, 0xe9b6c7aa);\n a = gg(a, b, c, d, buffer.getUint32(20, true), 5, 0xd62f105d);\n d = gg(d, a, b, c, buffer.getUint32(40, true), 9, 0x02441453);\n c = gg(c, d, a, b, buffer.getUint32(60, true), 14, 0xd8a1e681);\n b = gg(b, c, d, a, buffer.getUint32(16, true), 20, 0xe7d3fbc8);\n a = gg(a, b, c, d, buffer.getUint32(36, true), 5, 0x21e1cde6);\n d = gg(d, a, b, c, buffer.getUint32(56, true), 9, 0xc33707d6);\n c = gg(c, d, a, b, buffer.getUint32(12, true), 14, 0xf4d50d87);\n b = gg(b, c, d, a, buffer.getUint32(32, true), 20, 0x455a14ed);\n a = gg(a, b, c, d, buffer.getUint32(52, true), 5, 0xa9e3e905);\n d = gg(d, a, b, c, buffer.getUint32(8, true), 9, 0xfcefa3f8);\n c = gg(c, d, a, b, buffer.getUint32(28, true), 14, 0x676f02d9);\n b = gg(b, c, d, a, buffer.getUint32(48, true), 20, 0x8d2a4c8a);\n a = hh(a, b, c, d, buffer.getUint32(20, true), 4, 0xfffa3942);\n d = hh(d, a, b, c, buffer.getUint32(32, true), 11, 0x8771f681);\n c = hh(c, d, a, b, buffer.getUint32(44, true), 16, 0x6d9d6122);\n b = hh(b, c, d, a, buffer.getUint32(56, true), 23, 0xfde5380c);\n a = hh(a, b, c, d, buffer.getUint32(4, true), 4, 0xa4beea44);\n d = hh(d, a, b, c, buffer.getUint32(16, true), 11, 0x4bdecfa9);\n c = hh(c, d, a, b, buffer.getUint32(28, true), 16, 0xf6bb4b60);\n b = hh(b, c, d, a, buffer.getUint32(40, true), 23, 0xbebfbc70);\n a = hh(a, b, c, d, buffer.getUint32(52, true), 4, 0x289b7ec6);\n d = hh(d, a, b, c, buffer.getUint32(0, true), 11, 0xeaa127fa);\n c = hh(c, d, a, b, buffer.getUint32(12, true), 16, 0xd4ef3085);\n b = hh(b, c, d, a, buffer.getUint32(24, true), 23, 0x04881d05);\n a = hh(a, b, c, d, buffer.getUint32(36, true), 4, 0xd9d4d039);\n d = hh(d, a, b, c, buffer.getUint32(48, true), 11, 0xe6db99e5);\n c = hh(c, d, a, b, buffer.getUint32(60, true), 16, 0x1fa27cf8);\n b = hh(b, c, d, a, buffer.getUint32(8, true), 23, 0xc4ac5665);\n a = ii(a, b, c, d, buffer.getUint32(0, true), 6, 0xf4292244);\n d = ii(d, a, b, c, buffer.getUint32(28, true), 10, 0x432aff97);\n c = ii(c, d, a, b, buffer.getUint32(56, true), 15, 0xab9423a7);\n b = ii(b, c, d, a, buffer.getUint32(20, true), 21, 0xfc93a039);\n a = ii(a, b, c, d, buffer.getUint32(48, true), 6, 0x655b59c3);\n d = ii(d, a, b, c, buffer.getUint32(12, true), 10, 0x8f0ccc92);\n c = ii(c, d, a, b, buffer.getUint32(40, true), 15, 0xffeff47d);\n b = ii(b, c, d, a, buffer.getUint32(4, true), 21, 0x85845dd1);\n a = ii(a, b, c, d, buffer.getUint32(32, true), 6, 0x6fa87e4f);\n d = ii(d, a, b, c, buffer.getUint32(60, true), 10, 0xfe2ce6e0);\n c = ii(c, d, a, b, buffer.getUint32(24, true), 15, 0xa3014314);\n b = ii(b, c, d, a, buffer.getUint32(52, true), 21, 0x4e0811a1);\n a = ii(a, b, c, d, buffer.getUint32(16, true), 6, 0xf7537e82);\n d = ii(d, a, b, c, buffer.getUint32(44, true), 10, 0xbd3af235);\n c = ii(c, d, a, b, buffer.getUint32(8, true), 15, 0x2ad7d2bb);\n b = ii(b, c, d, a, buffer.getUint32(36, true), 21, 0xeb86d391);\n state[0] = (a + state[0]) & 0xFFFFFFFF;\n state[1] = (b + state[1]) & 0xFFFFFFFF;\n state[2] = (c + state[2]) & 0xFFFFFFFF;\n state[3] = (d + state[3]) & 0xFFFFFFFF;\n};\n\nfunction cmn(q, a, b, x, s, t) {\n a = (((a + q) & 0xFFFFFFFF) + ((x + t) & 0xFFFFFFFF)) & 0xFFFFFFFF;\n return (((a << s) | (a >>> (32 - s))) + b) & 0xFFFFFFFF;\n}\n\nfunction ff(a, b, c, d, x, s, t) {\n return cmn((b & c) | ((~b) & d), a, b, x, s, t);\n}\n\nfunction gg(a, b, c, d, x, s, t) {\n return cmn((b & d) | (c & (~d)), a, b, x, s, t);\n}\n\nfunction hh(a, b, c, d, x, s, t) {\n return cmn(b ^ c ^ d, a, b, x, s, t);\n}\n\nfunction ii(a, b, c, d, x, s, t) {\n return cmn(c ^ (b | (~d)), a, b, x, s, t);\n}\n","var AWS = require('../core');\nvar resolveRegionalEndpointsFlag = require('../config_regional_endpoint');\nvar ENV_REGIONAL_ENDPOINT_ENABLED = 'AWS_STS_REGIONAL_ENDPOINTS';\nvar CONFIG_REGIONAL_ENDPOINT_ENABLED = 'sts_regional_endpoints';\n\nAWS.util.update(AWS.STS.prototype, {\n /**\n * @overload credentialsFrom(data, credentials = null)\n * Creates a credentials object from STS response data containing\n * credentials information. Useful for quickly setting AWS credentials.\n *\n * @note This is a low-level utility function. If you want to load temporary\n * credentials into your process for subsequent requests to AWS resources,\n * you should use {AWS.TemporaryCredentials} instead.\n * @param data [map] data retrieved from a call to {getFederatedToken},\n * {getSessionToken}, {assumeRole}, or {assumeRoleWithWebIdentity}.\n * @param credentials [AWS.Credentials] an optional credentials object to\n * fill instead of creating a new object. Useful when modifying an\n * existing credentials object from a refresh call.\n * @return [AWS.TemporaryCredentials] the set of temporary credentials\n * loaded from a raw STS operation response.\n * @example Using credentialsFrom to load global AWS credentials\n * var sts = new AWS.STS();\n * sts.getSessionToken(function (err, data) {\n * if (err) console.log(\"Error getting credentials\");\n * else {\n * AWS.config.credentials = sts.credentialsFrom(data);\n * }\n * });\n * @see AWS.TemporaryCredentials\n */\n credentialsFrom: function credentialsFrom(data, credentials) {\n if (!data) return null;\n if (!credentials) credentials = new AWS.TemporaryCredentials();\n credentials.expired = false;\n credentials.accessKeyId = data.Credentials.AccessKeyId;\n credentials.secretAccessKey = data.Credentials.SecretAccessKey;\n credentials.sessionToken = data.Credentials.SessionToken;\n credentials.expireTime = data.Credentials.Expiration;\n return credentials;\n },\n\n assumeRoleWithWebIdentity: function assumeRoleWithWebIdentity(params, callback) {\n return this.makeUnauthenticatedRequest('assumeRoleWithWebIdentity', params, callback);\n },\n\n assumeRoleWithSAML: function assumeRoleWithSAML(params, callback) {\n return this.makeUnauthenticatedRequest('assumeRoleWithSAML', params, callback);\n },\n\n /**\n * @api private\n */\n setupRequestListeners: function setupRequestListeners(request) {\n request.addListener('validate', this.optInRegionalEndpoint, true);\n },\n\n /**\n * @api private\n */\n optInRegionalEndpoint: function optInRegionalEndpoint(req) {\n var service = req.service;\n var config = service.config;\n config.stsRegionalEndpoints = resolveRegionalEndpointsFlag(service._originalConfig, {\n env: ENV_REGIONAL_ENDPOINT_ENABLED,\n sharedConfig: CONFIG_REGIONAL_ENDPOINT_ENABLED,\n clientConfig: 'stsRegionalEndpoints'\n });\n if (\n config.stsRegionalEndpoints === 'regional' &&\n service.isGlobalEndpoint\n ) {\n //client will throw if region is not supplied; request will be signed with specified region\n if (!config.region) {\n throw AWS.util.error(new Error(),\n {code: 'ConfigError', message: 'Missing region in config'});\n }\n var insertPoint = config.endpoint.indexOf('.amazonaws.com');\n var regionalEndpoint = config.endpoint.substring(0, insertPoint) +\n '.' + config.region + config.endpoint.substring(insertPoint);\n req.httpRequest.updateEndpoint(regionalEndpoint);\n req.httpRequest.region = config.region;\n }\n }\n\n});\n","var Buffer = require('buffer/').Buffer;\nvar hashUtils = require('./browserHashUtils');\n\nvar BLOCK_SIZE = 64;\n\nvar DIGEST_LENGTH = 32;\n\nvar KEY = new Uint32Array([\n 0x428a2f98,\n 0x71374491,\n 0xb5c0fbcf,\n 0xe9b5dba5,\n 0x3956c25b,\n 0x59f111f1,\n 0x923f82a4,\n 0xab1c5ed5,\n 0xd807aa98,\n 0x12835b01,\n 0x243185be,\n 0x550c7dc3,\n 0x72be5d74,\n 0x80deb1fe,\n 0x9bdc06a7,\n 0xc19bf174,\n 0xe49b69c1,\n 0xefbe4786,\n 0x0fc19dc6,\n 0x240ca1cc,\n 0x2de92c6f,\n 0x4a7484aa,\n 0x5cb0a9dc,\n 0x76f988da,\n 0x983e5152,\n 0xa831c66d,\n 0xb00327c8,\n 0xbf597fc7,\n 0xc6e00bf3,\n 0xd5a79147,\n 0x06ca6351,\n 0x14292967,\n 0x27b70a85,\n 0x2e1b2138,\n 0x4d2c6dfc,\n 0x53380d13,\n 0x650a7354,\n 0x766a0abb,\n 0x81c2c92e,\n 0x92722c85,\n 0xa2bfe8a1,\n 0xa81a664b,\n 0xc24b8b70,\n 0xc76c51a3,\n 0xd192e819,\n 0xd6990624,\n 0xf40e3585,\n 0x106aa070,\n 0x19a4c116,\n 0x1e376c08,\n 0x2748774c,\n 0x34b0bcb5,\n 0x391c0cb3,\n 0x4ed8aa4a,\n 0x5b9cca4f,\n 0x682e6ff3,\n 0x748f82ee,\n 0x78a5636f,\n 0x84c87814,\n 0x8cc70208,\n 0x90befffa,\n 0xa4506ceb,\n 0xbef9a3f7,\n 0xc67178f2\n]);\n\nvar INIT = [\n 0x6a09e667,\n 0xbb67ae85,\n 0x3c6ef372,\n 0xa54ff53a,\n 0x510e527f,\n 0x9b05688c,\n 0x1f83d9ab,\n 0x5be0cd19,\n];\n\nvar MAX_HASHABLE_LENGTH = Math.pow(2, 53) - 1;\n\n/**\n * @private\n */\nfunction Sha256() {\n this.state = [\n 0x6a09e667,\n 0xbb67ae85,\n 0x3c6ef372,\n 0xa54ff53a,\n 0x510e527f,\n 0x9b05688c,\n 0x1f83d9ab,\n 0x5be0cd19,\n ];\n this.temp = new Int32Array(64);\n this.buffer = new Uint8Array(64);\n this.bufferLength = 0;\n this.bytesHashed = 0;\n /**\n * @private\n */\n this.finished = false;\n}\n\n/**\n * @api private\n */\nmodule.exports = exports = Sha256;\n\nSha256.BLOCK_SIZE = BLOCK_SIZE;\n\nSha256.prototype.update = function (data) {\n if (this.finished) {\n throw new Error('Attempted to update an already finished hash.');\n }\n\n if (hashUtils.isEmptyData(data)) {\n return this;\n }\n\n data = hashUtils.convertToBuffer(data);\n\n var position = 0;\n var byteLength = data.byteLength;\n this.bytesHashed += byteLength;\n if (this.bytesHashed * 8 > MAX_HASHABLE_LENGTH) {\n throw new Error('Cannot hash more than 2^53 - 1 bits');\n }\n\n while (byteLength > 0) {\n this.buffer[this.bufferLength++] = data[position++];\n byteLength--;\n if (this.bufferLength === BLOCK_SIZE) {\n this.hashBuffer();\n this.bufferLength = 0;\n }\n }\n\n return this;\n};\n\nSha256.prototype.digest = function (encoding) {\n if (!this.finished) {\n var bitsHashed = this.bytesHashed * 8;\n var bufferView = new DataView(this.buffer.buffer, this.buffer.byteOffset, this.buffer.byteLength);\n var undecoratedLength = this.bufferLength;\n bufferView.setUint8(this.bufferLength++, 0x80);\n // Ensure the final block has enough room for the hashed length\n if (undecoratedLength % BLOCK_SIZE >= BLOCK_SIZE - 8) {\n for (var i = this.bufferLength; i < BLOCK_SIZE; i++) {\n bufferView.setUint8(i, 0);\n }\n this.hashBuffer();\n this.bufferLength = 0;\n }\n for (var i = this.bufferLength; i < BLOCK_SIZE - 8; i++) {\n bufferView.setUint8(i, 0);\n }\n bufferView.setUint32(BLOCK_SIZE - 8, Math.floor(bitsHashed / 0x100000000), true);\n bufferView.setUint32(BLOCK_SIZE - 4, bitsHashed);\n this.hashBuffer();\n this.finished = true;\n }\n // The value in state is little-endian rather than big-endian, so flip\n // each word into a new Uint8Array\n var out = new Buffer(DIGEST_LENGTH);\n for (var i = 0; i < 8; i++) {\n out[i * 4] = (this.state[i] >>> 24) & 0xff;\n out[i * 4 + 1] = (this.state[i] >>> 16) & 0xff;\n out[i * 4 + 2] = (this.state[i] >>> 8) & 0xff;\n out[i * 4 + 3] = (this.state[i] >>> 0) & 0xff;\n }\n return encoding ? out.toString(encoding) : out;\n};\n\nSha256.prototype.hashBuffer = function () {\n var _a = this,\n buffer = _a.buffer,\n state = _a.state;\n var state0 = state[0],\n state1 = state[1],\n state2 = state[2],\n state3 = state[3],\n state4 = state[4],\n state5 = state[5],\n state6 = state[6],\n state7 = state[7];\n for (var i = 0; i < BLOCK_SIZE; i++) {\n if (i < 16) {\n this.temp[i] = (((buffer[i * 4] & 0xff) << 24) |\n ((buffer[(i * 4) + 1] & 0xff) << 16) |\n ((buffer[(i * 4) + 2] & 0xff) << 8) |\n (buffer[(i * 4) + 3] & 0xff));\n }\n else {\n var u = this.temp[i - 2];\n var t1_1 = (u >>> 17 | u << 15) ^\n (u >>> 19 | u << 13) ^\n (u >>> 10);\n u = this.temp[i - 15];\n var t2_1 = (u >>> 7 | u << 25) ^\n (u >>> 18 | u << 14) ^\n (u >>> 3);\n this.temp[i] = (t1_1 + this.temp[i - 7] | 0) +\n (t2_1 + this.temp[i - 16] | 0);\n }\n var t1 = (((((state4 >>> 6 | state4 << 26) ^\n (state4 >>> 11 | state4 << 21) ^\n (state4 >>> 25 | state4 << 7))\n + ((state4 & state5) ^ (~state4 & state6))) | 0)\n + ((state7 + ((KEY[i] + this.temp[i]) | 0)) | 0)) | 0;\n var t2 = (((state0 >>> 2 | state0 << 30) ^\n (state0 >>> 13 | state0 << 19) ^\n (state0 >>> 22 | state0 << 10)) + ((state0 & state1) ^ (state0 & state2) ^ (state1 & state2))) | 0;\n state7 = state6;\n state6 = state5;\n state5 = state4;\n state4 = (state3 + t1) | 0;\n state3 = state2;\n state2 = state1;\n state1 = state0;\n state0 = (t1 + t2) | 0;\n }\n state[0] += state0;\n state[1] += state1;\n state[2] += state2;\n state[3] += state3;\n state[4] += state4;\n state[5] += state5;\n state[6] += state6;\n state[7] += state7;\n};\n","var AWS = require('../core');\nvar regionUtil = require('../region_config');\n\nvar s3util = {\n /**\n * @api private\n */\n isArnInParam: function isArnInParam(req, paramName) {\n var inputShape = (req.service.api.operations[req.operation] || {}).input || {};\n var inputMembers = inputShape.members || {};\n if (!req.params[paramName] || !inputMembers[paramName]) return false;\n return AWS.util.ARN.validate(req.params[paramName]);\n },\n\n /**\n * Validate service component from ARN supplied in Bucket parameter\n */\n validateArnService: function validateArnService(req) {\n var parsedArn = req.service._parsedArn;\n\n if (parsedArn.service !== 's3' && parsedArn.service !== 's3-outposts') {\n throw AWS.util.error(new Error(), {\n code: 'InvalidARN',\n message: 'expect \\'s3\\' or \\'s3-outposts\\' in ARN service component'\n });\n }\n },\n\n /**\n * Validate account ID from ARN supplied in Bucket parameter is a valid account\n */\n validateArnAccount: function validateArnAccount(req) {\n var parsedArn = req.service._parsedArn;\n\n if (!/[0-9]{12}/.exec(parsedArn.accountId)) {\n throw AWS.util.error(new Error(), {\n code: 'InvalidARN',\n message: 'ARN accountID does not match regex \"[0-9]{12}\"'\n });\n }\n },\n\n /**\n * Validate ARN supplied in Bucket parameter is a valid access point ARN\n */\n validateS3AccessPointArn: function validateS3AccessPointArn(req) {\n var parsedArn = req.service._parsedArn;\n\n //can be ':' or '/'\n var delimiter = parsedArn.resource['accesspoint'.length];\n\n if (parsedArn.resource.split(delimiter).length !== 2) {\n throw AWS.util.error(new Error(), {\n code: 'InvalidARN',\n message: 'Access Point ARN should have one resource accesspoint/{accesspointName}'\n });\n }\n\n var accessPoint = parsedArn.resource.split(delimiter)[1];\n var accessPointPrefix = accessPoint + '-' + parsedArn.accountId;\n if (!s3util.dnsCompatibleBucketName(accessPointPrefix) || accessPointPrefix.match(/\\./)) {\n throw AWS.util.error(new Error(), {\n code: 'InvalidARN',\n message: 'Access point resource in ARN is not DNS compatible. Got ' + accessPoint\n });\n }\n\n //set parsed valid access point\n req.service._parsedArn.accessPoint = accessPoint;\n },\n\n /**\n * Validate Outposts ARN supplied in Bucket parameter is a valid outposts ARN\n */\n validateOutpostsArn: function validateOutpostsArn(req) {\n var parsedArn = req.service._parsedArn;\n\n if (\n parsedArn.resource.indexOf('outpost:') !== 0 &&\n parsedArn.resource.indexOf('outpost/') !== 0\n ) {\n throw AWS.util.error(new Error(), {\n code: 'InvalidARN',\n message: 'ARN resource should begin with \\'outpost/\\''\n });\n }\n\n //can be ':' or '/'\n var delimiter = parsedArn.resource['outpost'.length];\n var outpostId = parsedArn.resource.split(delimiter)[1];\n var 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(outpostId)) {\n throw AWS.util.error(new Error(), {\n code: 'InvalidARN',\n message: 'Outpost resource in ARN is not DNS compatible. Got ' + outpostId\n });\n }\n req.service._parsedArn.outpostId = outpostId;\n },\n\n /**\n * Validate Outposts ARN supplied in Bucket parameter is a valid outposts ARN\n */\n validateOutpostsAccessPointArn: function validateOutpostsAccessPointArn(req) {\n var parsedArn = req.service._parsedArn;\n\n //can be ':' or '/'\n var delimiter = parsedArn.resource['outpost'.length];\n\n if (parsedArn.resource.split(delimiter).length !== 4) {\n throw AWS.util.error(new Error(), {\n code: 'InvalidARN',\n message: 'Outposts ARN should have two resources outpost/{outpostId}/accesspoint/{accesspointName}'\n });\n }\n\n var accessPoint = parsedArn.resource.split(delimiter)[3];\n var accessPointPrefix = accessPoint + '-' + parsedArn.accountId;\n if (!s3util.dnsCompatibleBucketName(accessPointPrefix) || accessPointPrefix.match(/\\./)) {\n throw AWS.util.error(new Error(), {\n code: 'InvalidARN',\n message: 'Access point resource in ARN is not DNS compatible. Got ' + accessPoint\n });\n }\n\n //set parsed valid access point\n req.service._parsedArn.accessPoint = accessPoint;\n },\n\n /**\n * Validate region field in ARN supplied in Bucket parameter is a valid region\n */\n validateArnRegion: function validateArnRegion(req) {\n var useArnRegion = s3util.loadUseArnRegionConfig(req);\n var regionFromArn = req.service._parsedArn.region;\n var clientRegion = req.service.config.region;\n\n if (!regionFromArn) {\n throw AWS.util.error(new Error(), {\n code: 'InvalidARN',\n message: 'ARN region is empty'\n });\n }\n\n if (\n clientRegion.indexOf('fips') >= 0 ||\n regionFromArn.indexOf('fips') >= 0\n ) {\n throw AWS.util.error(new Error(), {\n code: 'InvalidConfiguration',\n message: 'ARN endpoint is not compatible with FIPS region'\n });\n }\n\n if (!useArnRegion && regionFromArn !== clientRegion) {\n throw AWS.util.error(new Error(), {\n code: 'InvalidConfiguration',\n message: 'Configured region conflicts with access point region'\n });\n } else if (\n useArnRegion &&\n regionUtil.getEndpointSuffix(regionFromArn) !== regionUtil.getEndpointSuffix(clientRegion)\n ) {\n throw AWS.util.error(new Error(), {\n code: 'InvalidConfiguration',\n message: 'Configured region and access point region not in same partition'\n });\n }\n\n if (req.service.config.useAccelerateEndpoint) {\n throw AWS.util.error(new Error(), {\n code: 'InvalidConfiguration',\n message: 'useAccelerateEndpoint config is not supported with access point ARN'\n });\n }\n\n if (req.service._parsedArn.service === 's3-outposts' && req.service.config.useDualstack) {\n throw AWS.util.error(new Error(), {\n code: 'InvalidConfiguration',\n message: 'useDualstack config is not supported with outposts access point ARN'\n });\n }\n },\n\n loadUseArnRegionConfig: function loadUseArnRegionConfig(req) {\n var envName = 'AWS_S3_USE_ARN_REGION';\n var configName = 's3_use_arn_region';\n var useArnRegion = true;\n var originalConfig = req.service._originalConfig || {};\n if (req.service.config.s3UseArnRegion !== undefined) {\n return req.service.config.s3UseArnRegion;\n } else if (originalConfig.s3UseArnRegion !== undefined) {\n useArnRegion = originalConfig.s3UseArnRegion === true;\n } else if (AWS.util.isNode()) {\n //load from environmental variable AWS_USE_ARN_REGION\n if (process.env[envName]) {\n var value = process.env[envName].trim().toLowerCase();\n if (['false', 'true'].indexOf(value) < 0) {\n throw AWS.util.error(new Error(), {\n code: 'InvalidConfiguration',\n message: envName + ' only accepts true or false. Got ' + process.env[envName],\n retryable: false\n });\n }\n useArnRegion = value === 'true';\n } else { //load from shared config property use_arn_region\n var profiles = {};\n var profile = {};\n try {\n profiles = AWS.util.getProfilesFromSharedConfig(AWS.util.iniLoader);\n profile = profiles[process.env.AWS_PROFILE || AWS.util.defaultProfile];\n } catch (e) {}\n if (profile[configName]) {\n if (['false', 'true'].indexOf(profile[configName].trim().toLowerCase()) < 0) {\n throw AWS.util.error(new Error(), {\n code: 'InvalidConfiguration',\n message: configName + ' only accepts true or false. Got ' + profile[configName],\n retryable: false\n });\n }\n useArnRegion = profile[configName].trim().toLowerCase() === 'true';\n }\n }\n }\n req.service.config.s3UseArnRegion = useArnRegion;\n return useArnRegion;\n },\n\n /**\n * Validations before URI can be populated\n */\n validatePopulateUriFromArn: function validatePopulateUriFromArn(req) {\n if (req.service._originalConfig && req.service._originalConfig.endpoint) {\n throw AWS.util.error(new Error(), {\n code: 'InvalidConfiguration',\n message: 'Custom endpoint is not compatible with access point ARN'\n });\n }\n\n if (req.service.config.s3ForcePathStyle) {\n throw AWS.util.error(new Error(), {\n code: 'InvalidConfiguration',\n message: 'Cannot construct path-style endpoint with access point'\n });\n }\n },\n\n /**\n * Returns true if the bucket name is DNS compatible. Buckets created\n * outside of the classic region MUST be DNS compatible.\n *\n * @api private\n */\n dnsCompatibleBucketName: function dnsCompatibleBucketName(bucketName) {\n var b = bucketName;\n var domain = new RegExp(/^[a-z0-9][a-z0-9\\.\\-]{1,61}[a-z0-9]$/);\n var ipAddress = new RegExp(/(\\d+\\.){3}\\d+/);\n var dots = new RegExp(/\\.\\./);\n return (b.match(domain) && !b.match(ipAddress) && !b.match(dots)) ? true : false;\n },\n};\n\n/**\n * @api private\n */\nmodule.exports = s3util;\n","var AWS = require('../core');\nvar util = require('../util');\nvar QueryParamSerializer = require('../query/query_param_serializer');\nvar Shape = require('../model/shape');\nvar populateHostPrefix = require('./helpers').populateHostPrefix;\n\nfunction buildRequest(req) {\n var operation = req.service.api.operations[req.operation];\n var httpRequest = req.httpRequest;\n httpRequest.headers['Content-Type'] =\n 'application/x-www-form-urlencoded; charset=utf-8';\n httpRequest.params = {\n Version: req.service.api.apiVersion,\n Action: operation.name\n };\n\n // convert the request parameters into a list of query params,\n // e.g. Deeply.NestedParam.0.Name=value\n var builder = new QueryParamSerializer();\n builder.serialize(req.params, operation.input, function(name, value) {\n httpRequest.params[name] = value;\n });\n httpRequest.body = util.queryParamsToString(httpRequest.params);\n\n populateHostPrefix(req);\n}\n\nfunction extractError(resp) {\n var data, body = resp.httpResponse.body.toString();\n if (body.match(', some require you to add \"/cfx/st\" into your URL).\n *\n * @param options [Object] The options to create a signed URL.\n * @option options url [String] The URL to which the signature will grant\n * access. Any query params included with\n * the URL should be encoded. Required.\n * @option options expires [Number] A Unix UTC timestamp indicating when the\n * signature should expire. Required unless you\n * pass in a full policy.\n * @option options policy [String] A CloudFront JSON policy. Required unless\n * you pass in a url and an expiry time.\n *\n * @param cb [Function] if a callback is provided, this function will\n * pass the URL as the second parameter (after the error parameter) to\n * the callback function.\n *\n * @return [String] if called synchronously (with no callback), returns the\n * signed URL.\n * @return [null] nothing is returned if a callback is provided.\n */\n getSignedUrl: function (options, cb) {\n try {\n var resource = getResource(options.url);\n } catch (err) {\n return handleError(err, cb);\n }\n\n var parsedUrl = url.parse(options.url, true),\n signatureHash = Object.prototype.hasOwnProperty.call(options, 'policy')\n ? signWithCustomPolicy(options.policy, this.keyPairId, this.privateKey)\n : signWithCannedPolicy(resource, options.expires, this.keyPairId, this.privateKey);\n\n parsedUrl.search = null;\n for (var key in signatureHash) {\n if (Object.prototype.hasOwnProperty.call(signatureHash, key)) {\n parsedUrl.query[key] = signatureHash[key];\n }\n }\n\n try {\n var signedUrl = determineScheme(options.url) === 'rtmp'\n ? getRtmpUrl(url.format(parsedUrl))\n : url.format(parsedUrl);\n } catch (err) {\n return handleError(err, cb);\n }\n\n return handleSuccess(signedUrl, cb);\n }\n});\n\n/**\n * @api private\n */\nmodule.exports = AWS.CloudFront.Signer;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['cloudwatchevents'] = {};\nAWS.CloudWatchEvents = Service.defineService('cloudwatchevents', ['2014-02-03*', '2015-10-07']);\nObject.defineProperty(apiLoader.services['cloudwatchevents'], '2015-10-07', {\n get: function get() {\n var model = require('../apis/events-2015-10-07.min.json');\n model.paginators = require('../apis/events-2015-10-07.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.CloudWatchEvents;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['kms'] = {};\nAWS.KMS = Service.defineService('kms', ['2014-11-01']);\nObject.defineProperty(apiLoader.services['kms'], '2014-11-01', {\n get: function get() {\n var model = require('../apis/kms-2014-11-01.min.json');\n model.paginators = require('../apis/kms-2014-11-01.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.KMS;\n","module.exports = function isBuffer(arg) {\n return arg && typeof arg === 'object'\n && typeof arg.copy === 'function'\n && typeof arg.fill === 'function'\n && typeof arg.readUInt8 === 'function';\n}","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['kinesisvideo'] = {};\nAWS.KinesisVideo = Service.defineService('kinesisvideo', ['2017-09-30']);\nObject.defineProperty(apiLoader.services['kinesisvideo'], '2017-09-30', {\n get: function get() {\n var model = require('../apis/kinesisvideo-2017-09-30.min.json');\n model.paginators = require('../apis/kinesisvideo-2017-09-30.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.KinesisVideo;\n","var Shape = require('./shape');\n\nvar util = require('../util');\nvar property = util.property;\nvar memoizedProperty = util.memoizedProperty;\n\nfunction Operation(name, operation, options) {\n var self = this;\n options = options || {};\n\n property(this, 'name', operation.name || name);\n property(this, 'api', options.api, false);\n\n operation.http = operation.http || {};\n property(this, 'endpoint', operation.endpoint);\n property(this, 'httpMethod', operation.http.method || 'POST');\n property(this, 'httpPath', operation.http.requestUri || '/');\n property(this, 'authtype', operation.authtype || '');\n property(\n this,\n 'endpointDiscoveryRequired',\n operation.endpointdiscovery ?\n (operation.endpointdiscovery.required ? 'REQUIRED' : 'OPTIONAL') :\n 'NULL'\n );\n\n memoizedProperty(this, 'input', function() {\n if (!operation.input) {\n return new Shape.create({type: 'structure'}, options);\n }\n return Shape.create(operation.input, options);\n });\n\n memoizedProperty(this, 'output', function() {\n if (!operation.output) {\n return new Shape.create({type: 'structure'}, options);\n }\n return Shape.create(operation.output, options);\n });\n\n memoizedProperty(this, 'errors', function() {\n var list = [];\n if (!operation.errors) return null;\n\n for (var i = 0; i < operation.errors.length; i++) {\n list.push(Shape.create(operation.errors[i], options));\n }\n\n return list;\n });\n\n memoizedProperty(this, 'paginator', function() {\n return options.api.paginators[name];\n });\n\n if (options.documentation) {\n property(this, 'documentation', operation.documentation);\n property(this, 'documentationUrl', operation.documentationUrl);\n }\n\n // idempotentMembers only tracks top-level input shapes\n memoizedProperty(this, 'idempotentMembers', function() {\n var idempotentMembers = [];\n var input = self.input;\n var members = input.members;\n if (!input.members) {\n return idempotentMembers;\n }\n for (var name in members) {\n if (!members.hasOwnProperty(name)) {\n continue;\n }\n if (members[name].isIdempotent === true) {\n idempotentMembers.push(name);\n }\n }\n return idempotentMembers;\n });\n\n memoizedProperty(this, 'hasEventOutput', function() {\n var output = self.output;\n return hasEventStream(output);\n });\n}\n\nfunction hasEventStream(topLevelShape) {\n var members = topLevelShape.members;\n var payload = topLevelShape.payload;\n\n if (!topLevelShape.members) {\n return false;\n }\n\n if (payload) {\n var payloadMember = members[payload];\n return payloadMember.isEventStream;\n }\n\n // check if any member is an event stream\n for (var name in members) {\n if (!members.hasOwnProperty(name)) {\n if (members[name].isEventStream === true) {\n return true;\n }\n }\n }\n return false;\n}\n\n/**\n * @api private\n */\nmodule.exports = Operation;\n","module.exports = {\n //provide realtime clock for performance measurement\n now: function now() {\n if (typeof performance !== 'undefined' && typeof performance.now === 'function') {\n return performance.now();\n }\n return Date.now();\n }\n};\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['iot'] = {};\nAWS.Iot = Service.defineService('iot', ['2015-05-28']);\nObject.defineProperty(apiLoader.services['iot'], '2015-05-28', {\n get: function get() {\n var model = require('../apis/iot-2015-05-28.min.json');\n model.paginators = require('../apis/iot-2015-05-28.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.Iot;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['applicationautoscaling'] = {};\nAWS.ApplicationAutoScaling = Service.defineService('applicationautoscaling', ['2016-02-06']);\nObject.defineProperty(apiLoader.services['applicationautoscaling'], '2016-02-06', {\n get: function get() {\n var model = require('../apis/application-autoscaling-2016-02-06.min.json');\n model.paginators = require('../apis/application-autoscaling-2016-02-06.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.ApplicationAutoScaling;\n","var util = require('./util');\nvar regionConfig = require('./region_config_data.json');\n\nfunction generateRegionPrefix(region) {\n if (!region) return null;\n\n var parts = region.split('-');\n if (parts.length < 3) return null;\n return parts.slice(0, parts.length - 2).join('-') + '-*';\n}\n\nfunction derivedKeys(service) {\n var region = service.config.region;\n var regionPrefix = generateRegionPrefix(region);\n var endpointPrefix = service.api.endpointPrefix;\n\n return [\n [region, endpointPrefix],\n [regionPrefix, endpointPrefix],\n [region, '*'],\n [regionPrefix, '*'],\n ['*', endpointPrefix],\n ['*', '*']\n ].map(function(item) {\n return item[0] && item[1] ? item.join('/') : null;\n });\n}\n\nfunction applyConfig(service, config) {\n util.each(config, function(key, value) {\n if (key === 'globalEndpoint') return;\n if (service.config[key] === undefined || service.config[key] === null) {\n service.config[key] = value;\n }\n });\n}\n\nfunction configureEndpoint(service) {\n var keys = derivedKeys(service);\n for (var i = 0; i < keys.length; i++) {\n var key = keys[i];\n if (!key) continue;\n\n if (Object.prototype.hasOwnProperty.call(regionConfig.rules, key)) {\n var config = regionConfig.rules[key];\n if (typeof config === 'string') {\n config = regionConfig.patterns[config];\n }\n\n // set dualstack endpoint\n if (service.config.useDualstack && util.isDualstackAvailable(service)) {\n config = util.copy(config);\n config.endpoint = config.endpoint.replace(\n /{service}\\.({region}\\.)?/,\n '{service}.dualstack.{region}.'\n );\n }\n\n // set global endpoint\n service.isGlobalEndpoint = !!config.globalEndpoint;\n if (config.signingRegion) {\n service.signingRegion = config.signingRegion;\n }\n\n // signature version\n if (!config.signatureVersion) config.signatureVersion = 'v4';\n\n // merge config\n applyConfig(service, config);\n return;\n }\n }\n}\n\nfunction getEndpointSuffix(region) {\n var regionRegexes = {\n '^(us|eu|ap|sa|ca|me)\\\\-\\\\w+\\\\-\\\\d+$': 'amazonaws.com',\n '^cn\\\\-\\\\w+\\\\-\\\\d+$': 'amazonaws.com.cn',\n '^us\\\\-gov\\\\-\\\\w+\\\\-\\\\d+$': 'amazonaws.com',\n '^us\\\\-iso\\\\-\\\\w+\\\\-\\\\d+$': 'c2s.ic.gov',\n '^us\\\\-isob\\\\-\\\\w+\\\\-\\\\d+$': 'sc2s.sgov.gov'\n };\n var defaultSuffix = 'amazonaws.com';\n var regexes = Object.keys(regionRegexes);\n for (var i = 0; i < regexes.length; i++) {\n var regionPattern = RegExp(regexes[i]);\n var dnsSuffix = regionRegexes[regexes[i]];\n if (regionPattern.test(region)) return dnsSuffix;\n }\n return defaultSuffix;\n}\n\n/**\n * @api private\n */\nmodule.exports = {\n configureEndpoint: configureEndpoint,\n getEndpointSuffix: getEndpointSuffix\n};\n","var AWS = require('../core');\nvar Translator = require('./translator');\nvar DynamoDBSet = require('./set');\n\n/**\n * The document client simplifies working with items in Amazon DynamoDB\n * by abstracting away the notion of attribute values. This abstraction\n * annotates native JavaScript types supplied as input parameters, as well\n * as converts annotated response data to native JavaScript types.\n *\n * ## Marshalling Input and Unmarshalling Response Data\n *\n * The document client affords developers the use of native JavaScript types\n * instead of `AttributeValue`s to simplify the JavaScript development\n * experience with Amazon DynamoDB. JavaScript objects passed in as parameters\n * are marshalled into `AttributeValue` shapes required by Amazon DynamoDB.\n * Responses from DynamoDB are unmarshalled into plain JavaScript objects\n * by the `DocumentClient`. The `DocumentClient`, does not accept\n * `AttributeValue`s in favor of native JavaScript types.\n *\n * | JavaScript Type | DynamoDB AttributeValue |\n * |:----------------------------------------------------------------------:|-------------------------|\n * | String | S |\n * | Number | N |\n * | Boolean | BOOL |\n * | null | NULL |\n * | Array | L |\n * | Object | M |\n * | Buffer, File, Blob, ArrayBuffer, DataView, and JavaScript typed arrays | B |\n *\n * ## Support for Sets\n *\n * The `DocumentClient` offers a convenient way to create sets from\n * JavaScript Arrays. The type of set is inferred from the first element\n * in the array. DynamoDB supports string, number, and binary sets. To\n * learn more about supported types see the\n * [Amazon DynamoDB Data Model Documentation](http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/DataModel.html)\n * For more information see {AWS.DynamoDB.DocumentClient.createSet}\n *\n */\nAWS.DynamoDB.DocumentClient = AWS.util.inherit({\n\n /**\n * Creates a DynamoDB document client with a set of configuration options.\n *\n * @option options params [map] An optional map of parameters to bind to every\n * request sent by this service object.\n * @option options service [AWS.DynamoDB] An optional pre-configured instance\n * of the AWS.DynamoDB service object to use for requests. The object may\n * bound parameters used by the document client.\n * @option options convertEmptyValues [Boolean] set to true if you would like\n * the document client to convert empty values (0-length strings, binary\n * buffers, and sets) to be converted to NULL types when persisting to\n * DynamoDB.\n * @option options wrapNumbers [Boolean] Set to true to return numbers as a\n * NumberValue object instead of converting them to native JavaScript numbers.\n * This allows for the safe round-trip transport of numbers of arbitrary size.\n * @see AWS.DynamoDB.constructor\n *\n */\n constructor: function DocumentClient(options) {\n var self = this;\n self.options = options || {};\n self.configure(self.options);\n },\n\n /**\n * @api private\n */\n configure: function configure(options) {\n var self = this;\n self.service = options.service;\n self.bindServiceObject(options);\n self.attrValue = options.attrValue =\n self.service.api.operations.putItem.input.members.Item.value.shape;\n },\n\n /**\n * @api private\n */\n bindServiceObject: function bindServiceObject(options) {\n var self = this;\n options = options || {};\n\n if (!self.service) {\n self.service = new AWS.DynamoDB(options);\n } else {\n var config = AWS.util.copy(self.service.config);\n self.service = new self.service.constructor.__super__(config);\n self.service.config.params =\n AWS.util.merge(self.service.config.params || {}, options.params);\n }\n },\n\n /**\n * @api private\n */\n makeServiceRequest: function(operation, params, callback) {\n var self = this;\n var request = self.service[operation](params);\n self.setupRequest(request);\n self.setupResponse(request);\n if (typeof callback === 'function') {\n request.send(callback);\n }\n return request;\n },\n\n /**\n * @api private\n */\n serviceClientOperationsMap: {\n batchGet: 'batchGetItem',\n batchWrite: 'batchWriteItem',\n delete: 'deleteItem',\n get: 'getItem',\n put: 'putItem',\n query: 'query',\n scan: 'scan',\n update: 'updateItem',\n transactGet: 'transactGetItems',\n transactWrite: 'transactWriteItems'\n },\n\n /**\n * Returns the attributes of one or more items from one or more tables\n * by delegating to `AWS.DynamoDB.batchGetItem()`.\n *\n * Supply the same parameters as {AWS.DynamoDB.batchGetItem} with\n * `AttributeValue`s substituted by native JavaScript types.\n *\n * @see AWS.DynamoDB.batchGetItem\n * @example Get items from multiple tables\n * var params = {\n * RequestItems: {\n * 'Table-1': {\n * Keys: [\n * {\n * HashKey: 'haskey',\n * NumberRangeKey: 1\n * }\n * ]\n * },\n * 'Table-2': {\n * Keys: [\n * { foo: 'bar' },\n * ]\n * }\n * }\n * };\n *\n * var documentClient = new AWS.DynamoDB.DocumentClient();\n *\n * documentClient.batchGet(params, function(err, data) {\n * if (err) console.log(err);\n * else console.log(data);\n * });\n *\n */\n batchGet: function(params, callback) {\n var operation = this.serviceClientOperationsMap['batchGet'];\n return this.makeServiceRequest(operation, params, callback);\n },\n\n /**\n * Puts or deletes multiple items in one or more tables by delegating\n * to `AWS.DynamoDB.batchWriteItem()`.\n *\n * Supply the same parameters as {AWS.DynamoDB.batchWriteItem} with\n * `AttributeValue`s substituted by native JavaScript types.\n *\n * @see AWS.DynamoDB.batchWriteItem\n * @example Write to and delete from a table\n * var params = {\n * RequestItems: {\n * 'Table-1': [\n * {\n * DeleteRequest: {\n * Key: { HashKey: 'someKey' }\n * }\n * },\n * {\n * PutRequest: {\n * Item: {\n * HashKey: 'anotherKey',\n * NumAttribute: 1,\n * BoolAttribute: true,\n * ListAttribute: [1, 'two', false],\n * MapAttribute: { foo: 'bar' }\n * }\n * }\n * }\n * ]\n * }\n * };\n *\n * var documentClient = new AWS.DynamoDB.DocumentClient();\n *\n * documentClient.batchWrite(params, function(err, data) {\n * if (err) console.log(err);\n * else console.log(data);\n * });\n *\n */\n batchWrite: function(params, callback) {\n var operation = this.serviceClientOperationsMap['batchWrite'];\n return this.makeServiceRequest(operation, params, callback);\n },\n\n /**\n * Deletes a single item in a table by primary key by delegating to\n * `AWS.DynamoDB.deleteItem()`\n *\n * Supply the same parameters as {AWS.DynamoDB.deleteItem} with\n * `AttributeValue`s substituted by native JavaScript types.\n *\n * @see AWS.DynamoDB.deleteItem\n * @example Delete an item from a table\n * var params = {\n * TableName : 'Table',\n * Key: {\n * HashKey: 'hashkey',\n * NumberRangeKey: 1\n * }\n * };\n *\n * var documentClient = new AWS.DynamoDB.DocumentClient();\n *\n * documentClient.delete(params, function(err, data) {\n * if (err) console.log(err);\n * else console.log(data);\n * });\n *\n */\n delete: function(params, callback) {\n var operation = this.serviceClientOperationsMap['delete'];\n return this.makeServiceRequest(operation, params, callback);\n },\n\n /**\n * Returns a set of attributes for the item with the given primary key\n * by delegating to `AWS.DynamoDB.getItem()`.\n *\n * Supply the same parameters as {AWS.DynamoDB.getItem} with\n * `AttributeValue`s substituted by native JavaScript types.\n *\n * @see AWS.DynamoDB.getItem\n * @example Get an item from a table\n * var params = {\n * TableName : 'Table',\n * Key: {\n * HashKey: 'hashkey'\n * }\n * };\n *\n * var documentClient = new AWS.DynamoDB.DocumentClient();\n *\n * documentClient.get(params, function(err, data) {\n * if (err) console.log(err);\n * else console.log(data);\n * });\n *\n */\n get: function(params, callback) {\n var operation = this.serviceClientOperationsMap['get'];\n return this.makeServiceRequest(operation, params, callback);\n },\n\n /**\n * Creates a new item, or replaces an old item with a new item by\n * delegating to `AWS.DynamoDB.putItem()`.\n *\n * Supply the same parameters as {AWS.DynamoDB.putItem} with\n * `AttributeValue`s substituted by native JavaScript types.\n *\n * @see AWS.DynamoDB.putItem\n * @example Create a new item in a table\n * var params = {\n * TableName : 'Table',\n * Item: {\n * HashKey: 'haskey',\n * NumAttribute: 1,\n * BoolAttribute: true,\n * ListAttribute: [1, 'two', false],\n * MapAttribute: { foo: 'bar'},\n * NullAttribute: null\n * }\n * };\n *\n * var documentClient = new AWS.DynamoDB.DocumentClient();\n *\n * documentClient.put(params, function(err, data) {\n * if (err) console.log(err);\n * else console.log(data);\n * });\n *\n */\n put: function(params, callback) {\n var operation = this.serviceClientOperationsMap['put'];\n return this.makeServiceRequest(operation, params, callback);\n },\n\n /**\n * Edits an existing item's attributes, or adds a new item to the table if\n * it does not already exist by delegating to `AWS.DynamoDB.updateItem()`.\n *\n * Supply the same parameters as {AWS.DynamoDB.updateItem} with\n * `AttributeValue`s substituted by native JavaScript types.\n *\n * @see AWS.DynamoDB.updateItem\n * @example Update an item with expressions\n * var params = {\n * TableName: 'Table',\n * Key: { HashKey : 'hashkey' },\n * UpdateExpression: 'set #a = :x + :y',\n * ConditionExpression: '#a < :MAX',\n * ExpressionAttributeNames: {'#a' : 'Sum'},\n * ExpressionAttributeValues: {\n * ':x' : 20,\n * ':y' : 45,\n * ':MAX' : 100,\n * }\n * };\n *\n * var documentClient = new AWS.DynamoDB.DocumentClient();\n *\n * documentClient.update(params, function(err, data) {\n * if (err) console.log(err);\n * else console.log(data);\n * });\n *\n */\n update: function(params, callback) {\n var operation = this.serviceClientOperationsMap['update'];\n return this.makeServiceRequest(operation, params, callback);\n },\n\n /**\n * Returns one or more items and item attributes by accessing every item\n * in a table or a secondary index.\n *\n * Supply the same parameters as {AWS.DynamoDB.scan} with\n * `AttributeValue`s substituted by native JavaScript types.\n *\n * @see AWS.DynamoDB.scan\n * @example Scan the table with a filter expression\n * var params = {\n * TableName : 'Table',\n * FilterExpression : 'Year = :this_year',\n * ExpressionAttributeValues : {':this_year' : 2015}\n * };\n *\n * var documentClient = new AWS.DynamoDB.DocumentClient();\n *\n * documentClient.scan(params, function(err, data) {\n * if (err) console.log(err);\n * else console.log(data);\n * });\n *\n */\n scan: function(params, callback) {\n var operation = this.serviceClientOperationsMap['scan'];\n return this.makeServiceRequest(operation, params, callback);\n },\n\n /**\n * Directly access items from a table by primary key or a secondary index.\n *\n * Supply the same parameters as {AWS.DynamoDB.query} with\n * `AttributeValue`s substituted by native JavaScript types.\n *\n * @see AWS.DynamoDB.query\n * @example Query an index\n * var params = {\n * TableName: 'Table',\n * IndexName: 'Index',\n * KeyConditionExpression: 'HashKey = :hkey and RangeKey > :rkey',\n * ExpressionAttributeValues: {\n * ':hkey': 'key',\n * ':rkey': 2015\n * }\n * };\n *\n * var documentClient = new AWS.DynamoDB.DocumentClient();\n *\n * documentClient.query(params, function(err, data) {\n * if (err) console.log(err);\n * else console.log(data);\n * });\n *\n */\n query: function(params, callback) {\n var operation = this.serviceClientOperationsMap['query'];\n return this.makeServiceRequest(operation, params, callback);\n },\n\n /**\n * Synchronous write operation that groups up to 10 action requests\n *\n * Supply the same parameters as {AWS.DynamoDB.transactWriteItems} with\n * `AttributeValue`s substituted by native JavaScript types.\n *\n * @see AWS.DynamoDB.transactWriteItems\n * @example Get items from multiple tables\n * var params = {\n * TransactItems: [{\n * Put: {\n * TableName : 'Table0',\n * Item: {\n * HashKey: 'haskey',\n * NumAttribute: 1,\n * BoolAttribute: true,\n * ListAttribute: [1, 'two', false],\n * MapAttribute: { foo: 'bar'},\n * NullAttribute: null\n * }\n * }\n * }, {\n * Update: {\n * TableName: 'Table1',\n * Key: { HashKey : 'hashkey' },\n * UpdateExpression: 'set #a = :x + :y',\n * ConditionExpression: '#a < :MAX',\n * ExpressionAttributeNames: {'#a' : 'Sum'},\n * ExpressionAttributeValues: {\n * ':x' : 20,\n * ':y' : 45,\n * ':MAX' : 100,\n * }\n * }\n * }]\n * };\n *\n * documentClient.transactWrite(params, function(err, data) {\n * if (err) console.log(err);\n * else console.log(data);\n * });\n */\n transactWrite: function(params, callback) {\n var operation = this.serviceClientOperationsMap['transactWrite'];\n return this.makeServiceRequest(operation, params, callback);\n },\n\n /**\n * Atomically retrieves multiple items from one or more tables (but not from indexes)\n * in a single account and region.\n *\n * Supply the same parameters as {AWS.DynamoDB.transactGetItems} with\n * `AttributeValue`s substituted by native JavaScript types.\n *\n * @see AWS.DynamoDB.transactGetItems\n * @example Get items from multiple tables\n * var params = {\n * TransactItems: [{\n * Get: {\n * TableName : 'Table0',\n * Key: {\n * HashKey: 'hashkey0'\n * }\n * }\n * }, {\n * Get: {\n * TableName : 'Table1',\n * Key: {\n * HashKey: 'hashkey1'\n * }\n * }\n * }]\n * };\n *\n * documentClient.transactGet(params, function(err, data) {\n * if (err) console.log(err);\n * else console.log(data);\n * });\n */\n transactGet: function(params, callback) {\n var operation = this.serviceClientOperationsMap['transactGet'];\n return this.makeServiceRequest(operation, params, callback);\n },\n\n /**\n * Creates a set of elements inferring the type of set from\n * the type of the first element. Amazon DynamoDB currently supports\n * the number sets, string sets, and binary sets. For more information\n * about DynamoDB data types see the documentation on the\n * [Amazon DynamoDB Data Model](http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/DataModel.html#DataModel.DataTypes).\n *\n * @param list [Array] Collection to represent your DynamoDB Set\n * @param options [map]\n * * **validate** [Boolean] set to true if you want to validate the type\n * of each element in the set. Defaults to `false`.\n * @example Creating a number set\n * var documentClient = new AWS.DynamoDB.DocumentClient();\n *\n * var params = {\n * Item: {\n * hashkey: 'hashkey'\n * numbers: documentClient.createSet([1, 2, 3]);\n * }\n * };\n *\n * documentClient.put(params, function(err, data) {\n * if (err) console.log(err);\n * else console.log(data);\n * });\n *\n */\n createSet: function(list, options) {\n options = options || {};\n return new DynamoDBSet(list, options);\n },\n\n /**\n * @api private\n */\n getTranslator: function() {\n return new Translator(this.options);\n },\n\n /**\n * @api private\n */\n setupRequest: function setupRequest(request) {\n var self = this;\n var translator = self.getTranslator();\n var operation = request.operation;\n var inputShape = request.service.api.operations[operation].input;\n request._events.validate.unshift(function(req) {\n req.rawParams = AWS.util.copy(req.params);\n req.params = translator.translateInput(req.rawParams, inputShape);\n });\n },\n\n /**\n * @api private\n */\n setupResponse: function setupResponse(request) {\n var self = this;\n var translator = self.getTranslator();\n var outputShape = self.service.api.operations[request.operation].output;\n request.on('extractData', function(response) {\n response.data = translator.translateOutput(response.data, outputShape);\n });\n\n var response = request.response;\n response.nextPage = function(cb) {\n var resp = this;\n var req = resp.request;\n var config;\n var service = req.service;\n var operation = req.operation;\n try {\n config = service.paginationConfig(operation, true);\n } catch (e) { resp.error = e; }\n\n if (!resp.hasNextPage()) {\n if (cb) cb(resp.error, null);\n else if (resp.error) throw resp.error;\n return null;\n }\n\n var params = AWS.util.copy(req.rawParams);\n if (!resp.nextPageTokens) {\n return cb ? cb(null, null) : null;\n } else {\n var inputTokens = config.inputToken;\n if (typeof inputTokens === 'string') inputTokens = [inputTokens];\n for (var i = 0; i < inputTokens.length; i++) {\n params[inputTokens[i]] = resp.nextPageTokens[i];\n }\n return self[operation](params, cb);\n }\n };\n }\n\n});\n\n/**\n * @api private\n */\nmodule.exports = AWS.DynamoDB.DocumentClient;\n","var util = require('../core').util;\n\nfunction typeOf(data) {\n if (data === null && typeof data === 'object') {\n return 'null';\n } else if (data !== undefined && isBinary(data)) {\n return 'Binary';\n } else if (data !== undefined && data.constructor) {\n return data.wrapperName || util.typeName(data.constructor);\n } else if (data !== undefined && typeof data === 'object') {\n // this object is the result of Object.create(null), hence the absence of a\n // defined constructor\n return 'Object';\n } else {\n return 'undefined';\n }\n}\n\nfunction isBinary(data) {\n var types = [\n 'Buffer', 'File', 'Blob', 'ArrayBuffer', 'DataView',\n 'Int8Array', 'Uint8Array', 'Uint8ClampedArray',\n 'Int16Array', 'Uint16Array', 'Int32Array', 'Uint32Array',\n 'Float32Array', 'Float64Array'\n ];\n if (util.isNode()) {\n var Stream = util.stream.Stream;\n if (util.Buffer.isBuffer(data) || data instanceof Stream) {\n return true;\n }\n }\n\n for (var i = 0; i < types.length; i++) {\n if (data !== undefined && data.constructor) {\n if (util.isType(data, types[i])) return true;\n if (util.typeName(data.constructor) === types[i]) return true;\n }\n }\n\n return false;\n}\n\n/**\n * @api private\n */\nmodule.exports = {\n typeOf: typeOf,\n isBinary: isBinary\n};\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['ec2'] = {};\nAWS.EC2 = Service.defineService('ec2', ['2013-06-15*', '2013-10-15*', '2014-02-01*', '2014-05-01*', '2014-06-15*', '2014-09-01*', '2014-10-01*', '2015-03-01*', '2015-04-15*', '2015-10-01*', '2016-04-01*', '2016-09-15*', '2016-11-15']);\nrequire('../lib/services/ec2');\nObject.defineProperty(apiLoader.services['ec2'], '2016-11-15', {\n get: function get() {\n var model = require('../apis/ec2-2016-11-15.min.json');\n model.paginators = require('../apis/ec2-2016-11-15.paginators.json').pagination;\n model.waiters = require('../apis/ec2-2016-11-15.waiters2.json').waiters;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.EC2;\n","var Int64 = require('./int64').Int64;\n\nvar splitMessage = require('./split-message').splitMessage;\n\nvar BOOLEAN_TAG = 'boolean';\nvar BYTE_TAG = 'byte';\nvar SHORT_TAG = 'short';\nvar INT_TAG = 'integer';\nvar LONG_TAG = 'long';\nvar BINARY_TAG = 'binary';\nvar STRING_TAG = 'string';\nvar TIMESTAMP_TAG = 'timestamp';\nvar UUID_TAG = 'uuid';\n\n/**\n * @api private\n *\n * @param {Buffer} headers\n */\nfunction parseHeaders(headers) {\n var out = {};\n var position = 0;\n while (position < headers.length) {\n var nameLength = headers.readUInt8(position++);\n var name = headers.slice(position, position + nameLength).toString();\n position += nameLength;\n switch (headers.readUInt8(position++)) {\n case 0 /* boolTrue */:\n out[name] = {\n type: BOOLEAN_TAG,\n value: true\n };\n break;\n case 1 /* boolFalse */:\n out[name] = {\n type: BOOLEAN_TAG,\n value: false\n };\n break;\n case 2 /* byte */:\n out[name] = {\n type: BYTE_TAG,\n value: headers.readInt8(position++)\n };\n break;\n case 3 /* short */:\n out[name] = {\n type: SHORT_TAG,\n value: headers.readInt16BE(position)\n };\n position += 2;\n break;\n case 4 /* integer */:\n out[name] = {\n type: INT_TAG,\n value: headers.readInt32BE(position)\n };\n position += 4;\n break;\n case 5 /* long */:\n out[name] = {\n type: LONG_TAG,\n value: new Int64(headers.slice(position, position + 8))\n };\n position += 8;\n break;\n case 6 /* byteArray */:\n var binaryLength = headers.readUInt16BE(position);\n position += 2;\n out[name] = {\n type: BINARY_TAG,\n value: headers.slice(position, position + binaryLength)\n };\n position += binaryLength;\n break;\n case 7 /* string */:\n var stringLength = headers.readUInt16BE(position);\n position += 2;\n out[name] = {\n type: STRING_TAG,\n value: headers.slice(\n position,\n position + stringLength\n ).toString()\n };\n position += stringLength;\n break;\n case 8 /* timestamp */:\n out[name] = {\n type: TIMESTAMP_TAG,\n value: new Date(\n new Int64(headers.slice(position, position + 8))\n .valueOf()\n )\n };\n position += 8;\n break;\n case 9 /* uuid */:\n var uuidChars = headers.slice(position, position + 16)\n .toString('hex');\n position += 16;\n out[name] = {\n type: UUID_TAG,\n value: uuidChars.substr(0, 8) + '-' +\n uuidChars.substr(8, 4) + '-' +\n uuidChars.substr(12, 4) + '-' +\n uuidChars.substr(16, 4) + '-' +\n uuidChars.substr(20)\n };\n break;\n default:\n throw new Error('Unrecognized header type tag');\n }\n }\n return out;\n}\n\nfunction parseMessage(message) {\n var parsed = splitMessage(message);\n return { headers: parseHeaders(parsed.headers), body: parsed.body };\n}\n\n/**\n * @api private\n */\nmodule.exports = {\n parseMessage: parseMessage\n};\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['elastictranscoder'] = {};\nAWS.ElasticTranscoder = Service.defineService('elastictranscoder', ['2012-09-25']);\nObject.defineProperty(apiLoader.services['elastictranscoder'], '2012-09-25', {\n get: function get() {\n var model = require('../apis/elastictranscoder-2012-09-25.min.json');\n model.paginators = require('../apis/elastictranscoder-2012-09-25.paginators.json').pagination;\n model.waiters = require('../apis/elastictranscoder-2012-09-25.waiters2.json').waiters;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.ElasticTranscoder;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['cur'] = {};\nAWS.CUR = Service.defineService('cur', ['2017-01-06']);\nObject.defineProperty(apiLoader.services['cur'], '2017-01-06', {\n get: function get() {\n var model = require('../apis/cur-2017-01-06.min.json');\n model.paginators = require('../apis/cur-2017-01-06.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.CUR;\n","var Hmac = require('./browserHmac');\nvar Md5 = require('./browserMd5');\nvar Sha1 = require('./browserSha1');\nvar Sha256 = require('./browserSha256');\n\n/**\n * @api private\n */\nmodule.exports = exports = {\n createHash: function createHash(alg) {\n alg = alg.toLowerCase();\n if (alg === 'md5') {\n return new Md5();\n } else if (alg === 'sha256') {\n return new Sha256();\n } else if (alg === 'sha1') {\n return new Sha1();\n }\n\n throw new Error('Hash algorithm ' + alg + ' is not supported in the browser SDK');\n },\n createHmac: function createHmac(alg, key) {\n alg = alg.toLowerCase();\n if (alg === 'md5') {\n return new Hmac(Md5, key);\n } else if (alg === 'sha256') {\n return new Hmac(Sha256, key);\n } else if (alg === 'sha1') {\n return new Hmac(Sha1, key);\n }\n\n throw new Error('HMAC algorithm ' + alg + ' is not supported in the browser SDK');\n },\n createSign: function() {\n throw new Error('createSign is not implemented in the browser');\n }\n };\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['marketplacecommerceanalytics'] = {};\nAWS.MarketplaceCommerceAnalytics = Service.defineService('marketplacecommerceanalytics', ['2015-07-01']);\nObject.defineProperty(apiLoader.services['marketplacecommerceanalytics'], '2015-07-01', {\n get: function get() {\n var model = require('../apis/marketplacecommerceanalytics-2015-07-01.min.json');\n model.paginators = require('../apis/marketplacecommerceanalytics-2015-07-01.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.MarketplaceCommerceAnalytics;\n","var AWS = require('../core');\nrequire('../rds/signer');\n /**\n * @api private\n */\n var crossRegionOperations = ['copyDBSnapshot', 'createDBInstanceReadReplica', 'createDBCluster', 'copyDBClusterSnapshot', 'startDBInstanceAutomatedBackupsReplication'];\n\n AWS.util.update(AWS.RDS.prototype, {\n /**\n * @api private\n */\n setupRequestListeners: function setupRequestListeners(request) {\n if (crossRegionOperations.indexOf(request.operation) !== -1 &&\n request.params.SourceRegion) {\n request.params = AWS.util.copy(request.params);\n if (request.params.PreSignedUrl ||\n request.params.SourceRegion === this.config.region) {\n delete request.params.SourceRegion;\n } else {\n var doesParamValidation = !!this.config.paramValidation;\n // remove the validate parameters listener so we can re-add it after we build the URL\n if (doesParamValidation) {\n request.removeListener('validate', AWS.EventListeners.Core.VALIDATE_PARAMETERS);\n }\n request.onAsync('validate', this.buildCrossRegionPresignedUrl);\n if (doesParamValidation) {\n request.addListener('validate', AWS.EventListeners.Core.VALIDATE_PARAMETERS);\n }\n }\n }\n },\n\n /**\n * @api private\n */\n buildCrossRegionPresignedUrl: function buildCrossRegionPresignedUrl(req, done) {\n var config = AWS.util.copy(req.service.config);\n config.region = req.params.SourceRegion;\n delete req.params.SourceRegion;\n delete config.endpoint;\n // relevant params for the operation will already be in req.params\n delete config.params;\n config.signatureVersion = 'v4';\n var destinationRegion = req.service.config.region;\n\n var svc = new req.service.constructor(config);\n var newReq = svc[req.operation](AWS.util.copy(req.params));\n newReq.on('build', function addDestinationRegionParam(request) {\n var httpRequest = request.httpRequest;\n httpRequest.params.DestinationRegion = destinationRegion;\n httpRequest.body = AWS.util.queryParamsToString(httpRequest.params);\n });\n newReq.presign(function(err, url) {\n if (err) done(err);\n else {\n req.params.PreSignedUrl = url;\n done();\n }\n });\n }\n });\n","var Collection = require('./collection');\nvar Operation = require('./operation');\nvar Shape = require('./shape');\nvar Paginator = require('./paginator');\nvar ResourceWaiter = require('./resource_waiter');\nvar metadata = require('../../apis/metadata.json');\n\nvar util = require('../util');\nvar property = util.property;\nvar memoizedProperty = util.memoizedProperty;\n\nfunction Api(api, options) {\n var self = this;\n api = api || {};\n options = options || {};\n options.api = this;\n\n api.metadata = api.metadata || {};\n\n var serviceIdentifier = options.serviceIdentifier;\n delete options.serviceIdentifier;\n\n property(this, 'isApi', true, false);\n property(this, 'apiVersion', api.metadata.apiVersion);\n property(this, 'endpointPrefix', api.metadata.endpointPrefix);\n property(this, 'signingName', api.metadata.signingName);\n property(this, 'globalEndpoint', api.metadata.globalEndpoint);\n property(this, 'signatureVersion', api.metadata.signatureVersion);\n property(this, 'jsonVersion', api.metadata.jsonVersion);\n property(this, 'targetPrefix', api.metadata.targetPrefix);\n property(this, 'protocol', api.metadata.protocol);\n property(this, 'timestampFormat', api.metadata.timestampFormat);\n property(this, 'xmlNamespaceUri', api.metadata.xmlNamespace);\n property(this, 'abbreviation', api.metadata.serviceAbbreviation);\n property(this, 'fullName', api.metadata.serviceFullName);\n property(this, 'serviceId', api.metadata.serviceId);\n if (serviceIdentifier && metadata[serviceIdentifier]) {\n property(this, 'xmlNoDefaultLists', metadata[serviceIdentifier].xmlNoDefaultLists, false);\n }\n\n memoizedProperty(this, 'className', function() {\n var name = api.metadata.serviceAbbreviation || api.metadata.serviceFullName;\n if (!name) return null;\n\n name = name.replace(/^Amazon|AWS\\s*|\\(.*|\\s+|\\W+/g, '');\n if (name === 'ElasticLoadBalancing') name = 'ELB';\n return name;\n });\n\n function addEndpointOperation(name, operation) {\n if (operation.endpointoperation === true) {\n property(self, 'endpointOperation', util.string.lowerFirst(name));\n }\n if (operation.endpointdiscovery && !self.hasRequiredEndpointDiscovery) {\n property(\n self,\n 'hasRequiredEndpointDiscovery',\n operation.endpointdiscovery.required === true\n );\n }\n }\n\n property(this, 'operations', new Collection(api.operations, options, function(name, operation) {\n return new Operation(name, operation, options);\n }, util.string.lowerFirst, addEndpointOperation));\n\n property(this, 'shapes', new Collection(api.shapes, options, function(name, shape) {\n return Shape.create(shape, options);\n }));\n\n property(this, 'paginators', new Collection(api.paginators, options, function(name, paginator) {\n return new Paginator(name, paginator, options);\n }));\n\n property(this, 'waiters', new Collection(api.waiters, options, function(name, waiter) {\n return new ResourceWaiter(name, waiter, options);\n }, util.string.lowerFirst));\n\n if (options.documentation) {\n property(this, 'documentation', api.documentation);\n property(this, 'documentationUrl', api.documentationUrl);\n }\n}\n\n/**\n * @api private\n */\nmodule.exports = Api;\n","/**\n * Takes in a buffer of event messages and splits them into individual messages.\n * @param {Buffer} buffer\n * @api private\n */\nfunction eventMessageChunker(buffer) {\n /** @type Buffer[] */\n var messages = [];\n var offset = 0;\n\n while (offset < buffer.length) {\n var totalLength = buffer.readInt32BE(offset);\n\n // create new buffer for individual message (shares memory with original)\n var message = buffer.slice(offset, totalLength + offset);\n // increment offset to it starts at the next message\n offset += totalLength;\n\n messages.push(message);\n }\n\n return messages;\n}\n\n/**\n * @api private\n */\nmodule.exports = {\n eventMessageChunker: eventMessageChunker\n};\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['codedeploy'] = {};\nAWS.CodeDeploy = Service.defineService('codedeploy', ['2014-10-06']);\nObject.defineProperty(apiLoader.services['codedeploy'], '2014-10-06', {\n get: function get() {\n var model = require('../apis/codedeploy-2014-10-06.min.json');\n model.paginators = require('../apis/codedeploy-2014-10-06.paginators.json').pagination;\n model.waiters = require('../apis/codedeploy-2014-10-06.waiters2.json').waiters;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.CodeDeploy;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['sts'] = {};\nAWS.STS = Service.defineService('sts', ['2011-06-15']);\nrequire('../lib/services/sts');\nObject.defineProperty(apiLoader.services['sts'], '2011-06-15', {\n get: function get() {\n var model = require('../apis/sts-2011-06-15.min.json');\n model.paginators = require('../apis/sts-2011-06-15.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.STS;\n","var AWS = require('./core');\n\n/**\n * Represents your AWS security credentials, specifically the\n * {accessKeyId}, {secretAccessKey}, and optional {sessionToken}.\n * Creating a `Credentials` object allows you to pass around your\n * security information to configuration and service objects.\n *\n * Note that this class typically does not need to be constructed manually,\n * as the {AWS.Config} and {AWS.Service} classes both accept simple\n * options hashes with the three keys. These structures will be converted\n * into Credentials objects automatically.\n *\n * ## Expiring and Refreshing Credentials\n *\n * Occasionally credentials can expire in the middle of a long-running\n * application. In this case, the SDK will automatically attempt to\n * refresh the credentials from the storage location if the Credentials\n * class implements the {refresh} method.\n *\n * If you are implementing a credential storage location, you\n * will want to create a subclass of the `Credentials` class and\n * override the {refresh} method. This method allows credentials to be\n * retrieved from the backing store, be it a file system, database, or\n * some network storage. The method should reset the credential attributes\n * on the object.\n *\n * @!attribute expired\n * @return [Boolean] whether the credentials have been expired and\n * require a refresh. Used in conjunction with {expireTime}.\n * @!attribute expireTime\n * @return [Date] a time when credentials should be considered expired. Used\n * in conjunction with {expired}.\n * @!attribute accessKeyId\n * @return [String] the AWS access key ID\n * @!attribute secretAccessKey\n * @return [String] the AWS secret access key\n * @!attribute sessionToken\n * @return [String] an optional AWS session token\n */\nAWS.Credentials = AWS.util.inherit({\n /**\n * A credentials object can be created using positional arguments or an options\n * hash.\n *\n * @overload AWS.Credentials(accessKeyId, secretAccessKey, sessionToken=null)\n * Creates a Credentials object with a given set of credential information\n * as positional arguments.\n * @param accessKeyId [String] the AWS access key ID\n * @param secretAccessKey [String] the AWS secret access key\n * @param sessionToken [String] the optional AWS session token\n * @example Create a credentials object with AWS credentials\n * var creds = new AWS.Credentials('akid', 'secret', 'session');\n * @overload AWS.Credentials(options)\n * Creates a Credentials object with a given set of credential information\n * as an options hash.\n * @option options accessKeyId [String] the AWS access key ID\n * @option options secretAccessKey [String] the AWS secret access key\n * @option options sessionToken [String] the optional AWS session token\n * @example Create a credentials object with AWS credentials\n * var creds = new AWS.Credentials({\n * accessKeyId: 'akid', secretAccessKey: 'secret', sessionToken: 'session'\n * });\n */\n constructor: function Credentials() {\n // hide secretAccessKey from being displayed with util.inspect\n AWS.util.hideProperties(this, ['secretAccessKey']);\n\n this.expired = false;\n this.expireTime = null;\n this.refreshCallbacks = [];\n if (arguments.length === 1 && typeof arguments[0] === 'object') {\n var creds = arguments[0].credentials || arguments[0];\n this.accessKeyId = creds.accessKeyId;\n this.secretAccessKey = creds.secretAccessKey;\n this.sessionToken = creds.sessionToken;\n } else {\n this.accessKeyId = arguments[0];\n this.secretAccessKey = arguments[1];\n this.sessionToken = arguments[2];\n }\n },\n\n /**\n * @return [Integer] the number of seconds before {expireTime} during which\n * the credentials will be considered expired.\n */\n expiryWindow: 15,\n\n /**\n * @return [Boolean] whether the credentials object should call {refresh}\n * @note Subclasses should override this method to provide custom refresh\n * logic.\n */\n needsRefresh: function needsRefresh() {\n var currentTime = AWS.util.date.getDate().getTime();\n var adjustedTime = new Date(currentTime + this.expiryWindow * 1000);\n\n if (this.expireTime && adjustedTime > this.expireTime) {\n return true;\n } else {\n return this.expired || !this.accessKeyId || !this.secretAccessKey;\n }\n },\n\n /**\n * Gets the existing credentials, refreshing them if they are not yet loaded\n * or have expired. Users should call this method before using {refresh},\n * as this will not attempt to reload credentials when they are already\n * loaded into the object.\n *\n * @callback callback function(err)\n * When this callback is called with no error, it means either credentials\n * do not need to be refreshed or refreshed credentials information has\n * been loaded into the object (as the `accessKeyId`, `secretAccessKey`,\n * and `sessionToken` properties).\n * @param err [Error] if an error occurred, this value will be filled\n */\n get: function get(callback) {\n var self = this;\n if (this.needsRefresh()) {\n this.refresh(function(err) {\n if (!err) self.expired = false; // reset expired flag\n if (callback) callback(err);\n });\n } else if (callback) {\n callback();\n }\n },\n\n /**\n * @!method getPromise()\n * Returns a 'thenable' promise.\n * Gets the existing credentials, refreshing them if they are not yet loaded\n * or have expired. Users should call this method before using {refresh},\n * as this will not attempt to reload credentials when they are already\n * loaded into the object.\n *\n * Two callbacks can be provided to the `then` method on the returned promise.\n * The first callback will be called if the promise is fulfilled, and the second\n * callback will be called if the promise is rejected.\n * @callback fulfilledCallback function()\n * Called if the promise is fulfilled. When this callback is called, it\n * means either credentials do not need to be refreshed or refreshed\n * credentials information has been loaded into the object (as the\n * `accessKeyId`, `secretAccessKey`, and `sessionToken` properties).\n * @callback rejectedCallback function(err)\n * Called if the promise is rejected.\n * @param err [Error] if an error occurred, this value will be filled\n * @return [Promise] A promise that represents the state of the `get` call.\n * @example Calling the `getPromise` method.\n * var promise = credProvider.getPromise();\n * promise.then(function() { ... }, function(err) { ... });\n */\n\n /**\n * @!method refreshPromise()\n * Returns a 'thenable' promise.\n * Refreshes the credentials. Users should call {get} before attempting\n * to forcibly refresh credentials.\n *\n * Two callbacks can be provided to the `then` method on the returned promise.\n * The first callback will be called if the promise is fulfilled, and the second\n * callback will be called if the promise is rejected.\n * @callback fulfilledCallback function()\n * Called if the promise is fulfilled. When this callback is called, it\n * means refreshed credentials information has been loaded into the object\n * (as the `accessKeyId`, `secretAccessKey`, and `sessionToken` properties).\n * @callback rejectedCallback function(err)\n * Called if the promise is rejected.\n * @param err [Error] if an error occurred, this value will be filled\n * @return [Promise] A promise that represents the state of the `refresh` call.\n * @example Calling the `refreshPromise` method.\n * var promise = credProvider.refreshPromise();\n * promise.then(function() { ... }, function(err) { ... });\n */\n\n /**\n * Refreshes the credentials. Users should call {get} before attempting\n * to forcibly refresh credentials.\n *\n * @callback callback function(err)\n * When this callback is called with no error, it means refreshed\n * credentials information has been loaded into the object (as the\n * `accessKeyId`, `secretAccessKey`, and `sessionToken` properties).\n * @param err [Error] if an error occurred, this value will be filled\n * @note Subclasses should override this class to reset the\n * {accessKeyId}, {secretAccessKey} and optional {sessionToken}\n * on the credentials object and then call the callback with\n * any error information.\n * @see get\n */\n refresh: function refresh(callback) {\n this.expired = false;\n callback();\n },\n\n /**\n * @api private\n * @param callback\n */\n coalesceRefresh: function coalesceRefresh(callback, sync) {\n var self = this;\n if (self.refreshCallbacks.push(callback) === 1) {\n self.load(function onLoad(err) {\n AWS.util.arrayEach(self.refreshCallbacks, function(callback) {\n if (sync) {\n callback(err);\n } else {\n // callback could throw, so defer to ensure all callbacks are notified\n AWS.util.defer(function () {\n callback(err);\n });\n }\n });\n self.refreshCallbacks.length = 0;\n });\n }\n },\n\n /**\n * @api private\n * @param callback\n */\n load: function load(callback) {\n callback();\n }\n});\n\n/**\n * @api private\n */\nAWS.Credentials.addPromisesToClass = function addPromisesToClass(PromiseDependency) {\n this.prototype.getPromise = AWS.util.promisifyMethod('get', PromiseDependency);\n this.prototype.refreshPromise = AWS.util.promisifyMethod('refresh', PromiseDependency);\n};\n\n/**\n * @api private\n */\nAWS.Credentials.deletePromisesFromClass = function deletePromisesFromClass() {\n delete this.prototype.getPromise;\n delete this.prototype.refreshPromise;\n};\n\nAWS.util.addPromises(AWS.Credentials);\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['sqs'] = {};\nAWS.SQS = Service.defineService('sqs', ['2012-11-05']);\nrequire('../lib/services/sqs');\nObject.defineProperty(apiLoader.services['sqs'], '2012-11-05', {\n get: function get() {\n var model = require('../apis/sqs-2012-11-05.min.json');\n model.paginators = require('../apis/sqs-2012-11-05.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.SQS;\n","function AcceptorStateMachine(states, state) {\n this.currentState = state || null;\n this.states = states || {};\n}\n\nAcceptorStateMachine.prototype.runTo = function runTo(finalState, done, bindObject, inputError) {\n if (typeof finalState === 'function') {\n inputError = bindObject; bindObject = done;\n done = finalState; finalState = null;\n }\n\n var self = this;\n var state = self.states[self.currentState];\n state.fn.call(bindObject || self, inputError, function(err) {\n if (err) {\n if (state.fail) self.currentState = state.fail;\n else return done ? done.call(bindObject, err) : null;\n } else {\n if (state.accept) self.currentState = state.accept;\n else return done ? done.call(bindObject) : null;\n }\n if (self.currentState === finalState) {\n return done ? done.call(bindObject, err) : null;\n }\n\n self.runTo(finalState, done, bindObject, err);\n });\n};\n\nAcceptorStateMachine.prototype.addState = function addState(name, acceptState, failState, fn) {\n if (typeof acceptState === 'function') {\n fn = acceptState; acceptState = null; failState = null;\n } else if (typeof failState === 'function') {\n fn = failState; failState = null;\n }\n\n if (!this.currentState) this.currentState = name;\n this.states[name] = { accept: acceptState, fail: failState, fn: fn };\n return this;\n};\n\n/**\n * @api private\n */\nmodule.exports = AcceptorStateMachine;\n","var util = require('../util');\nvar Rest = require('./rest');\nvar Json = require('./json');\nvar JsonBuilder = require('../json/builder');\nvar JsonParser = require('../json/parser');\n\nfunction populateBody(req) {\n var builder = new JsonBuilder();\n var input = req.service.api.operations[req.operation].input;\n\n if (input.payload) {\n var params = {};\n var payloadShape = input.members[input.payload];\n params = req.params[input.payload];\n if (params === undefined) return;\n\n if (payloadShape.type === 'structure') {\n req.httpRequest.body = builder.build(params, payloadShape);\n applyContentTypeHeader(req);\n } else { // non-JSON payload\n req.httpRequest.body = params;\n if (payloadShape.type === 'binary' || payloadShape.isStreaming) {\n applyContentTypeHeader(req, true);\n }\n }\n } else {\n var body = builder.build(req.params, input);\n if (body !== '{}' || req.httpRequest.method !== 'GET') { //don't send empty body for GET method\n req.httpRequest.body = body;\n }\n applyContentTypeHeader(req);\n }\n}\n\nfunction applyContentTypeHeader(req, isBinary) {\n var operation = req.service.api.operations[req.operation];\n var input = operation.input;\n\n if (!req.httpRequest.headers['Content-Type']) {\n var type = isBinary ? 'binary/octet-stream' : 'application/json';\n req.httpRequest.headers['Content-Type'] = type;\n }\n}\n\nfunction buildRequest(req) {\n Rest.buildRequest(req);\n\n // never send body payload on HEAD/DELETE\n if (['HEAD', 'DELETE'].indexOf(req.httpRequest.method) < 0) {\n populateBody(req);\n }\n}\n\nfunction extractError(resp) {\n Json.extractError(resp);\n}\n\nfunction extractData(resp) {\n Rest.extractData(resp);\n\n var req = resp.request;\n var operation = req.service.api.operations[req.operation];\n var rules = req.service.api.operations[req.operation].output || {};\n var parser;\n var hasEventOutput = operation.hasEventOutput;\n\n if (rules.payload) {\n var payloadMember = rules.members[rules.payload];\n var body = resp.httpResponse.body;\n if (payloadMember.isEventStream) {\n parser = new JsonParser();\n resp.data[payload] = util.createEventStream(\n AWS.HttpClient.streamsApiVersion === 2 ? resp.httpResponse.stream : body,\n parser,\n payloadMember\n );\n } else if (payloadMember.type === 'structure' || payloadMember.type === 'list') {\n var parser = new JsonParser();\n resp.data[rules.payload] = parser.parse(body, payloadMember);\n } else if (payloadMember.type === 'binary' || payloadMember.isStreaming) {\n resp.data[rules.payload] = body;\n } else {\n resp.data[rules.payload] = payloadMember.toType(body);\n }\n } else {\n var data = resp.data;\n Json.extractData(resp);\n resp.data = util.merge(data, resp.data);\n }\n}\n\n/**\n * @api private\n */\nmodule.exports = {\n buildRequest: buildRequest,\n extractError: extractError,\n extractData: extractData\n};\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['elasticache'] = {};\nAWS.ElastiCache = Service.defineService('elasticache', ['2012-11-15*', '2014-03-24*', '2014-07-15*', '2014-09-30*', '2015-02-02']);\nObject.defineProperty(apiLoader.services['elasticache'], '2015-02-02', {\n get: function get() {\n var model = require('../apis/elasticache-2015-02-02.min.json');\n model.paginators = require('../apis/elasticache-2015-02-02.paginators.json').pagination;\n model.waiters = require('../apis/elasticache-2015-02-02.waiters2.json').waiters;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.ElastiCache;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['elasticbeanstalk'] = {};\nAWS.ElasticBeanstalk = Service.defineService('elasticbeanstalk', ['2010-12-01']);\nObject.defineProperty(apiLoader.services['elasticbeanstalk'], '2010-12-01', {\n get: function get() {\n var model = require('../apis/elasticbeanstalk-2010-12-01.min.json');\n model.paginators = require('../apis/elasticbeanstalk-2010-12-01.paginators.json').pagination;\n model.waiters = require('../apis/elasticbeanstalk-2010-12-01.waiters2.json').waiters;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.ElasticBeanstalk;\n","var hashUtils = require('./browserHashUtils');\n\n/**\n * @api private\n */\nfunction Hmac(hashCtor, secret) {\n this.hash = new hashCtor();\n this.outer = new hashCtor();\n\n var inner = bufferFromSecret(hashCtor, secret);\n var outer = new Uint8Array(hashCtor.BLOCK_SIZE);\n outer.set(inner);\n\n for (var i = 0; i < hashCtor.BLOCK_SIZE; i++) {\n inner[i] ^= 0x36;\n outer[i] ^= 0x5c;\n }\n\n this.hash.update(inner);\n this.outer.update(outer);\n\n // Zero out the copied key buffer.\n for (var i = 0; i < inner.byteLength; i++) {\n inner[i] = 0;\n }\n}\n\n/**\n * @api private\n */\nmodule.exports = exports = Hmac;\n\nHmac.prototype.update = function (toHash) {\n if (hashUtils.isEmptyData(toHash) || this.error) {\n return this;\n }\n\n try {\n this.hash.update(hashUtils.convertToBuffer(toHash));\n } catch (e) {\n this.error = e;\n }\n\n return this;\n};\n\nHmac.prototype.digest = function (encoding) {\n if (!this.outer.finished) {\n this.outer.update(this.hash.digest());\n }\n\n return this.outer.digest(encoding);\n};\n\nfunction bufferFromSecret(hashCtor, secret) {\n var input = hashUtils.convertToBuffer(secret);\n if (input.byteLength > hashCtor.BLOCK_SIZE) {\n var bufferHash = new hashCtor;\n bufferHash.update(input);\n input = bufferHash.digest();\n }\n var buffer = new Uint8Array(hashCtor.BLOCK_SIZE);\n buffer.set(input);\n return buffer;\n}\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['ses'] = {};\nAWS.SES = Service.defineService('ses', ['2010-12-01']);\nObject.defineProperty(apiLoader.services['ses'], '2010-12-01', {\n get: function get() {\n var model = require('../apis/email-2010-12-01.min.json');\n model.paginators = require('../apis/email-2010-12-01.paginators.json').pagination;\n model.waiters = require('../apis/email-2010-12-01.waiters2.json').waiters;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.SES;\n"],"sourceRoot":""}