@stacksjs/dns 0.64.5 → 0.65.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -1,28 +1,28 @@
1
1
  // @bun
2
- var zD=Object.create;var{getPrototypeOf:SD,defineProperty:CF,getOwnPropertyNames:PD}=Object;var XD=Object.prototype.hasOwnProperty;var u=(r,f,s)=>{s=r!=null?zD(SD(r)):{};const w=f||!r||!r.__esModule?CF(s,"default",{value:r,enumerable:!0}):s;for(let h of PD(r))if(!XD.call(w,h))CF(w,h,{get:()=>r[h],enumerable:!0});return w};var j=(r,f)=>()=>(f||r((f={exports:{}}).exports,f),f.exports);var Af=(r,f)=>{for(var s in f)CF(r,s,{get:f[s],enumerable:!0,configurable:!0,set:(w)=>f[s]=()=>w})};var G=(r,f)=>()=>(r&&(f=r(r=0)),f);var Rf=(r)=>{let f=r.httpHandler;return{setHttpHandler(s){f=s},httpHandler(){return f},updateHttpClientConfig(s,w){f.updateHttpClientConfig(s,w)},httpHandlerConfigs(){return f.httpHandlerConfigs()}}},Wf=(r)=>{return{httpHandler:r.httpHandler()}};var b4=()=>{};var $s=j((Eu,p4)=>{var{defineProperty:w$,getOwnPropertyDescriptor:YD,getOwnPropertyNames:KD}=Object,ZD=Object.prototype.hasOwnProperty,h$=(r,f)=>w$(r,"name",{value:f,configurable:!0}),MD=(r,f)=>{for(var s in f)w$(r,s,{get:f[s],enumerable:!0})},JD=(r,f,s,w)=>{if(f&&typeof f==="object"||typeof f==="function"){for(let h of KD(f))if(!ZD.call(r,h)&&h!==s)w$(r,h,{get:()=>f[h],enumerable:!(w=YD(f,h))||w.enumerable})}return r},QD=(r)=>JD(w$({},"__esModule",{value:!0}),r),c4={};MD(c4,{AlgorithmId:()=>e4,EndpointURLScheme:()=>x4,FieldPosition:()=>n4,HttpApiKeyAuthLocation:()=>g4,HttpAuthLocation:()=>_4,IniSectionType:()=>o4,RequestHandlerProtocol:()=>a4,SMITHY_CONTEXT_KEY:()=>DD,getDefaultClientConfiguration:()=>VD,resolveDefaultRuntimeConfig:()=>HD});p4.exports=QD(c4);var _4=((r)=>{return r.HEADER="header",r.QUERY="query",r})(_4||{}),g4=((r)=>{return r.HEADER="header",r.QUERY="query",r})(g4||{}),x4=((r)=>{return r.HTTP="http",r.HTTPS="https",r})(x4||{}),e4=((r)=>{return r.MD5="md5",r.CRC32="crc32",r.CRC32C="crc32c",r.SHA1="sha1",r.SHA256="sha256",r})(e4||{}),BD=h$((r)=>{const f=[];if(r.sha256!==void 0)f.push({algorithmId:()=>"sha256",checksumConstructor:()=>r.sha256});if(r.md5!=null)f.push({algorithmId:()=>"md5",checksumConstructor:()=>r.md5});return{_checksumAlgorithms:f,addChecksumAlgorithm(s){this._checksumAlgorithms.push(s)},checksumAlgorithms(){return this._checksumAlgorithms}}},"getChecksumConfiguration"),lD=h$((r)=>{const f={};return r.checksumAlgorithms().forEach((s)=>{f[s.algorithmId()]=s.checksumConstructor()}),f},"resolveChecksumRuntimeConfig"),VD=h$((r)=>{return{...BD(r)}},"getDefaultClientConfiguration"),HD=h$((r)=>{return{...lD(r)}},"resolveDefaultRuntimeConfig"),n4=((r)=>{return r[r.HEADER=0]="HEADER",r[r.TRAILER=1]="TRAILER",r})(n4||{}),DD="__smithy_context",o4=((r)=>{return r.PROFILE="profile",r.SSO_SESSION="sso-session",r.SERVICES="services",r})(o4||{}),a4=((r)=>{return r.HTTP_0_9="http/0.9",r.HTTP_1_0="http/1.0",r.TDS_8_0="tds/8.0",r})(a4||{})});var kD;var u4=G(()=>{kD=u($s(),1)});var t4=()=>{};function ND(r){return Object.keys(r).reduce((f,s)=>{const w=r[s];return{...f,[s]:Array.isArray(w)?[...w]:w}},{})}class Qr{constructor(r){this.method=r.method||"GET",this.hostname=r.hostname||"localhost",this.port=r.port,this.query=r.query||{},this.headers=r.headers||{},this.body=r.body,this.protocol=r.protocol?r.protocol.slice(-1)!==":"?`${r.protocol}:`:r.protocol:"https:",this.path=r.path?r.path.charAt(0)!=="/"?`/${r.path}`:r.path:"/",this.username=r.username,this.password=r.password,this.fragment=r.fragment}static clone(r){const f=new Qr({...r,headers:{...r.headers}});if(f.query)f.query=ND(f.query);return f}static isInstance(r){if(!r)return!1;const f=r;return"method"in f&&"protocol"in f&&"hostname"in f&&"path"in f&&typeof f.query==="object"&&typeof f.headers==="object"}clone(){return Qr.clone(this)}}class Gw{constructor(r){this.statusCode=r.statusCode,this.reason=r.reason,this.headers=r.headers||{},this.body=r.body}static isInstance(r){if(!r)return!1;const f=r;return typeof f.statusCode==="number"&&typeof f.headers==="object"}}var rL=()=>{};var qr=G(()=>{b4();u4();t4();rL()});function zf(r){return r}var yD=(r)=>(f)=>async(s)=>{if(!Qr.isInstance(s.request))return f(s);const{request:w}=s,{handlerProtocol:h=""}=r.requestHandler.metadata||{};if(h.indexOf("h2")>=0&&!w.headers[":authority"])delete w.headers.host,w.headers[":authority"]=w.hostname+(w.port?":"+w.port:"");else if(!w.headers.host){let E=w.hostname;if(w.port!=null)E+=`:${w.port}`;w.headers.host=E}return f(s)},qD,Sf=(r)=>({applyToStack:(f)=>{f.add(yD(r),qD)}});var ew=G(()=>{qr();qD={name:"hostHeaderMiddleware",step:"build",priority:"low",tags:["HOST"],override:!0}});var mD=()=>(r,f)=>async(s)=>{try{const w=await r(s),{clientName:h,commandName:E,logger:$,dynamoDbDocumentClientOptions:I={}}=f,{overrideInputFilterSensitiveLog:F,overrideOutputFilterSensitiveLog:U}=I,C=F??f.inputFilterSensitiveLog,L=U??f.outputFilterSensitiveLog,{$metadata:z,...S}=w.output;return $?.info?.({clientName:h,commandName:E,input:C(s.input),output:L(S),metadata:z}),w}catch(w){const{clientName:h,commandName:E,logger:$,dynamoDbDocumentClientOptions:I={}}=f,{overrideInputFilterSensitiveLog:F}=I,U=F??f.inputFilterSensitiveLog;throw $?.error?.({clientName:h,commandName:E,input:U(s.input),error:w,metadata:w.$metadata}),w}},vD,Pf=(r)=>({applyToStack:(f)=>{f.add(mD(),vD)}});var sL=G(()=>{vD={name:"loggerMiddleware",tags:["LOGGER"],step:"initialize",override:!0}});var nw=G(()=>{sL()});var fL="X-Amzn-Trace-Id",jD="AWS_LAMBDA_FUNCTION_NAME",iD="_X_AMZN_TRACE_ID",dD=(r)=>(f)=>async(s)=>{const{request:w}=s;if(!Qr.isInstance(w)||r.runtime!=="node"||w.headers.hasOwnProperty(fL))return f(s);const h=process.env[jD],E=process.env[iD],$=(I)=>typeof I==="string"&&I.length>0;if($(h)&&$(E))w.headers[fL]=E;return f({...s,request:w})},OD,Xf=(r)=>({applyToStack:(f)=>{f.add(dD(r),OD)}});var ow=G(()=>{qr();OD={step:"build",tags:["RECURSION_DETECTION"],name:"recursionDetectionMiddleware",override:!0,priority:"low"}});function Yf(r){return{...r,customUserAgent:typeof r.customUserAgent==="string"?[[r.customUserAgent]]:r.customUserAgent}}var bD,$1=(r)=>bD.test(r)||r.startsWith("[")&&r.endsWith("]");var LF=G(()=>{bD=new RegExp("^(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)(?:\\.(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)){3}$")});var cD,I1=(r,f=!1)=>{if(!f)return cD.test(r);const s=r.split(".");for(let w of s)if(!I1(w))return!1;return!0};var AF=G(()=>{cD=new RegExp("^(?!.*-$)(?!-)[a-zA-Z0-9-]{1,63}$")});var pr;var E$=G(()=>{pr={}});var U0="endpoints";function Xs(r){if(typeof r!=="object"||r==null)return r;if("ref"in r)return`\$${Xs(r.ref)}`;if("fn"in r)return`${r.fn}(${(r.argv||[]).map(Xs).join(", ")})`;return JSON.stringify(r,null,2)}var F1=()=>{};var Wr;var wL=G(()=>{Wr=class Wr extends Error{constructor(r){super(r);this.name="EndpointError"}}});var hL=()=>{};var EL=()=>{};var $L=()=>{};var IL=()=>{};var FL=()=>{};var UL=()=>{};var Ys=G(()=>{wL();hL();EL();$L();IL();FL();UL()});var TL=(r,f)=>r===f;var GL=(r)=>{const f=r.split("."),s=[];for(let w of f){const h=w.indexOf("[");if(h!==-1){if(w.indexOf("]")!==w.length-1)throw new Wr(`Path: '${r}' does not end with ']'`);const E=w.slice(h+1,-1);if(Number.isNaN(parseInt(E)))throw new Wr(`Invalid array index: '${E}' in path: '${r}'`);if(h!==0)s.push(w.slice(0,h));s.push(E)}else s.push(w)}return s};var CL=G(()=>{Ys()});var $$=(r,f)=>GL(f).reduce((s,w)=>{if(typeof s!=="object")throw new Wr(`Index '${w}' in '${f}' not found in '${JSON.stringify(r)}'`);else if(Array.isArray(s))return s[parseInt(w)];return s[w]},r);var LL=G(()=>{Ys();CL()});var AL=(r)=>r!=null;var RL=(r)=>!r;var I$,RF,WL=(r)=>{const f=(()=>{try{if(r instanceof URL)return r;if(typeof r==="object"&&"hostname"in r){const{hostname:z,port:S,protocol:K="",path:k="",query:l={}}=r,Q=new URL(`${K}//${z}${S?`:${S}`:""}${k}`);return Q.search=Object.entries(l).map(([N,x])=>`${N}=${x}`).join("&"),Q}return new URL(r)}catch(z){return null}})();if(!f)return console.error(`Unable to parse ${JSON.stringify(r)} as a whatwg URL.`),null;const s=f.href,{host:w,hostname:h,pathname:E,protocol:$,search:I}=f;if(I)return null;const F=$.slice(0,-1);if(!Object.values(I$.EndpointURLScheme).includes(F))return null;const U=$1(h),C=s.includes(`${w}:${RF[F]}`)||typeof r==="string"&&r.includes(`${w}:${RF[F]}`),L=`${w}${C?`:${RF[F]}`:""}`;return{scheme:F,authority:L,path:E,normalizedPath:E.endsWith("/")?E:`${E}/`,isIp:U}};var zL=G(()=>{I$=u($s(),1);LF();RF={[I$.EndpointURLScheme.HTTP]:80,[I$.EndpointURLScheme.HTTPS]:443}});var SL=(r,f)=>r===f;var PL=(r,f,s,w)=>{if(f>=s||r.length<s)return null;if(!w)return r.substring(f,s);return r.substring(r.length-s,r.length-f)};var XL=(r)=>encodeURIComponent(r).replace(/[!*'()]/g,(f)=>`%${f.charCodeAt(0).toString(16).toUpperCase()}`);var WF=G(()=>{LL();AF();zL()});var YL;var KL=G(()=>{WF();YL={booleanEquals:TL,getAttr:$$,isSet:AL,isValidHostLabel:I1,not:RL,parseURL:WL,stringEquals:SL,substring:PL,uriEncode:XL}});var F$=(r,f)=>{const s=[],w={...f.endpointParams,...f.referenceRecord};let h=0;while(h<r.length){const E=r.indexOf("{",h);if(E===-1){s.push(r.slice(h));break}s.push(r.slice(h,E));const $=r.indexOf("}",E);if($===-1){s.push(r.slice(E));break}if(r[E+1]==="{"&&r[$+1]==="}")s.push(r.slice(E+1,$)),h=$+2;const I=r.substring(E+1,$);if(I.includes("#")){const[F,U]=I.split("#");s.push($$(w[F],U))}else s.push(w[I]);h=$+1}return s.join("")};var zF=G(()=>{WF()});var ZL=({ref:r},f)=>{return{...f.endpointParams,...f.referenceRecord}[r]};var H0=(r,f,s)=>{if(typeof r==="string")return F$(r,s);else if(r.fn)return U$(r,s);else if(r.ref)return ZL(r,s);throw new Wr(`'${f}': ${String(r)} is not a string, function or reference.`)};var U1=G(()=>{Ys();SF();zF()});var U$=({fn:r,argv:f},s)=>{const w=f.map((E)=>["boolean","number"].includes(typeof E)?E:H0(E,"arg",s)),h=r.split(".");if(h[0]in pr&&h[1]!=null)return pr[h[0]][h[1]](...w);return YL[r](...w)};var SF=G(()=>{E$();KL();U1()});var ML=({assign:r,...f},s)=>{if(r&&r in s.referenceRecord)throw new Wr(`'${r}' is already defined in Reference Record.`);const w=U$(f,s);return s.logger?.debug?.(`${U0} evaluateCondition: ${Xs(f)} = ${Xs(w)}`),{result:w===""?!0:!!w,...r!=null&&{toAssign:{name:r,value:w}}}};var JL=G(()=>{F1();Ys();SF()});var aw=(r=[],f)=>{const s={};for(let w of r){const{result:h,toAssign:E}=ML(w,{...f,referenceRecord:{...f.referenceRecord,...s}});if(!h)return{result:h};if(E)s[E.name]=E.value,f.logger?.debug?.(`${U0} assign: ${E.name} := ${Xs(E.value)}`)}return{result:!0,referenceRecord:s}};var T$=G(()=>{F1();JL()});var QL=(r,f)=>Object.entries(r).reduce((s,[w,h])=>({...s,[w]:h.map((E)=>{const $=H0(E,"Header value entry",f);if(typeof $!=="string")throw new Wr(`Header '${w}' value '${$}' is not a string`);return $})}),{});var BL=G(()=>{Ys();U1()});var PF=(r,f)=>{if(Array.isArray(r))return r.map((s)=>PF(s,f));switch(typeof r){case"string":return F$(r,f);case"object":if(r===null)throw new Wr(`Unexpected endpoint property: ${r}`);return G$(r,f);case"boolean":return r;default:throw new Wr(`Unexpected endpoint property type: ${typeof r}`)}};var lL=G(()=>{Ys();zF();XF()});var G$=(r,f)=>Object.entries(r).reduce((s,[w,h])=>({...s,[w]:PF(h,f)}),{});var XF=G(()=>{lL()});var VL=(r,f)=>{const s=H0(r,"Endpoint URL",f);if(typeof s==="string")try{return new URL(s)}catch(w){throw console.error(`Failed to construct URL with ${s}`,w),w}throw new Wr(`Endpoint URL must be a string, got ${typeof s}`)};var HL=G(()=>{Ys();U1()});var DL=(r,f)=>{const{conditions:s,endpoint:w}=r,{result:h,referenceRecord:E}=aw(s,f);if(!h)return;const $={...f,referenceRecord:{...f.referenceRecord,...E}},{url:I,properties:F,headers:U}=w;return f.logger?.debug?.(`${U0} Resolving endpoint from template: ${Xs(w)}`),{...U!=null&&{headers:QL(U,$)},...F!=null&&{properties:G$(F,$)},url:VL(I,$)}};var kL=G(()=>{F1();T$();BL();XF();HL()});var NL=(r,f)=>{const{conditions:s,error:w}=r,{result:h,referenceRecord:E}=aw(s,f);if(!h)return;throw new Wr(H0(w,"Error",{...f,referenceRecord:{...f.referenceRecord,...E}}))};var yL=G(()=>{Ys();T$();U1()});var qL=(r,f)=>{const{conditions:s,rules:w}=r,{result:h,referenceRecord:E}=aw(s,f);if(!h)return;return C$(w,{...f,referenceRecord:{...f.referenceRecord,...E}})};var mL=G(()=>{T$();YF()});var C$=(r,f)=>{for(let s of r)if(s.type==="endpoint"){const w=DL(s,f);if(w)return w}else if(s.type==="error")NL(s,f);else if(s.type==="tree"){const w=qL(s,f);if(w)return w}else throw new Wr(`Unknown endpoint rule: ${s}`);throw new Wr("Rules evaluation failed")};var YF=G(()=>{Ys();kL();yL();mL()});var vL=G(()=>{E$();YF()});var es=(r,f)=>{const{endpointParams:s,logger:w}=f,{parameters:h,rules:E}=r;f.logger?.debug?.(`${U0} Initial EndpointParams: ${Xs(s)}`);const $=Object.entries(h).filter(([,U])=>U.default!=null).map(([U,C])=>[U,C.default]);if($.length>0)for(let[U,C]of $)s[U]=s[U]??C;const I=Object.entries(h).filter(([,U])=>U.required).map(([U])=>U);for(let U of I)if(s[U]==null)throw new Wr(`Missing required parameter: '${U}'`);const F=C$(E,{endpointParams:s,logger:w,referenceRecord:{}});if(f.endpointParams?.Endpoint)try{const U=new URL(f.endpointParams.Endpoint),{protocol:C,port:L}=U;F.url.protocol=C,F.url.port=L}catch(U){}return f.logger?.debug?.(`${U0} Resolved endpoint: ${Xs(F)}`),F};var jL=G(()=>{F1();Ys();vL()});var ns=G(()=>{LF();AF();E$();jL();Ys()});var KF=G(()=>{ns()});var ZF=(r,f=!1)=>{if(f){for(let s of r.split("."))if(!ZF(s))return!1;return!0}if(!I1(r))return!1;if(r.length<3||r.length>63)return!1;if(r!==r.toLowerCase())return!1;if($1(r))return!1;return!0};var iL=G(()=>{ns();KF()});var dL=(r)=>{const f=r.split(":");if(f.length<6)return null;const[s,w,h,E,$,...I]=f;if(s!=="arn"||w===""||h===""||I.join(":")==="")return null;const F=I.map((U)=>U.split("/")).flat();return{partition:w,service:h,region:E,accountId:$,resourceId:F}};var bL;var OL=G(()=>{bL={partitions:[{id:"aws",outputs:{dnsSuffix:"amazonaws.com",dualStackDnsSuffix:"api.aws",implicitGlobalRegion:"us-east-1",name:"aws",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^(us|eu|ap|sa|ca|me|af|il)\\-\\w+\\-\\d+$",regions:{"af-south-1":{description:"Africa (Cape Town)"},"ap-east-1":{description:"Asia Pacific (Hong Kong)"},"ap-northeast-1":{description:"Asia Pacific (Tokyo)"},"ap-northeast-2":{description:"Asia Pacific (Seoul)"},"ap-northeast-3":{description:"Asia Pacific (Osaka)"},"ap-south-1":{description:"Asia Pacific (Mumbai)"},"ap-south-2":{description:"Asia Pacific (Hyderabad)"},"ap-southeast-1":{description:"Asia Pacific (Singapore)"},"ap-southeast-2":{description:"Asia Pacific (Sydney)"},"ap-southeast-3":{description:"Asia Pacific (Jakarta)"},"ap-southeast-4":{description:"Asia Pacific (Melbourne)"},"ap-southeast-5":{description:"Asia Pacific (Malaysia)"},"aws-global":{description:"AWS Standard global region"},"ca-central-1":{description:"Canada (Central)"},"ca-west-1":{description:"Canada West (Calgary)"},"eu-central-1":{description:"Europe (Frankfurt)"},"eu-central-2":{description:"Europe (Zurich)"},"eu-north-1":{description:"Europe (Stockholm)"},"eu-south-1":{description:"Europe (Milan)"},"eu-south-2":{description:"Europe (Spain)"},"eu-west-1":{description:"Europe (Ireland)"},"eu-west-2":{description:"Europe (London)"},"eu-west-3":{description:"Europe (Paris)"},"il-central-1":{description:"Israel (Tel Aviv)"},"me-central-1":{description:"Middle East (UAE)"},"me-south-1":{description:"Middle East (Bahrain)"},"sa-east-1":{description:"South America (Sao Paulo)"},"us-east-1":{description:"US East (N. Virginia)"},"us-east-2":{description:"US East (Ohio)"},"us-west-1":{description:"US West (N. California)"},"us-west-2":{description:"US West (Oregon)"}}},{id:"aws-cn",outputs:{dnsSuffix:"amazonaws.com.cn",dualStackDnsSuffix:"api.amazonwebservices.com.cn",implicitGlobalRegion:"cn-northwest-1",name:"aws-cn",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^cn\\-\\w+\\-\\d+$",regions:{"aws-cn-global":{description:"AWS China global region"},"cn-north-1":{description:"China (Beijing)"},"cn-northwest-1":{description:"China (Ningxia)"}}},{id:"aws-us-gov",outputs:{dnsSuffix:"amazonaws.com",dualStackDnsSuffix:"api.aws",implicitGlobalRegion:"us-gov-west-1",name:"aws-us-gov",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^us\\-gov\\-\\w+\\-\\d+$",regions:{"aws-us-gov-global":{description:"AWS GovCloud (US) global region"},"us-gov-east-1":{description:"AWS GovCloud (US-East)"},"us-gov-west-1":{description:"AWS GovCloud (US-West)"}}},{id:"aws-iso",outputs:{dnsSuffix:"c2s.ic.gov",dualStackDnsSuffix:"c2s.ic.gov",implicitGlobalRegion:"us-iso-east-1",name:"aws-iso",supportsDualStack:!1,supportsFIPS:!0},regionRegex:"^us\\-iso\\-\\w+\\-\\d+$",regions:{"aws-iso-global":{description:"AWS ISO (US) global region"},"us-iso-east-1":{description:"US ISO East"},"us-iso-west-1":{description:"US ISO WEST"}}},{id:"aws-iso-b",outputs:{dnsSuffix:"sc2s.sgov.gov",dualStackDnsSuffix:"sc2s.sgov.gov",implicitGlobalRegion:"us-isob-east-1",name:"aws-iso-b",supportsDualStack:!1,supportsFIPS:!0},regionRegex:"^us\\-isob\\-\\w+\\-\\d+$",regions:{"aws-iso-b-global":{description:"AWS ISOB (US) global region"},"us-isob-east-1":{description:"US ISOB East (Ohio)"}}},{id:"aws-iso-e",outputs:{dnsSuffix:"cloud.adc-e.uk",dualStackDnsSuffix:"cloud.adc-e.uk",implicitGlobalRegion:"eu-isoe-west-1",name:"aws-iso-e",supportsDualStack:!1,supportsFIPS:!0},regionRegex:"^eu\\-isoe\\-\\w+\\-\\d+$",regions:{"eu-isoe-west-1":{description:"EU ISOE West"}}},{id:"aws-iso-f",outputs:{dnsSuffix:"csp.hci.ic.gov",dualStackDnsSuffix:"csp.hci.ic.gov",implicitGlobalRegion:"us-isof-south-1",name:"aws-iso-f",supportsDualStack:!1,supportsFIPS:!0},regionRegex:"^us\\-isof\\-\\w+\\-\\d+$",regions:{}}],version:"1.1"}});var gD,xD="",cL=(r)=>{const{partitions:f}=gD;for(let w of f){const{regions:h,outputs:E}=w;for(let[$,I]of Object.entries(h))if($===r)return{...E,...I}}for(let w of f){const{regionRegex:h,outputs:E}=w;if(new RegExp(h).test(r))return{...E}}const s=f.find((w)=>w.id==="aws");if(!s)throw new Error("Provided region was not found in the partition array or regex, and default partition with id 'aws' doesn't exist.");return{...s.outputs}},_L=()=>xD;var MF=G(()=>{OL();gD=bL});var os;var gL=G(()=>{ns();iL();MF();os={isVirtualHostableS3Bucket:ZF,parseArn:dL,partition:cL};pr.aws=os});var xL=G(()=>{ns()});var eL=G(()=>{ns()});var nL=()=>{};var oL=()=>{};var aL=()=>{};var pL=()=>{};var uL=()=>{};var tL=G(()=>{eL();nL();oL();aL();pL();uL()});var Cw=G(()=>{gL();MF();KF();xL();tL()});var JF="user-agent",L$="x-amz-user-agent",QF=" ",A$="/",rA,sA,BF="-";var fA=G(()=>{rA=/[^\!\$\%\&\'\*\+\-\.\^\_\`\|\~\d\w]/g,sA=/[^\!\$\%\&\'\*\+\-\.\^\_\`\|\~\d\w\#]/g});var eD=(r)=>(f,s)=>async(w)=>{const{request:h}=w;if(!Qr.isInstance(h))return f(w);const{headers:E}=h,$=s?.userAgent?.map(lF)||[],I=(await r.defaultUserAgentProvider()).map(lF),F=r?.customUserAgent?.map(lF)||[],U=_L(),C=(U?[U]:[]).concat([...I,...$,...F]).join(QF),L=[...I.filter((z)=>z.startsWith("aws-sdk-")),...F].join(QF);if(r.runtime!=="browser"){if(L)E[L$]=E[L$]?`${E[JF]} ${L}`:L;E[JF]=C}else E[L$]=C;return f({...w,request:h})},lF=(r)=>{const f=r[0].split(A$).map(($)=>$.replace(rA,BF)).join(A$),s=r[1]?.replace(sA,BF),w=f.indexOf(A$),h=f.substring(0,w);let E=f.substring(w+1);if(h==="api")E=E.toLowerCase();return[h,E,s].filter(($)=>$&&$.length>0).reduce(($,I,F)=>{switch(F){case 0:return I;case 1:return`${$}/${I}`;default:return`${$}#${I}`}},"")},nD,Kf=(r)=>({applyToStack:(f)=>{f.add(eD(r),nD)}});var wA=G(()=>{Cw();qr();fA();nD={name:"getUserAgentMiddleware",step:"build",priority:"low",tags:["SET_USER_AGENT","USER_AGENT"],override:!0}});var pw=G(()=>{wA()});var uw=(r,f,s)=>{if(!(f in r))return;if(r[f]==="true")return!0;if(r[f]==="false")return!1;throw new Error(`Cannot load ${s} "${f}". Expected "true" or "false", got ${r[f]}.`)};var D0;var hA=G(()=>{(function(r){r.ENV="env",r.CONFIG="shared config entry"})(D0||(D0={}))});var VF=G(()=>{hA()});var oD="AWS_USE_DUALSTACK_ENDPOINT",aD="use_dualstack_endpoint",Zf;var EA=G(()=>{VF();Zf={environmentVariableSelector:(r)=>uw(r,oD,D0.ENV),configFileSelector:(r)=>uw(r,aD,D0.CONFIG),default:!1}});var pD="AWS_USE_FIPS_ENDPOINT",uD="use_fips_endpoint",Mf;var $A=G(()=>{VF();Mf={environmentVariableSelector:(r)=>uw(r,pD,D0.ENV),configFileSelector:(r)=>uw(r,uD,D0.CONFIG),default:!1}});var HF,Ks=(r)=>r[HF.SMITHY_CONTEXT_KEY]||(r[HF.SMITHY_CONTEXT_KEY]={});var IA=G(()=>{HF=u($s(),1)});var Nr=(r)=>{if(typeof r==="function")return r;const f=Promise.resolve(r);return()=>f};var as=G(()=>{IA()});var FA=G(()=>{as()});var UA=G(()=>{as()});var TA=G(()=>{EA();$A();FA();UA()});var Zs,Jf;var GA=G(()=>{Zs={environmentVariableSelector:(r)=>r.AWS_REGION,configFileSelector:(r)=>r.region,default:()=>{throw new Error("Region is missing")}},Jf={preferredFile:"credentials"}});var R$=(r)=>typeof r==="string"&&(r.startsWith("fips-")||r.endsWith("-fips"));var DF=(r)=>R$(r)?["fips-aws-global","aws-fips"].includes(r)?"us-east-1":r.replace(/fips-(dkr-|prod-)?|-fips/,""):r;var CA=()=>{};var Qf=(r)=>{const{region:f,useFipsEndpoint:s}=r;if(!f)throw new Error("Region is missing");return{...r,region:async()=>{if(typeof f==="string")return DF(f);const w=await f();return DF(w)},useFipsEndpoint:async()=>{const w=typeof f==="string"?f:await f();if(R$(w))return!0;return typeof s!=="function"?Promise.resolve(!!s):s()}}};var LA=G(()=>{CA()});var AA=G(()=>{GA();LA()});var RA=()=>{};var WA=()=>{};var zA=()=>{};var SA=G(()=>{RA();WA();zA()});var Ms=G(()=>{TA();AA();SA()});var T1=j((Afr,KA)=>{var{defineProperty:W$,getOwnPropertyDescriptor:tD,getOwnPropertyNames:rk}=Object,sk=Object.prototype.hasOwnProperty,XA=(r,f)=>W$(r,"name",{value:f,configurable:!0}),fk=(r,f)=>{for(var s in f)W$(r,s,{get:f[s],enumerable:!0})},wk=(r,f,s,w)=>{if(f&&typeof f==="object"||typeof f==="function"){for(let h of rk(f))if(!sk.call(r,h)&&h!==s)W$(r,h,{get:()=>f[h],enumerable:!(w=tD(f,h))||w.enumerable})}return r},hk=(r)=>wk(W$({},"__esModule",{value:!0}),r),YA={};fk(YA,{getSmithyContext:()=>Ek,normalizeProvider:()=>$k});KA.exports=hk(YA);var PA=$s(),Ek=XA((r)=>r[PA.SMITHY_CONTEXT_KEY]||(r[PA.SMITHY_CONTEXT_KEY]={}),"getSmithyContext"),$k=XA((r)=>{if(typeof r==="function")return r;const f=Promise.resolve(r);return()=>f},"normalizeProvider")});var kF=j((Rfr,BA)=>{var{defineProperty:z$,getOwnPropertyDescriptor:Ik,getOwnPropertyNames:Fk}=Object,Uk=Object.prototype.hasOwnProperty,Lw=(r,f)=>z$(r,"name",{value:f,configurable:!0}),Tk=(r,f)=>{for(var s in f)z$(r,s,{get:f[s],enumerable:!0})},Gk=(r,f,s,w)=>{if(f&&typeof f==="object"||typeof f==="function"){for(let h of Fk(f))if(!Uk.call(r,h)&&h!==s)z$(r,h,{get:()=>f[h],enumerable:!(w=Ik(f,h))||w.enumerable})}return r},Ck=(r)=>Gk(z$({},"__esModule",{value:!0}),r),ZA={};Tk(ZA,{CredentialsProviderError:()=>Lk,ProviderError:()=>S$,TokenProviderError:()=>Ak,chain:()=>Rk,fromStatic:()=>Wk,memoize:()=>zk});BA.exports=Ck(ZA);var MA=class r extends Error{constructor(f,s=!0){var w;let h,E=!0;if(typeof s==="boolean")h=void 0,E=s;else if(s!=null&&typeof s==="object")h=s.logger,E=s.tryNextLink??!0;super(f);this.name="ProviderError",this.tryNextLink=E,Object.setPrototypeOf(this,r.prototype),(w=h==null?void 0:h.debug)==null||w.call(h,`@smithy/property-provider ${E?"->":"(!)"} ${f}`)}static from(f,s=!0){return Object.assign(new this(f.message,s),f)}};Lw(MA,"ProviderError");var S$=MA,JA=class r extends S${constructor(f,s=!0){super(f,s);this.name="CredentialsProviderError",Object.setPrototypeOf(this,r.prototype)}};Lw(JA,"CredentialsProviderError");var Lk=JA,QA=class r extends S${constructor(f,s=!0){super(f,s);this.name="TokenProviderError",Object.setPrototypeOf(this,r.prototype)}};Lw(QA,"TokenProviderError");var Ak=QA,Rk=Lw((...r)=>async()=>{if(r.length===0)throw new S$("No providers in chain");let f;for(let s of r)try{return await s()}catch(w){if(f=w,w==null?void 0:w.tryNextLink)continue;throw w}throw f},"chain"),Wk=Lw((r)=>()=>Promise.resolve(r),"fromStatic"),zk=Lw((r,f,s)=>{let w,h,E,$=!1;const I=Lw(async()=>{if(!h)h=r();try{w=await h,E=!0,$=!1}finally{h=void 0}return w},"coalesceProvider");if(f===void 0)return async(F)=>{if(!E||(F==null?void 0:F.forceRefresh))w=await I();return w};return async(F)=>{if(!E||(F==null?void 0:F.forceRefresh))w=await I();if($)return w;if(s&&!s(w))return $=!0,w;if(f(w))return await I(),w;return w}},"memoize")});var tw=j((lA)=>{Object.defineProperty(lA,"__esModule",{value:!0});lA.getHomeDir=void 0;var Sk=import.meta.require("os"),Pk=import.meta.require("path"),NF={},Xk=()=>{if(process&&process.geteuid)return`${process.geteuid()}`;return"DEFAULT"},Yk=()=>{const{HOME:r,USERPROFILE:f,HOMEPATH:s,HOMEDRIVE:w=`C:${Pk.sep}`}=process.env;if(r)return r;if(f)return f;if(s)return`${w}${s}`;const h=Xk();if(!NF[h])NF[h]=Sk.homedir();return NF[h]};lA.getHomeDir=Yk});var yF=j((HA)=>{Object.defineProperty(HA,"__esModule",{value:!0});HA.getSSOTokenFilepath=void 0;var Kk=import.meta.require("crypto"),Zk=import.meta.require("path"),Mk=tw(),Jk=(r)=>{const s=Kk.createHash("sha1").update(r).digest("hex");return Zk.join(Mk.getHomeDir(),".aws","sso","cache",`${s}.json`)};HA.getSSOTokenFilepath=Jk});var yA=j((kA)=>{Object.defineProperty(kA,"__esModule",{value:!0});kA.getSSOTokenFromFile=void 0;var Qk=import.meta.require("fs"),Bk=yF(),{readFile:lk}=Qk.promises,Vk=async(r)=>{const f=Bk.getSSOTokenFilepath(r),s=await lk(f,"utf8");return JSON.parse(s)};kA.getSSOTokenFromFile=Vk});var mF=j((qA)=>{Object.defineProperty(qA,"__esModule",{value:!0});qA.slurpFile=void 0;var Hk=import.meta.require("fs"),{readFile:Dk}=Hk.promises,qF={},kk=(r,f)=>{if(!qF[r]||(f===null||f===void 0?void 0:f.ignoreCache))qF[r]=Dk(r,"utf8");return qF[r]};qA.slurpFile=kk});var dF=j((Xfr,C1)=>{var{defineProperty:Y$,getOwnPropertyDescriptor:Nk,getOwnPropertyNames:yk}=Object,qk=Object.prototype.hasOwnProperty,Js=(r,f)=>Y$(r,"name",{value:f,configurable:!0}),mk=(r,f)=>{for(var s in f)Y$(r,s,{get:f[s],enumerable:!0})},vF=(r,f,s,w)=>{if(f&&typeof f==="object"||typeof f==="function"){for(let h of yk(f))if(!qk.call(r,h)&&h!==s)Y$(r,h,{get:()=>f[h],enumerable:!(w=Nk(f,h))||w.enumerable})}return r},iF=(r,f,s)=>(vF(r,f,"default"),s&&vF(s,f,"default")),vk=(r)=>vF(Y$({},"__esModule",{value:!0}),r),G1={};mk(G1,{CONFIG_PREFIX_SEPARATOR:()=>Aw,DEFAULT_PROFILE:()=>dA,ENV_PROFILE:()=>iA,getProfileName:()=>jk,loadSharedConfigFiles:()=>bA,loadSsoSessionData:()=>pk,parseKnownFiles:()=>tk});C1.exports=vk(G1);iF(G1,tw(),C1.exports);var iA="AWS_PROFILE",dA="default",jk=Js((r)=>r.profile||process.env[iA]||dA,"getProfileName");iF(G1,yF(),C1.exports);iF(G1,yA(),C1.exports);var P$=$s(),ik=Js((r)=>Object.entries(r).filter(([f])=>{const s=f.indexOf(Aw);if(s===-1)return!1;return Object.values(P$.IniSectionType).includes(f.substring(0,s))}).reduce((f,[s,w])=>{const h=s.indexOf(Aw),E=s.substring(0,h)===P$.IniSectionType.PROFILE?s.substring(h+1):s;return f[E]=w,f},{...r.default&&{default:r.default}}),"getConfigData"),X$=import.meta.require("path"),dk=tw(),Ok="AWS_CONFIG_FILE",OA=Js(()=>process.env[Ok]||X$.join(dk.getHomeDir(),".aws","config"),"getConfigFilepath"),bk=tw(),ck="AWS_SHARED_CREDENTIALS_FILE",_k=Js(()=>process.env[ck]||X$.join(bk.getHomeDir(),".aws","credentials"),"getCredentialsFilepath"),gk=tw(),xk=/^([\w-]+)\s(["'])?([\w-@\+\.%:/]+)\2$/,ek=["__proto__","profile __proto__"],jF=Js((r)=>{const f={};let s,w;for(let h of r.split(/\r?\n/)){const E=h.split(/(^|\s)[;#]/)[0].trim();if(E[0]==="["&&E[E.length-1]==="]"){s=void 0,w=void 0;const I=E.substring(1,E.length-1),F=xk.exec(I);if(F){const[,U,,C]=F;if(Object.values(P$.IniSectionType).includes(U))s=[U,C].join(Aw)}else s=I;if(ek.includes(I))throw new Error(`Found invalid profile name "${I}"`)}else if(s){const I=E.indexOf("=");if(![0,-1].includes(I)){const[F,U]=[E.substring(0,I).trim(),E.substring(I+1).trim()];if(U==="")w=F;else{if(w&&h.trimStart()===h)w=void 0;f[s]=f[s]||{};const C=w?[w,F].join(Aw):F;f[s][C]=U}}}}return f},"parseIni"),vA=mF(),jA=Js(()=>({}),"swallowError"),Aw=".",bA=Js(async(r={})=>{const{filepath:f=_k(),configFilepath:s=OA()}=r,w=gk.getHomeDir();let E=f;if(f.startsWith("~/"))E=X$.join(w,f.slice(2));let $=s;if(s.startsWith("~/"))$=X$.join(w,s.slice(2));const I=await Promise.all([vA.slurpFile($,{ignoreCache:r.ignoreCache}).then(jF).then(ik).catch(jA),vA.slurpFile(E,{ignoreCache:r.ignoreCache}).then(jF).catch(jA)]);return{configFile:I[0],credentialsFile:I[1]}},"loadSharedConfigFiles"),nk=Js((r)=>Object.entries(r).filter(([f])=>f.startsWith(P$.IniSectionType.SSO_SESSION+Aw)).reduce((f,[s,w])=>({...f,[s.substring(s.indexOf(Aw)+1)]:w}),{}),"getSsoSessionData"),ok=mF(),ak=Js(()=>({}),"swallowError"),pk=Js(async(r={})=>ok.slurpFile(r.configFilepath??OA()).then(jF).then(nk).catch(ak),"loadSsoSessionData"),uk=Js((...r)=>{const f={};for(let s of r)for(let[w,h]of Object.entries(s))if(f[w]!==void 0)Object.assign(f[w],h);else f[w]=h;return f},"mergeConfigFiles"),tk=Js(async(r)=>{const f=await bA(r);return uk(f.configFile,f.credentialsFile)},"parseKnownFiles")});var xA=j((Yfr,gA)=>{function OF(r){try{const f=new Set(Array.from(r.match(/([A-Z_]){3,}/g)??[]));return f.delete("CONFIG"),f.delete("CONFIG_PREFIX_SEPARATOR"),f.delete("ENV"),[...f].join(", ")}catch(f){return r}}var{defineProperty:K$,getOwnPropertyDescriptor:rN,getOwnPropertyNames:sN}=Object,fN=Object.prototype.hasOwnProperty,rh=(r,f)=>K$(r,"name",{value:f,configurable:!0}),wN=(r,f)=>{for(var s in f)K$(r,s,{get:f[s],enumerable:!0})},hN=(r,f,s,w)=>{if(f&&typeof f==="object"||typeof f==="function"){for(let h of sN(f))if(!fN.call(r,h)&&h!==s)K$(r,h,{get:()=>f[h],enumerable:!(w=rN(f,h))||w.enumerable})}return r},EN=(r)=>hN(K$({},"__esModule",{value:!0}),r),_A={};wN(_A,{loadConfig:()=>TN});gA.exports=EN(_A);var L1=kF();rh(OF,"getSelectorName");var $N=rh((r,f)=>async()=>{try{const s=r(process.env);if(s===void 0)throw new Error;return s}catch(s){throw new L1.CredentialsProviderError(s.message||`Not found in ENV: ${OF(r.toString())}`,{logger:f})}},"fromEnv"),cA=dF(),IN=rh((r,{preferredFile:f="config",...s}={})=>async()=>{const w=cA.getProfileName(s),{configFile:h,credentialsFile:E}=await cA.loadSharedConfigFiles(s),$=E[w]||{},I=h[w]||{},F=f==="config"?{...$,...I}:{...I,...$};try{const C=r(F,f==="config"?h:E);if(C===void 0)throw new Error;return C}catch(U){throw new L1.CredentialsProviderError(U.message||`Not found in config files w/ profile [${w}]: ${OF(r.toString())}`,{logger:s.logger})}},"fromSharedConfigFiles"),FN=rh((r)=>typeof r==="function","isFunction"),UN=rh((r)=>FN(r)?async()=>await r():L1.fromStatic(r),"fromStatic"),TN=rh(({environmentVariableSelector:r,configFileSelector:f,default:s},w={})=>L1.memoize(L1.chain($N(r),IN(f,w),UN(s))),"loadConfig")});var uA=j((aA)=>{Object.defineProperty(aA,"__esModule",{value:!0});aA.getEndpointUrlConfig=void 0;var eA=dF(),nA="AWS_ENDPOINT_URL",oA="endpoint_url",GN=(r)=>({environmentVariableSelector:(f)=>{const s=r.split(" ").map((E)=>E.toUpperCase()),w=f[[nA,...s].join("_")];if(w)return w;const h=f[nA];if(h)return h;return},configFileSelector:(f,s)=>{if(s&&f.services){const h=s[["services",f.services].join(eA.CONFIG_PREFIX_SEPARATOR)];if(h){const E=r.split(" ").map((I)=>I.toLowerCase()),$=h[[E.join("_"),oA].join(eA.CONFIG_PREFIX_SEPARATOR)];if($)return $}}const w=f[oA];if(w)return w;return},default:void 0});aA.getEndpointUrlConfig=GN});var sR=j((tA)=>{Object.defineProperty(tA,"__esModule",{value:!0});tA.getEndpointFromConfig=void 0;var CN=xA(),LN=uA(),AN=async(r)=>CN.loadConfig(LN.getEndpointUrlConfig(r))();tA.getEndpointFromConfig=AN});var ER=j((Mfr,hR)=>{function wR(r){const f={};if(r=r.replace(/^\?/,""),r)for(let s of r.split("&")){let[w,h=null]=s.split("=");if(w=decodeURIComponent(w),h)h=decodeURIComponent(h);if(!(w in f))f[w]=h;else if(Array.isArray(f[w]))f[w].push(h);else f[w]=[f[w],h]}return f}var{defineProperty:Z$,getOwnPropertyDescriptor:RN,getOwnPropertyNames:WN}=Object,zN=Object.prototype.hasOwnProperty,SN=(r,f)=>Z$(r,"name",{value:f,configurable:!0}),PN=(r,f)=>{for(var s in f)Z$(r,s,{get:f[s],enumerable:!0})},XN=(r,f,s,w)=>{if(f&&typeof f==="object"||typeof f==="function"){for(let h of WN(f))if(!zN.call(r,h)&&h!==s)Z$(r,h,{get:()=>f[h],enumerable:!(w=RN(f,h))||w.enumerable})}return r},YN=(r)=>XN(Z$({},"__esModule",{value:!0}),r),fR={};PN(fR,{parseQueryString:()=>wR});hR.exports=YN(fR);SN(wR,"parseQueryString")});var UR=j((Jfr,FR)=>{var{defineProperty:M$,getOwnPropertyDescriptor:KN,getOwnPropertyNames:ZN}=Object,MN=Object.prototype.hasOwnProperty,JN=(r,f)=>M$(r,"name",{value:f,configurable:!0}),QN=(r,f)=>{for(var s in f)M$(r,s,{get:f[s],enumerable:!0})},BN=(r,f,s,w)=>{if(f&&typeof f==="object"||typeof f==="function"){for(let h of ZN(f))if(!MN.call(r,h)&&h!==s)M$(r,h,{get:()=>f[h],enumerable:!(w=KN(f,h))||w.enumerable})}return r},lN=(r)=>BN(M$({},"__esModule",{value:!0}),r),$R={};QN($R,{parseUrl:()=>IR});FR.exports=lN($R);var VN=ER(),IR=JN((r)=>{if(typeof r==="string")return IR(new URL(r));const{hostname:f,pathname:s,port:w,protocol:h,search:E}=r;let $;if(E)$=VN.parseQueryString(E);return{hostname:f,port:w?parseInt(w):void 0,protocol:h,path:s,query:$}},"parseUrl")});var cF=j((Qfr,WR)=>{function RR(r,f,s){return{applyToStack:(w)=>{w.add(GR(r,s),LR),w.add(CR(r,f),AR)}}}var{defineProperty:J$,getOwnPropertyDescriptor:HN,getOwnPropertyNames:DN}=Object,kN=Object.prototype.hasOwnProperty,bF=(r,f)=>J$(r,"name",{value:f,configurable:!0}),NN=(r,f)=>{for(var s in f)J$(r,s,{get:f[s],enumerable:!0})},yN=(r,f,s,w)=>{if(f&&typeof f==="object"||typeof f==="function"){for(let h of DN(f))if(!kN.call(r,h)&&h!==s)J$(r,h,{get:()=>f[h],enumerable:!(w=HN(f,h))||w.enumerable})}return r},qN=(r)=>yN(J$({},"__esModule",{value:!0}),r),TR={};NN(TR,{deserializerMiddleware:()=>GR,deserializerMiddlewareOption:()=>LR,getSerdePlugin:()=>RR,serializerMiddleware:()=>CR,serializerMiddlewareOption:()=>AR});WR.exports=qN(TR);var GR=bF((r,f)=>(s)=>async(w)=>{const{response:h}=await s(w);try{const E=await f(h,r);return{response:h,output:E}}catch(E){if(Object.defineProperty(E,"$response",{value:h}),!("$metadata"in E)){if(E.message+="\n Deserialization error: to see the raw response, inspect the hidden field {error}.$response on this object.",typeof E.$responseBodyText!=="undefined"){if(E.$response)E.$response.body=E.$responseBodyText}}throw E}},"deserializerMiddleware"),CR=bF((r,f)=>(s,w)=>async(h)=>{var E;const $=((E=w.endpointV2)==null?void 0:E.url)&&r.urlParser?async()=>r.urlParser(w.endpointV2.url):r.endpoint;if(!$)throw new Error("No valid endpoint provider available.");const I=await f(h.input,{...r,endpoint:$});return s({...h,request:I})},"serializerMiddleware"),LR={name:"deserializerMiddleware",step:"deserialize",tags:["DESERIALIZER"],override:!0},AR={name:"serializerMiddleware",step:"serialize",tags:["SERIALIZER"],override:!0};bF(RR,"getSerdePlugin")});var MR=j((Bfr,ZR)=>{var{defineProperty:B$,getOwnPropertyDescriptor:mN,getOwnPropertyNames:vN}=Object,jN=Object.prototype.hasOwnProperty,ps=(r,f)=>B$(r,"name",{value:f,configurable:!0}),iN=(r,f)=>{for(var s in f)B$(r,s,{get:f[s],enumerable:!0})},dN=(r,f,s,w)=>{if(f&&typeof f==="object"||typeof f==="function"){for(let h of vN(f))if(!jN.call(r,h)&&h!==s)B$(r,h,{get:()=>f[h],enumerable:!(w=mN(f,h))||w.enumerable})}return r},ON=(r)=>dN(B$({},"__esModule",{value:!0}),r),SR={};iN(SR,{endpointMiddleware:()=>YR,endpointMiddlewareOptions:()=>KR,getEndpointFromInstructions:()=>PR,getEndpointPlugin:()=>pN,resolveEndpointConfig:()=>uN,resolveParams:()=>XR,toEndpointV1:()=>_F});ZR.exports=ON(SR);var bN=ps(async(r)=>{const f=(r==null?void 0:r.Bucket)||"";if(typeof r.Bucket==="string")r.Bucket=f.replace(/#/g,encodeURIComponent("#")).replace(/\?/g,encodeURIComponent("?"));if(eN(f)){if(r.ForcePathStyle===!0)throw new Error("Path-style addressing cannot be used with ARN buckets")}else if(!xN(f)||f.indexOf(".")!==-1&&!String(r.Endpoint).startsWith("http:")||f.toLowerCase()!==f||f.length<3)r.ForcePathStyle=!0;if(r.DisableMultiRegionAccessPoints)r.disableMultiRegionAccessPoints=!0,r.DisableMRAP=!0;return r},"resolveParamsForS3"),cN=/^[a-z0-9][a-z0-9\.\-]{1,61}[a-z0-9]$/,_N=/(\d+\.){3}\d+/,gN=/\.\./,xN=ps((r)=>cN.test(r)&&!_N.test(r)&&!gN.test(r),"isDnsCompatibleBucketName"),eN=ps((r)=>{const[f,s,w,,,h]=r.split(":"),E=f==="arn"&&r.split(":").length>=6,$=Boolean(E&&s&&w&&h);if(E&&!$)throw new Error(`Invalid ARN: ${r} was an invalid ARN.`);return $},"isArnBucketName"),nN=ps((r,f,s)=>{const w=ps(async()=>{const h=s[r]??s[f];if(typeof h==="function")return h();return h},"configProvider");if(r==="credentialScope"||f==="CredentialScope")return async()=>{const h=typeof s.credentials==="function"?await s.credentials():s.credentials;return(h==null?void 0:h.credentialScope)??(h==null?void 0:h.CredentialScope)};if(r==="accountId"||f==="AccountId")return async()=>{const h=typeof s.credentials==="function"?await s.credentials():s.credentials;return(h==null?void 0:h.accountId)??(h==null?void 0:h.AccountId)};if(r==="endpoint"||f==="endpoint")return async()=>{const h=await w();if(h&&typeof h==="object"){if("url"in h)return h.url.href;if("hostname"in h){const{protocol:E,hostname:$,port:I,path:F}=h;return`${E}//${$}${I?":"+I:""}${F}`}}return h};return w},"createConfigValueProvider"),oN=sR(),zR=UR(),_F=ps((r)=>{if(typeof r==="object"){if("url"in r)return zR.parseUrl(r.url);return r}return zR.parseUrl(r)},"toEndpointV1"),PR=ps(async(r,f,s,w)=>{if(!s.endpoint){const $=await oN.getEndpointFromConfig(s.serviceId||"");if($)s.endpoint=()=>Promise.resolve(_F($))}const h=await XR(r,f,s);if(typeof s.endpointProvider!=="function")throw new Error("config.endpointProvider is not set.");return s.endpointProvider(h,w)},"getEndpointFromInstructions"),XR=ps(async(r,f,s)=>{var w;const h={},E=((w=f==null?void 0:f.getEndpointParameterInstructions)==null?void 0:w.call(f))||{};for(let[$,I]of Object.entries(E))switch(I.type){case"staticContextParams":h[$]=I.value;break;case"contextParams":h[$]=r[I.name];break;case"clientContextParams":case"builtInParams":h[$]=await nN(I.name,$,s)();break;default:throw new Error("Unrecognized endpoint parameter instruction: "+JSON.stringify(I))}if(Object.keys(E).length===0)Object.assign(h,s);if(String(s.serviceId).toLowerCase()==="s3")await bN(h);return h},"resolveParams"),Q$=T1(),YR=ps(({config:r,instructions:f})=>{return(s,w)=>async(h)=>{var E,$,I;const F=await PR(h.input,{getEndpointParameterInstructions(){return f}},{...r},w);w.endpointV2=F,w.authSchemes=(E=F.properties)==null?void 0:E.authSchemes;const U=($=w.authSchemes)==null?void 0:$[0];if(U){w.signing_region=U.signingRegion,w.signing_service=U.signingName;const C=Q$.getSmithyContext(w),L=(I=C==null?void 0:C.selectedHttpAuthScheme)==null?void 0:I.httpAuthOption;if(L)L.signingProperties=Object.assign(L.signingProperties||{},{signing_region:U.signingRegion,signingRegion:U.signingRegion,signing_service:U.signingName,signingName:U.signingName,signingRegionSet:U.signingRegionSet},U.properties)}return s({...h})}},"endpointMiddleware"),aN=cF(),KR={step:"serialize",tags:["ENDPOINT_PARAMETERS","ENDPOINT_V2","ENDPOINT"],name:"endpointV2Middleware",override:!0,relation:"before",toMiddleware:aN.serializerMiddlewareOption.name},pN=ps((r,f)=>({applyToStack:(s)=>{s.addRelativeTo(YR({config:r,instructions:f}),KR)}}),"getEndpointPlugin"),uN=ps((r)=>{const f=r.tls??!0,{endpoint:s}=r,w=s!=null?async()=>_F(await Q$.normalizeProvider(s)()):void 0;return{...r,endpoint:w,tls:f,isCustomEndpoint:!!s,useDualstackEndpoint:Q$.normalizeProvider(r.useDualstackEndpoint??!1),useFipsEndpoint:Q$.normalizeProvider(r.useFipsEndpoint??!1)}},"resolveEndpointConfig")});var T0=j((lfr,NR)=>{function HR(r){return Object.keys(r).reduce((f,s)=>{const w=r[s];return{...f,[s]:Array.isArray(w)?[...w]:w}},{})}function kR(r){return/^[a-z0-9][a-z0-9\.\-]*[a-z0-9]$/.test(r)}var{defineProperty:l$,getOwnPropertyDescriptor:tN,getOwnPropertyNames:ry}=Object,sy=Object.prototype.hasOwnProperty,k0=(r,f)=>l$(r,"name",{value:f,configurable:!0}),fy=(r,f)=>{for(var s in f)l$(r,s,{get:f[s],enumerable:!0})},wy=(r,f,s,w)=>{if(f&&typeof f==="object"||typeof f==="function"){for(let h of ry(f))if(!sy.call(r,h)&&h!==s)l$(r,h,{get:()=>f[h],enumerable:!(w=tN(f,h))||w.enumerable})}return r},hy=(r)=>wy(l$({},"__esModule",{value:!0}),r),JR={};fy(JR,{Field:()=>Iy,Fields:()=>Fy,HttpRequest:()=>Uy,HttpResponse:()=>Ty,IHttpRequest:()=>QR.HttpRequest,getHttpHandlerExtensionConfiguration:()=>Ey,isValidHostname:()=>kR,resolveHttpHandlerRuntimeConfig:()=>$y});NR.exports=hy(JR);var Ey=k0((r)=>{let f=r.httpHandler;return{setHttpHandler(s){f=s},httpHandler(){return f},updateHttpClientConfig(s,w){f.updateHttpClientConfig(s,w)},httpHandlerConfigs(){return f.httpHandlerConfigs()}}},"getHttpHandlerExtensionConfiguration"),$y=k0((r)=>{return{httpHandler:r.httpHandler()}},"resolveHttpHandlerRuntimeConfig"),QR=$s(),BR=class r{constructor({name:f,kind:s=QR.FieldPosition.HEADER,values:w=[]}){this.name=f,this.kind=s,this.values=w}add(f){this.values.push(f)}set(f){this.values=f}remove(f){this.values=this.values.filter((s)=>s!==f)}toString(){return this.values.map((f)=>f.includes(",")||f.includes(" ")?`"${f}"`:f).join(", ")}get(){return this.values}};k0(BR,"Field");var Iy=BR,lR=class r{constructor({fields:f=[],encoding:s="utf-8"}){this.entries={},f.forEach(this.setField.bind(this)),this.encoding=s}setField(f){this.entries[f.name.toLowerCase()]=f}getField(f){return this.entries[f.toLowerCase()]}removeField(f){delete this.entries[f.toLowerCase()]}getByType(f){return Object.values(this.entries).filter((s)=>s.kind===f)}};k0(lR,"Fields");var Fy=lR,VR=class r{constructor(f){this.method=f.method||"GET",this.hostname=f.hostname||"localhost",this.port=f.port,this.query=f.query||{},this.headers=f.headers||{},this.body=f.body,this.protocol=f.protocol?f.protocol.slice(-1)!==":"?`${f.protocol}:`:f.protocol:"https:",this.path=f.path?f.path.charAt(0)!=="/"?`/${f.path}`:f.path:"/",this.username=f.username,this.password=f.password,this.fragment=f.fragment}static clone(f){const s=new r({...f,headers:{...f.headers}});if(s.query)s.query=HR(s.query);return s}static isInstance(f){if(!f)return!1;const s=f;return"method"in s&&"protocol"in s&&"hostname"in s&&"path"in s&&typeof s.query==="object"&&typeof s.headers==="object"}clone(){return r.clone(this)}};k0(VR,"HttpRequest");var Uy=VR;k0(HR,"cloneQuery");var DR=class r{constructor(f){this.statusCode=f.statusCode,this.reason=f.reason,this.headers=f.headers||{},this.body=f.body}static isInstance(f){if(!f)return!1;const s=f;return typeof s.statusCode==="number"&&typeof s.headers==="object"}};k0(DR,"HttpResponse");var Ty=DR;k0(kR,"isValidHostname")});var gF=j((yR)=>{function Cy(r){return r&&r.__esModule?r:{default:r}}function Ly(){if(V$>H$.length-16)Gy.default.randomFillSync(H$),V$=0;return H$.slice(V$,V$+=16)}Object.defineProperty(yR,"__esModule",{value:!0});yR.default=Ly;var Gy=Cy(import.meta.require("crypto")),H$=new Uint8Array(256),V$=H$.length});var vR=j((qR)=>{Object.defineProperty(qR,"__esModule",{value:!0});qR.default=void 0;var Ry=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;qR.default=Ry});var A1=j((jR)=>{function zy(r){return r&&r.__esModule?r:{default:r}}function Sy(r){return typeof r==="string"&&Wy.default.test(r)}Object.defineProperty(jR,"__esModule",{value:!0});jR.default=void 0;var Wy=zy(vR()),Py=Sy;jR.default=Py});var R1=j((OR)=>{function Yy(r){return r&&r.__esModule?r:{default:r}}function dR(r,f=0){return dr[r[f+0]]+dr[r[f+1]]+dr[r[f+2]]+dr[r[f+3]]+"-"+dr[r[f+4]]+dr[r[f+5]]+"-"+dr[r[f+6]]+dr[r[f+7]]+"-"+dr[r[f+8]]+dr[r[f+9]]+"-"+dr[r[f+10]]+dr[r[f+11]]+dr[r[f+12]]+dr[r[f+13]]+dr[r[f+14]]+dr[r[f+15]]}function Ky(r,f=0){const s=dR(r,f);if(!Xy.default(s))throw TypeError("Stringified UUID is invalid");return s}Object.defineProperty(OR,"__esModule",{value:!0});OR.default=void 0;OR.unsafeStringify=dR;var Xy=Yy(A1()),dr=[];for(let r=0;r<256;++r)dr.push((r+256).toString(16).slice(1));var Zy=Ky;OR.default=Zy});var xR=j((_R)=>{function By(r){return r&&r.__esModule?r:{default:r}}function ly(r,f,s){let w=f&&s||0;const h=f||new Array(16);r=r||{};let E=r.node||cR,$=r.clockseq!==void 0?r.clockseq:xF;if(E==null||$==null){const z=r.random||(r.rng||Jy.default)();if(E==null)E=cR=[z[0]|1,z[1],z[2],z[3],z[4],z[5]];if($==null)$=xF=(z[6]<<8|z[7])&16383}let I=r.msecs!==void 0?r.msecs:Date.now(),F=r.nsecs!==void 0?r.nsecs:nF+1;const U=I-eF+(F-nF)/1e4;if(U<0&&r.clockseq===void 0)$=$+1&16383;if((U<0||I>eF)&&r.nsecs===void 0)F=0;if(F>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");eF=I,nF=F,xF=$,I+=12219292800000;const C=((I&268435455)*1e4+F)%4294967296;h[w++]=C>>>24&255,h[w++]=C>>>16&255,h[w++]=C>>>8&255,h[w++]=C&255;const L=I/4294967296*1e4&268435455;h[w++]=L>>>8&255,h[w++]=L&255,h[w++]=L>>>24&15|16,h[w++]=L>>>16&255,h[w++]=$>>>8|128,h[w++]=$&255;for(let z=0;z<6;++z)h[w+z]=E[z];return f||Qy.unsafeStringify(h)}Object.defineProperty(_R,"__esModule",{value:!0});_R.default=void 0;var Jy=By(gF()),Qy=R1(),cR,xF,eF=0,nF=0,Vy=ly;_R.default=Vy});var oF=j((eR)=>{function Dy(r){return r&&r.__esModule?r:{default:r}}function ky(r){if(!Hy.default(r))throw TypeError("Invalid UUID");let f;const s=new Uint8Array(16);return s[0]=(f=parseInt(r.slice(0,8),16))>>>24,s[1]=f>>>16&255,s[2]=f>>>8&255,s[3]=f&255,s[4]=(f=parseInt(r.slice(9,13),16))>>>8,s[5]=f&255,s[6]=(f=parseInt(r.slice(14,18),16))>>>8,s[7]=f&255,s[8]=(f=parseInt(r.slice(19,23),16))>>>8,s[9]=f&255,s[10]=(f=parseInt(r.slice(24,36),16))/1099511627776&255,s[11]=f/4294967296&255,s[12]=f>>>24&255,s[13]=f>>>16&255,s[14]=f>>>8&255,s[15]=f&255,s}Object.defineProperty(eR,"__esModule",{value:!0});eR.default=void 0;var Hy=Dy(A1()),Ny=ky;eR.default=Ny});var aF=j((pR)=>{function my(r){return r&&r.__esModule?r:{default:r}}function vy(r){r=unescape(encodeURIComponent(r));const f=[];for(let s=0;s<r.length;++s)f.push(r.charCodeAt(s));return f}function jy(r,f,s){function w(h,E,$,I){var F;if(typeof h==="string")h=vy(h);if(typeof E==="string")E=qy.default(E);if(((F=E)===null||F===void 0?void 0:F.length)!==16)throw TypeError("Namespace must be array-like (16 iterable integer values, 0-255)");let U=new Uint8Array(16+h.length);if(U.set(E),U.set(h,E.length),U=s(U),U[6]=U[6]&15|f,U[8]=U[8]&63|128,$){I=I||0;for(let C=0;C<16;++C)$[I+C]=U[C];return $}return yy.unsafeStringify(U)}try{w.name=r}catch(h){}return w.DNS=oR,w.URL=aR,w}Object.defineProperty(pR,"__esModule",{value:!0});pR.URL=pR.DNS=void 0;pR.default=jy;var yy=R1(),qy=my(oF()),oR="6ba7b810-9dad-11d1-80b4-00c04fd430c8";pR.DNS=oR;var aR="6ba7b811-9dad-11d1-80b4-00c04fd430c8";pR.URL=aR});var sW=j((tR)=>{function by(r){return r&&r.__esModule?r:{default:r}}function cy(r){if(Array.isArray(r))r=Buffer.from(r);else if(typeof r==="string")r=Buffer.from(r,"utf8");return Oy.default.createHash("md5").update(r).digest()}Object.defineProperty(tR,"__esModule",{value:!0});tR.default=void 0;var Oy=by(import.meta.require("crypto")),_y=cy;tR.default=_y});var EW=j((wW)=>{function fW(r){return r&&r.__esModule?r:{default:r}}Object.defineProperty(wW,"__esModule",{value:!0});wW.default=void 0;var gy=fW(aF()),xy=fW(sW()),ey=gy.default("v3",48,xy.default),ny=ey;wW.default=ny});var FW=j(($W)=>{function ay(r){return r&&r.__esModule?r:{default:r}}Object.defineProperty($W,"__esModule",{value:!0});$W.default=void 0;var oy=ay(import.meta.require("crypto")),py={randomUUID:oy.default.randomUUID};$W.default=py});var LW=j((GW)=>{function TW(r){return r&&r.__esModule?r:{default:r}}function rq(r,f,s){if(UW.default.randomUUID&&!f&&!r)return UW.default.randomUUID();r=r||{};const w=r.random||(r.rng||uy.default)();if(w[6]=w[6]&15|64,w[8]=w[8]&63|128,f){s=s||0;for(let h=0;h<16;++h)f[s+h]=w[h];return f}return ty.unsafeStringify(w)}Object.defineProperty(GW,"__esModule",{value:!0});GW.default=void 0;var UW=TW(FW()),uy=TW(gF()),ty=R1(),sq=rq;GW.default=sq});var WW=j((AW)=>{function wq(r){return r&&r.__esModule?r:{default:r}}function hq(r){if(Array.isArray(r))r=Buffer.from(r);else if(typeof r==="string")r=Buffer.from(r,"utf8");return fq.default.createHash("sha1").update(r).digest()}Object.defineProperty(AW,"__esModule",{value:!0});AW.default=void 0;var fq=wq(import.meta.require("crypto")),Eq=hq;AW.default=Eq});var XW=j((SW)=>{function zW(r){return r&&r.__esModule?r:{default:r}}Object.defineProperty(SW,"__esModule",{value:!0});SW.default=void 0;var $q=zW(aF()),Iq=zW(WW()),Fq=$q.default("v5",80,Iq.default),Uq=Fq;SW.default=Uq});var ZW=j((YW)=>{Object.defineProperty(YW,"__esModule",{value:!0});YW.default=void 0;var Tq="00000000-0000-0000-0000-000000000000";YW.default=Tq});var QW=j((MW)=>{function Cq(r){return r&&r.__esModule?r:{default:r}}function Lq(r){if(!Gq.default(r))throw TypeError("Invalid UUID");return parseInt(r.slice(14,15),16)}Object.defineProperty(MW,"__esModule",{value:!0});MW.default=void 0;var Gq=Cq(A1()),Aq=Lq;MW.default=Aq});var pF=j((us)=>{function G0(r){return r&&r.__esModule?r:{default:r}}Object.defineProperty(us,"__esModule",{value:!0});Object.defineProperty(us,"NIL",{enumerable:!0,get:function(){return Pq.default}});Object.defineProperty(us,"parse",{enumerable:!0,get:function(){return Zq.default}});Object.defineProperty(us,"stringify",{enumerable:!0,get:function(){return Kq.default}});Object.defineProperty(us,"v1",{enumerable:!0,get:function(){return Rq.default}});Object.defineProperty(us,"v3",{enumerable:!0,get:function(){return Wq.default}});Object.defineProperty(us,"v4",{enumerable:!0,get:function(){return zq.default}});Object.defineProperty(us,"v5",{enumerable:!0,get:function(){return Sq.default}});Object.defineProperty(us,"validate",{enumerable:!0,get:function(){return Yq.default}});Object.defineProperty(us,"version",{enumerable:!0,get:function(){return Xq.default}});var Rq=G0(xR()),Wq=G0(EW()),zq=G0(LW()),Sq=G0(XW()),Pq=G0(ZW()),Xq=G0(QW()),Yq=G0(A1()),Kq=G0(R1()),Zq=G0(oF())});var uF=j((gfr,HW)=>{var{defineProperty:D$,getOwnPropertyDescriptor:Mq,getOwnPropertyNames:Jq}=Object,Qq=Object.prototype.hasOwnProperty,sh=(r,f)=>D$(r,"name",{value:f,configurable:!0}),Bq=(r,f)=>{for(var s in f)D$(r,s,{get:f[s],enumerable:!0})},lq=(r,f,s,w)=>{if(f&&typeof f==="object"||typeof f==="function"){for(let h of Jq(f))if(!Qq.call(r,h)&&h!==s)D$(r,h,{get:()=>f[h],enumerable:!(w=Mq(f,h))||w.enumerable})}return r},Vq=(r)=>lq(D$({},"__esModule",{value:!0}),r),BW={};Bq(BW,{isClockSkewCorrectedError:()=>lW,isClockSkewError:()=>mq,isRetryableByTrait:()=>qq,isServerError:()=>jq,isThrottlingError:()=>vq,isTransientError:()=>VW});HW.exports=Vq(BW);var Hq=["AuthFailure","InvalidSignatureException","RequestExpired","RequestInTheFuture","RequestTimeTooSkewed","SignatureDoesNotMatch"],Dq=["BandwidthLimitExceeded","EC2ThrottledException","LimitExceededException","PriorRequestNotComplete","ProvisionedThroughputExceededException","RequestLimitExceeded","RequestThrottled","RequestThrottledException","SlowDown","ThrottledException","Throttling","ThrottlingException","TooManyRequestsException","TransactionInProgressException"],kq=["TimeoutError","RequestTimeout","RequestTimeoutException"],Nq=[500,502,503,504],yq=["ECONNRESET","ECONNREFUSED","EPIPE","ETIMEDOUT"],qq=sh((r)=>r.$retryable!==void 0,"isRetryableByTrait"),mq=sh((r)=>Hq.includes(r.name),"isClockSkewError"),lW=sh((r)=>{var f;return(f=r.$metadata)==null?void 0:f.clockSkewCorrected},"isClockSkewCorrectedError"),vq=sh((r)=>{var f,s;return((f=r.$metadata)==null?void 0:f.httpStatusCode)===429||Dq.includes(r.name)||((s=r.$retryable)==null?void 0:s.throttling)==!0},"isThrottlingError"),VW=sh((r)=>{var f;return lW(r)||kq.includes(r.name)||yq.includes((r==null?void 0:r.code)||"")||Nq.includes(((f=r.$metadata)==null?void 0:f.httpStatusCode)||0)},"isTransientError"),jq=sh((r)=>{var f;if(((f=r.$metadata)==null?void 0:f.httpStatusCode)!==void 0){const s=r.$metadata.httpStatusCode;if(500<=s&&s<=599&&!VW(r))return!0;return!1}return!1},"isServerError")});var _W=j((xfr,cW)=>{var{defineProperty:k$,getOwnPropertyDescriptor:iq,getOwnPropertyNames:dq}=Object,Oq=Object.prototype.hasOwnProperty,ts=(r,f)=>k$(r,"name",{value:f,configurable:!0}),bq=(r,f)=>{for(var s in f)k$(r,s,{get:f[s],enumerable:!0})},cq=(r,f,s,w)=>{if(f&&typeof f==="object"||typeof f==="function"){for(let h of dq(f))if(!Oq.call(r,h)&&h!==s)k$(r,h,{get:()=>f[h],enumerable:!(w=iq(f,h))||w.enumerable})}return r},_q=(r)=>cq(k$({},"__esModule",{value:!0}),r),kW={};bq(kW,{AdaptiveRetryStrategy:()=>aq,ConfiguredRetryStrategy:()=>pq,DEFAULT_MAX_ATTEMPTS:()=>tF,DEFAULT_RETRY_DELAY_BASE:()=>W1,DEFAULT_RETRY_MODE:()=>gq,DefaultRateLimiter:()=>qW,INITIAL_RETRY_TOKENS:()=>r5,INVOCATION_ID_HEADER:()=>eq,MAXIMUM_RETRY_DELAY:()=>s5,NO_RETRY_INCREMENT:()=>iW,REQUEST_HEADER:()=>nq,RETRY_COST:()=>vW,RETRY_MODES:()=>NW,StandardRetryStrategy:()=>f5,THROTTLING_RETRY_DELAY_BASE:()=>mW,TIMEOUT_RETRY_COST:()=>jW});cW.exports=_q(kW);var NW=((r)=>{return r.STANDARD="standard",r.ADAPTIVE="adaptive",r})(NW||{}),tF=3,gq="standard",xq=uF(),yW=class r{constructor(f){this.currentCapacity=0,this.enabled=!1,this.lastMaxRate=0,this.measuredTxRate=0,this.requestCount=0,this.lastTimestamp=0,this.timeWindow=0,this.beta=(f==null?void 0:f.beta)??0.7,this.minCapacity=(f==null?void 0:f.minCapacity)??1,this.minFillRate=(f==null?void 0:f.minFillRate)??0.5,this.scaleConstant=(f==null?void 0:f.scaleConstant)??0.4,this.smooth=(f==null?void 0:f.smooth)??0.8;const s=this.getCurrentTimeInSeconds();this.lastThrottleTime=s,this.lastTxRateBucket=Math.floor(this.getCurrentTimeInSeconds()),this.fillRate=this.minFillRate,this.maxCapacity=this.minCapacity}getCurrentTimeInSeconds(){return Date.now()/1000}async getSendToken(){return this.acquireTokenBucket(1)}async acquireTokenBucket(f){if(!this.enabled)return;if(this.refillTokenBucket(),f>this.currentCapacity){const s=(f-this.currentCapacity)/this.fillRate*1000;await new Promise((w)=>setTimeout(w,s))}this.currentCapacity=this.currentCapacity-f}refillTokenBucket(){const f=this.getCurrentTimeInSeconds();if(!this.lastTimestamp){this.lastTimestamp=f;return}const s=(f-this.lastTimestamp)*this.fillRate;this.currentCapacity=Math.min(this.maxCapacity,this.currentCapacity+s),this.lastTimestamp=f}updateClientSendingRate(f){let s;if(this.updateMeasuredRate(),xq.isThrottlingError(f)){const h=!this.enabled?this.measuredTxRate:Math.min(this.measuredTxRate,this.fillRate);this.lastMaxRate=h,this.calculateTimeWindow(),this.lastThrottleTime=this.getCurrentTimeInSeconds(),s=this.cubicThrottle(h),this.enableTokenBucket()}else this.calculateTimeWindow(),s=this.cubicSuccess(this.getCurrentTimeInSeconds());const w=Math.min(s,2*this.measuredTxRate);this.updateTokenBucketRate(w)}calculateTimeWindow(){this.timeWindow=this.getPrecise(Math.pow(this.lastMaxRate*(1-this.beta)/this.scaleConstant,0.3333333333333333))}cubicThrottle(f){return this.getPrecise(f*this.beta)}cubicSuccess(f){return this.getPrecise(this.scaleConstant*Math.pow(f-this.lastThrottleTime-this.timeWindow,3)+this.lastMaxRate)}enableTokenBucket(){this.enabled=!0}updateTokenBucketRate(f){this.refillTokenBucket(),this.fillRate=Math.max(f,this.minFillRate),this.maxCapacity=Math.max(f,this.minCapacity),this.currentCapacity=Math.min(this.currentCapacity,this.maxCapacity)}updateMeasuredRate(){const f=this.getCurrentTimeInSeconds(),s=Math.floor(f*2)/2;if(this.requestCount++,s>this.lastTxRateBucket){const w=this.requestCount/(s-this.lastTxRateBucket);this.measuredTxRate=this.getPrecise(w*this.smooth+this.measuredTxRate*(1-this.smooth)),this.requestCount=0,this.lastTxRateBucket=s}}getPrecise(f){return parseFloat(f.toFixed(8))}};ts(yW,"DefaultRateLimiter");var qW=yW,W1=100,s5=20000,mW=500,r5=500,vW=5,jW=10,iW=1,eq="amz-sdk-invocation-id",nq="amz-sdk-request",oq=ts(()=>{let r=W1;return{computeNextBackoffDelay:ts((w)=>{return Math.floor(Math.min(s5,Math.random()*2**w*r))},"computeNextBackoffDelay"),setDelayBase:ts((w)=>{r=w},"setDelayBase")}},"getDefaultRetryBackoffStrategy"),DW=ts(({retryDelay:r,retryCount:f,retryCost:s})=>{return{getRetryCount:ts(()=>f,"getRetryCount"),getRetryDelay:ts(()=>Math.min(s5,r),"getRetryDelay"),getRetryCost:ts(()=>s,"getRetryCost")}},"createDefaultRetryToken"),dW=class r{constructor(f){this.maxAttempts=f,this.mode="standard",this.capacity=r5,this.retryBackoffStrategy=oq(),this.maxAttemptsProvider=typeof f==="function"?f:async()=>f}async acquireInitialRetryToken(f){return DW({retryDelay:W1,retryCount:0})}async refreshRetryTokenForRetry(f,s){const w=await this.getMaxAttempts();if(this.shouldRetry(f,s,w)){const h=s.errorType;this.retryBackoffStrategy.setDelayBase(h==="THROTTLING"?mW:W1);const E=this.retryBackoffStrategy.computeNextBackoffDelay(f.getRetryCount()),$=s.retryAfterHint?Math.max(s.retryAfterHint.getTime()-Date.now()||0,E):E,I=this.getCapacityCost(h);return this.capacity-=I,DW({retryDelay:$,retryCount:f.getRetryCount()+1,retryCost:I})}throw new Error("No retry token available")}recordSuccess(f){this.capacity=Math.max(r5,this.capacity+(f.getRetryCost()??iW))}getCapacity(){return this.capacity}async getMaxAttempts(){try{return await this.maxAttemptsProvider()}catch(f){return console.warn(`Max attempts provider could not resolve. Using default of ${tF}`),tF}}shouldRetry(f,s,w){return f.getRetryCount()+1<w&&this.capacity>=this.getCapacityCost(s.errorType)&&this.isRetryableError(s.errorType)}getCapacityCost(f){return f==="TRANSIENT"?jW:vW}isRetryableError(f){return f==="THROTTLING"||f==="TRANSIENT"}};ts(dW,"StandardRetryStrategy");var f5=dW,OW=class r{constructor(f,s){this.maxAttemptsProvider=f,this.mode="adaptive";const{rateLimiter:w}=s??{};this.rateLimiter=w??new qW,this.standardRetryStrategy=new f5(f)}async acquireInitialRetryToken(f){return await this.rateLimiter.getSendToken(),this.standardRetryStrategy.acquireInitialRetryToken(f)}async refreshRetryTokenForRetry(f,s){return this.rateLimiter.updateClientSendingRate(s),this.standardRetryStrategy.refreshRetryTokenForRetry(f,s)}recordSuccess(f){this.rateLimiter.updateClientSendingRate({}),this.standardRetryStrategy.recordSuccess(f)}};ts(OW,"AdaptiveRetryStrategy");var aq=OW,bW=class r extends f5{constructor(f,s=W1){super(typeof f==="function"?f:async()=>f);if(typeof s==="number")this.computeNextBackoffDelay=()=>s;else this.computeNextBackoffDelay=s}async refreshRetryTokenForRetry(f,s){const w=await super.refreshRetryTokenForRetry(f,s);return w.getRetryDelay=()=>this.computeNextBackoffDelay(w.getRetryCount()),w}};ts(bW,"ConfiguredRetryStrategy");var pq=bW});var oW=j((efr,nW)=>{var{defineProperty:N$,getOwnPropertyDescriptor:uq,getOwnPropertyNames:tq}=Object,rm=Object.prototype.hasOwnProperty,Qs=(r,f)=>N$(r,"name",{value:f,configurable:!0}),sm=(r,f)=>{for(var s in f)N$(r,s,{get:f[s],enumerable:!0})},fm=(r,f,s,w)=>{if(f&&typeof f==="object"||typeof f==="function"){for(let h of tq(f))if(!rm.call(r,h)&&h!==s)N$(r,h,{get:()=>f[h],enumerable:!(w=uq(f,h))||w.enumerable})}return r},wm=(r)=>fm(N$({},"__esModule",{value:!0}),r),eW={};sm(eW,{constructStack:()=>w5});nW.exports=wm(eW);var Rw=Qs((r,f)=>{const s=[];if(r)s.push(r);if(f)for(let w of f)s.push(w);return s},"getAllAliases"),N0=Qs((r,f)=>{return`${r||"anonymous"}${f&&f.length>0?` (a.k.a. ${f.join(",")})`:""}`},"getMiddlewareNameWithAliases"),w5=Qs(()=>{let r=[],f=[],s=!1;const w=new Set,h=Qs((L)=>L.sort((z,S)=>gW[S.step]-gW[z.step]||xW[S.priority||"normal"]-xW[z.priority||"normal"]),"sort"),E=Qs((L)=>{let z=!1;const S=Qs((K)=>{const k=Rw(K.name,K.aliases);if(k.includes(L)){z=!0;for(let l of k)w.delete(l);return!1}return!0},"filterCb");return r=r.filter(S),f=f.filter(S),z},"removeByName"),$=Qs((L)=>{let z=!1;const S=Qs((K)=>{if(K.middleware===L){z=!0;for(let k of Rw(K.name,K.aliases))w.delete(k);return!1}return!0},"filterCb");return r=r.filter(S),f=f.filter(S),z},"removeByReference"),I=Qs((L)=>{var z;return r.forEach((S)=>{L.add(S.middleware,{...S})}),f.forEach((S)=>{L.addRelativeTo(S.middleware,{...S})}),(z=L.identifyOnResolve)==null||z.call(L,C.identifyOnResolve()),L},"cloneTo"),F=Qs((L)=>{const z=[];return L.before.forEach((S)=>{if(S.before.length===0&&S.after.length===0)z.push(S);else z.push(...F(S))}),z.push(L),L.after.reverse().forEach((S)=>{if(S.before.length===0&&S.after.length===0)z.push(S);else z.push(...F(S))}),z},"expandRelativeMiddlewareList"),U=Qs((L=!1)=>{const z=[],S=[],K={};return r.forEach((l)=>{const Q={...l,before:[],after:[]};for(let N of Rw(Q.name,Q.aliases))K[N]=Q;z.push(Q)}),f.forEach((l)=>{const Q={...l,before:[],after:[]};for(let N of Rw(Q.name,Q.aliases))K[N]=Q;S.push(Q)}),S.forEach((l)=>{if(l.toMiddleware){const Q=K[l.toMiddleware];if(Q===void 0){if(L)return;throw new Error(`${l.toMiddleware} is not found when adding ${N0(l.name,l.aliases)} middleware ${l.relation} ${l.toMiddleware}`)}if(l.relation==="after")Q.after.push(l);if(l.relation==="before")Q.before.push(l)}}),h(z).map(F).reduce((l,Q)=>{return l.push(...Q),l},[])},"getMiddlewareList"),C={add:(L,z={})=>{const{name:S,override:K,aliases:k}=z,l={step:"initialize",priority:"normal",middleware:L,...z},Q=Rw(S,k);if(Q.length>0){if(Q.some((N)=>w.has(N))){if(!K)throw new Error(`Duplicate middleware name '${N0(S,k)}'`);for(let N of Q){const x=r.findIndex((hr)=>{var Dr;return hr.name===N||((Dr=hr.aliases)==null?void 0:Dr.some((Tw)=>Tw===N))});if(x===-1)continue;const e=r[x];if(e.step!==l.step||l.priority!==e.priority)throw new Error(`"${N0(e.name,e.aliases)}" middleware with ${e.priority} priority in ${e.step} step cannot be overridden by "${N0(S,k)}" middleware with ${l.priority} priority in ${l.step} step.`);r.splice(x,1)}}for(let N of Q)w.add(N)}r.push(l)},addRelativeTo:(L,z)=>{const{name:S,override:K,aliases:k}=z,l={middleware:L,...z},Q=Rw(S,k);if(Q.length>0){if(Q.some((N)=>w.has(N))){if(!K)throw new Error(`Duplicate middleware name '${N0(S,k)}'`);for(let N of Q){const x=f.findIndex((hr)=>{var Dr;return hr.name===N||((Dr=hr.aliases)==null?void 0:Dr.some((Tw)=>Tw===N))});if(x===-1)continue;const e=f[x];if(e.toMiddleware!==l.toMiddleware||e.relation!==l.relation)throw new Error(`"${N0(e.name,e.aliases)}" middleware ${e.relation} "${e.toMiddleware}" middleware cannot be overridden by "${N0(S,k)}" middleware ${l.relation} "${l.toMiddleware}" middleware.`);f.splice(x,1)}}for(let N of Q)w.add(N)}f.push(l)},clone:()=>I(w5()),use:(L)=>{L.applyToStack(C)},remove:(L)=>{if(typeof L==="string")return E(L);else return $(L)},removeByTag:(L)=>{let z=!1;const S=Qs((K)=>{const{tags:k,name:l,aliases:Q}=K;if(k&&k.includes(L)){const N=Rw(l,Q);for(let x of N)w.delete(x);return z=!0,!1}return!0},"filterCb");return r=r.filter(S),f=f.filter(S),z},concat:(L)=>{var z;const S=I(w5());return S.use(L),S.identifyOnResolve(s||S.identifyOnResolve()||(((z=L.identifyOnResolve)==null?void 0:z.call(L))??!1)),S},applyToStack:I,identify:()=>{return U(!0).map((L)=>{const z=L.step??L.relation+" "+L.toMiddleware;return N0(L.name,L.aliases)+" - "+z})},identifyOnResolve(L){if(typeof L==="boolean")s=L;return s},resolve:(L,z)=>{for(let S of U().map((K)=>K.middleware).reverse())L=S(L,z);if(s)console.log(C.identify());return L}};return C},"constructStack"),gW={initialize:5,serialize:4,build:3,finalizeRequest:2,deserialize:1},xW={high:3,normal:2,low:1}});var h5=j((nfr,pW)=>{var{defineProperty:y$,getOwnPropertyDescriptor:hm,getOwnPropertyNames:Em}=Object,$m=Object.prototype.hasOwnProperty,Im=(r,f)=>y$(r,"name",{value:f,configurable:!0}),Fm=(r,f)=>{for(var s in f)y$(r,s,{get:f[s],enumerable:!0})},Um=(r,f,s,w)=>{if(f&&typeof f==="object"||typeof f==="function"){for(let h of Em(f))if(!$m.call(r,h)&&h!==s)y$(r,h,{get:()=>f[h],enumerable:!(w=hm(f,h))||w.enumerable})}return r},Tm=(r)=>Um(y$({},"__esModule",{value:!0}),r),aW={};Fm(aW,{isArrayBuffer:()=>Gm});pW.exports=Tm(aW);var Gm=Im((r)=>typeof ArrayBuffer==="function"&&r instanceof ArrayBuffer||Object.prototype.toString.call(r)==="[object ArrayBuffer]","isArrayBuffer")});var z1=j((ofr,rz)=>{var{defineProperty:q$,getOwnPropertyDescriptor:Cm,getOwnPropertyNames:Lm}=Object,Am=Object.prototype.hasOwnProperty,uW=(r,f)=>q$(r,"name",{value:f,configurable:!0}),Rm=(r,f)=>{for(var s in f)q$(r,s,{get:f[s],enumerable:!0})},Wm=(r,f,s,w)=>{if(f&&typeof f==="object"||typeof f==="function"){for(let h of Lm(f))if(!Am.call(r,h)&&h!==s)q$(r,h,{get:()=>f[h],enumerable:!(w=Cm(f,h))||w.enumerable})}return r},zm=(r)=>Wm(q$({},"__esModule",{value:!0}),r),tW={};Rm(tW,{fromArrayBuffer:()=>Pm,fromString:()=>Xm});rz.exports=zm(tW);var Sm=h5(),E5=import.meta.require("buffer"),Pm=uW((r,f=0,s=r.byteLength-f)=>{if(!Sm.isArrayBuffer(r))throw new TypeError(`The "input" argument must be ArrayBuffer. Received type ${typeof r} (${r})`);return E5.Buffer.from(r,f,s)},"fromArrayBuffer"),Xm=uW((r,f)=>{if(typeof r!=="string")throw new TypeError(`The "input" argument must be of type string. Received type ${typeof r} (${r})`);return f?E5.Buffer.from(r,f):E5.Buffer.from(r)},"fromString")});var wz=j((sz)=>{Object.defineProperty(sz,"__esModule",{value:!0});sz.fromBase64=void 0;var Ym=z1(),Km=/^[A-Za-z0-9+/]*={0,2}$/,Zm=(r)=>{if(r.length*3%4!==0)throw new TypeError("Incorrect padding on base64 string.");if(!Km.exec(r))throw new TypeError("Invalid base64 string.");const f=Ym.fromString(r,"base64");return new Uint8Array(f.buffer,f.byteOffset,f.byteLength)};sz.fromBase64=Zm});var y0=j((pfr,Iz)=>{var{defineProperty:m$,getOwnPropertyDescriptor:Mm,getOwnPropertyNames:Jm}=Object,Qm=Object.prototype.hasOwnProperty,$5=(r,f)=>m$(r,"name",{value:f,configurable:!0}),Bm=(r,f)=>{for(var s in f)m$(r,s,{get:f[s],enumerable:!0})},lm=(r,f,s,w)=>{if(f&&typeof f==="object"||typeof f==="function"){for(let h of Jm(f))if(!Qm.call(r,h)&&h!==s)m$(r,h,{get:()=>f[h],enumerable:!(w=Mm(f,h))||w.enumerable})}return r},Vm=(r)=>lm(m$({},"__esModule",{value:!0}),r),hz={};Bm(hz,{fromUtf8:()=>$z,toUint8Array:()=>Hm,toUtf8:()=>Dm});Iz.exports=Vm(hz);var Ez=z1(),$z=$5((r)=>{const f=Ez.fromString(r,"utf8");return new Uint8Array(f.buffer,f.byteOffset,f.byteLength/Uint8Array.BYTES_PER_ELEMENT)},"fromUtf8"),Hm=$5((r)=>{if(typeof r==="string")return $z(r);if(ArrayBuffer.isView(r))return new Uint8Array(r.buffer,r.byteOffset,r.byteLength/Uint8Array.BYTES_PER_ELEMENT);return new Uint8Array(r)},"toUint8Array"),Dm=$5((r)=>{if(typeof r==="string")return r;if(typeof r!=="object"||typeof r.byteOffset!=="number"||typeof r.byteLength!=="number")throw new Error("@smithy/util-utf8: toUtf8 encoder function only accepts string | Uint8Array.");return Ez.fromArrayBuffer(r.buffer,r.byteOffset,r.byteLength).toString("utf8")},"toUtf8")});var Tz=j((Fz)=>{Object.defineProperty(Fz,"__esModule",{value:!0});Fz.toBase64=void 0;var km=z1(),Nm=y0(),ym=(r)=>{let f;if(typeof r==="string")f=Nm.fromUtf8(r);else f=r;if(typeof f!=="object"||typeof f.byteOffset!=="number"||typeof f.byteLength!=="number")throw new Error("@smithy/util-base64: toBase64 encoder function only accepts string | Uint8Array.");return km.fromArrayBuffer(f.buffer,f.byteOffset,f.byteLength).toString("base64")};Fz.toBase64=ym});var j$=j((tfr,v$)=>{var{defineProperty:Gz,getOwnPropertyDescriptor:qm,getOwnPropertyNames:mm}=Object,vm=Object.prototype.hasOwnProperty,I5=(r,f,s,w)=>{if(f&&typeof f==="object"||typeof f==="function"){for(let h of mm(f))if(!vm.call(r,h)&&h!==s)Gz(r,h,{get:()=>f[h],enumerable:!(w=qm(f,h))||w.enumerable})}return r},Cz=(r,f,s)=>(I5(r,f,"default"),s&&I5(s,f,"default")),jm=(r)=>I5(Gz({},"__esModule",{value:!0}),r),F5={};v$.exports=jm(F5);Cz(F5,wz(),v$.exports);Cz(F5,Tz(),v$.exports)});var Rz=j((Lz)=>{Object.defineProperty(Lz,"__esModule",{value:!0});Lz.getAwsChunkedEncodingStream=void 0;var im=import.meta.require("stream"),dm=(r,f)=>{const{base64Encoder:s,bodyLengthChecker:w,checksumAlgorithmFn:h,checksumLocationName:E,streamHasher:$}=f,I=s!==void 0&&h!==void 0&&E!==void 0&&$!==void 0,F=I?$(h,r):void 0,U=new im.Readable({read:()=>{}});return r.on("data",(C)=>{const L=w(C)||0;U.push(`${L.toString(16)}\r\n`),U.push(C),U.push("\r\n")}),r.on("end",async()=>{if(U.push("0\r\n"),I){const C=s(await F);U.push(`${E}:${C}\r\n`),U.push("\r\n")}U.push(null)}),U};Lz.getAwsChunkedEncodingStream=dm});var T5=j((s0r,Sz)=>{var{defineProperty:i$,getOwnPropertyDescriptor:Om,getOwnPropertyNames:bm}=Object,cm=Object.prototype.hasOwnProperty,U5=(r,f)=>i$(r,"name",{value:f,configurable:!0}),_m=(r,f)=>{for(var s in f)i$(r,s,{get:f[s],enumerable:!0})},gm=(r,f,s,w)=>{if(f&&typeof f==="object"||typeof f==="function"){for(let h of bm(f))if(!cm.call(r,h)&&h!==s)i$(r,h,{get:()=>f[h],enumerable:!(w=Om(f,h))||w.enumerable})}return r},xm=(r)=>gm(i$({},"__esModule",{value:!0}),r),Wz={};_m(Wz,{escapeUri:()=>zz,escapeUriPath:()=>nm});Sz.exports=xm(Wz);var zz=U5((r)=>encodeURIComponent(r).replace(/[!'()*]/g,em),"escapeUri"),em=U5((r)=>`%${r.charCodeAt(0).toString(16).toUpperCase()}`,"hexEncode"),nm=U5((r)=>r.split("/").map(zz).join("/"),"escapeUriPath")});var C5=j((f0r,Yz)=>{function Xz(r){const f=[];for(let s of Object.keys(r).sort()){const w=r[s];if(s=G5.escapeUri(s),Array.isArray(w))for(let h=0,E=w.length;h<E;h++)f.push(`${s}=${G5.escapeUri(w[h])}`);else{let h=s;if(w||typeof w==="string")h+=`=${G5.escapeUri(w)}`;f.push(h)}}return f.join("&")}var{defineProperty:d$,getOwnPropertyDescriptor:om,getOwnPropertyNames:am}=Object,pm=Object.prototype.hasOwnProperty,um=(r,f)=>d$(r,"name",{value:f,configurable:!0}),tm=(r,f)=>{for(var s in f)d$(r,s,{get:f[s],enumerable:!0})},rv=(r,f,s,w)=>{if(f&&typeof f==="object"||typeof f==="function"){for(let h of am(f))if(!pm.call(r,h)&&h!==s)d$(r,h,{get:()=>f[h],enumerable:!(w=om(f,h))||w.enumerable})}return r},sv=(r)=>rv(d$({},"__esModule",{value:!0}),r),Pz={};tm(Pz,{buildQueryString:()=>Xz});Yz.exports=sv(Pz);var G5=T5();um(Xz,"buildQueryString")});var jz=j((w0r,vz)=>{async function R5(r,f,s=Kz){const w=f.headers??{},h=w.Expect||w.expect;let E=-1,$=!1;if(h==="100-continue")await Promise.race([new Promise((I)=>{E=Number(setTimeout(I,Math.max(Kz,s)))}),new Promise((I)=>{r.on("continue",()=>{clearTimeout(E),I()}),r.on("error",()=>{$=!0,clearTimeout(E),I()})})]);if(!$)Hz(r,f.body)}function Hz(r,f){if(f instanceof Vz.Readable){f.pipe(r);return}if(f){if(Buffer.isBuffer(f)||typeof f==="string"){r.end(f);return}const s=f;if(typeof s==="object"&&s.buffer&&typeof s.byteOffset==="number"&&typeof s.byteLength==="number"){r.end(Buffer.from(s.buffer,s.byteOffset,s.byteLength));return}r.end(Buffer.from(f));return}r.end()}async function mz(r){const f=[],s=r.getReader();let w=!1,h=0;while(!w){const{done:I,value:F}=await s.read();if(F)f.push(F),h+=F.length;w=I}const E=new Uint8Array(h);let $=0;for(let I of f)E.set(I,$),$+=I.length;return E}var{create:fv,defineProperty:S1,getOwnPropertyDescriptor:wv,getOwnPropertyNames:hv,getPrototypeOf:Ev}=Object,$v=Object.prototype.hasOwnProperty,Jr=(r,f)=>S1(r,"name",{value:f,configurable:!0}),Iv=(r,f)=>{for(var s in f)S1(r,s,{get:f[s],enumerable:!0})},Mz=(r,f,s,w)=>{if(f&&typeof f==="object"||typeof f==="function"){for(let h of hv(f))if(!$v.call(r,h)&&h!==s)S1(r,h,{get:()=>f[h],enumerable:!(w=wv(f,h))||w.enumerable})}return r},Fv=(r,f,s)=>(s=r!=null?fv(Ev(r)):{},Mz(f||!r||!r.__esModule?S1(s,"default",{value:r,enumerable:!0}):s,r)),Uv=(r)=>Mz(S1({},"__esModule",{value:!0}),r),Jz={};Iv(Jz,{DEFAULT_REQUEST_TIMEOUT:()=>Av,NodeHttp2Handler:()=>Pv,NodeHttpHandler:()=>Rv,streamCollector:()=>Yv});vz.exports=Uv(Jz);var Qz=T0(),Bz=C5(),L5=import.meta.require("http"),A5=import.meta.require("https"),Tv=["ECONNRESET","EPIPE","ETIMEDOUT"],lz=Jr((r)=>{const f={};for(let s of Object.keys(r)){const w=r[s];f[s]=Array.isArray(w)?w.join(","):w}return f},"getTransformedHeaders"),Gv=Jr((r,f,s=0)=>{if(!s)return;const w=setTimeout(()=>{r.destroy(),f(Object.assign(new Error(`Socket timed out without establishing a connection within ${s} ms`),{name:"TimeoutError"}))},s);r.on("socket",(h)=>{if(h.connecting)h.on("connect",()=>{clearTimeout(w)});else clearTimeout(w)})},"setConnectionTimeout"),Cv=Jr((r,{keepAlive:f,keepAliveMsecs:s})=>{if(f!==!0)return;r.on("socket",(w)=>{w.setKeepAlive(f,s||0)})},"setSocketKeepAlive"),Lv=Jr((r,f,s=0)=>{r.setTimeout(s,()=>{r.destroy(),f(Object.assign(new Error(`Connection timed out after ${s} ms`),{name:"TimeoutError"}))})},"setSocketTimeout"),Vz=import.meta.require("stream"),Kz=1000;Jr(R5,"writeRequestBody");Jr(Hz,"writeBody");var Av=0,Dz=class r{constructor(f){this.socketWarningTimestamp=0,this.metadata={handlerProtocol:"http/1.1"},this.configProvider=new Promise((s,w)=>{if(typeof f==="function")f().then((h)=>{s(this.resolveDefaultConfig(h))}).catch(w);else s(this.resolveDefaultConfig(f))})}static create(f){if(typeof(f==null?void 0:f.handle)==="function")return f;return new r(f)}static checkSocketUsage(f,s,w=console){var h,E,$;const{sockets:I,requests:F,maxSockets:U}=f;if(typeof U!=="number"||U===1/0)return s;const C=15000;if(Date.now()-C<s)return s;if(I&&F)for(let L in I){const z=((h=I[L])==null?void 0:h.length)??0,S=((E=F[L])==null?void 0:E.length)??0;if(z>=U&&S>=2*U)return($=w==null?void 0:w.warn)==null||$.call(w,`@smithy/node-http-handler:WARN - socket usage at capacity=${z} and ${S} additional requests are enqueued.
2
+ var jk=Object.create;var{getPrototypeOf:vk,defineProperty:V6,getOwnPropertyNames:ik}=Object;var Ok=Object.prototype.hasOwnProperty;var m=(r,s,f)=>{f=r!=null?jk(vk(r)):{};const w=s||!r||!r.__esModule?V6(f,"default",{value:r,enumerable:!0}):f;for(let h of ik(r))if(!Ok.call(w,h))V6(w,h,{get:()=>r[h],enumerable:!0});return w};var O=(r,s)=>()=>(s||r((s={exports:{}}).exports,s),s.exports);var Ys=(r,s)=>{for(var f in s)V6(r,f,{get:s[f],enumerable:!0,configurable:!0,set:(w)=>s[f]=()=>w})};var G=(r,s)=>()=>(r&&(s=r(r=0)),s);var Xs=(r)=>{let s=r.httpHandler;return{setHttpHandler(f){s=f},httpHandler(){return s},updateHttpClientConfig(f,w){s.updateHttpClientConfig(f,w)},httpHandlerConfigs(){return s.httpHandlerConfigs()}}},Ks=(r)=>{return{httpHandler:r.httpHandler()}};var LA=()=>{};var Ff=O((Ot,ZA)=>{var{defineProperty:U$,getOwnPropertyDescriptor:dk,getOwnPropertyNames:ck}=Object,bk=Object.prototype.hasOwnProperty,T$=(r,s)=>U$(r,"name",{value:s,configurable:!0}),_k=(r,s)=>{for(var f in s)U$(r,f,{get:s[f],enumerable:!0})},gk=(r,s,f,w)=>{if(s&&typeof s==="object"||typeof s==="function"){for(let h of ck(s))if(!bk.call(r,h)&&h!==f)U$(r,h,{get:()=>s[h],enumerable:!(w=dk(s,h))||w.enumerable})}return r},xk=(r)=>gk(U$({},"__esModule",{value:!0}),r),RA={};_k(RA,{AlgorithmId:()=>SA,EndpointURLScheme:()=>zA,FieldPosition:()=>YA,HttpApiKeyAuthLocation:()=>WA,HttpAuthLocation:()=>CA,IniSectionType:()=>XA,RequestHandlerProtocol:()=>KA,SMITHY_CONTEXT_KEY:()=>pk,getDefaultClientConfiguration:()=>ok,resolveDefaultRuntimeConfig:()=>ak});ZA.exports=xk(RA);var CA=((r)=>{return r.HEADER="header",r.QUERY="query",r})(CA||{}),WA=((r)=>{return r.HEADER="header",r.QUERY="query",r})(WA||{}),zA=((r)=>{return r.HTTP="http",r.HTTPS="https",r})(zA||{}),SA=((r)=>{return r.MD5="md5",r.CRC32="crc32",r.CRC32C="crc32c",r.SHA1="sha1",r.SHA256="sha256",r})(SA||{}),ek=T$((r)=>{const s=[];if(r.sha256!==void 0)s.push({algorithmId:()=>"sha256",checksumConstructor:()=>r.sha256});if(r.md5!=null)s.push({algorithmId:()=>"md5",checksumConstructor:()=>r.md5});return{_checksumAlgorithms:s,addChecksumAlgorithm(f){this._checksumAlgorithms.push(f)},checksumAlgorithms(){return this._checksumAlgorithms}}},"getChecksumConfiguration"),nk=T$((r)=>{const s={};return r.checksumAlgorithms().forEach((f)=>{s[f.algorithmId()]=f.checksumConstructor()}),s},"resolveChecksumRuntimeConfig"),ok=T$((r)=>{return{...ek(r)}},"getDefaultClientConfiguration"),ak=T$((r)=>{return{...nk(r)}},"resolveDefaultRuntimeConfig"),YA=((r)=>{return r[r.HEADER=0]="HEADER",r[r.TRAILER=1]="TRAILER",r})(YA||{}),pk="__smithy_context",XA=((r)=>{return r.PROFILE="profile",r.SSO_SESSION="sso-session",r.SERVICES="services",r})(XA||{}),KA=((r)=>{return r.HTTP_0_9="http/0.9",r.HTTP_1_0="http/1.0",r.TDS_8_0="tds/8.0",r})(KA||{})});var uk;var PA=G(()=>{uk=m(Ff(),1)});var JA=()=>{};function tk(r){return Object.keys(r).reduce((s,f)=>{const w=r[f];return{...s,[f]:Array.isArray(w)?[...w]:w}},{})}class Mr{constructor(r){this.method=r.method||"GET",this.hostname=r.hostname||"localhost",this.port=r.port,this.query=r.query||{},this.headers=r.headers||{},this.body=r.body,this.protocol=r.protocol?r.protocol.slice(-1)!==":"?`${r.protocol}:`:r.protocol:"https:",this.path=r.path?r.path.charAt(0)!=="/"?`/${r.path}`:r.path:"/",this.username=r.username,this.password=r.password,this.fragment=r.fragment}static clone(r){const s=new Mr({...r,headers:{...r.headers}});if(s.query)s.query=tk(s.query);return s}static isInstance(r){if(!r)return!1;const s=r;return"method"in s&&"protocol"in s&&"hostname"in s&&"path"in s&&typeof s.query==="object"&&typeof s.headers==="object"}clone(){return Mr.clone(this)}}class j0{constructor(r){this.statusCode=r.statusCode,this.reason=r.reason,this.headers=r.headers||{},this.body=r.body}static isInstance(r){if(!r)return!1;const s=r;return typeof s.statusCode==="number"&&typeof s.headers==="object"}}var QA=()=>{};var kr=G(()=>{LA();PA();JA();QA()});function Zs(r){return r}var ry=(r)=>(s)=>async(f)=>{if(!Mr.isInstance(f.request))return s(f);const{request:w}=f,{handlerProtocol:h=""}=r.requestHandler.metadata||{};if(h.indexOf("h2")>=0&&!w.headers[":authority"])delete w.headers.host,w.headers[":authority"]=w.hostname+(w.port?":"+w.port:"");else if(!w.headers.host){let E=w.hostname;if(w.port!=null)E+=`:${w.port}`;w.headers.host=E}return s(f)},fy,Ps=(r)=>({applyToStack:(s)=>{s.add(ry(r),fy)}});var pw=G(()=>{kr();fy={name:"hostHeaderMiddleware",step:"build",priority:"low",tags:["HOST"],override:!0}});var sy=()=>(r,s)=>async(f)=>{try{const w=await r(f),{clientName:h,commandName:E,logger:$,dynamoDbDocumentClientOptions:I={}}=s,{overrideInputFilterSensitiveLog:F,overrideOutputFilterSensitiveLog:U}=I,A=F??s.inputFilterSensitiveLog,L=U??s.outputFilterSensitiveLog,{$metadata:S,...z}=w.output;return $?.info?.({clientName:h,commandName:E,input:A(f.input),output:L(z),metadata:S}),w}catch(w){const{clientName:h,commandName:E,logger:$,dynamoDbDocumentClientOptions:I={}}=s,{overrideInputFilterSensitiveLog:F}=I,U=F??s.inputFilterSensitiveLog;throw $?.error?.({clientName:h,commandName:E,input:U(f.input),error:w,metadata:w.$metadata}),w}},wy,Js=(r)=>({applyToStack:(s)=>{s.add(sy(),wy)}});var BA=G(()=>{wy={name:"loggerMiddleware",tags:["LOGGER"],step:"initialize",override:!0}});var uw=G(()=>{BA()});var MA="X-Amzn-Trace-Id",hy="AWS_LAMBDA_FUNCTION_NAME",Ey="_X_AMZN_TRACE_ID",$y=(r)=>(s)=>async(f)=>{const{request:w}=f;if(!Mr.isInstance(w)||r.runtime!=="node"||w.headers.hasOwnProperty(MA))return s(f);const h=process.env[hy],E=process.env[Ey],$=(I)=>typeof I==="string"&&I.length>0;if($(h)&&$(E))w.headers[MA]=E;return s({...f,request:w})},Iy,Qs=(r)=>({applyToStack:(s)=>{s.add($y(r),Iy)}});var tw=G(()=>{kr();Iy={step:"build",tags:["RECURSION_DETECTION"],name:"recursionDetectionMiddleware",override:!0,priority:"low"}});var G1=O((Frr,DA)=>{var{defineProperty:G$,getOwnPropertyDescriptor:Fy,getOwnPropertyNames:Uy}=Object,Ty=Object.prototype.hasOwnProperty,HA=(r,s)=>G$(r,"name",{value:s,configurable:!0}),Gy=(r,s)=>{for(var f in s)G$(r,f,{get:s[f],enumerable:!0})},Ay=(r,s,f,w)=>{if(s&&typeof s==="object"||typeof s==="function"){for(let h of Uy(s))if(!Ty.call(r,h)&&h!==f)G$(r,h,{get:()=>s[h],enumerable:!(w=Fy(s,h))||w.enumerable})}return r},Ly=(r)=>Ay(G$({},"__esModule",{value:!0}),r),lA={};Gy(lA,{getSmithyContext:()=>Ry,normalizeProvider:()=>Cy});DA.exports=Ly(lA);var VA=Ff(),Ry=HA((r)=>r[VA.SMITHY_CONTEXT_KEY]||(r[VA.SMITHY_CONTEXT_KEY]={}),"getSmithyContext"),Cy=HA((r)=>{if(typeof r==="function")return r;const s=Promise.resolve(r);return()=>s},"normalizeProvider")});var Ar=O((Urr,mA)=>{var{defineProperty:A$,getOwnPropertyDescriptor:Wy,getOwnPropertyNames:zy}=Object,Sy=Object.prototype.hasOwnProperty,Sw=(r,s)=>A$(r,"name",{value:s,configurable:!0}),Yy=(r,s)=>{for(var f in s)A$(r,f,{get:s[f],enumerable:!0})},Xy=(r,s,f,w)=>{if(s&&typeof s==="object"||typeof s==="function"){for(let h of zy(s))if(!Sy.call(r,h)&&h!==f)A$(r,h,{get:()=>s[h],enumerable:!(w=Wy(s,h))||w.enumerable})}return r},Ky=(r)=>Xy(A$({},"__esModule",{value:!0}),r),kA={};Yy(kA,{CredentialsProviderError:()=>Zy,ProviderError:()=>L$,TokenProviderError:()=>Py,chain:()=>Jy,fromStatic:()=>Qy,memoize:()=>By});mA.exports=Ky(kA);var yA=class r extends Error{constructor(s,f=!0){var w;let h,E=!0;if(typeof f==="boolean")h=void 0,E=f;else if(f!=null&&typeof f==="object")h=f.logger,E=f.tryNextLink??!0;super(s);this.name="ProviderError",this.tryNextLink=E,Object.setPrototypeOf(this,r.prototype),(w=h==null?void 0:h.debug)==null||w.call(h,`@smithy/property-provider ${E?"->":"(!)"} ${s}`)}static from(s,f=!0){return Object.assign(new this(s.message,f),s)}};Sw(yA,"ProviderError");var L$=yA,NA=class r extends L${constructor(s,f=!0){super(s,f);this.name="CredentialsProviderError",Object.setPrototypeOf(this,r.prototype)}};Sw(NA,"CredentialsProviderError");var Zy=NA,qA=class r extends L${constructor(s,f=!0){super(s,f);this.name="TokenProviderError",Object.setPrototypeOf(this,r.prototype)}};Sw(qA,"TokenProviderError");var Py=qA,Jy=Sw((...r)=>async()=>{if(r.length===0)throw new L$("No providers in chain");let s;for(let f of r)try{return await f()}catch(w){if(s=w,w==null?void 0:w.tryNextLink)continue;throw w}throw s},"chain"),Qy=Sw((r)=>()=>Promise.resolve(r),"fromStatic"),By=Sw((r,s,f)=>{let w,h,E,$=!1;const I=Sw(async()=>{if(!h)h=r();try{w=await h,E=!0,$=!1}finally{h=void 0}return w},"coalesceProvider");if(s===void 0)return async(F)=>{if(!E||(F==null?void 0:F.forceRefresh))w=await I();return w};return async(F)=>{if(!E||(F==null?void 0:F.forceRefresh))w=await I();if($)return w;if(f&&!f(w))return $=!0,w;if(s(w))return await I(),w;return w}},"memoize")});var rh=O((jA)=>{Object.defineProperty(jA,"__esModule",{value:!0});jA.getHomeDir=void 0;var My=import.meta.require("os"),Vy=import.meta.require("path"),H6={},Hy=()=>{if(process&&process.geteuid)return`${process.geteuid()}`;return"DEFAULT"},ly=()=>{const{HOME:r,USERPROFILE:s,HOMEPATH:f,HOMEDRIVE:w=`C:${Vy.sep}`}=process.env;if(r)return r;if(s)return s;if(f)return`${w}${f}`;const h=Hy();if(!H6[h])H6[h]=My.homedir();return H6[h]};jA.getHomeDir=ly});var l6=O((iA)=>{Object.defineProperty(iA,"__esModule",{value:!0});iA.getSSOTokenFilepath=void 0;var Dy=import.meta.require("crypto"),ky=import.meta.require("path"),yy=rh(),Ny=(r)=>{const f=Dy.createHash("sha1").update(r).digest("hex");return ky.join(yy.getHomeDir(),".aws","sso","cache",`${f}.json`)};iA.getSSOTokenFilepath=Ny});var bA=O((dA)=>{Object.defineProperty(dA,"__esModule",{value:!0});dA.getSSOTokenFromFile=void 0;var qy=import.meta.require("fs"),my=l6(),{readFile:jy}=qy.promises,vy=async(r)=>{const s=my.getSSOTokenFilepath(r),f=await jy(s,"utf8");return JSON.parse(f)};dA.getSSOTokenFromFile=vy});var k6=O((_A)=>{Object.defineProperty(_A,"__esModule",{value:!0});_A.slurpFile=void 0;var iy=import.meta.require("fs"),{readFile:Oy}=iy.promises,D6={},dy=(r,s)=>{if(!D6[r]||(s===null||s===void 0?void 0:s.ignoreCache))D6[r]=Oy(r,"utf8");return D6[r]};_A.slurpFile=dy});var m6=O((Rrr,L1)=>{var{defineProperty:W$,getOwnPropertyDescriptor:cy,getOwnPropertyNames:by}=Object,_y=Object.prototype.hasOwnProperty,Jf=(r,s)=>W$(r,"name",{value:s,configurable:!0}),gy=(r,s)=>{for(var f in s)W$(r,f,{get:s[f],enumerable:!0})},y6=(r,s,f,w)=>{if(s&&typeof s==="object"||typeof s==="function"){for(let h of by(s))if(!_y.call(r,h)&&h!==f)W$(r,h,{get:()=>s[h],enumerable:!(w=cy(s,h))||w.enumerable})}return r},q6=(r,s,f)=>(y6(r,s,"default"),f&&y6(f,s,"default")),xy=(r)=>y6(W$({},"__esModule",{value:!0}),r),A1={};gy(A1,{CONFIG_PREFIX_SEPARATOR:()=>Yw,DEFAULT_PROFILE:()=>oA,ENV_PROFILE:()=>nA,getProfileName:()=>ey,loadSharedConfigFiles:()=>pA,loadSsoSessionData:()=>$N,parseKnownFiles:()=>FN});L1.exports=xy(A1);q6(A1,rh(),L1.exports);var nA="AWS_PROFILE",oA="default",ey=Jf((r)=>r.profile||process.env[nA]||oA,"getProfileName");q6(A1,l6(),L1.exports);q6(A1,bA(),L1.exports);var R$=Ff(),ny=Jf((r)=>Object.entries(r).filter(([s])=>{const f=s.indexOf(Yw);if(f===-1)return!1;return Object.values(R$.IniSectionType).includes(s.substring(0,f))}).reduce((s,[f,w])=>{const h=f.indexOf(Yw),E=f.substring(0,h)===R$.IniSectionType.PROFILE?f.substring(h+1):f;return s[E]=w,s},{...r.default&&{default:r.default}}),"getConfigData"),C$=import.meta.require("path"),oy=rh(),ay="AWS_CONFIG_FILE",aA=Jf(()=>process.env[ay]||C$.join(oy.getHomeDir(),".aws","config"),"getConfigFilepath"),py=rh(),uy="AWS_SHARED_CREDENTIALS_FILE",ty=Jf(()=>process.env[uy]||C$.join(py.getHomeDir(),".aws","credentials"),"getCredentialsFilepath"),rN=rh(),fN=/^([\w-]+)\s(["'])?([\w-@\+\.%:/]+)\2$/,sN=["__proto__","profile __proto__"],N6=Jf((r)=>{const s={};let f,w;for(let h of r.split(/\r?\n/)){const E=h.split(/(^|\s)[;#]/)[0].trim();if(E[0]==="["&&E[E.length-1]==="]"){f=void 0,w=void 0;const I=E.substring(1,E.length-1),F=fN.exec(I);if(F){const[,U,,A]=F;if(Object.values(R$.IniSectionType).includes(U))f=[U,A].join(Yw)}else f=I;if(sN.includes(I))throw new Error(`Found invalid profile name "${I}"`)}else if(f){const I=E.indexOf("=");if(![0,-1].includes(I)){const[F,U]=[E.substring(0,I).trim(),E.substring(I+1).trim()];if(U==="")w=F;else{if(w&&h.trimStart()===h)w=void 0;s[f]=s[f]||{};const A=w?[w,F].join(Yw):F;s[f][A]=U}}}}return s},"parseIni"),xA=k6(),eA=Jf(()=>({}),"swallowError"),Yw=".",pA=Jf(async(r={})=>{const{filepath:s=ty(),configFilepath:f=aA()}=r,w=rN.getHomeDir();let E=s;if(s.startsWith("~/"))E=C$.join(w,s.slice(2));let $=f;if(f.startsWith("~/"))$=C$.join(w,f.slice(2));const I=await Promise.all([xA.slurpFile($,{ignoreCache:r.ignoreCache}).then(N6).then(ny).catch(eA),xA.slurpFile(E,{ignoreCache:r.ignoreCache}).then(N6).catch(eA)]);return{configFile:I[0],credentialsFile:I[1]}},"loadSharedConfigFiles"),wN=Jf((r)=>Object.entries(r).filter(([s])=>s.startsWith(R$.IniSectionType.SSO_SESSION+Yw)).reduce((s,[f,w])=>({...s,[f.substring(f.indexOf(Yw)+1)]:w}),{}),"getSsoSessionData"),hN=k6(),EN=Jf(()=>({}),"swallowError"),$N=Jf(async(r={})=>hN.slurpFile(r.configFilepath??aA()).then(N6).then(wN).catch(EN),"loadSsoSessionData"),IN=Jf((...r)=>{const s={};for(let f of r)for(let[w,h]of Object.entries(f))if(s[w]!==void 0)Object.assign(s[w],h);else s[w]=h;return s},"mergeConfigFiles"),FN=Jf(async(r)=>{const s=await pA(r);return IN(s.configFile,s.credentialsFile)},"parseKnownFiles")});var fL=O((Crr,rL)=>{function j6(r){try{const s=new Set(Array.from(r.match(/([A-Z_]){3,}/g)??[]));return s.delete("CONFIG"),s.delete("CONFIG_PREFIX_SEPARATOR"),s.delete("ENV"),[...s].join(", ")}catch(s){return r}}var{defineProperty:z$,getOwnPropertyDescriptor:UN,getOwnPropertyNames:TN}=Object,GN=Object.prototype.hasOwnProperty,fh=(r,s)=>z$(r,"name",{value:s,configurable:!0}),AN=(r,s)=>{for(var f in s)z$(r,f,{get:s[f],enumerable:!0})},LN=(r,s,f,w)=>{if(s&&typeof s==="object"||typeof s==="function"){for(let h of TN(s))if(!GN.call(r,h)&&h!==f)z$(r,h,{get:()=>s[h],enumerable:!(w=UN(s,h))||w.enumerable})}return r},RN=(r)=>LN(z$({},"__esModule",{value:!0}),r),tA={};AN(tA,{loadConfig:()=>YN});rL.exports=RN(tA);var R1=Ar();fh(j6,"getSelectorName");var CN=fh((r,s)=>async()=>{try{const f=r(process.env);if(f===void 0)throw new Error;return f}catch(f){throw new R1.CredentialsProviderError(f.message||`Not found in ENV: ${j6(r.toString())}`,{logger:s})}},"fromEnv"),uA=m6(),WN=fh((r,{preferredFile:s="config",...f}={})=>async()=>{const w=uA.getProfileName(f),{configFile:h,credentialsFile:E}=await uA.loadSharedConfigFiles(f),$=E[w]||{},I=h[w]||{},F=s==="config"?{...$,...I}:{...I,...$};try{const A=r(F,s==="config"?h:E);if(A===void 0)throw new Error;return A}catch(U){throw new R1.CredentialsProviderError(U.message||`Not found in config files w/ profile [${w}]: ${j6(r.toString())}`,{logger:f.logger})}},"fromSharedConfigFiles"),zN=fh((r)=>typeof r==="function","isFunction"),SN=fh((r)=>zN(r)?async()=>await r():R1.fromStatic(r),"fromStatic"),YN=fh(({environmentVariableSelector:r,configFileSelector:s,default:f},w={})=>R1.memoize(R1.chain(CN(r),WN(s,w),SN(f))),"loadConfig")});var IL=O((EL)=>{Object.defineProperty(EL,"__esModule",{value:!0});EL.getEndpointUrlConfig=void 0;var sL=m6(),wL="AWS_ENDPOINT_URL",hL="endpoint_url",XN=(r)=>({environmentVariableSelector:(s)=>{const f=r.split(" ").map((E)=>E.toUpperCase()),w=s[[wL,...f].join("_")];if(w)return w;const h=s[wL];if(h)return h;return},configFileSelector:(s,f)=>{if(f&&s.services){const h=f[["services",s.services].join(sL.CONFIG_PREFIX_SEPARATOR)];if(h){const E=r.split(" ").map((I)=>I.toLowerCase()),$=h[[E.join("_"),hL].join(sL.CONFIG_PREFIX_SEPARATOR)];if($)return $}}const w=s[hL];if(w)return w;return},default:void 0});EL.getEndpointUrlConfig=XN});var v6=O((FL)=>{Object.defineProperty(FL,"__esModule",{value:!0});FL.getEndpointFromConfig=void 0;var KN=fL(),ZN=IL(),PN=async(r)=>KN.loadConfig(ZN.getEndpointUrlConfig(r!==null&&r!==void 0?r:""))();FL.getEndpointFromConfig=PN});var LL=O((Srr,AL)=>{function GL(r){const s={};if(r=r.replace(/^\?/,""),r)for(let f of r.split("&")){let[w,h=null]=f.split("=");if(w=decodeURIComponent(w),h)h=decodeURIComponent(h);if(!(w in s))s[w]=h;else if(Array.isArray(s[w]))s[w].push(h);else s[w]=[s[w],h]}return s}var{defineProperty:S$,getOwnPropertyDescriptor:JN,getOwnPropertyNames:QN}=Object,BN=Object.prototype.hasOwnProperty,MN=(r,s)=>S$(r,"name",{value:s,configurable:!0}),VN=(r,s)=>{for(var f in s)S$(r,f,{get:s[f],enumerable:!0})},HN=(r,s,f,w)=>{if(s&&typeof s==="object"||typeof s==="function"){for(let h of QN(s))if(!BN.call(r,h)&&h!==f)S$(r,h,{get:()=>s[h],enumerable:!(w=JN(s,h))||w.enumerable})}return r},lN=(r)=>HN(S$({},"__esModule",{value:!0}),r),TL={};VN(TL,{parseQueryString:()=>GL});AL.exports=lN(TL);MN(GL,"parseQueryString")});var zL=O((Yrr,WL)=>{var{defineProperty:Y$,getOwnPropertyDescriptor:DN,getOwnPropertyNames:kN}=Object,yN=Object.prototype.hasOwnProperty,NN=(r,s)=>Y$(r,"name",{value:s,configurable:!0}),qN=(r,s)=>{for(var f in s)Y$(r,f,{get:s[f],enumerable:!0})},mN=(r,s,f,w)=>{if(s&&typeof s==="object"||typeof s==="function"){for(let h of kN(s))if(!yN.call(r,h)&&h!==f)Y$(r,h,{get:()=>s[h],enumerable:!(w=DN(s,h))||w.enumerable})}return r},jN=(r)=>mN(Y$({},"__esModule",{value:!0}),r),RL={};qN(RL,{parseUrl:()=>CL});WL.exports=jN(RL);var vN=LL(),CL=NN((r)=>{if(typeof r==="string")return CL(new URL(r));const{hostname:s,pathname:f,port:w,protocol:h,search:E}=r;let $;if(E)$=vN.parseQueryString(E);return{hostname:s,port:w?parseInt(w):void 0,protocol:h,path:f,query:$}},"parseUrl")});var O6=O((Xrr,JL)=>{function PL(r,s,f){return{applyToStack:(w)=>{w.add(YL(r,f),KL),w.add(XL(r,s),ZL)}}}var{defineProperty:X$,getOwnPropertyDescriptor:iN,getOwnPropertyNames:ON}=Object,dN=Object.prototype.hasOwnProperty,i6=(r,s)=>X$(r,"name",{value:s,configurable:!0}),cN=(r,s)=>{for(var f in s)X$(r,f,{get:s[f],enumerable:!0})},bN=(r,s,f,w)=>{if(s&&typeof s==="object"||typeof s==="function"){for(let h of ON(s))if(!dN.call(r,h)&&h!==f)X$(r,h,{get:()=>s[h],enumerable:!(w=iN(s,h))||w.enumerable})}return r},_N=(r)=>bN(X$({},"__esModule",{value:!0}),r),SL={};cN(SL,{deserializerMiddleware:()=>YL,deserializerMiddlewareOption:()=>KL,getSerdePlugin:()=>PL,serializerMiddleware:()=>XL,serializerMiddlewareOption:()=>ZL});JL.exports=_N(SL);var YL=i6((r,s)=>(f)=>async(w)=>{const{response:h}=await f(w);try{const E=await s(h,r);return{response:h,output:E}}catch(E){if(Object.defineProperty(E,"$response",{value:h}),!("$metadata"in E)){if(E.message+="\n Deserialization error: to see the raw response, inspect the hidden field {error}.$response on this object.",typeof E.$responseBodyText!=="undefined"){if(E.$response)E.$response.body=E.$responseBodyText}}throw E}},"deserializerMiddleware"),XL=i6((r,s)=>(f,w)=>async(h)=>{var E;const $=((E=w.endpointV2)==null?void 0:E.url)&&r.urlParser?async()=>r.urlParser(w.endpointV2.url):r.endpoint;if(!$)throw new Error("No valid endpoint provider available.");const I=await s(h.input,{...r,endpoint:$});return f({...h,request:I})},"serializerMiddleware"),KL={name:"deserializerMiddleware",step:"deserialize",tags:["DESERIALIZER"],override:!0},ZL={name:"serializerMiddleware",step:"serialize",tags:["SERIALIZER"],override:!0};i6(PL,"getSerdePlugin")});var kL=O((Krr,DL)=>{var{defineProperty:Z$,getOwnPropertyDescriptor:gN,getOwnPropertyNames:xN}=Object,eN=Object.prototype.hasOwnProperty,uf=(r,s)=>Z$(r,"name",{value:s,configurable:!0}),nN=(r,s)=>{for(var f in s)Z$(r,f,{get:s[f],enumerable:!0})},oN=(r,s,f,w)=>{if(s&&typeof s==="object"||typeof s==="function"){for(let h of xN(s))if(!eN.call(r,h)&&h!==f)Z$(r,h,{get:()=>s[h],enumerable:!(w=gN(s,h))||w.enumerable})}return r},aN=(r)=>oN(Z$({},"__esModule",{value:!0}),r),BL={};nN(BL,{endpointMiddleware:()=>HL,endpointMiddlewareOptions:()=>lL,getEndpointFromInstructions:()=>ML,getEndpointPlugin:()=>$q,resolveEndpointConfig:()=>Fq,resolveParams:()=>VL,toEndpointV1:()=>d6});DL.exports=aN(BL);var pN=uf(async(r)=>{const s=(r==null?void 0:r.Bucket)||"";if(typeof r.Bucket==="string")r.Bucket=s.replace(/#/g,encodeURIComponent("#")).replace(/\?/g,encodeURIComponent("?"));if(sq(s)){if(r.ForcePathStyle===!0)throw new Error("Path-style addressing cannot be used with ARN buckets")}else if(!fq(s)||s.indexOf(".")!==-1&&!String(r.Endpoint).startsWith("http:")||s.toLowerCase()!==s||s.length<3)r.ForcePathStyle=!0;if(r.DisableMultiRegionAccessPoints)r.disableMultiRegionAccessPoints=!0,r.DisableMRAP=!0;return r},"resolveParamsForS3"),uN=/^[a-z0-9][a-z0-9\.\-]{1,61}[a-z0-9]$/,tN=/(\d+\.){3}\d+/,rq=/\.\./,fq=uf((r)=>uN.test(r)&&!tN.test(r)&&!rq.test(r),"isDnsCompatibleBucketName"),sq=uf((r)=>{const[s,f,w,,,h]=r.split(":"),E=s==="arn"&&r.split(":").length>=6,$=Boolean(E&&f&&w&&h);if(E&&!$)throw new Error(`Invalid ARN: ${r} was an invalid ARN.`);return $},"isArnBucketName"),wq=uf((r,s,f)=>{const w=uf(async()=>{const h=f[r]??f[s];if(typeof h==="function")return h();return h},"configProvider");if(r==="credentialScope"||s==="CredentialScope")return async()=>{const h=typeof f.credentials==="function"?await f.credentials():f.credentials;return(h==null?void 0:h.credentialScope)??(h==null?void 0:h.CredentialScope)};if(r==="accountId"||s==="AccountId")return async()=>{const h=typeof f.credentials==="function"?await f.credentials():f.credentials;return(h==null?void 0:h.accountId)??(h==null?void 0:h.AccountId)};if(r==="endpoint"||s==="endpoint")return async()=>{const h=await w();if(h&&typeof h==="object"){if("url"in h)return h.url.href;if("hostname"in h){const{protocol:E,hostname:$,port:I,path:F}=h;return`${E}//${$}${I?":"+I:""}${F}`}}return h};return w},"createConfigValueProvider"),hq=v6(),QL=zL(),d6=uf((r)=>{if(typeof r==="object"){if("url"in r)return QL.parseUrl(r.url);return r}return QL.parseUrl(r)},"toEndpointV1"),ML=uf(async(r,s,f,w)=>{if(!f.endpoint){let $;if(f.serviceConfiguredEndpoint)$=await f.serviceConfiguredEndpoint();else $=await hq.getEndpointFromConfig(f.serviceId);if($)f.endpoint=()=>Promise.resolve(d6($))}const h=await VL(r,s,f);if(typeof f.endpointProvider!=="function")throw new Error("config.endpointProvider is not set.");return f.endpointProvider(h,w)},"getEndpointFromInstructions"),VL=uf(async(r,s,f)=>{var w;const h={},E=((w=s==null?void 0:s.getEndpointParameterInstructions)==null?void 0:w.call(s))||{};for(let[$,I]of Object.entries(E))switch(I.type){case"staticContextParams":h[$]=I.value;break;case"contextParams":h[$]=r[I.name];break;case"clientContextParams":case"builtInParams":h[$]=await wq(I.name,$,f)();break;default:throw new Error("Unrecognized endpoint parameter instruction: "+JSON.stringify(I))}if(Object.keys(E).length===0)Object.assign(h,f);if(String(f.serviceId).toLowerCase()==="s3")await pN(h);return h},"resolveParams"),K$=G1(),HL=uf(({config:r,instructions:s})=>{return(f,w)=>async(h)=>{var E,$,I;const F=await ML(h.input,{getEndpointParameterInstructions(){return s}},{...r},w);w.endpointV2=F,w.authSchemes=(E=F.properties)==null?void 0:E.authSchemes;const U=($=w.authSchemes)==null?void 0:$[0];if(U){w.signing_region=U.signingRegion,w.signing_service=U.signingName;const A=K$.getSmithyContext(w),L=(I=A==null?void 0:A.selectedHttpAuthScheme)==null?void 0:I.httpAuthOption;if(L)L.signingProperties=Object.assign(L.signingProperties||{},{signing_region:U.signingRegion,signingRegion:U.signingRegion,signing_service:U.signingName,signingName:U.signingName,signingRegionSet:U.signingRegionSet},U.properties)}return f({...h})}},"endpointMiddleware"),Eq=O6(),lL={step:"serialize",tags:["ENDPOINT_PARAMETERS","ENDPOINT_V2","ENDPOINT"],name:"endpointV2Middleware",override:!0,relation:"before",toMiddleware:Eq.serializerMiddlewareOption.name},$q=uf((r,s)=>({applyToStack:(f)=>{f.addRelativeTo(HL({config:r,instructions:s}),lL)}}),"getEndpointPlugin"),Iq=v6(),Fq=uf((r)=>{const s=r.tls??!0,{endpoint:f}=r,w=f!=null?async()=>d6(await K$.normalizeProvider(f)()):void 0,E={...r,endpoint:w,tls:s,isCustomEndpoint:!!f,useDualstackEndpoint:K$.normalizeProvider(r.useDualstackEndpoint??!1),useFipsEndpoint:K$.normalizeProvider(r.useFipsEndpoint??!1)};let $=void 0;return E.serviceConfiguredEndpoint=async()=>{if(r.serviceId&&!$)$=Iq.getEndpointFromConfig(r.serviceId);return $},E},"resolveEndpointConfig")});var L0=O((Zrr,dL)=>{function vL(r){return Object.keys(r).reduce((s,f)=>{const w=r[f];return{...s,[f]:Array.isArray(w)?[...w]:w}},{})}function OL(r){return/^[a-z0-9][a-z0-9\.\-]*[a-z0-9]$/.test(r)}var{defineProperty:P$,getOwnPropertyDescriptor:Uq,getOwnPropertyNames:Tq}=Object,Gq=Object.prototype.hasOwnProperty,v0=(r,s)=>P$(r,"name",{value:s,configurable:!0}),Aq=(r,s)=>{for(var f in s)P$(r,f,{get:s[f],enumerable:!0})},Lq=(r,s,f,w)=>{if(s&&typeof s==="object"||typeof s==="function"){for(let h of Tq(s))if(!Gq.call(r,h)&&h!==f)P$(r,h,{get:()=>s[h],enumerable:!(w=Uq(s,h))||w.enumerable})}return r},Rq=(r)=>Lq(P$({},"__esModule",{value:!0}),r),yL={};Aq(yL,{Field:()=>zq,Fields:()=>Sq,HttpRequest:()=>Yq,HttpResponse:()=>Xq,IHttpRequest:()=>NL.HttpRequest,getHttpHandlerExtensionConfiguration:()=>Cq,isValidHostname:()=>OL,resolveHttpHandlerRuntimeConfig:()=>Wq});dL.exports=Rq(yL);var Cq=v0((r)=>{let s=r.httpHandler;return{setHttpHandler(f){s=f},httpHandler(){return s},updateHttpClientConfig(f,w){s.updateHttpClientConfig(f,w)},httpHandlerConfigs(){return s.httpHandlerConfigs()}}},"getHttpHandlerExtensionConfiguration"),Wq=v0((r)=>{return{httpHandler:r.httpHandler()}},"resolveHttpHandlerRuntimeConfig"),NL=Ff(),qL=class r{constructor({name:s,kind:f=NL.FieldPosition.HEADER,values:w=[]}){this.name=s,this.kind=f,this.values=w}add(s){this.values.push(s)}set(s){this.values=s}remove(s){this.values=this.values.filter((f)=>f!==s)}toString(){return this.values.map((s)=>s.includes(",")||s.includes(" ")?`"${s}"`:s).join(", ")}get(){return this.values}};v0(qL,"Field");var zq=qL,mL=class r{constructor({fields:s=[],encoding:f="utf-8"}){this.entries={},s.forEach(this.setField.bind(this)),this.encoding=f}setField(s){this.entries[s.name.toLowerCase()]=s}getField(s){return this.entries[s.toLowerCase()]}removeField(s){delete this.entries[s.toLowerCase()]}getByType(s){return Object.values(this.entries).filter((f)=>f.kind===s)}};v0(mL,"Fields");var Sq=mL,jL=class r{constructor(s){this.method=s.method||"GET",this.hostname=s.hostname||"localhost",this.port=s.port,this.query=s.query||{},this.headers=s.headers||{},this.body=s.body,this.protocol=s.protocol?s.protocol.slice(-1)!==":"?`${s.protocol}:`:s.protocol:"https:",this.path=s.path?s.path.charAt(0)!=="/"?`/${s.path}`:s.path:"/",this.username=s.username,this.password=s.password,this.fragment=s.fragment}static clone(s){const f=new r({...s,headers:{...s.headers}});if(f.query)f.query=vL(f.query);return f}static isInstance(s){if(!s)return!1;const f=s;return"method"in f&&"protocol"in f&&"hostname"in f&&"path"in f&&typeof f.query==="object"&&typeof f.headers==="object"}clone(){return r.clone(this)}};v0(jL,"HttpRequest");var Yq=jL;v0(vL,"cloneQuery");var iL=class r{constructor(s){this.statusCode=s.statusCode,this.reason=s.reason,this.headers=s.headers||{},this.body=s.body}static isInstance(s){if(!s)return!1;const f=s;return typeof f.statusCode==="number"&&typeof f.headers==="object"}};v0(iL,"HttpResponse");var Xq=iL;v0(OL,"isValidHostname")});var c6=O((cL)=>{function Zq(r){return r&&r.__esModule?r:{default:r}}function Pq(){if(J$>Q$.length-16)Kq.default.randomFillSync(Q$),J$=0;return Q$.slice(J$,J$+=16)}Object.defineProperty(cL,"__esModule",{value:!0});cL.default=Pq;var Kq=Zq(import.meta.require("crypto")),Q$=new Uint8Array(256),J$=Q$.length});var gL=O((bL)=>{Object.defineProperty(bL,"__esModule",{value:!0});bL.default=void 0;var Qq=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;bL.default=Qq});var C1=O((xL)=>{function Mq(r){return r&&r.__esModule?r:{default:r}}function Vq(r){return typeof r==="string"&&Bq.default.test(r)}Object.defineProperty(xL,"__esModule",{value:!0});xL.default=void 0;var Bq=Mq(gL()),Hq=Vq;xL.default=Hq});var W1=O((oL)=>{function Dq(r){return r&&r.__esModule?r:{default:r}}function nL(r,s=0){return Or[r[s+0]]+Or[r[s+1]]+Or[r[s+2]]+Or[r[s+3]]+"-"+Or[r[s+4]]+Or[r[s+5]]+"-"+Or[r[s+6]]+Or[r[s+7]]+"-"+Or[r[s+8]]+Or[r[s+9]]+"-"+Or[r[s+10]]+Or[r[s+11]]+Or[r[s+12]]+Or[r[s+13]]+Or[r[s+14]]+Or[r[s+15]]}function kq(r,s=0){const f=nL(r,s);if(!lq.default(f))throw TypeError("Stringified UUID is invalid");return f}Object.defineProperty(oL,"__esModule",{value:!0});oL.default=void 0;oL.unsafeStringify=nL;var lq=Dq(C1()),Or=[];for(let r=0;r<256;++r)Or.push((r+256).toString(16).slice(1));var yq=kq;oL.default=yq});var rR=O((uL)=>{function jq(r){return r&&r.__esModule?r:{default:r}}function vq(r,s,f){let w=s&&f||0;const h=s||new Array(16);r=r||{};let E=r.node||pL,$=r.clockseq!==void 0?r.clockseq:b6;if(E==null||$==null){const S=r.random||(r.rng||qq.default)();if(E==null)E=pL=[S[0]|1,S[1],S[2],S[3],S[4],S[5]];if($==null)$=b6=(S[6]<<8|S[7])&16383}let I=r.msecs!==void 0?r.msecs:Date.now(),F=r.nsecs!==void 0?r.nsecs:g6+1;const U=I-_6+(F-g6)/1e4;if(U<0&&r.clockseq===void 0)$=$+1&16383;if((U<0||I>_6)&&r.nsecs===void 0)F=0;if(F>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");_6=I,g6=F,b6=$,I+=12219292800000;const A=((I&268435455)*1e4+F)%4294967296;h[w++]=A>>>24&255,h[w++]=A>>>16&255,h[w++]=A>>>8&255,h[w++]=A&255;const L=I/4294967296*1e4&268435455;h[w++]=L>>>8&255,h[w++]=L&255,h[w++]=L>>>24&15|16,h[w++]=L>>>16&255,h[w++]=$>>>8|128,h[w++]=$&255;for(let S=0;S<6;++S)h[w+S]=E[S];return s||mq.unsafeStringify(h)}Object.defineProperty(uL,"__esModule",{value:!0});uL.default=void 0;var qq=jq(c6()),mq=W1(),pL,b6,_6=0,g6=0,iq=vq;uL.default=iq});var x6=O((fR)=>{function dq(r){return r&&r.__esModule?r:{default:r}}function cq(r){if(!Oq.default(r))throw TypeError("Invalid UUID");let s;const f=new Uint8Array(16);return f[0]=(s=parseInt(r.slice(0,8),16))>>>24,f[1]=s>>>16&255,f[2]=s>>>8&255,f[3]=s&255,f[4]=(s=parseInt(r.slice(9,13),16))>>>8,f[5]=s&255,f[6]=(s=parseInt(r.slice(14,18),16))>>>8,f[7]=s&255,f[8]=(s=parseInt(r.slice(19,23),16))>>>8,f[9]=s&255,f[10]=(s=parseInt(r.slice(24,36),16))/1099511627776&255,f[11]=s/4294967296&255,f[12]=s>>>24&255,f[13]=s>>>16&255,f[14]=s>>>8&255,f[15]=s&255,f}Object.defineProperty(fR,"__esModule",{value:!0});fR.default=void 0;var Oq=dq(C1()),bq=cq;fR.default=bq});var e6=O((ER)=>{function xq(r){return r&&r.__esModule?r:{default:r}}function eq(r){r=unescape(encodeURIComponent(r));const s=[];for(let f=0;f<r.length;++f)s.push(r.charCodeAt(f));return s}function nq(r,s,f){function w(h,E,$,I){var F;if(typeof h==="string")h=eq(h);if(typeof E==="string")E=gq.default(E);if(((F=E)===null||F===void 0?void 0:F.length)!==16)throw TypeError("Namespace must be array-like (16 iterable integer values, 0-255)");let U=new Uint8Array(16+h.length);if(U.set(E),U.set(h,E.length),U=f(U),U[6]=U[6]&15|s,U[8]=U[8]&63|128,$){I=I||0;for(let A=0;A<16;++A)$[I+A]=U[A];return $}return _q.unsafeStringify(U)}try{w.name=r}catch(h){}return w.DNS=wR,w.URL=hR,w}Object.defineProperty(ER,"__esModule",{value:!0});ER.URL=ER.DNS=void 0;ER.default=nq;var _q=W1(),gq=xq(x6()),wR="6ba7b810-9dad-11d1-80b4-00c04fd430c8";ER.DNS=wR;var hR="6ba7b811-9dad-11d1-80b4-00c04fd430c8";ER.URL=hR});var UR=O((IR)=>{function uq(r){return r&&r.__esModule?r:{default:r}}function tq(r){if(Array.isArray(r))r=Buffer.from(r);else if(typeof r==="string")r=Buffer.from(r,"utf8");return pq.default.createHash("md5").update(r).digest()}Object.defineProperty(IR,"__esModule",{value:!0});IR.default=void 0;var pq=uq(import.meta.require("crypto")),rm=tq;IR.default=rm});var LR=O((GR)=>{function TR(r){return r&&r.__esModule?r:{default:r}}Object.defineProperty(GR,"__esModule",{value:!0});GR.default=void 0;var fm=TR(e6()),sm=TR(UR()),wm=fm.default("v3",48,sm.default),hm=wm;GR.default=hm});var WR=O((RR)=>{function $m(r){return r&&r.__esModule?r:{default:r}}Object.defineProperty(RR,"__esModule",{value:!0});RR.default=void 0;var Em=$m(import.meta.require("crypto")),Im={randomUUID:Em.default.randomUUID};RR.default=Im});var KR=O((YR)=>{function SR(r){return r&&r.__esModule?r:{default:r}}function Tm(r,s,f){if(zR.default.randomUUID&&!s&&!r)return zR.default.randomUUID();r=r||{};const w=r.random||(r.rng||Fm.default)();if(w[6]=w[6]&15|64,w[8]=w[8]&63|128,s){f=f||0;for(let h=0;h<16;++h)s[f+h]=w[h];return s}return Um.unsafeStringify(w)}Object.defineProperty(YR,"__esModule",{value:!0});YR.default=void 0;var zR=SR(WR()),Fm=SR(c6()),Um=W1(),Gm=Tm;YR.default=Gm});var JR=O((ZR)=>{function Lm(r){return r&&r.__esModule?r:{default:r}}function Rm(r){if(Array.isArray(r))r=Buffer.from(r);else if(typeof r==="string")r=Buffer.from(r,"utf8");return Am.default.createHash("sha1").update(r).digest()}Object.defineProperty(ZR,"__esModule",{value:!0});ZR.default=void 0;var Am=Lm(import.meta.require("crypto")),Cm=Rm;ZR.default=Cm});var VR=O((BR)=>{function QR(r){return r&&r.__esModule?r:{default:r}}Object.defineProperty(BR,"__esModule",{value:!0});BR.default=void 0;var Wm=QR(e6()),zm=QR(JR()),Sm=Wm.default("v5",80,zm.default),Ym=Sm;BR.default=Ym});var DR=O((HR)=>{Object.defineProperty(HR,"__esModule",{value:!0});HR.default=void 0;var Xm="00000000-0000-0000-0000-000000000000";HR.default=Xm});var NR=O((kR)=>{function Zm(r){return r&&r.__esModule?r:{default:r}}function Pm(r){if(!Km.default(r))throw TypeError("Invalid UUID");return parseInt(r.slice(14,15),16)}Object.defineProperty(kR,"__esModule",{value:!0});kR.default=void 0;var Km=Zm(C1()),Jm=Pm;kR.default=Jm});var n6=O((tf)=>{function R0(r){return r&&r.__esModule?r:{default:r}}Object.defineProperty(tf,"__esModule",{value:!0});Object.defineProperty(tf,"NIL",{enumerable:!0,get:function(){return Hm.default}});Object.defineProperty(tf,"parse",{enumerable:!0,get:function(){return ym.default}});Object.defineProperty(tf,"stringify",{enumerable:!0,get:function(){return km.default}});Object.defineProperty(tf,"v1",{enumerable:!0,get:function(){return Qm.default}});Object.defineProperty(tf,"v3",{enumerable:!0,get:function(){return Bm.default}});Object.defineProperty(tf,"v4",{enumerable:!0,get:function(){return Mm.default}});Object.defineProperty(tf,"v5",{enumerable:!0,get:function(){return Vm.default}});Object.defineProperty(tf,"validate",{enumerable:!0,get:function(){return Dm.default}});Object.defineProperty(tf,"version",{enumerable:!0,get:function(){return lm.default}});var Qm=R0(rR()),Bm=R0(LR()),Mm=R0(KR()),Vm=R0(VR()),Hm=R0(DR()),lm=R0(NR()),Dm=R0(C1()),km=R0(W1()),ym=R0(x6())});var o6=O((irr,vR)=>{var{defineProperty:B$,getOwnPropertyDescriptor:Nm,getOwnPropertyNames:qm}=Object,mm=Object.prototype.hasOwnProperty,sh=(r,s)=>B$(r,"name",{value:s,configurable:!0}),jm=(r,s)=>{for(var f in s)B$(r,f,{get:s[f],enumerable:!0})},vm=(r,s,f,w)=>{if(s&&typeof s==="object"||typeof s==="function"){for(let h of qm(s))if(!mm.call(r,h)&&h!==f)B$(r,h,{get:()=>s[h],enumerable:!(w=Nm(s,h))||w.enumerable})}return r},im=(r)=>vm(B$({},"__esModule",{value:!0}),r),qR={};jm(qR,{isClockSkewCorrectedError:()=>mR,isClockSkewError:()=>xm,isRetryableByTrait:()=>gm,isServerError:()=>nm,isThrottlingError:()=>em,isTransientError:()=>jR});vR.exports=im(qR);var Om=["AuthFailure","InvalidSignatureException","RequestExpired","RequestInTheFuture","RequestTimeTooSkewed","SignatureDoesNotMatch"],dm=["BandwidthLimitExceeded","EC2ThrottledException","LimitExceededException","PriorRequestNotComplete","ProvisionedThroughputExceededException","RequestLimitExceeded","RequestThrottled","RequestThrottledException","SlowDown","ThrottledException","Throttling","ThrottlingException","TooManyRequestsException","TransactionInProgressException"],cm=["TimeoutError","RequestTimeout","RequestTimeoutException"],bm=[500,502,503,504],_m=["ECONNRESET","ECONNREFUSED","EPIPE","ETIMEDOUT"],gm=sh((r)=>r.$retryable!==void 0,"isRetryableByTrait"),xm=sh((r)=>Om.includes(r.name),"isClockSkewError"),mR=sh((r)=>{var s;return(s=r.$metadata)==null?void 0:s.clockSkewCorrected},"isClockSkewCorrectedError"),em=sh((r)=>{var s,f;return((s=r.$metadata)==null?void 0:s.httpStatusCode)===429||dm.includes(r.name)||((f=r.$retryable)==null?void 0:f.throttling)==!0},"isThrottlingError"),jR=sh((r)=>{var s;return mR(r)||cm.includes(r.name)||_m.includes((r==null?void 0:r.code)||"")||bm.includes(((s=r.$metadata)==null?void 0:s.httpStatusCode)||0)},"isTransientError"),nm=sh((r)=>{var s;if(((s=r.$metadata)==null?void 0:s.httpStatusCode)!==void 0){const f=r.$metadata.httpStatusCode;if(500<=f&&f<=599&&!jR(r))return!0;return!1}return!1},"isServerError")});var uR=O((Orr,pR)=>{var{defineProperty:M$,getOwnPropertyDescriptor:om,getOwnPropertyNames:am}=Object,pm=Object.prototype.hasOwnProperty,rs=(r,s)=>M$(r,"name",{value:s,configurable:!0}),um=(r,s)=>{for(var f in s)M$(r,f,{get:s[f],enumerable:!0})},tm=(r,s,f,w)=>{if(s&&typeof s==="object"||typeof s==="function"){for(let h of am(s))if(!pm.call(r,h)&&h!==f)M$(r,h,{get:()=>s[h],enumerable:!(w=om(s,h))||w.enumerable})}return r},rj=(r)=>tm(M$({},"__esModule",{value:!0}),r),OR={};um(OR,{AdaptiveRetryStrategy:()=>$j,ConfiguredRetryStrategy:()=>Ij,DEFAULT_MAX_ATTEMPTS:()=>a6,DEFAULT_RETRY_DELAY_BASE:()=>z1,DEFAULT_RETRY_MODE:()=>fj,DefaultRateLimiter:()=>bR,INITIAL_RETRY_TOKENS:()=>p6,INVOCATION_ID_HEADER:()=>wj,MAXIMUM_RETRY_DELAY:()=>u6,NO_RETRY_INCREMENT:()=>eR,REQUEST_HEADER:()=>hj,RETRY_COST:()=>gR,RETRY_MODES:()=>dR,StandardRetryStrategy:()=>t6,THROTTLING_RETRY_DELAY_BASE:()=>_R,TIMEOUT_RETRY_COST:()=>xR});pR.exports=rj(OR);var dR=((r)=>{return r.STANDARD="standard",r.ADAPTIVE="adaptive",r})(dR||{}),a6=3,fj="standard",sj=o6(),cR=class r{constructor(s){this.currentCapacity=0,this.enabled=!1,this.lastMaxRate=0,this.measuredTxRate=0,this.requestCount=0,this.lastTimestamp=0,this.timeWindow=0,this.beta=(s==null?void 0:s.beta)??0.7,this.minCapacity=(s==null?void 0:s.minCapacity)??1,this.minFillRate=(s==null?void 0:s.minFillRate)??0.5,this.scaleConstant=(s==null?void 0:s.scaleConstant)??0.4,this.smooth=(s==null?void 0:s.smooth)??0.8;const f=this.getCurrentTimeInSeconds();this.lastThrottleTime=f,this.lastTxRateBucket=Math.floor(this.getCurrentTimeInSeconds()),this.fillRate=this.minFillRate,this.maxCapacity=this.minCapacity}getCurrentTimeInSeconds(){return Date.now()/1000}async getSendToken(){return this.acquireTokenBucket(1)}async acquireTokenBucket(s){if(!this.enabled)return;if(this.refillTokenBucket(),s>this.currentCapacity){const f=(s-this.currentCapacity)/this.fillRate*1000;await new Promise((w)=>setTimeout(w,f))}this.currentCapacity=this.currentCapacity-s}refillTokenBucket(){const s=this.getCurrentTimeInSeconds();if(!this.lastTimestamp){this.lastTimestamp=s;return}const f=(s-this.lastTimestamp)*this.fillRate;this.currentCapacity=Math.min(this.maxCapacity,this.currentCapacity+f),this.lastTimestamp=s}updateClientSendingRate(s){let f;if(this.updateMeasuredRate(),sj.isThrottlingError(s)){const h=!this.enabled?this.measuredTxRate:Math.min(this.measuredTxRate,this.fillRate);this.lastMaxRate=h,this.calculateTimeWindow(),this.lastThrottleTime=this.getCurrentTimeInSeconds(),f=this.cubicThrottle(h),this.enableTokenBucket()}else this.calculateTimeWindow(),f=this.cubicSuccess(this.getCurrentTimeInSeconds());const w=Math.min(f,2*this.measuredTxRate);this.updateTokenBucketRate(w)}calculateTimeWindow(){this.timeWindow=this.getPrecise(Math.pow(this.lastMaxRate*(1-this.beta)/this.scaleConstant,0.3333333333333333))}cubicThrottle(s){return this.getPrecise(s*this.beta)}cubicSuccess(s){return this.getPrecise(this.scaleConstant*Math.pow(s-this.lastThrottleTime-this.timeWindow,3)+this.lastMaxRate)}enableTokenBucket(){this.enabled=!0}updateTokenBucketRate(s){this.refillTokenBucket(),this.fillRate=Math.max(s,this.minFillRate),this.maxCapacity=Math.max(s,this.minCapacity),this.currentCapacity=Math.min(this.currentCapacity,this.maxCapacity)}updateMeasuredRate(){const s=this.getCurrentTimeInSeconds(),f=Math.floor(s*2)/2;if(this.requestCount++,f>this.lastTxRateBucket){const w=this.requestCount/(f-this.lastTxRateBucket);this.measuredTxRate=this.getPrecise(w*this.smooth+this.measuredTxRate*(1-this.smooth)),this.requestCount=0,this.lastTxRateBucket=f}}getPrecise(s){return parseFloat(s.toFixed(8))}};rs(cR,"DefaultRateLimiter");var bR=cR,z1=100,u6=20000,_R=500,p6=500,gR=5,xR=10,eR=1,wj="amz-sdk-invocation-id",hj="amz-sdk-request",Ej=rs(()=>{let r=z1;return{computeNextBackoffDelay:rs((w)=>{return Math.floor(Math.min(u6,Math.random()*2**w*r))},"computeNextBackoffDelay"),setDelayBase:rs((w)=>{r=w},"setDelayBase")}},"getDefaultRetryBackoffStrategy"),iR=rs(({retryDelay:r,retryCount:s,retryCost:f})=>{return{getRetryCount:rs(()=>s,"getRetryCount"),getRetryDelay:rs(()=>Math.min(u6,r),"getRetryDelay"),getRetryCost:rs(()=>f,"getRetryCost")}},"createDefaultRetryToken"),nR=class r{constructor(s){this.maxAttempts=s,this.mode="standard",this.capacity=p6,this.retryBackoffStrategy=Ej(),this.maxAttemptsProvider=typeof s==="function"?s:async()=>s}async acquireInitialRetryToken(s){return iR({retryDelay:z1,retryCount:0})}async refreshRetryTokenForRetry(s,f){const w=await this.getMaxAttempts();if(this.shouldRetry(s,f,w)){const h=f.errorType;this.retryBackoffStrategy.setDelayBase(h==="THROTTLING"?_R:z1);const E=this.retryBackoffStrategy.computeNextBackoffDelay(s.getRetryCount()),$=f.retryAfterHint?Math.max(f.retryAfterHint.getTime()-Date.now()||0,E):E,I=this.getCapacityCost(h);return this.capacity-=I,iR({retryDelay:$,retryCount:s.getRetryCount()+1,retryCost:I})}throw new Error("No retry token available")}recordSuccess(s){this.capacity=Math.max(p6,this.capacity+(s.getRetryCost()??eR))}getCapacity(){return this.capacity}async getMaxAttempts(){try{return await this.maxAttemptsProvider()}catch(s){return console.warn(`Max attempts provider could not resolve. Using default of ${a6}`),a6}}shouldRetry(s,f,w){return s.getRetryCount()+1<w&&this.capacity>=this.getCapacityCost(f.errorType)&&this.isRetryableError(f.errorType)}getCapacityCost(s){return s==="TRANSIENT"?xR:gR}isRetryableError(s){return s==="THROTTLING"||s==="TRANSIENT"}};rs(nR,"StandardRetryStrategy");var t6=nR,oR=class r{constructor(s,f){this.maxAttemptsProvider=s,this.mode="adaptive";const{rateLimiter:w}=f??{};this.rateLimiter=w??new bR,this.standardRetryStrategy=new t6(s)}async acquireInitialRetryToken(s){return await this.rateLimiter.getSendToken(),this.standardRetryStrategy.acquireInitialRetryToken(s)}async refreshRetryTokenForRetry(s,f){return this.rateLimiter.updateClientSendingRate(f),this.standardRetryStrategy.refreshRetryTokenForRetry(s,f)}recordSuccess(s){this.rateLimiter.updateClientSendingRate({}),this.standardRetryStrategy.recordSuccess(s)}};rs(oR,"AdaptiveRetryStrategy");var $j=oR,aR=class r extends t6{constructor(s,f=z1){super(typeof s==="function"?s:async()=>s);if(typeof f==="number")this.computeNextBackoffDelay=()=>f;else this.computeNextBackoffDelay=f}async refreshRetryTokenForRetry(s,f){const w=await super.refreshRetryTokenForRetry(s,f);return w.getRetryDelay=()=>this.computeNextBackoffDelay(w.getRetryCount()),w}};rs(aR,"ConfiguredRetryStrategy");var Ij=aR});var wC=O((drr,sC)=>{var{defineProperty:V$,getOwnPropertyDescriptor:Fj,getOwnPropertyNames:Uj}=Object,Tj=Object.prototype.hasOwnProperty,Qf=(r,s)=>V$(r,"name",{value:s,configurable:!0}),Gj=(r,s)=>{for(var f in s)V$(r,f,{get:s[f],enumerable:!0})},Aj=(r,s,f,w)=>{if(s&&typeof s==="object"||typeof s==="function"){for(let h of Uj(s))if(!Tj.call(r,h)&&h!==f)V$(r,h,{get:()=>s[h],enumerable:!(w=Fj(s,h))||w.enumerable})}return r},Lj=(r)=>Aj(V$({},"__esModule",{value:!0}),r),fC={};Gj(fC,{constructStack:()=>rF});sC.exports=Lj(fC);var Xw=Qf((r,s)=>{const f=[];if(r)f.push(r);if(s)for(let w of s)f.push(w);return f},"getAllAliases"),i0=Qf((r,s)=>{return`${r||"anonymous"}${s&&s.length>0?` (a.k.a. ${s.join(",")})`:""}`},"getMiddlewareNameWithAliases"),rF=Qf(()=>{let r=[],s=[],f=!1;const w=new Set,h=Qf((L)=>L.sort((S,z)=>tR[z.step]-tR[S.step]||rC[z.priority||"normal"]-rC[S.priority||"normal"]),"sort"),E=Qf((L)=>{let S=!1;const z=Qf((Z)=>{const N=Xw(Z.name,Z.aliases);if(N.includes(L)){S=!0;for(let M of N)w.delete(M);return!1}return!0},"filterCb");return r=r.filter(z),s=s.filter(z),S},"removeByName"),$=Qf((L)=>{let S=!1;const z=Qf((Z)=>{if(Z.middleware===L){S=!0;for(let N of Xw(Z.name,Z.aliases))w.delete(N);return!1}return!0},"filterCb");return r=r.filter(z),s=s.filter(z),S},"removeByReference"),I=Qf((L)=>{var S;return r.forEach((z)=>{L.add(z.middleware,{...z})}),s.forEach((z)=>{L.addRelativeTo(z.middleware,{...z})}),(S=L.identifyOnResolve)==null||S.call(L,A.identifyOnResolve()),L},"cloneTo"),F=Qf((L)=>{const S=[];return L.before.forEach((z)=>{if(z.before.length===0&&z.after.length===0)S.push(z);else S.push(...F(z))}),S.push(L),L.after.reverse().forEach((z)=>{if(z.before.length===0&&z.after.length===0)S.push(z);else S.push(...F(z))}),S},"expandRelativeMiddlewareList"),U=Qf((L=!1)=>{const S=[],z=[],Z={};return r.forEach((M)=>{const l={...M,before:[],after:[]};for(let k of Xw(l.name,l.aliases))Z[k]=l;S.push(l)}),s.forEach((M)=>{const l={...M,before:[],after:[]};for(let k of Xw(l.name,l.aliases))Z[k]=l;z.push(l)}),z.forEach((M)=>{if(M.toMiddleware){const l=Z[M.toMiddleware];if(l===void 0){if(L)return;throw new Error(`${M.toMiddleware} is not found when adding ${i0(M.name,M.aliases)} middleware ${M.relation} ${M.toMiddleware}`)}if(M.relation==="after")l.after.push(M);if(M.relation==="before")l.before.push(M)}}),h(S).map(F).reduce((M,l)=>{return M.push(...l),M},[])},"getMiddlewareList"),A={add:(L,S={})=>{const{name:z,override:Z,aliases:N}=S,M={step:"initialize",priority:"normal",middleware:L,...S},l=Xw(z,N);if(l.length>0){if(l.some((k)=>w.has(k))){if(!Z)throw new Error(`Duplicate middleware name '${i0(z,N)}'`);for(let k of l){const i=r.findIndex((sr)=>{var Br;return sr.name===k||((Br=sr.aliases)==null?void 0:Br.some((pr)=>pr===k))});if(i===-1)continue;const e=r[i];if(e.step!==M.step||M.priority!==e.priority)throw new Error(`"${i0(e.name,e.aliases)}" middleware with ${e.priority} priority in ${e.step} step cannot be overridden by "${i0(z,N)}" middleware with ${M.priority} priority in ${M.step} step.`);r.splice(i,1)}}for(let k of l)w.add(k)}r.push(M)},addRelativeTo:(L,S)=>{const{name:z,override:Z,aliases:N}=S,M={middleware:L,...S},l=Xw(z,N);if(l.length>0){if(l.some((k)=>w.has(k))){if(!Z)throw new Error(`Duplicate middleware name '${i0(z,N)}'`);for(let k of l){const i=s.findIndex((sr)=>{var Br;return sr.name===k||((Br=sr.aliases)==null?void 0:Br.some((pr)=>pr===k))});if(i===-1)continue;const e=s[i];if(e.toMiddleware!==M.toMiddleware||e.relation!==M.relation)throw new Error(`"${i0(e.name,e.aliases)}" middleware ${e.relation} "${e.toMiddleware}" middleware cannot be overridden by "${i0(z,N)}" middleware ${M.relation} "${M.toMiddleware}" middleware.`);s.splice(i,1)}}for(let k of l)w.add(k)}s.push(M)},clone:()=>I(rF()),use:(L)=>{L.applyToStack(A)},remove:(L)=>{if(typeof L==="string")return E(L);else return $(L)},removeByTag:(L)=>{let S=!1;const z=Qf((Z)=>{const{tags:N,name:M,aliases:l}=Z;if(N&&N.includes(L)){const k=Xw(M,l);for(let i of k)w.delete(i);return S=!0,!1}return!0},"filterCb");return r=r.filter(z),s=s.filter(z),S},concat:(L)=>{var S;const z=I(rF());return z.use(L),z.identifyOnResolve(f||z.identifyOnResolve()||(((S=L.identifyOnResolve)==null?void 0:S.call(L))??!1)),z},applyToStack:I,identify:()=>{return U(!0).map((L)=>{const S=L.step??L.relation+" "+L.toMiddleware;return i0(L.name,L.aliases)+" - "+S})},identifyOnResolve(L){if(typeof L==="boolean")f=L;return f},resolve:(L,S)=>{for(let z of U().map((Z)=>Z.middleware).reverse())L=z(L,S);if(f)console.log(A.identify());return L}};return A},"constructStack"),tR={initialize:5,serialize:4,build:3,finalizeRequest:2,deserialize:1},rC={high:3,normal:2,low:1}});var fF=O((crr,EC)=>{var{defineProperty:H$,getOwnPropertyDescriptor:Rj,getOwnPropertyNames:Cj}=Object,Wj=Object.prototype.hasOwnProperty,zj=(r,s)=>H$(r,"name",{value:s,configurable:!0}),Sj=(r,s)=>{for(var f in s)H$(r,f,{get:s[f],enumerable:!0})},Yj=(r,s,f,w)=>{if(s&&typeof s==="object"||typeof s==="function"){for(let h of Cj(s))if(!Wj.call(r,h)&&h!==f)H$(r,h,{get:()=>s[h],enumerable:!(w=Rj(s,h))||w.enumerable})}return r},Xj=(r)=>Yj(H$({},"__esModule",{value:!0}),r),hC={};Sj(hC,{isArrayBuffer:()=>Kj});EC.exports=Xj(hC);var Kj=zj((r)=>typeof ArrayBuffer==="function"&&r instanceof ArrayBuffer||Object.prototype.toString.call(r)==="[object ArrayBuffer]","isArrayBuffer")});var S1=O((brr,FC)=>{var{defineProperty:l$,getOwnPropertyDescriptor:Zj,getOwnPropertyNames:Pj}=Object,Jj=Object.prototype.hasOwnProperty,$C=(r,s)=>l$(r,"name",{value:s,configurable:!0}),Qj=(r,s)=>{for(var f in s)l$(r,f,{get:s[f],enumerable:!0})},Bj=(r,s,f,w)=>{if(s&&typeof s==="object"||typeof s==="function"){for(let h of Pj(s))if(!Jj.call(r,h)&&h!==f)l$(r,h,{get:()=>s[h],enumerable:!(w=Zj(s,h))||w.enumerable})}return r},Mj=(r)=>Bj(l$({},"__esModule",{value:!0}),r),IC={};Qj(IC,{fromArrayBuffer:()=>Hj,fromString:()=>lj});FC.exports=Mj(IC);var Vj=fF(),sF=import.meta.require("buffer"),Hj=$C((r,s=0,f=r.byteLength-s)=>{if(!Vj.isArrayBuffer(r))throw new TypeError(`The "input" argument must be ArrayBuffer. Received type ${typeof r} (${r})`);return sF.Buffer.from(r,s,f)},"fromArrayBuffer"),lj=$C((r,s)=>{if(typeof r!=="string")throw new TypeError(`The "input" argument must be of type string. Received type ${typeof r} (${r})`);return s?sF.Buffer.from(r,s):sF.Buffer.from(r)},"fromString")});var GC=O((UC)=>{Object.defineProperty(UC,"__esModule",{value:!0});UC.fromBase64=void 0;var Dj=S1(),kj=/^[A-Za-z0-9+/]*={0,2}$/,yj=(r)=>{if(r.length*3%4!==0)throw new TypeError("Incorrect padding on base64 string.");if(!kj.exec(r))throw new TypeError("Invalid base64 string.");const s=Dj.fromString(r,"base64");return new Uint8Array(s.buffer,s.byteOffset,s.byteLength)};UC.fromBase64=yj});var O0=O((grr,CC)=>{var{defineProperty:D$,getOwnPropertyDescriptor:Nj,getOwnPropertyNames:qj}=Object,mj=Object.prototype.hasOwnProperty,wF=(r,s)=>D$(r,"name",{value:s,configurable:!0}),jj=(r,s)=>{for(var f in s)D$(r,f,{get:s[f],enumerable:!0})},vj=(r,s,f,w)=>{if(s&&typeof s==="object"||typeof s==="function"){for(let h of qj(s))if(!mj.call(r,h)&&h!==f)D$(r,h,{get:()=>s[h],enumerable:!(w=Nj(s,h))||w.enumerable})}return r},ij=(r)=>vj(D$({},"__esModule",{value:!0}),r),AC={};jj(AC,{fromUtf8:()=>RC,toUint8Array:()=>Oj,toUtf8:()=>dj});CC.exports=ij(AC);var LC=S1(),RC=wF((r)=>{const s=LC.fromString(r,"utf8");return new Uint8Array(s.buffer,s.byteOffset,s.byteLength/Uint8Array.BYTES_PER_ELEMENT)},"fromUtf8"),Oj=wF((r)=>{if(typeof r==="string")return RC(r);if(ArrayBuffer.isView(r))return new Uint8Array(r.buffer,r.byteOffset,r.byteLength/Uint8Array.BYTES_PER_ELEMENT);return new Uint8Array(r)},"toUint8Array"),dj=wF((r)=>{if(typeof r==="string")return r;if(typeof r!=="object"||typeof r.byteOffset!=="number"||typeof r.byteLength!=="number")throw new Error("@smithy/util-utf8: toUtf8 encoder function only accepts string | Uint8Array.");return LC.fromArrayBuffer(r.buffer,r.byteOffset,r.byteLength).toString("utf8")},"toUtf8")});var SC=O((WC)=>{Object.defineProperty(WC,"__esModule",{value:!0});WC.toBase64=void 0;var cj=S1(),bj=O0(),_j=(r)=>{let s;if(typeof r==="string")s=bj.fromUtf8(r);else s=r;if(typeof s!=="object"||typeof s.byteOffset!=="number"||typeof s.byteLength!=="number")throw new Error("@smithy/util-base64: toBase64 encoder function only accepts string | Uint8Array.");return cj.fromArrayBuffer(s.buffer,s.byteOffset,s.byteLength).toString("base64")};WC.toBase64=_j});var y$=O((err,k$)=>{var{defineProperty:YC,getOwnPropertyDescriptor:gj,getOwnPropertyNames:xj}=Object,ej=Object.prototype.hasOwnProperty,hF=(r,s,f,w)=>{if(s&&typeof s==="object"||typeof s==="function"){for(let h of xj(s))if(!ej.call(r,h)&&h!==f)YC(r,h,{get:()=>s[h],enumerable:!(w=gj(s,h))||w.enumerable})}return r},XC=(r,s,f)=>(hF(r,s,"default"),f&&hF(f,s,"default")),nj=(r)=>hF(YC({},"__esModule",{value:!0}),r),EF={};k$.exports=nj(EF);XC(EF,GC(),k$.exports);XC(EF,SC(),k$.exports)});var PC=O((KC)=>{Object.defineProperty(KC,"__esModule",{value:!0});KC.getAwsChunkedEncodingStream=void 0;var oj=import.meta.require("stream"),aj=(r,s)=>{const{base64Encoder:f,bodyLengthChecker:w,checksumAlgorithmFn:h,checksumLocationName:E,streamHasher:$}=s,I=f!==void 0&&h!==void 0&&E!==void 0&&$!==void 0,F=I?$(h,r):void 0,U=new oj.Readable({read:()=>{}});return r.on("data",(A)=>{const L=w(A)||0;U.push(`${L.toString(16)}\r\n`),U.push(A),U.push("\r\n")}),r.on("end",async()=>{if(U.push("0\r\n"),I){const A=f(await F);U.push(`${E}:${A}\r\n`),U.push("\r\n")}U.push(null)}),U};KC.getAwsChunkedEncodingStream=aj});var IF=O((orr,BC)=>{var{defineProperty:N$,getOwnPropertyDescriptor:pj,getOwnPropertyNames:uj}=Object,tj=Object.prototype.hasOwnProperty,$F=(r,s)=>N$(r,"name",{value:s,configurable:!0}),rv=(r,s)=>{for(var f in s)N$(r,f,{get:s[f],enumerable:!0})},fv=(r,s,f,w)=>{if(s&&typeof s==="object"||typeof s==="function"){for(let h of uj(s))if(!tj.call(r,h)&&h!==f)N$(r,h,{get:()=>s[h],enumerable:!(w=pj(s,h))||w.enumerable})}return r},sv=(r)=>fv(N$({},"__esModule",{value:!0}),r),JC={};rv(JC,{escapeUri:()=>QC,escapeUriPath:()=>hv});BC.exports=sv(JC);var QC=$F((r)=>encodeURIComponent(r).replace(/[!'()*]/g,wv),"escapeUri"),wv=$F((r)=>`%${r.charCodeAt(0).toString(16).toUpperCase()}`,"hexEncode"),hv=$F((r)=>r.split("/").map(QC).join("/"),"escapeUriPath")});var UF=O((arr,HC)=>{function VC(r){const s=[];for(let f of Object.keys(r).sort()){const w=r[f];if(f=FF.escapeUri(f),Array.isArray(w))for(let h=0,E=w.length;h<E;h++)s.push(`${f}=${FF.escapeUri(w[h])}`);else{let h=f;if(w||typeof w==="string")h+=`=${FF.escapeUri(w)}`;s.push(h)}}return s.join("&")}var{defineProperty:q$,getOwnPropertyDescriptor:Ev,getOwnPropertyNames:$v}=Object,Iv=Object.prototype.hasOwnProperty,Fv=(r,s)=>q$(r,"name",{value:s,configurable:!0}),Uv=(r,s)=>{for(var f in s)q$(r,f,{get:s[f],enumerable:!0})},Tv=(r,s,f,w)=>{if(s&&typeof s==="object"||typeof s==="function"){for(let h of $v(s))if(!Iv.call(r,h)&&h!==f)q$(r,h,{get:()=>s[h],enumerable:!(w=Ev(s,h))||w.enumerable})}return r},Gv=(r)=>Tv(q$({},"__esModule",{value:!0}),r),MC={};Uv(MC,{buildQueryString:()=>VC});HC.exports=Gv(MC);var FF=IF();Fv(VC,"buildQueryString")});var nC=O((prr,eC)=>{async function AF(r,s,f=kC){const w=s.headers??{},h=w.Expect||w.expect;let E=-1,$=!1;if(h==="100-continue")await Promise.race([new Promise((I)=>{E=Number(setTimeout(I,Math.max(kC,f)))}),new Promise((I)=>{r.on("continue",()=>{clearTimeout(E),I()}),r.on("error",()=>{$=!0,clearTimeout(E),I()})})]);if(!$)OC(r,s.body)}function OC(r,s){if(s instanceof iC.Readable){s.pipe(r);return}if(s){if(Buffer.isBuffer(s)||typeof s==="string"){r.end(s);return}const f=s;if(typeof f==="object"&&f.buffer&&typeof f.byteOffset==="number"&&typeof f.byteLength==="number"){r.end(Buffer.from(f.buffer,f.byteOffset,f.byteLength));return}r.end(Buffer.from(s));return}r.end()}async function xC(r){const s=[],f=r.getReader();let w=!1,h=0;while(!w){const{done:I,value:F}=await f.read();if(F)s.push(F),h+=F.length;w=I}const E=new Uint8Array(h);let $=0;for(let I of s)E.set(I,$),$+=I.length;return E}var{create:Av,defineProperty:Y1,getOwnPropertyDescriptor:Lv,getOwnPropertyNames:Rv,getPrototypeOf:Cv}=Object,Wv=Object.prototype.hasOwnProperty,Rr=(r,s)=>Y1(r,"name",{value:s,configurable:!0}),zv=(r,s)=>{for(var f in s)Y1(r,f,{get:s[f],enumerable:!0})},NC=(r,s,f,w)=>{if(s&&typeof s==="object"||typeof s==="function"){for(let h of Rv(s))if(!Wv.call(r,h)&&h!==f)Y1(r,h,{get:()=>s[h],enumerable:!(w=Lv(s,h))||w.enumerable})}return r},Sv=(r,s,f)=>(f=r!=null?Av(Cv(r)):{},NC(s||!r||!r.__esModule?Y1(f,"default",{value:r,enumerable:!0}):f,r)),Yv=(r)=>NC(Y1({},"__esModule",{value:!0}),r),qC={};zv(qC,{DEFAULT_REQUEST_TIMEOUT:()=>Qv,NodeHttp2Handler:()=>lv,NodeHttpHandler:()=>Bv,streamCollector:()=>kv});eC.exports=Yv(qC);var mC=L0(),jC=UF(),TF=import.meta.require("http"),GF=import.meta.require("https"),Xv=["ECONNRESET","EPIPE","ETIMEDOUT"],vC=Rr((r)=>{const s={};for(let f of Object.keys(r)){const w=r[f];s[f]=Array.isArray(w)?w.join(","):w}return s},"getTransformedHeaders"),lC=1000,Kv=Rr((r,s,f=0)=>{if(!f)return-1;const w=Rr((h)=>{const E=setTimeout(()=>{r.destroy(),s(Object.assign(new Error(`Socket timed out without establishing a connection within ${f} ms`),{name:"TimeoutError"}))},f-h),$=Rr((I)=>{if(I==null?void 0:I.connecting)I.on("connect",()=>{clearTimeout(E)});else clearTimeout(E)},"doWithSocket");if(r.socket)$(r.socket);else r.on("socket",$)},"registerTimeout");if(f<2000)return w(0),0;return setTimeout(w.bind(null,lC),lC)},"setConnectionTimeout"),Zv=3000,Pv=Rr((r,{keepAlive:s,keepAliveMsecs:f},w=Zv)=>{if(s!==!0)return-1;const h=Rr(()=>{if(r.socket)r.socket.setKeepAlive(s,f||0);else r.on("socket",(E)=>{E.setKeepAlive(s,f||0)})},"registerListener");if(w===0)return h(),0;return setTimeout(h,w)},"setSocketKeepAlive"),DC=3000,Jv=Rr((r,s,f=0)=>{const w=Rr((h)=>{r.setTimeout(f-h,()=>{r.destroy(),s(Object.assign(new Error(`Connection timed out after ${f} ms`),{name:"TimeoutError"}))})},"registerTimeout");if(0<f&&f<6000)return w(0),0;return setTimeout(w.bind(null,f===0?0:DC),DC)},"setSocketTimeout"),iC=import.meta.require("stream"),kC=1000;Rr(AF,"writeRequestBody");Rr(OC,"writeBody");var Qv=0,dC=class r{constructor(s){this.socketWarningTimestamp=0,this.metadata={handlerProtocol:"http/1.1"},this.configProvider=new Promise((f,w)=>{if(typeof s==="function")s().then((h)=>{f(this.resolveDefaultConfig(h))}).catch(w);else f(this.resolveDefaultConfig(s))})}static create(s){if(typeof(s==null?void 0:s.handle)==="function")return s;return new r(s)}static checkSocketUsage(s,f,w=console){var h,E,$;const{sockets:I,requests:F,maxSockets:U}=s;if(typeof U!=="number"||U===1/0)return f;const A=15000;if(Date.now()-A<f)return f;if(I&&F)for(let L in I){const S=((h=I[L])==null?void 0:h.length)??0,z=((E=F[L])==null?void 0:E.length)??0;if(S>=U&&z>=2*U)return($=w==null?void 0:w.warn)==null||$.call(w,`@smithy/node-http-handler:WARN - socket usage at capacity=${S} and ${z} additional requests are enqueued.
3
3
  See https://docs.aws.amazon.com/sdk-for-javascript/v3/developer-guide/node-configuring-maxsockets.html
4
- or increase socketAcquisitionWarningTimeout=(millis) in the NodeHttpHandler config.`),Date.now()}return s}resolveDefaultConfig(f){const{requestTimeout:s,connectionTimeout:w,socketTimeout:h,httpAgent:E,httpsAgent:$}=f||{};return{connectionTimeout:w,requestTimeout:s??h,httpAgent:(()=>{if(E instanceof L5.Agent||typeof(E==null?void 0:E.destroy)==="function")return E;return new L5.Agent({keepAlive:!0,maxSockets:50,...E})})(),httpsAgent:(()=>{if($ instanceof A5.Agent||typeof($==null?void 0:$.destroy)==="function")return $;return new A5.Agent({keepAlive:!0,maxSockets:50,...$})})(),logger:console}}destroy(){var f,s,w,h;(s=(f=this.config)==null?void 0:f.httpAgent)==null||s.destroy(),(h=(w=this.config)==null?void 0:w.httpsAgent)==null||h.destroy()}async handle(f,{abortSignal:s}={}){if(!this.config)this.config=await this.configProvider;let w;return new Promise((h,E)=>{let $=void 0;const I=Jr(async(N)=>{await $,clearTimeout(w),h(N)},"resolve"),F=Jr(async(N)=>{await $,clearTimeout(w),E(N)},"reject");if(!this.config)throw new Error("Node HTTP request handler config is not resolved");if(s==null?void 0:s.aborted){const N=new Error("Request aborted");N.name="AbortError",F(N);return}const U=f.protocol==="https:",C=U?this.config.httpsAgent:this.config.httpAgent;w=setTimeout(()=>{this.socketWarningTimestamp=r.checkSocketUsage(C,this.socketWarningTimestamp,this.config.logger)},this.config.socketAcquisitionWarningTimeout??(this.config.requestTimeout??2000)+(this.config.connectionTimeout??1000));const L=Bz.buildQueryString(f.query||{});let z=void 0;if(f.username!=null||f.password!=null){const N=f.username??"",x=f.password??"";z=`${N}:${x}`}let S=f.path;if(L)S+=`?${L}`;if(f.fragment)S+=`#${f.fragment}`;const K={headers:f.headers,host:f.hostname,method:f.method,path:S,port:f.port,agent:C,auth:z},l=(U?A5.request:L5.request)(K,(N)=>{const x=new Qz.HttpResponse({statusCode:N.statusCode||-1,reason:N.statusMessage,headers:lz(N.headers),body:N});I({response:x})});if(l.on("error",(N)=>{if(Tv.includes(N.code))F(Object.assign(N,{name:"TimeoutError"}));else F(N)}),Gv(l,F,this.config.connectionTimeout),Lv(l,F,this.config.requestTimeout),s){const N=Jr(()=>{l.destroy();const x=new Error("Request aborted");x.name="AbortError",F(x)},"onAbort");if(typeof s.addEventListener==="function"){const x=s;x.addEventListener("abort",N,{once:!0}),l.once("close",()=>x.removeEventListener("abort",N))}else s.onabort=N}const Q=K.agent;if(typeof Q==="object"&&"keepAlive"in Q)Cv(l,{keepAlive:Q.keepAlive,keepAliveMsecs:Q.keepAliveMsecs});$=R5(l,f,this.config.requestTimeout).catch((N)=>{return clearTimeout(w),E(N)})})}updateHttpClientConfig(f,s){this.config=void 0,this.configProvider=this.configProvider.then((w)=>{return{...w,[f]:s}})}httpHandlerConfigs(){return this.config??{}}};Jr(Dz,"NodeHttpHandler");var Rv=Dz,Zz=import.meta.require("http2"),Wv=Fv(import.meta.require("http2")),kz=class r{constructor(f){this.sessions=[],this.sessions=f??[]}poll(){if(this.sessions.length>0)return this.sessions.shift()}offerLast(f){this.sessions.push(f)}contains(f){return this.sessions.includes(f)}remove(f){this.sessions=this.sessions.filter((s)=>s!==f)}[Symbol.iterator](){return this.sessions[Symbol.iterator]()}destroy(f){for(let s of this.sessions)if(s===f){if(!s.destroyed)s.destroy()}}};Jr(kz,"NodeHttp2ConnectionPool");var zv=kz,Nz=class r{constructor(f){if(this.sessionCache=new Map,this.config=f,this.config.maxConcurrency&&this.config.maxConcurrency<=0)throw new RangeError("maxConcurrency must be greater than zero.")}lease(f,s){const w=this.getUrlString(f),h=this.sessionCache.get(w);if(h){const F=h.poll();if(F&&!this.config.disableConcurrency)return F}const E=Wv.default.connect(w);if(this.config.maxConcurrency)E.settings({maxConcurrentStreams:this.config.maxConcurrency},(F)=>{if(F)throw new Error("Fail to set maxConcurrentStreams to "+this.config.maxConcurrency+"when creating new session for "+f.destination.toString())});E.unref();const $=Jr(()=>{E.destroy(),this.deleteSession(w,E)},"destroySessionCb");if(E.on("goaway",$),E.on("error",$),E.on("frameError",$),E.on("close",()=>this.deleteSession(w,E)),s.requestTimeout)E.setTimeout(s.requestTimeout,$);const I=this.sessionCache.get(w)||new zv;return I.offerLast(E),this.sessionCache.set(w,I),E}deleteSession(f,s){const w=this.sessionCache.get(f);if(!w)return;if(!w.contains(s))return;w.remove(s),this.sessionCache.set(f,w)}release(f,s){var w;const h=this.getUrlString(f);(w=this.sessionCache.get(h))==null||w.offerLast(s)}destroy(){for(let[f,s]of this.sessionCache){for(let w of s){if(!w.destroyed)w.destroy();s.remove(w)}this.sessionCache.delete(f)}}setMaxConcurrentStreams(f){if(this.config.maxConcurrency&&this.config.maxConcurrency<=0)throw new RangeError("maxConcurrentStreams must be greater than zero.");this.config.maxConcurrency=f}setDisableConcurrentStreams(f){this.config.disableConcurrency=f}getUrlString(f){return f.destination.toString()}};Jr(Nz,"NodeHttp2ConnectionManager");var Sv=Nz,yz=class r{constructor(f){this.metadata={handlerProtocol:"h2"},this.connectionManager=new Sv({}),this.configProvider=new Promise((s,w)=>{if(typeof f==="function")f().then((h)=>{s(h||{})}).catch(w);else s(f||{})})}static create(f){if(typeof(f==null?void 0:f.handle)==="function")return f;return new r(f)}destroy(){this.connectionManager.destroy()}async handle(f,{abortSignal:s}={}){if(!this.config){if(this.config=await this.configProvider,this.connectionManager.setDisableConcurrentStreams(this.config.disableConcurrentStreams||!1),this.config.maxConcurrentStreams)this.connectionManager.setMaxConcurrentStreams(this.config.maxConcurrentStreams)}const{requestTimeout:w,disableConcurrentStreams:h}=this.config;return new Promise((E,$)=>{var I;let F=!1,U=void 0;const C=Jr(async(Mr)=>{await U,E(Mr)},"resolve"),L=Jr(async(Mr)=>{await U,$(Mr)},"reject");if(s==null?void 0:s.aborted){F=!0;const Mr=new Error("Request aborted");Mr.name="AbortError",L(Mr);return}const{hostname:z,method:S,port:K,protocol:k,query:l}=f;let Q="";if(f.username!=null||f.password!=null){const Mr=f.username??"",xs=f.password??"";Q=`${Mr}:${xs}@`}const N=`${k}//${Q}${z}${K?`:${K}`:""}`,x={destination:new URL(N)},e=this.connectionManager.lease(x,{requestTimeout:(I=this.config)==null?void 0:I.sessionTimeout,disableConcurrentStreams:h||!1}),hr=Jr((Mr)=>{if(h)this.destroySession(e);F=!0,L(Mr)},"rejectWithDestroy"),Dr=Bz.buildQueryString(l||{});let Tw=f.path;if(Dr)Tw+=`?${Dr}`;if(f.fragment)Tw+=`#${f.fragment}`;const Ps=e.request({...f.headers,[Zz.constants.HTTP2_HEADER_PATH]:Tw,[Zz.constants.HTTP2_HEADER_METHOD]:S});if(e.ref(),Ps.on("response",(Mr)=>{const xs=new Qz.HttpResponse({statusCode:Mr[":status"]||-1,headers:lz(Mr),body:Ps});if(F=!0,C({response:xs}),h)e.close(),this.connectionManager.deleteSession(N,e)}),w)Ps.setTimeout(w,()=>{Ps.close();const Mr=new Error(`Stream timed out because of no activity for ${w} ms`);Mr.name="TimeoutError",hr(Mr)});if(s){const Mr=Jr(()=>{Ps.close();const xs=new Error("Request aborted");xs.name="AbortError",hr(xs)},"onAbort");if(typeof s.addEventListener==="function"){const xs=s;xs.addEventListener("abort",Mr,{once:!0}),Ps.once("close",()=>xs.removeEventListener("abort",Mr))}else s.onabort=Mr}Ps.on("frameError",(Mr,xs,WD)=>{hr(new Error(`Frame type id ${Mr} in stream id ${WD} has failed with code ${xs}.`))}),Ps.on("error",hr),Ps.on("aborted",()=>{hr(new Error(`HTTP/2 stream is abnormally aborted in mid-communication with result code ${Ps.rstCode}.`))}),Ps.on("close",()=>{if(e.unref(),h)e.destroy();if(!F)hr(new Error("Unexpected error: http2 request did not get a response"))}),U=R5(Ps,f,w)})}updateHttpClientConfig(f,s){this.config=void 0,this.configProvider=this.configProvider.then((w)=>{return{...w,[f]:s}})}httpHandlerConfigs(){return this.config??{}}destroySession(f){if(!f.destroyed)f.destroy()}};Jr(yz,"NodeHttp2Handler");var Pv=yz,qz=class r extends Vz.Writable{constructor(){super(...arguments);this.bufferedBytes=[]}_write(f,s,w){this.bufferedBytes.push(f),w()}};Jr(qz,"Collector");var Xv=qz,Yv=Jr((r)=>{if(Kv(r))return mz(r);return new Promise((f,s)=>{const w=new Xv;r.pipe(w),r.on("error",(h)=>{w.end(),s(h)}),w.on("error",s),w.on("finish",function(){const h=new Uint8Array(Buffer.concat(this.bufferedBytes));f(h)})})},"streamCollector"),Kv=Jr((r)=>typeof ReadableStream==="function"&&r instanceof ReadableStream,"isReadableStreamInstance");Jr(mz,"collectReadableStream")});var ez=j((h0r,xz)=>{function Oz(r=0){return new Promise((f,s)=>{if(r)setTimeout(()=>{const w=new Error(`Request did not complete within ${r} ms`);w.name="TimeoutError",s(w)},r)})}async function cz(r){const f=await gz(r),s=Dv.fromBase64(f);return new Uint8Array(s)}async function _z(r){const f=[],s=r.getReader();let w=!1,h=0;while(!w){const{done:I,value:F}=await s.read();if(F)f.push(F),h+=F.length;w=I}const E=new Uint8Array(h);let $=0;for(let I of f)E.set(I,$),$+=I.length;return E}function gz(r){return new Promise((f,s)=>{const w=new FileReader;w.onloadend=()=>{if(w.readyState!==2)return s(new Error("Reader aborted too early"));const h=w.result??"",E=h.indexOf(","),$=E>-1?E+1:h.length;f(h.substring($))},w.onabort=()=>s(new Error("Read aborted")),w.onerror=()=>s(w.error),w.readAsDataURL(r)})}var{defineProperty:b$,getOwnPropertyDescriptor:Zv,getOwnPropertyNames:Mv}=Object,Jv=Object.prototype.hasOwnProperty,C0=(r,f)=>b$(r,"name",{value:f,configurable:!0}),Qv=(r,f)=>{for(var s in f)b$(r,s,{get:f[s],enumerable:!0})},Bv=(r,f,s,w)=>{if(f&&typeof f==="object"||typeof f==="function"){for(let h of Mv(f))if(!Jv.call(r,h)&&h!==s)b$(r,h,{get:()=>f[h],enumerable:!(w=Zv(f,h))||w.enumerable})}return r},lv=(r)=>Bv(b$({},"__esModule",{value:!0}),r),dz={};Qv(dz,{FetchHttpHandler:()=>Hv,keepAliveSupport:()=>O$,streamCollector:()=>kv});xz.exports=lv(dz);var iz=T0(),Vv=C5();C0(Oz,"requestTimeout");var O$={supported:void 0},bz=class r{static create(f){if(typeof(f==null?void 0:f.handle)==="function")return f;return new r(f)}constructor(f){if(typeof f==="function")this.configProvider=f().then((s)=>s||{});else this.config=f??{},this.configProvider=Promise.resolve(this.config);if(O$.supported===void 0)O$.supported=Boolean(typeof Request!=="undefined"&&"keepalive"in new Request("https://[::1]"))}destroy(){}async handle(f,{abortSignal:s}={}){if(!this.config)this.config=await this.configProvider;const w=this.config.requestTimeout,h=this.config.keepAlive===!0,E=this.config.credentials;if(s==null?void 0:s.aborted){const Q=new Error("Request aborted");return Q.name="AbortError",Promise.reject(Q)}let $=f.path;const I=Vv.buildQueryString(f.query||{});if(I)$+=`?${I}`;if(f.fragment)$+=`#${f.fragment}`;let F="";if(f.username!=null||f.password!=null){const Q=f.username??"",N=f.password??"";F=`${Q}:${N}@`}const{port:U,method:C}=f,L=`${f.protocol}//${F}${f.hostname}${U?`:${U}`:""}${$}`,z=C==="GET"||C==="HEAD"?void 0:f.body,S={body:z,headers:new Headers(f.headers),method:C,credentials:E};if(z)S.duplex="half";if(typeof AbortController!=="undefined")S.signal=s;if(O$.supported)S.keepalive=h;let K=C0(()=>{},"removeSignalEventListener");const k=new Request(L,S),l=[fetch(k).then((Q)=>{const N=Q.headers,x={};for(let hr of N.entries())x[hr[0]]=hr[1];if(Q.body==null)return Q.blob().then((hr)=>({response:new iz.HttpResponse({headers:x,reason:Q.statusText,statusCode:Q.status,body:hr})}));return{response:new iz.HttpResponse({headers:x,reason:Q.statusText,statusCode:Q.status,body:Q.body})}}),Oz(w)];if(s)l.push(new Promise((Q,N)=>{const x=C0(()=>{const e=new Error("Request aborted");e.name="AbortError",N(e)},"onAbort");if(typeof s.addEventListener==="function"){const e=s;e.addEventListener("abort",x,{once:!0}),K=C0(()=>e.removeEventListener("abort",x),"removeSignalEventListener")}else s.onabort=x}));return Promise.race(l).finally(K)}updateHttpClientConfig(f,s){this.config=void 0,this.configProvider=this.configProvider.then((w)=>{return w[f]=s,w})}httpHandlerConfigs(){return this.config??{}}};C0(bz,"FetchHttpHandler");var Hv=bz,Dv=j$(),kv=C0((r)=>{if(typeof Blob==="function"&&r instanceof Blob)return cz(r);return _z(r)},"streamCollector");C0(cz,"collectBlob");C0(_z,"collectStream");C0(gz,"readToBase64")});var z5=j((E0r,tz)=>{function pz(r){if(r.length%2!==0)throw new Error("Hex encoded strings must have an even number length");const f=new Uint8Array(r.length/2);for(let s=0;s<r.length;s+=2){const w=r.slice(s,s+2).toLowerCase();if(w in W5)f[s/2]=W5[w];else throw new Error(`Cannot decode unrecognized sequence ${w} as hexadecimal`)}return f}function uz(r){let f="";for(let s=0;s<r.byteLength;s++)f+=az[r[s]];return f}var{defineProperty:c$,getOwnPropertyDescriptor:Nv,getOwnPropertyNames:yv}=Object,qv=Object.prototype.hasOwnProperty,nz=(r,f)=>c$(r,"name",{value:f,configurable:!0}),mv=(r,f)=>{for(var s in f)c$(r,s,{get:f[s],enumerable:!0})},vv=(r,f,s,w)=>{if(f&&typeof f==="object"||typeof f==="function"){for(let h of yv(f))if(!qv.call(r,h)&&h!==s)c$(r,h,{get:()=>f[h],enumerable:!(w=Nv(f,h))||w.enumerable})}return r},jv=(r)=>vv(c$({},"__esModule",{value:!0}),r),oz={};mv(oz,{fromHex:()=>pz,toHex:()=>uz});tz.exports=jv(oz);var az={},W5={};for(let r=0;r<256;r++){let f=r.toString(16).toLowerCase();if(f.length===1)f=`0${f}`;az[r]=f,W5[f]=r}nz(pz,"fromHex");nz(uz,"toHex")});var P1=j((r8)=>{Object.defineProperty(r8,"__esModule",{value:!0});r8.isReadableStream=void 0;var iv=(r)=>{var f;return typeof ReadableStream==="function"&&(((f=r===null||r===void 0?void 0:r.constructor)===null||f===void 0?void 0:f.name)===ReadableStream.name||r instanceof ReadableStream)};r8.isReadableStream=iv});var I8=j((E8)=>{Object.defineProperty(E8,"__esModule",{value:!0});E8.sdkStreamMixin=void 0;var dv=ez(),Ov=j$(),bv=z5(),cv=y0(),f8=P1(),w8="The stream has already been transformed.",_v=(r)=>{var f,s;if(!h8(r)&&!f8.isReadableStream(r)){const $=((s=(f=r===null||r===void 0?void 0:r.__proto__)===null||f===void 0?void 0:f.constructor)===null||s===void 0?void 0:s.name)||r;throw new Error(`Unexpected stream implementation, expect Blob or ReadableStream, got ${$}`)}let w=!1;const h=async()=>{if(w)throw new Error(w8);return w=!0,await dv.streamCollector(r)},E=($)=>{if(typeof $.stream!=="function")throw new Error("Cannot transform payload Blob to web stream. Please make sure the Blob.stream() is polyfilled.\nIf you are using React Native, this API is not yet supported, see: https://react-native.canny.io/feature-requests/p/fetch-streaming-body");return $.stream()};return Object.assign(r,{transformToByteArray:h,transformToString:async($)=>{const I=await h();if($==="base64")return Ov.toBase64(I);else if($==="hex")return bv.toHex(I);else if($===void 0||$==="utf8"||$==="utf-8")return cv.toUtf8(I);else if(typeof TextDecoder==="function")return new TextDecoder($).decode(I);else throw new Error("TextDecoder is not available, please make sure polyfill is provided.")},transformToWebStream:()=>{if(w)throw new Error(w8);if(w=!0,h8(r))return E(r);else if(f8.isReadableStream(r))return r;else throw new Error(`Cannot transform payload to web stream, got ${r}`)}})};E8.sdkStreamMixin=_v;var h8=(r)=>typeof Blob==="function"&&r instanceof Blob});var G8=j((U8)=>{Object.defineProperty(U8,"__esModule",{value:!0});U8.sdkStreamMixin=void 0;var gv=jz(),xv=z1(),S5=import.meta.require("stream"),ev=import.meta.require("util"),nv=I8(),F8="The stream has already been transformed.",ov=(r)=>{var f,s;if(!(r instanceof S5.Readable))try{return nv.sdkStreamMixin(r)}catch(E){const $=((s=(f=r===null||r===void 0?void 0:r.__proto__)===null||f===void 0?void 0:f.constructor)===null||s===void 0?void 0:s.name)||r;throw new Error(`Unexpected stream implementation, expect Stream.Readable instance, got ${$}`)}let w=!1;const h=async()=>{if(w)throw new Error(F8);return w=!0,await gv.streamCollector(r)};return Object.assign(r,{transformToByteArray:h,transformToString:async(E)=>{const $=await h();if(E===void 0||Buffer.isEncoding(E))return xv.fromArrayBuffer($.buffer,$.byteOffset,$.byteLength).toString(E);else return new ev.TextDecoder(E).decode($)},transformToWebStream:()=>{if(w)throw new Error(F8);if(r.readableFlowing!==null)throw new Error("The stream has been consumed by other callbacks.");if(typeof S5.Readable.toWeb!=="function")throw new Error("Readable.toWeb() is not supported. Please make sure you are using Node.js >= 17.0.0, or polyfill is available.");return w=!0,S5.Readable.toWeb(r)}})};U8.sdkStreamMixin=ov});var A8=j((C8)=>{async function av(r){if(typeof r.stream==="function")r=r.stream();return r.tee()}Object.defineProperty(C8,"__esModule",{value:!0});C8.splitStream=void 0;C8.splitStream=av});var S8=j((W8)=>{async function tv(r){if(uv.isReadableStream(r))return pv.splitStream(r);const f=new R8.PassThrough,s=new R8.PassThrough;return r.pipe(f),r.pipe(s),[f,s]}Object.defineProperty(W8,"__esModule",{value:!0});W8.splitStream=void 0;var R8=import.meta.require("stream"),pv=A8(),uv=P1();W8.splitStream=tv});var Y8=j((P8)=>{async function rj(r,f){var s;let w=0;const h=[],E=r.getReader();let $=!1;while(!$){const{done:U,value:C}=await E.read();if(C)h.push(C),w+=(s=C===null||C===void 0?void 0:C.byteLength)!==null&&s!==void 0?s:0;if(w>=f)break;$=U}E.releaseLock();const I=new Uint8Array(Math.min(f,w));let F=0;for(let U of h){if(U.byteLength>I.byteLength-F){I.set(U.subarray(0,I.byteLength-F),F);break}else I.set(U,F);F+=U.length}return I}Object.defineProperty(P8,"__esModule",{value:!0});P8.headStream=void 0;P8.headStream=rj});var J8=j((Z8)=>{Object.defineProperty(Z8,"__esModule",{value:!0});Z8.headStream=void 0;var sj=import.meta.require("stream"),fj=Y8(),wj=P1(),hj=(r,f)=>{if(wj.isReadableStream(r))return fj.headStream(r,f);return new Promise((s,w)=>{const h=new K8;h.limit=f,r.pipe(h),r.on("error",(E)=>{h.end(),w(E)}),h.on("error",w),h.on("finish",function(){const E=new Uint8Array(Buffer.concat(this.buffers));s(E)})})};Z8.headStream=hj;class K8 extends sj.Writable{constructor(){super(...arguments);this.buffers=[],this.limit=1/0,this.bytesBuffered=0}_write(r,f,s){var w;if(this.buffers.push(r),this.bytesBuffered+=(w=r.byteLength)!==null&&w!==void 0?w:0,this.bytesBuffered>=this.limit){const h=this.bytesBuffered-this.limit,E=this.buffers[this.buffers.length-1];this.buffers[this.buffers.length-1]=E.subarray(0,E.byteLength-h),this.emit("finish")}s()}}});var g$=j((L0r,zw)=>{function l8(r,f="utf-8"){if(f==="base64")return Q8.toBase64(r);return B8.toUtf8(r)}function V8(r,f){if(f==="base64")return X5.mutate(Q8.fromBase64(r));return X5.mutate(B8.fromUtf8(r))}var{defineProperty:_$,getOwnPropertyDescriptor:Ej,getOwnPropertyNames:$j}=Object,Ij=Object.prototype.hasOwnProperty,Y5=(r,f)=>_$(r,"name",{value:f,configurable:!0}),Fj=(r,f)=>{for(var s in f)_$(r,s,{get:f[s],enumerable:!0})},P5=(r,f,s,w)=>{if(f&&typeof f==="object"||typeof f==="function"){for(let h of $j(f))if(!Ij.call(r,h)&&h!==s)_$(r,h,{get:()=>f[h],enumerable:!(w=Ej(f,h))||w.enumerable})}return r},X1=(r,f,s)=>(P5(r,f,"default"),s&&P5(s,f,"default")),Uj=(r)=>P5(_$({},"__esModule",{value:!0}),r),Ww={};Fj(Ww,{Uint8ArrayBlobAdapter:()=>X5});zw.exports=Uj(Ww);var Q8=j$(),B8=y0();Y5(l8,"transformToString");Y5(V8,"transformFromString");var H8=class r extends Uint8Array{static fromString(f,s="utf-8"){switch(typeof f){case"string":return V8(f,s);default:throw new Error(`Unsupported conversion from ${typeof f} to Uint8ArrayBlobAdapter.`)}}static mutate(f){return Object.setPrototypeOf(f,r.prototype),f}transformToString(f="utf-8"){return l8(this,f)}};Y5(H8,"Uint8ArrayBlobAdapter");var X5=H8;X1(Ww,Rz(),zw.exports);X1(Ww,G8(),zw.exports);X1(Ww,S8(),zw.exports);X1(Ww,J8(),zw.exports);X1(Ww,P1(),zw.exports)});var Eh=j((A0r,t8)=>{function _8(r){const f=r.getUTCFullYear(),s=r.getUTCMonth(),w=r.getUTCDay(),h=r.getUTCDate(),E=r.getUTCHours(),$=r.getUTCMinutes(),I=r.getUTCSeconds(),F=h<10?`0${h}`:`${h}`,U=E<10?`0${E}`:`${E}`,C=$<10?`0${$}`:`${$}`,L=I<10?`0${I}`:`${I}`;return`${vj[w]}, ${F} ${k5[s]} ${f} ${U}:${C}:${L} GMT`}function n$(r){return encodeURIComponent(r).replace(/[!'()*]/g,function(f){return"%"+f.charCodeAt(0).toString(16).toUpperCase()})}function N5(r,f,s){let w,h,E;if(typeof f==="undefined"&&typeof s==="undefined")w={},E=r;else if(w=r,typeof f==="function")return h=f,E=s,Wi(w,h,E);else E=f;for(let $ of Object.keys(E)){if(!Array.isArray(E[$])){w[$]=E[$];continue}p8(w,null,E,$)}return w}function u8(r,f,s){if(s<=0||!Number.isInteger(s))throw new Error("Invalid number of delimiters ("+s+") for splitEvery.");const w=r.split(f);if(s===1)return w;const h=[];let E="";for(let $=0;$<w.length;$++){if(E==="")E=w[$];else E+=f+w[$];if(($+1)%s===0)h.push(E),E=""}if(E!=="")h.push(E);return h}var{defineProperty:o$,getOwnPropertyDescriptor:Tj,getOwnPropertyNames:Gj}=Object,Cj=Object.prototype.hasOwnProperty,v=(r,f)=>o$(r,"name",{value:f,configurable:!0}),Lj=(r,f)=>{for(var s in f)o$(r,s,{get:f[s],enumerable:!0})},Aj=(r,f,s,w)=>{if(f&&typeof f==="object"||typeof f==="function"){for(let h of Gj(f))if(!Cj.call(r,h)&&h!==s)o$(r,h,{get:()=>f[h],enumerable:!(w=Tj(f,h))||w.enumerable})}return r},Rj=(r)=>Aj(o$({},"__esModule",{value:!0}),r),k8={};Lj(k8,{Client:()=>zj,Command:()=>v8,LazyJsonString:()=>Li,NoOpLogger:()=>Wj,SENSITIVE_STRING:()=>Xj,ServiceException:()=>si,StringWrapper:()=>J1,_json:()=>l5,collectBody:()=>Sj,convertMap:()=>Ai,createAggregatedClient:()=>Yj,dateToUtcString:()=>_8,decorateServiceException:()=>x8,emitWarningIfUnsupportedVersion:()=>Ei,expectBoolean:()=>Zj,expectByte:()=>B5,expectFloat32:()=>x$,expectInt:()=>Jj,expectInt32:()=>J5,expectLong:()=>Z1,expectNonNull:()=>Bj,expectNumber:()=>K1,expectObject:()=>i8,expectShort:()=>Q5,expectString:()=>lj,expectUnion:()=>Vj,extendedEncodeURIComponent:()=>n$,getArrayIfSingleItem:()=>Ci,getDefaultClientConfiguration:()=>Ti,getDefaultExtensionConfiguration:()=>n8,getValueFromTextNode:()=>o8,handleFloat:()=>kj,limitedParseDouble:()=>D5,limitedParseFloat:()=>Nj,limitedParseFloat32:()=>yj,loadConfigsForDefaultMode:()=>hi,logger:()=>M1,map:()=>N5,parseBoolean:()=>Kj,parseEpochTimestamp:()=>xj,parseRfc3339DateTime:()=>ij,parseRfc3339DateTimeWithOffset:()=>Oj,parseRfc7231DateTime:()=>gj,resolveDefaultRuntimeConfig:()=>Gi,resolvedPath:()=>Pi,serializeDateTime:()=>Yi,serializeFloat:()=>Xi,splitEvery:()=>u8,strictParseByte:()=>c8,strictParseDouble:()=>H5,strictParseFloat:()=>Hj,strictParseFloat32:()=>d8,strictParseInt:()=>qj,strictParseInt32:()=>mj,strictParseLong:()=>b8,strictParseShort:()=>fh,take:()=>Ri,throwDefaultError:()=>e8,withBaseException:()=>fi});t8.exports=Rj(k8);var N8=class r{trace(){}debug(){}info(){}warn(){}error(){}};v(N8,"NoOpLogger");var Wj=N8,y8=oW(),q8=class r{constructor(f){this.middlewareStack=y8.constructStack(),this.config=f}send(f,s,w){const h=typeof s!=="function"?s:void 0,E=typeof s==="function"?s:w,$=f.resolveMiddleware(this.middlewareStack,this.config,h);if(E)$(f).then((I)=>E(null,I.output),(I)=>E(I)).catch(()=>{});else return $(f).then((I)=>I.output)}destroy(){if(this.config.requestHandler.destroy)this.config.requestHandler.destroy()}};v(q8,"Client");var zj=q8,K5=g$(),Sj=v(async(r=new Uint8Array,f)=>{if(r instanceof Uint8Array)return K5.Uint8ArrayBlobAdapter.mutate(r);if(!r)return K5.Uint8ArrayBlobAdapter.mutate(new Uint8Array);const s=f.streamCollector(r);return K5.Uint8ArrayBlobAdapter.mutate(await s)},"collectBody"),M5=$s(),m8=class r{constructor(){this.middlewareStack=y8.constructStack()}static classBuilder(){return new Pj}resolveMiddlewareWithContext(f,s,w,{middlewareFn:h,clientName:E,commandName:$,inputFilterSensitiveLog:I,outputFilterSensitiveLog:F,smithyContext:U,additionalContext:C,CommandCtor:L}){for(let l of h.bind(this)(L,f,s,w))this.middlewareStack.use(l);const z=f.concat(this.middlewareStack),{logger:S}=s,K={logger:S,clientName:E,commandName:$,inputFilterSensitiveLog:I,outputFilterSensitiveLog:F,[M5.SMITHY_CONTEXT_KEY]:{commandInstance:this,...U},...C},{requestHandler:k}=s;return z.resolve((l)=>k.handle(l.request,w||{}),K)}};v(m8,"Command");var v8=m8,j8=class r{constructor(){this._init=()=>{},this._ep={},this._middlewareFn=()=>[],this._commandName="",this._clientName="",this._additionalContext={},this._smithyContext={},this._inputFilterSensitiveLog=(f)=>f,this._outputFilterSensitiveLog=(f)=>f,this._serializer=null,this._deserializer=null}init(f){this._init=f}ep(f){return this._ep=f,this}m(f){return this._middlewareFn=f,this}s(f,s,w={}){return this._smithyContext={service:f,operation:s,...w},this}c(f={}){return this._additionalContext=f,this}n(f,s){return this._clientName=f,this._commandName=s,this}f(f=(w)=>w,s=(w)=>w){return this._inputFilterSensitiveLog=f,this._outputFilterSensitiveLog=s,this}ser(f){return this._serializer=f,this}de(f){return this._deserializer=f,this}build(){var f;const s=this;let w;return w=(f=class extends v8{constructor(...[h]){super();this.serialize=s._serializer,this.deserialize=s._deserializer,this.input=h??{},s._init(this)}static getEndpointParameterInstructions(){return s._ep}resolveMiddleware(h,E,$){return this.resolveMiddlewareWithContext(h,E,$,{CommandCtor:w,middlewareFn:s._middlewareFn,clientName:s._clientName,commandName:s._commandName,inputFilterSensitiveLog:s._inputFilterSensitiveLog,outputFilterSensitiveLog:s._outputFilterSensitiveLog,smithyContext:s._smithyContext,additionalContext:s._additionalContext})}},v(f,"CommandRef"),f)}};v(j8,"ClassBuilder");var Pj=j8,Xj="***SensitiveInformation***",Yj=v((r,f)=>{for(let s of Object.keys(r)){const w=r[s],h=v(async function($,I,F){const U=new w($);if(typeof I==="function")this.send(U,I);else if(typeof F==="function"){if(typeof I!=="object")throw new Error(`Expected http options but got ${typeof I}`);this.send(U,I||{},F)}else return this.send(U,I)},"methodImpl"),E=(s[0].toLowerCase()+s.slice(1)).replace(/Command$/,"");f.prototype[E]=h}},"createAggregatedClient"),Kj=v((r)=>{switch(r){case"true":return!0;case"false":return!1;default:throw new Error(`Unable to parse boolean value "${r}"`)}},"parseBoolean"),Zj=v((r)=>{if(r===null||r===void 0)return;if(typeof r==="number"){if(r===0||r===1)M1.warn(e$(`Expected boolean, got ${typeof r}: ${r}`));if(r===0)return!1;if(r===1)return!0}if(typeof r==="string"){const f=r.toLowerCase();if(f==="false"||f==="true")M1.warn(e$(`Expected boolean, got ${typeof r}: ${r}`));if(f==="false")return!1;if(f==="true")return!0}if(typeof r==="boolean")return r;throw new TypeError(`Expected boolean, got ${typeof r}: ${r}`)},"expectBoolean"),K1=v((r)=>{if(r===null||r===void 0)return;if(typeof r==="string"){const f=parseFloat(r);if(!Number.isNaN(f)){if(String(f)!==String(r))M1.warn(e$(`Expected number but observed string: ${r}`));return f}}if(typeof r==="number")return r;throw new TypeError(`Expected number, got ${typeof r}: ${r}`)},"expectNumber"),Mj=Math.ceil(340282346638528860000000000000000000000),x$=v((r)=>{const f=K1(r);if(f!==void 0&&!Number.isNaN(f)&&f!==1/0&&f!==-1/0){if(Math.abs(f)>Mj)throw new TypeError(`Expected 32-bit float, got ${r}`)}return f},"expectFloat32"),Z1=v((r)=>{if(r===null||r===void 0)return;if(Number.isInteger(r)&&!Number.isNaN(r))return r;throw new TypeError(`Expected integer, got ${typeof r}: ${r}`)},"expectLong"),Jj=Z1,J5=v((r)=>V5(r,32),"expectInt32"),Q5=v((r)=>V5(r,16),"expectShort"),B5=v((r)=>V5(r,8),"expectByte"),V5=v((r,f)=>{const s=Z1(r);if(s!==void 0&&Qj(s,f)!==s)throw new TypeError(`Expected ${f}-bit integer, got ${r}`);return s},"expectSizedInt"),Qj=v((r,f)=>{switch(f){case 32:return Int32Array.of(r)[0];case 16:return Int16Array.of(r)[0];case 8:return Int8Array.of(r)[0]}},"castInt"),Bj=v((r,f)=>{if(r===null||r===void 0){if(f)throw new TypeError(`Expected a non-null value for ${f}`);throw new TypeError("Expected a non-null value")}return r},"expectNonNull"),i8=v((r)=>{if(r===null||r===void 0)return;if(typeof r==="object"&&!Array.isArray(r))return r;const f=Array.isArray(r)?"array":typeof r;throw new TypeError(`Expected object, got ${f}: ${r}`)},"expectObject"),lj=v((r)=>{if(r===null||r===void 0)return;if(typeof r==="string")return r;if(["boolean","number","bigint"].includes(typeof r))return M1.warn(e$(`Expected string, got ${typeof r}: ${r}`)),String(r);throw new TypeError(`Expected string, got ${typeof r}: ${r}`)},"expectString"),Vj=v((r)=>{if(r===null||r===void 0)return;const f=i8(r),s=Object.entries(f).filter(([,w])=>w!=null).map(([w])=>w);if(s.length===0)throw new TypeError("Unions must have exactly one non-null member. None were found.");if(s.length>1)throw new TypeError(`Unions must have exactly one non-null member. Keys ${s} were not null.`);return f},"expectUnion"),H5=v((r)=>{if(typeof r=="string")return K1(hh(r));return K1(r)},"strictParseDouble"),Hj=H5,d8=v((r)=>{if(typeof r=="string")return x$(hh(r));return x$(r)},"strictParseFloat32"),Dj=/(-?(?:0|[1-9]\d*)(?:\.\d+)?(?:[eE][+-]?\d+)?)|(-?Infinity)|(NaN)/g,hh=v((r)=>{const f=r.match(Dj);if(f===null||f[0].length!==r.length)throw new TypeError("Expected real number, got implicit NaN");return parseFloat(r)},"parseNumber"),D5=v((r)=>{if(typeof r=="string")return O8(r);return K1(r)},"limitedParseDouble"),kj=D5,Nj=D5,yj=v((r)=>{if(typeof r=="string")return O8(r);return x$(r)},"limitedParseFloat32"),O8=v((r)=>{switch(r){case"NaN":return NaN;case"Infinity":return 1/0;case"-Infinity":return-1/0;default:throw new Error(`Unable to parse float value: ${r}`)}},"parseFloatString"),b8=v((r)=>{if(typeof r==="string")return Z1(hh(r));return Z1(r)},"strictParseLong"),qj=b8,mj=v((r)=>{if(typeof r==="string")return J5(hh(r));return J5(r)},"strictParseInt32"),fh=v((r)=>{if(typeof r==="string")return Q5(hh(r));return Q5(r)},"strictParseShort"),c8=v((r)=>{if(typeof r==="string")return B5(hh(r));return B5(r)},"strictParseByte"),e$=v((r)=>{return String(new TypeError(r).stack||r).split("\n").slice(0,5).filter((f)=>!f.includes("stackTraceWarning")).join("\n")},"stackTraceWarning"),M1={warn:console.warn},vj=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],k5=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];v(_8,"dateToUtcString");var jj=new RegExp(/^(\d{4})-(\d{2})-(\d{2})[tT](\d{2}):(\d{2}):(\d{2})(?:\.(\d+))?[zZ]$/),ij=v((r)=>{if(r===null||r===void 0)return;if(typeof r!=="string")throw new TypeError("RFC-3339 date-times must be expressed as strings");const f=jj.exec(r);if(!f)throw new TypeError("Invalid RFC-3339 date-time value");const[s,w,h,E,$,I,F,U]=f,C=fh(wh(w)),L=Bf(h,"month",1,12),z=Bf(E,"day",1,31);return Y1(C,L,z,{hours:$,minutes:I,seconds:F,fractionalMilliseconds:U})},"parseRfc3339DateTime"),dj=new RegExp(/^(\d{4})-(\d{2})-(\d{2})[tT](\d{2}):(\d{2}):(\d{2})(?:\.(\d+))?(([-+]\d{2}\:\d{2})|[zZ])$/),Oj=v((r)=>{if(r===null||r===void 0)return;if(typeof r!=="string")throw new TypeError("RFC-3339 date-times must be expressed as strings");const f=dj.exec(r);if(!f)throw new TypeError("Invalid RFC-3339 date-time value");const[s,w,h,E,$,I,F,U,C]=f,L=fh(wh(w)),z=Bf(h,"month",1,12),S=Bf(E,"day",1,31),K=Y1(L,z,S,{hours:$,minutes:I,seconds:F,fractionalMilliseconds:U});if(C.toUpperCase()!="Z")K.setTime(K.getTime()-ri(C));return K},"parseRfc3339DateTimeWithOffset"),bj=new RegExp(/^(?:Mon|Tue|Wed|Thu|Fri|Sat|Sun), (\d{2}) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) (\d{4}) (\d{1,2}):(\d{2}):(\d{2})(?:\.(\d+))? GMT$/),cj=new RegExp(/^(?:Monday|Tuesday|Wednesday|Thursday|Friday|Saturday|Sunday), (\d{2})-(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)-(\d{2}) (\d{1,2}):(\d{2}):(\d{2})(?:\.(\d+))? GMT$/),_j=new RegExp(/^(?:Mon|Tue|Wed|Thu|Fri|Sat|Sun) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) ( [1-9]|\d{2}) (\d{1,2}):(\d{2}):(\d{2})(?:\.(\d+))? (\d{4})$/),gj=v((r)=>{if(r===null||r===void 0)return;if(typeof r!=="string")throw new TypeError("RFC-7231 date-times must be expressed as strings");let f=bj.exec(r);if(f){const[s,w,h,E,$,I,F,U]=f;return Y1(fh(wh(E)),Z5(h),Bf(w,"day",1,31),{hours:$,minutes:I,seconds:F,fractionalMilliseconds:U})}if(f=cj.exec(r),f){const[s,w,h,E,$,I,F,U]=f;return oj(Y1(ej(E),Z5(h),Bf(w,"day",1,31),{hours:$,minutes:I,seconds:F,fractionalMilliseconds:U}))}if(f=_j.exec(r),f){const[s,w,h,E,$,I,F,U]=f;return Y1(fh(wh(U)),Z5(w),Bf(h.trimLeft(),"day",1,31),{hours:E,minutes:$,seconds:I,fractionalMilliseconds:F})}throw new TypeError("Invalid RFC-7231 date-time value")},"parseRfc7231DateTime"),xj=v((r)=>{if(r===null||r===void 0)return;let f;if(typeof r==="number")f=r;else if(typeof r==="string")f=H5(r);else if(typeof r==="object"&&r.tag===1)f=r.value;else throw new TypeError("Epoch timestamps must be expressed as floating point numbers or their string representation");if(Number.isNaN(f)||f===1/0||f===-1/0)throw new TypeError("Epoch timestamps must be valid, non-Infinite, non-NaN numerics");return new Date(Math.round(f*1000))},"parseEpochTimestamp"),Y1=v((r,f,s,w)=>{const h=f-1;return pj(r,h,s),new Date(Date.UTC(r,h,s,Bf(w.hours,"hour",0,23),Bf(w.minutes,"minute",0,59),Bf(w.seconds,"seconds",0,60),tj(w.fractionalMilliseconds)))},"buildDate"),ej=v((r)=>{const f=new Date().getUTCFullYear(),s=Math.floor(f/100)*100+fh(wh(r));if(s<f)return s+100;return s},"parseTwoDigitYear"),nj=1576800000000,oj=v((r)=>{if(r.getTime()-new Date().getTime()>nj)return new Date(Date.UTC(r.getUTCFullYear()-100,r.getUTCMonth(),r.getUTCDate(),r.getUTCHours(),r.getUTCMinutes(),r.getUTCSeconds(),r.getUTCMilliseconds()));return r},"adjustRfc850Year"),Z5=v((r)=>{const f=k5.indexOf(r);if(f<0)throw new TypeError(`Invalid month: ${r}`);return f+1},"parseMonthByShortName"),aj=[31,28,31,30,31,30,31,31,30,31,30,31],pj=v((r,f,s)=>{let w=aj[f];if(f===1&&uj(r))w=29;if(s>w)throw new TypeError(`Invalid day for ${k5[f]} in ${r}: ${s}`)},"validateDayOfMonth"),uj=v((r)=>{return r%4===0&&(r%100!==0||r%400===0)},"isLeapYear"),Bf=v((r,f,s,w)=>{const h=c8(wh(r));if(h<s||h>w)throw new TypeError(`${f} must be between ${s} and ${w}, inclusive`);return h},"parseDateValue"),tj=v((r)=>{if(r===null||r===void 0)return 0;return d8("0."+r)*1000},"parseMilliseconds"),ri=v((r)=>{const f=r[0];let s=1;if(f=="+")s=1;else if(f=="-")s=-1;else throw new TypeError(`Offset direction, ${f}, must be "+" or "-"`);const w=Number(r.substring(1,3)),h=Number(r.substring(4,6));return s*(w*60+h)*60*1000},"parseOffsetToMilliseconds"),wh=v((r)=>{let f=0;while(f<r.length-1&&r.charAt(f)==="0")f++;if(f===0)return r;return r.slice(f)},"stripLeadingZeroes"),g8=class r extends Error{constructor(f){super(f.message);Object.setPrototypeOf(this,r.prototype),this.name=f.name,this.$fault=f.$fault,this.$metadata=f.$metadata}};v(g8,"ServiceException");var si=g8,x8=v((r,f={})=>{Object.entries(f).filter(([,w])=>w!==void 0).forEach(([w,h])=>{if(r[w]==null||r[w]==="")r[w]=h});const s=r.message||r.Message||"UnknownError";return r.message=s,delete r.Message,r},"decorateServiceException"),e8=v(({output:r,parsedBody:f,exceptionCtor:s,errorCode:w})=>{const h=wi(r),E=h.httpStatusCode?h.httpStatusCode+"":void 0,$=new s({name:(f==null?void 0:f.code)||(f==null?void 0:f.Code)||w||E||"UnknownError",$fault:"client",$metadata:h});throw x8($,f)},"throwDefaultError"),fi=v((r)=>{return({output:f,parsedBody:s,errorCode:w})=>{e8({output:f,parsedBody:s,exceptionCtor:r,errorCode:w})}},"withBaseException"),wi=v((r)=>({httpStatusCode:r.statusCode,requestId:r.headers["x-amzn-requestid"]??r.headers["x-amzn-request-id"]??r.headers["x-amz-request-id"],extendedRequestId:r.headers["x-amz-id-2"],cfId:r.headers["x-amz-cf-id"]}),"deserializeMetadata"),hi=v((r)=>{switch(r){case"standard":return{retryMode:"standard",connectionTimeout:3100};case"in-region":return{retryMode:"standard",connectionTimeout:1100};case"cross-region":return{retryMode:"standard",connectionTimeout:3100};case"mobile":return{retryMode:"standard",connectionTimeout:30000};default:return{}}},"loadConfigsForDefaultMode"),D8=!1,Ei=v((r)=>{if(r&&!D8&&parseInt(r.substring(1,r.indexOf(".")))<16)D8=!0},"emitWarningIfUnsupportedVersion"),$i=v((r)=>{const f=[];for(let s in M5.AlgorithmId){const w=M5.AlgorithmId[s];if(r[w]===void 0)continue;f.push({algorithmId:()=>w,checksumConstructor:()=>r[w]})}return{_checksumAlgorithms:f,addChecksumAlgorithm(s){this._checksumAlgorithms.push(s)},checksumAlgorithms(){return this._checksumAlgorithms}}},"getChecksumConfiguration"),Ii=v((r)=>{const f={};return r.checksumAlgorithms().forEach((s)=>{f[s.algorithmId()]=s.checksumConstructor()}),f},"resolveChecksumRuntimeConfig"),Fi=v((r)=>{let f=r.retryStrategy;return{setRetryStrategy(s){f=s},retryStrategy(){return f}}},"getRetryConfiguration"),Ui=v((r)=>{const f={};return f.retryStrategy=r.retryStrategy(),f},"resolveRetryRuntimeConfig"),n8=v((r)=>{return{...$i(r),...Fi(r)}},"getDefaultExtensionConfiguration"),Ti=n8,Gi=v((r)=>{return{...Ii(r),...Ui(r)}},"resolveDefaultRuntimeConfig");v(n$,"extendedEncodeURIComponent");var Ci=v((r)=>Array.isArray(r)?r:[r],"getArrayIfSingleItem"),o8=v((r)=>{for(let s in r)if(r.hasOwnProperty(s)&&r[s]["#text"]!==void 0)r[s]=r[s]["#text"];else if(typeof r[s]==="object"&&r[s]!==null)r[s]=o8(r[s]);return r},"getValueFromTextNode"),J1=v(function(){const r=Object.getPrototypeOf(this).constructor,s=new(Function.bind.apply(String,[null,...arguments]));return Object.setPrototypeOf(s,r.prototype),s},"StringWrapper");J1.prototype=Object.create(String.prototype,{constructor:{value:J1,enumerable:!1,writable:!0,configurable:!0}});Object.setPrototypeOf(J1,String);var a8=class r extends J1{deserializeJSON(){return JSON.parse(super.toString())}toJSON(){return super.toString()}static fromObject(f){if(f instanceof r)return f;else if(f instanceof String||typeof f==="string")return new r(f);return new r(JSON.stringify(f))}};v(a8,"LazyJsonString");var Li=a8;v(N5,"map");var Ai=v((r)=>{const f={};for(let[s,w]of Object.entries(r||{}))f[s]=[,w];return f},"convertMap"),Ri=v((r,f)=>{const s={};for(let w in f)p8(s,r,f,w);return s},"take"),Wi=v((r,f,s)=>{return N5(r,Object.entries(s).reduce((w,[h,E])=>{if(Array.isArray(E))w[h]=E;else if(typeof E==="function")w[h]=[f,E()];else w[h]=[f,E];return w},{}))},"mapWithFilter"),p8=v((r,f,s,w)=>{if(f!==null){let $=s[w];if(typeof $==="function")$=[,$];const[I=zi,F=Si,U=w]=$;if(typeof I==="function"&&I(f[U])||typeof I!=="function"&&!!I)r[w]=F(f[U]);return}let[h,E]=s[w];if(typeof E==="function"){let $;const I=h===void 0&&($=E())!=null,F=typeof h==="function"&&!!h(void 0)||typeof h!=="function"&&!!h;if(I)r[w]=$;else if(F)r[w]=E()}else{const $=h===void 0&&E!=null,I=typeof h==="function"&&!!h(E)||typeof h!=="function"&&!!h;if($||I)r[w]=E}},"applyInstruction"),zi=v((r)=>r!=null,"nonNullish"),Si=v((r)=>r,"pass"),Pi=v((r,f,s,w,h,E)=>{if(f!=null&&f[s]!==void 0){const $=w();if($.length<=0)throw new Error("Empty value provided for input HTTP label: "+s+".");r=r.replace(h,E?$.split("/").map((I)=>n$(I)).join("/"):n$($))}else throw new Error("No value provided for input HTTP label: "+s+".");return r},"resolvedPath"),Xi=v((r)=>{if(r!==r)return"NaN";switch(r){case 1/0:return"Infinity";case-1/0:return"-Infinity";default:return r}},"serializeFloat"),Yi=v((r)=>r.toISOString().replace(".000Z","Z"),"serializeDateTime"),l5=v((r)=>{if(r==null)return{};if(Array.isArray(r))return r.filter((f)=>f!=null).map(l5);if(typeof r==="object"){const f={};for(let s of Object.keys(r)){if(r[s]==null)continue;f[s]=l5(r[s])}return f}return r},"_json");v(u8,"splitEvery")});var fS=j((rS)=>{Object.defineProperty(rS,"__esModule",{value:!0});rS.isStreamingPayload=void 0;var Ki=import.meta.require("stream"),Zi=(r)=>(r===null||r===void 0?void 0:r.body)instanceof Ki.Readable||typeof ReadableStream!=="undefined"&&(r===null||r===void 0?void 0:r.body)instanceof ReadableStream;rS.isStreamingPayload=Zi});var XS=j((z0r,PS)=>{var{defineProperty:a$,getOwnPropertyDescriptor:Mi,getOwnPropertyNames:Ji}=Object,Qi=Object.prototype.hasOwnProperty,kr=(r,f)=>a$(r,"name",{value:f,configurable:!0}),Bi=(r,f)=>{for(var s in f)a$(r,s,{get:f[s],enumerable:!0})},li=(r,f,s,w)=>{if(f&&typeof f==="object"||typeof f==="function"){for(let h of Ji(f))if(!Qi.call(r,h)&&h!==s)a$(r,h,{get:()=>f[h],enumerable:!(w=Mi(f,h))||w.enumerable})}return r},Vi=(r)=>li(a$({},"__esModule",{value:!0}),r),hS={};Bi(hS,{AdaptiveRetryStrategy:()=>ki,CONFIG_MAX_ATTEMPTS:()=>q5,CONFIG_RETRY_MODE:()=>LS,ENV_MAX_ATTEMPTS:()=>y5,ENV_RETRY_MODE:()=>CS,NODE_MAX_ATTEMPT_CONFIG_OPTIONS:()=>Ni,NODE_RETRY_MODE_CONFIG_OPTIONS:()=>qi,StandardRetryStrategy:()=>TS,defaultDelayDecider:()=>$S,defaultRetryDecider:()=>IS,getOmitRetryHeadersPlugin:()=>mi,getRetryAfterHint:()=>SS,getRetryPlugin:()=>bi,omitRetryHeadersMiddleware:()=>AS,omitRetryHeadersMiddlewareOptions:()=>RS,resolveRetryConfig:()=>yi,retryMiddleware:()=>WS,retryMiddlewareOptions:()=>zS});PS.exports=Vi(hS);var $h=T0(),ES=pF(),Kr=_W(),Hi=kr((r,f)=>{const s=r,w=(f==null?void 0:f.noRetryIncrement)??Kr.NO_RETRY_INCREMENT,h=(f==null?void 0:f.retryCost)??Kr.RETRY_COST,E=(f==null?void 0:f.timeoutRetryCost)??Kr.TIMEOUT_RETRY_COST;let $=r;const I=kr((L)=>L.name==="TimeoutError"?E:h,"getCapacityAmount"),F=kr((L)=>I(L)<=$,"hasRetryTokens");return Object.freeze({hasRetryTokens:F,retrieveRetryTokens:kr((L)=>{if(!F(L))throw new Error("No retry token available");const z=I(L);return $-=z,z},"retrieveRetryTokens"),releaseRetryTokens:kr((L)=>{$+=L??w,$=Math.min($,s)},"releaseRetryTokens")})},"getDefaultRetryQuota"),$S=kr((r,f)=>Math.floor(Math.min(Kr.MAXIMUM_RETRY_DELAY,Math.random()*2**f*r)),"defaultDelayDecider"),q0=uF(),IS=kr((r)=>{if(!r)return!1;return q0.isRetryableByTrait(r)||q0.isClockSkewError(r)||q0.isThrottlingError(r)||q0.isTransientError(r)},"defaultRetryDecider"),FS=kr((r)=>{if(r instanceof Error)return r;if(r instanceof Object)return Object.assign(new Error,r);if(typeof r==="string")return new Error(r);return new Error(`AWS SDK error wrapper for ${r}`)},"asSdkError"),US=class r{constructor(f,s){this.maxAttemptsProvider=f,this.mode=Kr.RETRY_MODES.STANDARD,this.retryDecider=(s==null?void 0:s.retryDecider)??IS,this.delayDecider=(s==null?void 0:s.delayDecider)??$S,this.retryQuota=(s==null?void 0:s.retryQuota)??Hi(Kr.INITIAL_RETRY_TOKENS)}shouldRetry(f,s,w){return s<w&&this.retryDecider(f)&&this.retryQuota.hasRetryTokens(f)}async getMaxAttempts(){let f;try{f=await this.maxAttemptsProvider()}catch(s){f=Kr.DEFAULT_MAX_ATTEMPTS}return f}async retry(f,s,w){let h,E=0,$=0;const I=await this.getMaxAttempts(),{request:F}=s;if($h.HttpRequest.isInstance(F))F.headers[Kr.INVOCATION_ID_HEADER]=ES.v4();while(!0)try{if($h.HttpRequest.isInstance(F))F.headers[Kr.REQUEST_HEADER]=`attempt=${E+1}; max=${I}`;if(w==null?void 0:w.beforeRequest)await w.beforeRequest();const{response:U,output:C}=await f(s);if(w==null?void 0:w.afterRequest)w.afterRequest(U);return this.retryQuota.releaseRetryTokens(h),C.$metadata.attempts=E+1,C.$metadata.totalRetryDelay=$,{response:U,output:C}}catch(U){const C=FS(U);if(E++,this.shouldRetry(C,E,I)){h=this.retryQuota.retrieveRetryTokens(C);const L=this.delayDecider(q0.isThrottlingError(C)?Kr.THROTTLING_RETRY_DELAY_BASE:Kr.DEFAULT_RETRY_DELAY_BASE,E),z=Di(C.$response),S=Math.max(z||0,L);$+=S,await new Promise((K)=>setTimeout(K,S));continue}if(!C.$metadata)C.$metadata={};throw C.$metadata.attempts=E,C.$metadata.totalRetryDelay=$,C}}};kr(US,"StandardRetryStrategy");var TS=US,Di=kr((r)=>{if(!$h.HttpResponse.isInstance(r))return;const f=Object.keys(r.headers).find((E)=>E.toLowerCase()==="retry-after");if(!f)return;const s=r.headers[f],w=Number(s);if(!Number.isNaN(w))return w*1000;return new Date(s).getTime()-Date.now()},"getDelayFromRetryAfterHeader"),GS=class r extends TS{constructor(f,s){const{rateLimiter:w,...h}=s??{};super(f,h);this.rateLimiter=w??new Kr.DefaultRateLimiter,this.mode=Kr.RETRY_MODES.ADAPTIVE}async retry(f,s){return super.retry(f,s,{beforeRequest:async()=>{return this.rateLimiter.getSendToken()},afterRequest:(w)=>{this.rateLimiter.updateClientSendingRate(w)}})}};kr(GS,"AdaptiveRetryStrategy");var ki=GS,wS=T1(),y5="AWS_MAX_ATTEMPTS",q5="max_attempts",Ni={environmentVariableSelector:(r)=>{const f=r[y5];if(!f)return;const s=parseInt(f);if(Number.isNaN(s))throw new Error(`Environment variable ${y5} mast be a number, got "${f}"`);return s},configFileSelector:(r)=>{const f=r[q5];if(!f)return;const s=parseInt(f);if(Number.isNaN(s))throw new Error(`Shared config file entry ${q5} mast be a number, got "${f}"`);return s},default:Kr.DEFAULT_MAX_ATTEMPTS},yi=kr((r)=>{const{retryStrategy:f}=r,s=wS.normalizeProvider(r.maxAttempts??Kr.DEFAULT_MAX_ATTEMPTS);return{...r,maxAttempts:s,retryStrategy:async()=>{if(f)return f;if(await wS.normalizeProvider(r.retryMode)()===Kr.RETRY_MODES.ADAPTIVE)return new Kr.AdaptiveRetryStrategy(s);return new Kr.StandardRetryStrategy(s)}}},"resolveRetryConfig"),CS="AWS_RETRY_MODE",LS="retry_mode",qi={environmentVariableSelector:(r)=>r[CS],configFileSelector:(r)=>r[LS],default:Kr.DEFAULT_RETRY_MODE},AS=kr(()=>(r)=>async(f)=>{const{request:s}=f;if($h.HttpRequest.isInstance(s))delete s.headers[Kr.INVOCATION_ID_HEADER],delete s.headers[Kr.REQUEST_HEADER];return r(f)},"omitRetryHeadersMiddleware"),RS={name:"omitRetryHeadersMiddleware",tags:["RETRY","HEADERS","OMIT_RETRY_HEADERS"],relation:"before",toMiddleware:"awsAuthMiddleware",override:!0},mi=kr((r)=>({applyToStack:(f)=>{f.addRelativeTo(AS(),RS)}}),"getOmitRetryHeadersPlugin"),vi=Eh(),ji=fS(),WS=kr((r)=>(f,s)=>async(w)=>{var h;let E=await r.retryStrategy();const $=await r.maxAttempts();if(ii(E)){E=E;let I=await E.acquireInitialRetryToken(s.partition_id),F=new Error,U=0,C=0;const{request:L}=w,z=$h.HttpRequest.isInstance(L);if(z)L.headers[Kr.INVOCATION_ID_HEADER]=ES.v4();while(!0)try{if(z)L.headers[Kr.REQUEST_HEADER]=`attempt=${U+1}; max=${$}`;const{response:S,output:K}=await f(w);return E.recordSuccess(I),K.$metadata.attempts=U+1,K.$metadata.totalRetryDelay=C,{response:S,output:K}}catch(S){const K=di(S);if(F=FS(S),z&&ji.isStreamingPayload(L))throw(h=s.logger instanceof vi.NoOpLogger?console:s.logger)==null||h.warn("An error was encountered in a non-retryable streaming request."),F;try{I=await E.refreshRetryTokenForRetry(I,K)}catch(l){if(!F.$metadata)F.$metadata={};throw F.$metadata.attempts=U+1,F.$metadata.totalRetryDelay=C,F}U=I.getRetryCount();const k=I.getRetryDelay();C+=k,await new Promise((l)=>setTimeout(l,k))}}else{if(E=E,E==null?void 0:E.mode)s.userAgent=[...s.userAgent||[],["cfg/retry-mode",E.mode]];return E.retry(f,w)}},"retryMiddleware"),ii=kr((r)=>typeof r.acquireInitialRetryToken!=="undefined"&&typeof r.refreshRetryTokenForRetry!=="undefined"&&typeof r.recordSuccess!=="undefined","isRetryStrategyV2"),di=kr((r)=>{const f={error:r,errorType:Oi(r)},s=SS(r.$response);if(s)f.retryAfterHint=s;return f},"getRetryErrorInfo"),Oi=kr((r)=>{if(q0.isThrottlingError(r))return"THROTTLING";if(q0.isTransientError(r))return"TRANSIENT";if(q0.isServerError(r))return"SERVER_ERROR";return"CLIENT_ERROR"},"getRetryErrorType"),zS={name:"retryMiddleware",tags:["RETRY"],step:"finalizeRequest",priority:"high",override:!0},bi=kr((r)=>({applyToStack:(f)=>{f.add(WS(r),zS)}}),"getRetryPlugin"),SS=kr((r)=>{if(!$h.HttpResponse.isInstance(r))return;const f=Object.keys(r.headers).find((E)=>E.toLowerCase()==="retry-after");if(!f)return;const s=r.headers[f],w=Number(s);if(!Number.isNaN(w))return new Date(w*1000);return new Date(s)},"getRetryAfterHint")});var Or=j((S0r,iS)=>{function ZS(r){const f=new Map;for(let s of r)f.set(s.schemeId,s);return f}function qS(r,f){return new vS(r,f)}function jS(r,f,s,w,h){return zr(async function*E($,I,...F){let U=$.startingToken||void 0,C=!0,L;while(C){if(I[s]=U,h)I[h]=I[h]??$.pageSize;if($.client instanceof r)L=await Cd(f,$.client,I,...F);else throw new Error(`Invalid client, expected instance of ${r.name}`);yield L;const z=U;U=Ld(L,w),C=!!(U&&(!$.stopOnSameToken||U!==z))}return},"paginateOperation")}var{defineProperty:u$,getOwnPropertyDescriptor:ci,getOwnPropertyNames:_i}=Object,gi=Object.prototype.hasOwnProperty,zr=(r,f)=>u$(r,"name",{value:f,configurable:!0}),xi=(r,f)=>{for(var s in f)u$(r,s,{get:f[s],enumerable:!0})},ei=(r,f,s,w)=>{if(f&&typeof f==="object"||typeof f==="function"){for(let h of _i(f))if(!gi.call(r,h)&&h!==s)u$(r,h,{get:()=>f[h],enumerable:!(w=ci(f,h))||w.enumerable})}return r},ni=(r)=>ei(u$({},"__esModule",{value:!0}),r),YS={};xi(YS,{DefaultIdentityProviderConfig:()=>wd,EXPIRATION_MS:()=>NS,HttpApiKeyAuthSigner:()=>hd,HttpBearerAuthSigner:()=>Ed,NoAuthSigner:()=>$d,RequestBuilder:()=>vS,createIsIdentityExpiredFunction:()=>kS,createPaginator:()=>jS,doesIdentityRequireRefresh:()=>yS,getHttpAuthSchemeEndpointRuleSetPlugin:()=>ai,getHttpAuthSchemePlugin:()=>ui,getHttpSigningPlugin:()=>fd,getSmithyContext:()=>Ud,httpAuthSchemeEndpointRuleSetMiddlewareOptions:()=>MS,httpAuthSchemeMiddleware:()=>m5,httpAuthSchemeMiddlewareOptions:()=>JS,httpSigningMiddleware:()=>QS,httpSigningMiddlewareOptions:()=>BS,isIdentityExpired:()=>Id,memoizeIdentityProvider:()=>Fd,normalizeProvider:()=>Td,requestBuilder:()=>qS});iS.exports=ni(YS);var KS=T1();zr(ZS,"convertHttpAuthSchemesToMap");var m5=zr((r,f)=>(s,w)=>async(h)=>{var E;const $=r.httpAuthSchemeProvider(await f.httpAuthSchemeParametersProvider(r,w,h.input)),I=ZS(r.httpAuthSchemes),F=KS.getSmithyContext(w),U=[];for(let C of $){const L=I.get(C.schemeId);if(!L){U.push(`HttpAuthScheme \`${C.schemeId}\` was not enabled for this service.`);continue}const z=L.identityProvider(await f.identityProviderConfigProvider(r));if(!z){U.push(`HttpAuthScheme \`${C.schemeId}\` did not have an IdentityProvider configured.`);continue}const{identityProperties:S={},signingProperties:K={}}=((E=C.propertiesExtractor)==null?void 0:E.call(C,r,w))||{};C.identityProperties=Object.assign(C.identityProperties||{},S),C.signingProperties=Object.assign(C.signingProperties||{},K),F.selectedHttpAuthScheme={httpAuthOption:C,identity:await z(C.identityProperties),signer:L.signer};break}if(!F.selectedHttpAuthScheme)throw new Error(U.join("\n"));return s(h)},"httpAuthSchemeMiddleware"),oi=MR(),MS={step:"serialize",tags:["HTTP_AUTH_SCHEME"],name:"httpAuthSchemeMiddleware",override:!0,relation:"before",toMiddleware:oi.endpointMiddlewareOptions.name},ai=zr((r,{httpAuthSchemeParametersProvider:f,identityProviderConfigProvider:s})=>({applyToStack:(w)=>{w.addRelativeTo(m5(r,{httpAuthSchemeParametersProvider:f,identityProviderConfigProvider:s}),MS)}}),"getHttpAuthSchemeEndpointRuleSetPlugin"),pi=cF(),JS={step:"serialize",tags:["HTTP_AUTH_SCHEME"],name:"httpAuthSchemeMiddleware",override:!0,relation:"before",toMiddleware:pi.serializerMiddlewareOption.name},ui=zr((r,{httpAuthSchemeParametersProvider:f,identityProviderConfigProvider:s})=>({applyToStack:(w)=>{w.addRelativeTo(m5(r,{httpAuthSchemeParametersProvider:f,identityProviderConfigProvider:s}),JS)}}),"getHttpAuthSchemePlugin"),t$=T0(),ti=zr((r)=>(f)=>{throw f},"defaultErrorHandler"),rd=zr((r,f)=>{},"defaultSuccessHandler"),QS=zr((r)=>(f,s)=>async(w)=>{if(!t$.HttpRequest.isInstance(w.request))return f(w);const E=KS.getSmithyContext(s).selectedHttpAuthScheme;if(!E)throw new Error("No HttpAuthScheme was selected: unable to sign request");const{httpAuthOption:{signingProperties:$={}},identity:I,signer:F}=E,U=await f({...w,request:await F.sign(w.request,I,$)}).catch((F.errorHandler||ti)($));return(F.successHandler||rd)(U.response,$),U},"httpSigningMiddleware"),sd=XS(),BS={step:"finalizeRequest",tags:["HTTP_SIGNING"],name:"httpSigningMiddleware",aliases:["apiKeyMiddleware","tokenMiddleware","awsAuthMiddleware"],override:!0,relation:"after",toMiddleware:sd.retryMiddlewareOptions.name},fd=zr((r)=>({applyToStack:(f)=>{f.addRelativeTo(QS(r),BS)}}),"getHttpSigningPlugin"),lS=class r{constructor(f){this.authSchemes=new Map;for(let[s,w]of Object.entries(f))if(w!==void 0)this.authSchemes.set(s,w)}getIdentityProvider(f){return this.authSchemes.get(f)}};zr(lS,"DefaultIdentityProviderConfig");var wd=lS,p$=$s(),VS=class r{async sign(f,s,w){if(!w)throw new Error("request could not be signed with `apiKey` since the `name` and `in` signer properties are missing");if(!w.name)throw new Error("request could not be signed with `apiKey` since the `name` signer property is missing");if(!w.in)throw new Error("request could not be signed with `apiKey` since the `in` signer property is missing");if(!s.apiKey)throw new Error("request could not be signed with `apiKey` since the `apiKey` is not defined");const h=t$.HttpRequest.clone(f);if(w.in===p$.HttpApiKeyAuthLocation.QUERY)h.query[w.name]=s.apiKey;else if(w.in===p$.HttpApiKeyAuthLocation.HEADER)h.headers[w.name]=w.scheme?`${w.scheme} ${s.apiKey}`:s.apiKey;else throw new Error("request can only be signed with `apiKey` locations `query` or `header`, but found: `"+w.in+"`");return h}};zr(VS,"HttpApiKeyAuthSigner");var hd=VS,HS=class r{async sign(f,s,w){const h=t$.HttpRequest.clone(f);if(!s.token)throw new Error("request could not be signed with `token` since the `token` is not defined");return h.headers.Authorization=`Bearer ${s.token}`,h}};zr(HS,"HttpBearerAuthSigner");var Ed=HS,DS=class r{async sign(f,s,w){return f}};zr(DS,"NoAuthSigner");var $d=DS,kS=zr((r)=>(f)=>yS(f)&&f.expiration.getTime()-Date.now()<r,"createIsIdentityExpiredFunction"),NS=300000,Id=kS(NS),yS=zr((r)=>r.expiration!==void 0,"doesIdentityRequireRefresh"),Fd=zr((r,f,s)=>{if(r===void 0)return;const w=typeof r!=="function"?async()=>Promise.resolve(r):r;let h,E,$,I=!1;const F=zr(async(U)=>{if(!E)E=w(U);try{h=await E,$=!0,I=!1}finally{E=void 0}return h},"coalesceProvider");if(f===void 0)return async(U)=>{if(!$||(U==null?void 0:U.forceRefresh))h=await F(U);return h};return async(U)=>{if(!$||(U==null?void 0:U.forceRefresh))h=await F(U);if(I)return h;if(!s(h))return I=!0,h;if(f(h))return await F(U),h;return h}},"memoizeIdentityProvider"),Ud=zr((r)=>r[p$.SMITHY_CONTEXT_KEY]||(r[p$.SMITHY_CONTEXT_KEY]={}),"getSmithyContext"),Td=zr((r)=>{if(typeof r==="function")return r;const f=Promise.resolve(r);return()=>f},"normalizeProvider"),Gd=Eh();zr(qS,"requestBuilder");var mS=class r{constructor(f,s){this.input=f,this.context=s,this.query={},this.method="",this.headers={},this.path="",this.body=null,this.hostname="",this.resolvePathStack=[]}async build(){const{hostname:f,protocol:s="https",port:w,path:h}=await this.context.endpoint();this.path=h;for(let E of this.resolvePathStack)E(this.path);return new t$.HttpRequest({protocol:s,hostname:this.hostname||f,port:w,method:this.method,path:this.path,query:this.query,body:this.body,headers:this.headers})}hn(f){return this.hostname=f,this}bp(f){return this.resolvePathStack.push((s)=>{this.path=`${(s==null?void 0:s.endsWith("/"))?s.slice(0,-1):s||""}`+f}),this}p(f,s,w,h){return this.resolvePathStack.push((E)=>{this.path=Gd.resolvedPath(E,this.input,f,s,w,h)}),this}h(f){return this.headers=f,this}q(f){return this.query=f,this}b(f){return this.body=f,this}m(f){return this.method=f,this}};zr(mS,"RequestBuilder");var vS=mS,Cd=zr(async(r,f,s,...w)=>{return await f.send(new r(s),...w)},"makePagedClientRequest");zr(jS,"createPaginator");var Ld=zr((r,f)=>{let s=r;const w=f.split(".");for(let h of w){if(!s||typeof s!=="object")return;s=s[h]}return s},"get")});function Ad(r){return(f)=>async(s)=>{const w=s.request;if(Qr.isInstance(w)){const{body:h,headers:E}=w;if(h&&Object.keys(E).map(($)=>$.toLowerCase()).indexOf(dS)===-1)try{const $=r(h);w.headers={...w.headers,[dS]:String($)}}catch($){}}return f({...s,request:w})}}var dS="content-length",Rd,lf=(r)=>({applyToStack:(f)=>{f.add(Ad(r.bodyLengthChecker),Rd)}});var Ih=G(()=>{qr();Rd={step:"build",tags:["SET_CONTENT_LENGTH","CONTENT_LENGTH"],name:"contentLengthMiddleware",override:!0}});var OS=async(r)=>{const f=r?.Bucket||"";if(typeof r.Bucket==="string")r.Bucket=f.replace(/#/g,encodeURIComponent("#")).replace(/\?/g,encodeURIComponent("?"));if(Xd(f)){if(r.ForcePathStyle===!0)throw new Error("Path-style addressing cannot be used with ARN buckets")}else if(!Pd(f)||f.indexOf(".")!==-1&&!String(r.Endpoint).startsWith("http:")||f.toLowerCase()!==f||f.length<3)r.ForcePathStyle=!0;if(r.DisableMultiRegionAccessPoints)r.disableMultiRegionAccessPoints=!0,r.DisableMRAP=!0;return r},Wd,zd,Sd,Pd=(r)=>Wd.test(r)&&!zd.test(r)&&!Sd.test(r),Xd=(r)=>{const[f,s,w,,,h]=r.split(":"),E=f==="arn"&&r.split(":").length>=6,$=Boolean(E&&s&&w&&h);if(E&&!$)throw new Error(`Invalid ARN: ${r} was an invalid ARN.`);return $};var bS=G(()=>{Wd=/^[a-z0-9][a-z0-9\.\-]{1,61}[a-z0-9]$/,zd=/(\d+\.){3}\d+/,Sd=/\.\./});var cS=G(()=>{bS()});var _S=(r,f,s)=>{const w=async()=>{const h=s[r]??s[f];if(typeof h==="function")return h();return h};if(r==="credentialScope"||f==="CredentialScope")return async()=>{const h=typeof s.credentials==="function"?await s.credentials():s.credentials;return h?.credentialScope??h?.CredentialScope};if(r==="accountId"||f==="AccountId")return async()=>{const h=typeof s.credentials==="function"?await s.credentials():s.credentials;return h?.accountId??h?.AccountId};if(r==="endpoint"||f==="endpoint")return async()=>{const h=await w();if(h&&typeof h==="object"){if("url"in h)return h.url.href;if("hostname"in h){const{protocol:E,hostname:$,port:I,path:F}=h;return`${E}//${$}${I?":"+I:""}${F}`}}return h};return w};var Bs;var Q1=G(()=>{Bs=class Bs extends Error{constructor(r,f=!0){let s,w=!0;if(typeof f==="boolean")s=void 0,w=f;else if(f!=null&&typeof f==="object")s=f.logger,w=f.tryNextLink??!0;super(r);this.name="ProviderError",this.tryNextLink=w,Object.setPrototypeOf(this,Bs.prototype),s?.debug?.(`@smithy/property-provider ${w?"->":"(!)"} ${r}`)}static from(r,f=!0){return Object.assign(new this(r.message,f),r)}}});var g;var gS=G(()=>{Q1();g=class g extends Bs{constructor(r,f=!0){super(r,f);this.name="CredentialsProviderError",Object.setPrototypeOf(this,g.prototype)}}});var Is;var xS=G(()=>{Q1();Is=class Is extends Bs{constructor(r,f=!0){super(r,f);this.name="TokenProviderError",Object.setPrototypeOf(this,Is.prototype)}}});var L0=(...r)=>async()=>{if(r.length===0)throw new Bs("No providers in chain");let f;for(let s of r)try{return await s()}catch(w){if(f=w,w?.tryNextLink)continue;throw w}throw f};var eS=G(()=>{Q1()});var nS=(r)=>()=>Promise.resolve(r);var Sw=(r,f,s)=>{let w,h,E,$=!1;const I=async()=>{if(!h)h=r();try{w=await h,E=!0,$=!1}finally{h=void 0}return w};if(f===void 0)return async(F)=>{if(!E||F?.forceRefresh)w=await I();return w};return async(F)=>{if(!E||F?.forceRefresh)w=await I();if($)return w;if(s&&!s(w))return $=!0,w;if(f(w))return await I(),w;return w}};var Lr=G(()=>{gS();Q1();xS();eS()});function r3(r){try{const f=new Set(Array.from(r.match(/([A-Z_]){3,}/g)??[]));return f.delete("CONFIG"),f.delete("CONFIG_PREFIX_SEPARATOR"),f.delete("ENV"),[...f].join(", ")}catch(f){return r}}var oS=(r,f)=>async()=>{try{const s=r(process.env);if(s===void 0)throw new Error;return s}catch(s){throw new g(s.message||`Not found in ENV: ${r3(r.toString())}`,{logger:f})}};var aS=G(()=>{Lr()});import{homedir as Yd}from"os";import{sep as Kd}from"path";var v5,Zd=()=>{if(process&&process.geteuid)return`${process.geteuid()}`;return"DEFAULT"},m0=()=>{const{HOME:r,USERPROFILE:f,HOMEPATH:s,HOMEDRIVE:w=`C:${Kd}`}=process.env;if(r)return r;if(f)return f;if(s)return`${w}${s}`;const h=Zd();if(!v5[h])v5[h]=Yd();return v5[h]};var Fh=G(()=>{v5={}});var pS="AWS_PROFILE",ls=(r)=>r.profile||process.env.AWS_PROFILE||"default";import{createHash as Md}from"crypto";import{join as Jd}from"path";var s3=(r)=>{const s=Md("sha1").update(r).digest("hex");return Jd(m0(),".aws","sso","cache",`${s}.json`)};var j5=G(()=>{Fh()});import{promises as Qd}from"fs";var Bd,f3=async(r)=>{const f=s3(r),s=await Bd(f,"utf8");return JSON.parse(s)};var uS=G(()=>{j5();({readFile:Bd}=Qd)});var i5,tS=(r)=>Object.entries(r).filter(([f])=>{const s=f.indexOf(Vs);if(s===-1)return!1;return Object.values(i5.IniSectionType).includes(f.substring(0,s))}).reduce((f,[s,w])=>{const h=s.indexOf(Vs),E=s.substring(0,h)===i5.IniSectionType.PROFILE?s.substring(h+1):s;return f[E]=w,f},{...r.default&&{default:r.default}});var rP=G(()=>{i5=u($s(),1);Uh()});import{join as ld}from"path";var Vd="AWS_CONFIG_FILE",w3=()=>process.env[Vd]||ld(m0(),".aws","config");var d5=G(()=>{Fh()});import{join as Hd}from"path";var Dd="AWS_SHARED_CREDENTIALS_FILE",sP=()=>process.env[Dd]||Hd(m0(),".aws","credentials");var fP=G(()=>{Fh()});var wP,kd,Nd,B1=(r)=>{const f={};let s,w;for(let h of r.split(/\r?\n/)){const E=h.split(/(^|\s)[;#]/)[0].trim();if(E[0]==="["&&E[E.length-1]==="]"){s=void 0,w=void 0;const I=E.substring(1,E.length-1),F=kd.exec(I);if(F){const[,U,,C]=F;if(Object.values(wP.IniSectionType).includes(U))s=[U,C].join(Vs)}else s=I;if(Nd.includes(I))throw new Error(`Found invalid profile name "${I}"`)}else if(s){const I=E.indexOf("=");if(![0,-1].includes(I)){const[F,U]=[E.substring(0,I).trim(),E.substring(I+1).trim()];if(U==="")w=F;else{if(w&&h.trimStart()===h)w=void 0;f[s]=f[s]||{};const C=w?[w,F].join(Vs):F;f[s][C]=U}}}}return f};var O5=G(()=>{wP=u($s(),1);Uh();kd=/^([\w-]+)\s(["'])?([\w-@\+\.%:/]+)\2$/,Nd=["__proto__","profile __proto__"]});import{promises as yd}from"fs";var qd,b5,l1=(r,f)=>{if(!b5[r]||f?.ignoreCache)b5[r]=qd(r,"utf8");return b5[r]};var c5=G(()=>{({readFile:qd}=yd),b5={}});import{join as hP}from"path";var EP=()=>({}),Vs=".",h3=async(r={})=>{const{filepath:f=sP(),configFilepath:s=w3()}=r,w=m0();let E=f;if(f.startsWith("~/"))E=hP(w,f.slice(2));let $=s;if(s.startsWith("~/"))$=hP(w,s.slice(2));const I=await Promise.all([l1($,{ignoreCache:r.ignoreCache}).then(B1).then(tS).catch(EP),l1(E,{ignoreCache:r.ignoreCache}).then(B1).catch(EP)]);return{configFile:I[0],credentialsFile:I[1]}};var Uh=G(()=>{rP();d5();fP();Fh();O5();c5()});var $P,IP=(r)=>Object.entries(r).filter(([f])=>f.startsWith($P.IniSectionType.SSO_SESSION+Vs)).reduce((f,[s,w])=>({...f,[s.substring(s.indexOf(Vs)+1)]:w}),{});var FP=G(()=>{$P=u($s(),1);Uh()});var md=()=>({}),E3=async(r={})=>l1(r.configFilepath??w3()).then(B1).then(IP).catch(md);var UP=G(()=>{d5();FP();O5();c5()});var TP=(...r)=>{const f={};for(let s of r)for(let[w,h]of Object.entries(s))if(f[w]!==void 0)Object.assign(f[w],h);else f[w]=h;return f};var v0=async(r)=>{const f=await h3(r);return TP(f.configFile,f.credentialsFile)};var GP=G(()=>{Uh()});var CP=()=>{};var rf=G(()=>{Fh();j5();uS();Uh();UP();GP();CP()});var LP=(r,{preferredFile:f="config",...s}={})=>async()=>{const w=ls(s),{configFile:h,credentialsFile:E}=await h3(s),$=E[w]||{},I=h[w]||{},F=f==="config"?{...$,...I}:{...I,...$};try{const C=r(F,f==="config"?h:E);if(C===void 0)throw new Error;return C}catch(U){throw new g(U.message||`Not found in config files w/ profile [${w}]: ${r3(r.toString())}`,{logger:s.logger})}};var AP=G(()=>{Lr();rf()});var vd=(r)=>typeof r==="function",RP=(r)=>vd(r)?async()=>await r():nS(r);var WP=G(()=>{Lr()});var t=({environmentVariableSelector:r,configFileSelector:f,default:s},w={})=>Sw(L0(oS(r),LP(f,w),RP(s)));var zP=G(()=>{Lr();aS();AP();WP()});var sf=G(()=>{zP()});var SP="AWS_ENDPOINT_URL",PP="endpoint_url",XP=(r)=>({environmentVariableSelector:(f)=>{const s=r.split(" ").map((E)=>E.toUpperCase()),w=f[[SP,...s].join("_")];if(w)return w;const h=f[SP];if(h)return h;return},configFileSelector:(f,s)=>{if(s&&f.services){const h=s[["services",f.services].join(Vs)];if(h){const E=r.split(" ").map((I)=>I.toLowerCase()),$=h[[E.join("_"),PP].join(Vs)];if($)return $}}const w=f[PP];if(w)return w;return},default:void 0});var YP=G(()=>{rf()});var KP=async(r)=>t(XP(r))();var ZP=G(()=>{sf();YP()});function MP(r){const f={};if(r=r.replace(/^\?/,""),r)for(let s of r.split("&")){let[w,h=null]=s.split("=");if(w=decodeURIComponent(w),h)h=decodeURIComponent(h);if(!(w in f))f[w]=h;else if(Array.isArray(f[w]))f[w].push(h);else f[w]=[f[w],h]}return f}var _r=(r)=>{if(typeof r==="string")return _r(new URL(r));const{hostname:f,pathname:s,port:w,protocol:h,search:E}=r;let $;if(E)$=MP(E);return{hostname:f,port:w?parseInt(w):void 0,protocol:h,path:s,query:$}};var j0=()=>{};var $3=(r)=>{if(typeof r==="object"){if("url"in r)return _r(r.url);return r}return _r(r)};var I3=G(()=>{j0()});var JP=async(r,f,s,w)=>{if(!s.endpoint){const $=await KP(s.serviceId||"");if($)s.endpoint=()=>Promise.resolve($3($))}const h=await jd(r,f,s);if(typeof s.endpointProvider!=="function")throw new Error("config.endpointProvider is not set.");return s.endpointProvider(h,w)},jd=async(r,f,s)=>{const w={},h=f?.getEndpointParameterInstructions?.()||{};for(let[E,$]of Object.entries(h))switch($.type){case"staticContextParams":w[E]=$.value;break;case"contextParams":w[E]=r[$.name];break;case"clientContextParams":case"builtInParams":w[E]=await _S($.name,E,s)();break;default:throw new Error("Unrecognized endpoint parameter instruction: "+JSON.stringify($))}if(Object.keys(h).length===0)Object.assign(w,s);if(String(s.serviceId).toLowerCase()==="s3")await OS(w);return w};var _5=G(()=>{cS();ZP();I3()});var QP=G(()=>{_5();I3()});var BP=({config:r,instructions:f})=>{return(s,w)=>async(h)=>{const E=await JP(h.input,{getEndpointParameterInstructions(){return f}},{...r},w);w.endpointV2=E,w.authSchemes=E.properties?.authSchemes;const $=w.authSchemes?.[0];if($){w.signing_region=$.signingRegion,w.signing_service=$.signingName;const F=Ks(w)?.selectedHttpAuthScheme?.httpAuthOption;if(F)F.signingProperties=Object.assign(F.signingProperties||{},{signing_region:$.signingRegion,signingRegion:$.signingRegion,signing_service:$.signingName,signingName:$.signingName,signingRegionSet:$.signingRegionSet},$.properties)}return s({...h})}};var g5=G(()=>{as();_5()});var lP=(r,f)=>(s)=>async(w)=>{const{response:h}=await s(w);try{const E=await f(h,r);return{response:h,output:E}}catch(E){if(Object.defineProperty(E,"$response",{value:h}),!("$metadata"in E)){if(E.message+="\n Deserialization error: to see the raw response, inspect the hidden field {error}.$response on this object.",typeof E.$responseBodyText!=="undefined"){if(E.$response)E.$response.body=E.$responseBodyText}}throw E}};var VP=(r,f)=>(s,w)=>async(h)=>{const E=w.endpointV2?.url&&r.urlParser?async()=>r.urlParser(w.endpointV2.url):r.endpoint;if(!E)throw new Error("No valid endpoint provider available.");const $=await f(h.input,{...r,endpoint:E});return s({...h,request:$})};function R(r,f,s){return{applyToStack:(w)=>{w.add(lP(r,s),id),w.add(VP(r,f),x5)}}}var id,x5;var HP=G(()=>{id={name:"deserializerMiddleware",step:"deserialize",tags:["DESERIALIZER"],override:!0},x5={name:"serializerMiddleware",step:"serialize",tags:["SERIALIZER"],override:!0}});var V=G(()=>{HP()});var dd,W=(r,f)=>({applyToStack:(s)=>{s.addRelativeTo(BP({config:r,instructions:f}),dd)}});var DP=G(()=>{V();g5();dd={step:"serialize",tags:["ENDPOINT_PARAMETERS","ENDPOINT_V2","ENDPOINT"],name:"endpointV2Middleware",override:!0,relation:"before",toMiddleware:x5.name}});var Vf=(r)=>{const f=r.tls??!0,{endpoint:s}=r,w=s!=null?async()=>$3(await Nr(s)()):void 0;return{...r,endpoint:w,tls:f,isCustomEndpoint:!!s,useDualstackEndpoint:Nr(r.useDualstackEndpoint??!1),useFipsEndpoint:Nr(r.useFipsEndpoint??!1)}};var kP=G(()=>{as();I3()});var NP=()=>{};var B=G(()=>{QP();g5();DP();kP();NP()});var Hs,Pw=3,Ds;var F3=G(()=>{(function(r){r.STANDARD="standard",r.ADAPTIVE="adaptive"})(Hs||(Hs={}));Ds=Hs.STANDARD});var yP,qP,mP,vP;var jP=G(()=>{yP=["BandwidthLimitExceeded","EC2ThrottledException","LimitExceededException","PriorRequestNotComplete","ProvisionedThroughputExceededException","RequestLimitExceeded","RequestThrottled","RequestThrottledException","SlowDown","ThrottledException","Throttling","ThrottlingException","TooManyRequestsException","TransactionInProgressException"],qP=["TimeoutError","RequestTimeout","RequestTimeoutException"],mP=[500,502,503,504],vP=["ECONNRESET","ECONNREFUSED","EPIPE","ETIMEDOUT"]});var Od=(r)=>r.$metadata?.clockSkewCorrected,Th=(r)=>r.$metadata?.httpStatusCode===429||yP.includes(r.name)||r.$retryable?.throttling==!0,U3=(r)=>Od(r)||qP.includes(r.name)||vP.includes(r?.code||"")||mP.includes(r.$metadata?.httpStatusCode||0),iP=(r)=>{if(r.$metadata?.httpStatusCode!==void 0){const f=r.$metadata.httpStatusCode;if(500<=f&&f<=599&&!U3(r))return!0;return!1}return!1};var V1=G(()=>{jP()});class T3{constructor(r){this.currentCapacity=0,this.enabled=!1,this.lastMaxRate=0,this.measuredTxRate=0,this.requestCount=0,this.lastTimestamp=0,this.timeWindow=0,this.beta=r?.beta??0.7,this.minCapacity=r?.minCapacity??1,this.minFillRate=r?.minFillRate??0.5,this.scaleConstant=r?.scaleConstant??0.4,this.smooth=r?.smooth??0.8;const f=this.getCurrentTimeInSeconds();this.lastThrottleTime=f,this.lastTxRateBucket=Math.floor(this.getCurrentTimeInSeconds()),this.fillRate=this.minFillRate,this.maxCapacity=this.minCapacity}getCurrentTimeInSeconds(){return Date.now()/1000}async getSendToken(){return this.acquireTokenBucket(1)}async acquireTokenBucket(r){if(!this.enabled)return;if(this.refillTokenBucket(),r>this.currentCapacity){const f=(r-this.currentCapacity)/this.fillRate*1000;await new Promise((s)=>setTimeout(s,f))}this.currentCapacity=this.currentCapacity-r}refillTokenBucket(){const r=this.getCurrentTimeInSeconds();if(!this.lastTimestamp){this.lastTimestamp=r;return}const f=(r-this.lastTimestamp)*this.fillRate;this.currentCapacity=Math.min(this.maxCapacity,this.currentCapacity+f),this.lastTimestamp=r}updateClientSendingRate(r){let f;if(this.updateMeasuredRate(),Th(r)){const w=!this.enabled?this.measuredTxRate:Math.min(this.measuredTxRate,this.fillRate);this.lastMaxRate=w,this.calculateTimeWindow(),this.lastThrottleTime=this.getCurrentTimeInSeconds(),f=this.cubicThrottle(w),this.enableTokenBucket()}else this.calculateTimeWindow(),f=this.cubicSuccess(this.getCurrentTimeInSeconds());const s=Math.min(f,2*this.measuredTxRate);this.updateTokenBucketRate(s)}calculateTimeWindow(){this.timeWindow=this.getPrecise(Math.pow(this.lastMaxRate*(1-this.beta)/this.scaleConstant,0.3333333333333333))}cubicThrottle(r){return this.getPrecise(r*this.beta)}cubicSuccess(r){return this.getPrecise(this.scaleConstant*Math.pow(r-this.lastThrottleTime-this.timeWindow,3)+this.lastMaxRate)}enableTokenBucket(){this.enabled=!0}updateTokenBucketRate(r){this.refillTokenBucket(),this.fillRate=Math.max(r,this.minFillRate),this.maxCapacity=Math.max(r,this.minCapacity),this.currentCapacity=Math.min(this.currentCapacity,this.maxCapacity)}updateMeasuredRate(){const r=this.getCurrentTimeInSeconds(),f=Math.floor(r*2)/2;if(this.requestCount++,f>this.lastTxRateBucket){const s=this.requestCount/(f-this.lastTxRateBucket);this.measuredTxRate=this.getPrecise(s*this.smooth+this.measuredTxRate*(1-this.smooth)),this.requestCount=0,this.lastTxRateBucket=f}}getPrecise(r){return parseFloat(r.toFixed(8))}}var e5=G(()=>{V1()});var Xw=100,H1=20000,n5=500,G3=500,o5=5,a5=10,p5=1,C3="amz-sdk-invocation-id",L3="amz-sdk-request";var dP=()=>{let r=Xw;return{computeNextBackoffDelay:(w)=>{return Math.floor(Math.min(H1,Math.random()*2**w*r))},setDelayBase:(w)=>{r=w}}};var OP=()=>{};var u5=({retryDelay:r,retryCount:f,retryCost:s})=>{return{getRetryCount:()=>f,getRetryDelay:()=>Math.min(H1,r),getRetryCost:()=>s}};var bP=()=>{};class Gh{constructor(r){this.maxAttempts=r,this.mode=Hs.STANDARD,this.capacity=G3,this.retryBackoffStrategy=dP(),this.maxAttemptsProvider=typeof r==="function"?r:async()=>r}async acquireInitialRetryToken(r){return u5({retryDelay:Xw,retryCount:0})}async refreshRetryTokenForRetry(r,f){const s=await this.getMaxAttempts();if(this.shouldRetry(r,f,s)){const w=f.errorType;this.retryBackoffStrategy.setDelayBase(w==="THROTTLING"?n5:Xw);const h=this.retryBackoffStrategy.computeNextBackoffDelay(r.getRetryCount()),E=f.retryAfterHint?Math.max(f.retryAfterHint.getTime()-Date.now()||0,h):h,$=this.getCapacityCost(w);return this.capacity-=$,u5({retryDelay:E,retryCount:r.getRetryCount()+1,retryCost:$})}throw new Error("No retry token available")}recordSuccess(r){this.capacity=Math.max(G3,this.capacity+(r.getRetryCost()??p5))}getCapacity(){return this.capacity}async getMaxAttempts(){try{return await this.maxAttemptsProvider()}catch(r){return console.warn(`Max attempts provider could not resolve. Using default of ${Pw}`),Pw}}shouldRetry(r,f,s){return r.getRetryCount()+1<s&&this.capacity>=this.getCapacityCost(f.errorType)&&this.isRetryableError(f.errorType)}getCapacityCost(r){return r==="TRANSIENT"?a5:o5}isRetryableError(r){return r==="THROTTLING"||r==="TRANSIENT"}}var A3=G(()=>{F3();OP();bP()});class t5{constructor(r,f){this.maxAttemptsProvider=r,this.mode=Hs.ADAPTIVE;const{rateLimiter:s}=f??{};this.rateLimiter=s??new T3,this.standardRetryStrategy=new Gh(r)}async acquireInitialRetryToken(r){return await this.rateLimiter.getSendToken(),this.standardRetryStrategy.acquireInitialRetryToken(r)}async refreshRetryTokenForRetry(r,f){return this.rateLimiter.updateClientSendingRate(f),this.standardRetryStrategy.refreshRetryTokenForRetry(r,f)}recordSuccess(r){this.rateLimiter.updateClientSendingRate({}),this.standardRetryStrategy.recordSuccess(r)}}var cP=G(()=>{F3();e5();A3()});var _P=G(()=>{A3()});var gP=()=>{};var Cs=G(()=>{cP();_P();e5();A3();F3();gP()});var Hf,Y1r,K1r,xP,Z1r,M1r,J1r,Q1r,B1r,l1r;var eP=G(()=>{Hf=u(pF(),1),Y1r=Hf.default.v1,K1r=Hf.default.v3,xP=Hf.default.v4,Z1r=Hf.default.v5,M1r=Hf.default.NIL,J1r=Hf.default.version,Q1r=Hf.default.validate,B1r=Hf.default.stringify,l1r=Hf.default.parse});var nP=G(()=>{Cs()});var rU=G(()=>{Cs()});var sU=G(()=>{V1()});var fU=(r)=>{if(r instanceof Error)return r;if(r instanceof Object)return Object.assign(new Error,r);if(typeof r==="string")return new Error(r);return new Error(`AWS SDK error wrapper for ${r}`)};var wU=G(()=>{qr();V1();Cs();nP();rU();sU()});var oP=G(()=>{Cs();wU()});var aP="AWS_MAX_ATTEMPTS",pP="max_attempts",Df,kf=(r)=>{const{retryStrategy:f}=r,s=Nr(r.maxAttempts??Pw);return{...r,maxAttempts:s,retryStrategy:async()=>{if(f)return f;if(await Nr(r.retryMode)()===Hs.ADAPTIVE)return new t5(s);return new Gh(s)}}},bd="AWS_RETRY_MODE",cd="retry_mode",Nf;var uP=G(()=>{as();Cs();Df={environmentVariableSelector:(r)=>{const f=r[aP];if(!f)return;const s=parseInt(f);if(Number.isNaN(s))throw new Error(`Environment variable ${aP} mast be a number, got "${f}"`);return s},configFileSelector:(r)=>{const f=r[pP];if(!f)return;const s=parseInt(f);if(Number.isNaN(s))throw new Error(`Shared config file entry ${pP} mast be a number, got "${f}"`);return s},default:Pw},Nf={environmentVariableSelector:(r)=>r[bd],configFileSelector:(r)=>r[cd],default:Ds}});var tP=G(()=>{qr();Cs()});class Ls{trace(){}debug(){}info(){}warn(){}error(){}}var Yw=(r,f)=>{const s=[];if(r)s.push(r);if(f)for(let w of f)s.push(w);return s},i0=(r,f)=>{return`${r||"anonymous"}${f&&f.length>0?` (a.k.a. ${f.join(",")})`:""}`},Ch=()=>{let r=[],f=[],s=!1;const w=new Set,h=(L)=>L.sort((z,S)=>rX[S.step]-rX[z.step]||sX[S.priority||"normal"]-sX[z.priority||"normal"]),E=(L)=>{let z=!1;const S=(K)=>{const k=Yw(K.name,K.aliases);if(k.includes(L)){z=!0;for(let l of k)w.delete(l);return!1}return!0};return r=r.filter(S),f=f.filter(S),z},$=(L)=>{let z=!1;const S=(K)=>{if(K.middleware===L){z=!0;for(let k of Yw(K.name,K.aliases))w.delete(k);return!1}return!0};return r=r.filter(S),f=f.filter(S),z},I=(L)=>{return r.forEach((z)=>{L.add(z.middleware,{...z})}),f.forEach((z)=>{L.addRelativeTo(z.middleware,{...z})}),L.identifyOnResolve?.(C.identifyOnResolve()),L},F=(L)=>{const z=[];return L.before.forEach((S)=>{if(S.before.length===0&&S.after.length===0)z.push(S);else z.push(...F(S))}),z.push(L),L.after.reverse().forEach((S)=>{if(S.before.length===0&&S.after.length===0)z.push(S);else z.push(...F(S))}),z},U=(L=!1)=>{const z=[],S=[],K={};return r.forEach((l)=>{const Q={...l,before:[],after:[]};for(let N of Yw(Q.name,Q.aliases))K[N]=Q;z.push(Q)}),f.forEach((l)=>{const Q={...l,before:[],after:[]};for(let N of Yw(Q.name,Q.aliases))K[N]=Q;S.push(Q)}),S.forEach((l)=>{if(l.toMiddleware){const Q=K[l.toMiddleware];if(Q===void 0){if(L)return;throw new Error(`${l.toMiddleware} is not found when adding ${i0(l.name,l.aliases)} middleware ${l.relation} ${l.toMiddleware}`)}if(l.relation==="after")Q.after.push(l);if(l.relation==="before")Q.before.push(l)}}),h(z).map(F).reduce((l,Q)=>{return l.push(...Q),l},[])},C={add:(L,z={})=>{const{name:S,override:K,aliases:k}=z,l={step:"initialize",priority:"normal",middleware:L,...z},Q=Yw(S,k);if(Q.length>0){if(Q.some((N)=>w.has(N))){if(!K)throw new Error(`Duplicate middleware name '${i0(S,k)}'`);for(let N of Q){const x=r.findIndex((hr)=>hr.name===N||hr.aliases?.some((Dr)=>Dr===N));if(x===-1)continue;const e=r[x];if(e.step!==l.step||l.priority!==e.priority)throw new Error(`"${i0(e.name,e.aliases)}" middleware with ${e.priority} priority in ${e.step} step cannot be overridden by "${i0(S,k)}" middleware with ${l.priority} priority in ${l.step} step.`);r.splice(x,1)}}for(let N of Q)w.add(N)}r.push(l)},addRelativeTo:(L,z)=>{const{name:S,override:K,aliases:k}=z,l={middleware:L,...z},Q=Yw(S,k);if(Q.length>0){if(Q.some((N)=>w.has(N))){if(!K)throw new Error(`Duplicate middleware name '${i0(S,k)}'`);for(let N of Q){const x=f.findIndex((hr)=>hr.name===N||hr.aliases?.some((Dr)=>Dr===N));if(x===-1)continue;const e=f[x];if(e.toMiddleware!==l.toMiddleware||e.relation!==l.relation)throw new Error(`"${i0(e.name,e.aliases)}" middleware ${e.relation} "${e.toMiddleware}" middleware cannot be overridden by "${i0(S,k)}" middleware ${l.relation} "${l.toMiddleware}" middleware.`);f.splice(x,1)}}for(let N of Q)w.add(N)}f.push(l)},clone:()=>I(Ch()),use:(L)=>{L.applyToStack(C)},remove:(L)=>{if(typeof L==="string")return E(L);else return $(L)},removeByTag:(L)=>{let z=!1;const S=(K)=>{const{tags:k,name:l,aliases:Q}=K;if(k&&k.includes(L)){const N=Yw(l,Q);for(let x of N)w.delete(x);return z=!0,!1}return!0};return r=r.filter(S),f=f.filter(S),z},concat:(L)=>{const z=I(Ch());return z.use(L),z.identifyOnResolve(s||z.identifyOnResolve()||(L.identifyOnResolve?.()??!1)),z},applyToStack:I,identify:()=>{return U(!0).map((L)=>{const z=L.step??L.relation+" "+L.toMiddleware;return i0(L.name,L.aliases)+" - "+z})},identifyOnResolve(L){if(typeof L==="boolean")s=L;return s},resolve:(L,z)=>{for(let S of U().map((K)=>K.middleware).reverse())L=S(L,z);if(s)console.log(C.identify());return L}};return C},rX,sX;var fX=G(()=>{rX={initialize:5,serialize:4,build:3,finalizeRequest:2,deserialize:1},sX={high:3,normal:2,low:1}});var hU=G(()=>{fX()});class As{constructor(r){this.middlewareStack=Ch(),this.config=r}send(r,f,s){const w=typeof f!=="function"?f:void 0,h=typeof f==="function"?f:s,E=r.resolveMiddleware(this.middlewareStack,this.config,w);if(h)E(r).then(($)=>h(null,$.output),($)=>h($)).catch(()=>{});else return E(r).then(($)=>$.output)}destroy(){if(this.config.requestHandler.destroy)this.config.requestHandler.destroy()}}var wX=G(()=>{hU()});var R3,gr=async(r=new Uint8Array,f)=>{if(r instanceof Uint8Array)return R3.Uint8ArrayBlobAdapter.mutate(r);if(!r)return R3.Uint8ArrayBlobAdapter.mutate(new Uint8Array);const s=f.streamCollector(r);return R3.Uint8ArrayBlobAdapter.mutate(await s)};var hX=G(()=>{R3=u(g$(),1)});class A{constructor(){this.middlewareStack=Ch()}static classBuilder(){return new $X}resolveMiddlewareWithContext(r,f,s,{middlewareFn:w,clientName:h,commandName:E,inputFilterSensitiveLog:$,outputFilterSensitiveLog:I,smithyContext:F,additionalContext:U,CommandCtor:C}){for(let k of w.bind(this)(C,r,f,s))this.middlewareStack.use(k);const L=r.concat(this.middlewareStack),{logger:z}=f,S={logger:z,clientName:h,commandName:E,inputFilterSensitiveLog:$,outputFilterSensitiveLog:I,[EX.SMITHY_CONTEXT_KEY]:{commandInstance:this,...F},...U},{requestHandler:K}=f;return L.resolve((k)=>K.handle(k.request,s||{}),S)}}class $X{constructor(){this._init=()=>{},this._ep={},this._middlewareFn=()=>[],this._commandName="",this._clientName="",this._additionalContext={},this._smithyContext={},this._inputFilterSensitiveLog=(r)=>r,this._outputFilterSensitiveLog=(r)=>r,this._serializer=null,this._deserializer=null}init(r){this._init=r}ep(r){return this._ep=r,this}m(r){return this._middlewareFn=r,this}s(r,f,s={}){return this._smithyContext={service:r,operation:f,...s},this}c(r={}){return this._additionalContext=r,this}n(r,f){return this._clientName=r,this._commandName=f,this}f(r=(s)=>s,f=(s)=>s){return this._inputFilterSensitiveLog=r,this._outputFilterSensitiveLog=f,this}ser(r){return this._serializer=r,this}de(r){return this._deserializer=r,this}build(){const r=this;let f;return f=class extends A{static getEndpointParameterInstructions(){return r._ep}constructor(...[s]){super();this.serialize=r._serializer,this.deserialize=r._deserializer,this.input=s??{},r._init(this)}resolveMiddleware(s,w,h){return this.resolveMiddlewareWithContext(s,w,h,{CommandCtor:f,middlewareFn:r._middlewareFn,clientName:r._clientName,commandName:r._commandName,inputFilterSensitiveLog:r._inputFilterSensitiveLog,outputFilterSensitiveLog:r._outputFilterSensitiveLog,smithyContext:r._smithyContext,additionalContext:r._additionalContext})}}}}var EX;var IX=G(()=>{hU();EX=u($s(),1)});var o="***SensitiveInformation***";var yf=(r,f)=>{for(let s of Object.keys(r)){const w=r[s],h=async function($,I,F){const U=new w($);if(typeof I==="function")this.send(U,I);else if(typeof F==="function"){if(typeof I!=="object")throw new Error(`Expected http options but got ${typeof I}`);this.send(U,I||{},F)}else return this.send(U,I)},E=(s[0].toLowerCase()+s.slice(1)).replace(/Command$/,"");f.prototype[E]=h}};var yr=(r)=>{switch(r){case"true":return!0;case"false":return!1;default:throw new Error(`Unable to parse boolean value "${r}"`)}},d0=(r)=>{if(r===null||r===void 0)return;if(typeof r==="number"){if(r===0||r===1)z3.warn(W3(`Expected boolean, got ${typeof r}: ${r}`));if(r===0)return!1;if(r===1)return!0}if(typeof r==="string"){const f=r.toLowerCase();if(f==="false"||f==="true")z3.warn(W3(`Expected boolean, got ${typeof r}: ${r}`));if(f==="false")return!1;if(f==="true")return!0}if(typeof r==="boolean")return r;throw new TypeError(`Expected boolean, got ${typeof r}: ${r}`)},Fs=(r)=>{if(r===null||r===void 0)return;if(typeof r==="string"){const f=parseFloat(r);if(!Number.isNaN(f)){if(String(f)!==String(r))z3.warn(W3(`Expected number but observed string: ${r}`));return f}}if(typeof r==="number")return r;throw new TypeError(`Expected number, got ${typeof r}: ${r}`)},_d,FX=(r)=>{const f=Fs(r);if(f!==void 0&&!Number.isNaN(f)&&f!==1/0&&f!==-1/0){if(Math.abs(f)>_d)throw new TypeError(`Expected 32-bit float, got ${r}`)}return f},Lh=(r)=>{if(r===null||r===void 0)return;if(Number.isInteger(r)&&!Number.isNaN(r))return r;throw new TypeError(`Expected integer, got ${typeof r}: ${r}`)},Kw=(r)=>EU(r,32),UX=(r)=>EU(r,16),TX=(r)=>EU(r,8),EU=(r,f)=>{const s=Lh(r);if(s!==void 0&&gd(s,f)!==s)throw new TypeError(`Expected ${f}-bit integer, got ${r}`);return s},gd=(r,f)=>{switch(f){case 32:return Int32Array.of(r)[0];case 16:return Int16Array.of(r)[0];case 8:return Int8Array.of(r)[0]}},y=(r,f)=>{if(r===null||r===void 0){if(f)throw new TypeError(`Expected a non-null value for ${f}`);throw new TypeError("Expected a non-null value")}return r},d=(r)=>{if(r===null||r===void 0)return;if(typeof r==="object"&&!Array.isArray(r))return r;const f=Array.isArray(r)?"array":typeof r;throw new TypeError(`Expected object, got ${f}: ${r}`)},T=(r)=>{if(r===null||r===void 0)return;if(typeof r==="string")return r;if(["boolean","number","bigint"].includes(typeof r))return z3.warn(W3(`Expected string, got ${typeof r}: ${r}`)),String(r);throw new TypeError(`Expected string, got ${typeof r}: ${r}`)},$U=(r)=>{if(typeof r=="string")return Fs(Ah(r));return Fs(r)},GX,CX=(r)=>{if(typeof r=="string")return FX(Ah(r));return FX(r)},xd,Ah=(r)=>{const f=r.match(xd);if(f===null||f[0].length!==r.length)throw new TypeError("Expected real number, got implicit NaN");return parseFloat(r)},IU=(r)=>{if(typeof r=="string")return ed(r);return Fs(r)},ed=(r)=>{switch(r){case"NaN":return NaN;case"Infinity":return 1/0;case"-Infinity":return-1/0;default:throw new Error(`Unable to parse float value: ${r}`)}},xr=(r)=>{if(typeof r==="string")return Lh(Ah(r));return Lh(r)},Er=(r)=>{if(typeof r==="string")return Kw(Ah(r));return Kw(r)},FU=(r)=>{if(typeof r==="string")return UX(Ah(r));return UX(r)},LX=(r)=>{if(typeof r==="string")return TX(Ah(r));return TX(r)},W3=(r)=>{return String(new TypeError(r).stack||r).split("\n").slice(0,5).filter((f)=>!f.includes("stackTraceWarning")).join("\n")},z3;var UU=G(()=>{_d=Math.ceil(340282346638528860000000000000000000000),GX=$U,xd=/(-?(?:0|[1-9]\d*)(?:\.\d+)?(?:[eE][+-]?\d+)?)|(-?Infinity)|(NaN)/g,z3={warn:console.warn}});var nd,od,AX=(r)=>{if(r===null||r===void 0)return;if(typeof r!=="string")throw new TypeError("RFC-3339 date-times must be expressed as strings");const f=od.exec(r);if(!f)throw new TypeError("Invalid RFC-3339 date-time value");const[s,w,h,E,$,I,F,U]=f,C=FU(TU(w)),L=Zw(h,"month",1,12),z=Zw(E,"day",1,31);return RX(C,L,z,{hours:$,minutes:I,seconds:F,fractionalMilliseconds:U})},ad,Mw=(r)=>{if(r===null||r===void 0)return;if(typeof r!=="string")throw new TypeError("RFC-3339 date-times must be expressed as strings");const f=ad.exec(r);if(!f)throw new TypeError("Invalid RFC-3339 date-time value");const[s,w,h,E,$,I,F,U,C]=f,L=FU(TU(w)),z=Zw(h,"month",1,12),S=Zw(E,"day",1,31),K=RX(L,z,S,{hours:$,minutes:I,seconds:F,fractionalMilliseconds:U});if(C.toUpperCase()!="Z")K.setTime(K.getTime()-sO(C));return K},XEr,YEr,KEr,qf=(r)=>{if(r===null||r===void 0)return;let f;if(typeof r==="number")f=r;else if(typeof r==="string")f=$U(r);else if(typeof r==="object"&&r.tag===1)f=r.value;else throw new TypeError("Epoch timestamps must be expressed as floating point numbers or their string representation");if(Number.isNaN(f)||f===1/0||f===-1/0)throw new TypeError("Epoch timestamps must be valid, non-Infinite, non-NaN numerics");return new Date(Math.round(f*1000))},RX=(r,f,s,w)=>{const h=f-1;return ud(r,h,s),new Date(Date.UTC(r,h,s,Zw(w.hours,"hour",0,23),Zw(w.minutes,"minute",0,59),Zw(w.seconds,"seconds",0,60),rO(w.fractionalMilliseconds)))},pd,ud=(r,f,s)=>{let w=pd[f];if(f===1&&td(r))w=29;if(s>w)throw new TypeError(`Invalid day for ${nd[f]} in ${r}: ${s}`)},td=(r)=>{return r%4===0&&(r%100!==0||r%400===0)},Zw=(r,f,s,w)=>{const h=LX(TU(r));if(h<s||h>w)throw new TypeError(`${f} must be between ${s} and ${w}, inclusive`);return h},rO=(r)=>{if(r===null||r===void 0)return 0;return CX("0."+r)*1000},sO=(r)=>{const f=r[0];let s=1;if(f=="+")s=1;else if(f=="-")s=-1;else throw new TypeError(`Offset direction, ${f}, must be "+" or "-"`);const w=Number(r.substring(1,3)),h=Number(r.substring(4,6));return s*(w*60+h)*60*1000},TU=(r)=>{let f=0;while(f<r.length-1&&r.charAt(f)==="0")f++;if(f===0)return r;return r.slice(f)};var WX=G(()=>{UU();nd=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],od=new RegExp(/^(\d{4})-(\d{2})-(\d{2})[tT](\d{2}):(\d{2}):(\d{2})(?:\.(\d+))?[zZ]$/),ad=new RegExp(/^(\d{4})-(\d{2})-(\d{2})[tT](\d{2}):(\d{2}):(\d{2})(?:\.(\d+))?(([-+]\d{2}\:\d{2})|[zZ])$/),XEr=new RegExp(/^(?:Mon|Tue|Wed|Thu|Fri|Sat|Sun), (\d{2}) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) (\d{4}) (\d{1,2}):(\d{2}):(\d{2})(?:\.(\d+))? GMT$/),YEr=new RegExp(/^(?:Monday|Tuesday|Wednesday|Thursday|Friday|Saturday|Sunday), (\d{2})-(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)-(\d{2}) (\d{1,2}):(\d{2}):(\d{2})(?:\.(\d+))? GMT$/),KEr=new RegExp(/^(?:Mon|Tue|Wed|Thu|Fri|Sat|Sun) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) ( [1-9]|\d{2}) (\d{1,2}):(\d{2}):(\d{2})(?:\.(\d+))? (\d{4})$/),pd=[31,28,31,30,31,30,31,31,30,31,30,31]});var ks,D=(r,f={})=>{Object.entries(f).filter(([,w])=>w!==void 0).forEach(([w,h])=>{if(r[w]==null||r[w]==="")r[w]=h});const s=r.message||r.Message||"UnknownError";return r.message=s,delete r.Message,r};var GU=G(()=>{ks=class ks extends Error{constructor(r){super(r.message);Object.setPrototypeOf(this,ks.prototype),this.name=r.name,this.$fault=r.$fault,this.$metadata=r.$metadata}}});var fO=({output:r,parsedBody:f,exceptionCtor:s,errorCode:w})=>{const h=wO(r),E=h.httpStatusCode?h.httpStatusCode+"":void 0,$=new s({name:f?.code||f?.Code||w||E||"UnknownError",$fault:"client",$metadata:h});throw D($,f)},mf=(r)=>{return({output:f,parsedBody:s,errorCode:w})=>{fO({output:f,parsedBody:s,exceptionCtor:r,errorCode:w})}},wO=(r)=>({httpStatusCode:r.statusCode,requestId:r.headers["x-amzn-requestid"]??r.headers["x-amzn-request-id"]??r.headers["x-amz-request-id"],extendedRequestId:r.headers["x-amz-id-2"],cfId:r.headers["x-amz-cf-id"]});var zX=G(()=>{GU()});var vf=(r)=>{switch(r){case"standard":return{retryMode:"standard",connectionTimeout:3100};case"in-region":return{retryMode:"standard",connectionTimeout:1100};case"cross-region":return{retryMode:"standard",connectionTimeout:3100};case"mobile":return{retryMode:"standard",connectionTimeout:30000};default:return{}}};var SX=!1,jf=(r)=>{if(r&&!SX&&parseInt(r.substring(1,r.indexOf(".")))<16)SX=!0};var CU,PX=(r)=>{const f=[];for(let s in CU.AlgorithmId){const w=CU.AlgorithmId[s];if(r[w]===void 0)continue;f.push({algorithmId:()=>w,checksumConstructor:()=>r[w]})}return{_checksumAlgorithms:f,addChecksumAlgorithm(s){this._checksumAlgorithms.push(s)},checksumAlgorithms(){return this._checksumAlgorithms}}},XX=(r)=>{const f={};return r.checksumAlgorithms().forEach((s)=>{f[s.algorithmId()]=s.checksumConstructor()}),f};var YX=G(()=>{CU=u($s(),1)});var KX=(r)=>{let f=r.retryStrategy;return{setRetryStrategy(s){f=s},retryStrategy(){return f}}},ZX=(r)=>{const f={};return f.retryStrategy=r.retryStrategy(),f};var df=(r)=>{return{...PX(r),...KX(r)}},Of=(r)=>{return{...XX(r),...ZX(r)}};var MX=G(()=>{YX()});var JX=G(()=>{MX()});function S3(r){return encodeURIComponent(r).replace(/[!'()*]/g,function(f){return"%"+f.charCodeAt(0).toString(16).toUpperCase()})}var Cr=(r)=>Array.isArray(r)?r:[r];var LU=function(){const r=Object.getPrototypeOf(this).constructor,s=new(Function.bind.apply(String,[null,...arguments]));return Object.setPrototypeOf(s,r.prototype),s};var QX=G(()=>{LU.prototype=Object.create(String.prototype,{constructor:{value:LU,enumerable:!1,writable:!0,configurable:!0}});Object.setPrototypeOf(LU,String)});function P(r,f,s){let w,h,E;if(typeof f==="undefined"&&typeof s==="undefined")w={},E=r;else if(w=r,typeof f==="function")return h=f,E=s,hO(w,h,E);else E=f;for(let $ of Object.keys(E)){if(!Array.isArray(E[$])){w[$]=E[$];continue}BX(w,null,E,$)}return w}var p=(r,f)=>{const s={};for(let w in f)BX(s,r,f,w);return s},hO=(r,f,s)=>{return P(r,Object.entries(s).reduce((w,[h,E])=>{if(Array.isArray(E))w[h]=E;else if(typeof E==="function")w[h]=[f,E()];else w[h]=[f,E];return w},{}))},BX=(r,f,s,w)=>{if(f!==null){let $=s[w];if(typeof $==="function")$=[,$];const[I=EO,F=$O,U=w]=$;if(typeof I==="function"&&I(f[U])||typeof I!=="function"&&!!I)r[w]=F(f[U]);return}let[h,E]=s[w];if(typeof E==="function"){let $;const I=h===void 0&&($=E())!=null,F=typeof h==="function"&&!!h(void 0)||typeof h!=="function"&&!!h;if(I)r[w]=$;else if(F)r[w]=E()}else{const $=h===void 0&&E!=null,I=typeof h==="function"&&!!h(E)||typeof h!=="function"&&!!h;if($||I)r[w]=E}},EO=(r)=>r!=null,$O=(r)=>r;var lX=()=>{};var VX=(r)=>{if(r!==r)return"NaN";switch(r){case 1/0:return"Infinity";case-1/0:return"-Infinity";default:return r}};var q=(r)=>{if(r==null)return{};if(Array.isArray(r))return r.filter((f)=>f!=null).map(q);if(typeof r==="object"){const f={};for(let s of Object.keys(r)){if(r[s]==null)continue;f[s]=q(r[s])}return f}return r};var Y=G(()=>{wX();hX();IX();WX();zX();JX();GU();QX();UU();lX()});import{Readable as IO}from"stream";var HX=(r)=>r?.body instanceof IO||typeof ReadableStream!=="undefined"&&r?.body instanceof ReadableStream;var DX=()=>{};var FO=(r)=>(f,s)=>async(w)=>{let h=await r.retryStrategy();const E=await r.maxAttempts();if(UO(h)){h=h;let $=await h.acquireInitialRetryToken(s.partition_id),I=new Error,F=0,U=0;const{request:C}=w,L=Qr.isInstance(C);if(L)C.headers[C3]=xP();while(!0)try{if(L)C.headers[L3]=`attempt=${F+1}; max=${E}`;const{response:z,output:S}=await f(w);return h.recordSuccess($),S.$metadata.attempts=F+1,S.$metadata.totalRetryDelay=U,{response:z,output:S}}catch(z){const S=TO(z);if(I=fU(z),L&&HX(C))throw(s.logger instanceof Ls?console:s.logger)?.warn("An error was encountered in a non-retryable streaming request."),I;try{$=await h.refreshRetryTokenForRetry($,S)}catch(k){if(!I.$metadata)I.$metadata={};throw I.$metadata.attempts=F+1,I.$metadata.totalRetryDelay=U,I}F=$.getRetryCount();const K=$.getRetryDelay();U+=K,await new Promise((k)=>setTimeout(k,K))}}else{if(h=h,h?.mode)s.userAgent=[...s.userAgent||[],["cfg/retry-mode",h.mode]];return h.retry(f,w)}},UO=(r)=>typeof r.acquireInitialRetryToken!=="undefined"&&typeof r.refreshRetryTokenForRetry!=="undefined"&&typeof r.recordSuccess!=="undefined",TO=(r)=>{const f={error:r,errorType:GO(r)},s=LO(r.$response);if(s)f.retryAfterHint=s;return f},GO=(r)=>{if(Th(r))return"THROTTLING";if(U3(r))return"TRANSIENT";if(iP(r))return"SERVER_ERROR";return"CLIENT_ERROR"},CO,bf=(r)=>({applyToStack:(f)=>{f.add(FO(r),CO)}}),LO=(r)=>{if(!Gw.isInstance(r))return;const f=Object.keys(r.headers).find((E)=>E.toLowerCase()==="retry-after");if(!f)return;const s=r.headers[f],w=Number(s);if(!Number.isNaN(w))return new Date(w*1000);return new Date(s)};var kX=G(()=>{qr();V1();Y();Cs();eP();DX();CO={name:"retryMiddleware",tags:["RETRY"],step:"finalizeRequest",priority:"high",override:!0}});var ff=G(()=>{oP();wU();uP();rU();tP();sU();kX()});var $Y=j((N$r,Y3)=>{var NX,yX,qX,mX,vX,jX,iX,dX,OX,bX,cX,_X,gX,P3,AU,xX,eX,nX,Rh,oX,aX,pX,uX,tX,rY,sY,fY,wY,X3,hY,EY;(function(r){var f=typeof global==="object"?global:typeof self==="object"?self:typeof this==="object"?this:{};if(typeof define==="function"&&define.amd)define("tslib",["exports"],function(w){r(s(f,s(w)))});else if(typeof Y3==="object"&&typeof N$r==="object")r(s(f,s(N$r)));else r(s(f));function s(w,h){if(w!==f)if(typeof Object.create==="function")Object.defineProperty(w,"__esModule",{value:!0});else w.__esModule=!0;return function(E,$){return w[E]=h?h(E,$):$}}})(function(r){var f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(h,E){h.__proto__=E}||function(h,E){for(var $ in E)if(Object.prototype.hasOwnProperty.call(E,$))h[$]=E[$]};NX=function(h,E){if(typeof E!=="function"&&E!==null)throw new TypeError("Class extends value "+String(E)+" is not a constructor or null");f(h,E);function $(){this.constructor=h}h.prototype=E===null?Object.create(E):($.prototype=E.prototype,new $)},yX=Object.assign||function(h){for(var E,$=1,I=arguments.length;$<I;$++){E=arguments[$];for(var F in E)if(Object.prototype.hasOwnProperty.call(E,F))h[F]=E[F]}return h},qX=function(h,E){var $={};for(var I in h)if(Object.prototype.hasOwnProperty.call(h,I)&&E.indexOf(I)<0)$[I]=h[I];if(h!=null&&typeof Object.getOwnPropertySymbols==="function"){for(var F=0,I=Object.getOwnPropertySymbols(h);F<I.length;F++)if(E.indexOf(I[F])<0&&Object.prototype.propertyIsEnumerable.call(h,I[F]))$[I[F]]=h[I[F]]}return $},mX=function(h,E,$,I){var F=arguments.length,U=F<3?E:I===null?I=Object.getOwnPropertyDescriptor(E,$):I,C;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")U=Reflect.decorate(h,E,$,I);else for(var L=h.length-1;L>=0;L--)if(C=h[L])U=(F<3?C(U):F>3?C(E,$,U):C(E,$))||U;return F>3&&U&&Object.defineProperty(E,$,U),U},vX=function(h,E){return function($,I){E($,I,h)}},jX=function(h,E,$,I,F,U){function C(hr){if(hr!==void 0&&typeof hr!=="function")throw new TypeError("Function expected");return hr}var L=I.kind,z=L==="getter"?"get":L==="setter"?"set":"value",S=!E&&h?I.static?h:h.prototype:null,K=E||(S?Object.getOwnPropertyDescriptor(S,I.name):{}),k,l=!1;for(var Q=$.length-1;Q>=0;Q--){var N={};for(var x in I)N[x]=x==="access"?{}:I[x];for(var x in I.access)N.access[x]=I.access[x];N.addInitializer=function(hr){if(l)throw new TypeError("Cannot add initializers after decoration has completed");U.push(C(hr||null))};var e=$[Q](L==="accessor"?{get:K.get,set:K.set}:K[z],N);if(L==="accessor"){if(e===void 0)continue;if(e===null||typeof e!=="object")throw new TypeError("Object expected");if(k=C(e.get))K.get=k;if(k=C(e.set))K.set=k;if(k=C(e.init))F.unshift(k)}else if(k=C(e))if(L==="field")F.unshift(k);else K[z]=k}if(S)Object.defineProperty(S,I.name,K);l=!0},iX=function(h,E,$){var I=arguments.length>2;for(var F=0;F<E.length;F++)$=I?E[F].call(h,$):E[F].call(h);return I?$:void 0},dX=function(h){return typeof h==="symbol"?h:"".concat(h)},OX=function(h,E,$){if(typeof E==="symbol")E=E.description?"[".concat(E.description,"]"):"";return Object.defineProperty(h,"name",{configurable:!0,value:$?"".concat($," ",E):E})},bX=function(h,E){if(typeof Reflect==="object"&&typeof Reflect.metadata==="function")return Reflect.metadata(h,E)},cX=function(h,E,$,I){function F(U){return U instanceof $?U:new $(function(C){C(U)})}return new($||($=Promise))(function(U,C){function L(K){try{S(I.next(K))}catch(k){C(k)}}function z(K){try{S(I.throw(K))}catch(k){C(k)}}function S(K){K.done?U(K.value):F(K.value).then(L,z)}S((I=I.apply(h,E||[])).next())})},_X=function(h,E){var $={label:0,sent:function(){if(U[0]&1)throw U[1];return U[1]},trys:[],ops:[]},I,F,U,C;return C={next:L(0),throw:L(1),return:L(2)},typeof Symbol==="function"&&(C[Symbol.iterator]=function(){return this}),C;function L(S){return function(K){return z([S,K])}}function z(S){if(I)throw new TypeError("Generator is already executing.");while(C&&(C=0,S[0]&&($=0)),$)try{if(I=1,F&&(U=S[0]&2?F.return:S[0]?F.throw||((U=F.return)&&U.call(F),0):F.next)&&!(U=U.call(F,S[1])).done)return U;if(F=0,U)S=[S[0]&2,U.value];switch(S[0]){case 0:case 1:U=S;break;case 4:return $.label++,{value:S[1],done:!1};case 5:$.label++,F=S[1],S=[0];continue;case 7:S=$.ops.pop(),$.trys.pop();continue;default:if((U=$.trys,!(U=U.length>0&&U[U.length-1]))&&(S[0]===6||S[0]===2)){$=0;continue}if(S[0]===3&&(!U||S[1]>U[0]&&S[1]<U[3])){$.label=S[1];break}if(S[0]===6&&$.label<U[1]){$.label=U[1],U=S;break}if(U&&$.label<U[2]){$.label=U[2],$.ops.push(S);break}if(U[2])$.ops.pop();$.trys.pop();continue}S=E.call(h,$)}catch(K){S=[6,K],F=0}finally{I=U=0}if(S[0]&5)throw S[1];return{value:S[0]?S[1]:void 0,done:!0}}},gX=function(h,E){for(var $ in h)if($!=="default"&&!Object.prototype.hasOwnProperty.call(E,$))X3(E,h,$)},X3=Object.create?function(h,E,$,I){if(I===void 0)I=$;var F=Object.getOwnPropertyDescriptor(E,$);if(!F||("get"in F?!E.__esModule:F.writable||F.configurable))F={enumerable:!0,get:function(){return E[$]}};Object.defineProperty(h,I,F)}:function(h,E,$,I){if(I===void 0)I=$;h[I]=E[$]},P3=function(h){var E=typeof Symbol==="function"&&Symbol.iterator,$=E&&h[E],I=0;if($)return $.call(h);if(h&&typeof h.length==="number")return{next:function(){if(h&&I>=h.length)h=void 0;return{value:h&&h[I++],done:!h}}};throw new TypeError(E?"Object is not iterable.":"Symbol.iterator is not defined.")},AU=function(h,E){var $=typeof Symbol==="function"&&h[Symbol.iterator];if(!$)return h;var I=$.call(h),F,U=[],C;try{while((E===void 0||E-- >0)&&!(F=I.next()).done)U.push(F.value)}catch(L){C={error:L}}finally{try{if(F&&!F.done&&($=I.return))$.call(I)}finally{if(C)throw C.error}}return U},xX=function(){for(var h=[],E=0;E<arguments.length;E++)h=h.concat(AU(arguments[E]));return h},eX=function(){for(var h=0,E=0,$=arguments.length;E<$;E++)h+=arguments[E].length;for(var I=Array(h),F=0,E=0;E<$;E++)for(var U=arguments[E],C=0,L=U.length;C<L;C++,F++)I[F]=U[C];return I},nX=function(h,E,$){if($||arguments.length===2){for(var I=0,F=E.length,U;I<F;I++)if(U||!(I in E)){if(!U)U=Array.prototype.slice.call(E,0,I);U[I]=E[I]}}return h.concat(U||Array.prototype.slice.call(E))},Rh=function(h){return this instanceof Rh?(this.v=h,this):new Rh(h)},oX=function(h,E,$){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var I=$.apply(h,E||[]),F,U=[];return F={},L("next"),L("throw"),L("return",C),F[Symbol.asyncIterator]=function(){return this},F;function C(Q){return function(N){return Promise.resolve(N).then(Q,k)}}function L(Q,N){if(I[Q]){if(F[Q]=function(x){return new Promise(function(e,hr){U.push([Q,x,e,hr])>1||z(Q,x)})},N)F[Q]=N(F[Q])}}function z(Q,N){try{S(I[Q](N))}catch(x){l(U[0][3],x)}}function S(Q){Q.value instanceof Rh?Promise.resolve(Q.value.v).then(K,k):l(U[0][2],Q)}function K(Q){z("next",Q)}function k(Q){z("throw",Q)}function l(Q,N){if(Q(N),U.shift(),U.length)z(U[0][0],U[0][1])}},aX=function(h){var E,$;return E={},I("next"),I("throw",function(F){throw F}),I("return"),E[Symbol.iterator]=function(){return this},E;function I(F,U){E[F]=h[F]?function(C){return($=!$)?{value:Rh(h[F](C)),done:!1}:U?U(C):C}:U}},pX=function(h){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var E=h[Symbol.asyncIterator],$;return E?E.call(h):(h=typeof P3==="function"?P3(h):h[Symbol.iterator](),$={},I("next"),I("throw"),I("return"),$[Symbol.asyncIterator]=function(){return this},$);function I(U){$[U]=h[U]&&function(C){return new Promise(function(L,z){C=h[U](C),F(L,z,C.done,C.value)})}}function F(U,C,L,z){Promise.resolve(z).then(function(S){U({value:S,done:L})},C)}},uX=function(h,E){if(Object.defineProperty)Object.defineProperty(h,"raw",{value:E});else h.raw=E;return h};var s=Object.create?function(h,E){Object.defineProperty(h,"default",{enumerable:!0,value:E})}:function(h,E){h.default=E};tX=function(h){if(h&&h.__esModule)return h;var E={};if(h!=null){for(var $ in h)if($!=="default"&&Object.prototype.hasOwnProperty.call(h,$))X3(E,h,$)}return s(E,h),E},rY=function(h){return h&&h.__esModule?h:{default:h}},sY=function(h,E,$,I){if($==="a"&&!I)throw new TypeError("Private accessor was defined without a getter");if(typeof E==="function"?h!==E||!I:!E.has(h))throw new TypeError("Cannot read private member from an object whose class did not declare it");return $==="m"?I:$==="a"?I.call(h):I?I.value:E.get(h)},fY=function(h,E,$,I,F){if(I==="m")throw new TypeError("Private method is not writable");if(I==="a"&&!F)throw new TypeError("Private accessor was defined without a setter");if(typeof E==="function"?h!==E||!F:!E.has(h))throw new TypeError("Cannot write private member to an object whose class did not declare it");return I==="a"?F.call(h,$):F?F.value=$:E.set(h,$),$},wY=function(h,E){if(E===null||typeof E!=="object"&&typeof E!=="function")throw new TypeError("Cannot use 'in' operator on non-object");return typeof h==="function"?E===h:h.has(E)},hY=function(h,E,$){if(E!==null&&E!==void 0){if(typeof E!=="object"&&typeof E!=="function")throw new TypeError("Object expected.");var I,F;if($){if(!Symbol.asyncDispose)throw new TypeError("Symbol.asyncDispose is not defined.");I=E[Symbol.asyncDispose]}if(I===void 0){if(!Symbol.dispose)throw new TypeError("Symbol.dispose is not defined.");if(I=E[Symbol.dispose],$)F=I}if(typeof I!=="function")throw new TypeError("Object not disposable.");if(F)I=function(){try{F.call(this)}catch(U){return Promise.reject(U)}};h.stack.push({value:E,dispose:I,async:$})}else if($)h.stack.push({async:!0});return E};var w=typeof SuppressedError==="function"?SuppressedError:function(h,E,$){var I=new Error($);return I.name="SuppressedError",I.error=h,I.suppressed=E,I};EY=function(h){function E(I){h.error=h.hasError?new w(I,h.error,"An error was suppressed during disposal."):I,h.hasError=!0}function $(){while(h.stack.length){var I=h.stack.pop();try{var F=I.dispose&&I.dispose.call(I.value);if(I.async)return Promise.resolve(F).then($,function(U){return E(U),$()})}catch(U){E(U)}}if(h.hasError)throw h.error}return $()},r("__extends",NX),r("__assign",yX),r("__rest",qX),r("__decorate",mX),r("__param",vX),r("__esDecorate",jX),r("__runInitializers",iX),r("__propKey",dX),r("__setFunctionName",OX),r("__metadata",bX),r("__awaiter",cX),r("__generator",_X),r("__exportStar",gX),r("__createBinding",X3),r("__values",P3),r("__read",AU),r("__spread",xX),r("__spreadArrays",eX),r("__spreadArray",nX),r("__await",Rh),r("__asyncGenerator",oX),r("__asyncDelegator",aX),r("__asyncValues",pX),r("__makeTemplateObject",uX),r("__importStar",tX),r("__importDefault",rY),r("__classPrivateFieldGet",sY),r("__classPrivateFieldSet",fY),r("__classPrivateFieldIn",wY),r("__addDisposableResource",hY),r("__disposeResources",EY)})});var TY=j((y$r,UY)=>{var{defineProperty:K3,getOwnPropertyDescriptor:AO,getOwnPropertyNames:RO}=Object,WO=Object.prototype.hasOwnProperty,zO=(r,f)=>K3(r,"name",{value:f,configurable:!0}),SO=(r,f)=>{for(var s in f)K3(r,s,{get:f[s],enumerable:!0})},PO=(r,f,s,w)=>{if(f&&typeof f==="object"||typeof f==="function"){for(let h of RO(f))if(!WO.call(r,h)&&h!==s)K3(r,h,{get:()=>f[h],enumerable:!(w=AO(f,h))||w.enumerable})}return r},XO=(r)=>PO(K3({},"__esModule",{value:!0}),r),FY={};SO(FY,{emitWarningIfUnsupportedVersion:()=>YO});UY.exports=XO(FY);var IY=!1,YO=zO((r)=>{if(r&&!IY&&parseInt(r.substring(1,r.indexOf(".")))<18)IY=!0,process.emitWarning(`NodeDeprecationWarning: The AWS SDK for JavaScript (v3) will
4
+ or increase socketAcquisitionWarningTimeout=(millis) in the NodeHttpHandler config.`),Date.now()}return f}resolveDefaultConfig(s){const{requestTimeout:f,connectionTimeout:w,socketTimeout:h,httpAgent:E,httpsAgent:$}=s||{};return{connectionTimeout:w,requestTimeout:f??h,httpAgent:(()=>{if(E instanceof TF.Agent||typeof(E==null?void 0:E.destroy)==="function")return E;return new TF.Agent({keepAlive:!0,maxSockets:50,...E})})(),httpsAgent:(()=>{if($ instanceof GF.Agent||typeof($==null?void 0:$.destroy)==="function")return $;return new GF.Agent({keepAlive:!0,maxSockets:50,...$})})(),logger:console}}destroy(){var s,f,w,h;(f=(s=this.config)==null?void 0:s.httpAgent)==null||f.destroy(),(h=(w=this.config)==null?void 0:w.httpsAgent)==null||h.destroy()}async handle(s,{abortSignal:f}={}){if(!this.config)this.config=await this.configProvider;return new Promise((w,h)=>{let E=void 0;const $=[],I=Rr(async(i)=>{await E,$.forEach(clearTimeout),w(i)},"resolve"),F=Rr(async(i)=>{await E,$.forEach(clearTimeout),h(i)},"reject");if(!this.config)throw new Error("Node HTTP request handler config is not resolved");if(f==null?void 0:f.aborted){const i=new Error("Request aborted");i.name="AbortError",F(i);return}const U=s.protocol==="https:",A=U?this.config.httpsAgent:this.config.httpAgent;$.push(setTimeout(()=>{this.socketWarningTimestamp=r.checkSocketUsage(A,this.socketWarningTimestamp,this.config.logger)},this.config.socketAcquisitionWarningTimeout??(this.config.requestTimeout??2000)+(this.config.connectionTimeout??1000)));const L=jC.buildQueryString(s.query||{});let S=void 0;if(s.username!=null||s.password!=null){const i=s.username??"",e=s.password??"";S=`${i}:${e}`}let z=s.path;if(L)z+=`?${L}`;if(s.fragment)z+=`#${s.fragment}`;let Z=s.hostname??"";if(Z[0]==="["&&Z.endsWith("]"))Z=s.hostname.slice(1,-1);else Z=s.hostname;const N={headers:s.headers,host:Z,method:s.method,path:z,port:s.port,agent:A,auth:S},l=(U?GF.request:TF.request)(N,(i)=>{const e=new mC.HttpResponse({statusCode:i.statusCode||-1,reason:i.statusMessage,headers:vC(i.headers),body:i});I({response:e})});if(l.on("error",(i)=>{if(Xv.includes(i.code))F(Object.assign(i,{name:"TimeoutError"}));else F(i)}),f){const i=Rr(()=>{l.destroy();const e=new Error("Request aborted");e.name="AbortError",F(e)},"onAbort");if(typeof f.addEventListener==="function"){const e=f;e.addEventListener("abort",i,{once:!0}),l.once("close",()=>e.removeEventListener("abort",i))}else f.onabort=i}$.push(Kv(l,F,this.config.connectionTimeout)),$.push(Jv(l,F,this.config.requestTimeout));const k=N.agent;if(typeof k==="object"&&"keepAlive"in k)$.push(Pv(l,{keepAlive:k.keepAlive,keepAliveMsecs:k.keepAliveMsecs}));E=AF(l,s,this.config.requestTimeout).catch((i)=>{return $.forEach(clearTimeout),h(i)})})}updateHttpClientConfig(s,f){this.config=void 0,this.configProvider=this.configProvider.then((w)=>{return{...w,[s]:f}})}httpHandlerConfigs(){return this.config??{}}};Rr(dC,"NodeHttpHandler");var Bv=dC,yC=import.meta.require("http2"),Mv=Sv(import.meta.require("http2")),cC=class r{constructor(s){this.sessions=[],this.sessions=s??[]}poll(){if(this.sessions.length>0)return this.sessions.shift()}offerLast(s){this.sessions.push(s)}contains(s){return this.sessions.includes(s)}remove(s){this.sessions=this.sessions.filter((f)=>f!==s)}[Symbol.iterator](){return this.sessions[Symbol.iterator]()}destroy(s){for(let f of this.sessions)if(f===s){if(!f.destroyed)f.destroy()}}};Rr(cC,"NodeHttp2ConnectionPool");var Vv=cC,bC=class r{constructor(s){if(this.sessionCache=new Map,this.config=s,this.config.maxConcurrency&&this.config.maxConcurrency<=0)throw new RangeError("maxConcurrency must be greater than zero.")}lease(s,f){const w=this.getUrlString(s),h=this.sessionCache.get(w);if(h){const F=h.poll();if(F&&!this.config.disableConcurrency)return F}const E=Mv.default.connect(w);if(this.config.maxConcurrency)E.settings({maxConcurrentStreams:this.config.maxConcurrency},(F)=>{if(F)throw new Error("Fail to set maxConcurrentStreams to "+this.config.maxConcurrency+"when creating new session for "+s.destination.toString())});E.unref();const $=Rr(()=>{E.destroy(),this.deleteSession(w,E)},"destroySessionCb");if(E.on("goaway",$),E.on("error",$),E.on("frameError",$),E.on("close",()=>this.deleteSession(w,E)),f.requestTimeout)E.setTimeout(f.requestTimeout,$);const I=this.sessionCache.get(w)||new Vv;return I.offerLast(E),this.sessionCache.set(w,I),E}deleteSession(s,f){const w=this.sessionCache.get(s);if(!w)return;if(!w.contains(f))return;w.remove(f),this.sessionCache.set(s,w)}release(s,f){var w;const h=this.getUrlString(s);(w=this.sessionCache.get(h))==null||w.offerLast(f)}destroy(){for(let[s,f]of this.sessionCache){for(let w of f){if(!w.destroyed)w.destroy();f.remove(w)}this.sessionCache.delete(s)}}setMaxConcurrentStreams(s){if(this.config.maxConcurrency&&this.config.maxConcurrency<=0)throw new RangeError("maxConcurrentStreams must be greater than zero.");this.config.maxConcurrency=s}setDisableConcurrentStreams(s){this.config.disableConcurrency=s}getUrlString(s){return s.destination.toString()}};Rr(bC,"NodeHttp2ConnectionManager");var Hv=bC,_C=class r{constructor(s){this.metadata={handlerProtocol:"h2"},this.connectionManager=new Hv({}),this.configProvider=new Promise((f,w)=>{if(typeof s==="function")s().then((h)=>{f(h||{})}).catch(w);else f(s||{})})}static create(s){if(typeof(s==null?void 0:s.handle)==="function")return s;return new r(s)}destroy(){this.connectionManager.destroy()}async handle(s,{abortSignal:f}={}){if(!this.config){if(this.config=await this.configProvider,this.connectionManager.setDisableConcurrentStreams(this.config.disableConcurrentStreams||!1),this.config.maxConcurrentStreams)this.connectionManager.setMaxConcurrentStreams(this.config.maxConcurrentStreams)}const{requestTimeout:w,disableConcurrentStreams:h}=this.config;return new Promise((E,$)=>{var I;let F=!1,U=void 0;const A=Rr(async(Jr)=>{await U,E(Jr)},"resolve"),L=Rr(async(Jr)=>{await U,$(Jr)},"reject");if(f==null?void 0:f.aborted){F=!0;const Jr=new Error("Request aborted");Jr.name="AbortError",L(Jr);return}const{hostname:S,method:z,port:Z,protocol:N,query:M}=s;let l="";if(s.username!=null||s.password!=null){const Jr=s.username??"",pf=s.password??"";l=`${Jr}:${pf}@`}const k=`${N}//${l}${S}${Z?`:${Z}`:""}`,i={destination:new URL(k)},e=this.connectionManager.lease(i,{requestTimeout:(I=this.config)==null?void 0:I.sessionTimeout,disableConcurrentStreams:h||!1}),sr=Rr((Jr)=>{if(h)this.destroySession(e);F=!0,L(Jr)},"rejectWithDestroy"),Br=jC.buildQueryString(M||{});let pr=s.path;if(Br)pr+=`?${Br}`;if(s.fragment)pr+=`#${s.fragment}`;const Pf=e.request({...s.headers,[yC.constants.HTTP2_HEADER_PATH]:pr,[yC.constants.HTTP2_HEADER_METHOD]:z});if(e.ref(),Pf.on("response",(Jr)=>{const pf=new mC.HttpResponse({statusCode:Jr[":status"]||-1,headers:vC(Jr),body:Pf});if(F=!0,A({response:pf}),h)e.close(),this.connectionManager.deleteSession(k,e)}),w)Pf.setTimeout(w,()=>{Pf.close();const Jr=new Error(`Stream timed out because of no activity for ${w} ms`);Jr.name="TimeoutError",sr(Jr)});if(f){const Jr=Rr(()=>{Pf.close();const pf=new Error("Request aborted");pf.name="AbortError",sr(pf)},"onAbort");if(typeof f.addEventListener==="function"){const pf=f;pf.addEventListener("abort",Jr,{once:!0}),Pf.once("close",()=>pf.removeEventListener("abort",Jr))}else f.onabort=Jr}Pf.on("frameError",(Jr,pf,mk)=>{sr(new Error(`Frame type id ${Jr} in stream id ${mk} has failed with code ${pf}.`))}),Pf.on("error",sr),Pf.on("aborted",()=>{sr(new Error(`HTTP/2 stream is abnormally aborted in mid-communication with result code ${Pf.rstCode}.`))}),Pf.on("close",()=>{if(e.unref(),h)e.destroy();if(!F)sr(new Error("Unexpected error: http2 request did not get a response"))}),U=AF(Pf,s,w)})}updateHttpClientConfig(s,f){this.config=void 0,this.configProvider=this.configProvider.then((w)=>{return{...w,[s]:f}})}httpHandlerConfigs(){return this.config??{}}destroySession(s){if(!s.destroyed)s.destroy()}};Rr(_C,"NodeHttp2Handler");var lv=_C,gC=class r extends iC.Writable{constructor(){super(...arguments);this.bufferedBytes=[]}_write(s,f,w){this.bufferedBytes.push(s),w()}};Rr(gC,"Collector");var Dv=gC,kv=Rr((r)=>{if(yv(r))return xC(r);return new Promise((s,f)=>{const w=new Dv;r.pipe(w),r.on("error",(h)=>{w.end(),f(h)}),w.on("error",f),w.on("finish",function(){const h=new Uint8Array(Buffer.concat(this.bufferedBytes));s(h)})})},"streamCollector"),yv=Rr((r)=>typeof ReadableStream==="function"&&r instanceof ReadableStream,"isReadableStreamInstance");Rr(xC,"collectReadableStream")});var wW=O((urr,sW)=>{function pC(r=0){return new Promise((s,f)=>{if(r)setTimeout(()=>{const w=new Error(`Request did not complete within ${r} ms`);w.name="TimeoutError",f(w)},r)})}async function tC(r){const s=await fW(r),f=cv.fromBase64(s);return new Uint8Array(f)}async function rW(r){const s=[],f=r.getReader();let w=!1,h=0;while(!w){const{done:I,value:F}=await f.read();if(F)s.push(F),h+=F.length;w=I}const E=new Uint8Array(h);let $=0;for(let I of s)E.set(I,$),$+=I.length;return E}function fW(r){return new Promise((s,f)=>{const w=new FileReader;w.onloadend=()=>{if(w.readyState!==2)return f(new Error("Reader aborted too early"));const h=w.result??"",E=h.indexOf(","),$=E>-1?E+1:h.length;s(h.substring($))},w.onabort=()=>f(new Error("Read aborted")),w.onerror=()=>f(w.error),w.readAsDataURL(r)})}var{defineProperty:j$,getOwnPropertyDescriptor:Nv,getOwnPropertyNames:qv}=Object,mv=Object.prototype.hasOwnProperty,C0=(r,s)=>j$(r,"name",{value:s,configurable:!0}),jv=(r,s)=>{for(var f in s)j$(r,f,{get:s[f],enumerable:!0})},vv=(r,s,f,w)=>{if(s&&typeof s==="object"||typeof s==="function"){for(let h of qv(s))if(!mv.call(r,h)&&h!==f)j$(r,h,{get:()=>s[h],enumerable:!(w=Nv(s,h))||w.enumerable})}return r},iv=(r)=>vv(j$({},"__esModule",{value:!0}),r),aC={};jv(aC,{FetchHttpHandler:()=>dv,keepAliveSupport:()=>m$,streamCollector:()=>bv});sW.exports=iv(aC);var oC=L0(),Ov=UF();C0(pC,"requestTimeout");var m$={supported:void 0},uC=class r{static create(s){if(typeof(s==null?void 0:s.handle)==="function")return s;return new r(s)}constructor(s){if(typeof s==="function")this.configProvider=s().then((f)=>f||{});else this.config=s??{},this.configProvider=Promise.resolve(this.config);if(m$.supported===void 0)m$.supported=Boolean(typeof Request!=="undefined"&&"keepalive"in new Request("https://[::1]"))}destroy(){}async handle(s,{abortSignal:f}={}){var w;if(!this.config)this.config=await this.configProvider;const h=this.config.requestTimeout,E=this.config.keepAlive===!0,$=this.config.credentials;if(f==null?void 0:f.aborted){const k=new Error("Request aborted");return k.name="AbortError",Promise.reject(k)}let I=s.path;const F=Ov.buildQueryString(s.query||{});if(F)I+=`?${F}`;if(s.fragment)I+=`#${s.fragment}`;let U="";if(s.username!=null||s.password!=null){const k=s.username??"",i=s.password??"";U=`${k}:${i}@`}const{port:A,method:L}=s,S=`${s.protocol}//${U}${s.hostname}${A?`:${A}`:""}${I}`,z=L==="GET"||L==="HEAD"?void 0:s.body,Z={body:z,headers:new Headers(s.headers),method:L,credentials:$};if((w=this.config)==null?void 0:w.cache)Z.cache=this.config.cache;if(z)Z.duplex="half";if(typeof AbortController!=="undefined")Z.signal=f;if(m$.supported)Z.keepalive=E;if(typeof this.config.requestInit==="function")Object.assign(Z,this.config.requestInit(s));let N=C0(()=>{},"removeSignalEventListener");const M=new Request(S,Z),l=[fetch(M).then((k)=>{const i=k.headers,e={};for(let Br of i.entries())e[Br[0]]=Br[1];if(k.body==null)return k.blob().then((Br)=>({response:new oC.HttpResponse({headers:e,reason:k.statusText,statusCode:k.status,body:Br})}));return{response:new oC.HttpResponse({headers:e,reason:k.statusText,statusCode:k.status,body:k.body})}}),pC(h)];if(f)l.push(new Promise((k,i)=>{const e=C0(()=>{const sr=new Error("Request aborted");sr.name="AbortError",i(sr)},"onAbort");if(typeof f.addEventListener==="function"){const sr=f;sr.addEventListener("abort",e,{once:!0}),N=C0(()=>sr.removeEventListener("abort",e),"removeSignalEventListener")}else f.onabort=e}));return Promise.race(l).finally(N)}updateHttpClientConfig(s,f){this.config=void 0,this.configProvider=this.configProvider.then((w)=>{return w[s]=f,w})}httpHandlerConfigs(){return this.config??{}}};C0(uC,"FetchHttpHandler");var dv=uC,cv=y$(),bv=C0((r)=>{if(typeof Blob==="function"&&r instanceof Blob)return tC(r);return rW(r)},"streamCollector");C0(tC,"collectBlob");C0(rW,"collectStream");C0(fW,"readToBase64")});var i$=O((trr,UW)=>{function IW(r){if(r.length%2!==0)throw new Error("Hex encoded strings must have an even number length");const s=new Uint8Array(r.length/2);for(let f=0;f<r.length;f+=2){const w=r.slice(f,f+2).toLowerCase();if(w in LF)s[f/2]=LF[w];else throw new Error(`Cannot decode unrecognized sequence ${w} as hexadecimal`)}return s}function FW(r){let s="";for(let f=0;f<r.byteLength;f++)s+=$W[r[f]];return s}var{defineProperty:v$,getOwnPropertyDescriptor:_v,getOwnPropertyNames:gv}=Object,xv=Object.prototype.hasOwnProperty,hW=(r,s)=>v$(r,"name",{value:s,configurable:!0}),ev=(r,s)=>{for(var f in s)v$(r,f,{get:s[f],enumerable:!0})},nv=(r,s,f,w)=>{if(s&&typeof s==="object"||typeof s==="function"){for(let h of gv(s))if(!xv.call(r,h)&&h!==f)v$(r,h,{get:()=>s[h],enumerable:!(w=_v(s,h))||w.enumerable})}return r},ov=(r)=>nv(v$({},"__esModule",{value:!0}),r),EW={};ev(EW,{fromHex:()=>IW,toHex:()=>FW});UW.exports=ov(EW);var $W={},LF={};for(let r=0;r<256;r++){let s=r.toString(16).toLowerCase();if(s.length===1)s=`0${s}`;$W[r]=s,LF[s]=r}hW(IW,"fromHex");hW(FW,"toHex")});var X1=O((TW)=>{Object.defineProperty(TW,"__esModule",{value:!0});TW.isReadableStream=void 0;var av=(r)=>{var s;return typeof ReadableStream==="function"&&(((s=r===null||r===void 0?void 0:r.constructor)===null||s===void 0?void 0:s.name)===ReadableStream.name||r instanceof ReadableStream)};TW.isReadableStream=av});var zW=O((CW)=>{Object.defineProperty(CW,"__esModule",{value:!0});CW.sdkStreamMixin=void 0;var pv=wW(),uv=y$(),tv=i$(),ri=O0(),AW=X1(),LW="The stream has already been transformed.",fi=(r)=>{var s,f;if(!RW(r)&&!AW.isReadableStream(r)){const $=((f=(s=r===null||r===void 0?void 0:r.__proto__)===null||s===void 0?void 0:s.constructor)===null||f===void 0?void 0:f.name)||r;throw new Error(`Unexpected stream implementation, expect Blob or ReadableStream, got ${$}`)}let w=!1;const h=async()=>{if(w)throw new Error(LW);return w=!0,await pv.streamCollector(r)},E=($)=>{if(typeof $.stream!=="function")throw new Error("Cannot transform payload Blob to web stream. Please make sure the Blob.stream() is polyfilled.\nIf you are using React Native, this API is not yet supported, see: https://react-native.canny.io/feature-requests/p/fetch-streaming-body");return $.stream()};return Object.assign(r,{transformToByteArray:h,transformToString:async($)=>{const I=await h();if($==="base64")return uv.toBase64(I);else if($==="hex")return tv.toHex(I);else if($===void 0||$==="utf8"||$==="utf-8")return ri.toUtf8(I);else if(typeof TextDecoder==="function")return new TextDecoder($).decode(I);else throw new Error("TextDecoder is not available, please make sure polyfill is provided.")},transformToWebStream:()=>{if(w)throw new Error(LW);if(w=!0,RW(r))return E(r);else if(AW.isReadableStream(r))return r;else throw new Error(`Cannot transform payload to web stream, got ${r}`)}})};CW.sdkStreamMixin=fi;var RW=(r)=>typeof Blob==="function"&&r instanceof Blob});var KW=O((YW)=>{Object.defineProperty(YW,"__esModule",{value:!0});YW.sdkStreamMixin=void 0;var si=nC(),wi=S1(),RF=import.meta.require("stream"),hi=import.meta.require("util"),Ei=zW(),SW="The stream has already been transformed.",$i=(r)=>{var s,f;if(!(r instanceof RF.Readable))try{return Ei.sdkStreamMixin(r)}catch(E){const $=((f=(s=r===null||r===void 0?void 0:r.__proto__)===null||s===void 0?void 0:s.constructor)===null||f===void 0?void 0:f.name)||r;throw new Error(`Unexpected stream implementation, expect Stream.Readable instance, got ${$}`)}let w=!1;const h=async()=>{if(w)throw new Error(SW);return w=!0,await si.streamCollector(r)};return Object.assign(r,{transformToByteArray:h,transformToString:async(E)=>{const $=await h();if(E===void 0||Buffer.isEncoding(E))return wi.fromArrayBuffer($.buffer,$.byteOffset,$.byteLength).toString(E);else return new hi.TextDecoder(E).decode($)},transformToWebStream:()=>{if(w)throw new Error(SW);if(r.readableFlowing!==null)throw new Error("The stream has been consumed by other callbacks.");if(typeof RF.Readable.toWeb!=="function")throw new Error("Readable.toWeb() is not supported. Please make sure you are using Node.js >= 17.0.0, or polyfill is available.");return w=!0,RF.Readable.toWeb(r)}})};YW.sdkStreamMixin=$i});var JW=O((ZW)=>{async function Ii(r){if(typeof r.stream==="function")r=r.stream();return r.tee()}Object.defineProperty(ZW,"__esModule",{value:!0});ZW.splitStream=void 0;ZW.splitStream=Ii});var VW=O((BW)=>{async function Ti(r){if(Ui.isReadableStream(r))return Fi.splitStream(r);const s=new QW.PassThrough,f=new QW.PassThrough;return r.pipe(s),r.pipe(f),[s,f]}Object.defineProperty(BW,"__esModule",{value:!0});BW.splitStream=void 0;var QW=import.meta.require("stream"),Fi=JW(),Ui=X1();BW.splitStream=Ti});var DW=O((HW)=>{async function Gi(r,s){var f;let w=0;const h=[],E=r.getReader();let $=!1;while(!$){const{done:U,value:A}=await E.read();if(A)h.push(A),w+=(f=A===null||A===void 0?void 0:A.byteLength)!==null&&f!==void 0?f:0;if(w>=s)break;$=U}E.releaseLock();const I=new Uint8Array(Math.min(s,w));let F=0;for(let U of h){if(U.byteLength>I.byteLength-F){I.set(U.subarray(0,I.byteLength-F),F);break}else I.set(U,F);F+=U.length}return I}Object.defineProperty(HW,"__esModule",{value:!0});HW.headStream=void 0;HW.headStream=Gi});var qW=O((yW)=>{Object.defineProperty(yW,"__esModule",{value:!0});yW.headStream=void 0;var Ai=import.meta.require("stream"),Li=DW(),Ri=X1(),Ci=(r,s)=>{if(Ri.isReadableStream(r))return Li.headStream(r,s);return new Promise((f,w)=>{const h=new kW;h.limit=s,r.pipe(h),r.on("error",(E)=>{h.end(),w(E)}),h.on("error",w),h.on("finish",function(){const E=new Uint8Array(Buffer.concat(this.buffers));f(E)})})};yW.headStream=Ci;class kW extends Ai.Writable{constructor(){super(...arguments);this.buffers=[],this.limit=1/0,this.bytesBuffered=0}_write(r,s,f){var w;if(this.buffers.push(r),this.bytesBuffered+=(w=r.byteLength)!==null&&w!==void 0?w:0,this.bytesBuffered>=this.limit){const h=this.bytesBuffered-this.limit,E=this.buffers[this.buffers.length-1];this.buffers[this.buffers.length-1]=E.subarray(0,E.byteLength-h),this.emit("finish")}f()}}});var dW=O((Ifr,Zw)=>{function vW(r,s="utf-8"){if(s==="base64")return mW.toBase64(r);return jW.toUtf8(r)}function iW(r,s){if(s==="base64")return WF.mutate(mW.fromBase64(r));return WF.mutate(jW.fromUtf8(r))}var{defineProperty:O$,getOwnPropertyDescriptor:Wi,getOwnPropertyNames:zi}=Object,Si=Object.prototype.hasOwnProperty,zF=(r,s)=>O$(r,"name",{value:s,configurable:!0}),Yi=(r,s)=>{for(var f in s)O$(r,f,{get:s[f],enumerable:!0})},CF=(r,s,f,w)=>{if(s&&typeof s==="object"||typeof s==="function"){for(let h of zi(s))if(!Si.call(r,h)&&h!==f)O$(r,h,{get:()=>s[h],enumerable:!(w=Wi(s,h))||w.enumerable})}return r},K1=(r,s,f)=>(CF(r,s,"default"),f&&CF(f,s,"default")),Xi=(r)=>CF(O$({},"__esModule",{value:!0}),r),Kw={};Yi(Kw,{Uint8ArrayBlobAdapter:()=>WF});Zw.exports=Xi(Kw);var mW=y$(),jW=O0();zF(vW,"transformToString");zF(iW,"transformFromString");var OW=class r extends Uint8Array{static fromString(s,f="utf-8"){switch(typeof s){case"string":return iW(s,f);default:throw new Error(`Unsupported conversion from ${typeof s} to Uint8ArrayBlobAdapter.`)}}static mutate(s){return Object.setPrototypeOf(s,r.prototype),s}transformToString(s="utf-8"){return vW(this,s)}};zF(OW,"Uint8ArrayBlobAdapter");var WF=OW;K1(Kw,PC(),Zw.exports);K1(Kw,KW(),Zw.exports);K1(Kw,VW(),Zw.exports);K1(Kw,qW(),Zw.exports);K1(Kw,X1(),Zw.exports)});var $h=O((Ffr,Gz)=>{function rz(r){const s=r.getUTCFullYear(),f=r.getUTCMonth(),w=r.getUTCDay(),h=r.getUTCDate(),E=r.getUTCHours(),$=r.getUTCMinutes(),I=r.getUTCSeconds(),F=h<10?`0${h}`:`${h}`,U=E<10?`0${E}`:`${E}`,A=$<10?`0${$}`:`${$}`,L=I<10?`0${I}`:`${I}`;return`${ei[w]}, ${F} ${VF[f]} ${s} ${U}:${A}:${L} GMT`}function b$(r){return encodeURIComponent(r).replace(/[!'()*]/g,function(s){return"%"+s.charCodeAt(0).toString(16).toUpperCase()})}function HF(r,s,f){let w,h,E;if(typeof s==="undefined"&&typeof f==="undefined")w={},E=r;else if(w=r,typeof s==="function")return h=s,E=f,VO(w,h,E);else E=s;for(let $ of Object.keys(E)){if(!Array.isArray(E[$])){w[$]=E[$];continue}Fz(w,null,E,$)}return w}function Uz(r){if(r.includes(",")||r.includes('"'))r=`"${r.replace(/"/g,'\\"')}"`;return r}function Tz(r,s,f){if(f<=0||!Number.isInteger(f))throw new Error("Invalid number of delimiters ("+f+") for splitEvery.");const w=r.split(s);if(f===1)return w;const h=[];let E="";for(let $=0;$<w.length;$++){if(E==="")E=w[$];else E+=s+w[$];if(($+1)%f===0)h.push(E),E=""}if(E!=="")h.push(E);return h}var{defineProperty:_$,getOwnPropertyDescriptor:Ki,getOwnPropertyNames:Zi}=Object,Pi=Object.prototype.hasOwnProperty,v=(r,s)=>_$(r,"name",{value:s,configurable:!0}),Ji=(r,s)=>{for(var f in s)_$(r,f,{get:s[f],enumerable:!0})},Qi=(r,s,f,w)=>{if(s&&typeof s==="object"||typeof s==="function"){for(let h of Zi(s))if(!Pi.call(r,h)&&h!==f)_$(r,h,{get:()=>s[h],enumerable:!(w=Ki(s,h))||w.enumerable})}return r},Bi=(r)=>Qi(_$({},"__esModule",{value:!0}),r),bW={};Ji(bW,{Client:()=>Mi,Command:()=>eW,LazyJsonString:()=>JO,NoOpLogger:()=>QO,SENSITIVE_STRING:()=>li,ServiceException:()=>GO,StringWrapper:()=>B1,_json:()=>JF,collectBody:()=>Vi,convertMap:()=>BO,createAggregatedClient:()=>Di,dateToUtcString:()=>rz,decorateServiceException:()=>sz,emitWarningIfUnsupportedVersion:()=>CO,expectBoolean:()=>yi,expectByte:()=>PF,expectFloat32:()=>d$,expectInt:()=>qi,expectInt32:()=>KF,expectLong:()=>J1,expectNonNull:()=>ji,expectNumber:()=>P1,expectObject:()=>oW,expectShort:()=>ZF,expectString:()=>vi,expectUnion:()=>ii,extendedEncodeURIComponent:()=>b$,getArrayIfSingleItem:()=>ZO,getDefaultClientConfiguration:()=>XO,getDefaultExtensionConfiguration:()=>hz,getValueFromTextNode:()=>Ez,handleFloat:()=>ci,isSerializableHeaderValue:()=>PO,limitedParseDouble:()=>MF,limitedParseFloat:()=>bi,limitedParseFloat32:()=>_i,loadConfigsForDefaultMode:()=>RO,logger:()=>Q1,map:()=>HF,parseBoolean:()=>ki,parseEpochTimestamp:()=>sO,parseRfc3339DateTime:()=>oi,parseRfc3339DateTimeWithOffset:()=>pi,parseRfc7231DateTime:()=>fO,quoteHeader:()=>Uz,resolveDefaultRuntimeConfig:()=>KO,resolvedPath:()=>DO,serializeDateTime:()=>yO,serializeFloat:()=>kO,splitEvery:()=>Tz,splitHeader:()=>NO,strictParseByte:()=>tW,strictParseDouble:()=>BF,strictParseFloat:()=>Oi,strictParseFloat32:()=>aW,strictParseInt:()=>gi,strictParseInt32:()=>xi,strictParseLong:()=>uW,strictParseShort:()=>wh,take:()=>MO,throwDefaultError:()=>wz,withBaseException:()=>AO});Gz.exports=Bi(bW);var _W=wC(),gW=class r{constructor(s){this.config=s,this.middlewareStack=_W.constructStack()}send(s,f,w){const h=typeof f!=="function"?f:void 0,E=typeof f==="function"?f:w,$=h===void 0&&this.config.cacheMiddleware===!0;let I;if($){if(!this.handlers)this.handlers=new WeakMap;const F=this.handlers;if(F.has(s.constructor))I=F.get(s.constructor);else I=s.resolveMiddleware(this.middlewareStack,this.config,h),F.set(s.constructor,I)}else delete this.handlers,I=s.resolveMiddleware(this.middlewareStack,this.config,h);if(E)I(s).then((F)=>E(null,F.output),(F)=>E(F)).catch(()=>{});else return I(s).then((F)=>F.output)}destroy(){var s,f,w;(w=(f=(s=this.config)==null?void 0:s.requestHandler)==null?void 0:f.destroy)==null||w.call(f),delete this.handlers}};v(gW,"Client");var Mi=gW,SF=dW(),Vi=v(async(r=new Uint8Array,s)=>{if(r instanceof Uint8Array)return SF.Uint8ArrayBlobAdapter.mutate(r);if(!r)return SF.Uint8ArrayBlobAdapter.mutate(new Uint8Array);const f=s.streamCollector(r);return SF.Uint8ArrayBlobAdapter.mutate(await f)},"collectBody"),XF=Ff(),xW=class r{constructor(){this.middlewareStack=_W.constructStack()}static classBuilder(){return new Hi}resolveMiddlewareWithContext(s,f,w,{middlewareFn:h,clientName:E,commandName:$,inputFilterSensitiveLog:I,outputFilterSensitiveLog:F,smithyContext:U,additionalContext:A,CommandCtor:L}){for(let M of h.bind(this)(L,s,f,w))this.middlewareStack.use(M);const S=s.concat(this.middlewareStack),{logger:z}=f,Z={logger:z,clientName:E,commandName:$,inputFilterSensitiveLog:I,outputFilterSensitiveLog:F,[XF.SMITHY_CONTEXT_KEY]:{commandInstance:this,...U},...A},{requestHandler:N}=f;return S.resolve((M)=>N.handle(M.request,w||{}),Z)}};v(xW,"Command");var eW=xW,nW=class r{constructor(){this._init=()=>{},this._ep={},this._middlewareFn=()=>[],this._commandName="",this._clientName="",this._additionalContext={},this._smithyContext={},this._inputFilterSensitiveLog=(s)=>s,this._outputFilterSensitiveLog=(s)=>s,this._serializer=null,this._deserializer=null}init(s){this._init=s}ep(s){return this._ep=s,this}m(s){return this._middlewareFn=s,this}s(s,f,w={}){return this._smithyContext={service:s,operation:f,...w},this}c(s={}){return this._additionalContext=s,this}n(s,f){return this._clientName=s,this._commandName=f,this}f(s=(w)=>w,f=(w)=>w){return this._inputFilterSensitiveLog=s,this._outputFilterSensitiveLog=f,this}ser(s){return this._serializer=s,this}de(s){return this._deserializer=s,this}build(){var s;const f=this;let w;return w=(s=class extends eW{constructor(...[h]){super();this.serialize=f._serializer,this.deserialize=f._deserializer,this.input=h??{},f._init(this)}static getEndpointParameterInstructions(){return f._ep}resolveMiddleware(h,E,$){return this.resolveMiddlewareWithContext(h,E,$,{CommandCtor:w,middlewareFn:f._middlewareFn,clientName:f._clientName,commandName:f._commandName,inputFilterSensitiveLog:f._inputFilterSensitiveLog,outputFilterSensitiveLog:f._outputFilterSensitiveLog,smithyContext:f._smithyContext,additionalContext:f._additionalContext})}},v(s,"CommandRef"),s)}};v(nW,"ClassBuilder");var Hi=nW,li="***SensitiveInformation***",Di=v((r,s)=>{for(let f of Object.keys(r)){const w=r[f],h=v(async function($,I,F){const U=new w($);if(typeof I==="function")this.send(U,I);else if(typeof F==="function"){if(typeof I!=="object")throw new Error(`Expected http options but got ${typeof I}`);this.send(U,I||{},F)}else return this.send(U,I)},"methodImpl"),E=(f[0].toLowerCase()+f.slice(1)).replace(/Command$/,"");s.prototype[E]=h}},"createAggregatedClient"),ki=v((r)=>{switch(r){case"true":return!0;case"false":return!1;default:throw new Error(`Unable to parse boolean value "${r}"`)}},"parseBoolean"),yi=v((r)=>{if(r===null||r===void 0)return;if(typeof r==="number"){if(r===0||r===1)Q1.warn(c$(`Expected boolean, got ${typeof r}: ${r}`));if(r===0)return!1;if(r===1)return!0}if(typeof r==="string"){const s=r.toLowerCase();if(s==="false"||s==="true")Q1.warn(c$(`Expected boolean, got ${typeof r}: ${r}`));if(s==="false")return!1;if(s==="true")return!0}if(typeof r==="boolean")return r;throw new TypeError(`Expected boolean, got ${typeof r}: ${r}`)},"expectBoolean"),P1=v((r)=>{if(r===null||r===void 0)return;if(typeof r==="string"){const s=parseFloat(r);if(!Number.isNaN(s)){if(String(s)!==String(r))Q1.warn(c$(`Expected number but observed string: ${r}`));return s}}if(typeof r==="number")return r;throw new TypeError(`Expected number, got ${typeof r}: ${r}`)},"expectNumber"),Ni=Math.ceil(340282346638528860000000000000000000000),d$=v((r)=>{const s=P1(r);if(s!==void 0&&!Number.isNaN(s)&&s!==1/0&&s!==-1/0){if(Math.abs(s)>Ni)throw new TypeError(`Expected 32-bit float, got ${r}`)}return s},"expectFloat32"),J1=v((r)=>{if(r===null||r===void 0)return;if(Number.isInteger(r)&&!Number.isNaN(r))return r;throw new TypeError(`Expected integer, got ${typeof r}: ${r}`)},"expectLong"),qi=J1,KF=v((r)=>QF(r,32),"expectInt32"),ZF=v((r)=>QF(r,16),"expectShort"),PF=v((r)=>QF(r,8),"expectByte"),QF=v((r,s)=>{const f=J1(r);if(f!==void 0&&mi(f,s)!==f)throw new TypeError(`Expected ${s}-bit integer, got ${r}`);return f},"expectSizedInt"),mi=v((r,s)=>{switch(s){case 32:return Int32Array.of(r)[0];case 16:return Int16Array.of(r)[0];case 8:return Int8Array.of(r)[0]}},"castInt"),ji=v((r,s)=>{if(r===null||r===void 0){if(s)throw new TypeError(`Expected a non-null value for ${s}`);throw new TypeError("Expected a non-null value")}return r},"expectNonNull"),oW=v((r)=>{if(r===null||r===void 0)return;if(typeof r==="object"&&!Array.isArray(r))return r;const s=Array.isArray(r)?"array":typeof r;throw new TypeError(`Expected object, got ${s}: ${r}`)},"expectObject"),vi=v((r)=>{if(r===null||r===void 0)return;if(typeof r==="string")return r;if(["boolean","number","bigint"].includes(typeof r))return Q1.warn(c$(`Expected string, got ${typeof r}: ${r}`)),String(r);throw new TypeError(`Expected string, got ${typeof r}: ${r}`)},"expectString"),ii=v((r)=>{if(r===null||r===void 0)return;const s=oW(r),f=Object.entries(s).filter(([,w])=>w!=null).map(([w])=>w);if(f.length===0)throw new TypeError("Unions must have exactly one non-null member. None were found.");if(f.length>1)throw new TypeError(`Unions must have exactly one non-null member. Keys ${f} were not null.`);return s},"expectUnion"),BF=v((r)=>{if(typeof r=="string")return P1(Eh(r));return P1(r)},"strictParseDouble"),Oi=BF,aW=v((r)=>{if(typeof r=="string")return d$(Eh(r));return d$(r)},"strictParseFloat32"),di=/(-?(?:0|[1-9]\d*)(?:\.\d+)?(?:[eE][+-]?\d+)?)|(-?Infinity)|(NaN)/g,Eh=v((r)=>{const s=r.match(di);if(s===null||s[0].length!==r.length)throw new TypeError("Expected real number, got implicit NaN");return parseFloat(r)},"parseNumber"),MF=v((r)=>{if(typeof r=="string")return pW(r);return P1(r)},"limitedParseDouble"),ci=MF,bi=MF,_i=v((r)=>{if(typeof r=="string")return pW(r);return d$(r)},"limitedParseFloat32"),pW=v((r)=>{switch(r){case"NaN":return NaN;case"Infinity":return 1/0;case"-Infinity":return-1/0;default:throw new Error(`Unable to parse float value: ${r}`)}},"parseFloatString"),uW=v((r)=>{if(typeof r==="string")return J1(Eh(r));return J1(r)},"strictParseLong"),gi=uW,xi=v((r)=>{if(typeof r==="string")return KF(Eh(r));return KF(r)},"strictParseInt32"),wh=v((r)=>{if(typeof r==="string")return ZF(Eh(r));return ZF(r)},"strictParseShort"),tW=v((r)=>{if(typeof r==="string")return PF(Eh(r));return PF(r)},"strictParseByte"),c$=v((r)=>{return String(new TypeError(r).stack||r).split("\n").slice(0,5).filter((s)=>!s.includes("stackTraceWarning")).join("\n")},"stackTraceWarning"),Q1={warn:console.warn},ei=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],VF=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];v(rz,"dateToUtcString");var ni=new RegExp(/^(\d{4})-(\d{2})-(\d{2})[tT](\d{2}):(\d{2}):(\d{2})(?:\.(\d+))?[zZ]$/),oi=v((r)=>{if(r===null||r===void 0)return;if(typeof r!=="string")throw new TypeError("RFC-3339 date-times must be expressed as strings");const s=ni.exec(r);if(!s)throw new TypeError("Invalid RFC-3339 date-time value");const[f,w,h,E,$,I,F,U]=s,A=wh(hh(w)),L=Bs(h,"month",1,12),S=Bs(E,"day",1,31);return Z1(A,L,S,{hours:$,minutes:I,seconds:F,fractionalMilliseconds:U})},"parseRfc3339DateTime"),ai=new RegExp(/^(\d{4})-(\d{2})-(\d{2})[tT](\d{2}):(\d{2}):(\d{2})(?:\.(\d+))?(([-+]\d{2}\:\d{2})|[zZ])$/),pi=v((r)=>{if(r===null||r===void 0)return;if(typeof r!=="string")throw new TypeError("RFC-3339 date-times must be expressed as strings");const s=ai.exec(r);if(!s)throw new TypeError("Invalid RFC-3339 date-time value");const[f,w,h,E,$,I,F,U,A]=s,L=wh(hh(w)),S=Bs(h,"month",1,12),z=Bs(E,"day",1,31),Z=Z1(L,S,z,{hours:$,minutes:I,seconds:F,fractionalMilliseconds:U});if(A.toUpperCase()!="Z")Z.setTime(Z.getTime()-TO(A));return Z},"parseRfc3339DateTimeWithOffset"),ui=new RegExp(/^(?:Mon|Tue|Wed|Thu|Fri|Sat|Sun), (\d{2}) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) (\d{4}) (\d{1,2}):(\d{2}):(\d{2})(?:\.(\d+))? GMT$/),ti=new RegExp(/^(?:Monday|Tuesday|Wednesday|Thursday|Friday|Saturday|Sunday), (\d{2})-(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)-(\d{2}) (\d{1,2}):(\d{2}):(\d{2})(?:\.(\d+))? GMT$/),rO=new RegExp(/^(?:Mon|Tue|Wed|Thu|Fri|Sat|Sun) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) ( [1-9]|\d{2}) (\d{1,2}):(\d{2}):(\d{2})(?:\.(\d+))? (\d{4})$/),fO=v((r)=>{if(r===null||r===void 0)return;if(typeof r!=="string")throw new TypeError("RFC-7231 date-times must be expressed as strings");let s=ui.exec(r);if(s){const[f,w,h,E,$,I,F,U]=s;return Z1(wh(hh(E)),YF(h),Bs(w,"day",1,31),{hours:$,minutes:I,seconds:F,fractionalMilliseconds:U})}if(s=ti.exec(r),s){const[f,w,h,E,$,I,F,U]=s;return EO(Z1(wO(E),YF(h),Bs(w,"day",1,31),{hours:$,minutes:I,seconds:F,fractionalMilliseconds:U}))}if(s=rO.exec(r),s){const[f,w,h,E,$,I,F,U]=s;return Z1(wh(hh(U)),YF(w),Bs(h.trimLeft(),"day",1,31),{hours:E,minutes:$,seconds:I,fractionalMilliseconds:F})}throw new TypeError("Invalid RFC-7231 date-time value")},"parseRfc7231DateTime"),sO=v((r)=>{if(r===null||r===void 0)return;let s;if(typeof r==="number")s=r;else if(typeof r==="string")s=BF(r);else if(typeof r==="object"&&r.tag===1)s=r.value;else throw new TypeError("Epoch timestamps must be expressed as floating point numbers or their string representation");if(Number.isNaN(s)||s===1/0||s===-1/0)throw new TypeError("Epoch timestamps must be valid, non-Infinite, non-NaN numerics");return new Date(Math.round(s*1000))},"parseEpochTimestamp"),Z1=v((r,s,f,w)=>{const h=s-1;return IO(r,h,f),new Date(Date.UTC(r,h,f,Bs(w.hours,"hour",0,23),Bs(w.minutes,"minute",0,59),Bs(w.seconds,"seconds",0,60),UO(w.fractionalMilliseconds)))},"buildDate"),wO=v((r)=>{const s=new Date().getUTCFullYear(),f=Math.floor(s/100)*100+wh(hh(r));if(f<s)return f+100;return f},"parseTwoDigitYear"),hO=1576800000000,EO=v((r)=>{if(r.getTime()-new Date().getTime()>hO)return new Date(Date.UTC(r.getUTCFullYear()-100,r.getUTCMonth(),r.getUTCDate(),r.getUTCHours(),r.getUTCMinutes(),r.getUTCSeconds(),r.getUTCMilliseconds()));return r},"adjustRfc850Year"),YF=v((r)=>{const s=VF.indexOf(r);if(s<0)throw new TypeError(`Invalid month: ${r}`);return s+1},"parseMonthByShortName"),$O=[31,28,31,30,31,30,31,31,30,31,30,31],IO=v((r,s,f)=>{let w=$O[s];if(s===1&&FO(r))w=29;if(f>w)throw new TypeError(`Invalid day for ${VF[s]} in ${r}: ${f}`)},"validateDayOfMonth"),FO=v((r)=>{return r%4===0&&(r%100!==0||r%400===0)},"isLeapYear"),Bs=v((r,s,f,w)=>{const h=tW(hh(r));if(h<f||h>w)throw new TypeError(`${s} must be between ${f} and ${w}, inclusive`);return h},"parseDateValue"),UO=v((r)=>{if(r===null||r===void 0)return 0;return aW("0."+r)*1000},"parseMilliseconds"),TO=v((r)=>{const s=r[0];let f=1;if(s=="+")f=1;else if(s=="-")f=-1;else throw new TypeError(`Offset direction, ${s}, must be "+" or "-"`);const w=Number(r.substring(1,3)),h=Number(r.substring(4,6));return f*(w*60+h)*60*1000},"parseOffsetToMilliseconds"),hh=v((r)=>{let s=0;while(s<r.length-1&&r.charAt(s)==="0")s++;if(s===0)return r;return r.slice(s)},"stripLeadingZeroes"),fz=class r extends Error{constructor(s){super(s.message);Object.setPrototypeOf(this,r.prototype),this.name=s.name,this.$fault=s.$fault,this.$metadata=s.$metadata}};v(fz,"ServiceException");var GO=fz,sz=v((r,s={})=>{Object.entries(s).filter(([,w])=>w!==void 0).forEach(([w,h])=>{if(r[w]==null||r[w]==="")r[w]=h});const f=r.message||r.Message||"UnknownError";return r.message=f,delete r.Message,r},"decorateServiceException"),wz=v(({output:r,parsedBody:s,exceptionCtor:f,errorCode:w})=>{const h=LO(r),E=h.httpStatusCode?h.httpStatusCode+"":void 0,$=new f({name:(s==null?void 0:s.code)||(s==null?void 0:s.Code)||w||E||"UnknownError",$fault:"client",$metadata:h});throw sz($,s)},"throwDefaultError"),AO=v((r)=>{return({output:s,parsedBody:f,errorCode:w})=>{wz({output:s,parsedBody:f,exceptionCtor:r,errorCode:w})}},"withBaseException"),LO=v((r)=>({httpStatusCode:r.statusCode,requestId:r.headers["x-amzn-requestid"]??r.headers["x-amzn-request-id"]??r.headers["x-amz-request-id"],extendedRequestId:r.headers["x-amz-id-2"],cfId:r.headers["x-amz-cf-id"]}),"deserializeMetadata"),RO=v((r)=>{switch(r){case"standard":return{retryMode:"standard",connectionTimeout:3100};case"in-region":return{retryMode:"standard",connectionTimeout:1100};case"cross-region":return{retryMode:"standard",connectionTimeout:3100};case"mobile":return{retryMode:"standard",connectionTimeout:30000};default:return{}}},"loadConfigsForDefaultMode"),cW=!1,CO=v((r)=>{if(r&&!cW&&parseInt(r.substring(1,r.indexOf(".")))<16)cW=!0},"emitWarningIfUnsupportedVersion");v(b$,"extendedEncodeURIComponent");var WO=v((r)=>{const s=[];for(let f in XF.AlgorithmId){const w=XF.AlgorithmId[f];if(r[w]===void 0)continue;s.push({algorithmId:()=>w,checksumConstructor:()=>r[w]})}return{_checksumAlgorithms:s,addChecksumAlgorithm(f){this._checksumAlgorithms.push(f)},checksumAlgorithms(){return this._checksumAlgorithms}}},"getChecksumConfiguration"),zO=v((r)=>{const s={};return r.checksumAlgorithms().forEach((f)=>{s[f.algorithmId()]=f.checksumConstructor()}),s},"resolveChecksumRuntimeConfig"),SO=v((r)=>{let s=r.retryStrategy;return{setRetryStrategy(f){s=f},retryStrategy(){return s}}},"getRetryConfiguration"),YO=v((r)=>{const s={};return s.retryStrategy=r.retryStrategy(),s},"resolveRetryRuntimeConfig"),hz=v((r)=>{return{...WO(r),...SO(r)}},"getDefaultExtensionConfiguration"),XO=hz,KO=v((r)=>{return{...zO(r),...YO(r)}},"resolveDefaultRuntimeConfig"),ZO=v((r)=>Array.isArray(r)?r:[r],"getArrayIfSingleItem"),Ez=v((r)=>{for(let f in r)if(r.hasOwnProperty(f)&&r[f]["#text"]!==void 0)r[f]=r[f]["#text"];else if(typeof r[f]==="object"&&r[f]!==null)r[f]=Ez(r[f]);return r},"getValueFromTextNode"),PO=v((r)=>{return r!=null},"isSerializableHeaderValue"),B1=v(function(){const r=Object.getPrototypeOf(this).constructor,f=new(Function.bind.apply(String,[null,...arguments]));return Object.setPrototypeOf(f,r.prototype),f},"StringWrapper");B1.prototype=Object.create(String.prototype,{constructor:{value:B1,enumerable:!1,writable:!0,configurable:!0}});Object.setPrototypeOf(B1,String);var $z=class r extends B1{deserializeJSON(){return JSON.parse(super.toString())}toJSON(){return super.toString()}static fromObject(s){if(s instanceof r)return s;else if(s instanceof String||typeof s==="string")return new r(s);return new r(JSON.stringify(s))}};v($z,"LazyJsonString");var JO=$z,Iz=class r{trace(){}debug(){}info(){}warn(){}error(){}};v(Iz,"NoOpLogger");var QO=Iz;v(HF,"map");var BO=v((r)=>{const s={};for(let[f,w]of Object.entries(r||{}))s[f]=[,w];return s},"convertMap"),MO=v((r,s)=>{const f={};for(let w in s)Fz(f,r,s,w);return f},"take"),VO=v((r,s,f)=>{return HF(r,Object.entries(f).reduce((w,[h,E])=>{if(Array.isArray(E))w[h]=E;else if(typeof E==="function")w[h]=[s,E()];else w[h]=[s,E];return w},{}))},"mapWithFilter"),Fz=v((r,s,f,w)=>{if(s!==null){let $=f[w];if(typeof $==="function")$=[,$];const[I=HO,F=lO,U=w]=$;if(typeof I==="function"&&I(s[U])||typeof I!=="function"&&!!I)r[w]=F(s[U]);return}let[h,E]=f[w];if(typeof E==="function"){let $;const I=h===void 0&&($=E())!=null,F=typeof h==="function"&&!!h(void 0)||typeof h!=="function"&&!!h;if(I)r[w]=$;else if(F)r[w]=E()}else{const $=h===void 0&&E!=null,I=typeof h==="function"&&!!h(E)||typeof h!=="function"&&!!h;if($||I)r[w]=E}},"applyInstruction"),HO=v((r)=>r!=null,"nonNullish"),lO=v((r)=>r,"pass");v(Uz,"quoteHeader");var DO=v((r,s,f,w,h,E)=>{if(s!=null&&s[f]!==void 0){const $=w();if($.length<=0)throw new Error("Empty value provided for input HTTP label: "+f+".");r=r.replace(h,E?$.split("/").map((I)=>b$(I)).join("/"):b$($))}else throw new Error("No value provided for input HTTP label: "+f+".");return r},"resolvedPath"),kO=v((r)=>{if(r!==r)return"NaN";switch(r){case 1/0:return"Infinity";case-1/0:return"-Infinity";default:return r}},"serializeFloat"),yO=v((r)=>r.toISOString().replace(".000Z","Z"),"serializeDateTime"),JF=v((r)=>{if(r==null)return{};if(Array.isArray(r))return r.filter((s)=>s!=null).map(JF);if(typeof r==="object"){const s={};for(let f of Object.keys(r)){if(r[f]==null)continue;s[f]=JF(r[f])}return s}return r},"_json");v(Tz,"splitEvery");var NO=v((r)=>{const s=r.length,f=[];let w=!1,h=void 0,E=0;for(let $=0;$<s;++$){const I=r[$];switch(I){case'"':if(h!=="\\")w=!w;break;case",":if(!w)f.push(r.slice(E,$)),E=$+1;break;default:}h=I}return f.push(r.slice(E)),f.map(($)=>{$=$.trim();const I=$.length;if(I<2)return $;if($[0]==='"'&&$[I-1]==='"')$=$.slice(1,I-1);return $.replace(/\\"/g,'"')})},"splitHeader")});var Rz=O((Az)=>{Object.defineProperty(Az,"__esModule",{value:!0});Az.isStreamingPayload=void 0;var qO=import.meta.require("stream"),mO=(r)=>(r===null||r===void 0?void 0:r.body)instanceof qO.Readable||typeof ReadableStream!=="undefined"&&(r===null||r===void 0?void 0:r.body)instanceof ReadableStream;Az.isStreamingPayload=mO});var kz=O((Gfr,Dz)=>{var{defineProperty:g$,getOwnPropertyDescriptor:jO,getOwnPropertyNames:vO}=Object,iO=Object.prototype.hasOwnProperty,Dr=(r,s)=>g$(r,"name",{value:s,configurable:!0}),OO=(r,s)=>{for(var f in s)g$(r,f,{get:s[f],enumerable:!0})},dO=(r,s,f,w)=>{if(s&&typeof s==="object"||typeof s==="function"){for(let h of vO(s))if(!iO.call(r,h)&&h!==f)g$(r,h,{get:()=>s[h],enumerable:!(w=jO(s,h))||w.enumerable})}return r},cO=(r)=>dO(g$({},"__esModule",{value:!0}),r),Wz={};OO(Wz,{AdaptiveRetryStrategy:()=>gO,CONFIG_MAX_ATTEMPTS:()=>DF,CONFIG_RETRY_MODE:()=>Qz,ENV_MAX_ATTEMPTS:()=>lF,ENV_RETRY_MODE:()=>Jz,NODE_MAX_ATTEMPT_CONFIG_OPTIONS:()=>xO,NODE_RETRY_MODE_CONFIG_OPTIONS:()=>nO,StandardRetryStrategy:()=>Zz,defaultDelayDecider:()=>Sz,defaultRetryDecider:()=>Yz,getOmitRetryHeadersPlugin:()=>oO,getRetryAfterHint:()=>lz,getRetryPlugin:()=>fd,omitRetryHeadersMiddleware:()=>Bz,omitRetryHeadersMiddlewareOptions:()=>Mz,resolveRetryConfig:()=>eO,retryMiddleware:()=>Vz,retryMiddlewareOptions:()=>Hz});Dz.exports=cO(Wz);var Ih=L0(),zz=n6(),Zr=uR(),bO=Dr((r,s)=>{const f=r,w=(s==null?void 0:s.noRetryIncrement)??Zr.NO_RETRY_INCREMENT,h=(s==null?void 0:s.retryCost)??Zr.RETRY_COST,E=(s==null?void 0:s.timeoutRetryCost)??Zr.TIMEOUT_RETRY_COST;let $=r;const I=Dr((L)=>L.name==="TimeoutError"?E:h,"getCapacityAmount"),F=Dr((L)=>I(L)<=$,"hasRetryTokens");return Object.freeze({hasRetryTokens:F,retrieveRetryTokens:Dr((L)=>{if(!F(L))throw new Error("No retry token available");const S=I(L);return $-=S,S},"retrieveRetryTokens"),releaseRetryTokens:Dr((L)=>{$+=L??w,$=Math.min($,f)},"releaseRetryTokens")})},"getDefaultRetryQuota"),Sz=Dr((r,s)=>Math.floor(Math.min(Zr.MAXIMUM_RETRY_DELAY,Math.random()*2**s*r)),"defaultDelayDecider"),d0=o6(),Yz=Dr((r)=>{if(!r)return!1;return d0.isRetryableByTrait(r)||d0.isClockSkewError(r)||d0.isThrottlingError(r)||d0.isTransientError(r)},"defaultRetryDecider"),Xz=Dr((r)=>{if(r instanceof Error)return r;if(r instanceof Object)return Object.assign(new Error,r);if(typeof r==="string")return new Error(r);return new Error(`AWS SDK error wrapper for ${r}`)},"asSdkError"),Kz=class r{constructor(s,f){this.maxAttemptsProvider=s,this.mode=Zr.RETRY_MODES.STANDARD,this.retryDecider=(f==null?void 0:f.retryDecider)??Yz,this.delayDecider=(f==null?void 0:f.delayDecider)??Sz,this.retryQuota=(f==null?void 0:f.retryQuota)??bO(Zr.INITIAL_RETRY_TOKENS)}shouldRetry(s,f,w){return f<w&&this.retryDecider(s)&&this.retryQuota.hasRetryTokens(s)}async getMaxAttempts(){let s;try{s=await this.maxAttemptsProvider()}catch(f){s=Zr.DEFAULT_MAX_ATTEMPTS}return s}async retry(s,f,w){let h,E=0,$=0;const I=await this.getMaxAttempts(),{request:F}=f;if(Ih.HttpRequest.isInstance(F))F.headers[Zr.INVOCATION_ID_HEADER]=zz.v4();while(!0)try{if(Ih.HttpRequest.isInstance(F))F.headers[Zr.REQUEST_HEADER]=`attempt=${E+1}; max=${I}`;if(w==null?void 0:w.beforeRequest)await w.beforeRequest();const{response:U,output:A}=await s(f);if(w==null?void 0:w.afterRequest)w.afterRequest(U);return this.retryQuota.releaseRetryTokens(h),A.$metadata.attempts=E+1,A.$metadata.totalRetryDelay=$,{response:U,output:A}}catch(U){const A=Xz(U);if(E++,this.shouldRetry(A,E,I)){h=this.retryQuota.retrieveRetryTokens(A);const L=this.delayDecider(d0.isThrottlingError(A)?Zr.THROTTLING_RETRY_DELAY_BASE:Zr.DEFAULT_RETRY_DELAY_BASE,E),S=_O(A.$response),z=Math.max(S||0,L);$+=z,await new Promise((Z)=>setTimeout(Z,z));continue}if(!A.$metadata)A.$metadata={};throw A.$metadata.attempts=E,A.$metadata.totalRetryDelay=$,A}}};Dr(Kz,"StandardRetryStrategy");var Zz=Kz,_O=Dr((r)=>{if(!Ih.HttpResponse.isInstance(r))return;const s=Object.keys(r.headers).find((E)=>E.toLowerCase()==="retry-after");if(!s)return;const f=r.headers[s],w=Number(f);if(!Number.isNaN(w))return w*1000;return new Date(f).getTime()-Date.now()},"getDelayFromRetryAfterHeader"),Pz=class r extends Zz{constructor(s,f){const{rateLimiter:w,...h}=f??{};super(s,h);this.rateLimiter=w??new Zr.DefaultRateLimiter,this.mode=Zr.RETRY_MODES.ADAPTIVE}async retry(s,f){return super.retry(s,f,{beforeRequest:async()=>{return this.rateLimiter.getSendToken()},afterRequest:(w)=>{this.rateLimiter.updateClientSendingRate(w)}})}};Dr(Pz,"AdaptiveRetryStrategy");var gO=Pz,Cz=G1(),lF="AWS_MAX_ATTEMPTS",DF="max_attempts",xO={environmentVariableSelector:(r)=>{const s=r[lF];if(!s)return;const f=parseInt(s);if(Number.isNaN(f))throw new Error(`Environment variable ${lF} mast be a number, got "${s}"`);return f},configFileSelector:(r)=>{const s=r[DF];if(!s)return;const f=parseInt(s);if(Number.isNaN(f))throw new Error(`Shared config file entry ${DF} mast be a number, got "${s}"`);return f},default:Zr.DEFAULT_MAX_ATTEMPTS},eO=Dr((r)=>{const{retryStrategy:s}=r,f=Cz.normalizeProvider(r.maxAttempts??Zr.DEFAULT_MAX_ATTEMPTS);return{...r,maxAttempts:f,retryStrategy:async()=>{if(s)return s;if(await Cz.normalizeProvider(r.retryMode)()===Zr.RETRY_MODES.ADAPTIVE)return new Zr.AdaptiveRetryStrategy(f);return new Zr.StandardRetryStrategy(f)}}},"resolveRetryConfig"),Jz="AWS_RETRY_MODE",Qz="retry_mode",nO={environmentVariableSelector:(r)=>r[Jz],configFileSelector:(r)=>r[Qz],default:Zr.DEFAULT_RETRY_MODE},Bz=Dr(()=>(r)=>async(s)=>{const{request:f}=s;if(Ih.HttpRequest.isInstance(f))delete f.headers[Zr.INVOCATION_ID_HEADER],delete f.headers[Zr.REQUEST_HEADER];return r(s)},"omitRetryHeadersMiddleware"),Mz={name:"omitRetryHeadersMiddleware",tags:["RETRY","HEADERS","OMIT_RETRY_HEADERS"],relation:"before",toMiddleware:"awsAuthMiddleware",override:!0},oO=Dr((r)=>({applyToStack:(s)=>{s.addRelativeTo(Bz(),Mz)}}),"getOmitRetryHeadersPlugin"),aO=$h(),pO=Rz(),Vz=Dr((r)=>(s,f)=>async(w)=>{var h;let E=await r.retryStrategy();const $=await r.maxAttempts();if(uO(E)){E=E;let I=await E.acquireInitialRetryToken(f.partition_id),F=new Error,U=0,A=0;const{request:L}=w,S=Ih.HttpRequest.isInstance(L);if(S)L.headers[Zr.INVOCATION_ID_HEADER]=zz.v4();while(!0)try{if(S)L.headers[Zr.REQUEST_HEADER]=`attempt=${U+1}; max=${$}`;const{response:z,output:Z}=await s(w);return E.recordSuccess(I),Z.$metadata.attempts=U+1,Z.$metadata.totalRetryDelay=A,{response:z,output:Z}}catch(z){const Z=tO(z);if(F=Xz(z),S&&pO.isStreamingPayload(L))throw(h=f.logger instanceof aO.NoOpLogger?console:f.logger)==null||h.warn("An error was encountered in a non-retryable streaming request."),F;try{I=await E.refreshRetryTokenForRetry(I,Z)}catch(M){if(!F.$metadata)F.$metadata={};throw F.$metadata.attempts=U+1,F.$metadata.totalRetryDelay=A,F}U=I.getRetryCount();const N=I.getRetryDelay();A+=N,await new Promise((M)=>setTimeout(M,N))}}else{if(E=E,E==null?void 0:E.mode)f.userAgent=[...f.userAgent||[],["cfg/retry-mode",E.mode]];return E.retry(s,w)}},"retryMiddleware"),uO=Dr((r)=>typeof r.acquireInitialRetryToken!=="undefined"&&typeof r.refreshRetryTokenForRetry!=="undefined"&&typeof r.recordSuccess!=="undefined","isRetryStrategyV2"),tO=Dr((r)=>{const s={error:r,errorType:rd(r)},f=lz(r.$response);if(f)s.retryAfterHint=f;return s},"getRetryErrorInfo"),rd=Dr((r)=>{if(d0.isThrottlingError(r))return"THROTTLING";if(d0.isTransientError(r))return"TRANSIENT";if(d0.isServerError(r))return"SERVER_ERROR";return"CLIENT_ERROR"},"getRetryErrorType"),Hz={name:"retryMiddleware",tags:["RETRY"],step:"finalizeRequest",priority:"high",override:!0},fd=Dr((r)=>({applyToStack:(s)=>{s.add(Vz(r),Hz)}}),"getRetryPlugin"),lz=Dr((r)=>{if(!Ih.HttpResponse.isInstance(r))return;const s=Object.keys(r.headers).find((E)=>E.toLowerCase()==="retry-after");if(!s)return;const f=r.headers[s],w=Number(f);if(!Number.isNaN(w))return new Date(w*1000);return new Date(f)},"getRetryAfterHint")});var qr=O((Afr,pz)=>{function qz(r){const s=new Map;for(let f of r)s.set(f.schemeId,f);return s}function ez(r,s){return new oz(r,s)}function az(r,s,f,w,h){return zr(async function*E($,I,...F){let U=$.startingToken||void 0,A=!0,L;while(A){if(I[f]=U,h)I[h]=I[h]??$.pageSize;if($.client instanceof r)L=await Qd(s,$.client,I,...F);else throw new Error(`Invalid client, expected instance of ${r.name}`);yield L;const S=U;U=Bd(L,w),A=!!(U&&(!$.stopOnSameToken||U!==S))}return},"paginateOperation")}var{defineProperty:e$,getOwnPropertyDescriptor:sd,getOwnPropertyNames:wd}=Object,hd=Object.prototype.hasOwnProperty,zr=(r,s)=>e$(r,"name",{value:s,configurable:!0}),Ed=(r,s)=>{for(var f in s)e$(r,f,{get:s[f],enumerable:!0})},$d=(r,s,f,w)=>{if(s&&typeof s==="object"||typeof s==="function"){for(let h of wd(s))if(!hd.call(r,h)&&h!==f)e$(r,h,{get:()=>s[h],enumerable:!(w=sd(s,h))||w.enumerable})}return r},Id=(r)=>$d(e$({},"__esModule",{value:!0}),r),yz={};Ed(yz,{DefaultIdentityProviderConfig:()=>Wd,EXPIRATION_MS:()=>gz,HttpApiKeyAuthSigner:()=>zd,HttpBearerAuthSigner:()=>Sd,NoAuthSigner:()=>Yd,RequestBuilder:()=>oz,createIsIdentityExpiredFunction:()=>_z,createPaginator:()=>az,doesIdentityRequireRefresh:()=>xz,getHttpAuthSchemeEndpointRuleSetPlugin:()=>Ud,getHttpAuthSchemePlugin:()=>Gd,getHttpSigningPlugin:()=>Cd,getSmithyContext:()=>Zd,httpAuthSchemeEndpointRuleSetMiddlewareOptions:()=>mz,httpAuthSchemeMiddleware:()=>kF,httpAuthSchemeMiddlewareOptions:()=>jz,httpSigningMiddleware:()=>vz,httpSigningMiddlewareOptions:()=>iz,isIdentityExpired:()=>Xd,memoizeIdentityProvider:()=>Kd,normalizeProvider:()=>Pd,requestBuilder:()=>ez});pz.exports=Id(yz);var Nz=G1();zr(qz,"convertHttpAuthSchemesToMap");var kF=zr((r,s)=>(f,w)=>async(h)=>{var E;const $=r.httpAuthSchemeProvider(await s.httpAuthSchemeParametersProvider(r,w,h.input)),I=qz(r.httpAuthSchemes),F=Nz.getSmithyContext(w),U=[];for(let A of $){const L=I.get(A.schemeId);if(!L){U.push(`HttpAuthScheme \`${A.schemeId}\` was not enabled for this service.`);continue}const S=L.identityProvider(await s.identityProviderConfigProvider(r));if(!S){U.push(`HttpAuthScheme \`${A.schemeId}\` did not have an IdentityProvider configured.`);continue}const{identityProperties:z={},signingProperties:Z={}}=((E=A.propertiesExtractor)==null?void 0:E.call(A,r,w))||{};A.identityProperties=Object.assign(A.identityProperties||{},z),A.signingProperties=Object.assign(A.signingProperties||{},Z),F.selectedHttpAuthScheme={httpAuthOption:A,identity:await S(A.identityProperties),signer:L.signer};break}if(!F.selectedHttpAuthScheme)throw new Error(U.join("\n"));return f(h)},"httpAuthSchemeMiddleware"),Fd=kL(),mz={step:"serialize",tags:["HTTP_AUTH_SCHEME"],name:"httpAuthSchemeMiddleware",override:!0,relation:"before",toMiddleware:Fd.endpointMiddlewareOptions.name},Ud=zr((r,{httpAuthSchemeParametersProvider:s,identityProviderConfigProvider:f})=>({applyToStack:(w)=>{w.addRelativeTo(kF(r,{httpAuthSchemeParametersProvider:s,identityProviderConfigProvider:f}),mz)}}),"getHttpAuthSchemeEndpointRuleSetPlugin"),Td=O6(),jz={step:"serialize",tags:["HTTP_AUTH_SCHEME"],name:"httpAuthSchemeMiddleware",override:!0,relation:"before",toMiddleware:Td.serializerMiddlewareOption.name},Gd=zr((r,{httpAuthSchemeParametersProvider:s,identityProviderConfigProvider:f})=>({applyToStack:(w)=>{w.addRelativeTo(kF(r,{httpAuthSchemeParametersProvider:s,identityProviderConfigProvider:f}),jz)}}),"getHttpAuthSchemePlugin"),n$=L0(),Ad=zr((r)=>(s)=>{throw s},"defaultErrorHandler"),Ld=zr((r,s)=>{},"defaultSuccessHandler"),vz=zr((r)=>(s,f)=>async(w)=>{if(!n$.HttpRequest.isInstance(w.request))return s(w);const E=Nz.getSmithyContext(f).selectedHttpAuthScheme;if(!E)throw new Error("No HttpAuthScheme was selected: unable to sign request");const{httpAuthOption:{signingProperties:$={}},identity:I,signer:F}=E,U=await s({...w,request:await F.sign(w.request,I,$)}).catch((F.errorHandler||Ad)($));return(F.successHandler||Ld)(U.response,$),U},"httpSigningMiddleware"),Rd=kz(),iz={step:"finalizeRequest",tags:["HTTP_SIGNING"],name:"httpSigningMiddleware",aliases:["apiKeyMiddleware","tokenMiddleware","awsAuthMiddleware"],override:!0,relation:"after",toMiddleware:Rd.retryMiddlewareOptions.name},Cd=zr((r)=>({applyToStack:(s)=>{s.addRelativeTo(vz(r),iz)}}),"getHttpSigningPlugin"),Oz=class r{constructor(s){this.authSchemes=new Map;for(let[f,w]of Object.entries(s))if(w!==void 0)this.authSchemes.set(f,w)}getIdentityProvider(s){return this.authSchemes.get(s)}};zr(Oz,"DefaultIdentityProviderConfig");var Wd=Oz,x$=Ff(),dz=class r{async sign(s,f,w){if(!w)throw new Error("request could not be signed with `apiKey` since the `name` and `in` signer properties are missing");if(!w.name)throw new Error("request could not be signed with `apiKey` since the `name` signer property is missing");if(!w.in)throw new Error("request could not be signed with `apiKey` since the `in` signer property is missing");if(!f.apiKey)throw new Error("request could not be signed with `apiKey` since the `apiKey` is not defined");const h=n$.HttpRequest.clone(s);if(w.in===x$.HttpApiKeyAuthLocation.QUERY)h.query[w.name]=f.apiKey;else if(w.in===x$.HttpApiKeyAuthLocation.HEADER)h.headers[w.name]=w.scheme?`${w.scheme} ${f.apiKey}`:f.apiKey;else throw new Error("request can only be signed with `apiKey` locations `query` or `header`, but found: `"+w.in+"`");return h}};zr(dz,"HttpApiKeyAuthSigner");var zd=dz,cz=class r{async sign(s,f,w){const h=n$.HttpRequest.clone(s);if(!f.token)throw new Error("request could not be signed with `token` since the `token` is not defined");return h.headers.Authorization=`Bearer ${f.token}`,h}};zr(cz,"HttpBearerAuthSigner");var Sd=cz,bz=class r{async sign(s,f,w){return s}};zr(bz,"NoAuthSigner");var Yd=bz,_z=zr((r)=>(s)=>xz(s)&&s.expiration.getTime()-Date.now()<r,"createIsIdentityExpiredFunction"),gz=300000,Xd=_z(gz),xz=zr((r)=>r.expiration!==void 0,"doesIdentityRequireRefresh"),Kd=zr((r,s,f)=>{if(r===void 0)return;const w=typeof r!=="function"?async()=>Promise.resolve(r):r;let h,E,$,I=!1;const F=zr(async(U)=>{if(!E)E=w(U);try{h=await E,$=!0,I=!1}finally{E=void 0}return h},"coalesceProvider");if(s===void 0)return async(U)=>{if(!$||(U==null?void 0:U.forceRefresh))h=await F(U);return h};return async(U)=>{if(!$||(U==null?void 0:U.forceRefresh))h=await F(U);if(I)return h;if(!f(h))return I=!0,h;if(s(h))return await F(U),h;return h}},"memoizeIdentityProvider"),Zd=zr((r)=>r[x$.SMITHY_CONTEXT_KEY]||(r[x$.SMITHY_CONTEXT_KEY]={}),"getSmithyContext"),Pd=zr((r)=>{if(typeof r==="function")return r;const s=Promise.resolve(r);return()=>s},"normalizeProvider"),Jd=$h();zr(ez,"requestBuilder");var nz=class r{constructor(s,f){this.input=s,this.context=f,this.query={},this.method="",this.headers={},this.path="",this.body=null,this.hostname="",this.resolvePathStack=[]}async build(){const{hostname:s,protocol:f="https",port:w,path:h}=await this.context.endpoint();this.path=h;for(let E of this.resolvePathStack)E(this.path);return new n$.HttpRequest({protocol:f,hostname:this.hostname||s,port:w,method:this.method,path:this.path,query:this.query,body:this.body,headers:this.headers})}hn(s){return this.hostname=s,this}bp(s){return this.resolvePathStack.push((f)=>{this.path=`${(f==null?void 0:f.endsWith("/"))?f.slice(0,-1):f||""}`+s}),this}p(s,f,w,h){return this.resolvePathStack.push((E)=>{this.path=Jd.resolvedPath(E,this.input,s,f,w,h)}),this}h(s){return this.headers=s,this}q(s){return this.query=s,this}b(s){return this.body=s,this}m(s){return this.method=s,this}};zr(nz,"RequestBuilder");var oz=nz,Qd=zr(async(r,s,f,...w)=>{return await s.send(new r(f),...w)},"makePagedClientRequest");zr(az,"createPaginator");var Bd=zr((r,s)=>{let f=r;const w=s.split(".");for(let h of w){if(!f||typeof f!=="object")return;f=f[h]}return f},"get")});function Md(r){if(r===void 0)return!0;return typeof r==="string"&&r.length<=50}function Ms(r){const s=uz.normalizeProvider(r.userAgentAppId??yF);return{...r,customUserAgent:typeof r.customUserAgent==="string"?[[r.customUserAgent]]:r.customUserAgent,userAgentAppId:async()=>{const f=await s();if(!Md(f)){const w=r.logger?.constructor?.name==="NoOpLogger"||!r.logger?console:r.logger;if(typeof f!=="string")w?.warn("userAgentAppId must be a string or undefined.");else if(f.length>50)w?.warn("The provided userAgentAppId exceeds the maximum length of 50 characters.")}return f}}}var uz,yF=void 0;var tz=G(()=>{uz=m(qr(),1)});class fs{constructor({size:r,params:s}){if(this.data=new Map,this.parameters=[],this.capacity=r??50,s)this.parameters=s}get(r,s){const f=this.hash(r);if(f===!1)return s();if(!this.data.has(f)){if(this.data.size>this.capacity+10){const w=this.data.keys();let h=0;while(!0){const{value:E,done:$}=w.next();if(this.data.delete(E),$||++h>10)break}}this.data.set(f,s())}return this.data.get(f)}size(){return this.data.size}hash(r){let s="";const{parameters:f}=this;if(f.length===0)return!1;for(let w of f){const h=String(r[w]??"");if(h.includes("|;"))return!1;s+=h+"|;"}return s}}var Vd,M1=(r)=>Vd.test(r)||r.startsWith("[")&&r.endsWith("]");var NF=G(()=>{Vd=new RegExp("^(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)(?:\\.(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)){3}$")});var Hd,V1=(r,s=!1)=>{if(!s)return Hd.test(r);const f=r.split(".");for(let w of f)if(!V1(w))return!1;return!0};var qF=G(()=>{Hd=new RegExp("^(?!.*-$)(?!-)[a-zA-Z0-9-]{1,63}$")});var ur;var o$=G(()=>{ur={}});var W0="endpoints";function Bf(r){if(typeof r!=="object"||r==null)return r;if("ref"in r)return`\$${Bf(r.ref)}`;if("fn"in r)return`${r.fn}(${(r.argv||[]).map(Bf).join(", ")})`;return JSON.stringify(r,null,2)}var H1=()=>{};var Wr;var rS=G(()=>{Wr=class Wr extends Error{constructor(r){super(r);this.name="EndpointError"}}});var fS=()=>{};var sS=()=>{};var wS=()=>{};var hS=()=>{};var ES=()=>{};var $S=()=>{};var Mf=G(()=>{rS();fS();sS();wS();hS();ES();$S()});var IS=(r,s)=>r===s;var FS=(r)=>{const s=r.split("."),f=[];for(let w of s){const h=w.indexOf("[");if(h!==-1){if(w.indexOf("]")!==w.length-1)throw new Wr(`Path: '${r}' does not end with ']'`);const E=w.slice(h+1,-1);if(Number.isNaN(parseInt(E)))throw new Wr(`Invalid array index: '${E}' in path: '${r}'`);if(h!==0)f.push(w.slice(0,h));f.push(E)}else f.push(w)}return f};var US=G(()=>{Mf()});var a$=(r,s)=>FS(s).reduce((f,w)=>{if(typeof f!=="object")throw new Wr(`Index '${w}' in '${s}' not found in '${JSON.stringify(r)}'`);else if(Array.isArray(f))return f[parseInt(w)];return f[w]},r);var TS=G(()=>{Mf();US()});var GS=(r)=>r!=null;var AS=(r)=>!r;var p$,mF,LS=(r)=>{const s=(()=>{try{if(r instanceof URL)return r;if(typeof r==="object"&&"hostname"in r){const{hostname:S,port:z,protocol:Z="",path:N="",query:M={}}=r,l=new URL(`${Z}//${S}${z?`:${z}`:""}${N}`);return l.search=Object.entries(M).map(([k,i])=>`${k}=${i}`).join("&"),l}return new URL(r)}catch(S){return null}})();if(!s)return console.error(`Unable to parse ${JSON.stringify(r)} as a whatwg URL.`),null;const f=s.href,{host:w,hostname:h,pathname:E,protocol:$,search:I}=s;if(I)return null;const F=$.slice(0,-1);if(!Object.values(p$.EndpointURLScheme).includes(F))return null;const U=M1(h),A=f.includes(`${w}:${mF[F]}`)||typeof r==="string"&&r.includes(`${w}:${mF[F]}`),L=`${w}${A?`:${mF[F]}`:""}`;return{scheme:F,authority:L,path:E,normalizedPath:E.endsWith("/")?E:`${E}/`,isIp:U}};var RS=G(()=>{p$=m(Ff(),1);NF();mF={[p$.EndpointURLScheme.HTTP]:80,[p$.EndpointURLScheme.HTTPS]:443}});var CS=(r,s)=>r===s;var WS=(r,s,f,w)=>{if(s>=f||r.length<f)return null;if(!w)return r.substring(s,f);return r.substring(r.length-f,r.length-s)};var zS=(r)=>encodeURIComponent(r).replace(/[!*'()]/g,(s)=>`%${s.charCodeAt(0).toString(16).toUpperCase()}`);var jF=G(()=>{TS();qF();RS()});var SS;var YS=G(()=>{jF();SS={booleanEquals:IS,getAttr:a$,isSet:GS,isValidHostLabel:V1,not:AS,parseURL:LS,stringEquals:CS,substring:WS,uriEncode:zS}});var u$=(r,s)=>{const f=[],w={...s.endpointParams,...s.referenceRecord};let h=0;while(h<r.length){const E=r.indexOf("{",h);if(E===-1){f.push(r.slice(h));break}f.push(r.slice(h,E));const $=r.indexOf("}",E);if($===-1){f.push(r.slice(E));break}if(r[E+1]==="{"&&r[$+1]==="}")f.push(r.slice(E+1,$)),h=$+2;const I=r.substring(E+1,$);if(I.includes("#")){const[F,U]=I.split("#");f.push(a$(w[F],U))}else f.push(w[I]);h=$+1}return f.join("")};var vF=G(()=>{jF()});var XS=({ref:r},s)=>{return{...s.endpointParams,...s.referenceRecord}[r]};var c0=(r,s,f)=>{if(typeof r==="string")return u$(r,f);else if(r.fn)return t$(r,f);else if(r.ref)return XS(r,f);throw new Wr(`'${s}': ${String(r)} is not a string, function or reference.`)};var l1=G(()=>{Mf();iF();vF()});var t$=({fn:r,argv:s},f)=>{const w=s.map((E)=>["boolean","number"].includes(typeof E)?E:c0(E,"arg",f)),h=r.split(".");if(h[0]in ur&&h[1]!=null)return ur[h[0]][h[1]](...w);return SS[r](...w)};var iF=G(()=>{o$();YS();l1()});var KS=({assign:r,...s},f)=>{if(r&&r in f.referenceRecord)throw new Wr(`'${r}' is already defined in Reference Record.`);const w=t$(s,f);return f.logger?.debug?.(`${W0} evaluateCondition: ${Bf(s)} = ${Bf(w)}`),{result:w===""?!0:!!w,...r!=null&&{toAssign:{name:r,value:w}}}};var ZS=G(()=>{H1();Mf();iF()});var Fh=(r=[],s)=>{const f={};for(let w of r){const{result:h,toAssign:E}=KS(w,{...s,referenceRecord:{...s.referenceRecord,...f}});if(!h)return{result:h};if(E)f[E.name]=E.value,s.logger?.debug?.(`${W0} assign: ${E.name} := ${Bf(E.value)}`)}return{result:!0,referenceRecord:f}};var r3=G(()=>{H1();ZS()});var PS=(r,s)=>Object.entries(r).reduce((f,[w,h])=>({...f,[w]:h.map((E)=>{const $=c0(E,"Header value entry",s);if(typeof $!=="string")throw new Wr(`Header '${w}' value '${$}' is not a string`);return $})}),{});var JS=G(()=>{Mf();l1()});var OF=(r,s)=>{if(Array.isArray(r))return r.map((f)=>OF(f,s));switch(typeof r){case"string":return u$(r,s);case"object":if(r===null)throw new Wr(`Unexpected endpoint property: ${r}`);return f3(r,s);case"boolean":return r;default:throw new Wr(`Unexpected endpoint property type: ${typeof r}`)}};var QS=G(()=>{Mf();vF();dF()});var f3=(r,s)=>Object.entries(r).reduce((f,[w,h])=>({...f,[w]:OF(h,s)}),{});var dF=G(()=>{QS()});var BS=(r,s)=>{const f=c0(r,"Endpoint URL",s);if(typeof f==="string")try{return new URL(f)}catch(w){throw console.error(`Failed to construct URL with ${f}`,w),w}throw new Wr(`Endpoint URL must be a string, got ${typeof f}`)};var MS=G(()=>{Mf();l1()});var VS=(r,s)=>{const{conditions:f,endpoint:w}=r,{result:h,referenceRecord:E}=Fh(f,s);if(!h)return;const $={...s,referenceRecord:{...s.referenceRecord,...E}},{url:I,properties:F,headers:U}=w;return s.logger?.debug?.(`${W0} Resolving endpoint from template: ${Bf(w)}`),{...U!=null&&{headers:PS(U,$)},...F!=null&&{properties:f3(F,$)},url:BS(I,$)}};var HS=G(()=>{H1();r3();JS();dF();MS()});var lS=(r,s)=>{const{conditions:f,error:w}=r,{result:h,referenceRecord:E}=Fh(f,s);if(!h)return;throw new Wr(c0(w,"Error",{...s,referenceRecord:{...s.referenceRecord,...E}}))};var DS=G(()=>{Mf();r3();l1()});var kS=(r,s)=>{const{conditions:f,rules:w}=r,{result:h,referenceRecord:E}=Fh(f,s);if(!h)return;return s3(w,{...s,referenceRecord:{...s.referenceRecord,...E}})};var yS=G(()=>{r3();cF()});var s3=(r,s)=>{for(let f of r)if(f.type==="endpoint"){const w=VS(f,s);if(w)return w}else if(f.type==="error")lS(f,s);else if(f.type==="tree"){const w=kS(f,s);if(w)return w}else throw new Wr(`Unknown endpoint rule: ${f}`);throw new Wr("Rules evaluation failed")};var cF=G(()=>{Mf();HS();DS();yS()});var NS=G(()=>{o$();cF()});var ss=(r,s)=>{const{endpointParams:f,logger:w}=s,{parameters:h,rules:E}=r;s.logger?.debug?.(`${W0} Initial EndpointParams: ${Bf(f)}`);const $=Object.entries(h).filter(([,U])=>U.default!=null).map(([U,A])=>[U,A.default]);if($.length>0)for(let[U,A]of $)f[U]=f[U]??A;const I=Object.entries(h).filter(([,U])=>U.required).map(([U])=>U);for(let U of I)if(f[U]==null)throw new Wr(`Missing required parameter: '${U}'`);const F=s3(E,{endpointParams:f,logger:w,referenceRecord:{}});return s.logger?.debug?.(`${W0} Resolved endpoint: ${Bf(F)}`),F};var qS=G(()=>{H1();Mf();NS()});var ws=G(()=>{NF();qF();o$();qS();Mf()});var bF=G(()=>{ws()});var _F=(r,s=!1)=>{if(s){for(let f of r.split("."))if(!_F(f))return!1;return!0}if(!V1(r))return!1;if(r.length<3||r.length>63)return!1;if(r!==r.toLowerCase())return!1;if(M1(r))return!1;return!0};var mS=G(()=>{ws();bF()});var jS=(r)=>{const s=r.split(":");if(s.length<6)return null;const[f,w,h,E,$,...I]=s;if(f!=="arn"||w===""||h===""||I.join(":")==="")return null;const F=I.map((U)=>U.split("/")).flat();return{partition:w,service:h,region:E,accountId:$,resourceId:F}};var iS;var vS=G(()=>{iS={partitions:[{id:"aws",outputs:{dnsSuffix:"amazonaws.com",dualStackDnsSuffix:"api.aws",implicitGlobalRegion:"us-east-1",name:"aws",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^(us|eu|ap|sa|ca|me|af|il|mx)\\-\\w+\\-\\d+$",regions:{"af-south-1":{description:"Africa (Cape Town)"},"ap-east-1":{description:"Asia Pacific (Hong Kong)"},"ap-northeast-1":{description:"Asia Pacific (Tokyo)"},"ap-northeast-2":{description:"Asia Pacific (Seoul)"},"ap-northeast-3":{description:"Asia Pacific (Osaka)"},"ap-south-1":{description:"Asia Pacific (Mumbai)"},"ap-south-2":{description:"Asia Pacific (Hyderabad)"},"ap-southeast-1":{description:"Asia Pacific (Singapore)"},"ap-southeast-2":{description:"Asia Pacific (Sydney)"},"ap-southeast-3":{description:"Asia Pacific (Jakarta)"},"ap-southeast-4":{description:"Asia Pacific (Melbourne)"},"ap-southeast-5":{description:"Asia Pacific (Malaysia)"},"aws-global":{description:"AWS Standard global region"},"ca-central-1":{description:"Canada (Central)"},"ca-west-1":{description:"Canada West (Calgary)"},"eu-central-1":{description:"Europe (Frankfurt)"},"eu-central-2":{description:"Europe (Zurich)"},"eu-north-1":{description:"Europe (Stockholm)"},"eu-south-1":{description:"Europe (Milan)"},"eu-south-2":{description:"Europe (Spain)"},"eu-west-1":{description:"Europe (Ireland)"},"eu-west-2":{description:"Europe (London)"},"eu-west-3":{description:"Europe (Paris)"},"il-central-1":{description:"Israel (Tel Aviv)"},"me-central-1":{description:"Middle East (UAE)"},"me-south-1":{description:"Middle East (Bahrain)"},"sa-east-1":{description:"South America (Sao Paulo)"},"us-east-1":{description:"US East (N. Virginia)"},"us-east-2":{description:"US East (Ohio)"},"us-west-1":{description:"US West (N. California)"},"us-west-2":{description:"US West (Oregon)"}}},{id:"aws-cn",outputs:{dnsSuffix:"amazonaws.com.cn",dualStackDnsSuffix:"api.amazonwebservices.com.cn",implicitGlobalRegion:"cn-northwest-1",name:"aws-cn",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^cn\\-\\w+\\-\\d+$",regions:{"aws-cn-global":{description:"AWS China global region"},"cn-north-1":{description:"China (Beijing)"},"cn-northwest-1":{description:"China (Ningxia)"}}},{id:"aws-us-gov",outputs:{dnsSuffix:"amazonaws.com",dualStackDnsSuffix:"api.aws",implicitGlobalRegion:"us-gov-west-1",name:"aws-us-gov",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^us\\-gov\\-\\w+\\-\\d+$",regions:{"aws-us-gov-global":{description:"AWS GovCloud (US) global region"},"us-gov-east-1":{description:"AWS GovCloud (US-East)"},"us-gov-west-1":{description:"AWS GovCloud (US-West)"}}},{id:"aws-iso",outputs:{dnsSuffix:"c2s.ic.gov",dualStackDnsSuffix:"c2s.ic.gov",implicitGlobalRegion:"us-iso-east-1",name:"aws-iso",supportsDualStack:!1,supportsFIPS:!0},regionRegex:"^us\\-iso\\-\\w+\\-\\d+$",regions:{"aws-iso-global":{description:"AWS ISO (US) global region"},"us-iso-east-1":{description:"US ISO East"},"us-iso-west-1":{description:"US ISO WEST"}}},{id:"aws-iso-b",outputs:{dnsSuffix:"sc2s.sgov.gov",dualStackDnsSuffix:"sc2s.sgov.gov",implicitGlobalRegion:"us-isob-east-1",name:"aws-iso-b",supportsDualStack:!1,supportsFIPS:!0},regionRegex:"^us\\-isob\\-\\w+\\-\\d+$",regions:{"aws-iso-b-global":{description:"AWS ISOB (US) global region"},"us-isob-east-1":{description:"US ISOB East (Ohio)"}}},{id:"aws-iso-e",outputs:{dnsSuffix:"cloud.adc-e.uk",dualStackDnsSuffix:"cloud.adc-e.uk",implicitGlobalRegion:"eu-isoe-west-1",name:"aws-iso-e",supportsDualStack:!1,supportsFIPS:!0},regionRegex:"^eu\\-isoe\\-\\w+\\-\\d+$",regions:{"eu-isoe-west-1":{description:"EU ISOE West"}}},{id:"aws-iso-f",outputs:{dnsSuffix:"csp.hci.ic.gov",dualStackDnsSuffix:"csp.hci.ic.gov",implicitGlobalRegion:"us-isof-south-1",name:"aws-iso-f",supportsDualStack:!1,supportsFIPS:!0},regionRegex:"^us\\-isof\\-\\w+\\-\\d+$",regions:{}}],version:"1.1"}});var Dd,kd="",OS=(r)=>{const{partitions:s}=Dd;for(let w of s){const{regions:h,outputs:E}=w;for(let[$,I]of Object.entries(h))if($===r)return{...E,...I}}for(let w of s){const{regionRegex:h,outputs:E}=w;if(new RegExp(h).test(r))return{...E}}const f=s.find((w)=>w.id==="aws");if(!f)throw new Error("Provided region was not found in the partition array or regex, and default partition with id 'aws' doesn't exist.");return{...f.outputs}},dS=()=>kd;var gF=G(()=>{vS();Dd=iS});var hs;var cS=G(()=>{ws();mS();gF();hs={isVirtualHostableS3Bucket:_F,parseArn:jS,partition:OS};ur.aws=hs});var bS=G(()=>{ws()});var _S=G(()=>{ws()});var gS=()=>{};var xS=()=>{};var eS=()=>{};var nS=()=>{};var oS=()=>{};var aS=G(()=>{_S();gS();xS();eS();nS();oS()});var Pw=G(()=>{cS();gF();bF();bS();aS()});var J7=O((b0r,E3)=>{var pS,uS,tS,r7,f7,s7,w7,h7,E7,$7,I7,F7,U7,w3,xF,T7,G7,A7,Uh,L7,R7,C7,W7,z7,S7,Y7,X7,K7,h3,Z7,P7;(function(r){var s=typeof global==="object"?global:typeof self==="object"?self:typeof this==="object"?this:{};if(typeof define==="function"&&define.amd)define("tslib",["exports"],function(w){r(f(s,f(w)))});else if(typeof E3==="object"&&typeof b0r==="object")r(f(s,f(b0r)));else r(f(s));function f(w,h){if(w!==s)if(typeof Object.create==="function")Object.defineProperty(w,"__esModule",{value:!0});else w.__esModule=!0;return function(E,$){return w[E]=h?h(E,$):$}}})(function(r){var s=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(h,E){h.__proto__=E}||function(h,E){for(var $ in E)if(Object.prototype.hasOwnProperty.call(E,$))h[$]=E[$]};pS=function(h,E){if(typeof E!=="function"&&E!==null)throw new TypeError("Class extends value "+String(E)+" is not a constructor or null");s(h,E);function $(){this.constructor=h}h.prototype=E===null?Object.create(E):($.prototype=E.prototype,new $)},uS=Object.assign||function(h){for(var E,$=1,I=arguments.length;$<I;$++){E=arguments[$];for(var F in E)if(Object.prototype.hasOwnProperty.call(E,F))h[F]=E[F]}return h},tS=function(h,E){var $={};for(var I in h)if(Object.prototype.hasOwnProperty.call(h,I)&&E.indexOf(I)<0)$[I]=h[I];if(h!=null&&typeof Object.getOwnPropertySymbols==="function"){for(var F=0,I=Object.getOwnPropertySymbols(h);F<I.length;F++)if(E.indexOf(I[F])<0&&Object.prototype.propertyIsEnumerable.call(h,I[F]))$[I[F]]=h[I[F]]}return $},r7=function(h,E,$,I){var F=arguments.length,U=F<3?E:I===null?I=Object.getOwnPropertyDescriptor(E,$):I,A;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")U=Reflect.decorate(h,E,$,I);else for(var L=h.length-1;L>=0;L--)if(A=h[L])U=(F<3?A(U):F>3?A(E,$,U):A(E,$))||U;return F>3&&U&&Object.defineProperty(E,$,U),U},f7=function(h,E){return function($,I){E($,I,h)}},s7=function(h,E,$,I,F,U){function A(sr){if(sr!==void 0&&typeof sr!=="function")throw new TypeError("Function expected");return sr}var L=I.kind,S=L==="getter"?"get":L==="setter"?"set":"value",z=!E&&h?I.static?h:h.prototype:null,Z=E||(z?Object.getOwnPropertyDescriptor(z,I.name):{}),N,M=!1;for(var l=$.length-1;l>=0;l--){var k={};for(var i in I)k[i]=i==="access"?{}:I[i];for(var i in I.access)k.access[i]=I.access[i];k.addInitializer=function(sr){if(M)throw new TypeError("Cannot add initializers after decoration has completed");U.push(A(sr||null))};var e=$[l](L==="accessor"?{get:Z.get,set:Z.set}:Z[S],k);if(L==="accessor"){if(e===void 0)continue;if(e===null||typeof e!=="object")throw new TypeError("Object expected");if(N=A(e.get))Z.get=N;if(N=A(e.set))Z.set=N;if(N=A(e.init))F.unshift(N)}else if(N=A(e))if(L==="field")F.unshift(N);else Z[S]=N}if(z)Object.defineProperty(z,I.name,Z);M=!0},w7=function(h,E,$){var I=arguments.length>2;for(var F=0;F<E.length;F++)$=I?E[F].call(h,$):E[F].call(h);return I?$:void 0},h7=function(h){return typeof h==="symbol"?h:"".concat(h)},E7=function(h,E,$){if(typeof E==="symbol")E=E.description?"[".concat(E.description,"]"):"";return Object.defineProperty(h,"name",{configurable:!0,value:$?"".concat($," ",E):E})},$7=function(h,E){if(typeof Reflect==="object"&&typeof Reflect.metadata==="function")return Reflect.metadata(h,E)},I7=function(h,E,$,I){function F(U){return U instanceof $?U:new $(function(A){A(U)})}return new($||($=Promise))(function(U,A){function L(Z){try{z(I.next(Z))}catch(N){A(N)}}function S(Z){try{z(I.throw(Z))}catch(N){A(N)}}function z(Z){Z.done?U(Z.value):F(Z.value).then(L,S)}z((I=I.apply(h,E||[])).next())})},F7=function(h,E){var $={label:0,sent:function(){if(U[0]&1)throw U[1];return U[1]},trys:[],ops:[]},I,F,U,A=Object.create((typeof Iterator==="function"?Iterator:Object).prototype);return A.next=L(0),A.throw=L(1),A.return=L(2),typeof Symbol==="function"&&(A[Symbol.iterator]=function(){return this}),A;function L(z){return function(Z){return S([z,Z])}}function S(z){if(I)throw new TypeError("Generator is already executing.");while(A&&(A=0,z[0]&&($=0)),$)try{if(I=1,F&&(U=z[0]&2?F.return:z[0]?F.throw||((U=F.return)&&U.call(F),0):F.next)&&!(U=U.call(F,z[1])).done)return U;if(F=0,U)z=[z[0]&2,U.value];switch(z[0]){case 0:case 1:U=z;break;case 4:return $.label++,{value:z[1],done:!1};case 5:$.label++,F=z[1],z=[0];continue;case 7:z=$.ops.pop(),$.trys.pop();continue;default:if((U=$.trys,!(U=U.length>0&&U[U.length-1]))&&(z[0]===6||z[0]===2)){$=0;continue}if(z[0]===3&&(!U||z[1]>U[0]&&z[1]<U[3])){$.label=z[1];break}if(z[0]===6&&$.label<U[1]){$.label=U[1],U=z;break}if(U&&$.label<U[2]){$.label=U[2],$.ops.push(z);break}if(U[2])$.ops.pop();$.trys.pop();continue}z=E.call(h,$)}catch(Z){z=[6,Z],F=0}finally{I=U=0}if(z[0]&5)throw z[1];return{value:z[0]?z[1]:void 0,done:!0}}},U7=function(h,E){for(var $ in h)if($!=="default"&&!Object.prototype.hasOwnProperty.call(E,$))h3(E,h,$)},h3=Object.create?function(h,E,$,I){if(I===void 0)I=$;var F=Object.getOwnPropertyDescriptor(E,$);if(!F||("get"in F?!E.__esModule:F.writable||F.configurable))F={enumerable:!0,get:function(){return E[$]}};Object.defineProperty(h,I,F)}:function(h,E,$,I){if(I===void 0)I=$;h[I]=E[$]},w3=function(h){var E=typeof Symbol==="function"&&Symbol.iterator,$=E&&h[E],I=0;if($)return $.call(h);if(h&&typeof h.length==="number")return{next:function(){if(h&&I>=h.length)h=void 0;return{value:h&&h[I++],done:!h}}};throw new TypeError(E?"Object is not iterable.":"Symbol.iterator is not defined.")},xF=function(h,E){var $=typeof Symbol==="function"&&h[Symbol.iterator];if(!$)return h;var I=$.call(h),F,U=[],A;try{while((E===void 0||E-- >0)&&!(F=I.next()).done)U.push(F.value)}catch(L){A={error:L}}finally{try{if(F&&!F.done&&($=I.return))$.call(I)}finally{if(A)throw A.error}}return U},T7=function(){for(var h=[],E=0;E<arguments.length;E++)h=h.concat(xF(arguments[E]));return h},G7=function(){for(var h=0,E=0,$=arguments.length;E<$;E++)h+=arguments[E].length;for(var I=Array(h),F=0,E=0;E<$;E++)for(var U=arguments[E],A=0,L=U.length;A<L;A++,F++)I[F]=U[A];return I},A7=function(h,E,$){if($||arguments.length===2){for(var I=0,F=E.length,U;I<F;I++)if(U||!(I in E)){if(!U)U=Array.prototype.slice.call(E,0,I);U[I]=E[I]}}return h.concat(U||Array.prototype.slice.call(E))},Uh=function(h){return this instanceof Uh?(this.v=h,this):new Uh(h)},L7=function(h,E,$){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var I=$.apply(h,E||[]),F,U=[];return F=Object.create((typeof AsyncIterator==="function"?AsyncIterator:Object).prototype),L("next"),L("throw"),L("return",A),F[Symbol.asyncIterator]=function(){return this},F;function A(l){return function(k){return Promise.resolve(k).then(l,N)}}function L(l,k){if(I[l]){if(F[l]=function(i){return new Promise(function(e,sr){U.push([l,i,e,sr])>1||S(l,i)})},k)F[l]=k(F[l])}}function S(l,k){try{z(I[l](k))}catch(i){M(U[0][3],i)}}function z(l){l.value instanceof Uh?Promise.resolve(l.value.v).then(Z,N):M(U[0][2],l)}function Z(l){S("next",l)}function N(l){S("throw",l)}function M(l,k){if(l(k),U.shift(),U.length)S(U[0][0],U[0][1])}},R7=function(h){var E,$;return E={},I("next"),I("throw",function(F){throw F}),I("return"),E[Symbol.iterator]=function(){return this},E;function I(F,U){E[F]=h[F]?function(A){return($=!$)?{value:Uh(h[F](A)),done:!1}:U?U(A):A}:U}},C7=function(h){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var E=h[Symbol.asyncIterator],$;return E?E.call(h):(h=typeof w3==="function"?w3(h):h[Symbol.iterator](),$={},I("next"),I("throw"),I("return"),$[Symbol.asyncIterator]=function(){return this},$);function I(U){$[U]=h[U]&&function(A){return new Promise(function(L,S){A=h[U](A),F(L,S,A.done,A.value)})}}function F(U,A,L,S){Promise.resolve(S).then(function(z){U({value:z,done:L})},A)}},W7=function(h,E){if(Object.defineProperty)Object.defineProperty(h,"raw",{value:E});else h.raw=E;return h};var f=Object.create?function(h,E){Object.defineProperty(h,"default",{enumerable:!0,value:E})}:function(h,E){h.default=E};z7=function(h){if(h&&h.__esModule)return h;var E={};if(h!=null){for(var $ in h)if($!=="default"&&Object.prototype.hasOwnProperty.call(h,$))h3(E,h,$)}return f(E,h),E},S7=function(h){return h&&h.__esModule?h:{default:h}},Y7=function(h,E,$,I){if($==="a"&&!I)throw new TypeError("Private accessor was defined without a getter");if(typeof E==="function"?h!==E||!I:!E.has(h))throw new TypeError("Cannot read private member from an object whose class did not declare it");return $==="m"?I:$==="a"?I.call(h):I?I.value:E.get(h)},X7=function(h,E,$,I,F){if(I==="m")throw new TypeError("Private method is not writable");if(I==="a"&&!F)throw new TypeError("Private accessor was defined without a setter");if(typeof E==="function"?h!==E||!F:!E.has(h))throw new TypeError("Cannot write private member to an object whose class did not declare it");return I==="a"?F.call(h,$):F?F.value=$:E.set(h,$),$},K7=function(h,E){if(E===null||typeof E!=="object"&&typeof E!=="function")throw new TypeError("Cannot use 'in' operator on non-object");return typeof h==="function"?E===h:h.has(E)},Z7=function(h,E,$){if(E!==null&&E!==void 0){if(typeof E!=="object"&&typeof E!=="function")throw new TypeError("Object expected.");var I,F;if($){if(!Symbol.asyncDispose)throw new TypeError("Symbol.asyncDispose is not defined.");I=E[Symbol.asyncDispose]}if(I===void 0){if(!Symbol.dispose)throw new TypeError("Symbol.dispose is not defined.");if(I=E[Symbol.dispose],$)F=I}if(typeof I!=="function")throw new TypeError("Object not disposable.");if(F)I=function(){try{F.call(this)}catch(U){return Promise.reject(U)}};h.stack.push({value:E,dispose:I,async:$})}else if($)h.stack.push({async:!0});return E};var w=typeof SuppressedError==="function"?SuppressedError:function(h,E,$){var I=new Error($);return I.name="SuppressedError",I.error=h,I.suppressed=E,I};P7=function(h){function E(U){h.error=h.hasError?new w(U,h.error,"An error was suppressed during disposal."):U,h.hasError=!0}var $,I=0;function F(){while($=h.stack.pop())try{if(!$.async&&I===1)return I=0,h.stack.push($),Promise.resolve().then(F);if($.dispose){var U=$.dispose.call($.value);if($.async)return I|=2,Promise.resolve(U).then(F,function(A){return E(A),F()})}else I|=1}catch(A){E(A)}if(I===1)return h.hasError?Promise.reject(h.error):Promise.resolve();if(h.hasError)throw h.error}return F()},r("__extends",pS),r("__assign",uS),r("__rest",tS),r("__decorate",r7),r("__param",f7),r("__esDecorate",s7),r("__runInitializers",w7),r("__propKey",h7),r("__setFunctionName",E7),r("__metadata",$7),r("__awaiter",I7),r("__generator",F7),r("__exportStar",U7),r("__createBinding",h3),r("__values",w3),r("__read",xF),r("__spread",T7),r("__spreadArrays",G7),r("__spreadArray",A7),r("__await",Uh),r("__asyncGenerator",L7),r("__asyncDelegator",R7),r("__asyncValues",C7),r("__makeTemplateObject",W7),r("__importStar",z7),r("__importDefault",S7),r("__classPrivateFieldGet",Y7),r("__classPrivateFieldSet",X7),r("__classPrivateFieldIn",K7),r("__addDisposableResource",Z7),r("__disposeResources",P7)})});var tr=O((_0r,H7)=>{function M7(r,s,f){if(!r.$source)r.$source={};return r.$source[s]=f,r}function V7(r,s,f){if(!r.__aws_sdk_context)r.__aws_sdk_context={features:{}};else if(!r.__aws_sdk_context.features)r.__aws_sdk_context.features={};r.__aws_sdk_context.features[s]=f}var{defineProperty:$3,getOwnPropertyDescriptor:yd,getOwnPropertyNames:Nd}=Object,qd=Object.prototype.hasOwnProperty,eF=(r,s)=>$3(r,"name",{value:s,configurable:!0}),md=(r,s)=>{for(var f in s)$3(r,f,{get:s[f],enumerable:!0})},jd=(r,s,f,w)=>{if(s&&typeof s==="object"||typeof s==="function"){for(let h of Nd(s))if(!qd.call(r,h)&&h!==f)$3(r,h,{get:()=>s[h],enumerable:!(w=yd(s,h))||w.enumerable})}return r},vd=(r)=>jd($3({},"__esModule",{value:!0}),r),B7={};md(B7,{emitWarningIfUnsupportedVersion:()=>id,setCredentialFeature:()=>M7,setFeature:()=>V7});H7.exports=vd(B7);var Q7=!1,id=eF((r)=>{if(r&&!Q7&&parseInt(r.substring(1,r.indexOf(".")))<18)Q7=!0,process.emitWarning(`NodeDeprecationWarning: The AWS SDK for JavaScript (v3) will
5
5
  no longer support Node.js 16.x on January 6, 2025.
6
6
 
7
7
  To continue receiving updates to AWS services, bug fixes, and security
8
8
  updates please upgrade to a supported Node.js LTS version.
9
9
 
10
- More information can be found at: https://a.co/74kJMmI`)},"emitWarningIfUnsupportedVersion")});var HY=j((q$r,VY)=>{function PU(r){for(let f=0;f<8;f++)r[f]^=255;for(let f=7;f>-1;f--)if(r[f]++,r[f]!==0)break}var{defineProperty:B3,getOwnPropertyDescriptor:KO,getOwnPropertyNames:ZO}=Object,MO=Object.prototype.hasOwnProperty,mr=(r,f)=>B3(r,"name",{value:f,configurable:!0}),JO=(r,f)=>{for(var s in f)B3(r,s,{get:f[s],enumerable:!0})},QO=(r,f,s,w)=>{if(f&&typeof f==="object"||typeof f==="function"){for(let h of ZO(f))if(!MO.call(r,h)&&h!==s)B3(r,h,{get:()=>f[h],enumerable:!(w=KO(f,h))||w.enumerable})}return r},BO=(r)=>QO(B3({},"__esModule",{value:!0}),r),RY={};JO(RY,{SignatureV4:()=>tO,clearCredentialCache:()=>_O,createScope:()=>J3,getCanonicalHeaders:()=>SU,getCanonicalQuery:()=>ZY,getPayloadHash:()=>Q3,getSigningKey:()=>KY,moveHeadersToQuery:()=>BY,prepareRequest:()=>XU});VY.exports=BO(RY);var GY=T1(),RU=y0(),lO="X-Amz-Algorithm",VO="X-Amz-Credential",WY="X-Amz-Date",HO="X-Amz-SignedHeaders",DO="X-Amz-Expires",zY="X-Amz-Signature",SY="X-Amz-Security-Token",PY="authorization",XY=WY.toLowerCase(),kO="date",NO=[PY,XY,kO],yO=zY.toLowerCase(),zU="x-amz-content-sha256",qO=SY.toLowerCase(),mO={authorization:!0,"cache-control":!0,connection:!0,expect:!0,from:!0,"keep-alive":!0,"max-forwards":!0,pragma:!0,referer:!0,te:!0,trailer:!0,"transfer-encoding":!0,upgrade:!0,"user-agent":!0,"x-amzn-trace-id":!0},vO=/^proxy-/,jO=/^sec-/,WU="AWS4-HMAC-SHA256",iO="AWS4-HMAC-SHA256-PAYLOAD",dO="UNSIGNED-PAYLOAD",OO=50,YY="aws4_request",bO=604800,O0=z5(),cO=y0(),Wh={},M3=[],J3=mr((r,f,s)=>`${r}/${f}/${s}/${YY}`,"createScope"),KY=mr(async(r,f,s,w,h)=>{const E=await CY(r,f.secretAccessKey,f.accessKeyId),$=`${s}:${w}:${h}:${O0.toHex(E)}:${f.sessionToken}`;if($ in Wh)return Wh[$];M3.push($);while(M3.length>OO)delete Wh[M3.shift()];let I=`AWS4${f.secretAccessKey}`;for(let F of[s,w,h,YY])I=await CY(r,I,F);return Wh[$]=I},"getSigningKey"),_O=mr(()=>{M3.length=0,Object.keys(Wh).forEach((r)=>{delete Wh[r]})},"clearCredentialCache"),CY=mr((r,f,s)=>{const w=new r(f);return w.update(cO.toUint8Array(s)),w.digest()},"hmac"),SU=mr(({headers:r},f,s)=>{const w={};for(let h of Object.keys(r).sort()){if(r[h]==null)continue;const E=h.toLowerCase();if(E in mO||(f==null?void 0:f.has(E))||vO.test(E)||jO.test(E)){if(!s||s&&!s.has(E))continue}w[E]=r[h].trim().replace(/\s+/g," ")}return w},"getCanonicalHeaders"),D1=T5(),ZY=mr(({query:r={}})=>{const f=[],s={};for(let w of Object.keys(r).sort()){if(w.toLowerCase()===yO)continue;f.push(w);const h=r[w];if(typeof h==="string")s[w]=`${D1.escapeUri(w)}=${D1.escapeUri(h)}`;else if(Array.isArray(h))s[w]=h.slice(0).reduce((E,$)=>E.concat([`${D1.escapeUri(w)}=${D1.escapeUri($)}`]),[]).sort().join("&")}return f.map((w)=>s[w]).filter((w)=>w).join("&")},"getCanonicalQuery"),gO=h5(),xO=y0(),Q3=mr(async({headers:r,body:f},s)=>{for(let w of Object.keys(r))if(w.toLowerCase()===zU)return r[w];if(f==null)return"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855";else if(typeof f==="string"||ArrayBuffer.isView(f)||gO.isArrayBuffer(f)){const w=new s;return w.update(xO.toUint8Array(f)),O0.toHex(await w.digest())}return dO},"getPayloadHash"),LY=y0(),MY=class r{format(f){const s=[];for(let E of Object.keys(f)){const $=LY.fromUtf8(E);s.push(Uint8Array.from([$.byteLength]),$,this.formatHeaderValue(f[E]))}const w=new Uint8Array(s.reduce((E,$)=>E+$.byteLength,0));let h=0;for(let E of s)w.set(E,h),h+=E.byteLength;return w}formatHeaderValue(f){switch(f.type){case"boolean":return Uint8Array.from([f.value?0:1]);case"byte":return Uint8Array.from([2,f.value]);case"short":const s=new DataView(new ArrayBuffer(3));return s.setUint8(0,3),s.setInt16(1,f.value,!1),new Uint8Array(s.buffer);case"integer":const w=new DataView(new ArrayBuffer(5));return w.setUint8(0,4),w.setInt32(1,f.value,!1),new Uint8Array(w.buffer);case"long":const h=new Uint8Array(9);return h[0]=5,h.set(f.value.bytes,1),h;case"binary":const E=new DataView(new ArrayBuffer(3+f.value.byteLength));E.setUint8(0,6),E.setUint16(1,f.value.byteLength,!1);const $=new Uint8Array(E.buffer);return $.set(f.value,3),$;case"string":const I=LY.fromUtf8(f.value),F=new DataView(new ArrayBuffer(3+I.byteLength));F.setUint8(0,7),F.setUint16(1,I.byteLength,!1);const U=new Uint8Array(F.buffer);return U.set(I,3),U;case"timestamp":const C=new Uint8Array(9);return C[0]=8,C.set(oO.fromNumber(f.value.valueOf()).bytes,1),C;case"uuid":if(!nO.test(f.value))throw new Error(`Invalid UUID received: ${f.value}`);const L=new Uint8Array(17);return L[0]=9,L.set(O0.fromHex(f.value.replace(/\-/g,"")),1),L}}};mr(MY,"HeaderFormatter");var eO=MY,nO=/^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$/,JY=class r{constructor(f){if(this.bytes=f,f.byteLength!==8)throw new Error("Int64 buffers must be exactly 8 bytes")}static fromNumber(f){if(f>9223372036854776000||f<-9223372036854776000)throw new Error(`${f} is too large (or, if negative, too small) to represent as an Int64`);const s=new Uint8Array(8);for(let w=7,h=Math.abs(Math.round(f));w>-1&&h>0;w--,h/=256)s[w]=h;if(f<0)PU(s);return new r(s)}valueOf(){const f=this.bytes.slice(0),s=f[0]&128;if(s)PU(f);return parseInt(O0.toHex(f),16)*(s?-1:1)}toString(){return String(this.valueOf())}};mr(JY,"Int64");var oO=JY;mr(PU,"negate");var aO=mr((r,f)=>{r=r.toLowerCase();for(let s of Object.keys(f))if(r===s.toLowerCase())return!0;return!1},"hasHeader"),QY=T0(),BY=mr((r,f={})=>{var s;const{headers:w,query:h={}}=QY.HttpRequest.clone(r);for(let E of Object.keys(w)){const $=E.toLowerCase();if($.slice(0,6)==="x-amz-"&&!((s=f.unhoistableHeaders)==null?void 0:s.has($)))h[E]=w[E],delete w[E]}return{...r,headers:w,query:h}},"moveHeadersToQuery"),XU=mr((r)=>{r=QY.HttpRequest.clone(r);for(let f of Object.keys(r.headers))if(NO.indexOf(f.toLowerCase())>-1)delete r.headers[f];return r},"prepareRequest"),pO=mr((r)=>uO(r).toISOString().replace(/\.\d{3}Z$/,"Z"),"iso8601"),uO=mr((r)=>{if(typeof r==="number")return new Date(r*1000);if(typeof r==="string"){if(Number(r))return new Date(Number(r)*1000);return new Date(r)}return r},"toDate"),lY=class r{constructor({applyChecksum:f,credentials:s,region:w,service:h,sha256:E,uriEscapePath:$=!0}){this.headerFormatter=new eO,this.service=h,this.sha256=E,this.uriEscapePath=$,this.applyChecksum=typeof f==="boolean"?f:!0,this.regionProvider=GY.normalizeProvider(w),this.credentialProvider=GY.normalizeProvider(s)}async presign(f,s={}){const{signingDate:w=new Date,expiresIn:h=3600,unsignableHeaders:E,unhoistableHeaders:$,signableHeaders:I,signingRegion:F,signingService:U}=s,C=await this.credentialProvider();this.validateResolvedCredentials(C);const L=F??await this.regionProvider(),{longDate:z,shortDate:S}=Z3(w);if(h>bO)return Promise.reject("Signature version 4 presigned URLs must have an expiration date less than one week in the future");const K=J3(S,L,U??this.service),k=BY(XU(f),{unhoistableHeaders:$});if(C.sessionToken)k.query[SY]=C.sessionToken;k.query[lO]=WU,k.query[VO]=`${C.accessKeyId}/${K}`,k.query[WY]=z,k.query[DO]=h.toString(10);const l=SU(k,E,I);return k.query[HO]=AY(l),k.query[zY]=await this.getSignature(z,K,this.getSigningKey(C,L,S,U),this.createCanonicalRequest(k,l,await Q3(f,this.sha256))),k}async sign(f,s){if(typeof f==="string")return this.signString(f,s);else if(f.headers&&f.payload)return this.signEvent(f,s);else if(f.message)return this.signMessage(f,s);else return this.signRequest(f,s)}async signEvent({headers:f,payload:s},{signingDate:w=new Date,priorSignature:h,signingRegion:E,signingService:$}){const I=E??await this.regionProvider(),{shortDate:F,longDate:U}=Z3(w),C=J3(F,I,$??this.service),L=await Q3({headers:{},body:s},this.sha256),z=new this.sha256;z.update(f);const S=O0.toHex(await z.digest()),K=[iO,U,C,h,S,L].join("\n");return this.signString(K,{signingDate:w,signingRegion:I,signingService:$})}async signMessage(f,{signingDate:s=new Date,signingRegion:w,signingService:h}){return this.signEvent({headers:this.headerFormatter.format(f.message.headers),payload:f.message.body},{signingDate:s,signingRegion:w,signingService:h,priorSignature:f.priorSignature}).then(($)=>{return{message:f.message,signature:$}})}async signString(f,{signingDate:s=new Date,signingRegion:w,signingService:h}={}){const E=await this.credentialProvider();this.validateResolvedCredentials(E);const $=w??await this.regionProvider(),{shortDate:I}=Z3(s),F=new this.sha256(await this.getSigningKey(E,$,I,h));return F.update(RU.toUint8Array(f)),O0.toHex(await F.digest())}async signRequest(f,{signingDate:s=new Date,signableHeaders:w,unsignableHeaders:h,signingRegion:E,signingService:$}={}){const I=await this.credentialProvider();this.validateResolvedCredentials(I);const F=E??await this.regionProvider(),U=XU(f),{longDate:C,shortDate:L}=Z3(s),z=J3(L,F,$??this.service);if(U.headers[XY]=C,I.sessionToken)U.headers[qO]=I.sessionToken;const S=await Q3(U,this.sha256);if(!aO(zU,U.headers)&&this.applyChecksum)U.headers[zU]=S;const K=SU(U,h,w),k=await this.getSignature(C,z,this.getSigningKey(I,F,L,$),this.createCanonicalRequest(U,K,S));return U.headers[PY]=`${WU} Credential=${I.accessKeyId}/${z}, SignedHeaders=${AY(K)}, Signature=${k}`,U}createCanonicalRequest(f,s,w){const h=Object.keys(s).sort();return`${f.method}
11
- ${this.getCanonicalPath(f)}
12
- ${ZY(f)}
13
- ${h.map((E)=>`${E}:${s[E]}`).join("\n")}
10
+ More information can be found at: https://a.co/74kJMmI`)},"emitWarningIfUnsupportedVersion");eF(M7,"setCredentialFeature");eF(V7,"setFeature")});var o7=O((g0r,n7)=>{function uF(r){for(let s=0;s<8;s++)r[s]^=255;for(let s=7;s>-1;s--)if(r[s]++,r[s]!==0)break}var{defineProperty:A3,getOwnPropertyDescriptor:Od,getOwnPropertyNames:dd}=Object,cd=Object.prototype.hasOwnProperty,mr=(r,s)=>A3(r,"name",{value:s,configurable:!0}),bd=(r,s)=>{for(var f in s)A3(r,f,{get:s[f],enumerable:!0})},_d=(r,s,f,w)=>{if(s&&typeof s==="object"||typeof s==="function"){for(let h of dd(s))if(!cd.call(r,h)&&h!==f)A3(r,h,{get:()=>s[h],enumerable:!(w=Od(s,h))||w.enumerable})}return r},gd=(r)=>_d(A3({},"__esModule",{value:!0}),r),N7={};bd(N7,{SignatureV4:()=>zc,clearCredentialCache:()=>Fc,createScope:()=>U3,getCanonicalHeaders:()=>pF,getCanonicalQuery:()=>c7,getPayloadHash:()=>G3,getSigningKey:()=>d7,moveHeadersToQuery:()=>x7,prepareRequest:()=>tF});n7.exports=gd(N7);var l7=G1(),nF=O0(),xd="X-Amz-Algorithm",ed="X-Amz-Credential",q7="X-Amz-Date",nd="X-Amz-SignedHeaders",od="X-Amz-Expires",m7="X-Amz-Signature",j7="X-Amz-Security-Token",v7="authorization",i7=q7.toLowerCase(),ad="date",pd=[v7,i7,ad],ud=m7.toLowerCase(),aF="x-amz-content-sha256",td=j7.toLowerCase(),rc={authorization:!0,"cache-control":!0,connection:!0,expect:!0,from:!0,"keep-alive":!0,"max-forwards":!0,pragma:!0,referer:!0,te:!0,trailer:!0,"transfer-encoding":!0,upgrade:!0,"user-agent":!0,"x-amzn-trace-id":!0},fc=/^proxy-/,sc=/^sec-/,oF="AWS4-HMAC-SHA256",wc="AWS4-HMAC-SHA256-PAYLOAD",hc="UNSIGNED-PAYLOAD",Ec=50,O7="aws4_request",$c=604800,b0=i$(),Ic=O0(),Th={},F3=[],U3=mr((r,s,f)=>`${r}/${s}/${f}/${O7}`,"createScope"),d7=mr(async(r,s,f,w,h)=>{const E=await D7(r,s.secretAccessKey,s.accessKeyId),$=`${f}:${w}:${h}:${b0.toHex(E)}:${s.sessionToken}`;if($ in Th)return Th[$];F3.push($);while(F3.length>Ec)delete Th[F3.shift()];let I=`AWS4${s.secretAccessKey}`;for(let F of[f,w,h,O7])I=await D7(r,I,F);return Th[$]=I},"getSigningKey"),Fc=mr(()=>{F3.length=0,Object.keys(Th).forEach((r)=>{delete Th[r]})},"clearCredentialCache"),D7=mr((r,s,f)=>{const w=new r(s);return w.update(Ic.toUint8Array(f)),w.digest()},"hmac"),pF=mr(({headers:r},s,f)=>{const w={};for(let h of Object.keys(r).sort()){if(r[h]==null)continue;const E=h.toLowerCase();if(E in rc||(s==null?void 0:s.has(E))||fc.test(E)||sc.test(E)){if(!f||f&&!f.has(E))continue}w[E]=r[h].trim().replace(/\s+/g," ")}return w},"getCanonicalHeaders"),T3=IF(),c7=mr(({query:r={}})=>{const s=[],f={};for(let w of Object.keys(r)){if(w.toLowerCase()===ud)continue;const h=T3.escapeUri(w);s.push(h);const E=r[w];if(typeof E==="string")f[h]=`${h}=${T3.escapeUri(E)}`;else if(Array.isArray(E))f[h]=E.slice(0).reduce(($,I)=>$.concat([`${h}=${T3.escapeUri(I)}`]),[]).sort().join("&")}return s.sort().map((w)=>f[w]).filter((w)=>w).join("&")},"getCanonicalQuery"),Uc=fF(),Tc=O0(),G3=mr(async({headers:r,body:s},f)=>{for(let w of Object.keys(r))if(w.toLowerCase()===aF)return r[w];if(s==null)return"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855";else if(typeof s==="string"||ArrayBuffer.isView(s)||Uc.isArrayBuffer(s)){const w=new f;return w.update(Tc.toUint8Array(s)),b0.toHex(await w.digest())}return hc},"getPayloadHash"),k7=O0(),b7=class r{format(s){const f=[];for(let E of Object.keys(s)){const $=k7.fromUtf8(E);f.push(Uint8Array.from([$.byteLength]),$,this.formatHeaderValue(s[E]))}const w=new Uint8Array(f.reduce((E,$)=>E+$.byteLength,0));let h=0;for(let E of f)w.set(E,h),h+=E.byteLength;return w}formatHeaderValue(s){switch(s.type){case"boolean":return Uint8Array.from([s.value?0:1]);case"byte":return Uint8Array.from([2,s.value]);case"short":const f=new DataView(new ArrayBuffer(3));return f.setUint8(0,3),f.setInt16(1,s.value,!1),new Uint8Array(f.buffer);case"integer":const w=new DataView(new ArrayBuffer(5));return w.setUint8(0,4),w.setInt32(1,s.value,!1),new Uint8Array(w.buffer);case"long":const h=new Uint8Array(9);return h[0]=5,h.set(s.value.bytes,1),h;case"binary":const E=new DataView(new ArrayBuffer(3+s.value.byteLength));E.setUint8(0,6),E.setUint16(1,s.value.byteLength,!1);const $=new Uint8Array(E.buffer);return $.set(s.value,3),$;case"string":const I=k7.fromUtf8(s.value),F=new DataView(new ArrayBuffer(3+I.byteLength));F.setUint8(0,7),F.setUint16(1,I.byteLength,!1);const U=new Uint8Array(F.buffer);return U.set(I,3),U;case"timestamp":const A=new Uint8Array(9);return A[0]=8,A.set(Lc.fromNumber(s.value.valueOf()).bytes,1),A;case"uuid":if(!Ac.test(s.value))throw new Error(`Invalid UUID received: ${s.value}`);const L=new Uint8Array(17);return L[0]=9,L.set(b0.fromHex(s.value.replace(/\-/g,"")),1),L}}};mr(b7,"HeaderFormatter");var Gc=b7,Ac=/^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$/,_7=class r{constructor(s){if(this.bytes=s,s.byteLength!==8)throw new Error("Int64 buffers must be exactly 8 bytes")}static fromNumber(s){if(s>9223372036854776000||s<-9223372036854776000)throw new Error(`${s} is too large (or, if negative, too small) to represent as an Int64`);const f=new Uint8Array(8);for(let w=7,h=Math.abs(Math.round(s));w>-1&&h>0;w--,h/=256)f[w]=h;if(s<0)uF(f);return new r(f)}valueOf(){const s=this.bytes.slice(0),f=s[0]&128;if(f)uF(s);return parseInt(b0.toHex(s),16)*(f?-1:1)}toString(){return String(this.valueOf())}};mr(_7,"Int64");var Lc=_7;mr(uF,"negate");var Rc=mr((r,s)=>{r=r.toLowerCase();for(let f of Object.keys(s))if(r===f.toLowerCase())return!0;return!1},"hasHeader"),g7=L0(),x7=mr((r,s={})=>{var f,w;const{headers:h,query:E={}}=g7.HttpRequest.clone(r);for(let $ of Object.keys(h)){const I=$.toLowerCase();if(I.slice(0,6)==="x-amz-"&&!((f=s.unhoistableHeaders)==null?void 0:f.has(I))||((w=s.hoistableHeaders)==null?void 0:w.has(I)))E[$]=h[$],delete h[$]}return{...r,headers:h,query:E}},"moveHeadersToQuery"),tF=mr((r)=>{r=g7.HttpRequest.clone(r);for(let s of Object.keys(r.headers))if(pd.indexOf(s.toLowerCase())>-1)delete r.headers[s];return r},"prepareRequest"),Cc=mr((r)=>Wc(r).toISOString().replace(/\.\d{3}Z$/,"Z"),"iso8601"),Wc=mr((r)=>{if(typeof r==="number")return new Date(r*1000);if(typeof r==="string"){if(Number(r))return new Date(Number(r)*1000);return new Date(r)}return r},"toDate"),e7=class r{constructor({applyChecksum:s,credentials:f,region:w,service:h,sha256:E,uriEscapePath:$=!0}){this.headerFormatter=new Gc,this.service=h,this.sha256=E,this.uriEscapePath=$,this.applyChecksum=typeof s==="boolean"?s:!0,this.regionProvider=l7.normalizeProvider(w),this.credentialProvider=l7.normalizeProvider(f)}async presign(s,f={}){const{signingDate:w=new Date,expiresIn:h=3600,unsignableHeaders:E,unhoistableHeaders:$,signableHeaders:I,hoistableHeaders:F,signingRegion:U,signingService:A}=f,L=await this.credentialProvider();this.validateResolvedCredentials(L);const S=U??await this.regionProvider(),{longDate:z,shortDate:Z}=I3(w);if(h>$c)return Promise.reject("Signature version 4 presigned URLs must have an expiration date less than one week in the future");const N=U3(Z,S,A??this.service),M=x7(tF(s),{unhoistableHeaders:$,hoistableHeaders:F});if(L.sessionToken)M.query[j7]=L.sessionToken;M.query[xd]=oF,M.query[ed]=`${L.accessKeyId}/${N}`,M.query[q7]=z,M.query[od]=h.toString(10);const l=pF(M,E,I);return M.query[nd]=y7(l),M.query[m7]=await this.getSignature(z,N,this.getSigningKey(L,S,Z,A),this.createCanonicalRequest(M,l,await G3(s,this.sha256))),M}async sign(s,f){if(typeof s==="string")return this.signString(s,f);else if(s.headers&&s.payload)return this.signEvent(s,f);else if(s.message)return this.signMessage(s,f);else return this.signRequest(s,f)}async signEvent({headers:s,payload:f},{signingDate:w=new Date,priorSignature:h,signingRegion:E,signingService:$}){const I=E??await this.regionProvider(),{shortDate:F,longDate:U}=I3(w),A=U3(F,I,$??this.service),L=await G3({headers:{},body:f},this.sha256),S=new this.sha256;S.update(s);const z=b0.toHex(await S.digest()),Z=[wc,U,A,h,z,L].join("\n");return this.signString(Z,{signingDate:w,signingRegion:I,signingService:$})}async signMessage(s,{signingDate:f=new Date,signingRegion:w,signingService:h}){return this.signEvent({headers:this.headerFormatter.format(s.message.headers),payload:s.message.body},{signingDate:f,signingRegion:w,signingService:h,priorSignature:s.priorSignature}).then(($)=>{return{message:s.message,signature:$}})}async signString(s,{signingDate:f=new Date,signingRegion:w,signingService:h}={}){const E=await this.credentialProvider();this.validateResolvedCredentials(E);const $=w??await this.regionProvider(),{shortDate:I}=I3(f),F=new this.sha256(await this.getSigningKey(E,$,I,h));return F.update(nF.toUint8Array(s)),b0.toHex(await F.digest())}async signRequest(s,{signingDate:f=new Date,signableHeaders:w,unsignableHeaders:h,signingRegion:E,signingService:$}={}){const I=await this.credentialProvider();this.validateResolvedCredentials(I);const F=E??await this.regionProvider(),U=tF(s),{longDate:A,shortDate:L}=I3(f),S=U3(L,F,$??this.service);if(U.headers[i7]=A,I.sessionToken)U.headers[td]=I.sessionToken;const z=await G3(U,this.sha256);if(!Rc(aF,U.headers)&&this.applyChecksum)U.headers[aF]=z;const Z=pF(U,h,w),N=await this.getSignature(A,S,this.getSigningKey(I,F,L,$),this.createCanonicalRequest(U,Z,z));return U.headers[v7]=`${oF} Credential=${I.accessKeyId}/${S}, SignedHeaders=${y7(Z)}, Signature=${N}`,U}createCanonicalRequest(s,f,w){const h=Object.keys(f).sort();return`${s.method}
11
+ ${this.getCanonicalPath(s)}
12
+ ${c7(s)}
13
+ ${h.map((E)=>`${E}:${f[E]}`).join("\n")}
14
14
 
15
15
  ${h.join(";")}
16
- ${w}`}async createStringToSign(f,s,w){const h=new this.sha256;h.update(RU.toUint8Array(w));const E=await h.digest();return`${WU}
17
- ${f}
16
+ ${w}`}async createStringToSign(s,f,w){const h=new this.sha256;h.update(nF.toUint8Array(w));const E=await h.digest();return`${oF}
18
17
  ${s}
19
- ${O0.toHex(E)}`}getCanonicalPath({path:f}){if(this.uriEscapePath){const s=[];for(let E of f.split("/")){if((E==null?void 0:E.length)===0)continue;if(E===".")continue;if(E==="..")s.pop();else s.push(E)}const w=`${(f==null?void 0:f.startsWith("/"))?"/":""}${s.join("/")}${s.length>0&&(f==null?void 0:f.endsWith("/"))?"/":""}`;return D1.escapeUri(w).replace(/%2F/g,"/")}return f}async getSignature(f,s,w,h){const E=await this.createStringToSign(f,s,h),$=new this.sha256(await w);return $.update(RU.toUint8Array(E)),O0.toHex(await $.digest())}getSigningKey(f,s,w,h){return KY(this.sha256,f,w,s,h||this.service)}validateResolvedCredentials(f){if(typeof f!=="object"||typeof f.accessKeyId!=="string"||typeof f.secretAccessKey!=="string")throw new Error("Resolved credential object is not valid")}};mr(lY,"SignatureV4");var tO=lY,Z3=mr((r)=>{const f=pO(r).replace(/[\-:]/g,"");return{longDate:f,shortDate:f.slice(0,8)}},"formatDate"),AY=mr((r)=>Object.keys(r).sort().join(";"),"getCanonicalHeaderList")});var dY=j((m$r,iY)=>{var{defineProperty:l3,getOwnPropertyDescriptor:rb,getOwnPropertyNames:sb}=Object,fb=Object.prototype.hasOwnProperty,Rs=(r,f)=>l3(r,"name",{value:f,configurable:!0}),wb=(r,f)=>{for(var s in f)l3(r,s,{get:f[s],enumerable:!0})},hb=(r,f,s,w)=>{if(f&&typeof f==="object"||typeof f==="function"){for(let h of sb(f))if(!fb.call(r,h)&&h!==s)l3(r,h,{get:()=>f[h],enumerable:!(w=rb(f,h))||w.enumerable})}return r},Eb=(r)=>hb(l3({},"__esModule",{value:!0}),r),qY={};wb(qY,{AWSSDKSigV4Signer:()=>Ub,AwsSdkSigV4ASigner:()=>Gb,AwsSdkSigV4Signer:()=>ZU,NODE_SIGV4A_CONFIG_OPTIONS:()=>Ab,resolveAWSSDKSigV4Config:()=>Rb,resolveAwsSdkSigV4AConfig:()=>Lb,resolveAwsSdkSigV4Config:()=>jY,validateSigningProperties:()=>KU});iY.exports=Eb(qY);var $b=T0(),Ib=T0(),DY=Rs((r)=>{var f,s;return Ib.HttpResponse.isInstance(r)?((f=r.headers)==null?void 0:f.date)??((s=r.headers)==null?void 0:s.Date):void 0},"getDateHeader"),YU=Rs((r)=>new Date(Date.now()+r),"getSkewCorrectedDate"),Fb=Rs((r,f)=>Math.abs(YU(f).getTime()-r)>=300000,"isClockSkewed"),kY=Rs((r,f)=>{const s=Date.parse(r);if(Fb(s,f))return s-Date.now();return f},"getUpdatedSystemClockOffset"),k1=Rs((r,f)=>{if(!f)throw new Error(`Property \`${r}\` is not resolved for AWS SDK SigV4Auth`);return f},"throwSigningPropertyError"),KU=Rs(async(r)=>{var f,s,w;const h=k1("context",r.context),E=k1("config",r.config),$=(w=(s=(f=h.endpointV2)==null?void 0:f.properties)==null?void 0:s.authSchemes)==null?void 0:w[0],F=await k1("signer",E.signer)($),U=r==null?void 0:r.signingRegion,C=r==null?void 0:r.signingRegionSet,L=r==null?void 0:r.signingName;return{config:E,signer:F,signingRegion:U,signingRegionSet:C,signingName:L}},"validateSigningProperties"),mY=class r{async sign(f,s,w){var h;if(!$b.HttpRequest.isInstance(f))throw new Error("The request is not an instance of `HttpRequest` and cannot be signed");const E=await KU(w),{config:$,signer:I}=E;let{signingRegion:F,signingName:U}=E;const C=w.context;if(((h=C==null?void 0:C.authSchemes)==null?void 0:h.length)??0>1){const[z,S]=C.authSchemes;if((z==null?void 0:z.name)==="sigv4a"&&(S==null?void 0:S.name)==="sigv4")F=(S==null?void 0:S.signingRegion)??F,U=(S==null?void 0:S.signingName)??U}return await I.sign(f,{signingDate:YU($.systemClockOffset),signingRegion:F,signingService:U})}errorHandler(f){return(s)=>{const w=s.ServerTime??DY(s.$response);if(w){const h=k1("config",f.config),E=h.systemClockOffset;if(h.systemClockOffset=kY(w,h.systemClockOffset),h.systemClockOffset!==E&&s.$metadata)s.$metadata.clockSkewCorrected=!0}throw s}}successHandler(f,s){const w=DY(f);if(w){const h=k1("config",s.config);h.systemClockOffset=kY(w,h.systemClockOffset)}}};Rs(mY,"AwsSdkSigV4Signer");var ZU=mY,Ub=ZU,Tb=T0(),vY=class r extends ZU{async sign(f,s,w){var h;if(!Tb.HttpRequest.isInstance(f))throw new Error("The request is not an instance of `HttpRequest` and cannot be signed");const{config:E,signer:$,signingRegion:I,signingRegionSet:F,signingName:U}=await KU(w),L=(await((h=E.sigv4aSigningRegionSet)==null?void 0:h.call(E))??F??[I]).join(",");return await $.sign(f,{signingDate:YU(E.systemClockOffset),signingRegion:L,signingService:U})}};Rs(vY,"AwsSdkSigV4ASigner");var Gb=vY,Cb=Or(),NY=kF(),Lb=Rs((r)=>{return r.sigv4aSigningRegionSet=Cb.normalizeProvider(r.sigv4aSigningRegionSet),r},"resolveAwsSdkSigV4AConfig"),Ab={environmentVariableSelector(r){if(r.AWS_SIGV4A_SIGNING_REGION_SET)return r.AWS_SIGV4A_SIGNING_REGION_SET.split(",").map((f)=>f.trim());throw new NY.ProviderError("AWS_SIGV4A_SIGNING_REGION_SET not set in env.",{tryNextLink:!0})},configFileSelector(r){if(r.sigv4a_signing_region_set)return(r.sigv4a_signing_region_set??"").split(",").map((f)=>f.trim());throw new NY.ProviderError("sigv4a_signing_region_set not set in profile.",{tryNextLink:!0})},default:void 0},Jw=Or(),yY=HY(),jY=Rs((r)=>{let f;if(r.credentials)f=Jw.memoizeIdentityProvider(r.credentials,Jw.isIdentityExpired,Jw.doesIdentityRequireRefresh);if(!f)if(r.credentialDefaultProvider)f=Jw.normalizeProvider(r.credentialDefaultProvider(Object.assign({},r,{parentClientConfig:r})));else f=Rs(async()=>{throw new Error("`credentials` is missing")},"normalizedCreds");const{signingEscapePath:s=!0,systemClockOffset:w=r.systemClockOffset||0,sha256:h}=r;let E;if(r.signer)E=Jw.normalizeProvider(r.signer);else if(r.regionInfoProvider)E=Rs(()=>Jw.normalizeProvider(r.region)().then(async($)=>[await r.regionInfoProvider($,{useFipsEndpoint:await r.useFipsEndpoint(),useDualstackEndpoint:await r.useDualstackEndpoint()})||{},$]).then(([$,I])=>{const{signingRegion:F,signingService:U}=$;r.signingRegion=r.signingRegion||F||I,r.signingName=r.signingName||U||r.serviceId;const C={...r,credentials:f,region:r.signingRegion,service:r.signingName,sha256:h,uriEscapePath:s};return new(r.signerConstructor||yY.SignatureV4)(C)}),"signer");else E=Rs(async($)=>{$=Object.assign({},{name:"sigv4",signingName:r.signingName||r.defaultSigningName,signingRegion:await Jw.normalizeProvider(r.region)(),properties:{}},$);const{signingRegion:I,signingName:F}=$;r.signingRegion=r.signingRegion||I,r.signingName=r.signingName||F||r.serviceId;const U={...r,credentials:f,region:r.signingRegion,service:r.signingName,sha256:h,uriEscapePath:s};return new(r.signerConstructor||yY.SignatureV4)(U)},"signer");return{...r,systemClockOffset:w,signingEscapePath:s,credentials:f,signer:E}},"resolveAwsSdkSigV4Config"),Rb=jY});var V3=j((Xb)=>{var Wb=":A-Za-z_\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.\\d\\u00B7\\u0300-\\u036F\\u203F-\\u2040",OY="[:A-Za-z_\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD]["+Wb+"]*",zb=new RegExp("^"+OY+"$"),Sb=function(r,f){const s=[];let w=f.exec(r);while(w){const h=[];h.startIndex=f.lastIndex-w[0].length;const E=w.length;for(let $=0;$<E;$++)h.push(w[$]);s.push(h),w=f.exec(r)}return s},Pb=function(r){const f=zb.exec(r);return!(f===null||typeof f==="undefined")};Xb.isExist=function(r){return typeof r!=="undefined"};Xb.isEmptyObject=function(r){return Object.keys(r).length===0};Xb.merge=function(r,f,s){if(f){const w=Object.keys(f),h=w.length;for(let E=0;E<h;E++)if(s==="strict")r[w[E]]=[f[w[E]]];else r[w[E]]=f[w[E]]}};Xb.getValue=function(r){if(Xb.isExist(r))return r;else return""};Xb.isName=Pb;Xb.getAllMatches=Sb;Xb.nameRegexp=OY});var JU=j((mb)=>{function cY(r){return r===" "||r==="\t"||r==="\n"||r==="\r"}function _Y(r,f){const s=f;for(;f<r.length;f++)if(r[f]=="?"||r[f]==" "){const w=r.substr(s,f-s);if(f>5&&w==="xml")return Br("InvalidXml","XML declaration allowed only at the start of the document.",ur(r,f));else if(r[f]=="?"&&r[f+1]==">"){f++;break}else continue}return f}function gY(r,f){if(r.length>f+5&&r[f+1]==="-"&&r[f+2]==="-"){for(f+=3;f<r.length;f++)if(r[f]==="-"&&r[f+1]==="-"&&r[f+2]===">"){f+=2;break}}else if(r.length>f+8&&r[f+1]==="D"&&r[f+2]==="O"&&r[f+3]==="C"&&r[f+4]==="T"&&r[f+5]==="Y"&&r[f+6]==="P"&&r[f+7]==="E"){let s=1;for(f+=8;f<r.length;f++)if(r[f]==="<")s++;else if(r[f]===">"){if(s--,s===0)break}}else if(r.length>f+9&&r[f+1]==="["&&r[f+2]==="C"&&r[f+3]==="D"&&r[f+4]==="A"&&r[f+5]==="T"&&r[f+6]==="A"&&r[f+7]==="["){for(f+=8;f<r.length;f++)if(r[f]==="]"&&r[f+1]==="]"&&r[f+2]===">"){f+=2;break}}return f}function Hb(r,f){let s="",w="",h=!1;for(;f<r.length;f++){if(r[f]===lb||r[f]===Vb)if(w==="")w=r[f];else if(w!==r[f]);else w="";else if(r[f]===">"){if(w===""){h=!0;break}}s+=r[f]}if(w!=="")return!1;return{value:s,index:f,tagClosed:h}}function xY(r,f){const s=MU.getAllMatches(r,Db),w={};for(let h=0;h<s.length;h++){if(s[h][1].length===0)return Br("InvalidAttr","Attribute '"+s[h][2]+"' has no space in starting.",N1(s[h]));else if(s[h][3]!==void 0&&s[h][4]===void 0)return Br("InvalidAttr","Attribute '"+s[h][2]+"' is without value.",N1(s[h]));else if(s[h][3]===void 0&&!f.allowBooleanAttributes)return Br("InvalidAttr","boolean attribute '"+s[h][2]+"' is not allowed.",N1(s[h]));const E=s[h][2];if(!yb(E))return Br("InvalidAttr","Attribute '"+E+"' is an invalid name.",N1(s[h]));if(!w.hasOwnProperty(E))w[E]=1;else return Br("InvalidAttr","Attribute '"+E+"' is repeated.",N1(s[h]))}return!0}function kb(r,f){let s=/\d/;if(r[f]==="x")f++,s=/[\da-fA-F]/;for(;f<r.length;f++){if(r[f]===";")return f;if(!r[f].match(s))break}return-1}function Nb(r,f){if(f++,r[f]===";")return-1;if(r[f]==="#")return f++,kb(r,f);let s=0;for(;f<r.length;f++,s++){if(r[f].match(/\w/)&&s<20)continue;if(r[f]===";")break;return-1}return f}function Br(r,f,s){return{err:{code:r,msg:f,line:s.line||s,col:s.col}}}function yb(r){return MU.isName(r)}function qb(r){return MU.isName(r)}function ur(r,f){const s=r.substring(0,f).split(/\r?\n/);return{line:s.length,col:s[s.length-1].length+1}}function N1(r){return r.startIndex+r[1].length}var MU=V3(),Bb={allowBooleanAttributes:!1,unpairedTags:[]};mb.validate=function(r,f){f=Object.assign({},Bb,f);const s=[];let w=!1,h=!1;if(r[0]==="\uFEFF")r=r.substr(1);for(let E=0;E<r.length;E++)if(r[E]==="<"&&r[E+1]==="?"){if(E+=2,E=_Y(r,E),E.err)return E}else if(r[E]==="<"){let $=E;if(E++,r[E]==="!"){E=gY(r,E);continue}else{let I=!1;if(r[E]==="/")I=!0,E++;let F="";for(;E<r.length&&r[E]!==">"&&r[E]!==" "&&r[E]!=="\t"&&r[E]!=="\n"&&r[E]!=="\r";E++)F+=r[E];if(F=F.trim(),F[F.length-1]==="/")F=F.substring(0,F.length-1),E--;if(!qb(F)){let L;if(F.trim().length===0)L="Invalid space after '<'.";else L="Tag '"+F+"' is an invalid name.";return Br("InvalidTag",L,ur(r,E))}const U=Hb(r,E);if(U===!1)return Br("InvalidAttr","Attributes for '"+F+"' have open quote.",ur(r,E));let C=U.value;if(E=U.index,C[C.length-1]==="/"){const L=E-C.length;C=C.substring(0,C.length-1);const z=xY(C,f);if(z===!0)w=!0;else return Br(z.err.code,z.err.msg,ur(r,L+z.err.line))}else if(I)if(!U.tagClosed)return Br("InvalidTag","Closing tag '"+F+"' doesn't have proper closing.",ur(r,E));else if(C.trim().length>0)return Br("InvalidTag","Closing tag '"+F+"' can't have attributes or invalid starting.",ur(r,$));else if(s.length===0)return Br("InvalidTag","Closing tag '"+F+"' has not been opened.",ur(r,$));else{const L=s.pop();if(F!==L.tagName){let z=ur(r,L.tagStartPos);return Br("InvalidTag","Expected closing tag '"+L.tagName+"' (opened in line "+z.line+", col "+z.col+") instead of closing tag '"+F+"'.",ur(r,$))}if(s.length==0)h=!0}else{const L=xY(C,f);if(L!==!0)return Br(L.err.code,L.err.msg,ur(r,E-C.length+L.err.line));if(h===!0)return Br("InvalidXml","Multiple possible root nodes found.",ur(r,E));else if(f.unpairedTags.indexOf(F)!==-1);else s.push({tagName:F,tagStartPos:$});w=!0}for(E++;E<r.length;E++)if(r[E]==="<")if(r[E+1]==="!"){E++,E=gY(r,E);continue}else if(r[E+1]==="?"){if(E=_Y(r,++E),E.err)return E}else break;else if(r[E]==="&"){const L=Nb(r,E);if(L==-1)return Br("InvalidChar","char '&' is not expected.",ur(r,E));E=L}else if(h===!0&&!cY(r[E]))return Br("InvalidXml","Extra text at the end",ur(r,E));if(r[E]==="<")E--}}else{if(cY(r[E]))continue;return Br("InvalidChar","char '"+r[E]+"' is not expected.",ur(r,E))}if(!w)return Br("InvalidXml","Start tag expected.",1);else if(s.length==1)return Br("InvalidTag","Unclosed tag '"+s[0].tagName+"'.",ur(r,s[0].tagStartPos));else if(s.length>0)return Br("InvalidXml","Invalid '"+JSON.stringify(s.map((E)=>E.tagName),null,4).replace(/\r?\n/g,"")+"' found.",{line:1,col:1});return!0};var lb='"',Vb="'",Db=new RegExp('(\\s*)([^\\s=]+)(\\s*=)?(\\s*([\'"])(([\\s\\S])*?)\\5)?',"g")});var nY=j((ib)=>{var eY={preserveOrder:!1,attributeNamePrefix:"@_",attributesGroupName:!1,textNodeName:"#text",ignoreAttributes:!0,removeNSPrefix:!1,allowBooleanAttributes:!1,parseTagValue:!0,parseAttributeValue:!1,trimValues:!0,cdataPropName:!1,numberParseOptions:{hex:!0,leadingZeros:!0,eNotation:!0},tagValueProcessor:function(r,f){return f},attributeValueProcessor:function(r,f){return f},stopNodes:[],alwaysCreateTextNode:!1,isArray:()=>!1,commentPropName:!1,unpairedTags:[],processEntities:!0,htmlEntities:!1,ignoreDeclaration:!1,ignorePiTags:!1,transformTagName:!1,transformAttributeName:!1,updateTag:function(r,f,s){return r}},jb=function(r){return Object.assign({},eY,r)};ib.buildOptions=jb;ib.defaultOptions=eY});var pY=j((d$r,aY)=>{class oY{constructor(r){this.tagname=r,this.child=[],this[":@"]={}}add(r,f){if(r==="__proto__")r="#__proto__";this.child.push({[r]:f})}addChild(r){if(r.tagname==="__proto__")r.tagname="#__proto__";if(r[":@"]&&Object.keys(r[":@"]).length>0)this.child.push({[r.tagname]:r.child,[":@"]:r[":@"]});else this.child.push({[r.tagname]:r.child})}}aY.exports=oY});var tY=j((O$r,uY)=>{function cb(r,f){const s={};if(r[f+3]==="O"&&r[f+4]==="C"&&r[f+5]==="T"&&r[f+6]==="Y"&&r[f+7]==="P"&&r[f+8]==="E"){f=f+9;let w=1,h=!1,E=!1,$="";for(;f<r.length;f++)if(r[f]==="<"&&!E){if(h&&xb(r,f)){if(f+=7,[entityName,val,f]=_b(r,f+1),val.indexOf("&")===-1)s[ab(entityName)]={regx:RegExp(`&${entityName};`,"g"),val}}else if(h&&eb(r,f))f+=8;else if(h&&nb(r,f))f+=8;else if(h&&ob(r,f))f+=9;else if(gb)E=!0;else throw new Error("Invalid DOCTYPE");w++,$=""}else if(r[f]===">"){if(E){if(r[f-1]==="-"&&r[f-2]==="-")E=!1,w--}else w--;if(w===0)break}else if(r[f]==="[")h=!0;else $+=r[f];if(w!==0)throw new Error("Unclosed DOCTYPE")}else throw new Error("Invalid Tag instead of DOCTYPE");return{entities:s,i:f}}function _b(r,f){let s="";for(;f<r.length&&(r[f]!=="'"&&r[f]!=='"');f++)s+=r[f];if(s=s.trim(),s.indexOf(" ")!==-1)throw new Error("External entites are not supported");const w=r[f++];let h="";for(;f<r.length&&r[f]!==w;f++)h+=r[f];return[s,h,f]}function gb(r,f){if(r[f+1]==="!"&&r[f+2]==="-"&&r[f+3]==="-")return!0;return!1}function xb(r,f){if(r[f+1]==="!"&&r[f+2]==="E"&&r[f+3]==="N"&&r[f+4]==="T"&&r[f+5]==="I"&&r[f+6]==="T"&&r[f+7]==="Y")return!0;return!1}function eb(r,f){if(r[f+1]==="!"&&r[f+2]==="E"&&r[f+3]==="L"&&r[f+4]==="E"&&r[f+5]==="M"&&r[f+6]==="E"&&r[f+7]==="N"&&r[f+8]==="T")return!0;return!1}function nb(r,f){if(r[f+1]==="!"&&r[f+2]==="A"&&r[f+3]==="T"&&r[f+4]==="T"&&r[f+5]==="L"&&r[f+6]==="I"&&r[f+7]==="S"&&r[f+8]==="T")return!0;return!1}function ob(r,f){if(r[f+1]==="!"&&r[f+2]==="N"&&r[f+3]==="O"&&r[f+4]==="T"&&r[f+5]==="A"&&r[f+6]==="T"&&r[f+7]==="I"&&r[f+8]==="O"&&r[f+9]==="N")return!0;return!1}function ab(r){if(bb.isName(r))return r;else throw new Error(`Invalid entity name ${r}`)}var bb=V3();uY.exports=cb});var sK=j((b$r,rK)=>{function rc(r,f={}){if(f=Object.assign({},tb,f),!r||typeof r!=="string")return r;let s=r.trim();if(f.skipLike!==void 0&&f.skipLike.test(s))return r;else if(f.hex&&pb.test(s))return Number.parseInt(s,16);else{const w=ub.exec(s);if(w){const h=w[1],E=w[2];let $=sc(w[3]);const I=w[4]||w[6];if(!f.leadingZeros&&E.length>0&&h&&s[2]!==".")return r;else if(!f.leadingZeros&&E.length>0&&!h&&s[1]!==".")return r;else{const F=Number(s),U=""+F;if(U.search(/[eE]/)!==-1)if(f.eNotation)return F;else return r;else if(I)if(f.eNotation)return F;else return r;else if(s.indexOf(".")!==-1)if(U==="0"&&$==="")return F;else if(U===$)return F;else if(h&&U==="-"+$)return F;else return r;if(E)if($===U)return F;else if(h+$===U)return F;else return r;if(s===U)return F;else if(s===h+U)return F;return r}}else return r}}function sc(r){if(r&&r.indexOf(".")!==-1){if(r=r.replace(/0+$/,""),r===".")r="0";else if(r[0]===".")r="0"+r;else if(r[r.length-1]===".")r=r.substr(0,r.length-1);return r}return r}var pb=/^[-+]?0x[a-fA-F0-9]+$/,ub=/^([\-\+])?(0*)(\.[0-9]+([eE]\-?[0-9]+)?|[0-9]+(\.[0-9]+([eE]\-?[0-9]+)?)?)$/;if(!Number.parseInt&&window.parseInt)Number.parseInt=window.parseInt;if(!Number.parseFloat&&window.parseFloat)Number.parseFloat=window.parseFloat;var tb={hex:!0,leadingZeros:!0,decimalPoint:".",eNotation:!0};rK.exports=rc});var EK=j((c$r,hK)=>{function hc(r){const f=Object.keys(r);for(let s=0;s<f.length;s++){const w=f[s];this.lastEntities[w]={regex:new RegExp("&"+w+";","g"),val:r[w]}}}function Ec(r,f,s,w,h,E,$){if(r!==void 0){if(this.options.trimValues&&!w)r=r.trim();if(r.length>0){if(!$)r=this.replaceEntitiesValue(r);const I=this.options.tagValueProcessor(f,r,s,h,E);if(I===null||I===void 0)return r;else if(typeof I!==typeof r||I!==r)return I;else if(this.options.trimValues)return BU(r,this.options.parseTagValue,this.options.numberParseOptions);else if(r.trim()===r)return BU(r,this.options.parseTagValue,this.options.numberParseOptions);else return r}}}function $c(r){if(this.options.removeNSPrefix){const f=r.split(":"),s=r.charAt(0)==="/"?"/":"";if(f[0]==="xmlns")return"";if(f.length===2)r=s+f[1]}return r}function Fc(r,f,s){if(!this.options.ignoreAttributes&&typeof r==="string"){const w=fK.getAllMatches(r,Ic),h=w.length,E={};for(let $=0;$<h;$++){const I=this.resolveNameSpace(w[$][1]);let F=w[$][4],U=this.options.attributeNamePrefix+I;if(I.length){if(this.options.transformAttributeName)U=this.options.transformAttributeName(U);if(U==="__proto__")U="#__proto__";if(F!==void 0){if(this.options.trimValues)F=F.trim();F=this.replaceEntitiesValue(F);const C=this.options.attributeValueProcessor(I,F,f);if(C===null||C===void 0)E[U]=F;else if(typeof C!==typeof F||C!==F)E[U]=C;else E[U]=BU(F,this.options.parseAttributeValue,this.options.numberParseOptions)}else if(this.options.allowBooleanAttributes)E[U]=!0}}if(!Object.keys(E).length)return;if(this.options.attributesGroupName){const $={};return $[this.options.attributesGroupName]=E,$}return E}}function Tc(r,f,s){const w=this.options.updateTag(f.tagname,s,f[":@"]);if(w===!1);else if(typeof w==="string")f.tagname=w,r.addChild(f);else r.addChild(f)}function Cc(r,f,s,w){if(r){if(w===void 0)w=Object.keys(f.child).length===0;if(r=this.parseTextData(r,f.tagname,s,!1,f[":@"]?Object.keys(f[":@"]).length!==0:!1,w),r!==void 0&&r!=="")f.add(this.options.textNodeName,r);r=""}return r}function Lc(r,f,s){const w="*."+s;for(let h in r){const E=r[h];if(w===E||f===E)return!0}return!1}function Ac(r,f,s=">"){let w,h="";for(let E=f;E<r.length;E++){let $=r[E];if(w){if($===w)w=""}else if($==='"'||$==="'")w=$;else if($===s[0])if(s[1]){if(r[E+1]===s[1])return{data:h,index:E}}else return{data:h,index:E};else if($==="\t")$=" ";h+=$}}function Qw(r,f,s,w){const h=r.indexOf(f,s);if(h===-1)throw new Error(w);else return h+f.length-1}function QU(r,f,s,w=">"){const h=Ac(r,f+1,w);if(!h)return;let E=h.data;const $=h.index,I=E.search(/\s/);let F=E,U=!0;if(I!==-1)F=E.substring(0,I),E=E.substring(I+1).trimStart();const C=F;if(s){const L=F.indexOf(":");if(L!==-1)F=F.substr(L+1),U=F!==h.data.substr(L+1)}return{tagName:F,tagExp:E,closeIndex:$,attrExpPresent:U,rawTagName:C}}function Rc(r,f,s){const w=s;let h=1;for(;s<r.length;s++)if(r[s]==="<")if(r[s+1]==="/"){const E=Qw(r,">",s,`${f} is not closed`);if(r.substring(s+2,E).trim()===f){if(h--,h===0)return{tagContent:r.substring(w,s),i:E}}s=E}else if(r[s+1]==="?")s=Qw(r,"?>",s+1,"StopNode is not closed.");else if(r.substr(s+1,3)==="!--")s=Qw(r,"-->",s+3,"StopNode is not closed.");else if(r.substr(s+1,2)==="![")s=Qw(r,"]]>",s,"StopNode is not closed.")-2;else{const E=QU(r,s,">");if(E){if((E&&E.tagName)===f&&E.tagExp[E.tagExp.length-1]!=="/")h++;s=E.closeIndex}}}function BU(r,f,s){if(f&&typeof r==="string"){const w=r.trim();if(w==="true")return!0;else if(w==="false")return!1;else return wc(r,s)}else if(fK.isExist(r))return r;else return""}var fK=V3(),y1=pY(),fc=tY(),wc=sK();class wK{constructor(r){this.options=r,this.currentNode=null,this.tagsNodeStack=[],this.docTypeEntities={},this.lastEntities={apos:{regex:/&(apos|#39|#x27);/g,val:"'"},gt:{regex:/&(gt|#62|#x3E);/g,val:">"},lt:{regex:/&(lt|#60|#x3C);/g,val:"<"},quot:{regex:/&(quot|#34|#x22);/g,val:"\""}},this.ampEntity={regex:/&(amp|#38|#x26);/g,val:"&"},this.htmlEntities={space:{regex:/&(nbsp|#160);/g,val:" "},cent:{regex:/&(cent|#162);/g,val:"\xA2"},pound:{regex:/&(pound|#163);/g,val:"\xA3"},yen:{regex:/&(yen|#165);/g,val:"\xA5"},euro:{regex:/&(euro|#8364);/g,val:"\u20AC"},copyright:{regex:/&(copy|#169);/g,val:"\xA9"},reg:{regex:/&(reg|#174);/g,val:"\xAE"},inr:{regex:/&(inr|#8377);/g,val:"\u20B9"},num_dec:{regex:/&#([0-9]{1,7});/g,val:(f,s)=>String.fromCharCode(Number.parseInt(s,10))},num_hex:{regex:/&#x([0-9a-fA-F]{1,6});/g,val:(f,s)=>String.fromCharCode(Number.parseInt(s,16))}},this.addExternalEntities=hc,this.parseXml=Uc,this.parseTextData=Ec,this.resolveNameSpace=$c,this.buildAttributesMap=Fc,this.isItStopNode=Lc,this.replaceEntitiesValue=Gc,this.readStopNodeData=Rc,this.saveTextToParentTag=Cc,this.addChild=Tc}}var Ic=new RegExp('([^\\s=]+)\\s*(=\\s*([\'"])([\\s\\S]*?)\\3)?',"gm"),Uc=function(r){r=r.replace(/\r\n?/g,"\n");const f=new y1("!xml");let s=f,w="",h="";for(let E=0;E<r.length;E++)if(r[E]==="<")if(r[E+1]==="/"){const I=Qw(r,">",E,"Closing Tag is not closed.");let F=r.substring(E+2,I).trim();if(this.options.removeNSPrefix){const L=F.indexOf(":");if(L!==-1)F=F.substr(L+1)}if(this.options.transformTagName)F=this.options.transformTagName(F);if(s)w=this.saveTextToParentTag(w,s,h);const U=h.substring(h.lastIndexOf(".")+1);if(F&&this.options.unpairedTags.indexOf(F)!==-1)throw new Error(`Unpaired tag can not be used as closing tag: </${F}>`);let C=0;if(U&&this.options.unpairedTags.indexOf(U)!==-1)C=h.lastIndexOf(".",h.lastIndexOf(".")-1),this.tagsNodeStack.pop();else C=h.lastIndexOf(".");h=h.substring(0,C),s=this.tagsNodeStack.pop(),w="",E=I}else if(r[E+1]==="?"){let I=QU(r,E,!1,"?>");if(!I)throw new Error("Pi Tag is not closed.");if(w=this.saveTextToParentTag(w,s,h),this.options.ignoreDeclaration&&I.tagName==="?xml"||this.options.ignorePiTags);else{const F=new y1(I.tagName);if(F.add(this.options.textNodeName,""),I.tagName!==I.tagExp&&I.attrExpPresent)F[":@"]=this.buildAttributesMap(I.tagExp,h,I.tagName);this.addChild(s,F,h)}E=I.closeIndex+1}else if(r.substr(E+1,3)==="!--"){const I=Qw(r,"-->",E+4,"Comment is not closed.");if(this.options.commentPropName){const F=r.substring(E+4,I-2);w=this.saveTextToParentTag(w,s,h),s.add(this.options.commentPropName,[{[this.options.textNodeName]:F}])}E=I}else if(r.substr(E+1,2)==="!D"){const I=fc(r,E);this.docTypeEntities=I.entities,E=I.i}else if(r.substr(E+1,2)==="!["){const I=Qw(r,"]]>",E,"CDATA is not closed.")-2,F=r.substring(E+9,I);w=this.saveTextToParentTag(w,s,h);let U=this.parseTextData(F,s.tagname,h,!0,!1,!0,!0);if(U==null)U="";if(this.options.cdataPropName)s.add(this.options.cdataPropName,[{[this.options.textNodeName]:F}]);else s.add(this.options.textNodeName,U);E=I+2}else{let I=QU(r,E,this.options.removeNSPrefix),F=I.tagName;const U=I.rawTagName;let{tagExp:C,attrExpPresent:L,closeIndex:z}=I;if(this.options.transformTagName)F=this.options.transformTagName(F);if(s&&w){if(s.tagname!=="!xml")w=this.saveTextToParentTag(w,s,h,!1)}const S=s;if(S&&this.options.unpairedTags.indexOf(S.tagname)!==-1)s=this.tagsNodeStack.pop(),h=h.substring(0,h.lastIndexOf("."));if(F!==f.tagname)h+=h?"."+F:F;if(this.isItStopNode(this.options.stopNodes,h,F)){let K="";if(C.length>0&&C.lastIndexOf("/")===C.length-1){if(F[F.length-1]==="/")F=F.substr(0,F.length-1),h=h.substr(0,h.length-1),C=F;else C=C.substr(0,C.length-1);E=I.closeIndex}else if(this.options.unpairedTags.indexOf(F)!==-1)E=I.closeIndex;else{const l=this.readStopNodeData(r,U,z+1);if(!l)throw new Error(`Unexpected end of ${U}`);E=l.i,K=l.tagContent}const k=new y1(F);if(F!==C&&L)k[":@"]=this.buildAttributesMap(C,h,F);if(K)K=this.parseTextData(K,F,h,!0,L,!0,!0);h=h.substr(0,h.lastIndexOf(".")),k.add(this.options.textNodeName,K),this.addChild(s,k,h)}else{if(C.length>0&&C.lastIndexOf("/")===C.length-1){if(F[F.length-1]==="/")F=F.substr(0,F.length-1),h=h.substr(0,h.length-1),C=F;else C=C.substr(0,C.length-1);if(this.options.transformTagName)F=this.options.transformTagName(F);const K=new y1(F);if(F!==C&&L)K[":@"]=this.buildAttributesMap(C,h,F);this.addChild(s,K,h),h=h.substr(0,h.lastIndexOf("."))}else{const K=new y1(F);if(this.tagsNodeStack.push(s),F!==C&&L)K[":@"]=this.buildAttributesMap(C,h,F);this.addChild(s,K,h),s=K}w="",E=z}}else w+=r[E];return f.child},Gc=function(r){if(this.options.processEntities){for(let f in this.docTypeEntities){const s=this.docTypeEntities[f];r=r.replace(s.regx,s.val)}for(let f in this.lastEntities){const s=this.lastEntities[f];r=r.replace(s.regex,s.val)}if(this.options.htmlEntities)for(let f in this.htmlEntities){const s=this.htmlEntities[f];r=r.replace(s.regex,s.val)}r=r.replace(this.ampEntity.regex,this.ampEntity.val)}return r};hK.exports=wK});var IK=j((Xc)=>{function Wc(r,f){return $K(r,f)}function $K(r,f,s){let w;const h={};for(let E=0;E<r.length;E++){const $=r[E],I=zc($);let F="";if(s===void 0)F=I;else F=s+"."+I;if(I===f.textNodeName)if(w===void 0)w=$[I];else w+=""+$[I];else if(I===void 0)continue;else if($[I]){let U=$K($[I],f,F);const C=Pc(U,f);if($[":@"])Sc(U,$[":@"],F,f);else if(Object.keys(U).length===1&&U[f.textNodeName]!==void 0&&!f.alwaysCreateTextNode)U=U[f.textNodeName];else if(Object.keys(U).length===0)if(f.alwaysCreateTextNode)U[f.textNodeName]="";else U="";if(h[I]!==void 0&&h.hasOwnProperty(I)){if(!Array.isArray(h[I]))h[I]=[h[I]];h[I].push(U)}else if(f.isArray(I,F,C))h[I]=[U];else h[I]=U}}if(typeof w==="string"){if(w.length>0)h[f.textNodeName]=w}else if(w!==void 0)h[f.textNodeName]=w;return h}function zc(r){const f=Object.keys(r);for(let s=0;s<f.length;s++){const w=f[s];if(w!==":@")return w}}function Sc(r,f,s,w){if(f){const h=Object.keys(f),E=h.length;for(let $=0;$<E;$++){const I=h[$];if(w.isArray(I,s+"."+I,!0,!0))r[I]=[f[I]];else r[I]=f[I]}}}function Pc(r,f){const{textNodeName:s}=f,w=Object.keys(r).length;if(w===0)return!0;if(w===1&&(r[s]||typeof r[s]==="boolean"||r[s]===0))return!0;return!1}Xc.prettify=Wc});var TK=j((g$r,UK)=>{var{buildOptions:Kc}=nY(),Zc=EK(),{prettify:Mc}=IK(),Jc=JU();class FK{constructor(r){this.externalEntities={},this.options=Kc(r)}parse(r,f){if(typeof r==="string");else if(r.toString)r=r.toString();else throw new Error("XML data is accepted in String or Bytes[] form.");if(f){if(f===!0)f={};const h=Jc.validate(r,f);if(h!==!0)throw Error(`${h.err.msg}:${h.err.line}:${h.err.col}`)}const s=new Zc(this.options);s.addExternalEntities(this.externalEntities);const w=s.parseXml(r);if(this.options.preserveOrder||w===void 0)return w;else return Mc(w,this.options)}addEntity(r,f){if(f.indexOf("&")!==-1)throw new Error("Entity value can't have '&'");else if(r.indexOf("&")!==-1||r.indexOf(";")!==-1)throw new Error("An entity must be set without '&' and ';'. Eg. use '#xD' for '&#xD;'");else if(f==="&")throw new Error("An entity with value '&' is not permitted");else this.externalEntities[r]=f}}UK.exports=FK});var RK=j((x$r,AK)=>{function Qc(r,f){let s="";if(f.format&&f.indentBy.length>0)s="\n";return CK(r,f,"",s)}function CK(r,f,s,w){let h="",E=!1;for(let $=0;$<r.length;$++){const I=r[$],F=Bc(I);if(F===void 0)continue;let U="";if(s.length===0)U=F;else U=`${s}.${F}`;if(F===f.textNodeName){let K=I[F];if(!lc(U,f))K=f.tagValueProcessor(F,K),K=LK(K,f);if(E)h+=w;h+=K,E=!1;continue}else if(F===f.cdataPropName){if(E)h+=w;h+=`<![CDATA[${I[F][0][f.textNodeName]}]]>`,E=!1;continue}else if(F===f.commentPropName){h+=w+`<!--${I[F][0][f.textNodeName]}-->`,E=!0;continue}else if(F[0]==="?"){const K=GK(I[":@"],f),k=F==="?xml"?"":w;let l=I[F][0][f.textNodeName];l=l.length!==0?" "+l:"",h+=k+`<${F}${l}${K}?>`,E=!0;continue}let C=w;if(C!=="")C+=f.indentBy;const L=GK(I[":@"],f),z=w+`<${F}${L}`,S=CK(I[F],f,U,C);if(f.unpairedTags.indexOf(F)!==-1)if(f.suppressUnpairedNode)h+=z+">";else h+=z+"/>";else if((!S||S.length===0)&&f.suppressEmptyNode)h+=z+"/>";else if(S&&S.endsWith(">"))h+=z+`>${S}${w}</${F}>`;else{if(h+=z+">",S&&w!==""&&(S.includes("/>")||S.includes("</")))h+=w+f.indentBy+S+w;else h+=S;h+=`</${F}>`}E=!0}return h}function Bc(r){const f=Object.keys(r);for(let s=0;s<f.length;s++){const w=f[s];if(!r.hasOwnProperty(w))continue;if(w!==":@")return w}}function GK(r,f){let s="";if(r&&!f.ignoreAttributes)for(let w in r){if(!r.hasOwnProperty(w))continue;let h=f.attributeValueProcessor(w,r[w]);if(h=LK(h,f),h===!0&&f.suppressBooleanAttributes)s+=` ${w.substr(f.attributeNamePrefix.length)}`;else s+=` ${w.substr(f.attributeNamePrefix.length)}="${h}"`}return s}function lc(r,f){r=r.substr(0,r.length-f.textNodeName.length-1);let s=r.substr(r.lastIndexOf(".")+1);for(let w in f.stopNodes)if(f.stopNodes[w]===r||f.stopNodes[w]==="*."+s)return!0;return!1}function LK(r,f){if(r&&r.length>0&&f.processEntities)for(let s=0;s<f.entities.length;s++){const w=f.entities[s];r=r.replace(w.regex,w.val)}return r}AK.exports=Qc});var zK=j((e$r,WK)=>{function b0(r){if(this.options=Object.assign({},Hc,r),this.options.ignoreAttributes||this.options.attributesGroupName)this.isAttribute=function(){return!1};else this.attrPrefixLen=this.options.attributeNamePrefix.length,this.isAttribute=Nc;if(this.processTextOrObjNode=Dc,this.options.format)this.indentate=kc,this.tagEndChar=">\n",this.newLine="\n";else this.indentate=function(){return""},this.tagEndChar=">",this.newLine=""}function Dc(r,f,s){const w=this.j2x(r,s+1);if(r[this.options.textNodeName]!==void 0&&Object.keys(r).length===1)return this.buildTextValNode(r[this.options.textNodeName],f,w.attrStr,s);else return this.buildObjectNode(w.val,f,w.attrStr,s)}function kc(r){return this.options.indentBy.repeat(r)}function Nc(r){if(r.startsWith(this.options.attributeNamePrefix)&&r!==this.options.textNodeName)return r.substr(this.attrPrefixLen);else return!1}var Vc=RK(),Hc={attributeNamePrefix:"@_",attributesGroupName:!1,textNodeName:"#text",ignoreAttributes:!0,cdataPropName:!1,format:!1,indentBy:" ",suppressEmptyNode:!1,suppressUnpairedNode:!0,suppressBooleanAttributes:!0,tagValueProcessor:function(r,f){return f},attributeValueProcessor:function(r,f){return f},preserveOrder:!1,commentPropName:!1,unpairedTags:[],entities:[{regex:new RegExp("&","g"),val:"&amp;"},{regex:new RegExp(">","g"),val:"&gt;"},{regex:new RegExp("<","g"),val:"&lt;"},{regex:new RegExp("\'","g"),val:"&apos;"},{regex:new RegExp("\"","g"),val:"&quot;"}],processEntities:!0,stopNodes:[],oneListGroup:!1};b0.prototype.build=function(r){if(this.options.preserveOrder)return Vc(r,this.options);else{if(Array.isArray(r)&&this.options.arrayNodeName&&this.options.arrayNodeName.length>1)r={[this.options.arrayNodeName]:r};return this.j2x(r,0).val}};b0.prototype.j2x=function(r,f){let s="",w="";for(let h in r){if(!Object.prototype.hasOwnProperty.call(r,h))continue;if(typeof r[h]==="undefined"){if(this.isAttribute(h))w+=""}else if(r[h]===null)if(this.isAttribute(h))w+="";else if(h[0]==="?")w+=this.indentate(f)+"<"+h+"?"+this.tagEndChar;else w+=this.indentate(f)+"<"+h+"/"+this.tagEndChar;else if(r[h]instanceof Date)w+=this.buildTextValNode(r[h],h,"",f);else if(typeof r[h]!=="object"){const E=this.isAttribute(h);if(E)s+=this.buildAttrPairStr(E,""+r[h]);else if(h===this.options.textNodeName){let $=this.options.tagValueProcessor(h,""+r[h]);w+=this.replaceEntitiesValue($)}else w+=this.buildTextValNode(r[h],h,"",f)}else if(Array.isArray(r[h])){const E=r[h].length;let $="",I="";for(let F=0;F<E;F++){const U=r[h][F];if(typeof U==="undefined");else if(U===null)if(h[0]==="?")w+=this.indentate(f)+"<"+h+"?"+this.tagEndChar;else w+=this.indentate(f)+"<"+h+"/"+this.tagEndChar;else if(typeof U==="object")if(this.options.oneListGroup){const C=this.j2x(U,f+1);if($+=C.val,this.options.attributesGroupName&&U.hasOwnProperty(this.options.attributesGroupName))I+=C.attrStr}else $+=this.processTextOrObjNode(U,h,f);else if(this.options.oneListGroup){let C=this.options.tagValueProcessor(h,U);C=this.replaceEntitiesValue(C),$+=C}else $+=this.buildTextValNode(U,h,"",f)}if(this.options.oneListGroup)$=this.buildObjectNode($,h,I,f);w+=$}else if(this.options.attributesGroupName&&h===this.options.attributesGroupName){const E=Object.keys(r[h]),$=E.length;for(let I=0;I<$;I++)s+=this.buildAttrPairStr(E[I],""+r[h][E[I]])}else w+=this.processTextOrObjNode(r[h],h,f)}return{attrStr:s,val:w}};b0.prototype.buildAttrPairStr=function(r,f){if(f=this.options.attributeValueProcessor(r,""+f),f=this.replaceEntitiesValue(f),this.options.suppressBooleanAttributes&&f==="true")return" "+r;else return" "+r+'="'+f+'"'};b0.prototype.buildObjectNode=function(r,f,s,w){if(r==="")if(f[0]==="?")return this.indentate(w)+"<"+f+s+"?"+this.tagEndChar;else return this.indentate(w)+"<"+f+s+this.closeTag(f)+this.tagEndChar;else{let h="</"+f+this.tagEndChar,E="";if(f[0]==="?")E="?",h="";if((s||s==="")&&r.indexOf("<")===-1)return this.indentate(w)+"<"+f+s+E+">"+r+h;else if(this.options.commentPropName!==!1&&f===this.options.commentPropName&&E.length===0)return this.indentate(w)+`<!--${r}-->`+this.newLine;else return this.indentate(w)+"<"+f+s+E+this.tagEndChar+r+this.indentate(w)+h}};b0.prototype.closeTag=function(r){let f="";if(this.options.unpairedTags.indexOf(r)!==-1){if(!this.options.suppressUnpairedNode)f="/"}else if(this.options.suppressEmptyNode)f="/";else f=`></${r}`;return f};b0.prototype.buildTextValNode=function(r,f,s,w){if(this.options.cdataPropName!==!1&&f===this.options.cdataPropName)return this.indentate(w)+`<![CDATA[${r}]]>`+this.newLine;else if(this.options.commentPropName!==!1&&f===this.options.commentPropName)return this.indentate(w)+`<!--${r}-->`+this.newLine;else if(f[0]==="?")return this.indentate(w)+"<"+f+s+"?"+this.tagEndChar;else{let h=this.options.tagValueProcessor(f,r);if(h=this.replaceEntitiesValue(h),h==="")return this.indentate(w)+"<"+f+s+this.closeTag(f)+this.tagEndChar;else return this.indentate(w)+"<"+f+s+">"+h+"</"+f+this.tagEndChar}};b0.prototype.replaceEntitiesValue=function(r){if(r&&r.length>0&&this.options.processEntities)for(let f=0;f<this.options.entities.length;f++){const s=this.options.entities[f];r=r.replace(s.regex,s.val)}return r};WK.exports=b0});var PK=j((n$r,SK)=>{var yc=JU(),qc=TK(),mc=zK();SK.exports={XMLParser:qc,XMLValidator:yc,XMLBuilder:mc}});var JK=j((o$r,MK)=>{var{defineProperty:H3,getOwnPropertyDescriptor:vc,getOwnPropertyNames:jc}=Object,ic=Object.prototype.hasOwnProperty,Ws=(r,f)=>H3(r,"name",{value:f,configurable:!0}),dc=(r,f)=>{for(var s in f)H3(r,s,{get:f[s],enumerable:!0})},Oc=(r,f,s,w)=>{if(f&&typeof f==="object"||typeof f==="function"){for(let h of jc(f))if(!ic.call(r,h)&&h!==s)H3(r,h,{get:()=>f[h],enumerable:!(w=vc(f,h))||w.enumerable})}return r},bc=(r)=>Oc(H3({},"__esModule",{value:!0}),r),XK={};dc(XK,{_toBool:()=>_c,_toNum:()=>gc,_toStr:()=>cc,awsExpectUnion:()=>ec,loadRestJsonErrorCode:()=>ac,loadRestXmlErrorCode:()=>r_,parseJsonBody:()=>KK,parseJsonErrorBody:()=>oc,parseXmlBody:()=>ZK,parseXmlErrorBody:()=>tc});MK.exports=bc(XK);var cc=Ws((r)=>{if(r==null)return r;if(typeof r==="number"||typeof r==="bigint"){const f=new Error(`Received number ${r} where a string was expected.`);return f.name="Warning",console.warn(f),String(r)}if(typeof r==="boolean"){const f=new Error(`Received boolean ${r} where a string was expected.`);return f.name="Warning",console.warn(f),String(r)}return r},"_toStr"),_c=Ws((r)=>{if(r==null)return r;if(typeof r==="string"){const f=r.toLowerCase();if(r!==""&&f!=="false"&&f!=="true"){const s=new Error(`Received string "${r}" where a boolean was expected.`);s.name="Warning",console.warn(s)}return r!==""&&f!=="false"}return r},"_toBool"),gc=Ws((r)=>{if(r==null)return r;if(typeof r==="string"){const f=Number(r);if(f.toString()!==r){const s=new Error(`Received string "${r}" where a number was expected.`);return s.name="Warning",console.warn(s),r}return f}return r},"_toNum"),xc=Eh(),ec=Ws((r)=>{if(r==null)return;if(typeof r==="object"&&"__type"in r)delete r.__type;return xc.expectUnion(r)},"awsExpectUnion"),nc=Eh(),YK=Ws((r,f)=>nc.collectBody(r,f).then((s)=>f.utf8Encoder(s)),"collectBodyString"),KK=Ws((r,f)=>YK(r,f).then((s)=>{if(s.length)try{return JSON.parse(s)}catch(w){if((w==null?void 0:w.name)==="SyntaxError")Object.defineProperty(w,"$responseBodyText",{value:s});throw w}return{}}),"parseJsonBody"),oc=Ws(async(r,f)=>{const s=await KK(r,f);return s.message=s.message??s.Message,s},"parseJsonErrorBody"),ac=Ws((r,f)=>{const s=Ws((E,$)=>Object.keys(E).find((I)=>I.toLowerCase()===$.toLowerCase()),"findKey"),w=Ws((E)=>{let $=E;if(typeof $==="number")$=$.toString();if($.indexOf(",")>=0)$=$.split(",")[0];if($.indexOf(":")>=0)$=$.split(":")[0];if($.indexOf("#")>=0)$=$.split("#")[1];return $},"sanitizeErrorCode"),h=s(r.headers,"x-amzn-errortype");if(h!==void 0)return w(r.headers[h]);if(f.code!==void 0)return w(f.code);if(f.__type!==void 0)return w(f.__type)},"loadRestJsonErrorCode"),pc=Eh(),uc=PK(),ZK=Ws((r,f)=>YK(r,f).then((s)=>{if(s.length){const w=new uc.XMLParser({attributeNamePrefix:"",htmlEntities:!0,ignoreAttributes:!1,ignoreDeclaration:!0,parseTagValue:!1,trimValues:!1,tagValueProcessor:(F,U)=>U.trim()===""&&U.includes("\n")?"":void 0});w.addEntity("#xD","\r"),w.addEntity("#10","\n");let h;try{h=w.parse(s,!0)}catch(F){if(F&&typeof F==="object")Object.defineProperty(F,"$responseBodyText",{value:s});throw F}const E="#text",$=Object.keys(h)[0],I=h[$];if(I[E])I[$]=I[E],delete I[E];return pc.getValueFromTextNode(I)}return{}}),"parseXmlBody"),tc=Ws(async(r,f)=>{const s=await ZK(r,f);if(s.Error)s.Error.message=s.Error.message??s.Error.Message;return s},"parseXmlErrorBody"),r_=Ws((r,f)=>{var s;if(((s=f==null?void 0:f.Error)==null?void 0:s.Code)!==void 0)return f.Error.Code;if((f==null?void 0:f.Code)!==void 0)return f.Code;if(r.statusCode==404)return"NotFound"},"loadRestXmlErrorCode")});var lr=j((q1)=>{Object.defineProperty(q1,"__esModule",{value:!0});var lU=$Y();lU.__exportStar(TY(),q1);lU.__exportStar(dY(),q1);lU.__exportStar(JK(),q1)});var D3="AWS_ACCESS_KEY_ID",k3="AWS_SECRET_ACCESS_KEY",kK="AWS_SESSION_TOKEN",NK="AWS_CREDENTIAL_EXPIRATION",yK="AWS_CREDENTIAL_SCOPE",qK="AWS_ACCOUNT_ID",VU=(r)=>async()=>{r?.logger?.debug("@aws-sdk/credential-provider-env - fromEnv");const f=process.env[D3],s=process.env[k3],w=process.env[kK],h=process.env[NK],E=process.env[yK],$=process.env[qK];if(f&&s)return{accessKeyId:f,secretAccessKey:s,...w&&{sessionToken:w},...h&&{expiration:new Date(h)},...E&&{credentialScope:E},...$&&{accountId:$}};throw new g("Unable to find environment variable credentials.",{logger:r?.logger})};var mK=G(()=>{Lr()});var vK={};Af(vK,{fromEnv:()=>VU,ENV_SESSION:()=>kK,ENV_SECRET:()=>k3,ENV_KEY:()=>D3,ENV_EXPIRATION:()=>NK,ENV_CREDENTIAL_SCOPE:()=>yK,ENV_ACCOUNT_ID:()=>qK});var HU=G(()=>{mK()});import{Buffer as w_}from"buffer";import{request as h_}from"http";function c0(r){return new Promise((f,s)=>{const w=h_({method:"GET",...r,hostname:r.hostname?.replace(/^\[(.+)\]$/,"$1")});w.on("error",(h)=>{s(Object.assign(new Bs("Unable to connect to instance metadata service"),h)),w.destroy()}),w.on("timeout",()=>{s(new Bs("TimeoutError from instance metadata service")),w.destroy()}),w.on("response",(h)=>{const{statusCode:E=400}=h;if(E<200||300<=E)s(Object.assign(new Bs("Error response received from instance metadata service"),{statusCode:E})),w.destroy();const $=[];h.on("data",(I)=>{$.push(I)}),h.on("end",()=>{f(w_.concat($)),w.destroy()})}),w.end()})}var N3=G(()=>{Lr()});var y3=(r)=>Boolean(r)&&typeof r==="object"&&typeof r.AccessKeyId==="string"&&typeof r.SecretAccessKey==="string"&&typeof r.Token==="string"&&typeof r.Expiration==="string",q3=(r)=>({accessKeyId:r.AccessKeyId,secretAccessKey:r.SecretAccessKey,sessionToken:r.Token,expiration:new Date(r.Expiration),...r.AccountId&&{accountId:r.AccountId}});var E_=1000,$_=0,m1=({maxRetries:r=0,timeout:f=1000})=>({maxRetries:r,timeout:f});var v1=(r,f)=>{let s=r();for(let w=0;w<f;w++)s=s.catch(r);return s};import{parse as I_}from"url";var m3="AWS_CONTAINER_CREDENTIALS_FULL_URI",v3="AWS_CONTAINER_CREDENTIALS_RELATIVE_URI",DU="AWS_CONTAINER_AUTHORIZATION_TOKEN",F_=(r={})=>{const{timeout:f,maxRetries:s}=m1(r);return()=>v1(async()=>{const w=await L_({logger:r.logger}),h=JSON.parse(await U_(f,w));if(!y3(h))throw new g("Invalid response received from instance metadata service.",{logger:r.logger});return q3(h)},s)},U_=async(r,f)=>{if(process.env[DU])f.headers={...f.headers,Authorization:process.env[DU]};return(await c0({...f,timeout:r})).toString()},T_="169.254.170.2",G_,C_,L_=async({logger:r})=>{if(process.env[v3])return{hostname:T_,path:process.env[v3]};if(process.env[m3]){const f=I_(process.env[m3]);if(!f.hostname||!(f.hostname in G_))throw new g(`${f.hostname} is not a valid container metadata service hostname`,{tryNextLink:!1,logger:r});if(!f.protocol||!(f.protocol in C_))throw new g(`${f.protocol} is not a valid container metadata service protocol`,{tryNextLink:!1,logger:r});return{...f,port:f.port?parseInt(f.port,10):void 0}}throw new g(`The container metadata credential provider cannot be used unless the ${v3} or ${m3} environment variable is set`,{tryNextLink:!1,logger:r})};var jK=G(()=>{Lr();N3();G_={localhost:!0,"127.0.0.1":!0},C_={"http:":!0,"https:":!0}});var j3;var iK=G(()=>{Lr();j3=class j3 extends g{constructor(r,f=!0){super(r,f);this.tryNextLink=f,this.name="InstanceMetadataV1FallbackError",Object.setPrototypeOf(this,j3.prototype)}}});var Bw;var kU=G(()=>{(function(r){r.IPv4="http://169.254.169.254",r.IPv6="http://[fd00:ec2::254]"})(Bw||(Bw={}))});var dK;var OK=G(()=>{dK={environmentVariableSelector:(r)=>r.AWS_EC2_METADATA_SERVICE_ENDPOINT,configFileSelector:(r)=>r.ec2_metadata_service_endpoint,default:void 0}});var _0;var NU=G(()=>{(function(r){r.IPv4="IPv4",r.IPv6="IPv6"})(_0||(_0={}))});var A_="AWS_EC2_METADATA_SERVICE_ENDPOINT_MODE",R_="ec2_metadata_service_endpoint_mode",bK;var cK=G(()=>{NU();bK={environmentVariableSelector:(r)=>r[A_],configFileSelector:(r)=>r[R_],default:_0.IPv4}});var i3=async()=>_r(await W_()||await z_()),W_=async()=>t(dK)(),z_=async()=>{const r=await t(bK)();switch(r){case _0.IPv4:return Bw.IPv4;case _0.IPv6:return Bw.IPv6;default:throw new Error(`Unsupported endpoint mode: ${r}. Select from ${Object.values(_0)}`)}};var yU=G(()=>{sf();j0();kU();OK();NU();cK()});var qU=(r,f)=>{const s=300+Math.floor(Math.random()*300),w=new Date(Date.now()+s*1000);f.warn(`Attempting credential expiration extension due to a credential service availability issue. A refresh of these credentials will be attempted after ${new Date(w)}.\nFor more information, please visit: https://docs.aws.amazon.com/sdkref/latest/guide/feature-static-credentials.html`);const h=r.originalExpiration??r.expiration;return{...r,...h?{originalExpiration:h}:{},expiration:w}};var _K=(r,f={})=>{const s=f?.logger||console;let w;return async()=>{let h;try{if(h=await r(),h.expiration&&h.expiration.getTime()<Date.now())h=qU(h,s)}catch(E){if(w)s.warn("Credential renew failed: ",E),h=qU(w,s);else throw E}return w=h,h}};var gK=()=>{};var nK="/latest/meta-data/iam/security-credentials/",S_="/latest/api/token",mU="AWS_EC2_METADATA_V1_DISABLED",xK="ec2_metadata_v1_disabled",eK="x-aws-ec2-metadata-token",P_=(r={})=>_K(X_(r),{logger:r.logger}),X_=(r={})=>{let f=!1;const{logger:s,profile:w}=r,{timeout:h,maxRetries:E}=m1(r),$=async(I,F)=>{if(f||F.headers?.[eK]==null){let L=!1,z=!1;const S=await t({environmentVariableSelector:(K)=>{const k=K[mU];if(z=!!k&&k!=="false",k===void 0)throw new g(`${mU} not set in env, checking config file next.`,{logger:r.logger});return z},configFileSelector:(K)=>{const k=K[xK];return L=!!k&&k!=="false",L},default:!1},{profile:w})();if(r.ec2MetadataV1Disabled||S){const K=[];if(r.ec2MetadataV1Disabled)K.push("credential provider initialization (runtime option ec2MetadataV1Disabled)");if(L)K.push(`config file profile (${xK})`);if(z)K.push(`process environment variable (${mU})`);throw new j3(`AWS EC2 Metadata v1 fallback has been blocked by AWS SDK configuration in the following: [${K.join(", ")}].`)}}const C=(await v1(async()=>{let L;try{L=await K_(F)}catch(z){if(z.statusCode===401)f=!1;throw z}return L},I)).trim();return v1(async()=>{let L;try{L=await Z_(C,F,r)}catch(z){if(z.statusCode===401)f=!1;throw z}return L},I)};return async()=>{const I=await i3();if(f)return s?.debug("AWS SDK Instance Metadata","using v1 fallback (no token fetch)"),$(E,{...I,timeout:h});else{let F;try{F=(await Y_({...I,timeout:h})).toString()}catch(U){if(U?.statusCode===400)throw Object.assign(U,{message:"EC2 Metadata token request returned error"});else if(U.message==="TimeoutError"||[403,404,405].includes(U.statusCode))f=!0;return s?.debug("AWS SDK Instance Metadata","using v1 fallback (initial)"),$(E,{...I,timeout:h})}return $(E,{...I,headers:{[eK]:F},timeout:h})}}},Y_=async(r)=>c0({...r,path:S_,method:"PUT",headers:{"x-aws-ec2-metadata-token-ttl-seconds":"21600"}}),K_=async(r)=>(await c0({...r,path:nK})).toString(),Z_=async(r,f,s)=>{const w=JSON.parse((await c0({...f,path:nK+r})).toString());if(!y3(w))throw new g("Invalid response received from instance metadata service.",{logger:s.logger});return q3(w)};var oK=G(()=>{sf();Lr();iK();N3();yU();gK()});var aK=()=>{};var j1={};Af(j1,{providerConfigFromInit:()=>m1,httpRequest:()=>c0,getInstanceMetadataEndpoint:()=>i3,fromInstanceMetadata:()=>P_,fromContainerMetadata:()=>F_,Endpoint:()=>Bw,ENV_CMDS_RELATIVE_URI:()=>v3,ENV_CMDS_FULL_URI:()=>m3,ENV_CMDS_AUTH_TOKEN:()=>DU,DEFAULT_TIMEOUT:()=>E_,DEFAULT_MAX_RETRIES:()=>$_});var i1=G(()=>{jK();oK();aK();N3();yU();kU()});var d1=(r)=>encodeURIComponent(r).replace(/[!'()*]/g,M_),M_=(r)=>`%${r.charCodeAt(0).toString(16).toUpperCase()}`;var pK=()=>{};var uK=G(()=>{pK()});function vU(r){const f=[];for(let s of Object.keys(r).sort()){const w=r[s];if(s=d1(s),Array.isArray(w))for(let h=0,E=w.length;h<E;h++)f.push(`${s}=${d1(w[h])}`);else{let h=s;if(w||typeof w==="string")h+=`=${d1(w)}`;f.push(h)}}return f.join("&")}var jU=G(()=>{uK()});var tK;var r7=G(()=>{tK=["ECONNRESET","EPIPE","ETIMEDOUT"]});var iU=(r)=>{const f={};for(let s of Object.keys(r)){const w=r[s];f[s]=Array.isArray(w)?w.join(","):w}return f};var dU=()=>{};var s7=(r,f,s=0)=>{if(!s)return;const w=setTimeout(()=>{r.destroy(),f(Object.assign(new Error(`Socket timed out without establishing a connection within ${s} ms`),{name:"TimeoutError"}))},s);r.on("socket",(h)=>{if(h.connecting)h.on("connect",()=>{clearTimeout(w)});else clearTimeout(w)})};var f7=(r,{keepAlive:f,keepAliveMsecs:s})=>{if(f!==!0)return;r.on("socket",(w)=>{w.setKeepAlive(f,s||0)})};var w7=(r,f,s=0)=>{r.setTimeout(s,()=>{r.destroy(),f(Object.assign(new Error(`Connection timed out after ${s} ms`),{name:"TimeoutError"}))})};import{Readable as J_}from"stream";async function OU(r,f,s=h7){const w=f.headers??{},h=w.Expect||w.expect;let E=-1,$=!1;if(h==="100-continue")await Promise.race([new Promise((I)=>{E=Number(setTimeout(I,Math.max(h7,s)))}),new Promise((I)=>{r.on("continue",()=>{clearTimeout(E),I()}),r.on("error",()=>{$=!0,clearTimeout(E),I()})})]);if(!$)Q_(r,f.body)}function Q_(r,f){if(f instanceof J_){f.pipe(r);return}if(f){if(Buffer.isBuffer(f)||typeof f==="string"){r.end(f);return}const s=f;if(typeof s==="object"&&s.buffer&&typeof s.byteOffset==="number"&&typeof s.byteLength==="number"){r.end(Buffer.from(s.buffer,s.byteOffset,s.byteLength));return}r.end(Buffer.from(f));return}r.end()}var h7=1000;var bU=()=>{};import{Agent as E7,request as B_}from"http";import{Agent as $7,request as l_}from"https";class tr{static create(r){if(typeof r?.handle==="function")return r;return new tr(r)}static checkSocketUsage(r,f,s=console){const{sockets:w,requests:h,maxSockets:E}=r;if(typeof E!=="number"||E===1/0)return f;const $=15000;if(Date.now()-$<f)return f;if(w&&h)for(let I in w){const F=w[I]?.length??0,U=h[I]?.length??0;if(F>=E&&U>=2*E)return s?.warn?.(`@smithy/node-http-handler:WARN - socket usage at capacity=${F} and ${U} additional requests are enqueued.
18
+ ${f}
19
+ ${b0.toHex(E)}`}getCanonicalPath({path:s}){if(this.uriEscapePath){const f=[];for(let E of s.split("/")){if((E==null?void 0:E.length)===0)continue;if(E===".")continue;if(E==="..")f.pop();else f.push(E)}const w=`${(s==null?void 0:s.startsWith("/"))?"/":""}${f.join("/")}${f.length>0&&(s==null?void 0:s.endsWith("/"))?"/":""}`;return T3.escapeUri(w).replace(/%2F/g,"/")}return s}async getSignature(s,f,w,h){const E=await this.createStringToSign(s,f,h),$=new this.sha256(await w);return $.update(nF.toUint8Array(E)),b0.toHex(await $.digest())}getSigningKey(s,f,w,h){return d7(this.sha256,s,w,f,h||this.service)}validateResolvedCredentials(s){if(typeof s!=="object"||typeof s.accessKeyId!=="string"||typeof s.secretAccessKey!=="string")throw new Error("Resolved credential object is not valid")}};mr(e7,"SignatureV4");var zc=e7,I3=mr((r)=>{const s=Cc(r).replace(/[\-:]/g,"");return{longDate:s,shortDate:s.slice(0,8)}},"formatDate"),y7=mr((r)=>Object.keys(r).sort().join(";"),"getCanonicalHeaderList")});var EY=O((x0r,hY)=>{var{defineProperty:L3,getOwnPropertyDescriptor:Sc,getOwnPropertyNames:Yc}=Object,Xc=Object.prototype.hasOwnProperty,Cf=(r,s)=>L3(r,"name",{value:s,configurable:!0}),Kc=(r,s)=>{for(var f in s)L3(r,f,{get:s[f],enumerable:!0})},Zc=(r,s,f,w)=>{if(s&&typeof s==="object"||typeof s==="function"){for(let h of Yc(s))if(!Xc.call(r,h)&&h!==f)L3(r,h,{get:()=>s[h],enumerable:!(w=Sc(s,h))||w.enumerable})}return r},Pc=(r)=>Zc(L3({},"__esModule",{value:!0}),r),rY={};Kc(rY,{AWSSDKSigV4Signer:()=>Mc,AwsSdkSigV4ASigner:()=>Hc,AwsSdkSigV4Signer:()=>sU,NODE_SIGV4A_CONFIG_OPTIONS:()=>kc,resolveAWSSDKSigV4Config:()=>Nc,resolveAwsSdkSigV4AConfig:()=>Dc,resolveAwsSdkSigV4Config:()=>wY,validateSigningProperties:()=>fU});hY.exports=Pc(rY);var Jc=L0(),Qc=L0(),a7=Cf((r)=>{var s,f;return Qc.HttpResponse.isInstance(r)?((s=r.headers)==null?void 0:s.date)??((f=r.headers)==null?void 0:f.Date):void 0},"getDateHeader"),rU=Cf((r)=>new Date(Date.now()+r),"getSkewCorrectedDate"),Bc=Cf((r,s)=>Math.abs(rU(s).getTime()-r)>=300000,"isClockSkewed"),p7=Cf((r,s)=>{const f=Date.parse(r);if(Bc(f,s))return f-Date.now();return s},"getUpdatedSystemClockOffset"),D1=Cf((r,s)=>{if(!s)throw new Error(`Property \`${r}\` is not resolved for AWS SDK SigV4Auth`);return s},"throwSigningPropertyError"),fU=Cf(async(r)=>{var s,f,w;const h=D1("context",r.context),E=D1("config",r.config),$=(w=(f=(s=h.endpointV2)==null?void 0:s.properties)==null?void 0:f.authSchemes)==null?void 0:w[0],F=await D1("signer",E.signer)($),U=r==null?void 0:r.signingRegion,A=r==null?void 0:r.signingRegionSet,L=r==null?void 0:r.signingName;return{config:E,signer:F,signingRegion:U,signingRegionSet:A,signingName:L}},"validateSigningProperties"),fY=class r{async sign(s,f,w){var h;if(!Jc.HttpRequest.isInstance(s))throw new Error("The request is not an instance of `HttpRequest` and cannot be signed");const E=await fU(w),{config:$,signer:I}=E;let{signingRegion:F,signingName:U}=E;const A=w.context;if(((h=A==null?void 0:A.authSchemes)==null?void 0:h.length)??0>1){const[S,z]=A.authSchemes;if((S==null?void 0:S.name)==="sigv4a"&&(z==null?void 0:z.name)==="sigv4")F=(z==null?void 0:z.signingRegion)??F,U=(z==null?void 0:z.signingName)??U}return await I.sign(s,{signingDate:rU($.systemClockOffset),signingRegion:F,signingService:U})}errorHandler(s){return(f)=>{const w=f.ServerTime??a7(f.$response);if(w){const h=D1("config",s.config),E=h.systemClockOffset;if(h.systemClockOffset=p7(w,h.systemClockOffset),h.systemClockOffset!==E&&f.$metadata)f.$metadata.clockSkewCorrected=!0}throw f}}successHandler(s,f){const w=a7(s);if(w){const h=D1("config",f.config);h.systemClockOffset=p7(w,h.systemClockOffset)}}};Cf(fY,"AwsSdkSigV4Signer");var sU=fY,Mc=sU,Vc=L0(),sY=class r extends sU{async sign(s,f,w){var h;if(!Vc.HttpRequest.isInstance(s))throw new Error("The request is not an instance of `HttpRequest` and cannot be signed");const{config:E,signer:$,signingRegion:I,signingRegionSet:F,signingName:U}=await fU(w),L=(await((h=E.sigv4aSigningRegionSet)==null?void 0:h.call(E))??F??[I]).join(",");return await $.sign(s,{signingDate:rU(E.systemClockOffset),signingRegion:L,signingService:U})}};Cf(sY,"AwsSdkSigV4ASigner");var Hc=sY,lc=qr(),u7=Ar(),Dc=Cf((r)=>{return r.sigv4aSigningRegionSet=lc.normalizeProvider(r.sigv4aSigningRegionSet),r},"resolveAwsSdkSigV4AConfig"),kc={environmentVariableSelector(r){if(r.AWS_SIGV4A_SIGNING_REGION_SET)return r.AWS_SIGV4A_SIGNING_REGION_SET.split(",").map((s)=>s.trim());throw new u7.ProviderError("AWS_SIGV4A_SIGNING_REGION_SET not set in env.",{tryNextLink:!0})},configFileSelector(r){if(r.sigv4a_signing_region_set)return(r.sigv4a_signing_region_set??"").split(",").map((s)=>s.trim());throw new u7.ProviderError("sigv4a_signing_region_set not set in profile.",{tryNextLink:!0})},default:void 0},yc=tr(),Jw=qr(),t7=o7(),wY=Cf((r)=>{let s=!1,f;if(r.credentials)s=!0,f=Jw.memoizeIdentityProvider(r.credentials,Jw.isIdentityExpired,Jw.doesIdentityRequireRefresh);if(!f)if(r.credentialDefaultProvider)f=Jw.normalizeProvider(r.credentialDefaultProvider(Object.assign({},r,{parentClientConfig:r})));else f=Cf(async()=>{throw new Error("`credentials` is missing")},"normalizedCreds");const{signingEscapePath:w=!0,systemClockOffset:h=r.systemClockOffset||0,sha256:E}=r;let $;if(r.signer)$=Jw.normalizeProvider(r.signer);else if(r.regionInfoProvider)$=Cf(()=>Jw.normalizeProvider(r.region)().then(async(I)=>[await r.regionInfoProvider(I,{useFipsEndpoint:await r.useFipsEndpoint(),useDualstackEndpoint:await r.useDualstackEndpoint()})||{},I]).then(([I,F])=>{const{signingRegion:U,signingService:A}=I;r.signingRegion=r.signingRegion||U||F,r.signingName=r.signingName||A||r.serviceId;const L={...r,credentials:f,region:r.signingRegion,service:r.signingName,sha256:E,uriEscapePath:w};return new(r.signerConstructor||t7.SignatureV4)(L)}),"signer");else $=Cf(async(I)=>{I=Object.assign({},{name:"sigv4",signingName:r.signingName||r.defaultSigningName,signingRegion:await Jw.normalizeProvider(r.region)(),properties:{}},I);const{signingRegion:F,signingName:U}=I;r.signingRegion=r.signingRegion||F,r.signingName=r.signingName||U||r.serviceId;const A={...r,credentials:f,region:r.signingRegion,service:r.signingName,sha256:E,uriEscapePath:w};return new(r.signerConstructor||t7.SignatureV4)(A)},"signer");return{...r,systemClockOffset:h,signingEscapePath:w,credentials:s?async()=>f().then((I)=>yc.setCredentialFeature(I,"CREDENTIALS_CODE","e")):f,signer:$}},"resolveAwsSdkSigV4Config"),Nc=wY});var R3=O((ic)=>{var qc=":A-Za-z_\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.\\d\\u00B7\\u0300-\\u036F\\u203F-\\u2040",$Y="[:A-Za-z_\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD]["+qc+"]*",mc=new RegExp("^"+$Y+"$"),jc=function(r,s){const f=[];let w=s.exec(r);while(w){const h=[];h.startIndex=s.lastIndex-w[0].length;const E=w.length;for(let $=0;$<E;$++)h.push(w[$]);f.push(h),w=s.exec(r)}return f},vc=function(r){const s=mc.exec(r);return!(s===null||typeof s==="undefined")};ic.isExist=function(r){return typeof r!=="undefined"};ic.isEmptyObject=function(r){return Object.keys(r).length===0};ic.merge=function(r,s,f){if(s){const w=Object.keys(s),h=w.length;for(let E=0;E<h;E++)if(f==="strict")r[w[E]]=[s[w[E]]];else r[w[E]]=s[w[E]]}};ic.getValue=function(r){if(ic.isExist(r))return r;else return""};ic.isName=vc;ic.getAllMatches=jc;ic.nameRegexp=$Y});var hU=O((fb)=>{function FY(r){return r===" "||r==="\t"||r==="\n"||r==="\r"}function UY(r,s){const f=s;for(;s<r.length;s++)if(r[s]=="?"||r[s]==" "){const w=r.substr(f,s-f);if(s>5&&w==="xml")return Vr("InvalidXml","XML declaration allowed only at the start of the document.",rf(r,s));else if(r[s]=="?"&&r[s+1]==">"){s++;break}else continue}return s}function TY(r,s){if(r.length>s+5&&r[s+1]==="-"&&r[s+2]==="-"){for(s+=3;s<r.length;s++)if(r[s]==="-"&&r[s+1]==="-"&&r[s+2]===">"){s+=2;break}}else if(r.length>s+8&&r[s+1]==="D"&&r[s+2]==="O"&&r[s+3]==="C"&&r[s+4]==="T"&&r[s+5]==="Y"&&r[s+6]==="P"&&r[s+7]==="E"){let f=1;for(s+=8;s<r.length;s++)if(r[s]==="<")f++;else if(r[s]===">"){if(f--,f===0)break}}else if(r.length>s+9&&r[s+1]==="["&&r[s+2]==="C"&&r[s+3]==="D"&&r[s+4]==="A"&&r[s+5]==="T"&&r[s+6]==="A"&&r[s+7]==="["){for(s+=8;s<r.length;s++)if(r[s]==="]"&&r[s+1]==="]"&&r[s+2]===">"){s+=2;break}}return s}function oc(r,s){let f="",w="",h=!1;for(;s<r.length;s++){if(r[s]===ec||r[s]===nc)if(w==="")w=r[s];else if(w!==r[s]);else w="";else if(r[s]===">"){if(w===""){h=!0;break}}f+=r[s]}if(w!=="")return!1;return{value:f,index:s,tagClosed:h}}function GY(r,s){const f=wU.getAllMatches(r,ac),w={};for(let h=0;h<f.length;h++){if(f[h][1].length===0)return Vr("InvalidAttr","Attribute '"+f[h][2]+"' has no space in starting.",k1(f[h]));else if(f[h][3]!==void 0&&f[h][4]===void 0)return Vr("InvalidAttr","Attribute '"+f[h][2]+"' is without value.",k1(f[h]));else if(f[h][3]===void 0&&!s.allowBooleanAttributes)return Vr("InvalidAttr","boolean attribute '"+f[h][2]+"' is not allowed.",k1(f[h]));const E=f[h][2];if(!tc(E))return Vr("InvalidAttr","Attribute '"+E+"' is an invalid name.",k1(f[h]));if(!w.hasOwnProperty(E))w[E]=1;else return Vr("InvalidAttr","Attribute '"+E+"' is repeated.",k1(f[h]))}return!0}function pc(r,s){let f=/\d/;if(r[s]==="x")s++,f=/[\da-fA-F]/;for(;s<r.length;s++){if(r[s]===";")return s;if(!r[s].match(f))break}return-1}function uc(r,s){if(s++,r[s]===";")return-1;if(r[s]==="#")return s++,pc(r,s);let f=0;for(;s<r.length;s++,f++){if(r[s].match(/\w/)&&f<20)continue;if(r[s]===";")break;return-1}return s}function Vr(r,s,f){return{err:{code:r,msg:s,line:f.line||f,col:f.col}}}function tc(r){return wU.isName(r)}function rb(r){return wU.isName(r)}function rf(r,s){const f=r.substring(0,s).split(/\r?\n/);return{line:f.length,col:f[f.length-1].length+1}}function k1(r){return r.startIndex+r[1].length}var wU=R3(),xc={allowBooleanAttributes:!1,unpairedTags:[]};fb.validate=function(r,s){s=Object.assign({},xc,s);const f=[];let w=!1,h=!1;if(r[0]==="\uFEFF")r=r.substr(1);for(let E=0;E<r.length;E++)if(r[E]==="<"&&r[E+1]==="?"){if(E+=2,E=UY(r,E),E.err)return E}else if(r[E]==="<"){let $=E;if(E++,r[E]==="!"){E=TY(r,E);continue}else{let I=!1;if(r[E]==="/")I=!0,E++;let F="";for(;E<r.length&&r[E]!==">"&&r[E]!==" "&&r[E]!=="\t"&&r[E]!=="\n"&&r[E]!=="\r";E++)F+=r[E];if(F=F.trim(),F[F.length-1]==="/")F=F.substring(0,F.length-1),E--;if(!rb(F)){let L;if(F.trim().length===0)L="Invalid space after '<'.";else L="Tag '"+F+"' is an invalid name.";return Vr("InvalidTag",L,rf(r,E))}const U=oc(r,E);if(U===!1)return Vr("InvalidAttr","Attributes for '"+F+"' have open quote.",rf(r,E));let A=U.value;if(E=U.index,A[A.length-1]==="/"){const L=E-A.length;A=A.substring(0,A.length-1);const S=GY(A,s);if(S===!0)w=!0;else return Vr(S.err.code,S.err.msg,rf(r,L+S.err.line))}else if(I)if(!U.tagClosed)return Vr("InvalidTag","Closing tag '"+F+"' doesn't have proper closing.",rf(r,E));else if(A.trim().length>0)return Vr("InvalidTag","Closing tag '"+F+"' can't have attributes or invalid starting.",rf(r,$));else if(f.length===0)return Vr("InvalidTag","Closing tag '"+F+"' has not been opened.",rf(r,$));else{const L=f.pop();if(F!==L.tagName){let S=rf(r,L.tagStartPos);return Vr("InvalidTag","Expected closing tag '"+L.tagName+"' (opened in line "+S.line+", col "+S.col+") instead of closing tag '"+F+"'.",rf(r,$))}if(f.length==0)h=!0}else{const L=GY(A,s);if(L!==!0)return Vr(L.err.code,L.err.msg,rf(r,E-A.length+L.err.line));if(h===!0)return Vr("InvalidXml","Multiple possible root nodes found.",rf(r,E));else if(s.unpairedTags.indexOf(F)!==-1);else f.push({tagName:F,tagStartPos:$});w=!0}for(E++;E<r.length;E++)if(r[E]==="<")if(r[E+1]==="!"){E++,E=TY(r,E);continue}else if(r[E+1]==="?"){if(E=UY(r,++E),E.err)return E}else break;else if(r[E]==="&"){const L=uc(r,E);if(L==-1)return Vr("InvalidChar","char '&' is not expected.",rf(r,E));E=L}else if(h===!0&&!FY(r[E]))return Vr("InvalidXml","Extra text at the end",rf(r,E));if(r[E]==="<")E--}}else{if(FY(r[E]))continue;return Vr("InvalidChar","char '"+r[E]+"' is not expected.",rf(r,E))}if(!w)return Vr("InvalidXml","Start tag expected.",1);else if(f.length==1)return Vr("InvalidTag","Unclosed tag '"+f[0].tagName+"'.",rf(r,f[0].tagStartPos));else if(f.length>0)return Vr("InvalidXml","Invalid '"+JSON.stringify(f.map((E)=>E.tagName),null,4).replace(/\r?\n/g,"")+"' found.",{line:1,col:1});return!0};var ec='"',nc="'",ac=new RegExp('(\\s*)([^\\s=]+)(\\s*=)?(\\s*([\'"])(([\\s\\S])*?)\\5)?',"g")});var LY=O((hb)=>{var AY={preserveOrder:!1,attributeNamePrefix:"@_",attributesGroupName:!1,textNodeName:"#text",ignoreAttributes:!0,removeNSPrefix:!1,allowBooleanAttributes:!1,parseTagValue:!0,parseAttributeValue:!1,trimValues:!0,cdataPropName:!1,numberParseOptions:{hex:!0,leadingZeros:!0,eNotation:!0},tagValueProcessor:function(r,s){return s},attributeValueProcessor:function(r,s){return s},stopNodes:[],alwaysCreateTextNode:!1,isArray:()=>!1,commentPropName:!1,unpairedTags:[],processEntities:!0,htmlEntities:!1,ignoreDeclaration:!1,ignorePiTags:!1,transformTagName:!1,transformAttributeName:!1,updateTag:function(r,s,f){return r}},wb=function(r){return Object.assign({},AY,r)};hb.buildOptions=wb;hb.defaultOptions=AY});var WY=O((a0r,CY)=>{class RY{constructor(r){this.tagname=r,this.child=[],this[":@"]={}}add(r,s){if(r==="__proto__")r="#__proto__";this.child.push({[r]:s})}addChild(r){if(r.tagname==="__proto__")r.tagname="#__proto__";if(r[":@"]&&Object.keys(r[":@"]).length>0)this.child.push({[r.tagname]:r.child,[":@"]:r[":@"]});else this.child.push({[r.tagname]:r.child})}}CY.exports=RY});var SY=O((p0r,zY)=>{function Fb(r,s){const f={};if(r[s+3]==="O"&&r[s+4]==="C"&&r[s+5]==="T"&&r[s+6]==="Y"&&r[s+7]==="P"&&r[s+8]==="E"){s=s+9;let w=1,h=!1,E=!1,$="";for(;s<r.length;s++)if(r[s]==="<"&&!E){if(h&&Gb(r,s)){if(s+=7,[entityName,val,s]=Ub(r,s+1),val.indexOf("&")===-1)f[Cb(entityName)]={regx:RegExp(`&${entityName};`,"g"),val}}else if(h&&Ab(r,s))s+=8;else if(h&&Lb(r,s))s+=8;else if(h&&Rb(r,s))s+=9;else if(Tb)E=!0;else throw new Error("Invalid DOCTYPE");w++,$=""}else if(r[s]===">"){if(E){if(r[s-1]==="-"&&r[s-2]==="-")E=!1,w--}else w--;if(w===0)break}else if(r[s]==="[")h=!0;else $+=r[s];if(w!==0)throw new Error("Unclosed DOCTYPE")}else throw new Error("Invalid Tag instead of DOCTYPE");return{entities:f,i:s}}function Ub(r,s){let f="";for(;s<r.length&&(r[s]!=="'"&&r[s]!=='"');s++)f+=r[s];if(f=f.trim(),f.indexOf(" ")!==-1)throw new Error("External entites are not supported");const w=r[s++];let h="";for(;s<r.length&&r[s]!==w;s++)h+=r[s];return[f,h,s]}function Tb(r,s){if(r[s+1]==="!"&&r[s+2]==="-"&&r[s+3]==="-")return!0;return!1}function Gb(r,s){if(r[s+1]==="!"&&r[s+2]==="E"&&r[s+3]==="N"&&r[s+4]==="T"&&r[s+5]==="I"&&r[s+6]==="T"&&r[s+7]==="Y")return!0;return!1}function Ab(r,s){if(r[s+1]==="!"&&r[s+2]==="E"&&r[s+3]==="L"&&r[s+4]==="E"&&r[s+5]==="M"&&r[s+6]==="E"&&r[s+7]==="N"&&r[s+8]==="T")return!0;return!1}function Lb(r,s){if(r[s+1]==="!"&&r[s+2]==="A"&&r[s+3]==="T"&&r[s+4]==="T"&&r[s+5]==="L"&&r[s+6]==="I"&&r[s+7]==="S"&&r[s+8]==="T")return!0;return!1}function Rb(r,s){if(r[s+1]==="!"&&r[s+2]==="N"&&r[s+3]==="O"&&r[s+4]==="T"&&r[s+5]==="A"&&r[s+6]==="T"&&r[s+7]==="I"&&r[s+8]==="O"&&r[s+9]==="N")return!0;return!1}function Cb(r){if(Ib.isName(r))return r;else throw new Error(`Invalid entity name ${r}`)}var Ib=R3();zY.exports=Fb});var XY=O((u0r,YY)=>{function Yb(r,s={}){if(s=Object.assign({},Sb,s),!r||typeof r!=="string")return r;let f=r.trim();if(s.skipLike!==void 0&&s.skipLike.test(f))return r;else if(s.hex&&Wb.test(f))return Number.parseInt(f,16);else{const w=zb.exec(f);if(w){const h=w[1],E=w[2];let $=Xb(w[3]);const I=w[4]||w[6];if(!s.leadingZeros&&E.length>0&&h&&f[2]!==".")return r;else if(!s.leadingZeros&&E.length>0&&!h&&f[1]!==".")return r;else{const F=Number(f),U=""+F;if(U.search(/[eE]/)!==-1)if(s.eNotation)return F;else return r;else if(I)if(s.eNotation)return F;else return r;else if(f.indexOf(".")!==-1)if(U==="0"&&$==="")return F;else if(U===$)return F;else if(h&&U==="-"+$)return F;else return r;if(E)if($===U)return F;else if(h+$===U)return F;else return r;if(f===U)return F;else if(f===h+U)return F;return r}}else return r}}function Xb(r){if(r&&r.indexOf(".")!==-1){if(r=r.replace(/0+$/,""),r===".")r="0";else if(r[0]===".")r="0"+r;else if(r[r.length-1]===".")r=r.substr(0,r.length-1);return r}return r}var Wb=/^[-+]?0x[a-fA-F0-9]+$/,zb=/^([\-\+])?(0*)(\.[0-9]+([eE]\-?[0-9]+)?|[0-9]+(\.[0-9]+([eE]\-?[0-9]+)?)?)$/;if(!Number.parseInt&&window.parseInt)Number.parseInt=window.parseInt;if(!Number.parseFloat&&window.parseFloat)Number.parseFloat=window.parseFloat;var Sb={hex:!0,leadingZeros:!0,decimalPoint:".",eNotation:!0};YY.exports=Yb});var JY=O((t0r,PY)=>{function Pb(r){const s=Object.keys(r);for(let f=0;f<s.length;f++){const w=s[f];this.lastEntities[w]={regex:new RegExp("&"+w+";","g"),val:r[w]}}}function Jb(r,s,f,w,h,E,$){if(r!==void 0){if(this.options.trimValues&&!w)r=r.trim();if(r.length>0){if(!$)r=this.replaceEntitiesValue(r);const I=this.options.tagValueProcessor(s,r,f,h,E);if(I===null||I===void 0)return r;else if(typeof I!==typeof r||I!==r)return I;else if(this.options.trimValues)return $U(r,this.options.parseTagValue,this.options.numberParseOptions);else if(r.trim()===r)return $U(r,this.options.parseTagValue,this.options.numberParseOptions);else return r}}}function Qb(r){if(this.options.removeNSPrefix){const s=r.split(":"),f=r.charAt(0)==="/"?"/":"";if(s[0]==="xmlns")return"";if(s.length===2)r=f+s[1]}return r}function Mb(r,s,f){if(!this.options.ignoreAttributes&&typeof r==="string"){const w=KY.getAllMatches(r,Bb),h=w.length,E={};for(let $=0;$<h;$++){const I=this.resolveNameSpace(w[$][1]);let F=w[$][4],U=this.options.attributeNamePrefix+I;if(I.length){if(this.options.transformAttributeName)U=this.options.transformAttributeName(U);if(U==="__proto__")U="#__proto__";if(F!==void 0){if(this.options.trimValues)F=F.trim();F=this.replaceEntitiesValue(F);const A=this.options.attributeValueProcessor(I,F,s);if(A===null||A===void 0)E[U]=F;else if(typeof A!==typeof F||A!==F)E[U]=A;else E[U]=$U(F,this.options.parseAttributeValue,this.options.numberParseOptions)}else if(this.options.allowBooleanAttributes)E[U]=!0}}if(!Object.keys(E).length)return;if(this.options.attributesGroupName){const $={};return $[this.options.attributesGroupName]=E,$}return E}}function Hb(r,s,f){const w=this.options.updateTag(s.tagname,f,s[":@"]);if(w===!1);else if(typeof w==="string")s.tagname=w,r.addChild(s);else r.addChild(s)}function Db(r,s,f,w){if(r){if(w===void 0)w=Object.keys(s.child).length===0;if(r=this.parseTextData(r,s.tagname,f,!1,s[":@"]?Object.keys(s[":@"]).length!==0:!1,w),r!==void 0&&r!=="")s.add(this.options.textNodeName,r);r=""}return r}function kb(r,s,f){const w="*."+f;for(let h in r){const E=r[h];if(w===E||s===E)return!0}return!1}function yb(r,s,f=">"){let w,h="";for(let E=s;E<r.length;E++){let $=r[E];if(w){if($===w)w=""}else if($==='"'||$==="'")w=$;else if($===f[0])if(f[1]){if(r[E+1]===f[1])return{data:h,index:E}}else return{data:h,index:E};else if($==="\t")$=" ";h+=$}}function Qw(r,s,f,w){const h=r.indexOf(s,f);if(h===-1)throw new Error(w);else return h+s.length-1}function EU(r,s,f,w=">"){const h=yb(r,s+1,w);if(!h)return;let E=h.data;const $=h.index,I=E.search(/\s/);let F=E,U=!0;if(I!==-1)F=E.substring(0,I),E=E.substring(I+1).trimStart();const A=F;if(f){const L=F.indexOf(":");if(L!==-1)F=F.substr(L+1),U=F!==h.data.substr(L+1)}return{tagName:F,tagExp:E,closeIndex:$,attrExpPresent:U,rawTagName:A}}function Nb(r,s,f){const w=f;let h=1;for(;f<r.length;f++)if(r[f]==="<")if(r[f+1]==="/"){const E=Qw(r,">",f,`${s} is not closed`);if(r.substring(f+2,E).trim()===s){if(h--,h===0)return{tagContent:r.substring(w,f),i:E}}f=E}else if(r[f+1]==="?")f=Qw(r,"?>",f+1,"StopNode is not closed.");else if(r.substr(f+1,3)==="!--")f=Qw(r,"-->",f+3,"StopNode is not closed.");else if(r.substr(f+1,2)==="![")f=Qw(r,"]]>",f,"StopNode is not closed.")-2;else{const E=EU(r,f,">");if(E){if((E&&E.tagName)===s&&E.tagExp[E.tagExp.length-1]!=="/")h++;f=E.closeIndex}}}function $U(r,s,f){if(s&&typeof r==="string"){const w=r.trim();if(w==="true")return!0;else if(w==="false")return!1;else return Zb(r,f)}else if(KY.isExist(r))return r;else return""}var KY=R3(),y1=WY(),Kb=SY(),Zb=XY();class ZY{constructor(r){this.options=r,this.currentNode=null,this.tagsNodeStack=[],this.docTypeEntities={},this.lastEntities={apos:{regex:/&(apos|#39|#x27);/g,val:"'"},gt:{regex:/&(gt|#62|#x3E);/g,val:">"},lt:{regex:/&(lt|#60|#x3C);/g,val:"<"},quot:{regex:/&(quot|#34|#x22);/g,val:"\""}},this.ampEntity={regex:/&(amp|#38|#x26);/g,val:"&"},this.htmlEntities={space:{regex:/&(nbsp|#160);/g,val:" "},cent:{regex:/&(cent|#162);/g,val:"\xA2"},pound:{regex:/&(pound|#163);/g,val:"\xA3"},yen:{regex:/&(yen|#165);/g,val:"\xA5"},euro:{regex:/&(euro|#8364);/g,val:"\u20AC"},copyright:{regex:/&(copy|#169);/g,val:"\xA9"},reg:{regex:/&(reg|#174);/g,val:"\xAE"},inr:{regex:/&(inr|#8377);/g,val:"\u20B9"},num_dec:{regex:/&#([0-9]{1,7});/g,val:(s,f)=>String.fromCharCode(Number.parseInt(f,10))},num_hex:{regex:/&#x([0-9a-fA-F]{1,6});/g,val:(s,f)=>String.fromCharCode(Number.parseInt(f,16))}},this.addExternalEntities=Pb,this.parseXml=Vb,this.parseTextData=Jb,this.resolveNameSpace=Qb,this.buildAttributesMap=Mb,this.isItStopNode=kb,this.replaceEntitiesValue=lb,this.readStopNodeData=Nb,this.saveTextToParentTag=Db,this.addChild=Hb}}var Bb=new RegExp('([^\\s=]+)\\s*(=\\s*([\'"])([\\s\\S]*?)\\3)?',"gm"),Vb=function(r){r=r.replace(/\r\n?/g,"\n");const s=new y1("!xml");let f=s,w="",h="";for(let E=0;E<r.length;E++)if(r[E]==="<")if(r[E+1]==="/"){const I=Qw(r,">",E,"Closing Tag is not closed.");let F=r.substring(E+2,I).trim();if(this.options.removeNSPrefix){const L=F.indexOf(":");if(L!==-1)F=F.substr(L+1)}if(this.options.transformTagName)F=this.options.transformTagName(F);if(f)w=this.saveTextToParentTag(w,f,h);const U=h.substring(h.lastIndexOf(".")+1);if(F&&this.options.unpairedTags.indexOf(F)!==-1)throw new Error(`Unpaired tag can not be used as closing tag: </${F}>`);let A=0;if(U&&this.options.unpairedTags.indexOf(U)!==-1)A=h.lastIndexOf(".",h.lastIndexOf(".")-1),this.tagsNodeStack.pop();else A=h.lastIndexOf(".");h=h.substring(0,A),f=this.tagsNodeStack.pop(),w="",E=I}else if(r[E+1]==="?"){let I=EU(r,E,!1,"?>");if(!I)throw new Error("Pi Tag is not closed.");if(w=this.saveTextToParentTag(w,f,h),this.options.ignoreDeclaration&&I.tagName==="?xml"||this.options.ignorePiTags);else{const F=new y1(I.tagName);if(F.add(this.options.textNodeName,""),I.tagName!==I.tagExp&&I.attrExpPresent)F[":@"]=this.buildAttributesMap(I.tagExp,h,I.tagName);this.addChild(f,F,h)}E=I.closeIndex+1}else if(r.substr(E+1,3)==="!--"){const I=Qw(r,"-->",E+4,"Comment is not closed.");if(this.options.commentPropName){const F=r.substring(E+4,I-2);w=this.saveTextToParentTag(w,f,h),f.add(this.options.commentPropName,[{[this.options.textNodeName]:F}])}E=I}else if(r.substr(E+1,2)==="!D"){const I=Kb(r,E);this.docTypeEntities=I.entities,E=I.i}else if(r.substr(E+1,2)==="!["){const I=Qw(r,"]]>",E,"CDATA is not closed.")-2,F=r.substring(E+9,I);w=this.saveTextToParentTag(w,f,h);let U=this.parseTextData(F,f.tagname,h,!0,!1,!0,!0);if(U==null)U="";if(this.options.cdataPropName)f.add(this.options.cdataPropName,[{[this.options.textNodeName]:F}]);else f.add(this.options.textNodeName,U);E=I+2}else{let I=EU(r,E,this.options.removeNSPrefix),F=I.tagName;const U=I.rawTagName;let{tagExp:A,attrExpPresent:L,closeIndex:S}=I;if(this.options.transformTagName)F=this.options.transformTagName(F);if(f&&w){if(f.tagname!=="!xml")w=this.saveTextToParentTag(w,f,h,!1)}const z=f;if(z&&this.options.unpairedTags.indexOf(z.tagname)!==-1)f=this.tagsNodeStack.pop(),h=h.substring(0,h.lastIndexOf("."));if(F!==s.tagname)h+=h?"."+F:F;if(this.isItStopNode(this.options.stopNodes,h,F)){let Z="";if(A.length>0&&A.lastIndexOf("/")===A.length-1){if(F[F.length-1]==="/")F=F.substr(0,F.length-1),h=h.substr(0,h.length-1),A=F;else A=A.substr(0,A.length-1);E=I.closeIndex}else if(this.options.unpairedTags.indexOf(F)!==-1)E=I.closeIndex;else{const M=this.readStopNodeData(r,U,S+1);if(!M)throw new Error(`Unexpected end of ${U}`);E=M.i,Z=M.tagContent}const N=new y1(F);if(F!==A&&L)N[":@"]=this.buildAttributesMap(A,h,F);if(Z)Z=this.parseTextData(Z,F,h,!0,L,!0,!0);h=h.substr(0,h.lastIndexOf(".")),N.add(this.options.textNodeName,Z),this.addChild(f,N,h)}else{if(A.length>0&&A.lastIndexOf("/")===A.length-1){if(F[F.length-1]==="/")F=F.substr(0,F.length-1),h=h.substr(0,h.length-1),A=F;else A=A.substr(0,A.length-1);if(this.options.transformTagName)F=this.options.transformTagName(F);const Z=new y1(F);if(F!==A&&L)Z[":@"]=this.buildAttributesMap(A,h,F);this.addChild(f,Z,h),h=h.substr(0,h.lastIndexOf("."))}else{const Z=new y1(F);if(this.tagsNodeStack.push(f),F!==A&&L)Z[":@"]=this.buildAttributesMap(A,h,F);this.addChild(f,Z,h),f=Z}w="",E=S}}else w+=r[E];return s.child},lb=function(r){if(this.options.processEntities){for(let s in this.docTypeEntities){const f=this.docTypeEntities[s];r=r.replace(f.regx,f.val)}for(let s in this.lastEntities){const f=this.lastEntities[s];r=r.replace(f.regex,f.val)}if(this.options.htmlEntities)for(let s in this.htmlEntities){const f=this.htmlEntities[s];r=r.replace(f.regex,f.val)}r=r.replace(this.ampEntity.regex,this.ampEntity.val)}return r};PY.exports=ZY});var BY=O((ib)=>{function qb(r,s){return QY(r,s)}function QY(r,s,f){let w;const h={};for(let E=0;E<r.length;E++){const $=r[E],I=mb($);let F="";if(f===void 0)F=I;else F=f+"."+I;if(I===s.textNodeName)if(w===void 0)w=$[I];else w+=""+$[I];else if(I===void 0)continue;else if($[I]){let U=QY($[I],s,F);const A=vb(U,s);if($[":@"])jb(U,$[":@"],F,s);else if(Object.keys(U).length===1&&U[s.textNodeName]!==void 0&&!s.alwaysCreateTextNode)U=U[s.textNodeName];else if(Object.keys(U).length===0)if(s.alwaysCreateTextNode)U[s.textNodeName]="";else U="";if(h[I]!==void 0&&h.hasOwnProperty(I)){if(!Array.isArray(h[I]))h[I]=[h[I]];h[I].push(U)}else if(s.isArray(I,F,A))h[I]=[U];else h[I]=U}}if(typeof w==="string"){if(w.length>0)h[s.textNodeName]=w}else if(w!==void 0)h[s.textNodeName]=w;return h}function mb(r){const s=Object.keys(r);for(let f=0;f<s.length;f++){const w=s[f];if(w!==":@")return w}}function jb(r,s,f,w){if(s){const h=Object.keys(s),E=h.length;for(let $=0;$<E;$++){const I=h[$];if(w.isArray(I,f+"."+I,!0,!0))r[I]=[s[I]];else r[I]=s[I]}}}function vb(r,s){const{textNodeName:f}=s,w=Object.keys(r).length;if(w===0)return!0;if(w===1&&(r[f]||typeof r[f]==="boolean"||r[f]===0))return!0;return!1}ib.prettify=qb});var HY=O((fwr,VY)=>{var{buildOptions:db}=LY(),cb=JY(),{prettify:bb}=BY(),_b=hU();class MY{constructor(r){this.externalEntities={},this.options=db(r)}parse(r,s){if(typeof r==="string");else if(r.toString)r=r.toString();else throw new Error("XML data is accepted in String or Bytes[] form.");if(s){if(s===!0)s={};const h=_b.validate(r,s);if(h!==!0)throw Error(`${h.err.msg}:${h.err.line}:${h.err.col}`)}const f=new cb(this.options);f.addExternalEntities(this.externalEntities);const w=f.parseXml(r);if(this.options.preserveOrder||w===void 0)return w;else return bb(w,this.options)}addEntity(r,s){if(s.indexOf("&")!==-1)throw new Error("Entity value can't have '&'");else if(r.indexOf("&")!==-1||r.indexOf(";")!==-1)throw new Error("An entity must be set without '&' and ';'. Eg. use '#xD' for '&#xD;'");else if(s==="&")throw new Error("An entity with value '&' is not permitted");else this.externalEntities[r]=s}}VY.exports=MY});var NY=O((swr,yY)=>{function gb(r,s){let f="";if(s.format&&s.indentBy.length>0)f="\n";return DY(r,s,"",f)}function DY(r,s,f,w){let h="",E=!1;for(let $=0;$<r.length;$++){const I=r[$],F=xb(I);if(F===void 0)continue;let U="";if(f.length===0)U=F;else U=`${f}.${F}`;if(F===s.textNodeName){let Z=I[F];if(!eb(U,s))Z=s.tagValueProcessor(F,Z),Z=kY(Z,s);if(E)h+=w;h+=Z,E=!1;continue}else if(F===s.cdataPropName){if(E)h+=w;h+=`<![CDATA[${I[F][0][s.textNodeName]}]]>`,E=!1;continue}else if(F===s.commentPropName){h+=w+`<!--${I[F][0][s.textNodeName]}-->`,E=!0;continue}else if(F[0]==="?"){const Z=lY(I[":@"],s),N=F==="?xml"?"":w;let M=I[F][0][s.textNodeName];M=M.length!==0?" "+M:"",h+=N+`<${F}${M}${Z}?>`,E=!0;continue}let A=w;if(A!=="")A+=s.indentBy;const L=lY(I[":@"],s),S=w+`<${F}${L}`,z=DY(I[F],s,U,A);if(s.unpairedTags.indexOf(F)!==-1)if(s.suppressUnpairedNode)h+=S+">";else h+=S+"/>";else if((!z||z.length===0)&&s.suppressEmptyNode)h+=S+"/>";else if(z&&z.endsWith(">"))h+=S+`>${z}${w}</${F}>`;else{if(h+=S+">",z&&w!==""&&(z.includes("/>")||z.includes("</")))h+=w+s.indentBy+z+w;else h+=z;h+=`</${F}>`}E=!0}return h}function xb(r){const s=Object.keys(r);for(let f=0;f<s.length;f++){const w=s[f];if(!r.hasOwnProperty(w))continue;if(w!==":@")return w}}function lY(r,s){let f="";if(r&&!s.ignoreAttributes)for(let w in r){if(!r.hasOwnProperty(w))continue;let h=s.attributeValueProcessor(w,r[w]);if(h=kY(h,s),h===!0&&s.suppressBooleanAttributes)f+=` ${w.substr(s.attributeNamePrefix.length)}`;else f+=` ${w.substr(s.attributeNamePrefix.length)}="${h}"`}return f}function eb(r,s){r=r.substr(0,r.length-s.textNodeName.length-1);let f=r.substr(r.lastIndexOf(".")+1);for(let w in s.stopNodes)if(s.stopNodes[w]===r||s.stopNodes[w]==="*."+f)return!0;return!1}function kY(r,s){if(r&&r.length>0&&s.processEntities)for(let f=0;f<s.entities.length;f++){const w=s.entities[f];r=r.replace(w.regex,w.val)}return r}yY.exports=gb});var mY=O((wwr,qY)=>{function _0(r){if(this.options=Object.assign({},ob,r),this.options.ignoreAttributes||this.options.attributesGroupName)this.isAttribute=function(){return!1};else this.attrPrefixLen=this.options.attributeNamePrefix.length,this.isAttribute=ub;if(this.processTextOrObjNode=ab,this.options.format)this.indentate=pb,this.tagEndChar=">\n",this.newLine="\n";else this.indentate=function(){return""},this.tagEndChar=">",this.newLine=""}function ab(r,s,f){const w=this.j2x(r,f+1);if(r[this.options.textNodeName]!==void 0&&Object.keys(r).length===1)return this.buildTextValNode(r[this.options.textNodeName],s,w.attrStr,f);else return this.buildObjectNode(w.val,s,w.attrStr,f)}function pb(r){return this.options.indentBy.repeat(r)}function ub(r){if(r.startsWith(this.options.attributeNamePrefix)&&r!==this.options.textNodeName)return r.substr(this.attrPrefixLen);else return!1}var nb=NY(),ob={attributeNamePrefix:"@_",attributesGroupName:!1,textNodeName:"#text",ignoreAttributes:!0,cdataPropName:!1,format:!1,indentBy:" ",suppressEmptyNode:!1,suppressUnpairedNode:!0,suppressBooleanAttributes:!0,tagValueProcessor:function(r,s){return s},attributeValueProcessor:function(r,s){return s},preserveOrder:!1,commentPropName:!1,unpairedTags:[],entities:[{regex:new RegExp("&","g"),val:"&amp;"},{regex:new RegExp(">","g"),val:"&gt;"},{regex:new RegExp("<","g"),val:"&lt;"},{regex:new RegExp("\'","g"),val:"&apos;"},{regex:new RegExp("\"","g"),val:"&quot;"}],processEntities:!0,stopNodes:[],oneListGroup:!1};_0.prototype.build=function(r){if(this.options.preserveOrder)return nb(r,this.options);else{if(Array.isArray(r)&&this.options.arrayNodeName&&this.options.arrayNodeName.length>1)r={[this.options.arrayNodeName]:r};return this.j2x(r,0).val}};_0.prototype.j2x=function(r,s){let f="",w="";for(let h in r){if(!Object.prototype.hasOwnProperty.call(r,h))continue;if(typeof r[h]==="undefined"){if(this.isAttribute(h))w+=""}else if(r[h]===null)if(this.isAttribute(h))w+="";else if(h[0]==="?")w+=this.indentate(s)+"<"+h+"?"+this.tagEndChar;else w+=this.indentate(s)+"<"+h+"/"+this.tagEndChar;else if(r[h]instanceof Date)w+=this.buildTextValNode(r[h],h,"",s);else if(typeof r[h]!=="object"){const E=this.isAttribute(h);if(E)f+=this.buildAttrPairStr(E,""+r[h]);else if(h===this.options.textNodeName){let $=this.options.tagValueProcessor(h,""+r[h]);w+=this.replaceEntitiesValue($)}else w+=this.buildTextValNode(r[h],h,"",s)}else if(Array.isArray(r[h])){const E=r[h].length;let $="",I="";for(let F=0;F<E;F++){const U=r[h][F];if(typeof U==="undefined");else if(U===null)if(h[0]==="?")w+=this.indentate(s)+"<"+h+"?"+this.tagEndChar;else w+=this.indentate(s)+"<"+h+"/"+this.tagEndChar;else if(typeof U==="object")if(this.options.oneListGroup){const A=this.j2x(U,s+1);if($+=A.val,this.options.attributesGroupName&&U.hasOwnProperty(this.options.attributesGroupName))I+=A.attrStr}else $+=this.processTextOrObjNode(U,h,s);else if(this.options.oneListGroup){let A=this.options.tagValueProcessor(h,U);A=this.replaceEntitiesValue(A),$+=A}else $+=this.buildTextValNode(U,h,"",s)}if(this.options.oneListGroup)$=this.buildObjectNode($,h,I,s);w+=$}else if(this.options.attributesGroupName&&h===this.options.attributesGroupName){const E=Object.keys(r[h]),$=E.length;for(let I=0;I<$;I++)f+=this.buildAttrPairStr(E[I],""+r[h][E[I]])}else w+=this.processTextOrObjNode(r[h],h,s)}return{attrStr:f,val:w}};_0.prototype.buildAttrPairStr=function(r,s){if(s=this.options.attributeValueProcessor(r,""+s),s=this.replaceEntitiesValue(s),this.options.suppressBooleanAttributes&&s==="true")return" "+r;else return" "+r+'="'+s+'"'};_0.prototype.buildObjectNode=function(r,s,f,w){if(r==="")if(s[0]==="?")return this.indentate(w)+"<"+s+f+"?"+this.tagEndChar;else return this.indentate(w)+"<"+s+f+this.closeTag(s)+this.tagEndChar;else{let h="</"+s+this.tagEndChar,E="";if(s[0]==="?")E="?",h="";if((f||f==="")&&r.indexOf("<")===-1)return this.indentate(w)+"<"+s+f+E+">"+r+h;else if(this.options.commentPropName!==!1&&s===this.options.commentPropName&&E.length===0)return this.indentate(w)+`<!--${r}-->`+this.newLine;else return this.indentate(w)+"<"+s+f+E+this.tagEndChar+r+this.indentate(w)+h}};_0.prototype.closeTag=function(r){let s="";if(this.options.unpairedTags.indexOf(r)!==-1){if(!this.options.suppressUnpairedNode)s="/"}else if(this.options.suppressEmptyNode)s="/";else s=`></${r}`;return s};_0.prototype.buildTextValNode=function(r,s,f,w){if(this.options.cdataPropName!==!1&&s===this.options.cdataPropName)return this.indentate(w)+`<![CDATA[${r}]]>`+this.newLine;else if(this.options.commentPropName!==!1&&s===this.options.commentPropName)return this.indentate(w)+`<!--${r}-->`+this.newLine;else if(s[0]==="?")return this.indentate(w)+"<"+s+f+"?"+this.tagEndChar;else{let h=this.options.tagValueProcessor(s,r);if(h=this.replaceEntitiesValue(h),h==="")return this.indentate(w)+"<"+s+f+this.closeTag(s)+this.tagEndChar;else return this.indentate(w)+"<"+s+f+">"+h+"</"+s+this.tagEndChar}};_0.prototype.replaceEntitiesValue=function(r){if(r&&r.length>0&&this.options.processEntities)for(let s=0;s<this.options.entities.length;s++){const f=this.options.entities[s];r=r.replace(f.regex,f.val)}return r};qY.exports=_0});var vY=O((hwr,jY)=>{var tb=hU(),r_=HY(),f_=mY();jY.exports={XMLParser:r_,XMLValidator:tb,XMLBuilder:f_}});var _Y=O((Ewr,bY)=>{var{defineProperty:C3,getOwnPropertyDescriptor:s_,getOwnPropertyNames:w_}=Object,h_=Object.prototype.hasOwnProperty,Wf=(r,s)=>C3(r,"name",{value:s,configurable:!0}),E_=(r,s)=>{for(var f in s)C3(r,f,{get:s[f],enumerable:!0})},$_=(r,s,f,w)=>{if(s&&typeof s==="object"||typeof s==="function"){for(let h of w_(s))if(!h_.call(r,h)&&h!==f)C3(r,h,{get:()=>s[h],enumerable:!(w=s_(s,h))||w.enumerable})}return r},I_=(r)=>$_(C3({},"__esModule",{value:!0}),r),iY={};E_(iY,{_toBool:()=>U_,_toNum:()=>T_,_toStr:()=>F_,awsExpectUnion:()=>A_,loadRestJsonErrorCode:()=>C_,loadRestXmlErrorCode:()=>Y_,parseJsonBody:()=>dY,parseJsonErrorBody:()=>R_,parseXmlBody:()=>cY,parseXmlErrorBody:()=>S_});bY.exports=I_(iY);var F_=Wf((r)=>{if(r==null)return r;if(typeof r==="number"||typeof r==="bigint"){const s=new Error(`Received number ${r} where a string was expected.`);return s.name="Warning",console.warn(s),String(r)}if(typeof r==="boolean"){const s=new Error(`Received boolean ${r} where a string was expected.`);return s.name="Warning",console.warn(s),String(r)}return r},"_toStr"),U_=Wf((r)=>{if(r==null)return r;if(typeof r==="string"){const s=r.toLowerCase();if(r!==""&&s!=="false"&&s!=="true"){const f=new Error(`Received string "${r}" where a boolean was expected.`);f.name="Warning",console.warn(f)}return r!==""&&s!=="false"}return r},"_toBool"),T_=Wf((r)=>{if(r==null)return r;if(typeof r==="string"){const s=Number(r);if(s.toString()!==r){const f=new Error(`Received string "${r}" where a number was expected.`);return f.name="Warning",console.warn(f),r}return s}return r},"_toNum"),G_=$h(),A_=Wf((r)=>{if(r==null)return;if(typeof r==="object"&&"__type"in r)delete r.__type;return G_.expectUnion(r)},"awsExpectUnion"),L_=$h(),OY=Wf((r,s)=>L_.collectBody(r,s).then((f)=>s.utf8Encoder(f)),"collectBodyString"),dY=Wf((r,s)=>OY(r,s).then((f)=>{if(f.length)try{return JSON.parse(f)}catch(w){if((w==null?void 0:w.name)==="SyntaxError")Object.defineProperty(w,"$responseBodyText",{value:f});throw w}return{}}),"parseJsonBody"),R_=Wf(async(r,s)=>{const f=await dY(r,s);return f.message=f.message??f.Message,f},"parseJsonErrorBody"),C_=Wf((r,s)=>{const f=Wf((E,$)=>Object.keys(E).find((I)=>I.toLowerCase()===$.toLowerCase()),"findKey"),w=Wf((E)=>{let $=E;if(typeof $==="number")$=$.toString();if($.indexOf(",")>=0)$=$.split(",")[0];if($.indexOf(":")>=0)$=$.split(":")[0];if($.indexOf("#")>=0)$=$.split("#")[1];return $},"sanitizeErrorCode"),h=f(r.headers,"x-amzn-errortype");if(h!==void 0)return w(r.headers[h]);if(s.code!==void 0)return w(s.code);if(s.__type!==void 0)return w(s.__type)},"loadRestJsonErrorCode"),W_=$h(),z_=vY(),cY=Wf((r,s)=>OY(r,s).then((f)=>{if(f.length){const w=new z_.XMLParser({attributeNamePrefix:"",htmlEntities:!0,ignoreAttributes:!1,ignoreDeclaration:!0,parseTagValue:!1,trimValues:!1,tagValueProcessor:(F,U)=>U.trim()===""&&U.includes("\n")?"":void 0});w.addEntity("#xD","\r"),w.addEntity("#10","\n");let h;try{h=w.parse(f,!0)}catch(F){if(F&&typeof F==="object")Object.defineProperty(F,"$responseBodyText",{value:f});throw F}const E="#text",$=Object.keys(h)[0],I=h[$];if(I[E])I[$]=I[E],delete I[E];return W_.getValueFromTextNode(I)}return{}}),"parseXmlBody"),S_=Wf(async(r,s)=>{const f=await cY(r,s);if(f.Error)f.Error.message=f.Error.message??f.Error.Message;return f},"parseXmlErrorBody"),Y_=Wf((r,s)=>{var f;if(((f=s==null?void 0:s.Error)==null?void 0:f.Code)!==void 0)return s.Error.Code;if((s==null?void 0:s.Code)!==void 0)return s.Code;if(r.statusCode==404)return"NotFound"},"loadRestXmlErrorCode")});var Qr=O((N1)=>{Object.defineProperty(N1,"__esModule",{value:!0});var IU=J7();IU.__exportStar(tr(),N1);IU.__exportStar(EY(),N1);IU.__exportStar(_Y(),N1)});async function gY(r,s,f){const w=f.request;if(typeof s.accountIdEndpointMode==="function")switch(await s.accountIdEndpointMode?.()){case"disabled":Gh.setFeature(r,"ACCOUNT_ID_MODE_DISABLED","Q");break;case"preferred":Gh.setFeature(r,"ACCOUNT_ID_MODE_PREFERRED","P");break;case"required":Gh.setFeature(r,"ACCOUNT_ID_MODE_REQUIRED","R");break}const h=r.__smithy_context?.selectedHttpAuthScheme?.identity;if(h?.$source){const E=h;if(E.accountId)Gh.setFeature(r,"RESOLVED_ACCOUNT_ID","T");for(let[$,I]of Object.entries(E.$source??{}))Gh.setFeature(r,$,I)}}var Gh;var xY=G(()=>{Gh=m(Qr(),1)});var FU="user-agent",W3="x-amz-user-agent",UU=" ",z3="/",eY,nY,TU="-";var oY=G(()=>{eY=/[^\!\$\%\&\'\*\+\-\.\^\_\`\|\~\d\w]/g,nY=/[^\!\$\%\&\'\*\+\-\.\^\_\`\|\~\d\w\#]/g});function aY(r){let s="";for(let f in r){const w=r[f];if(s.length+w.length+1<=1024){if(s.length)s+=","+w;else s+=w;continue}break}return s}var X_=(r)=>(s,f)=>async(w)=>{const{request:h}=w;if(!Mr.isInstance(h))return s(w);const{headers:E}=h,$=f?.userAgent?.map(S3)||[],I=(await r.defaultUserAgentProvider()).map(S3);await gY(f,r,w);const F=f;I.push(`m/${aY(Object.assign({},f.__smithy_context?.features,F.__aws_sdk_context?.features))}`);const U=r?.customUserAgent?.map(S3)||[],A=await r.userAgentAppId();if(A)I.push(S3([`app/${A}`]));const L=dS(),S=(L?[L]:[]).concat([...I,...$,...U]).join(UU),z=[...I.filter((Z)=>Z.startsWith("aws-sdk-")),...U].join(UU);if(r.runtime!=="browser"){if(z)E[W3]=E[W3]?`${E[FU]} ${z}`:z;E[FU]=S}else E[W3]=S;return s({...w,request:h})},S3=(r)=>{const s=r[0].split(z3).map(($)=>$.replace(eY,TU)).join(z3),f=r[1]?.replace(nY,TU),w=s.indexOf(z3),h=s.substring(0,w);let E=s.substring(w+1);if(h==="api")E=E.toLowerCase();return[h,E,f].filter(($)=>$&&$.length>0).reduce(($,I,F)=>{switch(F){case 0:return I;case 1:return`${$}/${I}`;default:return`${$}#${I}`}},"")},K_,Vs=(r)=>({applyToStack:(s)=>{s.add(X_(r),K_)}});var pY=G(()=>{Pw();kr();xY();oY();K_={name:"getUserAgentMiddleware",step:"build",priority:"low",tags:["SET_USER_AGENT","USER_AGENT"],override:!0}});var Bw=G(()=>{tz();pY()});var Ah=(r,s,f)=>{if(!(s in r))return;if(r[s]==="true")return!0;if(r[s]==="false")return!1;throw new Error(`Cannot load ${f} "${s}". Expected "true" or "false", got ${r[s]}.`)};var g0;var uY=G(()=>{(function(r){r.ENV="env",r.CONFIG="shared config entry"})(g0||(g0={}))});var GU=G(()=>{uY()});var Z_="AWS_USE_DUALSTACK_ENDPOINT",P_="use_dualstack_endpoint",Hs;var tY=G(()=>{GU();Hs={environmentVariableSelector:(r)=>Ah(r,Z_,g0.ENV),configFileSelector:(r)=>Ah(r,P_,g0.CONFIG),default:!1}});var J_="AWS_USE_FIPS_ENDPOINT",Q_="use_fips_endpoint",ls;var rX=G(()=>{GU();ls={environmentVariableSelector:(r)=>Ah(r,J_,g0.ENV),configFileSelector:(r)=>Ah(r,Q_,g0.CONFIG),default:!1}});var AU,Vf=(r)=>r[AU.SMITHY_CONTEXT_KEY]||(r[AU.SMITHY_CONTEXT_KEY]={});var fX=G(()=>{AU=m(Ff(),1)});var yr=(r)=>{if(typeof r==="function")return r;const s=Promise.resolve(r);return()=>s};var Es=G(()=>{fX()});var sX=G(()=>{Es()});var wX=G(()=>{Es()});var hX=G(()=>{tY();rX();sX();wX()});var Hf,Ds;var EX=G(()=>{Hf={environmentVariableSelector:(r)=>r.AWS_REGION,configFileSelector:(r)=>r.region,default:()=>{throw new Error("Region is missing")}},Ds={preferredFile:"credentials"}});var Y3=(r)=>typeof r==="string"&&(r.startsWith("fips-")||r.endsWith("-fips"));var LU=(r)=>Y3(r)?["fips-aws-global","aws-fips"].includes(r)?"us-east-1":r.replace(/fips-(dkr-|prod-)?|-fips/,""):r;var $X=()=>{};var ks=(r)=>{const{region:s,useFipsEndpoint:f}=r;if(!s)throw new Error("Region is missing");return{...r,region:async()=>{if(typeof s==="string")return LU(s);const w=await s();return LU(w)},useFipsEndpoint:async()=>{const w=typeof s==="string"?s:await s();if(Y3(w))return!0;return typeof f!=="function"?Promise.resolve(!!f):f()}}};var IX=G(()=>{$X()});var FX=G(()=>{EX();IX()});var UX=()=>{};var TX=()=>{};var GX=()=>{};var AX=G(()=>{UX();TX();GX()});var lf=G(()=>{hX();FX();AX()});function B_(r){return(s)=>async(f)=>{const w=f.request;if(Mr.isInstance(w)){const{body:h,headers:E}=w;if(h&&Object.keys(E).map(($)=>$.toLowerCase()).indexOf(LX)===-1)try{const $=r(h);w.headers={...w.headers,[LX]:String($)}}catch($){}}return s({...f,request:w})}}var LX="content-length",M_,ys=(r)=>({applyToStack:(s)=>{s.add(B_(r.bodyLengthChecker),M_)}});var Lh=G(()=>{kr();M_={step:"build",tags:["SET_CONTENT_LENGTH","CONTENT_LENGTH"],name:"contentLengthMiddleware",override:!0}});var RX=async(r)=>{const s=r?.Bucket||"";if(typeof r.Bucket==="string")r.Bucket=s.replace(/#/g,encodeURIComponent("#")).replace(/\?/g,encodeURIComponent("?"));if(k_(s)){if(r.ForcePathStyle===!0)throw new Error("Path-style addressing cannot be used with ARN buckets")}else if(!D_(s)||s.indexOf(".")!==-1&&!String(r.Endpoint).startsWith("http:")||s.toLowerCase()!==s||s.length<3)r.ForcePathStyle=!0;if(r.DisableMultiRegionAccessPoints)r.disableMultiRegionAccessPoints=!0,r.DisableMRAP=!0;return r},V_,H_,l_,D_=(r)=>V_.test(r)&&!H_.test(r)&&!l_.test(r),k_=(r)=>{const[s,f,w,,,h]=r.split(":"),E=s==="arn"&&r.split(":").length>=6,$=Boolean(E&&f&&w&&h);if(E&&!$)throw new Error(`Invalid ARN: ${r} was an invalid ARN.`);return $};var CX=G(()=>{V_=/^[a-z0-9][a-z0-9\.\-]{1,61}[a-z0-9]$/,H_=/(\d+\.){3}\d+/,l_=/\.\./});var WX=G(()=>{CX()});var zX=(r,s,f)=>{const w=async()=>{const h=f[r]??f[s];if(typeof h==="function")return h();return h};if(r==="credentialScope"||s==="CredentialScope")return async()=>{const h=typeof f.credentials==="function"?await f.credentials():f.credentials;return h?.credentialScope??h?.CredentialScope};if(r==="accountId"||s==="AccountId")return async()=>{const h=typeof f.credentials==="function"?await f.credentials():f.credentials;return h?.accountId??h?.AccountId};if(r==="endpoint"||s==="endpoint")return async()=>{const h=await w();if(h&&typeof h==="object"){if("url"in h)return h.url.href;if("hostname"in h){const{protocol:E,hostname:$,port:I,path:F}=h;return`${E}//${$}${I?":"+I:""}${F}`}}return h};return w};function X3(r){try{const s=new Set(Array.from(r.match(/([A-Z_]){3,}/g)??[]));return s.delete("CONFIG"),s.delete("CONFIG_PREFIX_SEPARATOR"),s.delete("ENV"),[...s].join(", ")}catch(s){return r}}var SX,YX=(r,s)=>async()=>{try{const f=r(process.env);if(f===void 0)throw new Error;return f}catch(f){throw new SX.CredentialsProviderError(f.message||`Not found in ENV: ${X3(r.toString())}`,{logger:s})}};var XX=G(()=>{SX=m(Ar(),1)});import{homedir as y_}from"os";import{sep as N_}from"path";var RU,q_=()=>{if(process&&process.geteuid)return`${process.geteuid()}`;return"DEFAULT"},x0=()=>{const{HOME:r,USERPROFILE:s,HOMEPATH:f,HOMEDRIVE:w=`C:${N_}`}=process.env;if(r)return r;if(s)return s;if(f)return`${w}${f}`;const h=q_();if(!RU[h])RU[h]=y_();return RU[h]};var Rh=G(()=>{RU={}});var KX="AWS_PROFILE",Df=(r)=>r.profile||process.env.AWS_PROFILE||"default";import{createHash as m_}from"crypto";import{join as j_}from"path";var K3=(r)=>{const f=m_("sha1").update(r).digest("hex");return j_(x0(),".aws","sso","cache",`${f}.json`)};var CU=G(()=>{Rh()});import{promises as v_}from"fs";var i_,Z3=async(r)=>{const s=K3(r),f=await i_(s,"utf8");return JSON.parse(f)};var ZX=G(()=>{CU();({readFile:i_}=v_)});var WU,PX=(r)=>Object.entries(r).filter(([s])=>{const f=s.indexOf(kf);if(f===-1)return!1;return Object.values(WU.IniSectionType).includes(s.substring(0,f))}).reduce((s,[f,w])=>{const h=f.indexOf(kf),E=f.substring(0,h)===WU.IniSectionType.PROFILE?f.substring(h+1):f;return s[E]=w,s},{...r.default&&{default:r.default}});var JX=G(()=>{WU=m(Ff(),1);Ch()});import{join as O_}from"path";var d_="AWS_CONFIG_FILE",P3=()=>process.env[d_]||O_(x0(),".aws","config");var zU=G(()=>{Rh()});import{join as c_}from"path";var b_="AWS_SHARED_CREDENTIALS_FILE",QX=()=>process.env[b_]||c_(x0(),".aws","credentials");var BX=G(()=>{Rh()});var MX,__,g_,q1=(r)=>{const s={};let f,w;for(let h of r.split(/\r?\n/)){const E=h.split(/(^|\s)[;#]/)[0].trim();if(E[0]==="["&&E[E.length-1]==="]"){f=void 0,w=void 0;const I=E.substring(1,E.length-1),F=__.exec(I);if(F){const[,U,,A]=F;if(Object.values(MX.IniSectionType).includes(U))f=[U,A].join(kf)}else f=I;if(g_.includes(I))throw new Error(`Found invalid profile name "${I}"`)}else if(f){const I=E.indexOf("=");if(![0,-1].includes(I)){const[F,U]=[E.substring(0,I).trim(),E.substring(I+1).trim()];if(U==="")w=F;else{if(w&&h.trimStart()===h)w=void 0;s[f]=s[f]||{};const A=w?[w,F].join(kf):F;s[f][A]=U}}}}return s};var SU=G(()=>{MX=m(Ff(),1);Ch();__=/^([\w-]+)\s(["'])?([\w-@\+\.%:/]+)\2$/,g_=["__proto__","profile __proto__"]});import{promises as x_}from"fs";var e_,YU,m1=(r,s)=>{if(!YU[r]||s?.ignoreCache)YU[r]=e_(r,"utf8");return YU[r]};var XU=G(()=>{({readFile:e_}=x_),YU={}});import{join as VX}from"path";var HX=()=>({}),kf=".",J3=async(r={})=>{const{filepath:s=QX(),configFilepath:f=P3()}=r,w=x0();let E=s;if(s.startsWith("~/"))E=VX(w,s.slice(2));let $=f;if(f.startsWith("~/"))$=VX(w,f.slice(2));const I=await Promise.all([m1($,{ignoreCache:r.ignoreCache}).then(q1).then(PX).catch(HX),m1(E,{ignoreCache:r.ignoreCache}).then(q1).catch(HX)]);return{configFile:I[0],credentialsFile:I[1]}};var Ch=G(()=>{JX();zU();BX();Rh();SU();XU()});var lX,DX=(r)=>Object.entries(r).filter(([s])=>s.startsWith(lX.IniSectionType.SSO_SESSION+kf)).reduce((s,[f,w])=>({...s,[f.substring(f.indexOf(kf)+1)]:w}),{});var kX=G(()=>{lX=m(Ff(),1);Ch()});var n_=()=>({}),Q3=async(r={})=>m1(r.configFilepath??P3()).then(q1).then(DX).catch(n_);var yX=G(()=>{zU();kX();SU();XU()});var NX=(...r)=>{const s={};for(let f of r)for(let[w,h]of Object.entries(f))if(s[w]!==void 0)Object.assign(s[w],h);else s[w]=h;return s};var e0=async(r)=>{const s=await J3(r);return NX(s.configFile,s.credentialsFile)};var qX=G(()=>{Ch()});var mX=()=>{};var $s=G(()=>{Rh();CU();ZX();Ch();yX();qX();mX()});var jX,vX=(r,{preferredFile:s="config",...f}={})=>async()=>{const w=Df(f),{configFile:h,credentialsFile:E}=await J3(f),$=E[w]||{},I=h[w]||{},F=s==="config"?{...$,...I}:{...I,...$};try{const A=r(F,s==="config"?h:E);if(A===void 0)throw new Error;return A}catch(U){throw new jX.CredentialsProviderError(U.message||`Not found in config files w/ profile [${w}]: ${X3(r.toString())}`,{logger:f.logger})}};var iX=G(()=>{jX=m(Ar(),1);$s()});var OX,o_=(r)=>typeof r==="function",dX=(r)=>o_(r)?async()=>await r():OX.fromStatic(r);var cX=G(()=>{OX=m(Ar(),1)});var B3,u=({environmentVariableSelector:r,configFileSelector:s,default:f},w={})=>B3.memoize(B3.chain(YX(r),vX(s,w),dX(f)));var bX=G(()=>{B3=m(Ar(),1);XX();iX();cX()});var Ns=G(()=>{bX()});var _X="AWS_ENDPOINT_URL",gX="endpoint_url",xX=(r)=>({environmentVariableSelector:(s)=>{const f=r.split(" ").map((E)=>E.toUpperCase()),w=s[[_X,...f].join("_")];if(w)return w;const h=s[_X];if(h)return h;return},configFileSelector:(s,f)=>{if(f&&s.services){const h=f[["services",s.services].join(kf)];if(h){const E=r.split(" ").map((I)=>I.toLowerCase()),$=h[[E.join("_"),gX].join(kf)];if($)return $}}const w=s[gX];if(w)return w;return},default:void 0});var eX=G(()=>{$s()});var M3=async(r)=>u(xX(r??""))();var KU=G(()=>{Ns();eX()});function nX(r){const s={};if(r=r.replace(/^\?/,""),r)for(let f of r.split("&")){let[w,h=null]=f.split("=");if(w=decodeURIComponent(w),h)h=decodeURIComponent(h);if(!(w in s))s[w]=h;else if(Array.isArray(s[w]))s[w].push(h);else s[w]=[s[w],h]}return s}var br=(r)=>{if(typeof r==="string")return br(new URL(r));const{hostname:s,pathname:f,port:w,protocol:h,search:E}=r;let $;if(E)$=nX(E);return{hostname:s,port:w?parseInt(w):void 0,protocol:h,path:f,query:$}};var n0=()=>{};var V3=(r)=>{if(typeof r==="object"){if("url"in r)return br(r.url);return r}return br(r)};var H3=G(()=>{n0()});var oX=async(r,s,f,w)=>{if(!f.endpoint){let $;if(f.serviceConfiguredEndpoint)$=await f.serviceConfiguredEndpoint();else $=await M3(f.serviceId);if($)f.endpoint=()=>Promise.resolve(V3($))}const h=await a_(r,s,f);if(typeof f.endpointProvider!=="function")throw new Error("config.endpointProvider is not set.");return f.endpointProvider(h,w)},a_=async(r,s,f)=>{const w={},h=s?.getEndpointParameterInstructions?.()||{};for(let[E,$]of Object.entries(h))switch($.type){case"staticContextParams":w[E]=$.value;break;case"contextParams":w[E]=r[$.name];break;case"clientContextParams":case"builtInParams":w[E]=await zX($.name,E,f)();break;default:throw new Error("Unrecognized endpoint parameter instruction: "+JSON.stringify($))}if(Object.keys(h).length===0)Object.assign(w,f);if(String(f.serviceId).toLowerCase()==="s3")await RX(w);return w};var ZU=G(()=>{WX();KU();H3()});var aX=G(()=>{ZU();H3()});var pX=({config:r,instructions:s})=>{return(f,w)=>async(h)=>{const E=await oX(h.input,{getEndpointParameterInstructions(){return s}},{...r},w);w.endpointV2=E,w.authSchemes=E.properties?.authSchemes;const $=w.authSchemes?.[0];if($){w.signing_region=$.signingRegion,w.signing_service=$.signingName;const F=Vf(w)?.selectedHttpAuthScheme?.httpAuthOption;if(F)F.signingProperties=Object.assign(F.signingProperties||{},{signing_region:$.signingRegion,signingRegion:$.signingRegion,signing_service:$.signingName,signingName:$.signingName,signingRegionSet:$.signingRegionSet},$.properties)}return f({...h})}};var PU=G(()=>{Es();ZU()});var uX=(r,s)=>(f)=>async(w)=>{const{response:h}=await f(w);try{const E=await s(h,r);return{response:h,output:E}}catch(E){if(Object.defineProperty(E,"$response",{value:h}),!("$metadata"in E)){if(E.message+="\n Deserialization error: to see the raw response, inspect the hidden field {error}.$response on this object.",typeof E.$responseBodyText!=="undefined"){if(E.$response)E.$response.body=E.$responseBodyText}}throw E}};var tX=(r,s)=>(f,w)=>async(h)=>{const E=w.endpointV2?.url&&r.urlParser?async()=>r.urlParser(w.endpointV2.url):r.endpoint;if(!E)throw new Error("No valid endpoint provider available.");const $=await s(h.input,{...r,endpoint:E});return f({...h,request:$})};function C(r,s,f){return{applyToStack:(w)=>{w.add(uX(r,f),p_),w.add(tX(r,s),JU)}}}var p_,JU;var rK=G(()=>{p_={name:"deserializerMiddleware",step:"deserialize",tags:["DESERIALIZER"],override:!0},JU={name:"serializerMiddleware",step:"serialize",tags:["SERIALIZER"],override:!0}});var V=G(()=>{rK()});var u_,W=(r,s)=>({applyToStack:(f)=>{f.addRelativeTo(pX({config:r,instructions:s}),u_)}});var fK=G(()=>{V();PU();u_={step:"serialize",tags:["ENDPOINT_PARAMETERS","ENDPOINT_V2","ENDPOINT"],name:"endpointV2Middleware",override:!0,relation:"before",toMiddleware:JU.name}});var qs=(r)=>{const s=r.tls??!0,{endpoint:f}=r,w=f!=null?async()=>V3(await yr(f)()):void 0,E={...r,endpoint:w,tls:s,isCustomEndpoint:!!f,useDualstackEndpoint:yr(r.useDualstackEndpoint??!1),useFipsEndpoint:yr(r.useFipsEndpoint??!1)};let $=void 0;return E.serviceConfiguredEndpoint=async()=>{if(r.serviceId&&!$)$=M3(r.serviceId);return $},E};var sK=G(()=>{Es();KU();H3()});var wK=()=>{};var B=G(()=>{aX();PU();fK();sK();wK()});var yf,Mw=3,Nf;var l3=G(()=>{(function(r){r.STANDARD="standard",r.ADAPTIVE="adaptive"})(yf||(yf={}));Nf=yf.STANDARD});var hK,EK,$K,IK;var FK=G(()=>{hK=["BandwidthLimitExceeded","EC2ThrottledException","LimitExceededException","PriorRequestNotComplete","ProvisionedThroughputExceededException","RequestLimitExceeded","RequestThrottled","RequestThrottledException","SlowDown","ThrottledException","Throttling","ThrottlingException","TooManyRequestsException","TransactionInProgressException"],EK=["TimeoutError","RequestTimeout","RequestTimeoutException"],$K=[500,502,503,504],IK=["ECONNRESET","ECONNREFUSED","EPIPE","ETIMEDOUT"]});var t_=(r)=>r.$metadata?.clockSkewCorrected,Wh=(r)=>r.$metadata?.httpStatusCode===429||hK.includes(r.name)||r.$retryable?.throttling==!0,D3=(r)=>t_(r)||EK.includes(r.name)||IK.includes(r?.code||"")||$K.includes(r.$metadata?.httpStatusCode||0),UK=(r)=>{if(r.$metadata?.httpStatusCode!==void 0){const s=r.$metadata.httpStatusCode;if(500<=s&&s<=599&&!D3(r))return!0;return!1}return!1};var j1=G(()=>{FK()});class k3{constructor(r){this.currentCapacity=0,this.enabled=!1,this.lastMaxRate=0,this.measuredTxRate=0,this.requestCount=0,this.lastTimestamp=0,this.timeWindow=0,this.beta=r?.beta??0.7,this.minCapacity=r?.minCapacity??1,this.minFillRate=r?.minFillRate??0.5,this.scaleConstant=r?.scaleConstant??0.4,this.smooth=r?.smooth??0.8;const s=this.getCurrentTimeInSeconds();this.lastThrottleTime=s,this.lastTxRateBucket=Math.floor(this.getCurrentTimeInSeconds()),this.fillRate=this.minFillRate,this.maxCapacity=this.minCapacity}getCurrentTimeInSeconds(){return Date.now()/1000}async getSendToken(){return this.acquireTokenBucket(1)}async acquireTokenBucket(r){if(!this.enabled)return;if(this.refillTokenBucket(),r>this.currentCapacity){const s=(r-this.currentCapacity)/this.fillRate*1000;await new Promise((f)=>setTimeout(f,s))}this.currentCapacity=this.currentCapacity-r}refillTokenBucket(){const r=this.getCurrentTimeInSeconds();if(!this.lastTimestamp){this.lastTimestamp=r;return}const s=(r-this.lastTimestamp)*this.fillRate;this.currentCapacity=Math.min(this.maxCapacity,this.currentCapacity+s),this.lastTimestamp=r}updateClientSendingRate(r){let s;if(this.updateMeasuredRate(),Wh(r)){const w=!this.enabled?this.measuredTxRate:Math.min(this.measuredTxRate,this.fillRate);this.lastMaxRate=w,this.calculateTimeWindow(),this.lastThrottleTime=this.getCurrentTimeInSeconds(),s=this.cubicThrottle(w),this.enableTokenBucket()}else this.calculateTimeWindow(),s=this.cubicSuccess(this.getCurrentTimeInSeconds());const f=Math.min(s,2*this.measuredTxRate);this.updateTokenBucketRate(f)}calculateTimeWindow(){this.timeWindow=this.getPrecise(Math.pow(this.lastMaxRate*(1-this.beta)/this.scaleConstant,0.3333333333333333))}cubicThrottle(r){return this.getPrecise(r*this.beta)}cubicSuccess(r){return this.getPrecise(this.scaleConstant*Math.pow(r-this.lastThrottleTime-this.timeWindow,3)+this.lastMaxRate)}enableTokenBucket(){this.enabled=!0}updateTokenBucketRate(r){this.refillTokenBucket(),this.fillRate=Math.max(r,this.minFillRate),this.maxCapacity=Math.max(r,this.minCapacity),this.currentCapacity=Math.min(this.currentCapacity,this.maxCapacity)}updateMeasuredRate(){const r=this.getCurrentTimeInSeconds(),s=Math.floor(r*2)/2;if(this.requestCount++,s>this.lastTxRateBucket){const f=this.requestCount/(s-this.lastTxRateBucket);this.measuredTxRate=this.getPrecise(f*this.smooth+this.measuredTxRate*(1-this.smooth)),this.requestCount=0,this.lastTxRateBucket=s}}getPrecise(r){return parseFloat(r.toFixed(8))}}var QU=G(()=>{j1()});var Vw=100,v1=20000,BU=500,y3=500,MU=5,VU=10,HU=1,N3="amz-sdk-invocation-id",q3="amz-sdk-request";var TK=()=>{let r=Vw;return{computeNextBackoffDelay:(w)=>{return Math.floor(Math.min(v1,Math.random()*2**w*r))},setDelayBase:(w)=>{r=w}}};var GK=()=>{};var lU=({retryDelay:r,retryCount:s,retryCost:f})=>{return{getRetryCount:()=>s,getRetryDelay:()=>Math.min(v1,r),getRetryCost:()=>f}};var AK=()=>{};class zh{constructor(r){this.maxAttempts=r,this.mode=yf.STANDARD,this.capacity=y3,this.retryBackoffStrategy=TK(),this.maxAttemptsProvider=typeof r==="function"?r:async()=>r}async acquireInitialRetryToken(r){return lU({retryDelay:Vw,retryCount:0})}async refreshRetryTokenForRetry(r,s){const f=await this.getMaxAttempts();if(this.shouldRetry(r,s,f)){const w=s.errorType;this.retryBackoffStrategy.setDelayBase(w==="THROTTLING"?BU:Vw);const h=this.retryBackoffStrategy.computeNextBackoffDelay(r.getRetryCount()),E=s.retryAfterHint?Math.max(s.retryAfterHint.getTime()-Date.now()||0,h):h,$=this.getCapacityCost(w);return this.capacity-=$,lU({retryDelay:E,retryCount:r.getRetryCount()+1,retryCost:$})}throw new Error("No retry token available")}recordSuccess(r){this.capacity=Math.max(y3,this.capacity+(r.getRetryCost()??HU))}getCapacity(){return this.capacity}async getMaxAttempts(){try{return await this.maxAttemptsProvider()}catch(r){return console.warn(`Max attempts provider could not resolve. Using default of ${Mw}`),Mw}}shouldRetry(r,s,f){return r.getRetryCount()+1<f&&this.capacity>=this.getCapacityCost(s.errorType)&&this.isRetryableError(s.errorType)}getCapacityCost(r){return r==="TRANSIENT"?VU:MU}isRetryableError(r){return r==="THROTTLING"||r==="TRANSIENT"}}var m3=G(()=>{l3();GK();AK()});class DU{constructor(r,s){this.maxAttemptsProvider=r,this.mode=yf.ADAPTIVE;const{rateLimiter:f}=s??{};this.rateLimiter=f??new k3,this.standardRetryStrategy=new zh(r)}async acquireInitialRetryToken(r){return await this.rateLimiter.getSendToken(),this.standardRetryStrategy.acquireInitialRetryToken(r)}async refreshRetryTokenForRetry(r,s){return this.rateLimiter.updateClientSendingRate(s),this.standardRetryStrategy.refreshRetryTokenForRetry(r,s)}recordSuccess(r){this.rateLimiter.updateClientSendingRate({}),this.standardRetryStrategy.recordSuccess(r)}}var LK=G(()=>{l3();QU();m3()});var RK=G(()=>{m3()});var CK=()=>{};var zf=G(()=>{LK();RK();QU();m3();l3();CK()});var ms,I$r,F$r,WK,U$r,T$r,G$r,A$r,L$r,R$r;var zK=G(()=>{ms=m(n6(),1),I$r=ms.default.v1,F$r=ms.default.v3,WK=ms.default.v4,U$r=ms.default.v5,T$r=ms.default.NIL,G$r=ms.default.version,A$r=ms.default.validate,L$r=ms.default.stringify,R$r=ms.default.parse});var SK=G(()=>{zf()});var kU=G(()=>{zf()});var yU=G(()=>{j1()});var NU=(r)=>{if(r instanceof Error)return r;if(r instanceof Object)return Object.assign(new Error,r);if(typeof r==="string")return new Error(r);return new Error(`AWS SDK error wrapper for ${r}`)};var qU=G(()=>{kr();j1();zf();SK();kU();yU()});var YK=G(()=>{zf();qU()});var XK="AWS_MAX_ATTEMPTS",KK="max_attempts",js,vs=(r)=>{const{retryStrategy:s}=r,f=yr(r.maxAttempts??Mw);return{...r,maxAttempts:f,retryStrategy:async()=>{if(s)return s;if(await yr(r.retryMode)()===yf.ADAPTIVE)return new DU(f);return new zh(f)}}},rg="AWS_RETRY_MODE",fg="retry_mode",is;var ZK=G(()=>{Es();zf();js={environmentVariableSelector:(r)=>{const s=r[XK];if(!s)return;const f=parseInt(s);if(Number.isNaN(f))throw new Error(`Environment variable ${XK} mast be a number, got "${s}"`);return f},configFileSelector:(r)=>{const s=r[KK];if(!s)return;const f=parseInt(s);if(Number.isNaN(f))throw new Error(`Shared config file entry ${KK} mast be a number, got "${s}"`);return f},default:Mw},is={environmentVariableSelector:(r)=>r[rg],configFileSelector:(r)=>r[fg],default:Nf}});var PK=G(()=>{kr();zf()});var Hw=(r,s)=>{const f=[];if(r)f.push(r);if(s)for(let w of s)f.push(w);return f},o0=(r,s)=>{return`${r||"anonymous"}${s&&s.length>0?` (a.k.a. ${s.join(",")})`:""}`},Sh=()=>{let r=[],s=[],f=!1;const w=new Set,h=(L)=>L.sort((S,z)=>JK[z.step]-JK[S.step]||QK[z.priority||"normal"]-QK[S.priority||"normal"]),E=(L)=>{let S=!1;const z=(Z)=>{const N=Hw(Z.name,Z.aliases);if(N.includes(L)){S=!0;for(let M of N)w.delete(M);return!1}return!0};return r=r.filter(z),s=s.filter(z),S},$=(L)=>{let S=!1;const z=(Z)=>{if(Z.middleware===L){S=!0;for(let N of Hw(Z.name,Z.aliases))w.delete(N);return!1}return!0};return r=r.filter(z),s=s.filter(z),S},I=(L)=>{return r.forEach((S)=>{L.add(S.middleware,{...S})}),s.forEach((S)=>{L.addRelativeTo(S.middleware,{...S})}),L.identifyOnResolve?.(A.identifyOnResolve()),L},F=(L)=>{const S=[];return L.before.forEach((z)=>{if(z.before.length===0&&z.after.length===0)S.push(z);else S.push(...F(z))}),S.push(L),L.after.reverse().forEach((z)=>{if(z.before.length===0&&z.after.length===0)S.push(z);else S.push(...F(z))}),S},U=(L=!1)=>{const S=[],z=[],Z={};return r.forEach((M)=>{const l={...M,before:[],after:[]};for(let k of Hw(l.name,l.aliases))Z[k]=l;S.push(l)}),s.forEach((M)=>{const l={...M,before:[],after:[]};for(let k of Hw(l.name,l.aliases))Z[k]=l;z.push(l)}),z.forEach((M)=>{if(M.toMiddleware){const l=Z[M.toMiddleware];if(l===void 0){if(L)return;throw new Error(`${M.toMiddleware} is not found when adding ${o0(M.name,M.aliases)} middleware ${M.relation} ${M.toMiddleware}`)}if(M.relation==="after")l.after.push(M);if(M.relation==="before")l.before.push(M)}}),h(S).map(F).reduce((M,l)=>{return M.push(...l),M},[])},A={add:(L,S={})=>{const{name:z,override:Z,aliases:N}=S,M={step:"initialize",priority:"normal",middleware:L,...S},l=Hw(z,N);if(l.length>0){if(l.some((k)=>w.has(k))){if(!Z)throw new Error(`Duplicate middleware name '${o0(z,N)}'`);for(let k of l){const i=r.findIndex((sr)=>sr.name===k||sr.aliases?.some((Br)=>Br===k));if(i===-1)continue;const e=r[i];if(e.step!==M.step||M.priority!==e.priority)throw new Error(`"${o0(e.name,e.aliases)}" middleware with ${e.priority} priority in ${e.step} step cannot be overridden by "${o0(z,N)}" middleware with ${M.priority} priority in ${M.step} step.`);r.splice(i,1)}}for(let k of l)w.add(k)}r.push(M)},addRelativeTo:(L,S)=>{const{name:z,override:Z,aliases:N}=S,M={middleware:L,...S},l=Hw(z,N);if(l.length>0){if(l.some((k)=>w.has(k))){if(!Z)throw new Error(`Duplicate middleware name '${o0(z,N)}'`);for(let k of l){const i=s.findIndex((sr)=>sr.name===k||sr.aliases?.some((Br)=>Br===k));if(i===-1)continue;const e=s[i];if(e.toMiddleware!==M.toMiddleware||e.relation!==M.relation)throw new Error(`"${o0(e.name,e.aliases)}" middleware ${e.relation} "${e.toMiddleware}" middleware cannot be overridden by "${o0(z,N)}" middleware ${M.relation} "${M.toMiddleware}" middleware.`);s.splice(i,1)}}for(let k of l)w.add(k)}s.push(M)},clone:()=>I(Sh()),use:(L)=>{L.applyToStack(A)},remove:(L)=>{if(typeof L==="string")return E(L);else return $(L)},removeByTag:(L)=>{let S=!1;const z=(Z)=>{const{tags:N,name:M,aliases:l}=Z;if(N&&N.includes(L)){const k=Hw(M,l);for(let i of k)w.delete(i);return S=!0,!1}return!0};return r=r.filter(z),s=s.filter(z),S},concat:(L)=>{const S=I(Sh());return S.use(L),S.identifyOnResolve(f||S.identifyOnResolve()||(L.identifyOnResolve?.()??!1)),S},applyToStack:I,identify:()=>{return U(!0).map((L)=>{const S=L.step??L.relation+" "+L.toMiddleware;return o0(L.name,L.aliases)+" - "+S})},identifyOnResolve(L){if(typeof L==="boolean")f=L;return f},resolve:(L,S)=>{for(let z of U().map((Z)=>Z.middleware).reverse())L=z(L,S);if(f)console.log(A.identify());return L}};return A},JK,QK;var BK=G(()=>{JK={initialize:5,serialize:4,build:3,finalizeRequest:2,deserialize:1},QK={high:3,normal:2,low:1}});var mU=G(()=>{BK()});class Sf{constructor(r){this.config=r,this.middlewareStack=Sh()}send(r,s,f){const w=typeof s!=="function"?s:void 0,h=typeof s==="function"?s:f,E=w===void 0&&this.config.cacheMiddleware===!0;let $;if(E){if(!this.handlers)this.handlers=new WeakMap;const I=this.handlers;if(I.has(r.constructor))$=I.get(r.constructor);else $=r.resolveMiddleware(this.middlewareStack,this.config,w),I.set(r.constructor,$)}else delete this.handlers,$=r.resolveMiddleware(this.middlewareStack,this.config,w);if(h)$(r).then((I)=>h(null,I.output),(I)=>h(I)).catch(()=>{});else return $(r).then((I)=>I.output)}destroy(){this.config?.requestHandler?.destroy?.(),delete this.handlers}}var MK=G(()=>{mU()});var VK=(r)=>typeof ArrayBuffer==="function"&&r instanceof ArrayBuffer||Object.prototype.toString.call(r)==="[object ArrayBuffer]";import{Buffer as jU}from"buffer";var z0=(r,s=0,f=r.byteLength-s)=>{if(!VK(r))throw new TypeError(`The "input" argument must be ArrayBuffer. Received type ${typeof r} (${r})`);return jU.from(r,s,f)},Yh=(r,s)=>{if(typeof r!=="string")throw new TypeError(`The "input" argument must be of type string. Received type ${typeof r} (${r})`);return s?jU.from(r,s):jU.from(r)};var lw=()=>{};var sg,Uf=(r)=>{if(r.length*3%4!==0)throw new TypeError("Incorrect padding on base64 string.");if(!sg.exec(r))throw new TypeError("Invalid base64 string.");const s=Yh(r,"base64");return new Uint8Array(s.buffer,s.byteOffset,s.byteLength)};var HK=G(()=>{lw();sg=/^[A-Za-z0-9+/]*={0,2}$/});var _r=(r)=>{const s=Yh(r,"utf8");return new Uint8Array(s.buffer,s.byteOffset,s.byteLength/Uint8Array.BYTES_PER_ELEMENT)};var vU=G(()=>{lw()});var lK=(r)=>{if(typeof r==="string")return _r(r);if(ArrayBuffer.isView(r))return new Uint8Array(r.buffer,r.byteOffset,r.byteLength/Uint8Array.BYTES_PER_ELEMENT);return new Uint8Array(r)};var DK=G(()=>{vU()});var Tf=(r)=>{if(typeof r==="string")return r;if(typeof r!=="object"||typeof r.byteOffset!=="number"||typeof r.byteLength!=="number")throw new Error("@smithy/util-utf8: toUtf8 encoder function only accepts string | Uint8Array.");return z0(r.buffer,r.byteOffset,r.byteLength).toString("utf8")};var kK=G(()=>{lw()});var Os=G(()=>{vU();DK();kK()});var Gf=(r)=>{let s;if(typeof r==="string")s=_r(r);else s=r;if(typeof s!=="object"||typeof s.byteOffset!=="number"||typeof s.byteLength!=="number")throw new Error("@smithy/util-base64: toBase64 encoder function only accepts string | Uint8Array.");return z0(s.buffer,s.byteOffset,s.byteLength).toString("base64")};var yK=G(()=>{lw();Os()});var S0=G(()=>{HK();yK()});function NK(r,s="utf-8"){if(s==="base64")return Gf(r);return Tf(r)}function qK(r,s){if(s==="base64")return Y0.mutate(Uf(r));return Y0.mutate(_r(r))}var mK=G(()=>{S0();Os();iU()});var Y0;var iU=G(()=>{mK();Y0=class Y0 extends Uint8Array{static fromString(r,s="utf-8"){switch(typeof r){case"string":return qK(r,s);default:throw new Error(`Unsupported conversion from ${typeof r} to Uint8ArrayBlobAdapter.`)}}static mutate(r){return Object.setPrototypeOf(r,Y0.prototype),r}transformToString(r="utf-8"){return NK(this,r)}}});var jK=()=>{};var i1=(r)=>encodeURIComponent(r).replace(/[!'()*]/g,wg),wg=(r)=>`%${r.charCodeAt(0).toString(16).toUpperCase()}`;var vK=()=>{};var iK=G(()=>{vK()});function j3(r){const s=[];for(let f of Object.keys(r).sort()){const w=r[f];if(f=i1(f),Array.isArray(w))for(let h=0,E=w.length;h<E;h++)s.push(`${f}=${i1(w[h])}`);else{let h=f;if(w||typeof w==="string")h+=`=${i1(w)}`;s.push(h)}}return s.join("&")}var v3=G(()=>{iK()});var OK;var dK=G(()=>{OK=["ECONNRESET","EPIPE","ETIMEDOUT"]});var OU=(r)=>{const s={};for(let f of Object.keys(r)){const w=r[f];s[f]=Array.isArray(w)?w.join(","):w}return s};var dU=()=>{};var cK=(r,s,f=0)=>{if(!f)return-1;const w=(h)=>{const E=setTimeout(()=>{r.destroy(),s(Object.assign(new Error(`Socket timed out without establishing a connection within ${f} ms`),{name:"TimeoutError"}))},f-h),$=(I)=>{if(I?.connecting)I.on("connect",()=>{clearTimeout(E)});else clearTimeout(E)};if(r.socket)$(r.socket);else r.on("socket",$)};if(f<2000)return w(0),0;return setTimeout(w.bind(null,1000),1000)};var bK=(r,{keepAlive:s,keepAliveMsecs:f},w=3000)=>{if(s!==!0)return-1;const h=()=>{if(r.socket)r.socket.setKeepAlive(s,f||0);else r.on("socket",(E)=>{E.setKeepAlive(s,f||0)})};if(w===0)return h(),0;return setTimeout(h,w)};var _K=(r,s,f=0)=>{const w=(h)=>{r.setTimeout(f-h,()=>{r.destroy(),s(Object.assign(new Error(`Connection timed out after ${f} ms`),{name:"TimeoutError"}))})};if(0<f&&f<6000)return w(0),0;return setTimeout(w.bind(null,f===0?0:3000),3000)};import{Readable as hg}from"stream";async function cU(r,s,f=gK){const w=s.headers??{},h=w.Expect||w.expect;let E=-1,$=!1;if(h==="100-continue")await Promise.race([new Promise((I)=>{E=Number(setTimeout(I,Math.max(gK,f)))}),new Promise((I)=>{r.on("continue",()=>{clearTimeout(E),I()}),r.on("error",()=>{$=!0,clearTimeout(E),I()})})]);if(!$)Eg(r,s.body)}function Eg(r,s){if(s instanceof hg){s.pipe(r);return}if(s){if(Buffer.isBuffer(s)||typeof s==="string"){r.end(s);return}const f=s;if(typeof f==="object"&&f.buffer&&typeof f.byteOffset==="number"&&typeof f.byteLength==="number"){r.end(Buffer.from(f.buffer,f.byteOffset,f.byteLength));return}r.end(Buffer.from(s));return}r.end()}var gK=1000;var bU=()=>{};import{Agent as xK,request as $g}from"http";import{Agent as eK,request as Ig}from"https";class ff{static create(r){if(typeof r?.handle==="function")return r;return new ff(r)}static checkSocketUsage(r,s,f=console){const{sockets:w,requests:h,maxSockets:E}=r;if(typeof E!=="number"||E===1/0)return s;const $=15000;if(Date.now()-$<s)return s;if(w&&h)for(let I in w){const F=w[I]?.length??0,U=h[I]?.length??0;if(F>=E&&U>=2*E)return f?.warn?.(`@smithy/node-http-handler:WARN - socket usage at capacity=${F} and ${U} additional requests are enqueued.
20
20
  See https://docs.aws.amazon.com/sdk-for-javascript/v3/developer-guide/node-configuring-maxsockets.html
21
- or increase socketAcquisitionWarningTimeout=(millis) in the NodeHttpHandler config.`),Date.now()}return f}constructor(r){this.socketWarningTimestamp=0,this.metadata={handlerProtocol:"http/1.1"},this.configProvider=new Promise((f,s)=>{if(typeof r==="function")r().then((w)=>{f(this.resolveDefaultConfig(w))}).catch(s);else f(this.resolveDefaultConfig(r))})}resolveDefaultConfig(r){const{requestTimeout:f,connectionTimeout:s,socketTimeout:w,httpAgent:h,httpsAgent:E}=r||{};return{connectionTimeout:s,requestTimeout:f??w,httpAgent:(()=>{if(h instanceof E7||typeof h?.destroy==="function")return h;return new E7({keepAlive:!0,maxSockets:50,...h})})(),httpsAgent:(()=>{if(E instanceof $7||typeof E?.destroy==="function")return E;return new $7({keepAlive:!0,maxSockets:50,...E})})(),logger:console}}destroy(){this.config?.httpAgent?.destroy(),this.config?.httpsAgent?.destroy()}async handle(r,{abortSignal:f}={}){if(!this.config)this.config=await this.configProvider;let s;return new Promise((w,h)=>{let E=void 0;const $=async(Q)=>{await E,clearTimeout(s),w(Q)},I=async(Q)=>{await E,clearTimeout(s),h(Q)};if(!this.config)throw new Error("Node HTTP request handler config is not resolved");if(f?.aborted){const Q=new Error("Request aborted");Q.name="AbortError",I(Q);return}const F=r.protocol==="https:",U=F?this.config.httpsAgent:this.config.httpAgent;s=setTimeout(()=>{this.socketWarningTimestamp=tr.checkSocketUsage(U,this.socketWarningTimestamp,this.config.logger)},this.config.socketAcquisitionWarningTimeout??(this.config.requestTimeout??2000)+(this.config.connectionTimeout??1000));const C=vU(r.query||{});let L=void 0;if(r.username!=null||r.password!=null){const Q=r.username??"",N=r.password??"";L=`${Q}:${N}`}let z=r.path;if(C)z+=`?${C}`;if(r.fragment)z+=`#${r.fragment}`;const S={headers:r.headers,host:r.hostname,method:r.method,path:z,port:r.port,agent:U,auth:L},k=(F?l_:B_)(S,(Q)=>{const N=new Gw({statusCode:Q.statusCode||-1,reason:Q.statusMessage,headers:iU(Q.headers),body:Q});$({response:N})});if(k.on("error",(Q)=>{if(tK.includes(Q.code))I(Object.assign(Q,{name:"TimeoutError"}));else I(Q)}),s7(k,I,this.config.connectionTimeout),w7(k,I,this.config.requestTimeout),f){const Q=()=>{k.destroy();const N=new Error("Request aborted");N.name="AbortError",I(N)};if(typeof f.addEventListener==="function"){const N=f;N.addEventListener("abort",Q,{once:!0}),k.once("close",()=>N.removeEventListener("abort",Q))}else f.onabort=Q}const l=S.agent;if(typeof l==="object"&&"keepAlive"in l)f7(k,{keepAlive:l.keepAlive,keepAliveMsecs:l.keepAliveMsecs});E=OU(k,r,this.config.requestTimeout).catch((Q)=>{return clearTimeout(s),h(Q)})})}updateHttpClientConfig(r,f){this.config=void 0,this.configProvider=this.configProvider.then((s)=>{return{...s,[r]:f}})}httpHandlerConfigs(){return this.config??{}}}var I7=G(()=>{qr();jU();r7();dU();bU()});var F7=()=>{};var U7=G(()=>{F7()});var T7=G(()=>{qr();jU();dU();U7();bU()});import{Writable as V_}from"stream";var cU;var G7=G(()=>{cU=class cU extends V_{constructor(){super(...arguments);this.bufferedBytes=[]}_write(r,f,s){this.bufferedBytes.push(r),s()}}});async function D_(r){const f=[],s=r.getReader();let w=!1,h=0;while(!w){const{done:I,value:F}=await s.read();if(F)f.push(F),h+=F.length;w=I}const E=new Uint8Array(h);let $=0;for(let I of f)E.set(I,$),$+=I.length;return E}var cf=(r)=>{if(H_(r))return D_(r);return new Promise((f,s)=>{const w=new cU;r.pipe(w),r.on("error",(h)=>{w.end(),s(h)}),w.on("error",s),w.on("finish",function(){const h=new Uint8Array(Buffer.concat(this.bufferedBytes));f(h)})})},H_=(r)=>typeof ReadableStream==="function"&&r instanceof ReadableStream;var C7=G(()=>{G7()});var lw=G(()=>{I7();T7();C7()});var k_="169.254.170.2",N_="169.254.170.23",y_="[fd00:ec2::23]",L7=(r,f)=>{if(r.protocol==="https:")return;if(r.hostname===k_||r.hostname===N_||r.hostname===y_)return;if(r.hostname.includes("[")){if(r.hostname==="[::1]"||r.hostname==="[0000:0000:0000:0000:0000:0000:0000:0001]")return}else{if(r.hostname==="localhost")return;const s=r.hostname.split("."),w=(h)=>{const E=parseInt(h,10);return 0<=E&&E<=255};if(s[0]==="127"&&w(s[1])&&w(s[2])&&w(s[3])&&s.length===4)return}throw new g(`URL not accepted. It must either be HTTPS or match one of the following:
21
+ or increase socketAcquisitionWarningTimeout=(millis) in the NodeHttpHandler config.`),Date.now()}return s}constructor(r){this.socketWarningTimestamp=0,this.metadata={handlerProtocol:"http/1.1"},this.configProvider=new Promise((s,f)=>{if(typeof r==="function")r().then((w)=>{s(this.resolveDefaultConfig(w))}).catch(f);else s(this.resolveDefaultConfig(r))})}resolveDefaultConfig(r){const{requestTimeout:s,connectionTimeout:f,socketTimeout:w,httpAgent:h,httpsAgent:E}=r||{};return{connectionTimeout:f,requestTimeout:s??w,httpAgent:(()=>{if(h instanceof xK||typeof h?.destroy==="function")return h;return new xK({keepAlive:!0,maxSockets:50,...h})})(),httpsAgent:(()=>{if(E instanceof eK||typeof E?.destroy==="function")return E;return new eK({keepAlive:!0,maxSockets:50,...E})})(),logger:console}}destroy(){this.config?.httpAgent?.destroy(),this.config?.httpsAgent?.destroy()}async handle(r,{abortSignal:s}={}){if(!this.config)this.config=await this.configProvider;return new Promise((f,w)=>{let h=void 0;const E=[],$=async(k)=>{await h,E.forEach(clearTimeout),f(k)},I=async(k)=>{await h,E.forEach(clearTimeout),w(k)};if(!this.config)throw new Error("Node HTTP request handler config is not resolved");if(s?.aborted){const k=new Error("Request aborted");k.name="AbortError",I(k);return}const F=r.protocol==="https:",U=F?this.config.httpsAgent:this.config.httpAgent;E.push(setTimeout(()=>{this.socketWarningTimestamp=ff.checkSocketUsage(U,this.socketWarningTimestamp,this.config.logger)},this.config.socketAcquisitionWarningTimeout??(this.config.requestTimeout??2000)+(this.config.connectionTimeout??1000)));const A=j3(r.query||{});let L=void 0;if(r.username!=null||r.password!=null){const k=r.username??"",i=r.password??"";L=`${k}:${i}`}let S=r.path;if(A)S+=`?${A}`;if(r.fragment)S+=`#${r.fragment}`;let z=r.hostname??"";if(z[0]==="["&&z.endsWith("]"))z=r.hostname.slice(1,-1);else z=r.hostname;const Z={headers:r.headers,host:z,method:r.method,path:S,port:r.port,agent:U,auth:L},M=(F?Ig:$g)(Z,(k)=>{const i=new j0({statusCode:k.statusCode||-1,reason:k.statusMessage,headers:OU(k.headers),body:k});$({response:i})});if(M.on("error",(k)=>{if(OK.includes(k.code))I(Object.assign(k,{name:"TimeoutError"}));else I(k)}),s){const k=()=>{M.destroy();const i=new Error("Request aborted");i.name="AbortError",I(i)};if(typeof s.addEventListener==="function"){const i=s;i.addEventListener("abort",k,{once:!0}),M.once("close",()=>i.removeEventListener("abort",k))}else s.onabort=k}E.push(cK(M,I,this.config.connectionTimeout)),E.push(_K(M,I,this.config.requestTimeout));const l=Z.agent;if(typeof l==="object"&&"keepAlive"in l)E.push(bK(M,{keepAlive:l.keepAlive,keepAliveMsecs:l.keepAliveMsecs}));h=cU(M,r,this.config.requestTimeout).catch((k)=>{return E.forEach(clearTimeout),w(k)})})}updateHttpClientConfig(r,s){this.config=void 0,this.configProvider=this.configProvider.then((f)=>{return{...f,[r]:s}})}httpHandlerConfigs(){return this.config??{}}}var nK=G(()=>{kr();v3();dK();dU();bU()});var oK=()=>{};var aK=G(()=>{oK()});var pK=G(()=>{kr();v3();dU();aK();bU()});import{Writable as Fg}from"stream";var _U;var uK=G(()=>{_U=class _U extends Fg{constructor(){super(...arguments);this.bufferedBytes=[]}_write(r,s,f){this.bufferedBytes.push(r),f()}}});async function Tg(r){const s=[],f=r.getReader();let w=!1,h=0;while(!w){const{done:I,value:F}=await f.read();if(F)s.push(F),h+=F.length;w=I}const E=new Uint8Array(h);let $=0;for(let I of s)E.set(I,$),$+=I.length;return E}var qf=(r)=>{if(Ug(r))return Tg(r);return new Promise((s,f)=>{const w=new _U;r.pipe(w),r.on("error",(h)=>{w.end(),f(h)}),w.on("error",f),w.on("finish",function(){const h=new Uint8Array(Buffer.concat(this.bufferedBytes));s(h)})})},Ug=(r)=>typeof ReadableStream==="function"&&r instanceof ReadableStream;var tK=G(()=>{uK()});var a0=G(()=>{nK();pK();tK()});var rZ=G(()=>{kr();v3()});async function Gg(r){const s=await Lg(r),f=Uf(s);return new Uint8Array(f)}async function Ag(r){const s=[],f=r.getReader();let w=!1,h=0;while(!w){const{done:I,value:F}=await f.read();if(F)s.push(F),h+=F.length;w=I}const E=new Uint8Array(h);let $=0;for(let I of s)E.set(I,$),$+=I.length;return E}function Lg(r){return new Promise((s,f)=>{const w=new FileReader;w.onloadend=()=>{if(w.readyState!==2)return f(new Error("Reader aborted too early"));const h=w.result??"",E=h.indexOf(","),$=E>-1?E+1:h.length;s(h.substring($))},w.onabort=()=>f(new Error("Read aborted")),w.onerror=()=>f(w.error),w.readAsDataURL(r)})}var fZ=(r)=>{if(typeof Blob==="function"&&r instanceof Blob)return Gg(r);return Ag(r)};var sZ=G(()=>{S0()});var wZ=G(()=>{rZ();sZ()});var O1=(r)=>typeof ReadableStream==="function"&&(r?.constructor?.name===ReadableStream.name||r instanceof ReadableStream);var $Z,hZ="The stream has already been transformed.",IZ=(r)=>{if(!EZ(r)&&!O1(r)){const h=r?.__proto__?.constructor?.name||r;throw new Error(`Unexpected stream implementation, expect Blob or ReadableStream, got ${h}`)}let s=!1;const f=async()=>{if(s)throw new Error(hZ);return s=!0,await fZ(r)},w=(h)=>{if(typeof h.stream!=="function")throw new Error("Cannot transform payload Blob to web stream. Please make sure the Blob.stream() is polyfilled.\nIf you are using React Native, this API is not yet supported, see: https://react-native.canny.io/feature-requests/p/fetch-streaming-body");return h.stream()};return Object.assign(r,{transformToByteArray:f,transformToString:async(h)=>{const E=await f();if(h==="base64")return Gf(E);else if(h==="hex")return $Z.toHex(E);else if(h===void 0||h==="utf8"||h==="utf-8")return Tf(E);else if(typeof TextDecoder==="function")return new TextDecoder(h).decode(E);else throw new Error("TextDecoder is not available, please make sure polyfill is provided.")},transformToWebStream:()=>{if(s)throw new Error(hZ);if(s=!0,EZ(r))return w(r);else if(O1(r))return r;else throw new Error(`Cannot transform payload to web stream, got ${r}`)}})},EZ=(r)=>typeof Blob==="function"&&r instanceof Blob;var FZ=G(()=>{wZ();S0();$Z=m(i$(),1);Os()});import{Readable as gU}from"stream";import{TextDecoder as Rg}from"util";var UZ="The stream has already been transformed.",TZ=(r)=>{if(!(r instanceof gU))try{return IZ(r)}catch(w){const h=r?.__proto__?.constructor?.name||r;throw new Error(`Unexpected stream implementation, expect Stream.Readable instance, got ${h}`)}let s=!1;const f=async()=>{if(s)throw new Error(UZ);return s=!0,await qf(r)};return Object.assign(r,{transformToByteArray:f,transformToString:async(w)=>{const h=await f();if(w===void 0||Buffer.isEncoding(w))return z0(h.buffer,h.byteOffset,h.byteLength).toString(w);else return new Rg(w).decode(h)},transformToWebStream:()=>{if(s)throw new Error(UZ);if(r.readableFlowing!==null)throw new Error("The stream has been consumed by other callbacks.");if(typeof gU.toWeb!=="function")throw new Error("Readable.toWeb() is not supported. Please make sure you are using Node.js >= 17.0.0, or polyfill is available.");return s=!0,gU.toWeb(r)}})};var GZ=G(()=>{a0();lw();FZ()});var AZ=()=>{};var LZ=()=>{};var xU=G(()=>{iU();jK();GZ();AZ();LZ()});var gr=async(r=new Uint8Array,s)=>{if(r instanceof Uint8Array)return Y0.mutate(r);if(!r)return Y0.mutate(new Uint8Array);const f=s.streamCollector(r);return Y0.mutate(await f)};var RZ=G(()=>{xU()});class R{constructor(){this.middlewareStack=Sh()}static classBuilder(){return new WZ}resolveMiddlewareWithContext(r,s,f,{middlewareFn:w,clientName:h,commandName:E,inputFilterSensitiveLog:$,outputFilterSensitiveLog:I,smithyContext:F,additionalContext:U,CommandCtor:A}){for(let N of w.bind(this)(A,r,s,f))this.middlewareStack.use(N);const L=r.concat(this.middlewareStack),{logger:S}=s,z={logger:S,clientName:h,commandName:E,inputFilterSensitiveLog:$,outputFilterSensitiveLog:I,[CZ.SMITHY_CONTEXT_KEY]:{commandInstance:this,...F},...U},{requestHandler:Z}=s;return L.resolve((N)=>Z.handle(N.request,f||{}),z)}}class WZ{constructor(){this._init=()=>{},this._ep={},this._middlewareFn=()=>[],this._commandName="",this._clientName="",this._additionalContext={},this._smithyContext={},this._inputFilterSensitiveLog=(r)=>r,this._outputFilterSensitiveLog=(r)=>r,this._serializer=null,this._deserializer=null}init(r){this._init=r}ep(r){return this._ep=r,this}m(r){return this._middlewareFn=r,this}s(r,s,f={}){return this._smithyContext={service:r,operation:s,...f},this}c(r={}){return this._additionalContext=r,this}n(r,s){return this._clientName=r,this._commandName=s,this}f(r=(f)=>f,s=(f)=>f){return this._inputFilterSensitiveLog=r,this._outputFilterSensitiveLog=s,this}ser(r){return this._serializer=r,this}de(r){return this._deserializer=r,this}build(){const r=this;let s;return s=class extends R{static getEndpointParameterInstructions(){return r._ep}constructor(...[f]){super();this.serialize=r._serializer,this.deserialize=r._deserializer,this.input=f??{},r._init(this)}resolveMiddleware(f,w,h){return this.resolveMiddlewareWithContext(f,w,h,{CommandCtor:s,middlewareFn:r._middlewareFn,clientName:r._clientName,commandName:r._commandName,inputFilterSensitiveLog:r._inputFilterSensitiveLog,outputFilterSensitiveLog:r._outputFilterSensitiveLog,smithyContext:r._smithyContext,additionalContext:r._additionalContext})}}}}var CZ;var zZ=G(()=>{mU();CZ=m(Ff(),1)});var o="***SensitiveInformation***";var ds=(r,s)=>{for(let f of Object.keys(r)){const w=r[f],h=async function($,I,F){const U=new w($);if(typeof I==="function")this.send(U,I);else if(typeof F==="function"){if(typeof I!=="object")throw new Error(`Expected http options but got ${typeof I}`);this.send(U,I||{},F)}else return this.send(U,I)},E=(f[0].toLowerCase()+f.slice(1)).replace(/Command$/,"");s.prototype[E]=h}};var Nr=(r)=>{switch(r){case"true":return!0;case"false":return!1;default:throw new Error(`Unable to parse boolean value "${r}"`)}},p0=(r)=>{if(r===null||r===void 0)return;if(typeof r==="number"){if(r===0||r===1)O3.warn(i3(`Expected boolean, got ${typeof r}: ${r}`));if(r===0)return!1;if(r===1)return!0}if(typeof r==="string"){const s=r.toLowerCase();if(s==="false"||s==="true")O3.warn(i3(`Expected boolean, got ${typeof r}: ${r}`));if(s==="false")return!1;if(s==="true")return!0}if(typeof r==="boolean")return r;throw new TypeError(`Expected boolean, got ${typeof r}: ${r}`)},Af=(r)=>{if(r===null||r===void 0)return;if(typeof r==="string"){const s=parseFloat(r);if(!Number.isNaN(s)){if(String(s)!==String(r))O3.warn(i3(`Expected number but observed string: ${r}`));return s}}if(typeof r==="number")return r;throw new TypeError(`Expected number, got ${typeof r}: ${r}`)},Cg,SZ=(r)=>{const s=Af(r);if(s!==void 0&&!Number.isNaN(s)&&s!==1/0&&s!==-1/0){if(Math.abs(s)>Cg)throw new TypeError(`Expected 32-bit float, got ${r}`)}return s},Xh=(r)=>{if(r===null||r===void 0)return;if(Number.isInteger(r)&&!Number.isNaN(r))return r;throw new TypeError(`Expected integer, got ${typeof r}: ${r}`)},Dw=(r)=>eU(r,32),YZ=(r)=>eU(r,16),XZ=(r)=>eU(r,8),eU=(r,s)=>{const f=Xh(r);if(f!==void 0&&Wg(f,s)!==f)throw new TypeError(`Expected ${s}-bit integer, got ${r}`);return f},Wg=(r,s)=>{switch(s){case 32:return Int32Array.of(r)[0];case 16:return Int16Array.of(r)[0];case 8:return Int8Array.of(r)[0]}},y=(r,s)=>{if(r===null||r===void 0){if(s)throw new TypeError(`Expected a non-null value for ${s}`);throw new TypeError("Expected a non-null value")}return r},c=(r)=>{if(r===null||r===void 0)return;if(typeof r==="object"&&!Array.isArray(r))return r;const s=Array.isArray(r)?"array":typeof r;throw new TypeError(`Expected object, got ${s}: ${r}`)},T=(r)=>{if(r===null||r===void 0)return;if(typeof r==="string")return r;if(["boolean","number","bigint"].includes(typeof r))return O3.warn(i3(`Expected string, got ${typeof r}: ${r}`)),String(r);throw new TypeError(`Expected string, got ${typeof r}: ${r}`)},nU=(r)=>{if(typeof r=="string")return Af(Kh(r));return Af(r)},KZ,ZZ=(r)=>{if(typeof r=="string")return SZ(Kh(r));return SZ(r)},zg,Kh=(r)=>{const s=r.match(zg);if(s===null||s[0].length!==r.length)throw new TypeError("Expected real number, got implicit NaN");return parseFloat(r)},oU=(r)=>{if(typeof r=="string")return Sg(r);return Af(r)},Sg=(r)=>{switch(r){case"NaN":return NaN;case"Infinity":return 1/0;case"-Infinity":return-1/0;default:throw new Error(`Unable to parse float value: ${r}`)}},xr=(r)=>{if(typeof r==="string")return Xh(Kh(r));return Xh(r)},hr=(r)=>{if(typeof r==="string")return Dw(Kh(r));return Dw(r)},aU=(r)=>{if(typeof r==="string")return YZ(Kh(r));return YZ(r)},PZ=(r)=>{if(typeof r==="string")return XZ(Kh(r));return XZ(r)},i3=(r)=>{return String(new TypeError(r).stack||r).split("\n").slice(0,5).filter((s)=>!s.includes("stackTraceWarning")).join("\n")},O3;var pU=G(()=>{Cg=Math.ceil(340282346638528860000000000000000000000),KZ=nU,zg=/(-?(?:0|[1-9]\d*)(?:\.\d+)?(?:[eE][+-]?\d+)?)|(-?Infinity)|(NaN)/g,O3={warn:console.warn}});var Yg,Xg,JZ=(r)=>{if(r===null||r===void 0)return;if(typeof r!=="string")throw new TypeError("RFC-3339 date-times must be expressed as strings");const s=Xg.exec(r);if(!s)throw new TypeError("Invalid RFC-3339 date-time value");const[f,w,h,E,$,I,F,U]=s,A=aU(uU(w)),L=kw(h,"month",1,12),S=kw(E,"day",1,31);return QZ(A,L,S,{hours:$,minutes:I,seconds:F,fractionalMilliseconds:U})},Kg,yw=(r)=>{if(r===null||r===void 0)return;if(typeof r!=="string")throw new TypeError("RFC-3339 date-times must be expressed as strings");const s=Kg.exec(r);if(!s)throw new TypeError("Invalid RFC-3339 date-time value");const[f,w,h,E,$,I,F,U,A]=s,L=aU(uU(w)),S=kw(h,"month",1,12),z=kw(E,"day",1,31),Z=QZ(L,S,z,{hours:$,minutes:I,seconds:F,fractionalMilliseconds:U});if(A.toUpperCase()!="Z")Z.setTime(Z.getTime()-Bg(A));return Z},A2r,L2r,R2r,cs=(r)=>{if(r===null||r===void 0)return;let s;if(typeof r==="number")s=r;else if(typeof r==="string")s=nU(r);else if(typeof r==="object"&&r.tag===1)s=r.value;else throw new TypeError("Epoch timestamps must be expressed as floating point numbers or their string representation");if(Number.isNaN(s)||s===1/0||s===-1/0)throw new TypeError("Epoch timestamps must be valid, non-Infinite, non-NaN numerics");return new Date(Math.round(s*1000))},QZ=(r,s,f,w)=>{const h=s-1;return Pg(r,h,f),new Date(Date.UTC(r,h,f,kw(w.hours,"hour",0,23),kw(w.minutes,"minute",0,59),kw(w.seconds,"seconds",0,60),Qg(w.fractionalMilliseconds)))},Zg,Pg=(r,s,f)=>{let w=Zg[s];if(s===1&&Jg(r))w=29;if(f>w)throw new TypeError(`Invalid day for ${Yg[s]} in ${r}: ${f}`)},Jg=(r)=>{return r%4===0&&(r%100!==0||r%400===0)},kw=(r,s,f,w)=>{const h=PZ(uU(r));if(h<f||h>w)throw new TypeError(`${s} must be between ${f} and ${w}, inclusive`);return h},Qg=(r)=>{if(r===null||r===void 0)return 0;return ZZ("0."+r)*1000},Bg=(r)=>{const s=r[0];let f=1;if(s=="+")f=1;else if(s=="-")f=-1;else throw new TypeError(`Offset direction, ${s}, must be "+" or "-"`);const w=Number(r.substring(1,3)),h=Number(r.substring(4,6));return f*(w*60+h)*60*1000},uU=(r)=>{let s=0;while(s<r.length-1&&r.charAt(s)==="0")s++;if(s===0)return r;return r.slice(s)};var BZ=G(()=>{pU();Yg=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],Xg=new RegExp(/^(\d{4})-(\d{2})-(\d{2})[tT](\d{2}):(\d{2}):(\d{2})(?:\.(\d+))?[zZ]$/),Kg=new RegExp(/^(\d{4})-(\d{2})-(\d{2})[tT](\d{2}):(\d{2}):(\d{2})(?:\.(\d+))?(([-+]\d{2}\:\d{2})|[zZ])$/),A2r=new RegExp(/^(?:Mon|Tue|Wed|Thu|Fri|Sat|Sun), (\d{2}) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) (\d{4}) (\d{1,2}):(\d{2}):(\d{2})(?:\.(\d+))? GMT$/),L2r=new RegExp(/^(?:Monday|Tuesday|Wednesday|Thursday|Friday|Saturday|Sunday), (\d{2})-(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)-(\d{2}) (\d{1,2}):(\d{2}):(\d{2})(?:\.(\d+))? GMT$/),R2r=new RegExp(/^(?:Mon|Tue|Wed|Thu|Fri|Sat|Sun) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) ( [1-9]|\d{2}) (\d{1,2}):(\d{2}):(\d{2})(?:\.(\d+))? (\d{4})$/),Zg=[31,28,31,30,31,30,31,31,30,31,30,31]});var mf,D=(r,s={})=>{Object.entries(s).filter(([,w])=>w!==void 0).forEach(([w,h])=>{if(r[w]==null||r[w]==="")r[w]=h});const f=r.message||r.Message||"UnknownError";return r.message=f,delete r.Message,r};var tU=G(()=>{mf=class mf extends Error{constructor(r){super(r.message);Object.setPrototypeOf(this,mf.prototype),this.name=r.name,this.$fault=r.$fault,this.$metadata=r.$metadata}}});var Mg=({output:r,parsedBody:s,exceptionCtor:f,errorCode:w})=>{const h=Vg(r),E=h.httpStatusCode?h.httpStatusCode+"":void 0,$=new f({name:s?.code||s?.Code||w||E||"UnknownError",$fault:"client",$metadata:h});throw D($,s)},bs=(r)=>{return({output:s,parsedBody:f,errorCode:w})=>{Mg({output:s,parsedBody:f,exceptionCtor:r,errorCode:w})}},Vg=(r)=>({httpStatusCode:r.statusCode,requestId:r.headers["x-amzn-requestid"]??r.headers["x-amzn-request-id"]??r.headers["x-amz-request-id"],extendedRequestId:r.headers["x-amz-id-2"],cfId:r.headers["x-amz-cf-id"]});var MZ=G(()=>{tU()});var _s=(r)=>{switch(r){case"standard":return{retryMode:"standard",connectionTimeout:3100};case"in-region":return{retryMode:"standard",connectionTimeout:1100};case"cross-region":return{retryMode:"standard",connectionTimeout:3100};case"mobile":return{retryMode:"standard",connectionTimeout:30000};default:return{}}};var VZ=!1,gs=(r)=>{if(r&&!VZ&&parseInt(r.substring(1,r.indexOf(".")))<16)VZ=!0};function d3(r){return encodeURIComponent(r).replace(/[!'()*]/g,function(s){return"%"+s.charCodeAt(0).toString(16).toUpperCase()})}var rT,HZ=(r)=>{const s=[];for(let f in rT.AlgorithmId){const w=rT.AlgorithmId[f];if(r[w]===void 0)continue;s.push({algorithmId:()=>w,checksumConstructor:()=>r[w]})}return{_checksumAlgorithms:s,addChecksumAlgorithm(f){this._checksumAlgorithms.push(f)},checksumAlgorithms(){return this._checksumAlgorithms}}},lZ=(r)=>{const s={};return r.checksumAlgorithms().forEach((f)=>{s[f.algorithmId()]=f.checksumConstructor()}),s};var DZ=G(()=>{rT=m(Ff(),1)});var kZ=(r)=>{let s=r.retryStrategy;return{setRetryStrategy(f){s=f},retryStrategy(){return s}}},yZ=(r)=>{const s={};return s.retryStrategy=r.retryStrategy(),s};var xs=(r)=>{return{...HZ(r),...kZ(r)}},es=(r)=>{return{...lZ(r),...yZ(r)}};var NZ=G(()=>{DZ()});var qZ=G(()=>{NZ()});var Gr=(r)=>Array.isArray(r)?r:[r];var d1=(r)=>{return r!=null};var fT=function(){const r=Object.getPrototypeOf(this).constructor,f=new(Function.bind.apply(String,[null,...arguments]));return Object.setPrototypeOf(f,r.prototype),f};var mZ=G(()=>{fT.prototype=Object.create(String.prototype,{constructor:{value:fT,enumerable:!1,writable:!0,configurable:!0}});Object.setPrototypeOf(fT,String)});class Yf{trace(){}debug(){}info(){}warn(){}error(){}}function Y(r,s,f){let w,h,E;if(typeof s==="undefined"&&typeof f==="undefined")w={},E=r;else if(w=r,typeof s==="function")return h=s,E=f,Hg(w,h,E);else E=s;for(let $ of Object.keys(E)){if(!Array.isArray(E[$])){w[$]=E[$];continue}jZ(w,null,E,$)}return w}var p=(r,s)=>{const f={};for(let w in s)jZ(f,r,s,w);return f},Hg=(r,s,f)=>{return Y(r,Object.entries(f).reduce((w,[h,E])=>{if(Array.isArray(E))w[h]=E;else if(typeof E==="function")w[h]=[s,E()];else w[h]=[s,E];return w},{}))},jZ=(r,s,f,w)=>{if(s!==null){let $=f[w];if(typeof $==="function")$=[,$];const[I=lg,F=Dg,U=w]=$;if(typeof I==="function"&&I(s[U])||typeof I!=="function"&&!!I)r[w]=F(s[U]);return}let[h,E]=f[w];if(typeof E==="function"){let $;const I=h===void 0&&($=E())!=null,F=typeof h==="function"&&!!h(void 0)||typeof h!=="function"&&!!h;if(I)r[w]=$;else if(F)r[w]=E()}else{const $=h===void 0&&E!=null,I=typeof h==="function"&&!!h(E)||typeof h!=="function"&&!!h;if($||I)r[w]=E}},lg=(r)=>r!=null,Dg=(r)=>r;var vZ=()=>{};var iZ=(r)=>{if(r!==r)return"NaN";switch(r){case 1/0:return"Infinity";case-1/0:return"-Infinity";default:return r}};var q=(r)=>{if(r==null)return{};if(Array.isArray(r))return r.filter((s)=>s!=null).map(q);if(typeof r==="object"){const s={};for(let f of Object.keys(r)){if(r[f]==null)continue;s[f]=q(r[f])}return s}return r};var K=G(()=>{MK();RZ();zZ();BZ();MZ();tU();qZ();mZ();pU();vZ()});import{Readable as kg}from"stream";var OZ=(r)=>r?.body instanceof kg||typeof ReadableStream!=="undefined"&&r?.body instanceof ReadableStream;var dZ=()=>{};var yg=(r)=>(s,f)=>async(w)=>{let h=await r.retryStrategy();const E=await r.maxAttempts();if(Ng(h)){h=h;let $=await h.acquireInitialRetryToken(f.partition_id),I=new Error,F=0,U=0;const{request:A}=w,L=Mr.isInstance(A);if(L)A.headers[N3]=WK();while(!0)try{if(L)A.headers[q3]=`attempt=${F+1}; max=${E}`;const{response:S,output:z}=await s(w);return h.recordSuccess($),z.$metadata.attempts=F+1,z.$metadata.totalRetryDelay=U,{response:S,output:z}}catch(S){const z=qg(S);if(I=NU(S),L&&OZ(A))throw(f.logger instanceof Yf?console:f.logger)?.warn("An error was encountered in a non-retryable streaming request."),I;try{$=await h.refreshRetryTokenForRetry($,z)}catch(N){if(!I.$metadata)I.$metadata={};throw I.$metadata.attempts=F+1,I.$metadata.totalRetryDelay=U,I}F=$.getRetryCount();const Z=$.getRetryDelay();U+=Z,await new Promise((N)=>setTimeout(N,Z))}}else{if(h=h,h?.mode)f.userAgent=[...f.userAgent||[],["cfg/retry-mode",h.mode]];return h.retry(s,w)}},Ng=(r)=>typeof r.acquireInitialRetryToken!=="undefined"&&typeof r.refreshRetryTokenForRetry!=="undefined"&&typeof r.recordSuccess!=="undefined",qg=(r)=>{const s={error:r,errorType:mg(r)},f=vg(r.$response);if(f)s.retryAfterHint=f;return s},mg=(r)=>{if(Wh(r))return"THROTTLING";if(D3(r))return"TRANSIENT";if(UK(r))return"SERVER_ERROR";return"CLIENT_ERROR"},jg,ns=(r)=>({applyToStack:(s)=>{s.add(yg(r),jg)}}),vg=(r)=>{if(!j0.isInstance(r))return;const s=Object.keys(r.headers).find((E)=>E.toLowerCase()==="retry-after");if(!s)return;const f=r.headers[s],w=Number(f);if(!Number.isNaN(w))return new Date(w*1000);return new Date(f)};var cZ=G(()=>{kr();j1();K();zf();zK();dZ();jg={name:"retryMiddleware",tags:["RETRY"],step:"finalizeRequest",priority:"high",override:!0}});var Is=G(()=>{YK();qU();ZK();kU();PK();yU();cZ()});var oZ,aZ,c3="AWS_ACCESS_KEY_ID",b3="AWS_SECRET_ACCESS_KEY",pZ="AWS_SESSION_TOKEN",uZ="AWS_CREDENTIAL_EXPIRATION",tZ="AWS_CREDENTIAL_SCOPE",rP="AWS_ACCOUNT_ID",sT=(r)=>async()=>{r?.logger?.debug("@aws-sdk/credential-provider-env - fromEnv");const s=process.env[c3],f=process.env[b3],w=process.env[pZ],h=process.env[uZ],E=process.env[tZ],$=process.env[rP];if(s&&f){const I={accessKeyId:s,secretAccessKey:f,...w&&{sessionToken:w},...h&&{expiration:new Date(h)},...E&&{credentialScope:E},...$&&{accountId:$}};return oZ.setCredentialFeature(I,"CREDENTIALS_ENV_VARS","g"),I}throw new aZ.CredentialsProviderError("Unable to find environment variable credentials.",{logger:r?.logger})};var fP=G(()=>{oZ=m(tr(),1),aZ=m(Ar(),1)});var sP={};Ys(sP,{fromEnv:()=>sT,ENV_SESSION:()=>pZ,ENV_SECRET:()=>b3,ENV_KEY:()=>c3,ENV_EXPIRATION:()=>uZ,ENV_CREDENTIAL_SCOPE:()=>tZ,ENV_ACCOUNT_ID:()=>rP});var wT=G(()=>{fP()});import{Buffer as dg}from"buffer";import{request as cg}from"http";function u0(r){return new Promise((s,f)=>{const w=cg({method:"GET",...r,hostname:r.hostname?.replace(/^\[(.+)\]$/,"$1")});w.on("error",(h)=>{f(Object.assign(new _3.ProviderError("Unable to connect to instance metadata service"),h)),w.destroy()}),w.on("timeout",()=>{f(new _3.ProviderError("TimeoutError from instance metadata service")),w.destroy()}),w.on("response",(h)=>{const{statusCode:E=400}=h;if(E<200||300<=E)f(Object.assign(new _3.ProviderError("Error response received from instance metadata service"),{statusCode:E})),w.destroy();const $=[];h.on("data",(I)=>{$.push(I)}),h.on("end",()=>{s(dg.concat($)),w.destroy()})}),w.end()})}var _3;var g3=G(()=>{_3=m(Ar(),1)});var x3=(r)=>Boolean(r)&&typeof r==="object"&&typeof r.AccessKeyId==="string"&&typeof r.SecretAccessKey==="string"&&typeof r.Token==="string"&&typeof r.Expiration==="string",e3=(r)=>({accessKeyId:r.AccessKeyId,secretAccessKey:r.SecretAccessKey,sessionToken:r.Token,expiration:new Date(r.Expiration),...r.AccountId&&{accountId:r.AccountId}});var bg=1000,_g=0,c1=({maxRetries:r=0,timeout:s=1000})=>({maxRetries:r,timeout:s});var b1=(r,s)=>{let f=r();for(let w=0;w<s;w++)f=f.catch(r);return f};import{parse as gg}from"url";var _1,n3="AWS_CONTAINER_CREDENTIALS_FULL_URI",o3="AWS_CONTAINER_CREDENTIALS_RELATIVE_URI",hT="AWS_CONTAINER_AUTHORIZATION_TOKEN",xg=(r={})=>{const{timeout:s,maxRetries:f}=c1(r);return()=>b1(async()=>{const w=await pg({logger:r.logger}),h=JSON.parse(await eg(s,w));if(!x3(h))throw new _1.CredentialsProviderError("Invalid response received from instance metadata service.",{logger:r.logger});return e3(h)},f)},eg=async(r,s)=>{if(process.env[hT])s.headers={...s.headers,Authorization:process.env[hT]};return(await u0({...s,timeout:r})).toString()},ng="169.254.170.2",og,ag,pg=async({logger:r})=>{if(process.env[o3])return{hostname:ng,path:process.env[o3]};if(process.env[n3]){const s=gg(process.env[n3]);if(!s.hostname||!(s.hostname in og))throw new _1.CredentialsProviderError(`${s.hostname} is not a valid container metadata service hostname`,{tryNextLink:!1,logger:r});if(!s.protocol||!(s.protocol in ag))throw new _1.CredentialsProviderError(`${s.protocol} is not a valid container metadata service protocol`,{tryNextLink:!1,logger:r});return{...s,port:s.port?parseInt(s.port,10):void 0}}throw new _1.CredentialsProviderError(`The container metadata credential provider cannot be used unless the ${o3} or ${n3} environment variable is set`,{tryNextLink:!1,logger:r})};var wP=G(()=>{_1=m(Ar(),1);g3();og={localhost:!0,"127.0.0.1":!0},ag={"http:":!0,"https:":!0}});var hP,a3;var EP=G(()=>{hP=m(Ar(),1);a3=class a3 extends hP.CredentialsProviderError{constructor(r,s=!0){super(r,s);this.tryNextLink=s,this.name="InstanceMetadataV1FallbackError",Object.setPrototypeOf(this,a3.prototype)}}});var Nw;var ET=G(()=>{(function(r){r.IPv4="http://169.254.169.254",r.IPv6="http://[fd00:ec2::254]"})(Nw||(Nw={}))});var $P;var IP=G(()=>{$P={environmentVariableSelector:(r)=>r.AWS_EC2_METADATA_SERVICE_ENDPOINT,configFileSelector:(r)=>r.ec2_metadata_service_endpoint,default:void 0}});var t0;var $T=G(()=>{(function(r){r.IPv4="IPv4",r.IPv6="IPv6"})(t0||(t0={}))});var ug="AWS_EC2_METADATA_SERVICE_ENDPOINT_MODE",tg="ec2_metadata_service_endpoint_mode",FP;var UP=G(()=>{$T();FP={environmentVariableSelector:(r)=>r[ug],configFileSelector:(r)=>r[tg],default:t0.IPv4}});var p3=async()=>br(await rx()||await fx()),rx=async()=>u($P)(),fx=async()=>{const r=await u(FP)();switch(r){case t0.IPv4:return Nw.IPv4;case t0.IPv6:return Nw.IPv6;default:throw new Error(`Unsupported endpoint mode: ${r}. Select from ${Object.values(t0)}`)}};var IT=G(()=>{Ns();n0();ET();IP();$T();UP()});var FT=(r,s)=>{const f=300+Math.floor(Math.random()*300),w=new Date(Date.now()+f*1000);s.warn(`Attempting credential expiration extension due to a credential service availability issue. A refresh of these credentials will be attempted after ${new Date(w)}.\nFor more information, please visit: https://docs.aws.amazon.com/sdkref/latest/guide/feature-static-credentials.html`);const h=r.originalExpiration??r.expiration;return{...r,...h?{originalExpiration:h}:{},expiration:w}};var TP=(r,s={})=>{const f=s?.logger||console;let w;return async()=>{let h;try{if(h=await r(),h.expiration&&h.expiration.getTime()<Date.now())h=FT(h,f)}catch(E){if(w)f.warn("Credential renew failed: ",E),h=FT(w,f);else throw E}return w=h,h}};var GP=()=>{};var TT,RP="/latest/meta-data/iam/security-credentials/",sx="/latest/api/token",UT="AWS_EC2_METADATA_V1_DISABLED",AP="ec2_metadata_v1_disabled",LP="x-aws-ec2-metadata-token",wx=(r={})=>TP(hx(r),{logger:r.logger}),hx=(r={})=>{let s=!1;const{logger:f,profile:w}=r,{timeout:h,maxRetries:E}=c1(r),$=async(I,F)=>{if(s||F.headers?.[LP]==null){let L=!1,S=!1;const z=await u({environmentVariableSelector:(Z)=>{const N=Z[UT];if(S=!!N&&N!=="false",N===void 0)throw new TT.CredentialsProviderError(`${UT} not set in env, checking config file next.`,{logger:r.logger});return S},configFileSelector:(Z)=>{const N=Z[AP];return L=!!N&&N!=="false",L},default:!1},{profile:w})();if(r.ec2MetadataV1Disabled||z){const Z=[];if(r.ec2MetadataV1Disabled)Z.push("credential provider initialization (runtime option ec2MetadataV1Disabled)");if(L)Z.push(`config file profile (${AP})`);if(S)Z.push(`process environment variable (${UT})`);throw new a3(`AWS EC2 Metadata v1 fallback has been blocked by AWS SDK configuration in the following: [${Z.join(", ")}].`)}}const A=(await b1(async()=>{let L;try{L=await $x(F)}catch(S){if(S.statusCode===401)s=!1;throw S}return L},I)).trim();return b1(async()=>{let L;try{L=await Ix(A,F,r)}catch(S){if(S.statusCode===401)s=!1;throw S}return L},I)};return async()=>{const I=await p3();if(s)return f?.debug("AWS SDK Instance Metadata","using v1 fallback (no token fetch)"),$(E,{...I,timeout:h});else{let F;try{F=(await Ex({...I,timeout:h})).toString()}catch(U){if(U?.statusCode===400)throw Object.assign(U,{message:"EC2 Metadata token request returned error"});else if(U.message==="TimeoutError"||[403,404,405].includes(U.statusCode))s=!0;return f?.debug("AWS SDK Instance Metadata","using v1 fallback (initial)"),$(E,{...I,timeout:h})}return $(E,{...I,headers:{[LP]:F},timeout:h})}}},Ex=async(r)=>u0({...r,path:sx,method:"PUT",headers:{"x-aws-ec2-metadata-token-ttl-seconds":"21600"}}),$x=async(r)=>(await u0({...r,path:RP})).toString(),Ix=async(r,s,f)=>{const w=JSON.parse((await u0({...s,path:RP+r})).toString());if(!x3(w))throw new TT.CredentialsProviderError("Invalid response received from instance metadata service.",{logger:f.logger});return e3(w)};var CP=G(()=>{Ns();TT=m(Ar(),1);EP();g3();IT();GP()});var WP=()=>{};var g1={};Ys(g1,{providerConfigFromInit:()=>c1,httpRequest:()=>u0,getInstanceMetadataEndpoint:()=>p3,fromInstanceMetadata:()=>wx,fromContainerMetadata:()=>xg,Endpoint:()=>Nw,ENV_CMDS_RELATIVE_URI:()=>o3,ENV_CMDS_FULL_URI:()=>n3,ENV_CMDS_AUTH_TOKEN:()=>hT,DEFAULT_TIMEOUT:()=>bg,DEFAULT_MAX_RETRIES:()=>_g});var x1=G(()=>{wP();CP();WP();g3();IT();ET()});var zP,Fx="169.254.170.2",Ux="169.254.170.23",Tx="[fd00:ec2::23]",SP=(r,s)=>{if(r.protocol==="https:")return;if(r.hostname===Fx||r.hostname===Ux||r.hostname===Tx)return;if(r.hostname.includes("[")){if(r.hostname==="[::1]"||r.hostname==="[0000:0000:0000:0000:0000:0000:0000:0001]")return}else{if(r.hostname==="localhost")return;const f=r.hostname.split("."),w=(h)=>{const E=parseInt(h,10);return 0<=E&&E<=255};if(f[0]==="127"&&w(f[1])&&w(f[2])&&w(f[3])&&f.length===4)return}throw new zP.CredentialsProviderError(`URL not accepted. It must either be HTTPS or match one of the following:
22
22
  - loopback CIDR 127.0.0.0/8 or [::1/128]
23
23
  - ECS container host 169.254.170.2
24
- - EKS container host 169.254.170.23 or [fd00:ec2::23]`,{logger:f})};var A7=G(()=>{Lr()});function W7(r){return new Qr({protocol:r.protocol,hostname:r.hostname,port:Number(r.port),path:r.pathname,query:Array.from(r.searchParams.entries()).reduce((f,[s,w])=>{return f[s]=w,f},{}),fragment:r.hash})}async function z7(r,f){const w=await R7.sdkStreamMixin(r.body).transformToString();if(r.statusCode===200){const h=JSON.parse(w);if(typeof h.AccessKeyId!=="string"||typeof h.SecretAccessKey!=="string"||typeof h.Token!=="string"||typeof h.Expiration!=="string")throw new g("HTTP credential provider response not of the required format, an object matching: { AccessKeyId: string, SecretAccessKey: string, Token: string, Expiration: string(rfc3339) }",{logger:f});return{accessKeyId:h.AccessKeyId,secretAccessKey:h.SecretAccessKey,sessionToken:h.Token,expiration:AX(h.Expiration)}}if(r.statusCode>=400&&r.statusCode<500){let h={};try{h=JSON.parse(w)}catch(E){}throw Object.assign(new g(`Server responded with status: ${r.statusCode}`,{logger:f}),{Code:h.Code,Message:h.Message})}throw new g(`Server responded with status: ${r.statusCode}`,{logger:f})}var R7;var S7=G(()=>{Lr();qr();Y();R7=u(g$(),1)});var P7=(r,f,s)=>{return async()=>{for(let w=0;w<f;++w)try{return await r()}catch(h){await new Promise((E)=>setTimeout(E,s))}return await r()}};import q_ from"fs/promises";var m_="AWS_CONTAINER_CREDENTIALS_RELATIVE_URI",v_="http://169.254.170.2",j_="AWS_CONTAINER_CREDENTIALS_FULL_URI",i_="AWS_CONTAINER_AUTHORIZATION_TOKEN_FILE",d_="AWS_CONTAINER_AUTHORIZATION_TOKEN",X7=(r={})=>{r.logger?.debug("@aws-sdk/credential-provider-http - fromHttp");let f;const s=r.awsContainerCredentialsRelativeUri??process.env[m_],w=r.awsContainerCredentialsFullUri??process.env[j_],h=r.awsContainerAuthorizationToken??process.env[d_],E=r.awsContainerAuthorizationTokenFile??process.env[i_],$=r.logger?.constructor?.name==="NoOpLogger"||!r.logger?console.warn:r.logger.warn;if(s&&w)$("@aws-sdk/credential-provider-http: you have set both awsContainerCredentialsRelativeUri and awsContainerCredentialsFullUri."),$("awsContainerCredentialsFullUri will take precedence.");if(h&&E)$("@aws-sdk/credential-provider-http: you have set both awsContainerAuthorizationToken and awsContainerAuthorizationTokenFile."),$("awsContainerAuthorizationToken will take precedence.");if(w)f=w;else if(s)f=`${v_}${s}`;else throw new g(`No HTTP credential provider host provided.
25
- Set AWS_CONTAINER_CREDENTIALS_FULL_URI or AWS_CONTAINER_CREDENTIALS_RELATIVE_URI.`,{logger:r.logger});const I=new URL(f);L7(I,r.logger);const F=new tr({requestTimeout:r.timeout??1000,connectionTimeout:r.timeout??1000});return P7(async()=>{const U=W7(I);if(h)U.headers.Authorization=h;else if(E)U.headers.Authorization=(await q_.readFile(E)).toString();try{const C=await F.handle(U);return z7(C.response)}catch(C){throw new g(String(C),{logger:r.logger})}},r.maxRetries??3,r.timeout??1000)};var Y7=G(()=>{lw();Lr();A7();S7()});var _U={};Af(_U,{fromHttp:()=>X7});var gU=G(()=>{Y7()});var O_="AWS_EC2_METADATA_DISABLED",K7=async(r)=>{const{ENV_CMDS_FULL_URI:f,ENV_CMDS_RELATIVE_URI:s,fromContainerMetadata:w,fromInstanceMetadata:h}=await Promise.resolve().then(() => (i1(),j1));if(process.env[s]||process.env[f]){r.logger?.debug("@aws-sdk/credential-provider-node - remoteProvider::fromHttp/fromContainerMetadata");const{fromHttp:E}=await Promise.resolve().then(() => (gU(),_U));return L0(E(r),w(r))}if(process.env[O_])return async()=>{throw new g("EC2 Instance Metadata Service access disabled",{logger:r.logger})};return r.logger?.debug("@aws-sdk/credential-provider-node - remoteProvider::fromInstanceMetadata"),h(r)};var Z7=G(()=>{Lr()});var xU=(r)=>r&&(typeof r.sso_start_url==="string"||typeof r.sso_account_id==="string"||typeof r.sso_session==="string"||typeof r.sso_region==="string"||typeof r.sso_role_name==="string");var M7=300000,zh="To refresh this SSO session run 'aws sso login' with the corresponding profile.";function b_(r){return{schemeId:"aws.auth#sigv4",signingProperties:{name:"sso-oauth",region:r.region},propertiesExtractor:(f,s)=>({signingProperties:{config:f,context:s}})}}function eU(r){return{schemeId:"smithy.api#noAuth"}}var J7,Q7=async(r,f,s)=>{return{operation:Ks(f).operation,region:await Nr(r.region)()||(()=>{throw new Error("expected `region` to be configured for `aws.auth#sigv4`")})()}},B7=(r)=>{const f=[];switch(r.operation){case"CreateToken":{f.push(eU(r));break}case"RegisterClient":{f.push(eU(r));break}case"StartDeviceAuthorization":{f.push(eU(r));break}default:f.push(b_(r))}return f},l7=(r)=>{return{...J7.resolveAwsSdkSigV4Config(r)}};var nU=G(()=>{J7=u(lr(),1);as()});var V7=(r)=>{return{...r,useDualstackEndpoint:r.useDualstackEndpoint??!1,useFipsEndpoint:r.useFipsEndpoint??!1,defaultSigningName:"sso-oauth"}},g0;var Sh=G(()=>{g0={UseFIPS:{type:"builtInParams",name:"useFipsEndpoint"},Endpoint:{type:"builtInParams",name:"endpoint"},Region:{type:"builtInParams",name:"region"},UseDualStack:{type:"builtInParams",name:"useDualstackEndpoint"}}});var D7;var H7=G(()=>{D7={name:"@aws-sdk/client-sso-oidc",description:"AWS SDK for JavaScript Sso Oidc Client for Node.js, Browser and React Native",version:"3.637.0",scripts:{build:"concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'","build:cjs":"node ../../scripts/compilation/inline client-sso-oidc","build:es":"tsc -p tsconfig.es.json","build:include:deps":"lerna run --scope $npm_package_name --include-dependencies build","build:types":"tsc -p tsconfig.types.json","build:types:downlevel":"downlevel-dts dist-types dist-types/ts3.4",clean:"rimraf ./dist-* && rimraf *.tsbuildinfo","extract:docs":"api-extractor run --local","generate:client":"node ../../scripts/generate-clients/single-service --solo sso-oidc"},main:"./dist-cjs/index.js",types:"./dist-types/index.d.ts",module:"./dist-es/index.js",sideEffects:!1,dependencies:{"@aws-crypto/sha256-browser":"5.2.0","@aws-crypto/sha256-js":"5.2.0","@aws-sdk/core":"3.635.0","@aws-sdk/credential-provider-node":"3.637.0","@aws-sdk/middleware-host-header":"3.620.0","@aws-sdk/middleware-logger":"3.609.0","@aws-sdk/middleware-recursion-detection":"3.620.0","@aws-sdk/middleware-user-agent":"3.637.0","@aws-sdk/region-config-resolver":"3.614.0","@aws-sdk/types":"3.609.0","@aws-sdk/util-endpoints":"3.637.0","@aws-sdk/util-user-agent-browser":"3.609.0","@aws-sdk/util-user-agent-node":"3.614.0","@smithy/config-resolver":"^3.0.5","@smithy/core":"^2.4.0","@smithy/fetch-http-handler":"^3.2.4","@smithy/hash-node":"^3.0.3","@smithy/invalid-dependency":"^3.0.3","@smithy/middleware-content-length":"^3.0.5","@smithy/middleware-endpoint":"^3.1.0","@smithy/middleware-retry":"^3.0.15","@smithy/middleware-serde":"^3.0.3","@smithy/middleware-stack":"^3.0.3","@smithy/node-config-provider":"^3.1.4","@smithy/node-http-handler":"^3.1.4","@smithy/protocol-http":"^4.1.0","@smithy/smithy-client":"^3.2.0","@smithy/types":"^3.3.0","@smithy/url-parser":"^3.0.3","@smithy/util-base64":"^3.0.0","@smithy/util-body-length-browser":"^3.0.0","@smithy/util-body-length-node":"^3.0.0","@smithy/util-defaults-mode-browser":"^3.0.15","@smithy/util-defaults-mode-node":"^3.0.15","@smithy/util-endpoints":"^2.0.5","@smithy/util-middleware":"^3.0.3","@smithy/util-retry":"^3.0.3","@smithy/util-utf8":"^3.0.0",tslib:"^2.6.2"},devDependencies:{"@tsconfig/node16":"16.1.3","@types/node":"^16.18.96",concurrently:"7.0.0","downlevel-dts":"0.10.1",rimraf:"3.0.2",typescript:"~4.9.5"},engines:{node:">=16.0.0"},typesVersions:{"<4.0":{"dist-types/*":["dist-types/ts3.4/*"]}},files:["dist-*/**"],author:{name:"AWS SDK for JavaScript Team",url:"https://aws.amazon.com/javascript/"},license:"Apache-2.0",peerDependencies:{"@aws-sdk/client-sts":"^3.637.0"},browser:{"./dist-es/runtimeConfig":"./dist-es/runtimeConfig.browser"},"react-native":{"./dist-es/runtimeConfig":"./dist-es/runtimeConfig.native"},homepage:"https://github.com/aws/aws-sdk-js-v3/tree/main/clients/client-sso-oidc",repository:{type:"git",url:"https://github.com/aws/aws-sdk-js-v3.git",directory:"clients/client-sso-oidc"}}});var oU;var aU=G(()=>{oU={isCrtAvailable:!1}});var k7=()=>{if(oU.isCrtAvailable)return["md/crt-avail"];return null};var N7=G(()=>{aU()});import{platform as __,release as g_}from"os";import{env as y7,versions as x_}from"process";var e_="AWS_SDK_UA_APP_ID",n_="sdk-ua-app-id",_f=({serviceId:r,clientVersion:f})=>{const s=[["aws-sdk-js",f],["ua","2.0"],[`os/${__()}`,g_()],["lang/js"],["md/nodejs",`${x_.node}`]],w=k7();if(w)s.push(w);if(r)s.push([`api/${r}`,f]);if(y7.AWS_EXECUTION_ENV)s.push([`exec-env/${y7.AWS_EXECUTION_ENV}`]);const h=t({environmentVariableSelector:($)=>$[e_],configFileSelector:($)=>$[n_],default:void 0})();let E=void 0;return async()=>{if(!E){const $=await h;E=$?[...s,[`app/${$}`]]:[...s]}return E}};var Ph=G(()=>{sf();N7();aU()});var q7=(r)=>typeof ArrayBuffer==="function"&&r instanceof ArrayBuffer||Object.prototype.toString.call(r)==="[object ArrayBuffer]";import{Buffer as pU}from"buffer";var Vw=(r,f=0,s=r.byteLength-f)=>{if(!q7(r))throw new TypeError(`The "input" argument must be ArrayBuffer. Received type ${typeof r} (${r})`);return pU.from(r,f,s)},Xh=(r,f)=>{if(typeof r!=="string")throw new TypeError(`The "input" argument must be of type string. Received type ${typeof r} (${r})`);return f?pU.from(r,f):pU.from(r)};var Yh=()=>{};var Us=(r)=>{const f=Xh(r,"utf8");return new Uint8Array(f.buffer,f.byteOffset,f.byteLength/Uint8Array.BYTES_PER_ELEMENT)};var uU=G(()=>{Yh()});var m7=(r)=>{if(typeof r==="string")return Us(r);if(ArrayBuffer.isView(r))return new Uint8Array(r.buffer,r.byteOffset,r.byteLength/Uint8Array.BYTES_PER_ELEMENT);return new Uint8Array(r)};var v7=G(()=>{uU()});var gf=(r)=>{if(typeof r==="string")return r;if(typeof r!=="object"||typeof r.byteOffset!=="number"||typeof r.byteLength!=="number")throw new Error("@smithy/util-utf8: toUtf8 encoder function only accepts string | Uint8Array.");return Vw(r.buffer,r.byteOffset,r.byteLength).toString("utf8")};var j7=G(()=>{Yh()});var x0=G(()=>{uU();v7();j7()});import{Buffer as o_}from"buffer";import{createHash as a_,createHmac as p_}from"crypto";function i7(r,f){if(o_.isBuffer(r))return r;if(typeof r==="string")return Xh(r,f);if(ArrayBuffer.isView(r))return Vw(r.buffer,r.byteOffset,r.byteLength);return Vw(r)}class wf{constructor(r,f){this.algorithmIdentifier=r,this.secret=f,this.reset()}update(r,f){this.hash.update(m7(i7(r,f)))}digest(){return Promise.resolve(this.hash.digest())}reset(){this.hash=this.secret?p_(this.algorithmIdentifier,i7(this.secret)):a_(this.algorithmIdentifier)}}var Kh=G(()=>{Yh();x0()});import{fstatSync as u_,lstatSync as t_}from"fs";var xf=(r)=>{if(!r)return 0;if(typeof r==="string")return Buffer.byteLength(r);else if(typeof r.byteLength==="number")return r.byteLength;else if(typeof r.size==="number")return r.size;else if(typeof r.start==="number"&&typeof r.end==="number")return r.end+1-r.start;else if(typeof r.path==="string"||Buffer.isBuffer(r.path))return t_(r.path).size;else if(typeof r.fd==="number")return u_(r.fd).size;throw new Error(`Body Length computation failed for ${r}`)};var d7=()=>{};var Zh=G(()=>{d7()});var rg,ef=(r)=>{if(r.length*3%4!==0)throw new TypeError("Incorrect padding on base64 string.");if(!rg.exec(r))throw new TypeError("Invalid base64 string.");const f=Xh(r,"base64");return new Uint8Array(f.buffer,f.byteOffset,f.byteLength)};var O7=G(()=>{Yh();rg=/^[A-Za-z0-9+/]*={0,2}$/});var nf=(r)=>{let f;if(typeof r==="string")f=Us(r);else f=r;if(typeof f!=="object"||typeof f.byteOffset!=="number"||typeof f.byteLength!=="number")throw new Error("@smithy/util-base64: toBase64 encoder function only accepts string | Uint8Array.");return Vw(f.buffer,f.byteOffset,f.byteLength).toString("base64")};var b7=G(()=>{Yh();x0()});var Mh=G(()=>{O7();b7()});var c7,_7,g7,p7,u7,Ns,x7,t7,e7,n7,o7,a7,sg,rZ;var sZ=G(()=>{c7={["required"]:!1,type:"String"},_7={["required"]:!0,default:!1,type:"Boolean"},g7={["ref"]:"Endpoint"},p7={["fn"]:"booleanEquals",["argv"]:[{["ref"]:"UseFIPS"},!0]},u7={["fn"]:"booleanEquals",["argv"]:[{["ref"]:"UseDualStack"},!0]},Ns={},x7={["fn"]:"getAttr",["argv"]:[{["ref"]:"PartitionResult"},"supportsFIPS"]},t7={["ref"]:"PartitionResult"},e7={["fn"]:"booleanEquals",["argv"]:[!0,{["fn"]:"getAttr",["argv"]:[t7,"supportsDualStack"]}]},n7=[p7],o7=[u7],a7=[{["ref"]:"Region"}],sg={version:"1.0",parameters:{Region:c7,UseDualStack:_7,UseFIPS:_7,Endpoint:c7},rules:[{conditions:[{["fn"]:"isSet",["argv"]:[g7]}],rules:[{conditions:n7,error:"Invalid Configuration: FIPS and custom endpoint are not supported",type:"error"},{conditions:o7,error:"Invalid Configuration: Dualstack and custom endpoint are not supported",type:"error"},{endpoint:{url:g7,properties:Ns,headers:Ns},type:"endpoint"}],type:"tree"},{conditions:[{["fn"]:"isSet",["argv"]:a7}],rules:[{conditions:[{["fn"]:"aws.partition",["argv"]:a7,assign:"PartitionResult"}],rules:[{conditions:[p7,u7],rules:[{conditions:[{["fn"]:"booleanEquals",["argv"]:[!0,x7]},e7],rules:[{endpoint:{url:"https://oidc-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:Ns,headers:Ns},type:"endpoint"}],type:"tree"},{error:"FIPS and DualStack are enabled, but this partition does not support one or both",type:"error"}],type:"tree"},{conditions:n7,rules:[{conditions:[{["fn"]:"booleanEquals",["argv"]:[x7,!0]}],rules:[{conditions:[{["fn"]:"stringEquals",["argv"]:[{["fn"]:"getAttr",["argv"]:[t7,"name"]},"aws-us-gov"]}],endpoint:{url:"https://oidc.{Region}.amazonaws.com",properties:Ns,headers:Ns},type:"endpoint"},{endpoint:{url:"https://oidc-fips.{Region}.{PartitionResult#dnsSuffix}",properties:Ns,headers:Ns},type:"endpoint"}],type:"tree"},{error:"FIPS is enabled but this partition does not support FIPS",type:"error"}],type:"tree"},{conditions:o7,rules:[{conditions:[e7],rules:[{endpoint:{url:"https://oidc.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:Ns,headers:Ns},type:"endpoint"}],type:"tree"},{error:"DualStack is enabled but this partition does not support DualStack",type:"error"}],type:"tree"},{endpoint:{url:"https://oidc.{Region}.{PartitionResult#dnsSuffix}",properties:Ns,headers:Ns},type:"endpoint"}],type:"tree"}],type:"tree"},{error:"Invalid Configuration: Missing Region",type:"error"}]},rZ=sg});var fZ=(r,f={})=>{return es(rZ,{endpointParams:r,logger:f.logger})};var wZ=G(()=>{Cw();ns();sZ();pr.aws=os});var hZ,EZ,$Z=(r)=>{return{apiVersion:"2019-06-10",base64Decoder:r?.base64Decoder??ef,base64Encoder:r?.base64Encoder??nf,disableHostPrefix:r?.disableHostPrefix??!1,endpointProvider:r?.endpointProvider??fZ,extensions:r?.extensions??[],httpAuthSchemeProvider:r?.httpAuthSchemeProvider??B7,httpAuthSchemes:r?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:(f)=>f.getIdentityProvider("aws.auth#sigv4"),signer:new hZ.AwsSdkSigV4Signer},{schemeId:"smithy.api#noAuth",identityProvider:(f)=>f.getIdentityProvider("smithy.api#noAuth")||(async()=>({})),signer:new EZ.NoAuthSigner}],logger:r?.logger??new Ls,serviceId:r?.serviceId??"SSO OIDC",urlParser:r?.urlParser??_r,utf8Decoder:r?.utf8Decoder??Us,utf8Encoder:r?.utf8Encoder??gf}};var IZ=G(()=>{hZ=u(lr(),1),EZ=u(Or(),1);Y();j0();Mh();x0();nU();wZ()});var FZ="AWS_EXECUTION_ENV",tU="AWS_REGION",rT="AWS_DEFAULT_REGION",UZ="AWS_EC2_METADATA_DISABLED",TZ,GZ="/latest/meta-data/placement/region";var CZ=G(()=>{TZ=["in-region","cross-region","mobile","standard","legacy"]});var LZ;var AZ=G(()=>{LZ={environmentVariableSelector:(r)=>{return r.AWS_DEFAULTS_MODE},configFileSelector:(r)=>{return r.defaults_mode},default:"legacy"}});var of=({region:r=t(Zs),defaultsMode:f=t(LZ)}={})=>Sw(async()=>{const s=typeof f==="function"?await f():f;switch(s?.toLowerCase()){case"auto":return fg(r);case"in-region":case"cross-region":case"mobile":case"standard":case"legacy":return Promise.resolve(s?.toLocaleLowerCase());case void 0:return Promise.resolve("legacy");default:throw new Error(`Invalid parameter for "defaultsMode", expect ${TZ.join(", ")}, got ${s}`)}}),fg=async(r)=>{if(r){const f=typeof r==="function"?await r():r,s=await wg();if(!s)return"standard";if(f===s)return"in-region";else return"cross-region"}return"standard"},wg=async()=>{if(process.env[FZ]&&(process.env[tU]||process.env[rT]))return process.env[tU]??process.env[rT];if(!process.env[UZ])try{const{getInstanceMetadataEndpoint:r,httpRequest:f}=await Promise.resolve().then(() => (i1(),j1)),s=await r();return(await f({...s,path:GZ})).toString()}catch(r){}};var RZ=G(()=>{Ms();sf();Lr();CZ();AZ()});var Jh=G(()=>{RZ()});var WZ,zZ=(r)=>{jf(process.version);const f=of(r),s=()=>f().then(vf),w=$Z(r);return WZ.emitWarningIfUnsupportedVersion(process.version),{...w,...r,runtime:"node",defaultsMode:f,bodyLengthChecker:r?.bodyLengthChecker??xf,credentialDefaultProvider:r?.credentialDefaultProvider??A0,defaultUserAgentProvider:r?.defaultUserAgentProvider??_f({serviceId:w.serviceId,clientVersion:D7.version}),maxAttempts:r?.maxAttempts??t(Df),region:r?.region??t(Zs,Jf),requestHandler:tr.create(r?.requestHandler??s),retryMode:r?.retryMode??t({...Nf,default:async()=>(await s()).retryMode||Ds}),sha256:r?.sha256??wf.bind(null,"sha256"),streamCollector:r?.streamCollector??cf,useDualstackEndpoint:r?.useDualstackEndpoint??t(Zf),useFipsEndpoint:r?.useFipsEndpoint??t(Mf)}};var SZ=G(()=>{H7();WZ=u(lr(),1);O1();Ph();Ms();Kh();ff();sf();lw();Zh();Cs();IZ();Y();Jh();Y()});var af=(r)=>{let f=async()=>{if(r.region===void 0)throw new Error("Region is missing from runtimeConfig");const s=r.region;if(typeof s==="string")return s;return s()};return{setRegion(s){f=s},region(){return f}}},pf=(r)=>{return{region:r.region()}};var PZ=()=>{};var XZ=()=>{};var YZ=G(()=>{XZ()});var KZ=G(()=>{PZ();YZ()});var Qh=G(()=>{KZ()});var ZZ=(r)=>{const f=r.httpAuthSchemes;let{httpAuthSchemeProvider:s,credentials:w}=r;return{setHttpAuthScheme(h){const E=f.findIndex(($)=>$.schemeId===h.schemeId);if(E===-1)f.push(h);else f.splice(E,1,h)},httpAuthSchemes(){return f},setHttpAuthSchemeProvider(h){s=h},httpAuthSchemeProvider(){return s},setCredentials(h){w=h},credentials(){return w}}},MZ=(r)=>{return{httpAuthSchemes:r.httpAuthSchemes(),httpAuthSchemeProvider:r.httpAuthSchemeProvider(),credentials:r.credentials()}};var d3=(r)=>r,JZ=(r,f)=>{const s={...d3(af(r)),...d3(df(r)),...d3(Rf(r)),...d3(ZZ(r))};return f.forEach((w)=>w.configure(s)),{...r,...pf(s),...Of(s),...Wf(s),...MZ(s)}};var QZ=G(()=>{Qh();qr();Y()});var Bh,O3;var sT=G(()=>{ew();nw();ow();pw();Ms();Bh=u(Or(),1);Ih();B();ff();Y();nU();Sh();SZ();QZ();O3=class O3 extends As{constructor(...[r]){const f=zZ(r||{}),s=V7(f),w=Yf(s),h=kf(w),E=Qf(h),$=zf(E),I=Vf($),F=l7(I),U=JZ(F,r?.extensions||[]);super(U);this.config=U,this.middlewareStack.use(Kf(this.config)),this.middlewareStack.use(bf(this.config)),this.middlewareStack.use(lf(this.config)),this.middlewareStack.use(Sf(this.config)),this.middlewareStack.use(Pf(this.config)),this.middlewareStack.use(Xf(this.config)),this.middlewareStack.use(Bh.getHttpAuthSchemeEndpointRuleSetPlugin(this.config,{httpAuthSchemeParametersProvider:Q7,identityProviderConfigProvider:async(C)=>new Bh.DefaultIdentityProviderConfig({"aws.auth#sigv4":C.credentials})})),this.middlewareStack.use(Bh.getHttpSigningPlugin(this.config))}destroy(){super.destroy()}}});var Vr;var b3=G(()=>{Y();Vr=class Vr extends ks{constructor(r){super(r);Object.setPrototypeOf(this,Vr.prototype)}}});var b1,c1,_1,g1,x1,e1,n1,o1,a1,p1,u1,t1,rE,sE,fT=(r)=>({...r,...r.clientSecret&&{clientSecret:o},...r.refreshToken&&{refreshToken:o},...r.codeVerifier&&{codeVerifier:o}}),wT=(r)=>({...r,...r.accessToken&&{accessToken:o},...r.refreshToken&&{refreshToken:o},...r.idToken&&{idToken:o}}),hT=(r)=>({...r,...r.refreshToken&&{refreshToken:o},...r.assertion&&{assertion:o},...r.subjectToken&&{subjectToken:o},...r.codeVerifier&&{codeVerifier:o}}),ET=(r)=>({...r,...r.accessToken&&{accessToken:o},...r.refreshToken&&{refreshToken:o},...r.idToken&&{idToken:o}}),$T=(r)=>({...r,...r.clientSecret&&{clientSecret:o}}),IT=(r)=>({...r,...r.clientSecret&&{clientSecret:o}});var Hw=G(()=>{Y();b3();b1=class b1 extends Vr{constructor(r){super({name:"AccessDeniedException",$fault:"client",...r});this.name="AccessDeniedException",this.$fault="client",Object.setPrototypeOf(this,b1.prototype),this.error=r.error,this.error_description=r.error_description}};c1=class c1 extends Vr{constructor(r){super({name:"AuthorizationPendingException",$fault:"client",...r});this.name="AuthorizationPendingException",this.$fault="client",Object.setPrototypeOf(this,c1.prototype),this.error=r.error,this.error_description=r.error_description}};_1=class _1 extends Vr{constructor(r){super({name:"ExpiredTokenException",$fault:"client",...r});this.name="ExpiredTokenException",this.$fault="client",Object.setPrototypeOf(this,_1.prototype),this.error=r.error,this.error_description=r.error_description}};g1=class g1 extends Vr{constructor(r){super({name:"InternalServerException",$fault:"server",...r});this.name="InternalServerException",this.$fault="server",Object.setPrototypeOf(this,g1.prototype),this.error=r.error,this.error_description=r.error_description}};x1=class x1 extends Vr{constructor(r){super({name:"InvalidClientException",$fault:"client",...r});this.name="InvalidClientException",this.$fault="client",Object.setPrototypeOf(this,x1.prototype),this.error=r.error,this.error_description=r.error_description}};e1=class e1 extends Vr{constructor(r){super({name:"InvalidGrantException",$fault:"client",...r});this.name="InvalidGrantException",this.$fault="client",Object.setPrototypeOf(this,e1.prototype),this.error=r.error,this.error_description=r.error_description}};n1=class n1 extends Vr{constructor(r){super({name:"InvalidRequestException",$fault:"client",...r});this.name="InvalidRequestException",this.$fault="client",Object.setPrototypeOf(this,n1.prototype),this.error=r.error,this.error_description=r.error_description}};o1=class o1 extends Vr{constructor(r){super({name:"InvalidScopeException",$fault:"client",...r});this.name="InvalidScopeException",this.$fault="client",Object.setPrototypeOf(this,o1.prototype),this.error=r.error,this.error_description=r.error_description}};a1=class a1 extends Vr{constructor(r){super({name:"SlowDownException",$fault:"client",...r});this.name="SlowDownException",this.$fault="client",Object.setPrototypeOf(this,a1.prototype),this.error=r.error,this.error_description=r.error_description}};p1=class p1 extends Vr{constructor(r){super({name:"UnauthorizedClientException",$fault:"client",...r});this.name="UnauthorizedClientException",this.$fault="client",Object.setPrototypeOf(this,p1.prototype),this.error=r.error,this.error_description=r.error_description}};u1=class u1 extends Vr{constructor(r){super({name:"UnsupportedGrantTypeException",$fault:"client",...r});this.name="UnsupportedGrantTypeException",this.$fault="client",Object.setPrototypeOf(this,u1.prototype),this.error=r.error,this.error_description=r.error_description}};t1=class t1 extends Vr{constructor(r){super({name:"InvalidRequestRegionException",$fault:"client",...r});this.name="InvalidRequestRegionException",this.$fault="client",Object.setPrototypeOf(this,t1.prototype),this.error=r.error,this.error_description=r.error_description,this.endpoint=r.endpoint,this.region=r.region}};rE=class rE extends Vr{constructor(r){super({name:"InvalidClientMetadataException",$fault:"client",...r});this.name="InvalidClientMetadataException",this.$fault="client",Object.setPrototypeOf(this,rE.prototype),this.error=r.error,this.error_description=r.error_description}};sE=class sE extends Vr{constructor(r){super({name:"InvalidRedirectUriException",$fault:"client",...r});this.name="InvalidRedirectUriException",this.$fault="client",Object.setPrototypeOf(this,sE.prototype),this.error=r.error,this.error_description=r.error_description}}});var R0,fE,BZ=async(r,f)=>{const s=fE.requestBuilder(r,f),w={"content-type":"application/json"};s.bp("/token");let h;return h=JSON.stringify(p(r,{clientId:[],clientSecret:[],code:[],codeVerifier:[],deviceCode:[],grantType:[],redirectUri:[],refreshToken:[],scope:(E)=>q(E)})),s.m("POST").h(w).b(h),s.build()},lZ=async(r,f)=>{const s=fE.requestBuilder(r,f),w={"content-type":"application/json"};s.bp("/token");const h=P({[Xg]:[,"t"]});let E;return E=JSON.stringify(p(r,{assertion:[],clientId:[],code:[],codeVerifier:[],grantType:[],redirectUri:[],refreshToken:[],requestedTokenType:[],scope:($)=>q($),subjectToken:[],subjectTokenType:[]})),s.m("POST").h(w).q(h).b(E),s.build()},VZ=async(r,f)=>{const s=fE.requestBuilder(r,f),w={"content-type":"application/json"};s.bp("/client/register");let h;return h=JSON.stringify(p(r,{clientName:[],clientType:[],entitledApplicationArn:[],grantTypes:(E)=>q(E),issuerUrl:[],redirectUris:(E)=>q(E),scopes:(E)=>q(E)})),s.m("POST").h(w).b(h),s.build()},HZ=async(r,f)=>{const s=fE.requestBuilder(r,f),w={"content-type":"application/json"};s.bp("/device_authorization");let h;return h=JSON.stringify(p(r,{clientId:[],clientSecret:[],startUrl:[]})),s.m("POST").h(w).b(h),s.build()},DZ=async(r,f)=>{if(r.statusCode!==200&&r.statusCode>=300)return c3(r,f);const s=P({$metadata:vr(r)}),w=y(d(await R0.parseJsonBody(r.body,f)),"body"),h=p(w,{accessToken:T,expiresIn:Kw,idToken:T,refreshToken:T,tokenType:T});return Object.assign(s,h),s},kZ=async(r,f)=>{if(r.statusCode!==200&&r.statusCode>=300)return c3(r,f);const s=P({$metadata:vr(r)}),w=y(d(await R0.parseJsonBody(r.body,f)),"body"),h=p(w,{accessToken:T,expiresIn:Kw,idToken:T,issuedTokenType:T,refreshToken:T,scope:q,tokenType:T});return Object.assign(s,h),s},NZ=async(r,f)=>{if(r.statusCode!==200&&r.statusCode>=300)return c3(r,f);const s=P({$metadata:vr(r)}),w=y(d(await R0.parseJsonBody(r.body,f)),"body"),h=p(w,{authorizationEndpoint:T,clientId:T,clientIdIssuedAt:Lh,clientSecret:T,clientSecretExpiresAt:Lh,tokenEndpoint:T});return Object.assign(s,h),s},yZ=async(r,f)=>{if(r.statusCode!==200&&r.statusCode>=300)return c3(r,f);const s=P({$metadata:vr(r)}),w=y(d(await R0.parseJsonBody(r.body,f)),"body"),h=p(w,{deviceCode:T,expiresIn:Kw,interval:Kw,userCode:T,verificationUri:T,verificationUriComplete:T});return Object.assign(s,h),s},c3=async(r,f)=>{const s={...r,body:await R0.parseJsonErrorBody(r.body,f)},w=R0.loadRestJsonErrorCode(r,s.body);switch(w){case"AccessDeniedException":case"com.amazonaws.ssooidc#AccessDeniedException":throw await $g(s,f);case"AuthorizationPendingException":case"com.amazonaws.ssooidc#AuthorizationPendingException":throw await Ig(s,f);case"ExpiredTokenException":case"com.amazonaws.ssooidc#ExpiredTokenException":throw await Fg(s,f);case"InternalServerException":case"com.amazonaws.ssooidc#InternalServerException":throw await Ug(s,f);case"InvalidClientException":case"com.amazonaws.ssooidc#InvalidClientException":throw await Tg(s,f);case"InvalidGrantException":case"com.amazonaws.ssooidc#InvalidGrantException":throw await Cg(s,f);case"InvalidRequestException":case"com.amazonaws.ssooidc#InvalidRequestException":throw await Ag(s,f);case"InvalidScopeException":case"com.amazonaws.ssooidc#InvalidScopeException":throw await Wg(s,f);case"SlowDownException":case"com.amazonaws.ssooidc#SlowDownException":throw await zg(s,f);case"UnauthorizedClientException":case"com.amazonaws.ssooidc#UnauthorizedClientException":throw await Sg(s,f);case"UnsupportedGrantTypeException":case"com.amazonaws.ssooidc#UnsupportedGrantTypeException":throw await Pg(s,f);case"InvalidRequestRegionException":case"com.amazonaws.ssooidc#InvalidRequestRegionException":throw await Rg(s,f);case"InvalidClientMetadataException":case"com.amazonaws.ssooidc#InvalidClientMetadataException":throw await Gg(s,f);case"InvalidRedirectUriException":case"com.amazonaws.ssooidc#InvalidRedirectUriException":throw await Lg(s,f);default:const h=s.body;return Eg({output:r,parsedBody:h,errorCode:w})}},Eg,$g=async(r,f)=>{const s=P({}),w=r.body,h=p(w,{error:T,error_description:T});Object.assign(s,h);const E=new b1({$metadata:vr(r),...s});return D(E,r.body)},Ig=async(r,f)=>{const s=P({}),w=r.body,h=p(w,{error:T,error_description:T});Object.assign(s,h);const E=new c1({$metadata:vr(r),...s});return D(E,r.body)},Fg=async(r,f)=>{const s=P({}),w=r.body,h=p(w,{error:T,error_description:T});Object.assign(s,h);const E=new _1({$metadata:vr(r),...s});return D(E,r.body)},Ug=async(r,f)=>{const s=P({}),w=r.body,h=p(w,{error:T,error_description:T});Object.assign(s,h);const E=new g1({$metadata:vr(r),...s});return D(E,r.body)},Tg=async(r,f)=>{const s=P({}),w=r.body,h=p(w,{error:T,error_description:T});Object.assign(s,h);const E=new x1({$metadata:vr(r),...s});return D(E,r.body)},Gg=async(r,f)=>{const s=P({}),w=r.body,h=p(w,{error:T,error_description:T});Object.assign(s,h);const E=new rE({$metadata:vr(r),...s});return D(E,r.body)},Cg=async(r,f)=>{const s=P({}),w=r.body,h=p(w,{error:T,error_description:T});Object.assign(s,h);const E=new e1({$metadata:vr(r),...s});return D(E,r.body)},Lg=async(r,f)=>{const s=P({}),w=r.body,h=p(w,{error:T,error_description:T});Object.assign(s,h);const E=new sE({$metadata:vr(r),...s});return D(E,r.body)},Ag=async(r,f)=>{const s=P({}),w=r.body,h=p(w,{error:T,error_description:T});Object.assign(s,h);const E=new n1({$metadata:vr(r),...s});return D(E,r.body)},Rg=async(r,f)=>{const s=P({}),w=r.body,h=p(w,{endpoint:T,error:T,error_description:T,region:T});Object.assign(s,h);const E=new t1({$metadata:vr(r),...s});return D(E,r.body)},Wg=async(r,f)=>{const s=P({}),w=r.body,h=p(w,{error:T,error_description:T});Object.assign(s,h);const E=new o1({$metadata:vr(r),...s});return D(E,r.body)},zg=async(r,f)=>{const s=P({}),w=r.body,h=p(w,{error:T,error_description:T});Object.assign(s,h);const E=new a1({$metadata:vr(r),...s});return D(E,r.body)},Sg=async(r,f)=>{const s=P({}),w=r.body,h=p(w,{error:T,error_description:T});Object.assign(s,h);const E=new p1({$metadata:vr(r),...s});return D(E,r.body)},Pg=async(r,f)=>{const s=P({}),w=r.body,h=p(w,{error:T,error_description:T});Object.assign(s,h);const E=new u1({$metadata:vr(r),...s});return D(E,r.body)},vr=(r)=>({httpStatusCode:r.statusCode,requestId:r.headers["x-amzn-requestid"]??r.headers["x-amzn-request-id"]??r.headers["x-amz-request-id"],extendedRequestId:r.headers["x-amz-id-2"],cfId:r.headers["x-amz-cf-id"]}),Xg="aws_iam";var wE=G(()=>{R0=u(lr(),1),fE=u(Or(),1);Y();Hw();b3();Eg=mf(Vr)});var _3;var FT=G(()=>{B();V();Y();Sh();Hw();wE();_3=class _3 extends A.classBuilder().ep({...g0}).m(function(r,f,s,w){return[R(s,this.serialize,this.deserialize),W(s,r.getEndpointParameterInstructions())]}).s("AWSSSOOIDCService","CreateToken",{}).n("SSOOIDCClient","CreateTokenCommand").f(fT,wT).ser(BZ).de(DZ).build(){}});var g3;var UT=G(()=>{B();V();Y();Sh();Hw();wE();g3=class g3 extends A.classBuilder().ep({...g0}).m(function(r,f,s,w){return[R(s,this.serialize,this.deserialize),W(s,r.getEndpointParameterInstructions())]}).s("AWSSSOOIDCService","CreateTokenWithIAM",{}).n("SSOOIDCClient","CreateTokenWithIAMCommand").f(hT,ET).ser(lZ).de(kZ).build(){}});var x3;var TT=G(()=>{B();V();Y();Sh();Hw();wE();x3=class x3 extends A.classBuilder().ep({...g0}).m(function(r,f,s,w){return[R(s,this.serialize,this.deserialize),W(s,r.getEndpointParameterInstructions())]}).s("AWSSSOOIDCService","RegisterClient",{}).n("SSOOIDCClient","RegisterClientCommand").f(void 0,$T).ser(VZ).de(NZ).build(){}});var e3;var GT=G(()=>{B();V();Y();Sh();Hw();wE();e3=class e3 extends A.classBuilder().ep({...g0}).m(function(r,f,s,w){return[R(s,this.serialize,this.deserialize),W(s,r.getEndpointParameterInstructions())]}).s("AWSSSOOIDCService","StartDeviceAuthorization",{}).n("SSOOIDCClient","StartDeviceAuthorizationCommand").f(IT,void 0).ser(HZ).de(yZ).build(){}});var Yg,CT;var qZ=G(()=>{Y();FT();UT();TT();GT();sT();Yg={CreateTokenCommand:_3,CreateTokenWithIAMCommand:g3,RegisterClientCommand:x3,StartDeviceAuthorizationCommand:e3};CT=class CT extends O3{};yf(Yg,CT)});var mZ=G(()=>{FT();UT();TT();GT()});var vZ=G(()=>{Hw()});var LT={};Af(LT,{__Client:()=>As,UnsupportedGrantTypeException:()=>u1,UnauthorizedClientException:()=>p1,StartDeviceAuthorizationRequestFilterSensitiveLog:()=>IT,StartDeviceAuthorizationCommand:()=>e3,SlowDownException:()=>a1,SSOOIDCServiceException:()=>Vr,SSOOIDCClient:()=>O3,SSOOIDC:()=>CT,RegisterClientResponseFilterSensitiveLog:()=>$T,RegisterClientCommand:()=>x3,InvalidScopeException:()=>o1,InvalidRequestRegionException:()=>t1,InvalidRequestException:()=>n1,InvalidRedirectUriException:()=>sE,InvalidGrantException:()=>e1,InvalidClientMetadataException:()=>rE,InvalidClientException:()=>x1,InternalServerException:()=>g1,ExpiredTokenException:()=>_1,CreateTokenWithIAMResponseFilterSensitiveLog:()=>ET,CreateTokenWithIAMRequestFilterSensitiveLog:()=>hT,CreateTokenWithIAMCommand:()=>g3,CreateTokenResponseFilterSensitiveLog:()=>wT,CreateTokenRequestFilterSensitiveLog:()=>fT,CreateTokenCommand:()=>_3,AuthorizationPendingException:()=>c1,AccessDeniedException:()=>b1,$Command:()=>A});var AT=G(()=>{sT();qZ();mZ();vZ();b3()});var RT,jZ=async(r)=>{const{SSOOIDCClient:f}=await Promise.resolve().then(() => (AT(),LT));if(RT[r])return RT[r];const s=new f({region:r});return RT[r]=s,s};var iZ=G(()=>{RT={}});var dZ=async(r,f)=>{const{CreateTokenCommand:s}=await Promise.resolve().then(() => (AT(),LT));return(await jZ(f)).send(new s({clientId:r.clientId,clientSecret:r.clientSecret,refreshToken:r.refreshToken,grantType:"refresh_token"}))};var OZ=G(()=>{iZ()});var WT=(r)=>{if(r.expiration&&r.expiration.getTime()<Date.now())throw new Is(`Token is expired. ${zh}`,!1)};var bZ=G(()=>{Lr()});var e0=(r,f,s=!1)=>{if(typeof f==="undefined")throw new Is(`Value not present for '${r}' in SSO Token${s?". Cannot refresh":""}. ${zh}`,!1)};var cZ=G(()=>{Lr()});import{promises as Kg}from"fs";var Zg,_Z=(r,f)=>{const s=s3(r),w=JSON.stringify(f,null,2);return Zg(s,w)};var gZ=G(()=>{rf();({writeFile:Zg}=Kg)});var xZ,eZ=(r={})=>async()=>{r.logger?.debug("@aws-sdk/token-providers - fromSso");const f=await v0(r),s=ls(r),w=f[s];if(!w)throw new Is(`Profile '${s}' could not be found in shared credentials file.`,!1);else if(!w.sso_session)throw new Is(`Profile '${s}' is missing required property 'sso_session'.`);const h=w.sso_session,$=(await E3(r))[h];if(!$)throw new Is(`Sso session '${h}' could not be found in shared credentials file.`,!1);for(let S of["sso_start_url","sso_region"])if(!$[S])throw new Is(`Sso session '${h}' is missing required property '${S}'.`,!1);const{sso_start_url:I,sso_region:F}=$;let U;try{U=await f3(h)}catch(S){throw new Is(`The SSO session token associated with profile=${s} was not found or is invalid. ${zh}`,!1)}e0("accessToken",U.accessToken),e0("expiresAt",U.expiresAt);const{accessToken:C,expiresAt:L}=U,z={token:C,expiration:new Date(L)};if(z.expiration.getTime()-Date.now()>M7)return z;if(Date.now()-xZ.getTime()<30000)return WT(z),z;e0("clientId",U.clientId,!0),e0("clientSecret",U.clientSecret,!0),e0("refreshToken",U.refreshToken,!0);try{xZ.setTime(Date.now());const S=await dZ(U,F);e0("accessToken",S.accessToken),e0("expiresIn",S.expiresIn);const K=new Date(Date.now()+S.expiresIn*1000);try{await _Z(h,{...U,accessToken:S.accessToken,expiresAt:K.toISOString(),refreshToken:S.refreshToken})}catch(k){}return{token:S.accessToken,expiration:K}}catch(S){return WT(z),z}};var nZ=G(()=>{Lr();rf();OZ();bZ();cZ();gZ();xZ=new Date(0)});var oZ=G(()=>{Lr()});var aZ=G(()=>{Lr()});var pZ=G(()=>{nZ();oZ();aZ()});function Mg(r){return{schemeId:"aws.auth#sigv4",signingProperties:{name:"awsssoportal",region:r.region},propertiesExtractor:(f,s)=>({signingProperties:{config:f,context:s}})}}function n3(r){return{schemeId:"smithy.api#noAuth"}}var uZ,tZ=async(r,f,s)=>{return{operation:Ks(f).operation,region:await Nr(r.region)()||(()=>{throw new Error("expected `region` to be configured for `aws.auth#sigv4`")})()}},r9=(r)=>{const f=[];switch(r.operation){case"GetRoleCredentials":{f.push(n3(r));break}case"ListAccountRoles":{f.push(n3(r));break}case"ListAccounts":{f.push(n3(r));break}case"Logout":{f.push(n3(r));break}default:f.push(Mg(r))}return f},s9=(r)=>{return{...uZ.resolveAwsSdkSigV4Config(r)}};var zT=G(()=>{uZ=u(lr(),1);as()});var f9=(r)=>{return{...r,useDualstackEndpoint:r.useDualstackEndpoint??!1,useFipsEndpoint:r.useFipsEndpoint??!1,defaultSigningName:"awsssoportal"}},n0;var lh=G(()=>{n0={UseFIPS:{type:"builtInParams",name:"useFipsEndpoint"},Endpoint:{type:"builtInParams",name:"endpoint"},Region:{type:"builtInParams",name:"region"},UseDualStack:{type:"builtInParams",name:"useDualstackEndpoint"}}});var h9;var w9=G(()=>{h9={name:"@aws-sdk/client-sso",description:"AWS SDK for JavaScript Sso Client for Node.js, Browser and React Native",version:"3.637.0",scripts:{build:"concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'","build:cjs":"node ../../scripts/compilation/inline client-sso","build:es":"tsc -p tsconfig.es.json","build:include:deps":"lerna run --scope $npm_package_name --include-dependencies build","build:types":"tsc -p tsconfig.types.json","build:types:downlevel":"downlevel-dts dist-types dist-types/ts3.4",clean:"rimraf ./dist-* && rimraf *.tsbuildinfo","extract:docs":"api-extractor run --local","generate:client":"node ../../scripts/generate-clients/single-service --solo sso"},main:"./dist-cjs/index.js",types:"./dist-types/index.d.ts",module:"./dist-es/index.js",sideEffects:!1,dependencies:{"@aws-crypto/sha256-browser":"5.2.0","@aws-crypto/sha256-js":"5.2.0","@aws-sdk/core":"3.635.0","@aws-sdk/middleware-host-header":"3.620.0","@aws-sdk/middleware-logger":"3.609.0","@aws-sdk/middleware-recursion-detection":"3.620.0","@aws-sdk/middleware-user-agent":"3.637.0","@aws-sdk/region-config-resolver":"3.614.0","@aws-sdk/types":"3.609.0","@aws-sdk/util-endpoints":"3.637.0","@aws-sdk/util-user-agent-browser":"3.609.0","@aws-sdk/util-user-agent-node":"3.614.0","@smithy/config-resolver":"^3.0.5","@smithy/core":"^2.4.0","@smithy/fetch-http-handler":"^3.2.4","@smithy/hash-node":"^3.0.3","@smithy/invalid-dependency":"^3.0.3","@smithy/middleware-content-length":"^3.0.5","@smithy/middleware-endpoint":"^3.1.0","@smithy/middleware-retry":"^3.0.15","@smithy/middleware-serde":"^3.0.3","@smithy/middleware-stack":"^3.0.3","@smithy/node-config-provider":"^3.1.4","@smithy/node-http-handler":"^3.1.4","@smithy/protocol-http":"^4.1.0","@smithy/smithy-client":"^3.2.0","@smithy/types":"^3.3.0","@smithy/url-parser":"^3.0.3","@smithy/util-base64":"^3.0.0","@smithy/util-body-length-browser":"^3.0.0","@smithy/util-body-length-node":"^3.0.0","@smithy/util-defaults-mode-browser":"^3.0.15","@smithy/util-defaults-mode-node":"^3.0.15","@smithy/util-endpoints":"^2.0.5","@smithy/util-middleware":"^3.0.3","@smithy/util-retry":"^3.0.3","@smithy/util-utf8":"^3.0.0",tslib:"^2.6.2"},devDependencies:{"@tsconfig/node16":"16.1.3","@types/node":"^16.18.96",concurrently:"7.0.0","downlevel-dts":"0.10.1",rimraf:"3.0.2",typescript:"~4.9.5"},engines:{node:">=16.0.0"},typesVersions:{"<4.0":{"dist-types/*":["dist-types/ts3.4/*"]}},files:["dist-*/**"],author:{name:"AWS SDK for JavaScript Team",url:"https://aws.amazon.com/javascript/"},license:"Apache-2.0",browser:{"./dist-es/runtimeConfig":"./dist-es/runtimeConfig.browser"},"react-native":{"./dist-es/runtimeConfig":"./dist-es/runtimeConfig.native"},homepage:"https://github.com/aws/aws-sdk-js-v3/tree/main/clients/client-sso",repository:{type:"git",url:"https://github.com/aws/aws-sdk-js-v3.git",directory:"clients/client-sso"}}});var E9,$9,I9,L9,A9,ys,F9,R9,U9,T9,G9,C9,Qg,W9;var z9=G(()=>{E9={["required"]:!1,type:"String"},$9={["required"]:!0,default:!1,type:"Boolean"},I9={["ref"]:"Endpoint"},L9={["fn"]:"booleanEquals",["argv"]:[{["ref"]:"UseFIPS"},!0]},A9={["fn"]:"booleanEquals",["argv"]:[{["ref"]:"UseDualStack"},!0]},ys={},F9={["fn"]:"getAttr",["argv"]:[{["ref"]:"PartitionResult"},"supportsFIPS"]},R9={["ref"]:"PartitionResult"},U9={["fn"]:"booleanEquals",["argv"]:[!0,{["fn"]:"getAttr",["argv"]:[R9,"supportsDualStack"]}]},T9=[L9],G9=[A9],C9=[{["ref"]:"Region"}],Qg={version:"1.0",parameters:{Region:E9,UseDualStack:$9,UseFIPS:$9,Endpoint:E9},rules:[{conditions:[{["fn"]:"isSet",["argv"]:[I9]}],rules:[{conditions:T9,error:"Invalid Configuration: FIPS and custom endpoint are not supported",type:"error"},{conditions:G9,error:"Invalid Configuration: Dualstack and custom endpoint are not supported",type:"error"},{endpoint:{url:I9,properties:ys,headers:ys},type:"endpoint"}],type:"tree"},{conditions:[{["fn"]:"isSet",["argv"]:C9}],rules:[{conditions:[{["fn"]:"aws.partition",["argv"]:C9,assign:"PartitionResult"}],rules:[{conditions:[L9,A9],rules:[{conditions:[{["fn"]:"booleanEquals",["argv"]:[!0,F9]},U9],rules:[{endpoint:{url:"https://portal.sso-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:ys,headers:ys},type:"endpoint"}],type:"tree"},{error:"FIPS and DualStack are enabled, but this partition does not support one or both",type:"error"}],type:"tree"},{conditions:T9,rules:[{conditions:[{["fn"]:"booleanEquals",["argv"]:[F9,!0]}],rules:[{conditions:[{["fn"]:"stringEquals",["argv"]:[{["fn"]:"getAttr",["argv"]:[R9,"name"]},"aws-us-gov"]}],endpoint:{url:"https://portal.sso.{Region}.amazonaws.com",properties:ys,headers:ys},type:"endpoint"},{endpoint:{url:"https://portal.sso-fips.{Region}.{PartitionResult#dnsSuffix}",properties:ys,headers:ys},type:"endpoint"}],type:"tree"},{error:"FIPS is enabled but this partition does not support FIPS",type:"error"}],type:"tree"},{conditions:G9,rules:[{conditions:[U9],rules:[{endpoint:{url:"https://portal.sso.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:ys,headers:ys},type:"endpoint"}],type:"tree"},{error:"DualStack is enabled but this partition does not support DualStack",type:"error"}],type:"tree"},{endpoint:{url:"https://portal.sso.{Region}.{PartitionResult#dnsSuffix}",properties:ys,headers:ys},type:"endpoint"}],type:"tree"}],type:"tree"},{error:"Invalid Configuration: Missing Region",type:"error"}]},W9=Qg});var S9=(r,f={})=>{return es(W9,{endpointParams:r,logger:f.logger})};var P9=G(()=>{Cw();ns();z9();pr.aws=os});var X9,Y9,K9=(r)=>{return{apiVersion:"2019-06-10",base64Decoder:r?.base64Decoder??ef,base64Encoder:r?.base64Encoder??nf,disableHostPrefix:r?.disableHostPrefix??!1,endpointProvider:r?.endpointProvider??S9,extensions:r?.extensions??[],httpAuthSchemeProvider:r?.httpAuthSchemeProvider??r9,httpAuthSchemes:r?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:(f)=>f.getIdentityProvider("aws.auth#sigv4"),signer:new X9.AwsSdkSigV4Signer},{schemeId:"smithy.api#noAuth",identityProvider:(f)=>f.getIdentityProvider("smithy.api#noAuth")||(async()=>({})),signer:new Y9.NoAuthSigner}],logger:r?.logger??new Ls,serviceId:r?.serviceId??"SSO",urlParser:r?.urlParser??_r,utf8Decoder:r?.utf8Decoder??Us,utf8Encoder:r?.utf8Encoder??gf}};var Z9=G(()=>{X9=u(lr(),1),Y9=u(Or(),1);Y();j0();Mh();x0();zT();P9()});var M9,J9=(r)=>{jf(process.version);const f=of(r),s=()=>f().then(vf),w=K9(r);return M9.emitWarningIfUnsupportedVersion(process.version),{...w,...r,runtime:"node",defaultsMode:f,bodyLengthChecker:r?.bodyLengthChecker??xf,defaultUserAgentProvider:r?.defaultUserAgentProvider??_f({serviceId:w.serviceId,clientVersion:h9.version}),maxAttempts:r?.maxAttempts??t(Df),region:r?.region??t(Zs,Jf),requestHandler:tr.create(r?.requestHandler??s),retryMode:r?.retryMode??t({...Nf,default:async()=>(await s()).retryMode||Ds}),sha256:r?.sha256??wf.bind(null,"sha256"),streamCollector:r?.streamCollector??cf,useDualstackEndpoint:r?.useDualstackEndpoint??t(Zf),useFipsEndpoint:r?.useFipsEndpoint??t(Mf)}};var Q9=G(()=>{w9();M9=u(lr(),1);Ph();Ms();Kh();ff();sf();lw();Zh();Cs();Z9();Y();Jh();Y()});var B9=(r)=>{const f=r.httpAuthSchemes;let{httpAuthSchemeProvider:s,credentials:w}=r;return{setHttpAuthScheme(h){const E=f.findIndex(($)=>$.schemeId===h.schemeId);if(E===-1)f.push(h);else f.splice(E,1,h)},httpAuthSchemes(){return f},setHttpAuthSchemeProvider(h){s=h},httpAuthSchemeProvider(){return s},setCredentials(h){w=h},credentials(){return w}}},l9=(r)=>{return{httpAuthSchemes:r.httpAuthSchemes(),httpAuthSchemeProvider:r.httpAuthSchemeProvider(),credentials:r.credentials()}};var o3=(r)=>r,V9=(r,f)=>{const s={...o3(af(r)),...o3(df(r)),...o3(Rf(r)),...o3(B9(r))};return f.forEach((w)=>w.configure(s)),{...r,...pf(s),...Of(s),...Wf(s),...l9(s)}};var H9=G(()=>{Qh();qr();Y()});var Vh,W0;var hE=G(()=>{ew();nw();ow();pw();Ms();Vh=u(Or(),1);Ih();B();ff();Y();zT();lh();Q9();H9();W0=class W0 extends As{constructor(...[r]){const f=J9(r||{}),s=f9(f),w=Yf(s),h=kf(w),E=Qf(h),$=zf(E),I=Vf($),F=s9(I),U=V9(F,r?.extensions||[]);super(U);this.config=U,this.middlewareStack.use(Kf(this.config)),this.middlewareStack.use(bf(this.config)),this.middlewareStack.use(lf(this.config)),this.middlewareStack.use(Sf(this.config)),this.middlewareStack.use(Pf(this.config)),this.middlewareStack.use(Xf(this.config)),this.middlewareStack.use(Vh.getHttpAuthSchemeEndpointRuleSetPlugin(this.config,{httpAuthSchemeParametersProvider:tZ,identityProviderConfigProvider:async(C)=>new Vh.DefaultIdentityProviderConfig({"aws.auth#sigv4":C.credentials})})),this.middlewareStack.use(Vh.getHttpSigningPlugin(this.config))}destroy(){super.destroy()}}});var z0;var ST=G(()=>{Y();z0=class z0 extends ks{constructor(r){super(r);Object.setPrototypeOf(this,z0.prototype)}}});var a3,p3,u3,t3,D9=(r)=>({...r,...r.accessToken&&{accessToken:o}}),Bg=(r)=>({...r,...r.secretAccessKey&&{secretAccessKey:o},...r.sessionToken&&{sessionToken:o}}),k9=(r)=>({...r,...r.roleCredentials&&{roleCredentials:Bg(r.roleCredentials)}}),N9=(r)=>({...r,...r.accessToken&&{accessToken:o}}),y9=(r)=>({...r,...r.accessToken&&{accessToken:o}}),q9=(r)=>({...r,...r.accessToken&&{accessToken:o}});var Dw=G(()=>{Y();ST();a3=class a3 extends z0{constructor(r){super({name:"InvalidRequestException",$fault:"client",...r});this.name="InvalidRequestException",this.$fault="client",Object.setPrototypeOf(this,a3.prototype)}};p3=class p3 extends z0{constructor(r){super({name:"ResourceNotFoundException",$fault:"client",...r});this.name="ResourceNotFoundException",this.$fault="client",Object.setPrototypeOf(this,p3.prototype)}};u3=class u3 extends z0{constructor(r){super({name:"TooManyRequestsException",$fault:"client",...r});this.name="TooManyRequestsException",this.$fault="client",Object.setPrototypeOf(this,u3.prototype)}};t3=class t3 extends z0{constructor(r){super({name:"UnauthorizedException",$fault:"client",...r});this.name="UnauthorizedException",this.$fault="client",Object.setPrototypeOf(this,t3.prototype)}}});var o0,EE,m9=async(r,f)=>{const s=EE.requestBuilder(r,f),w=P({},sI,{[wI]:r[fI]});s.bp("/federation/credentials");const h=P({[yg]:[,y(r[Ng],"roleName")],[g9]:[,y(r[_9],"accountId")]});let E;return s.m("GET").h(w).q(h).b(E),s.build()},v9=async(r,f)=>{const s=EE.requestBuilder(r,f),w=P({},sI,{[wI]:r[fI]});s.bp("/assignment/roles");const h=P({[o9]:[,r[n9]],[e9]:[()=>r.maxResults!==void 0,()=>r[x9].toString()],[g9]:[,y(r[_9],"accountId")]});let E;return s.m("GET").h(w).q(h).b(E),s.build()},j9=async(r,f)=>{const s=EE.requestBuilder(r,f),w=P({},sI,{[wI]:r[fI]});s.bp("/assignment/accounts");const h=P({[o9]:[,r[n9]],[e9]:[()=>r.maxResults!==void 0,()=>r[x9].toString()]});let E;return s.m("GET").h(w).q(h).b(E),s.build()},i9=async(r,f)=>{const s=EE.requestBuilder(r,f),w=P({},sI,{[wI]:r[fI]});s.bp("/logout");let h;return s.m("POST").h(w).b(h),s.build()},d9=async(r,f)=>{if(r.statusCode!==200&&r.statusCode>=300)return rI(r,f);const s=P({$metadata:a0(r)}),w=y(d(await o0.parseJsonBody(r.body,f)),"body"),h=p(w,{roleCredentials:q});return Object.assign(s,h),s},O9=async(r,f)=>{if(r.statusCode!==200&&r.statusCode>=300)return rI(r,f);const s=P({$metadata:a0(r)}),w=y(d(await o0.parseJsonBody(r.body,f)),"body"),h=p(w,{nextToken:T,roleList:q});return Object.assign(s,h),s},b9=async(r,f)=>{if(r.statusCode!==200&&r.statusCode>=300)return rI(r,f);const s=P({$metadata:a0(r)}),w=y(d(await o0.parseJsonBody(r.body,f)),"body"),h=p(w,{accountList:q,nextToken:T});return Object.assign(s,h),s},c9=async(r,f)=>{if(r.statusCode!==200&&r.statusCode>=300)return rI(r,f);const s=P({$metadata:a0(r)});return await gr(r.body,f),s},rI=async(r,f)=>{const s={...r,body:await o0.parseJsonErrorBody(r.body,f)},w=o0.loadRestJsonErrorCode(r,s.body);switch(w){case"InvalidRequestException":case"com.amazonaws.sso#InvalidRequestException":throw await Vg(s,f);case"ResourceNotFoundException":case"com.amazonaws.sso#ResourceNotFoundException":throw await Hg(s,f);case"TooManyRequestsException":case"com.amazonaws.sso#TooManyRequestsException":throw await Dg(s,f);case"UnauthorizedException":case"com.amazonaws.sso#UnauthorizedException":throw await kg(s,f);default:const h=s.body;return lg({output:r,parsedBody:h,errorCode:w})}},lg,Vg=async(r,f)=>{const s=P({}),w=r.body,h=p(w,{message:T});Object.assign(s,h);const E=new a3({$metadata:a0(r),...s});return D(E,r.body)},Hg=async(r,f)=>{const s=P({}),w=r.body,h=p(w,{message:T});Object.assign(s,h);const E=new p3({$metadata:a0(r),...s});return D(E,r.body)},Dg=async(r,f)=>{const s=P({}),w=r.body,h=p(w,{message:T});Object.assign(s,h);const E=new u3({$metadata:a0(r),...s});return D(E,r.body)},kg=async(r,f)=>{const s=P({}),w=r.body,h=p(w,{message:T});Object.assign(s,h);const E=new t3({$metadata:a0(r),...s});return D(E,r.body)},a0=(r)=>({httpStatusCode:r.statusCode,requestId:r.headers["x-amzn-requestid"]??r.headers["x-amzn-request-id"]??r.headers["x-amz-request-id"],extendedRequestId:r.headers["x-amz-id-2"],cfId:r.headers["x-amz-cf-id"]}),sI=(r)=>r!==void 0&&r!==null&&r!==""&&(!Object.getOwnPropertyNames(r).includes("length")||r.length!=0)&&(!Object.getOwnPropertyNames(r).includes("size")||r.size!=0),_9="accountId",fI="accessToken",g9="account_id",x9="maxResults",e9="max_result",n9="nextToken",o9="next_token",Ng="roleName",yg="role_name",wI="x-amz-sso_bearer_token";var $E=G(()=>{o0=u(lr(),1),EE=u(Or(),1);Y();Dw();ST();lg=mf(z0)});var IE;var PT=G(()=>{B();V();Y();lh();Dw();$E();IE=class IE extends A.classBuilder().ep({...n0}).m(function(r,f,s,w){return[R(s,this.serialize,this.deserialize),W(s,r.getEndpointParameterInstructions())]}).s("SWBPortalService","GetRoleCredentials",{}).n("SSOClient","GetRoleCredentialsCommand").f(D9,k9).ser(m9).de(d9).build(){}});var FE;var hI=G(()=>{B();V();Y();lh();Dw();$E();FE=class FE extends A.classBuilder().ep({...n0}).m(function(r,f,s,w){return[R(s,this.serialize,this.deserialize),W(s,r.getEndpointParameterInstructions())]}).s("SWBPortalService","ListAccountRoles",{}).n("SSOClient","ListAccountRolesCommand").f(N9,void 0).ser(v9).de(O9).build(){}});var UE;var EI=G(()=>{B();V();Y();lh();Dw();$E();UE=class UE extends A.classBuilder().ep({...n0}).m(function(r,f,s,w){return[R(s,this.serialize,this.deserialize),W(s,r.getEndpointParameterInstructions())]}).s("SWBPortalService","ListAccounts",{}).n("SSOClient","ListAccountsCommand").f(y9,void 0).ser(j9).de(b9).build(){}});var XT;var YT=G(()=>{B();V();Y();lh();Dw();$E();XT=class XT extends A.classBuilder().ep({...n0}).m(function(r,f,s,w){return[R(s,this.serialize,this.deserialize),W(s,r.getEndpointParameterInstructions())]}).s("SWBPortalService","Logout",{}).n("SSOClient","LogoutCommand").f(q9,void 0).ser(i9).de(c9).build(){}});var qg,a9;var p9=G(()=>{Y();PT();hI();EI();YT();hE();qg={GetRoleCredentialsCommand:IE,ListAccountRolesCommand:FE,ListAccountsCommand:UE,LogoutCommand:XT};a9=class a9 extends W0{};yf(qg,a9)});var u9=G(()=>{PT();hI();EI();YT()});var t9=()=>{};var rM,iGr;var sM=G(()=>{rM=u(Or(),1);hI();hE();iGr=rM.createPaginator(W0,FE,"nextToken","nextToken","maxResults")});var fM,cGr;var wM=G(()=>{fM=u(Or(),1);EI();hE();cGr=fM.createPaginator(W0,UE,"nextToken","nextToken","maxResults")});var hM=G(()=>{t9();sM();wM()});var EM=G(()=>{Dw()});var $M=G(()=>{hE();p9();u9();hM();EM()});var IM={};Af(IM,{SSOClient:()=>W0,GetRoleCredentialsCommand:()=>IE});var FM=G(()=>{$M()});var TE=!1,KT=async({ssoStartUrl:r,ssoSession:f,ssoAccountId:s,ssoRegion:w,ssoRoleName:h,ssoClient:E,clientConfig:$,profile:I,logger:F})=>{let U;const C="To refresh this SSO session run aws sso login with the corresponding profile.";if(f)try{const Dr=await eZ({profile:I})();U={accessToken:Dr.token,expiresAt:new Date(Dr.expiration).toISOString()}}catch(Dr){throw new g(Dr.message,{tryNextLink:TE,logger:F})}else try{U=await f3(r)}catch(Dr){throw new g("The SSO session associated with this profile is invalid. To refresh this SSO session run aws sso login with the corresponding profile.",{tryNextLink:TE,logger:F})}if(new Date(U.expiresAt).getTime()-Date.now()<=0)throw new g("The SSO session associated with this profile has expired. To refresh this SSO session run aws sso login with the corresponding profile.",{tryNextLink:TE,logger:F});const{accessToken:L}=U,{SSOClient:z,GetRoleCredentialsCommand:S}=await Promise.resolve().then(() => (FM(),IM)),K=E||new z(Object.assign({},$??{},{region:$?.region??w}));let k;try{k=await K.send(new S({accountId:s,roleName:h,accessToken:L}))}catch(Dr){throw new g(Dr,{tryNextLink:TE,logger:F})}const{roleCredentials:{accessKeyId:l,secretAccessKey:Q,sessionToken:N,expiration:x,credentialScope:e,accountId:hr}={}}=k;if(!l||!Q||!N||!x)throw new g("SSO returns an invalid temporary credential.",{tryNextLink:TE,logger:F});return{accessKeyId:l,secretAccessKey:Q,sessionToken:N,expiration:new Date(x),...e&&{credentialScope:e},...hr&&{accountId:hr}}};var UM=G(()=>{pZ();Lr();rf()});var ZT=(r,f)=>{const{sso_start_url:s,sso_account_id:w,sso_region:h,sso_role_name:E}=r;if(!s||!w||!h||!E)throw new g(`Profile is configured with invalid SSO credentials. Required parameters "sso_account_id", "sso_region", "sso_role_name", "sso_start_url". Got ${Object.keys(r).join(", ")}\nReference: https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-sso.html`,{tryNextLink:!1,logger:f});return r};var MT=G(()=>{Lr()});var mg=(r={})=>async()=>{r.logger?.debug("@aws-sdk/credential-provider-sso - fromSSO");const{ssoStartUrl:f,ssoAccountId:s,ssoRegion:w,ssoRoleName:h,ssoSession:E}=r,{ssoClient:$}=r,I=ls(r);if(!f&&!s&&!w&&!h&&!E){const U=(await v0(r))[I];if(!U)throw new g(`Profile ${I} was not found.`,{logger:r.logger});if(!xU(U))throw new g(`Profile ${I} is not configured with SSO credentials.`,{logger:r.logger});if(U?.sso_session){const l=(await E3(r))[U.sso_session],Q=` configurations in profile ${I} and sso-session ${U.sso_session}`;if(w&&w!==l.sso_region)throw new g("Conflicting SSO region"+Q,{tryNextLink:!1,logger:r.logger});if(f&&f!==l.sso_start_url)throw new g("Conflicting SSO start_url"+Q,{tryNextLink:!1,logger:r.logger});U.sso_region=l.sso_region,U.sso_start_url=l.sso_start_url}const{sso_start_url:C,sso_account_id:L,sso_region:z,sso_role_name:S,sso_session:K}=ZT(U,r.logger);return KT({ssoStartUrl:C,ssoSession:K,ssoAccountId:L,ssoRegion:z,ssoRoleName:S,ssoClient:$,clientConfig:r.clientConfig,profile:I})}else if(!f||!s||!w||!h)throw new g('Incomplete configuration. The fromSSO() argument hash must include "ssoStartUrl", "ssoAccountId", "ssoRegion", "ssoRoleName"',{tryNextLink:!1,logger:r.logger});else return KT({ssoStartUrl:f,ssoSession:E,ssoAccountId:s,ssoRegion:w,ssoRoleName:h,ssoClient:$,clientConfig:r.clientConfig,profile:I})};var TM=G(()=>{Lr();rf();UM();MT()});var GM=()=>{};var JT={};Af(JT,{validateSsoProfile:()=>ZT,isSsoProfile:()=>xU,fromSSO:()=>mg});var QT=G(()=>{TM();GM();MT()});var CM=(r,f,s)=>{const w={EcsContainer:async(h)=>{const{fromHttp:E}=await Promise.resolve().then(() => (gU(),_U)),{fromContainerMetadata:$}=await Promise.resolve().then(() => (i1(),j1));return s?.debug("@aws-sdk/credential-provider-ini - credential_source is EcsContainer"),L0(E(h??{}),$(h))},Ec2InstanceMetadata:async(h)=>{s?.debug("@aws-sdk/credential-provider-ini - credential_source is Ec2InstanceMetadata");const{fromInstanceMetadata:E}=await Promise.resolve().then(() => (i1(),j1));return E(h)},Environment:async(h)=>{s?.debug("@aws-sdk/credential-provider-ini - credential_source is Environment");const{fromEnv:E}=await Promise.resolve().then(() => (HU(),vK));return E(h)}};if(r in w)return w[r];else throw new g(`Unsupported credential source in profile ${f}. Got ${r}, expected EcsContainer or Ec2InstanceMetadata or Environment.`,{logger:s})};var LM=G(()=>{Lr()});function vg(r){return{schemeId:"aws.auth#sigv4",signingProperties:{name:"sts",region:r.region},propertiesExtractor:(f,s)=>({signingProperties:{config:f,context:s}})}}function AM(r){return{schemeId:"smithy.api#noAuth"}}var RM,WM=async(r,f,s)=>{return{operation:Ks(f).operation,region:await Nr(r.region)()||(()=>{throw new Error("expected `region` to be configured for `aws.auth#sigv4`")})()}},zM=(r)=>{const f=[];switch(r.operation){case"AssumeRoleWithSAML":{f.push(AM(r));break}case"AssumeRoleWithWebIdentity":{f.push(AM(r));break}default:f.push(vg(r))}return f},jg=(r)=>({...r,stsClientCtor:S0}),SM=(r)=>{const f=jg(r);return{...RM.resolveAwsSdkSigV4Config(f)}};var BT=G(()=>{RM=u(lr(),1);as();GE()});var PM=(r)=>{return{...r,useDualstackEndpoint:r.useDualstackEndpoint??!1,useFipsEndpoint:r.useFipsEndpoint??!1,useGlobalEndpoint:r.useGlobalEndpoint??!1,defaultSigningName:"sts"}},er;var uf=G(()=>{er={UseGlobalEndpoint:{type:"builtInParams",name:"useGlobalEndpoint"},UseFIPS:{type:"builtInParams",name:"useFipsEndpoint"},Endpoint:{type:"builtInParams",name:"endpoint"},Region:{type:"builtInParams",name:"region"},UseDualStack:{type:"builtInParams",name:"useDualstackEndpoint"}}});var YM;var XM=G(()=>{YM={name:"@aws-sdk/client-sts",description:"AWS SDK for JavaScript Sts Client for Node.js, Browser and React Native",version:"3.637.0",scripts:{build:"concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'","build:cjs":"node ../../scripts/compilation/inline client-sts","build:es":"tsc -p tsconfig.es.json","build:include:deps":"lerna run --scope $npm_package_name --include-dependencies build","build:types":"rimraf ./dist-types tsconfig.types.tsbuildinfo && tsc -p tsconfig.types.json","build:types:downlevel":"downlevel-dts dist-types dist-types/ts3.4",clean:"rimraf ./dist-* && rimraf *.tsbuildinfo","extract:docs":"api-extractor run --local","generate:client":"node ../../scripts/generate-clients/single-service --solo sts",test:"yarn test:unit","test:unit":"jest"},main:"./dist-cjs/index.js",types:"./dist-types/index.d.ts",module:"./dist-es/index.js",sideEffects:!1,dependencies:{"@aws-crypto/sha256-browser":"5.2.0","@aws-crypto/sha256-js":"5.2.0","@aws-sdk/client-sso-oidc":"3.637.0","@aws-sdk/core":"3.635.0","@aws-sdk/credential-provider-node":"3.637.0","@aws-sdk/middleware-host-header":"3.620.0","@aws-sdk/middleware-logger":"3.609.0","@aws-sdk/middleware-recursion-detection":"3.620.0","@aws-sdk/middleware-user-agent":"3.637.0","@aws-sdk/region-config-resolver":"3.614.0","@aws-sdk/types":"3.609.0","@aws-sdk/util-endpoints":"3.637.0","@aws-sdk/util-user-agent-browser":"3.609.0","@aws-sdk/util-user-agent-node":"3.614.0","@smithy/config-resolver":"^3.0.5","@smithy/core":"^2.4.0","@smithy/fetch-http-handler":"^3.2.4","@smithy/hash-node":"^3.0.3","@smithy/invalid-dependency":"^3.0.3","@smithy/middleware-content-length":"^3.0.5","@smithy/middleware-endpoint":"^3.1.0","@smithy/middleware-retry":"^3.0.15","@smithy/middleware-serde":"^3.0.3","@smithy/middleware-stack":"^3.0.3","@smithy/node-config-provider":"^3.1.4","@smithy/node-http-handler":"^3.1.4","@smithy/protocol-http":"^4.1.0","@smithy/smithy-client":"^3.2.0","@smithy/types":"^3.3.0","@smithy/url-parser":"^3.0.3","@smithy/util-base64":"^3.0.0","@smithy/util-body-length-browser":"^3.0.0","@smithy/util-body-length-node":"^3.0.0","@smithy/util-defaults-mode-browser":"^3.0.15","@smithy/util-defaults-mode-node":"^3.0.15","@smithy/util-endpoints":"^2.0.5","@smithy/util-middleware":"^3.0.3","@smithy/util-retry":"^3.0.3","@smithy/util-utf8":"^3.0.0",tslib:"^2.6.2"},devDependencies:{"@tsconfig/node16":"16.1.3","@types/node":"^16.18.96",concurrently:"7.0.0","downlevel-dts":"0.10.1",rimraf:"3.0.2",typescript:"~4.9.5"},engines:{node:">=16.0.0"},typesVersions:{"<4.0":{"dist-types/*":["dist-types/ts3.4/*"]}},files:["dist-*/**"],author:{name:"AWS SDK for JavaScript Team",url:"https://aws.amazon.com/javascript/"},license:"Apache-2.0",browser:{"./dist-es/runtimeConfig":"./dist-es/runtimeConfig.browser"},"react-native":{"./dist-es/runtimeConfig":"./dist-es/runtimeConfig.native"},homepage:"https://github.com/aws/aws-sdk-js-v3/tree/main/clients/client-sts",repository:{type:"git",url:"https://github.com/aws/aws-sdk-js-v3.git",directory:"clients/client-sts"}}});var KM,lT,DM,ZM,br,MM,kM,NM,nr,zs,JM,yM,qM,QM,mM,BM,lM,VM,HM,dg,vM;var jM=G(()=>{KM={["required"]:!1,["type"]:"String"},lT={["required"]:!0,default:!1,["type"]:"Boolean"},DM={["ref"]:"Endpoint"},ZM={["fn"]:"isSet",["argv"]:[{["ref"]:"Region"}]},br={["ref"]:"Region"},MM={["fn"]:"aws.partition",["argv"]:[br],assign:"PartitionResult"},kM={["ref"]:"UseFIPS"},NM={["ref"]:"UseDualStack"},nr={url:"https://sts.amazonaws.com",properties:{authSchemes:[{name:"sigv4",signingName:"sts",signingRegion:"us-east-1"}]},headers:{}},zs={},JM={conditions:[{["fn"]:"stringEquals",["argv"]:[br,"aws-global"]}],["endpoint"]:nr,["type"]:"endpoint"},yM={["fn"]:"booleanEquals",["argv"]:[kM,!0]},qM={["fn"]:"booleanEquals",["argv"]:[NM,!0]},QM={["fn"]:"getAttr",["argv"]:[{["ref"]:"PartitionResult"},"supportsFIPS"]},mM={["ref"]:"PartitionResult"},BM={["fn"]:"booleanEquals",["argv"]:[!0,{["fn"]:"getAttr",["argv"]:[mM,"supportsDualStack"]}]},lM=[{["fn"]:"isSet",["argv"]:[DM]}],VM=[yM],HM=[qM],dg={version:"1.0",parameters:{Region:KM,UseDualStack:lT,UseFIPS:lT,Endpoint:KM,UseGlobalEndpoint:lT},rules:[{conditions:[{["fn"]:"booleanEquals",["argv"]:[{["ref"]:"UseGlobalEndpoint"},!0]},{["fn"]:"not",["argv"]:lM},ZM,MM,{["fn"]:"booleanEquals",["argv"]:[kM,!1]},{["fn"]:"booleanEquals",["argv"]:[NM,!1]}],rules:[{conditions:[{["fn"]:"stringEquals",["argv"]:[br,"ap-northeast-1"]}],endpoint:nr,["type"]:"endpoint"},{conditions:[{["fn"]:"stringEquals",["argv"]:[br,"ap-south-1"]}],endpoint:nr,["type"]:"endpoint"},{conditions:[{["fn"]:"stringEquals",["argv"]:[br,"ap-southeast-1"]}],endpoint:nr,["type"]:"endpoint"},{conditions:[{["fn"]:"stringEquals",["argv"]:[br,"ap-southeast-2"]}],endpoint:nr,["type"]:"endpoint"},JM,{conditions:[{["fn"]:"stringEquals",["argv"]:[br,"ca-central-1"]}],endpoint:nr,["type"]:"endpoint"},{conditions:[{["fn"]:"stringEquals",["argv"]:[br,"eu-central-1"]}],endpoint:nr,["type"]:"endpoint"},{conditions:[{["fn"]:"stringEquals",["argv"]:[br,"eu-north-1"]}],endpoint:nr,["type"]:"endpoint"},{conditions:[{["fn"]:"stringEquals",["argv"]:[br,"eu-west-1"]}],endpoint:nr,["type"]:"endpoint"},{conditions:[{["fn"]:"stringEquals",["argv"]:[br,"eu-west-2"]}],endpoint:nr,["type"]:"endpoint"},{conditions:[{["fn"]:"stringEquals",["argv"]:[br,"eu-west-3"]}],endpoint:nr,["type"]:"endpoint"},{conditions:[{["fn"]:"stringEquals",["argv"]:[br,"sa-east-1"]}],endpoint:nr,["type"]:"endpoint"},{conditions:[{["fn"]:"stringEquals",["argv"]:[br,"us-east-1"]}],endpoint:nr,["type"]:"endpoint"},{conditions:[{["fn"]:"stringEquals",["argv"]:[br,"us-east-2"]}],endpoint:nr,["type"]:"endpoint"},{conditions:[{["fn"]:"stringEquals",["argv"]:[br,"us-west-1"]}],endpoint:nr,["type"]:"endpoint"},{conditions:[{["fn"]:"stringEquals",["argv"]:[br,"us-west-2"]}],endpoint:nr,["type"]:"endpoint"},{endpoint:{url:"https://sts.{Region}.{PartitionResult#dnsSuffix}",properties:{authSchemes:[{name:"sigv4",signingName:"sts",signingRegion:"{Region}"}]},headers:zs},["type"]:"endpoint"}],["type"]:"tree"},{conditions:lM,rules:[{conditions:VM,error:"Invalid Configuration: FIPS and custom endpoint are not supported",["type"]:"error"},{conditions:HM,error:"Invalid Configuration: Dualstack and custom endpoint are not supported",["type"]:"error"},{endpoint:{url:DM,properties:zs,headers:zs},["type"]:"endpoint"}],["type"]:"tree"},{conditions:[ZM],rules:[{conditions:[MM],rules:[{conditions:[yM,qM],rules:[{conditions:[{["fn"]:"booleanEquals",["argv"]:[!0,QM]},BM],rules:[{endpoint:{url:"https://sts-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:zs,headers:zs},["type"]:"endpoint"}],["type"]:"tree"},{error:"FIPS and DualStack are enabled, but this partition does not support one or both",["type"]:"error"}],["type"]:"tree"},{conditions:VM,rules:[{conditions:[{["fn"]:"booleanEquals",["argv"]:[QM,!0]}],rules:[{conditions:[{["fn"]:"stringEquals",["argv"]:[{["fn"]:"getAttr",["argv"]:[mM,"name"]},"aws-us-gov"]}],endpoint:{url:"https://sts.{Region}.amazonaws.com",properties:zs,headers:zs},["type"]:"endpoint"},{endpoint:{url:"https://sts-fips.{Region}.{PartitionResult#dnsSuffix}",properties:zs,headers:zs},["type"]:"endpoint"}],["type"]:"tree"},{error:"FIPS is enabled but this partition does not support FIPS",["type"]:"error"}],["type"]:"tree"},{conditions:HM,rules:[{conditions:[BM],rules:[{endpoint:{url:"https://sts.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:zs,headers:zs},["type"]:"endpoint"}],["type"]:"tree"},{error:"DualStack is enabled but this partition does not support DualStack",["type"]:"error"}],["type"]:"tree"},JM,{endpoint:{url:"https://sts.{Region}.{PartitionResult#dnsSuffix}",properties:zs,headers:zs},["type"]:"endpoint"}],["type"]:"tree"}],["type"]:"tree"},{error:"Invalid Configuration: Missing Region",["type"]:"error"}]},vM=dg});var iM=(r,f={})=>{return es(vM,{endpointParams:r,logger:f.logger})};var dM=G(()=>{Cw();ns();jM();pr.aws=os});var OM,bM,cM=(r)=>{return{apiVersion:"2011-06-15",base64Decoder:r?.base64Decoder??ef,base64Encoder:r?.base64Encoder??nf,disableHostPrefix:r?.disableHostPrefix??!1,endpointProvider:r?.endpointProvider??iM,extensions:r?.extensions??[],httpAuthSchemeProvider:r?.httpAuthSchemeProvider??zM,httpAuthSchemes:r?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:(f)=>f.getIdentityProvider("aws.auth#sigv4"),signer:new OM.AwsSdkSigV4Signer},{schemeId:"smithy.api#noAuth",identityProvider:(f)=>f.getIdentityProvider("smithy.api#noAuth")||(async()=>({})),signer:new bM.NoAuthSigner}],logger:r?.logger??new Ls,serviceId:r?.serviceId??"STS",urlParser:r?.urlParser??_r,utf8Decoder:r?.utf8Decoder??Us,utf8Encoder:r?.utf8Encoder??gf}};var _M=G(()=>{OM=u(lr(),1),bM=u(Or(),1);Y();j0();Mh();x0();BT();dM()});var $I,gM,xM=(r)=>{jf(process.version);const f=of(r),s=()=>f().then(vf),w=cM(r);return $I.emitWarningIfUnsupportedVersion(process.version),{...w,...r,runtime:"node",defaultsMode:f,bodyLengthChecker:r?.bodyLengthChecker??xf,credentialDefaultProvider:r?.credentialDefaultProvider??A0,defaultUserAgentProvider:r?.defaultUserAgentProvider??_f({serviceId:w.serviceId,clientVersion:YM.version}),httpAuthSchemes:r?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:(h)=>h.getIdentityProvider("aws.auth#sigv4")||(async(E)=>await A0(E?.__config||{})()),signer:new $I.AwsSdkSigV4Signer},{schemeId:"smithy.api#noAuth",identityProvider:(h)=>h.getIdentityProvider("smithy.api#noAuth")||(async()=>({})),signer:new gM.NoAuthSigner}],maxAttempts:r?.maxAttempts??t(Df),region:r?.region??t(Zs,Jf),requestHandler:tr.create(r?.requestHandler??s),retryMode:r?.retryMode??t({...Nf,default:async()=>(await s()).retryMode||Ds}),sha256:r?.sha256??wf.bind(null,"sha256"),streamCollector:r?.streamCollector??cf,useDualstackEndpoint:r?.useDualstackEndpoint??t(Zf),useFipsEndpoint:r?.useFipsEndpoint??t(Mf)}};var eM=G(()=>{XM();$I=u(lr(),1);O1();Ph();Ms();gM=u(Or(),1);Kh();ff();sf();lw();Zh();Cs();_M();Y();Jh();Y()});var nM=(r)=>{const f=r.httpAuthSchemes;let{httpAuthSchemeProvider:s,credentials:w}=r;return{setHttpAuthScheme(h){const E=f.findIndex(($)=>$.schemeId===h.schemeId);if(E===-1)f.push(h);else f.splice(E,1,h)},httpAuthSchemes(){return f},setHttpAuthSchemeProvider(h){s=h},httpAuthSchemeProvider(){return s},setCredentials(h){w=h},credentials(){return w}}},oM=(r)=>{return{httpAuthSchemes:r.httpAuthSchemes(),httpAuthSchemeProvider:r.httpAuthSchemeProvider(),credentials:r.credentials()}};var II=(r)=>r,aM=(r,f)=>{const s={...II(af(r)),...II(df(r)),...II(Rf(r)),...II(nM(r))};return f.forEach((w)=>w.configure(s)),{...r,...pf(s),...Of(s),...Wf(s),...oM(s)}};var pM=G(()=>{Qh();qr();Y()});var Hh,S0;var GE=G(()=>{ew();nw();ow();pw();Ms();Hh=u(Or(),1);Ih();B();ff();Y();BT();uf();eM();pM();S0=class S0 extends As{constructor(...[r]){const f=xM(r||{}),s=PM(f),w=Yf(s),h=kf(w),E=Qf(h),$=zf(E),I=Vf($),F=SM(I),U=aM(F,r?.extensions||[]);super(U);this.config=U,this.middlewareStack.use(Kf(this.config)),this.middlewareStack.use(bf(this.config)),this.middlewareStack.use(lf(this.config)),this.middlewareStack.use(Sf(this.config)),this.middlewareStack.use(Pf(this.config)),this.middlewareStack.use(Xf(this.config)),this.middlewareStack.use(Hh.getHttpAuthSchemeEndpointRuleSetPlugin(this.config,{httpAuthSchemeParametersProvider:WM,identityProviderConfigProvider:async(C)=>new Hh.DefaultIdentityProviderConfig({"aws.auth#sigv4":C.credentials})})),this.middlewareStack.use(Hh.getHttpSigningPlugin(this.config))}destroy(){super.destroy()}}});var rs;var FI=G(()=>{Y();rs=class rs extends ks{constructor(r){super(r);Object.setPrototypeOf(this,rs.prototype)}}});var CE,LE,AE,RE,WE,zE,SE,PE,Dh=(r)=>({...r,...r.SecretAccessKey&&{SecretAccessKey:o}}),VT=(r)=>({...r,...r.Credentials&&{Credentials:Dh(r.Credentials)}}),HT=(r)=>({...r,...r.SAMLAssertion&&{SAMLAssertion:o}}),DT=(r)=>({...r,...r.Credentials&&{Credentials:Dh(r.Credentials)}}),kT=(r)=>({...r,...r.WebIdentityToken&&{WebIdentityToken:o}}),NT=(r)=>({...r,...r.Credentials&&{Credentials:Dh(r.Credentials)}}),yT=(r)=>({...r,...r.Credentials&&{Credentials:Dh(r.Credentials)}}),qT=(r)=>({...r,...r.Credentials&&{Credentials:Dh(r.Credentials)}});var p0=G(()=>{Y();FI();CE=class CE extends rs{constructor(r){super({name:"ExpiredTokenException",$fault:"client",...r});this.name="ExpiredTokenException",this.$fault="client",Object.setPrototypeOf(this,CE.prototype)}};LE=class LE extends rs{constructor(r){super({name:"MalformedPolicyDocumentException",$fault:"client",...r});this.name="MalformedPolicyDocumentException",this.$fault="client",Object.setPrototypeOf(this,LE.prototype)}};AE=class AE extends rs{constructor(r){super({name:"PackedPolicyTooLargeException",$fault:"client",...r});this.name="PackedPolicyTooLargeException",this.$fault="client",Object.setPrototypeOf(this,AE.prototype)}};RE=class RE extends rs{constructor(r){super({name:"RegionDisabledException",$fault:"client",...r});this.name="RegionDisabledException",this.$fault="client",Object.setPrototypeOf(this,RE.prototype)}};WE=class WE extends rs{constructor(r){super({name:"IDPRejectedClaimException",$fault:"client",...r});this.name="IDPRejectedClaimException",this.$fault="client",Object.setPrototypeOf(this,WE.prototype)}};zE=class zE extends rs{constructor(r){super({name:"InvalidIdentityTokenException",$fault:"client",...r});this.name="InvalidIdentityTokenException",this.$fault="client",Object.setPrototypeOf(this,zE.prototype)}};SE=class SE extends rs{constructor(r){super({name:"IDPCommunicationErrorException",$fault:"client",...r});this.name="IDPCommunicationErrorException",this.$fault="client",Object.setPrototypeOf(this,SE.prototype)}};PE=class PE extends rs{constructor(r){super({name:"InvalidAuthorizationMessageException",$fault:"client",...r});this.name="InvalidAuthorizationMessageException",this.$fault="client",Object.setPrototypeOf(this,PE.prototype)}}});var hf,uM=async(r,f)=>{const s=rw;let w;return w=hw({...og(r,f),[fw]:Qx,[ww]:sw}),t0(f,s,"/",void 0,w)},tM=async(r,f)=>{const s=rw;let w;return w=hw({...ag(r,f),[fw]:Bx,[ww]:sw}),t0(f,s,"/",void 0,w)},rJ=async(r,f)=>{const s=rw;let w;return w=hw({...pg(r,f),[fw]:lx,[ww]:sw}),t0(f,s,"/",void 0,w)},sJ=async(r,f)=>{const s=rw;let w;return w=hw({...ug(r,f),[fw]:Vx,[ww]:sw}),t0(f,s,"/",void 0,w)},fJ=async(r,f)=>{const s=rw;let w;return w=hw({...tg(r,f),[fw]:Hx,[ww]:sw}),t0(f,s,"/",void 0,w)},wJ=async(r,f)=>{const s=rw;let w;return w=hw({...rx(r,f),[fw]:Dx,[ww]:sw}),t0(f,s,"/",void 0,w)},hJ=async(r,f)=>{const s=rw;let w;return w=hw({...sx(r,f),[fw]:kx,[ww]:sw}),t0(f,s,"/",void 0,w)},EJ=async(r,f)=>{const s=rw;let w;return w=hw({...fx(r,f),[fw]:Nx,[ww]:sw}),t0(f,s,"/",void 0,w)},$J=async(r,f)=>{if(r.statusCode>=300)return u0(r,f);const s=await hf.parseXmlBody(r.body,f);let w={};return w=Fx(s.AssumeRoleResult,f),{$metadata:or(r),...w}},IJ=async(r,f)=>{if(r.statusCode>=300)return u0(r,f);const s=await hf.parseXmlBody(r.body,f);let w={};return w=Ux(s.AssumeRoleWithSAMLResult,f),{$metadata:or(r),...w}},FJ=async(r,f)=>{if(r.statusCode>=300)return u0(r,f);const s=await hf.parseXmlBody(r.body,f);let w={};return w=Tx(s.AssumeRoleWithWebIdentityResult,f),{$metadata:or(r),...w}},UJ=async(r,f)=>{if(r.statusCode>=300)return u0(r,f);const s=await hf.parseXmlBody(r.body,f);let w={};return w=Gx(s.DecodeAuthorizationMessageResult,f),{$metadata:or(r),...w}},TJ=async(r,f)=>{if(r.statusCode>=300)return u0(r,f);const s=await hf.parseXmlBody(r.body,f);let w={};return w=Ax(s.GetAccessKeyInfoResult,f),{$metadata:or(r),...w}},GJ=async(r,f)=>{if(r.statusCode>=300)return u0(r,f);const s=await hf.parseXmlBody(r.body,f);let w={};return w=Rx(s.GetCallerIdentityResult,f),{$metadata:or(r),...w}},CJ=async(r,f)=>{if(r.statusCode>=300)return u0(r,f);const s=await hf.parseXmlBody(r.body,f);let w={};return w=Wx(s.GetFederationTokenResult,f),{$metadata:or(r),...w}},LJ=async(r,f)=>{if(r.statusCode>=300)return u0(r,f);const s=await hf.parseXmlBody(r.body,f);let w={};return w=zx(s.GetSessionTokenResult,f),{$metadata:or(r),...w}},u0=async(r,f)=>{const s={...r,body:await hf.parseXmlErrorBody(r.body,f)},w=yx(r,s.body);switch(w){case"ExpiredTokenException":case"com.amazonaws.sts#ExpiredTokenException":throw await Og(s,f);case"MalformedPolicyDocument":case"com.amazonaws.sts#MalformedPolicyDocumentException":throw await xg(s,f);case"PackedPolicyTooLarge":case"com.amazonaws.sts#PackedPolicyTooLargeException":throw await eg(s,f);case"RegionDisabledException":case"com.amazonaws.sts#RegionDisabledException":throw await ng(s,f);case"IDPRejectedClaim":case"com.amazonaws.sts#IDPRejectedClaimException":throw await cg(s,f);case"InvalidIdentityToken":case"com.amazonaws.sts#InvalidIdentityTokenException":throw await gg(s,f);case"IDPCommunicationError":case"com.amazonaws.sts#IDPCommunicationErrorException":throw await bg(s,f);case"InvalidAuthorizationMessageException":case"com.amazonaws.sts#InvalidAuthorizationMessageException":throw await _g(s,f);default:const h=s.body;return Jx({output:r,parsedBody:h.Error,errorCode:w})}},Og=async(r,f)=>{const s=r.body,w=Cx(s.Error,f),h=new CE({$metadata:or(r),...w});return D(h,s)},bg=async(r,f)=>{const s=r.body,w=Sx(s.Error,f),h=new SE({$metadata:or(r),...w});return D(h,s)},cg=async(r,f)=>{const s=r.body,w=Px(s.Error,f),h=new WE({$metadata:or(r),...w});return D(h,s)},_g=async(r,f)=>{const s=r.body,w=Xx(s.Error,f),h=new PE({$metadata:or(r),...w});return D(h,s)},gg=async(r,f)=>{const s=r.body,w=Yx(s.Error,f),h=new zE({$metadata:or(r),...w});return D(h,s)},xg=async(r,f)=>{const s=r.body,w=Kx(s.Error,f),h=new LE({$metadata:or(r),...w});return D(h,s)},eg=async(r,f)=>{const s=r.body,w=Zx(s.Error,f),h=new AE({$metadata:or(r),...w});return D(h,s)},ng=async(r,f)=>{const s=r.body,w=Mx(s.Error,f),h=new RE({$metadata:or(r),...w});return D(h,s)},og=(r,f)=>{const s={};if(r[Y0]!=null)s[Y0]=r[Y0];if(r[qh]!=null)s[qh]=r[qh];if(r[ms]!=null){const w=UI(r[ms],f);if(r[ms]?.length===0)s.PolicyArns=[];Object.entries(w).forEach(([h,E])=>{const $=`PolicyArns.${h}`;s[$]=E})}if(r[qs]!=null)s[qs]=r[qs];if(r[fs]!=null)s[fs]=r[fs];if(r[vh]!=null){const w=AJ(r[vh],f);if(r[vh]?.length===0)s.Tags=[];Object.entries(w).forEach(([h,E])=>{const $=`Tags.${h}`;s[$]=E})}if(r[EG]!=null){const w=Ix(r[EG],f);if(r[EG]?.length===0)s.TransitiveTagKeys=[];Object.entries(w).forEach(([h,E])=>{const $=`TransitiveTagKeys.${h}`;s[$]=E})}if(r[dT]!=null)s[dT]=r[dT];if(r[mh]!=null)s[mh]=r[mh];if(r[jh]!=null)s[jh]=r[jh];if(r[js]!=null)s[js]=r[js];if(r[aT]!=null){const w=Ex(r[aT],f);if(r[aT]?.length===0)s.ProvidedContexts=[];Object.entries(w).forEach(([h,E])=>{const $=`ProvidedContexts.${h}`;s[$]=E})}return s},ag=(r,f)=>{const s={};if(r[Y0]!=null)s[Y0]=r[Y0];if(r[nT]!=null)s[nT]=r[nT];if(r[sG]!=null)s[sG]=r[sG];if(r[ms]!=null){const w=UI(r[ms],f);if(r[ms]?.length===0)s.PolicyArns=[];Object.entries(w).forEach(([h,E])=>{const $=`PolicyArns.${h}`;s[$]=E})}if(r[qs]!=null)s[qs]=r[qs];if(r[fs]!=null)s[fs]=r[fs];return s},pg=(r,f)=>{const s={};if(r[Y0]!=null)s[Y0]=r[Y0];if(r[qh]!=null)s[qh]=r[qh];if(r[FG]!=null)s[FG]=r[FG];if(r[pT]!=null)s[pT]=r[pT];if(r[ms]!=null){const w=UI(r[ms],f);if(r[ms]?.length===0)s.PolicyArns=[];Object.entries(w).forEach(([h,E])=>{const $=`PolicyArns.${h}`;s[$]=E})}if(r[qs]!=null)s[qs]=r[qs];if(r[fs]!=null)s[fs]=r[fs];return s},ug=(r,f)=>{const s={};if(r[OT]!=null)s[OT]=r[OT];return s},tg=(r,f)=>{const s={};if(r[kh]!=null)s[kh]=r[kh];return s},rx=(r,f)=>{return{}},sx=(r,f)=>{const s={};if(r[xT]!=null)s[xT]=r[xT];if(r[qs]!=null)s[qs]=r[qs];if(r[ms]!=null){const w=UI(r[ms],f);if(r[ms]?.length===0)s.PolicyArns=[];Object.entries(w).forEach(([h,E])=>{const $=`PolicyArns.${h}`;s[$]=E})}if(r[fs]!=null)s[fs]=r[fs];if(r[vh]!=null){const w=AJ(r[vh],f);if(r[vh]?.length===0)s.Tags=[];Object.entries(w).forEach(([h,E])=>{const $=`Tags.${h}`;s[$]=E})}return s},fx=(r,f)=>{const s={};if(r[fs]!=null)s[fs]=r[fs];if(r[mh]!=null)s[mh]=r[mh];if(r[jh]!=null)s[jh]=r[jh];return s},UI=(r,f)=>{const s={};let w=1;for(let h of r){if(h===null)continue;const E=wx(h,f);Object.entries(E).forEach(([$,I])=>{s[`member.${w}.${$}`]=I}),w++}return s},wx=(r,f)=>{const s={};if(r[UG]!=null)s[UG]=r[UG];return s},hx=(r,f)=>{const s={};if(r[oT]!=null)s[oT]=r[oT];if(r[vT]!=null)s[vT]=r[vT];return s},Ex=(r,f)=>{const s={};let w=1;for(let h of r){if(h===null)continue;const E=hx(h,f);Object.entries(E).forEach(([$,I])=>{s[`member.${w}.${$}`]=I}),w++}return s},$x=(r,f)=>{const s={};if(r[gT]!=null)s[gT]=r[gT];if(r[IG]!=null)s[IG]=r[IG];return s},Ix=(r,f)=>{const s={};let w=1;for(let h of r){if(h===null)continue;s[`member.${w}`]=h,w++}return s},AJ=(r,f)=>{const s={};let w=1;for(let h of r){if(h===null)continue;const E=$x(h,f);Object.entries(E).forEach(([$,I])=>{s[`member.${w}.${$}`]=I}),w++}return s},TG=(r,f)=>{const s={};if(r[mT]!=null)s[mT]=T(r[mT]);if(r[X0]!=null)s[X0]=T(r[X0]);return s},Fx=(r,f)=>{const s={};if(r[ss]!=null)s[ss]=XE(r[ss],f);if(r[P0]!=null)s[P0]=TG(r[P0],f);if(r[vs]!=null)s[vs]=Er(r[vs]);if(r[js]!=null)s[js]=T(r[js]);return s},Ux=(r,f)=>{const s={};if(r[ss]!=null)s[ss]=XE(r[ss],f);if(r[P0]!=null)s[P0]=TG(r[P0],f);if(r[vs]!=null)s[vs]=Er(r[vs]);if(r[tT]!=null)s[tT]=T(r[tT]);if(r[wG]!=null)s[wG]=T(r[wG]);if(r[_T]!=null)s[_T]=T(r[_T]);if(r[yh]!=null)s[yh]=T(r[yh]);if(r[eT]!=null)s[eT]=T(r[eT]);if(r[js]!=null)s[js]=T(r[js]);return s},Tx=(r,f)=>{const s={};if(r[ss]!=null)s[ss]=XE(r[ss],f);if(r[fG]!=null)s[fG]=T(r[fG]);if(r[P0]!=null)s[P0]=TG(r[P0],f);if(r[vs]!=null)s[vs]=Er(r[vs]);if(r[uT]!=null)s[uT]=T(r[uT]);if(r[yh]!=null)s[yh]=T(r[yh]);if(r[js]!=null)s[js]=T(r[js]);return s},XE=(r,f)=>{const s={};if(r[kh]!=null)s[kh]=T(r[kh]);if(r[rG]!=null)s[rG]=T(r[rG]);if(r[hG]!=null)s[hG]=T(r[hG]);if(r[iT]!=null)s[iT]=y(Mw(r[iT]));return s},Gx=(r,f)=>{const s={};if(r[jT]!=null)s[jT]=T(r[jT]);return s},Cx=(r,f)=>{const s={};if(r[Sr]!=null)s[Sr]=T(r[Sr]);return s},Lx=(r,f)=>{const s={};if(r[cT]!=null)s[cT]=T(r[cT]);if(r[X0]!=null)s[X0]=T(r[X0]);return s},Ax=(r,f)=>{const s={};if(r[Nh]!=null)s[Nh]=T(r[Nh]);return s},Rx=(r,f)=>{const s={};if(r[$G]!=null)s[$G]=T(r[$G]);if(r[Nh]!=null)s[Nh]=T(r[Nh]);if(r[X0]!=null)s[X0]=T(r[X0]);return s},Wx=(r,f)=>{const s={};if(r[ss]!=null)s[ss]=XE(r[ss],f);if(r[bT]!=null)s[bT]=Lx(r[bT],f);if(r[vs]!=null)s[vs]=Er(r[vs]);return s},zx=(r,f)=>{const s={};if(r[ss]!=null)s[ss]=XE(r[ss],f);return s},Sx=(r,f)=>{const s={};if(r[Sr]!=null)s[Sr]=T(r[Sr]);return s},Px=(r,f)=>{const s={};if(r[Sr]!=null)s[Sr]=T(r[Sr]);return s},Xx=(r,f)=>{const s={};if(r[Sr]!=null)s[Sr]=T(r[Sr]);return s},Yx=(r,f)=>{const s={};if(r[Sr]!=null)s[Sr]=T(r[Sr]);return s},Kx=(r,f)=>{const s={};if(r[Sr]!=null)s[Sr]=T(r[Sr]);return s},Zx=(r,f)=>{const s={};if(r[Sr]!=null)s[Sr]=T(r[Sr]);return s},Mx=(r,f)=>{const s={};if(r[Sr]!=null)s[Sr]=T(r[Sr]);return s},or=(r)=>({httpStatusCode:r.statusCode,requestId:r.headers["x-amzn-requestid"]??r.headers["x-amzn-request-id"]??r.headers["x-amz-request-id"],extendedRequestId:r.headers["x-amz-id-2"],cfId:r.headers["x-amz-cf-id"]}),Jx,t0=async(r,f,s,w,h)=>{const{hostname:E,protocol:$="https",port:I,path:F}=await r.endpoint(),U={protocol:$,hostname:E,port:I,method:"POST",path:F.endsWith("/")?F.slice(0,-1)+s:F+s,headers:f};if(w!==void 0)U.hostname=w;if(h!==void 0)U.body=h;return new Qr(U)},rw,sw="2011-06-15",fw="Action",kh="AccessKeyId",Qx="AssumeRole",mT="AssumedRoleId",P0="AssumedRoleUser",Bx="AssumeRoleWithSAML",lx="AssumeRoleWithWebIdentity",Nh="Account",X0="Arn",yh="Audience",ss="Credentials",vT="ContextAssertion",Vx="DecodeAuthorizationMessage",jT="DecodedMessage",fs="DurationSeconds",iT="Expiration",dT="ExternalId",OT="EncodedMessage",bT="FederatedUser",cT="FederatedUserId",Hx="GetAccessKeyInfo",Dx="GetCallerIdentity",kx="GetFederationToken",Nx="GetSessionToken",_T="Issuer",gT="Key",xT="Name",eT="NameQualifier",qs="Policy",ms="PolicyArns",nT="PrincipalArn",oT="ProviderArn",aT="ProvidedContexts",pT="ProviderId",vs="PackedPolicySize",uT="Provider",Y0="RoleArn",qh="RoleSessionName",tT="Subject",rG="SecretAccessKey",sG="SAMLAssertion",fG="SubjectFromWebIdentityToken",js="SourceIdentity",mh="SerialNumber",wG="SubjectType",hG="SessionToken",vh="Tags",jh="TokenCode",EG="TransitiveTagKeys",$G="UserId",ww="Version",IG="Value",FG="WebIdentityToken",UG="arn",Sr="message",hw=(r)=>Object.entries(r).map(([f,s])=>S3(f)+"="+S3(s)).join("&"),yx=(r,f)=>{if(f.Error?.Code!==void 0)return f.Error.Code;if(r.statusCode==404)return"NotFound"};var K0=G(()=>{hf=u(lr(),1);qr();Y();p0();FI();Jx=mf(rs),rw={"content-type":"application/x-www-form-urlencoded"}});var ih;var TI=G(()=>{B();V();Y();uf();p0();K0();ih=class ih extends A.classBuilder().ep({...er}).m(function(r,f,s,w){return[R(s,this.serialize,this.deserialize),W(s,r.getEndpointParameterInstructions())]}).s("AWSSecurityTokenServiceV20110615","AssumeRole",{}).n("STSClient","AssumeRoleCommand").f(void 0,VT).ser(uM).de($J).build(){}});var GI;var GG=G(()=>{B();V();Y();uf();p0();K0();GI=class GI extends A.classBuilder().ep({...er}).m(function(r,f,s,w){return[R(s,this.serialize,this.deserialize),W(s,r.getEndpointParameterInstructions())]}).s("AWSSecurityTokenServiceV20110615","AssumeRoleWithSAML",{}).n("STSClient","AssumeRoleWithSAMLCommand").f(HT,DT).ser(tM).de(IJ).build(){}});var dh;var CI=G(()=>{B();V();Y();uf();p0();K0();dh=class dh extends A.classBuilder().ep({...er}).m(function(r,f,s,w){return[R(s,this.serialize,this.deserialize),W(s,r.getEndpointParameterInstructions())]}).s("AWSSecurityTokenServiceV20110615","AssumeRoleWithWebIdentity",{}).n("STSClient","AssumeRoleWithWebIdentityCommand").f(kT,NT).ser(rJ).de(FJ).build(){}});var LI;var CG=G(()=>{B();V();Y();uf();K0();LI=class LI extends A.classBuilder().ep({...er}).m(function(r,f,s,w){return[R(s,this.serialize,this.deserialize),W(s,r.getEndpointParameterInstructions())]}).s("AWSSecurityTokenServiceV20110615","DecodeAuthorizationMessage",{}).n("STSClient","DecodeAuthorizationMessageCommand").f(void 0,void 0).ser(sJ).de(UJ).build(){}});var AI;var LG=G(()=>{B();V();Y();uf();K0();AI=class AI extends A.classBuilder().ep({...er}).m(function(r,f,s,w){return[R(s,this.serialize,this.deserialize),W(s,r.getEndpointParameterInstructions())]}).s("AWSSecurityTokenServiceV20110615","GetAccessKeyInfo",{}).n("STSClient","GetAccessKeyInfoCommand").f(void 0,void 0).ser(fJ).de(TJ).build(){}});var RI;var AG=G(()=>{B();V();Y();uf();K0();RI=class RI extends A.classBuilder().ep({...er}).m(function(r,f,s,w){return[R(s,this.serialize,this.deserialize),W(s,r.getEndpointParameterInstructions())]}).s("AWSSecurityTokenServiceV20110615","GetCallerIdentity",{}).n("STSClient","GetCallerIdentityCommand").f(void 0,void 0).ser(wJ).de(GJ).build(){}});var WI;var RG=G(()=>{B();V();Y();uf();p0();K0();WI=class WI extends A.classBuilder().ep({...er}).m(function(r,f,s,w){return[R(s,this.serialize,this.deserialize),W(s,r.getEndpointParameterInstructions())]}).s("AWSSecurityTokenServiceV20110615","GetFederationToken",{}).n("STSClient","GetFederationTokenCommand").f(void 0,yT).ser(hJ).de(CJ).build(){}});var zI;var WG=G(()=>{B();V();Y();uf();p0();K0();zI=class zI extends A.classBuilder().ep({...er}).m(function(r,f,s,w){return[R(s,this.serialize,this.deserialize),W(s,r.getEndpointParameterInstructions())]}).s("AWSSecurityTokenServiceV20110615","GetSessionToken",{}).n("STSClient","GetSessionTokenCommand").f(void 0,qT).ser(EJ).de(LJ).build(){}});var qx,zG;var RJ=G(()=>{Y();TI();GG();CI();CG();LG();AG();RG();WG();GE();qx={AssumeRoleCommand:ih,AssumeRoleWithSAMLCommand:GI,AssumeRoleWithWebIdentityCommand:dh,DecodeAuthorizationMessageCommand:LI,GetAccessKeyInfoCommand:AI,GetCallerIdentityCommand:RI,GetFederationTokenCommand:WI,GetSessionTokenCommand:zI};zG=class zG extends S0{};yf(qx,zG)});var WJ=G(()=>{TI();GG();CI();CG();LG();AG();RG();WG()});var zJ=G(()=>{p0()});var SJ="us-east-1",PJ=(r)=>{if(typeof r?.Arn==="string"){const f=r.Arn.split(":");if(f.length>4&&f[4]!=="")return f[4]}return},XJ=async(r,f,s)=>{const w=typeof r==="function"?await r():r,h=typeof f==="function"?await f():f;return s?.debug?.("@aws-sdk/client-sts::resolveRegion","accepting first of:",`${w} (provider)`,`${h} (parent client)`,`${SJ} (STS default)`),w??h??SJ},YJ=(r,f)=>{let s,w;return async(h,E)=>{if(w=h,!s){const{logger:U=r?.parentClientConfig?.logger,region:C,requestHandler:L=r?.parentClientConfig?.requestHandler,credentialProviderLogger:z}=r,S=await XJ(C,r?.parentClientConfig?.region,z),K=!ZJ(L);s=new f({credentialDefaultProvider:()=>async()=>w,region:S,requestHandler:K?L:void 0,logger:U})}const{Credentials:$,AssumedRoleUser:I}=await s.send(new ih(E));if(!$||!$.AccessKeyId||!$.SecretAccessKey)throw new Error(`Invalid response from STS.assumeRole call with role ${E.RoleArn}`);const F=PJ(I);return{accessKeyId:$.AccessKeyId,secretAccessKey:$.SecretAccessKey,sessionToken:$.SessionToken,expiration:$.Expiration,...$.CredentialScope&&{credentialScope:$.CredentialScope},...F&&{accountId:F}}}},KJ=(r,f)=>{let s;return async(w)=>{if(!s){const{logger:I=r?.parentClientConfig?.logger,region:F,requestHandler:U=r?.parentClientConfig?.requestHandler,credentialProviderLogger:C}=r,L=await XJ(F,r?.parentClientConfig?.region,C),z=!ZJ(U);s=new f({region:L,requestHandler:z?U:void 0,logger:I})}const{Credentials:h,AssumedRoleUser:E}=await s.send(new dh(w));if(!h||!h.AccessKeyId||!h.SecretAccessKey)throw new Error(`Invalid response from STS.assumeRoleWithWebIdentity call with role ${w.RoleArn}`);const $=PJ(E);return{accessKeyId:h.AccessKeyId,secretAccessKey:h.SecretAccessKey,sessionToken:h.SessionToken,expiration:h.Expiration,...h.CredentialScope&&{credentialScope:h.CredentialScope},...$&&{accountId:$}}}},ZJ=(r)=>{return r?.metadata?.handlerProtocol==="h2"};var MJ=G(()=>{TI();CI()});var JJ=(r,f)=>{if(!f)return r;else return class s extends r{constructor(w){super(w);for(let h of f)this.middlewareStack.use(h)}}},QJ=(r={},f)=>YJ(r,JJ(S0,f)),BJ=(r={},f)=>KJ(r,JJ(S0,f)),mx=(r)=>(f)=>r({roleAssumer:QJ(f),roleAssumerWithWebIdentity:BJ(f),...f});var lJ=G(()=>{MJ();GE()});var SG={};Af(SG,{getDefaultRoleAssumerWithWebIdentity:()=>BJ,getDefaultRoleAssumer:()=>QJ,decorateDefaultCredentialProvider:()=>mx,__Client:()=>As,STSServiceException:()=>rs,STSClient:()=>S0,STS:()=>zG,RegionDisabledException:()=>RE,PackedPolicyTooLargeException:()=>AE,MalformedPolicyDocumentException:()=>LE,InvalidIdentityTokenException:()=>zE,InvalidAuthorizationMessageException:()=>PE,IDPRejectedClaimException:()=>WE,IDPCommunicationErrorException:()=>SE,GetSessionTokenResponseFilterSensitiveLog:()=>qT,GetSessionTokenCommand:()=>zI,GetFederationTokenResponseFilterSensitiveLog:()=>yT,GetFederationTokenCommand:()=>WI,GetCallerIdentityCommand:()=>RI,GetAccessKeyInfoCommand:()=>AI,ExpiredTokenException:()=>CE,DecodeAuthorizationMessageCommand:()=>LI,CredentialsFilterSensitiveLog:()=>Dh,AssumeRoleWithWebIdentityResponseFilterSensitiveLog:()=>NT,AssumeRoleWithWebIdentityRequestFilterSensitiveLog:()=>kT,AssumeRoleWithWebIdentityCommand:()=>dh,AssumeRoleWithSAMLResponseFilterSensitiveLog:()=>DT,AssumeRoleWithSAMLRequestFilterSensitiveLog:()=>HT,AssumeRoleWithSAMLCommand:()=>GI,AssumeRoleResponseFilterSensitiveLog:()=>VT,AssumeRoleCommand:()=>ih,$Command:()=>A});var PG=G(()=>{GE();RJ();WJ();zJ();lJ();FI()});var VJ=(r,{profile:f="default",logger:s}={})=>{return Boolean(r)&&typeof r==="object"&&typeof r.role_arn==="string"&&["undefined","string"].indexOf(typeof r.role_session_name)>-1&&["undefined","string"].indexOf(typeof r.external_id)>-1&&["undefined","string"].indexOf(typeof r.mfa_serial)>-1&&(vx(r,{profile:f,logger:s})||jx(r,{profile:f,logger:s}))},vx=(r,{profile:f,logger:s})=>{const w=typeof r.source_profile==="string"&&typeof r.credential_source==="undefined";if(w)s?.debug?.(` ${f} isAssumeRoleWithSourceProfile source_profile=${r.source_profile}`);return w},jx=(r,{profile:f,logger:s})=>{const w=typeof r.credential_source==="string"&&typeof r.source_profile==="undefined";if(w)s?.debug?.(` ${f} isCredentialSourceProfile credential_source=${r.credential_source}`);return w},HJ=async(r,f,s,w={})=>{s.logger?.debug("@aws-sdk/credential-provider-ini - resolveAssumeRoleCredentials (STS)");const h=f[r];if(!s.roleAssumer){const{getDefaultRoleAssumer:C}=await Promise.resolve().then(() => (PG(),SG));s.roleAssumer=C({...s.clientConfig,credentialProviderLogger:s.logger,parentClientConfig:s?.parentClientConfig},s.clientPlugins)}const{source_profile:E}=h;if(E&&E in w)throw new g(`Detected a cycle attempting to resolve credentials for profile ${ls(s)}. Profiles visited: `+Object.keys(w).join(", "),{logger:s.logger});s.logger?.debug(`@aws-sdk/credential-provider-ini - finding credential resolver using ${E?`source_profile=[${E}]`:`profile=[${r}]`}`);const $=E?SI(E,{...f,[E]:{...f[E],role_arn:h.role_arn??f[E].role_arn}},s,{...w,[E]:!0}):(await CM(h.credential_source,r,s.logger)(s))(),I={RoleArn:h.role_arn,RoleSessionName:h.role_session_name||`aws-sdk-js-${Date.now()}`,ExternalId:h.external_id,DurationSeconds:parseInt(h.duration_seconds||"3600",10)},{mfa_serial:F}=h;if(F){if(!s.mfaCodeProvider)throw new g(`Profile ${r} requires multi-factor authentication, but no MFA code callback was provided.`,{logger:s.logger,tryNextLink:!1});I.SerialNumber=F,I.TokenCode=await s.mfaCodeProvider(F)}const U=await $;return s.roleAssumer(U,I)};var DJ=G(()=>{Lr();rf();LM();XG()});var kJ=(r,f,s)=>{if(f.Version!==1)throw Error(`Profile ${r} credential_process did not return Version 1.`);if(f.AccessKeyId===void 0||f.SecretAccessKey===void 0)throw Error(`Profile ${r} credential_process returned invalid credentials.`);if(f.Expiration){const h=new Date;if(new Date(f.Expiration)<h)throw Error(`Profile ${r} credential_process returned expired credentials.`)}let w=f.AccountId;if(!w&&s?.[r]?.aws_account_id)w=s[r].aws_account_id;return{accessKeyId:f.AccessKeyId,secretAccessKey:f.SecretAccessKey,...f.SessionToken&&{sessionToken:f.SessionToken},...f.Expiration&&{expiration:new Date(f.Expiration)},...f.CredentialScope&&{credentialScope:f.CredentialScope},...w&&{accountId:w}}};import{exec as ix}from"child_process";import{promisify as dx}from"util";var NJ=async(r,f,s)=>{const w=f[r];if(f[r]){const h=w.credential_process;if(h!==void 0){const E=dx(ix);try{const{stdout:$}=await E(h);let I;try{I=JSON.parse($.trim())}catch{throw Error(`Profile ${r} credential_process returned invalid JSON.`)}return kJ(r,I,f)}catch($){throw new g($.message,{logger:s})}}else throw new g(`Profile ${r} did not contain credential_process.`,{logger:s})}else throw new g(`Profile ${r} could not be found in shared credentials file.`,{logger:s})};var yJ=G(()=>{Lr()});var Ox=(r={})=>async()=>{r.logger?.debug("@aws-sdk/credential-provider-process - fromProcess");const f=await v0(r);return NJ(ls(r),f,r.logger)};var qJ=G(()=>{rf();yJ()});var YG={};Af(YG,{fromProcess:()=>Ox});var KG=G(()=>{qJ()});var mJ=(r)=>Boolean(r)&&typeof r==="object"&&typeof r.credential_process==="string",vJ=async(r,f)=>Promise.resolve().then(() => (KG(),YG)).then(({fromProcess:s})=>s({...r,profile:f})());var jJ=async(r,f={})=>{const{fromSSO:s}=await Promise.resolve().then(() => (QT(),JT));return s({profile:r,logger:f.logger})()},iJ=(r)=>r&&(typeof r.sso_start_url==="string"||typeof r.sso_account_id==="string"||typeof r.sso_session==="string"||typeof r.sso_region==="string"||typeof r.sso_role_name==="string");var ZG=(r)=>Boolean(r)&&typeof r==="object"&&typeof r.aws_access_key_id==="string"&&typeof r.aws_secret_access_key==="string"&&["undefined","string"].indexOf(typeof r.aws_session_token)>-1&&["undefined","string"].indexOf(typeof r.aws_account_id)>-1,MG=(r,f)=>{return f?.logger?.debug("@aws-sdk/credential-provider-ini - resolveStaticCredentials"),Promise.resolve({accessKeyId:r.aws_access_key_id,secretAccessKey:r.aws_secret_access_key,sessionToken:r.aws_session_token,...r.aws_credential_scope&&{credentialScope:r.aws_credential_scope},...r.aws_account_id&&{accountId:r.aws_account_id}})};var JG=(r)=>async()=>{r.logger?.debug("@aws-sdk/credential-provider-web-identity - fromWebToken");const{roleArn:f,roleSessionName:s,webIdentityToken:w,providerId:h,policyArns:E,policy:$,durationSeconds:I}=r;let{roleAssumerWithWebIdentity:F}=r;if(!F){const{getDefaultRoleAssumerWithWebIdentity:U}=await Promise.resolve().then(() => (PG(),SG));F=U({...r.clientConfig,credentialProviderLogger:r.logger,parentClientConfig:r.parentClientConfig},r.clientPlugins)}return F({RoleArn:f,RoleSessionName:s??`aws-sdk-js-session-${Date.now()}`,WebIdentityToken:w,ProviderId:h,PolicyArns:E,Policy:$,DurationSeconds:I})};import{readFileSync as bx}from"fs";var cx="AWS_WEB_IDENTITY_TOKEN_FILE",_x="AWS_ROLE_ARN",gx="AWS_ROLE_SESSION_NAME",xx=(r={})=>async()=>{r.logger?.debug("@aws-sdk/credential-provider-web-identity - fromTokenFile");const f=r?.webIdentityTokenFile??process.env[cx],s=r?.roleArn??process.env[_x],w=r?.roleSessionName??process.env[gx];if(!f||!s)throw new g("Web identity configuration not specified",{logger:r.logger});return JG({...r,webIdentityToken:bx(f,{encoding:"ascii"}),roleArn:s,roleSessionName:w})()};var dJ=G(()=>{Lr()});var QG={};Af(QG,{fromWebToken:()=>JG,fromTokenFile:()=>xx});var BG=G(()=>{dJ()});var OJ=(r)=>Boolean(r)&&typeof r==="object"&&typeof r.web_identity_token_file==="string"&&typeof r.role_arn==="string"&&["undefined","string"].indexOf(typeof r.role_session_name)>-1,bJ=async(r,f)=>Promise.resolve().then(() => (BG(),QG)).then(({fromTokenFile:s})=>s({webIdentityTokenFile:r.web_identity_token_file,roleArn:r.role_arn,roleSessionName:r.role_session_name,roleAssumerWithWebIdentity:f.roleAssumerWithWebIdentity,logger:f.logger,parentClientConfig:f.parentClientConfig})());var SI=async(r,f,s,w={})=>{const h=f[r];if(Object.keys(w).length>0&&ZG(h))return MG(h,s);if(VJ(h,{profile:r,logger:s.logger}))return HJ(r,f,s,w);if(ZG(h))return MG(h,s);if(OJ(h))return bJ(h,s);if(mJ(h))return vJ(s,r);if(iJ(h))return await jJ(r,s);throw new g(`Could not resolve credentials using profile: [${r}] in configuration/credentials file(s).`,{logger:s.logger})};var XG=G(()=>{Lr();DJ()});var ex=(r={})=>async()=>{r.logger?.debug("@aws-sdk/credential-provider-ini - fromIni");const f=await v0(r);return SI(ls(r),f,r)};var cJ=G(()=>{rf();XG()});var _J={};Af(_J,{fromIni:()=>ex});var gJ=G(()=>{cJ()});var xJ=!1,A0=(r={})=>Sw(L0(async()=>{if(r.profile??process.env[pS]){if(process.env[D3]&&process.env[k3]){if(!xJ)(r.logger?.warn&&r.logger?.constructor?.name!=="NoOpLogger"?r.logger.warn:console.warn)(`@aws-sdk/credential-provider-node - defaultProvider::fromEnv WARNING:
24
+ - EKS container host 169.254.170.23 or [fd00:ec2::23]`,{logger:s})};var YP=G(()=>{zP=m(Ar(),1)});function XP(r){return new Mr({protocol:r.protocol,hostname:r.hostname,port:Number(r.port),path:r.pathname,query:Array.from(r.searchParams.entries()).reduce((s,[f,w])=>{return s[f]=w,s},{}),fragment:r.hash})}async function KP(r,s){const w=await TZ(r.body).transformToString();if(r.statusCode===200){const h=JSON.parse(w);if(typeof h.AccessKeyId!=="string"||typeof h.SecretAccessKey!=="string"||typeof h.Token!=="string"||typeof h.Expiration!=="string")throw new u3.CredentialsProviderError("HTTP credential provider response not of the required format, an object matching: { AccessKeyId: string, SecretAccessKey: string, Token: string, Expiration: string(rfc3339) }",{logger:s});return{accessKeyId:h.AccessKeyId,secretAccessKey:h.SecretAccessKey,sessionToken:h.Token,expiration:JZ(h.Expiration)}}if(r.statusCode>=400&&r.statusCode<500){let h={};try{h=JSON.parse(w)}catch(E){}throw Object.assign(new u3.CredentialsProviderError(`Server responded with status: ${r.statusCode}`,{logger:s}),{Code:h.Code,Message:h.Message})}throw new u3.CredentialsProviderError(`Server responded with status: ${r.statusCode}`,{logger:s})}var u3;var ZP=G(()=>{u3=m(Ar(),1);kr();K();xU()});var PP=(r,s,f)=>{return async()=>{for(let w=0;w<s;++w)try{return await r()}catch(h){await new Promise((E)=>setTimeout(E,f))}return await r()}};import Gx from"fs/promises";var JP,GT,Ax="AWS_CONTAINER_CREDENTIALS_RELATIVE_URI",Lx="http://169.254.170.2",Rx="AWS_CONTAINER_CREDENTIALS_FULL_URI",Cx="AWS_CONTAINER_AUTHORIZATION_TOKEN_FILE",Wx="AWS_CONTAINER_AUTHORIZATION_TOKEN",QP=(r={})=>{r.logger?.debug("@aws-sdk/credential-provider-http - fromHttp");let s;const f=r.awsContainerCredentialsRelativeUri??process.env[Ax],w=r.awsContainerCredentialsFullUri??process.env[Rx],h=r.awsContainerAuthorizationToken??process.env[Wx],E=r.awsContainerAuthorizationTokenFile??process.env[Cx],$=r.logger?.constructor?.name==="NoOpLogger"||!r.logger?console.warn:r.logger.warn;if(f&&w)$("@aws-sdk/credential-provider-http: you have set both awsContainerCredentialsRelativeUri and awsContainerCredentialsFullUri."),$("awsContainerCredentialsFullUri will take precedence.");if(h&&E)$("@aws-sdk/credential-provider-http: you have set both awsContainerAuthorizationToken and awsContainerAuthorizationTokenFile."),$("awsContainerAuthorizationToken will take precedence.");if(w)s=w;else if(f)s=`${Lx}${f}`;else throw new GT.CredentialsProviderError(`No HTTP credential provider host provided.
25
+ Set AWS_CONTAINER_CREDENTIALS_FULL_URI or AWS_CONTAINER_CREDENTIALS_RELATIVE_URI.`,{logger:r.logger});const I=new URL(s);SP(I,r.logger);const F=new ff({requestTimeout:r.timeout??1000,connectionTimeout:r.timeout??1000});return PP(async()=>{const U=XP(I);if(h)U.headers.Authorization=h;else if(E)U.headers.Authorization=(await Gx.readFile(E)).toString();try{const A=await F.handle(U);return KP(A.response).then((L)=>JP.setCredentialFeature(L,"CREDENTIALS_HTTP","z"))}catch(A){throw new GT.CredentialsProviderError(String(A),{logger:r.logger})}},r.maxRetries??3,r.timeout??1000)};var BP=G(()=>{JP=m(tr(),1);a0();GT=m(Ar(),1);YP();ZP()});var AT={};Ys(AT,{fromHttp:()=>QP});var LT=G(()=>{BP()});var t3,zx="AWS_EC2_METADATA_DISABLED",MP=async(r)=>{const{ENV_CMDS_FULL_URI:s,ENV_CMDS_RELATIVE_URI:f,fromContainerMetadata:w,fromInstanceMetadata:h}=await Promise.resolve().then(() => (x1(),g1));if(process.env[f]||process.env[s]){r.logger?.debug("@aws-sdk/credential-provider-node - remoteProvider::fromHttp/fromContainerMetadata");const{fromHttp:E}=await Promise.resolve().then(() => (LT(),AT));return t3.chain(E(r),w(r))}if(process.env[zx])return async()=>{throw new t3.CredentialsProviderError("EC2 Instance Metadata Service access disabled",{logger:r.logger})};return r.logger?.debug("@aws-sdk/credential-provider-node - remoteProvider::fromInstanceMetadata"),h(r)};var VP=G(()=>{t3=m(Ar(),1)});var RT=(r)=>r&&(typeof r.sso_start_url==="string"||typeof r.sso_account_id==="string"||typeof r.sso_session==="string"||typeof r.sso_region==="string"||typeof r.sso_role_name==="string");var HP=300000,Zh="To refresh this SSO session run 'aws sso login' with the corresponding profile.";function Sx(r){return{schemeId:"aws.auth#sigv4",signingProperties:{name:"sso-oauth",region:r.region},propertiesExtractor:(s,f)=>({signingProperties:{config:s,context:f}})}}function CT(r){return{schemeId:"smithy.api#noAuth"}}var lP,DP=async(r,s,f)=>{return{operation:Vf(s).operation,region:await yr(r.region)()||(()=>{throw new Error("expected `region` to be configured for `aws.auth#sigv4`")})()}},kP=(r)=>{const s=[];switch(r.operation){case"CreateToken":{s.push(CT(r));break}case"RegisterClient":{s.push(CT(r));break}case"StartDeviceAuthorization":{s.push(CT(r));break}default:s.push(Sx(r))}return s},yP=(r)=>{return{...lP.resolveAwsSdkSigV4Config(r)}};var WT=G(()=>{lP=m(Qr(),1);Es()});var NP=(r)=>{return{...r,useDualstackEndpoint:r.useDualstackEndpoint??!1,useFipsEndpoint:r.useFipsEndpoint??!1,defaultSigningName:"sso-oauth"}},rw;var Ph=G(()=>{rw={UseFIPS:{type:"builtInParams",name:"useFipsEndpoint"},Endpoint:{type:"builtInParams",name:"endpoint"},Region:{type:"builtInParams",name:"region"},UseDualStack:{type:"builtInParams",name:"useDualstackEndpoint"}}});var mP;var qP=G(()=>{mP={name:"@aws-sdk/client-sso-oidc",description:"AWS SDK for JavaScript Sso Oidc Client for Node.js, Browser and React Native",version:"3.668.0",scripts:{build:"concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'","build:cjs":"node ../../scripts/compilation/inline client-sso-oidc","build:es":"tsc -p tsconfig.es.json","build:include:deps":"lerna run --scope $npm_package_name --include-dependencies build","build:types":"tsc -p tsconfig.types.json","build:types:downlevel":"downlevel-dts dist-types dist-types/ts3.4",clean:"rimraf ./dist-* && rimraf *.tsbuildinfo","extract:docs":"api-extractor run --local","generate:client":"node ../../scripts/generate-clients/single-service --solo sso-oidc"},main:"./dist-cjs/index.js",types:"./dist-types/index.d.ts",module:"./dist-es/index.js",sideEffects:!1,dependencies:{"@aws-crypto/sha256-browser":"5.2.0","@aws-crypto/sha256-js":"5.2.0","@aws-sdk/core":"3.667.0","@aws-sdk/credential-provider-node":"3.668.0","@aws-sdk/middleware-host-header":"3.667.0","@aws-sdk/middleware-logger":"3.667.0","@aws-sdk/middleware-recursion-detection":"3.667.0","@aws-sdk/middleware-user-agent":"3.668.0","@aws-sdk/region-config-resolver":"3.667.0","@aws-sdk/types":"3.667.0","@aws-sdk/util-endpoints":"3.667.0","@aws-sdk/util-user-agent-browser":"3.667.0","@aws-sdk/util-user-agent-node":"3.668.0","@smithy/config-resolver":"^3.0.9","@smithy/core":"^2.4.8","@smithy/fetch-http-handler":"^3.2.9","@smithy/hash-node":"^3.0.7","@smithy/invalid-dependency":"^3.0.7","@smithy/middleware-content-length":"^3.0.9","@smithy/middleware-endpoint":"^3.1.4","@smithy/middleware-retry":"^3.0.23","@smithy/middleware-serde":"^3.0.7","@smithy/middleware-stack":"^3.0.7","@smithy/node-config-provider":"^3.1.8","@smithy/node-http-handler":"^3.2.4","@smithy/protocol-http":"^4.1.4","@smithy/smithy-client":"^3.4.0","@smithy/types":"^3.5.0","@smithy/url-parser":"^3.0.7","@smithy/util-base64":"^3.0.0","@smithy/util-body-length-browser":"^3.0.0","@smithy/util-body-length-node":"^3.0.0","@smithy/util-defaults-mode-browser":"^3.0.23","@smithy/util-defaults-mode-node":"^3.0.23","@smithy/util-endpoints":"^2.1.3","@smithy/util-middleware":"^3.0.7","@smithy/util-retry":"^3.0.7","@smithy/util-utf8":"^3.0.0",tslib:"^2.6.2"},devDependencies:{"@tsconfig/node16":"16.1.3","@types/node":"^16.18.96",concurrently:"7.0.0","downlevel-dts":"0.10.1",rimraf:"3.0.2",typescript:"~4.9.5"},engines:{node:">=16.0.0"},typesVersions:{"<4.0":{"dist-types/*":["dist-types/ts3.4/*"]}},files:["dist-*/**"],author:{name:"AWS SDK for JavaScript Team",url:"https://aws.amazon.com/javascript/"},license:"Apache-2.0",peerDependencies:{"@aws-sdk/client-sts":"^3.668.0"},browser:{"./dist-es/runtimeConfig":"./dist-es/runtimeConfig.browser"},"react-native":{"./dist-es/runtimeConfig":"./dist-es/runtimeConfig.native"},homepage:"https://github.com/aws/aws-sdk-js-v3/tree/main/clients/client-sso-oidc",repository:{type:"git",url:"https://github.com/aws/aws-sdk-js-v3.git",directory:"clients/client-sso-oidc"}}});var zT;var ST=G(()=>{zT={isCrtAvailable:!1}});var jP=()=>{if(zT.isCrtAvailable)return["md/crt-avail"];return null};var vP=G(()=>{ST()});import{platform as Xx,release as Kx}from"os";import{env as iP,versions as Zx}from"process";var Px=({serviceId:r,clientVersion:s})=>{return async(f)=>{const w=[["aws-sdk-js",s],["ua","2.1"],[`os/${Xx()}`,Kx()],["lang/js"],["md/nodejs",`${Zx.node}`]],h=jP();if(h)w.push(h);if(r)w.push([`api/${r}`,s]);if(iP.AWS_EXECUTION_ENV)w.push([`exec-env/${iP.AWS_EXECUTION_ENV}`]);const E=await f?.userAgentAppId?.();return E?[...w,[`app/${E}`]]:[...w]}},os;var OP=G(()=>{vP();ST();os=Px});var Jx="AWS_SDK_UA_APP_ID",Qx="sdk-ua-app-id",as;var dP=G(()=>{Bw();as={environmentVariableSelector:(r)=>r[Jx],configFileSelector:(r)=>r[Qx],default:yF}});var Jh=G(()=>{OP();dP()});import{Buffer as Bx}from"buffer";import{createHash as Mx,createHmac as Vx}from"crypto";function cP(r,s){if(Bx.isBuffer(r))return r;if(typeof r==="string")return Yh(r,s);if(ArrayBuffer.isView(r))return z0(r.buffer,r.byteOffset,r.byteLength);return z0(r)}class Fs{constructor(r,s){this.algorithmIdentifier=r,this.secret=s,this.reset()}update(r,s){this.hash.update(lK(cP(r,s)))}digest(){return Promise.resolve(this.hash.digest())}reset(){this.hash=this.secret?Vx(this.algorithmIdentifier,cP(this.secret)):Mx(this.algorithmIdentifier)}}var Qh=G(()=>{lw();Os()});import{fstatSync as Hx,lstatSync as lx}from"fs";var ps=(r)=>{if(!r)return 0;if(typeof r==="string")return Buffer.byteLength(r);else if(typeof r.byteLength==="number")return r.byteLength;else if(typeof r.size==="number")return r.size;else if(typeof r.start==="number"&&typeof r.end==="number")return r.end+1-r.start;else if(typeof r.path==="string"||Buffer.isBuffer(r.path))return lx(r.path).size;else if(typeof r.fd==="number")return Hx(r.fd).size;throw new Error(`Body Length computation failed for ${r}`)};var bP=()=>{};var Bh=G(()=>{bP()});var _P,gP,xP,uP,tP,jf,eP,rJ,nP,oP,aP,pP,Dx,fJ;var sJ=G(()=>{_P={["required"]:!1,type:"String"},gP={["required"]:!0,default:!1,type:"Boolean"},xP={["ref"]:"Endpoint"},uP={["fn"]:"booleanEquals",["argv"]:[{["ref"]:"UseFIPS"},!0]},tP={["fn"]:"booleanEquals",["argv"]:[{["ref"]:"UseDualStack"},!0]},jf={},eP={["fn"]:"getAttr",["argv"]:[{["ref"]:"PartitionResult"},"supportsFIPS"]},rJ={["ref"]:"PartitionResult"},nP={["fn"]:"booleanEquals",["argv"]:[!0,{["fn"]:"getAttr",["argv"]:[rJ,"supportsDualStack"]}]},oP=[uP],aP=[tP],pP=[{["ref"]:"Region"}],Dx={version:"1.0",parameters:{Region:_P,UseDualStack:gP,UseFIPS:gP,Endpoint:_P},rules:[{conditions:[{["fn"]:"isSet",["argv"]:[xP]}],rules:[{conditions:oP,error:"Invalid Configuration: FIPS and custom endpoint are not supported",type:"error"},{conditions:aP,error:"Invalid Configuration: Dualstack and custom endpoint are not supported",type:"error"},{endpoint:{url:xP,properties:jf,headers:jf},type:"endpoint"}],type:"tree"},{conditions:[{["fn"]:"isSet",["argv"]:pP}],rules:[{conditions:[{["fn"]:"aws.partition",["argv"]:pP,assign:"PartitionResult"}],rules:[{conditions:[uP,tP],rules:[{conditions:[{["fn"]:"booleanEquals",["argv"]:[!0,eP]},nP],rules:[{endpoint:{url:"https://oidc-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:jf,headers:jf},type:"endpoint"}],type:"tree"},{error:"FIPS and DualStack are enabled, but this partition does not support one or both",type:"error"}],type:"tree"},{conditions:oP,rules:[{conditions:[{["fn"]:"booleanEquals",["argv"]:[eP,!0]}],rules:[{conditions:[{["fn"]:"stringEquals",["argv"]:[{["fn"]:"getAttr",["argv"]:[rJ,"name"]},"aws-us-gov"]}],endpoint:{url:"https://oidc.{Region}.amazonaws.com",properties:jf,headers:jf},type:"endpoint"},{endpoint:{url:"https://oidc-fips.{Region}.{PartitionResult#dnsSuffix}",properties:jf,headers:jf},type:"endpoint"}],type:"tree"},{error:"FIPS is enabled but this partition does not support FIPS",type:"error"}],type:"tree"},{conditions:aP,rules:[{conditions:[nP],rules:[{endpoint:{url:"https://oidc.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:jf,headers:jf},type:"endpoint"}],type:"tree"},{error:"DualStack is enabled but this partition does not support DualStack",type:"error"}],type:"tree"},{endpoint:{url:"https://oidc.{Region}.{PartitionResult#dnsSuffix}",properties:jf,headers:jf},type:"endpoint"}],type:"tree"}],type:"tree"},{error:"Invalid Configuration: Missing Region",type:"error"}]},fJ=Dx});var kx,wJ=(r,s={})=>{return kx.get(r,()=>ss(fJ,{endpointParams:r,logger:s.logger}))};var hJ=G(()=>{Pw();ws();sJ();kx=new fs({size:50,params:["Endpoint","Region","UseDualStack","UseFIPS"]});ur.aws=hs});var EJ,$J,IJ=(r)=>{return{apiVersion:"2019-06-10",base64Decoder:r?.base64Decoder??Uf,base64Encoder:r?.base64Encoder??Gf,disableHostPrefix:r?.disableHostPrefix??!1,endpointProvider:r?.endpointProvider??wJ,extensions:r?.extensions??[],httpAuthSchemeProvider:r?.httpAuthSchemeProvider??kP,httpAuthSchemes:r?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:(s)=>s.getIdentityProvider("aws.auth#sigv4"),signer:new EJ.AwsSdkSigV4Signer},{schemeId:"smithy.api#noAuth",identityProvider:(s)=>s.getIdentityProvider("smithy.api#noAuth")||(async()=>({})),signer:new $J.NoAuthSigner}],logger:r?.logger??new Yf,serviceId:r?.serviceId??"SSO OIDC",urlParser:r?.urlParser??br,utf8Decoder:r?.utf8Decoder??_r,utf8Encoder:r?.utf8Encoder??Tf}};var FJ=G(()=>{EJ=m(Qr(),1),$J=m(qr(),1);K();n0();S0();Os();WT();hJ()});var UJ="AWS_EXECUTION_ENV",YT="AWS_REGION",XT="AWS_DEFAULT_REGION",TJ="AWS_EC2_METADATA_DISABLED",GJ,AJ="/latest/meta-data/placement/region";var LJ=G(()=>{GJ=["in-region","cross-region","mobile","standard","legacy"]});var RJ;var CJ=G(()=>{RJ={environmentVariableSelector:(r)=>{return r.AWS_DEFAULTS_MODE},configFileSelector:(r)=>{return r.defaults_mode},default:"legacy"}});var WJ,us=({region:r=u(Hf),defaultsMode:s=u(RJ)}={})=>WJ.memoize(async()=>{const f=typeof s==="function"?await s():s;switch(f?.toLowerCase()){case"auto":return yx(r);case"in-region":case"cross-region":case"mobile":case"standard":case"legacy":return Promise.resolve(f?.toLocaleLowerCase());case void 0:return Promise.resolve("legacy");default:throw new Error(`Invalid parameter for "defaultsMode", expect ${GJ.join(", ")}, got ${f}`)}}),yx=async(r)=>{if(r){const s=typeof r==="function"?await r():r,f=await Nx();if(!f)return"standard";if(s===f)return"in-region";else return"cross-region"}return"standard"},Nx=async()=>{if(process.env[UJ]&&(process.env[YT]||process.env[XT]))return process.env[YT]??process.env[XT];if(!process.env[TJ])try{const{getInstanceMetadataEndpoint:r,httpRequest:s}=await Promise.resolve().then(() => (x1(),g1)),f=await r();return(await s({...f,path:AJ})).toString()}catch(r){}};var zJ=G(()=>{lf();Ns();WJ=m(Ar(),1);LJ();CJ()});var Mh=G(()=>{zJ()});var SJ,YJ=(r)=>{gs(process.version);const s=us(r),f=()=>s().then(_s),w=IJ(r);return SJ.emitWarningIfUnsupportedVersion(process.version),{...w,...r,runtime:"node",defaultsMode:s,bodyLengthChecker:r?.bodyLengthChecker??ps,credentialDefaultProvider:r?.credentialDefaultProvider??X0,defaultUserAgentProvider:r?.defaultUserAgentProvider??os({serviceId:w.serviceId,clientVersion:mP.version}),maxAttempts:r?.maxAttempts??u(js),region:r?.region??u(Hf,Ds),requestHandler:ff.create(r?.requestHandler??f),retryMode:r?.retryMode??u({...is,default:async()=>(await f()).retryMode||Nf}),sha256:r?.sha256??Fs.bind(null,"sha256"),streamCollector:r?.streamCollector??qf,useDualstackEndpoint:r?.useDualstackEndpoint??u(Hs),useFipsEndpoint:r?.useFipsEndpoint??u(ls),userAgentAppId:r?.userAgentAppId??u(as)}};var XJ=G(()=>{qP();SJ=m(Qr(),1);e1();Jh();lf();Qh();Is();Ns();a0();Bh();zf();FJ();K();Mh();K()});var ts=(r)=>{let s=async()=>{if(r.region===void 0)throw new Error("Region is missing from runtimeConfig");const f=r.region;if(typeof f==="string")return f;return f()};return{setRegion(f){s=f},region(){return s}}},r0=(r)=>{return{region:r.region()}};var KJ=()=>{};var ZJ=()=>{};var PJ=G(()=>{ZJ()});var JJ=G(()=>{KJ();PJ()});var Vh=G(()=>{JJ()});var QJ=(r)=>{const s=r.httpAuthSchemes;let{httpAuthSchemeProvider:f,credentials:w}=r;return{setHttpAuthScheme(h){const E=s.findIndex(($)=>$.schemeId===h.schemeId);if(E===-1)s.push(h);else s.splice(E,1,h)},httpAuthSchemes(){return s},setHttpAuthSchemeProvider(h){f=h},httpAuthSchemeProvider(){return f},setCredentials(h){w=h},credentials(){return w}}},BJ=(r)=>{return{httpAuthSchemes:r.httpAuthSchemes(),httpAuthSchemeProvider:r.httpAuthSchemeProvider(),credentials:r.credentials()}};var rI=(r)=>r,MJ=(r,s)=>{const f={...rI(ts(r)),...rI(xs(r)),...rI(Xs(r)),...rI(QJ(r))};return s.forEach((w)=>w.configure(f)),{...r,...r0(f),...es(f),...Ks(f),...BJ(f)}};var VJ=G(()=>{Vh();kr();K()});var Hh,fI;var KT=G(()=>{pw();uw();tw();Bw();lf();Hh=m(qr(),1);Lh();B();Is();K();WT();Ph();XJ();VJ();fI=class fI extends Sf{constructor(...[r]){const s=YJ(r||{}),f=NP(s),w=Ms(f),h=vs(w),E=ks(h),$=Zs(E),I=qs($),F=yP(I),U=MJ(F,r?.extensions||[]);super(U);this.config=U,this.middlewareStack.use(Vs(this.config)),this.middlewareStack.use(ns(this.config)),this.middlewareStack.use(ys(this.config)),this.middlewareStack.use(Ps(this.config)),this.middlewareStack.use(Js(this.config)),this.middlewareStack.use(Qs(this.config)),this.middlewareStack.use(Hh.getHttpAuthSchemeEndpointRuleSetPlugin(this.config,{httpAuthSchemeParametersProvider:DP,identityProviderConfigProvider:async(A)=>new Hh.DefaultIdentityProviderConfig({"aws.auth#sigv4":A.credentials})})),this.middlewareStack.use(Hh.getHttpSigningPlugin(this.config))}destroy(){super.destroy()}}});var Hr;var sI=G(()=>{K();Hr=class Hr extends mf{constructor(r){super(r);Object.setPrototypeOf(this,Hr.prototype)}}});var n1,o1,a1,p1,u1,t1,rE,fE,sE,wE,hE,EE,$E,IE,ZT=(r)=>({...r,...r.clientSecret&&{clientSecret:o},...r.refreshToken&&{refreshToken:o},...r.codeVerifier&&{codeVerifier:o}}),PT=(r)=>({...r,...r.accessToken&&{accessToken:o},...r.refreshToken&&{refreshToken:o},...r.idToken&&{idToken:o}}),JT=(r)=>({...r,...r.refreshToken&&{refreshToken:o},...r.assertion&&{assertion:o},...r.subjectToken&&{subjectToken:o},...r.codeVerifier&&{codeVerifier:o}}),QT=(r)=>({...r,...r.accessToken&&{accessToken:o},...r.refreshToken&&{refreshToken:o},...r.idToken&&{idToken:o}}),BT=(r)=>({...r,...r.clientSecret&&{clientSecret:o}}),MT=(r)=>({...r,...r.clientSecret&&{clientSecret:o}});var qw=G(()=>{K();sI();n1=class n1 extends Hr{constructor(r){super({name:"AccessDeniedException",$fault:"client",...r});this.name="AccessDeniedException",this.$fault="client",Object.setPrototypeOf(this,n1.prototype),this.error=r.error,this.error_description=r.error_description}};o1=class o1 extends Hr{constructor(r){super({name:"AuthorizationPendingException",$fault:"client",...r});this.name="AuthorizationPendingException",this.$fault="client",Object.setPrototypeOf(this,o1.prototype),this.error=r.error,this.error_description=r.error_description}};a1=class a1 extends Hr{constructor(r){super({name:"ExpiredTokenException",$fault:"client",...r});this.name="ExpiredTokenException",this.$fault="client",Object.setPrototypeOf(this,a1.prototype),this.error=r.error,this.error_description=r.error_description}};p1=class p1 extends Hr{constructor(r){super({name:"InternalServerException",$fault:"server",...r});this.name="InternalServerException",this.$fault="server",Object.setPrototypeOf(this,p1.prototype),this.error=r.error,this.error_description=r.error_description}};u1=class u1 extends Hr{constructor(r){super({name:"InvalidClientException",$fault:"client",...r});this.name="InvalidClientException",this.$fault="client",Object.setPrototypeOf(this,u1.prototype),this.error=r.error,this.error_description=r.error_description}};t1=class t1 extends Hr{constructor(r){super({name:"InvalidGrantException",$fault:"client",...r});this.name="InvalidGrantException",this.$fault="client",Object.setPrototypeOf(this,t1.prototype),this.error=r.error,this.error_description=r.error_description}};rE=class rE extends Hr{constructor(r){super({name:"InvalidRequestException",$fault:"client",...r});this.name="InvalidRequestException",this.$fault="client",Object.setPrototypeOf(this,rE.prototype),this.error=r.error,this.error_description=r.error_description}};fE=class fE extends Hr{constructor(r){super({name:"InvalidScopeException",$fault:"client",...r});this.name="InvalidScopeException",this.$fault="client",Object.setPrototypeOf(this,fE.prototype),this.error=r.error,this.error_description=r.error_description}};sE=class sE extends Hr{constructor(r){super({name:"SlowDownException",$fault:"client",...r});this.name="SlowDownException",this.$fault="client",Object.setPrototypeOf(this,sE.prototype),this.error=r.error,this.error_description=r.error_description}};wE=class wE extends Hr{constructor(r){super({name:"UnauthorizedClientException",$fault:"client",...r});this.name="UnauthorizedClientException",this.$fault="client",Object.setPrototypeOf(this,wE.prototype),this.error=r.error,this.error_description=r.error_description}};hE=class hE extends Hr{constructor(r){super({name:"UnsupportedGrantTypeException",$fault:"client",...r});this.name="UnsupportedGrantTypeException",this.$fault="client",Object.setPrototypeOf(this,hE.prototype),this.error=r.error,this.error_description=r.error_description}};EE=class EE extends Hr{constructor(r){super({name:"InvalidRequestRegionException",$fault:"client",...r});this.name="InvalidRequestRegionException",this.$fault="client",Object.setPrototypeOf(this,EE.prototype),this.error=r.error,this.error_description=r.error_description,this.endpoint=r.endpoint,this.region=r.region}};$E=class $E extends Hr{constructor(r){super({name:"InvalidClientMetadataException",$fault:"client",...r});this.name="InvalidClientMetadataException",this.$fault="client",Object.setPrototypeOf(this,$E.prototype),this.error=r.error,this.error_description=r.error_description}};IE=class IE extends Hr{constructor(r){super({name:"InvalidRedirectUriException",$fault:"client",...r});this.name="InvalidRedirectUriException",this.$fault="client",Object.setPrototypeOf(this,IE.prototype),this.error=r.error,this.error_description=r.error_description}}});var K0,FE,HJ=async(r,s)=>{const f=FE.requestBuilder(r,s),w={"content-type":"application/json"};f.bp("/token");let h;return h=JSON.stringify(p(r,{clientId:[],clientSecret:[],code:[],codeVerifier:[],deviceCode:[],grantType:[],redirectUri:[],refreshToken:[],scope:(E)=>q(E)})),f.m("POST").h(w).b(h),f.build()},lJ=async(r,s)=>{const f=FE.requestBuilder(r,s),w={"content-type":"application/json"};f.bp("/token");const h=Y({[px]:[,"t"]});let E;return E=JSON.stringify(p(r,{assertion:[],clientId:[],code:[],codeVerifier:[],grantType:[],redirectUri:[],refreshToken:[],requestedTokenType:[],scope:($)=>q($),subjectToken:[],subjectTokenType:[]})),f.m("POST").h(w).q(h).b(E),f.build()},DJ=async(r,s)=>{const f=FE.requestBuilder(r,s),w={"content-type":"application/json"};f.bp("/client/register");let h;return h=JSON.stringify(p(r,{clientName:[],clientType:[],entitledApplicationArn:[],grantTypes:(E)=>q(E),issuerUrl:[],redirectUris:(E)=>q(E),scopes:(E)=>q(E)})),f.m("POST").h(w).b(h),f.build()},kJ=async(r,s)=>{const f=FE.requestBuilder(r,s),w={"content-type":"application/json"};f.bp("/device_authorization");let h;return h=JSON.stringify(p(r,{clientId:[],clientSecret:[],startUrl:[]})),f.m("POST").h(w).b(h),f.build()},yJ=async(r,s)=>{if(r.statusCode!==200&&r.statusCode>=300)return wI(r,s);const f=Y({$metadata:jr(r)}),w=y(c(await K0.parseJsonBody(r.body,s)),"body"),h=p(w,{accessToken:T,expiresIn:Dw,idToken:T,refreshToken:T,tokenType:T});return Object.assign(f,h),f},NJ=async(r,s)=>{if(r.statusCode!==200&&r.statusCode>=300)return wI(r,s);const f=Y({$metadata:jr(r)}),w=y(c(await K0.parseJsonBody(r.body,s)),"body"),h=p(w,{accessToken:T,expiresIn:Dw,idToken:T,issuedTokenType:T,refreshToken:T,scope:q,tokenType:T});return Object.assign(f,h),f},qJ=async(r,s)=>{if(r.statusCode!==200&&r.statusCode>=300)return wI(r,s);const f=Y({$metadata:jr(r)}),w=y(c(await K0.parseJsonBody(r.body,s)),"body"),h=p(w,{authorizationEndpoint:T,clientId:T,clientIdIssuedAt:Xh,clientSecret:T,clientSecretExpiresAt:Xh,tokenEndpoint:T});return Object.assign(f,h),f},mJ=async(r,s)=>{if(r.statusCode!==200&&r.statusCode>=300)return wI(r,s);const f=Y({$metadata:jr(r)}),w=y(c(await K0.parseJsonBody(r.body,s)),"body"),h=p(w,{deviceCode:T,expiresIn:Dw,interval:Dw,userCode:T,verificationUri:T,verificationUriComplete:T});return Object.assign(f,h),f},wI=async(r,s)=>{const f={...r,body:await K0.parseJsonErrorBody(r.body,s)},w=K0.loadRestJsonErrorCode(r,f.body);switch(w){case"AccessDeniedException":case"com.amazonaws.ssooidc#AccessDeniedException":throw await jx(f,s);case"AuthorizationPendingException":case"com.amazonaws.ssooidc#AuthorizationPendingException":throw await vx(f,s);case"ExpiredTokenException":case"com.amazonaws.ssooidc#ExpiredTokenException":throw await ix(f,s);case"InternalServerException":case"com.amazonaws.ssooidc#InternalServerException":throw await Ox(f,s);case"InvalidClientException":case"com.amazonaws.ssooidc#InvalidClientException":throw await dx(f,s);case"InvalidGrantException":case"com.amazonaws.ssooidc#InvalidGrantException":throw await bx(f,s);case"InvalidRequestException":case"com.amazonaws.ssooidc#InvalidRequestException":throw await gx(f,s);case"InvalidScopeException":case"com.amazonaws.ssooidc#InvalidScopeException":throw await ex(f,s);case"SlowDownException":case"com.amazonaws.ssooidc#SlowDownException":throw await nx(f,s);case"UnauthorizedClientException":case"com.amazonaws.ssooidc#UnauthorizedClientException":throw await ox(f,s);case"UnsupportedGrantTypeException":case"com.amazonaws.ssooidc#UnsupportedGrantTypeException":throw await ax(f,s);case"InvalidRequestRegionException":case"com.amazonaws.ssooidc#InvalidRequestRegionException":throw await xx(f,s);case"InvalidClientMetadataException":case"com.amazonaws.ssooidc#InvalidClientMetadataException":throw await cx(f,s);case"InvalidRedirectUriException":case"com.amazonaws.ssooidc#InvalidRedirectUriException":throw await _x(f,s);default:const h=f.body;return mx({output:r,parsedBody:h,errorCode:w})}},mx,jx=async(r,s)=>{const f=Y({}),w=r.body,h=p(w,{error:T,error_description:T});Object.assign(f,h);const E=new n1({$metadata:jr(r),...f});return D(E,r.body)},vx=async(r,s)=>{const f=Y({}),w=r.body,h=p(w,{error:T,error_description:T});Object.assign(f,h);const E=new o1({$metadata:jr(r),...f});return D(E,r.body)},ix=async(r,s)=>{const f=Y({}),w=r.body,h=p(w,{error:T,error_description:T});Object.assign(f,h);const E=new a1({$metadata:jr(r),...f});return D(E,r.body)},Ox=async(r,s)=>{const f=Y({}),w=r.body,h=p(w,{error:T,error_description:T});Object.assign(f,h);const E=new p1({$metadata:jr(r),...f});return D(E,r.body)},dx=async(r,s)=>{const f=Y({}),w=r.body,h=p(w,{error:T,error_description:T});Object.assign(f,h);const E=new u1({$metadata:jr(r),...f});return D(E,r.body)},cx=async(r,s)=>{const f=Y({}),w=r.body,h=p(w,{error:T,error_description:T});Object.assign(f,h);const E=new $E({$metadata:jr(r),...f});return D(E,r.body)},bx=async(r,s)=>{const f=Y({}),w=r.body,h=p(w,{error:T,error_description:T});Object.assign(f,h);const E=new t1({$metadata:jr(r),...f});return D(E,r.body)},_x=async(r,s)=>{const f=Y({}),w=r.body,h=p(w,{error:T,error_description:T});Object.assign(f,h);const E=new IE({$metadata:jr(r),...f});return D(E,r.body)},gx=async(r,s)=>{const f=Y({}),w=r.body,h=p(w,{error:T,error_description:T});Object.assign(f,h);const E=new rE({$metadata:jr(r),...f});return D(E,r.body)},xx=async(r,s)=>{const f=Y({}),w=r.body,h=p(w,{endpoint:T,error:T,error_description:T,region:T});Object.assign(f,h);const E=new EE({$metadata:jr(r),...f});return D(E,r.body)},ex=async(r,s)=>{const f=Y({}),w=r.body,h=p(w,{error:T,error_description:T});Object.assign(f,h);const E=new fE({$metadata:jr(r),...f});return D(E,r.body)},nx=async(r,s)=>{const f=Y({}),w=r.body,h=p(w,{error:T,error_description:T});Object.assign(f,h);const E=new sE({$metadata:jr(r),...f});return D(E,r.body)},ox=async(r,s)=>{const f=Y({}),w=r.body,h=p(w,{error:T,error_description:T});Object.assign(f,h);const E=new wE({$metadata:jr(r),...f});return D(E,r.body)},ax=async(r,s)=>{const f=Y({}),w=r.body,h=p(w,{error:T,error_description:T});Object.assign(f,h);const E=new hE({$metadata:jr(r),...f});return D(E,r.body)},jr=(r)=>({httpStatusCode:r.statusCode,requestId:r.headers["x-amzn-requestid"]??r.headers["x-amzn-request-id"]??r.headers["x-amz-request-id"],extendedRequestId:r.headers["x-amz-id-2"],cfId:r.headers["x-amz-cf-id"]}),px="aws_iam";var UE=G(()=>{K0=m(Qr(),1),FE=m(qr(),1);K();qw();sI();mx=bs(Hr)});var hI;var VT=G(()=>{B();V();K();Ph();qw();UE();hI=class hI extends R.classBuilder().ep(rw).m(function(r,s,f,w){return[C(f,this.serialize,this.deserialize),W(f,r.getEndpointParameterInstructions())]}).s("AWSSSOOIDCService","CreateToken",{}).n("SSOOIDCClient","CreateTokenCommand").f(ZT,PT).ser(HJ).de(yJ).build(){}});var EI;var HT=G(()=>{B();V();K();Ph();qw();UE();EI=class EI extends R.classBuilder().ep(rw).m(function(r,s,f,w){return[C(f,this.serialize,this.deserialize),W(f,r.getEndpointParameterInstructions())]}).s("AWSSSOOIDCService","CreateTokenWithIAM",{}).n("SSOOIDCClient","CreateTokenWithIAMCommand").f(JT,QT).ser(lJ).de(NJ).build(){}});var $I;var lT=G(()=>{B();V();K();Ph();qw();UE();$I=class $I extends R.classBuilder().ep(rw).m(function(r,s,f,w){return[C(f,this.serialize,this.deserialize),W(f,r.getEndpointParameterInstructions())]}).s("AWSSSOOIDCService","RegisterClient",{}).n("SSOOIDCClient","RegisterClientCommand").f(void 0,BT).ser(DJ).de(qJ).build(){}});var II;var DT=G(()=>{B();V();K();Ph();qw();UE();II=class II extends R.classBuilder().ep(rw).m(function(r,s,f,w){return[C(f,this.serialize,this.deserialize),W(f,r.getEndpointParameterInstructions())]}).s("AWSSSOOIDCService","StartDeviceAuthorization",{}).n("SSOOIDCClient","StartDeviceAuthorizationCommand").f(MT,void 0).ser(kJ).de(mJ).build(){}});var ux,kT;var jJ=G(()=>{K();VT();HT();lT();DT();KT();ux={CreateTokenCommand:hI,CreateTokenWithIAMCommand:EI,RegisterClientCommand:$I,StartDeviceAuthorizationCommand:II};kT=class kT extends fI{};ds(ux,kT)});var vJ=G(()=>{VT();HT();lT();DT()});var iJ=G(()=>{qw()});var yT={};Ys(yT,{__Client:()=>Sf,UnsupportedGrantTypeException:()=>hE,UnauthorizedClientException:()=>wE,StartDeviceAuthorizationRequestFilterSensitiveLog:()=>MT,StartDeviceAuthorizationCommand:()=>II,SlowDownException:()=>sE,SSOOIDCServiceException:()=>Hr,SSOOIDCClient:()=>fI,SSOOIDC:()=>kT,RegisterClientResponseFilterSensitiveLog:()=>BT,RegisterClientCommand:()=>$I,InvalidScopeException:()=>fE,InvalidRequestRegionException:()=>EE,InvalidRequestException:()=>rE,InvalidRedirectUriException:()=>IE,InvalidGrantException:()=>t1,InvalidClientMetadataException:()=>$E,InvalidClientException:()=>u1,InternalServerException:()=>p1,ExpiredTokenException:()=>a1,CreateTokenWithIAMResponseFilterSensitiveLog:()=>QT,CreateTokenWithIAMRequestFilterSensitiveLog:()=>JT,CreateTokenWithIAMCommand:()=>EI,CreateTokenResponseFilterSensitiveLog:()=>PT,CreateTokenRequestFilterSensitiveLog:()=>ZT,CreateTokenCommand:()=>hI,AuthorizationPendingException:()=>o1,AccessDeniedException:()=>n1,$Command:()=>R});var NT=G(()=>{KT();jJ();vJ();iJ();sI()});var qT,OJ=async(r)=>{const{SSOOIDCClient:s}=await Promise.resolve().then(() => (NT(),yT));if(qT[r])return qT[r];const f=new s({region:r});return qT[r]=f,f};var dJ=G(()=>{qT={}});var cJ=async(r,s)=>{const{CreateTokenCommand:f}=await Promise.resolve().then(() => (NT(),yT));return(await OJ(s)).send(new f({clientId:r.clientId,clientSecret:r.clientSecret,refreshToken:r.refreshToken,grantType:"refresh_token"}))};var bJ=G(()=>{dJ()});var _J,mT=(r)=>{if(r.expiration&&r.expiration.getTime()<Date.now())throw new _J.TokenProviderError(`Token is expired. ${Zh}`,!1)};var gJ=G(()=>{_J=m(Ar(),1)});var xJ,fw=(r,s,f=!1)=>{if(typeof s==="undefined")throw new xJ.TokenProviderError(`Value not present for '${r}' in SSO Token${f?". Cannot refresh":""}. ${Zh}`,!1)};var eJ=G(()=>{xJ=m(Ar(),1)});import{promises as tx}from"fs";var re,nJ=(r,s)=>{const f=K3(r),w=JSON.stringify(s,null,2);return re(f,w)};var oJ=G(()=>{$s();({writeFile:re}=tx)});var lh,aJ,pJ=(r={})=>async()=>{r.logger?.debug("@aws-sdk/token-providers - fromSso");const s=await e0(r),f=Df(r),w=s[f];if(!w)throw new lh.TokenProviderError(`Profile '${f}' could not be found in shared credentials file.`,!1);else if(!w.sso_session)throw new lh.TokenProviderError(`Profile '${f}' is missing required property 'sso_session'.`);const h=w.sso_session,$=(await Q3(r))[h];if(!$)throw new lh.TokenProviderError(`Sso session '${h}' could not be found in shared credentials file.`,!1);for(let z of["sso_start_url","sso_region"])if(!$[z])throw new lh.TokenProviderError(`Sso session '${h}' is missing required property '${z}'.`,!1);const{sso_start_url:I,sso_region:F}=$;let U;try{U=await Z3(h)}catch(z){throw new lh.TokenProviderError(`The SSO session token associated with profile=${f} was not found or is invalid. ${Zh}`,!1)}fw("accessToken",U.accessToken),fw("expiresAt",U.expiresAt);const{accessToken:A,expiresAt:L}=U,S={token:A,expiration:new Date(L)};if(S.expiration.getTime()-Date.now()>HP)return S;if(Date.now()-aJ.getTime()<30000)return mT(S),S;fw("clientId",U.clientId,!0),fw("clientSecret",U.clientSecret,!0),fw("refreshToken",U.refreshToken,!0);try{aJ.setTime(Date.now());const z=await cJ(U,F);fw("accessToken",z.accessToken),fw("expiresIn",z.expiresIn);const Z=new Date(Date.now()+z.expiresIn*1000);try{await nJ(h,{...U,accessToken:z.accessToken,expiresAt:Z.toISOString(),refreshToken:z.refreshToken})}catch(N){}return{token:z.accessToken,expiration:Z}}catch(z){return mT(S),S}};var uJ=G(()=>{lh=m(Ar(),1);$s();bJ();gJ();eJ();oJ();aJ=new Date(0)});var fe;var tJ=G(()=>{fe=m(Ar(),1)});var jT;var rQ=G(()=>{jT=m(Ar(),1)});var fQ=G(()=>{uJ();tJ();rQ()});function se(r){return{schemeId:"aws.auth#sigv4",signingProperties:{name:"awsssoportal",region:r.region},propertiesExtractor:(s,f)=>({signingProperties:{config:s,context:f}})}}function FI(r){return{schemeId:"smithy.api#noAuth"}}var sQ,wQ=async(r,s,f)=>{return{operation:Vf(s).operation,region:await yr(r.region)()||(()=>{throw new Error("expected `region` to be configured for `aws.auth#sigv4`")})()}},hQ=(r)=>{const s=[];switch(r.operation){case"GetRoleCredentials":{s.push(FI(r));break}case"ListAccountRoles":{s.push(FI(r));break}case"ListAccounts":{s.push(FI(r));break}case"Logout":{s.push(FI(r));break}default:s.push(se(r))}return s},EQ=(r)=>{return{...sQ.resolveAwsSdkSigV4Config(r)}};var vT=G(()=>{sQ=m(Qr(),1);Es()});var $Q=(r)=>{return{...r,useDualstackEndpoint:r.useDualstackEndpoint??!1,useFipsEndpoint:r.useFipsEndpoint??!1,defaultSigningName:"awsssoportal"}},sw;var Dh=G(()=>{sw={UseFIPS:{type:"builtInParams",name:"useFipsEndpoint"},Endpoint:{type:"builtInParams",name:"endpoint"},Region:{type:"builtInParams",name:"region"},UseDualStack:{type:"builtInParams",name:"useDualstackEndpoint"}}});var FQ;var IQ=G(()=>{FQ={name:"@aws-sdk/client-sso",description:"AWS SDK for JavaScript Sso Client for Node.js, Browser and React Native",version:"3.668.0",scripts:{build:"concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'","build:cjs":"node ../../scripts/compilation/inline client-sso","build:es":"tsc -p tsconfig.es.json","build:include:deps":"lerna run --scope $npm_package_name --include-dependencies build","build:types":"tsc -p tsconfig.types.json","build:types:downlevel":"downlevel-dts dist-types dist-types/ts3.4",clean:"rimraf ./dist-* && rimraf *.tsbuildinfo","extract:docs":"api-extractor run --local","generate:client":"node ../../scripts/generate-clients/single-service --solo sso"},main:"./dist-cjs/index.js",types:"./dist-types/index.d.ts",module:"./dist-es/index.js",sideEffects:!1,dependencies:{"@aws-crypto/sha256-browser":"5.2.0","@aws-crypto/sha256-js":"5.2.0","@aws-sdk/core":"3.667.0","@aws-sdk/middleware-host-header":"3.667.0","@aws-sdk/middleware-logger":"3.667.0","@aws-sdk/middleware-recursion-detection":"3.667.0","@aws-sdk/middleware-user-agent":"3.668.0","@aws-sdk/region-config-resolver":"3.667.0","@aws-sdk/types":"3.667.0","@aws-sdk/util-endpoints":"3.667.0","@aws-sdk/util-user-agent-browser":"3.667.0","@aws-sdk/util-user-agent-node":"3.668.0","@smithy/config-resolver":"^3.0.9","@smithy/core":"^2.4.8","@smithy/fetch-http-handler":"^3.2.9","@smithy/hash-node":"^3.0.7","@smithy/invalid-dependency":"^3.0.7","@smithy/middleware-content-length":"^3.0.9","@smithy/middleware-endpoint":"^3.1.4","@smithy/middleware-retry":"^3.0.23","@smithy/middleware-serde":"^3.0.7","@smithy/middleware-stack":"^3.0.7","@smithy/node-config-provider":"^3.1.8","@smithy/node-http-handler":"^3.2.4","@smithy/protocol-http":"^4.1.4","@smithy/smithy-client":"^3.4.0","@smithy/types":"^3.5.0","@smithy/url-parser":"^3.0.7","@smithy/util-base64":"^3.0.0","@smithy/util-body-length-browser":"^3.0.0","@smithy/util-body-length-node":"^3.0.0","@smithy/util-defaults-mode-browser":"^3.0.23","@smithy/util-defaults-mode-node":"^3.0.23","@smithy/util-endpoints":"^2.1.3","@smithy/util-middleware":"^3.0.7","@smithy/util-retry":"^3.0.7","@smithy/util-utf8":"^3.0.0",tslib:"^2.6.2"},devDependencies:{"@tsconfig/node16":"16.1.3","@types/node":"^16.18.96",concurrently:"7.0.0","downlevel-dts":"0.10.1",rimraf:"3.0.2",typescript:"~4.9.5"},engines:{node:">=16.0.0"},typesVersions:{"<4.0":{"dist-types/*":["dist-types/ts3.4/*"]}},files:["dist-*/**"],author:{name:"AWS SDK for JavaScript Team",url:"https://aws.amazon.com/javascript/"},license:"Apache-2.0",browser:{"./dist-es/runtimeConfig":"./dist-es/runtimeConfig.browser"},"react-native":{"./dist-es/runtimeConfig":"./dist-es/runtimeConfig.native"},homepage:"https://github.com/aws/aws-sdk-js-v3/tree/main/clients/client-sso",repository:{type:"git",url:"https://github.com/aws/aws-sdk-js-v3.git",directory:"clients/client-sso"}}});var UQ,TQ,GQ,zQ,SQ,vf,AQ,YQ,LQ,RQ,CQ,WQ,he,XQ;var KQ=G(()=>{UQ={["required"]:!1,type:"String"},TQ={["required"]:!0,default:!1,type:"Boolean"},GQ={["ref"]:"Endpoint"},zQ={["fn"]:"booleanEquals",["argv"]:[{["ref"]:"UseFIPS"},!0]},SQ={["fn"]:"booleanEquals",["argv"]:[{["ref"]:"UseDualStack"},!0]},vf={},AQ={["fn"]:"getAttr",["argv"]:[{["ref"]:"PartitionResult"},"supportsFIPS"]},YQ={["ref"]:"PartitionResult"},LQ={["fn"]:"booleanEquals",["argv"]:[!0,{["fn"]:"getAttr",["argv"]:[YQ,"supportsDualStack"]}]},RQ=[zQ],CQ=[SQ],WQ=[{["ref"]:"Region"}],he={version:"1.0",parameters:{Region:UQ,UseDualStack:TQ,UseFIPS:TQ,Endpoint:UQ},rules:[{conditions:[{["fn"]:"isSet",["argv"]:[GQ]}],rules:[{conditions:RQ,error:"Invalid Configuration: FIPS and custom endpoint are not supported",type:"error"},{conditions:CQ,error:"Invalid Configuration: Dualstack and custom endpoint are not supported",type:"error"},{endpoint:{url:GQ,properties:vf,headers:vf},type:"endpoint"}],type:"tree"},{conditions:[{["fn"]:"isSet",["argv"]:WQ}],rules:[{conditions:[{["fn"]:"aws.partition",["argv"]:WQ,assign:"PartitionResult"}],rules:[{conditions:[zQ,SQ],rules:[{conditions:[{["fn"]:"booleanEquals",["argv"]:[!0,AQ]},LQ],rules:[{endpoint:{url:"https://portal.sso-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:vf,headers:vf},type:"endpoint"}],type:"tree"},{error:"FIPS and DualStack are enabled, but this partition does not support one or both",type:"error"}],type:"tree"},{conditions:RQ,rules:[{conditions:[{["fn"]:"booleanEquals",["argv"]:[AQ,!0]}],rules:[{conditions:[{["fn"]:"stringEquals",["argv"]:[{["fn"]:"getAttr",["argv"]:[YQ,"name"]},"aws-us-gov"]}],endpoint:{url:"https://portal.sso.{Region}.amazonaws.com",properties:vf,headers:vf},type:"endpoint"},{endpoint:{url:"https://portal.sso-fips.{Region}.{PartitionResult#dnsSuffix}",properties:vf,headers:vf},type:"endpoint"}],type:"tree"},{error:"FIPS is enabled but this partition does not support FIPS",type:"error"}],type:"tree"},{conditions:CQ,rules:[{conditions:[LQ],rules:[{endpoint:{url:"https://portal.sso.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:vf,headers:vf},type:"endpoint"}],type:"tree"},{error:"DualStack is enabled but this partition does not support DualStack",type:"error"}],type:"tree"},{endpoint:{url:"https://portal.sso.{Region}.{PartitionResult#dnsSuffix}",properties:vf,headers:vf},type:"endpoint"}],type:"tree"}],type:"tree"},{error:"Invalid Configuration: Missing Region",type:"error"}]},XQ=he});var Ee,ZQ=(r,s={})=>{return Ee.get(r,()=>ss(XQ,{endpointParams:r,logger:s.logger}))};var PQ=G(()=>{Pw();ws();KQ();Ee=new fs({size:50,params:["Endpoint","Region","UseDualStack","UseFIPS"]});ur.aws=hs});var JQ,QQ,BQ=(r)=>{return{apiVersion:"2019-06-10",base64Decoder:r?.base64Decoder??Uf,base64Encoder:r?.base64Encoder??Gf,disableHostPrefix:r?.disableHostPrefix??!1,endpointProvider:r?.endpointProvider??ZQ,extensions:r?.extensions??[],httpAuthSchemeProvider:r?.httpAuthSchemeProvider??hQ,httpAuthSchemes:r?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:(s)=>s.getIdentityProvider("aws.auth#sigv4"),signer:new JQ.AwsSdkSigV4Signer},{schemeId:"smithy.api#noAuth",identityProvider:(s)=>s.getIdentityProvider("smithy.api#noAuth")||(async()=>({})),signer:new QQ.NoAuthSigner}],logger:r?.logger??new Yf,serviceId:r?.serviceId??"SSO",urlParser:r?.urlParser??br,utf8Decoder:r?.utf8Decoder??_r,utf8Encoder:r?.utf8Encoder??Tf}};var MQ=G(()=>{JQ=m(Qr(),1),QQ=m(qr(),1);K();n0();S0();Os();vT();PQ()});var VQ,HQ=(r)=>{gs(process.version);const s=us(r),f=()=>s().then(_s),w=BQ(r);return VQ.emitWarningIfUnsupportedVersion(process.version),{...w,...r,runtime:"node",defaultsMode:s,bodyLengthChecker:r?.bodyLengthChecker??ps,defaultUserAgentProvider:r?.defaultUserAgentProvider??os({serviceId:w.serviceId,clientVersion:FQ.version}),maxAttempts:r?.maxAttempts??u(js),region:r?.region??u(Hf,Ds),requestHandler:ff.create(r?.requestHandler??f),retryMode:r?.retryMode??u({...is,default:async()=>(await f()).retryMode||Nf}),sha256:r?.sha256??Fs.bind(null,"sha256"),streamCollector:r?.streamCollector??qf,useDualstackEndpoint:r?.useDualstackEndpoint??u(Hs),useFipsEndpoint:r?.useFipsEndpoint??u(ls),userAgentAppId:r?.userAgentAppId??u(as)}};var lQ=G(()=>{IQ();VQ=m(Qr(),1);Jh();lf();Qh();Is();Ns();a0();Bh();zf();MQ();K();Mh();K()});var DQ=(r)=>{const s=r.httpAuthSchemes;let{httpAuthSchemeProvider:f,credentials:w}=r;return{setHttpAuthScheme(h){const E=s.findIndex(($)=>$.schemeId===h.schemeId);if(E===-1)s.push(h);else s.splice(E,1,h)},httpAuthSchemes(){return s},setHttpAuthSchemeProvider(h){f=h},httpAuthSchemeProvider(){return f},setCredentials(h){w=h},credentials(){return w}}},kQ=(r)=>{return{httpAuthSchemes:r.httpAuthSchemes(),httpAuthSchemeProvider:r.httpAuthSchemeProvider(),credentials:r.credentials()}};var UI=(r)=>r,yQ=(r,s)=>{const f={...UI(ts(r)),...UI(xs(r)),...UI(Xs(r)),...UI(DQ(r))};return s.forEach((w)=>w.configure(f)),{...r,...r0(f),...es(f),...Ks(f),...kQ(f)}};var NQ=G(()=>{Vh();kr();K()});var kh,Z0;var TE=G(()=>{pw();uw();tw();Bw();lf();kh=m(qr(),1);Lh();B();Is();K();vT();Dh();lQ();NQ();Z0=class Z0 extends Sf{constructor(...[r]){const s=HQ(r||{}),f=$Q(s),w=Ms(f),h=vs(w),E=ks(h),$=Zs(E),I=qs($),F=EQ(I),U=yQ(F,r?.extensions||[]);super(U);this.config=U,this.middlewareStack.use(Vs(this.config)),this.middlewareStack.use(ns(this.config)),this.middlewareStack.use(ys(this.config)),this.middlewareStack.use(Ps(this.config)),this.middlewareStack.use(Js(this.config)),this.middlewareStack.use(Qs(this.config)),this.middlewareStack.use(kh.getHttpAuthSchemeEndpointRuleSetPlugin(this.config,{httpAuthSchemeParametersProvider:wQ,identityProviderConfigProvider:async(A)=>new kh.DefaultIdentityProviderConfig({"aws.auth#sigv4":A.credentials})})),this.middlewareStack.use(kh.getHttpSigningPlugin(this.config))}destroy(){super.destroy()}}});var P0;var iT=G(()=>{K();P0=class P0 extends mf{constructor(r){super(r);Object.setPrototypeOf(this,P0.prototype)}}});var TI,GI,AI,LI,qQ=(r)=>({...r,...r.accessToken&&{accessToken:o}}),$e=(r)=>({...r,...r.secretAccessKey&&{secretAccessKey:o},...r.sessionToken&&{sessionToken:o}}),mQ=(r)=>({...r,...r.roleCredentials&&{roleCredentials:$e(r.roleCredentials)}}),jQ=(r)=>({...r,...r.accessToken&&{accessToken:o}}),vQ=(r)=>({...r,...r.accessToken&&{accessToken:o}}),iQ=(r)=>({...r,...r.accessToken&&{accessToken:o}});var mw=G(()=>{K();iT();TI=class TI extends P0{constructor(r){super({name:"InvalidRequestException",$fault:"client",...r});this.name="InvalidRequestException",this.$fault="client",Object.setPrototypeOf(this,TI.prototype)}};GI=class GI extends P0{constructor(r){super({name:"ResourceNotFoundException",$fault:"client",...r});this.name="ResourceNotFoundException",this.$fault="client",Object.setPrototypeOf(this,GI.prototype)}};AI=class AI extends P0{constructor(r){super({name:"TooManyRequestsException",$fault:"client",...r});this.name="TooManyRequestsException",this.$fault="client",Object.setPrototypeOf(this,AI.prototype)}};LI=class LI extends P0{constructor(r){super({name:"UnauthorizedException",$fault:"client",...r});this.name="UnauthorizedException",this.$fault="client",Object.setPrototypeOf(this,LI.prototype)}}});var ww,GE,OQ=async(r,s)=>{const f=GE.requestBuilder(r,s),w=Y({},d1,{[WI]:r[CI]});f.bp("/federation/credentials");const h=Y({[Le]:[,y(r[Ae],"roleName")],[oQ]:[,y(r[nQ],"accountId")]});let E;return f.m("GET").h(w).q(h).b(E),f.build()},dQ=async(r,s)=>{const f=GE.requestBuilder(r,s),w=Y({},d1,{[WI]:r[CI]});f.bp("/assignment/roles");const h=Y({[tQ]:[,r[uQ]],[pQ]:[()=>r.maxResults!==void 0,()=>r[aQ].toString()],[oQ]:[,y(r[nQ],"accountId")]});let E;return f.m("GET").h(w).q(h).b(E),f.build()},cQ=async(r,s)=>{const f=GE.requestBuilder(r,s),w=Y({},d1,{[WI]:r[CI]});f.bp("/assignment/accounts");const h=Y({[tQ]:[,r[uQ]],[pQ]:[()=>r.maxResults!==void 0,()=>r[aQ].toString()]});let E;return f.m("GET").h(w).q(h).b(E),f.build()},bQ=async(r,s)=>{const f=GE.requestBuilder(r,s),w=Y({},d1,{[WI]:r[CI]});f.bp("/logout");let h;return f.m("POST").h(w).b(h),f.build()},_Q=async(r,s)=>{if(r.statusCode!==200&&r.statusCode>=300)return RI(r,s);const f=Y({$metadata:hw(r)}),w=y(c(await ww.parseJsonBody(r.body,s)),"body"),h=p(w,{roleCredentials:q});return Object.assign(f,h),f},gQ=async(r,s)=>{if(r.statusCode!==200&&r.statusCode>=300)return RI(r,s);const f=Y({$metadata:hw(r)}),w=y(c(await ww.parseJsonBody(r.body,s)),"body"),h=p(w,{nextToken:T,roleList:q});return Object.assign(f,h),f},xQ=async(r,s)=>{if(r.statusCode!==200&&r.statusCode>=300)return RI(r,s);const f=Y({$metadata:hw(r)}),w=y(c(await ww.parseJsonBody(r.body,s)),"body"),h=p(w,{accountList:q,nextToken:T});return Object.assign(f,h),f},eQ=async(r,s)=>{if(r.statusCode!==200&&r.statusCode>=300)return RI(r,s);const f=Y({$metadata:hw(r)});return await gr(r.body,s),f},RI=async(r,s)=>{const f={...r,body:await ww.parseJsonErrorBody(r.body,s)},w=ww.loadRestJsonErrorCode(r,f.body);switch(w){case"InvalidRequestException":case"com.amazonaws.sso#InvalidRequestException":throw await Fe(f,s);case"ResourceNotFoundException":case"com.amazonaws.sso#ResourceNotFoundException":throw await Ue(f,s);case"TooManyRequestsException":case"com.amazonaws.sso#TooManyRequestsException":throw await Te(f,s);case"UnauthorizedException":case"com.amazonaws.sso#UnauthorizedException":throw await Ge(f,s);default:const h=f.body;return Ie({output:r,parsedBody:h,errorCode:w})}},Ie,Fe=async(r,s)=>{const f=Y({}),w=r.body,h=p(w,{message:T});Object.assign(f,h);const E=new TI({$metadata:hw(r),...f});return D(E,r.body)},Ue=async(r,s)=>{const f=Y({}),w=r.body,h=p(w,{message:T});Object.assign(f,h);const E=new GI({$metadata:hw(r),...f});return D(E,r.body)},Te=async(r,s)=>{const f=Y({}),w=r.body,h=p(w,{message:T});Object.assign(f,h);const E=new AI({$metadata:hw(r),...f});return D(E,r.body)},Ge=async(r,s)=>{const f=Y({}),w=r.body,h=p(w,{message:T});Object.assign(f,h);const E=new LI({$metadata:hw(r),...f});return D(E,r.body)},hw=(r)=>({httpStatusCode:r.statusCode,requestId:r.headers["x-amzn-requestid"]??r.headers["x-amzn-request-id"]??r.headers["x-amz-request-id"],extendedRequestId:r.headers["x-amz-id-2"],cfId:r.headers["x-amz-cf-id"]}),nQ="accountId",CI="accessToken",oQ="account_id",aQ="maxResults",pQ="max_result",uQ="nextToken",tQ="next_token",Ae="roleName",Le="role_name",WI="x-amz-sso_bearer_token";var AE=G(()=>{ww=m(Qr(),1),GE=m(qr(),1);K();mw();iT();Ie=bs(P0)});var LE;var OT=G(()=>{B();V();K();Dh();mw();AE();LE=class LE extends R.classBuilder().ep(sw).m(function(r,s,f,w){return[C(f,this.serialize,this.deserialize),W(f,r.getEndpointParameterInstructions())]}).s("SWBPortalService","GetRoleCredentials",{}).n("SSOClient","GetRoleCredentialsCommand").f(qQ,mQ).ser(OQ).de(_Q).build(){}});var RE;var zI=G(()=>{B();V();K();Dh();mw();AE();RE=class RE extends R.classBuilder().ep(sw).m(function(r,s,f,w){return[C(f,this.serialize,this.deserialize),W(f,r.getEndpointParameterInstructions())]}).s("SWBPortalService","ListAccountRoles",{}).n("SSOClient","ListAccountRolesCommand").f(jQ,void 0).ser(dQ).de(gQ).build(){}});var CE;var SI=G(()=>{B();V();K();Dh();mw();AE();CE=class CE extends R.classBuilder().ep(sw).m(function(r,s,f,w){return[C(f,this.serialize,this.deserialize),W(f,r.getEndpointParameterInstructions())]}).s("SWBPortalService","ListAccounts",{}).n("SSOClient","ListAccountsCommand").f(vQ,void 0).ser(cQ).de(xQ).build(){}});var dT;var cT=G(()=>{B();V();K();Dh();mw();AE();dT=class dT extends R.classBuilder().ep(sw).m(function(r,s,f,w){return[C(f,this.serialize,this.deserialize),W(f,r.getEndpointParameterInstructions())]}).s("SWBPortalService","Logout",{}).n("SSOClient","LogoutCommand").f(iQ,void 0).ser(bQ).de(eQ).build(){}});var Re,r9;var f9=G(()=>{K();OT();zI();SI();cT();TE();Re={GetRoleCredentialsCommand:LE,ListAccountRolesCommand:RE,ListAccountsCommand:CE,LogoutCommand:dT};r9=class r9 extends Z0{};ds(Re,r9)});var s9=G(()=>{OT();zI();SI();cT()});var w9=()=>{};var h9,p8r;var E9=G(()=>{h9=m(qr(),1);zI();TE();p8r=h9.createPaginator(Z0,RE,"nextToken","nextToken","maxResults")});var $9,f4r;var I9=G(()=>{$9=m(qr(),1);SI();TE();f4r=$9.createPaginator(Z0,CE,"nextToken","nextToken","maxResults")});var F9=G(()=>{w9();E9();I9()});var U9=G(()=>{mw()});var T9=G(()=>{TE();f9();s9();F9();U9()});var G9={};Ys(G9,{SSOClient:()=>Z0,GetRoleCredentialsCommand:()=>LE});var A9=G(()=>{T9()});var bT,yh,WE=!1,_T=async({ssoStartUrl:r,ssoSession:s,ssoAccountId:f,ssoRegion:w,ssoRoleName:h,ssoClient:E,clientConfig:$,profile:I,logger:F})=>{let U;const A="To refresh this SSO session run aws sso login with the corresponding profile.";if(s)try{const pr=await pJ({profile:I})();U={accessToken:pr.token,expiresAt:new Date(pr.expiration).toISOString()}}catch(pr){throw new yh.CredentialsProviderError(pr.message,{tryNextLink:WE,logger:F})}else try{U=await Z3(r)}catch(pr){throw new yh.CredentialsProviderError("The SSO session associated with this profile is invalid. To refresh this SSO session run aws sso login with the corresponding profile.",{tryNextLink:WE,logger:F})}if(new Date(U.expiresAt).getTime()-Date.now()<=0)throw new yh.CredentialsProviderError("The SSO session associated with this profile has expired. To refresh this SSO session run aws sso login with the corresponding profile.",{tryNextLink:WE,logger:F});const{accessToken:L}=U,{SSOClient:S,GetRoleCredentialsCommand:z}=await Promise.resolve().then(() => (A9(),G9)),Z=E||new S(Object.assign({},$??{},{region:$?.region??w}));let N;try{N=await Z.send(new z({accountId:f,roleName:h,accessToken:L}))}catch(pr){throw new yh.CredentialsProviderError(pr,{tryNextLink:WE,logger:F})}const{roleCredentials:{accessKeyId:M,secretAccessKey:l,sessionToken:k,expiration:i,credentialScope:e,accountId:sr}={}}=N;if(!M||!l||!k||!i)throw new yh.CredentialsProviderError("SSO returns an invalid temporary credential.",{tryNextLink:WE,logger:F});const Br={accessKeyId:M,secretAccessKey:l,sessionToken:k,expiration:new Date(i),...e&&{credentialScope:e},...sr&&{accountId:sr}};if(s)bT.setCredentialFeature(Br,"CREDENTIALS_SSO","s");else bT.setCredentialFeature(Br,"CREDENTIALS_SSO_LEGACY","u");return Br};var L9=G(()=>{bT=m(tr(),1);fQ();yh=m(Ar(),1);$s()});var R9,gT=(r,s)=>{const{sso_start_url:f,sso_account_id:w,sso_region:h,sso_role_name:E}=r;if(!f||!w||!h||!E)throw new R9.CredentialsProviderError(`Profile is configured with invalid SSO credentials. Required parameters "sso_account_id", "sso_region", "sso_role_name", "sso_start_url". Got ${Object.keys(r).join(", ")}\nReference: https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-sso.html`,{tryNextLink:!1,logger:s});return r};var xT=G(()=>{R9=m(Ar(),1)});var Nh,Ce=(r={})=>async()=>{r.logger?.debug("@aws-sdk/credential-provider-sso - fromSSO");const{ssoStartUrl:s,ssoAccountId:f,ssoRegion:w,ssoRoleName:h,ssoSession:E}=r,{ssoClient:$}=r,I=Df(r);if(!s&&!f&&!w&&!h&&!E){const U=(await e0(r))[I];if(!U)throw new Nh.CredentialsProviderError(`Profile ${I} was not found.`,{logger:r.logger});if(!RT(U))throw new Nh.CredentialsProviderError(`Profile ${I} is not configured with SSO credentials.`,{logger:r.logger});if(U?.sso_session){const M=(await Q3(r))[U.sso_session],l=` configurations in profile ${I} and sso-session ${U.sso_session}`;if(w&&w!==M.sso_region)throw new Nh.CredentialsProviderError("Conflicting SSO region"+l,{tryNextLink:!1,logger:r.logger});if(s&&s!==M.sso_start_url)throw new Nh.CredentialsProviderError("Conflicting SSO start_url"+l,{tryNextLink:!1,logger:r.logger});U.sso_region=M.sso_region,U.sso_start_url=M.sso_start_url}const{sso_start_url:A,sso_account_id:L,sso_region:S,sso_role_name:z,sso_session:Z}=gT(U,r.logger);return _T({ssoStartUrl:A,ssoSession:Z,ssoAccountId:L,ssoRegion:S,ssoRoleName:z,ssoClient:$,clientConfig:r.clientConfig,profile:I})}else if(!s||!f||!w||!h)throw new Nh.CredentialsProviderError('Incomplete configuration. The fromSSO() argument hash must include "ssoStartUrl", "ssoAccountId", "ssoRegion", "ssoRoleName"',{tryNextLink:!1,logger:r.logger});else return _T({ssoStartUrl:s,ssoSession:E,ssoAccountId:f,ssoRegion:w,ssoRoleName:h,ssoClient:$,clientConfig:r.clientConfig,profile:I})};var C9=G(()=>{Nh=m(Ar(),1);$s();L9();xT()});var W9=()=>{};var eT={};Ys(eT,{validateSsoProfile:()=>gT,isSsoProfile:()=>RT,fromSSO:()=>Ce});var nT=G(()=>{C9();W9();xT()});var z9,YI,S9=(r,s,f)=>{const w={EcsContainer:async(h)=>{const{fromHttp:E}=await Promise.resolve().then(() => (LT(),AT)),{fromContainerMetadata:$}=await Promise.resolve().then(() => (x1(),g1));return f?.debug("@aws-sdk/credential-provider-ini - credential_source is EcsContainer"),async()=>YI.chain(E(h??{}),$(h))().then(oT)},Ec2InstanceMetadata:async(h)=>{f?.debug("@aws-sdk/credential-provider-ini - credential_source is Ec2InstanceMetadata");const{fromInstanceMetadata:E}=await Promise.resolve().then(() => (x1(),g1));return async()=>E(h)().then(oT)},Environment:async(h)=>{f?.debug("@aws-sdk/credential-provider-ini - credential_source is Environment");const{fromEnv:E}=await Promise.resolve().then(() => (wT(),sP));return async()=>E(h)().then(oT)}};if(r in w)return w[r];else throw new YI.CredentialsProviderError(`Unsupported credential source in profile ${s}. Got ${r}, expected EcsContainer or Ec2InstanceMetadata or Environment.`,{logger:f})},oT=(r)=>z9.setCredentialFeature(r,"CREDENTIALS_PROFILE_NAMED_PROVIDER","p");var Y9=G(()=>{z9=m(tr(),1),YI=m(Ar(),1)});function We(r){return{schemeId:"aws.auth#sigv4",signingProperties:{name:"sts",region:r.region},propertiesExtractor:(s,f)=>({signingProperties:{config:s,context:f}})}}function X9(r){return{schemeId:"smithy.api#noAuth"}}var K9,Z9=async(r,s,f)=>{return{operation:Vf(s).operation,region:await yr(r.region)()||(()=>{throw new Error("expected `region` to be configured for `aws.auth#sigv4`")})()}},P9=(r)=>{const s=[];switch(r.operation){case"AssumeRoleWithSAML":{s.push(X9(r));break}case"AssumeRoleWithWebIdentity":{s.push(X9(r));break}default:s.push(We(r))}return s},ze=(r)=>({...r,stsClientCtor:J0}),J9=(r)=>{const s=ze(r);return{...K9.resolveAwsSdkSigV4Config(s)}};var aT=G(()=>{K9=m(Qr(),1);Es();zE()});var Q9=(r)=>{return{...r,useDualstackEndpoint:r.useDualstackEndpoint??!1,useFipsEndpoint:r.useFipsEndpoint??!1,useGlobalEndpoint:r.useGlobalEndpoint??!1,defaultSigningName:"sts"}},er;var f0=G(()=>{er={UseGlobalEndpoint:{type:"builtInParams",name:"useGlobalEndpoint"},UseFIPS:{type:"builtInParams",name:"useFipsEndpoint"},Endpoint:{type:"builtInParams",name:"endpoint"},Region:{type:"builtInParams",name:"region"},UseDualStack:{type:"builtInParams",name:"useDualstackEndpoint"}}});var M9;var B9=G(()=>{M9={name:"@aws-sdk/client-sts",description:"AWS SDK for JavaScript Sts Client for Node.js, Browser and React Native",version:"3.668.0",scripts:{build:"concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'","build:cjs":"node ../../scripts/compilation/inline client-sts","build:es":"tsc -p tsconfig.es.json","build:include:deps":"lerna run --scope $npm_package_name --include-dependencies build","build:types":"rimraf ./dist-types tsconfig.types.tsbuildinfo && tsc -p tsconfig.types.json","build:types:downlevel":"downlevel-dts dist-types dist-types/ts3.4",clean:"rimraf ./dist-* && rimraf *.tsbuildinfo","extract:docs":"api-extractor run --local","generate:client":"node ../../scripts/generate-clients/single-service --solo sts",test:"yarn test:unit","test:unit":"jest"},main:"./dist-cjs/index.js",types:"./dist-types/index.d.ts",module:"./dist-es/index.js",sideEffects:!1,dependencies:{"@aws-crypto/sha256-browser":"5.2.0","@aws-crypto/sha256-js":"5.2.0","@aws-sdk/client-sso-oidc":"3.668.0","@aws-sdk/core":"3.667.0","@aws-sdk/credential-provider-node":"3.668.0","@aws-sdk/middleware-host-header":"3.667.0","@aws-sdk/middleware-logger":"3.667.0","@aws-sdk/middleware-recursion-detection":"3.667.0","@aws-sdk/middleware-user-agent":"3.668.0","@aws-sdk/region-config-resolver":"3.667.0","@aws-sdk/types":"3.667.0","@aws-sdk/util-endpoints":"3.667.0","@aws-sdk/util-user-agent-browser":"3.667.0","@aws-sdk/util-user-agent-node":"3.668.0","@smithy/config-resolver":"^3.0.9","@smithy/core":"^2.4.8","@smithy/fetch-http-handler":"^3.2.9","@smithy/hash-node":"^3.0.7","@smithy/invalid-dependency":"^3.0.7","@smithy/middleware-content-length":"^3.0.9","@smithy/middleware-endpoint":"^3.1.4","@smithy/middleware-retry":"^3.0.23","@smithy/middleware-serde":"^3.0.7","@smithy/middleware-stack":"^3.0.7","@smithy/node-config-provider":"^3.1.8","@smithy/node-http-handler":"^3.2.4","@smithy/protocol-http":"^4.1.4","@smithy/smithy-client":"^3.4.0","@smithy/types":"^3.5.0","@smithy/url-parser":"^3.0.7","@smithy/util-base64":"^3.0.0","@smithy/util-body-length-browser":"^3.0.0","@smithy/util-body-length-node":"^3.0.0","@smithy/util-defaults-mode-browser":"^3.0.23","@smithy/util-defaults-mode-node":"^3.0.23","@smithy/util-endpoints":"^2.1.3","@smithy/util-middleware":"^3.0.7","@smithy/util-retry":"^3.0.7","@smithy/util-utf8":"^3.0.0",tslib:"^2.6.2"},devDependencies:{"@tsconfig/node16":"16.1.3","@types/node":"^16.18.96",concurrently:"7.0.0","downlevel-dts":"0.10.1",rimraf:"3.0.2",typescript:"~4.9.5"},engines:{node:">=16.0.0"},typesVersions:{"<4.0":{"dist-types/*":["dist-types/ts3.4/*"]}},files:["dist-*/**"],author:{name:"AWS SDK for JavaScript Team",url:"https://aws.amazon.com/javascript/"},license:"Apache-2.0",browser:{"./dist-es/runtimeConfig":"./dist-es/runtimeConfig.browser"},"react-native":{"./dist-es/runtimeConfig":"./dist-es/runtimeConfig.native"},homepage:"https://github.com/aws/aws-sdk-js-v3/tree/main/clients/client-sts",repository:{type:"git",url:"https://github.com/aws/aws-sdk-js-v3.git",directory:"clients/client-sts"}}});var V9,pT,j9,H9,dr,l9,v9,i9,nr,Xf,D9,O9,d9,k9,c9,y9,N9,q9,m9,Ye,b9;var _9=G(()=>{V9={["required"]:!1,["type"]:"String"},pT={["required"]:!0,default:!1,["type"]:"Boolean"},j9={["ref"]:"Endpoint"},H9={["fn"]:"isSet",["argv"]:[{["ref"]:"Region"}]},dr={["ref"]:"Region"},l9={["fn"]:"aws.partition",["argv"]:[dr],assign:"PartitionResult"},v9={["ref"]:"UseFIPS"},i9={["ref"]:"UseDualStack"},nr={url:"https://sts.amazonaws.com",properties:{authSchemes:[{name:"sigv4",signingName:"sts",signingRegion:"us-east-1"}]},headers:{}},Xf={},D9={conditions:[{["fn"]:"stringEquals",["argv"]:[dr,"aws-global"]}],["endpoint"]:nr,["type"]:"endpoint"},O9={["fn"]:"booleanEquals",["argv"]:[v9,!0]},d9={["fn"]:"booleanEquals",["argv"]:[i9,!0]},k9={["fn"]:"getAttr",["argv"]:[{["ref"]:"PartitionResult"},"supportsFIPS"]},c9={["ref"]:"PartitionResult"},y9={["fn"]:"booleanEquals",["argv"]:[!0,{["fn"]:"getAttr",["argv"]:[c9,"supportsDualStack"]}]},N9=[{["fn"]:"isSet",["argv"]:[j9]}],q9=[O9],m9=[d9],Ye={version:"1.0",parameters:{Region:V9,UseDualStack:pT,UseFIPS:pT,Endpoint:V9,UseGlobalEndpoint:pT},rules:[{conditions:[{["fn"]:"booleanEquals",["argv"]:[{["ref"]:"UseGlobalEndpoint"},!0]},{["fn"]:"not",["argv"]:N9},H9,l9,{["fn"]:"booleanEquals",["argv"]:[v9,!1]},{["fn"]:"booleanEquals",["argv"]:[i9,!1]}],rules:[{conditions:[{["fn"]:"stringEquals",["argv"]:[dr,"ap-northeast-1"]}],endpoint:nr,["type"]:"endpoint"},{conditions:[{["fn"]:"stringEquals",["argv"]:[dr,"ap-south-1"]}],endpoint:nr,["type"]:"endpoint"},{conditions:[{["fn"]:"stringEquals",["argv"]:[dr,"ap-southeast-1"]}],endpoint:nr,["type"]:"endpoint"},{conditions:[{["fn"]:"stringEquals",["argv"]:[dr,"ap-southeast-2"]}],endpoint:nr,["type"]:"endpoint"},D9,{conditions:[{["fn"]:"stringEquals",["argv"]:[dr,"ca-central-1"]}],endpoint:nr,["type"]:"endpoint"},{conditions:[{["fn"]:"stringEquals",["argv"]:[dr,"eu-central-1"]}],endpoint:nr,["type"]:"endpoint"},{conditions:[{["fn"]:"stringEquals",["argv"]:[dr,"eu-north-1"]}],endpoint:nr,["type"]:"endpoint"},{conditions:[{["fn"]:"stringEquals",["argv"]:[dr,"eu-west-1"]}],endpoint:nr,["type"]:"endpoint"},{conditions:[{["fn"]:"stringEquals",["argv"]:[dr,"eu-west-2"]}],endpoint:nr,["type"]:"endpoint"},{conditions:[{["fn"]:"stringEquals",["argv"]:[dr,"eu-west-3"]}],endpoint:nr,["type"]:"endpoint"},{conditions:[{["fn"]:"stringEquals",["argv"]:[dr,"sa-east-1"]}],endpoint:nr,["type"]:"endpoint"},{conditions:[{["fn"]:"stringEquals",["argv"]:[dr,"us-east-1"]}],endpoint:nr,["type"]:"endpoint"},{conditions:[{["fn"]:"stringEquals",["argv"]:[dr,"us-east-2"]}],endpoint:nr,["type"]:"endpoint"},{conditions:[{["fn"]:"stringEquals",["argv"]:[dr,"us-west-1"]}],endpoint:nr,["type"]:"endpoint"},{conditions:[{["fn"]:"stringEquals",["argv"]:[dr,"us-west-2"]}],endpoint:nr,["type"]:"endpoint"},{endpoint:{url:"https://sts.{Region}.{PartitionResult#dnsSuffix}",properties:{authSchemes:[{name:"sigv4",signingName:"sts",signingRegion:"{Region}"}]},headers:Xf},["type"]:"endpoint"}],["type"]:"tree"},{conditions:N9,rules:[{conditions:q9,error:"Invalid Configuration: FIPS and custom endpoint are not supported",["type"]:"error"},{conditions:m9,error:"Invalid Configuration: Dualstack and custom endpoint are not supported",["type"]:"error"},{endpoint:{url:j9,properties:Xf,headers:Xf},["type"]:"endpoint"}],["type"]:"tree"},{conditions:[H9],rules:[{conditions:[l9],rules:[{conditions:[O9,d9],rules:[{conditions:[{["fn"]:"booleanEquals",["argv"]:[!0,k9]},y9],rules:[{endpoint:{url:"https://sts-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:Xf,headers:Xf},["type"]:"endpoint"}],["type"]:"tree"},{error:"FIPS and DualStack are enabled, but this partition does not support one or both",["type"]:"error"}],["type"]:"tree"},{conditions:q9,rules:[{conditions:[{["fn"]:"booleanEquals",["argv"]:[k9,!0]}],rules:[{conditions:[{["fn"]:"stringEquals",["argv"]:[{["fn"]:"getAttr",["argv"]:[c9,"name"]},"aws-us-gov"]}],endpoint:{url:"https://sts.{Region}.amazonaws.com",properties:Xf,headers:Xf},["type"]:"endpoint"},{endpoint:{url:"https://sts-fips.{Region}.{PartitionResult#dnsSuffix}",properties:Xf,headers:Xf},["type"]:"endpoint"}],["type"]:"tree"},{error:"FIPS is enabled but this partition does not support FIPS",["type"]:"error"}],["type"]:"tree"},{conditions:m9,rules:[{conditions:[y9],rules:[{endpoint:{url:"https://sts.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:Xf,headers:Xf},["type"]:"endpoint"}],["type"]:"tree"},{error:"DualStack is enabled but this partition does not support DualStack",["type"]:"error"}],["type"]:"tree"},D9,{endpoint:{url:"https://sts.{Region}.{PartitionResult#dnsSuffix}",properties:Xf,headers:Xf},["type"]:"endpoint"}],["type"]:"tree"}],["type"]:"tree"},{error:"Invalid Configuration: Missing Region",["type"]:"error"}]},b9=Ye});var Xe,g9=(r,s={})=>{return Xe.get(r,()=>ss(b9,{endpointParams:r,logger:s.logger}))};var x9=G(()=>{Pw();ws();_9();Xe=new fs({size:50,params:["Endpoint","Region","UseDualStack","UseFIPS","UseGlobalEndpoint"]});ur.aws=hs});var e9,n9,o9=(r)=>{return{apiVersion:"2011-06-15",base64Decoder:r?.base64Decoder??Uf,base64Encoder:r?.base64Encoder??Gf,disableHostPrefix:r?.disableHostPrefix??!1,endpointProvider:r?.endpointProvider??g9,extensions:r?.extensions??[],httpAuthSchemeProvider:r?.httpAuthSchemeProvider??P9,httpAuthSchemes:r?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:(s)=>s.getIdentityProvider("aws.auth#sigv4"),signer:new e9.AwsSdkSigV4Signer},{schemeId:"smithy.api#noAuth",identityProvider:(s)=>s.getIdentityProvider("smithy.api#noAuth")||(async()=>({})),signer:new n9.NoAuthSigner}],logger:r?.logger??new Yf,serviceId:r?.serviceId??"STS",urlParser:r?.urlParser??br,utf8Decoder:r?.utf8Decoder??_r,utf8Encoder:r?.utf8Encoder??Tf}};var a9=G(()=>{e9=m(Qr(),1),n9=m(qr(),1);K();n0();S0();Os();aT();x9()});var XI,p9,u9=(r)=>{gs(process.version);const s=us(r),f=()=>s().then(_s),w=o9(r);return XI.emitWarningIfUnsupportedVersion(process.version),{...w,...r,runtime:"node",defaultsMode:s,bodyLengthChecker:r?.bodyLengthChecker??ps,credentialDefaultProvider:r?.credentialDefaultProvider??X0,defaultUserAgentProvider:r?.defaultUserAgentProvider??os({serviceId:w.serviceId,clientVersion:M9.version}),httpAuthSchemes:r?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:(h)=>h.getIdentityProvider("aws.auth#sigv4")||(async(E)=>await X0(E?.__config||{})()),signer:new XI.AwsSdkSigV4Signer},{schemeId:"smithy.api#noAuth",identityProvider:(h)=>h.getIdentityProvider("smithy.api#noAuth")||(async()=>({})),signer:new p9.NoAuthSigner}],maxAttempts:r?.maxAttempts??u(js),region:r?.region??u(Hf,Ds),requestHandler:ff.create(r?.requestHandler??f),retryMode:r?.retryMode??u({...is,default:async()=>(await f()).retryMode||Nf}),sha256:r?.sha256??Fs.bind(null,"sha256"),streamCollector:r?.streamCollector??qf,useDualstackEndpoint:r?.useDualstackEndpoint??u(Hs),useFipsEndpoint:r?.useFipsEndpoint??u(ls),userAgentAppId:r?.userAgentAppId??u(as)}};var t9=G(()=>{B9();XI=m(Qr(),1);e1();Jh();lf();p9=m(qr(),1);Qh();Is();Ns();a0();Bh();zf();a9();K();Mh();K()});var rB=(r)=>{const s=r.httpAuthSchemes;let{httpAuthSchemeProvider:f,credentials:w}=r;return{setHttpAuthScheme(h){const E=s.findIndex(($)=>$.schemeId===h.schemeId);if(E===-1)s.push(h);else s.splice(E,1,h)},httpAuthSchemes(){return s},setHttpAuthSchemeProvider(h){f=h},httpAuthSchemeProvider(){return f},setCredentials(h){w=h},credentials(){return w}}},fB=(r)=>{return{httpAuthSchemes:r.httpAuthSchemes(),httpAuthSchemeProvider:r.httpAuthSchemeProvider(),credentials:r.credentials()}};var KI=(r)=>r,sB=(r,s)=>{const f={...KI(ts(r)),...KI(xs(r)),...KI(Xs(r)),...KI(rB(r))};return s.forEach((w)=>w.configure(f)),{...r,...r0(f),...es(f),...Ks(f),...fB(f)}};var wB=G(()=>{Vh();kr();K()});var qh,J0;var zE=G(()=>{pw();uw();tw();Bw();lf();qh=m(qr(),1);Lh();B();Is();K();aT();f0();t9();wB();J0=class J0 extends Sf{constructor(...[r]){const s=u9(r||{}),f=Q9(s),w=Ms(f),h=vs(w),E=ks(h),$=Zs(E),I=qs($),F=J9(I),U=sB(F,r?.extensions||[]);super(U);this.config=U,this.middlewareStack.use(Vs(this.config)),this.middlewareStack.use(ns(this.config)),this.middlewareStack.use(ys(this.config)),this.middlewareStack.use(Ps(this.config)),this.middlewareStack.use(Js(this.config)),this.middlewareStack.use(Qs(this.config)),this.middlewareStack.use(qh.getHttpAuthSchemeEndpointRuleSetPlugin(this.config,{httpAuthSchemeParametersProvider:Z9,identityProviderConfigProvider:async(A)=>new qh.DefaultIdentityProviderConfig({"aws.auth#sigv4":A.credentials})})),this.middlewareStack.use(qh.getHttpSigningPlugin(this.config))}destroy(){super.destroy()}}});var sf;var ZI=G(()=>{K();sf=class sf extends mf{constructor(r){super(r);Object.setPrototypeOf(this,sf.prototype)}}});var SE,YE,XE,KE,ZE,PE,JE,QE,mh=(r)=>({...r,...r.SecretAccessKey&&{SecretAccessKey:o}}),uT=(r)=>({...r,...r.Credentials&&{Credentials:mh(r.Credentials)}}),tT=(r)=>({...r,...r.SAMLAssertion&&{SAMLAssertion:o}}),r5=(r)=>({...r,...r.Credentials&&{Credentials:mh(r.Credentials)}}),f5=(r)=>({...r,...r.WebIdentityToken&&{WebIdentityToken:o}}),s5=(r)=>({...r,...r.Credentials&&{Credentials:mh(r.Credentials)}}),w5=(r)=>({...r,...r.Credentials&&{Credentials:mh(r.Credentials)}}),h5=(r)=>({...r,...r.Credentials&&{Credentials:mh(r.Credentials)}});var Ew=G(()=>{K();ZI();SE=class SE extends sf{constructor(r){super({name:"ExpiredTokenException",$fault:"client",...r});this.name="ExpiredTokenException",this.$fault="client",Object.setPrototypeOf(this,SE.prototype)}};YE=class YE extends sf{constructor(r){super({name:"MalformedPolicyDocumentException",$fault:"client",...r});this.name="MalformedPolicyDocumentException",this.$fault="client",Object.setPrototypeOf(this,YE.prototype)}};XE=class XE extends sf{constructor(r){super({name:"PackedPolicyTooLargeException",$fault:"client",...r});this.name="PackedPolicyTooLargeException",this.$fault="client",Object.setPrototypeOf(this,XE.prototype)}};KE=class KE extends sf{constructor(r){super({name:"RegionDisabledException",$fault:"client",...r});this.name="RegionDisabledException",this.$fault="client",Object.setPrototypeOf(this,KE.prototype)}};ZE=class ZE extends sf{constructor(r){super({name:"IDPRejectedClaimException",$fault:"client",...r});this.name="IDPRejectedClaimException",this.$fault="client",Object.setPrototypeOf(this,ZE.prototype)}};PE=class PE extends sf{constructor(r){super({name:"InvalidIdentityTokenException",$fault:"client",...r});this.name="InvalidIdentityTokenException",this.$fault="client",Object.setPrototypeOf(this,PE.prototype)}};JE=class JE extends sf{constructor(r){super({name:"IDPCommunicationErrorException",$fault:"client",...r});this.name="IDPCommunicationErrorException",this.$fault="client",Object.setPrototypeOf(this,JE.prototype)}};QE=class QE extends sf{constructor(r){super({name:"InvalidAuthorizationMessageException",$fault:"client",...r});this.name="InvalidAuthorizationMessageException",this.$fault="client",Object.setPrototypeOf(this,QE.prototype)}}});var Us,hB=async(r,s)=>{const f=Fw;let w;return w=Aw({...He(r,s),[Tw]:$n,[Gw]:Uw}),Iw(s,f,"/",void 0,w)},EB=async(r,s)=>{const f=Fw;let w;return w=Aw({...le(r,s),[Tw]:In,[Gw]:Uw}),Iw(s,f,"/",void 0,w)},$B=async(r,s)=>{const f=Fw;let w;return w=Aw({...De(r,s),[Tw]:Fn,[Gw]:Uw}),Iw(s,f,"/",void 0,w)},IB=async(r,s)=>{const f=Fw;let w;return w=Aw({...ke(r,s),[Tw]:Un,[Gw]:Uw}),Iw(s,f,"/",void 0,w)},FB=async(r,s)=>{const f=Fw;let w;return w=Aw({...ye(r,s),[Tw]:Tn,[Gw]:Uw}),Iw(s,f,"/",void 0,w)},UB=async(r,s)=>{const f=Fw;let w;return w=Aw({...Ne(r,s),[Tw]:Gn,[Gw]:Uw}),Iw(s,f,"/",void 0,w)},TB=async(r,s)=>{const f=Fw;let w;return w=Aw({...qe(r,s),[Tw]:An,[Gw]:Uw}),Iw(s,f,"/",void 0,w)},GB=async(r,s)=>{const f=Fw;let w;return w=Aw({...me(r,s),[Tw]:Ln,[Gw]:Uw}),Iw(s,f,"/",void 0,w)},AB=async(r,s)=>{if(r.statusCode>=300)return $w(r,s);const f=await Us.parseXmlBody(r.body,s);let w={};return w=ce(f.AssumeRoleResult,s),{$metadata:or(r),...w}},LB=async(r,s)=>{if(r.statusCode>=300)return $w(r,s);const f=await Us.parseXmlBody(r.body,s);let w={};return w=be(f.AssumeRoleWithSAMLResult,s),{$metadata:or(r),...w}},RB=async(r,s)=>{if(r.statusCode>=300)return $w(r,s);const f=await Us.parseXmlBody(r.body,s);let w={};return w=_e(f.AssumeRoleWithWebIdentityResult,s),{$metadata:or(r),...w}},CB=async(r,s)=>{if(r.statusCode>=300)return $w(r,s);const f=await Us.parseXmlBody(r.body,s);let w={};return w=ge(f.DecodeAuthorizationMessageResult,s),{$metadata:or(r),...w}},WB=async(r,s)=>{if(r.statusCode>=300)return $w(r,s);const f=await Us.parseXmlBody(r.body,s);let w={};return w=ne(f.GetAccessKeyInfoResult,s),{$metadata:or(r),...w}},zB=async(r,s)=>{if(r.statusCode>=300)return $w(r,s);const f=await Us.parseXmlBody(r.body,s);let w={};return w=oe(f.GetCallerIdentityResult,s),{$metadata:or(r),...w}},SB=async(r,s)=>{if(r.statusCode>=300)return $w(r,s);const f=await Us.parseXmlBody(r.body,s);let w={};return w=ae(f.GetFederationTokenResult,s),{$metadata:or(r),...w}},YB=async(r,s)=>{if(r.statusCode>=300)return $w(r,s);const f=await Us.parseXmlBody(r.body,s);let w={};return w=pe(f.GetSessionTokenResult,s),{$metadata:or(r),...w}},$w=async(r,s)=>{const f={...r,body:await Us.parseXmlErrorBody(r.body,s)},w=Rn(r,f.body);switch(w){case"ExpiredTokenException":case"com.amazonaws.sts#ExpiredTokenException":throw await Ke(f,s);case"MalformedPolicyDocument":case"com.amazonaws.sts#MalformedPolicyDocumentException":throw await Be(f,s);case"PackedPolicyTooLarge":case"com.amazonaws.sts#PackedPolicyTooLargeException":throw await Me(f,s);case"RegionDisabledException":case"com.amazonaws.sts#RegionDisabledException":throw await Ve(f,s);case"IDPRejectedClaim":case"com.amazonaws.sts#IDPRejectedClaimException":throw await Pe(f,s);case"InvalidIdentityToken":case"com.amazonaws.sts#InvalidIdentityTokenException":throw await Qe(f,s);case"IDPCommunicationError":case"com.amazonaws.sts#IDPCommunicationErrorException":throw await Ze(f,s);case"InvalidAuthorizationMessageException":case"com.amazonaws.sts#InvalidAuthorizationMessageException":throw await Je(f,s);default:const h=f.body;return En({output:r,parsedBody:h.Error,errorCode:w})}},Ke=async(r,s)=>{const f=r.body,w=xe(f.Error,s),h=new SE({$metadata:or(r),...w});return D(h,f)},Ze=async(r,s)=>{const f=r.body,w=ue(f.Error,s),h=new JE({$metadata:or(r),...w});return D(h,f)},Pe=async(r,s)=>{const f=r.body,w=te(f.Error,s),h=new ZE({$metadata:or(r),...w});return D(h,f)},Je=async(r,s)=>{const f=r.body,w=rn(f.Error,s),h=new QE({$metadata:or(r),...w});return D(h,f)},Qe=async(r,s)=>{const f=r.body,w=fn(f.Error,s),h=new PE({$metadata:or(r),...w});return D(h,f)},Be=async(r,s)=>{const f=r.body,w=sn(f.Error,s),h=new YE({$metadata:or(r),...w});return D(h,f)},Me=async(r,s)=>{const f=r.body,w=wn(f.Error,s),h=new XE({$metadata:or(r),...w});return D(h,f)},Ve=async(r,s)=>{const f=r.body,w=hn(f.Error,s),h=new KE({$metadata:or(r),...w});return D(h,f)},He=(r,s)=>{const f={};if(r[M0]!=null)f[M0]=r[M0];if(r[Oh]!=null)f[Oh]=r[Oh];if(r[df]!=null){const w=PI(r[df],s);if(r[df]?.length===0)f.PolicyArns=[];Object.entries(w).forEach(([h,E])=>{const $=`PolicyArns.${h}`;f[$]=E})}if(r[Of]!=null)f[Of]=r[Of];if(r[hf]!=null)f[hf]=r[hf];if(r[ch]!=null){const w=XB(r[ch],s);if(r[ch]?.length===0)f.Tags=[];Object.entries(w).forEach(([h,E])=>{const $=`Tags.${h}`;f[$]=E})}if(r[V5]!=null){const w=de(r[V5],s);if(r[V5]?.length===0)f.TransitiveTagKeys=[];Object.entries(w).forEach(([h,E])=>{const $=`TransitiveTagKeys.${h}`;f[$]=E})}if(r[U5]!=null)f[U5]=r[U5];if(r[dh]!=null)f[dh]=r[dh];if(r[bh]!=null)f[bh]=r[bh];if(r[bf]!=null)f[bf]=r[bf];if(r[Y5]!=null){const w=ie(r[Y5],s);if(r[Y5]?.length===0)f.ProvidedContexts=[];Object.entries(w).forEach(([h,E])=>{const $=`ProvidedContexts.${h}`;f[$]=E})}return f},le=(r,s)=>{const f={};if(r[M0]!=null)f[M0]=r[M0];if(r[z5]!=null)f[z5]=r[z5];if(r[J5]!=null)f[J5]=r[J5];if(r[df]!=null){const w=PI(r[df],s);if(r[df]?.length===0)f.PolicyArns=[];Object.entries(w).forEach(([h,E])=>{const $=`PolicyArns.${h}`;f[$]=E})}if(r[Of]!=null)f[Of]=r[Of];if(r[hf]!=null)f[hf]=r[hf];return f},De=(r,s)=>{const f={};if(r[M0]!=null)f[M0]=r[M0];if(r[Oh]!=null)f[Oh]=r[Oh];if(r[D5]!=null)f[D5]=r[D5];if(r[X5]!=null)f[X5]=r[X5];if(r[df]!=null){const w=PI(r[df],s);if(r[df]?.length===0)f.PolicyArns=[];Object.entries(w).forEach(([h,E])=>{const $=`PolicyArns.${h}`;f[$]=E})}if(r[Of]!=null)f[Of]=r[Of];if(r[hf]!=null)f[hf]=r[hf];return f},ke=(r,s)=>{const f={};if(r[T5]!=null)f[T5]=r[T5];return f},ye=(r,s)=>{const f={};if(r[jh]!=null)f[jh]=r[jh];return f},Ne=(r,s)=>{return{}},qe=(r,s)=>{const f={};if(r[C5]!=null)f[C5]=r[C5];if(r[Of]!=null)f[Of]=r[Of];if(r[df]!=null){const w=PI(r[df],s);if(r[df]?.length===0)f.PolicyArns=[];Object.entries(w).forEach(([h,E])=>{const $=`PolicyArns.${h}`;f[$]=E})}if(r[hf]!=null)f[hf]=r[hf];if(r[ch]!=null){const w=XB(r[ch],s);if(r[ch]?.length===0)f.Tags=[];Object.entries(w).forEach(([h,E])=>{const $=`Tags.${h}`;f[$]=E})}return f},me=(r,s)=>{const f={};if(r[hf]!=null)f[hf]=r[hf];if(r[dh]!=null)f[dh]=r[dh];if(r[bh]!=null)f[bh]=r[bh];return f},PI=(r,s)=>{const f={};let w=1;for(let h of r){if(h===null)continue;const E=je(h,s);Object.entries(E).forEach(([$,I])=>{f[`member.${w}.${$}`]=I}),w++}return f},je=(r,s)=>{const f={};if(r[k5]!=null)f[k5]=r[k5];return f},ve=(r,s)=>{const f={};if(r[S5]!=null)f[S5]=r[S5];if(r[$5]!=null)f[$5]=r[$5];return f},ie=(r,s)=>{const f={};let w=1;for(let h of r){if(h===null)continue;const E=ve(h,s);Object.entries(E).forEach(([$,I])=>{f[`member.${w}.${$}`]=I}),w++}return f},Oe=(r,s)=>{const f={};if(r[R5]!=null)f[R5]=r[R5];if(r[l5]!=null)f[l5]=r[l5];return f},de=(r,s)=>{const f={};let w=1;for(let h of r){if(h===null)continue;f[`member.${w}`]=h,w++}return f},XB=(r,s)=>{const f={};let w=1;for(let h of r){if(h===null)continue;const E=Oe(h,s);Object.entries(E).forEach(([$,I])=>{f[`member.${w}.${$}`]=I}),w++}return f},y5=(r,s)=>{const f={};if(r[E5]!=null)f[E5]=T(r[E5]);if(r[B0]!=null)f[B0]=T(r[B0]);return f},ce=(r,s)=>{const f={};if(r[wf]!=null)f[wf]=BE(r[wf],s);if(r[Q0]!=null)f[Q0]=y5(r[Q0],s);if(r[cf]!=null)f[cf]=hr(r[cf]);if(r[bf]!=null)f[bf]=T(r[bf]);return f},be=(r,s)=>{const f={};if(r[wf]!=null)f[wf]=BE(r[wf],s);if(r[Q0]!=null)f[Q0]=y5(r[Q0],s);if(r[cf]!=null)f[cf]=hr(r[cf]);if(r[Z5]!=null)f[Z5]=T(r[Z5]);if(r[B5]!=null)f[B5]=T(r[B5]);if(r[L5]!=null)f[L5]=T(r[L5]);if(r[ih]!=null)f[ih]=T(r[ih]);if(r[W5]!=null)f[W5]=T(r[W5]);if(r[bf]!=null)f[bf]=T(r[bf]);return f},_e=(r,s)=>{const f={};if(r[wf]!=null)f[wf]=BE(r[wf],s);if(r[Q5]!=null)f[Q5]=T(r[Q5]);if(r[Q0]!=null)f[Q0]=y5(r[Q0],s);if(r[cf]!=null)f[cf]=hr(r[cf]);if(r[K5]!=null)f[K5]=T(r[K5]);if(r[ih]!=null)f[ih]=T(r[ih]);if(r[bf]!=null)f[bf]=T(r[bf]);return f},BE=(r,s)=>{const f={};if(r[jh]!=null)f[jh]=T(r[jh]);if(r[P5]!=null)f[P5]=T(r[P5]);if(r[M5]!=null)f[M5]=T(r[M5]);if(r[F5]!=null)f[F5]=y(yw(r[F5]));return f},ge=(r,s)=>{const f={};if(r[I5]!=null)f[I5]=T(r[I5]);return f},xe=(r,s)=>{const f={};if(r[Sr]!=null)f[Sr]=T(r[Sr]);return f},ee=(r,s)=>{const f={};if(r[A5]!=null)f[A5]=T(r[A5]);if(r[B0]!=null)f[B0]=T(r[B0]);return f},ne=(r,s)=>{const f={};if(r[vh]!=null)f[vh]=T(r[vh]);return f},oe=(r,s)=>{const f={};if(r[H5]!=null)f[H5]=T(r[H5]);if(r[vh]!=null)f[vh]=T(r[vh]);if(r[B0]!=null)f[B0]=T(r[B0]);return f},ae=(r,s)=>{const f={};if(r[wf]!=null)f[wf]=BE(r[wf],s);if(r[G5]!=null)f[G5]=ee(r[G5],s);if(r[cf]!=null)f[cf]=hr(r[cf]);return f},pe=(r,s)=>{const f={};if(r[wf]!=null)f[wf]=BE(r[wf],s);return f},ue=(r,s)=>{const f={};if(r[Sr]!=null)f[Sr]=T(r[Sr]);return f},te=(r,s)=>{const f={};if(r[Sr]!=null)f[Sr]=T(r[Sr]);return f},rn=(r,s)=>{const f={};if(r[Sr]!=null)f[Sr]=T(r[Sr]);return f},fn=(r,s)=>{const f={};if(r[Sr]!=null)f[Sr]=T(r[Sr]);return f},sn=(r,s)=>{const f={};if(r[Sr]!=null)f[Sr]=T(r[Sr]);return f},wn=(r,s)=>{const f={};if(r[Sr]!=null)f[Sr]=T(r[Sr]);return f},hn=(r,s)=>{const f={};if(r[Sr]!=null)f[Sr]=T(r[Sr]);return f},or=(r)=>({httpStatusCode:r.statusCode,requestId:r.headers["x-amzn-requestid"]??r.headers["x-amzn-request-id"]??r.headers["x-amz-request-id"],extendedRequestId:r.headers["x-amz-id-2"],cfId:r.headers["x-amz-cf-id"]}),En,Iw=async(r,s,f,w,h)=>{const{hostname:E,protocol:$="https",port:I,path:F}=await r.endpoint(),U={protocol:$,hostname:E,port:I,method:"POST",path:F.endsWith("/")?F.slice(0,-1)+f:F+f,headers:s};if(w!==void 0)U.hostname=w;if(h!==void 0)U.body=h;return new Mr(U)},Fw,Uw="2011-06-15",Tw="Action",jh="AccessKeyId",$n="AssumeRole",E5="AssumedRoleId",Q0="AssumedRoleUser",In="AssumeRoleWithSAML",Fn="AssumeRoleWithWebIdentity",vh="Account",B0="Arn",ih="Audience",wf="Credentials",$5="ContextAssertion",Un="DecodeAuthorizationMessage",I5="DecodedMessage",hf="DurationSeconds",F5="Expiration",U5="ExternalId",T5="EncodedMessage",G5="FederatedUser",A5="FederatedUserId",Tn="GetAccessKeyInfo",Gn="GetCallerIdentity",An="GetFederationToken",Ln="GetSessionToken",L5="Issuer",R5="Key",C5="Name",W5="NameQualifier",Of="Policy",df="PolicyArns",z5="PrincipalArn",S5="ProviderArn",Y5="ProvidedContexts",X5="ProviderId",cf="PackedPolicySize",K5="Provider",M0="RoleArn",Oh="RoleSessionName",Z5="Subject",P5="SecretAccessKey",J5="SAMLAssertion",Q5="SubjectFromWebIdentityToken",bf="SourceIdentity",dh="SerialNumber",B5="SubjectType",M5="SessionToken",ch="Tags",bh="TokenCode",V5="TransitiveTagKeys",H5="UserId",Gw="Version",l5="Value",D5="WebIdentityToken",k5="arn",Sr="message",Aw=(r)=>Object.entries(r).map(([s,f])=>d3(s)+"="+d3(f)).join("&"),Rn=(r,s)=>{if(s.Error?.Code!==void 0)return s.Error.Code;if(r.statusCode==404)return"NotFound"};var V0=G(()=>{Us=m(Qr(),1);kr();K();Ew();ZI();En=bs(sf),Fw={"content-type":"application/x-www-form-urlencoded"}});var _h;var JI=G(()=>{B();V();K();f0();Ew();V0();_h=class _h extends R.classBuilder().ep(er).m(function(r,s,f,w){return[C(f,this.serialize,this.deserialize),W(f,r.getEndpointParameterInstructions())]}).s("AWSSecurityTokenServiceV20110615","AssumeRole",{}).n("STSClient","AssumeRoleCommand").f(void 0,uT).ser(hB).de(AB).build(){}});var QI;var N5=G(()=>{B();V();K();f0();Ew();V0();QI=class QI extends R.classBuilder().ep(er).m(function(r,s,f,w){return[C(f,this.serialize,this.deserialize),W(f,r.getEndpointParameterInstructions())]}).s("AWSSecurityTokenServiceV20110615","AssumeRoleWithSAML",{}).n("STSClient","AssumeRoleWithSAMLCommand").f(tT,r5).ser(EB).de(LB).build(){}});var gh;var BI=G(()=>{B();V();K();f0();Ew();V0();gh=class gh extends R.classBuilder().ep(er).m(function(r,s,f,w){return[C(f,this.serialize,this.deserialize),W(f,r.getEndpointParameterInstructions())]}).s("AWSSecurityTokenServiceV20110615","AssumeRoleWithWebIdentity",{}).n("STSClient","AssumeRoleWithWebIdentityCommand").f(f5,s5).ser($B).de(RB).build(){}});var MI;var q5=G(()=>{B();V();K();f0();V0();MI=class MI extends R.classBuilder().ep(er).m(function(r,s,f,w){return[C(f,this.serialize,this.deserialize),W(f,r.getEndpointParameterInstructions())]}).s("AWSSecurityTokenServiceV20110615","DecodeAuthorizationMessage",{}).n("STSClient","DecodeAuthorizationMessageCommand").f(void 0,void 0).ser(IB).de(CB).build(){}});var VI;var m5=G(()=>{B();V();K();f0();V0();VI=class VI extends R.classBuilder().ep(er).m(function(r,s,f,w){return[C(f,this.serialize,this.deserialize),W(f,r.getEndpointParameterInstructions())]}).s("AWSSecurityTokenServiceV20110615","GetAccessKeyInfo",{}).n("STSClient","GetAccessKeyInfoCommand").f(void 0,void 0).ser(FB).de(WB).build(){}});var HI;var j5=G(()=>{B();V();K();f0();V0();HI=class HI extends R.classBuilder().ep(er).m(function(r,s,f,w){return[C(f,this.serialize,this.deserialize),W(f,r.getEndpointParameterInstructions())]}).s("AWSSecurityTokenServiceV20110615","GetCallerIdentity",{}).n("STSClient","GetCallerIdentityCommand").f(void 0,void 0).ser(UB).de(zB).build(){}});var lI;var v5=G(()=>{B();V();K();f0();Ew();V0();lI=class lI extends R.classBuilder().ep(er).m(function(r,s,f,w){return[C(f,this.serialize,this.deserialize),W(f,r.getEndpointParameterInstructions())]}).s("AWSSecurityTokenServiceV20110615","GetFederationToken",{}).n("STSClient","GetFederationTokenCommand").f(void 0,w5).ser(TB).de(SB).build(){}});var DI;var i5=G(()=>{B();V();K();f0();Ew();V0();DI=class DI extends R.classBuilder().ep(er).m(function(r,s,f,w){return[C(f,this.serialize,this.deserialize),W(f,r.getEndpointParameterInstructions())]}).s("AWSSecurityTokenServiceV20110615","GetSessionToken",{}).n("STSClient","GetSessionTokenCommand").f(void 0,h5).ser(GB).de(YB).build(){}});var Cn,O5;var KB=G(()=>{K();JI();N5();BI();q5();m5();j5();v5();i5();zE();Cn={AssumeRoleCommand:_h,AssumeRoleWithSAMLCommand:QI,AssumeRoleWithWebIdentityCommand:gh,DecodeAuthorizationMessageCommand:MI,GetAccessKeyInfoCommand:VI,GetCallerIdentityCommand:HI,GetFederationTokenCommand:lI,GetSessionTokenCommand:DI};O5=class O5 extends J0{};ds(Cn,O5)});var ZB=G(()=>{JI();N5();BI();q5();m5();j5();v5();i5()});var PB=G(()=>{Ew()});var kI,JB="us-east-1",QB=(r)=>{if(typeof r?.Arn==="string"){const s=r.Arn.split(":");if(s.length>4&&s[4]!=="")return s[4]}return},BB=async(r,s,f)=>{const w=typeof r==="function"?await r():r,h=typeof s==="function"?await s():s;return f?.debug?.("@aws-sdk/client-sts::resolveRegion","accepting first of:",`${w} (provider)`,`${h} (parent client)`,`${JB} (STS default)`),w??h??JB},MB=(r,s)=>{let f,w;return async(h,E)=>{if(w=h,!f){const{logger:A=r?.parentClientConfig?.logger,region:L,requestHandler:S=r?.parentClientConfig?.requestHandler,credentialProviderLogger:z}=r,Z=await BB(L,r?.parentClientConfig?.region,z),N=!HB(S);f=new s({credentialDefaultProvider:()=>async()=>w,region:Z,requestHandler:N?S:void 0,logger:A})}const{Credentials:$,AssumedRoleUser:I}=await f.send(new _h(E));if(!$||!$.AccessKeyId||!$.SecretAccessKey)throw new Error(`Invalid response from STS.assumeRole call with role ${E.RoleArn}`);const F=QB(I),U={accessKeyId:$.AccessKeyId,secretAccessKey:$.SecretAccessKey,sessionToken:$.SessionToken,expiration:$.Expiration,...$.CredentialScope&&{credentialScope:$.CredentialScope},...F&&{accountId:F}};return kI.setCredentialFeature(U,"CREDENTIALS_STS_ASSUME_ROLE","i"),U}},VB=(r,s)=>{let f;return async(w)=>{if(!f){const{logger:F=r?.parentClientConfig?.logger,region:U,requestHandler:A=r?.parentClientConfig?.requestHandler,credentialProviderLogger:L}=r,S=await BB(U,r?.parentClientConfig?.region,L),z=!HB(A);f=new s({region:S,requestHandler:z?A:void 0,logger:F})}const{Credentials:h,AssumedRoleUser:E}=await f.send(new gh(w));if(!h||!h.AccessKeyId||!h.SecretAccessKey)throw new Error(`Invalid response from STS.assumeRoleWithWebIdentity call with role ${w.RoleArn}`);const $=QB(E),I={accessKeyId:h.AccessKeyId,secretAccessKey:h.SecretAccessKey,sessionToken:h.SessionToken,expiration:h.Expiration,...h.CredentialScope&&{credentialScope:h.CredentialScope},...$&&{accountId:$}};if($)kI.setCredentialFeature(I,"RESOLVED_ACCOUNT_ID","T");return kI.setCredentialFeature(I,"CREDENTIALS_STS_ASSUME_ROLE_WEB_ID","k"),I}},HB=(r)=>{return r?.metadata?.handlerProtocol==="h2"};var lB=G(()=>{kI=m(tr(),1);JI();BI()});var DB=(r,s)=>{if(!s)return r;else return class f extends r{constructor(w){super(w);for(let h of s)this.middlewareStack.use(h)}}},kB=(r={},s)=>MB(r,DB(J0,s)),yB=(r={},s)=>VB(r,DB(J0,s)),Wn=(r)=>(s)=>r({roleAssumer:kB(s),roleAssumerWithWebIdentity:yB(s),...s});var NB=G(()=>{lB();zE()});var d5={};Ys(d5,{getDefaultRoleAssumerWithWebIdentity:()=>yB,getDefaultRoleAssumer:()=>kB,decorateDefaultCredentialProvider:()=>Wn,__Client:()=>Sf,STSServiceException:()=>sf,STSClient:()=>J0,STS:()=>O5,RegionDisabledException:()=>KE,PackedPolicyTooLargeException:()=>XE,MalformedPolicyDocumentException:()=>YE,InvalidIdentityTokenException:()=>PE,InvalidAuthorizationMessageException:()=>QE,IDPRejectedClaimException:()=>ZE,IDPCommunicationErrorException:()=>JE,GetSessionTokenResponseFilterSensitiveLog:()=>h5,GetSessionTokenCommand:()=>DI,GetFederationTokenResponseFilterSensitiveLog:()=>w5,GetFederationTokenCommand:()=>lI,GetCallerIdentityCommand:()=>HI,GetAccessKeyInfoCommand:()=>VI,ExpiredTokenException:()=>SE,DecodeAuthorizationMessageCommand:()=>MI,CredentialsFilterSensitiveLog:()=>mh,AssumeRoleWithWebIdentityResponseFilterSensitiveLog:()=>s5,AssumeRoleWithWebIdentityRequestFilterSensitiveLog:()=>f5,AssumeRoleWithWebIdentityCommand:()=>gh,AssumeRoleWithSAMLResponseFilterSensitiveLog:()=>r5,AssumeRoleWithSAMLRequestFilterSensitiveLog:()=>tT,AssumeRoleWithSAMLCommand:()=>QI,AssumeRoleResponseFilterSensitiveLog:()=>uT,AssumeRoleCommand:()=>_h,$Command:()=>R});var c5=G(()=>{zE();KB();ZB();PB();NB();ZI()});var b5,_5,mB=(r,{profile:s="default",logger:f}={})=>{return Boolean(r)&&typeof r==="object"&&typeof r.role_arn==="string"&&["undefined","string"].indexOf(typeof r.role_session_name)>-1&&["undefined","string"].indexOf(typeof r.external_id)>-1&&["undefined","string"].indexOf(typeof r.mfa_serial)>-1&&(zn(r,{profile:s,logger:f})||Sn(r,{profile:s,logger:f}))},zn=(r,{profile:s,logger:f})=>{const w=typeof r.source_profile==="string"&&typeof r.credential_source==="undefined";if(w)f?.debug?.(` ${s} isAssumeRoleWithSourceProfile source_profile=${r.source_profile}`);return w},Sn=(r,{profile:s,logger:f})=>{const w=typeof r.credential_source==="string"&&typeof r.source_profile==="undefined";if(w)f?.debug?.(` ${s} isCredentialSourceProfile credential_source=${r.credential_source}`);return w},jB=async(r,s,f,w={})=>{f.logger?.debug("@aws-sdk/credential-provider-ini - resolveAssumeRoleCredentials (STS)");const h=s[r];if(!f.roleAssumer){const{getDefaultRoleAssumer:I}=await Promise.resolve().then(() => (c5(),d5));f.roleAssumer=I({...f.clientConfig,credentialProviderLogger:f.logger,parentClientConfig:f?.parentClientConfig},f.clientPlugins)}const{source_profile:E}=h;if(E&&E in w)throw new _5.CredentialsProviderError(`Detected a cycle attempting to resolve credentials for profile ${Df(f)}. Profiles visited: `+Object.keys(w).join(", "),{logger:f.logger});f.logger?.debug(`@aws-sdk/credential-provider-ini - finding credential resolver using ${E?`source_profile=[${E}]`:`profile=[${r}]`}`);const $=E?yI(E,s,f,{...w,[E]:!0},qB(s[E]??{})):(await S9(h.credential_source,r,f.logger)(f))();if(qB(h))return $.then((I)=>b5.setCredentialFeature(I,"CREDENTIALS_PROFILE_SOURCE_PROFILE","o"));else{const I={RoleArn:h.role_arn,RoleSessionName:h.role_session_name||`aws-sdk-js-${Date.now()}`,ExternalId:h.external_id,DurationSeconds:parseInt(h.duration_seconds||"3600",10)},{mfa_serial:F}=h;if(F){if(!f.mfaCodeProvider)throw new _5.CredentialsProviderError(`Profile ${r} requires multi-factor authentication, but no MFA code callback was provided.`,{logger:f.logger,tryNextLink:!1});I.SerialNumber=F,I.TokenCode=await f.mfaCodeProvider(F)}const U=await $;return f.roleAssumer(U,I).then((A)=>b5.setCredentialFeature(A,"CREDENTIALS_PROFILE_SOURCE_PROFILE","o"))}},qB=(r)=>{return!r.role_arn&&!!r.credential_source};var vB=G(()=>{b5=m(tr(),1),_5=m(Ar(),1);$s();Y9();g5()});var iB,OB=(r,s,f)=>{if(s.Version!==1)throw Error(`Profile ${r} credential_process did not return Version 1.`);if(s.AccessKeyId===void 0||s.SecretAccessKey===void 0)throw Error(`Profile ${r} credential_process returned invalid credentials.`);if(s.Expiration){const E=new Date;if(new Date(s.Expiration)<E)throw Error(`Profile ${r} credential_process returned expired credentials.`)}let w=s.AccountId;if(!w&&f?.[r]?.aws_account_id)w=f[r].aws_account_id;const h={accessKeyId:s.AccessKeyId,secretAccessKey:s.SecretAccessKey,...s.SessionToken&&{sessionToken:s.SessionToken},...s.Expiration&&{expiration:new Date(s.Expiration)},...s.CredentialScope&&{credentialScope:s.CredentialScope},...w&&{accountId:w}};return iB.setCredentialFeature(h,"CREDENTIALS_PROCESS","w"),h};var dB=G(()=>{iB=m(tr(),1)});import{exec as Yn}from"child_process";import{promisify as Xn}from"util";var NI,cB=async(r,s,f)=>{const w=s[r];if(s[r]){const h=w.credential_process;if(h!==void 0){const E=Xn(Yn);try{const{stdout:$}=await E(h);let I;try{I=JSON.parse($.trim())}catch{throw Error(`Profile ${r} credential_process returned invalid JSON.`)}return OB(r,I,s)}catch($){throw new NI.CredentialsProviderError($.message,{logger:f})}}else throw new NI.CredentialsProviderError(`Profile ${r} did not contain credential_process.`,{logger:f})}else throw new NI.CredentialsProviderError(`Profile ${r} could not be found in shared credentials file.`,{logger:f})};var bB=G(()=>{NI=m(Ar(),1);dB()});var Kn=(r={})=>async()=>{r.logger?.debug("@aws-sdk/credential-provider-process - fromProcess");const s=await e0(r);return cB(Df(r),s,r.logger)};var _B=G(()=>{$s();bB()});var x5={};Ys(x5,{fromProcess:()=>Kn});var e5=G(()=>{_B()});var gB,xB=(r)=>Boolean(r)&&typeof r==="object"&&typeof r.credential_process==="string",eB=async(r,s)=>Promise.resolve().then(() => (e5(),x5)).then(({fromProcess:f})=>f({...r,profile:s})().then((w)=>gB.setCredentialFeature(w,"CREDENTIALS_PROFILE_PROCESS","v")));var nB=G(()=>{gB=m(tr(),1)});var n5,oB=async(r,s,f={})=>{const{fromSSO:w}=await Promise.resolve().then(() => (nT(),eT));return w({profile:r,logger:f.logger})().then((h)=>{if(s.sso_session)return n5.setCredentialFeature(h,"CREDENTIALS_PROFILE_SSO","r");else return n5.setCredentialFeature(h,"CREDENTIALS_PROFILE_SSO_LEGACY","t")})},aB=(r)=>r&&(typeof r.sso_start_url==="string"||typeof r.sso_account_id==="string"||typeof r.sso_session==="string"||typeof r.sso_region==="string"||typeof r.sso_role_name==="string");var pB=G(()=>{n5=m(tr(),1)});var uB,o5=(r)=>Boolean(r)&&typeof r==="object"&&typeof r.aws_access_key_id==="string"&&typeof r.aws_secret_access_key==="string"&&["undefined","string"].indexOf(typeof r.aws_session_token)>-1&&["undefined","string"].indexOf(typeof r.aws_account_id)>-1,a5=async(r,s)=>{s?.logger?.debug("@aws-sdk/credential-provider-ini - resolveStaticCredentials");const f={accessKeyId:r.aws_access_key_id,secretAccessKey:r.aws_secret_access_key,sessionToken:r.aws_session_token,...r.aws_credential_scope&&{credentialScope:r.aws_credential_scope},...r.aws_account_id&&{accountId:r.aws_account_id}};return uB.setCredentialFeature(f,"CREDENTIALS_PROFILE","n")};var tB=G(()=>{uB=m(tr(),1)});var p5=(r)=>async()=>{r.logger?.debug("@aws-sdk/credential-provider-web-identity - fromWebToken");const{roleArn:s,roleSessionName:f,webIdentityToken:w,providerId:h,policyArns:E,policy:$,durationSeconds:I}=r;let{roleAssumerWithWebIdentity:F}=r;if(!F){const{getDefaultRoleAssumerWithWebIdentity:U}=await Promise.resolve().then(() => (c5(),d5));F=U({...r.clientConfig,credentialProviderLogger:r.logger,parentClientConfig:r.parentClientConfig},r.clientPlugins)}return F({RoleArn:s,RoleSessionName:f??`aws-sdk-js-session-${Date.now()}`,WebIdentityToken:w,ProviderId:h,PolicyArns:E,Policy:$,DurationSeconds:I})};import{readFileSync as Zn}from"fs";var fM,sM,rM="AWS_WEB_IDENTITY_TOKEN_FILE",Pn="AWS_ROLE_ARN",Jn="AWS_ROLE_SESSION_NAME",Qn=(r={})=>async()=>{r.logger?.debug("@aws-sdk/credential-provider-web-identity - fromTokenFile");const s=r?.webIdentityTokenFile??process.env[rM],f=r?.roleArn??process.env[Pn],w=r?.roleSessionName??process.env[Jn];if(!s||!f)throw new sM.CredentialsProviderError("Web identity configuration not specified",{logger:r.logger});const h=await p5({...r,webIdentityToken:Zn(s,{encoding:"ascii"}),roleArn:f,roleSessionName:w})();if(s===process.env[rM])fM.setCredentialFeature(h,"CREDENTIALS_ENV_VARS_STS_WEB_ID_TOKEN","h");return h};var wM=G(()=>{fM=m(tr(),1),sM=m(Ar(),1)});var u5={};Ys(u5,{fromWebToken:()=>p5,fromTokenFile:()=>Qn});var t5=G(()=>{wM()});var hM,EM=(r)=>Boolean(r)&&typeof r==="object"&&typeof r.web_identity_token_file==="string"&&typeof r.role_arn==="string"&&["undefined","string"].indexOf(typeof r.role_session_name)>-1,$M=async(r,s)=>Promise.resolve().then(() => (t5(),u5)).then(({fromTokenFile:f})=>f({webIdentityTokenFile:r.web_identity_token_file,roleArn:r.role_arn,roleSessionName:r.role_session_name,roleAssumerWithWebIdentity:s.roleAssumerWithWebIdentity,logger:s.logger,parentClientConfig:s.parentClientConfig})().then((w)=>hM.setCredentialFeature(w,"CREDENTIALS_PROFILE_STS_WEB_ID_TOKEN","q")));var IM=G(()=>{hM=m(tr(),1)});var FM,yI=async(r,s,f,w={},h=!1)=>{const E=s[r];if(Object.keys(w).length>0&&o5(E))return a5(E,f);if(h||mB(E,{profile:r,logger:f.logger}))return jB(r,s,f,w);if(o5(E))return a5(E,f);if(EM(E))return $M(E,f);if(xB(E))return eB(f,r);if(aB(E))return await oB(r,E,f);throw new FM.CredentialsProviderError(`Could not resolve credentials using profile: [${r}] in configuration/credentials file(s).`,{logger:f.logger})};var g5=G(()=>{FM=m(Ar(),1);vB();nB();pB();tB();IM()});var Bn=(r={})=>async()=>{r.logger?.debug("@aws-sdk/credential-provider-ini - fromIni");const s=await e0(r);return yI(Df(r),s,r)};var UM=G(()=>{$s();g5()});var TM={};Ys(TM,{fromIni:()=>Bn});var GM=G(()=>{UM()});var Lw,AM=!1,X0=(r={})=>Lw.memoize(Lw.chain(async()=>{if(r.profile??process.env[KX]){if(process.env[c3]&&process.env[b3]){if(!AM)(r.logger?.warn&&r.logger?.constructor?.name!=="NoOpLogger"?r.logger.warn:console.warn)(`@aws-sdk/credential-provider-node - defaultProvider::fromEnv WARNING:
26
26
  Multiple credential sources detected:
27
27
  Both AWS_PROFILE and the pair AWS_ACCESS_KEY_ID/AWS_SECRET_ACCESS_KEY static credentials are set.
28
28
  This SDK will proceed with the AWS_PROFILE value.
@@ -30,7 +30,7 @@ Set AWS_CONTAINER_CREDENTIALS_FULL_URI or AWS_CONTAINER_CREDENTIALS_RELATIVE_URI
30
30
  However, a future version may change this behavior to prefer the ENV static credentials.
31
31
  Please ensure that your environment only sets either the AWS_PROFILE or the
32
32
  AWS_ACCESS_KEY_ID/AWS_SECRET_ACCESS_KEY pair.
33
- `),xJ=!0}throw new g("AWS_PROFILE is set, skipping fromEnv provider.",{logger:r.logger,tryNextLink:!0})}return r.logger?.debug("@aws-sdk/credential-provider-node - defaultProvider::fromEnv"),VU(r)()},async()=>{r.logger?.debug("@aws-sdk/credential-provider-node - defaultProvider::fromSSO");const{ssoStartUrl:f,ssoAccountId:s,ssoRegion:w,ssoRoleName:h,ssoSession:E}=r;if(!f&&!s&&!w&&!h&&!E)throw new g("Skipping SSO provider in default chain (inputs do not include SSO fields).",{logger:r.logger});const{fromSSO:$}=await Promise.resolve().then(() => (QT(),JT));return $(r)()},async()=>{r.logger?.debug("@aws-sdk/credential-provider-node - defaultProvider::fromIni");const{fromIni:f}=await Promise.resolve().then(() => (gJ(),_J));return f(r)()},async()=>{r.logger?.debug("@aws-sdk/credential-provider-node - defaultProvider::fromProcess");const{fromProcess:f}=await Promise.resolve().then(() => (KG(),YG));return f(r)()},async()=>{r.logger?.debug("@aws-sdk/credential-provider-node - defaultProvider::fromTokenFile");const{fromTokenFile:f}=await Promise.resolve().then(() => (BG(),QG));return f(r)()},async()=>{return r.logger?.debug("@aws-sdk/credential-provider-node - defaultProvider::remoteProvider"),(await K7(r))()},async()=>{throw new g("Could not load credentials from any providers",{tryNextLink:!1,logger:r.logger})}),ox,nx),nx=(r)=>r?.expiration!==void 0,ox=(r)=>r?.expiration!==void 0&&r.expiration.getTime()-Date.now()<300000;var eJ=G(()=>{HU();Lr();rf();Z7()});var O1=G(()=>{eJ()});ew();nw();ow();pw();Ms();var bh=u(Or(),1);Ih();B();ff();Y();var QK=u(lr(),1);as();function s_(r){return{schemeId:"aws.auth#sigv4",signingProperties:{name:"route53",region:r.region},propertiesExtractor:(f,s)=>({signingProperties:{config:f,context:s}})}}var BK=async(r,f,s)=>{return{operation:Ks(f).operation,region:await Nr(r.region)()||(()=>{throw new Error("expected `region` to be configured for `aws.auth#sigv4`")})()}},lK=(r)=>{const f=[];switch(r.operation){default:f.push(s_(r))}return f},VK=(r)=>{return{...QK.resolveAwsSdkSigV4Config(r)}};var HK=(r)=>{return{...r,useDualstackEndpoint:r.useDualstackEndpoint??!1,useFipsEndpoint:r.useFipsEndpoint??!1,defaultSigningName:"route53"}},M={UseFIPS:{type:"builtInParams",name:"useFipsEndpoint"},Endpoint:{type:"builtInParams",name:"endpoint"},Region:{type:"builtInParams",name:"region"},UseDualStack:{type:"builtInParams",name:"useDualstackEndpoint"}};var DK={name:"@aws-sdk/client-route-53",description:"AWS SDK for JavaScript Route 53 Client for Node.js, Browser and React Native",version:"3.637.0",scripts:{build:"concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'","build:cjs":"node ../../scripts/compilation/inline client-route-53","build:es":"tsc -p tsconfig.es.json","build:include:deps":"lerna run --scope $npm_package_name --include-dependencies build","build:types":"tsc -p tsconfig.types.json","build:types:downlevel":"downlevel-dts dist-types dist-types/ts3.4",clean:"rimraf ./dist-* && rimraf *.tsbuildinfo","extract:docs":"api-extractor run --local","generate:client":"node ../../scripts/generate-clients/single-service --solo route-53"},main:"./dist-cjs/index.js",types:"./dist-types/index.d.ts",module:"./dist-es/index.js",sideEffects:!1,dependencies:{"@aws-crypto/sha256-browser":"5.2.0","@aws-crypto/sha256-js":"5.2.0","@aws-sdk/client-sso-oidc":"3.637.0","@aws-sdk/client-sts":"3.637.0","@aws-sdk/core":"3.635.0","@aws-sdk/credential-provider-node":"3.637.0","@aws-sdk/middleware-host-header":"3.620.0","@aws-sdk/middleware-logger":"3.609.0","@aws-sdk/middleware-recursion-detection":"3.620.0","@aws-sdk/middleware-sdk-route53":"3.609.0","@aws-sdk/middleware-user-agent":"3.637.0","@aws-sdk/region-config-resolver":"3.614.0","@aws-sdk/types":"3.609.0","@aws-sdk/util-endpoints":"3.637.0","@aws-sdk/util-user-agent-browser":"3.609.0","@aws-sdk/util-user-agent-node":"3.614.0","@aws-sdk/xml-builder":"3.609.0","@smithy/config-resolver":"^3.0.5","@smithy/core":"^2.4.0","@smithy/fetch-http-handler":"^3.2.4","@smithy/hash-node":"^3.0.3","@smithy/invalid-dependency":"^3.0.3","@smithy/middleware-content-length":"^3.0.5","@smithy/middleware-endpoint":"^3.1.0","@smithy/middleware-retry":"^3.0.15","@smithy/middleware-serde":"^3.0.3","@smithy/middleware-stack":"^3.0.3","@smithy/node-config-provider":"^3.1.4","@smithy/node-http-handler":"^3.1.4","@smithy/protocol-http":"^4.1.0","@smithy/smithy-client":"^3.2.0","@smithy/types":"^3.3.0","@smithy/url-parser":"^3.0.3","@smithy/util-base64":"^3.0.0","@smithy/util-body-length-browser":"^3.0.0","@smithy/util-body-length-node":"^3.0.0","@smithy/util-defaults-mode-browser":"^3.0.15","@smithy/util-defaults-mode-node":"^3.0.15","@smithy/util-endpoints":"^2.0.5","@smithy/util-middleware":"^3.0.3","@smithy/util-retry":"^3.0.3","@smithy/util-utf8":"^3.0.0","@smithy/util-waiter":"^3.1.2",tslib:"^2.6.2"},devDependencies:{"@tsconfig/node16":"16.1.3","@types/node":"^16.18.96",concurrently:"7.0.0","downlevel-dts":"0.10.1",rimraf:"3.0.2",typescript:"~4.9.5"},engines:{node:">=16.0.0"},typesVersions:{"<4.0":{"dist-types/*":["dist-types/ts3.4/*"]}},files:["dist-*/**"],author:{name:"AWS SDK for JavaScript Team",url:"https://aws.amazon.com/javascript/"},license:"Apache-2.0",browser:{"./dist-es/runtimeConfig":"./dist-es/runtimeConfig.browser"},"react-native":{"./dist-es/runtimeConfig":"./dist-es/runtimeConfig.native"},homepage:"https://github.com/aws/aws-sdk-js-v3/tree/main/clients/client-route-53",repository:{type:"git",url:"https://github.com/aws/aws-sdk-js-v3.git",directory:"clients/client-route-53"}};var GQ=u(lr(),1);O1();Ph();Ms();Kh();ff();sf();lw();Zh();Cs();var UQ=u(lr(),1);Y();j0();Mh();x0();Cw();ns();var nJ={["required"]:!1,type:"String"},oJ={["required"]:!0,default:!1,type:"Boolean"},aJ={["ref"]:"Endpoint"},PI={["fn"]:"booleanEquals",["argv"]:[{["ref"]:"UseFIPS"},!0]},$Q={["fn"]:"booleanEquals",["argv"]:[{["ref"]:"UseDualStack"},!0]},cr={},pJ={["fn"]:"stringEquals",["argv"]:[{["fn"]:"getAttr",["argv"]:[{["ref"]:"PartitionResult"},"name"]},"aws"]},Oh={["fn"]:"getAttr",["argv"]:[{["ref"]:"PartitionResult"},"name"]},kw={["fn"]:"booleanEquals",["argv"]:[{["ref"]:"UseFIPS"},!1]},Z0={["fn"]:"booleanEquals",["argv"]:[{["ref"]:"UseDualStack"},!1]},uJ={["authSchemes"]:[{name:"sigv4",["signingName"]:"route53",["signingRegion"]:"us-east-1"}]},tJ={["fn"]:"stringEquals",["argv"]:[Oh,"aws-us-gov"]},rQ={url:"https://route53.us-gov.amazonaws.com",properties:{["authSchemes"]:[{name:"sigv4",["signingName"]:"route53",["signingRegion"]:"us-gov-west-1"}]},headers:{}},sQ={["fn"]:"getAttr",["argv"]:[{["ref"]:"PartitionResult"},"supportsFIPS"]},fQ={["fn"]:"booleanEquals",["argv"]:[!0,{["fn"]:"getAttr",["argv"]:[{["ref"]:"PartitionResult"},"supportsDualStack"]}]},wQ=[PI],hQ=[$Q],EQ=[{["ref"]:"Region"}],ax={version:"1.0",parameters:{Region:nJ,UseDualStack:oJ,UseFIPS:oJ,Endpoint:nJ},rules:[{conditions:[{["fn"]:"isSet",["argv"]:[aJ]}],rules:[{conditions:wQ,error:"Invalid Configuration: FIPS and custom endpoint are not supported",type:"error"},{conditions:hQ,error:"Invalid Configuration: Dualstack and custom endpoint are not supported",type:"error"},{endpoint:{url:aJ,properties:cr,headers:cr},type:"endpoint"}],type:"tree"},{conditions:[{["fn"]:"isSet",["argv"]:EQ}],rules:[{conditions:[{["fn"]:"aws.partition",["argv"]:EQ,assign:"PartitionResult"}],rules:[{conditions:[pJ,kw,Z0],endpoint:{url:"https://route53.amazonaws.com",properties:uJ,headers:cr},type:"endpoint"},{conditions:[pJ,PI,Z0],endpoint:{url:"https://route53-fips.amazonaws.com",properties:uJ,headers:cr},type:"endpoint"},{conditions:[{["fn"]:"stringEquals",["argv"]:[Oh,"aws-cn"]},kw,Z0],endpoint:{url:"https://route53.amazonaws.com.cn",properties:{["authSchemes"]:[{name:"sigv4",["signingName"]:"route53",["signingRegion"]:"cn-northwest-1"}]},headers:cr},type:"endpoint"},{conditions:[tJ,kw,Z0],endpoint:rQ,type:"endpoint"},{conditions:[tJ,PI,Z0],endpoint:rQ,type:"endpoint"},{conditions:[{["fn"]:"stringEquals",["argv"]:[Oh,"aws-iso"]},kw,Z0],endpoint:{url:"https://route53.c2s.ic.gov",properties:{["authSchemes"]:[{name:"sigv4",["signingName"]:"route53",["signingRegion"]:"us-iso-east-1"}]},headers:cr},type:"endpoint"},{conditions:[{["fn"]:"stringEquals",["argv"]:[Oh,"aws-iso-b"]},kw,Z0],endpoint:{url:"https://route53.sc2s.sgov.gov",properties:{["authSchemes"]:[{name:"sigv4",["signingName"]:"route53",["signingRegion"]:"us-isob-east-1"}]},headers:cr},type:"endpoint"},{conditions:[{["fn"]:"stringEquals",["argv"]:[Oh,"aws-iso-e"]},kw,Z0],endpoint:{url:"https://route53.cloud.adc-e.uk",properties:{["authSchemes"]:[{name:"sigv4",["signingName"]:"route53",["signingRegion"]:"eu-isoe-west-1"}]},headers:cr},type:"endpoint"},{conditions:[{["fn"]:"stringEquals",["argv"]:[Oh,"aws-iso-f"]},kw,Z0],endpoint:{url:"https://route53.csp.hci.ic.gov",properties:{["authSchemes"]:[{name:"sigv4",["signingName"]:"route53",["signingRegion"]:"us-isof-south-1"}]},headers:cr},type:"endpoint"},{conditions:[PI,$Q],rules:[{conditions:[{["fn"]:"booleanEquals",["argv"]:[!0,sQ]},fQ],rules:[{endpoint:{url:"https://route53-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:cr,headers:cr},type:"endpoint"}],type:"tree"},{error:"FIPS and DualStack are enabled, but this partition does not support one or both",type:"error"}],type:"tree"},{conditions:wQ,rules:[{conditions:[{["fn"]:"booleanEquals",["argv"]:[sQ,!0]}],rules:[{endpoint:{url:"https://route53-fips.{Region}.{PartitionResult#dnsSuffix}",properties:cr,headers:cr},type:"endpoint"}],type:"tree"},{error:"FIPS is enabled but this partition does not support FIPS",type:"error"}],type:"tree"},{conditions:hQ,rules:[{conditions:[fQ],rules:[{endpoint:{url:"https://route53.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:cr,headers:cr},type:"endpoint"}],type:"tree"},{error:"DualStack is enabled but this partition does not support DualStack",type:"error"}],type:"tree"},{endpoint:{url:"https://route53.{Region}.{PartitionResult#dnsSuffix}",properties:cr,headers:cr},type:"endpoint"}],type:"tree"}],type:"tree"},{error:"Invalid Configuration: Missing Region",type:"error"}]},IQ=ax;var FQ=(r,f={})=>{return es(IQ,{endpointParams:r,logger:f.logger})};pr.aws=os;var TQ=(r)=>{return{apiVersion:"2013-04-01",base64Decoder:r?.base64Decoder??ef,base64Encoder:r?.base64Encoder??nf,disableHostPrefix:r?.disableHostPrefix??!1,endpointProvider:r?.endpointProvider??FQ,extensions:r?.extensions??[],httpAuthSchemeProvider:r?.httpAuthSchemeProvider??lK,httpAuthSchemes:r?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:(f)=>f.getIdentityProvider("aws.auth#sigv4"),signer:new UQ.AwsSdkSigV4Signer}],logger:r?.logger??new Ls,serviceId:r?.serviceId??"Route 53",urlParser:r?.urlParser??_r,utf8Decoder:r?.utf8Decoder??Us,utf8Encoder:r?.utf8Encoder??gf}};Y();Jh();Y();var CQ=(r)=>{jf(process.version);const f=of(r),s=()=>f().then(vf),w=TQ(r);return GQ.emitWarningIfUnsupportedVersion(process.version),{...w,...r,runtime:"node",defaultsMode:f,bodyLengthChecker:r?.bodyLengthChecker??xf,credentialDefaultProvider:r?.credentialDefaultProvider??A0,defaultUserAgentProvider:r?.defaultUserAgentProvider??_f({serviceId:w.serviceId,clientVersion:DK.version}),maxAttempts:r?.maxAttempts??t(Df),region:r?.region??t(Zs,Jf),requestHandler:tr.create(r?.requestHandler??s),retryMode:r?.retryMode??t({...Nf,default:async()=>(await s()).retryMode||Ds}),sha256:r?.sha256??wf.bind(null,"sha256"),streamCollector:r?.streamCollector??cf,useDualstackEndpoint:r?.useDualstackEndpoint??t(Zf),useFipsEndpoint:r?.useFipsEndpoint??t(Mf)}};Qh();qr();Y();var LQ=(r)=>{const f=r.httpAuthSchemes;let{httpAuthSchemeProvider:s,credentials:w}=r;return{setHttpAuthScheme(h){const E=f.findIndex(($)=>$.schemeId===h.schemeId);if(E===-1)f.push(h);else f.splice(E,1,h)},httpAuthSchemes(){return f},setHttpAuthSchemeProvider(h){s=h},httpAuthSchemeProvider(){return s},setCredentials(h){w=h},credentials(){return w}}},AQ=(r)=>{return{httpAuthSchemes:r.httpAuthSchemes(),httpAuthSchemeProvider:r.httpAuthSchemeProvider(),credentials:r.credentials()}};var XI=(r)=>r,RQ=(r,f)=>{const s={...XI(af(r)),...XI(df(r)),...XI(Rf(r)),...XI(LQ(r))};return f.forEach((w)=>w.configure(s)),{...r,...pf(s),...Of(s),...Wf(s),...AQ(s)}};class lG extends As{constructor(...[r]){const f=CQ(r||{}),s=HK(f),w=Yf(s),h=kf(w),E=Qf(h),$=zf(E),I=Vf($),F=VK(I),U=RQ(F,r?.extensions||[]);super(U);this.config=U,this.middlewareStack.use(Kf(this.config)),this.middlewareStack.use(bf(this.config)),this.middlewareStack.use(lf(this.config)),this.middlewareStack.use(Sf(this.config)),this.middlewareStack.use(Pf(this.config)),this.middlewareStack.use(Xf(this.config)),this.middlewareStack.use(bh.getHttpAuthSchemeEndpointRuleSetPlugin(this.config,{httpAuthSchemeParametersProvider:BK,identityProviderConfigProvider:async(C)=>new bh.DefaultIdentityProviderConfig({"aws.auth#sigv4":C.credentials})})),this.middlewareStack.use(bh.getHttpSigningPlugin(this.config))}destroy(){super.destroy()}}Y();var YI=/^\/(hostedzone|change|delegationset)\//;function px(){return(r)=>async(f)=>{const{ChangeBatch:s}=f.input,w=[];for(let h of s.Changes){const{AliasTarget:E}=h.ResourceRecordSet;if(E)w.push({...h,ResourceRecordSet:{...h.ResourceRecordSet,AliasTarget:{...E,HostedZoneId:E.HostedZoneId.replace(YI,"")}}});else w.push(h)}return r({...f,input:{...f.input,ChangeBatch:{...s,Changes:w}}})}}var ux={step:"initialize",tags:["ROUTE53_IDS","CHANGE_RESOURCE_RECORD_SETS"],name:"changeResourceRecordSetsMiddleware",override:!0},WQ=(r)=>({applyToStack:(f)=>{f.add(px(),ux)}});function re(){return(r)=>async(f)=>{const s={...f.input};for(let w of tx){const h=s[w];if(h)s[w]=h.replace(YI,"")}return r({...f,input:s})}}var tx=["DelegationSetId","HostedZoneId","Id"],se={step:"initialize",tags:["ROUTE53_IDS"],name:"idNormalizerMiddleware",override:!0},m=(r)=>({applyToStack:(f)=>{f.add(re(),se)}});B();V();Y();var _=u(lr(),1);function zQ(r){return r.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;")}function SQ(r){return r.replace(/&/g,"&amp;").replace(/"/g,"&quot;").replace(/'/g,"&apos;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/\r/g,"&#x0D;").replace(/\n/g,"&#x0A;").replace(/\u0085/g,"&#x85;").replace(/\u2028/,"&#x2028;")}class VG{constructor(r){this.value=r}toString(){return SQ(""+this.value)}}class H{static of(r,f,s){const w=new H(r);if(f!==void 0)w.addChildNode(new VG(f));if(s!==void 0)w.withName(s);return w}constructor(r,f=[]){this.name=r,this.children=f,this.attributes={}}withName(r){return this.name=r,this}addAttribute(r,f){return this.attributes[r]=f,this}addChildNode(r){return this.children.push(r),this}removeAttribute(r){return delete this.attributes[r],this}n(r){return this.name=r,this}c(r){return this.children.push(r),this}a(r,f){if(f!=null)this.attributes[r]=f;return this}cc(r,f,s=f){if(r[f]!=null){const w=H.of(f,r[f]).withName(s);this.c(w)}}l(r,f,s,w){if(r[f]!=null)w().map((E)=>{E.withName(s),this.c(E)})}lc(r,f,s,w){if(r[f]!=null){const h=w(),E=new H(s);h.map(($)=>{E.c($)}),this.c(E)}}toString(){const r=Boolean(this.children.length);let f=`<${this.name}`;const s=this.attributes;for(let w of Object.keys(s)){const h=s[w];if(h!=null)f+=` ${w}="${zQ(""+h)}"`}return f+=!r?"/>":`>${this.children.map((w)=>w.toString()).join("")}</${this.name}>`}}var O=u(Or(),1);Y();Y();class i extends ks{constructor(r){super(r);Object.setPrototypeOf(this,i.prototype)}}class KI extends i{constructor(r){super({name:"ConcurrentModification",$fault:"client",...r});this.name="ConcurrentModification",this.$fault="client",Object.setPrototypeOf(this,KI.prototype)}}class ZI extends i{constructor(r){super({name:"InvalidInput",$fault:"client",...r});this.name="InvalidInput",this.$fault="client",Object.setPrototypeOf(this,ZI.prototype)}}class MI extends i{constructor(r){super({name:"InvalidKeySigningKeyStatus",$fault:"client",...r});this.name="InvalidKeySigningKeyStatus",this.$fault="client",Object.setPrototypeOf(this,MI.prototype)}}class JI extends i{constructor(r){super({name:"InvalidKMSArn",$fault:"client",...r});this.name="InvalidKMSArn",this.$fault="client",Object.setPrototypeOf(this,JI.prototype)}}class QI extends i{constructor(r){super({name:"InvalidSigningStatus",$fault:"client",...r});this.name="InvalidSigningStatus",this.$fault="client",Object.setPrototypeOf(this,QI.prototype)}}class BI extends i{constructor(r){super({name:"NoSuchKeySigningKey",$fault:"client",...r});this.name="NoSuchKeySigningKey",this.$fault="client",Object.setPrototypeOf(this,BI.prototype)}}class lI extends i{constructor(r){super({name:"ConflictingDomainExists",$fault:"client",...r});this.name="ConflictingDomainExists",this.$fault="client",Object.setPrototypeOf(this,lI.prototype)}}class VI extends i{constructor(r){super({name:"InvalidVPCId",$fault:"client",...r});this.name="InvalidVPCId",this.$fault="client",Object.setPrototypeOf(this,VI.prototype)}}class HI extends i{constructor(r){super({name:"LimitsExceeded",$fault:"client",...r});this.name="LimitsExceeded",this.$fault="client",Object.setPrototypeOf(this,HI.prototype)}}class DI extends i{constructor(r){super({name:"NoSuchHostedZone",$fault:"client",...r});this.name="NoSuchHostedZone",this.$fault="client",Object.setPrototypeOf(this,DI.prototype)}}class kI extends i{constructor(r){super({name:"NotAuthorizedException",$fault:"client",...r});this.name="NotAuthorizedException",this.$fault="client",Object.setPrototypeOf(this,kI.prototype)}}class NI extends i{constructor(r){super({name:"PriorRequestNotComplete",$fault:"client",...r});this.name="PriorRequestNotComplete",this.$fault="client",Object.setPrototypeOf(this,NI.prototype)}}class yI extends i{constructor(r){super({name:"PublicZoneVPCAssociation",$fault:"client",...r});this.name="PublicZoneVPCAssociation",this.$fault="client",Object.setPrototypeOf(this,yI.prototype)}}class qI extends i{constructor(r){super({name:"CidrBlockInUseException",$fault:"client",...r});this.name="CidrBlockInUseException",this.$fault="client",Object.setPrototypeOf(this,qI.prototype),this.Message=r.Message}}class mI extends i{constructor(r){super({name:"CidrCollectionVersionMismatchException",$fault:"client",...r});this.name="CidrCollectionVersionMismatchException",this.$fault="client",Object.setPrototypeOf(this,mI.prototype),this.Message=r.Message}}class vI extends i{constructor(r){super({name:"NoSuchCidrCollectionException",$fault:"client",...r});this.name="NoSuchCidrCollectionException",this.$fault="client",Object.setPrototypeOf(this,vI.prototype),this.Message=r.Message}}class jI extends i{constructor(r){super({name:"InvalidChangeBatch",$fault:"client",...r});this.name="InvalidChangeBatch",this.$fault="client",Object.setPrototypeOf(this,jI.prototype),this.messages=r.messages}}class iI extends i{constructor(r){super({name:"NoSuchHealthCheck",$fault:"client",...r});this.name="NoSuchHealthCheck",this.$fault="client",Object.setPrototypeOf(this,iI.prototype)}}class dI extends i{constructor(r){super({name:"ThrottlingException",$fault:"client",...r});this.name="ThrottlingException",this.$fault="client",Object.setPrototypeOf(this,dI.prototype)}}class OI extends i{constructor(r){super({name:"CidrCollectionAlreadyExistsException",$fault:"client",...r});this.name="CidrCollectionAlreadyExistsException",this.$fault="client",Object.setPrototypeOf(this,OI.prototype),this.Message=r.Message}}class bI extends i{constructor(r){super({name:"HealthCheckAlreadyExists",$fault:"client",...r});this.name="HealthCheckAlreadyExists",this.$fault="client",Object.setPrototypeOf(this,bI.prototype)}}class cI extends i{constructor(r){super({name:"TooManyHealthChecks",$fault:"client",...r});this.name="TooManyHealthChecks",this.$fault="client",Object.setPrototypeOf(this,cI.prototype)}}class _I extends i{constructor(r){super({name:"DelegationSetNotAvailable",$fault:"client",...r});this.name="DelegationSetNotAvailable",this.$fault="client",Object.setPrototypeOf(this,_I.prototype)}}class gI extends i{constructor(r){super({name:"DelegationSetNotReusable",$fault:"client",...r});this.name="DelegationSetNotReusable",this.$fault="client",Object.setPrototypeOf(this,gI.prototype)}}class xI extends i{constructor(r){super({name:"HostedZoneAlreadyExists",$fault:"client",...r});this.name="HostedZoneAlreadyExists",this.$fault="client",Object.setPrototypeOf(this,xI.prototype)}}class eI extends i{constructor(r){super({name:"InvalidDomainName",$fault:"client",...r});this.name="InvalidDomainName",this.$fault="client",Object.setPrototypeOf(this,eI.prototype)}}class nI extends i{constructor(r){super({name:"NoSuchDelegationSet",$fault:"client",...r});this.name="NoSuchDelegationSet",this.$fault="client",Object.setPrototypeOf(this,nI.prototype)}}class oI extends i{constructor(r){super({name:"TooManyHostedZones",$fault:"client",...r});this.name="TooManyHostedZones",this.$fault="client",Object.setPrototypeOf(this,oI.prototype)}}class aI extends i{constructor(r){super({name:"InvalidArgument",$fault:"client",...r});this.name="InvalidArgument",this.$fault="client",Object.setPrototypeOf(this,aI.prototype)}}class pI extends i{constructor(r){super({name:"InvalidKeySigningKeyName",$fault:"client",...r});this.name="InvalidKeySigningKeyName",this.$fault="client",Object.setPrototypeOf(this,pI.prototype)}}class uI extends i{constructor(r){super({name:"KeySigningKeyAlreadyExists",$fault:"client",...r});this.name="KeySigningKeyAlreadyExists",this.$fault="client",Object.setPrototypeOf(this,uI.prototype)}}class tI extends i{constructor(r){super({name:"TooManyKeySigningKeys",$fault:"client",...r});this.name="TooManyKeySigningKeys",this.$fault="client",Object.setPrototypeOf(this,tI.prototype)}}class r2 extends i{constructor(r){super({name:"InsufficientCloudWatchLogsResourcePolicy",$fault:"client",...r});this.name="InsufficientCloudWatchLogsResourcePolicy",this.$fault="client",Object.setPrototypeOf(this,r2.prototype)}}class s2 extends i{constructor(r){super({name:"NoSuchCloudWatchLogsLogGroup",$fault:"client",...r});this.name="NoSuchCloudWatchLogsLogGroup",this.$fault="client",Object.setPrototypeOf(this,s2.prototype)}}class f2 extends i{constructor(r){super({name:"QueryLoggingConfigAlreadyExists",$fault:"client",...r});this.name="QueryLoggingConfigAlreadyExists",this.$fault="client",Object.setPrototypeOf(this,f2.prototype)}}class w2 extends i{constructor(r){super({name:"DelegationSetAlreadyCreated",$fault:"client",...r});this.name="DelegationSetAlreadyCreated",this.$fault="client",Object.setPrototypeOf(this,w2.prototype)}}class h2 extends i{constructor(r){super({name:"DelegationSetAlreadyReusable",$fault:"client",...r});this.name="DelegationSetAlreadyReusable",this.$fault="client",Object.setPrototypeOf(this,h2.prototype)}}class E2 extends i{constructor(r){super({name:"HostedZoneNotFound",$fault:"client",...r});this.name="HostedZoneNotFound",this.$fault="client",Object.setPrototypeOf(this,E2.prototype)}}class $2 extends i{constructor(r){super({name:"InvalidTrafficPolicyDocument",$fault:"client",...r});this.name="InvalidTrafficPolicyDocument",this.$fault="client",Object.setPrototypeOf(this,$2.prototype)}}class I2 extends i{constructor(r){super({name:"TooManyTrafficPolicies",$fault:"client",...r});this.name="TooManyTrafficPolicies",this.$fault="client",Object.setPrototypeOf(this,I2.prototype)}}class F2 extends i{constructor(r){super({name:"TrafficPolicyAlreadyExists",$fault:"client",...r});this.name="TrafficPolicyAlreadyExists",this.$fault="client",Object.setPrototypeOf(this,F2.prototype)}}class U2 extends i{constructor(r){super({name:"NoSuchTrafficPolicy",$fault:"client",...r});this.name="NoSuchTrafficPolicy",this.$fault="client",Object.setPrototypeOf(this,U2.prototype)}}class T2 extends i{constructor(r){super({name:"TooManyTrafficPolicyInstances",$fault:"client",...r});this.name="TooManyTrafficPolicyInstances",this.$fault="client",Object.setPrototypeOf(this,T2.prototype)}}class G2 extends i{constructor(r){super({name:"TrafficPolicyInstanceAlreadyExists",$fault:"client",...r});this.name="TrafficPolicyInstanceAlreadyExists",this.$fault="client",Object.setPrototypeOf(this,G2.prototype)}}class C2 extends i{constructor(r){super({name:"TooManyTrafficPolicyVersionsForCurrentPolicy",$fault:"client",...r});this.name="TooManyTrafficPolicyVersionsForCurrentPolicy",this.$fault="client",Object.setPrototypeOf(this,C2.prototype)}}class L2 extends i{constructor(r){super({name:"TooManyVPCAssociationAuthorizations",$fault:"client",...r});this.name="TooManyVPCAssociationAuthorizations",this.$fault="client",Object.setPrototypeOf(this,L2.prototype)}}class A2 extends i{constructor(r){super({name:"KeySigningKeyInParentDSRecord",$fault:"client",...r});this.name="KeySigningKeyInParentDSRecord",this.$fault="client",Object.setPrototypeOf(this,A2.prototype)}}class R2 extends i{constructor(r){super({name:"KeySigningKeyInUse",$fault:"client",...r});this.name="KeySigningKeyInUse",this.$fault="client",Object.setPrototypeOf(this,R2.prototype)}}class W2 extends i{constructor(r){super({name:"CidrCollectionInUseException",$fault:"client",...r});this.name="CidrCollectionInUseException",this.$fault="client",Object.setPrototypeOf(this,W2.prototype),this.Message=r.Message}}class z2 extends i{constructor(r){super({name:"HealthCheckInUse",$fault:"client",...r});this.name="HealthCheckInUse",this.$fault="client",Object.setPrototypeOf(this,z2.prototype)}}class S2 extends i{constructor(r){super({name:"HostedZoneNotEmpty",$fault:"client",...r});this.name="HostedZoneNotEmpty",this.$fault="client",Object.setPrototypeOf(this,S2.prototype)}}class P2 extends i{constructor(r){super({name:"NoSuchQueryLoggingConfig",$fault:"client",...r});this.name="NoSuchQueryLoggingConfig",this.$fault="client",Object.setPrototypeOf(this,P2.prototype)}}class X2 extends i{constructor(r){super({name:"DelegationSetInUse",$fault:"client",...r});this.name="DelegationSetInUse",this.$fault="client",Object.setPrototypeOf(this,X2.prototype)}}class Y2 extends i{constructor(r){super({name:"TrafficPolicyInUse",$fault:"client",...r});this.name="TrafficPolicyInUse",this.$fault="client",Object.setPrototypeOf(this,Y2.prototype)}}class K2 extends i{constructor(r){super({name:"NoSuchTrafficPolicyInstance",$fault:"client",...r});this.name="NoSuchTrafficPolicyInstance",this.$fault="client",Object.setPrototypeOf(this,K2.prototype)}}class Z2 extends i{constructor(r){super({name:"VPCAssociationAuthorizationNotFound",$fault:"client",...r});this.name="VPCAssociationAuthorizationNotFound",this.$fault="client",Object.setPrototypeOf(this,Z2.prototype)}}class M2 extends i{constructor(r){super({name:"DNSSECNotFound",$fault:"client",...r});this.name="DNSSECNotFound",this.$fault="client",Object.setPrototypeOf(this,M2.prototype)}}class J2 extends i{constructor(r){super({name:"LastVPCAssociation",$fault:"client",...r});this.name="LastVPCAssociation",this.$fault="client",Object.setPrototypeOf(this,J2.prototype)}}class Q2 extends i{constructor(r){super({name:"VPCAssociationNotFound",$fault:"client",...r});this.name="VPCAssociationNotFound",this.$fault="client",Object.setPrototypeOf(this,Q2.prototype)}}class B2 extends i{constructor(r){super({name:"HostedZonePartiallyDelegated",$fault:"client",...r});this.name="HostedZonePartiallyDelegated",this.$fault="client",Object.setPrototypeOf(this,B2.prototype)}}class l2 extends i{constructor(r){super({name:"KeySigningKeyWithActiveStatusNotFound",$fault:"client",...r});this.name="KeySigningKeyWithActiveStatusNotFound",this.$fault="client",Object.setPrototypeOf(this,l2.prototype)}}class V2 extends i{constructor(r){super({name:"NoSuchChange",$fault:"client",...r});this.name="NoSuchChange",this.$fault="client",Object.setPrototypeOf(this,V2.prototype)}}class H2 extends i{constructor(r){super({name:"NoSuchGeoLocation",$fault:"client",...r});this.name="NoSuchGeoLocation",this.$fault="client",Object.setPrototypeOf(this,H2.prototype)}}class D2 extends i{constructor(r){super({name:"IncompatibleVersion",$fault:"client",...r});this.name="IncompatibleVersion",this.$fault="client",Object.setPrototypeOf(this,D2.prototype)}}class k2 extends i{constructor(r){super({name:"HostedZoneNotPrivate",$fault:"client",...r});this.name="HostedZoneNotPrivate",this.$fault="client",Object.setPrototypeOf(this,k2.prototype)}}class N2 extends i{constructor(r){super({name:"NoSuchCidrLocationException",$fault:"client",...r});this.name="NoSuchCidrLocationException",this.$fault="client",Object.setPrototypeOf(this,N2.prototype),this.Message=r.Message}}class y2 extends i{constructor(r){super({name:"InvalidPaginationToken",$fault:"client",...r});this.name="InvalidPaginationToken",this.$fault="client",Object.setPrototypeOf(this,y2.prototype)}}class q2 extends i{constructor(r){super({name:"HealthCheckVersionMismatch",$fault:"client",...r});this.name="HealthCheckVersionMismatch",this.$fault="client",Object.setPrototypeOf(this,q2.prototype)}}class m2 extends i{constructor(r){super({name:"ConflictingTypes",$fault:"client",...r});this.name="ConflictingTypes",this.$fault="client",Object.setPrototypeOf(this,m2.prototype)}}var QQ=async(r,f)=>{const s=O.requestBuilder(r,f),w={};s.bp("/2013-04-01/keysigningkey/{HostedZoneId}/{Name}/activate"),s.p("HostedZoneId",()=>r.HostedZoneId,"{HostedZoneId}",!1),s.p("Name",()=>r.Name,"{Name}",!1);let h;return s.m("POST").h(w).b(h),s.build()},BQ=async(r,f)=>{const s=O.requestBuilder(r,f),w={"content-type":"application/xml"};s.bp("/2013-04-01/hostedzone/{HostedZoneId}/associatevpc"),s.p("HostedZoneId",()=>r.HostedZoneId,"{HostedZoneId}",!1);let h;h=Hr;const E=new H(jo);if(E.a("xmlns","https://route53.amazonaws.com/doc/2013-04-01/"),r[Ur]!=null)E.c(H.of(vo,r[Ur]).n(Ur));if(r[Rr]!=null)E.c(oE(r[Rr],f).n(Rr));return h+=E.toString(),s.m("POST").h(w).b(h),s.build()},lQ=async(r,f)=>{const s=O.requestBuilder(r,f),w={"content-type":"application/xml"};s.bp("/2013-04-01/cidrcollection/{Id}"),s.p("Id",()=>r.Id,"{Id}",!1);let h;h=Hr;const E=new H(co);if(E.a("xmlns","https://route53.amazonaws.com/doc/2013-04-01/"),E.lc(r,"Changes","Changes",()=>Zn(r[AV],f)),r[v2]!=null)E.c(H.of(v2,String(r[v2])).n(v2));return h+=E.toString(),s.m("POST").h(w).b(h),s.build()},VQ=async(r,f)=>{const s=O.requestBuilder(r,f),w={"content-type":"application/xml"};s.bp("/2013-04-01/hostedzone/{HostedZoneId}/rrset"),s.p("HostedZoneId",()=>r.HostedZoneId,"{HostedZoneId}",!1);let h;h=Hr;const E=new H(sa);if(E.a("xmlns","https://route53.amazonaws.com/doc/2013-04-01/"),r[i2]!=null)E.c(Xn(r[i2],f).n(i2));return h+=E.toString(),s.m("POST").h(w).b(h),s.build()},HQ=async(r,f)=>{const s=O.requestBuilder(r,f),w={"content-type":"application/xml"};s.bp("/2013-04-01/tags/{ResourceType}/{ResourceId}"),s.p("ResourceType",()=>r.ResourceType,"{ResourceType}",!1),s.p("ResourceId",()=>r.ResourceId,"{ResourceId}",!1);let h;h=Hr;const E=new H(fa);return E.a("xmlns","https://route53.amazonaws.com/doc/2013-04-01/"),E.lc(r,"AddTags","AddTags",()=>vn(r[mo],f)),E.lc(r,"RemoveTagKeys","RemoveTagKeys",()=>mn(r[ka],f)),h+=E.toString(),s.m("POST").h(w).b(h),s.build()},DQ=async(r,f)=>{const s=O.requestBuilder(r,f),w={"content-type":"application/xml"};s.bp("/2013-04-01/cidrcollection");let h;h=Hr;const E=new H(_o);if(E.a("xmlns","https://route53.amazonaws.com/doc/2013-04-01/"),r[Pr]!=null)E.c(H.of(po,r[Pr]).n(Pr));if(r[n]!=null)E.c(H.of(uo,r[n]).n(n));return h+=E.toString(),s.m("POST").h(w).b(h),s.build()},kQ=async(r,f)=>{const s=O.requestBuilder(r,f),w={"content-type":"application/xml"};s.bp("/2013-04-01/healthcheck");let h;h=Hr;const E=new H(go);if(E.a("xmlns","https://route53.amazonaws.com/doc/2013-04-01/"),r[Pr]!=null)E.c(H.of(Wa,r[Pr]).n(Pr));if(r[_w]!=null)E.c(Vn(r[_w],f).n(_w));return h+=E.toString(),s.m("POST").h(w).b(h),s.build()},NQ=async(r,f)=>{const s=O.requestBuilder(r,f),w={"content-type":"application/xml"};s.bp("/2013-04-01/hostedzone");let h;h=Hr;const E=new H(xo);if(E.a("xmlns","https://route53.amazonaws.com/doc/2013-04-01/"),r[Pr]!=null)E.c(H.of(j6,r[Pr]).n(Pr));if(r[O2]!=null)E.c(H.of(E0,r[O2]).n(O2));if(r[b2]!=null)E.c(Hn(r[b2],f).n(b2));if(r[n]!=null)E.c(H.of(Gf,r[n]).n(n));if(r[Rr]!=null)E.c(oE(r[Rr],f).n(Rr));return h+=E.toString(),s.m("POST").h(w).b(h),s.build()},yQ=async(r,f)=>{const s=O.requestBuilder(r,f),w={"content-type":"application/xml"};s.bp("/2013-04-01/keysigningkey");let h;h=Hr;const E=new H(eo);if(E.a("xmlns","https://route53.amazonaws.com/doc/2013-04-01/"),r[Pr]!=null)E.c(H.of(j6,r[Pr]).n(Pr));if(r[sr]!=null)E.c(H.of(E0,r[sr]).n(sr));if(r[aG]!=null)E.c(H.of(ma,r[aG]).n(aG));if(r[n]!=null)E.c(H.of(qa,r[n]).n(n));if(r[hs]!=null)E.c(H.of(va,r[hs]).n(hs));return h+=E.toString(),s.m("POST").h(w).b(h),s.build()},qQ=async(r,f)=>{const s=O.requestBuilder(r,f),w={"content-type":"application/xml"};s.bp("/2013-04-01/queryloggingconfig");let h;h=Hr;const E=new H(to);if(E.a("xmlns","https://route53.amazonaws.com/doc/2013-04-01/"),E.cc(r,d2),r[sr]!=null)E.c(H.of(E0,r[sr]).n(sr));return h+=E.toString(),s.m("POST").h(w).b(h),s.build()},mQ=async(r,f)=>{const s=O.requestBuilder(r,f),w={"content-type":"application/xml"};s.bp("/2013-04-01/delegationset");let h;h=Hr;const E=new H(ra);if(E.a("xmlns","https://route53.amazonaws.com/doc/2013-04-01/"),r[Pr]!=null)E.c(H.of(j6,r[Pr]).n(Pr));if(r[sr]!=null)E.c(H.of(E0,r[sr]).n(sr));return h+=E.toString(),s.m("POST").h(w).b(h),s.build()},vQ=async(r,f)=>{const s=O.requestBuilder(r,f),w={"content-type":"application/xml"};s.bp("/2013-04-01/trafficpolicy");let h;h=Hr;const E=new H(ha);if(E.a("xmlns","https://route53.amazonaws.com/doc/2013-04-01/"),r[Ur]!=null)E.c(H.of(d6,r[Ur]).n(Ur));if(r[J0]!=null)E.c(H.of(zV,r[J0]).n(J0));if(r[n]!=null)E.c(H.of(ba,r[n]).n(n));return h+=E.toString(),s.m("POST").h(w).b(h),s.build()},jQ=async(r,f)=>{const s=O.requestBuilder(r,f),w={"content-type":"application/xml"};s.bp("/2013-04-01/trafficpolicyinstance");let h;h=Hr;const E=new H(wa);if(E.a("xmlns","https://route53.amazonaws.com/doc/2013-04-01/"),r[sr]!=null)E.c(H.of(E0,r[sr]).n(sr));if(r[n]!=null)E.c(H.of(Gf,r[n]).n(n));if(r[jr]!=null)E.c(H.of(jr,String(r[jr])).n(jr));if(E.cc(r,s1),r[is]!=null)E.c(H.of(is,String(r[is])).n(is));return h+=E.toString(),s.m("POST").h(w).b(h),s.build()},iQ=async(r,f)=>{const s=O.requestBuilder(r,f),w={"content-type":"application/xml"};s.bp("/2013-04-01/trafficpolicy/{Id}"),s.p("Id",()=>r.Id,"{Id}",!1);let h;h=Hr;const E=new H(Ea);if(E.a("xmlns","https://route53.amazonaws.com/doc/2013-04-01/"),r[Ur]!=null)E.c(H.of(d6,r[Ur]).n(Ur));if(r[J0]!=null)E.c(H.of(zV,r[J0]).n(J0));return h+=E.toString(),s.m("POST").h(w).b(h),s.build()},dQ=async(r,f)=>{const s=O.requestBuilder(r,f),w={"content-type":"application/xml"};s.bp("/2013-04-01/hostedzone/{HostedZoneId}/authorizevpcassociation"),s.p("HostedZoneId",()=>r.HostedZoneId,"{HostedZoneId}",!1);let h;h=Hr;const E=new H($a);if(E.a("xmlns","https://route53.amazonaws.com/doc/2013-04-01/"),r[Rr]!=null)E.c(oE(r[Rr],f).n(Rr));return h+=E.toString(),s.m("POST").h(w).b(h),s.build()},OQ=async(r,f)=>{const s=O.requestBuilder(r,f),w={};s.bp("/2013-04-01/keysigningkey/{HostedZoneId}/{Name}/deactivate"),s.p("HostedZoneId",()=>r.HostedZoneId,"{HostedZoneId}",!1),s.p("Name",()=>r.Name,"{Name}",!1);let h;return s.m("POST").h(w).b(h),s.build()},bQ=async(r,f)=>{const s=O.requestBuilder(r,f),w={};s.bp("/2013-04-01/cidrcollection/{Id}"),s.p("Id",()=>r.Id,"{Id}",!1);let h;return s.m("DELETE").h(w).b(h),s.build()},cQ=async(r,f)=>{const s=O.requestBuilder(r,f),w={};s.bp("/2013-04-01/healthcheck/{HealthCheckId}"),s.p("HealthCheckId",()=>r.HealthCheckId,"{HealthCheckId}",!1);let h;return s.m("DELETE").h(w).b(h),s.build()},_Q=async(r,f)=>{const s=O.requestBuilder(r,f),w={};s.bp("/2013-04-01/hostedzone/{Id}"),s.p("Id",()=>r.Id,"{Id}",!1);let h;return s.m("DELETE").h(w).b(h),s.build()},gQ=async(r,f)=>{const s=O.requestBuilder(r,f),w={};s.bp("/2013-04-01/keysigningkey/{HostedZoneId}/{Name}"),s.p("HostedZoneId",()=>r.HostedZoneId,"{HostedZoneId}",!1),s.p("Name",()=>r.Name,"{Name}",!1);let h;return s.m("DELETE").h(w).b(h),s.build()},xQ=async(r,f)=>{const s=O.requestBuilder(r,f),w={};s.bp("/2013-04-01/queryloggingconfig/{Id}"),s.p("Id",()=>r.Id,"{Id}",!1);let h;return s.m("DELETE").h(w).b(h),s.build()},eQ=async(r,f)=>{const s=O.requestBuilder(r,f),w={};s.bp("/2013-04-01/delegationset/{Id}"),s.p("Id",()=>r.Id,"{Id}",!1);let h;return s.m("DELETE").h(w).b(h),s.build()},nQ=async(r,f)=>{const s=O.requestBuilder(r,f),w={};s.bp("/2013-04-01/trafficpolicy/{Id}/{Version}"),s.p("Id",()=>r.Id,"{Id}",!1),s.p("Version",()=>r.Version.toString(),"{Version}",!1);let h;return s.m("DELETE").h(w).b(h),s.build()},oQ=async(r,f)=>{const s=O.requestBuilder(r,f),w={};s.bp("/2013-04-01/trafficpolicyinstance/{Id}"),s.p("Id",()=>r.Id,"{Id}",!1);let h;return s.m("DELETE").h(w).b(h),s.build()},aQ=async(r,f)=>{const s=O.requestBuilder(r,f),w={"content-type":"application/xml"};s.bp("/2013-04-01/hostedzone/{HostedZoneId}/deauthorizevpcassociation"),s.p("HostedZoneId",()=>r.HostedZoneId,"{HostedZoneId}",!1);let h;h=Hr;const E=new H(Fa);if(E.a("xmlns","https://route53.amazonaws.com/doc/2013-04-01/"),r[Rr]!=null)E.c(oE(r[Rr],f).n(Rr));return h+=E.toString(),s.m("POST").h(w).b(h),s.build()},pQ=async(r,f)=>{const s=O.requestBuilder(r,f),w={};s.bp("/2013-04-01/hostedzone/{HostedZoneId}/disable-dnssec"),s.p("HostedZoneId",()=>r.HostedZoneId,"{HostedZoneId}",!1);let h;return s.m("POST").h(w).b(h),s.build()},uQ=async(r,f)=>{const s=O.requestBuilder(r,f),w={"content-type":"application/xml"};s.bp("/2013-04-01/hostedzone/{HostedZoneId}/disassociatevpc"),s.p("HostedZoneId",()=>r.HostedZoneId,"{HostedZoneId}",!1);let h;h=Hr;const E=new H(Ta);if(E.a("xmlns","https://route53.amazonaws.com/doc/2013-04-01/"),r[Ur]!=null)E.c(H.of(Ua,r[Ur]).n(Ur));if(r[Rr]!=null)E.c(oE(r[Rr],f).n(Rr));return h+=E.toString(),s.m("POST").h(w).b(h),s.build()},tQ=async(r,f)=>{const s=O.requestBuilder(r,f),w={};s.bp("/2013-04-01/hostedzone/{HostedZoneId}/enable-dnssec"),s.p("HostedZoneId",()=>r.HostedZoneId,"{HostedZoneId}",!1);let h;return s.m("POST").h(w).b(h),s.build()},rB=async(r,f)=>{const s=O.requestBuilder(r,f),w={};s.bp("/2013-04-01/accountlimit/{Type}"),s.p("Type",()=>r.Type,"{Type}",!1);let h;return s.m("GET").h(w).b(h),s.build()},sB=async(r,f)=>{const s=O.requestBuilder(r,f),w={};s.bp("/2013-04-01/change/{Id}"),s.p("Id",()=>r.Id,"{Id}",!1);let h;return s.m("GET").h(w).b(h),s.build()},fB=async(r,f)=>{const s=O.requestBuilder(r,f),w={};s.bp("/2013-04-01/checkeripranges");let h;return s.m("GET").h(w).b(h),s.build()},wB=async(r,f)=>{const s=O.requestBuilder(r,f),w={};s.bp("/2013-04-01/hostedzone/{HostedZoneId}/dnssec"),s.p("HostedZoneId",()=>r.HostedZoneId,"{HostedZoneId}",!1);let h;return s.m("GET").h(w).b(h),s.build()},hB=async(r,f)=>{const s=O.requestBuilder(r,f),w={};s.bp("/2013-04-01/geolocation");const h=P({[aa]:[,r[w0]],[pa]:[,r[h0]],[Fp]:[,r[$0]]});let E;return s.m("GET").h(w).q(h).b(E),s.build()},EB=async(r,f)=>{const s=O.requestBuilder(r,f),w={};s.bp("/2013-04-01/healthcheck/{HealthCheckId}"),s.p("HealthCheckId",()=>r.HealthCheckId,"{HealthCheckId}",!1);let h;return s.m("GET").h(w).b(h),s.build()},$B=async(r,f)=>{const s=O.requestBuilder(r,f),w={};s.bp("/2013-04-01/healthcheckcount");let h;return s.m("GET").h(w).b(h),s.build()},IB=async(r,f)=>{const s=O.requestBuilder(r,f),w={};s.bp("/2013-04-01/healthcheck/{HealthCheckId}/lastfailurereason"),s.p("HealthCheckId",()=>r.HealthCheckId,"{HealthCheckId}",!1);let h;return s.m("GET").h(w).b(h),s.build()},FB=async(r,f)=>{const s=O.requestBuilder(r,f),w={};s.bp("/2013-04-01/healthcheck/{HealthCheckId}/status"),s.p("HealthCheckId",()=>r.HealthCheckId,"{HealthCheckId}",!1);let h;return s.m("GET").h(w).b(h),s.build()},UB=async(r,f)=>{const s=O.requestBuilder(r,f),w={};s.bp("/2013-04-01/hostedzone/{Id}"),s.p("Id",()=>r.Id,"{Id}",!1);let h;return s.m("GET").h(w).b(h),s.build()},TB=async(r,f)=>{const s=O.requestBuilder(r,f),w={};s.bp("/2013-04-01/hostedzonecount");let h;return s.m("GET").h(w).b(h),s.build()},GB=async(r,f)=>{const s=O.requestBuilder(r,f),w={};s.bp("/2013-04-01/hostedzonelimit/{HostedZoneId}/{Type}"),s.p("Type",()=>r.Type,"{Type}",!1),s.p("HostedZoneId",()=>r.HostedZoneId,"{HostedZoneId}",!1);let h;return s.m("GET").h(w).b(h),s.build()},CB=async(r,f)=>{const s=O.requestBuilder(r,f),w={};s.bp("/2013-04-01/queryloggingconfig/{Id}"),s.p("Id",()=>r.Id,"{Id}",!1);let h;return s.m("GET").h(w).b(h),s.build()},LB=async(r,f)=>{const s=O.requestBuilder(r,f),w={};s.bp("/2013-04-01/delegationset/{Id}"),s.p("Id",()=>r.Id,"{Id}",!1);let h;return s.m("GET").h(w).b(h),s.build()},AB=async(r,f)=>{const s=O.requestBuilder(r,f),w={};s.bp("/2013-04-01/reusabledelegationsetlimit/{DelegationSetId}/{Type}"),s.p("Type",()=>r.Type,"{Type}",!1),s.p("DelegationSetId",()=>r.DelegationSetId,"{DelegationSetId}",!1);let h;return s.m("GET").h(w).b(h),s.build()},RB=async(r,f)=>{const s=O.requestBuilder(r,f),w={};s.bp("/2013-04-01/trafficpolicy/{Id}/{Version}"),s.p("Id",()=>r.Id,"{Id}",!1),s.p("Version",()=>r.Version.toString(),"{Version}",!1);let h;return s.m("GET").h(w).b(h),s.build()},WB=async(r,f)=>{const s=O.requestBuilder(r,f),w={};s.bp("/2013-04-01/trafficpolicyinstance/{Id}"),s.p("Id",()=>r.Id,"{Id}",!1);let h;return s.m("GET").h(w).b(h),s.build()},zB=async(r,f)=>{const s=O.requestBuilder(r,f),w={};s.bp("/2013-04-01/trafficpolicyinstancecount");let h;return s.m("GET").h(w).b(h),s.build()},SB=async(r,f)=>{const s=O.requestBuilder(r,f),w={};s.bp("/2013-04-01/cidrcollection/{CollectionId}/cidrblocks"),s.p("CollectionId",()=>r.CollectionId,"{CollectionId}",!1);const h=P({[I0]:[,r[ar]],[w1]:[,r[Xr]],[r$]:[()=>r.MaxResults!==void 0,()=>r[uE].toString()]});let E;return s.m("GET").h(w).q(h).b(E),s.build()},PB=async(r,f)=>{const s=O.requestBuilder(r,f),w={};s.bp("/2013-04-01/cidrcollection");const h=P({[w1]:[,r[Xr]],[r$]:[()=>r.MaxResults!==void 0,()=>r[uE].toString()]});let E;return s.m("GET").h(w).q(h).b(E),s.build()},XB=async(r,f)=>{const s=O.requestBuilder(r,f),w={};s.bp("/2013-04-01/cidrcollection/{CollectionId}"),s.p("CollectionId",()=>r.CollectionId,"{CollectionId}",!1);const h=P({[w1]:[,r[Xr]],[r$]:[()=>r.MaxResults!==void 0,()=>r[uE].toString()]});let E;return s.m("GET").h(w).q(h).b(E),s.build()},YB=async(r,f)=>{const s=O.requestBuilder(r,f),w={};s.bp("/2013-04-01/geolocations");const h=P({[Up]:[,r[Na]],[Tp]:[,r[ya]],[Gp]:[,r[Oa]],[_s]:[()=>r.MaxItems!==void 0,()=>r[a].toString()]});let E;return s.m("GET").h(w).q(h).b(E),s.build()},KB=async(r,f)=>{const s=O.requestBuilder(r,f),w={};s.bp("/2013-04-01/healthcheck");const h=P({[O6]:[,r[ds]],[_s]:[()=>r.MaxItems!==void 0,()=>r[a].toString()]});let E;return s.m("GET").h(w).q(h).b(E),s.build()},ZB=async(r,f)=>{const s=O.requestBuilder(r,f),w={};s.bp("/2013-04-01/hostedzone");const h=P({[O6]:[,r[ds]],[_s]:[()=>r.MaxItems!==void 0,()=>r[a].toString()],[ua]:[,r[O2]],[fp]:[,r[Pa]]});let E;return s.m("GET").h(w).q(h).b(E),s.build()},MB=async(r,f)=>{const s=O.requestBuilder(r,f),w={};s.bp("/2013-04-01/hostedzonesbyname");const h=P({[ta]:[,r[Gf]],[tE]:[,r[sr]],[_s]:[()=>r.MaxItems!==void 0,()=>r[a].toString()]});let E;return s.m("GET").h(w).q(h).b(E),s.build()},JB=async(r,f)=>{const s=O.requestBuilder(r,f),w={};s.bp("/2013-04-01/hostedzonesbyvpc");const h=P({[Rp]:[,y(r[eE],"VPCId")],[zp]:[,y(r[nE],"VPCRegion")],[_s]:[()=>r.MaxItems!==void 0,()=>r[a].toString()],[w1]:[,r[Xr]]});let E;return s.m("GET").h(w).q(h).b(E),s.build()},QB=async(r,f)=>{const s=O.requestBuilder(r,f),w={};s.bp("/2013-04-01/queryloggingconfig");const h=P({[tE]:[,r[sr]],[w1]:[,r[Xr]],[r$]:[()=>r.MaxResults!==void 0,()=>r[uE].toString()]});let E;return s.m("GET").h(w).q(h).b(E),s.build()},BB=async(r,f)=>{const s=O.requestBuilder(r,f),w={};s.bp("/2013-04-01/hostedzone/{HostedZoneId}/rrset"),s.p("HostedZoneId",()=>r.HostedZoneId,"{HostedZoneId}",!1);const h=P({[hp]:[,r[ia]],[Cp]:[,r[da]],[wp]:[,r[ja]],[_s]:[()=>r.MaxItems!==void 0,()=>r[a].toString()]});let E;return s.m("GET").h(w).q(h).b(E),s.build()},lB=async(r,f)=>{const s=O.requestBuilder(r,f),w={};s.bp("/2013-04-01/delegationset");const h=P({[O6]:[,r[ds]],[_s]:[()=>r.MaxItems!==void 0,()=>r[a].toString()]});let E;return s.m("GET").h(w).q(h).b(E),s.build()},VB=async(r,f)=>{const s=O.requestBuilder(r,f),w={};s.bp("/2013-04-01/tags/{ResourceType}/{ResourceId}"),s.p("ResourceType",()=>r.ResourceType,"{ResourceType}",!1),s.p("ResourceId",()=>r.ResourceId,"{ResourceId}",!1);let h;return s.m("GET").h(w).b(h),s.build()},HB=async(r,f)=>{const s=O.requestBuilder(r,f),w={"content-type":"application/xml"};s.bp("/2013-04-01/tags/{ResourceType}"),s.p("ResourceType",()=>r.ResourceType,"{ResourceType}",!1);let h;h=Hr;const E=new H(Ya);return E.a("xmlns","https://route53.amazonaws.com/doc/2013-04-01/"),E.lc(r,"ResourceIds","ResourceIds",()=>jn(r[Ja],f)),h+=E.toString(),s.m("POST").h(w).b(h),s.build()},DB=async(r,f)=>{const s=O.requestBuilder(r,f),w={};s.bp("/2013-04-01/trafficpolicies");const h=P({[Lp]:[,r[a2]],[_s]:[()=>r.MaxItems!==void 0,()=>r[a].toString()]});let E;return s.m("GET").h(w).q(h).b(E),s.build()},kB=async(r,f)=>{const s=O.requestBuilder(r,f),w={};s.bp("/2013-04-01/trafficpolicyinstances");const h=P({[tE]:[,r[Ew]],[b6]:[,r[Os]],[c6]:[,r[bs]],[_s]:[()=>r.MaxItems!==void 0,()=>r[a].toString()]});let E;return s.m("GET").h(w).q(h).b(E),s.build()},NB=async(r,f)=>{const s=O.requestBuilder(r,f),w={};s.bp("/2013-04-01/trafficpolicyinstances/hostedzone");const h=P({[SV]:[,y(r[sr],"HostedZoneId")],[b6]:[,r[Os]],[c6]:[,r[bs]],[_s]:[()=>r.MaxItems!==void 0,()=>r[a].toString()]});let E;return s.m("GET").h(w).q(h).b(E),s.build()},yB=async(r,f)=>{const s=O.requestBuilder(r,f),w={};s.bp("/2013-04-01/trafficpolicyinstances/trafficpolicy");const h=P({[SV]:[,y(r[s1],"TrafficPolicyId")],[Wp]:[y(r.TrafficPolicyVersion,"TrafficPolicyVersion")!=null,()=>r[is].toString()],[tE]:[,r[Ew]],[b6]:[,r[Os]],[c6]:[,r[bs]],[_s]:[()=>r.MaxItems!==void 0,()=>r[a].toString()]});let E;return s.m("GET").h(w).q(h).b(E),s.build()},qB=async(r,f)=>{const s=O.requestBuilder(r,f),w={};s.bp("/2013-04-01/trafficpolicies/{Id}/versions"),s.p("Id",()=>r.Id,"{Id}",!1);const h=P({[Ap]:[,r[p2]],[_s]:[()=>r.MaxItems!==void 0,()=>r[a].toString()]});let E;return s.m("GET").h(w).q(h).b(E),s.build()},mB=async(r,f)=>{const s=O.requestBuilder(r,f),w={};s.bp("/2013-04-01/hostedzone/{HostedZoneId}/authorizevpcassociation"),s.p("HostedZoneId",()=>r.HostedZoneId,"{HostedZoneId}",!1);const h=P({[w1]:[,r[Xr]],[r$]:[()=>r.MaxResults!==void 0,()=>r[uE].toString()]});let E;return s.m("GET").h(w).q(h).b(E),s.build()},vB=async(r,f)=>{const s=O.requestBuilder(r,f),w={};s.bp("/2013-04-01/testdnsanswer");const h=P({[tE]:[,y(r[sr],"HostedZoneId")],[Ep]:[,y(r[e2],"RecordName")],[$p]:[,y(r[n2],"RecordType")],[Ip]:[,r[Ma]],[rp]:[,r[Ga]],[sp]:[,r[Ca]]});let E;return s.m("GET").h(w).q(h).b(E),s.build()},jB=async(r,f)=>{const s=O.requestBuilder(r,f),w={"content-type":"application/xml"};s.bp("/2013-04-01/healthcheck/{HealthCheckId}"),s.p("HealthCheckId",()=>r.HealthCheckId,"{HealthCheckId}",!1);let h;h=Hr;const E=new H(ga);if(E.a("xmlns","https://route53.amazonaws.com/doc/2013-04-01/"),r[f0]!=null)E.c(hV(r[f0],f).n(f0));if(E.lc(r,"ChildHealthChecks","ChildHealthChecks",()=>EV(r[Nw],f)),r[Ef]!=null)E.c(H.of(Ef,String(r[Ef])).n(Ef));if(r[$f]!=null)E.c(H.of($f,String(r[$f])).n($f));if(r[If]!=null)E.c(H.of(If,String(r[If])).n(If));if(E.cc(r,dE),r[mw]!=null)E.c(H.of(mw,String(r[mw])).n(mw));if(r[Ff]!=null)E.c(H.of(Ff,String(r[Ff])).n(Ff));if(E.cc(r,$w),E.cc(r,cE),r[Uf]!=null)E.c(H.of(Uf,String(r[Uf])).n(Uf));if(r[Tf]!=null)E.c(H.of(Tf,String(r[Tf])).n(Tf));return E.lc(r,"Regions","Regions",()=>$V(r[yw],f)),E.lc(r,"ResetElements","ResetElements",()=>Dn(r[Za],f)),E.cc(r,_E),E.cc(r,xE),h+=E.toString(),s.m("POST").h(w).b(h),s.build()},iB=async(r,f)=>{const s=O.requestBuilder(r,f),w={"content-type":"application/xml"};s.bp("/2013-04-01/hostedzone/{Id}"),s.p("Id",()=>r.Id,"{Id}",!1);let h;h=Hr;const E=new H(xa);if(E.a("xmlns","https://route53.amazonaws.com/doc/2013-04-01/"),r[Ur]!=null)E.c(H.of(i6,r[Ur]).n(Ur));return h+=E.toString(),s.m("POST").h(w).b(h),s.build()},dB=async(r,f)=>{const s=O.requestBuilder(r,f),w={"content-type":"application/xml"};s.bp("/2013-04-01/trafficpolicy/{Id}/{Version}"),s.p("Id",()=>r.Id,"{Id}",!1),s.p("Version",()=>r.Version.toString(),"{Version}",!1);let h;h=Hr;const E=new H(ea);if(E.a("xmlns","https://route53.amazonaws.com/doc/2013-04-01/"),r[Ur]!=null)E.c(H.of(d6,r[Ur]).n(Ur));return h+=E.toString(),s.m("POST").h(w).b(h),s.build()},OB=async(r,f)=>{const s=O.requestBuilder(r,f),w={"content-type":"application/xml"};s.bp("/2013-04-01/trafficpolicyinstance/{Id}"),s.p("Id",()=>r.Id,"{Id}",!1);let h;h=Hr;const E=new H(na);if(E.a("xmlns","https://route53.amazonaws.com/doc/2013-04-01/"),r[jr]!=null)E.c(H.of(jr,String(r[jr])).n(jr));if(E.cc(r,s1),r[is]!=null)E.c(H.of(is,String(r[is])).n(is));return h+=E.toString(),s.m("POST").h(w).b(h),s.build()},bB=async(r,f)=>{if(r.statusCode!==200&&r.statusCode>=300)return b(r,f);const s=P({$metadata:J(r)}),w=y(d(await _.parseXmlBody(r.body,f)),"body");if(w[wr]!=null)s[wr]=cs(w[wr],f);return s},cB=async(r,f)=>{if(r.statusCode!==200&&r.statusCode>=300)return b(r,f);const s=P({$metadata:J(r)}),w=y(d(await _.parseXmlBody(r.body,f)),"body");if(w[wr]!=null)s[wr]=cs(w[wr],f);return s},_B=async(r,f)=>{if(r.statusCode!==200&&r.statusCode>=300)return b(r,f);const s=P({$metadata:J(r)}),w=y(d(await _.parseXmlBody(r.body,f)),"body");if(w[Gr]!=null)s[Gr]=T(w[Gr]);return s},gB=async(r,f)=>{if(r.statusCode!==200&&r.statusCode>=300)return b(r,f);const s=P({$metadata:J(r)}),w=y(d(await _.parseXmlBody(r.body,f)),"body");if(w[wr]!=null)s[wr]=cs(w[wr],f);return s},xB=async(r,f)=>{if(r.statusCode!==200&&r.statusCode>=300)return b(r,f);const s=P({$metadata:J(r)});return await gr(r.body,f),s},eB=async(r,f)=>{if(r.statusCode!==201&&r.statusCode>=300)return b(r,f);const s=P({$metadata:J(r),[V0]:[,r.headers[I0]]}),w=y(d(await _.parseXmlBody(r.body,f)),"body");if(w[vG]!=null)s[vG]=en(w[vG],f);return s},nB=async(r,f)=>{if(r.statusCode!==201&&r.statusCode>=300)return b(r,f);const s=P({$metadata:J(r),[V0]:[,r.headers[I0]]}),w=y(d(await _.parseXmlBody(r.body,f)),"body");if(w[Cf]!=null)s[Cf]=sF(w[Cf],f);return s},oB=async(r,f)=>{if(r.statusCode!==201&&r.statusCode>=300)return b(r,f);const s=P({$metadata:J(r),[V0]:[,r.headers[I0]]}),w=y(d(await _.parseXmlBody(r.body,f)),"body");if(w[wr]!=null)s[wr]=cs(w[wr],f);if(w[Ts]!=null)s[Ts]=aE(w[Ts],f);if(w[Ss]!=null)s[Ss]=fF(w[Ss],f);if(w[Rr]!=null)s[Rr]=v6(w[Rr],f);return s},aB=async(r,f)=>{if(r.statusCode!==201&&r.statusCode>=300)return b(r,f);const s=P({$metadata:J(r),[V0]:[,r.headers[I0]]}),w=y(d(await _.parseXmlBody(r.body,f)),"body");if(w[wr]!=null)s[wr]=cs(w[wr],f);if(w[pG]!=null)s[pG]=TV(w[pG],f);return s},pB=async(r,f)=>{if(r.statusCode!==201&&r.statusCode>=300)return b(r,f);const s=P({$metadata:J(r),[V0]:[,r.headers[I0]]}),w=y(d(await _.parseXmlBody(r.body,f)),"body");if(w[Iw]!=null)s[Iw]=q6(w[Iw],f);return s},uB=async(r,f)=>{if(r.statusCode!==201&&r.statusCode>=300)return b(r,f);const s=P({$metadata:J(r),[V0]:[,r.headers[I0]]}),w=y(d(await _.parseXmlBody(r.body,f)),"body");if(w[Ts]!=null)s[Ts]=aE(w[Ts],f);return s},tB=async(r,f)=>{if(r.statusCode!==201&&r.statusCode>=300)return b(r,f);const s=P({$metadata:J(r),[V0]:[,r.headers[I0]]}),w=y(d(await _.parseXmlBody(r.body,f)),"body");if(w[Gs]!=null)s[Gs]=pE(w[Gs],f);return s},rl=async(r,f)=>{if(r.statusCode!==201&&r.statusCode>=300)return b(r,f);const s=P({$metadata:J(r),[V0]:[,r.headers[I0]]}),w=y(d(await _.parseXmlBody(r.body,f)),"body");if(w[Es]!=null)s[Es]=wF(w[Es],f);return s},sl=async(r,f)=>{if(r.statusCode!==201&&r.statusCode>=300)return b(r,f);const s=P({$metadata:J(r),[V0]:[,r.headers[I0]]}),w=y(d(await _.parseXmlBody(r.body,f)),"body");if(w[Gs]!=null)s[Gs]=pE(w[Gs],f);return s},fl=async(r,f)=>{if(r.statusCode!==200&&r.statusCode>=300)return b(r,f);const s=P({$metadata:J(r)}),w=y(d(await _.parseXmlBody(r.body,f)),"body");if(w[sr]!=null)s[sr]=T(w[sr]);if(w[Rr]!=null)s[Rr]=v6(w[Rr],f);return s},wl=async(r,f)=>{if(r.statusCode!==200&&r.statusCode>=300)return b(r,f);const s=P({$metadata:J(r)}),w=y(d(await _.parseXmlBody(r.body,f)),"body");if(w[wr]!=null)s[wr]=cs(w[wr],f);return s},hl=async(r,f)=>{if(r.statusCode!==200&&r.statusCode>=300)return b(r,f);const s=P({$metadata:J(r)});return await gr(r.body,f),s},El=async(r,f)=>{if(r.statusCode!==200&&r.statusCode>=300)return b(r,f);const s=P({$metadata:J(r)});return await gr(r.body,f),s},$l=async(r,f)=>{if(r.statusCode!==200&&r.statusCode>=300)return b(r,f);const s=P({$metadata:J(r)}),w=y(d(await _.parseXmlBody(r.body,f)),"body");if(w[wr]!=null)s[wr]=cs(w[wr],f);return s},Il=async(r,f)=>{if(r.statusCode!==200&&r.statusCode>=300)return b(r,f);const s=P({$metadata:J(r)}),w=y(d(await _.parseXmlBody(r.body,f)),"body");if(w[wr]!=null)s[wr]=cs(w[wr],f);return s},Fl=async(r,f)=>{if(r.statusCode!==200&&r.statusCode>=300)return b(r,f);const s=P({$metadata:J(r)});return await gr(r.body,f),s},Ul=async(r,f)=>{if(r.statusCode!==200&&r.statusCode>=300)return b(r,f);const s=P({$metadata:J(r)});return await gr(r.body,f),s},Tl=async(r,f)=>{if(r.statusCode!==200&&r.statusCode>=300)return b(r,f);const s=P({$metadata:J(r)});return await gr(r.body,f),s},Gl=async(r,f)=>{if(r.statusCode!==200&&r.statusCode>=300)return b(r,f);const s=P({$metadata:J(r)});return await gr(r.body,f),s},Cl=async(r,f)=>{if(r.statusCode!==200&&r.statusCode>=300)return b(r,f);const s=P({$metadata:J(r)});return await gr(r.body,f),s},Ll=async(r,f)=>{if(r.statusCode!==200&&r.statusCode>=300)return b(r,f);const s=P({$metadata:J(r)}),w=y(d(await _.parseXmlBody(r.body,f)),"body");if(w[wr]!=null)s[wr]=cs(w[wr],f);return s},Al=async(r,f)=>{if(r.statusCode!==200&&r.statusCode>=300)return b(r,f);const s=P({$metadata:J(r)}),w=y(d(await _.parseXmlBody(r.body,f)),"body");if(w[wr]!=null)s[wr]=cs(w[wr],f);return s},Rl=async(r,f)=>{if(r.statusCode!==200&&r.statusCode>=300)return b(r,f);const s=P({$metadata:J(r)}),w=y(d(await _.parseXmlBody(r.body,f)),"body");if(w[wr]!=null)s[wr]=cs(w[wr],f);return s},Wl=async(r,f)=>{if(r.statusCode!==200&&r.statusCode>=300)return b(r,f);const s=P({$metadata:J(r)}),w=y(d(await _.parseXmlBody(r.body,f)),"body");if(w[M0]!=null)s[M0]=xr(w[M0]);if(w[Q0]!=null)s[Q0]=dn(w[Q0],f);return s},zl=async(r,f)=>{if(r.statusCode!==200&&r.statusCode>=300)return b(r,f);const s=P({$metadata:J(r)}),w=y(d(await _.parseXmlBody(r.body,f)),"body");if(w[wr]!=null)s[wr]=cs(w[wr],f);return s},Sl=async(r,f)=>{if(r.statusCode!==200&&r.statusCode>=300)return b(r,f);const s=P({$metadata:J(r)}),w=y(d(await _.parseXmlBody(r.body,f)),"body");if(w.CheckerIpRanges==="")s[ZE]=[];else if(w[ZE]!=null&&w[ZE][Lf]!=null)s[ZE]=cn(Cr(w[ZE][Lf]),f);return s},Pl=async(r,f)=>{if(r.statusCode!==200&&r.statusCode>=300)return b(r,f);const s=P({$metadata:J(r)}),w=y(d(await _.parseXmlBody(r.body,f)),"body");if(w.KeySigningKeys==="")s[HE]=[];else if(w[HE]!=null&&w[HE][Lf]!=null)s[HE]=zo(Cr(w[HE][Lf]),f);if(w[hs]!=null)s[hs]=wo(w[hs],f);return s},Xl=async(r,f)=>{if(r.statusCode!==200&&r.statusCode>=300)return b(r,f);const s=P({$metadata:J(r)}),w=y(d(await _.parseXmlBody(r.body,f)),"body");if(w[OE]!=null)s[OE]=IV(w[OE],f);return s},Yl=async(r,f)=>{if(r.statusCode!==200&&r.statusCode>=300)return b(r,f);const s=P({$metadata:J(r)}),w=y(d(await _.parseXmlBody(r.body,f)),"body");if(w[Cf]!=null)s[Cf]=sF(w[Cf],f);return s},Kl=async(r,f)=>{if(r.statusCode!==200&&r.statusCode>=300)return b(r,f);const s=P({$metadata:J(r)}),w=y(d(await _.parseXmlBody(r.body,f)),"body");if(w[eG]!=null)s[eG]=xr(w[eG]);return s},Zl=async(r,f)=>{if(r.statusCode!==200&&r.statusCode>=300)return b(r,f);const s=P({$metadata:J(r)}),w=y(d(await _.parseXmlBody(r.body,f)),"body");if(w.HealthCheckObservations==="")s[tf]=[];else if(w[tf]!=null&&w[tf][u2]!=null)s[tf]=FV(Cr(w[tf][u2]),f);return s},Ml=async(r,f)=>{if(r.statusCode!==200&&r.statusCode>=300)return b(r,f);const s=P({$metadata:J(r)}),w=y(d(await _.parseXmlBody(r.body,f)),"body");if(w.HealthCheckObservations==="")s[tf]=[];else if(w[tf]!=null&&w[tf][u2]!=null)s[tf]=FV(Cr(w[tf][u2]),f);return s},Jl=async(r,f)=>{if(r.statusCode!==200&&r.statusCode>=300)return b(r,f);const s=P({$metadata:J(r)}),w=y(d(await _.parseXmlBody(r.body,f)),"body");if(w[Ts]!=null)s[Ts]=aE(w[Ts],f);if(w[Ss]!=null)s[Ss]=fF(w[Ss],f);if(w.VPCs==="")s[s0]=[];else if(w[s0]!=null&&w[s0][Rr]!=null)s[s0]=LV(Cr(w[s0][Rr]),f);return s},Ql=async(r,f)=>{if(r.statusCode!==200&&r.statusCode>=300)return b(r,f);const s=P({$metadata:J(r)}),w=y(d(await _.parseXmlBody(r.body,f)),"body");if(w[nG]!=null)s[nG]=xr(w[nG]);return s},Bl=async(r,f)=>{if(r.statusCode!==200&&r.statusCode>=300)return b(r,f);const s=P({$metadata:J(r)}),w=y(d(await _.parseXmlBody(r.body,f)),"body");if(w[M0]!=null)s[M0]=xr(w[M0]);if(w[Q0]!=null)s[Q0]=Lo(w[Q0],f);return s},ll=async(r,f)=>{if(r.statusCode!==200&&r.statusCode>=300)return b(r,f);const s=P({$metadata:J(r)}),w=y(d(await _.parseXmlBody(r.body,f)),"body");if(w[Iw]!=null)s[Iw]=q6(w[Iw],f);return s},Vl=async(r,f)=>{if(r.statusCode!==200&&r.statusCode>=300)return b(r,f);const s=P({$metadata:J(r)}),w=y(d(await _.parseXmlBody(r.body,f)),"body");if(w[Ts]!=null)s[Ts]=aE(w[Ts],f);return s},Hl=async(r,f)=>{if(r.statusCode!==200&&r.statusCode>=300)return b(r,f);const s=P({$metadata:J(r)}),w=y(d(await _.parseXmlBody(r.body,f)),"body");if(w[M0]!=null)s[M0]=xr(w[M0]);if(w[Q0]!=null)s[Q0]=Bo(w[Q0],f);return s},Dl=async(r,f)=>{if(r.statusCode!==200&&r.statusCode>=300)return b(r,f);const s=P({$metadata:J(r)}),w=y(d(await _.parseXmlBody(r.body,f)),"body");if(w[Gs]!=null)s[Gs]=pE(w[Gs],f);return s},kl=async(r,f)=>{if(r.statusCode!==200&&r.statusCode>=300)return b(r,f);const s=P({$metadata:J(r)}),w=y(d(await _.parseXmlBody(r.body,f)),"body");if(w[Es]!=null)s[Es]=wF(w[Es],f);return s},Nl=async(r,f)=>{if(r.statusCode!==200&&r.statusCode>=300)return b(r,f);const s=P({$metadata:J(r)}),w=y(d(await _.parseXmlBody(r.body,f)),"body");if(w[D6]!=null)s[D6]=Er(w[D6]);return s},yl=async(r,f)=>{if(r.statusCode!==200&&r.statusCode>=300)return b(r,f);const s=P({$metadata:J(r)}),w=y(d(await _.parseXmlBody(r.body,f)),"body");if(w.CidrBlocks==="")s[YE]=[];else if(w[YE]!=null&&w[YE][Lf]!=null)s[YE]=gn(Cr(w[YE][Lf]),f);if(w[Xr]!=null)s[Xr]=T(w[Xr]);return s},ql=async(r,f)=>{if(r.statusCode!==200&&r.statusCode>=300)return b(r,f);const s=P({$metadata:J(r)}),w=y(d(await _.parseXmlBody(r.body,f)),"body");if(w.CidrCollections==="")s[KE]=[];else if(w[KE]!=null&&w[KE][Lf]!=null)s[KE]=an(Cr(w[KE][Lf]),f);if(w[Xr]!=null)s[Xr]=T(w[Xr]);return s},ml=async(r,f)=>{if(r.statusCode!==200&&r.statusCode>=300)return b(r,f);const s=P({$metadata:J(r)}),w=y(d(await _.parseXmlBody(r.body,f)),"body");if(w.CidrLocations==="")s[ME]=[];else if(w[ME]!=null&&w[ME][Lf]!=null)s[ME]=So(Cr(w[ME][Lf]),f);if(w[Xr]!=null)s[Xr]=T(w[Xr]);return s},vl=async(r,f)=>{if(r.statusCode!==200&&r.statusCode>=300)return b(r,f);const s=P({$metadata:J(r)}),w=y(d(await _.parseXmlBody(r.body,f)),"body");if(w.GeoLocationDetailsList==="")s[BE]=[];else if(w[BE]!=null&&w[BE][OE]!=null)s[BE]=$o(Cr(w[BE][OE]),f);if(w[Tr]!=null)s[Tr]=yr(w[Tr]);if(w[a]!=null)s[a]=Er(w[a]);if(w[f6]!=null)s[f6]=T(w[f6]);if(w[w6]!=null)s[w6]=T(w[w6]);if(w[U6]!=null)s[U6]=T(w[U6]);return s},jl=async(r,f)=>{if(r.statusCode!==200&&r.statusCode>=300)return b(r,f);const s=P({$metadata:J(r)}),w=y(d(await _.parseXmlBody(r.body,f)),"body");if(w.HealthChecks==="")s[lE]=[];else if(w[lE]!=null&&w[lE][Cf]!=null)s[lE]=Go(Cr(w[lE][Cf]),f);if(w[Tr]!=null)s[Tr]=yr(w[Tr]);if(w[ds]!=null)s[ds]=T(w[ds]);if(w[a]!=null)s[a]=Er(w[a]);if(w[B0]!=null)s[B0]=T(w[B0]);return s},il=async(r,f)=>{if(r.statusCode!==200&&r.statusCode>=300)return b(r,f);const s=P({$metadata:J(r)}),w=y(d(await _.parseXmlBody(r.body,f)),"body");if(w.HostedZones==="")s[r0]=[];else if(w[r0]!=null&&w[r0][Ss]!=null)s[r0]=UV(Cr(w[r0][Ss]),f);if(w[Tr]!=null)s[Tr]=yr(w[Tr]);if(w[ds]!=null)s[ds]=T(w[ds]);if(w[a]!=null)s[a]=Er(w[a]);if(w[B0]!=null)s[B0]=T(w[B0]);return s},dl=async(r,f)=>{if(r.statusCode!==200&&r.statusCode>=300)return b(r,f);const s=P({$metadata:J(r)}),w=y(d(await _.parseXmlBody(r.body,f)),"body");if(w[Gf]!=null)s[Gf]=T(w[Gf]);if(w[sr]!=null)s[sr]=T(w[sr]);if(w.HostedZones==="")s[r0]=[];else if(w[r0]!=null&&w[r0][Ss]!=null)s[r0]=UV(Cr(w[r0][Ss]),f);if(w[Tr]!=null)s[Tr]=yr(w[Tr]);if(w[a]!=null)s[a]=Er(w[a]);if(w[h6]!=null)s[h6]=T(w[h6]);if(w[E6]!=null)s[E6]=T(w[E6]);return s},Ol=async(r,f)=>{if(r.statusCode!==200&&r.statusCode>=300)return b(r,f);const s=P({$metadata:J(r)}),w=y(d(await _.parseXmlBody(r.body,f)),"body");if(w.HostedZoneSummaries==="")s[VE]=[];else if(w[VE]!=null&&w[VE][YQ]!=null)s[VE]=Ro(Cr(w[VE][YQ]),f);if(w[a]!=null)s[a]=Er(w[a]);if(w[Xr]!=null)s[Xr]=T(w[Xr]);return s},bl=async(r,f)=>{if(r.statusCode!==200&&r.statusCode>=300)return b(r,f);const s=P({$metadata:J(r)}),w=y(d(await _.parseXmlBody(r.body,f)),"body");if(w[Xr]!=null)s[Xr]=T(w[Xr]);if(w.QueryLoggingConfigs==="")s[kE]=[];else if(w[kE]!=null&&w[kE][Iw]!=null)s[kE]=Xo(Cr(w[kE][Iw]),f);return s},cl=async(r,f)=>{if(r.statusCode!==200&&r.statusCode>=300)return b(r,f);const s=P({$metadata:J(r)}),w=y(d(await _.parseXmlBody(r.body,f)),"body");if(w[Tr]!=null)s[Tr]=yr(w[Tr]);if(w[a]!=null)s[a]=Er(w[a]);if(w[$6]!=null)s[$6]=T(w[$6]);if(w[I6]!=null)s[I6]=T(w[I6]);if(w[F6]!=null)s[F6]=T(w[F6]);if(w.ResourceRecordSets==="")s[yE]=[];else if(w[yE]!=null&&w[yE][uh]!=null)s[yE]=Jo(Cr(w[yE][uh]),f);return s},_l=async(r,f)=>{if(r.statusCode!==200&&r.statusCode>=300)return b(r,f);const s=P({$metadata:J(r)}),w=y(d(await _.parseXmlBody(r.body,f)),"body");if(w.DelegationSets==="")s[JE]=[];else if(w[JE]!=null&&w[JE][Ts]!=null)s[JE]=ro(Cr(w[JE][Ts]),f);if(w[Tr]!=null)s[Tr]=yr(w[Tr]);if(w[ds]!=null)s[ds]=T(w[ds]);if(w[a]!=null)s[a]=Er(w[a]);if(w[B0]!=null)s[B0]=T(w[B0]);return s},gl=async(r,f)=>{if(r.statusCode!==200&&r.statusCode>=300)return b(r,f);const s=P({$metadata:J(r)}),w=y(d(await _.parseXmlBody(r.body,f)),"body");if(w[gE]!=null)s[gE]=CV(w[gE],f);return s},xl=async(r,f)=>{if(r.statusCode!==200&&r.statusCode>=300)return b(r,f);const s=P({$metadata:J(r)}),w=y(d(await _.parseXmlBody(r.body,f)),"body");if(w.ResourceTagSets==="")s[qE]=[];else if(w[qE]!=null&&w[qE][gE]!=null)s[qE]=Qo(Cr(w[qE][gE]),f);return s},el=async(r,f)=>{if(r.statusCode!==200&&r.statusCode>=300)return b(r,f);const s=P({$metadata:J(r)}),w=y(d(await _.parseXmlBody(r.body,f)),"body");if(w[Tr]!=null)s[Tr]=yr(w[Tr]);if(w[a]!=null)s[a]=Er(w[a]);if(w[a2]!=null)s[a2]=T(w[a2]);if(w.TrafficPolicySummaries==="")s[mE]=[];else if(w[mE]!=null&&w[mE][JQ]!=null)s[mE]=ko(Cr(w[mE][JQ]),f);return s},nl=async(r,f)=>{if(r.statusCode!==200&&r.statusCode>=300)return b(r,f);const s=P({$metadata:J(r)}),w=y(d(await _.parseXmlBody(r.body,f)),"body");if(w[Ew]!=null)s[Ew]=T(w[Ew]);if(w[Tr]!=null)s[Tr]=yr(w[Tr]);if(w[a]!=null)s[a]=Er(w[a]);if(w[Os]!=null)s[Os]=T(w[Os]);if(w[bs]!=null)s[bs]=T(w[bs]);if(w.TrafficPolicyInstances==="")s[ws]=[];else if(w[ws]!=null&&w[ws][Es]!=null)s[ws]=m6(Cr(w[ws][Es]),f);return s},ol=async(r,f)=>{if(r.statusCode!==200&&r.statusCode>=300)return b(r,f);const s=P({$metadata:J(r)}),w=y(d(await _.parseXmlBody(r.body,f)),"body");if(w[Tr]!=null)s[Tr]=yr(w[Tr]);if(w[a]!=null)s[a]=Er(w[a]);if(w[Os]!=null)s[Os]=T(w[Os]);if(w[bs]!=null)s[bs]=T(w[bs]);if(w.TrafficPolicyInstances==="")s[ws]=[];else if(w[ws]!=null&&w[ws][Es]!=null)s[ws]=m6(Cr(w[ws][Es]),f);return s},al=async(r,f)=>{if(r.statusCode!==200&&r.statusCode>=300)return b(r,f);const s=P({$metadata:J(r)}),w=y(d(await _.parseXmlBody(r.body,f)),"body");if(w[Ew]!=null)s[Ew]=T(w[Ew]);if(w[Tr]!=null)s[Tr]=yr(w[Tr]);if(w[a]!=null)s[a]=Er(w[a]);if(w[Os]!=null)s[Os]=T(w[Os]);if(w[bs]!=null)s[bs]=T(w[bs]);if(w.TrafficPolicyInstances==="")s[ws]=[];else if(w[ws]!=null&&w[ws][Es]!=null)s[ws]=m6(Cr(w[ws][Es]),f);return s},pl=async(r,f)=>{if(r.statusCode!==200&&r.statusCode>=300)return b(r,f);const s=P({$metadata:J(r)}),w=y(d(await _.parseXmlBody(r.body,f)),"body");if(w[Tr]!=null)s[Tr]=yr(w[Tr]);if(w[a]!=null)s[a]=Er(w[a]);if(w.TrafficPolicies==="")s[vE]=[];else if(w[vE]!=null&&w[vE][Gs]!=null)s[vE]=Do(Cr(w[vE][Gs]),f);if(w[p2]!=null)s[p2]=T(w[p2]);return s},ul=async(r,f)=>{if(r.statusCode!==200&&r.statusCode>=300)return b(r,f);const s=P({$metadata:J(r)}),w=y(d(await _.parseXmlBody(r.body,f)),"body");if(w[sr]!=null)s[sr]=T(w[sr]);if(w[Xr]!=null)s[Xr]=T(w[Xr]);if(w.VPCs==="")s[s0]=[];else if(w[s0]!=null&&w[s0][Rr]!=null)s[s0]=LV(Cr(w[s0][Rr]),f);return s},tl=async(r,f)=>{if(r.statusCode!==200&&r.statusCode>=300)return b(r,f);const s=P({$metadata:J(r)}),w=y(d(await _.parseXmlBody(r.body,f)),"body");if(w[T6]!=null)s[T6]=T(w[T6]);if(w[z6]!=null)s[z6]=T(w[z6]);if(w.RecordData==="")s[NE]=[];else if(w[NE]!=null&&w[NE][ZQ]!=null)s[NE]=Yo(Cr(w[NE][ZQ]),f);if(w[e2]!=null)s[e2]=T(w[e2]);if(w[n2]!=null)s[n2]=T(w[n2]);if(w[S6]!=null)s[S6]=T(w[S6]);return s},rV=async(r,f)=>{if(r.statusCode!==200&&r.statusCode>=300)return b(r,f);const s=P({$metadata:J(r)}),w=y(d(await _.parseXmlBody(r.body,f)),"body");if(w[Cf]!=null)s[Cf]=sF(w[Cf],f);return s},sV=async(r,f)=>{if(r.statusCode!==200&&r.statusCode>=300)return b(r,f);const s=P({$metadata:J(r)}),w=y(d(await _.parseXmlBody(r.body,f)),"body");if(w[Ss]!=null)s[Ss]=fF(w[Ss],f);return s},fV=async(r,f)=>{if(r.statusCode!==200&&r.statusCode>=300)return b(r,f);const s=P({$metadata:J(r)}),w=y(d(await _.parseXmlBody(r.body,f)),"body");if(w[Gs]!=null)s[Gs]=pE(w[Gs],f);return s},wV=async(r,f)=>{if(r.statusCode!==200&&r.statusCode>=300)return b(r,f);const s=P({$metadata:J(r)}),w=y(d(await _.parseXmlBody(r.body,f)),"body");if(w[Es]!=null)s[Es]=wF(w[Es],f);return s},b=async(r,f)=>{const s={...r,body:await _.parseXmlErrorBody(r.body,f)},w=_.loadRestXmlErrorCode(r,s.body);switch(w){case"ConcurrentModification":case"com.amazonaws.route53#ConcurrentModification":throw await Ie(s,f);case"InvalidInput":case"com.amazonaws.route53#InvalidInput":throw await Ve(s,f);case"InvalidKMSArn":case"com.amazonaws.route53#InvalidKMSArn":throw await ke(s,f);case"InvalidKeySigningKeyStatus":case"com.amazonaws.route53#InvalidKeySigningKeyStatus":throw await De(s,f);case"InvalidSigningStatus":case"com.amazonaws.route53#InvalidSigningStatus":throw await ye(s,f);case"NoSuchKeySigningKey":case"com.amazonaws.route53#NoSuchKeySigningKey":throw await pe(s,f);case"ConflictingDomainExists":case"com.amazonaws.route53#ConflictingDomainExists":throw await Fe(s,f);case"InvalidVPCId":case"com.amazonaws.route53#InvalidVPCId":throw await me(s,f);case"LimitsExceeded":case"com.amazonaws.route53#LimitsExceeded":throw await be(s,f);case"NoSuchHostedZone":case"com.amazonaws.route53#NoSuchHostedZone":throw await ae(s,f);case"NotAuthorizedException":case"com.amazonaws.route53#NotAuthorizedException":throw await sn(s,f);case"PriorRequestNotComplete":case"com.amazonaws.route53#PriorRequestNotComplete":throw await fn(s,f);case"PublicZoneVPCAssociation":case"com.amazonaws.route53#PublicZoneVPCAssociation":throw await wn(s,f);case"CidrBlockInUseException":case"com.amazonaws.route53#CidrBlockInUseException":throw await we(s,f);case"CidrCollectionVersionMismatchException":case"com.amazonaws.route53#CidrCollectionVersionMismatchException":throw await $e(s,f);case"NoSuchCidrCollectionException":case"com.amazonaws.route53#NoSuchCidrCollectionException":throw await _e(s,f);case"InvalidChangeBatch":case"com.amazonaws.route53#InvalidChangeBatch":throw await Be(s,f);case"NoSuchHealthCheck":case"com.amazonaws.route53#NoSuchHealthCheck":throw await oe(s,f);case"ThrottlingException":case"com.amazonaws.route53#ThrottlingException":throw await En(s,f);case"CidrCollectionAlreadyExistsException":case"com.amazonaws.route53#CidrCollectionAlreadyExistsException":throw await he(s,f);case"HealthCheckAlreadyExists":case"com.amazonaws.route53#HealthCheckAlreadyExists":throw await We(s,f);case"TooManyHealthChecks":case"com.amazonaws.route53#TooManyHealthChecks":throw await $n(s,f);case"DelegationSetNotAvailable":case"com.amazonaws.route53#DelegationSetNotAvailable":throw await Le(s,f);case"DelegationSetNotReusable":case"com.amazonaws.route53#DelegationSetNotReusable":throw await Ae(s,f);case"HostedZoneAlreadyExists":case"com.amazonaws.route53#HostedZoneAlreadyExists":throw await Pe(s,f);case"InvalidDomainName":case"com.amazonaws.route53#InvalidDomainName":throw await le(s,f);case"NoSuchDelegationSet":case"com.amazonaws.route53#NoSuchDelegationSet":throw await ee(s,f);case"TooManyHostedZones":case"com.amazonaws.route53#TooManyHostedZones":throw await In(s,f);case"InvalidArgument":case"com.amazonaws.route53#InvalidArgument":throw await Qe(s,f);case"InvalidKeySigningKeyName":case"com.amazonaws.route53#InvalidKeySigningKeyName":throw await He(s,f);case"KeySigningKeyAlreadyExists":case"com.amazonaws.route53#KeySigningKeyAlreadyExists":throw await ve(s,f);case"TooManyKeySigningKeys":case"com.amazonaws.route53#TooManyKeySigningKeys":throw await Fn(s,f);case"InsufficientCloudWatchLogsResourcePolicy":case"com.amazonaws.route53#InsufficientCloudWatchLogsResourcePolicy":throw await Je(s,f);case"NoSuchCloudWatchLogsLogGroup":case"com.amazonaws.route53#NoSuchCloudWatchLogsLogGroup":throw await xe(s,f);case"QueryLoggingConfigAlreadyExists":case"com.amazonaws.route53#QueryLoggingConfigAlreadyExists":throw await hn(s,f);case"DelegationSetAlreadyCreated":case"com.amazonaws.route53#DelegationSetAlreadyCreated":throw await Te(s,f);case"DelegationSetAlreadyReusable":case"com.amazonaws.route53#DelegationSetAlreadyReusable":throw await Ge(s,f);case"HostedZoneNotFound":case"com.amazonaws.route53#HostedZoneNotFound":throw await Ye(s,f);case"InvalidTrafficPolicyDocument":case"com.amazonaws.route53#InvalidTrafficPolicyDocument":throw await qe(s,f);case"TooManyTrafficPolicies":case"com.amazonaws.route53#TooManyTrafficPolicies":throw await Un(s,f);case"TrafficPolicyAlreadyExists":case"com.amazonaws.route53#TrafficPolicyAlreadyExists":throw await Ln(s,f);case"NoSuchTrafficPolicy":case"com.amazonaws.route53#NoSuchTrafficPolicy":throw await te(s,f);case"TooManyTrafficPolicyInstances":case"com.amazonaws.route53#TooManyTrafficPolicyInstances":throw await Tn(s,f);case"TrafficPolicyInstanceAlreadyExists":case"com.amazonaws.route53#TrafficPolicyInstanceAlreadyExists":throw await An(s,f);case"TooManyTrafficPolicyVersionsForCurrentPolicy":case"com.amazonaws.route53#TooManyTrafficPolicyVersionsForCurrentPolicy":throw await Gn(s,f);case"TooManyVPCAssociationAuthorizations":case"com.amazonaws.route53#TooManyVPCAssociationAuthorizations":throw await Cn(s,f);case"KeySigningKeyInParentDSRecord":case"com.amazonaws.route53#KeySigningKeyInParentDSRecord":throw await je(s,f);case"KeySigningKeyInUse":case"com.amazonaws.route53#KeySigningKeyInUse":throw await ie(s,f);case"CidrCollectionInUseException":case"com.amazonaws.route53#CidrCollectionInUseException":throw await Ee(s,f);case"HealthCheckInUse":case"com.amazonaws.route53#HealthCheckInUse":throw await ze(s,f);case"HostedZoneNotEmpty":case"com.amazonaws.route53#HostedZoneNotEmpty":throw await Xe(s,f);case"NoSuchQueryLoggingConfig":case"com.amazonaws.route53#NoSuchQueryLoggingConfig":throw await ue(s,f);case"DelegationSetInUse":case"com.amazonaws.route53#DelegationSetInUse":throw await Ce(s,f);case"TrafficPolicyInUse":case"com.amazonaws.route53#TrafficPolicyInUse":throw await Rn(s,f);case"NoSuchTrafficPolicyInstance":case"com.amazonaws.route53#NoSuchTrafficPolicyInstance":throw await rn(s,f);case"VPCAssociationAuthorizationNotFound":case"com.amazonaws.route53#VPCAssociationAuthorizationNotFound":throw await Wn(s,f);case"DNSSECNotFound":case"com.amazonaws.route53#DNSSECNotFound":throw await Re(s,f);case"LastVPCAssociation":case"com.amazonaws.route53#LastVPCAssociation":throw await Oe(s,f);case"VPCAssociationNotFound":case"com.amazonaws.route53#VPCAssociationNotFound":throw await zn(s,f);case"HostedZonePartiallyDelegated":case"com.amazonaws.route53#HostedZonePartiallyDelegated":throw await Ze(s,f);case"KeySigningKeyWithActiveStatusNotFound":case"com.amazonaws.route53#KeySigningKeyWithActiveStatusNotFound":throw await de(s,f);case"NoSuchChange":case"com.amazonaws.route53#NoSuchChange":throw await ce(s,f);case"NoSuchGeoLocation":case"com.amazonaws.route53#NoSuchGeoLocation":throw await ne(s,f);case"IncompatibleVersion":case"com.amazonaws.route53#IncompatibleVersion":throw await Me(s,f);case"HostedZoneNotPrivate":case"com.amazonaws.route53#HostedZoneNotPrivate":throw await Ke(s,f);case"NoSuchCidrLocationException":case"com.amazonaws.route53#NoSuchCidrLocationException":throw await ge(s,f);case"InvalidPaginationToken":case"com.amazonaws.route53#InvalidPaginationToken":throw await Ne(s,f);case"HealthCheckVersionMismatch":case"com.amazonaws.route53#HealthCheckVersionMismatch":throw await Se(s,f);case"ConflictingTypes":case"com.amazonaws.route53#ConflictingTypes":throw await Ue(s,f);default:const h=s.body;return fe({output:r,parsedBody:h.Error,errorCode:w})}},fe=mf(i),we=async(r,f)=>{const s=P({}),w=r.body.Error;if(w[Zr]!=null)s[Zr]=T(w[Zr]);const h=new qI({$metadata:J(r),...s});return D(h,r.body.Error)},he=async(r,f)=>{const s=P({}),w=r.body.Error;if(w[Zr]!=null)s[Zr]=T(w[Zr]);const h=new OI({$metadata:J(r),...s});return D(h,r.body.Error)},Ee=async(r,f)=>{const s=P({}),w=r.body.Error;if(w[Zr]!=null)s[Zr]=T(w[Zr]);const h=new W2({$metadata:J(r),...s});return D(h,r.body.Error)},$e=async(r,f)=>{const s=P({}),w=r.body.Error;if(w[Zr]!=null)s[Zr]=T(w[Zr]);const h=new mI({$metadata:J(r),...s});return D(h,r.body.Error)},Ie=async(r,f)=>{const s=P({}),w=r.body.Error;if(w[X]!=null)s[X]=T(w[X]);const h=new KI({$metadata:J(r),...s});return D(h,r.body.Error)},Fe=async(r,f)=>{const s=P({}),w=r.body.Error;if(w[X]!=null)s[X]=T(w[X]);const h=new lI({$metadata:J(r),...s});return D(h,r.body.Error)},Ue=async(r,f)=>{const s=P({}),w=r.body.Error;if(w[X]!=null)s[X]=T(w[X]);const h=new m2({$metadata:J(r),...s});return D(h,r.body.Error)},Te=async(r,f)=>{const s=P({}),w=r.body.Error;if(w[X]!=null)s[X]=T(w[X]);const h=new w2({$metadata:J(r),...s});return D(h,r.body.Error)},Ge=async(r,f)=>{const s=P({}),w=r.body.Error;if(w[X]!=null)s[X]=T(w[X]);const h=new h2({$metadata:J(r),...s});return D(h,r.body.Error)},Ce=async(r,f)=>{const s=P({}),w=r.body.Error;if(w[X]!=null)s[X]=T(w[X]);const h=new X2({$metadata:J(r),...s});return D(h,r.body.Error)},Le=async(r,f)=>{const s=P({}),w=r.body.Error;if(w[X]!=null)s[X]=T(w[X]);const h=new _I({$metadata:J(r),...s});return D(h,r.body.Error)},Ae=async(r,f)=>{const s=P({}),w=r.body.Error;if(w[X]!=null)s[X]=T(w[X]);const h=new gI({$metadata:J(r),...s});return D(h,r.body.Error)},Re=async(r,f)=>{const s=P({}),w=r.body.Error;if(w[X]!=null)s[X]=T(w[X]);const h=new M2({$metadata:J(r),...s});return D(h,r.body.Error)},We=async(r,f)=>{const s=P({}),w=r.body.Error;if(w[X]!=null)s[X]=T(w[X]);const h=new bI({$metadata:J(r),...s});return D(h,r.body.Error)},ze=async(r,f)=>{const s=P({}),w=r.body.Error;if(w[X]!=null)s[X]=T(w[X]);const h=new z2({$metadata:J(r),...s});return D(h,r.body.Error)},Se=async(r,f)=>{const s=P({}),w=r.body.Error;if(w[X]!=null)s[X]=T(w[X]);const h=new q2({$metadata:J(r),...s});return D(h,r.body.Error)},Pe=async(r,f)=>{const s=P({}),w=r.body.Error;if(w[X]!=null)s[X]=T(w[X]);const h=new xI({$metadata:J(r),...s});return D(h,r.body.Error)},Xe=async(r,f)=>{const s=P({}),w=r.body.Error;if(w[X]!=null)s[X]=T(w[X]);const h=new S2({$metadata:J(r),...s});return D(h,r.body.Error)},Ye=async(r,f)=>{const s=P({}),w=r.body.Error;if(w[X]!=null)s[X]=T(w[X]);const h=new E2({$metadata:J(r),...s});return D(h,r.body.Error)},Ke=async(r,f)=>{const s=P({}),w=r.body.Error;if(w[X]!=null)s[X]=T(w[X]);const h=new k2({$metadata:J(r),...s});return D(h,r.body.Error)},Ze=async(r,f)=>{const s=P({}),w=r.body.Error;if(w[X]!=null)s[X]=T(w[X]);const h=new B2({$metadata:J(r),...s});return D(h,r.body.Error)},Me=async(r,f)=>{const s=P({}),w=r.body.Error;if(w[X]!=null)s[X]=T(w[X]);const h=new D2({$metadata:J(r),...s});return D(h,r.body.Error)},Je=async(r,f)=>{const s=P({}),w=r.body.Error;if(w[X]!=null)s[X]=T(w[X]);const h=new r2({$metadata:J(r),...s});return D(h,r.body.Error)},Qe=async(r,f)=>{const s=P({}),w=r.body.Error;if(w[X]!=null)s[X]=T(w[X]);const h=new aI({$metadata:J(r),...s});return D(h,r.body.Error)},Be=async(r,f)=>{const s=P({}),w=r.body.Error;if(w[X]!=null)s[X]=T(w[X]);if(w.messages==="")s[iE]=[];else if(w[iE]!=null&&w[iE][Zr]!=null)s[iE]=ho(Cr(w[iE][Zr]),f);const h=new jI({$metadata:J(r),...s});return D(h,r.body.Error)},le=async(r,f)=>{const s=P({}),w=r.body.Error;if(w[X]!=null)s[X]=T(w[X]);const h=new eI({$metadata:J(r),...s});return D(h,r.body.Error)},Ve=async(r,f)=>{const s=P({}),w=r.body.Error;if(w[X]!=null)s[X]=T(w[X]);const h=new ZI({$metadata:J(r),...s});return D(h,r.body.Error)},He=async(r,f)=>{const s=P({}),w=r.body.Error;if(w[X]!=null)s[X]=T(w[X]);const h=new pI({$metadata:J(r),...s});return D(h,r.body.Error)},De=async(r,f)=>{const s=P({}),w=r.body.Error;if(w[X]!=null)s[X]=T(w[X]);const h=new MI({$metadata:J(r),...s});return D(h,r.body.Error)},ke=async(r,f)=>{const s=P({}),w=r.body.Error;if(w[X]!=null)s[X]=T(w[X]);const h=new JI({$metadata:J(r),...s});return D(h,r.body.Error)},Ne=async(r,f)=>{const s=P({}),w=r.body.Error;if(w[X]!=null)s[X]=T(w[X]);const h=new y2({$metadata:J(r),...s});return D(h,r.body.Error)},ye=async(r,f)=>{const s=P({}),w=r.body.Error;if(w[X]!=null)s[X]=T(w[X]);const h=new QI({$metadata:J(r),...s});return D(h,r.body.Error)},qe=async(r,f)=>{const s=P({}),w=r.body.Error;if(w[X]!=null)s[X]=T(w[X]);const h=new $2({$metadata:J(r),...s});return D(h,r.body.Error)},me=async(r,f)=>{const s=P({}),w=r.body.Error;if(w[X]!=null)s[X]=T(w[X]);const h=new VI({$metadata:J(r),...s});return D(h,r.body.Error)},ve=async(r,f)=>{const s=P({}),w=r.body.Error;if(w[X]!=null)s[X]=T(w[X]);const h=new uI({$metadata:J(r),...s});return D(h,r.body.Error)},je=async(r,f)=>{const s=P({}),w=r.body.Error;if(w[X]!=null)s[X]=T(w[X]);const h=new A2({$metadata:J(r),...s});return D(h,r.body.Error)},ie=async(r,f)=>{const s=P({}),w=r.body.Error;if(w[X]!=null)s[X]=T(w[X]);const h=new R2({$metadata:J(r),...s});return D(h,r.body.Error)},de=async(r,f)=>{const s=P({}),w=r.body.Error;if(w[X]!=null)s[X]=T(w[X]);const h=new l2({$metadata:J(r),...s});return D(h,r.body.Error)},Oe=async(r,f)=>{const s=P({}),w=r.body.Error;if(w[X]!=null)s[X]=T(w[X]);const h=new J2({$metadata:J(r),...s});return D(h,r.body.Error)},be=async(r,f)=>{const s=P({}),w=r.body.Error;if(w[X]!=null)s[X]=T(w[X]);const h=new HI({$metadata:J(r),...s});return D(h,r.body.Error)},ce=async(r,f)=>{const s=P({}),w=r.body.Error;if(w[X]!=null)s[X]=T(w[X]);const h=new V2({$metadata:J(r),...s});return D(h,r.body.Error)},_e=async(r,f)=>{const s=P({}),w=r.body.Error;if(w[Zr]!=null)s[Zr]=T(w[Zr]);const h=new vI({$metadata:J(r),...s});return D(h,r.body.Error)},ge=async(r,f)=>{const s=P({}),w=r.body.Error;if(w[Zr]!=null)s[Zr]=T(w[Zr]);const h=new N2({$metadata:J(r),...s});return D(h,r.body.Error)},xe=async(r,f)=>{const s=P({}),w=r.body.Error;if(w[X]!=null)s[X]=T(w[X]);const h=new s2({$metadata:J(r),...s});return D(h,r.body.Error)},ee=async(r,f)=>{const s=P({}),w=r.body.Error;if(w[X]!=null)s[X]=T(w[X]);const h=new nI({$metadata:J(r),...s});return D(h,r.body.Error)},ne=async(r,f)=>{const s=P({}),w=r.body.Error;if(w[X]!=null)s[X]=T(w[X]);const h=new H2({$metadata:J(r),...s});return D(h,r.body.Error)},oe=async(r,f)=>{const s=P({}),w=r.body.Error;if(w[X]!=null)s[X]=T(w[X]);const h=new iI({$metadata:J(r),...s});return D(h,r.body.Error)},ae=async(r,f)=>{const s=P({}),w=r.body.Error;if(w[X]!=null)s[X]=T(w[X]);const h=new DI({$metadata:J(r),...s});return D(h,r.body.Error)},pe=async(r,f)=>{const s=P({}),w=r.body.Error;if(w[X]!=null)s[X]=T(w[X]);const h=new BI({$metadata:J(r),...s});return D(h,r.body.Error)},ue=async(r,f)=>{const s=P({}),w=r.body.Error;if(w[X]!=null)s[X]=T(w[X]);const h=new P2({$metadata:J(r),...s});return D(h,r.body.Error)},te=async(r,f)=>{const s=P({}),w=r.body.Error;if(w[X]!=null)s[X]=T(w[X]);const h=new U2({$metadata:J(r),...s});return D(h,r.body.Error)},rn=async(r,f)=>{const s=P({}),w=r.body.Error;if(w[X]!=null)s[X]=T(w[X]);const h=new K2({$metadata:J(r),...s});return D(h,r.body.Error)},sn=async(r,f)=>{const s=P({}),w=r.body.Error;if(w[X]!=null)s[X]=T(w[X]);const h=new kI({$metadata:J(r),...s});return D(h,r.body.Error)},fn=async(r,f)=>{const s=P({}),w=r.body.Error;if(w[X]!=null)s[X]=T(w[X]);const h=new NI({$metadata:J(r),...s});return D(h,r.body.Error)},wn=async(r,f)=>{const s=P({}),w=r.body.Error;if(w[X]!=null)s[X]=T(w[X]);const h=new yI({$metadata:J(r),...s});return D(h,r.body.Error)},hn=async(r,f)=>{const s=P({}),w=r.body.Error;if(w[X]!=null)s[X]=T(w[X]);const h=new f2({$metadata:J(r),...s});return D(h,r.body.Error)},En=async(r,f)=>{const s=P({}),w=r.body.Error;if(w[X]!=null)s[X]=T(w[X]);const h=new dI({$metadata:J(r),...s});return D(h,r.body.Error)},$n=async(r,f)=>{const s=P({}),w=r.body.Error;if(w[X]!=null)s[X]=T(w[X]);const h=new cI({$metadata:J(r),...s});return D(h,r.body.Error)},In=async(r,f)=>{const s=P({}),w=r.body.Error;if(w[X]!=null)s[X]=T(w[X]);const h=new oI({$metadata:J(r),...s});return D(h,r.body.Error)},Fn=async(r,f)=>{const s=P({}),w=r.body.Error;if(w[X]!=null)s[X]=T(w[X]);const h=new tI({$metadata:J(r),...s});return D(h,r.body.Error)},Un=async(r,f)=>{const s=P({}),w=r.body.Error;if(w[X]!=null)s[X]=T(w[X]);const h=new I2({$metadata:J(r),...s});return D(h,r.body.Error)},Tn=async(r,f)=>{const s=P({}),w=r.body.Error;if(w[X]!=null)s[X]=T(w[X]);const h=new T2({$metadata:J(r),...s});return D(h,r.body.Error)},Gn=async(r,f)=>{const s=P({}),w=r.body.Error;if(w[X]!=null)s[X]=T(w[X]);const h=new C2({$metadata:J(r),...s});return D(h,r.body.Error)},Cn=async(r,f)=>{const s=P({}),w=r.body.Error;if(w[X]!=null)s[X]=T(w[X]);const h=new L2({$metadata:J(r),...s});return D(h,r.body.Error)},Ln=async(r,f)=>{const s=P({}),w=r.body.Error;if(w[X]!=null)s[X]=T(w[X]);const h=new F2({$metadata:J(r),...s});return D(h,r.body.Error)},An=async(r,f)=>{const s=P({}),w=r.body.Error;if(w[X]!=null)s[X]=T(w[X]);const h=new G2({$metadata:J(r),...s});return D(h,r.body.Error)},Rn=async(r,f)=>{const s=P({}),w=r.body.Error;if(w[X]!=null)s[X]=T(w[X]);const h=new Y2({$metadata:J(r),...s});return D(h,r.body.Error)},Wn=async(r,f)=>{const s=P({}),w=r.body.Error;if(w[X]!=null)s[X]=T(w[X]);const h=new Z2({$metadata:J(r),...s});return D(h,r.body.Error)},zn=async(r,f)=>{const s=P({}),w=r.body.Error;if(w[X]!=null)s[X]=T(w[X]);const h=new Q2({$metadata:J(r),...s});return D(h,r.body.Error)},hV=(r,f)=>{const s=new H(f0);if(r[ir]!=null)s.c(H.of(Ia,r[ir]).n(ir));if(r[n]!=null)s.c(H.of(qo,r[n]).n(n));return s},Sn=(r,f)=>{const s=new H(iw);if(r[sr]!=null)s.c(H.of(E0,r[sr]).n(sr));if(s.cc(r,Gf),r[eh]!=null)s.c(H.of(yo,String(r[eh])).n(eh));return s},Pn=(r,f)=>{const s=new H(RV);if(r[_h]!=null)s.c(H.of(io,r[_h]).n(_h));if(r[uh]!=null)s.c(yn(r[uh],f).n(uh));return s},Xn=(r,f)=>{const s=new H(i2);if(r[Ur]!=null)s.c(H.of(i6,r[Ur]).n(Ur));return s.lc(r,"Changes","Changes",()=>Yn(r[AV],f)),s},Yn=(r,f)=>{return r.filter((s)=>s!=null).map((s)=>{return Pn(s,f).n(RV)})},EV=(r,f)=>{return r.filter((s)=>s!=null).map((s)=>{return H.of(bE,s).n(y6)})},Kn=(r,f)=>{const s=new H(Oo);if(r[ar]!=null)s.c(H.of(oo,r[ar]).n(ar));if(r[_h]!=null)s.c(H.of(bo,r[_h]).n(_h));return s.lc(r,"CidrList","CidrList",()=>Mn(r[ao],f)),s},Zn=(r,f)=>{return r.filter((s)=>s!=null).map((s)=>{return Kn(s,f).n(Lf)})},Mn=(r,f)=>{return r.filter((s)=>s!=null).map((s)=>{return H.of(PQ,s).n(PQ)})},Jn=(r,f)=>{const s=new H(dw);if(r[xh]!=null)s.c(H.of(oa,r[xh]).n(xh));if(r[ar]!=null)s.c(H.of(no,r[ar]).n(ar));return s},Qn=(r,f)=>{const s=new H(Ow);return s.cc(r,_2),s.cc(r,g2),s},Bn=(r,f)=>{const s=new H(bw);if(r[w0]!=null)s.c(H.of(La,r[w0]).n(w0));if(r[h0]!=null)s.c(H.of(Aa,r[h0]).n(h0));if(r[$0]!=null)s.c(H.of(Ra,r[$0]).n($0));return s},ln=(r,f)=>{const s=new H(cw);if(s.cc(r,j2),s.cc(r,c2),r[Ow]!=null)s.c(Qn(r[Ow],f).n(Ow));if(r[qw]!=null)s.c(H.of(qw,String(r[qw])).n(qw));return s},Vn=(r,f)=>{const s=new H(_w);if(s.cc(r,$w),r[Tf]!=null)s.c(H.of(Tf,String(r[Tf])).n(Tf));if(r[Ar]!=null)s.c(H.of(Sa,r[Ar]).n(Ar));if(s.cc(r,_E),s.cc(r,dE),s.cc(r,xE),r[jw]!=null)s.c(H.of(jw,String(r[jw])).n(jw));if(r[If]!=null)s.c(H.of(If,String(r[If])).n(If));if(r[vw]!=null)s.c(H.of(vw,String(r[vw])).n(vw));if(r[Uf]!=null)s.c(H.of(Uf,String(r[Uf])).n(Uf));if(r[Ef]!=null)s.c(H.of(Ef,String(r[Ef])).n(Ef));if(r[Ff]!=null)s.c(H.of(Ff,String(r[Ff])).n(Ff));if(s.lc(r,"ChildHealthChecks","ChildHealthChecks",()=>EV(r[Nw],f)),r[$f]!=null)s.c(H.of($f,String(r[$f])).n($f));if(s.lc(r,"Regions","Regions",()=>$V(r[yw],f)),r[f0]!=null)s.c(hV(r[f0],f).n(f0));return s.cc(r,cE),s.cc(r,x2),s},$V=(r,f)=>{return r.filter((s)=>s!=null).map((s)=>{return H.of(za,s).n(ir)})},Hn=(r,f)=>{const s=new H(b2);if(r[Ur]!=null)s.c(H.of(i6,r[Ur]).n(Ur));if(r[ph]!=null)s.c(H.of(Xa,String(r[ph])).n(ph));return s},Dn=(r,f)=>{return r.filter((s)=>s!=null).map((s)=>{return H.of(MQ,s).n(MQ)})},kn=(r,f)=>{const s=new H(t2);if(r[Yr]!=null)s.c(H.of(Ka,r[Yr]).n(Yr));return s},Nn=(r,f)=>{return r.filter((s)=>s!=null).map((s)=>{return kn(s,f).n(t2)})},yn=(r,f)=>{const s=new H(uh);if(r[n]!=null)s.c(H.of(Gf,r[n]).n(n));if(r[Ar]!=null)s.c(H.of(Da,r[Ar]).n(Ar));if(r[th]!=null)s.c(H.of(Ba,r[th]).n(th));if(r[f1]!=null)s.c(H.of(Ha,String(r[f1])).n(f1));if(r[ir]!=null)s.c(H.of(Va,r[ir]).n(ir));if(r[bw]!=null)s.c(Bn(r[bw],f).n(bw));if(r[nh]!=null)s.c(H.of(Qa,r[nh]).n(nh));if(r[ah]!=null)s.c(H.of(la,String(r[ah])).n(ah));if(r[jr]!=null)s.c(H.of(jr,String(r[jr])).n(jr));if(s.lc(r,"ResourceRecords","ResourceRecords",()=>Nn(r[ch],f)),r[iw]!=null)s.c(Sn(r[iw],f).n(iw));if(s.cc(r,bE),s.cc(r,o2),r[dw]!=null)s.c(Jn(r[dw],f).n(dw));if(r[cw]!=null)s.c(ln(r[cw],f).n(cw));return s},qn=(r,f)=>{const s=new H(rF);if(r[gw]!=null)s.c(H.of(WV,r[gw]).n(gw));if(r[Yr]!=null)s.c(H.of(_a,r[Yr]).n(Yr));return s},mn=(r,f)=>{return r.filter((s)=>s!=null).map((s)=>{return H.of(WV,s).n(gw)})},vn=(r,f)=>{return r.filter((s)=>s!=null).map((s)=>{return qn(s,f).n(rF)})},jn=(r,f)=>{return r.filter((s)=>s!=null).map((s)=>{return H.of(ca,s).n(E0)})},oE=(r,f)=>{const s=new H(Rr);return s.cc(r,nE),s.cc(r,eE),s},dn=(r,f)=>{const s={};if(r[Ar]!=null)s[Ar]=T(r[Ar]);if(r[Yr]!=null)s[Yr]=xr(r[Yr]);return s},On=(r,f)=>{const s={};if(r[ir]!=null)s[ir]=T(r[ir]);if(r[n]!=null)s[n]=T(r[n]);return s},bn=(r,f)=>{const s={};if(r[sr]!=null)s[sr]=T(r[sr]);if(r[Gf]!=null)s[Gf]=T(r[Gf]);if(r[eh]!=null)s[eh]=yr(r[eh]);return s},cs=(r,f)=>{const s={};if(r[Gr]!=null)s[Gr]=T(r[Gr]);if(r[hs]!=null)s[hs]=T(r[hs]);if(r[Y6]!=null)s[Y6]=y(Mw(r[Y6]));if(r[Ur]!=null)s[Ur]=T(r[Ur]);return s},cn=(r,f)=>{return(r||[]).filter((s)=>s!=null).map((s)=>{return T(s)})},_n=(r,f)=>{return(r||[]).filter((s)=>s!=null).map((s)=>{return T(s)})},gn=(r,f)=>{return(r||[]).filter((s)=>s!=null).map((s)=>{return xn(s,f)})},xn=(r,f)=>{const s={};if(r[HG]!=null)s[HG]=T(r[HG]);if(r[ar]!=null)s[ar]=T(r[ar]);return s},en=(r,f)=>{const s={};if(r[gh]!=null)s[gh]=T(r[gh]);if(r[Gr]!=null)s[Gr]=T(r[Gr]);if(r[n]!=null)s[n]=T(r[n]);if(r[l0]!=null)s[l0]=xr(r[l0]);return s},nn=(r,f)=>{const s={};if(r[xh]!=null)s[xh]=T(r[xh]);if(r[ar]!=null)s[ar]=T(r[ar]);return s},on=(r,f)=>{const s={};if(r[gG]!=null)s[gG]=Er(r[gG]);if(r[N6]!=null)s[N6]=GX(r[N6]);if(r[yG]!=null)s[yG]=T(r[yG]);if(r[W6]!=null)s[W6]=Er(r[W6]);if(r[s6]!=null)s[s6]=T(r[s6]);if(r[G6]!=null)s[G6]=T(r[G6]);if(r[l6]!=null)s[l6]=T(r[l6]);if(r.Dimensions==="")s[QE]=[];else if(r[QE]!=null&&r[QE][XQ]!=null)s[QE]=fo(Cr(r[QE][XQ]),f);return s},an=(r,f)=>{return(r||[]).filter((s)=>s!=null).map((s)=>{return pn(s,f)})},pn=(r,f)=>{const s={};if(r[gh]!=null)s[gh]=T(r[gh]);if(r[Gr]!=null)s[Gr]=T(r[Gr]);if(r[n]!=null)s[n]=T(r[n]);if(r[l0]!=null)s[l0]=xr(r[l0]);return s},un=(r,f)=>{const s={};if(r[_2]!=null)s[_2]=T(r[_2]);if(r[g2]!=null)s[g2]=T(r[g2]);return s},aE=(r,f)=>{const s={};if(r[Gr]!=null)s[Gr]=T(r[Gr]);if(r[Pr]!=null)s[Pr]=T(r[Pr]);if(r.NameServers==="")s[DE]=[];else if(r[DE]!=null&&r[DE][KQ]!=null)s[DE]=tn(Cr(r[DE][KQ]),f);return s},tn=(r,f)=>{return(r||[]).filter((s)=>s!=null).map((s)=>{return T(s)})},ro=(r,f)=>{return(r||[]).filter((s)=>s!=null).map((s)=>{return aE(s,f)})},so=(r,f)=>{const s={};if(r[n]!=null)s[n]=T(r[n]);if(r[Yr]!=null)s[Yr]=T(r[Yr]);return s},fo=(r,f)=>{return(r||[]).filter((s)=>s!=null).map((s)=>{return so(s,f)})},wo=(r,f)=>{const s={};if(r[B6]!=null)s[B6]=T(r[B6]);if(r[r1]!=null)s[r1]=T(r[r1]);return s},ho=(r,f)=>{return(r||[]).filter((s)=>s!=null).map((s)=>{return T(s)})},Eo=(r,f)=>{const s={};if(r[w0]!=null)s[w0]=T(r[w0]);if(r[h0]!=null)s[h0]=T(r[h0]);if(r[$0]!=null)s[$0]=T(r[$0]);return s},IV=(r,f)=>{const s={};if(r[w0]!=null)s[w0]=T(r[w0]);if(r[kG]!=null)s[kG]=T(r[kG]);if(r[h0]!=null)s[h0]=T(r[h0]);if(r[NG]!=null)s[NG]=T(r[NG]);if(r[$0]!=null)s[$0]=T(r[$0]);if(r[M6]!=null)s[M6]=T(r[M6]);return s},$o=(r,f)=>{return(r||[]).filter((s)=>s!=null).map((s)=>{return IV(s,f)})},Io=(r,f)=>{const s={};if(r[j2]!=null)s[j2]=T(r[j2]);if(r[c2]!=null)s[c2]=T(r[c2]);if(r[Ow]!=null)s[Ow]=un(r[Ow],f);if(r[qw]!=null)s[qw]=Er(r[qw]);return s},sF=(r,f)=>{const s={};if(r[Gr]!=null)s[Gr]=T(r[Gr]);if(r[Pr]!=null)s[Pr]=T(r[Pr]);if(r[oh]!=null)s[oh]=GV(r[oh],f);if(r[_w]!=null)s[_w]=Fo(r[_w],f);if(r[mw]!=null)s[mw]=xr(r[mw]);if(r[mG]!=null)s[mG]=on(r[mG],f);return s},Fo=(r,f)=>{const s={};if(r[$w]!=null)s[$w]=T(r[$w]);if(r[Tf]!=null)s[Tf]=Er(r[Tf]);if(r[Ar]!=null)s[Ar]=T(r[Ar]);if(r[_E]!=null)s[_E]=T(r[_E]);if(r[dE]!=null)s[dE]=T(r[dE]);if(r[xE]!=null)s[xE]=T(r[xE]);if(r[jw]!=null)s[jw]=Er(r[jw]);if(r[If]!=null)s[If]=Er(r[If]);if(r[vw]!=null)s[vw]=yr(r[vw]);if(r[Uf]!=null)s[Uf]=yr(r[Uf]);if(r[Ef]!=null)s[Ef]=yr(r[Ef]);if(r[Ff]!=null)s[Ff]=Er(r[Ff]);if(r.ChildHealthChecks==="")s[Nw]=[];else if(r[Nw]!=null&&r[Nw][y6]!=null)s[Nw]=_n(Cr(r[Nw][y6]),f);if(r[$f]!=null)s[$f]=yr(r[$f]);if(r.Regions==="")s[yw]=[];else if(r[yw]!=null&&r[yw][ir]!=null)s[yw]=To(Cr(r[yw][ir]),f);if(r[f0]!=null)s[f0]=On(r[f0],f);if(r[cE]!=null)s[cE]=T(r[cE]);if(r[x2]!=null)s[x2]=T(r[x2]);return s},Uo=(r,f)=>{const s={};if(r[ir]!=null)s[ir]=T(r[ir]);if(r[$w]!=null)s[$w]=T(r[$w]);if(r[Q6]!=null)s[Q6]=lo(r[Q6],f);return s},FV=(r,f)=>{return(r||[]).filter((s)=>s!=null).map((s)=>{return Uo(s,f)})},To=(r,f)=>{return(r||[]).filter((s)=>s!=null).map((s)=>{return T(s)})},Go=(r,f)=>{return(r||[]).filter((s)=>s!=null).map((s)=>{return sF(s,f)})},fF=(r,f)=>{const s={};if(r[Gr]!=null)s[Gr]=T(r[Gr]);if(r[n]!=null)s[n]=T(r[n]);if(r[Pr]!=null)s[Pr]=T(r[Pr]);if(r[jG]!=null)s[jG]=Co(r[jG],f);if(r[P6]!=null)s[P6]=xr(r[P6]);if(r[oh]!=null)s[oh]=GV(r[oh],f);return s},Co=(r,f)=>{const s={};if(r[Ur]!=null)s[Ur]=T(r[Ur]);if(r[ph]!=null)s[ph]=yr(r[ph]);return s},Lo=(r,f)=>{const s={};if(r[Ar]!=null)s[Ar]=T(r[Ar]);if(r[Yr]!=null)s[Yr]=xr(r[Yr]);return s},Ao=(r,f)=>{const s={};if(r[L6]!=null)s[L6]=T(r[L6]);if(r[A6]!=null)s[A6]=T(r[A6]);return s},UV=(r,f)=>{return(r||[]).filter((s)=>s!=null).map((s)=>{return fF(s,f)})},Ro=(r,f)=>{return(r||[]).filter((s)=>s!=null).map((s)=>{return Wo(s,f)})},Wo=(r,f)=>{const s={};if(r[sr]!=null)s[sr]=T(r[sr]);if(r[n]!=null)s[n]=T(r[n]);if(r[C6]!=null)s[C6]=Ao(r[C6],f);return s},TV=(r,f)=>{const s={};if(r[n]!=null)s[n]=T(r[n]);if(r[oG]!=null)s[oG]=T(r[oG]);if(r[xG]!=null)s[xG]=Er(r[xG]);if(r[K6]!=null)s[K6]=T(r[K6]);if(r[Z6]!=null)s[Z6]=Er(r[Z6]);if(r[iG]!=null)s[iG]=T(r[iG]);if(r[dG]!=null)s[dG]=Er(r[dG]);if(r[uG]!=null)s[uG]=Er(r[uG]);if(r[cG]!=null)s[cG]=T(r[cG]);if(r[R6]!=null)s[R6]=T(r[R6]);if(r[bG]!=null)s[bG]=T(r[bG]);if(r[OG]!=null)s[OG]=T(r[OG]);if(r[hs]!=null)s[hs]=T(r[hs]);if(r[r1]!=null)s[r1]=T(r[r1]);if(r[DG]!=null)s[DG]=y(Mw(r[DG]));if(r[tG]!=null)s[tG]=y(Mw(r[tG]));return s},zo=(r,f)=>{return(r||[]).filter((s)=>s!=null).map((s)=>{return TV(s,f)})},GV=(r,f)=>{const s={};if(r[J6]!=null)s[J6]=T(r[J6]);if(r[_G]!=null)s[_G]=T(r[_G]);return s},So=(r,f)=>{return(r||[]).filter((s)=>s!=null).map((s)=>{return Po(s,f)})},Po=(r,f)=>{const s={};if(r[ar]!=null)s[ar]=T(r[ar]);return s},q6=(r,f)=>{const s={};if(r[Gr]!=null)s[Gr]=T(r[Gr]);if(r[sr]!=null)s[sr]=T(r[sr]);if(r[d2]!=null)s[d2]=T(r[d2]);return s},Xo=(r,f)=>{return(r||[]).filter((s)=>s!=null).map((s)=>{return q6(s,f)})},Yo=(r,f)=>{return(r||[]).filter((s)=>s!=null).map((s)=>{return T(s)})},Ko=(r,f)=>{const s={};if(r[Yr]!=null)s[Yr]=T(r[Yr]);return s},Zo=(r,f)=>{return(r||[]).filter((s)=>s!=null).map((s)=>{return Ko(s,f)})},Mo=(r,f)=>{const s={};if(r[n]!=null)s[n]=T(r[n]);if(r[Ar]!=null)s[Ar]=T(r[Ar]);if(r[th]!=null)s[th]=T(r[th]);if(r[f1]!=null)s[f1]=xr(r[f1]);if(r[ir]!=null)s[ir]=T(r[ir]);if(r[bw]!=null)s[bw]=Eo(r[bw],f);if(r[nh]!=null)s[nh]=T(r[nh]);if(r[ah]!=null)s[ah]=yr(r[ah]);if(r[jr]!=null)s[jr]=xr(r[jr]);if(r.ResourceRecords==="")s[ch]=[];else if(r[ch]!=null&&r[ch][t2]!=null)s[ch]=Zo(Cr(r[ch][t2]),f);if(r[iw]!=null)s[iw]=bn(r[iw],f);if(r[bE]!=null)s[bE]=T(r[bE]);if(r[o2]!=null)s[o2]=T(r[o2]);if(r[dw]!=null)s[dw]=nn(r[dw],f);if(r[cw]!=null)s[cw]=Io(r[cw],f);return s},Jo=(r,f)=>{return(r||[]).filter((s)=>s!=null).map((s)=>{return Mo(s,f)})},CV=(r,f)=>{const s={};if(r[X6]!=null)s[X6]=T(r[X6]);if(r[E0]!=null)s[E0]=T(r[E0]);if(r.Tags==="")s[jE]=[];else if(r[jE]!=null&&r[jE][rF]!=null)s[jE]=Ho(Cr(r[jE][rF]),f);return s},Qo=(r,f)=>{return(r||[]).filter((s)=>s!=null).map((s)=>{return CV(s,f)})},Bo=(r,f)=>{const s={};if(r[Ar]!=null)s[Ar]=T(r[Ar]);if(r[Yr]!=null)s[Yr]=xr(r[Yr]);return s},lo=(r,f)=>{const s={};if(r[hs]!=null)s[hs]=T(r[hs]);if(r[qG]!=null)s[qG]=y(Mw(r[qG]));return s},Vo=(r,f)=>{const s={};if(r[gw]!=null)s[gw]=T(r[gw]);if(r[Yr]!=null)s[Yr]=T(r[Yr]);return s},Ho=(r,f)=>{return(r||[]).filter((s)=>s!=null).map((s)=>{return Vo(s,f)})},Do=(r,f)=>{return(r||[]).filter((s)=>s!=null).map((s)=>{return pE(s,f)})},pE=(r,f)=>{const s={};if(r[Gr]!=null)s[Gr]=T(r[Gr]);if(r[l0]!=null)s[l0]=Er(r[l0]);if(r[n]!=null)s[n]=T(r[n]);if(r[Ar]!=null)s[Ar]=T(r[Ar]);if(r[J0]!=null)s[J0]=T(r[J0]);if(r[Ur]!=null)s[Ur]=T(r[Ur]);return s},wF=(r,f)=>{const s={};if(r[Gr]!=null)s[Gr]=T(r[Gr]);if(r[sr]!=null)s[sr]=T(r[sr]);if(r[n]!=null)s[n]=T(r[n]);if(r[jr]!=null)s[jr]=xr(r[jr]);if(r[V6]!=null)s[V6]=T(r[V6]);if(r[Zr]!=null)s[Zr]=T(r[Zr]);if(r[s1]!=null)s[s1]=T(r[s1]);if(r[is]!=null)s[is]=Er(r[is]);if(r[k6]!=null)s[k6]=T(r[k6]);return s},m6=(r,f)=>{return(r||[]).filter((s)=>s!=null).map((s)=>{return wF(s,f)})},ko=(r,f)=>{return(r||[]).filter((s)=>s!=null).map((s)=>{return No(s,f)})},No=(r,f)=>{const s={};if(r[Gr]!=null)s[Gr]=T(r[Gr]);if(r[n]!=null)s[n]=T(r[n]);if(r[Ar]!=null)s[Ar]=T(r[Ar]);if(r[r6]!=null)s[r6]=Er(r[r6]);if(r[H6]!=null)s[H6]=Er(r[H6]);return s},v6=(r,f)=>{const s={};if(r[nE]!=null)s[nE]=T(r[nE]);if(r[eE]!=null)s[eE]=T(r[eE]);return s},LV=(r,f)=>{return(r||[]).filter((s)=>s!=null).map((s)=>{return v6(s,f)})},J=(r)=>({httpStatusCode:r.statusCode,requestId:r.headers["x-amzn-requestid"]??r.headers["x-amzn-request-id"]??r.headers["x-amz-request-id"],extendedRequestId:r.headers["x-amz-id-2"],cfId:r.headers["x-amz-cf-id"]});var _h="Action",yo="AliasHealthEnabled",f0="AlarmIdentifier",qo="AlarmName",mo="AddTags",iw="AliasTarget",vo="AssociateVPCComment",jo="AssociateVPCWithHostedZoneRequest",j2="AWSRegion",gh="Arn",qw="Bias",Ur="Comment",io="ChangeAction",i2="ChangeBatch",YE="CidrBlocks",HG="CidrBlock",w0="ContinentCode",Oo="CidrCollectionChange",bo="CidrCollectionChangeAction",co="ChangeCidrCollectionRequest",_o="CreateCidrCollectionRequest",KE="CidrCollections",h0="CountryCode",DG="CreatedDate",Nw="ChildHealthChecks",go="CreateHealthCheckRequest",y6="ChildHealthCheck",xo="CreateHostedZoneRequest",wr="ChangeInfo",ZE="CheckerIpRanges",xh="CollectionId",eo="CreateKeySigningKeyRequest",ME="CidrLocations",no="CidrLocationNameDefaultAllowed",oo="CidrLocationNameDefaultNotAllowed",ao="CidrList",po="CidrNonce",uo="CollectionName",kG="ContinentName",NG="CountryName",yG="ComparisonOperator",to="CreateQueryLoggingConfigRequest",Pr="CallerReference",dw="CidrRoutingConfig",ra="CreateReusableDelegationSetRequest",sa="ChangeResourceRecordSetsRequest",qG="CheckedTime",fa="ChangeTagsForResourceRequest",wa="CreateTrafficPolicyInstanceRequest",ha="CreateTrafficPolicyRequest",Ea="CreateTrafficPolicyVersionRequest",v2="CollectionVersion",$a="CreateVPCAssociationAuthorizationRequest",mG="CloudWatchAlarmConfiguration",d2="CloudWatchLogsLogGroupArn",Ia="CloudWatchRegion",AV="Changes",RV="Change",PQ="Cidr",vG="Collection",jG="Config",Ow="Coordinates",M0="Count",J0="Document",iG="DigestAlgorithmMnemonic",dG="DigestAlgorithmType",OG="DNSKEYRecord",Gf="DNSName",Ts="DelegationSet",O2="DelegationSetId",bG="DSRecord",JE="DelegationSets",cG="DigestValue",Fa="DeleteVPCAssociationAuthorizationRequest",Ua="DisassociateVPCComment",Ta="DisassociateVPCFromHostedZoneRequest",_G="Description",Ef="Disabled",QE="Dimensions",XQ="Dimension",Ga="EDNS0ClientSubnetIP",Ca="EDNS0ClientSubnetMask",gG="EvaluationPeriods",$f="EnableSNI",eh="EvaluateTargetHealth",nh="Failover",dE="FullyQualifiedDomainName",If="FailureThreshold",xG="Flag",bw="GeoLocation",La="GeoLocationContinentCode",Aa="GeoLocationCountryCode",OE="GeoLocationDetails",BE="GeoLocationDetailsList",Ra="GeoLocationSubdivisionCode",cw="GeoProximityLocation",Cf="HealthCheck",_w="HealthCheckConfig",eG="HealthCheckCount",bE="HealthCheckId",Wa="HealthCheckNonce",tf="HealthCheckObservations",u2="HealthCheckObservation",za="HealthCheckRegion",Sa="HealthCheckType",mw="HealthCheckVersion",lE="HealthChecks",Ff="HealthThreshold",Ss="HostedZone",b2="HostedZoneConfig",nG="HostedZoneCount",sr="HostedZoneId",Ew="HostedZoneIdMarker",VE="HostedZoneSummaries",YQ="HostedZoneSummary",Pa="HostedZoneType",r0="HostedZones",Uf="Inverted",cE="InsufficientDataHealthStatus",$w="IPAddress",Xa="IsPrivateZone",Tr="IsTruncated",Gr="Id",gw="Key",oG="KmsArn",aG="KeyManagementServiceArn",pG="KeySigningKey",HE="KeySigningKeys",uG="KeyTag",V0="Location",tG="LastModifiedDate",ar="LocationName",oh="LinkedService",Ya="ListTagsForResourcesRequest",r6="LatestVersion",c2="LocalZoneGroup",_2="Latitude",Q0="Limit",g2="Longitude",ds="Marker",a="MaxItems",vw="MeasureLatency",s6="MetricName",uE="MaxResults",ah="MultiValueAnswer",Zr="Message",n="Name",f6="NextContinentCode",w6="NextCountryCode",h6="NextDNSName",E6="NextHostedZoneId",B0="NextMarker",$6="NextRecordIdentifier",I6="NextRecordName",F6="NextRecordType",DE="NameServers",U6="NextSubdivisionCode",KQ="NameServer",Xr="NextToken",T6="Nameserver",G6="Namespace",j6="Nonce",C6="Owner",L6="OwningAccount",A6="OwningService",Tf="Port",R6="PublicKey",ph="PrivateZone",W6="Period",z6="Protocol",Iw="QueryLoggingConfig",kE="QueryLoggingConfigs",yw="Regions",S6="ResponseCode",x2="RoutingControlArn",i6="ResourceDescription",ZQ="RecordDataEntry",Ka="RData",NE="RecordData",Za="ResetElements",MQ="ResettableElementName",E0="ResourceId",Ma="ResolverIP",Ja="ResourceIds",jw="RequestInterval",e2="RecordName",_E="ResourcePath",t2="ResourceRecord",yE="ResourceRecordSets",P6="ResourceRecordSetCount",Qa="ResourceRecordSetFailover",Ba="ResourceRecordSetIdentifier",la="ResourceRecordSetMultiValueAnswer",Va="ResourceRecordSetRegion",Ha="ResourceRecordSetWeight",uh="ResourceRecordSet",Da="RRType",ch="ResourceRecords",n2="RecordType",ka="RemoveTagKeys",gE="ResourceTagSet",qE="ResourceTagSets",X6="ResourceType",ir="Region",hs="Status",Y6="SubmittedAt",K6="SigningAlgorithmMnemonic",Z6="SigningAlgorithmType",$0="SubdivisionCode",Na="StartContinentCode",ya="StartCountryCode",th="SetIdentifier",qa="SigningKeyName",ma="SigningKeyString",va="SigningKeyStatus",r1="StatusMessage",M6="SubdivisionName",J6="ServicePrincipal",Q6="StatusReport",ja="StartRecordIdentifier",ia="StartRecordName",da="StartRecordType",xE="SearchString",Oa="StartSubdivisionCode",B6="ServeSignature",l6="Statistic",V6="State",Ar="Type",WV="TagKey",Gs="TrafficPolicy",d6="TrafficPolicyComment",H6="TrafficPolicyCount",zV="TrafficPolicyDocument",s1="TrafficPolicyId",D6="TrafficPolicyInstanceCount",o2="TrafficPolicyInstanceId",a2="TrafficPolicyIdMarker",Os="TrafficPolicyInstanceNameMarker",bs="TrafficPolicyInstanceTypeMarker",Es="TrafficPolicyInstance",ws="TrafficPolicyInstances",ba="TrafficPolicyName",mE="TrafficPolicySummaries",JQ="TrafficPolicySummary",k6="TrafficPolicyType",is="TrafficPolicyVersion",p2="TrafficPolicyVersionMarker",vE="TrafficPolicies",ca="TagResourceId",jr="TTL",_a="TagValue",rF="Tag",jE="Tags",N6="Threshold",ga="UpdateHealthCheckRequest",xa="UpdateHostedZoneCommentRequest",ea="UpdateTrafficPolicyCommentRequest",na="UpdateTrafficPolicyInstanceRequest",oa="UUID",Yr="Value",Rr="VPC",eE="VPCId",nE="VPCRegion",s0="VPCs",l0="Version",f1="Weight",aa="continentcode",pa="countrycode",ua="delegationsetid",ta="dnsname",rp="edns0clientsubnetip",sp="edns0clientsubnetmask",fp="hostedzonetype",tE="hostedzoneid",wp="identifier",SV="id",I0="location",r$="maxresults",_s="maxitems",O6="marker",Lf="member",X="message",iE="messages",w1="nexttoken",hp="name",Ep="recordname",$p="recordtype",Ip="resolverip",Fp="subdivisioncode",Up="startcontinentcode",Tp="startcountrycode",Gp="startsubdivisioncode",Cp="type",Lp="trafficpolicyid",b6="trafficpolicyinstancename",c6="trafficpolicyinstancetype",Ap="trafficpolicyversion",Rp="vpcid",Hr='<?xml version="1.0" encoding="UTF-8"?>',Wp="version",zp="vpcregion";class _6 extends A.classBuilder().ep({...M}).m(function(r,f,s,w){return[R(s,this.serialize,this.deserialize),W(s,r.getEndpointParameterInstructions()),m(s)]}).s("AWSDnsV20130401","ActivateKeySigningKey",{}).n("Route53Client","ActivateKeySigningKeyCommand").f(void 0,void 0).ser(QQ).de(bB).build(){}B();V();Y();class g6 extends A.classBuilder().ep({...M}).m(function(r,f,s,w){return[R(s,this.serialize,this.deserialize),W(s,r.getEndpointParameterInstructions()),m(s)]}).s("AWSDnsV20130401","AssociateVPCWithHostedZone",{}).n("Route53Client","AssociateVPCWithHostedZoneCommand").f(void 0,void 0).ser(BQ).de(cB).build(){}B();V();Y();class x6 extends A.classBuilder().ep({...M}).m(function(r,f,s,w){return[R(s,this.serialize,this.deserialize),W(s,r.getEndpointParameterInstructions()),m(s)]}).s("AWSDnsV20130401","ChangeCidrCollection",{}).n("Route53Client","ChangeCidrCollectionCommand").f(void 0,void 0).ser(lQ).de(_B).build(){}B();V();Y();class e6 extends A.classBuilder().ep({...M}).m(function(r,f,s,w){return[R(s,this.serialize,this.deserialize),W(s,r.getEndpointParameterInstructions()),WQ(s),m(s)]}).s("AWSDnsV20130401","ChangeResourceRecordSets",{}).n("Route53Client","ChangeResourceRecordSetsCommand").f(void 0,void 0).ser(VQ).de(gB).build(){}B();V();Y();class n6 extends A.classBuilder().ep({...M}).m(function(r,f,s,w){return[R(s,this.serialize,this.deserialize),W(s,r.getEndpointParameterInstructions())]}).s("AWSDnsV20130401","ChangeTagsForResource",{}).n("Route53Client","ChangeTagsForResourceCommand").f(void 0,void 0).ser(HQ).de(xB).build(){}B();V();Y();class o6 extends A.classBuilder().ep({...M}).m(function(r,f,s,w){return[R(s,this.serialize,this.deserialize),W(s,r.getEndpointParameterInstructions())]}).s("AWSDnsV20130401","CreateCidrCollection",{}).n("Route53Client","CreateCidrCollectionCommand").f(void 0,void 0).ser(DQ).de(eB).build(){}B();V();Y();class a6 extends A.classBuilder().ep({...M}).m(function(r,f,s,w){return[R(s,this.serialize,this.deserialize),W(s,r.getEndpointParameterInstructions())]}).s("AWSDnsV20130401","CreateHealthCheck",{}).n("Route53Client","CreateHealthCheckCommand").f(void 0,void 0).ser(kQ).de(nB).build(){}B();V();Y();class p6 extends A.classBuilder().ep({...M}).m(function(r,f,s,w){return[R(s,this.serialize,this.deserialize),W(s,r.getEndpointParameterInstructions()),m(s)]}).s("AWSDnsV20130401","CreateHostedZone",{}).n("Route53Client","CreateHostedZoneCommand").f(void 0,void 0).ser(NQ).de(oB).build(){}B();V();Y();class u6 extends A.classBuilder().ep({...M}).m(function(r,f,s,w){return[R(s,this.serialize,this.deserialize),W(s,r.getEndpointParameterInstructions()),m(s)]}).s("AWSDnsV20130401","CreateKeySigningKey",{}).n("Route53Client","CreateKeySigningKeyCommand").f(void 0,void 0).ser(yQ).de(aB).build(){}B();V();Y();class t6 extends A.classBuilder().ep({...M}).m(function(r,f,s,w){return[R(s,this.serialize,this.deserialize),W(s,r.getEndpointParameterInstructions()),m(s)]}).s("AWSDnsV20130401","CreateQueryLoggingConfig",{}).n("Route53Client","CreateQueryLoggingConfigCommand").f(void 0,void 0).ser(qQ).de(pB).build(){}B();V();Y();class rC extends A.classBuilder().ep({...M}).m(function(r,f,s,w){return[R(s,this.serialize,this.deserialize),W(s,r.getEndpointParameterInstructions()),m(s)]}).s("AWSDnsV20130401","CreateReusableDelegationSet",{}).n("Route53Client","CreateReusableDelegationSetCommand").f(void 0,void 0).ser(mQ).de(uB).build(){}B();V();Y();class sC extends A.classBuilder().ep({...M}).m(function(r,f,s,w){return[R(s,this.serialize,this.deserialize),W(s,r.getEndpointParameterInstructions())]}).s("AWSDnsV20130401","CreateTrafficPolicy",{}).n("Route53Client","CreateTrafficPolicyCommand").f(void 0,void 0).ser(vQ).de(tB).build(){}B();V();Y();class fC extends A.classBuilder().ep({...M}).m(function(r,f,s,w){return[R(s,this.serialize,this.deserialize),W(s,r.getEndpointParameterInstructions()),m(s)]}).s("AWSDnsV20130401","CreateTrafficPolicyInstance",{}).n("Route53Client","CreateTrafficPolicyInstanceCommand").f(void 0,void 0).ser(jQ).de(rl).build(){}B();V();Y();class wC extends A.classBuilder().ep({...M}).m(function(r,f,s,w){return[R(s,this.serialize,this.deserialize),W(s,r.getEndpointParameterInstructions()),m(s)]}).s("AWSDnsV20130401","CreateTrafficPolicyVersion",{}).n("Route53Client","CreateTrafficPolicyVersionCommand").f(void 0,void 0).ser(iQ).de(sl).build(){}B();V();Y();class hC extends A.classBuilder().ep({...M}).m(function(r,f,s,w){return[R(s,this.serialize,this.deserialize),W(s,r.getEndpointParameterInstructions()),m(s)]}).s("AWSDnsV20130401","CreateVPCAssociationAuthorization",{}).n("Route53Client","CreateVPCAssociationAuthorizationCommand").f(void 0,void 0).ser(dQ).de(fl).build(){}B();V();Y();class EC extends A.classBuilder().ep({...M}).m(function(r,f,s,w){return[R(s,this.serialize,this.deserialize),W(s,r.getEndpointParameterInstructions()),m(s)]}).s("AWSDnsV20130401","DeactivateKeySigningKey",{}).n("Route53Client","DeactivateKeySigningKeyCommand").f(void 0,void 0).ser(OQ).de(wl).build(){}B();V();Y();class $C extends A.classBuilder().ep({...M}).m(function(r,f,s,w){return[R(s,this.serialize,this.deserialize),W(s,r.getEndpointParameterInstructions()),m(s)]}).s("AWSDnsV20130401","DeleteCidrCollection",{}).n("Route53Client","DeleteCidrCollectionCommand").f(void 0,void 0).ser(bQ).de(hl).build(){}B();V();Y();class IC extends A.classBuilder().ep({...M}).m(function(r,f,s,w){return[R(s,this.serialize,this.deserialize),W(s,r.getEndpointParameterInstructions())]}).s("AWSDnsV20130401","DeleteHealthCheck",{}).n("Route53Client","DeleteHealthCheckCommand").f(void 0,void 0).ser(cQ).de(El).build(){}B();V();Y();class FC extends A.classBuilder().ep({...M}).m(function(r,f,s,w){return[R(s,this.serialize,this.deserialize),W(s,r.getEndpointParameterInstructions()),m(s)]}).s("AWSDnsV20130401","DeleteHostedZone",{}).n("Route53Client","DeleteHostedZoneCommand").f(void 0,void 0).ser(_Q).de($l).build(){}B();V();Y();class UC extends A.classBuilder().ep({...M}).m(function(r,f,s,w){return[R(s,this.serialize,this.deserialize),W(s,r.getEndpointParameterInstructions()),m(s)]}).s("AWSDnsV20130401","DeleteKeySigningKey",{}).n("Route53Client","DeleteKeySigningKeyCommand").f(void 0,void 0).ser(gQ).de(Il).build(){}B();V();Y();class TC extends A.classBuilder().ep({...M}).m(function(r,f,s,w){return[R(s,this.serialize,this.deserialize),W(s,r.getEndpointParameterInstructions()),m(s)]}).s("AWSDnsV20130401","DeleteQueryLoggingConfig",{}).n("Route53Client","DeleteQueryLoggingConfigCommand").f(void 0,void 0).ser(xQ).de(Fl).build(){}B();V();Y();class GC extends A.classBuilder().ep({...M}).m(function(r,f,s,w){return[R(s,this.serialize,this.deserialize),W(s,r.getEndpointParameterInstructions()),m(s)]}).s("AWSDnsV20130401","DeleteReusableDelegationSet",{}).n("Route53Client","DeleteReusableDelegationSetCommand").f(void 0,void 0).ser(eQ).de(Ul).build(){}B();V();Y();class CC extends A.classBuilder().ep({...M}).m(function(r,f,s,w){return[R(s,this.serialize,this.deserialize),W(s,r.getEndpointParameterInstructions()),m(s)]}).s("AWSDnsV20130401","DeleteTrafficPolicy",{}).n("Route53Client","DeleteTrafficPolicyCommand").f(void 0,void 0).ser(nQ).de(Tl).build(){}B();V();Y();class LC extends A.classBuilder().ep({...M}).m(function(r,f,s,w){return[R(s,this.serialize,this.deserialize),W(s,r.getEndpointParameterInstructions()),m(s)]}).s("AWSDnsV20130401","DeleteTrafficPolicyInstance",{}).n("Route53Client","DeleteTrafficPolicyInstanceCommand").f(void 0,void 0).ser(oQ).de(Gl).build(){}B();V();Y();class AC extends A.classBuilder().ep({...M}).m(function(r,f,s,w){return[R(s,this.serialize,this.deserialize),W(s,r.getEndpointParameterInstructions()),m(s)]}).s("AWSDnsV20130401","DeleteVPCAssociationAuthorization",{}).n("Route53Client","DeleteVPCAssociationAuthorizationCommand").f(void 0,void 0).ser(aQ).de(Cl).build(){}B();V();Y();class RC extends A.classBuilder().ep({...M}).m(function(r,f,s,w){return[R(s,this.serialize,this.deserialize),W(s,r.getEndpointParameterInstructions()),m(s)]}).s("AWSDnsV20130401","DisableHostedZoneDNSSEC",{}).n("Route53Client","DisableHostedZoneDNSSECCommand").f(void 0,void 0).ser(pQ).de(Ll).build(){}B();V();Y();class WC extends A.classBuilder().ep({...M}).m(function(r,f,s,w){return[R(s,this.serialize,this.deserialize),W(s,r.getEndpointParameterInstructions()),m(s)]}).s("AWSDnsV20130401","DisassociateVPCFromHostedZone",{}).n("Route53Client","DisassociateVPCFromHostedZoneCommand").f(void 0,void 0).ser(uQ).de(Al).build(){}B();V();Y();class zC extends A.classBuilder().ep({...M}).m(function(r,f,s,w){return[R(s,this.serialize,this.deserialize),W(s,r.getEndpointParameterInstructions()),m(s)]}).s("AWSDnsV20130401","EnableHostedZoneDNSSEC",{}).n("Route53Client","EnableHostedZoneDNSSECCommand").f(void 0,void 0).ser(tQ).de(Rl).build(){}B();V();Y();class SC extends A.classBuilder().ep({...M}).m(function(r,f,s,w){return[R(s,this.serialize,this.deserialize),W(s,r.getEndpointParameterInstructions())]}).s("AWSDnsV20130401","GetAccountLimit",{}).n("Route53Client","GetAccountLimitCommand").f(void 0,void 0).ser(rB).de(Wl).build(){}B();V();Y();class PC extends A.classBuilder().ep({...M}).m(function(r,f,s,w){return[R(s,this.serialize,this.deserialize),W(s,r.getEndpointParameterInstructions()),m(s)]}).s("AWSDnsV20130401","GetChange",{}).n("Route53Client","GetChangeCommand").f(void 0,void 0).ser(sB).de(zl).build(){}B();V();Y();class XC extends A.classBuilder().ep({...M}).m(function(r,f,s,w){return[R(s,this.serialize,this.deserialize),W(s,r.getEndpointParameterInstructions())]}).s("AWSDnsV20130401","GetCheckerIpRanges",{}).n("Route53Client","GetCheckerIpRangesCommand").f(void 0,void 0).ser(fB).de(Sl).build(){}B();V();Y();class YC extends A.classBuilder().ep({...M}).m(function(r,f,s,w){return[R(s,this.serialize,this.deserialize),W(s,r.getEndpointParameterInstructions()),m(s)]}).s("AWSDnsV20130401","GetDNSSEC",{}).n("Route53Client","GetDNSSECCommand").f(void 0,void 0).ser(wB).de(Pl).build(){}B();V();Y();class KC extends A.classBuilder().ep({...M}).m(function(r,f,s,w){return[R(s,this.serialize,this.deserialize),W(s,r.getEndpointParameterInstructions())]}).s("AWSDnsV20130401","GetGeoLocation",{}).n("Route53Client","GetGeoLocationCommand").f(void 0,void 0).ser(hB).de(Xl).build(){}B();V();Y();class ZC extends A.classBuilder().ep({...M}).m(function(r,f,s,w){return[R(s,this.serialize,this.deserialize),W(s,r.getEndpointParameterInstructions())]}).s("AWSDnsV20130401","GetHealthCheck",{}).n("Route53Client","GetHealthCheckCommand").f(void 0,void 0).ser(EB).de(Yl).build(){}B();V();Y();class MC extends A.classBuilder().ep({...M}).m(function(r,f,s,w){return[R(s,this.serialize,this.deserialize),W(s,r.getEndpointParameterInstructions())]}).s("AWSDnsV20130401","GetHealthCheckCount",{}).n("Route53Client","GetHealthCheckCountCommand").f(void 0,void 0).ser($B).de(Kl).build(){}B();V();Y();class JC extends A.classBuilder().ep({...M}).m(function(r,f,s,w){return[R(s,this.serialize,this.deserialize),W(s,r.getEndpointParameterInstructions())]}).s("AWSDnsV20130401","GetHealthCheckLastFailureReason",{}).n("Route53Client","GetHealthCheckLastFailureReasonCommand").f(void 0,void 0).ser(IB).de(Zl).build(){}B();V();Y();class QC extends A.classBuilder().ep({...M}).m(function(r,f,s,w){return[R(s,this.serialize,this.deserialize),W(s,r.getEndpointParameterInstructions())]}).s("AWSDnsV20130401","GetHealthCheckStatus",{}).n("Route53Client","GetHealthCheckStatusCommand").f(void 0,void 0).ser(FB).de(Ml).build(){}B();V();Y();class BC extends A.classBuilder().ep({...M}).m(function(r,f,s,w){return[R(s,this.serialize,this.deserialize),W(s,r.getEndpointParameterInstructions()),m(s)]}).s("AWSDnsV20130401","GetHostedZone",{}).n("Route53Client","GetHostedZoneCommand").f(void 0,void 0).ser(UB).de(Jl).build(){}B();V();Y();class lC extends A.classBuilder().ep({...M}).m(function(r,f,s,w){return[R(s,this.serialize,this.deserialize),W(s,r.getEndpointParameterInstructions())]}).s("AWSDnsV20130401","GetHostedZoneCount",{}).n("Route53Client","GetHostedZoneCountCommand").f(void 0,void 0).ser(TB).de(Ql).build(){}B();V();Y();class VC extends A.classBuilder().ep({...M}).m(function(r,f,s,w){return[R(s,this.serialize,this.deserialize),W(s,r.getEndpointParameterInstructions()),m(s)]}).s("AWSDnsV20130401","GetHostedZoneLimit",{}).n("Route53Client","GetHostedZoneLimitCommand").f(void 0,void 0).ser(GB).de(Bl).build(){}B();V();Y();class HC extends A.classBuilder().ep({...M}).m(function(r,f,s,w){return[R(s,this.serialize,this.deserialize),W(s,r.getEndpointParameterInstructions()),m(s)]}).s("AWSDnsV20130401","GetQueryLoggingConfig",{}).n("Route53Client","GetQueryLoggingConfigCommand").f(void 0,void 0).ser(CB).de(ll).build(){}B();V();Y();class DC extends A.classBuilder().ep({...M}).m(function(r,f,s,w){return[R(s,this.serialize,this.deserialize),W(s,r.getEndpointParameterInstructions()),m(s)]}).s("AWSDnsV20130401","GetReusableDelegationSet",{}).n("Route53Client","GetReusableDelegationSetCommand").f(void 0,void 0).ser(LB).de(Vl).build(){}B();V();Y();class kC extends A.classBuilder().ep({...M}).m(function(r,f,s,w){return[R(s,this.serialize,this.deserialize),W(s,r.getEndpointParameterInstructions()),m(s)]}).s("AWSDnsV20130401","GetReusableDelegationSetLimit",{}).n("Route53Client","GetReusableDelegationSetLimitCommand").f(void 0,void 0).ser(AB).de(Hl).build(){}B();V();Y();class NC extends A.classBuilder().ep({...M}).m(function(r,f,s,w){return[R(s,this.serialize,this.deserialize),W(s,r.getEndpointParameterInstructions()),m(s)]}).s("AWSDnsV20130401","GetTrafficPolicy",{}).n("Route53Client","GetTrafficPolicyCommand").f(void 0,void 0).ser(RB).de(Dl).build(){}B();V();Y();class yC extends A.classBuilder().ep({...M}).m(function(r,f,s,w){return[R(s,this.serialize,this.deserialize),W(s,r.getEndpointParameterInstructions()),m(s)]}).s("AWSDnsV20130401","GetTrafficPolicyInstance",{}).n("Route53Client","GetTrafficPolicyInstanceCommand").f(void 0,void 0).ser(WB).de(kl).build(){}B();V();Y();class qC extends A.classBuilder().ep({...M}).m(function(r,f,s,w){return[R(s,this.serialize,this.deserialize),W(s,r.getEndpointParameterInstructions())]}).s("AWSDnsV20130401","GetTrafficPolicyInstanceCount",{}).n("Route53Client","GetTrafficPolicyInstanceCountCommand").f(void 0,void 0).ser(zB).de(Nl).build(){}B();V();Y();class mC extends A.classBuilder().ep({...M}).m(function(r,f,s,w){return[R(s,this.serialize,this.deserialize),W(s,r.getEndpointParameterInstructions())]}).s("AWSDnsV20130401","ListCidrBlocks",{}).n("Route53Client","ListCidrBlocksCommand").f(void 0,void 0).ser(SB).de(yl).build(){}B();V();Y();class vC extends A.classBuilder().ep({...M}).m(function(r,f,s,w){return[R(s,this.serialize,this.deserialize),W(s,r.getEndpointParameterInstructions())]}).s("AWSDnsV20130401","ListCidrCollections",{}).n("Route53Client","ListCidrCollectionsCommand").f(void 0,void 0).ser(PB).de(ql).build(){}B();V();Y();class jC extends A.classBuilder().ep({...M}).m(function(r,f,s,w){return[R(s,this.serialize,this.deserialize),W(s,r.getEndpointParameterInstructions())]}).s("AWSDnsV20130401","ListCidrLocations",{}).n("Route53Client","ListCidrLocationsCommand").f(void 0,void 0).ser(XB).de(ml).build(){}B();V();Y();class iC extends A.classBuilder().ep({...M}).m(function(r,f,s,w){return[R(s,this.serialize,this.deserialize),W(s,r.getEndpointParameterInstructions())]}).s("AWSDnsV20130401","ListGeoLocations",{}).n("Route53Client","ListGeoLocationsCommand").f(void 0,void 0).ser(YB).de(vl).build(){}B();V();Y();class dC extends A.classBuilder().ep({...M}).m(function(r,f,s,w){return[R(s,this.serialize,this.deserialize),W(s,r.getEndpointParameterInstructions())]}).s("AWSDnsV20130401","ListHealthChecks",{}).n("Route53Client","ListHealthChecksCommand").f(void 0,void 0).ser(KB).de(jl).build(){}B();V();Y();class OC extends A.classBuilder().ep({...M}).m(function(r,f,s,w){return[R(s,this.serialize,this.deserialize),W(s,r.getEndpointParameterInstructions()),m(s)]}).s("AWSDnsV20130401","ListHostedZonesByName",{}).n("Route53Client","ListHostedZonesByNameCommand").f(void 0,void 0).ser(MB).de(dl).build(){}B();V();Y();class bC extends A.classBuilder().ep({...M}).m(function(r,f,s,w){return[R(s,this.serialize,this.deserialize),W(s,r.getEndpointParameterInstructions())]}).s("AWSDnsV20130401","ListHostedZonesByVPC",{}).n("Route53Client","ListHostedZonesByVPCCommand").f(void 0,void 0).ser(JB).de(Ol).build(){}B();V();Y();class cC extends A.classBuilder().ep({...M}).m(function(r,f,s,w){return[R(s,this.serialize,this.deserialize),W(s,r.getEndpointParameterInstructions()),m(s)]}).s("AWSDnsV20130401","ListHostedZones",{}).n("Route53Client","ListHostedZonesCommand").f(void 0,void 0).ser(ZB).de(il).build(){}B();V();Y();class _C extends A.classBuilder().ep({...M}).m(function(r,f,s,w){return[R(s,this.serialize,this.deserialize),W(s,r.getEndpointParameterInstructions()),m(s)]}).s("AWSDnsV20130401","ListQueryLoggingConfigs",{}).n("Route53Client","ListQueryLoggingConfigsCommand").f(void 0,void 0).ser(QB).de(bl).build(){}B();V();Y();class gC extends A.classBuilder().ep({...M}).m(function(r,f,s,w){return[R(s,this.serialize,this.deserialize),W(s,r.getEndpointParameterInstructions()),m(s)]}).s("AWSDnsV20130401","ListResourceRecordSets",{}).n("Route53Client","ListResourceRecordSetsCommand").f(void 0,void 0).ser(BB).de(cl).build(){}B();V();Y();class xC extends A.classBuilder().ep({...M}).m(function(r,f,s,w){return[R(s,this.serialize,this.deserialize),W(s,r.getEndpointParameterInstructions())]}).s("AWSDnsV20130401","ListReusableDelegationSets",{}).n("Route53Client","ListReusableDelegationSetsCommand").f(void 0,void 0).ser(lB).de(_l).build(){}B();V();Y();class eC extends A.classBuilder().ep({...M}).m(function(r,f,s,w){return[R(s,this.serialize,this.deserialize),W(s,r.getEndpointParameterInstructions())]}).s("AWSDnsV20130401","ListTagsForResource",{}).n("Route53Client","ListTagsForResourceCommand").f(void 0,void 0).ser(VB).de(gl).build(){}B();V();Y();class nC extends A.classBuilder().ep({...M}).m(function(r,f,s,w){return[R(s,this.serialize,this.deserialize),W(s,r.getEndpointParameterInstructions())]}).s("AWSDnsV20130401","ListTagsForResources",{}).n("Route53Client","ListTagsForResourcesCommand").f(void 0,void 0).ser(HB).de(xl).build(){}B();V();Y();class oC extends A.classBuilder().ep({...M}).m(function(r,f,s,w){return[R(s,this.serialize,this.deserialize),W(s,r.getEndpointParameterInstructions())]}).s("AWSDnsV20130401","ListTrafficPolicies",{}).n("Route53Client","ListTrafficPoliciesCommand").f(void 0,void 0).ser(DB).de(el).build(){}B();V();Y();class aC extends A.classBuilder().ep({...M}).m(function(r,f,s,w){return[R(s,this.serialize,this.deserialize),W(s,r.getEndpointParameterInstructions()),m(s)]}).s("AWSDnsV20130401","ListTrafficPolicyInstancesByHostedZone",{}).n("Route53Client","ListTrafficPolicyInstancesByHostedZoneCommand").f(void 0,void 0).ser(NB).de(ol).build(){}B();V();Y();class pC extends A.classBuilder().ep({...M}).m(function(r,f,s,w){return[R(s,this.serialize,this.deserialize),W(s,r.getEndpointParameterInstructions())]}).s("AWSDnsV20130401","ListTrafficPolicyInstancesByPolicy",{}).n("Route53Client","ListTrafficPolicyInstancesByPolicyCommand").f(void 0,void 0).ser(yB).de(al).build(){}B();V();Y();class uC extends A.classBuilder().ep({...M}).m(function(r,f,s,w){return[R(s,this.serialize,this.deserialize),W(s,r.getEndpointParameterInstructions())]}).s("AWSDnsV20130401","ListTrafficPolicyInstances",{}).n("Route53Client","ListTrafficPolicyInstancesCommand").f(void 0,void 0).ser(kB).de(nl).build(){}B();V();Y();class tC extends A.classBuilder().ep({...M}).m(function(r,f,s,w){return[R(s,this.serialize,this.deserialize),W(s,r.getEndpointParameterInstructions()),m(s)]}).s("AWSDnsV20130401","ListTrafficPolicyVersions",{}).n("Route53Client","ListTrafficPolicyVersionsCommand").f(void 0,void 0).ser(qB).de(pl).build(){}B();V();Y();class r4 extends A.classBuilder().ep({...M}).m(function(r,f,s,w){return[R(s,this.serialize,this.deserialize),W(s,r.getEndpointParameterInstructions()),m(s)]}).s("AWSDnsV20130401","ListVPCAssociationAuthorizations",{}).n("Route53Client","ListVPCAssociationAuthorizationsCommand").f(void 0,void 0).ser(mB).de(ul).build(){}B();V();Y();class s4 extends A.classBuilder().ep({...M}).m(function(r,f,s,w){return[R(s,this.serialize,this.deserialize),W(s,r.getEndpointParameterInstructions()),m(s)]}).s("AWSDnsV20130401","TestDNSAnswer",{}).n("Route53Client","TestDNSAnswerCommand").f(void 0,void 0).ser(vB).de(tl).build(){}B();V();Y();class f4 extends A.classBuilder().ep({...M}).m(function(r,f,s,w){return[R(s,this.serialize,this.deserialize),W(s,r.getEndpointParameterInstructions())]}).s("AWSDnsV20130401","UpdateHealthCheck",{}).n("Route53Client","UpdateHealthCheckCommand").f(void 0,void 0).ser(jB).de(rV).build(){}B();V();Y();class w4 extends A.classBuilder().ep({...M}).m(function(r,f,s,w){return[R(s,this.serialize,this.deserialize),W(s,r.getEndpointParameterInstructions()),m(s)]}).s("AWSDnsV20130401","UpdateHostedZoneComment",{}).n("Route53Client","UpdateHostedZoneCommentCommand").f(void 0,void 0).ser(iB).de(sV).build(){}B();V();Y();class h4 extends A.classBuilder().ep({...M}).m(function(r,f,s,w){return[R(s,this.serialize,this.deserialize),W(s,r.getEndpointParameterInstructions()),m(s)]}).s("AWSDnsV20130401","UpdateTrafficPolicyComment",{}).n("Route53Client","UpdateTrafficPolicyCommentCommand").f(void 0,void 0).ser(dB).de(fV).build(){}B();V();Y();class E4 extends A.classBuilder().ep({...M}).m(function(r,f,s,w){return[R(s,this.serialize,this.deserialize),W(s,r.getEndpointParameterInstructions()),m(s)]}).s("AWSDnsV20130401","UpdateTrafficPolicyInstance",{}).n("Route53Client","UpdateTrafficPolicyInstanceCommand").f(void 0,void 0).ser(OB).de(wV).build(){}var Sp={ActivateKeySigningKeyCommand:_6,AssociateVPCWithHostedZoneCommand:g6,ChangeCidrCollectionCommand:x6,ChangeResourceRecordSetsCommand:e6,ChangeTagsForResourceCommand:n6,CreateCidrCollectionCommand:o6,CreateHealthCheckCommand:a6,CreateHostedZoneCommand:p6,CreateKeySigningKeyCommand:u6,CreateQueryLoggingConfigCommand:t6,CreateReusableDelegationSetCommand:rC,CreateTrafficPolicyCommand:sC,CreateTrafficPolicyInstanceCommand:fC,CreateTrafficPolicyVersionCommand:wC,CreateVPCAssociationAuthorizationCommand:hC,DeactivateKeySigningKeyCommand:EC,DeleteCidrCollectionCommand:$C,DeleteHealthCheckCommand:IC,DeleteHostedZoneCommand:FC,DeleteKeySigningKeyCommand:UC,DeleteQueryLoggingConfigCommand:TC,DeleteReusableDelegationSetCommand:GC,DeleteTrafficPolicyCommand:CC,DeleteTrafficPolicyInstanceCommand:LC,DeleteVPCAssociationAuthorizationCommand:AC,DisableHostedZoneDNSSECCommand:RC,DisassociateVPCFromHostedZoneCommand:WC,EnableHostedZoneDNSSECCommand:zC,GetAccountLimitCommand:SC,GetChangeCommand:PC,GetCheckerIpRangesCommand:XC,GetDNSSECCommand:YC,GetGeoLocationCommand:KC,GetHealthCheckCommand:ZC,GetHealthCheckCountCommand:MC,GetHealthCheckLastFailureReasonCommand:JC,GetHealthCheckStatusCommand:QC,GetHostedZoneCommand:BC,GetHostedZoneCountCommand:lC,GetHostedZoneLimitCommand:VC,GetQueryLoggingConfigCommand:HC,GetReusableDelegationSetCommand:DC,GetReusableDelegationSetLimitCommand:kC,GetTrafficPolicyCommand:NC,GetTrafficPolicyInstanceCommand:yC,GetTrafficPolicyInstanceCountCommand:qC,ListCidrBlocksCommand:mC,ListCidrCollectionsCommand:vC,ListCidrLocationsCommand:jC,ListGeoLocationsCommand:iC,ListHealthChecksCommand:dC,ListHostedZonesCommand:cC,ListHostedZonesByNameCommand:OC,ListHostedZonesByVPCCommand:bC,ListQueryLoggingConfigsCommand:_C,ListResourceRecordSetsCommand:gC,ListReusableDelegationSetsCommand:xC,ListTagsForResourceCommand:eC,ListTagsForResourcesCommand:nC,ListTrafficPoliciesCommand:oC,ListTrafficPolicyInstancesCommand:uC,ListTrafficPolicyInstancesByHostedZoneCommand:aC,ListTrafficPolicyInstancesByPolicyCommand:pC,ListTrafficPolicyVersionsCommand:tC,ListVPCAssociationAuthorizationsCommand:r4,TestDNSAnswerCommand:s4,UpdateHealthCheckCommand:f4,UpdateHostedZoneCommentCommand:w4,UpdateTrafficPolicyCommentCommand:h4,UpdateTrafficPolicyInstanceCommand:E4};class Fw extends lG{}yf(Sp,Fw);ew();nw();ow();pw();Ms();var h1=u(Or(),1);Ih();B();ff();Y();var PV=u(lr(),1);as();function Pp(r){return{schemeId:"aws.auth#sigv4",signingProperties:{name:"route53domains",region:r.region},propertiesExtractor:(f,s)=>({signingProperties:{config:f,context:s}})}}var XV=async(r,f,s)=>{return{operation:Ks(f).operation,region:await Nr(r.region)()||(()=>{throw new Error("expected `region` to be configured for `aws.auth#sigv4`")})()}},YV=(r)=>{const f=[];switch(r.operation){default:f.push(Pp(r))}return f},KV=(r)=>{return{...PV.resolveAwsSdkSigV4Config(r)}};var ZV=(r)=>{return{...r,useDualstackEndpoint:r.useDualstackEndpoint??!1,useFipsEndpoint:r.useFipsEndpoint??!1,defaultSigningName:"route53domains"}},c={UseFIPS:{type:"builtInParams",name:"useFipsEndpoint"},Endpoint:{type:"builtInParams",name:"endpoint"},Region:{type:"builtInParams",name:"region"},UseDualStack:{type:"builtInParams",name:"useDualstackEndpoint"}};var MV={name:"@aws-sdk/client-route-53-domains",description:"AWS SDK for JavaScript Route 53 Domains Client for Node.js, Browser and React Native",version:"3.637.0",scripts:{build:"concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'","build:cjs":"node ../../scripts/compilation/inline client-route-53-domains","build:es":"tsc -p tsconfig.es.json","build:include:deps":"lerna run --scope $npm_package_name --include-dependencies build","build:types":"tsc -p tsconfig.types.json","build:types:downlevel":"downlevel-dts dist-types dist-types/ts3.4",clean:"rimraf ./dist-* && rimraf *.tsbuildinfo","extract:docs":"api-extractor run --local","generate:client":"node ../../scripts/generate-clients/single-service --solo route-53-domains"},main:"./dist-cjs/index.js",types:"./dist-types/index.d.ts",module:"./dist-es/index.js",sideEffects:!1,dependencies:{"@aws-crypto/sha256-browser":"5.2.0","@aws-crypto/sha256-js":"5.2.0","@aws-sdk/client-sso-oidc":"3.637.0","@aws-sdk/client-sts":"3.637.0","@aws-sdk/core":"3.635.0","@aws-sdk/credential-provider-node":"3.637.0","@aws-sdk/middleware-host-header":"3.620.0","@aws-sdk/middleware-logger":"3.609.0","@aws-sdk/middleware-recursion-detection":"3.620.0","@aws-sdk/middleware-user-agent":"3.637.0","@aws-sdk/region-config-resolver":"3.614.0","@aws-sdk/types":"3.609.0","@aws-sdk/util-endpoints":"3.637.0","@aws-sdk/util-user-agent-browser":"3.609.0","@aws-sdk/util-user-agent-node":"3.614.0","@smithy/config-resolver":"^3.0.5","@smithy/core":"^2.4.0","@smithy/fetch-http-handler":"^3.2.4","@smithy/hash-node":"^3.0.3","@smithy/invalid-dependency":"^3.0.3","@smithy/middleware-content-length":"^3.0.5","@smithy/middleware-endpoint":"^3.1.0","@smithy/middleware-retry":"^3.0.15","@smithy/middleware-serde":"^3.0.3","@smithy/middleware-stack":"^3.0.3","@smithy/node-config-provider":"^3.1.4","@smithy/node-http-handler":"^3.1.4","@smithy/protocol-http":"^4.1.0","@smithy/smithy-client":"^3.2.0","@smithy/types":"^3.3.0","@smithy/url-parser":"^3.0.3","@smithy/util-base64":"^3.0.0","@smithy/util-body-length-browser":"^3.0.0","@smithy/util-body-length-node":"^3.0.0","@smithy/util-defaults-mode-browser":"^3.0.15","@smithy/util-defaults-mode-node":"^3.0.15","@smithy/util-endpoints":"^2.0.5","@smithy/util-middleware":"^3.0.3","@smithy/util-retry":"^3.0.3","@smithy/util-utf8":"^3.0.0",tslib:"^2.6.2"},devDependencies:{"@tsconfig/node16":"16.1.3","@types/node":"^16.18.96",concurrently:"7.0.0","downlevel-dts":"0.10.1",rimraf:"3.0.2",typescript:"~4.9.5"},engines:{node:">=16.0.0"},typesVersions:{"<4.0":{"dist-types/*":["dist-types/ts3.4/*"]}},files:["dist-*/**"],author:{name:"AWS SDK for JavaScript Team",url:"https://aws.amazon.com/javascript/"},license:"Apache-2.0",browser:{"./dist-es/runtimeConfig":"./dist-es/runtimeConfig.browser"},"react-native":{"./dist-es/runtimeConfig":"./dist-es/runtimeConfig.native"},homepage:"https://github.com/aws/aws-sdk-js-v3/tree/main/clients/client-route-53-domains",repository:{type:"git",url:"https://github.com/aws/aws-sdk-js-v3.git",directory:"clients/client-route-53-domains"}};var iV=u(lr(),1);O1();Ph();Ms();Kh();ff();sf();lw();Zh();Cs();var vV=u(lr(),1);Y();j0();Mh();x0();Cw();ns();var JV={["required"]:!1,type:"String"},QV={["required"]:!0,default:!1,type:"Boolean"},BV={["ref"]:"Endpoint"},NV={["fn"]:"booleanEquals",["argv"]:[{["ref"]:"UseFIPS"},!0]},yV={["fn"]:"booleanEquals",["argv"]:[{["ref"]:"UseDualStack"},!0]},F0={},lV={["fn"]:"getAttr",["argv"]:[{["ref"]:"PartitionResult"},"supportsFIPS"]},VV={["fn"]:"booleanEquals",["argv"]:[!0,{["fn"]:"getAttr",["argv"]:[{["ref"]:"PartitionResult"},"supportsDualStack"]}]},HV=[NV],DV=[yV],kV=[{["ref"]:"Region"}],Yp={version:"1.0",parameters:{Region:JV,UseDualStack:QV,UseFIPS:QV,Endpoint:JV},rules:[{conditions:[{["fn"]:"isSet",["argv"]:[BV]}],rules:[{conditions:HV,error:"Invalid Configuration: FIPS and custom endpoint are not supported",type:"error"},{conditions:DV,error:"Invalid Configuration: Dualstack and custom endpoint are not supported",type:"error"},{endpoint:{url:BV,properties:F0,headers:F0},type:"endpoint"}],type:"tree"},{conditions:[{["fn"]:"isSet",["argv"]:kV}],rules:[{conditions:[{["fn"]:"aws.partition",["argv"]:kV,assign:"PartitionResult"}],rules:[{conditions:[NV,yV],rules:[{conditions:[{["fn"]:"booleanEquals",["argv"]:[!0,lV]},VV],rules:[{endpoint:{url:"https://route53domains-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:F0,headers:F0},type:"endpoint"}],type:"tree"},{error:"FIPS and DualStack are enabled, but this partition does not support one or both",type:"error"}],type:"tree"},{conditions:HV,rules:[{conditions:[{["fn"]:"booleanEquals",["argv"]:[lV,!0]}],rules:[{endpoint:{url:"https://route53domains-fips.{Region}.{PartitionResult#dnsSuffix}",properties:F0,headers:F0},type:"endpoint"}],type:"tree"},{error:"FIPS is enabled but this partition does not support FIPS",type:"error"}],type:"tree"},{conditions:DV,rules:[{conditions:[VV],rules:[{endpoint:{url:"https://route53domains.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:F0,headers:F0},type:"endpoint"}],type:"tree"},{error:"DualStack is enabled but this partition does not support DualStack",type:"error"}],type:"tree"},{endpoint:{url:"https://route53domains.{Region}.{PartitionResult#dnsSuffix}",properties:F0,headers:F0},type:"endpoint"}],type:"tree"}],type:"tree"},{error:"Invalid Configuration: Missing Region",type:"error"}]},qV=Yp;var mV=(r,f={})=>{return es(qV,{endpointParams:r,logger:f.logger})};pr.aws=os;var jV=(r)=>{return{apiVersion:"2014-05-15",base64Decoder:r?.base64Decoder??ef,base64Encoder:r?.base64Encoder??nf,disableHostPrefix:r?.disableHostPrefix??!1,endpointProvider:r?.endpointProvider??mV,extensions:r?.extensions??[],httpAuthSchemeProvider:r?.httpAuthSchemeProvider??YV,httpAuthSchemes:r?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:(f)=>f.getIdentityProvider("aws.auth#sigv4"),signer:new vV.AwsSdkSigV4Signer}],logger:r?.logger??new Ls,serviceId:r?.serviceId??"Route 53 Domains",urlParser:r?.urlParser??_r,utf8Decoder:r?.utf8Decoder??Us,utf8Encoder:r?.utf8Encoder??gf}};Y();Jh();Y();var dV=(r)=>{jf(process.version);const f=of(r),s=()=>f().then(vf),w=jV(r);return iV.emitWarningIfUnsupportedVersion(process.version),{...w,...r,runtime:"node",defaultsMode:f,bodyLengthChecker:r?.bodyLengthChecker??xf,credentialDefaultProvider:r?.credentialDefaultProvider??A0,defaultUserAgentProvider:r?.defaultUserAgentProvider??_f({serviceId:w.serviceId,clientVersion:MV.version}),maxAttempts:r?.maxAttempts??t(Df),region:r?.region??t(Zs,Jf),requestHandler:tr.create(r?.requestHandler??s),retryMode:r?.retryMode??t({...Nf,default:async()=>(await s()).retryMode||Ds}),sha256:r?.sha256??wf.bind(null,"sha256"),streamCollector:r?.streamCollector??cf,useDualstackEndpoint:r?.useDualstackEndpoint??t(Zf),useFipsEndpoint:r?.useFipsEndpoint??t(Mf)}};Qh();qr();Y();var OV=(r)=>{const f=r.httpAuthSchemes;let{httpAuthSchemeProvider:s,credentials:w}=r;return{setHttpAuthScheme(h){const E=f.findIndex(($)=>$.schemeId===h.schemeId);if(E===-1)f.push(h);else f.splice(E,1,h)},httpAuthSchemes(){return f},setHttpAuthSchemeProvider(h){s=h},httpAuthSchemeProvider(){return s},setCredentials(h){w=h},credentials(){return w}}},bV=(r)=>{return{httpAuthSchemes:r.httpAuthSchemes(),httpAuthSchemeProvider:r.httpAuthSchemeProvider(),credentials:r.credentials()}};var hF=(r)=>r,cV=(r,f)=>{const s={...hF(af(r)),...hF(df(r)),...hF(Rf(r)),...hF(OV(r))};return f.forEach((w)=>w.configure(s)),{...r,...pf(s),...Of(s),...Wf(s),...bV(s)}};class $4 extends As{constructor(...[r]){const f=dV(r||{}),s=ZV(f),w=Yf(s),h=kf(w),E=Qf(h),$=zf(E),I=Vf($),F=KV(I),U=cV(F,r?.extensions||[]);super(U);this.config=U,this.middlewareStack.use(Kf(this.config)),this.middlewareStack.use(bf(this.config)),this.middlewareStack.use(lf(this.config)),this.middlewareStack.use(Sf(this.config)),this.middlewareStack.use(Pf(this.config)),this.middlewareStack.use(Xf(this.config)),this.middlewareStack.use(h1.getHttpAuthSchemeEndpointRuleSetPlugin(this.config,{httpAuthSchemeParametersProvider:XV,identityProviderConfigProvider:async(C)=>new h1.DefaultIdentityProviderConfig({"aws.auth#sigv4":C.credentials})})),this.middlewareStack.use(h1.getHttpSigningPlugin(this.config))}destroy(){super.destroy()}}Y();B();V();Y();Y();Y();class gs extends ks{constructor(r){super(r);Object.setPrototypeOf(this,gs.prototype)}}class EF extends gs{constructor(r){super({name:"DomainLimitExceeded",$fault:"client",...r});this.name="DomainLimitExceeded",this.$fault="client",Object.setPrototypeOf(this,EF.prototype)}}class $F extends gs{constructor(r){super({name:"InvalidInput",$fault:"client",...r});this.name="InvalidInput",this.$fault="client",Object.setPrototypeOf(this,$F.prototype)}}class IF extends gs{constructor(r){super({name:"OperationLimitExceeded",$fault:"client",...r});this.name="OperationLimitExceeded",this.$fault="client",Object.setPrototypeOf(this,IF.prototype)}}class FF extends gs{constructor(r){super({name:"UnsupportedTLD",$fault:"client",...r});this.name="UnsupportedTLD",this.$fault="client",Object.setPrototypeOf(this,FF.prototype)}}class UF extends gs{constructor(r){super({name:"DnssecLimitExceeded",$fault:"client",...r});this.name="DnssecLimitExceeded",this.$fault="client",Object.setPrototypeOf(this,UF.prototype)}}class TF extends gs{constructor(r){super({name:"DuplicateRequest",$fault:"client",...r});this.name="DuplicateRequest",this.$fault="client",Object.setPrototypeOf(this,TF.prototype),this.requestId=r.requestId}}class GF extends gs{constructor(r){super({name:"TLDRulesViolation",$fault:"client",...r});this.name="TLDRulesViolation",this.$fault="client",Object.setPrototypeOf(this,GF.prototype)}}var _V=(r)=>({...r,...r.Password&&{Password:o}}),gV=(r)=>({...r,...r.AuthCode&&{AuthCode:o}});var xV=(r)=>({...r,...r.AdminContact&&{AdminContact:o},...r.RegistrantContact&&{RegistrantContact:o},...r.TechContact&&{TechContact:o},...r.AbuseContactEmail&&{AbuseContactEmail:o},...r.AbuseContactPhone&&{AbuseContactPhone:o},...r.BillingContact&&{BillingContact:o}}),eV=(r)=>({...r,...r.AdminContact&&{AdminContact:o},...r.RegistrantContact&&{RegistrantContact:o},...r.TechContact&&{TechContact:o},...r.BillingContact&&{BillingContact:o}}),nV=(r)=>({...r,...r.emailAddress&&{emailAddress:o}}),oV=(r)=>({...r,...r.AuthCode&&{AuthCode:o}}),aV=(r)=>({...r,...r.AuthCode&&{AuthCode:o},...r.AdminContact&&{AdminContact:o},...r.RegistrantContact&&{RegistrantContact:o},...r.TechContact&&{TechContact:o},...r.BillingContact&&{BillingContact:o}}),pV=(r)=>({...r,...r.Password&&{Password:o}}),uV=(r)=>({...r,...r.AdminContact&&{AdminContact:o},...r.RegistrantContact&&{RegistrantContact:o},...r.TechContact&&{TechContact:o},...r.BillingContact&&{BillingContact:o}}),tV=(r)=>({...r,...r.FIAuthKey&&{FIAuthKey:o}});var fr=u(lr(),1);qr();Y();function Fr(r){return{"content-type":"application/x-amz-json-1.1","x-amz-target":`Route53Domains_v20140515.${r}`}}var rH=async(r,f)=>{const s=Fr("AcceptDomainTransferFromAnotherAwsAccount");let w;return w=JSON.stringify(q(r)),Ir(f,s,"/",void 0,w)},sH=async(r,f)=>{const s=Fr("AssociateDelegationSignerToDomain");let w;return w=JSON.stringify(q(r)),Ir(f,s,"/",void 0,w)},fH=async(r,f)=>{const s=Fr("CancelDomainTransferToAnotherAwsAccount");let w;return w=JSON.stringify(q(r)),Ir(f,s,"/",void 0,w)},wH=async(r,f)=>{const s=Fr("CheckDomainAvailability");let w;return w=JSON.stringify(q(r)),Ir(f,s,"/",void 0,w)},hH=async(r,f)=>{const s=Fr("CheckDomainTransferability");let w;return w=JSON.stringify(q(r)),Ir(f,s,"/",void 0,w)},EH=async(r,f)=>{const s=Fr("DeleteDomain");let w;return w=JSON.stringify(q(r)),Ir(f,s,"/",void 0,w)},$H=async(r,f)=>{const s=Fr("DeleteTagsForDomain");let w;return w=JSON.stringify(q(r)),Ir(f,s,"/",void 0,w)},IH=async(r,f)=>{const s=Fr("DisableDomainAutoRenew");let w;return w=JSON.stringify(q(r)),Ir(f,s,"/",void 0,w)},FH=async(r,f)=>{const s=Fr("DisableDomainTransferLock");let w;return w=JSON.stringify(q(r)),Ir(f,s,"/",void 0,w)},UH=async(r,f)=>{const s=Fr("DisassociateDelegationSignerFromDomain");let w;return w=JSON.stringify(q(r)),Ir(f,s,"/",void 0,w)},TH=async(r,f)=>{const s=Fr("EnableDomainAutoRenew");let w;return w=JSON.stringify(q(r)),Ir(f,s,"/",void 0,w)},GH=async(r,f)=>{const s=Fr("EnableDomainTransferLock");let w;return w=JSON.stringify(q(r)),Ir(f,s,"/",void 0,w)},CH=async(r,f)=>{const s=Fr("GetContactReachabilityStatus");let w;return w=JSON.stringify(q(r)),Ir(f,s,"/",void 0,w)},LH=async(r,f)=>{const s=Fr("GetDomainDetail");let w;return w=JSON.stringify(q(r)),Ir(f,s,"/",void 0,w)},AH=async(r,f)=>{const s=Fr("GetDomainSuggestions");let w;return w=JSON.stringify(q(r)),Ir(f,s,"/",void 0,w)},RH=async(r,f)=>{const s=Fr("GetOperationDetail");let w;return w=JSON.stringify(q(r)),Ir(f,s,"/",void 0,w)},WH=async(r,f)=>{const s=Fr("ListDomains");let w;return w=JSON.stringify(q(r)),Ir(f,s,"/",void 0,w)},zH=async(r,f)=>{const s=Fr("ListOperations");let w;return w=JSON.stringify(Hp(r,f)),Ir(f,s,"/",void 0,w)},SH=async(r,f)=>{const s=Fr("ListPrices");let w;return w=JSON.stringify(q(r)),Ir(f,s,"/",void 0,w)},PH=async(r,f)=>{const s=Fr("ListTagsForDomain");let w;return w=JSON.stringify(q(r)),Ir(f,s,"/",void 0,w)},XH=async(r,f)=>{const s=Fr("PushDomain");let w;return w=JSON.stringify(q(r)),Ir(f,s,"/",void 0,w)},YH=async(r,f)=>{const s=Fr("RegisterDomain");let w;return w=JSON.stringify(q(r)),Ir(f,s,"/",void 0,w)},KH=async(r,f)=>{const s=Fr("RejectDomainTransferFromAnotherAwsAccount");let w;return w=JSON.stringify(q(r)),Ir(f,s,"/",void 0,w)},ZH=async(r,f)=>{const s=Fr("RenewDomain");let w;return w=JSON.stringify(q(r)),Ir(f,s,"/",void 0,w)},MH=async(r,f)=>{const s=Fr("ResendContactReachabilityEmail");let w;return w=JSON.stringify(q(r)),Ir(f,s,"/",void 0,w)},JH=async(r,f)=>{const s=Fr("ResendOperationAuthorization");let w;return w=JSON.stringify(q(r)),Ir(f,s,"/",void 0,w)},QH=async(r,f)=>{const s=Fr("RetrieveDomainAuthCode");let w;return w=JSON.stringify(q(r)),Ir(f,s,"/",void 0,w)},BH=async(r,f)=>{const s=Fr("TransferDomain");let w;return w=JSON.stringify(q(r)),Ir(f,s,"/",void 0,w)},lH=async(r,f)=>{const s=Fr("TransferDomainToAnotherAwsAccount");let w;return w=JSON.stringify(q(r)),Ir(f,s,"/",void 0,w)},VH=async(r,f)=>{const s=Fr("UpdateDomainContact");let w;return w=JSON.stringify(Dp(r,f)),Ir(f,s,"/",void 0,w)},HH=async(r,f)=>{const s=Fr("UpdateDomainContactPrivacy");let w;return w=JSON.stringify(q(r)),Ir(f,s,"/",void 0,w)},DH=async(r,f)=>{const s=Fr("UpdateDomainNameservers");let w;return w=JSON.stringify(q(r)),Ir(f,s,"/",void 0,w)},kH=async(r,f)=>{const s=Fr("UpdateTagsForDomain");let w;return w=JSON.stringify(q(r)),Ir(f,s,"/",void 0,w)},NH=async(r,f)=>{const s=Fr("ViewBilling");let w;return w=JSON.stringify(kp(r,f)),Ir(f,s,"/",void 0,w)},yH=async(r,f)=>{if(r.statusCode>=300)return $r(r,f);const s=await fr.parseJsonBody(r.body,f);let w={};return w=q(s),{$metadata:rr(r),...w}},qH=async(r,f)=>{if(r.statusCode>=300)return $r(r,f);const s=await fr.parseJsonBody(r.body,f);let w={};return w=q(s),{$metadata:rr(r),...w}},mH=async(r,f)=>{if(r.statusCode>=300)return $r(r,f);const s=await fr.parseJsonBody(r.body,f);let w={};return w=q(s),{$metadata:rr(r),...w}},vH=async(r,f)=>{if(r.statusCode>=300)return $r(r,f);const s=await fr.parseJsonBody(r.body,f);let w={};return w=q(s),{$metadata:rr(r),...w}},jH=async(r,f)=>{if(r.statusCode>=300)return $r(r,f);const s=await fr.parseJsonBody(r.body,f);let w={};return w=q(s),{$metadata:rr(r),...w}},iH=async(r,f)=>{if(r.statusCode>=300)return $r(r,f);const s=await fr.parseJsonBody(r.body,f);let w={};return w=q(s),{$metadata:rr(r),...w}},dH=async(r,f)=>{if(r.statusCode>=300)return $r(r,f);const s=await fr.parseJsonBody(r.body,f);let w={};return w=q(s),{$metadata:rr(r),...w}},OH=async(r,f)=>{if(r.statusCode>=300)return $r(r,f);const s=await fr.parseJsonBody(r.body,f);let w={};return w=q(s),{$metadata:rr(r),...w}},bH=async(r,f)=>{if(r.statusCode>=300)return $r(r,f);const s=await fr.parseJsonBody(r.body,f);let w={};return w=q(s),{$metadata:rr(r),...w}},cH=async(r,f)=>{if(r.statusCode>=300)return $r(r,f);const s=await fr.parseJsonBody(r.body,f);let w={};return w=q(s),{$metadata:rr(r),...w}},_H=async(r,f)=>{if(r.statusCode>=300)return $r(r,f);const s=await fr.parseJsonBody(r.body,f);let w={};return w=q(s),{$metadata:rr(r),...w}},gH=async(r,f)=>{if(r.statusCode>=300)return $r(r,f);const s=await fr.parseJsonBody(r.body,f);let w={};return w=q(s),{$metadata:rr(r),...w}},xH=async(r,f)=>{if(r.statusCode>=300)return $r(r,f);const s=await fr.parseJsonBody(r.body,f);let w={};return w=q(s),{$metadata:rr(r),...w}},eH=async(r,f)=>{if(r.statusCode>=300)return $r(r,f);const s=await fr.parseJsonBody(r.body,f);let w={};return w=ip(s,f),{$metadata:rr(r),...w}},nH=async(r,f)=>{if(r.statusCode>=300)return $r(r,f);const s=await fr.parseJsonBody(r.body,f);let w={};return w=q(s),{$metadata:rr(r),...w}},oH=async(r,f)=>{if(r.statusCode>=300)return $r(r,f);const s=await fr.parseJsonBody(r.body,f);let w={};return w=dp(s,f),{$metadata:rr(r),...w}},aH=async(r,f)=>{if(r.statusCode>=300)return $r(r,f);const s=await fr.parseJsonBody(r.body,f);let w={};return w=Op(s,f),{$metadata:rr(r),...w}},pH=async(r,f)=>{if(r.statusCode>=300)return $r(r,f);const s=await fr.parseJsonBody(r.body,f);let w={};return w=bp(s,f),{$metadata:rr(r),...w}},uH=async(r,f)=>{if(r.statusCode>=300)return $r(r,f);const s=await fr.parseJsonBody(r.body,f);let w={};return w=cp(s,f),{$metadata:rr(r),...w}},tH=async(r,f)=>{if(r.statusCode>=300)return $r(r,f);const s=await fr.parseJsonBody(r.body,f);let w={};return w=q(s),{$metadata:rr(r),...w}},rD=async(r,f)=>{if(r.statusCode>=300)return $r(r,f);return await gr(r.body,f),{$metadata:rr(r)}},sD=async(r,f)=>{if(r.statusCode>=300)return $r(r,f);const s=await fr.parseJsonBody(r.body,f);let w={};return w=q(s),{$metadata:rr(r),...w}},fD=async(r,f)=>{if(r.statusCode>=300)return $r(r,f);const s=await fr.parseJsonBody(r.body,f);let w={};return w=q(s),{$metadata:rr(r),...w}},wD=async(r,f)=>{if(r.statusCode>=300)return $r(r,f);const s=await fr.parseJsonBody(r.body,f);let w={};return w=q(s),{$metadata:rr(r),...w}},hD=async(r,f)=>{if(r.statusCode>=300)return $r(r,f);const s=await fr.parseJsonBody(r.body,f);let w={};return w=q(s),{$metadata:rr(r),...w}},ED=async(r,f)=>{if(r.statusCode>=300)return $r(r,f);return await gr(r.body,f),{$metadata:rr(r)}},$D=async(r,f)=>{if(r.statusCode>=300)return $r(r,f);const s=await fr.parseJsonBody(r.body,f);let w={};return w=q(s),{$metadata:rr(r),...w}},ID=async(r,f)=>{if(r.statusCode>=300)return $r(r,f);const s=await fr.parseJsonBody(r.body,f);let w={};return w=q(s),{$metadata:rr(r),...w}},FD=async(r,f)=>{if(r.statusCode>=300)return $r(r,f);const s=await fr.parseJsonBody(r.body,f);let w={};return w=q(s),{$metadata:rr(r),...w}},UD=async(r,f)=>{if(r.statusCode>=300)return $r(r,f);const s=await fr.parseJsonBody(r.body,f);let w={};return w=q(s),{$metadata:rr(r),...w}},TD=async(r,f)=>{if(r.statusCode>=300)return $r(r,f);const s=await fr.parseJsonBody(r.body,f);let w={};return w=q(s),{$metadata:rr(r),...w}},GD=async(r,f)=>{if(r.statusCode>=300)return $r(r,f);const s=await fr.parseJsonBody(r.body,f);let w={};return w=q(s),{$metadata:rr(r),...w}},CD=async(r,f)=>{if(r.statusCode>=300)return $r(r,f);const s=await fr.parseJsonBody(r.body,f);let w={};return w=q(s),{$metadata:rr(r),...w}},LD=async(r,f)=>{if(r.statusCode>=300)return $r(r,f);const s=await fr.parseJsonBody(r.body,f);let w={};return w=xp(s,f),{$metadata:rr(r),...w}},$r=async(r,f)=>{const s={...r,body:await fr.parseJsonErrorBody(r.body,f)},w=fr.loadRestJsonErrorCode(r,s.body);switch(w){case"DomainLimitExceeded":case"com.amazonaws.route53domains#DomainLimitExceeded":throw await Zp(s,f);case"InvalidInput":case"com.amazonaws.route53domains#InvalidInput":throw await Jp(s,f);case"OperationLimitExceeded":case"com.amazonaws.route53domains#OperationLimitExceeded":throw await Qp(s,f);case"UnsupportedTLD":case"com.amazonaws.route53domains#UnsupportedTLD":throw await lp(s,f);case"DnssecLimitExceeded":case"com.amazonaws.route53domains#DnssecLimitExceeded":throw await Kp(s,f);case"DuplicateRequest":case"com.amazonaws.route53domains#DuplicateRequest":throw await Mp(s,f);case"TLDRulesViolation":case"com.amazonaws.route53domains#TLDRulesViolation":throw await Bp(s,f);default:const h=s.body;return ep({output:r,parsedBody:h,errorCode:w})}},Kp=async(r,f)=>{const s=r.body,w=q(s),h=new UF({$metadata:rr(r),...w});return D(h,s)},Zp=async(r,f)=>{const s=r.body,w=q(s),h=new EF({$metadata:rr(r),...w});return D(h,s)},Mp=async(r,f)=>{const s=r.body,w=q(s),h=new TF({$metadata:rr(r),...w});return D(h,s)},Jp=async(r,f)=>{const s=r.body,w=q(s),h=new $F({$metadata:rr(r),...w});return D(h,s)},Qp=async(r,f)=>{const s=r.body,w=q(s),h=new IF({$metadata:rr(r),...w});return D(h,s)},Bp=async(r,f)=>{const s=r.body,w=q(s),h=new GF({$metadata:rr(r),...w});return D(h,s)},lp=async(r,f)=>{const s=r.body,w=q(s),h=new FF({$metadata:rr(r),...w});return D(h,s)},Vp=(r,f)=>{return p(r,{Currency:[],MaxPrice:VX})},Hp=(r,f)=>{return p(r,{Marker:[],MaxItems:[],SortBy:[],SortOrder:[],Status:q,SubmittedSince:(s)=>s.getTime()/1000,Type:q})},Dp=(r,f)=>{return p(r,{AdminContact:q,BillingContact:q,Consent:(s)=>Vp(s,f),DomainName:[],RegistrantContact:q,TechContact:q})},kp=(r,f)=>{return p(r,{End:(s)=>s.getTime()/1000,Marker:[],MaxItems:[],Start:(s)=>s.getTime()/1000})},Np=(r,f)=>{return p(r,{BillDate:(s)=>y(qf(Fs(s))),DomainName:T,InvoiceId:T,Operation:T,Price:IU})},yp=(r,f)=>{return(r||[]).filter((w)=>w!=null).map((w)=>{return Np(w,f)})},qp=(r,f)=>{return p(r,{ChangeOwnershipPrice:(s)=>s$(s,f),Name:T,RegistrationPrice:(s)=>s$(s,f),RenewalPrice:(s)=>s$(s,f),RestorationPrice:(s)=>s$(s,f),TransferPrice:(s)=>s$(s,f)})},mp=(r,f)=>{return(r||[]).filter((w)=>w!=null).map((w)=>{return qp(w,f)})},vp=(r,f)=>{return p(r,{AutoRenew:d0,DomainName:T,Expiry:(s)=>y(qf(Fs(s))),TransferLock:d0})},jp=(r,f)=>{return(r||[]).filter((w)=>w!=null).map((w)=>{return vp(w,f)})},ip=(r,f)=>{return p(r,{AbuseContactEmail:T,AbuseContactPhone:T,AdminContact:q,AdminPrivacy:d0,AutoRenew:d0,BillingContact:q,BillingPrivacy:d0,CreationDate:(s)=>y(qf(Fs(s))),DnsSec:T,DnssecKeys:q,DomainName:T,ExpirationDate:(s)=>y(qf(Fs(s))),Nameservers:q,RegistrantContact:q,RegistrantPrivacy:d0,RegistrarName:T,RegistrarUrl:T,RegistryDomainId:T,Reseller:T,StatusList:q,TechContact:q,TechPrivacy:d0,UpdatedDate:(s)=>y(qf(Fs(s))),WhoIsServer:T})},dp=(r,f)=>{return p(r,{DomainName:T,LastUpdatedDate:(s)=>y(qf(Fs(s))),Message:T,OperationId:T,Status:T,StatusFlag:T,SubmittedDate:(s)=>y(qf(Fs(s))),Type:T})},Op=(r,f)=>{return p(r,{Domains:(s)=>jp(s,f),NextPageMarker:T})},bp=(r,f)=>{return p(r,{NextPageMarker:T,Operations:(s)=>gp(s,f)})},cp=(r,f)=>{return p(r,{NextPageMarker:T,Prices:(s)=>mp(s,f)})},_p=(r,f)=>{return p(r,{DomainName:T,LastUpdatedDate:(s)=>y(qf(Fs(s))),Message:T,OperationId:T,Status:T,StatusFlag:T,SubmittedDate:(s)=>y(qf(Fs(s))),Type:T})},gp=(r,f)=>{return(r||[]).filter((w)=>w!=null).map((w)=>{return _p(w,f)})},s$=(r,f)=>{return p(r,{Currency:T,Price:IU})},xp=(r,f)=>{return p(r,{BillingRecords:(s)=>yp(s,f),NextPageMarker:T})},rr=(r)=>({httpStatusCode:r.statusCode,requestId:r.headers["x-amzn-requestid"]??r.headers["x-amzn-request-id"]??r.headers["x-amz-request-id"],extendedRequestId:r.headers["x-amz-id-2"],cfId:r.headers["x-amz-cf-id"]});var ep=mf(gs),Ir=async(r,f,s,w,h)=>{const{hostname:E,protocol:$="https",port:I,path:F}=await r.endpoint(),U={protocol:$,hostname:E,port:I,method:"POST",path:F.endsWith("/")?F.slice(0,-1)+s:F+s,headers:f};if(w!==void 0)U.hostname=w;if(h!==void 0)U.body=h;return new Qr(U)};class I4 extends A.classBuilder().ep({...c}).m(function(r,f,s,w){return[R(s,this.serialize,this.deserialize),W(s,r.getEndpointParameterInstructions())]}).s("Route53Domains_v20140515","AcceptDomainTransferFromAnotherAwsAccount",{}).n("Route53DomainsClient","AcceptDomainTransferFromAnotherAwsAccountCommand").f(_V,void 0).ser(rH).de(yH).build(){}B();V();Y();class F4 extends A.classBuilder().ep({...c}).m(function(r,f,s,w){return[R(s,this.serialize,this.deserialize),W(s,r.getEndpointParameterInstructions())]}).s("Route53Domains_v20140515","AssociateDelegationSignerToDomain",{}).n("Route53DomainsClient","AssociateDelegationSignerToDomainCommand").f(void 0,void 0).ser(sH).de(qH).build(){}B();V();Y();class U4 extends A.classBuilder().ep({...c}).m(function(r,f,s,w){return[R(s,this.serialize,this.deserialize),W(s,r.getEndpointParameterInstructions())]}).s("Route53Domains_v20140515","CancelDomainTransferToAnotherAwsAccount",{}).n("Route53DomainsClient","CancelDomainTransferToAnotherAwsAccountCommand").f(void 0,void 0).ser(fH).de(mH).build(){}B();V();Y();class T4 extends A.classBuilder().ep({...c}).m(function(r,f,s,w){return[R(s,this.serialize,this.deserialize),W(s,r.getEndpointParameterInstructions())]}).s("Route53Domains_v20140515","CheckDomainAvailability",{}).n("Route53DomainsClient","CheckDomainAvailabilityCommand").f(void 0,void 0).ser(wH).de(vH).build(){}B();V();Y();class G4 extends A.classBuilder().ep({...c}).m(function(r,f,s,w){return[R(s,this.serialize,this.deserialize),W(s,r.getEndpointParameterInstructions())]}).s("Route53Domains_v20140515","CheckDomainTransferability",{}).n("Route53DomainsClient","CheckDomainTransferabilityCommand").f(gV,void 0).ser(hH).de(jH).build(){}B();V();Y();class C4 extends A.classBuilder().ep({...c}).m(function(r,f,s,w){return[R(s,this.serialize,this.deserialize),W(s,r.getEndpointParameterInstructions())]}).s("Route53Domains_v20140515","DeleteDomain",{}).n("Route53DomainsClient","DeleteDomainCommand").f(void 0,void 0).ser(EH).de(iH).build(){}B();V();Y();class L4 extends A.classBuilder().ep({...c}).m(function(r,f,s,w){return[R(s,this.serialize,this.deserialize),W(s,r.getEndpointParameterInstructions())]}).s("Route53Domains_v20140515","DeleteTagsForDomain",{}).n("Route53DomainsClient","DeleteTagsForDomainCommand").f(void 0,void 0).ser($H).de(dH).build(){}B();V();Y();class A4 extends A.classBuilder().ep({...c}).m(function(r,f,s,w){return[R(s,this.serialize,this.deserialize),W(s,r.getEndpointParameterInstructions())]}).s("Route53Domains_v20140515","DisableDomainAutoRenew",{}).n("Route53DomainsClient","DisableDomainAutoRenewCommand").f(void 0,void 0).ser(IH).de(OH).build(){}B();V();Y();class R4 extends A.classBuilder().ep({...c}).m(function(r,f,s,w){return[R(s,this.serialize,this.deserialize),W(s,r.getEndpointParameterInstructions())]}).s("Route53Domains_v20140515","DisableDomainTransferLock",{}).n("Route53DomainsClient","DisableDomainTransferLockCommand").f(void 0,void 0).ser(FH).de(bH).build(){}B();V();Y();class W4 extends A.classBuilder().ep({...c}).m(function(r,f,s,w){return[R(s,this.serialize,this.deserialize),W(s,r.getEndpointParameterInstructions())]}).s("Route53Domains_v20140515","DisassociateDelegationSignerFromDomain",{}).n("Route53DomainsClient","DisassociateDelegationSignerFromDomainCommand").f(void 0,void 0).ser(UH).de(cH).build(){}B();V();Y();class z4 extends A.classBuilder().ep({...c}).m(function(r,f,s,w){return[R(s,this.serialize,this.deserialize),W(s,r.getEndpointParameterInstructions())]}).s("Route53Domains_v20140515","EnableDomainAutoRenew",{}).n("Route53DomainsClient","EnableDomainAutoRenewCommand").f(void 0,void 0).ser(TH).de(_H).build(){}B();V();Y();class S4 extends A.classBuilder().ep({...c}).m(function(r,f,s,w){return[R(s,this.serialize,this.deserialize),W(s,r.getEndpointParameterInstructions())]}).s("Route53Domains_v20140515","EnableDomainTransferLock",{}).n("Route53DomainsClient","EnableDomainTransferLockCommand").f(void 0,void 0).ser(GH).de(gH).build(){}B();V();Y();class P4 extends A.classBuilder().ep({...c}).m(function(r,f,s,w){return[R(s,this.serialize,this.deserialize),W(s,r.getEndpointParameterInstructions())]}).s("Route53Domains_v20140515","GetContactReachabilityStatus",{}).n("Route53DomainsClient","GetContactReachabilityStatusCommand").f(void 0,void 0).ser(CH).de(xH).build(){}B();V();Y();class X4 extends A.classBuilder().ep({...c}).m(function(r,f,s,w){return[R(s,this.serialize,this.deserialize),W(s,r.getEndpointParameterInstructions())]}).s("Route53Domains_v20140515","GetDomainDetail",{}).n("Route53DomainsClient","GetDomainDetailCommand").f(void 0,xV).ser(LH).de(eH).build(){}B();V();Y();class Y4 extends A.classBuilder().ep({...c}).m(function(r,f,s,w){return[R(s,this.serialize,this.deserialize),W(s,r.getEndpointParameterInstructions())]}).s("Route53Domains_v20140515","GetDomainSuggestions",{}).n("Route53DomainsClient","GetDomainSuggestionsCommand").f(void 0,void 0).ser(AH).de(nH).build(){}B();V();Y();class K4 extends A.classBuilder().ep({...c}).m(function(r,f,s,w){return[R(s,this.serialize,this.deserialize),W(s,r.getEndpointParameterInstructions())]}).s("Route53Domains_v20140515","GetOperationDetail",{}).n("Route53DomainsClient","GetOperationDetailCommand").f(void 0,void 0).ser(RH).de(oH).build(){}B();V();Y();class Z4 extends A.classBuilder().ep({...c}).m(function(r,f,s,w){return[R(s,this.serialize,this.deserialize),W(s,r.getEndpointParameterInstructions())]}).s("Route53Domains_v20140515","ListDomains",{}).n("Route53DomainsClient","ListDomainsCommand").f(void 0,void 0).ser(WH).de(aH).build(){}B();V();Y();class M4 extends A.classBuilder().ep({...c}).m(function(r,f,s,w){return[R(s,this.serialize,this.deserialize),W(s,r.getEndpointParameterInstructions())]}).s("Route53Domains_v20140515","ListOperations",{}).n("Route53DomainsClient","ListOperationsCommand").f(void 0,void 0).ser(zH).de(pH).build(){}B();V();Y();class J4 extends A.classBuilder().ep({...c}).m(function(r,f,s,w){return[R(s,this.serialize,this.deserialize),W(s,r.getEndpointParameterInstructions())]}).s("Route53Domains_v20140515","ListPrices",{}).n("Route53DomainsClient","ListPricesCommand").f(void 0,void 0).ser(SH).de(uH).build(){}B();V();Y();class Q4 extends A.classBuilder().ep({...c}).m(function(r,f,s,w){return[R(s,this.serialize,this.deserialize),W(s,r.getEndpointParameterInstructions())]}).s("Route53Domains_v20140515","ListTagsForDomain",{}).n("Route53DomainsClient","ListTagsForDomainCommand").f(void 0,void 0).ser(PH).de(tH).build(){}B();V();Y();class B4 extends A.classBuilder().ep({...c}).m(function(r,f,s,w){return[R(s,this.serialize,this.deserialize),W(s,r.getEndpointParameterInstructions())]}).s("Route53Domains_v20140515","PushDomain",{}).n("Route53DomainsClient","PushDomainCommand").f(void 0,void 0).ser(XH).de(rD).build(){}B();V();Y();class l4 extends A.classBuilder().ep({...c}).m(function(r,f,s,w){return[R(s,this.serialize,this.deserialize),W(s,r.getEndpointParameterInstructions())]}).s("Route53Domains_v20140515","RegisterDomain",{}).n("Route53DomainsClient","RegisterDomainCommand").f(eV,void 0).ser(YH).de(sD).build(){}B();V();Y();class V4 extends A.classBuilder().ep({...c}).m(function(r,f,s,w){return[R(s,this.serialize,this.deserialize),W(s,r.getEndpointParameterInstructions())]}).s("Route53Domains_v20140515","RejectDomainTransferFromAnotherAwsAccount",{}).n("Route53DomainsClient","RejectDomainTransferFromAnotherAwsAccountCommand").f(void 0,void 0).ser(KH).de(fD).build(){}B();V();Y();class H4 extends A.classBuilder().ep({...c}).m(function(r,f,s,w){return[R(s,this.serialize,this.deserialize),W(s,r.getEndpointParameterInstructions())]}).s("Route53Domains_v20140515","RenewDomain",{}).n("Route53DomainsClient","RenewDomainCommand").f(void 0,void 0).ser(ZH).de(wD).build(){}B();V();Y();class D4 extends A.classBuilder().ep({...c}).m(function(r,f,s,w){return[R(s,this.serialize,this.deserialize),W(s,r.getEndpointParameterInstructions())]}).s("Route53Domains_v20140515","ResendContactReachabilityEmail",{}).n("Route53DomainsClient","ResendContactReachabilityEmailCommand").f(void 0,nV).ser(MH).de(hD).build(){}B();V();Y();class k4 extends A.classBuilder().ep({...c}).m(function(r,f,s,w){return[R(s,this.serialize,this.deserialize),W(s,r.getEndpointParameterInstructions())]}).s("Route53Domains_v20140515","ResendOperationAuthorization",{}).n("Route53DomainsClient","ResendOperationAuthorizationCommand").f(void 0,void 0).ser(JH).de(ED).build(){}B();V();Y();class N4 extends A.classBuilder().ep({...c}).m(function(r,f,s,w){return[R(s,this.serialize,this.deserialize),W(s,r.getEndpointParameterInstructions())]}).s("Route53Domains_v20140515","RetrieveDomainAuthCode",{}).n("Route53DomainsClient","RetrieveDomainAuthCodeCommand").f(void 0,oV).ser(QH).de($D).build(){}B();V();Y();class y4 extends A.classBuilder().ep({...c}).m(function(r,f,s,w){return[R(s,this.serialize,this.deserialize),W(s,r.getEndpointParameterInstructions())]}).s("Route53Domains_v20140515","TransferDomain",{}).n("Route53DomainsClient","TransferDomainCommand").f(aV,void 0).ser(BH).de(ID).build(){}B();V();Y();class q4 extends A.classBuilder().ep({...c}).m(function(r,f,s,w){return[R(s,this.serialize,this.deserialize),W(s,r.getEndpointParameterInstructions())]}).s("Route53Domains_v20140515","TransferDomainToAnotherAwsAccount",{}).n("Route53DomainsClient","TransferDomainToAnotherAwsAccountCommand").f(void 0,pV).ser(lH).de(FD).build(){}B();V();Y();class m4 extends A.classBuilder().ep({...c}).m(function(r,f,s,w){return[R(s,this.serialize,this.deserialize),W(s,r.getEndpointParameterInstructions())]}).s("Route53Domains_v20140515","UpdateDomainContact",{}).n("Route53DomainsClient","UpdateDomainContactCommand").f(uV,void 0).ser(VH).de(UD).build(){}B();V();Y();class v4 extends A.classBuilder().ep({...c}).m(function(r,f,s,w){return[R(s,this.serialize,this.deserialize),W(s,r.getEndpointParameterInstructions())]}).s("Route53Domains_v20140515","UpdateDomainContactPrivacy",{}).n("Route53DomainsClient","UpdateDomainContactPrivacyCommand").f(void 0,void 0).ser(HH).de(TD).build(){}B();V();Y();class j4 extends A.classBuilder().ep({...c}).m(function(r,f,s,w){return[R(s,this.serialize,this.deserialize),W(s,r.getEndpointParameterInstructions())]}).s("Route53Domains_v20140515","UpdateDomainNameservers",{}).n("Route53DomainsClient","UpdateDomainNameserversCommand").f(tV,void 0).ser(DH).de(GD).build(){}B();V();Y();class i4 extends A.classBuilder().ep({...c}).m(function(r,f,s,w){return[R(s,this.serialize,this.deserialize),W(s,r.getEndpointParameterInstructions())]}).s("Route53Domains_v20140515","UpdateTagsForDomain",{}).n("Route53DomainsClient","UpdateTagsForDomainCommand").f(void 0,void 0).ser(kH).de(CD).build(){}B();V();Y();class d4 extends A.classBuilder().ep({...c}).m(function(r,f,s,w){return[R(s,this.serialize,this.deserialize),W(s,r.getEndpointParameterInstructions())]}).s("Route53Domains_v20140515","ViewBilling",{}).n("Route53DomainsClient","ViewBillingCommand").f(void 0,void 0).ser(NH).de(LD).build(){}var np={AcceptDomainTransferFromAnotherAwsAccountCommand:I4,AssociateDelegationSignerToDomainCommand:F4,CancelDomainTransferToAnotherAwsAccountCommand:U4,CheckDomainAvailabilityCommand:T4,CheckDomainTransferabilityCommand:G4,DeleteDomainCommand:C4,DeleteTagsForDomainCommand:L4,DisableDomainAutoRenewCommand:A4,DisableDomainTransferLockCommand:R4,DisassociateDelegationSignerFromDomainCommand:W4,EnableDomainAutoRenewCommand:z4,EnableDomainTransferLockCommand:S4,GetContactReachabilityStatusCommand:P4,GetDomainDetailCommand:X4,GetDomainSuggestionsCommand:Y4,GetOperationDetailCommand:K4,ListDomainsCommand:Z4,ListOperationsCommand:M4,ListPricesCommand:J4,ListTagsForDomainCommand:Q4,PushDomainCommand:B4,RegisterDomainCommand:l4,RejectDomainTransferFromAnotherAwsAccountCommand:V4,RenewDomainCommand:H4,ResendContactReachabilityEmailCommand:D4,ResendOperationAuthorizationCommand:k4,RetrieveDomainAuthCodeCommand:N4,TransferDomainCommand:y4,TransferDomainToAnotherAwsAccountCommand:q4,UpdateDomainContactCommand:m4,UpdateDomainContactPrivacyCommand:v4,UpdateDomainNameserversCommand:j4,UpdateTagsForDomainCommand:i4,ViewBillingCommand:d4};class f$ extends $4{}yf(np,f$);import{runAction as op}from"@stacksjs/actions";import{config as RD}from"@stacksjs/config";import{Action as ap}from"@stacksjs/enums";import{err as xw,handleError as O4,ok as E1}from"@stacksjs/error-handling";import{log as Uw}from"@stacksjs/logging";import{path as pp}from"@stacksjs/path";import{fs as AD}from"@stacksjs/storage";async function Clr(r){const f=new Fw,s=await f.listHostedZonesByName({DNSName:r});if(!s||!s.HostedZones)return xw(`No hosted zones found for domain: ${r}`);const w=s.HostedZones.find((E)=>E.Name===`${r}.`);if(!w)return xw(`Hosted Zone not found for domain: ${r}`);const h=await f.listResourceRecordSets({HostedZoneId:w.Id});if(!h||!h.ResourceRecordSets)return xw(`No DNS records found for domain: ${r}`);for(let E of h.ResourceRecordSets)if(E.Type!=="NS"&&E.Type!=="SOA")await f.changeResourceRecordSets({HostedZoneId:w.Id,ChangeBatch:{Changes:[{Action:"DELETE",ResourceRecordSet:E}]}});return await f.deleteHostedZone({Id:w.Id}),Uw.info(`Deleted Hosted Zone for domain: ${r}`),E1("success")}async function Llr(r){const f=new Fw,s=await f.listHostedZonesByName({DNSName:r});if(!s||!s.HostedZones)return xw(`No hosted zones found for domain: ${r}`);const w=s.HostedZones.find((E)=>E.Name===`${r}.`);if(!w)return xw(`Hosted Zone not found for domain: ${r}`);const h=await f.listResourceRecordSets({HostedZoneId:w.Id});if(!h||!h.ResourceRecordSets)return xw(`No DNS records found for domain: ${r}`);for(let E of h.ResourceRecordSets)if(E.Type!=="NS"&&E.Type!=="SOA")await f.changeResourceRecordSets({HostedZoneId:w.Id,ChangeBatch:{Changes:[{Action:"DELETE",ResourceRecordSet:E}]}});return Uw.info(`Deleted DNS records for domain: ${r}`),E1("success")}async function Alr(r){const f=new Fw,w=(await f.listHostedZonesByName({DNSName:r})).HostedZones?.find((E)=>E.Name===`${r}.`);if(w)return E1(w);const h=await f.createHostedZone({Name:r,CallerReference:`${Date.now()}`});if(!h.HostedZone)return xw("Failed to create hosted zone");return E1(h)}function up(r){try{const f=pp.projectConfigPath("dns.ts"),w=AD.readFileSync(f,"utf-8").replace(/nameservers: \[.*?\]/s,`nameservers: [${r.map((h)=>`'${h}'`).join(", ")}]`);AD.writeFileSync(f,w,"utf-8"),Uw.info("Nameservers have been set.")}catch(f){console.error("Error updating nameservers:",f)}}async function Rlr(r){try{const f=new Fw,{HostedZones:s}=await f.listHostedZonesByName({DNSName:r});if(!s)return O4(`No hosted zones found for domain ${r}`);const w=s[0];if(w&&w.Name===`${r}.`)return E1(w.Id);return E1(null)}catch(f){return console.error(f),O4(`Failed to find hosted zone for domain ${r}`)}}async function tp(r){if(!r)return[];try{return(await new f$().getDomainDetail({DomainName:r}))?.Nameservers?.map((w)=>w.Name)||[]}catch(f){console.error(f),O4("Error getting domain detail")}}async function ru(r,f){if(!f)f=RD.app.url;const s=await tp(f);if(s&&r&&JSON.stringify(s.sort())!==JSON.stringify(r.sort()))return Uw.info("Updating your domain nameservers to match the ones in your hosted zone..."),Uw.debug("Hosted zone nameservers:",r),Uw.debug("Domain nameservers:",s),await new f$().updateDomainNameservers({DomainName:f,Nameservers:r.map((h)=>({Name:h}))}),up(r),Uw.info("Nameservers updated."),!0;Uw.success("Your nameservers are up to date.")}async function Wlr(r){if(!r)r=RD.app.url;const f=new Fw,s=await f.listHostedZonesByName({DNSName:r});if(!s||!s.HostedZones)return!1;const w=s.HostedZones.find((h)=>h.Name===`${r}.`);if(w){const E=(await f.getHostedZone({Id:w.Id})).DelegationSet?.NameServers||[];return await ru(E,r),!0}return!1}async function zlr(r){return await op(ap.DomainsAdd,r)}export{up as writeNameserversToConfig,ru as updateNameservers,Wlr as hasUserDomainBeenAddedToCloud,tp as getNameservers,Rlr as findHostedZone,Llr as deleteHostedZoneRecords,Clr as deleteHostedZone,Alr as createHostedZone,zlr as addDomain};
33
+ `),AM=!0}throw new Lw.CredentialsProviderError("AWS_PROFILE is set, skipping fromEnv provider.",{logger:r.logger,tryNextLink:!0})}return r.logger?.debug("@aws-sdk/credential-provider-node - defaultProvider::fromEnv"),sT(r)()},async()=>{r.logger?.debug("@aws-sdk/credential-provider-node - defaultProvider::fromSSO");const{ssoStartUrl:s,ssoAccountId:f,ssoRegion:w,ssoRoleName:h,ssoSession:E}=r;if(!s&&!f&&!w&&!h&&!E)throw new Lw.CredentialsProviderError("Skipping SSO provider in default chain (inputs do not include SSO fields).",{logger:r.logger});const{fromSSO:$}=await Promise.resolve().then(() => (nT(),eT));return $(r)()},async()=>{r.logger?.debug("@aws-sdk/credential-provider-node - defaultProvider::fromIni");const{fromIni:s}=await Promise.resolve().then(() => (GM(),TM));return s(r)()},async()=>{r.logger?.debug("@aws-sdk/credential-provider-node - defaultProvider::fromProcess");const{fromProcess:s}=await Promise.resolve().then(() => (e5(),x5));return s(r)()},async()=>{r.logger?.debug("@aws-sdk/credential-provider-node - defaultProvider::fromTokenFile");const{fromTokenFile:s}=await Promise.resolve().then(() => (t5(),u5));return s(r)()},async()=>{return r.logger?.debug("@aws-sdk/credential-provider-node - defaultProvider::remoteProvider"),(await MP(r))()},async()=>{throw new Lw.CredentialsProviderError("Could not load credentials from any providers",{tryNextLink:!1,logger:r.logger})}),Vn,Mn),Mn=(r)=>r?.expiration!==void 0,Vn=(r)=>r?.expiration!==void 0&&r.expiration.getTime()-Date.now()<300000;var LM=G(()=>{wT();Lw=m(Ar(),1);$s();VP()});var e1=G(()=>{LM()});pw();uw();tw();Bw();lf();var eh=m(qr(),1);Lh();B();Is();K();var bZ=m(Qr(),1);Es();function ig(r){return{schemeId:"aws.auth#sigv4",signingProperties:{name:"route53",region:r.region},propertiesExtractor:(s,f)=>({signingProperties:{config:s,context:f}})}}var _Z=async(r,s,f)=>{return{operation:Vf(s).operation,region:await yr(r.region)()||(()=>{throw new Error("expected `region` to be configured for `aws.auth#sigv4`")})()}},gZ=(r)=>{const s=[];switch(r.operation){default:s.push(ig(r))}return s},xZ=(r)=>{return{...bZ.resolveAwsSdkSigV4Config(r)}};var eZ=(r)=>{return{...r,useDualstackEndpoint:r.useDualstackEndpoint??!1,useFipsEndpoint:r.useFipsEndpoint??!1,defaultSigningName:"route53"}},J={UseFIPS:{type:"builtInParams",name:"useFipsEndpoint"},Endpoint:{type:"builtInParams",name:"endpoint"},Region:{type:"builtInParams",name:"region"},UseDualStack:{type:"builtInParams",name:"useDualstackEndpoint"}};var nZ={name:"@aws-sdk/client-route-53",description:"AWS SDK for JavaScript Route 53 Client for Node.js, Browser and React Native",version:"3.668.0",scripts:{build:"concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'","build:cjs":"node ../../scripts/compilation/inline client-route-53","build:es":"tsc -p tsconfig.es.json","build:include:deps":"lerna run --scope $npm_package_name --include-dependencies build","build:types":"tsc -p tsconfig.types.json","build:types:downlevel":"downlevel-dts dist-types dist-types/ts3.4",clean:"rimraf ./dist-* && rimraf *.tsbuildinfo","extract:docs":"api-extractor run --local","generate:client":"node ../../scripts/generate-clients/single-service --solo route-53"},main:"./dist-cjs/index.js",types:"./dist-types/index.d.ts",module:"./dist-es/index.js",sideEffects:!1,dependencies:{"@aws-crypto/sha256-browser":"5.2.0","@aws-crypto/sha256-js":"5.2.0","@aws-sdk/client-sso-oidc":"3.668.0","@aws-sdk/client-sts":"3.668.0","@aws-sdk/core":"3.667.0","@aws-sdk/credential-provider-node":"3.668.0","@aws-sdk/middleware-host-header":"3.667.0","@aws-sdk/middleware-logger":"3.667.0","@aws-sdk/middleware-recursion-detection":"3.667.0","@aws-sdk/middleware-sdk-route53":"3.667.0","@aws-sdk/middleware-user-agent":"3.668.0","@aws-sdk/region-config-resolver":"3.667.0","@aws-sdk/types":"3.667.0","@aws-sdk/util-endpoints":"3.667.0","@aws-sdk/util-user-agent-browser":"3.667.0","@aws-sdk/util-user-agent-node":"3.668.0","@aws-sdk/xml-builder":"3.662.0","@smithy/config-resolver":"^3.0.9","@smithy/core":"^2.4.8","@smithy/fetch-http-handler":"^3.2.9","@smithy/hash-node":"^3.0.7","@smithy/invalid-dependency":"^3.0.7","@smithy/middleware-content-length":"^3.0.9","@smithy/middleware-endpoint":"^3.1.4","@smithy/middleware-retry":"^3.0.23","@smithy/middleware-serde":"^3.0.7","@smithy/middleware-stack":"^3.0.7","@smithy/node-config-provider":"^3.1.8","@smithy/node-http-handler":"^3.2.4","@smithy/protocol-http":"^4.1.4","@smithy/smithy-client":"^3.4.0","@smithy/types":"^3.5.0","@smithy/url-parser":"^3.0.7","@smithy/util-base64":"^3.0.0","@smithy/util-body-length-browser":"^3.0.0","@smithy/util-body-length-node":"^3.0.0","@smithy/util-defaults-mode-browser":"^3.0.23","@smithy/util-defaults-mode-node":"^3.0.23","@smithy/util-endpoints":"^2.1.3","@smithy/util-middleware":"^3.0.7","@smithy/util-retry":"^3.0.7","@smithy/util-utf8":"^3.0.0","@smithy/util-waiter":"^3.1.6",tslib:"^2.6.2"},devDependencies:{"@tsconfig/node16":"16.1.3","@types/node":"^16.18.96",concurrently:"7.0.0","downlevel-dts":"0.10.1",rimraf:"3.0.2",typescript:"~4.9.5"},engines:{node:">=16.0.0"},typesVersions:{"<4.0":{"dist-types/*":["dist-types/ts3.4/*"]}},files:["dist-*/**"],author:{name:"AWS SDK for JavaScript Team",url:"https://aws.amazon.com/javascript/"},license:"Apache-2.0",browser:{"./dist-es/runtimeConfig":"./dist-es/runtimeConfig.browser"},"react-native":{"./dist-es/runtimeConfig":"./dist-es/runtimeConfig.native"},homepage:"https://github.com/aws/aws-sdk-js-v3/tree/main/clients/client-route-53",repository:{type:"git",url:"https://github.com/aws/aws-sdk-js-v3.git",directory:"clients/client-route-53"}};var DM=m(Qr(),1);e1();Jh();lf();Qh();Is();Ns();a0();Bh();zf();var HM=m(Qr(),1);K();n0();S0();Os();Pw();ws();var RM={["required"]:!1,type:"String"},CM={["required"]:!0,default:!1,type:"Boolean"},WM={["ref"]:"Endpoint"},qI={["fn"]:"booleanEquals",["argv"]:[{["ref"]:"UseFIPS"},!0]},BM={["fn"]:"booleanEquals",["argv"]:[{["ref"]:"UseDualStack"},!0]},cr={},zM={["fn"]:"stringEquals",["argv"]:[{["fn"]:"getAttr",["argv"]:[{["ref"]:"PartitionResult"},"name"]},"aws"]},xh={["fn"]:"getAttr",["argv"]:[{["ref"]:"PartitionResult"},"name"]},jw={["fn"]:"booleanEquals",["argv"]:[{["ref"]:"UseFIPS"},!1]},H0={["fn"]:"booleanEquals",["argv"]:[{["ref"]:"UseDualStack"},!1]},SM={["authSchemes"]:[{name:"sigv4",["signingName"]:"route53",["signingRegion"]:"us-east-1"}]},YM={["fn"]:"stringEquals",["argv"]:[xh,"aws-us-gov"]},XM={url:"https://route53.us-gov.amazonaws.com",properties:{["authSchemes"]:[{name:"sigv4",["signingName"]:"route53",["signingRegion"]:"us-gov-west-1"}]},headers:{}},KM={["fn"]:"getAttr",["argv"]:[{["ref"]:"PartitionResult"},"supportsFIPS"]},ZM={["fn"]:"booleanEquals",["argv"]:[!0,{["fn"]:"getAttr",["argv"]:[{["ref"]:"PartitionResult"},"supportsDualStack"]}]},PM=[qI],JM=[BM],QM=[{["ref"]:"Region"}],Hn={version:"1.0",parameters:{Region:RM,UseDualStack:CM,UseFIPS:CM,Endpoint:RM},rules:[{conditions:[{["fn"]:"isSet",["argv"]:[WM]}],rules:[{conditions:PM,error:"Invalid Configuration: FIPS and custom endpoint are not supported",type:"error"},{conditions:JM,error:"Invalid Configuration: Dualstack and custom endpoint are not supported",type:"error"},{endpoint:{url:WM,properties:cr,headers:cr},type:"endpoint"}],type:"tree"},{conditions:[{["fn"]:"isSet",["argv"]:QM}],rules:[{conditions:[{["fn"]:"aws.partition",["argv"]:QM,assign:"PartitionResult"}],rules:[{conditions:[zM,jw,H0],endpoint:{url:"https://route53.amazonaws.com",properties:SM,headers:cr},type:"endpoint"},{conditions:[zM,qI,H0],endpoint:{url:"https://route53-fips.amazonaws.com",properties:SM,headers:cr},type:"endpoint"},{conditions:[{["fn"]:"stringEquals",["argv"]:[xh,"aws-cn"]},jw,H0],endpoint:{url:"https://route53.amazonaws.com.cn",properties:{["authSchemes"]:[{name:"sigv4",["signingName"]:"route53",["signingRegion"]:"cn-northwest-1"}]},headers:cr},type:"endpoint"},{conditions:[YM,jw,H0],endpoint:XM,type:"endpoint"},{conditions:[YM,qI,H0],endpoint:XM,type:"endpoint"},{conditions:[{["fn"]:"stringEquals",["argv"]:[xh,"aws-iso"]},jw,H0],endpoint:{url:"https://route53.c2s.ic.gov",properties:{["authSchemes"]:[{name:"sigv4",["signingName"]:"route53",["signingRegion"]:"us-iso-east-1"}]},headers:cr},type:"endpoint"},{conditions:[{["fn"]:"stringEquals",["argv"]:[xh,"aws-iso-b"]},jw,H0],endpoint:{url:"https://route53.sc2s.sgov.gov",properties:{["authSchemes"]:[{name:"sigv4",["signingName"]:"route53",["signingRegion"]:"us-isob-east-1"}]},headers:cr},type:"endpoint"},{conditions:[{["fn"]:"stringEquals",["argv"]:[xh,"aws-iso-e"]},jw,H0],endpoint:{url:"https://route53.cloud.adc-e.uk",properties:{["authSchemes"]:[{name:"sigv4",["signingName"]:"route53",["signingRegion"]:"eu-isoe-west-1"}]},headers:cr},type:"endpoint"},{conditions:[{["fn"]:"stringEquals",["argv"]:[xh,"aws-iso-f"]},jw,H0],endpoint:{url:"https://route53.csp.hci.ic.gov",properties:{["authSchemes"]:[{name:"sigv4",["signingName"]:"route53",["signingRegion"]:"us-isof-south-1"}]},headers:cr},type:"endpoint"},{conditions:[qI,BM],rules:[{conditions:[{["fn"]:"booleanEquals",["argv"]:[!0,KM]},ZM],rules:[{endpoint:{url:"https://route53-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:cr,headers:cr},type:"endpoint"}],type:"tree"},{error:"FIPS and DualStack are enabled, but this partition does not support one or both",type:"error"}],type:"tree"},{conditions:PM,rules:[{conditions:[{["fn"]:"booleanEquals",["argv"]:[KM,!0]}],rules:[{endpoint:{url:"https://route53-fips.{Region}.{PartitionResult#dnsSuffix}",properties:cr,headers:cr},type:"endpoint"}],type:"tree"},{error:"FIPS is enabled but this partition does not support FIPS",type:"error"}],type:"tree"},{conditions:JM,rules:[{conditions:[ZM],rules:[{endpoint:{url:"https://route53.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:cr,headers:cr},type:"endpoint"}],type:"tree"},{error:"DualStack is enabled but this partition does not support DualStack",type:"error"}],type:"tree"},{endpoint:{url:"https://route53.{Region}.{PartitionResult#dnsSuffix}",properties:cr,headers:cr},type:"endpoint"}],type:"tree"}],type:"tree"},{error:"Invalid Configuration: Missing Region",type:"error"}]},MM=Hn;var ln=new fs({size:50,params:["Endpoint","Region","UseDualStack","UseFIPS"]}),VM=(r,s={})=>{return ln.get(r,()=>ss(MM,{endpointParams:r,logger:s.logger}))};ur.aws=hs;var lM=(r)=>{return{apiVersion:"2013-04-01",base64Decoder:r?.base64Decoder??Uf,base64Encoder:r?.base64Encoder??Gf,disableHostPrefix:r?.disableHostPrefix??!1,endpointProvider:r?.endpointProvider??VM,extensions:r?.extensions??[],httpAuthSchemeProvider:r?.httpAuthSchemeProvider??gZ,httpAuthSchemes:r?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:(s)=>s.getIdentityProvider("aws.auth#sigv4"),signer:new HM.AwsSdkSigV4Signer}],logger:r?.logger??new Yf,serviceId:r?.serviceId??"Route 53",urlParser:r?.urlParser??br,utf8Decoder:r?.utf8Decoder??_r,utf8Encoder:r?.utf8Encoder??Tf}};K();Mh();K();var kM=(r)=>{gs(process.version);const s=us(r),f=()=>s().then(_s),w=lM(r);return DM.emitWarningIfUnsupportedVersion(process.version),{...w,...r,runtime:"node",defaultsMode:s,bodyLengthChecker:r?.bodyLengthChecker??ps,credentialDefaultProvider:r?.credentialDefaultProvider??X0,defaultUserAgentProvider:r?.defaultUserAgentProvider??os({serviceId:w.serviceId,clientVersion:nZ.version}),maxAttempts:r?.maxAttempts??u(js),region:r?.region??u(Hf,Ds),requestHandler:ff.create(r?.requestHandler??f),retryMode:r?.retryMode??u({...is,default:async()=>(await f()).retryMode||Nf}),sha256:r?.sha256??Fs.bind(null,"sha256"),streamCollector:r?.streamCollector??qf,useDualstackEndpoint:r?.useDualstackEndpoint??u(Hs),useFipsEndpoint:r?.useFipsEndpoint??u(ls),userAgentAppId:r?.userAgentAppId??u(as)}};Vh();kr();K();var yM=(r)=>{const s=r.httpAuthSchemes;let{httpAuthSchemeProvider:f,credentials:w}=r;return{setHttpAuthScheme(h){const E=s.findIndex(($)=>$.schemeId===h.schemeId);if(E===-1)s.push(h);else s.splice(E,1,h)},httpAuthSchemes(){return s},setHttpAuthSchemeProvider(h){f=h},httpAuthSchemeProvider(){return f},setCredentials(h){w=h},credentials(){return w}}},NM=(r)=>{return{httpAuthSchemes:r.httpAuthSchemes(),httpAuthSchemeProvider:r.httpAuthSchemeProvider(),credentials:r.credentials()}};var mI=(r)=>r,qM=(r,s)=>{const f={...mI(ts(r)),...mI(xs(r)),...mI(Xs(r)),...mI(yM(r))};return s.forEach((w)=>w.configure(f)),{...r,...r0(f),...es(f),...Ks(f),...NM(f)}};class rG extends Sf{constructor(...[r]){const s=kM(r||{}),f=eZ(s),w=Ms(f),h=vs(w),E=ks(h),$=Zs(E),I=qs($),F=xZ(I),U=qM(F,r?.extensions||[]);super(U);this.config=U,this.middlewareStack.use(Vs(this.config)),this.middlewareStack.use(ns(this.config)),this.middlewareStack.use(ys(this.config)),this.middlewareStack.use(Ps(this.config)),this.middlewareStack.use(Js(this.config)),this.middlewareStack.use(Qs(this.config)),this.middlewareStack.use(eh.getHttpAuthSchemeEndpointRuleSetPlugin(this.config,{httpAuthSchemeParametersProvider:_Z,identityProviderConfigProvider:async(A)=>new eh.DefaultIdentityProviderConfig({"aws.auth#sigv4":A.credentials})})),this.middlewareStack.use(eh.getHttpSigningPlugin(this.config))}destroy(){super.destroy()}}K();var jI=/^\/(hostedzone|change|delegationset)\//;function Dn(){return(r)=>async(s)=>{const{ChangeBatch:f}=s.input,w=[];for(let h of f.Changes){const{AliasTarget:E}=h.ResourceRecordSet;if(E)w.push({...h,ResourceRecordSet:{...h.ResourceRecordSet,AliasTarget:{...E,HostedZoneId:E.HostedZoneId.replace(jI,"")}}});else w.push(h)}return r({...s,input:{...s.input,ChangeBatch:{...f,Changes:w}}})}}var kn={step:"initialize",tags:["ROUTE53_IDS","CHANGE_RESOURCE_RECORD_SETS"],name:"changeResourceRecordSetsMiddleware",override:!0},mM=(r)=>({applyToStack:(s)=>{s.add(Dn(),kn)}});function Nn(){return(r)=>async(s)=>{const f={...s.input};for(let w of yn){const h=f[w];if(h)f[w]=h.replace(jI,"")}return r({...s,input:f})}}var yn=["DelegationSetId","HostedZoneId","Id"],qn={step:"initialize",tags:["ROUTE53_IDS"],name:"idNormalizerMiddleware",override:!0},j=(r)=>({applyToStack:(s)=>{s.add(Nn(),qn)}});B();V();K();var x=m(Qr(),1);function jM(r){return r.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;")}function vM(r){return r.replace(/&/g,"&amp;").replace(/"/g,"&quot;").replace(/'/g,"&apos;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/\r/g,"&#x0D;").replace(/\n/g,"&#x0A;").replace(/\u0085/g,"&#x85;").replace(/\u2028/,"&#x2028;")}class fG{constructor(r){this.value=r}toString(){return vM(""+this.value)}}class H{static of(r,s,f){const w=new H(r);if(s!==void 0)w.addChildNode(new fG(s));if(f!==void 0)w.withName(f);return w}constructor(r,s=[]){this.name=r,this.children=s,this.attributes={}}withName(r){return this.name=r,this}addAttribute(r,s){return this.attributes[r]=s,this}addChildNode(r){return this.children.push(r),this}removeAttribute(r){return delete this.attributes[r],this}n(r){return this.name=r,this}c(r){return this.children.push(r),this}a(r,s){if(s!=null)this.attributes[r]=s;return this}cc(r,s,f=s){if(r[s]!=null){const w=H.of(s,r[s]).withName(f);this.c(w)}}l(r,s,f,w){if(r[s]!=null)w().map((E)=>{E.withName(f),this.c(E)})}lc(r,s,f,w){if(r[s]!=null){const h=w(),E=new H(f);h.map(($)=>{E.c($)}),this.c(E)}}toString(){const r=Boolean(this.children.length);let s=`<${this.name}`;const f=this.attributes;for(let w of Object.keys(f)){const h=f[w];if(h!=null)s+=` ${w}="${jM(""+h)}"`}return s+=!r?"/>":`>${this.children.map((w)=>w.toString()).join("")}</${this.name}>`}}var b=m(qr(),1);K();K();class d extends mf{constructor(r){super(r);Object.setPrototypeOf(this,d.prototype)}}class vI extends d{constructor(r){super({name:"ConcurrentModification",$fault:"client",...r});this.name="ConcurrentModification",this.$fault="client",Object.setPrototypeOf(this,vI.prototype)}}class iI extends d{constructor(r){super({name:"InvalidInput",$fault:"client",...r});this.name="InvalidInput",this.$fault="client",Object.setPrototypeOf(this,iI.prototype)}}class OI extends d{constructor(r){super({name:"InvalidKeySigningKeyStatus",$fault:"client",...r});this.name="InvalidKeySigningKeyStatus",this.$fault="client",Object.setPrototypeOf(this,OI.prototype)}}class dI extends d{constructor(r){super({name:"InvalidKMSArn",$fault:"client",...r});this.name="InvalidKMSArn",this.$fault="client",Object.setPrototypeOf(this,dI.prototype)}}class cI extends d{constructor(r){super({name:"InvalidSigningStatus",$fault:"client",...r});this.name="InvalidSigningStatus",this.$fault="client",Object.setPrototypeOf(this,cI.prototype)}}class bI extends d{constructor(r){super({name:"NoSuchKeySigningKey",$fault:"client",...r});this.name="NoSuchKeySigningKey",this.$fault="client",Object.setPrototypeOf(this,bI.prototype)}}class _I extends d{constructor(r){super({name:"ConflictingDomainExists",$fault:"client",...r});this.name="ConflictingDomainExists",this.$fault="client",Object.setPrototypeOf(this,_I.prototype)}}class gI extends d{constructor(r){super({name:"InvalidVPCId",$fault:"client",...r});this.name="InvalidVPCId",this.$fault="client",Object.setPrototypeOf(this,gI.prototype)}}class xI extends d{constructor(r){super({name:"LimitsExceeded",$fault:"client",...r});this.name="LimitsExceeded",this.$fault="client",Object.setPrototypeOf(this,xI.prototype)}}class eI extends d{constructor(r){super({name:"NoSuchHostedZone",$fault:"client",...r});this.name="NoSuchHostedZone",this.$fault="client",Object.setPrototypeOf(this,eI.prototype)}}class nI extends d{constructor(r){super({name:"NotAuthorizedException",$fault:"client",...r});this.name="NotAuthorizedException",this.$fault="client",Object.setPrototypeOf(this,nI.prototype)}}class oI extends d{constructor(r){super({name:"PriorRequestNotComplete",$fault:"client",...r});this.name="PriorRequestNotComplete",this.$fault="client",Object.setPrototypeOf(this,oI.prototype)}}class aI extends d{constructor(r){super({name:"PublicZoneVPCAssociation",$fault:"client",...r});this.name="PublicZoneVPCAssociation",this.$fault="client",Object.setPrototypeOf(this,aI.prototype)}}class pI extends d{constructor(r){super({name:"CidrBlockInUseException",$fault:"client",...r});this.name="CidrBlockInUseException",this.$fault="client",Object.setPrototypeOf(this,pI.prototype),this.Message=r.Message}}class uI extends d{constructor(r){super({name:"CidrCollectionVersionMismatchException",$fault:"client",...r});this.name="CidrCollectionVersionMismatchException",this.$fault="client",Object.setPrototypeOf(this,uI.prototype),this.Message=r.Message}}class tI extends d{constructor(r){super({name:"NoSuchCidrCollectionException",$fault:"client",...r});this.name="NoSuchCidrCollectionException",this.$fault="client",Object.setPrototypeOf(this,tI.prototype),this.Message=r.Message}}class r2 extends d{constructor(r){super({name:"InvalidChangeBatch",$fault:"client",...r});this.name="InvalidChangeBatch",this.$fault="client",Object.setPrototypeOf(this,r2.prototype),this.messages=r.messages}}class f2 extends d{constructor(r){super({name:"NoSuchHealthCheck",$fault:"client",...r});this.name="NoSuchHealthCheck",this.$fault="client",Object.setPrototypeOf(this,f2.prototype)}}class s2 extends d{constructor(r){super({name:"ThrottlingException",$fault:"client",...r});this.name="ThrottlingException",this.$fault="client",Object.setPrototypeOf(this,s2.prototype)}}class w2 extends d{constructor(r){super({name:"CidrCollectionAlreadyExistsException",$fault:"client",...r});this.name="CidrCollectionAlreadyExistsException",this.$fault="client",Object.setPrototypeOf(this,w2.prototype),this.Message=r.Message}}class h2 extends d{constructor(r){super({name:"HealthCheckAlreadyExists",$fault:"client",...r});this.name="HealthCheckAlreadyExists",this.$fault="client",Object.setPrototypeOf(this,h2.prototype)}}class E2 extends d{constructor(r){super({name:"TooManyHealthChecks",$fault:"client",...r});this.name="TooManyHealthChecks",this.$fault="client",Object.setPrototypeOf(this,E2.prototype)}}class $2 extends d{constructor(r){super({name:"DelegationSetNotAvailable",$fault:"client",...r});this.name="DelegationSetNotAvailable",this.$fault="client",Object.setPrototypeOf(this,$2.prototype)}}class I2 extends d{constructor(r){super({name:"DelegationSetNotReusable",$fault:"client",...r});this.name="DelegationSetNotReusable",this.$fault="client",Object.setPrototypeOf(this,I2.prototype)}}class F2 extends d{constructor(r){super({name:"HostedZoneAlreadyExists",$fault:"client",...r});this.name="HostedZoneAlreadyExists",this.$fault="client",Object.setPrototypeOf(this,F2.prototype)}}class U2 extends d{constructor(r){super({name:"InvalidDomainName",$fault:"client",...r});this.name="InvalidDomainName",this.$fault="client",Object.setPrototypeOf(this,U2.prototype)}}class T2 extends d{constructor(r){super({name:"NoSuchDelegationSet",$fault:"client",...r});this.name="NoSuchDelegationSet",this.$fault="client",Object.setPrototypeOf(this,T2.prototype)}}class G2 extends d{constructor(r){super({name:"TooManyHostedZones",$fault:"client",...r});this.name="TooManyHostedZones",this.$fault="client",Object.setPrototypeOf(this,G2.prototype)}}class A2 extends d{constructor(r){super({name:"InvalidArgument",$fault:"client",...r});this.name="InvalidArgument",this.$fault="client",Object.setPrototypeOf(this,A2.prototype)}}class L2 extends d{constructor(r){super({name:"InvalidKeySigningKeyName",$fault:"client",...r});this.name="InvalidKeySigningKeyName",this.$fault="client",Object.setPrototypeOf(this,L2.prototype)}}class R2 extends d{constructor(r){super({name:"KeySigningKeyAlreadyExists",$fault:"client",...r});this.name="KeySigningKeyAlreadyExists",this.$fault="client",Object.setPrototypeOf(this,R2.prototype)}}class C2 extends d{constructor(r){super({name:"TooManyKeySigningKeys",$fault:"client",...r});this.name="TooManyKeySigningKeys",this.$fault="client",Object.setPrototypeOf(this,C2.prototype)}}class W2 extends d{constructor(r){super({name:"InsufficientCloudWatchLogsResourcePolicy",$fault:"client",...r});this.name="InsufficientCloudWatchLogsResourcePolicy",this.$fault="client",Object.setPrototypeOf(this,W2.prototype)}}class z2 extends d{constructor(r){super({name:"NoSuchCloudWatchLogsLogGroup",$fault:"client",...r});this.name="NoSuchCloudWatchLogsLogGroup",this.$fault="client",Object.setPrototypeOf(this,z2.prototype)}}class S2 extends d{constructor(r){super({name:"QueryLoggingConfigAlreadyExists",$fault:"client",...r});this.name="QueryLoggingConfigAlreadyExists",this.$fault="client",Object.setPrototypeOf(this,S2.prototype)}}class Y2 extends d{constructor(r){super({name:"DelegationSetAlreadyCreated",$fault:"client",...r});this.name="DelegationSetAlreadyCreated",this.$fault="client",Object.setPrototypeOf(this,Y2.prototype)}}class X2 extends d{constructor(r){super({name:"DelegationSetAlreadyReusable",$fault:"client",...r});this.name="DelegationSetAlreadyReusable",this.$fault="client",Object.setPrototypeOf(this,X2.prototype)}}class K2 extends d{constructor(r){super({name:"HostedZoneNotFound",$fault:"client",...r});this.name="HostedZoneNotFound",this.$fault="client",Object.setPrototypeOf(this,K2.prototype)}}class Z2 extends d{constructor(r){super({name:"InvalidTrafficPolicyDocument",$fault:"client",...r});this.name="InvalidTrafficPolicyDocument",this.$fault="client",Object.setPrototypeOf(this,Z2.prototype)}}class P2 extends d{constructor(r){super({name:"TooManyTrafficPolicies",$fault:"client",...r});this.name="TooManyTrafficPolicies",this.$fault="client",Object.setPrototypeOf(this,P2.prototype)}}class J2 extends d{constructor(r){super({name:"TrafficPolicyAlreadyExists",$fault:"client",...r});this.name="TrafficPolicyAlreadyExists",this.$fault="client",Object.setPrototypeOf(this,J2.prototype)}}class Q2 extends d{constructor(r){super({name:"NoSuchTrafficPolicy",$fault:"client",...r});this.name="NoSuchTrafficPolicy",this.$fault="client",Object.setPrototypeOf(this,Q2.prototype)}}class B2 extends d{constructor(r){super({name:"TooManyTrafficPolicyInstances",$fault:"client",...r});this.name="TooManyTrafficPolicyInstances",this.$fault="client",Object.setPrototypeOf(this,B2.prototype)}}class M2 extends d{constructor(r){super({name:"TrafficPolicyInstanceAlreadyExists",$fault:"client",...r});this.name="TrafficPolicyInstanceAlreadyExists",this.$fault="client",Object.setPrototypeOf(this,M2.prototype)}}class V2 extends d{constructor(r){super({name:"TooManyTrafficPolicyVersionsForCurrentPolicy",$fault:"client",...r});this.name="TooManyTrafficPolicyVersionsForCurrentPolicy",this.$fault="client",Object.setPrototypeOf(this,V2.prototype)}}class H2 extends d{constructor(r){super({name:"TooManyVPCAssociationAuthorizations",$fault:"client",...r});this.name="TooManyVPCAssociationAuthorizations",this.$fault="client",Object.setPrototypeOf(this,H2.prototype)}}class l2 extends d{constructor(r){super({name:"KeySigningKeyInParentDSRecord",$fault:"client",...r});this.name="KeySigningKeyInParentDSRecord",this.$fault="client",Object.setPrototypeOf(this,l2.prototype)}}class D2 extends d{constructor(r){super({name:"KeySigningKeyInUse",$fault:"client",...r});this.name="KeySigningKeyInUse",this.$fault="client",Object.setPrototypeOf(this,D2.prototype)}}class k2 extends d{constructor(r){super({name:"CidrCollectionInUseException",$fault:"client",...r});this.name="CidrCollectionInUseException",this.$fault="client",Object.setPrototypeOf(this,k2.prototype),this.Message=r.Message}}class y2 extends d{constructor(r){super({name:"HealthCheckInUse",$fault:"client",...r});this.name="HealthCheckInUse",this.$fault="client",Object.setPrototypeOf(this,y2.prototype)}}class N2 extends d{constructor(r){super({name:"HostedZoneNotEmpty",$fault:"client",...r});this.name="HostedZoneNotEmpty",this.$fault="client",Object.setPrototypeOf(this,N2.prototype)}}class q2 extends d{constructor(r){super({name:"NoSuchQueryLoggingConfig",$fault:"client",...r});this.name="NoSuchQueryLoggingConfig",this.$fault="client",Object.setPrototypeOf(this,q2.prototype)}}class m2 extends d{constructor(r){super({name:"DelegationSetInUse",$fault:"client",...r});this.name="DelegationSetInUse",this.$fault="client",Object.setPrototypeOf(this,m2.prototype)}}class j2 extends d{constructor(r){super({name:"TrafficPolicyInUse",$fault:"client",...r});this.name="TrafficPolicyInUse",this.$fault="client",Object.setPrototypeOf(this,j2.prototype)}}class v2 extends d{constructor(r){super({name:"NoSuchTrafficPolicyInstance",$fault:"client",...r});this.name="NoSuchTrafficPolicyInstance",this.$fault="client",Object.setPrototypeOf(this,v2.prototype)}}class i2 extends d{constructor(r){super({name:"VPCAssociationAuthorizationNotFound",$fault:"client",...r});this.name="VPCAssociationAuthorizationNotFound",this.$fault="client",Object.setPrototypeOf(this,i2.prototype)}}class O2 extends d{constructor(r){super({name:"DNSSECNotFound",$fault:"client",...r});this.name="DNSSECNotFound",this.$fault="client",Object.setPrototypeOf(this,O2.prototype)}}class d2 extends d{constructor(r){super({name:"LastVPCAssociation",$fault:"client",...r});this.name="LastVPCAssociation",this.$fault="client",Object.setPrototypeOf(this,d2.prototype)}}class c2 extends d{constructor(r){super({name:"VPCAssociationNotFound",$fault:"client",...r});this.name="VPCAssociationNotFound",this.$fault="client",Object.setPrototypeOf(this,c2.prototype)}}class b2 extends d{constructor(r){super({name:"HostedZonePartiallyDelegated",$fault:"client",...r});this.name="HostedZonePartiallyDelegated",this.$fault="client",Object.setPrototypeOf(this,b2.prototype)}}class _2 extends d{constructor(r){super({name:"KeySigningKeyWithActiveStatusNotFound",$fault:"client",...r});this.name="KeySigningKeyWithActiveStatusNotFound",this.$fault="client",Object.setPrototypeOf(this,_2.prototype)}}class g2 extends d{constructor(r){super({name:"NoSuchChange",$fault:"client",...r});this.name="NoSuchChange",this.$fault="client",Object.setPrototypeOf(this,g2.prototype)}}class x2 extends d{constructor(r){super({name:"NoSuchGeoLocation",$fault:"client",...r});this.name="NoSuchGeoLocation",this.$fault="client",Object.setPrototypeOf(this,x2.prototype)}}class e2 extends d{constructor(r){super({name:"IncompatibleVersion",$fault:"client",...r});this.name="IncompatibleVersion",this.$fault="client",Object.setPrototypeOf(this,e2.prototype)}}class n2 extends d{constructor(r){super({name:"HostedZoneNotPrivate",$fault:"client",...r});this.name="HostedZoneNotPrivate",this.$fault="client",Object.setPrototypeOf(this,n2.prototype)}}class o2 extends d{constructor(r){super({name:"NoSuchCidrLocationException",$fault:"client",...r});this.name="NoSuchCidrLocationException",this.$fault="client",Object.setPrototypeOf(this,o2.prototype),this.Message=r.Message}}class a2 extends d{constructor(r){super({name:"InvalidPaginationToken",$fault:"client",...r});this.name="InvalidPaginationToken",this.$fault="client",Object.setPrototypeOf(this,a2.prototype)}}class p2 extends d{constructor(r){super({name:"HealthCheckVersionMismatch",$fault:"client",...r});this.name="HealthCheckVersionMismatch",this.$fault="client",Object.setPrototypeOf(this,p2.prototype)}}class u2 extends d{constructor(r){super({name:"ConflictingTypes",$fault:"client",...r});this.name="ConflictingTypes",this.$fault="client",Object.setPrototypeOf(this,u2.prototype)}}var xM=async(r,s)=>{const f=b.requestBuilder(r,s),w={};f.bp("/2013-04-01/keysigningkey/{HostedZoneId}/{Name}/activate"),f.p("HostedZoneId",()=>r.HostedZoneId,"{HostedZoneId}",!1),f.p("Name",()=>r.Name,"{Name}",!1);let h;return f.m("POST").h(w).b(h),f.build()},eM=async(r,s)=>{const f=b.requestBuilder(r,s),w={"content-type":"application/xml"};f.bp("/2013-04-01/hostedzone/{HostedZoneId}/associatevpc"),f.p("HostedZoneId",()=>r.HostedZoneId,"{HostedZoneId}",!1);let h;h=lr;const E=new H(Yp);if(E.a("xmlns","https://route53.amazonaws.com/doc/2013-04-01/"),r[Fr]!=null)E.c(H.of(Sp,r[Fr]).n(Fr));if(r[Cr]!=null)E.c(f$(r[Cr],s).n(Cr));return h+=E.toString(),f.m("POST").h(w).b(h),f.build()},nM=async(r,s)=>{const f=b.requestBuilder(r,s),w={"content-type":"application/xml"};f.bp("/2013-04-01/cidrcollection/{Id}"),f.p("Id",()=>r.Id,"{Id}",!1);let h;h=lr;const E=new H(Pp);if(E.a("xmlns","https://route53.amazonaws.com/doc/2013-04-01/"),E.lc(r,"Changes","Changes",()=>Ea(r[Nl],s)),r[t2]!=null)E.c(H.of(t2,String(r[t2])).n(t2));return h+=E.toString(),f.m("POST").h(w).b(h),f.build()},oM=async(r,s)=>{const f=b.requestBuilder(r,s),w={"content-type":"application/xml"};f.bp("/2013-04-01/hostedzone/{HostedZoneId}/rrset"),f.p("HostedZoneId",()=>r.HostedZoneId,"{HostedZoneId}",!1);let h;h=lr;const E=new H(qp);if(E.a("xmlns","https://route53.amazonaws.com/doc/2013-04-01/"),r[f6]!=null)E.c(sa(r[f6],s).n(f6));return h+=E.toString(),f.m("POST").h(w).b(h),f.build()},aM=async(r,s)=>{const f=b.requestBuilder(r,s),w={"content-type":"application/xml"};f.bp("/2013-04-01/tags/{ResourceType}/{ResourceId}"),f.p("ResourceType",()=>r.ResourceType,"{ResourceType}",!1),f.p("ResourceId",()=>r.ResourceId,"{ResourceId}",!1);let h;h=lr;const E=new H(mp);return E.a("xmlns","https://route53.amazonaws.com/doc/2013-04-01/"),E.lc(r,"AddTags","AddTags",()=>Ya(r[zp],s)),E.lc(r,"RemoveTagKeys","RemoveTagKeys",()=>Sa(r[Au],s)),h+=E.toString(),f.m("POST").h(w).b(h),f.build()},pM=async(r,s)=>{const f=b.requestBuilder(r,s),w={"content-type":"application/xml"};f.bp("/2013-04-01/cidrcollection");let h;h=lr;const E=new H(Jp);if(E.a("xmlns","https://route53.amazonaws.com/doc/2013-04-01/"),r[Yr]!=null)E.c(H.of(Dp,r[Yr]).n(Yr));if(r[n]!=null)E.c(H.of(kp,r[n]).n(n));return h+=E.toString(),f.m("POST").h(w).b(h),f.build()},uM=async(r,s)=>{const f=b.requestBuilder(r,s),w={"content-type":"application/xml"};f.bp("/2013-04-01/healthcheck");let h;h=lr;const E=new H(Qp);if(E.a("xmlns","https://route53.amazonaws.com/doc/2013-04-01/"),r[Yr]!=null)E.c(H.of(ap,r[Yr]).n(Yr));if(r[ow]!=null)E.c(Ga(r[ow],s).n(ow));return h+=E.toString(),f.m("POST").h(w).b(h),f.build()},tM=async(r,s)=>{const f=b.requestBuilder(r,s),w={"content-type":"application/xml"};f.bp("/2013-04-01/hostedzone");let h;h=lr;const E=new H(Bp);if(E.a("xmlns","https://route53.amazonaws.com/doc/2013-04-01/"),r[Yr]!=null)E.c(H.of(T8,r[Yr]).n(Yr));if(r[w6]!=null)E.c(H.of(F0,r[w6]).n(w6));if(r[h6]!=null)E.c(Aa(r[h6],s).n(h6));if(r[n]!=null)E.c(H.of(Ws,r[n]).n(n));if(r[Cr]!=null)E.c(f$(r[Cr],s).n(Cr));return h+=E.toString(),f.m("POST").h(w).b(h),f.build()},rV=async(r,s)=>{const f=b.requestBuilder(r,s),w={"content-type":"application/xml"};f.bp("/2013-04-01/keysigningkey");let h;h=lr;const E=new H(Mp);if(E.a("xmlns","https://route53.amazonaws.com/doc/2013-04-01/"),r[Yr]!=null)E.c(H.of(T8,r[Yr]).n(Yr));if(r[rr]!=null)E.c(H.of(F0,r[rr]).n(rr));if(r[ZG]!=null)E.c(H.of(Wu,r[ZG]).n(ZG));if(r[n]!=null)E.c(H.of(Cu,r[n]).n(n));if(r[$f]!=null)E.c(H.of(zu,r[$f]).n($f));return h+=E.toString(),f.m("POST").h(w).b(h),f.build()},fV=async(r,s)=>{const f=b.requestBuilder(r,s),w={"content-type":"application/xml"};f.bp("/2013-04-01/queryloggingconfig");let h;h=lr;const E=new H(yp);if(E.a("xmlns","https://route53.amazonaws.com/doc/2013-04-01/"),E.cc(r,s6),r[rr]!=null)E.c(H.of(F0,r[rr]).n(rr));return h+=E.toString(),f.m("POST").h(w).b(h),f.build()},sV=async(r,s)=>{const f=b.requestBuilder(r,s),w={"content-type":"application/xml"};f.bp("/2013-04-01/delegationset");let h;h=lr;const E=new H(Np);if(E.a("xmlns","https://route53.amazonaws.com/doc/2013-04-01/"),r[Yr]!=null)E.c(H.of(T8,r[Yr]).n(Yr));if(r[rr]!=null)E.c(H.of(F0,r[rr]).n(rr));return h+=E.toString(),f.m("POST").h(w).b(h),f.build()},wV=async(r,s)=>{const f=b.requestBuilder(r,s),w={"content-type":"application/xml"};f.bp("/2013-04-01/trafficpolicy");let h;h=lr;const E=new H(vp);if(E.a("xmlns","https://route53.amazonaws.com/doc/2013-04-01/"),r[Fr]!=null)E.c(H.of(A8,r[Fr]).n(Fr));if(r[D0]!=null)E.c(H.of(jl,r[D0]).n(D0));if(r[n]!=null)E.c(H.of(Zu,r[n]).n(n));return h+=E.toString(),f.m("POST").h(w).b(h),f.build()},hV=async(r,s)=>{const f=b.requestBuilder(r,s),w={"content-type":"application/xml"};f.bp("/2013-04-01/trafficpolicyinstance");let h;h=lr;const E=new H(jp);if(E.a("xmlns","https://route53.amazonaws.com/doc/2013-04-01/"),r[rr]!=null)E.c(H.of(F0,r[rr]).n(rr));if(r[n]!=null)E.c(H.of(Ws,r[n]).n(n));if(r[vr]!=null)E.c(H.of(vr,String(r[vr])).n(vr));if(E.cc(r,$1),r[_f]!=null)E.c(H.of(_f,String(r[_f])).n(_f));return h+=E.toString(),f.m("POST").h(w).b(h),f.build()},EV=async(r,s)=>{const f=b.requestBuilder(r,s),w={"content-type":"application/xml"};f.bp("/2013-04-01/trafficpolicy/{Id}"),f.p("Id",()=>r.Id,"{Id}",!1);let h;h=lr;const E=new H(ip);if(E.a("xmlns","https://route53.amazonaws.com/doc/2013-04-01/"),r[Fr]!=null)E.c(H.of(A8,r[Fr]).n(Fr));if(r[D0]!=null)E.c(H.of(jl,r[D0]).n(D0));return h+=E.toString(),f.m("POST").h(w).b(h),f.build()},$V=async(r,s)=>{const f=b.requestBuilder(r,s),w={"content-type":"application/xml"};f.bp("/2013-04-01/hostedzone/{HostedZoneId}/authorizevpcassociation"),f.p("HostedZoneId",()=>r.HostedZoneId,"{HostedZoneId}",!1);let h;h=lr;const E=new H(Op);if(E.a("xmlns","https://route53.amazonaws.com/doc/2013-04-01/"),r[Cr]!=null)E.c(f$(r[Cr],s).n(Cr));return h+=E.toString(),f.m("POST").h(w).b(h),f.build()},IV=async(r,s)=>{const f=b.requestBuilder(r,s),w={};f.bp("/2013-04-01/keysigningkey/{HostedZoneId}/{Name}/deactivate"),f.p("HostedZoneId",()=>r.HostedZoneId,"{HostedZoneId}",!1),f.p("Name",()=>r.Name,"{Name}",!1);let h;return f.m("POST").h(w).b(h),f.build()},FV=async(r,s)=>{const f=b.requestBuilder(r,s),w={};f.bp("/2013-04-01/cidrcollection/{Id}"),f.p("Id",()=>r.Id,"{Id}",!1);let h;return f.m("DELETE").h(w).b(h),f.build()},UV=async(r,s)=>{const f=b.requestBuilder(r,s),w={};f.bp("/2013-04-01/healthcheck/{HealthCheckId}"),f.p("HealthCheckId",()=>r.HealthCheckId,"{HealthCheckId}",!1);let h;return f.m("DELETE").h(w).b(h),f.build()},TV=async(r,s)=>{const f=b.requestBuilder(r,s),w={};f.bp("/2013-04-01/hostedzone/{Id}"),f.p("Id",()=>r.Id,"{Id}",!1);let h;return f.m("DELETE").h(w).b(h),f.build()},GV=async(r,s)=>{const f=b.requestBuilder(r,s),w={};f.bp("/2013-04-01/keysigningkey/{HostedZoneId}/{Name}"),f.p("HostedZoneId",()=>r.HostedZoneId,"{HostedZoneId}",!1),f.p("Name",()=>r.Name,"{Name}",!1);let h;return f.m("DELETE").h(w).b(h),f.build()},AV=async(r,s)=>{const f=b.requestBuilder(r,s),w={};f.bp("/2013-04-01/queryloggingconfig/{Id}"),f.p("Id",()=>r.Id,"{Id}",!1);let h;return f.m("DELETE").h(w).b(h),f.build()},LV=async(r,s)=>{const f=b.requestBuilder(r,s),w={};f.bp("/2013-04-01/delegationset/{Id}"),f.p("Id",()=>r.Id,"{Id}",!1);let h;return f.m("DELETE").h(w).b(h),f.build()},RV=async(r,s)=>{const f=b.requestBuilder(r,s),w={};f.bp("/2013-04-01/trafficpolicy/{Id}/{Version}"),f.p("Id",()=>r.Id,"{Id}",!1),f.p("Version",()=>r.Version.toString(),"{Version}",!1);let h;return f.m("DELETE").h(w).b(h),f.build()},CV=async(r,s)=>{const f=b.requestBuilder(r,s),w={};f.bp("/2013-04-01/trafficpolicyinstance/{Id}"),f.p("Id",()=>r.Id,"{Id}",!1);let h;return f.m("DELETE").h(w).b(h),f.build()},WV=async(r,s)=>{const f=b.requestBuilder(r,s),w={"content-type":"application/xml"};f.bp("/2013-04-01/hostedzone/{HostedZoneId}/deauthorizevpcassociation"),f.p("HostedZoneId",()=>r.HostedZoneId,"{HostedZoneId}",!1);let h;h=lr;const E=new H(cp);if(E.a("xmlns","https://route53.amazonaws.com/doc/2013-04-01/"),r[Cr]!=null)E.c(f$(r[Cr],s).n(Cr));return h+=E.toString(),f.m("POST").h(w).b(h),f.build()},zV=async(r,s)=>{const f=b.requestBuilder(r,s),w={};f.bp("/2013-04-01/hostedzone/{HostedZoneId}/disable-dnssec"),f.p("HostedZoneId",()=>r.HostedZoneId,"{HostedZoneId}",!1);let h;return f.m("POST").h(w).b(h),f.build()},SV=async(r,s)=>{const f=b.requestBuilder(r,s),w={"content-type":"application/xml"};f.bp("/2013-04-01/hostedzone/{HostedZoneId}/disassociatevpc"),f.p("HostedZoneId",()=>r.HostedZoneId,"{HostedZoneId}",!1);let h;h=lr;const E=new H(_p);if(E.a("xmlns","https://route53.amazonaws.com/doc/2013-04-01/"),r[Fr]!=null)E.c(H.of(bp,r[Fr]).n(Fr));if(r[Cr]!=null)E.c(f$(r[Cr],s).n(Cr));return h+=E.toString(),f.m("POST").h(w).b(h),f.build()},YV=async(r,s)=>{const f=b.requestBuilder(r,s),w={};f.bp("/2013-04-01/hostedzone/{HostedZoneId}/enable-dnssec"),f.p("HostedZoneId",()=>r.HostedZoneId,"{HostedZoneId}",!1);let h;return f.m("POST").h(w).b(h),f.build()},XV=async(r,s)=>{const f=b.requestBuilder(r,s),w={};f.bp("/2013-04-01/accountlimit/{Type}"),f.p("Type",()=>r.Type,"{Type}",!1);let h;return f.m("GET").h(w).b(h),f.build()},KV=async(r,s)=>{const f=b.requestBuilder(r,s),w={};f.bp("/2013-04-01/change/{Id}"),f.p("Id",()=>r.Id,"{Id}",!1);let h;return f.m("GET").h(w).b(h),f.build()},ZV=async(r,s)=>{const f=b.requestBuilder(r,s),w={};f.bp("/2013-04-01/checkeripranges");let h;return f.m("GET").h(w).b(h),f.build()},PV=async(r,s)=>{const f=b.requestBuilder(r,s),w={};f.bp("/2013-04-01/hostedzone/{HostedZoneId}/dnssec"),f.p("HostedZoneId",()=>r.HostedZoneId,"{HostedZoneId}",!1);let h;return f.m("GET").h(w).b(h),f.build()},JV=async(r,s)=>{const f=b.requestBuilder(r,s),w={};f.bp("/2013-04-01/geolocation");const h=Y({[lu]:[,r[$0]],[Du]:[,r[I0]],[cu]:[,r[U0]]});let E;return f.m("GET").h(w).q(h).b(E),f.build()},QV=async(r,s)=>{const f=b.requestBuilder(r,s),w={};f.bp("/2013-04-01/healthcheck/{HealthCheckId}"),f.p("HealthCheckId",()=>r.HealthCheckId,"{HealthCheckId}",!1);let h;return f.m("GET").h(w).b(h),f.build()},BV=async(r,s)=>{const f=b.requestBuilder(r,s),w={};f.bp("/2013-04-01/healthcheckcount");let h;return f.m("GET").h(w).b(h),f.build()},MV=async(r,s)=>{const f=b.requestBuilder(r,s),w={};f.bp("/2013-04-01/healthcheck/{HealthCheckId}/lastfailurereason"),f.p("HealthCheckId",()=>r.HealthCheckId,"{HealthCheckId}",!1);let h;return f.m("GET").h(w).b(h),f.build()},VV=async(r,s)=>{const f=b.requestBuilder(r,s),w={};f.bp("/2013-04-01/healthcheck/{HealthCheckId}/status"),f.p("HealthCheckId",()=>r.HealthCheckId,"{HealthCheckId}",!1);let h;return f.m("GET").h(w).b(h),f.build()},HV=async(r,s)=>{const f=b.requestBuilder(r,s),w={};f.bp("/2013-04-01/hostedzone/{Id}"),f.p("Id",()=>r.Id,"{Id}",!1);let h;return f.m("GET").h(w).b(h),f.build()},lV=async(r,s)=>{const f=b.requestBuilder(r,s),w={};f.bp("/2013-04-01/hostedzonecount");let h;return f.m("GET").h(w).b(h),f.build()},DV=async(r,s)=>{const f=b.requestBuilder(r,s),w={};f.bp("/2013-04-01/hostedzonelimit/{HostedZoneId}/{Type}"),f.p("Type",()=>r.Type,"{Type}",!1),f.p("HostedZoneId",()=>r.HostedZoneId,"{HostedZoneId}",!1);let h;return f.m("GET").h(w).b(h),f.build()},kV=async(r,s)=>{const f=b.requestBuilder(r,s),w={};f.bp("/2013-04-01/queryloggingconfig/{Id}"),f.p("Id",()=>r.Id,"{Id}",!1);let h;return f.m("GET").h(w).b(h),f.build()},yV=async(r,s)=>{const f=b.requestBuilder(r,s),w={};f.bp("/2013-04-01/delegationset/{Id}"),f.p("Id",()=>r.Id,"{Id}",!1);let h;return f.m("GET").h(w).b(h),f.build()},NV=async(r,s)=>{const f=b.requestBuilder(r,s),w={};f.bp("/2013-04-01/reusabledelegationsetlimit/{DelegationSetId}/{Type}"),f.p("Type",()=>r.Type,"{Type}",!1),f.p("DelegationSetId",()=>r.DelegationSetId,"{DelegationSetId}",!1);let h;return f.m("GET").h(w).b(h),f.build()},qV=async(r,s)=>{const f=b.requestBuilder(r,s),w={};f.bp("/2013-04-01/trafficpolicy/{Id}/{Version}"),f.p("Id",()=>r.Id,"{Id}",!1),f.p("Version",()=>r.Version.toString(),"{Version}",!1);let h;return f.m("GET").h(w).b(h),f.build()},mV=async(r,s)=>{const f=b.requestBuilder(r,s),w={};f.bp("/2013-04-01/trafficpolicyinstance/{Id}"),f.p("Id",()=>r.Id,"{Id}",!1);let h;return f.m("GET").h(w).b(h),f.build()},jV=async(r,s)=>{const f=b.requestBuilder(r,s),w={};f.bp("/2013-04-01/trafficpolicyinstancecount");let h;return f.m("GET").h(w).b(h),f.build()},vV=async(r,s)=>{const f=b.requestBuilder(r,s),w={};f.bp("/2013-04-01/cidrcollection/{CollectionId}/cidrblocks"),f.p("CollectionId",()=>r.CollectionId,"{CollectionId}",!1);const h=Y({[T0]:[,r[ar]],[F1]:[,r[Xr]],[$$]:[()=>r.MaxResults!==void 0,()=>r[h$].toString()]});let E;return f.m("GET").h(w).q(h).b(E),f.build()},iV=async(r,s)=>{const f=b.requestBuilder(r,s),w={};f.bp("/2013-04-01/cidrcollection");const h=Y({[F1]:[,r[Xr]],[$$]:[()=>r.MaxResults!==void 0,()=>r[h$].toString()]});let E;return f.m("GET").h(w).q(h).b(E),f.build()},OV=async(r,s)=>{const f=b.requestBuilder(r,s),w={};f.bp("/2013-04-01/cidrcollection/{CollectionId}"),f.p("CollectionId",()=>r.CollectionId,"{CollectionId}",!1);const h=Y({[F1]:[,r[Xr]],[$$]:[()=>r.MaxResults!==void 0,()=>r[h$].toString()]});let E;return f.m("GET").h(w).q(h).b(E),f.build()},dV=async(r,s)=>{const f=b.requestBuilder(r,s),w={};f.bp("/2013-04-01/geolocations");const h=Y({[bu]:[,r[Lu]],[_u]:[,r[Ru]],[gu]:[,r[Ku]],[of]:[()=>r.MaxItems!==void 0,()=>r[a].toString()]});let E;return f.m("GET").h(w).q(h).b(E),f.build()},cV=async(r,s)=>{const f=b.requestBuilder(r,s),w={};f.bp("/2013-04-01/healthcheck");const h=Y({[L8]:[,r[gf]],[of]:[()=>r.MaxItems!==void 0,()=>r[a].toString()]});let E;return f.m("GET").h(w).q(h).b(E),f.build()},bV=async(r,s)=>{const f=b.requestBuilder(r,s),w={};f.bp("/2013-04-01/hostedzone");const h=Y({[L8]:[,r[gf]],[of]:[()=>r.MaxItems!==void 0,()=>r[a].toString()],[ku]:[,r[w6]],[mu]:[,r[tp]]});let E;return f.m("GET").h(w).q(h).b(E),f.build()},_V=async(r,s)=>{const f=b.requestBuilder(r,s),w={};f.bp("/2013-04-01/hostedzonesbyname");const h=Y({[yu]:[,r[Ws]],[E$]:[,r[rr]],[of]:[()=>r.MaxItems!==void 0,()=>r[a].toString()]});let E;return f.m("GET").h(w).q(h).b(E),f.build()},gV=async(r,s)=>{const f=b.requestBuilder(r,s),w={};f.bp("/2013-04-01/hostedzonesbyvpc");const h=Y({[ou]:[,y(r[tE],"VPCId")],[pu]:[,y(r[r$],"VPCRegion")],[of]:[()=>r.MaxItems!==void 0,()=>r[a].toString()],[F1]:[,r[Xr]]});let E;return f.m("GET").h(w).q(h).b(E),f.build()},xV=async(r,s)=>{const f=b.requestBuilder(r,s),w={};f.bp("/2013-04-01/queryloggingconfig");const h=Y({[E$]:[,r[rr]],[F1]:[,r[Xr]],[$$]:[()=>r.MaxResults!==void 0,()=>r[h$].toString()]});let E;return f.m("GET").h(w).q(h).b(E),f.build()},eV=async(r,s)=>{const f=b.requestBuilder(r,s),w={};f.bp("/2013-04-01/hostedzone/{HostedZoneId}/rrset"),f.p("HostedZoneId",()=>r.HostedZoneId,"{HostedZoneId}",!1);const h=Y({[vu]:[,r[Yu]],[xu]:[,r[Xu]],[ju]:[,r[Su]],[of]:[()=>r.MaxItems!==void 0,()=>r[a].toString()]});let E;return f.m("GET").h(w).q(h).b(E),f.build()},nV=async(r,s)=>{const f=b.requestBuilder(r,s),w={};f.bp("/2013-04-01/delegationset");const h=Y({[L8]:[,r[gf]],[of]:[()=>r.MaxItems!==void 0,()=>r[a].toString()]});let E;return f.m("GET").h(w).q(h).b(E),f.build()},oV=async(r,s)=>{const f=b.requestBuilder(r,s),w={};f.bp("/2013-04-01/tags/{ResourceType}/{ResourceId}"),f.p("ResourceType",()=>r.ResourceType,"{ResourceType}",!1),f.p("ResourceId",()=>r.ResourceId,"{ResourceId}",!1);let h;return f.m("GET").h(w).b(h),f.build()},aV=async(r,s)=>{const f=b.requestBuilder(r,s),w={"content-type":"application/xml"};f.bp("/2013-04-01/tags/{ResourceType}"),f.p("ResourceType",()=>r.ResourceType,"{ResourceType}",!1);let h;h=lr;const E=new H(fu);return E.a("xmlns","https://route53.amazonaws.com/doc/2013-04-01/"),E.lc(r,"ResourceIds","ResourceIds",()=>Xa(r[Eu],s)),h+=E.toString(),f.m("POST").h(w).b(h),f.build()},pV=async(r,s)=>{const f=b.requestBuilder(r,s),w={};f.bp("/2013-04-01/trafficpolicies");const h=Y({[eu]:[,r[A6]],[of]:[()=>r.MaxItems!==void 0,()=>r[a].toString()]});let E;return f.m("GET").h(w).q(h).b(E),f.build()},uV=async(r,s)=>{const f=b.requestBuilder(r,s),w={};f.bp("/2013-04-01/trafficpolicyinstances");const h=Y({[E$]:[,r[Rw]],[R8]:[,r[xf]],[C8]:[,r[ef]],[of]:[()=>r.MaxItems!==void 0,()=>r[a].toString()]});let E;return f.m("GET").h(w).q(h).b(E),f.build()},tV=async(r,s)=>{const f=b.requestBuilder(r,s),w={};f.bp("/2013-04-01/trafficpolicyinstances/hostedzone");const h=Y({[vl]:[,y(r[rr],"HostedZoneId")],[R8]:[,r[xf]],[C8]:[,r[ef]],[of]:[()=>r.MaxItems!==void 0,()=>r[a].toString()]});let E;return f.m("GET").h(w).q(h).b(E),f.build()},rH=async(r,s)=>{const f=b.requestBuilder(r,s),w={};f.bp("/2013-04-01/trafficpolicyinstances/trafficpolicy");const h=Y({[vl]:[,y(r[$1],"TrafficPolicyId")],[au]:[y(r.TrafficPolicyVersion,"TrafficPolicyVersion")!=null,()=>r[_f].toString()],[E$]:[,r[Rw]],[R8]:[,r[xf]],[C8]:[,r[ef]],[of]:[()=>r.MaxItems!==void 0,()=>r[a].toString()]});let E;return f.m("GET").h(w).q(h).b(E),f.build()},fH=async(r,s)=>{const f=b.requestBuilder(r,s),w={};f.bp("/2013-04-01/trafficpolicies/{Id}/versions"),f.p("Id",()=>r.Id,"{Id}",!1);const h=Y({[nu]:[,r[L6]],[of]:[()=>r.MaxItems!==void 0,()=>r[a].toString()]});let E;return f.m("GET").h(w).q(h).b(E),f.build()},sH=async(r,s)=>{const f=b.requestBuilder(r,s),w={};f.bp("/2013-04-01/hostedzone/{HostedZoneId}/authorizevpcassociation"),f.p("HostedZoneId",()=>r.HostedZoneId,"{HostedZoneId}",!1);const h=Y({[F1]:[,r[Xr]],[$$]:[()=>r.MaxResults!==void 0,()=>r[h$].toString()]});let E;return f.m("GET").h(w).q(h).b(E),f.build()},wH=async(r,s)=>{const f=b.requestBuilder(r,s),w={};f.bp("/2013-04-01/testdnsanswer");const h=Y({[E$]:[,y(r[rr],"HostedZoneId")],[iu]:[,y(r[U6],"RecordName")],[Ou]:[,y(r[T6],"RecordType")],[du]:[,r[hu]],[Nu]:[,r[gp]],[qu]:[,r[xp]]});let E;return f.m("GET").h(w).q(h).b(E),f.build()},hH=async(r,s)=>{const f=b.requestBuilder(r,s),w={"content-type":"application/xml"};f.bp("/2013-04-01/healthcheck/{HealthCheckId}"),f.p("HealthCheckId",()=>r.HealthCheckId,"{HealthCheckId}",!1);let h;h=lr;const E=new H(Qu);if(E.a("xmlns","https://route53.amazonaws.com/doc/2013-04-01/"),r[E0]!=null)E.c(Jl(r[E0],s).n(E0));if(E.lc(r,"ChildHealthChecks","ChildHealthChecks",()=>Ql(r[vw],s)),r[Ts]!=null)E.c(H.of(Ts,String(r[Ts])).n(Ts));if(r[Gs]!=null)E.c(H.of(Gs,String(r[Gs])).n(Gs));if(r[As]!=null)E.c(H.of(As,String(r[As])).n(As));if(E.cc(r,xE),r[dw]!=null)E.c(H.of(dw,String(r[dw])).n(dw));if(r[Ls]!=null)E.c(H.of(Ls,String(r[Ls])).n(Ls));if(E.cc(r,Cw),E.cc(r,oE),r[Rs]!=null)E.c(H.of(Rs,String(r[Rs])).n(Rs));if(r[Cs]!=null)E.c(H.of(Cs,String(r[Cs])).n(Cs));return E.lc(r,"Regions","Regions",()=>Bl(r[iw],s)),E.lc(r,"ResetElements","ResetElements",()=>La(r[wu],s)),E.cc(r,aE),E.cc(r,uE),h+=E.toString(),f.m("POST").h(w).b(h),f.build()},EH=async(r,s)=>{const f=b.requestBuilder(r,s),w={"content-type":"application/xml"};f.bp("/2013-04-01/hostedzone/{Id}"),f.p("Id",()=>r.Id,"{Id}",!1);let h;h=lr;const E=new H(Bu);if(E.a("xmlns","https://route53.amazonaws.com/doc/2013-04-01/"),r[Fr]!=null)E.c(H.of(G8,r[Fr]).n(Fr));return h+=E.toString(),f.m("POST").h(w).b(h),f.build()},$H=async(r,s)=>{const f=b.requestBuilder(r,s),w={"content-type":"application/xml"};f.bp("/2013-04-01/trafficpolicy/{Id}/{Version}"),f.p("Id",()=>r.Id,"{Id}",!1),f.p("Version",()=>r.Version.toString(),"{Version}",!1);let h;h=lr;const E=new H(Mu);if(E.a("xmlns","https://route53.amazonaws.com/doc/2013-04-01/"),r[Fr]!=null)E.c(H.of(A8,r[Fr]).n(Fr));return h+=E.toString(),f.m("POST").h(w).b(h),f.build()},IH=async(r,s)=>{const f=b.requestBuilder(r,s),w={"content-type":"application/xml"};f.bp("/2013-04-01/trafficpolicyinstance/{Id}"),f.p("Id",()=>r.Id,"{Id}",!1);let h;h=lr;const E=new H(Vu);if(E.a("xmlns","https://route53.amazonaws.com/doc/2013-04-01/"),r[vr]!=null)E.c(H.of(vr,String(r[vr])).n(vr));if(E.cc(r,$1),r[_f]!=null)E.c(H.of(_f,String(r[_f])).n(_f));return h+=E.toString(),f.m("POST").h(w).b(h),f.build()},FH=async(r,s)=>{if(r.statusCode!==200&&r.statusCode>=300)return _(r,s);const f=Y({$metadata:Q(r)}),w=y(c(await x.parseXmlBody(r.body,s)),"body");if(w[wr]!=null)f[wr]=nf(w[wr],s);return f},UH=async(r,s)=>{if(r.statusCode!==200&&r.statusCode>=300)return _(r,s);const f=Y({$metadata:Q(r)}),w=y(c(await x.parseXmlBody(r.body,s)),"body");if(w[wr]!=null)f[wr]=nf(w[wr],s);return f},TH=async(r,s)=>{if(r.statusCode!==200&&r.statusCode>=300)return _(r,s);const f=Y({$metadata:Q(r)}),w=y(c(await x.parseXmlBody(r.body,s)),"body");if(w[Tr]!=null)f[Tr]=T(w[Tr]);return f},GH=async(r,s)=>{if(r.statusCode!==200&&r.statusCode>=300)return _(r,s);const f=Y({$metadata:Q(r)}),w=y(c(await x.parseXmlBody(r.body,s)),"body");if(w[wr]!=null)f[wr]=nf(w[wr],s);return f},AH=async(r,s)=>{if(r.statusCode!==200&&r.statusCode>=300)return _(r,s);const f=Y({$metadata:Q(r)});return await gr(r.body,s),f},LH=async(r,s)=>{if(r.statusCode!==201&&r.statusCode>=300)return _(r,s);const f=Y({$metadata:Q(r),[q0]:[,r.headers[T0]]}),w=y(c(await x.parseXmlBody(r.body,s)),"body");if(w[UG]!=null)f[UG]=Va(w[UG],s);return f},RH=async(r,s)=>{if(r.statusCode!==201&&r.statusCode>=300)return _(r,s);const f=Y({$metadata:Q(r),[q0]:[,r.headers[T0]]}),w=y(c(await x.parseXmlBody(r.body,s)),"body");if(w[zs]!=null)f[zs]=z6(w[zs],s);return f},CH=async(r,s)=>{if(r.statusCode!==201&&r.statusCode>=300)return _(r,s);const f=Y({$metadata:Q(r),[q0]:[,r.headers[T0]]}),w=y(c(await x.parseXmlBody(r.body,s)),"body");if(w[wr]!=null)f[wr]=nf(w[wr],s);if(w[Lf]!=null)f[Lf]=s$(w[Lf],s);if(w[Kf]!=null)f[Kf]=S6(w[Kf],s);if(w[Cr]!=null)f[Cr]=U8(w[Cr],s);return f},WH=async(r,s)=>{if(r.statusCode!==201&&r.statusCode>=300)return _(r,s);const f=Y({$metadata:Q(r),[q0]:[,r.headers[T0]]}),w=y(c(await x.parseXmlBody(r.body,s)),"body");if(w[wr]!=null)f[wr]=nf(w[wr],s);if(w[PG]!=null)f[PG]=ll(w[PG],s);return f},zH=async(r,s)=>{if(r.statusCode!==201&&r.statusCode>=300)return _(r,s);const f=Y({$metadata:Q(r),[q0]:[,r.headers[T0]]}),w=y(c(await x.parseXmlBody(r.body,s)),"body");if(w[Ww]!=null)f[Ww]=I8(w[Ww],s);return f},SH=async(r,s)=>{if(r.statusCode!==201&&r.statusCode>=300)return _(r,s);const f=Y({$metadata:Q(r),[q0]:[,r.headers[T0]]}),w=y(c(await x.parseXmlBody(r.body,s)),"body");if(w[Lf]!=null)f[Lf]=s$(w[Lf],s);return f},YH=async(r,s)=>{if(r.statusCode!==201&&r.statusCode>=300)return _(r,s);const f=Y({$metadata:Q(r),[q0]:[,r.headers[T0]]}),w=y(c(await x.parseXmlBody(r.body,s)),"body");if(w[Rf]!=null)f[Rf]=w$(w[Rf],s);return f},XH=async(r,s)=>{if(r.statusCode!==201&&r.statusCode>=300)return _(r,s);const f=Y({$metadata:Q(r),[q0]:[,r.headers[T0]]}),w=y(c(await x.parseXmlBody(r.body,s)),"body");if(w[If]!=null)f[If]=Y6(w[If],s);return f},KH=async(r,s)=>{if(r.statusCode!==201&&r.statusCode>=300)return _(r,s);const f=Y({$metadata:Q(r),[q0]:[,r.headers[T0]]}),w=y(c(await x.parseXmlBody(r.body,s)),"body");if(w[Rf]!=null)f[Rf]=w$(w[Rf],s);return f},ZH=async(r,s)=>{if(r.statusCode!==200&&r.statusCode>=300)return _(r,s);const f=Y({$metadata:Q(r)}),w=y(c(await x.parseXmlBody(r.body,s)),"body");if(w[rr]!=null)f[rr]=T(w[rr]);if(w[Cr]!=null)f[Cr]=U8(w[Cr],s);return f},PH=async(r,s)=>{if(r.statusCode!==200&&r.statusCode>=300)return _(r,s);const f=Y({$metadata:Q(r)}),w=y(c(await x.parseXmlBody(r.body,s)),"body");if(w[wr]!=null)f[wr]=nf(w[wr],s);return f},JH=async(r,s)=>{if(r.statusCode!==200&&r.statusCode>=300)return _(r,s);const f=Y({$metadata:Q(r)});return await gr(r.body,s),f},QH=async(r,s)=>{if(r.statusCode!==200&&r.statusCode>=300)return _(r,s);const f=Y({$metadata:Q(r)});return await gr(r.body,s),f},BH=async(r,s)=>{if(r.statusCode!==200&&r.statusCode>=300)return _(r,s);const f=Y({$metadata:Q(r)}),w=y(c(await x.parseXmlBody(r.body,s)),"body");if(w[wr]!=null)f[wr]=nf(w[wr],s);return f},MH=async(r,s)=>{if(r.statusCode!==200&&r.statusCode>=300)return _(r,s);const f=Y({$metadata:Q(r)}),w=y(c(await x.parseXmlBody(r.body,s)),"body");if(w[wr]!=null)f[wr]=nf(w[wr],s);return f},VH=async(r,s)=>{if(r.statusCode!==200&&r.statusCode>=300)return _(r,s);const f=Y({$metadata:Q(r)});return await gr(r.body,s),f},HH=async(r,s)=>{if(r.statusCode!==200&&r.statusCode>=300)return _(r,s);const f=Y({$metadata:Q(r)});return await gr(r.body,s),f},lH=async(r,s)=>{if(r.statusCode!==200&&r.statusCode>=300)return _(r,s);const f=Y({$metadata:Q(r)});return await gr(r.body,s),f},DH=async(r,s)=>{if(r.statusCode!==200&&r.statusCode>=300)return _(r,s);const f=Y({$metadata:Q(r)});return await gr(r.body,s),f},kH=async(r,s)=>{if(r.statusCode!==200&&r.statusCode>=300)return _(r,s);const f=Y({$metadata:Q(r)});return await gr(r.body,s),f},yH=async(r,s)=>{if(r.statusCode!==200&&r.statusCode>=300)return _(r,s);const f=Y({$metadata:Q(r)}),w=y(c(await x.parseXmlBody(r.body,s)),"body");if(w[wr]!=null)f[wr]=nf(w[wr],s);return f},NH=async(r,s)=>{if(r.statusCode!==200&&r.statusCode>=300)return _(r,s);const f=Y({$metadata:Q(r)}),w=y(c(await x.parseXmlBody(r.body,s)),"body");if(w[wr]!=null)f[wr]=nf(w[wr],s);return f},qH=async(r,s)=>{if(r.statusCode!==200&&r.statusCode>=300)return _(r,s);const f=Y({$metadata:Q(r)}),w=y(c(await x.parseXmlBody(r.body,s)),"body");if(w[wr]!=null)f[wr]=nf(w[wr],s);return f},mH=async(r,s)=>{if(r.statusCode!==200&&r.statusCode>=300)return _(r,s);const f=Y({$metadata:Q(r)}),w=y(c(await x.parseXmlBody(r.body,s)),"body");if(w[l0]!=null)f[l0]=xr(w[l0]);if(w[k0]!=null)f[k0]=Ka(w[k0],s);return f},jH=async(r,s)=>{if(r.statusCode!==200&&r.statusCode>=300)return _(r,s);const f=Y({$metadata:Q(r)}),w=y(c(await x.parseXmlBody(r.body,s)),"body");if(w[wr]!=null)f[wr]=nf(w[wr],s);return f},vH=async(r,s)=>{if(r.statusCode!==200&&r.statusCode>=300)return _(r,s);const f=Y({$metadata:Q(r)}),w=y(c(await x.parseXmlBody(r.body,s)),"body");if(w.CheckerIpRanges==="")f[HE]=[];else if(w[HE]!=null&&w[HE][Ss]!=null)f[HE]=Ja(Gr(w[HE][Ss]),s);return f},iH=async(r,s)=>{if(r.statusCode!==200&&r.statusCode>=300)return _(r,s);const f=Y({$metadata:Q(r)}),w=y(c(await x.parseXmlBody(r.body,s)),"body");if(w.KeySigningKeys==="")f[mE]=[];else if(w[mE]!=null&&w[mE][Ss]!=null)f[mE]=ua(Gr(w[mE][Ss]),s);if(w[$f]!=null)f[$f]=va(w[$f],s);return f},OH=async(r,s)=>{if(r.statusCode!==200&&r.statusCode>=300)return _(r,s);const f=Y({$metadata:Q(r)}),w=y(c(await x.parseXmlBody(r.body,s)),"body");if(w[eE]!=null)f[eE]=Ml(w[eE],s);return f},dH=async(r,s)=>{if(r.statusCode!==200&&r.statusCode>=300)return _(r,s);const f=Y({$metadata:Q(r)}),w=y(c(await x.parseXmlBody(r.body,s)),"body");if(w[zs]!=null)f[zs]=z6(w[zs],s);return f},cH=async(r,s)=>{if(r.statusCode!==200&&r.statusCode>=300)return _(r,s);const f=Y({$metadata:Q(r)}),w=y(c(await x.parseXmlBody(r.body,s)),"body");if(w[YG]!=null)f[YG]=xr(w[YG]);return f},bH=async(r,s)=>{if(r.statusCode!==200&&r.statusCode>=300)return _(r,s);const f=Y({$metadata:Q(r)}),w=y(c(await x.parseXmlBody(r.body,s)),"body");if(w.HealthCheckObservations==="")f[s0]=[];else if(w[s0]!=null&&w[s0][R6]!=null)f[s0]=Vl(Gr(w[s0][R6]),s);return f},_H=async(r,s)=>{if(r.statusCode!==200&&r.statusCode>=300)return _(r,s);const f=Y({$metadata:Q(r)}),w=y(c(await x.parseXmlBody(r.body,s)),"body");if(w.HealthCheckObservations==="")f[s0]=[];else if(w[s0]!=null&&w[s0][R6]!=null)f[s0]=Vl(Gr(w[s0][R6]),s);return f},gH=async(r,s)=>{if(r.statusCode!==200&&r.statusCode>=300)return _(r,s);const f=Y({$metadata:Q(r)}),w=y(c(await x.parseXmlBody(r.body,s)),"body");if(w[Lf]!=null)f[Lf]=s$(w[Lf],s);if(w[Kf]!=null)f[Kf]=S6(w[Kf],s);if(w.VPCs==="")f[h0]=[];else if(w[h0]!=null&&w[h0][Cr]!=null)f[h0]=yl(Gr(w[h0][Cr]),s);return f},xH=async(r,s)=>{if(r.statusCode!==200&&r.statusCode>=300)return _(r,s);const f=Y({$metadata:Q(r)}),w=y(c(await x.parseXmlBody(r.body,s)),"body");if(w[XG]!=null)f[XG]=xr(w[XG]);return f},eH=async(r,s)=>{if(r.statusCode!==200&&r.statusCode>=300)return _(r,s);const f=Y({$metadata:Q(r)}),w=y(c(await x.parseXmlBody(r.body,s)),"body");if(w[l0]!=null)f[l0]=xr(w[l0]);if(w[k0]!=null)f[k0]=na(w[k0],s);return f},nH=async(r,s)=>{if(r.statusCode!==200&&r.statusCode>=300)return _(r,s);const f=Y({$metadata:Q(r)}),w=y(c(await x.parseXmlBody(r.body,s)),"body");if(w[Ww]!=null)f[Ww]=I8(w[Ww],s);return f},oH=async(r,s)=>{if(r.statusCode!==200&&r.statusCode>=300)return _(r,s);const f=Y({$metadata:Q(r)}),w=y(c(await x.parseXmlBody(r.body,s)),"body");if(w[Lf]!=null)f[Lf]=s$(w[Lf],s);return f},aH=async(r,s)=>{if(r.statusCode!==200&&r.statusCode>=300)return _(r,s);const f=Y({$metadata:Q(r)}),w=y(c(await x.parseXmlBody(r.body,s)),"body");if(w[l0]!=null)f[l0]=xr(w[l0]);if(w[k0]!=null)f[k0]=Fp(w[k0],s);return f},pH=async(r,s)=>{if(r.statusCode!==200&&r.statusCode>=300)return _(r,s);const f=Y({$metadata:Q(r)}),w=y(c(await x.parseXmlBody(r.body,s)),"body");if(w[Rf]!=null)f[Rf]=w$(w[Rf],s);return f},uH=async(r,s)=>{if(r.statusCode!==200&&r.statusCode>=300)return _(r,s);const f=Y({$metadata:Q(r)}),w=y(c(await x.parseXmlBody(r.body,s)),"body");if(w[If]!=null)f[If]=Y6(w[If],s);return f},tH=async(r,s)=>{if(r.statusCode!==200&&r.statusCode>=300)return _(r,s);const f=Y({$metadata:Q(r)}),w=y(c(await x.parseXmlBody(r.body,s)),"body");if(w[w8]!=null)f[w8]=hr(w[w8]);return f},rl=async(r,s)=>{if(r.statusCode!==200&&r.statusCode>=300)return _(r,s);const f=Y({$metadata:Q(r)}),w=y(c(await x.parseXmlBody(r.body,s)),"body");if(w.CidrBlocks==="")f[ME]=[];else if(w[ME]!=null&&w[ME][Ss]!=null)f[ME]=Ba(Gr(w[ME][Ss]),s);if(w[Xr]!=null)f[Xr]=T(w[Xr]);return f},fl=async(r,s)=>{if(r.statusCode!==200&&r.statusCode>=300)return _(r,s);const f=Y({$metadata:Q(r)}),w=y(c(await x.parseXmlBody(r.body,s)),"body");if(w.CidrCollections==="")f[VE]=[];else if(w[VE]!=null&&w[VE][Ss]!=null)f[VE]=Da(Gr(w[VE][Ss]),s);if(w[Xr]!=null)f[Xr]=T(w[Xr]);return f},sl=async(r,s)=>{if(r.statusCode!==200&&r.statusCode>=300)return _(r,s);const f=Y({$metadata:Q(r)}),w=y(c(await x.parseXmlBody(r.body,s)),"body");if(w.CidrLocations==="")f[lE]=[];else if(w[lE]!=null&&w[lE][Ss]!=null)f[lE]=ta(Gr(w[lE][Ss]),s);if(w[Xr]!=null)f[Xr]=T(w[Xr]);return f},wl=async(r,s)=>{if(r.statusCode!==200&&r.statusCode>=300)return _(r,s);const f=Y({$metadata:Q(r)}),w=y(c(await x.parseXmlBody(r.body,s)),"body");if(w.GeoLocationDetailsList==="")f[yE]=[];else if(w[yE]!=null&&w[yE][eE]!=null)f[yE]=da(Gr(w[yE][eE]),s);if(w[Ur]!=null)f[Ur]=Nr(w[Ur]);if(w[a]!=null)f[a]=hr(w[a]);if(w[VG]!=null)f[VG]=T(w[VG]);if(w[HG]!=null)f[HG]=T(w[HG]);if(w[qG]!=null)f[qG]=T(w[qG]);return f},hl=async(r,s)=>{if(r.statusCode!==200&&r.statusCode>=300)return _(r,s);const f=Y({$metadata:Q(r)}),w=y(c(await x.parseXmlBody(r.body,s)),"body");if(w.HealthChecks==="")f[NE]=[];else if(w[NE]!=null&&w[NE][zs]!=null)f[NE]=xa(Gr(w[NE][zs]),s);if(w[Ur]!=null)f[Ur]=Nr(w[Ur]);if(w[gf]!=null)f[gf]=T(w[gf]);if(w[a]!=null)f[a]=hr(w[a]);if(w[y0]!=null)f[y0]=T(w[y0]);return f},El=async(r,s)=>{if(r.statusCode!==200&&r.statusCode>=300)return _(r,s);const f=Y({$metadata:Q(r)}),w=y(c(await x.parseXmlBody(r.body,s)),"body");if(w.HostedZones==="")f[w0]=[];else if(w[w0]!=null&&w[w0][Kf]!=null)f[w0]=Hl(Gr(w[w0][Kf]),s);if(w[Ur]!=null)f[Ur]=Nr(w[Ur]);if(w[gf]!=null)f[gf]=T(w[gf]);if(w[a]!=null)f[a]=hr(w[a]);if(w[y0]!=null)f[y0]=T(w[y0]);return f},$l=async(r,s)=>{if(r.statusCode!==200&&r.statusCode>=300)return _(r,s);const f=Y({$metadata:Q(r)}),w=y(c(await x.parseXmlBody(r.body,s)),"body");if(w[Ws]!=null)f[Ws]=T(w[Ws]);if(w[rr]!=null)f[rr]=T(w[rr]);if(w.HostedZones==="")f[w0]=[];else if(w[w0]!=null&&w[w0][Kf]!=null)f[w0]=Hl(Gr(w[w0][Kf]),s);if(w[Ur]!=null)f[Ur]=Nr(w[Ur]);if(w[a]!=null)f[a]=hr(w[a]);if(w[lG]!=null)f[lG]=T(w[lG]);if(w[DG]!=null)f[DG]=T(w[DG]);return f},Il=async(r,s)=>{if(r.statusCode!==200&&r.statusCode>=300)return _(r,s);const f=Y({$metadata:Q(r)}),w=y(c(await x.parseXmlBody(r.body,s)),"body");if(w.HostedZoneSummaries==="")f[qE]=[];else if(w[qE]!=null&&w[qE][dM]!=null)f[qE]=aa(Gr(w[qE][dM]),s);if(w[a]!=null)f[a]=hr(w[a]);if(w[Xr]!=null)f[Xr]=T(w[Xr]);return f},Fl=async(r,s)=>{if(r.statusCode!==200&&r.statusCode>=300)return _(r,s);const f=Y({$metadata:Q(r)}),w=y(c(await x.parseXmlBody(r.body,s)),"body");if(w[Xr]!=null)f[Xr]=T(w[Xr]);if(w.QueryLoggingConfigs==="")f[vE]=[];else if(w[vE]!=null&&w[vE][Ww]!=null)f[vE]=fp(Gr(w[vE][Ww]),s);return f},Ul=async(r,s)=>{if(r.statusCode!==200&&r.statusCode>=300)return _(r,s);const f=Y({$metadata:Q(r)}),w=y(c(await x.parseXmlBody(r.body,s)),"body");if(w[Ur]!=null)f[Ur]=Nr(w[Ur]);if(w[a]!=null)f[a]=hr(w[a]);if(w[kG]!=null)f[kG]=T(w[kG]);if(w[yG]!=null)f[yG]=T(w[yG]);if(w[NG]!=null)f[NG]=T(w[NG]);if(w.ResourceRecordSets==="")f[OE]=[];else if(w[OE]!=null&&w[OE][w1]!=null)f[OE]=$p(Gr(w[OE][w1]),s);return f},Tl=async(r,s)=>{if(r.statusCode!==200&&r.statusCode>=300)return _(r,s);const f=Y({$metadata:Q(r)}),w=y(c(await x.parseXmlBody(r.body,s)),"body");if(w.DelegationSets==="")f[DE]=[];else if(w[DE]!=null&&w[DE][Lf]!=null)f[DE]=qa(Gr(w[DE][Lf]),s);if(w[Ur]!=null)f[Ur]=Nr(w[Ur]);if(w[gf]!=null)f[gf]=T(w[gf]);if(w[a]!=null)f[a]=hr(w[a]);if(w[y0]!=null)f[y0]=T(w[y0]);return f},Gl=async(r,s)=>{if(r.statusCode!==200&&r.statusCode>=300)return _(r,s);const f=Y({$metadata:Q(r)}),w=y(c(await x.parseXmlBody(r.body,s)),"body");if(w[pE]!=null)f[pE]=kl(w[pE],s);return f},Al=async(r,s)=>{if(r.statusCode!==200&&r.statusCode>=300)return _(r,s);const f=Y({$metadata:Q(r)}),w=y(c(await x.parseXmlBody(r.body,s)),"body");if(w.ResourceTagSets==="")f[dE]=[];else if(w[dE]!=null&&w[dE][pE]!=null)f[dE]=Ip(Gr(w[dE][pE]),s);return f},Ll=async(r,s)=>{if(r.statusCode!==200&&r.statusCode>=300)return _(r,s);const f=Y({$metadata:Q(r)}),w=y(c(await x.parseXmlBody(r.body,s)),"body");if(w[Ur]!=null)f[Ur]=Nr(w[Ur]);if(w[a]!=null)f[a]=hr(w[a]);if(w[A6]!=null)f[A6]=T(w[A6]);if(w.TrafficPolicySummaries==="")f[cE]=[];else if(w[cE]!=null&&w[cE][gM]!=null)f[cE]=Lp(Gr(w[cE][gM]),s);return f},Rl=async(r,s)=>{if(r.statusCode!==200&&r.statusCode>=300)return _(r,s);const f=Y({$metadata:Q(r)}),w=y(c(await x.parseXmlBody(r.body,s)),"body");if(w[Rw]!=null)f[Rw]=T(w[Rw]);if(w[Ur]!=null)f[Ur]=Nr(w[Ur]);if(w[a]!=null)f[a]=hr(w[a]);if(w[xf]!=null)f[xf]=T(w[xf]);if(w[ef]!=null)f[ef]=T(w[ef]);if(w.TrafficPolicyInstances==="")f[Ef]=[];else if(w[Ef]!=null&&w[Ef][If]!=null)f[Ef]=F8(Gr(w[Ef][If]),s);return f},Cl=async(r,s)=>{if(r.statusCode!==200&&r.statusCode>=300)return _(r,s);const f=Y({$metadata:Q(r)}),w=y(c(await x.parseXmlBody(r.body,s)),"body");if(w[Ur]!=null)f[Ur]=Nr(w[Ur]);if(w[a]!=null)f[a]=hr(w[a]);if(w[xf]!=null)f[xf]=T(w[xf]);if(w[ef]!=null)f[ef]=T(w[ef]);if(w.TrafficPolicyInstances==="")f[Ef]=[];else if(w[Ef]!=null&&w[Ef][If]!=null)f[Ef]=F8(Gr(w[Ef][If]),s);return f},Wl=async(r,s)=>{if(r.statusCode!==200&&r.statusCode>=300)return _(r,s);const f=Y({$metadata:Q(r)}),w=y(c(await x.parseXmlBody(r.body,s)),"body");if(w[Rw]!=null)f[Rw]=T(w[Rw]);if(w[Ur]!=null)f[Ur]=Nr(w[Ur]);if(w[a]!=null)f[a]=hr(w[a]);if(w[xf]!=null)f[xf]=T(w[xf]);if(w[ef]!=null)f[ef]=T(w[ef]);if(w.TrafficPolicyInstances==="")f[Ef]=[];else if(w[Ef]!=null&&w[Ef][If]!=null)f[Ef]=F8(Gr(w[Ef][If]),s);return f},zl=async(r,s)=>{if(r.statusCode!==200&&r.statusCode>=300)return _(r,s);const f=Y({$metadata:Q(r)}),w=y(c(await x.parseXmlBody(r.body,s)),"body");if(w[Ur]!=null)f[Ur]=Nr(w[Ur]);if(w[a]!=null)f[a]=hr(w[a]);if(w.TrafficPolicies==="")f[bE]=[];else if(w[bE]!=null&&w[bE][Rf]!=null)f[bE]=Ap(Gr(w[bE][Rf]),s);if(w[L6]!=null)f[L6]=T(w[L6]);return f},Sl=async(r,s)=>{if(r.statusCode!==200&&r.statusCode>=300)return _(r,s);const f=Y({$metadata:Q(r)}),w=y(c(await x.parseXmlBody(r.body,s)),"body");if(w[rr]!=null)f[rr]=T(w[rr]);if(w[Xr]!=null)f[Xr]=T(w[Xr]);if(w.VPCs==="")f[h0]=[];else if(w[h0]!=null&&w[h0][Cr]!=null)f[h0]=yl(Gr(w[h0][Cr]),s);return f},Yl=async(r,s)=>{if(r.statusCode!==200&&r.statusCode>=300)return _(r,s);const f=Y({$metadata:Q(r)}),w=y(c(await x.parseXmlBody(r.body,s)),"body");if(w[mG]!=null)f[mG]=T(w[mG]);if(w[bG]!=null)f[bG]=T(w[bG]);if(w.RecordData==="")f[iE]=[];else if(w[iE]!=null&&w[iE][bM]!=null)f[iE]=sp(Gr(w[iE][bM]),s);if(w[U6]!=null)f[U6]=T(w[U6]);if(w[T6]!=null)f[T6]=T(w[T6]);if(w[_G]!=null)f[_G]=T(w[_G]);return f},Xl=async(r,s)=>{if(r.statusCode!==200&&r.statusCode>=300)return _(r,s);const f=Y({$metadata:Q(r)}),w=y(c(await x.parseXmlBody(r.body,s)),"body");if(w[zs]!=null)f[zs]=z6(w[zs],s);return f},Kl=async(r,s)=>{if(r.statusCode!==200&&r.statusCode>=300)return _(r,s);const f=Y({$metadata:Q(r)}),w=y(c(await x.parseXmlBody(r.body,s)),"body");if(w[Kf]!=null)f[Kf]=S6(w[Kf],s);return f},Zl=async(r,s)=>{if(r.statusCode!==200&&r.statusCode>=300)return _(r,s);const f=Y({$metadata:Q(r)}),w=y(c(await x.parseXmlBody(r.body,s)),"body");if(w[Rf]!=null)f[Rf]=w$(w[Rf],s);return f},Pl=async(r,s)=>{if(r.statusCode!==200&&r.statusCode>=300)return _(r,s);const f=Y({$metadata:Q(r)}),w=y(c(await x.parseXmlBody(r.body,s)),"body");if(w[If]!=null)f[If]=Y6(w[If],s);return f},_=async(r,s)=>{const f={...r,body:await x.parseXmlErrorBody(r.body,s)},w=x.loadRestXmlErrorCode(r,f.body);switch(w){case"ConcurrentModification":case"com.amazonaws.route53#ConcurrentModification":throw await cn(f,s);case"InvalidInput":case"com.amazonaws.route53#InvalidInput":throw await To(f,s);case"InvalidKMSArn":case"com.amazonaws.route53#InvalidKMSArn":throw await Lo(f,s);case"InvalidKeySigningKeyStatus":case"com.amazonaws.route53#InvalidKeySigningKeyStatus":throw await Ao(f,s);case"InvalidSigningStatus":case"com.amazonaws.route53#InvalidSigningStatus":throw await Co(f,s);case"NoSuchKeySigningKey":case"com.amazonaws.route53#NoSuchKeySigningKey":throw await ko(f,s);case"ConflictingDomainExists":case"com.amazonaws.route53#ConflictingDomainExists":throw await bn(f,s);case"InvalidVPCId":case"com.amazonaws.route53#InvalidVPCId":throw await zo(f,s);case"LimitsExceeded":case"com.amazonaws.route53#LimitsExceeded":throw await Po(f,s);case"NoSuchHostedZone":case"com.amazonaws.route53#NoSuchHostedZone":throw await Do(f,s);case"NotAuthorizedException":case"com.amazonaws.route53#NotAuthorizedException":throw await mo(f,s);case"PriorRequestNotComplete":case"com.amazonaws.route53#PriorRequestNotComplete":throw await jo(f,s);case"PublicZoneVPCAssociation":case"com.amazonaws.route53#PublicZoneVPCAssociation":throw await vo(f,s);case"CidrBlockInUseException":case"com.amazonaws.route53#CidrBlockInUseException":throw await jn(f,s);case"CidrCollectionVersionMismatchException":case"com.amazonaws.route53#CidrCollectionVersionMismatchException":throw await dn(f,s);case"NoSuchCidrCollectionException":case"com.amazonaws.route53#NoSuchCidrCollectionException":throw await Qo(f,s);case"InvalidChangeBatch":case"com.amazonaws.route53#InvalidChangeBatch":throw await Fo(f,s);case"NoSuchHealthCheck":case"com.amazonaws.route53#NoSuchHealthCheck":throw await lo(f,s);case"ThrottlingException":case"com.amazonaws.route53#ThrottlingException":throw await Oo(f,s);case"CidrCollectionAlreadyExistsException":case"com.amazonaws.route53#CidrCollectionAlreadyExistsException":throw await vn(f,s);case"HealthCheckAlreadyExists":case"com.amazonaws.route53#HealthCheckAlreadyExists":throw await pn(f,s);case"TooManyHealthChecks":case"com.amazonaws.route53#TooManyHealthChecks":throw await co(f,s);case"DelegationSetNotAvailable":case"com.amazonaws.route53#DelegationSetNotAvailable":throw await nn(f,s);case"DelegationSetNotReusable":case"com.amazonaws.route53#DelegationSetNotReusable":throw await on(f,s);case"HostedZoneAlreadyExists":case"com.amazonaws.route53#HostedZoneAlreadyExists":throw await ro(f,s);case"InvalidDomainName":case"com.amazonaws.route53#InvalidDomainName":throw await Uo(f,s);case"NoSuchDelegationSet":case"com.amazonaws.route53#NoSuchDelegationSet":throw await Vo(f,s);case"TooManyHostedZones":case"com.amazonaws.route53#TooManyHostedZones":throw await bo(f,s);case"InvalidArgument":case"com.amazonaws.route53#InvalidArgument":throw await Io(f,s);case"InvalidKeySigningKeyName":case"com.amazonaws.route53#InvalidKeySigningKeyName":throw await Go(f,s);case"KeySigningKeyAlreadyExists":case"com.amazonaws.route53#KeySigningKeyAlreadyExists":throw await So(f,s);case"TooManyKeySigningKeys":case"com.amazonaws.route53#TooManyKeySigningKeys":throw await _o(f,s);case"InsufficientCloudWatchLogsResourcePolicy":case"com.amazonaws.route53#InsufficientCloudWatchLogsResourcePolicy":throw await $o(f,s);case"NoSuchCloudWatchLogsLogGroup":case"com.amazonaws.route53#NoSuchCloudWatchLogsLogGroup":throw await Mo(f,s);case"QueryLoggingConfigAlreadyExists":case"com.amazonaws.route53#QueryLoggingConfigAlreadyExists":throw await io(f,s);case"DelegationSetAlreadyCreated":case"com.amazonaws.route53#DelegationSetAlreadyCreated":throw await gn(f,s);case"DelegationSetAlreadyReusable":case"com.amazonaws.route53#DelegationSetAlreadyReusable":throw await xn(f,s);case"HostedZoneNotFound":case"com.amazonaws.route53#HostedZoneNotFound":throw await so(f,s);case"InvalidTrafficPolicyDocument":case"com.amazonaws.route53#InvalidTrafficPolicyDocument":throw await Wo(f,s);case"TooManyTrafficPolicies":case"com.amazonaws.route53#TooManyTrafficPolicies":throw await go(f,s);case"TrafficPolicyAlreadyExists":case"com.amazonaws.route53#TrafficPolicyAlreadyExists":throw await oo(f,s);case"NoSuchTrafficPolicy":case"com.amazonaws.route53#NoSuchTrafficPolicy":throw await No(f,s);case"TooManyTrafficPolicyInstances":case"com.amazonaws.route53#TooManyTrafficPolicyInstances":throw await xo(f,s);case"TrafficPolicyInstanceAlreadyExists":case"com.amazonaws.route53#TrafficPolicyInstanceAlreadyExists":throw await ao(f,s);case"TooManyTrafficPolicyVersionsForCurrentPolicy":case"com.amazonaws.route53#TooManyTrafficPolicyVersionsForCurrentPolicy":throw await eo(f,s);case"TooManyVPCAssociationAuthorizations":case"com.amazonaws.route53#TooManyVPCAssociationAuthorizations":throw await no(f,s);case"KeySigningKeyInParentDSRecord":case"com.amazonaws.route53#KeySigningKeyInParentDSRecord":throw await Yo(f,s);case"KeySigningKeyInUse":case"com.amazonaws.route53#KeySigningKeyInUse":throw await Xo(f,s);case"CidrCollectionInUseException":case"com.amazonaws.route53#CidrCollectionInUseException":throw await On(f,s);case"HealthCheckInUse":case"com.amazonaws.route53#HealthCheckInUse":throw await un(f,s);case"HostedZoneNotEmpty":case"com.amazonaws.route53#HostedZoneNotEmpty":throw await fo(f,s);case"NoSuchQueryLoggingConfig":case"com.amazonaws.route53#NoSuchQueryLoggingConfig":throw await yo(f,s);case"DelegationSetInUse":case"com.amazonaws.route53#DelegationSetInUse":throw await en(f,s);case"TrafficPolicyInUse":case"com.amazonaws.route53#TrafficPolicyInUse":throw await po(f,s);case"NoSuchTrafficPolicyInstance":case"com.amazonaws.route53#NoSuchTrafficPolicyInstance":throw await qo(f,s);case"VPCAssociationAuthorizationNotFound":case"com.amazonaws.route53#VPCAssociationAuthorizationNotFound":throw await uo(f,s);case"DNSSECNotFound":case"com.amazonaws.route53#DNSSECNotFound":throw await an(f,s);case"LastVPCAssociation":case"com.amazonaws.route53#LastVPCAssociation":throw await Zo(f,s);case"VPCAssociationNotFound":case"com.amazonaws.route53#VPCAssociationNotFound":throw await to(f,s);case"HostedZonePartiallyDelegated":case"com.amazonaws.route53#HostedZonePartiallyDelegated":throw await ho(f,s);case"KeySigningKeyWithActiveStatusNotFound":case"com.amazonaws.route53#KeySigningKeyWithActiveStatusNotFound":throw await Ko(f,s);case"NoSuchChange":case"com.amazonaws.route53#NoSuchChange":throw await Jo(f,s);case"NoSuchGeoLocation":case"com.amazonaws.route53#NoSuchGeoLocation":throw await Ho(f,s);case"IncompatibleVersion":case"com.amazonaws.route53#IncompatibleVersion":throw await Eo(f,s);case"HostedZoneNotPrivate":case"com.amazonaws.route53#HostedZoneNotPrivate":throw await wo(f,s);case"NoSuchCidrLocationException":case"com.amazonaws.route53#NoSuchCidrLocationException":throw await Bo(f,s);case"InvalidPaginationToken":case"com.amazonaws.route53#InvalidPaginationToken":throw await Ro(f,s);case"HealthCheckVersionMismatch":case"com.amazonaws.route53#HealthCheckVersionMismatch":throw await tn(f,s);case"ConflictingTypes":case"com.amazonaws.route53#ConflictingTypes":throw await _n(f,s);default:const h=f.body;return mn({output:r,parsedBody:h.Error,errorCode:w})}},mn=bs(d),jn=async(r,s)=>{const f=Y({}),w=r.body.Error;if(w[Pr]!=null)f[Pr]=T(w[Pr]);const h=new pI({$metadata:Q(r),...f});return D(h,r.body.Error)},vn=async(r,s)=>{const f=Y({}),w=r.body.Error;if(w[Pr]!=null)f[Pr]=T(w[Pr]);const h=new w2({$metadata:Q(r),...f});return D(h,r.body.Error)},On=async(r,s)=>{const f=Y({}),w=r.body.Error;if(w[Pr]!=null)f[Pr]=T(w[Pr]);const h=new k2({$metadata:Q(r),...f});return D(h,r.body.Error)},dn=async(r,s)=>{const f=Y({}),w=r.body.Error;if(w[Pr]!=null)f[Pr]=T(w[Pr]);const h=new uI({$metadata:Q(r),...f});return D(h,r.body.Error)},cn=async(r,s)=>{const f=Y({}),w=r.body.Error;if(w[X]!=null)f[X]=T(w[X]);const h=new vI({$metadata:Q(r),...f});return D(h,r.body.Error)},bn=async(r,s)=>{const f=Y({}),w=r.body.Error;if(w[X]!=null)f[X]=T(w[X]);const h=new _I({$metadata:Q(r),...f});return D(h,r.body.Error)},_n=async(r,s)=>{const f=Y({}),w=r.body.Error;if(w[X]!=null)f[X]=T(w[X]);const h=new u2({$metadata:Q(r),...f});return D(h,r.body.Error)},gn=async(r,s)=>{const f=Y({}),w=r.body.Error;if(w[X]!=null)f[X]=T(w[X]);const h=new Y2({$metadata:Q(r),...f});return D(h,r.body.Error)},xn=async(r,s)=>{const f=Y({}),w=r.body.Error;if(w[X]!=null)f[X]=T(w[X]);const h=new X2({$metadata:Q(r),...f});return D(h,r.body.Error)},en=async(r,s)=>{const f=Y({}),w=r.body.Error;if(w[X]!=null)f[X]=T(w[X]);const h=new m2({$metadata:Q(r),...f});return D(h,r.body.Error)},nn=async(r,s)=>{const f=Y({}),w=r.body.Error;if(w[X]!=null)f[X]=T(w[X]);const h=new $2({$metadata:Q(r),...f});return D(h,r.body.Error)},on=async(r,s)=>{const f=Y({}),w=r.body.Error;if(w[X]!=null)f[X]=T(w[X]);const h=new I2({$metadata:Q(r),...f});return D(h,r.body.Error)},an=async(r,s)=>{const f=Y({}),w=r.body.Error;if(w[X]!=null)f[X]=T(w[X]);const h=new O2({$metadata:Q(r),...f});return D(h,r.body.Error)},pn=async(r,s)=>{const f=Y({}),w=r.body.Error;if(w[X]!=null)f[X]=T(w[X]);const h=new h2({$metadata:Q(r),...f});return D(h,r.body.Error)},un=async(r,s)=>{const f=Y({}),w=r.body.Error;if(w[X]!=null)f[X]=T(w[X]);const h=new y2({$metadata:Q(r),...f});return D(h,r.body.Error)},tn=async(r,s)=>{const f=Y({}),w=r.body.Error;if(w[X]!=null)f[X]=T(w[X]);const h=new p2({$metadata:Q(r),...f});return D(h,r.body.Error)},ro=async(r,s)=>{const f=Y({}),w=r.body.Error;if(w[X]!=null)f[X]=T(w[X]);const h=new F2({$metadata:Q(r),...f});return D(h,r.body.Error)},fo=async(r,s)=>{const f=Y({}),w=r.body.Error;if(w[X]!=null)f[X]=T(w[X]);const h=new N2({$metadata:Q(r),...f});return D(h,r.body.Error)},so=async(r,s)=>{const f=Y({}),w=r.body.Error;if(w[X]!=null)f[X]=T(w[X]);const h=new K2({$metadata:Q(r),...f});return D(h,r.body.Error)},wo=async(r,s)=>{const f=Y({}),w=r.body.Error;if(w[X]!=null)f[X]=T(w[X]);const h=new n2({$metadata:Q(r),...f});return D(h,r.body.Error)},ho=async(r,s)=>{const f=Y({}),w=r.body.Error;if(w[X]!=null)f[X]=T(w[X]);const h=new b2({$metadata:Q(r),...f});return D(h,r.body.Error)},Eo=async(r,s)=>{const f=Y({}),w=r.body.Error;if(w[X]!=null)f[X]=T(w[X]);const h=new e2({$metadata:Q(r),...f});return D(h,r.body.Error)},$o=async(r,s)=>{const f=Y({}),w=r.body.Error;if(w[X]!=null)f[X]=T(w[X]);const h=new W2({$metadata:Q(r),...f});return D(h,r.body.Error)},Io=async(r,s)=>{const f=Y({}),w=r.body.Error;if(w[X]!=null)f[X]=T(w[X]);const h=new A2({$metadata:Q(r),...f});return D(h,r.body.Error)},Fo=async(r,s)=>{const f=Y({}),w=r.body.Error;if(w[X]!=null)f[X]=T(w[X]);if(w.messages==="")f[gE]=[];else if(w[gE]!=null&&w[gE][Pr]!=null)f[gE]=ia(Gr(w[gE][Pr]),s);const h=new r2({$metadata:Q(r),...f});return D(h,r.body.Error)},Uo=async(r,s)=>{const f=Y({}),w=r.body.Error;if(w[X]!=null)f[X]=T(w[X]);const h=new U2({$metadata:Q(r),...f});return D(h,r.body.Error)},To=async(r,s)=>{const f=Y({}),w=r.body.Error;if(w[X]!=null)f[X]=T(w[X]);const h=new iI({$metadata:Q(r),...f});return D(h,r.body.Error)},Go=async(r,s)=>{const f=Y({}),w=r.body.Error;if(w[X]!=null)f[X]=T(w[X]);const h=new L2({$metadata:Q(r),...f});return D(h,r.body.Error)},Ao=async(r,s)=>{const f=Y({}),w=r.body.Error;if(w[X]!=null)f[X]=T(w[X]);const h=new OI({$metadata:Q(r),...f});return D(h,r.body.Error)},Lo=async(r,s)=>{const f=Y({}),w=r.body.Error;if(w[X]!=null)f[X]=T(w[X]);const h=new dI({$metadata:Q(r),...f});return D(h,r.body.Error)},Ro=async(r,s)=>{const f=Y({}),w=r.body.Error;if(w[X]!=null)f[X]=T(w[X]);const h=new a2({$metadata:Q(r),...f});return D(h,r.body.Error)},Co=async(r,s)=>{const f=Y({}),w=r.body.Error;if(w[X]!=null)f[X]=T(w[X]);const h=new cI({$metadata:Q(r),...f});return D(h,r.body.Error)},Wo=async(r,s)=>{const f=Y({}),w=r.body.Error;if(w[X]!=null)f[X]=T(w[X]);const h=new Z2({$metadata:Q(r),...f});return D(h,r.body.Error)},zo=async(r,s)=>{const f=Y({}),w=r.body.Error;if(w[X]!=null)f[X]=T(w[X]);const h=new gI({$metadata:Q(r),...f});return D(h,r.body.Error)},So=async(r,s)=>{const f=Y({}),w=r.body.Error;if(w[X]!=null)f[X]=T(w[X]);const h=new R2({$metadata:Q(r),...f});return D(h,r.body.Error)},Yo=async(r,s)=>{const f=Y({}),w=r.body.Error;if(w[X]!=null)f[X]=T(w[X]);const h=new l2({$metadata:Q(r),...f});return D(h,r.body.Error)},Xo=async(r,s)=>{const f=Y({}),w=r.body.Error;if(w[X]!=null)f[X]=T(w[X]);const h=new D2({$metadata:Q(r),...f});return D(h,r.body.Error)},Ko=async(r,s)=>{const f=Y({}),w=r.body.Error;if(w[X]!=null)f[X]=T(w[X]);const h=new _2({$metadata:Q(r),...f});return D(h,r.body.Error)},Zo=async(r,s)=>{const f=Y({}),w=r.body.Error;if(w[X]!=null)f[X]=T(w[X]);const h=new d2({$metadata:Q(r),...f});return D(h,r.body.Error)},Po=async(r,s)=>{const f=Y({}),w=r.body.Error;if(w[X]!=null)f[X]=T(w[X]);const h=new xI({$metadata:Q(r),...f});return D(h,r.body.Error)},Jo=async(r,s)=>{const f=Y({}),w=r.body.Error;if(w[X]!=null)f[X]=T(w[X]);const h=new g2({$metadata:Q(r),...f});return D(h,r.body.Error)},Qo=async(r,s)=>{const f=Y({}),w=r.body.Error;if(w[Pr]!=null)f[Pr]=T(w[Pr]);const h=new tI({$metadata:Q(r),...f});return D(h,r.body.Error)},Bo=async(r,s)=>{const f=Y({}),w=r.body.Error;if(w[Pr]!=null)f[Pr]=T(w[Pr]);const h=new o2({$metadata:Q(r),...f});return D(h,r.body.Error)},Mo=async(r,s)=>{const f=Y({}),w=r.body.Error;if(w[X]!=null)f[X]=T(w[X]);const h=new z2({$metadata:Q(r),...f});return D(h,r.body.Error)},Vo=async(r,s)=>{const f=Y({}),w=r.body.Error;if(w[X]!=null)f[X]=T(w[X]);const h=new T2({$metadata:Q(r),...f});return D(h,r.body.Error)},Ho=async(r,s)=>{const f=Y({}),w=r.body.Error;if(w[X]!=null)f[X]=T(w[X]);const h=new x2({$metadata:Q(r),...f});return D(h,r.body.Error)},lo=async(r,s)=>{const f=Y({}),w=r.body.Error;if(w[X]!=null)f[X]=T(w[X]);const h=new f2({$metadata:Q(r),...f});return D(h,r.body.Error)},Do=async(r,s)=>{const f=Y({}),w=r.body.Error;if(w[X]!=null)f[X]=T(w[X]);const h=new eI({$metadata:Q(r),...f});return D(h,r.body.Error)},ko=async(r,s)=>{const f=Y({}),w=r.body.Error;if(w[X]!=null)f[X]=T(w[X]);const h=new bI({$metadata:Q(r),...f});return D(h,r.body.Error)},yo=async(r,s)=>{const f=Y({}),w=r.body.Error;if(w[X]!=null)f[X]=T(w[X]);const h=new q2({$metadata:Q(r),...f});return D(h,r.body.Error)},No=async(r,s)=>{const f=Y({}),w=r.body.Error;if(w[X]!=null)f[X]=T(w[X]);const h=new Q2({$metadata:Q(r),...f});return D(h,r.body.Error)},qo=async(r,s)=>{const f=Y({}),w=r.body.Error;if(w[X]!=null)f[X]=T(w[X]);const h=new v2({$metadata:Q(r),...f});return D(h,r.body.Error)},mo=async(r,s)=>{const f=Y({}),w=r.body.Error;if(w[X]!=null)f[X]=T(w[X]);const h=new nI({$metadata:Q(r),...f});return D(h,r.body.Error)},jo=async(r,s)=>{const f=Y({}),w=r.body.Error;if(w[X]!=null)f[X]=T(w[X]);const h=new oI({$metadata:Q(r),...f});return D(h,r.body.Error)},vo=async(r,s)=>{const f=Y({}),w=r.body.Error;if(w[X]!=null)f[X]=T(w[X]);const h=new aI({$metadata:Q(r),...f});return D(h,r.body.Error)},io=async(r,s)=>{const f=Y({}),w=r.body.Error;if(w[X]!=null)f[X]=T(w[X]);const h=new S2({$metadata:Q(r),...f});return D(h,r.body.Error)},Oo=async(r,s)=>{const f=Y({}),w=r.body.Error;if(w[X]!=null)f[X]=T(w[X]);const h=new s2({$metadata:Q(r),...f});return D(h,r.body.Error)},co=async(r,s)=>{const f=Y({}),w=r.body.Error;if(w[X]!=null)f[X]=T(w[X]);const h=new E2({$metadata:Q(r),...f});return D(h,r.body.Error)},bo=async(r,s)=>{const f=Y({}),w=r.body.Error;if(w[X]!=null)f[X]=T(w[X]);const h=new G2({$metadata:Q(r),...f});return D(h,r.body.Error)},_o=async(r,s)=>{const f=Y({}),w=r.body.Error;if(w[X]!=null)f[X]=T(w[X]);const h=new C2({$metadata:Q(r),...f});return D(h,r.body.Error)},go=async(r,s)=>{const f=Y({}),w=r.body.Error;if(w[X]!=null)f[X]=T(w[X]);const h=new P2({$metadata:Q(r),...f});return D(h,r.body.Error)},xo=async(r,s)=>{const f=Y({}),w=r.body.Error;if(w[X]!=null)f[X]=T(w[X]);const h=new B2({$metadata:Q(r),...f});return D(h,r.body.Error)},eo=async(r,s)=>{const f=Y({}),w=r.body.Error;if(w[X]!=null)f[X]=T(w[X]);const h=new V2({$metadata:Q(r),...f});return D(h,r.body.Error)},no=async(r,s)=>{const f=Y({}),w=r.body.Error;if(w[X]!=null)f[X]=T(w[X]);const h=new H2({$metadata:Q(r),...f});return D(h,r.body.Error)},oo=async(r,s)=>{const f=Y({}),w=r.body.Error;if(w[X]!=null)f[X]=T(w[X]);const h=new J2({$metadata:Q(r),...f});return D(h,r.body.Error)},ao=async(r,s)=>{const f=Y({}),w=r.body.Error;if(w[X]!=null)f[X]=T(w[X]);const h=new M2({$metadata:Q(r),...f});return D(h,r.body.Error)},po=async(r,s)=>{const f=Y({}),w=r.body.Error;if(w[X]!=null)f[X]=T(w[X]);const h=new j2({$metadata:Q(r),...f});return D(h,r.body.Error)},uo=async(r,s)=>{const f=Y({}),w=r.body.Error;if(w[X]!=null)f[X]=T(w[X]);const h=new i2({$metadata:Q(r),...f});return D(h,r.body.Error)},to=async(r,s)=>{const f=Y({}),w=r.body.Error;if(w[X]!=null)f[X]=T(w[X]);const h=new c2({$metadata:Q(r),...f});return D(h,r.body.Error)},Jl=(r,s)=>{const f=new H(E0);if(r[ir]!=null)f.c(H.of(dp,r[ir]).n(ir));if(r[n]!=null)f.c(H.of(Wp,r[n]).n(n));return f},ra=(r,s)=>{const f=new H(_w);if(r[rr]!=null)f.c(H.of(F0,r[rr]).n(rr));if(f.cc(r,Ws),r[uh]!=null)f.c(H.of(Cp,String(r[uh])).n(uh));return f},fa=(r,s)=>{const f=new H(ql);if(r[oh]!=null)f.c(H.of(Xp,r[oh]).n(oh));if(r[w1]!=null)f.c(Wa(r[w1],s).n(w1));return f},sa=(r,s)=>{const f=new H(f6);if(r[Fr]!=null)f.c(H.of(G8,r[Fr]).n(Fr));return f.lc(r,"Changes","Changes",()=>wa(r[Nl],s)),f},wa=(r,s)=>{return r.filter((f)=>f!=null).map((f)=>{return fa(f,s).n(ql)})},Ql=(r,s)=>{return r.filter((f)=>f!=null).map((f)=>{return H.of(nE,f).n($8)})},ha=(r,s)=>{const f=new H(Kp);if(r[ar]!=null)f.c(H.of(Hp,r[ar]).n(ar));if(r[oh]!=null)f.c(H.of(Zp,r[oh]).n(oh));return f.lc(r,"CidrList","CidrList",()=>$a(r[lp],s)),f},Ea=(r,s)=>{return r.filter((f)=>f!=null).map((f)=>{return ha(f,s).n(Ss)})},$a=(r,s)=>{return r.filter((f)=>f!=null).map((f)=>{return H.of(iM,f).n(iM)})},Ia=(r,s)=>{const f=new H(gw);if(r[ph]!=null)f.c(H.of(Hu,r[ph]).n(ph));if(r[ar]!=null)f.c(H.of(Vp,r[ar]).n(ar));return f},Fa=(r,s)=>{const f=new H(xw);return f.cc(r,$6),f.cc(r,I6),f},Ua=(r,s)=>{const f=new H(ew);if(r[$0]!=null)f.c(H.of(ep,r[$0]).n($0));if(r[I0]!=null)f.c(H.of(np,r[I0]).n(I0));if(r[U0]!=null)f.c(H.of(op,r[U0]).n(U0));return f},Ta=(r,s)=>{const f=new H(nw);if(f.cc(r,r6),f.cc(r,E6),r[xw]!=null)f.c(Fa(r[xw],s).n(xw));if(r[Ow]!=null)f.c(H.of(Ow,String(r[Ow])).n(Ow));return f},Ga=(r,s)=>{const f=new H(ow);if(f.cc(r,Cw),r[Cs]!=null)f.c(H.of(Cs,String(r[Cs])).n(Cs));if(r[Lr]!=null)f.c(H.of(up,r[Lr]).n(Lr));if(f.cc(r,aE),f.cc(r,xE),f.cc(r,uE),r[bw]!=null)f.c(H.of(bw,String(r[bw])).n(bw));if(r[As]!=null)f.c(H.of(As,String(r[As])).n(As));if(r[cw]!=null)f.c(H.of(cw,String(r[cw])).n(cw));if(r[Rs]!=null)f.c(H.of(Rs,String(r[Rs])).n(Rs));if(r[Ts]!=null)f.c(H.of(Ts,String(r[Ts])).n(Ts));if(r[Ls]!=null)f.c(H.of(Ls,String(r[Ls])).n(Ls));if(f.lc(r,"ChildHealthChecks","ChildHealthChecks",()=>Ql(r[vw],s)),r[Gs]!=null)f.c(H.of(Gs,String(r[Gs])).n(Gs));if(f.lc(r,"Regions","Regions",()=>Bl(r[iw],s)),r[E0]!=null)f.c(Jl(r[E0],s).n(E0));return f.cc(r,oE),f.cc(r,F6),f},Bl=(r,s)=>{return r.filter((f)=>f!=null).map((f)=>{return H.of(pp,f).n(ir)})},Aa=(r,s)=>{const f=new H(h6);if(r[Fr]!=null)f.c(H.of(G8,r[Fr]).n(Fr));if(r[s1]!=null)f.c(H.of(ru,String(r[s1])).n(s1));return f},La=(r,s)=>{return r.filter((f)=>f!=null).map((f)=>{return H.of(_M,f).n(_M)})},Ra=(r,s)=>{const f=new H(C6);if(r[Kr]!=null)f.c(H.of(su,r[Kr]).n(Kr));return f},Ca=(r,s)=>{return r.filter((f)=>f!=null).map((f)=>{return Ra(f,s).n(C6)})},Wa=(r,s)=>{const f=new H(w1);if(r[n]!=null)f.c(H.of(Ws,r[n]).n(n));if(r[Lr]!=null)f.c(H.of(Gu,r[Lr]).n(Lr));if(r[h1]!=null)f.c(H.of(Iu,r[h1]).n(h1));if(r[I1]!=null)f.c(H.of(Tu,String(r[I1])).n(I1));if(r[ir]!=null)f.c(H.of(Uu,r[ir]).n(ir));if(r[ew]!=null)f.c(Ua(r[ew],s).n(ew));if(r[th]!=null)f.c(H.of($u,r[th]).n(th));if(r[f1]!=null)f.c(H.of(Fu,String(r[f1])).n(f1));if(r[vr]!=null)f.c(H.of(vr,String(r[vr])).n(vr));if(f.lc(r,"ResourceRecords","ResourceRecords",()=>Ca(r[nh],s)),r[_w]!=null)f.c(ra(r[_w],s).n(_w));if(f.cc(r,nE),f.cc(r,G6),r[gw]!=null)f.c(Ia(r[gw],s).n(gw));if(r[nw]!=null)f.c(Ta(r[nw],s).n(nw));return f},za=(r,s)=>{const f=new H(W6);if(r[aw]!=null)f.c(H.of(ml,r[aw]).n(aw));if(r[Kr]!=null)f.c(H.of(Ju,r[Kr]).n(Kr));return f},Sa=(r,s)=>{return r.filter((f)=>f!=null).map((f)=>{return H.of(ml,f).n(aw)})},Ya=(r,s)=>{return r.filter((f)=>f!=null).map((f)=>{return za(f,s).n(W6)})},Xa=(r,s)=>{return r.filter((f)=>f!=null).map((f)=>{return H.of(Pu,f).n(F0)})},f$=(r,s)=>{const f=new H(Cr);return f.cc(r,r$),f.cc(r,tE),f},Ka=(r,s)=>{const f={};if(r[Lr]!=null)f[Lr]=T(r[Lr]);if(r[Kr]!=null)f[Kr]=xr(r[Kr]);return f},Za=(r,s)=>{const f={};if(r[ir]!=null)f[ir]=T(r[ir]);if(r[n]!=null)f[n]=T(r[n]);return f},Pa=(r,s)=>{const f={};if(r[rr]!=null)f[rr]=T(r[rr]);if(r[Ws]!=null)f[Ws]=T(r[Ws]);if(r[uh]!=null)f[uh]=Nr(r[uh]);return f},nf=(r,s)=>{const f={};if(r[Tr]!=null)f[Tr]=T(r[Tr]);if(r[$f]!=null)f[$f]=T(r[$f]);if(r[eG]!=null)f[eG]=y(yw(r[eG]));if(r[Fr]!=null)f[Fr]=T(r[Fr]);return f},Ja=(r,s)=>{return(r||[]).filter((f)=>f!=null).map((f)=>{return T(f)})},Qa=(r,s)=>{return(r||[]).filter((f)=>f!=null).map((f)=>{return T(f)})},Ba=(r,s)=>{return(r||[]).filter((f)=>f!=null).map((f)=>{return Ma(f,s)})},Ma=(r,s)=>{const f={};if(r[sG]!=null)f[sG]=T(r[sG]);if(r[ar]!=null)f[ar]=T(r[ar]);return f},Va=(r,s)=>{const f={};if(r[ah]!=null)f[ah]=T(r[ah]);if(r[Tr]!=null)f[Tr]=T(r[Tr]);if(r[n]!=null)f[n]=T(r[n]);if(r[N0]!=null)f[N0]=xr(r[N0]);return f},Ha=(r,s)=>{const f={};if(r[ph]!=null)f[ph]=T(r[ph]);if(r[ar]!=null)f[ar]=T(r[ar]);return f},la=(r,s)=>{const f={};if(r[zG]!=null)f[zG]=hr(r[zG]);if(r[E8]!=null)f[E8]=KZ(r[E8]);if(r[$G]!=null)f[$G]=T(r[$G]);if(r[cG]!=null)f[cG]=hr(r[cG]);if(r[MG]!=null)f[MG]=T(r[MG]);if(r[jG]!=null)f[jG]=T(r[jG]);if(r[r8]!=null)f[r8]=T(r[r8]);if(r.Dimensions==="")f[kE]=[];else if(r[kE]!=null&&r[kE][OM]!=null)f[kE]=ja(Gr(r[kE][OM]),s);return f},Da=(r,s)=>{return(r||[]).filter((f)=>f!=null).map((f)=>{return ka(f,s)})},ka=(r,s)=>{const f={};if(r[ah]!=null)f[ah]=T(r[ah]);if(r[Tr]!=null)f[Tr]=T(r[Tr]);if(r[n]!=null)f[n]=T(r[n]);if(r[N0]!=null)f[N0]=xr(r[N0]);return f},ya=(r,s)=>{const f={};if(r[$6]!=null)f[$6]=T(r[$6]);if(r[I6]!=null)f[I6]=T(r[I6]);return f},s$=(r,s)=>{const f={};if(r[Tr]!=null)f[Tr]=T(r[Tr]);if(r[Yr]!=null)f[Yr]=T(r[Yr]);if(r.NameServers==="")f[jE]=[];else if(r[jE]!=null&&r[jE][cM]!=null)f[jE]=Na(Gr(r[jE][cM]),s);return f},Na=(r,s)=>{return(r||[]).filter((f)=>f!=null).map((f)=>{return T(f)})},qa=(r,s)=>{return(r||[]).filter((f)=>f!=null).map((f)=>{return s$(f,s)})},ma=(r,s)=>{const f={};if(r[n]!=null)f[n]=T(r[n]);if(r[Kr]!=null)f[Kr]=T(r[Kr]);return f},ja=(r,s)=>{return(r||[]).filter((f)=>f!=null).map((f)=>{return ma(f,s)})},va=(r,s)=>{const f={};if(r[tG]!=null)f[tG]=T(r[tG]);if(r[E1]!=null)f[E1]=T(r[E1]);return f},ia=(r,s)=>{return(r||[]).filter((f)=>f!=null).map((f)=>{return T(f)})},Oa=(r,s)=>{const f={};if(r[$0]!=null)f[$0]=T(r[$0]);if(r[I0]!=null)f[I0]=T(r[I0]);if(r[U0]!=null)f[U0]=T(r[U0]);return f},Ml=(r,s)=>{const f={};if(r[$0]!=null)f[$0]=T(r[$0]);if(r[hG]!=null)f[hG]=T(r[hG]);if(r[I0]!=null)f[I0]=T(r[I0]);if(r[EG]!=null)f[EG]=T(r[EG]);if(r[U0]!=null)f[U0]=T(r[U0]);if(r[aG]!=null)f[aG]=T(r[aG]);return f},da=(r,s)=>{return(r||[]).filter((f)=>f!=null).map((f)=>{return Ml(f,s)})},ca=(r,s)=>{const f={};if(r[r6]!=null)f[r6]=T(r[r6]);if(r[E6]!=null)f[E6]=T(r[E6]);if(r[xw]!=null)f[xw]=ya(r[xw],s);if(r[Ow]!=null)f[Ow]=hr(r[Ow]);return f},z6=(r,s)=>{const f={};if(r[Tr]!=null)f[Tr]=T(r[Tr]);if(r[Yr]!=null)f[Yr]=T(r[Yr]);if(r[r1]!=null)f[r1]=Dl(r[r1],s);if(r[ow]!=null)f[ow]=ba(r[ow],s);if(r[dw]!=null)f[dw]=xr(r[dw]);if(r[FG]!=null)f[FG]=la(r[FG],s);return f},ba=(r,s)=>{const f={};if(r[Cw]!=null)f[Cw]=T(r[Cw]);if(r[Cs]!=null)f[Cs]=hr(r[Cs]);if(r[Lr]!=null)f[Lr]=T(r[Lr]);if(r[aE]!=null)f[aE]=T(r[aE]);if(r[xE]!=null)f[xE]=T(r[xE]);if(r[uE]!=null)f[uE]=T(r[uE]);if(r[bw]!=null)f[bw]=hr(r[bw]);if(r[As]!=null)f[As]=hr(r[As]);if(r[cw]!=null)f[cw]=Nr(r[cw]);if(r[Rs]!=null)f[Rs]=Nr(r[Rs]);if(r[Ts]!=null)f[Ts]=Nr(r[Ts]);if(r[Ls]!=null)f[Ls]=hr(r[Ls]);if(r.ChildHealthChecks==="")f[vw]=[];else if(r[vw]!=null&&r[vw][$8]!=null)f[vw]=Qa(Gr(r[vw][$8]),s);if(r[Gs]!=null)f[Gs]=Nr(r[Gs]);if(r.Regions==="")f[iw]=[];else if(r[iw]!=null&&r[iw][ir]!=null)f[iw]=ga(Gr(r[iw][ir]),s);if(r[E0]!=null)f[E0]=Za(r[E0],s);if(r[oE]!=null)f[oE]=T(r[oE]);if(r[F6]!=null)f[F6]=T(r[F6]);return f},_a=(r,s)=>{const f={};if(r[ir]!=null)f[ir]=T(r[ir]);if(r[Cw]!=null)f[Cw]=T(r[Cw]);if(r[uG]!=null)f[uG]=Up(r[uG],s);return f},Vl=(r,s)=>{return(r||[]).filter((f)=>f!=null).map((f)=>{return _a(f,s)})},ga=(r,s)=>{return(r||[]).filter((f)=>f!=null).map((f)=>{return T(f)})},xa=(r,s)=>{return(r||[]).filter((f)=>f!=null).map((f)=>{return z6(f,s)})},S6=(r,s)=>{const f={};if(r[Tr]!=null)f[Tr]=T(r[Tr]);if(r[n]!=null)f[n]=T(r[n]);if(r[Yr]!=null)f[Yr]=T(r[Yr]);if(r[TG]!=null)f[TG]=ea(r[TG],s);if(r[gG]!=null)f[gG]=xr(r[gG]);if(r[r1]!=null)f[r1]=Dl(r[r1],s);return f},ea=(r,s)=>{const f={};if(r[Fr]!=null)f[Fr]=T(r[Fr]);if(r[s1]!=null)f[s1]=Nr(r[s1]);return f},na=(r,s)=>{const f={};if(r[Lr]!=null)f[Lr]=T(r[Lr]);if(r[Kr]!=null)f[Kr]=xr(r[Kr]);return f},oa=(r,s)=>{const f={};if(r[iG]!=null)f[iG]=T(r[iG]);if(r[OG]!=null)f[OG]=T(r[OG]);return f},Hl=(r,s)=>{return(r||[]).filter((f)=>f!=null).map((f)=>{return S6(f,s)})},aa=(r,s)=>{return(r||[]).filter((f)=>f!=null).map((f)=>{return pa(f,s)})},pa=(r,s)=>{const f={};if(r[rr]!=null)f[rr]=T(r[rr]);if(r[n]!=null)f[n]=T(r[n]);if(r[vG]!=null)f[vG]=oa(r[vG],s);return f},ll=(r,s)=>{const f={};if(r[n]!=null)f[n]=T(r[n]);if(r[KG]!=null)f[KG]=T(r[KG]);if(r[SG]!=null)f[SG]=hr(r[SG]);if(r[nG]!=null)f[nG]=T(r[nG]);if(r[oG]!=null)f[oG]=hr(r[oG]);if(r[GG]!=null)f[GG]=T(r[GG]);if(r[AG]!=null)f[AG]=hr(r[AG]);if(r[JG]!=null)f[JG]=hr(r[JG]);if(r[CG]!=null)f[CG]=T(r[CG]);if(r[dG]!=null)f[dG]=T(r[dG]);if(r[RG]!=null)f[RG]=T(r[RG]);if(r[LG]!=null)f[LG]=T(r[LG]);if(r[$f]!=null)f[$f]=T(r[$f]);if(r[E1]!=null)f[E1]=T(r[E1]);if(r[wG]!=null)f[wG]=y(yw(r[wG]));if(r[QG]!=null)f[QG]=y(yw(r[QG]));return f},ua=(r,s)=>{return(r||[]).filter((f)=>f!=null).map((f)=>{return ll(f,s)})},Dl=(r,s)=>{const f={};if(r[pG]!=null)f[pG]=T(r[pG]);if(r[WG]!=null)f[WG]=T(r[WG]);return f},ta=(r,s)=>{return(r||[]).filter((f)=>f!=null).map((f)=>{return rp(f,s)})},rp=(r,s)=>{const f={};if(r[ar]!=null)f[ar]=T(r[ar]);return f},I8=(r,s)=>{const f={};if(r[Tr]!=null)f[Tr]=T(r[Tr]);if(r[rr]!=null)f[rr]=T(r[rr]);if(r[s6]!=null)f[s6]=T(r[s6]);return f},fp=(r,s)=>{return(r||[]).filter((f)=>f!=null).map((f)=>{return I8(f,s)})},sp=(r,s)=>{return(r||[]).filter((f)=>f!=null).map((f)=>{return T(f)})},wp=(r,s)=>{const f={};if(r[Kr]!=null)f[Kr]=T(r[Kr]);return f},hp=(r,s)=>{return(r||[]).filter((f)=>f!=null).map((f)=>{return wp(f,s)})},Ep=(r,s)=>{const f={};if(r[n]!=null)f[n]=T(r[n]);if(r[Lr]!=null)f[Lr]=T(r[Lr]);if(r[h1]!=null)f[h1]=T(r[h1]);if(r[I1]!=null)f[I1]=xr(r[I1]);if(r[ir]!=null)f[ir]=T(r[ir]);if(r[ew]!=null)f[ew]=Oa(r[ew],s);if(r[th]!=null)f[th]=T(r[th]);if(r[f1]!=null)f[f1]=Nr(r[f1]);if(r[vr]!=null)f[vr]=xr(r[vr]);if(r.ResourceRecords==="")f[nh]=[];else if(r[nh]!=null&&r[nh][C6]!=null)f[nh]=hp(Gr(r[nh][C6]),s);if(r[_w]!=null)f[_w]=Pa(r[_w],s);if(r[nE]!=null)f[nE]=T(r[nE]);if(r[G6]!=null)f[G6]=T(r[G6]);if(r[gw]!=null)f[gw]=Ha(r[gw],s);if(r[nw]!=null)f[nw]=ca(r[nw],s);return f},$p=(r,s)=>{return(r||[]).filter((f)=>f!=null).map((f)=>{return Ep(f,s)})},kl=(r,s)=>{const f={};if(r[xG]!=null)f[xG]=T(r[xG]);if(r[F0]!=null)f[F0]=T(r[F0]);if(r.Tags==="")f[_E]=[];else if(r[_E]!=null&&r[_E][W6]!=null)f[_E]=Gp(Gr(r[_E][W6]),s);return f},Ip=(r,s)=>{return(r||[]).filter((f)=>f!=null).map((f)=>{return kl(f,s)})},Fp=(r,s)=>{const f={};if(r[Lr]!=null)f[Lr]=T(r[Lr]);if(r[Kr]!=null)f[Kr]=xr(r[Kr]);return f},Up=(r,s)=>{const f={};if(r[$f]!=null)f[$f]=T(r[$f]);if(r[IG]!=null)f[IG]=y(yw(r[IG]));return f},Tp=(r,s)=>{const f={};if(r[aw]!=null)f[aw]=T(r[aw]);if(r[Kr]!=null)f[Kr]=T(r[Kr]);return f},Gp=(r,s)=>{return(r||[]).filter((f)=>f!=null).map((f)=>{return Tp(f,s)})},Ap=(r,s)=>{return(r||[]).filter((f)=>f!=null).map((f)=>{return w$(f,s)})},w$=(r,s)=>{const f={};if(r[Tr]!=null)f[Tr]=T(r[Tr]);if(r[N0]!=null)f[N0]=hr(r[N0]);if(r[n]!=null)f[n]=T(r[n]);if(r[Lr]!=null)f[Lr]=T(r[Lr]);if(r[D0]!=null)f[D0]=T(r[D0]);if(r[Fr]!=null)f[Fr]=T(r[Fr]);return f},Y6=(r,s)=>{const f={};if(r[Tr]!=null)f[Tr]=T(r[Tr]);if(r[rr]!=null)f[rr]=T(r[rr]);if(r[n]!=null)f[n]=T(r[n]);if(r[vr]!=null)f[vr]=xr(r[vr]);if(r[f8]!=null)f[f8]=T(r[f8]);if(r[Pr]!=null)f[Pr]=T(r[Pr]);if(r[$1]!=null)f[$1]=T(r[$1]);if(r[_f]!=null)f[_f]=hr(r[_f]);if(r[h8]!=null)f[h8]=T(r[h8]);return f},F8=(r,s)=>{return(r||[]).filter((f)=>f!=null).map((f)=>{return Y6(f,s)})},Lp=(r,s)=>{return(r||[]).filter((f)=>f!=null).map((f)=>{return Rp(f,s)})},Rp=(r,s)=>{const f={};if(r[Tr]!=null)f[Tr]=T(r[Tr]);if(r[n]!=null)f[n]=T(r[n]);if(r[Lr]!=null)f[Lr]=T(r[Lr]);if(r[BG]!=null)f[BG]=hr(r[BG]);if(r[s8]!=null)f[s8]=hr(r[s8]);return f},U8=(r,s)=>{const f={};if(r[r$]!=null)f[r$]=T(r[r$]);if(r[tE]!=null)f[tE]=T(r[tE]);return f},yl=(r,s)=>{return(r||[]).filter((f)=>f!=null).map((f)=>{return U8(f,s)})},Q=(r)=>({httpStatusCode:r.statusCode,requestId:r.headers["x-amzn-requestid"]??r.headers["x-amzn-request-id"]??r.headers["x-amz-request-id"],extendedRequestId:r.headers["x-amz-id-2"],cfId:r.headers["x-amz-cf-id"]});var oh="Action",Cp="AliasHealthEnabled",E0="AlarmIdentifier",Wp="AlarmName",zp="AddTags",_w="AliasTarget",Sp="AssociateVPCComment",Yp="AssociateVPCWithHostedZoneRequest",r6="AWSRegion",ah="Arn",Ow="Bias",Fr="Comment",Xp="ChangeAction",f6="ChangeBatch",ME="CidrBlocks",sG="CidrBlock",$0="ContinentCode",Kp="CidrCollectionChange",Zp="CidrCollectionChangeAction",Pp="ChangeCidrCollectionRequest",Jp="CreateCidrCollectionRequest",VE="CidrCollections",I0="CountryCode",wG="CreatedDate",vw="ChildHealthChecks",Qp="CreateHealthCheckRequest",$8="ChildHealthCheck",Bp="CreateHostedZoneRequest",wr="ChangeInfo",HE="CheckerIpRanges",ph="CollectionId",Mp="CreateKeySigningKeyRequest",lE="CidrLocations",Vp="CidrLocationNameDefaultAllowed",Hp="CidrLocationNameDefaultNotAllowed",lp="CidrList",Dp="CidrNonce",kp="CollectionName",hG="ContinentName",EG="CountryName",$G="ComparisonOperator",yp="CreateQueryLoggingConfigRequest",Yr="CallerReference",gw="CidrRoutingConfig",Np="CreateReusableDelegationSetRequest",qp="ChangeResourceRecordSetsRequest",IG="CheckedTime",mp="ChangeTagsForResourceRequest",jp="CreateTrafficPolicyInstanceRequest",vp="CreateTrafficPolicyRequest",ip="CreateTrafficPolicyVersionRequest",t2="CollectionVersion",Op="CreateVPCAssociationAuthorizationRequest",FG="CloudWatchAlarmConfiguration",s6="CloudWatchLogsLogGroupArn",dp="CloudWatchRegion",Nl="Changes",ql="Change",iM="Cidr",UG="Collection",TG="Config",xw="Coordinates",l0="Count",D0="Document",GG="DigestAlgorithmMnemonic",AG="DigestAlgorithmType",LG="DNSKEYRecord",Ws="DNSName",Lf="DelegationSet",w6="DelegationSetId",RG="DSRecord",DE="DelegationSets",CG="DigestValue",cp="DeleteVPCAssociationAuthorizationRequest",bp="DisassociateVPCComment",_p="DisassociateVPCFromHostedZoneRequest",WG="Description",Ts="Disabled",kE="Dimensions",OM="Dimension",gp="EDNS0ClientSubnetIP",xp="EDNS0ClientSubnetMask",zG="EvaluationPeriods",Gs="EnableSNI",uh="EvaluateTargetHealth",th="Failover",xE="FullyQualifiedDomainName",As="FailureThreshold",SG="Flag",ew="GeoLocation",ep="GeoLocationContinentCode",np="GeoLocationCountryCode",eE="GeoLocationDetails",yE="GeoLocationDetailsList",op="GeoLocationSubdivisionCode",nw="GeoProximityLocation",zs="HealthCheck",ow="HealthCheckConfig",YG="HealthCheckCount",nE="HealthCheckId",ap="HealthCheckNonce",s0="HealthCheckObservations",R6="HealthCheckObservation",pp="HealthCheckRegion",up="HealthCheckType",dw="HealthCheckVersion",NE="HealthChecks",Ls="HealthThreshold",Kf="HostedZone",h6="HostedZoneConfig",XG="HostedZoneCount",rr="HostedZoneId",Rw="HostedZoneIdMarker",qE="HostedZoneSummaries",dM="HostedZoneSummary",tp="HostedZoneType",w0="HostedZones",Rs="Inverted",oE="InsufficientDataHealthStatus",Cw="IPAddress",ru="IsPrivateZone",Ur="IsTruncated",Tr="Id",aw="Key",KG="KmsArn",ZG="KeyManagementServiceArn",PG="KeySigningKey",mE="KeySigningKeys",JG="KeyTag",q0="Location",QG="LastModifiedDate",ar="LocationName",r1="LinkedService",fu="ListTagsForResourcesRequest",BG="LatestVersion",E6="LocalZoneGroup",$6="Latitude",k0="Limit",I6="Longitude",gf="Marker",a="MaxItems",cw="MeasureLatency",MG="MetricName",h$="MaxResults",f1="MultiValueAnswer",Pr="Message",n="Name",VG="NextContinentCode",HG="NextCountryCode",lG="NextDNSName",DG="NextHostedZoneId",y0="NextMarker",kG="NextRecordIdentifier",yG="NextRecordName",NG="NextRecordType",jE="NameServers",qG="NextSubdivisionCode",cM="NameServer",Xr="NextToken",mG="Nameserver",jG="Namespace",T8="Nonce",vG="Owner",iG="OwningAccount",OG="OwningService",Cs="Port",dG="PublicKey",s1="PrivateZone",cG="Period",bG="Protocol",Ww="QueryLoggingConfig",vE="QueryLoggingConfigs",iw="Regions",_G="ResponseCode",F6="RoutingControlArn",G8="ResourceDescription",bM="RecordDataEntry",su="RData",iE="RecordData",wu="ResetElements",_M="ResettableElementName",F0="ResourceId",hu="ResolverIP",Eu="ResourceIds",bw="RequestInterval",U6="RecordName",aE="ResourcePath",C6="ResourceRecord",OE="ResourceRecordSets",gG="ResourceRecordSetCount",$u="ResourceRecordSetFailover",Iu="ResourceRecordSetIdentifier",Fu="ResourceRecordSetMultiValueAnswer",Uu="ResourceRecordSetRegion",Tu="ResourceRecordSetWeight",w1="ResourceRecordSet",Gu="RRType",nh="ResourceRecords",T6="RecordType",Au="RemoveTagKeys",pE="ResourceTagSet",dE="ResourceTagSets",xG="ResourceType",ir="Region",$f="Status",eG="SubmittedAt",nG="SigningAlgorithmMnemonic",oG="SigningAlgorithmType",U0="SubdivisionCode",Lu="StartContinentCode",Ru="StartCountryCode",h1="SetIdentifier",Cu="SigningKeyName",Wu="SigningKeyString",zu="SigningKeyStatus",E1="StatusMessage",aG="SubdivisionName",pG="ServicePrincipal",uG="StatusReport",Su="StartRecordIdentifier",Yu="StartRecordName",Xu="StartRecordType",uE="SearchString",Ku="StartSubdivisionCode",tG="ServeSignature",r8="Statistic",f8="State",Lr="Type",ml="TagKey",Rf="TrafficPolicy",A8="TrafficPolicyComment",s8="TrafficPolicyCount",jl="TrafficPolicyDocument",$1="TrafficPolicyId",w8="TrafficPolicyInstanceCount",G6="TrafficPolicyInstanceId",A6="TrafficPolicyIdMarker",xf="TrafficPolicyInstanceNameMarker",ef="TrafficPolicyInstanceTypeMarker",If="TrafficPolicyInstance",Ef="TrafficPolicyInstances",Zu="TrafficPolicyName",cE="TrafficPolicySummaries",gM="TrafficPolicySummary",h8="TrafficPolicyType",_f="TrafficPolicyVersion",L6="TrafficPolicyVersionMarker",bE="TrafficPolicies",Pu="TagResourceId",vr="TTL",Ju="TagValue",W6="Tag",_E="Tags",E8="Threshold",Qu="UpdateHealthCheckRequest",Bu="UpdateHostedZoneCommentRequest",Mu="UpdateTrafficPolicyCommentRequest",Vu="UpdateTrafficPolicyInstanceRequest",Hu="UUID",Kr="Value",Cr="VPC",tE="VPCId",r$="VPCRegion",h0="VPCs",N0="Version",I1="Weight",lu="continentcode",Du="countrycode",ku="delegationsetid",yu="dnsname",Nu="edns0clientsubnetip",qu="edns0clientsubnetmask",mu="hostedzonetype",E$="hostedzoneid",ju="identifier",vl="id",T0="location",$$="maxresults",of="maxitems",L8="marker",Ss="member",X="message",gE="messages",F1="nexttoken",vu="name",iu="recordname",Ou="recordtype",du="resolverip",cu="subdivisioncode",bu="startcontinentcode",_u="startcountrycode",gu="startsubdivisioncode",xu="type",eu="trafficpolicyid",R8="trafficpolicyinstancename",C8="trafficpolicyinstancetype",nu="trafficpolicyversion",ou="vpcid",lr='<?xml version="1.0" encoding="UTF-8"?>',au="version",pu="vpcregion";class W8 extends R.classBuilder().ep(J).m(function(r,s,f,w){return[C(f,this.serialize,this.deserialize),W(f,r.getEndpointParameterInstructions()),j(f)]}).s("AWSDnsV20130401","ActivateKeySigningKey",{}).n("Route53Client","ActivateKeySigningKeyCommand").f(void 0,void 0).ser(xM).de(FH).build(){}B();V();K();class z8 extends R.classBuilder().ep(J).m(function(r,s,f,w){return[C(f,this.serialize,this.deserialize),W(f,r.getEndpointParameterInstructions()),j(f)]}).s("AWSDnsV20130401","AssociateVPCWithHostedZone",{}).n("Route53Client","AssociateVPCWithHostedZoneCommand").f(void 0,void 0).ser(eM).de(UH).build(){}B();V();K();class S8 extends R.classBuilder().ep(J).m(function(r,s,f,w){return[C(f,this.serialize,this.deserialize),W(f,r.getEndpointParameterInstructions()),j(f)]}).s("AWSDnsV20130401","ChangeCidrCollection",{}).n("Route53Client","ChangeCidrCollectionCommand").f(void 0,void 0).ser(nM).de(TH).build(){}B();V();K();class Y8 extends R.classBuilder().ep(J).m(function(r,s,f,w){return[C(f,this.serialize,this.deserialize),W(f,r.getEndpointParameterInstructions()),mM(f),j(f)]}).s("AWSDnsV20130401","ChangeResourceRecordSets",{}).n("Route53Client","ChangeResourceRecordSetsCommand").f(void 0,void 0).ser(oM).de(GH).build(){}B();V();K();class X8 extends R.classBuilder().ep(J).m(function(r,s,f,w){return[C(f,this.serialize,this.deserialize),W(f,r.getEndpointParameterInstructions())]}).s("AWSDnsV20130401","ChangeTagsForResource",{}).n("Route53Client","ChangeTagsForResourceCommand").f(void 0,void 0).ser(aM).de(AH).build(){}B();V();K();class K8 extends R.classBuilder().ep(J).m(function(r,s,f,w){return[C(f,this.serialize,this.deserialize),W(f,r.getEndpointParameterInstructions())]}).s("AWSDnsV20130401","CreateCidrCollection",{}).n("Route53Client","CreateCidrCollectionCommand").f(void 0,void 0).ser(pM).de(LH).build(){}B();V();K();class Z8 extends R.classBuilder().ep(J).m(function(r,s,f,w){return[C(f,this.serialize,this.deserialize),W(f,r.getEndpointParameterInstructions())]}).s("AWSDnsV20130401","CreateHealthCheck",{}).n("Route53Client","CreateHealthCheckCommand").f(void 0,void 0).ser(uM).de(RH).build(){}B();V();K();class P8 extends R.classBuilder().ep(J).m(function(r,s,f,w){return[C(f,this.serialize,this.deserialize),W(f,r.getEndpointParameterInstructions()),j(f)]}).s("AWSDnsV20130401","CreateHostedZone",{}).n("Route53Client","CreateHostedZoneCommand").f(void 0,void 0).ser(tM).de(CH).build(){}B();V();K();class J8 extends R.classBuilder().ep(J).m(function(r,s,f,w){return[C(f,this.serialize,this.deserialize),W(f,r.getEndpointParameterInstructions()),j(f)]}).s("AWSDnsV20130401","CreateKeySigningKey",{}).n("Route53Client","CreateKeySigningKeyCommand").f(void 0,void 0).ser(rV).de(WH).build(){}B();V();K();class Q8 extends R.classBuilder().ep(J).m(function(r,s,f,w){return[C(f,this.serialize,this.deserialize),W(f,r.getEndpointParameterInstructions()),j(f)]}).s("AWSDnsV20130401","CreateQueryLoggingConfig",{}).n("Route53Client","CreateQueryLoggingConfigCommand").f(void 0,void 0).ser(fV).de(zH).build(){}B();V();K();class B8 extends R.classBuilder().ep(J).m(function(r,s,f,w){return[C(f,this.serialize,this.deserialize),W(f,r.getEndpointParameterInstructions()),j(f)]}).s("AWSDnsV20130401","CreateReusableDelegationSet",{}).n("Route53Client","CreateReusableDelegationSetCommand").f(void 0,void 0).ser(sV).de(SH).build(){}B();V();K();class M8 extends R.classBuilder().ep(J).m(function(r,s,f,w){return[C(f,this.serialize,this.deserialize),W(f,r.getEndpointParameterInstructions())]}).s("AWSDnsV20130401","CreateTrafficPolicy",{}).n("Route53Client","CreateTrafficPolicyCommand").f(void 0,void 0).ser(wV).de(YH).build(){}B();V();K();class V8 extends R.classBuilder().ep(J).m(function(r,s,f,w){return[C(f,this.serialize,this.deserialize),W(f,r.getEndpointParameterInstructions()),j(f)]}).s("AWSDnsV20130401","CreateTrafficPolicyInstance",{}).n("Route53Client","CreateTrafficPolicyInstanceCommand").f(void 0,void 0).ser(hV).de(XH).build(){}B();V();K();class H8 extends R.classBuilder().ep(J).m(function(r,s,f,w){return[C(f,this.serialize,this.deserialize),W(f,r.getEndpointParameterInstructions()),j(f)]}).s("AWSDnsV20130401","CreateTrafficPolicyVersion",{}).n("Route53Client","CreateTrafficPolicyVersionCommand").f(void 0,void 0).ser(EV).de(KH).build(){}B();V();K();class l8 extends R.classBuilder().ep(J).m(function(r,s,f,w){return[C(f,this.serialize,this.deserialize),W(f,r.getEndpointParameterInstructions()),j(f)]}).s("AWSDnsV20130401","CreateVPCAssociationAuthorization",{}).n("Route53Client","CreateVPCAssociationAuthorizationCommand").f(void 0,void 0).ser($V).de(ZH).build(){}B();V();K();class D8 extends R.classBuilder().ep(J).m(function(r,s,f,w){return[C(f,this.serialize,this.deserialize),W(f,r.getEndpointParameterInstructions()),j(f)]}).s("AWSDnsV20130401","DeactivateKeySigningKey",{}).n("Route53Client","DeactivateKeySigningKeyCommand").f(void 0,void 0).ser(IV).de(PH).build(){}B();V();K();class k8 extends R.classBuilder().ep(J).m(function(r,s,f,w){return[C(f,this.serialize,this.deserialize),W(f,r.getEndpointParameterInstructions()),j(f)]}).s("AWSDnsV20130401","DeleteCidrCollection",{}).n("Route53Client","DeleteCidrCollectionCommand").f(void 0,void 0).ser(FV).de(JH).build(){}B();V();K();class y8 extends R.classBuilder().ep(J).m(function(r,s,f,w){return[C(f,this.serialize,this.deserialize),W(f,r.getEndpointParameterInstructions())]}).s("AWSDnsV20130401","DeleteHealthCheck",{}).n("Route53Client","DeleteHealthCheckCommand").f(void 0,void 0).ser(UV).de(QH).build(){}B();V();K();class N8 extends R.classBuilder().ep(J).m(function(r,s,f,w){return[C(f,this.serialize,this.deserialize),W(f,r.getEndpointParameterInstructions()),j(f)]}).s("AWSDnsV20130401","DeleteHostedZone",{}).n("Route53Client","DeleteHostedZoneCommand").f(void 0,void 0).ser(TV).de(BH).build(){}B();V();K();class q8 extends R.classBuilder().ep(J).m(function(r,s,f,w){return[C(f,this.serialize,this.deserialize),W(f,r.getEndpointParameterInstructions()),j(f)]}).s("AWSDnsV20130401","DeleteKeySigningKey",{}).n("Route53Client","DeleteKeySigningKeyCommand").f(void 0,void 0).ser(GV).de(MH).build(){}B();V();K();class m8 extends R.classBuilder().ep(J).m(function(r,s,f,w){return[C(f,this.serialize,this.deserialize),W(f,r.getEndpointParameterInstructions()),j(f)]}).s("AWSDnsV20130401","DeleteQueryLoggingConfig",{}).n("Route53Client","DeleteQueryLoggingConfigCommand").f(void 0,void 0).ser(AV).de(VH).build(){}B();V();K();class j8 extends R.classBuilder().ep(J).m(function(r,s,f,w){return[C(f,this.serialize,this.deserialize),W(f,r.getEndpointParameterInstructions()),j(f)]}).s("AWSDnsV20130401","DeleteReusableDelegationSet",{}).n("Route53Client","DeleteReusableDelegationSetCommand").f(void 0,void 0).ser(LV).de(HH).build(){}B();V();K();class v8 extends R.classBuilder().ep(J).m(function(r,s,f,w){return[C(f,this.serialize,this.deserialize),W(f,r.getEndpointParameterInstructions()),j(f)]}).s("AWSDnsV20130401","DeleteTrafficPolicy",{}).n("Route53Client","DeleteTrafficPolicyCommand").f(void 0,void 0).ser(RV).de(lH).build(){}B();V();K();class i8 extends R.classBuilder().ep(J).m(function(r,s,f,w){return[C(f,this.serialize,this.deserialize),W(f,r.getEndpointParameterInstructions()),j(f)]}).s("AWSDnsV20130401","DeleteTrafficPolicyInstance",{}).n("Route53Client","DeleteTrafficPolicyInstanceCommand").f(void 0,void 0).ser(CV).de(DH).build(){}B();V();K();class O8 extends R.classBuilder().ep(J).m(function(r,s,f,w){return[C(f,this.serialize,this.deserialize),W(f,r.getEndpointParameterInstructions()),j(f)]}).s("AWSDnsV20130401","DeleteVPCAssociationAuthorization",{}).n("Route53Client","DeleteVPCAssociationAuthorizationCommand").f(void 0,void 0).ser(WV).de(kH).build(){}B();V();K();class d8 extends R.classBuilder().ep(J).m(function(r,s,f,w){return[C(f,this.serialize,this.deserialize),W(f,r.getEndpointParameterInstructions()),j(f)]}).s("AWSDnsV20130401","DisableHostedZoneDNSSEC",{}).n("Route53Client","DisableHostedZoneDNSSECCommand").f(void 0,void 0).ser(zV).de(yH).build(){}B();V();K();class c8 extends R.classBuilder().ep(J).m(function(r,s,f,w){return[C(f,this.serialize,this.deserialize),W(f,r.getEndpointParameterInstructions()),j(f)]}).s("AWSDnsV20130401","DisassociateVPCFromHostedZone",{}).n("Route53Client","DisassociateVPCFromHostedZoneCommand").f(void 0,void 0).ser(SV).de(NH).build(){}B();V();K();class b8 extends R.classBuilder().ep(J).m(function(r,s,f,w){return[C(f,this.serialize,this.deserialize),W(f,r.getEndpointParameterInstructions()),j(f)]}).s("AWSDnsV20130401","EnableHostedZoneDNSSEC",{}).n("Route53Client","EnableHostedZoneDNSSECCommand").f(void 0,void 0).ser(YV).de(qH).build(){}B();V();K();class _8 extends R.classBuilder().ep(J).m(function(r,s,f,w){return[C(f,this.serialize,this.deserialize),W(f,r.getEndpointParameterInstructions())]}).s("AWSDnsV20130401","GetAccountLimit",{}).n("Route53Client","GetAccountLimitCommand").f(void 0,void 0).ser(XV).de(mH).build(){}B();V();K();class g8 extends R.classBuilder().ep(J).m(function(r,s,f,w){return[C(f,this.serialize,this.deserialize),W(f,r.getEndpointParameterInstructions()),j(f)]}).s("AWSDnsV20130401","GetChange",{}).n("Route53Client","GetChangeCommand").f(void 0,void 0).ser(KV).de(jH).build(){}B();V();K();class x8 extends R.classBuilder().ep(J).m(function(r,s,f,w){return[C(f,this.serialize,this.deserialize),W(f,r.getEndpointParameterInstructions())]}).s("AWSDnsV20130401","GetCheckerIpRanges",{}).n("Route53Client","GetCheckerIpRangesCommand").f(void 0,void 0).ser(ZV).de(vH).build(){}B();V();K();class e8 extends R.classBuilder().ep(J).m(function(r,s,f,w){return[C(f,this.serialize,this.deserialize),W(f,r.getEndpointParameterInstructions()),j(f)]}).s("AWSDnsV20130401","GetDNSSEC",{}).n("Route53Client","GetDNSSECCommand").f(void 0,void 0).ser(PV).de(iH).build(){}B();V();K();class n8 extends R.classBuilder().ep(J).m(function(r,s,f,w){return[C(f,this.serialize,this.deserialize),W(f,r.getEndpointParameterInstructions())]}).s("AWSDnsV20130401","GetGeoLocation",{}).n("Route53Client","GetGeoLocationCommand").f(void 0,void 0).ser(JV).de(OH).build(){}B();V();K();class o8 extends R.classBuilder().ep(J).m(function(r,s,f,w){return[C(f,this.serialize,this.deserialize),W(f,r.getEndpointParameterInstructions())]}).s("AWSDnsV20130401","GetHealthCheck",{}).n("Route53Client","GetHealthCheckCommand").f(void 0,void 0).ser(QV).de(dH).build(){}B();V();K();class a8 extends R.classBuilder().ep(J).m(function(r,s,f,w){return[C(f,this.serialize,this.deserialize),W(f,r.getEndpointParameterInstructions())]}).s("AWSDnsV20130401","GetHealthCheckCount",{}).n("Route53Client","GetHealthCheckCountCommand").f(void 0,void 0).ser(BV).de(cH).build(){}B();V();K();class p8 extends R.classBuilder().ep(J).m(function(r,s,f,w){return[C(f,this.serialize,this.deserialize),W(f,r.getEndpointParameterInstructions())]}).s("AWSDnsV20130401","GetHealthCheckLastFailureReason",{}).n("Route53Client","GetHealthCheckLastFailureReasonCommand").f(void 0,void 0).ser(MV).de(bH).build(){}B();V();K();class u8 extends R.classBuilder().ep(J).m(function(r,s,f,w){return[C(f,this.serialize,this.deserialize),W(f,r.getEndpointParameterInstructions())]}).s("AWSDnsV20130401","GetHealthCheckStatus",{}).n("Route53Client","GetHealthCheckStatusCommand").f(void 0,void 0).ser(VV).de(_H).build(){}B();V();K();class t8 extends R.classBuilder().ep(J).m(function(r,s,f,w){return[C(f,this.serialize,this.deserialize),W(f,r.getEndpointParameterInstructions()),j(f)]}).s("AWSDnsV20130401","GetHostedZone",{}).n("Route53Client","GetHostedZoneCommand").f(void 0,void 0).ser(HV).de(gH).build(){}B();V();K();class r4 extends R.classBuilder().ep(J).m(function(r,s,f,w){return[C(f,this.serialize,this.deserialize),W(f,r.getEndpointParameterInstructions())]}).s("AWSDnsV20130401","GetHostedZoneCount",{}).n("Route53Client","GetHostedZoneCountCommand").f(void 0,void 0).ser(lV).de(xH).build(){}B();V();K();class f4 extends R.classBuilder().ep(J).m(function(r,s,f,w){return[C(f,this.serialize,this.deserialize),W(f,r.getEndpointParameterInstructions()),j(f)]}).s("AWSDnsV20130401","GetHostedZoneLimit",{}).n("Route53Client","GetHostedZoneLimitCommand").f(void 0,void 0).ser(DV).de(eH).build(){}B();V();K();class s4 extends R.classBuilder().ep(J).m(function(r,s,f,w){return[C(f,this.serialize,this.deserialize),W(f,r.getEndpointParameterInstructions()),j(f)]}).s("AWSDnsV20130401","GetQueryLoggingConfig",{}).n("Route53Client","GetQueryLoggingConfigCommand").f(void 0,void 0).ser(kV).de(nH).build(){}B();V();K();class w4 extends R.classBuilder().ep(J).m(function(r,s,f,w){return[C(f,this.serialize,this.deserialize),W(f,r.getEndpointParameterInstructions()),j(f)]}).s("AWSDnsV20130401","GetReusableDelegationSet",{}).n("Route53Client","GetReusableDelegationSetCommand").f(void 0,void 0).ser(yV).de(oH).build(){}B();V();K();class h4 extends R.classBuilder().ep(J).m(function(r,s,f,w){return[C(f,this.serialize,this.deserialize),W(f,r.getEndpointParameterInstructions()),j(f)]}).s("AWSDnsV20130401","GetReusableDelegationSetLimit",{}).n("Route53Client","GetReusableDelegationSetLimitCommand").f(void 0,void 0).ser(NV).de(aH).build(){}B();V();K();class E4 extends R.classBuilder().ep(J).m(function(r,s,f,w){return[C(f,this.serialize,this.deserialize),W(f,r.getEndpointParameterInstructions()),j(f)]}).s("AWSDnsV20130401","GetTrafficPolicy",{}).n("Route53Client","GetTrafficPolicyCommand").f(void 0,void 0).ser(qV).de(pH).build(){}B();V();K();class $4 extends R.classBuilder().ep(J).m(function(r,s,f,w){return[C(f,this.serialize,this.deserialize),W(f,r.getEndpointParameterInstructions()),j(f)]}).s("AWSDnsV20130401","GetTrafficPolicyInstance",{}).n("Route53Client","GetTrafficPolicyInstanceCommand").f(void 0,void 0).ser(mV).de(uH).build(){}B();V();K();class I4 extends R.classBuilder().ep(J).m(function(r,s,f,w){return[C(f,this.serialize,this.deserialize),W(f,r.getEndpointParameterInstructions())]}).s("AWSDnsV20130401","GetTrafficPolicyInstanceCount",{}).n("Route53Client","GetTrafficPolicyInstanceCountCommand").f(void 0,void 0).ser(jV).de(tH).build(){}B();V();K();class F4 extends R.classBuilder().ep(J).m(function(r,s,f,w){return[C(f,this.serialize,this.deserialize),W(f,r.getEndpointParameterInstructions())]}).s("AWSDnsV20130401","ListCidrBlocks",{}).n("Route53Client","ListCidrBlocksCommand").f(void 0,void 0).ser(vV).de(rl).build(){}B();V();K();class U4 extends R.classBuilder().ep(J).m(function(r,s,f,w){return[C(f,this.serialize,this.deserialize),W(f,r.getEndpointParameterInstructions())]}).s("AWSDnsV20130401","ListCidrCollections",{}).n("Route53Client","ListCidrCollectionsCommand").f(void 0,void 0).ser(iV).de(fl).build(){}B();V();K();class T4 extends R.classBuilder().ep(J).m(function(r,s,f,w){return[C(f,this.serialize,this.deserialize),W(f,r.getEndpointParameterInstructions())]}).s("AWSDnsV20130401","ListCidrLocations",{}).n("Route53Client","ListCidrLocationsCommand").f(void 0,void 0).ser(OV).de(sl).build(){}B();V();K();class G4 extends R.classBuilder().ep(J).m(function(r,s,f,w){return[C(f,this.serialize,this.deserialize),W(f,r.getEndpointParameterInstructions())]}).s("AWSDnsV20130401","ListGeoLocations",{}).n("Route53Client","ListGeoLocationsCommand").f(void 0,void 0).ser(dV).de(wl).build(){}B();V();K();class A4 extends R.classBuilder().ep(J).m(function(r,s,f,w){return[C(f,this.serialize,this.deserialize),W(f,r.getEndpointParameterInstructions())]}).s("AWSDnsV20130401","ListHealthChecks",{}).n("Route53Client","ListHealthChecksCommand").f(void 0,void 0).ser(cV).de(hl).build(){}B();V();K();class L4 extends R.classBuilder().ep(J).m(function(r,s,f,w){return[C(f,this.serialize,this.deserialize),W(f,r.getEndpointParameterInstructions()),j(f)]}).s("AWSDnsV20130401","ListHostedZonesByName",{}).n("Route53Client","ListHostedZonesByNameCommand").f(void 0,void 0).ser(_V).de($l).build(){}B();V();K();class R4 extends R.classBuilder().ep(J).m(function(r,s,f,w){return[C(f,this.serialize,this.deserialize),W(f,r.getEndpointParameterInstructions())]}).s("AWSDnsV20130401","ListHostedZonesByVPC",{}).n("Route53Client","ListHostedZonesByVPCCommand").f(void 0,void 0).ser(gV).de(Il).build(){}B();V();K();class C4 extends R.classBuilder().ep(J).m(function(r,s,f,w){return[C(f,this.serialize,this.deserialize),W(f,r.getEndpointParameterInstructions()),j(f)]}).s("AWSDnsV20130401","ListHostedZones",{}).n("Route53Client","ListHostedZonesCommand").f(void 0,void 0).ser(bV).de(El).build(){}B();V();K();class W4 extends R.classBuilder().ep(J).m(function(r,s,f,w){return[C(f,this.serialize,this.deserialize),W(f,r.getEndpointParameterInstructions()),j(f)]}).s("AWSDnsV20130401","ListQueryLoggingConfigs",{}).n("Route53Client","ListQueryLoggingConfigsCommand").f(void 0,void 0).ser(xV).de(Fl).build(){}B();V();K();class z4 extends R.classBuilder().ep(J).m(function(r,s,f,w){return[C(f,this.serialize,this.deserialize),W(f,r.getEndpointParameterInstructions()),j(f)]}).s("AWSDnsV20130401","ListResourceRecordSets",{}).n("Route53Client","ListResourceRecordSetsCommand").f(void 0,void 0).ser(eV).de(Ul).build(){}B();V();K();class S4 extends R.classBuilder().ep(J).m(function(r,s,f,w){return[C(f,this.serialize,this.deserialize),W(f,r.getEndpointParameterInstructions())]}).s("AWSDnsV20130401","ListReusableDelegationSets",{}).n("Route53Client","ListReusableDelegationSetsCommand").f(void 0,void 0).ser(nV).de(Tl).build(){}B();V();K();class Y4 extends R.classBuilder().ep(J).m(function(r,s,f,w){return[C(f,this.serialize,this.deserialize),W(f,r.getEndpointParameterInstructions())]}).s("AWSDnsV20130401","ListTagsForResource",{}).n("Route53Client","ListTagsForResourceCommand").f(void 0,void 0).ser(oV).de(Gl).build(){}B();V();K();class X4 extends R.classBuilder().ep(J).m(function(r,s,f,w){return[C(f,this.serialize,this.deserialize),W(f,r.getEndpointParameterInstructions())]}).s("AWSDnsV20130401","ListTagsForResources",{}).n("Route53Client","ListTagsForResourcesCommand").f(void 0,void 0).ser(aV).de(Al).build(){}B();V();K();class K4 extends R.classBuilder().ep(J).m(function(r,s,f,w){return[C(f,this.serialize,this.deserialize),W(f,r.getEndpointParameterInstructions())]}).s("AWSDnsV20130401","ListTrafficPolicies",{}).n("Route53Client","ListTrafficPoliciesCommand").f(void 0,void 0).ser(pV).de(Ll).build(){}B();V();K();class Z4 extends R.classBuilder().ep(J).m(function(r,s,f,w){return[C(f,this.serialize,this.deserialize),W(f,r.getEndpointParameterInstructions()),j(f)]}).s("AWSDnsV20130401","ListTrafficPolicyInstancesByHostedZone",{}).n("Route53Client","ListTrafficPolicyInstancesByHostedZoneCommand").f(void 0,void 0).ser(tV).de(Cl).build(){}B();V();K();class P4 extends R.classBuilder().ep(J).m(function(r,s,f,w){return[C(f,this.serialize,this.deserialize),W(f,r.getEndpointParameterInstructions())]}).s("AWSDnsV20130401","ListTrafficPolicyInstancesByPolicy",{}).n("Route53Client","ListTrafficPolicyInstancesByPolicyCommand").f(void 0,void 0).ser(rH).de(Wl).build(){}B();V();K();class J4 extends R.classBuilder().ep(J).m(function(r,s,f,w){return[C(f,this.serialize,this.deserialize),W(f,r.getEndpointParameterInstructions())]}).s("AWSDnsV20130401","ListTrafficPolicyInstances",{}).n("Route53Client","ListTrafficPolicyInstancesCommand").f(void 0,void 0).ser(uV).de(Rl).build(){}B();V();K();class Q4 extends R.classBuilder().ep(J).m(function(r,s,f,w){return[C(f,this.serialize,this.deserialize),W(f,r.getEndpointParameterInstructions()),j(f)]}).s("AWSDnsV20130401","ListTrafficPolicyVersions",{}).n("Route53Client","ListTrafficPolicyVersionsCommand").f(void 0,void 0).ser(fH).de(zl).build(){}B();V();K();class B4 extends R.classBuilder().ep(J).m(function(r,s,f,w){return[C(f,this.serialize,this.deserialize),W(f,r.getEndpointParameterInstructions()),j(f)]}).s("AWSDnsV20130401","ListVPCAssociationAuthorizations",{}).n("Route53Client","ListVPCAssociationAuthorizationsCommand").f(void 0,void 0).ser(sH).de(Sl).build(){}B();V();K();class M4 extends R.classBuilder().ep(J).m(function(r,s,f,w){return[C(f,this.serialize,this.deserialize),W(f,r.getEndpointParameterInstructions()),j(f)]}).s("AWSDnsV20130401","TestDNSAnswer",{}).n("Route53Client","TestDNSAnswerCommand").f(void 0,void 0).ser(wH).de(Yl).build(){}B();V();K();class V4 extends R.classBuilder().ep(J).m(function(r,s,f,w){return[C(f,this.serialize,this.deserialize),W(f,r.getEndpointParameterInstructions())]}).s("AWSDnsV20130401","UpdateHealthCheck",{}).n("Route53Client","UpdateHealthCheckCommand").f(void 0,void 0).ser(hH).de(Xl).build(){}B();V();K();class H4 extends R.classBuilder().ep(J).m(function(r,s,f,w){return[C(f,this.serialize,this.deserialize),W(f,r.getEndpointParameterInstructions()),j(f)]}).s("AWSDnsV20130401","UpdateHostedZoneComment",{}).n("Route53Client","UpdateHostedZoneCommentCommand").f(void 0,void 0).ser(EH).de(Kl).build(){}B();V();K();class l4 extends R.classBuilder().ep(J).m(function(r,s,f,w){return[C(f,this.serialize,this.deserialize),W(f,r.getEndpointParameterInstructions()),j(f)]}).s("AWSDnsV20130401","UpdateTrafficPolicyComment",{}).n("Route53Client","UpdateTrafficPolicyCommentCommand").f(void 0,void 0).ser($H).de(Zl).build(){}B();V();K();class D4 extends R.classBuilder().ep(J).m(function(r,s,f,w){return[C(f,this.serialize,this.deserialize),W(f,r.getEndpointParameterInstructions()),j(f)]}).s("AWSDnsV20130401","UpdateTrafficPolicyInstance",{}).n("Route53Client","UpdateTrafficPolicyInstanceCommand").f(void 0,void 0).ser(IH).de(Pl).build(){}var uu={ActivateKeySigningKeyCommand:W8,AssociateVPCWithHostedZoneCommand:z8,ChangeCidrCollectionCommand:S8,ChangeResourceRecordSetsCommand:Y8,ChangeTagsForResourceCommand:X8,CreateCidrCollectionCommand:K8,CreateHealthCheckCommand:Z8,CreateHostedZoneCommand:P8,CreateKeySigningKeyCommand:J8,CreateQueryLoggingConfigCommand:Q8,CreateReusableDelegationSetCommand:B8,CreateTrafficPolicyCommand:M8,CreateTrafficPolicyInstanceCommand:V8,CreateTrafficPolicyVersionCommand:H8,CreateVPCAssociationAuthorizationCommand:l8,DeactivateKeySigningKeyCommand:D8,DeleteCidrCollectionCommand:k8,DeleteHealthCheckCommand:y8,DeleteHostedZoneCommand:N8,DeleteKeySigningKeyCommand:q8,DeleteQueryLoggingConfigCommand:m8,DeleteReusableDelegationSetCommand:j8,DeleteTrafficPolicyCommand:v8,DeleteTrafficPolicyInstanceCommand:i8,DeleteVPCAssociationAuthorizationCommand:O8,DisableHostedZoneDNSSECCommand:d8,DisassociateVPCFromHostedZoneCommand:c8,EnableHostedZoneDNSSECCommand:b8,GetAccountLimitCommand:_8,GetChangeCommand:g8,GetCheckerIpRangesCommand:x8,GetDNSSECCommand:e8,GetGeoLocationCommand:n8,GetHealthCheckCommand:o8,GetHealthCheckCountCommand:a8,GetHealthCheckLastFailureReasonCommand:p8,GetHealthCheckStatusCommand:u8,GetHostedZoneCommand:t8,GetHostedZoneCountCommand:r4,GetHostedZoneLimitCommand:f4,GetQueryLoggingConfigCommand:s4,GetReusableDelegationSetCommand:w4,GetReusableDelegationSetLimitCommand:h4,GetTrafficPolicyCommand:E4,GetTrafficPolicyInstanceCommand:$4,GetTrafficPolicyInstanceCountCommand:I4,ListCidrBlocksCommand:F4,ListCidrCollectionsCommand:U4,ListCidrLocationsCommand:T4,ListGeoLocationsCommand:G4,ListHealthChecksCommand:A4,ListHostedZonesCommand:C4,ListHostedZonesByNameCommand:L4,ListHostedZonesByVPCCommand:R4,ListQueryLoggingConfigsCommand:W4,ListResourceRecordSetsCommand:z4,ListReusableDelegationSetsCommand:S4,ListTagsForResourceCommand:Y4,ListTagsForResourcesCommand:X4,ListTrafficPoliciesCommand:K4,ListTrafficPolicyInstancesCommand:J4,ListTrafficPolicyInstancesByHostedZoneCommand:Z4,ListTrafficPolicyInstancesByPolicyCommand:P4,ListTrafficPolicyVersionsCommand:Q4,ListVPCAssociationAuthorizationsCommand:B4,TestDNSAnswerCommand:M4,UpdateHealthCheckCommand:V4,UpdateHostedZoneCommentCommand:H4,UpdateTrafficPolicyCommentCommand:l4,UpdateTrafficPolicyInstanceCommand:D4};class zw extends rG{}ds(uu,zw);pw();uw();tw();Bw();lf();var U1=m(qr(),1);Lh();B();Is();K();var il=m(Qr(),1);Es();function tu(r){return{schemeId:"aws.auth#sigv4",signingProperties:{name:"route53domains",region:r.region},propertiesExtractor:(s,f)=>({signingProperties:{config:s,context:f}})}}var Ol=async(r,s,f)=>{return{operation:Vf(s).operation,region:await yr(r.region)()||(()=>{throw new Error("expected `region` to be configured for `aws.auth#sigv4`")})()}},dl=(r)=>{const s=[];switch(r.operation){default:s.push(tu(r))}return s},cl=(r)=>{return{...il.resolveAwsSdkSigV4Config(r)}};var bl=(r)=>{return{...r,useDualstackEndpoint:r.useDualstackEndpoint??!1,useFipsEndpoint:r.useFipsEndpoint??!1,defaultSigningName:"route53domains"}},g={UseFIPS:{type:"builtInParams",name:"useFipsEndpoint"},Endpoint:{type:"builtInParams",name:"endpoint"},Region:{type:"builtInParams",name:"region"},UseDualStack:{type:"builtInParams",name:"useDualstackEndpoint"}};var _l={name:"@aws-sdk/client-route-53-domains",description:"AWS SDK for JavaScript Route 53 Domains Client for Node.js, Browser and React Native",version:"3.668.0",scripts:{build:"concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'","build:cjs":"node ../../scripts/compilation/inline client-route-53-domains","build:es":"tsc -p tsconfig.es.json","build:include:deps":"lerna run --scope $npm_package_name --include-dependencies build","build:types":"tsc -p tsconfig.types.json","build:types:downlevel":"downlevel-dts dist-types dist-types/ts3.4",clean:"rimraf ./dist-* && rimraf *.tsbuildinfo","extract:docs":"api-extractor run --local","generate:client":"node ../../scripts/generate-clients/single-service --solo route-53-domains"},main:"./dist-cjs/index.js",types:"./dist-types/index.d.ts",module:"./dist-es/index.js",sideEffects:!1,dependencies:{"@aws-crypto/sha256-browser":"5.2.0","@aws-crypto/sha256-js":"5.2.0","@aws-sdk/client-sso-oidc":"3.668.0","@aws-sdk/client-sts":"3.668.0","@aws-sdk/core":"3.667.0","@aws-sdk/credential-provider-node":"3.668.0","@aws-sdk/middleware-host-header":"3.667.0","@aws-sdk/middleware-logger":"3.667.0","@aws-sdk/middleware-recursion-detection":"3.667.0","@aws-sdk/middleware-user-agent":"3.668.0","@aws-sdk/region-config-resolver":"3.667.0","@aws-sdk/types":"3.667.0","@aws-sdk/util-endpoints":"3.667.0","@aws-sdk/util-user-agent-browser":"3.667.0","@aws-sdk/util-user-agent-node":"3.668.0","@smithy/config-resolver":"^3.0.9","@smithy/core":"^2.4.8","@smithy/fetch-http-handler":"^3.2.9","@smithy/hash-node":"^3.0.7","@smithy/invalid-dependency":"^3.0.7","@smithy/middleware-content-length":"^3.0.9","@smithy/middleware-endpoint":"^3.1.4","@smithy/middleware-retry":"^3.0.23","@smithy/middleware-serde":"^3.0.7","@smithy/middleware-stack":"^3.0.7","@smithy/node-config-provider":"^3.1.8","@smithy/node-http-handler":"^3.2.4","@smithy/protocol-http":"^4.1.4","@smithy/smithy-client":"^3.4.0","@smithy/types":"^3.5.0","@smithy/url-parser":"^3.0.7","@smithy/util-base64":"^3.0.0","@smithy/util-body-length-browser":"^3.0.0","@smithy/util-body-length-node":"^3.0.0","@smithy/util-defaults-mode-browser":"^3.0.23","@smithy/util-defaults-mode-node":"^3.0.23","@smithy/util-endpoints":"^2.1.3","@smithy/util-middleware":"^3.0.7","@smithy/util-retry":"^3.0.7","@smithy/util-utf8":"^3.0.0",tslib:"^2.6.2"},devDependencies:{"@tsconfig/node16":"16.1.3","@types/node":"^16.18.96",concurrently:"7.0.0","downlevel-dts":"0.10.1",rimraf:"3.0.2",typescript:"~4.9.5"},engines:{node:">=16.0.0"},typesVersions:{"<4.0":{"dist-types/*":["dist-types/ts3.4/*"]}},files:["dist-*/**"],author:{name:"AWS SDK for JavaScript Team",url:"https://aws.amazon.com/javascript/"},license:"Apache-2.0",browser:{"./dist-es/runtimeConfig":"./dist-es/runtimeConfig.browser"},"react-native":{"./dist-es/runtimeConfig":"./dist-es/runtimeConfig.native"},homepage:"https://github.com/aws/aws-sdk-js-v3/tree/main/clients/client-route-53-domains",repository:{type:"git",url:"https://github.com/aws/aws-sdk-js-v3.git",directory:"clients/client-route-53-domains"}};var ED=m(Qr(),1);e1();Jh();lf();Qh();Is();Ns();a0();Bh();zf();var wD=m(Qr(),1);K();n0();S0();Os();Pw();ws();var gl={["required"]:!1,type:"String"},xl={["required"]:!0,default:!1,type:"Boolean"},el={["ref"]:"Endpoint"},tl={["fn"]:"booleanEquals",["argv"]:[{["ref"]:"UseFIPS"},!0]},rD={["fn"]:"booleanEquals",["argv"]:[{["ref"]:"UseDualStack"},!0]},G0={},nl={["fn"]:"getAttr",["argv"]:[{["ref"]:"PartitionResult"},"supportsFIPS"]},ol={["fn"]:"booleanEquals",["argv"]:[!0,{["fn"]:"getAttr",["argv"]:[{["ref"]:"PartitionResult"},"supportsDualStack"]}]},al=[tl],pl=[rD],ul=[{["ref"]:"Region"}],ft={version:"1.0",parameters:{Region:gl,UseDualStack:xl,UseFIPS:xl,Endpoint:gl},rules:[{conditions:[{["fn"]:"isSet",["argv"]:[el]}],rules:[{conditions:al,error:"Invalid Configuration: FIPS and custom endpoint are not supported",type:"error"},{conditions:pl,error:"Invalid Configuration: Dualstack and custom endpoint are not supported",type:"error"},{endpoint:{url:el,properties:G0,headers:G0},type:"endpoint"}],type:"tree"},{conditions:[{["fn"]:"isSet",["argv"]:ul}],rules:[{conditions:[{["fn"]:"aws.partition",["argv"]:ul,assign:"PartitionResult"}],rules:[{conditions:[tl,rD],rules:[{conditions:[{["fn"]:"booleanEquals",["argv"]:[!0,nl]},ol],rules:[{endpoint:{url:"https://route53domains-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:G0,headers:G0},type:"endpoint"}],type:"tree"},{error:"FIPS and DualStack are enabled, but this partition does not support one or both",type:"error"}],type:"tree"},{conditions:al,rules:[{conditions:[{["fn"]:"booleanEquals",["argv"]:[nl,!0]}],rules:[{endpoint:{url:"https://route53domains-fips.{Region}.{PartitionResult#dnsSuffix}",properties:G0,headers:G0},type:"endpoint"}],type:"tree"},{error:"FIPS is enabled but this partition does not support FIPS",type:"error"}],type:"tree"},{conditions:pl,rules:[{conditions:[ol],rules:[{endpoint:{url:"https://route53domains.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:G0,headers:G0},type:"endpoint"}],type:"tree"},{error:"DualStack is enabled but this partition does not support DualStack",type:"error"}],type:"tree"},{endpoint:{url:"https://route53domains.{Region}.{PartitionResult#dnsSuffix}",properties:G0,headers:G0},type:"endpoint"}],type:"tree"}],type:"tree"},{error:"Invalid Configuration: Missing Region",type:"error"}]},fD=ft;var st=new fs({size:50,params:["Endpoint","Region","UseDualStack","UseFIPS"]}),sD=(r,s={})=>{return st.get(r,()=>ss(fD,{endpointParams:r,logger:s.logger}))};ur.aws=hs;var hD=(r)=>{return{apiVersion:"2014-05-15",base64Decoder:r?.base64Decoder??Uf,base64Encoder:r?.base64Encoder??Gf,disableHostPrefix:r?.disableHostPrefix??!1,endpointProvider:r?.endpointProvider??sD,extensions:r?.extensions??[],httpAuthSchemeProvider:r?.httpAuthSchemeProvider??dl,httpAuthSchemes:r?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:(s)=>s.getIdentityProvider("aws.auth#sigv4"),signer:new wD.AwsSdkSigV4Signer}],logger:r?.logger??new Yf,serviceId:r?.serviceId??"Route 53 Domains",urlParser:r?.urlParser??br,utf8Decoder:r?.utf8Decoder??_r,utf8Encoder:r?.utf8Encoder??Tf}};K();Mh();K();var $D=(r)=>{gs(process.version);const s=us(r),f=()=>s().then(_s),w=hD(r);return ED.emitWarningIfUnsupportedVersion(process.version),{...w,...r,runtime:"node",defaultsMode:s,bodyLengthChecker:r?.bodyLengthChecker??ps,credentialDefaultProvider:r?.credentialDefaultProvider??X0,defaultUserAgentProvider:r?.defaultUserAgentProvider??os({serviceId:w.serviceId,clientVersion:_l.version}),maxAttempts:r?.maxAttempts??u(js),region:r?.region??u(Hf,Ds),requestHandler:ff.create(r?.requestHandler??f),retryMode:r?.retryMode??u({...is,default:async()=>(await f()).retryMode||Nf}),sha256:r?.sha256??Fs.bind(null,"sha256"),streamCollector:r?.streamCollector??qf,useDualstackEndpoint:r?.useDualstackEndpoint??u(Hs),useFipsEndpoint:r?.useFipsEndpoint??u(ls),userAgentAppId:r?.userAgentAppId??u(as)}};Vh();kr();K();var ID=(r)=>{const s=r.httpAuthSchemes;let{httpAuthSchemeProvider:f,credentials:w}=r;return{setHttpAuthScheme(h){const E=s.findIndex(($)=>$.schemeId===h.schemeId);if(E===-1)s.push(h);else s.splice(E,1,h)},httpAuthSchemes(){return s},setHttpAuthSchemeProvider(h){f=h},httpAuthSchemeProvider(){return f},setCredentials(h){w=h},credentials(){return w}}},FD=(r)=>{return{httpAuthSchemes:r.httpAuthSchemes(),httpAuthSchemeProvider:r.httpAuthSchemeProvider(),credentials:r.credentials()}};var X6=(r)=>r,UD=(r,s)=>{const f={...X6(ts(r)),...X6(xs(r)),...X6(Xs(r)),...X6(ID(r))};return s.forEach((w)=>w.configure(f)),{...r,...r0(f),...es(f),...Ks(f),...FD(f)}};class k4 extends Sf{constructor(...[r]){const s=$D(r||{}),f=bl(s),w=Ms(f),h=vs(w),E=ks(h),$=Zs(E),I=qs($),F=cl(I),U=UD(F,r?.extensions||[]);super(U);this.config=U,this.middlewareStack.use(Vs(this.config)),this.middlewareStack.use(ns(this.config)),this.middlewareStack.use(ys(this.config)),this.middlewareStack.use(Ps(this.config)),this.middlewareStack.use(Js(this.config)),this.middlewareStack.use(Qs(this.config)),this.middlewareStack.use(U1.getHttpAuthSchemeEndpointRuleSetPlugin(this.config,{httpAuthSchemeParametersProvider:Ol,identityProviderConfigProvider:async(A)=>new U1.DefaultIdentityProviderConfig({"aws.auth#sigv4":A.credentials})})),this.middlewareStack.use(U1.getHttpSigningPlugin(this.config))}destroy(){super.destroy()}}K();B();V();K();K();K();class af extends mf{constructor(r){super(r);Object.setPrototypeOf(this,af.prototype)}}class K6 extends af{constructor(r){super({name:"DomainLimitExceeded",$fault:"client",...r});this.name="DomainLimitExceeded",this.$fault="client",Object.setPrototypeOf(this,K6.prototype)}}class Z6 extends af{constructor(r){super({name:"InvalidInput",$fault:"client",...r});this.name="InvalidInput",this.$fault="client",Object.setPrototypeOf(this,Z6.prototype)}}class P6 extends af{constructor(r){super({name:"OperationLimitExceeded",$fault:"client",...r});this.name="OperationLimitExceeded",this.$fault="client",Object.setPrototypeOf(this,P6.prototype)}}class J6 extends af{constructor(r){super({name:"UnsupportedTLD",$fault:"client",...r});this.name="UnsupportedTLD",this.$fault="client",Object.setPrototypeOf(this,J6.prototype)}}class Q6 extends af{constructor(r){super({name:"DnssecLimitExceeded",$fault:"client",...r});this.name="DnssecLimitExceeded",this.$fault="client",Object.setPrototypeOf(this,Q6.prototype)}}class B6 extends af{constructor(r){super({name:"DuplicateRequest",$fault:"client",...r});this.name="DuplicateRequest",this.$fault="client",Object.setPrototypeOf(this,B6.prototype),this.requestId=r.requestId}}class M6 extends af{constructor(r){super({name:"TLDRulesViolation",$fault:"client",...r});this.name="TLDRulesViolation",this.$fault="client",Object.setPrototypeOf(this,M6.prototype)}}var TD=(r)=>({...r,...r.Password&&{Password:o}}),GD=(r)=>({...r,...r.AuthCode&&{AuthCode:o}});var AD=(r)=>({...r,...r.AdminContact&&{AdminContact:o},...r.RegistrantContact&&{RegistrantContact:o},...r.TechContact&&{TechContact:o},...r.AbuseContactEmail&&{AbuseContactEmail:o},...r.AbuseContactPhone&&{AbuseContactPhone:o},...r.BillingContact&&{BillingContact:o}}),LD=(r)=>({...r,...r.AdminContact&&{AdminContact:o},...r.RegistrantContact&&{RegistrantContact:o},...r.TechContact&&{TechContact:o},...r.BillingContact&&{BillingContact:o}}),RD=(r)=>({...r,...r.emailAddress&&{emailAddress:o}}),CD=(r)=>({...r,...r.AuthCode&&{AuthCode:o}}),WD=(r)=>({...r,...r.AuthCode&&{AuthCode:o},...r.AdminContact&&{AdminContact:o},...r.RegistrantContact&&{RegistrantContact:o},...r.TechContact&&{TechContact:o},...r.BillingContact&&{BillingContact:o}}),zD=(r)=>({...r,...r.Password&&{Password:o}}),SD=(r)=>({...r,...r.AdminContact&&{AdminContact:o},...r.RegistrantContact&&{RegistrantContact:o},...r.TechContact&&{TechContact:o},...r.BillingContact&&{BillingContact:o}}),YD=(r)=>({...r,...r.FIAuthKey&&{FIAuthKey:o}});var fr=m(Qr(),1);kr();K();function Ir(r){return{"content-type":"application/x-amz-json-1.1","x-amz-target":`Route53Domains_v20140515.${r}`}}var XD=async(r,s)=>{const f=Ir("AcceptDomainTransferFromAnotherAwsAccount");let w;return w=JSON.stringify(q(r)),$r(s,f,"/",void 0,w)},KD=async(r,s)=>{const f=Ir("AssociateDelegationSignerToDomain");let w;return w=JSON.stringify(q(r)),$r(s,f,"/",void 0,w)},ZD=async(r,s)=>{const f=Ir("CancelDomainTransferToAnotherAwsAccount");let w;return w=JSON.stringify(q(r)),$r(s,f,"/",void 0,w)},PD=async(r,s)=>{const f=Ir("CheckDomainAvailability");let w;return w=JSON.stringify(q(r)),$r(s,f,"/",void 0,w)},JD=async(r,s)=>{const f=Ir("CheckDomainTransferability");let w;return w=JSON.stringify(q(r)),$r(s,f,"/",void 0,w)},QD=async(r,s)=>{const f=Ir("DeleteDomain");let w;return w=JSON.stringify(q(r)),$r(s,f,"/",void 0,w)},BD=async(r,s)=>{const f=Ir("DeleteTagsForDomain");let w;return w=JSON.stringify(q(r)),$r(s,f,"/",void 0,w)},MD=async(r,s)=>{const f=Ir("DisableDomainAutoRenew");let w;return w=JSON.stringify(q(r)),$r(s,f,"/",void 0,w)},VD=async(r,s)=>{const f=Ir("DisableDomainTransferLock");let w;return w=JSON.stringify(q(r)),$r(s,f,"/",void 0,w)},HD=async(r,s)=>{const f=Ir("DisassociateDelegationSignerFromDomain");let w;return w=JSON.stringify(q(r)),$r(s,f,"/",void 0,w)},lD=async(r,s)=>{const f=Ir("EnableDomainAutoRenew");let w;return w=JSON.stringify(q(r)),$r(s,f,"/",void 0,w)},DD=async(r,s)=>{const f=Ir("EnableDomainTransferLock");let w;return w=JSON.stringify(q(r)),$r(s,f,"/",void 0,w)},kD=async(r,s)=>{const f=Ir("GetContactReachabilityStatus");let w;return w=JSON.stringify(q(r)),$r(s,f,"/",void 0,w)},yD=async(r,s)=>{const f=Ir("GetDomainDetail");let w;return w=JSON.stringify(q(r)),$r(s,f,"/",void 0,w)},ND=async(r,s)=>{const f=Ir("GetDomainSuggestions");let w;return w=JSON.stringify(q(r)),$r(s,f,"/",void 0,w)},qD=async(r,s)=>{const f=Ir("GetOperationDetail");let w;return w=JSON.stringify(q(r)),$r(s,f,"/",void 0,w)},mD=async(r,s)=>{const f=Ir("ListDomains");let w;return w=JSON.stringify(q(r)),$r(s,f,"/",void 0,w)},jD=async(r,s)=>{const f=Ir("ListOperations");let w;return w=JSON.stringify(Gt(r,s)),$r(s,f,"/",void 0,w)},vD=async(r,s)=>{const f=Ir("ListPrices");let w;return w=JSON.stringify(q(r)),$r(s,f,"/",void 0,w)},iD=async(r,s)=>{const f=Ir("ListTagsForDomain");let w;return w=JSON.stringify(q(r)),$r(s,f,"/",void 0,w)},OD=async(r,s)=>{const f=Ir("PushDomain");let w;return w=JSON.stringify(q(r)),$r(s,f,"/",void 0,w)},dD=async(r,s)=>{const f=Ir("RegisterDomain");let w;return w=JSON.stringify(q(r)),$r(s,f,"/",void 0,w)},cD=async(r,s)=>{const f=Ir("RejectDomainTransferFromAnotherAwsAccount");let w;return w=JSON.stringify(q(r)),$r(s,f,"/",void 0,w)},bD=async(r,s)=>{const f=Ir("RenewDomain");let w;return w=JSON.stringify(q(r)),$r(s,f,"/",void 0,w)},_D=async(r,s)=>{const f=Ir("ResendContactReachabilityEmail");let w;return w=JSON.stringify(q(r)),$r(s,f,"/",void 0,w)},gD=async(r,s)=>{const f=Ir("ResendOperationAuthorization");let w;return w=JSON.stringify(q(r)),$r(s,f,"/",void 0,w)},xD=async(r,s)=>{const f=Ir("RetrieveDomainAuthCode");let w;return w=JSON.stringify(q(r)),$r(s,f,"/",void 0,w)},eD=async(r,s)=>{const f=Ir("TransferDomain");let w;return w=JSON.stringify(q(r)),$r(s,f,"/",void 0,w)},nD=async(r,s)=>{const f=Ir("TransferDomainToAnotherAwsAccount");let w;return w=JSON.stringify(q(r)),$r(s,f,"/",void 0,w)},oD=async(r,s)=>{const f=Ir("UpdateDomainContact");let w;return w=JSON.stringify(At(r,s)),$r(s,f,"/",void 0,w)},aD=async(r,s)=>{const f=Ir("UpdateDomainContactPrivacy");let w;return w=JSON.stringify(q(r)),$r(s,f,"/",void 0,w)},pD=async(r,s)=>{const f=Ir("UpdateDomainNameservers");let w;return w=JSON.stringify(q(r)),$r(s,f,"/",void 0,w)},uD=async(r,s)=>{const f=Ir("UpdateTagsForDomain");let w;return w=JSON.stringify(q(r)),$r(s,f,"/",void 0,w)},tD=async(r,s)=>{const f=Ir("ViewBilling");let w;return w=JSON.stringify(Lt(r,s)),$r(s,f,"/",void 0,w)},rk=async(r,s)=>{if(r.statusCode>=300)return Er(r,s);const f=await fr.parseJsonBody(r.body,s);let w={};return w=q(f),{$metadata:t(r),...w}},fk=async(r,s)=>{if(r.statusCode>=300)return Er(r,s);const f=await fr.parseJsonBody(r.body,s);let w={};return w=q(f),{$metadata:t(r),...w}},sk=async(r,s)=>{if(r.statusCode>=300)return Er(r,s);const f=await fr.parseJsonBody(r.body,s);let w={};return w=q(f),{$metadata:t(r),...w}},wk=async(r,s)=>{if(r.statusCode>=300)return Er(r,s);const f=await fr.parseJsonBody(r.body,s);let w={};return w=q(f),{$metadata:t(r),...w}},hk=async(r,s)=>{if(r.statusCode>=300)return Er(r,s);const f=await fr.parseJsonBody(r.body,s);let w={};return w=q(f),{$metadata:t(r),...w}},Ek=async(r,s)=>{if(r.statusCode>=300)return Er(r,s);const f=await fr.parseJsonBody(r.body,s);let w={};return w=q(f),{$metadata:t(r),...w}},$k=async(r,s)=>{if(r.statusCode>=300)return Er(r,s);const f=await fr.parseJsonBody(r.body,s);let w={};return w=q(f),{$metadata:t(r),...w}},Ik=async(r,s)=>{if(r.statusCode>=300)return Er(r,s);const f=await fr.parseJsonBody(r.body,s);let w={};return w=q(f),{$metadata:t(r),...w}},Fk=async(r,s)=>{if(r.statusCode>=300)return Er(r,s);const f=await fr.parseJsonBody(r.body,s);let w={};return w=q(f),{$metadata:t(r),...w}},Uk=async(r,s)=>{if(r.statusCode>=300)return Er(r,s);const f=await fr.parseJsonBody(r.body,s);let w={};return w=q(f),{$metadata:t(r),...w}},Tk=async(r,s)=>{if(r.statusCode>=300)return Er(r,s);const f=await fr.parseJsonBody(r.body,s);let w={};return w=q(f),{$metadata:t(r),...w}},Gk=async(r,s)=>{if(r.statusCode>=300)return Er(r,s);const f=await fr.parseJsonBody(r.body,s);let w={};return w=q(f),{$metadata:t(r),...w}},Ak=async(r,s)=>{if(r.statusCode>=300)return Er(r,s);const f=await fr.parseJsonBody(r.body,s);let w={};return w=q(f),{$metadata:t(r),...w}},Lk=async(r,s)=>{if(r.statusCode>=300)return Er(r,s);const f=await fr.parseJsonBody(r.body,s);let w={};return w=Xt(f,s),{$metadata:t(r),...w}},Rk=async(r,s)=>{if(r.statusCode>=300)return Er(r,s);const f=await fr.parseJsonBody(r.body,s);let w={};return w=q(f),{$metadata:t(r),...w}},Ck=async(r,s)=>{if(r.statusCode>=300)return Er(r,s);const f=await fr.parseJsonBody(r.body,s);let w={};return w=Kt(f,s),{$metadata:t(r),...w}},Wk=async(r,s)=>{if(r.statusCode>=300)return Er(r,s);const f=await fr.parseJsonBody(r.body,s);let w={};return w=Zt(f,s),{$metadata:t(r),...w}},zk=async(r,s)=>{if(r.statusCode>=300)return Er(r,s);const f=await fr.parseJsonBody(r.body,s);let w={};return w=Pt(f,s),{$metadata:t(r),...w}},Sk=async(r,s)=>{if(r.statusCode>=300)return Er(r,s);const f=await fr.parseJsonBody(r.body,s);let w={};return w=Jt(f,s),{$metadata:t(r),...w}},Yk=async(r,s)=>{if(r.statusCode>=300)return Er(r,s);const f=await fr.parseJsonBody(r.body,s);let w={};return w=q(f),{$metadata:t(r),...w}},Xk=async(r,s)=>{if(r.statusCode>=300)return Er(r,s);return await gr(r.body,s),{$metadata:t(r)}},Kk=async(r,s)=>{if(r.statusCode>=300)return Er(r,s);const f=await fr.parseJsonBody(r.body,s);let w={};return w=q(f),{$metadata:t(r),...w}},Zk=async(r,s)=>{if(r.statusCode>=300)return Er(r,s);const f=await fr.parseJsonBody(r.body,s);let w={};return w=q(f),{$metadata:t(r),...w}},Pk=async(r,s)=>{if(r.statusCode>=300)return Er(r,s);const f=await fr.parseJsonBody(r.body,s);let w={};return w=q(f),{$metadata:t(r),...w}},Jk=async(r,s)=>{if(r.statusCode>=300)return Er(r,s);const f=await fr.parseJsonBody(r.body,s);let w={};return w=q(f),{$metadata:t(r),...w}},Qk=async(r,s)=>{if(r.statusCode>=300)return Er(r,s);return await gr(r.body,s),{$metadata:t(r)}},Bk=async(r,s)=>{if(r.statusCode>=300)return Er(r,s);const f=await fr.parseJsonBody(r.body,s);let w={};return w=q(f),{$metadata:t(r),...w}},Mk=async(r,s)=>{if(r.statusCode>=300)return Er(r,s);const f=await fr.parseJsonBody(r.body,s);let w={};return w=q(f),{$metadata:t(r),...w}},Vk=async(r,s)=>{if(r.statusCode>=300)return Er(r,s);const f=await fr.parseJsonBody(r.body,s);let w={};return w=q(f),{$metadata:t(r),...w}},Hk=async(r,s)=>{if(r.statusCode>=300)return Er(r,s);const f=await fr.parseJsonBody(r.body,s);let w={};return w=q(f),{$metadata:t(r),...w}},lk=async(r,s)=>{if(r.statusCode>=300)return Er(r,s);const f=await fr.parseJsonBody(r.body,s);let w={};return w=q(f),{$metadata:t(r),...w}},Dk=async(r,s)=>{if(r.statusCode>=300)return Er(r,s);const f=await fr.parseJsonBody(r.body,s);let w={};return w=q(f),{$metadata:t(r),...w}},kk=async(r,s)=>{if(r.statusCode>=300)return Er(r,s);const f=await fr.parseJsonBody(r.body,s);let w={};return w=q(f),{$metadata:t(r),...w}},yk=async(r,s)=>{if(r.statusCode>=300)return Er(r,s);const f=await fr.parseJsonBody(r.body,s);let w={};return w=Mt(f,s),{$metadata:t(r),...w}},Er=async(r,s)=>{const f={...r,body:await fr.parseJsonErrorBody(r.body,s)},w=fr.loadRestJsonErrorCode(r,f.body);switch(w){case"DomainLimitExceeded":case"com.amazonaws.route53domains#DomainLimitExceeded":throw await ht(f,s);case"InvalidInput":case"com.amazonaws.route53domains#InvalidInput":throw await $t(f,s);case"OperationLimitExceeded":case"com.amazonaws.route53domains#OperationLimitExceeded":throw await It(f,s);case"UnsupportedTLD":case"com.amazonaws.route53domains#UnsupportedTLD":throw await Ut(f,s);case"DnssecLimitExceeded":case"com.amazonaws.route53domains#DnssecLimitExceeded":throw await wt(f,s);case"DuplicateRequest":case"com.amazonaws.route53domains#DuplicateRequest":throw await Et(f,s);case"TLDRulesViolation":case"com.amazonaws.route53domains#TLDRulesViolation":throw await Ft(f,s);default:const h=f.body;return Vt({output:r,parsedBody:h,errorCode:w})}},wt=async(r,s)=>{const f=r.body,w=q(f),h=new Q6({$metadata:t(r),...w});return D(h,f)},ht=async(r,s)=>{const f=r.body,w=q(f),h=new K6({$metadata:t(r),...w});return D(h,f)},Et=async(r,s)=>{const f=r.body,w=q(f),h=new B6({$metadata:t(r),...w});return D(h,f)},$t=async(r,s)=>{const f=r.body,w=q(f),h=new Z6({$metadata:t(r),...w});return D(h,f)},It=async(r,s)=>{const f=r.body,w=q(f),h=new P6({$metadata:t(r),...w});return D(h,f)},Ft=async(r,s)=>{const f=r.body,w=q(f),h=new M6({$metadata:t(r),...w});return D(h,f)},Ut=async(r,s)=>{const f=r.body,w=q(f),h=new J6({$metadata:t(r),...w});return D(h,f)},Tt=(r,s)=>{return p(r,{Currency:[],MaxPrice:iZ})},Gt=(r,s)=>{return p(r,{Marker:[],MaxItems:[],SortBy:[],SortOrder:[],Status:q,SubmittedSince:(f)=>f.getTime()/1000,Type:q})},At=(r,s)=>{return p(r,{AdminContact:q,BillingContact:q,Consent:(f)=>Tt(f,s),DomainName:[],RegistrantContact:q,TechContact:q})},Lt=(r,s)=>{return p(r,{End:(f)=>f.getTime()/1000,Marker:[],MaxItems:[],Start:(f)=>f.getTime()/1000})},Rt=(r,s)=>{return p(r,{BillDate:(f)=>y(cs(Af(f))),DomainName:T,InvoiceId:T,Operation:T,Price:oU})},Ct=(r,s)=>{return(r||[]).filter((w)=>w!=null).map((w)=>{return Rt(w,s)})},Wt=(r,s)=>{return p(r,{ChangeOwnershipPrice:(f)=>I$(f,s),Name:T,RegistrationPrice:(f)=>I$(f,s),RenewalPrice:(f)=>I$(f,s),RestorationPrice:(f)=>I$(f,s),TransferPrice:(f)=>I$(f,s)})},zt=(r,s)=>{return(r||[]).filter((w)=>w!=null).map((w)=>{return Wt(w,s)})},St=(r,s)=>{return p(r,{AutoRenew:p0,DomainName:T,Expiry:(f)=>y(cs(Af(f))),TransferLock:p0})},Yt=(r,s)=>{return(r||[]).filter((w)=>w!=null).map((w)=>{return St(w,s)})},Xt=(r,s)=>{return p(r,{AbuseContactEmail:T,AbuseContactPhone:T,AdminContact:q,AdminPrivacy:p0,AutoRenew:p0,BillingContact:q,BillingPrivacy:p0,CreationDate:(f)=>y(cs(Af(f))),DnsSec:T,DnssecKeys:q,DomainName:T,ExpirationDate:(f)=>y(cs(Af(f))),Nameservers:q,RegistrantContact:q,RegistrantPrivacy:p0,RegistrarName:T,RegistrarUrl:T,RegistryDomainId:T,Reseller:T,StatusList:q,TechContact:q,TechPrivacy:p0,UpdatedDate:(f)=>y(cs(Af(f))),WhoIsServer:T})},Kt=(r,s)=>{return p(r,{DomainName:T,LastUpdatedDate:(f)=>y(cs(Af(f))),Message:T,OperationId:T,Status:T,StatusFlag:T,SubmittedDate:(f)=>y(cs(Af(f))),Type:T})},Zt=(r,s)=>{return p(r,{Domains:(f)=>Yt(f,s),NextPageMarker:T})},Pt=(r,s)=>{return p(r,{NextPageMarker:T,Operations:(f)=>Bt(f,s)})},Jt=(r,s)=>{return p(r,{NextPageMarker:T,Prices:(f)=>zt(f,s)})},Qt=(r,s)=>{return p(r,{DomainName:T,LastUpdatedDate:(f)=>y(cs(Af(f))),Message:T,OperationId:T,Status:T,StatusFlag:T,SubmittedDate:(f)=>y(cs(Af(f))),Type:T})},Bt=(r,s)=>{return(r||[]).filter((w)=>w!=null).map((w)=>{return Qt(w,s)})},I$=(r,s)=>{return p(r,{Currency:T,Price:oU})},Mt=(r,s)=>{return p(r,{BillingRecords:(f)=>Ct(f,s),NextPageMarker:T})},t=(r)=>({httpStatusCode:r.statusCode,requestId:r.headers["x-amzn-requestid"]??r.headers["x-amzn-request-id"]??r.headers["x-amz-request-id"],extendedRequestId:r.headers["x-amz-id-2"],cfId:r.headers["x-amz-cf-id"]});var Vt=bs(af),$r=async(r,s,f,w,h)=>{const{hostname:E,protocol:$="https",port:I,path:F}=await r.endpoint(),U={protocol:$,hostname:E,port:I,method:"POST",path:F.endsWith("/")?F.slice(0,-1)+f:F+f,headers:s};if(w!==void 0)U.hostname=w;if(h!==void 0)U.body=h;return new Mr(U)};class y4 extends R.classBuilder().ep(g).m(function(r,s,f,w){return[C(f,this.serialize,this.deserialize),W(f,r.getEndpointParameterInstructions())]}).s("Route53Domains_v20140515","AcceptDomainTransferFromAnotherAwsAccount",{}).n("Route53DomainsClient","AcceptDomainTransferFromAnotherAwsAccountCommand").f(TD,void 0).ser(XD).de(rk).build(){}B();V();K();class N4 extends R.classBuilder().ep(g).m(function(r,s,f,w){return[C(f,this.serialize,this.deserialize),W(f,r.getEndpointParameterInstructions())]}).s("Route53Domains_v20140515","AssociateDelegationSignerToDomain",{}).n("Route53DomainsClient","AssociateDelegationSignerToDomainCommand").f(void 0,void 0).ser(KD).de(fk).build(){}B();V();K();class q4 extends R.classBuilder().ep(g).m(function(r,s,f,w){return[C(f,this.serialize,this.deserialize),W(f,r.getEndpointParameterInstructions())]}).s("Route53Domains_v20140515","CancelDomainTransferToAnotherAwsAccount",{}).n("Route53DomainsClient","CancelDomainTransferToAnotherAwsAccountCommand").f(void 0,void 0).ser(ZD).de(sk).build(){}B();V();K();class m4 extends R.classBuilder().ep(g).m(function(r,s,f,w){return[C(f,this.serialize,this.deserialize),W(f,r.getEndpointParameterInstructions())]}).s("Route53Domains_v20140515","CheckDomainAvailability",{}).n("Route53DomainsClient","CheckDomainAvailabilityCommand").f(void 0,void 0).ser(PD).de(wk).build(){}B();V();K();class j4 extends R.classBuilder().ep(g).m(function(r,s,f,w){return[C(f,this.serialize,this.deserialize),W(f,r.getEndpointParameterInstructions())]}).s("Route53Domains_v20140515","CheckDomainTransferability",{}).n("Route53DomainsClient","CheckDomainTransferabilityCommand").f(GD,void 0).ser(JD).de(hk).build(){}B();V();K();class v4 extends R.classBuilder().ep(g).m(function(r,s,f,w){return[C(f,this.serialize,this.deserialize),W(f,r.getEndpointParameterInstructions())]}).s("Route53Domains_v20140515","DeleteDomain",{}).n("Route53DomainsClient","DeleteDomainCommand").f(void 0,void 0).ser(QD).de(Ek).build(){}B();V();K();class i4 extends R.classBuilder().ep(g).m(function(r,s,f,w){return[C(f,this.serialize,this.deserialize),W(f,r.getEndpointParameterInstructions())]}).s("Route53Domains_v20140515","DeleteTagsForDomain",{}).n("Route53DomainsClient","DeleteTagsForDomainCommand").f(void 0,void 0).ser(BD).de($k).build(){}B();V();K();class O4 extends R.classBuilder().ep(g).m(function(r,s,f,w){return[C(f,this.serialize,this.deserialize),W(f,r.getEndpointParameterInstructions())]}).s("Route53Domains_v20140515","DisableDomainAutoRenew",{}).n("Route53DomainsClient","DisableDomainAutoRenewCommand").f(void 0,void 0).ser(MD).de(Ik).build(){}B();V();K();class d4 extends R.classBuilder().ep(g).m(function(r,s,f,w){return[C(f,this.serialize,this.deserialize),W(f,r.getEndpointParameterInstructions())]}).s("Route53Domains_v20140515","DisableDomainTransferLock",{}).n("Route53DomainsClient","DisableDomainTransferLockCommand").f(void 0,void 0).ser(VD).de(Fk).build(){}B();V();K();class c4 extends R.classBuilder().ep(g).m(function(r,s,f,w){return[C(f,this.serialize,this.deserialize),W(f,r.getEndpointParameterInstructions())]}).s("Route53Domains_v20140515","DisassociateDelegationSignerFromDomain",{}).n("Route53DomainsClient","DisassociateDelegationSignerFromDomainCommand").f(void 0,void 0).ser(HD).de(Uk).build(){}B();V();K();class b4 extends R.classBuilder().ep(g).m(function(r,s,f,w){return[C(f,this.serialize,this.deserialize),W(f,r.getEndpointParameterInstructions())]}).s("Route53Domains_v20140515","EnableDomainAutoRenew",{}).n("Route53DomainsClient","EnableDomainAutoRenewCommand").f(void 0,void 0).ser(lD).de(Tk).build(){}B();V();K();class _4 extends R.classBuilder().ep(g).m(function(r,s,f,w){return[C(f,this.serialize,this.deserialize),W(f,r.getEndpointParameterInstructions())]}).s("Route53Domains_v20140515","EnableDomainTransferLock",{}).n("Route53DomainsClient","EnableDomainTransferLockCommand").f(void 0,void 0).ser(DD).de(Gk).build(){}B();V();K();class g4 extends R.classBuilder().ep(g).m(function(r,s,f,w){return[C(f,this.serialize,this.deserialize),W(f,r.getEndpointParameterInstructions())]}).s("Route53Domains_v20140515","GetContactReachabilityStatus",{}).n("Route53DomainsClient","GetContactReachabilityStatusCommand").f(void 0,void 0).ser(kD).de(Ak).build(){}B();V();K();class x4 extends R.classBuilder().ep(g).m(function(r,s,f,w){return[C(f,this.serialize,this.deserialize),W(f,r.getEndpointParameterInstructions())]}).s("Route53Domains_v20140515","GetDomainDetail",{}).n("Route53DomainsClient","GetDomainDetailCommand").f(void 0,AD).ser(yD).de(Lk).build(){}B();V();K();class e4 extends R.classBuilder().ep(g).m(function(r,s,f,w){return[C(f,this.serialize,this.deserialize),W(f,r.getEndpointParameterInstructions())]}).s("Route53Domains_v20140515","GetDomainSuggestions",{}).n("Route53DomainsClient","GetDomainSuggestionsCommand").f(void 0,void 0).ser(ND).de(Rk).build(){}B();V();K();class n4 extends R.classBuilder().ep(g).m(function(r,s,f,w){return[C(f,this.serialize,this.deserialize),W(f,r.getEndpointParameterInstructions())]}).s("Route53Domains_v20140515","GetOperationDetail",{}).n("Route53DomainsClient","GetOperationDetailCommand").f(void 0,void 0).ser(qD).de(Ck).build(){}B();V();K();class o4 extends R.classBuilder().ep(g).m(function(r,s,f,w){return[C(f,this.serialize,this.deserialize),W(f,r.getEndpointParameterInstructions())]}).s("Route53Domains_v20140515","ListDomains",{}).n("Route53DomainsClient","ListDomainsCommand").f(void 0,void 0).ser(mD).de(Wk).build(){}B();V();K();class a4 extends R.classBuilder().ep(g).m(function(r,s,f,w){return[C(f,this.serialize,this.deserialize),W(f,r.getEndpointParameterInstructions())]}).s("Route53Domains_v20140515","ListOperations",{}).n("Route53DomainsClient","ListOperationsCommand").f(void 0,void 0).ser(jD).de(zk).build(){}B();V();K();class p4 extends R.classBuilder().ep(g).m(function(r,s,f,w){return[C(f,this.serialize,this.deserialize),W(f,r.getEndpointParameterInstructions())]}).s("Route53Domains_v20140515","ListPrices",{}).n("Route53DomainsClient","ListPricesCommand").f(void 0,void 0).ser(vD).de(Sk).build(){}B();V();K();class u4 extends R.classBuilder().ep(g).m(function(r,s,f,w){return[C(f,this.serialize,this.deserialize),W(f,r.getEndpointParameterInstructions())]}).s("Route53Domains_v20140515","ListTagsForDomain",{}).n("Route53DomainsClient","ListTagsForDomainCommand").f(void 0,void 0).ser(iD).de(Yk).build(){}B();V();K();class t4 extends R.classBuilder().ep(g).m(function(r,s,f,w){return[C(f,this.serialize,this.deserialize),W(f,r.getEndpointParameterInstructions())]}).s("Route53Domains_v20140515","PushDomain",{}).n("Route53DomainsClient","PushDomainCommand").f(void 0,void 0).ser(OD).de(Xk).build(){}B();V();K();class rA extends R.classBuilder().ep(g).m(function(r,s,f,w){return[C(f,this.serialize,this.deserialize),W(f,r.getEndpointParameterInstructions())]}).s("Route53Domains_v20140515","RegisterDomain",{}).n("Route53DomainsClient","RegisterDomainCommand").f(LD,void 0).ser(dD).de(Kk).build(){}B();V();K();class fA extends R.classBuilder().ep(g).m(function(r,s,f,w){return[C(f,this.serialize,this.deserialize),W(f,r.getEndpointParameterInstructions())]}).s("Route53Domains_v20140515","RejectDomainTransferFromAnotherAwsAccount",{}).n("Route53DomainsClient","RejectDomainTransferFromAnotherAwsAccountCommand").f(void 0,void 0).ser(cD).de(Zk).build(){}B();V();K();class sA extends R.classBuilder().ep(g).m(function(r,s,f,w){return[C(f,this.serialize,this.deserialize),W(f,r.getEndpointParameterInstructions())]}).s("Route53Domains_v20140515","RenewDomain",{}).n("Route53DomainsClient","RenewDomainCommand").f(void 0,void 0).ser(bD).de(Pk).build(){}B();V();K();class wA extends R.classBuilder().ep(g).m(function(r,s,f,w){return[C(f,this.serialize,this.deserialize),W(f,r.getEndpointParameterInstructions())]}).s("Route53Domains_v20140515","ResendContactReachabilityEmail",{}).n("Route53DomainsClient","ResendContactReachabilityEmailCommand").f(void 0,RD).ser(_D).de(Jk).build(){}B();V();K();class hA extends R.classBuilder().ep(g).m(function(r,s,f,w){return[C(f,this.serialize,this.deserialize),W(f,r.getEndpointParameterInstructions())]}).s("Route53Domains_v20140515","ResendOperationAuthorization",{}).n("Route53DomainsClient","ResendOperationAuthorizationCommand").f(void 0,void 0).ser(gD).de(Qk).build(){}B();V();K();class EA extends R.classBuilder().ep(g).m(function(r,s,f,w){return[C(f,this.serialize,this.deserialize),W(f,r.getEndpointParameterInstructions())]}).s("Route53Domains_v20140515","RetrieveDomainAuthCode",{}).n("Route53DomainsClient","RetrieveDomainAuthCodeCommand").f(void 0,CD).ser(xD).de(Bk).build(){}B();V();K();class $A extends R.classBuilder().ep(g).m(function(r,s,f,w){return[C(f,this.serialize,this.deserialize),W(f,r.getEndpointParameterInstructions())]}).s("Route53Domains_v20140515","TransferDomain",{}).n("Route53DomainsClient","TransferDomainCommand").f(WD,void 0).ser(eD).de(Mk).build(){}B();V();K();class IA extends R.classBuilder().ep(g).m(function(r,s,f,w){return[C(f,this.serialize,this.deserialize),W(f,r.getEndpointParameterInstructions())]}).s("Route53Domains_v20140515","TransferDomainToAnotherAwsAccount",{}).n("Route53DomainsClient","TransferDomainToAnotherAwsAccountCommand").f(void 0,zD).ser(nD).de(Vk).build(){}B();V();K();class FA extends R.classBuilder().ep(g).m(function(r,s,f,w){return[C(f,this.serialize,this.deserialize),W(f,r.getEndpointParameterInstructions())]}).s("Route53Domains_v20140515","UpdateDomainContact",{}).n("Route53DomainsClient","UpdateDomainContactCommand").f(SD,void 0).ser(oD).de(Hk).build(){}B();V();K();class UA extends R.classBuilder().ep(g).m(function(r,s,f,w){return[C(f,this.serialize,this.deserialize),W(f,r.getEndpointParameterInstructions())]}).s("Route53Domains_v20140515","UpdateDomainContactPrivacy",{}).n("Route53DomainsClient","UpdateDomainContactPrivacyCommand").f(void 0,void 0).ser(aD).de(lk).build(){}B();V();K();class TA extends R.classBuilder().ep(g).m(function(r,s,f,w){return[C(f,this.serialize,this.deserialize),W(f,r.getEndpointParameterInstructions())]}).s("Route53Domains_v20140515","UpdateDomainNameservers",{}).n("Route53DomainsClient","UpdateDomainNameserversCommand").f(YD,void 0).ser(pD).de(Dk).build(){}B();V();K();class GA extends R.classBuilder().ep(g).m(function(r,s,f,w){return[C(f,this.serialize,this.deserialize),W(f,r.getEndpointParameterInstructions())]}).s("Route53Domains_v20140515","UpdateTagsForDomain",{}).n("Route53DomainsClient","UpdateTagsForDomainCommand").f(void 0,void 0).ser(uD).de(kk).build(){}B();V();K();class AA extends R.classBuilder().ep(g).m(function(r,s,f,w){return[C(f,this.serialize,this.deserialize),W(f,r.getEndpointParameterInstructions())]}).s("Route53Domains_v20140515","ViewBilling",{}).n("Route53DomainsClient","ViewBillingCommand").f(void 0,void 0).ser(tD).de(yk).build(){}var Ht={AcceptDomainTransferFromAnotherAwsAccountCommand:y4,AssociateDelegationSignerToDomainCommand:N4,CancelDomainTransferToAnotherAwsAccountCommand:q4,CheckDomainAvailabilityCommand:m4,CheckDomainTransferabilityCommand:j4,DeleteDomainCommand:v4,DeleteTagsForDomainCommand:i4,DisableDomainAutoRenewCommand:O4,DisableDomainTransferLockCommand:d4,DisassociateDelegationSignerFromDomainCommand:c4,EnableDomainAutoRenewCommand:b4,EnableDomainTransferLockCommand:_4,GetContactReachabilityStatusCommand:g4,GetDomainDetailCommand:x4,GetDomainSuggestionsCommand:e4,GetOperationDetailCommand:n4,ListDomainsCommand:o4,ListOperationsCommand:a4,ListPricesCommand:p4,ListTagsForDomainCommand:u4,PushDomainCommand:t4,RegisterDomainCommand:rA,RejectDomainTransferFromAnotherAwsAccountCommand:fA,RenewDomainCommand:sA,ResendContactReachabilityEmailCommand:wA,ResendOperationAuthorizationCommand:hA,RetrieveDomainAuthCodeCommand:EA,TransferDomainCommand:$A,TransferDomainToAnotherAwsAccountCommand:IA,UpdateDomainContactCommand:FA,UpdateDomainContactPrivacyCommand:UA,UpdateDomainNameserversCommand:TA,UpdateTagsForDomainCommand:GA,ViewBillingCommand:AA};class F$ extends k4{}ds(Ht,F$);import{runAction as lt}from"@stacksjs/actions";import{config as qk}from"@stacksjs/config";import{Action as Dt}from"@stacksjs/enums";import{err as m0,handleError as A0,ok as T1}from"@stacksjs/error-handling";import{log as Zf}from"@stacksjs/logging";import{path as kt}from"@stacksjs/path";import{fs as Nk}from"@stacksjs/storage";async function Clr(r){const s=new zw,f=await s.listHostedZonesByName({DNSName:r});if(!f||!f.HostedZones)return m0(A0(`No hosted zones found for domain: ${r}`));const w=f.HostedZones.find((E)=>E.Name===`${r}.`);if(!w)return m0(A0(`Hosted Zone not found for domain: ${r}`));const h=await s.listResourceRecordSets({HostedZoneId:w.Id});if(!h||!h.ResourceRecordSets)return m0(A0(`No DNS records found for domain: ${r}`));for(let E of h.ResourceRecordSets)if(E.Type!=="NS"&&E.Type!=="SOA")await s.changeResourceRecordSets({HostedZoneId:w.Id,ChangeBatch:{Changes:[{Action:"DELETE",ResourceRecordSet:E}]}});return await s.deleteHostedZone({Id:w.Id}),Zf.info(`Deleted Hosted Zone for domain: ${r}`),T1("success")}async function Wlr(r){const s=new zw,f=await s.listHostedZonesByName({DNSName:r});if(!f||!f.HostedZones)return m0(A0(`No hosted zones found for domain: ${r}`));const w=f.HostedZones.find((E)=>E.Name===`${r}.`);if(!w)return m0(A0(`Hosted Zone not found for domain: ${r}`));const h=await s.listResourceRecordSets({HostedZoneId:w.Id});if(!h||!h.ResourceRecordSets)return m0(A0(`No DNS records found for domain: ${r}`));for(let E of h.ResourceRecordSets)if(E.Type!=="NS"&&E.Type!=="SOA")await s.changeResourceRecordSets({HostedZoneId:w.Id,ChangeBatch:{Changes:[{Action:"DELETE",ResourceRecordSet:E}]}});return Zf.info(`Deleted DNS records for domain: ${r}`),T1("success")}async function zlr(r){const s=new zw,w=(await s.listHostedZonesByName({DNSName:r})).HostedZones?.find((E)=>E.Name===`${r}.`);if(w)return T1(w);const h=await s.createHostedZone({Name:r,CallerReference:`${Date.now()}`});if(!h.HostedZone)return m0(A0("Failed to create hosted zone"));return T1(h)}function yt(r){try{const s=kt.projectConfigPath("dns.ts"),w=Nk.readFileSync(s,"utf-8").replace(/nameservers: \[.*?\]/s,`nameservers: [${r.map((h)=>`'${h}'`).join(", ")}]`);Nk.writeFileSync(s,w,"utf-8"),Zf.info("Nameservers have been set.")}catch(s){console.error("Error updating nameservers:",s)}}async function Slr(r){try{const s=new zw,{HostedZones:f}=await s.listHostedZonesByName({DNSName:r});if(!f)return m0(A0(`No hosted zones found for domain ${r}`));const w=f[0];if(w&&w.Name===`${r}.`)return T1(w.Id);return T1(null)}catch(s){return m0(A0(`Failed to find hosted zone for domain ${r}`,s))}}async function Nt(r){if(Zf.debug("Getting nameservers for domain:",r),!r)return[];try{return(await new F$().getDomainDetail({DomainName:r}))?.Nameservers?.map((w)=>w.Name)||[]}catch(s){A0("Error getting domain detail",s)}}async function qt(r,s){if(!s)s=qk.app.url;const f=await Nt(s);if(f&&r&&JSON.stringify(f.sort())!==JSON.stringify(r.sort()))return Zf.info("Updating your domain nameservers to match the ones in your hosted zone..."),Zf.debug("Hosted zone nameservers:",r),Zf.debug("Domain nameservers:",f),await new F$().updateDomainNameservers({DomainName:s,Nameservers:r.map((h)=>({Name:h}))}),yt(r),Zf.info("Nameservers updated."),!0;Zf.success("Your nameservers are up to date.")}async function Ylr(r){if(Zf.debug("Checking if domain has been added to cloud..."),!r)r=qk.app.url;Zf.debug("domainName:",r);const s=new zw,f=await s.listHostedZonesByName({DNSName:r});if(Zf.debug("Existing hosted zones:",f),!f||!f.HostedZones)return!1;const w=f.HostedZones.find((h)=>h.Name===`${r}.`);if(w){Zf.debug("Hosted zone found:",w);const E=(await s.getHostedZone({Id:w.Id})).DelegationSet?.NameServers||[];return await qt(E,r),!0}return!1}async function Xlr(r){return await lt(Dt.DomainsAdd,r)}export{yt as writeNameserversToConfig,qt as updateNameservers,Ylr as hasUserDomainBeenAddedToCloud,Nt as getNameservers,Slr as findHostedZone,Wlr as deleteHostedZoneRecords,Clr as deleteHostedZone,zlr as createHostedZone,Xlr as addDomain};
34
34
 
35
- //# debugId=3FD63C39E026543764756E2164756E21
35
+ //# debugId=494FFC744DBF30B964756E2164756E21
36
36
  //# sourceMappingURL=index.js.map