@stacksjs/dns 0.70.1 → 0.70.3

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.
Files changed (2) hide show
  1. package/dist/index.js +30 -30
  2. package/package.json +8 -8
package/dist/index.js CHANGED
@@ -1,22 +1,22 @@
1
1
  // @bun
2
- var Dj=Object.create;var{getPrototypeOf:qj,defineProperty:lT,getOwnPropertyNames:kj}=Object;var yj=Object.prototype.hasOwnProperty;var p=(f,h,w)=>{w=f!=null?Dj(qj(f)):{};let s=h||!f||!f.__esModule?lT(w,"default",{value:f,enumerable:!0}):w;for(let $ of kj(f))if(!yj.call(s,$))lT(s,$,{get:()=>f[$],enumerable:!0});return s};var H=(f,h)=>()=>(h||f((h={exports:{}}).exports,h),h.exports);var Th=(f,h)=>{for(var w in h)lT(f,w,{get:h[w],enumerable:!0,configurable:!0,set:(s)=>h[w]=()=>s})};var B=(f,h)=>()=>(f&&(h=f(f=0)),h);var B0=import.meta.require;var Zw=(f)=>{let h=f.httpHandler;return{setHttpHandler(w){h=w},httpHandler(){return h},updateHttpClientConfig(w,s){h.updateHttpClientConfig(w,s)},httpHandlerConfigs(){return h.httpHandlerConfigs()}}},Jw=(f)=>{return{httpHandler:f.httpHandler()}};var xL=()=>{};var T1=H((GE0,fB)=>{var{defineProperty:s4,getOwnPropertyDescriptor:jj,getOwnPropertyNames:Oj}=Object,lj=Object.prototype.hasOwnProperty,$4=(f,h)=>s4(f,"name",{value:h,configurable:!0}),vj=(f,h)=>{for(var w in h)s4(f,w,{get:h[w],enumerable:!0})},bj=(f,h,w,s)=>{if(h&&typeof h==="object"||typeof h==="function"){for(let $ of Oj(h))if(!lj.call(f,$)&&$!==w)s4(f,$,{get:()=>h[$],enumerable:!(s=jj(h,$))||s.enumerable})}return f},mj=(f)=>bj(s4({},"__esModule",{value:!0}),f),_L={};vj(_L,{AlgorithmId:()=>oL,EndpointURLScheme:()=>aL,FieldPosition:()=>pL,HttpApiKeyAuthLocation:()=>eL,HttpAuthLocation:()=>nL,IniSectionType:()=>uL,RequestHandlerProtocol:()=>tL,SMITHY_CONTEXT_KEY:()=>xj,getDefaultClientConfiguration:()=>cj,resolveDefaultRuntimeConfig:()=>gj});fB.exports=mj(_L);var nL=((f)=>{return f.HEADER="header",f.QUERY="query",f})(nL||{}),eL=((f)=>{return f.HEADER="header",f.QUERY="query",f})(eL||{}),aL=((f)=>{return f.HTTP="http",f.HTTPS="https",f})(aL||{}),oL=((f)=>{return f.MD5="md5",f.CRC32="crc32",f.CRC32C="crc32c",f.SHA1="sha1",f.SHA256="sha256",f})(oL||{}),dj=$4((f)=>{let h=[];if(f.sha256!==void 0)h.push({algorithmId:()=>"sha256",checksumConstructor:()=>f.sha256});if(f.md5!=null)h.push({algorithmId:()=>"md5",checksumConstructor:()=>f.md5});return{_checksumAlgorithms:h,addChecksumAlgorithm(w){this._checksumAlgorithms.push(w)},checksumAlgorithms(){return this._checksumAlgorithms}}},"getChecksumConfiguration"),ij=$4((f)=>{let h={};return f.checksumAlgorithms().forEach((w)=>{h[w.algorithmId()]=w.checksumConstructor()}),h},"resolveChecksumRuntimeConfig"),cj=$4((f)=>{return{...dj(f)}},"getDefaultClientConfiguration"),gj=$4((f)=>{return{...ij(f)}},"resolveDefaultRuntimeConfig"),pL=((f)=>{return f[f.HEADER=0]="HEADER",f[f.TRAILER=1]="TRAILER",f})(pL||{}),xj="__smithy_context",uL=((f)=>{return f.PROFILE="profile",f.SSO_SESSION="sso-session",f.SERVICES="services",f})(uL||{}),tL=((f)=>{return f.HTTP_0_9="http/0.9",f.HTTP_1_0="http/1.0",f.TDS_8_0="tds/8.0",f})(tL||{})});var _j;var hB=B(()=>{_j=p(T1(),1)});var wB=()=>{};class n0{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){let h=new n0({...f,headers:{...f.headers}});if(h.query)h.query=nj(h.query);return h}static isInstance(f){if(!f)return!1;let h=f;return"method"in h&&"protocol"in h&&"hostname"in h&&"path"in h&&typeof h.query==="object"&&typeof h.headers==="object"}clone(){return n0.clone(this)}}function nj(f){return Object.keys(f).reduce((h,w)=>{let s=f[w];return{...h,[w]:Array.isArray(s)?[...s]:s}},{})}class ch{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;let h=f;return typeof h.statusCode==="number"&&typeof h.headers==="object"}}var sB=()=>{};var F1=B(()=>{xL();hB();wB();sB()});function Vw(f){return f}var ej=(f)=>(h)=>async(w)=>{if(!n0.isInstance(w.request))return h(w);let{request:s}=w,{handlerProtocol:$=""}=f.requestHandler.metadata||{};if($.indexOf("h2")>=0&&!s.headers[":authority"])delete s.headers.host,s.headers[":authority"]=s.hostname+(s.port?":"+s.port:"");else if(!s.headers.host){let r=s.hostname;if(s.port!=null)r+=`:${s.port}`;s.headers.host=r}return h(w)},aj,Pw=(f)=>({applyToStack:(h)=>{h.add(ej(f),aj)}});var r4=B(()=>{F1();aj={name:"hostHeaderMiddleware",step:"build",priority:"low",tags:["HOST"],override:!0}});var oj=()=>(f,h)=>async(w)=>{try{let s=await f(w),{clientName:$,commandName:r,logger:E,dynamoDbDocumentClientOptions:U={}}=h,{overrideInputFilterSensitiveLog:T,overrideOutputFilterSensitiveLog:F}=U,C=T??h.inputFilterSensitiveLog,I=F??h.outputFilterSensitiveLog,{$metadata:L,...G}=s.output;return E?.info?.({clientName:$,commandName:r,input:C(w.input),output:I(G),metadata:L}),s}catch(s){let{clientName:$,commandName:r,logger:E,dynamoDbDocumentClientOptions:U={}}=h,{overrideInputFilterSensitiveLog:T}=U,F=T??h.inputFilterSensitiveLog;throw E?.error?.({clientName:$,commandName:r,input:F(w.input),error:s,metadata:s.$metadata}),s}},pj,Hw=(f)=>({applyToStack:(h)=>{h.add(oj(),pj)}});var $B=B(()=>{pj={name:"loggerMiddleware",tags:["LOGGER"],step:"initialize",override:!0}});var E4=B(()=>{$B()});var vT="X-Amzn-Trace-Id",uj="AWS_LAMBDA_FUNCTION_NAME",tj="_X_AMZN_TRACE_ID",fO=(f)=>(h)=>async(w)=>{let{request:s}=w;if(!n0.isInstance(s)||f.runtime!=="node")return h(w);let $=Object.keys(s.headers??{}).find((T)=>T.toLowerCase()===vT.toLowerCase())??vT;if(s.headers.hasOwnProperty($))return h(w);let r=process.env[uj],E=process.env[tj],U=(T)=>typeof T==="string"&&T.length>0;if(U(r)&&U(E))s.headers[vT]=E;return h({...w,request:s})},hO,Nw=(f)=>({applyToStack:(h)=>{h.add(fO(f),hO)}});var U4=B(()=>{F1();hO={step:"build",tags:["RECURSION_DETECTION"],name:"recursionDetectionMiddleware",override:!0,priority:"low"}});var Fh=H((lE0,TB)=>{var{defineProperty:T4,getOwnPropertyDescriptor:wO,getOwnPropertyNames:sO}=Object,$O=Object.prototype.hasOwnProperty,EB=(f,h)=>T4(f,"name",{value:h,configurable:!0}),rO=(f,h)=>{for(var w in h)T4(f,w,{get:h[w],enumerable:!0})},EO=(f,h,w,s)=>{if(h&&typeof h==="object"||typeof h==="function"){for(let $ of sO(h))if(!$O.call(f,$)&&$!==w)T4(f,$,{get:()=>h[$],enumerable:!(s=wO(h,$))||s.enumerable})}return f},UO=(f)=>EO(T4({},"__esModule",{value:!0}),f),UB={};rO(UB,{getSmithyContext:()=>TO,normalizeProvider:()=>FO});TB.exports=UO(UB);var rB=T1(),TO=EB((f)=>f[rB.SMITHY_CONTEXT_KEY]||(f[rB.SMITHY_CONTEXT_KEY]={}),"getSmithyContext"),FO=EB((f)=>{if(typeof f==="function")return f;let h=Promise.resolve(f);return()=>h},"normalizeProvider")});var Dw=H((vE0,GB)=>{var{defineProperty:F4,getOwnPropertyDescriptor:CO,getOwnPropertyNames:IO}=Object,LO=Object.prototype.hasOwnProperty,bT=(f,h)=>F4(f,"name",{value:h,configurable:!0}),BO=(f,h)=>{for(var w in h)F4(f,w,{get:h[w],enumerable:!0})},AO=(f,h,w,s)=>{if(h&&typeof h==="object"||typeof h==="function"){for(let $ of IO(h))if(!LO.call(f,$)&&$!==w)F4(f,$,{get:()=>h[$],enumerable:!(s=CO(h,$))||s.enumerable})}return f},GO=(f)=>AO(F4({},"__esModule",{value:!0}),f),FB={};BO(FB,{deserializerMiddleware:()=>CB,deserializerMiddlewareOption:()=>LB,getSerdePlugin:()=>AB,serializerMiddleware:()=>IB,serializerMiddlewareOption:()=>BB});GB.exports=GO(FB);var CB=bT((f,h)=>(w,s)=>async($)=>{let{response:r}=await w($);try{let E=await h(r,f);return{response:r,output:E}}catch(E){if(Object.defineProperty(E,"$response",{value:r}),!("$metadata"in E)){try{E.message+=`
3
- Deserialization error: to see the raw response, inspect the hidden field {error}.$response on this object.`}catch(T){if(!s.logger||s.logger?.constructor?.name==="NoOpLogger")console.warn("Deserialization error: to see the raw response, inspect the hidden field {error}.$response on this object.");else s.logger?.warn?.("Deserialization error: to see the raw response, inspect the hidden field {error}.$response on this object.")}if(typeof E.$responseBodyText!=="undefined"){if(E.$response)E.$response.body=E.$responseBodyText}}throw E}},"deserializerMiddleware"),IB=bT((f,h)=>(w,s)=>async($)=>{let r=s.endpointV2?.url&&f.urlParser?async()=>f.urlParser(s.endpointV2.url):f.endpoint;if(!r)throw new Error("No valid endpoint provider available.");let E=await h($.input,{...f,endpoint:r});return w({...$,request:E})},"serializerMiddleware"),LB={name:"deserializerMiddleware",step:"deserialize",tags:["DESERIALIZER"],override:!0},BB={name:"serializerMiddleware",step:"serialize",tags:["SERIALIZER"],override:!0};function AB(f,h,w){return{applyToStack:(s)=>{s.add(CB(f,w),LB),s.add(IB(f,h),BB)}}}bT(AB,"getSerdePlugin")});var t0=H((bE0,SB)=>{var{defineProperty:C4,getOwnPropertyDescriptor:WO,getOwnPropertyNames:zO}=Object,RO=Object.prototype.hasOwnProperty,Ch=(f,h)=>C4(f,"name",{value:h,configurable:!0}),XO=(f,h)=>{for(var w in h)C4(f,w,{get:h[w],enumerable:!0})},SO=(f,h,w,s)=>{if(h&&typeof h==="object"||typeof h==="function"){for(let $ of zO(h))if(!RO.call(f,$)&&$!==w)C4(f,$,{get:()=>h[$],enumerable:!(s=WO(h,$))||s.enumerable})}return f},YO=(f)=>SO(C4({},"__esModule",{value:!0}),f),WB={};XO(WB,{Field:()=>KO,Fields:()=>ZO,HttpRequest:()=>JO,HttpResponse:()=>VO,IHttpRequest:()=>zB.HttpRequest,getHttpHandlerExtensionConfiguration:()=>MO,isValidHostname:()=>XB,resolveHttpHandlerRuntimeConfig:()=>QO});SB.exports=YO(WB);var MO=Ch((f)=>{let h=f.httpHandler;return{setHttpHandler(w){h=w},httpHandler(){return h},updateHttpClientConfig(w,s){h.updateHttpClientConfig(w,s)},httpHandlerConfigs(){return h.httpHandlerConfigs()}}},"getHttpHandlerExtensionConfiguration"),QO=Ch((f)=>{return{httpHandler:f.httpHandler()}},"resolveHttpHandlerRuntimeConfig"),zB=T1(),KO=class{static{Ch(this,"Field")}constructor({name:f,kind:h=zB.FieldPosition.HEADER,values:w=[]}){this.name=f,this.kind=h,this.values=w}add(f){this.values.push(f)}set(f){this.values=f}remove(f){this.values=this.values.filter((h)=>h!==f)}toString(){return this.values.map((f)=>f.includes(",")||f.includes(" ")?`"${f}"`:f).join(", ")}get(){return this.values}},ZO=class{constructor({fields:f=[],encoding:h="utf-8"}){this.entries={},f.forEach(this.setField.bind(this)),this.encoding=h}static{Ch(this,"Fields")}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((h)=>h.kind===f)}},JO=class f{static{Ch(this,"HttpRequest")}constructor(h){this.method=h.method||"GET",this.hostname=h.hostname||"localhost",this.port=h.port,this.query=h.query||{},this.headers=h.headers||{},this.body=h.body,this.protocol=h.protocol?h.protocol.slice(-1)!==":"?`${h.protocol}:`:h.protocol:"https:",this.path=h.path?h.path.charAt(0)!=="/"?`/${h.path}`:h.path:"/",this.username=h.username,this.password=h.password,this.fragment=h.fragment}static clone(h){let w=new f({...h,headers:{...h.headers}});if(w.query)w.query=RB(w.query);return w}static isInstance(h){if(!h)return!1;let w=h;return"method"in w&&"protocol"in w&&"hostname"in w&&"path"in w&&typeof w.query==="object"&&typeof w.headers==="object"}clone(){return f.clone(this)}};function RB(f){return Object.keys(f).reduce((h,w)=>{let s=f[w];return{...h,[w]:Array.isArray(s)?[...s]:s}},{})}Ch(RB,"cloneQuery");var VO=class{static{Ch(this,"HttpResponse")}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;let h=f;return typeof h.statusCode==="number"&&typeof h.headers==="object"}};function XB(f){return/^[a-z0-9][a-z0-9\.\-]*[a-z0-9]$/.test(f)}Ch(XB,"isValidHostname")});var mT=H((cE0,MB)=>{var{defineProperty:I4,getOwnPropertyDescriptor:PO,getOwnPropertyNames:HO}=Object,NO=Object.prototype.hasOwnProperty,DO=(f,h)=>I4(f,"name",{value:h,configurable:!0}),qO=(f,h)=>{for(var w in h)I4(f,w,{get:h[w],enumerable:!0})},kO=(f,h,w,s)=>{if(h&&typeof h==="object"||typeof h==="function"){for(let $ of HO(h))if(!NO.call(f,$)&&$!==w)I4(f,$,{get:()=>h[$],enumerable:!(s=PO(h,$))||s.enumerable})}return f},yO=(f)=>kO(I4({},"__esModule",{value:!0}),f),YB={};qO(YB,{isArrayBuffer:()=>jO});MB.exports=yO(YB);var jO=DO((f)=>typeof ArrayBuffer==="function"&&f instanceof ArrayBuffer||Object.prototype.toString.call(f)==="[object ArrayBuffer]","isArrayBuffer")});var qw=H((gE0,ZB)=>{var{defineProperty:L4,getOwnPropertyDescriptor:OO,getOwnPropertyNames:lO}=Object,vO=Object.prototype.hasOwnProperty,QB=(f,h)=>L4(f,"name",{value:h,configurable:!0}),bO=(f,h)=>{for(var w in h)L4(f,w,{get:h[w],enumerable:!0})},mO=(f,h,w,s)=>{if(h&&typeof h==="object"||typeof h==="function"){for(let $ of lO(h))if(!vO.call(f,$)&&$!==w)L4(f,$,{get:()=>h[$],enumerable:!(s=OO(h,$))||s.enumerable})}return f},dO=(f)=>mO(L4({},"__esModule",{value:!0}),f),KB={};bO(KB,{fromArrayBuffer:()=>cO,fromString:()=>gO});ZB.exports=dO(KB);var iO=mT(),dT=B0("buffer"),cO=QB((f,h=0,w=f.byteLength-h)=>{if(!iO.isArrayBuffer(f))throw new TypeError(`The "input" argument must be ArrayBuffer. Received type ${typeof f} (${f})`);return dT.Buffer.from(f,h,w)},"fromArrayBuffer"),gO=QB((f,h)=>{if(typeof f!=="string")throw new TypeError(`The "input" argument must be of type string. Received type ${typeof f} (${f})`);return h?dT.Buffer.from(f,h):dT.Buffer.from(f)},"fromString")});var PB=H((JB)=>{Object.defineProperty(JB,"__esModule",{value:!0});JB.fromBase64=void 0;var xO=qw(),_O=/^[A-Za-z0-9+/]*={0,2}$/,nO=(f)=>{if(f.length*3%4!==0)throw new TypeError("Incorrect padding on base64 string.");if(!_O.exec(f))throw new TypeError("Invalid base64 string.");let h=xO.fromString(f,"base64");return new Uint8Array(h.buffer,h.byteOffset,h.byteLength)};JB.fromBase64=nO});var u1=H((_E0,qB)=>{var{defineProperty:B4,getOwnPropertyDescriptor:eO,getOwnPropertyNames:aO}=Object,oO=Object.prototype.hasOwnProperty,iT=(f,h)=>B4(f,"name",{value:h,configurable:!0}),pO=(f,h)=>{for(var w in h)B4(f,w,{get:h[w],enumerable:!0})},uO=(f,h,w,s)=>{if(h&&typeof h==="object"||typeof h==="function"){for(let $ of aO(h))if(!oO.call(f,$)&&$!==w)B4(f,$,{get:()=>h[$],enumerable:!(s=eO(h,$))||s.enumerable})}return f},tO=(f)=>uO(B4({},"__esModule",{value:!0}),f),HB={};pO(HB,{fromUtf8:()=>DB,toUint8Array:()=>fl,toUtf8:()=>hl});qB.exports=tO(HB);var NB=qw(),DB=iT((f)=>{let h=NB.fromString(f,"utf8");return new Uint8Array(h.buffer,h.byteOffset,h.byteLength/Uint8Array.BYTES_PER_ELEMENT)},"fromUtf8"),fl=iT((f)=>{if(typeof f==="string")return DB(f);if(ArrayBuffer.isView(f))return new Uint8Array(f.buffer,f.byteOffset,f.byteLength/Uint8Array.BYTES_PER_ELEMENT);return new Uint8Array(f)},"toUint8Array"),hl=iT((f)=>{if(typeof f==="string")return f;if(typeof f!=="object"||typeof f.byteOffset!=="number"||typeof f.byteLength!=="number")throw new Error("@smithy/util-utf8: toUtf8 encoder function only accepts string | Uint8Array.");return NB.fromArrayBuffer(f.buffer,f.byteOffset,f.byteLength).toString("utf8")},"toUtf8")});var jB=H((kB)=>{Object.defineProperty(kB,"__esModule",{value:!0});kB.toBase64=void 0;var wl=qw(),sl=u1(),$l=(f)=>{let h;if(typeof f==="string")h=sl.fromUtf8(f);else h=f;if(typeof h!=="object"||typeof h.byteOffset!=="number"||typeof h.byteLength!=="number")throw new Error("@smithy/util-base64: toBase64 encoder function only accepts string | Uint8Array.");return wl.fromArrayBuffer(h.buffer,h.byteOffset,h.byteLength).toString("base64")};kB.toBase64=$l});var Ih=H((eE0,A4)=>{var{defineProperty:OB,getOwnPropertyDescriptor:rl,getOwnPropertyNames:El}=Object,Ul=Object.prototype.hasOwnProperty,cT=(f,h,w,s)=>{if(h&&typeof h==="object"||typeof h==="function"){for(let $ of El(h))if(!Ul.call(f,$)&&$!==w)OB(f,$,{get:()=>h[$],enumerable:!(s=rl(h,$))||s.enumerable})}return f},lB=(f,h,w)=>(cT(f,h,"default"),w&&cT(w,h,"default")),Tl=(f)=>cT(OB({},"__esModule",{value:!0}),f),gT={};A4.exports=Tl(gT);lB(gT,PB(),A4.exports);lB(gT,jB(),A4.exports)});var xT=H((bB)=>{Object.defineProperty(bB,"__esModule",{value:!0});bB.ChecksumStream=void 0;var Fl=Ih(),Cl=B0("stream");class vB extends Cl.Duplex{constructor({expectedChecksum:f,checksum:h,source:w,checksumSourceLocation:s,base64Encoder:$}){var r,E;super();if(typeof w.pipe==="function")this.source=w;else throw new Error(`@smithy/util-stream: unsupported source type ${(E=(r=w===null||w===void 0?void 0:w.constructor)===null||r===void 0?void 0:r.name)!==null&&E!==void 0?E:w} in ChecksumStream.`);this.base64Encoder=$!==null&&$!==void 0?$:Fl.toBase64,this.expectedChecksum=f,this.checksum=h,this.checksumSourceLocation=s,this.source.pipe(this)}_read(f){}_write(f,h,w){try{this.checksum.update(f),this.push(f)}catch(s){return w(s)}return w()}async _final(f){try{let h=await this.checksum.digest(),w=this.base64Encoder(h);if(this.expectedChecksum!==w)return f(new Error(`Checksum mismatch: expected "${this.expectedChecksum}" but received "${w}" in response header "${this.checksumSourceLocation}".`))}catch(h){return f(h)}return this.push(null),f()}}bB.ChecksumStream=vB});var Lh=H((dB)=>{Object.defineProperty(dB,"__esModule",{value:!0});dB.isBlob=dB.isReadableStream=void 0;var Il=(f)=>{var h;return typeof ReadableStream==="function"&&(((h=f===null||f===void 0?void 0:f.constructor)===null||h===void 0?void 0:h.name)===ReadableStream.name||f instanceof ReadableStream)};dB.isReadableStream=Il;var Ll=(f)=>{var h;return typeof Blob==="function"&&(((h=f===null||f===void 0?void 0:f.constructor)===null||h===void 0?void 0:h.name)===Blob.name||f instanceof Blob)};dB.isBlob=Ll});var _B=H((gB)=>{Object.defineProperty(gB,"__esModule",{value:!0});gB.ChecksumStream=void 0;var Al=typeof ReadableStream==="function"?ReadableStream:function(){};class cB extends Al{}gB.ChecksumStream=cB});var aB=H((nB)=>{Object.defineProperty(nB,"__esModule",{value:!0});nB.createChecksumStream=void 0;var Gl=Ih(),Wl=Lh(),zl=_B(),Rl=({expectedChecksum:f,checksum:h,source:w,checksumSourceLocation:s,base64Encoder:$})=>{var r,E;if(!Wl.isReadableStream(w))throw new Error(`@smithy/util-stream: unsupported source type ${(E=(r=w===null||w===void 0?void 0:w.constructor)===null||r===void 0?void 0:r.name)!==null&&E!==void 0?E:w} in ChecksumStream.`);let U=$!==null&&$!==void 0?$:Gl.toBase64;if(typeof TransformStream!=="function")throw new Error("@smithy/util-stream: unable to instantiate ChecksumStream because API unavailable: ReadableStream/TransformStream.");let T=new TransformStream({start(){},async transform(C,I){h.update(C),I.enqueue(C)},async flush(C){let I=await h.digest(),L=U(I);if(f!==L){let G=new Error(`Checksum mismatch: expected "${f}" but received "${L}" in response header "${s}".`);C.error(G)}else C.terminate()}});w.pipeThrough(T);let F=T.readable;return Object.setPrototypeOf(F,zl.ChecksumStream.prototype),F};nB.createChecksumStream=Rl});var uB=H((oB)=>{Object.defineProperty(oB,"__esModule",{value:!0});oB.createChecksumStream=void 0;var Xl=Lh(),Sl=xT(),Yl=aB();function Ml(f){if(typeof ReadableStream==="function"&&Xl.isReadableStream(f.source))return Yl.createChecksumStream(f);return new Sl.ChecksumStream(f)}oB.createChecksumStream=Ml});var _T=H((fA)=>{Object.defineProperty(fA,"__esModule",{value:!0});fA.ByteArrayCollector=void 0;class tB{constructor(f){this.allocByteArray=f,this.byteLength=0,this.byteArrays=[]}push(f){this.byteArrays.push(f),this.byteLength+=f.byteLength}flush(){if(this.byteArrays.length===1){let w=this.byteArrays[0];return this.reset(),w}let f=this.allocByteArray(this.byteLength),h=0;for(let w=0;w<this.byteArrays.length;++w){let s=this.byteArrays[w];f.set(s,h),h+=s.byteLength}return this.reset(),f}reset(){this.byteArrays=[],this.byteLength=0}}fA.ByteArrayCollector=tB});var UA=H((rA)=>{Object.defineProperty(rA,"__esModule",{value:!0});rA.modeOf=rA.sizeOf=rA.flush=rA.merge=rA.createBufferedReadable=rA.createBufferedReadableStream=void 0;var Ql=_T();function wA(f,h,w){let s=f.getReader(),$=!1,r=0,E=["",new Ql.ByteArrayCollector((F)=>new Uint8Array(F))],U=-1,T=async(F)=>{let{value:C,done:I}=await s.read(),L=C;if(I){if(U!==-1){let G=G4(E,U);if(kw(G)>0)F.enqueue(G)}F.close()}else{let G=$A(L);if(U!==G){if(U>=0)F.enqueue(G4(E,U));U=G}if(U===-1){F.enqueue(L);return}let X=kw(L);r+=X;let Q=kw(E[U]);if(X>=h&&Q===0)F.enqueue(L);else{let M=sA(E,U,L);if(!$&&r>h*2)$=!0,w===null||w===void 0||w.warn(`@smithy/util-stream - stream chunk size ${X} is below threshold of ${h}, automatically buffering.`);if(M>=h)F.enqueue(G4(E,U));else await T(F)}}};return new ReadableStream({pull:T})}rA.createBufferedReadableStream=wA;rA.createBufferedReadable=wA;function sA(f,h,w){switch(h){case 0:return f[0]+=w,kw(f[0]);case 1:case 2:return f[h].push(w),kw(f[h])}}rA.merge=sA;function G4(f,h){switch(h){case 0:let w=f[0];return f[0]="",w;case 1:case 2:return f[h].flush()}throw new Error(`@smithy/util-stream - invalid index ${h} given to flush()`)}rA.flush=G4;function kw(f){var h,w;return(w=(h=f===null||f===void 0?void 0:f.byteLength)!==null&&h!==void 0?h:f===null||f===void 0?void 0:f.length)!==null&&w!==void 0?w:0}rA.sizeOf=kw;function $A(f){if(typeof Buffer!=="undefined"&&f instanceof Buffer)return 2;if(f instanceof Uint8Array)return 1;if(typeof f==="string")return 0;return-1}rA.modeOf=$A});var IA=H((FA)=>{Object.defineProperty(FA,"__esModule",{value:!0});FA.createBufferedReadable=void 0;var Hl=B0("stream"),TA=_T(),bf=UA(),Nl=Lh();function Dl(f,h,w){if(Nl.isReadableStream(f))return bf.createBufferedReadableStream(f,h,w);let s=new Hl.Readable({read(){}}),$=!1,r=0,E=["",new TA.ByteArrayCollector((T)=>new Uint8Array(T)),new TA.ByteArrayCollector((T)=>Buffer.from(new Uint8Array(T)))],U=-1;return f.on("data",(T)=>{let F=bf.modeOf(T);if(U!==F){if(U>=0)s.push(bf.flush(E,U));U=F}if(U===-1){s.push(T);return}let C=bf.sizeOf(T);r+=C;let I=bf.sizeOf(E[U]);if(C>=h&&I===0)s.push(T);else{let L=bf.merge(E,U,T);if(!$&&r>h*2)$=!0,w===null||w===void 0||w.warn(`@smithy/util-stream - stream chunk size ${C} is below threshold of ${h}, automatically buffering.`);if(L>=h)s.push(bf.flush(E,U))}}),f.on("end",()=>{if(U!==-1){let T=bf.flush(E,U);if(bf.sizeOf(T)>0)s.push(T)}s.push(null)}),s}FA.createBufferedReadable=Dl});var AA=H((LA)=>{Object.defineProperty(LA,"__esModule",{value:!0});LA.getAwsChunkedEncodingStream=void 0;var ql=B0("stream"),kl=(f,h)=>{let{base64Encoder:w,bodyLengthChecker:s,checksumAlgorithmFn:$,checksumLocationName:r,streamHasher:E}=h,U=w!==void 0&&$!==void 0&&r!==void 0&&E!==void 0,T=U?E($,f):void 0,F=new ql.Readable({read:()=>{}});return f.on("data",(C)=>{let I=s(C)||0;F.push(`${I.toString(16)}\r
2
+ var kj=Object.create;var{getPrototypeOf:yj,defineProperty:OT,getOwnPropertyNames:jj}=Object;var Oj=Object.prototype.hasOwnProperty;var p=(f,h,w)=>{w=f!=null?kj(yj(f)):{};let s=h||!f||!f.__esModule?OT(w,"default",{value:f,enumerable:!0}):w;for(let $ of jj(f))if(!Oj.call(s,$))OT(s,$,{get:()=>f[$],enumerable:!0});return s};var H=(f,h)=>()=>(h||f((h={exports:{}}).exports,h),h.exports);var Th=(f,h)=>{for(var w in h)OT(f,w,{get:h[w],enumerable:!0,configurable:!0,set:(s)=>h[w]=()=>s})};var B=(f,h)=>()=>(f&&(h=f(f=0)),h);var B0=import.meta.require;var Zw=(f)=>{let h=f.httpHandler;return{setHttpHandler(w){h=w},httpHandler(){return h},updateHttpClientConfig(w,s){h.updateHttpClientConfig(w,s)},httpHandlerConfigs(){return h.httpHandlerConfigs()}}},Jw=(f)=>{return{httpHandler:f.httpHandler()}};var xL=()=>{};var T1=H((RE0,fB)=>{var{defineProperty:$4,getOwnPropertyDescriptor:lj,getOwnPropertyNames:vj}=Object,bj=Object.prototype.hasOwnProperty,r4=(f,h)=>$4(f,"name",{value:h,configurable:!0}),mj=(f,h)=>{for(var w in h)$4(f,w,{get:h[w],enumerable:!0})},dj=(f,h,w,s)=>{if(h&&typeof h==="object"||typeof h==="function"){for(let $ of vj(h))if(!bj.call(f,$)&&$!==w)$4(f,$,{get:()=>h[$],enumerable:!(s=lj(h,$))||s.enumerable})}return f},ij=(f)=>dj($4({},"__esModule",{value:!0}),f),_L={};mj(_L,{AlgorithmId:()=>oL,EndpointURLScheme:()=>aL,FieldPosition:()=>pL,HttpApiKeyAuthLocation:()=>eL,HttpAuthLocation:()=>nL,IniSectionType:()=>uL,RequestHandlerProtocol:()=>tL,SMITHY_CONTEXT_KEY:()=>nj,getDefaultClientConfiguration:()=>xj,resolveDefaultRuntimeConfig:()=>_j});fB.exports=ij(_L);var nL=((f)=>{return f.HEADER="header",f.QUERY="query",f})(nL||{}),eL=((f)=>{return f.HEADER="header",f.QUERY="query",f})(eL||{}),aL=((f)=>{return f.HTTP="http",f.HTTPS="https",f})(aL||{}),oL=((f)=>{return f.MD5="md5",f.CRC32="crc32",f.CRC32C="crc32c",f.SHA1="sha1",f.SHA256="sha256",f})(oL||{}),cj=r4((f)=>{let h=[];if(f.sha256!==void 0)h.push({algorithmId:()=>"sha256",checksumConstructor:()=>f.sha256});if(f.md5!=null)h.push({algorithmId:()=>"md5",checksumConstructor:()=>f.md5});return{_checksumAlgorithms:h,addChecksumAlgorithm(w){this._checksumAlgorithms.push(w)},checksumAlgorithms(){return this._checksumAlgorithms}}},"getChecksumConfiguration"),gj=r4((f)=>{let h={};return f.checksumAlgorithms().forEach((w)=>{h[w.algorithmId()]=w.checksumConstructor()}),h},"resolveChecksumRuntimeConfig"),xj=r4((f)=>{return{...cj(f)}},"getDefaultClientConfiguration"),_j=r4((f)=>{return{...gj(f)}},"resolveDefaultRuntimeConfig"),pL=((f)=>{return f[f.HEADER=0]="HEADER",f[f.TRAILER=1]="TRAILER",f})(pL||{}),nj="__smithy_context",uL=((f)=>{return f.PROFILE="profile",f.SSO_SESSION="sso-session",f.SERVICES="services",f})(uL||{}),tL=((f)=>{return f.HTTP_0_9="http/0.9",f.HTTP_1_0="http/1.0",f.TDS_8_0="tds/8.0",f})(tL||{})});var ej;var hB=B(()=>{ej=p(T1(),1)});var wB=()=>{};class n0{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){let h=new n0({...f,headers:{...f.headers}});if(h.query)h.query=aj(h.query);return h}static isInstance(f){if(!f)return!1;let h=f;return"method"in h&&"protocol"in h&&"hostname"in h&&"path"in h&&typeof h.query==="object"&&typeof h.headers==="object"}clone(){return n0.clone(this)}}function aj(f){return Object.keys(f).reduce((h,w)=>{let s=f[w];return{...h,[w]:Array.isArray(s)?[...s]:s}},{})}class ch{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;let h=f;return typeof h.statusCode==="number"&&typeof h.headers==="object"}}var sB=()=>{};var F1=B(()=>{xL();hB();wB();sB()});function Vw(f){return f}var oj=(f)=>(h)=>async(w)=>{if(!n0.isInstance(w.request))return h(w);let{request:s}=w,{handlerProtocol:$=""}=f.requestHandler.metadata||{};if($.indexOf("h2")>=0&&!s.headers[":authority"])delete s.headers.host,s.headers[":authority"]=s.hostname+(s.port?":"+s.port:"");else if(!s.headers.host){let r=s.hostname;if(s.port!=null)r+=`:${s.port}`;s.headers.host=r}return h(w)},pj,Pw=(f)=>({applyToStack:(h)=>{h.add(oj(f),pj)}});var E4=B(()=>{F1();pj={name:"hostHeaderMiddleware",step:"build",priority:"low",tags:["HOST"],override:!0}});var uj=()=>(f,h)=>async(w)=>{try{let s=await f(w),{clientName:$,commandName:r,logger:E,dynamoDbDocumentClientOptions:U={}}=h,{overrideInputFilterSensitiveLog:T,overrideOutputFilterSensitiveLog:F}=U,C=T??h.inputFilterSensitiveLog,I=F??h.outputFilterSensitiveLog,{$metadata:L,...G}=s.output;return E?.info?.({clientName:$,commandName:r,input:C(w.input),output:I(G),metadata:L}),s}catch(s){let{clientName:$,commandName:r,logger:E,dynamoDbDocumentClientOptions:U={}}=h,{overrideInputFilterSensitiveLog:T}=U,F=T??h.inputFilterSensitiveLog;throw E?.error?.({clientName:$,commandName:r,input:F(w.input),error:s,metadata:s.$metadata}),s}},tj,Hw=(f)=>({applyToStack:(h)=>{h.add(uj(),tj)}});var $B=B(()=>{tj={name:"loggerMiddleware",tags:["LOGGER"],step:"initialize",override:!0}});var U4=B(()=>{$B()});var lT="X-Amzn-Trace-Id",fO="AWS_LAMBDA_FUNCTION_NAME",hO="_X_AMZN_TRACE_ID",wO=(f)=>(h)=>async(w)=>{let{request:s}=w;if(!n0.isInstance(s)||f.runtime!=="node")return h(w);let $=Object.keys(s.headers??{}).find((T)=>T.toLowerCase()===lT.toLowerCase())??lT;if(s.headers.hasOwnProperty($))return h(w);let r=process.env[fO],E=process.env[hO],U=(T)=>typeof T==="string"&&T.length>0;if(U(r)&&U(E))s.headers[lT]=E;return h({...w,request:s})},sO,Nw=(f)=>({applyToStack:(h)=>{h.add(wO(f),sO)}});var T4=B(()=>{F1();sO={step:"build",tags:["RECURSION_DETECTION"],name:"recursionDetectionMiddleware",override:!0,priority:"low"}});var Fh=H((mE0,TB)=>{var{defineProperty:F4,getOwnPropertyDescriptor:$O,getOwnPropertyNames:rO}=Object,EO=Object.prototype.hasOwnProperty,EB=(f,h)=>F4(f,"name",{value:h,configurable:!0}),UO=(f,h)=>{for(var w in h)F4(f,w,{get:h[w],enumerable:!0})},TO=(f,h,w,s)=>{if(h&&typeof h==="object"||typeof h==="function"){for(let $ of rO(h))if(!EO.call(f,$)&&$!==w)F4(f,$,{get:()=>h[$],enumerable:!(s=$O(h,$))||s.enumerable})}return f},FO=(f)=>TO(F4({},"__esModule",{value:!0}),f),UB={};UO(UB,{getSmithyContext:()=>CO,normalizeProvider:()=>IO});TB.exports=FO(UB);var rB=T1(),CO=EB((f)=>f[rB.SMITHY_CONTEXT_KEY]||(f[rB.SMITHY_CONTEXT_KEY]={}),"getSmithyContext"),IO=EB((f)=>{if(typeof f==="function")return f;let h=Promise.resolve(f);return()=>h},"normalizeProvider")});var Dw=H((dE0,GB)=>{var{defineProperty:C4,getOwnPropertyDescriptor:LO,getOwnPropertyNames:BO}=Object,AO=Object.prototype.hasOwnProperty,vT=(f,h)=>C4(f,"name",{value:h,configurable:!0}),GO=(f,h)=>{for(var w in h)C4(f,w,{get:h[w],enumerable:!0})},WO=(f,h,w,s)=>{if(h&&typeof h==="object"||typeof h==="function"){for(let $ of BO(h))if(!AO.call(f,$)&&$!==w)C4(f,$,{get:()=>h[$],enumerable:!(s=LO(h,$))||s.enumerable})}return f},zO=(f)=>WO(C4({},"__esModule",{value:!0}),f),FB={};GO(FB,{deserializerMiddleware:()=>CB,deserializerMiddlewareOption:()=>LB,getSerdePlugin:()=>AB,serializerMiddleware:()=>IB,serializerMiddlewareOption:()=>BB});GB.exports=zO(FB);var CB=vT((f,h)=>(w,s)=>async($)=>{let{response:r}=await w($);try{let E=await h(r,f);return{response:r,output:E}}catch(E){if(Object.defineProperty(E,"$response",{value:r}),!("$metadata"in E)){try{E.message+=`
3
+ Deserialization error: to see the raw response, inspect the hidden field {error}.$response on this object.`}catch(T){if(!s.logger||s.logger?.constructor?.name==="NoOpLogger")console.warn("Deserialization error: to see the raw response, inspect the hidden field {error}.$response on this object.");else s.logger?.warn?.("Deserialization error: to see the raw response, inspect the hidden field {error}.$response on this object.")}if(typeof E.$responseBodyText!=="undefined"){if(E.$response)E.$response.body=E.$responseBodyText}}throw E}},"deserializerMiddleware"),IB=vT((f,h)=>(w,s)=>async($)=>{let r=s.endpointV2?.url&&f.urlParser?async()=>f.urlParser(s.endpointV2.url):f.endpoint;if(!r)throw new Error("No valid endpoint provider available.");let E=await h($.input,{...f,endpoint:r});return w({...$,request:E})},"serializerMiddleware"),LB={name:"deserializerMiddleware",step:"deserialize",tags:["DESERIALIZER"],override:!0},BB={name:"serializerMiddleware",step:"serialize",tags:["SERIALIZER"],override:!0};function AB(f,h,w){return{applyToStack:(s)=>{s.add(CB(f,w),LB),s.add(IB(f,h),BB)}}}vT(AB,"getSerdePlugin")});var t0=H((iE0,SB)=>{var{defineProperty:I4,getOwnPropertyDescriptor:RO,getOwnPropertyNames:XO}=Object,SO=Object.prototype.hasOwnProperty,Ch=(f,h)=>I4(f,"name",{value:h,configurable:!0}),YO=(f,h)=>{for(var w in h)I4(f,w,{get:h[w],enumerable:!0})},MO=(f,h,w,s)=>{if(h&&typeof h==="object"||typeof h==="function"){for(let $ of XO(h))if(!SO.call(f,$)&&$!==w)I4(f,$,{get:()=>h[$],enumerable:!(s=RO(h,$))||s.enumerable})}return f},QO=(f)=>MO(I4({},"__esModule",{value:!0}),f),WB={};YO(WB,{Field:()=>JO,Fields:()=>VO,HttpRequest:()=>PO,HttpResponse:()=>HO,IHttpRequest:()=>zB.HttpRequest,getHttpHandlerExtensionConfiguration:()=>KO,isValidHostname:()=>XB,resolveHttpHandlerRuntimeConfig:()=>ZO});SB.exports=QO(WB);var KO=Ch((f)=>{let h=f.httpHandler;return{setHttpHandler(w){h=w},httpHandler(){return h},updateHttpClientConfig(w,s){h.updateHttpClientConfig(w,s)},httpHandlerConfigs(){return h.httpHandlerConfigs()}}},"getHttpHandlerExtensionConfiguration"),ZO=Ch((f)=>{return{httpHandler:f.httpHandler()}},"resolveHttpHandlerRuntimeConfig"),zB=T1(),JO=class{static{Ch(this,"Field")}constructor({name:f,kind:h=zB.FieldPosition.HEADER,values:w=[]}){this.name=f,this.kind=h,this.values=w}add(f){this.values.push(f)}set(f){this.values=f}remove(f){this.values=this.values.filter((h)=>h!==f)}toString(){return this.values.map((f)=>f.includes(",")||f.includes(" ")?`"${f}"`:f).join(", ")}get(){return this.values}},VO=class{constructor({fields:f=[],encoding:h="utf-8"}){this.entries={},f.forEach(this.setField.bind(this)),this.encoding=h}static{Ch(this,"Fields")}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((h)=>h.kind===f)}},PO=class f{static{Ch(this,"HttpRequest")}constructor(h){this.method=h.method||"GET",this.hostname=h.hostname||"localhost",this.port=h.port,this.query=h.query||{},this.headers=h.headers||{},this.body=h.body,this.protocol=h.protocol?h.protocol.slice(-1)!==":"?`${h.protocol}:`:h.protocol:"https:",this.path=h.path?h.path.charAt(0)!=="/"?`/${h.path}`:h.path:"/",this.username=h.username,this.password=h.password,this.fragment=h.fragment}static clone(h){let w=new f({...h,headers:{...h.headers}});if(w.query)w.query=RB(w.query);return w}static isInstance(h){if(!h)return!1;let w=h;return"method"in w&&"protocol"in w&&"hostname"in w&&"path"in w&&typeof w.query==="object"&&typeof w.headers==="object"}clone(){return f.clone(this)}};function RB(f){return Object.keys(f).reduce((h,w)=>{let s=f[w];return{...h,[w]:Array.isArray(s)?[...s]:s}},{})}Ch(RB,"cloneQuery");var HO=class{static{Ch(this,"HttpResponse")}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;let h=f;return typeof h.statusCode==="number"&&typeof h.headers==="object"}};function XB(f){return/^[a-z0-9][a-z0-9\.\-]*[a-z0-9]$/.test(f)}Ch(XB,"isValidHostname")});var bT=H((_E0,MB)=>{var{defineProperty:L4,getOwnPropertyDescriptor:NO,getOwnPropertyNames:DO}=Object,qO=Object.prototype.hasOwnProperty,kO=(f,h)=>L4(f,"name",{value:h,configurable:!0}),yO=(f,h)=>{for(var w in h)L4(f,w,{get:h[w],enumerable:!0})},jO=(f,h,w,s)=>{if(h&&typeof h==="object"||typeof h==="function"){for(let $ of DO(h))if(!qO.call(f,$)&&$!==w)L4(f,$,{get:()=>h[$],enumerable:!(s=NO(h,$))||s.enumerable})}return f},OO=(f)=>jO(L4({},"__esModule",{value:!0}),f),YB={};yO(YB,{isArrayBuffer:()=>lO});MB.exports=OO(YB);var lO=kO((f)=>typeof ArrayBuffer==="function"&&f instanceof ArrayBuffer||Object.prototype.toString.call(f)==="[object ArrayBuffer]","isArrayBuffer")});var qw=H((nE0,ZB)=>{var{defineProperty:B4,getOwnPropertyDescriptor:vO,getOwnPropertyNames:bO}=Object,mO=Object.prototype.hasOwnProperty,QB=(f,h)=>B4(f,"name",{value:h,configurable:!0}),dO=(f,h)=>{for(var w in h)B4(f,w,{get:h[w],enumerable:!0})},iO=(f,h,w,s)=>{if(h&&typeof h==="object"||typeof h==="function"){for(let $ of bO(h))if(!mO.call(f,$)&&$!==w)B4(f,$,{get:()=>h[$],enumerable:!(s=vO(h,$))||s.enumerable})}return f},cO=(f)=>iO(B4({},"__esModule",{value:!0}),f),KB={};dO(KB,{fromArrayBuffer:()=>xO,fromString:()=>_O});ZB.exports=cO(KB);var gO=bT(),mT=B0("buffer"),xO=QB((f,h=0,w=f.byteLength-h)=>{if(!gO.isArrayBuffer(f))throw new TypeError(`The "input" argument must be ArrayBuffer. Received type ${typeof f} (${f})`);return mT.Buffer.from(f,h,w)},"fromArrayBuffer"),_O=QB((f,h)=>{if(typeof f!=="string")throw new TypeError(`The "input" argument must be of type string. Received type ${typeof f} (${f})`);return h?mT.Buffer.from(f,h):mT.Buffer.from(f)},"fromString")});var PB=H((JB)=>{Object.defineProperty(JB,"__esModule",{value:!0});JB.fromBase64=void 0;var nO=qw(),eO=/^[A-Za-z0-9+/]*={0,2}$/,aO=(f)=>{if(f.length*3%4!==0)throw new TypeError("Incorrect padding on base64 string.");if(!eO.exec(f))throw new TypeError("Invalid base64 string.");let h=nO.fromString(f,"base64");return new Uint8Array(h.buffer,h.byteOffset,h.byteLength)};JB.fromBase64=aO});var u1=H((aE0,qB)=>{var{defineProperty:A4,getOwnPropertyDescriptor:oO,getOwnPropertyNames:pO}=Object,uO=Object.prototype.hasOwnProperty,dT=(f,h)=>A4(f,"name",{value:h,configurable:!0}),tO=(f,h)=>{for(var w in h)A4(f,w,{get:h[w],enumerable:!0})},fl=(f,h,w,s)=>{if(h&&typeof h==="object"||typeof h==="function"){for(let $ of pO(h))if(!uO.call(f,$)&&$!==w)A4(f,$,{get:()=>h[$],enumerable:!(s=oO(h,$))||s.enumerable})}return f},hl=(f)=>fl(A4({},"__esModule",{value:!0}),f),HB={};tO(HB,{fromUtf8:()=>DB,toUint8Array:()=>wl,toUtf8:()=>sl});qB.exports=hl(HB);var NB=qw(),DB=dT((f)=>{let h=NB.fromString(f,"utf8");return new Uint8Array(h.buffer,h.byteOffset,h.byteLength/Uint8Array.BYTES_PER_ELEMENT)},"fromUtf8"),wl=dT((f)=>{if(typeof f==="string")return DB(f);if(ArrayBuffer.isView(f))return new Uint8Array(f.buffer,f.byteOffset,f.byteLength/Uint8Array.BYTES_PER_ELEMENT);return new Uint8Array(f)},"toUint8Array"),sl=dT((f)=>{if(typeof f==="string")return f;if(typeof f!=="object"||typeof f.byteOffset!=="number"||typeof f.byteLength!=="number")throw new Error("@smithy/util-utf8: toUtf8 encoder function only accepts string | Uint8Array.");return NB.fromArrayBuffer(f.buffer,f.byteOffset,f.byteLength).toString("utf8")},"toUtf8")});var jB=H((kB)=>{Object.defineProperty(kB,"__esModule",{value:!0});kB.toBase64=void 0;var $l=qw(),rl=u1(),El=(f)=>{let h;if(typeof f==="string")h=rl.fromUtf8(f);else h=f;if(typeof h!=="object"||typeof h.byteOffset!=="number"||typeof h.byteLength!=="number")throw new Error("@smithy/util-base64: toBase64 encoder function only accepts string | Uint8Array.");return $l.fromArrayBuffer(h.buffer,h.byteOffset,h.byteLength).toString("base64")};kB.toBase64=El});var Ih=H((pE0,G4)=>{var{defineProperty:OB,getOwnPropertyDescriptor:Ul,getOwnPropertyNames:Tl}=Object,Fl=Object.prototype.hasOwnProperty,iT=(f,h,w,s)=>{if(h&&typeof h==="object"||typeof h==="function"){for(let $ of Tl(h))if(!Fl.call(f,$)&&$!==w)OB(f,$,{get:()=>h[$],enumerable:!(s=Ul(h,$))||s.enumerable})}return f},lB=(f,h,w)=>(iT(f,h,"default"),w&&iT(w,h,"default")),Cl=(f)=>iT(OB({},"__esModule",{value:!0}),f),cT={};G4.exports=Cl(cT);lB(cT,PB(),G4.exports);lB(cT,jB(),G4.exports)});var gT=H((bB)=>{Object.defineProperty(bB,"__esModule",{value:!0});bB.ChecksumStream=void 0;var Il=Ih(),Ll=B0("stream");class vB extends Ll.Duplex{constructor({expectedChecksum:f,checksum:h,source:w,checksumSourceLocation:s,base64Encoder:$}){var r,E;super();if(typeof w.pipe==="function")this.source=w;else throw new Error(`@smithy/util-stream: unsupported source type ${(E=(r=w===null||w===void 0?void 0:w.constructor)===null||r===void 0?void 0:r.name)!==null&&E!==void 0?E:w} in ChecksumStream.`);this.base64Encoder=$!==null&&$!==void 0?$:Il.toBase64,this.expectedChecksum=f,this.checksum=h,this.checksumSourceLocation=s,this.source.pipe(this)}_read(f){}_write(f,h,w){try{this.checksum.update(f),this.push(f)}catch(s){return w(s)}return w()}async _final(f){try{let h=await this.checksum.digest(),w=this.base64Encoder(h);if(this.expectedChecksum!==w)return f(new Error(`Checksum mismatch: expected "${this.expectedChecksum}" but received "${w}" in response header "${this.checksumSourceLocation}".`))}catch(h){return f(h)}return this.push(null),f()}}bB.ChecksumStream=vB});var Lh=H((dB)=>{Object.defineProperty(dB,"__esModule",{value:!0});dB.isBlob=dB.isReadableStream=void 0;var Bl=(f)=>{var h;return typeof ReadableStream==="function"&&(((h=f===null||f===void 0?void 0:f.constructor)===null||h===void 0?void 0:h.name)===ReadableStream.name||f instanceof ReadableStream)};dB.isReadableStream=Bl;var Al=(f)=>{var h;return typeof Blob==="function"&&(((h=f===null||f===void 0?void 0:f.constructor)===null||h===void 0?void 0:h.name)===Blob.name||f instanceof Blob)};dB.isBlob=Al});var _B=H((gB)=>{Object.defineProperty(gB,"__esModule",{value:!0});gB.ChecksumStream=void 0;var Wl=typeof ReadableStream==="function"?ReadableStream:function(){};class cB extends Wl{}gB.ChecksumStream=cB});var aB=H((nB)=>{Object.defineProperty(nB,"__esModule",{value:!0});nB.createChecksumStream=void 0;var zl=Ih(),Rl=Lh(),Xl=_B(),Sl=({expectedChecksum:f,checksum:h,source:w,checksumSourceLocation:s,base64Encoder:$})=>{var r,E;if(!Rl.isReadableStream(w))throw new Error(`@smithy/util-stream: unsupported source type ${(E=(r=w===null||w===void 0?void 0:w.constructor)===null||r===void 0?void 0:r.name)!==null&&E!==void 0?E:w} in ChecksumStream.`);let U=$!==null&&$!==void 0?$:zl.toBase64;if(typeof TransformStream!=="function")throw new Error("@smithy/util-stream: unable to instantiate ChecksumStream because API unavailable: ReadableStream/TransformStream.");let T=new TransformStream({start(){},async transform(C,I){h.update(C),I.enqueue(C)},async flush(C){let I=await h.digest(),L=U(I);if(f!==L){let G=new Error(`Checksum mismatch: expected "${f}" but received "${L}" in response header "${s}".`);C.error(G)}else C.terminate()}});w.pipeThrough(T);let F=T.readable;return Object.setPrototypeOf(F,Xl.ChecksumStream.prototype),F};nB.createChecksumStream=Sl});var uB=H((oB)=>{Object.defineProperty(oB,"__esModule",{value:!0});oB.createChecksumStream=void 0;var Yl=Lh(),Ml=gT(),Ql=aB();function Kl(f){if(typeof ReadableStream==="function"&&Yl.isReadableStream(f.source))return Ql.createChecksumStream(f);return new Ml.ChecksumStream(f)}oB.createChecksumStream=Kl});var xT=H((fA)=>{Object.defineProperty(fA,"__esModule",{value:!0});fA.ByteArrayCollector=void 0;class tB{constructor(f){this.allocByteArray=f,this.byteLength=0,this.byteArrays=[]}push(f){this.byteArrays.push(f),this.byteLength+=f.byteLength}flush(){if(this.byteArrays.length===1){let w=this.byteArrays[0];return this.reset(),w}let f=this.allocByteArray(this.byteLength),h=0;for(let w=0;w<this.byteArrays.length;++w){let s=this.byteArrays[w];f.set(s,h),h+=s.byteLength}return this.reset(),f}reset(){this.byteArrays=[],this.byteLength=0}}fA.ByteArrayCollector=tB});var UA=H((rA)=>{Object.defineProperty(rA,"__esModule",{value:!0});rA.modeOf=rA.sizeOf=rA.flush=rA.merge=rA.createBufferedReadable=rA.createBufferedReadableStream=void 0;var Zl=xT();function wA(f,h,w){let s=f.getReader(),$=!1,r=0,E=["",new Zl.ByteArrayCollector((F)=>new Uint8Array(F))],U=-1,T=async(F)=>{let{value:C,done:I}=await s.read(),L=C;if(I){if(U!==-1){let G=W4(E,U);if(kw(G)>0)F.enqueue(G)}F.close()}else{let G=$A(L);if(U!==G){if(U>=0)F.enqueue(W4(E,U));U=G}if(U===-1){F.enqueue(L);return}let X=kw(L);r+=X;let Q=kw(E[U]);if(X>=h&&Q===0)F.enqueue(L);else{let M=sA(E,U,L);if(!$&&r>h*2)$=!0,w===null||w===void 0||w.warn(`@smithy/util-stream - stream chunk size ${X} is below threshold of ${h}, automatically buffering.`);if(M>=h)F.enqueue(W4(E,U));else await T(F)}}};return new ReadableStream({pull:T})}rA.createBufferedReadableStream=wA;rA.createBufferedReadable=wA;function sA(f,h,w){switch(h){case 0:return f[0]+=w,kw(f[0]);case 1:case 2:return f[h].push(w),kw(f[h])}}rA.merge=sA;function W4(f,h){switch(h){case 0:let w=f[0];return f[0]="",w;case 1:case 2:return f[h].flush()}throw new Error(`@smithy/util-stream - invalid index ${h} given to flush()`)}rA.flush=W4;function kw(f){var h,w;return(w=(h=f===null||f===void 0?void 0:f.byteLength)!==null&&h!==void 0?h:f===null||f===void 0?void 0:f.length)!==null&&w!==void 0?w:0}rA.sizeOf=kw;function $A(f){if(typeof Buffer!=="undefined"&&f instanceof Buffer)return 2;if(f instanceof Uint8Array)return 1;if(typeof f==="string")return 0;return-1}rA.modeOf=$A});var IA=H((FA)=>{Object.defineProperty(FA,"__esModule",{value:!0});FA.createBufferedReadable=void 0;var Dl=B0("stream"),TA=xT(),bf=UA(),ql=Lh();function kl(f,h,w){if(ql.isReadableStream(f))return bf.createBufferedReadableStream(f,h,w);let s=new Dl.Readable({read(){}}),$=!1,r=0,E=["",new TA.ByteArrayCollector((T)=>new Uint8Array(T)),new TA.ByteArrayCollector((T)=>Buffer.from(new Uint8Array(T)))],U=-1;return f.on("data",(T)=>{let F=bf.modeOf(T);if(U!==F){if(U>=0)s.push(bf.flush(E,U));U=F}if(U===-1){s.push(T);return}let C=bf.sizeOf(T);r+=C;let I=bf.sizeOf(E[U]);if(C>=h&&I===0)s.push(T);else{let L=bf.merge(E,U,T);if(!$&&r>h*2)$=!0,w===null||w===void 0||w.warn(`@smithy/util-stream - stream chunk size ${C} is below threshold of ${h}, automatically buffering.`);if(L>=h)s.push(bf.flush(E,U))}}),f.on("end",()=>{if(U!==-1){let T=bf.flush(E,U);if(bf.sizeOf(T)>0)s.push(T)}s.push(null)}),s}FA.createBufferedReadable=kl});var AA=H((LA)=>{Object.defineProperty(LA,"__esModule",{value:!0});LA.getAwsChunkedEncodingStream=void 0;var yl=B0("stream"),jl=(f,h)=>{let{base64Encoder:w,bodyLengthChecker:s,checksumAlgorithmFn:$,checksumLocationName:r,streamHasher:E}=h,U=w!==void 0&&$!==void 0&&r!==void 0&&E!==void 0,T=U?E($,f):void 0,F=new yl.Readable({read:()=>{}});return f.on("data",(C)=>{let I=s(C)||0;F.push(`${I.toString(16)}\r
4
4
  `),F.push(C),F.push(`\r
5
5
  `)}),f.on("end",async()=>{if(F.push(`0\r
6
6
  `),U){let C=w(await T);F.push(`${r}:${C}\r
7
7
  `),F.push(`\r
8
- `)}F.push(null)}),F};LA.getAwsChunkedEncodingStream=kl});var zA=H((GA)=>{Object.defineProperty(GA,"__esModule",{value:!0});GA.headStream=void 0;async function yl(f,h){var w;let s=0,$=[],r=f.getReader(),E=!1;while(!E){let{done:F,value:C}=await r.read();if(C)$.push(C),s+=(w=C===null||C===void 0?void 0:C.byteLength)!==null&&w!==void 0?w:0;if(s>=h)break;E=F}r.releaseLock();let U=new Uint8Array(Math.min(h,s)),T=0;for(let F of $){if(F.byteLength>U.byteLength-T){U.set(F.subarray(0,U.byteLength-T),T);break}else U.set(F,T);T+=F.length}return U}GA.headStream=yl});var YA=H((XA)=>{Object.defineProperty(XA,"__esModule",{value:!0});XA.headStream=void 0;var jl=B0("stream"),Ol=zA(),ll=Lh(),vl=(f,h)=>{if(ll.isReadableStream(f))return Ol.headStream(f,h);return new Promise((w,s)=>{let $=new RA;$.limit=h,f.pipe($),f.on("error",(r)=>{$.end(),s(r)}),$.on("error",s),$.on("finish",function(){let r=new Uint8Array(Buffer.concat(this.buffers));w(r)})})};XA.headStream=vl;class RA extends jl.Writable{constructor(){super(...arguments);this.buffers=[],this.limit=1/0,this.bytesBuffered=0}_write(f,h,w){var s;if(this.buffers.push(f),this.bytesBuffered+=(s=f.byteLength)!==null&&s!==void 0?s:0,this.bytesBuffered>=this.limit){let $=this.bytesBuffered-this.limit,r=this.buffers[this.buffers.length-1];this.buffers[this.buffers.length-1]=r.subarray(0,r.byteLength-$),this.emit("finish")}w()}}});var z4=H((EU0,KA)=>{var{defineProperty:W4,getOwnPropertyDescriptor:bl,getOwnPropertyNames:ml}=Object,dl=Object.prototype.hasOwnProperty,nT=(f,h)=>W4(f,"name",{value:h,configurable:!0}),il=(f,h)=>{for(var w in h)W4(f,w,{get:h[w],enumerable:!0})},cl=(f,h,w,s)=>{if(h&&typeof h==="object"||typeof h==="function"){for(let $ of ml(h))if(!dl.call(f,$)&&$!==w)W4(f,$,{get:()=>h[$],enumerable:!(s=bl(h,$))||s.enumerable})}return f},gl=(f)=>cl(W4({},"__esModule",{value:!0}),f),MA={};il(MA,{escapeUri:()=>QA,escapeUriPath:()=>_l});KA.exports=gl(MA);var QA=nT((f)=>encodeURIComponent(f).replace(/[!'()*]/g,xl),"escapeUri"),xl=nT((f)=>`%${f.charCodeAt(0).toString(16).toUpperCase()}`,"hexEncode"),_l=nT((f)=>f.split("/").map(QA).join("/"),"escapeUriPath")});var aT=H((UU0,VA)=>{var{defineProperty:R4,getOwnPropertyDescriptor:nl,getOwnPropertyNames:el}=Object,al=Object.prototype.hasOwnProperty,ol=(f,h)=>R4(f,"name",{value:h,configurable:!0}),pl=(f,h)=>{for(var w in h)R4(f,w,{get:h[w],enumerable:!0})},ul=(f,h,w,s)=>{if(h&&typeof h==="object"||typeof h==="function"){for(let $ of el(h))if(!al.call(f,$)&&$!==w)R4(f,$,{get:()=>h[$],enumerable:!(s=nl(h,$))||s.enumerable})}return f},tl=(f)=>ul(R4({},"__esModule",{value:!0}),f),ZA={};pl(ZA,{buildQueryString:()=>JA});VA.exports=tl(ZA);var eT=z4();function JA(f){let h=[];for(let w of Object.keys(f).sort()){let s=f[w];if(w=eT.escapeUri(w),Array.isArray(s))for(let $=0,r=s.length;$<r;$++)h.push(`${w}=${eT.escapeUri(s[$])}`);else{let $=w;if(s||typeof s==="string")$+=`=${eT.escapeUri(s)}`;h.push($)}}return h.join("&")}ol(JA,"buildQueryString")});var X4=H((TU0,dA)=>{var{create:fv,defineProperty:Z$,getOwnPropertyDescriptor:hv,getOwnPropertyNames:wv,getPrototypeOf:sv}=Object,$v=Object.prototype.hasOwnProperty,K0=(f,h)=>Z$(f,"name",{value:h,configurable:!0}),rv=(f,h)=>{for(var w in h)Z$(f,w,{get:h[w],enumerable:!0})},qA=(f,h,w,s)=>{if(h&&typeof h==="object"||typeof h==="function"){for(let $ of wv(h))if(!$v.call(f,$)&&$!==w)Z$(f,$,{get:()=>h[$],enumerable:!(s=hv(h,$))||s.enumerable})}return f},Ev=(f,h,w)=>(w=f!=null?fv(sv(f)):{},qA(h||!f||!f.__esModule?Z$(w,"default",{value:f,enumerable:!0}):w,f)),Uv=(f)=>qA(Z$({},"__esModule",{value:!0}),f),kA={};rv(kA,{DEFAULT_REQUEST_TIMEOUT:()=>bA,NodeHttp2Handler:()=>zv,NodeHttpHandler:()=>Bv,streamCollector:()=>Xv});dA.exports=Uv(kA);var yA=t0(),jA=aT(),oT=B0("http"),pT=B0("https"),Tv=["ECONNRESET","EPIPE","ETIMEDOUT"],OA=K0((f)=>{let h={};for(let w of Object.keys(f)){let s=f[w];h[w]=Array.isArray(s)?s.join(","):s}return h},"getTransformedHeaders"),z1={setTimeout:(f,h)=>setTimeout(f,h),clearTimeout:(f)=>clearTimeout(f)},PA=1000,Fv=K0((f,h,w=0)=>{if(!w)return-1;let s=K0(($)=>{let r=z1.setTimeout(()=>{f.destroy(),h(Object.assign(new Error(`Socket timed out without establishing a connection within ${w} ms`),{name:"TimeoutError"}))},w-$),E=K0((U)=>{if(U?.connecting)U.on("connect",()=>{z1.clearTimeout(r)});else z1.clearTimeout(r)},"doWithSocket");if(f.socket)E(f.socket);else f.on("socket",E)},"registerTimeout");if(w<2000)return s(0),0;return z1.setTimeout(s.bind(null,PA),PA)},"setConnectionTimeout"),Cv=3000,Iv=K0((f,{keepAlive:h,keepAliveMsecs:w},s=Cv)=>{if(h!==!0)return-1;let $=K0(()=>{if(f.socket)f.socket.setKeepAlive(h,w||0);else f.on("socket",(r)=>{r.setKeepAlive(h,w||0)})},"registerListener");if(s===0)return $(),0;return z1.setTimeout($,s)},"setSocketKeepAlive"),HA=3000,Lv=K0((f,h,w=bA)=>{let s=K0(($)=>{let r=w-$,E=K0(()=>{f.destroy(),h(Object.assign(new Error(`Connection timed out after ${w} ms`),{name:"TimeoutError"}))},"onTimeout");if(f.socket)f.socket.setTimeout(r,E),f.on("close",()=>f.socket?.removeListener("timeout",E));else f.setTimeout(r,E)},"registerTimeout");if(0<w&&w<6000)return s(0),0;return z1.setTimeout(s.bind(null,w===0?0:HA),HA)},"setSocketTimeout"),lA=B0("stream"),NA=6000;async function uT(f,h,w=NA){let s=h.headers??{},$=s.Expect||s.expect,r=-1,E=!0;if($==="100-continue")E=await Promise.race([new Promise((U)=>{r=Number(z1.setTimeout(()=>U(!0),Math.max(NA,w)))}),new Promise((U)=>{f.on("continue",()=>{z1.clearTimeout(r),U(!0)}),f.on("response",()=>{z1.clearTimeout(r),U(!1)}),f.on("error",()=>{z1.clearTimeout(r),U(!1)})})]);if(E)vA(f,h.body)}K0(uT,"writeRequestBody");function vA(f,h){if(h instanceof lA.Readable){h.pipe(f);return}if(h){if(Buffer.isBuffer(h)||typeof h==="string"){f.end(h);return}let w=h;if(typeof w==="object"&&w.buffer&&typeof w.byteOffset==="number"&&typeof w.byteLength==="number"){f.end(Buffer.from(w.buffer,w.byteOffset,w.byteLength));return}f.end(Buffer.from(h));return}f.end()}K0(vA,"writeBody");var bA=0,Bv=class f{constructor(h){this.socketWarningTimestamp=0,this.metadata={handlerProtocol:"http/1.1"},this.configProvider=new Promise((w,s)=>{if(typeof h==="function")h().then(($)=>{w(this.resolveDefaultConfig($))}).catch(s);else w(this.resolveDefaultConfig(h))})}static{K0(this,"NodeHttpHandler")}static create(h){if(typeof h?.handle==="function")return h;return new f(h)}static checkSocketUsage(h,w,s=console){let{sockets:$,requests:r,maxSockets:E}=h;if(typeof E!=="number"||E===1/0)return w;let U=15000;if(Date.now()-U<w)return w;if($&&r)for(let T in $){let F=$[T]?.length??0,C=r[T]?.length??0;if(F>=E&&C>=2*E)return s?.warn?.(`@smithy/node-http-handler:WARN - socket usage at capacity=${F} and ${C} additional requests are enqueued.
8
+ `)}F.push(null)}),F};LA.getAwsChunkedEncodingStream=jl});var zA=H((GA)=>{Object.defineProperty(GA,"__esModule",{value:!0});GA.headStream=void 0;async function Ol(f,h){var w;let s=0,$=[],r=f.getReader(),E=!1;while(!E){let{done:F,value:C}=await r.read();if(C)$.push(C),s+=(w=C===null||C===void 0?void 0:C.byteLength)!==null&&w!==void 0?w:0;if(s>=h)break;E=F}r.releaseLock();let U=new Uint8Array(Math.min(h,s)),T=0;for(let F of $){if(F.byteLength>U.byteLength-T){U.set(F.subarray(0,U.byteLength-T),T);break}else U.set(F,T);T+=F.length}return U}GA.headStream=Ol});var YA=H((XA)=>{Object.defineProperty(XA,"__esModule",{value:!0});XA.headStream=void 0;var ll=B0("stream"),vl=zA(),bl=Lh(),ml=(f,h)=>{if(bl.isReadableStream(f))return vl.headStream(f,h);return new Promise((w,s)=>{let $=new RA;$.limit=h,f.pipe($),f.on("error",(r)=>{$.end(),s(r)}),$.on("error",s),$.on("finish",function(){let r=new Uint8Array(Buffer.concat(this.buffers));w(r)})})};XA.headStream=ml;class RA extends ll.Writable{constructor(){super(...arguments);this.buffers=[],this.limit=1/0,this.bytesBuffered=0}_write(f,h,w){var s;if(this.buffers.push(f),this.bytesBuffered+=(s=f.byteLength)!==null&&s!==void 0?s:0,this.bytesBuffered>=this.limit){let $=this.bytesBuffered-this.limit,r=this.buffers[this.buffers.length-1];this.buffers[this.buffers.length-1]=r.subarray(0,r.byteLength-$),this.emit("finish")}w()}}});var nT=H((FU0,KA)=>{var{defineProperty:z4,getOwnPropertyDescriptor:dl,getOwnPropertyNames:il}=Object,cl=Object.prototype.hasOwnProperty,_T=(f,h)=>z4(f,"name",{value:h,configurable:!0}),gl=(f,h)=>{for(var w in h)z4(f,w,{get:h[w],enumerable:!0})},xl=(f,h,w,s)=>{if(h&&typeof h==="object"||typeof h==="function"){for(let $ of il(h))if(!cl.call(f,$)&&$!==w)z4(f,$,{get:()=>h[$],enumerable:!(s=dl(h,$))||s.enumerable})}return f},_l=(f)=>xl(z4({},"__esModule",{value:!0}),f),MA={};gl(MA,{escapeUri:()=>QA,escapeUriPath:()=>el});KA.exports=_l(MA);var QA=_T((f)=>encodeURIComponent(f).replace(/[!'()*]/g,nl),"escapeUri"),nl=_T((f)=>`%${f.charCodeAt(0).toString(16).toUpperCase()}`,"hexEncode"),el=_T((f)=>f.split("/").map(QA).join("/"),"escapeUriPath")});var aT=H((CU0,VA)=>{var{defineProperty:R4,getOwnPropertyDescriptor:al,getOwnPropertyNames:ol}=Object,pl=Object.prototype.hasOwnProperty,ul=(f,h)=>R4(f,"name",{value:h,configurable:!0}),tl=(f,h)=>{for(var w in h)R4(f,w,{get:h[w],enumerable:!0})},fv=(f,h,w,s)=>{if(h&&typeof h==="object"||typeof h==="function"){for(let $ of ol(h))if(!pl.call(f,$)&&$!==w)R4(f,$,{get:()=>h[$],enumerable:!(s=al(h,$))||s.enumerable})}return f},hv=(f)=>fv(R4({},"__esModule",{value:!0}),f),ZA={};tl(ZA,{buildQueryString:()=>JA});VA.exports=hv(ZA);var eT=nT();function JA(f){let h=[];for(let w of Object.keys(f).sort()){let s=f[w];if(w=eT.escapeUri(w),Array.isArray(s))for(let $=0,r=s.length;$<r;$++)h.push(`${w}=${eT.escapeUri(s[$])}`);else{let $=w;if(s||typeof s==="string")$+=`=${eT.escapeUri(s)}`;h.push($)}}return h.join("&")}ul(JA,"buildQueryString")});var X4=H((IU0,dA)=>{var{create:wv,defineProperty:Z$,getOwnPropertyDescriptor:sv,getOwnPropertyNames:$v,getPrototypeOf:rv}=Object,Ev=Object.prototype.hasOwnProperty,K0=(f,h)=>Z$(f,"name",{value:h,configurable:!0}),Uv=(f,h)=>{for(var w in h)Z$(f,w,{get:h[w],enumerable:!0})},qA=(f,h,w,s)=>{if(h&&typeof h==="object"||typeof h==="function"){for(let $ of $v(h))if(!Ev.call(f,$)&&$!==w)Z$(f,$,{get:()=>h[$],enumerable:!(s=sv(h,$))||s.enumerable})}return f},Tv=(f,h,w)=>(w=f!=null?wv(rv(f)):{},qA(h||!f||!f.__esModule?Z$(w,"default",{value:f,enumerable:!0}):w,f)),Fv=(f)=>qA(Z$({},"__esModule",{value:!0}),f),kA={};Uv(kA,{DEFAULT_REQUEST_TIMEOUT:()=>bA,NodeHttp2Handler:()=>Xv,NodeHttpHandler:()=>Gv,streamCollector:()=>Yv});dA.exports=Fv(kA);var yA=t0(),jA=aT(),oT=B0("http"),pT=B0("https"),Cv=["ECONNRESET","EPIPE","ETIMEDOUT"],OA=K0((f)=>{let h={};for(let w of Object.keys(f)){let s=f[w];h[w]=Array.isArray(s)?s.join(","):s}return h},"getTransformedHeaders"),z1={setTimeout:(f,h)=>setTimeout(f,h),clearTimeout:(f)=>clearTimeout(f)},PA=1000,Iv=K0((f,h,w=0)=>{if(!w)return-1;let s=K0(($)=>{let r=z1.setTimeout(()=>{f.destroy(),h(Object.assign(new Error(`Socket timed out without establishing a connection within ${w} ms`),{name:"TimeoutError"}))},w-$),E=K0((U)=>{if(U?.connecting)U.on("connect",()=>{z1.clearTimeout(r)});else z1.clearTimeout(r)},"doWithSocket");if(f.socket)E(f.socket);else f.on("socket",E)},"registerTimeout");if(w<2000)return s(0),0;return z1.setTimeout(s.bind(null,PA),PA)},"setConnectionTimeout"),Lv=3000,Bv=K0((f,{keepAlive:h,keepAliveMsecs:w},s=Lv)=>{if(h!==!0)return-1;let $=K0(()=>{if(f.socket)f.socket.setKeepAlive(h,w||0);else f.on("socket",(r)=>{r.setKeepAlive(h,w||0)})},"registerListener");if(s===0)return $(),0;return z1.setTimeout($,s)},"setSocketKeepAlive"),HA=3000,Av=K0((f,h,w=bA)=>{let s=K0(($)=>{let r=w-$,E=K0(()=>{f.destroy(),h(Object.assign(new Error(`Connection timed out after ${w} ms`),{name:"TimeoutError"}))},"onTimeout");if(f.socket)f.socket.setTimeout(r,E),f.on("close",()=>f.socket?.removeListener("timeout",E));else f.setTimeout(r,E)},"registerTimeout");if(0<w&&w<6000)return s(0),0;return z1.setTimeout(s.bind(null,w===0?0:HA),HA)},"setSocketTimeout"),lA=B0("stream"),NA=6000;async function uT(f,h,w=NA){let s=h.headers??{},$=s.Expect||s.expect,r=-1,E=!0;if($==="100-continue")E=await Promise.race([new Promise((U)=>{r=Number(z1.setTimeout(()=>U(!0),Math.max(NA,w)))}),new Promise((U)=>{f.on("continue",()=>{z1.clearTimeout(r),U(!0)}),f.on("response",()=>{z1.clearTimeout(r),U(!1)}),f.on("error",()=>{z1.clearTimeout(r),U(!1)})})]);if(E)vA(f,h.body)}K0(uT,"writeRequestBody");function vA(f,h){if(h instanceof lA.Readable){h.pipe(f);return}if(h){if(Buffer.isBuffer(h)||typeof h==="string"){f.end(h);return}let w=h;if(typeof w==="object"&&w.buffer&&typeof w.byteOffset==="number"&&typeof w.byteLength==="number"){f.end(Buffer.from(w.buffer,w.byteOffset,w.byteLength));return}f.end(Buffer.from(h));return}f.end()}K0(vA,"writeBody");var bA=0,Gv=class f{constructor(h){this.socketWarningTimestamp=0,this.metadata={handlerProtocol:"http/1.1"},this.configProvider=new Promise((w,s)=>{if(typeof h==="function")h().then(($)=>{w(this.resolveDefaultConfig($))}).catch(s);else w(this.resolveDefaultConfig(h))})}static{K0(this,"NodeHttpHandler")}static create(h){if(typeof h?.handle==="function")return h;return new f(h)}static checkSocketUsage(h,w,s=console){let{sockets:$,requests:r,maxSockets:E}=h;if(typeof E!=="number"||E===1/0)return w;let U=15000;if(Date.now()-U<w)return w;if($&&r)for(let T in $){let F=$[T]?.length??0,C=r[T]?.length??0;if(F>=E&&C>=2*E)return s?.warn?.(`@smithy/node-http-handler:WARN - socket usage at capacity=${F} and ${C} additional requests are enqueued.
9
9
  See https://docs.aws.amazon.com/sdk-for-javascript/v3/developer-guide/node-configuring-maxsockets.html
10
- or increase socketAcquisitionWarningTimeout=(millis) in the NodeHttpHandler config.`),Date.now()}return w}resolveDefaultConfig(h){let{requestTimeout:w,connectionTimeout:s,socketTimeout:$,socketAcquisitionWarningTimeout:r,httpAgent:E,httpsAgent:U}=h||{},T=!0,F=50;return{connectionTimeout:s,requestTimeout:w??$,socketAcquisitionWarningTimeout:r,httpAgent:(()=>{if(E instanceof oT.Agent||typeof E?.destroy==="function")return E;return new oT.Agent({keepAlive:!0,maxSockets:50,...E})})(),httpsAgent:(()=>{if(U instanceof pT.Agent||typeof U?.destroy==="function")return U;return new pT.Agent({keepAlive:!0,maxSockets:50,...U})})(),logger:console}}destroy(){this.config?.httpAgent?.destroy(),this.config?.httpsAgent?.destroy()}async handle(h,{abortSignal:w}={}){if(!this.config)this.config=await this.configProvider;return new Promise((s,$)=>{let r=void 0,E=[],U=K0(async(y)=>{await r,E.forEach(z1.clearTimeout),s(y)},"resolve"),T=K0(async(y)=>{await r,E.forEach(z1.clearTimeout),$(y)},"reject");if(!this.config)throw new Error("Node HTTP request handler config is not resolved");if(w?.aborted){let y=new Error("Request aborted");y.name="AbortError",T(y);return}let F=h.protocol==="https:",C=F?this.config.httpsAgent:this.config.httpAgent;E.push(z1.setTimeout(()=>{this.socketWarningTimestamp=f.checkSocketUsage(C,this.socketWarningTimestamp,this.config.logger)},this.config.socketAcquisitionWarningTimeout??(this.config.requestTimeout??2000)+(this.config.connectionTimeout??1000)));let I=jA.buildQueryString(h.query||{}),L=void 0;if(h.username!=null||h.password!=null){let y=h.username??"",n=h.password??"";L=`${y}:${n}`}let G=h.path;if(I)G+=`?${I}`;if(h.fragment)G+=`#${h.fragment}`;let X=h.hostname??"";if(X[0]==="["&&X.endsWith("]"))X=h.hostname.slice(1,-1);else X=h.hostname;let Q={headers:h.headers,host:X,method:h.method,path:G,port:h.port,agent:C,auth:L},q=(F?pT.request:oT.request)(Q,(y)=>{let n=new yA.HttpResponse({statusCode:y.statusCode||-1,reason:y.statusMessage,headers:OA(y.headers),body:y});U({response:n})});if(q.on("error",(y)=>{if(Tv.includes(y.code))T(Object.assign(y,{name:"TimeoutError"}));else T(y)}),w){let y=K0(()=>{q.destroy();let n=new Error("Request aborted");n.name="AbortError",T(n)},"onAbort");if(typeof w.addEventListener==="function"){let n=w;n.addEventListener("abort",y,{once:!0}),q.once("close",()=>n.removeEventListener("abort",y))}else w.onabort=y}E.push(Fv(q,T,this.config.connectionTimeout)),E.push(Lv(q,T,this.config.requestTimeout));let N=Q.agent;if(typeof N==="object"&&"keepAlive"in N)E.push(Iv(q,{keepAlive:N.keepAlive,keepAliveMsecs:N.keepAliveMsecs}));r=uT(q,h,this.config.requestTimeout).catch((y)=>{return E.forEach(z1.clearTimeout),$(y)})})}updateHttpClientConfig(h,w){this.config=void 0,this.configProvider=this.configProvider.then((s)=>{return{...s,[h]:w}})}httpHandlerConfigs(){return this.config??{}}},DA=B0("http2"),Av=Ev(B0("http2")),Gv=class{constructor(f){this.sessions=[],this.sessions=f??[]}static{K0(this,"NodeHttp2ConnectionPool")}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((h)=>h!==f)}[Symbol.iterator](){return this.sessions[Symbol.iterator]()}destroy(f){for(let h of this.sessions)if(h===f){if(!h.destroyed)h.destroy()}}},Wv=class{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.")}static{K0(this,"NodeHttp2ConnectionManager")}lease(f,h){let w=this.getUrlString(f),s=this.sessionCache.get(w);if(s){let U=s.poll();if(U&&!this.config.disableConcurrency)return U}let $=Av.default.connect(w);if(this.config.maxConcurrency)$.settings({maxConcurrentStreams:this.config.maxConcurrency},(U)=>{if(U)throw new Error("Fail to set maxConcurrentStreams to "+this.config.maxConcurrency+"when creating new session for "+f.destination.toString())});$.unref();let r=K0(()=>{$.destroy(),this.deleteSession(w,$)},"destroySessionCb");if($.on("goaway",r),$.on("error",r),$.on("frameError",r),$.on("close",()=>this.deleteSession(w,$)),h.requestTimeout)$.setTimeout(h.requestTimeout,r);let E=this.sessionCache.get(w)||new Gv;return E.offerLast($),this.sessionCache.set(w,E),$}deleteSession(f,h){let w=this.sessionCache.get(f);if(!w)return;if(!w.contains(h))return;w.remove(h),this.sessionCache.set(f,w)}release(f,h){let w=this.getUrlString(f);this.sessionCache.get(w)?.offerLast(h)}destroy(){for(let[f,h]of this.sessionCache){for(let w of h){if(!w.destroyed)w.destroy();h.remove(w)}this.sessionCache.delete(f)}}setMaxConcurrentStreams(f){if(f&&f<=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()}},zv=class f{constructor(h){this.metadata={handlerProtocol:"h2"},this.connectionManager=new Wv({}),this.configProvider=new Promise((w,s)=>{if(typeof h==="function")h().then(($)=>{w($||{})}).catch(s);else w(h||{})})}static{K0(this,"NodeHttp2Handler")}static create(h){if(typeof h?.handle==="function")return h;return new f(h)}destroy(){this.connectionManager.destroy()}async handle(h,{abortSignal:w}={}){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)}let{requestTimeout:s,disableConcurrentStreams:$}=this.config;return new Promise((r,E)=>{let U=!1,T=void 0,F=K0(async(X0)=>{await T,r(X0)},"resolve"),C=K0(async(X0)=>{await T,E(X0)},"reject");if(w?.aborted){U=!0;let X0=new Error("Request aborted");X0.name="AbortError",C(X0);return}let{hostname:I,method:L,port:G,protocol:X,query:Q}=h,M="";if(h.username!=null||h.password!=null){let X0=h.username??"",p1=h.password??"";M=`${X0}:${p1}@`}let q=`${X}//${M}${I}${G?`:${G}`:""}`,N={destination:new URL(q)},y=this.connectionManager.lease(N,{requestTimeout:this.config?.sessionTimeout,disableConcurrentStreams:$||!1}),n=K0((X0)=>{if($)this.destroySession(y);U=!0,C(X0)},"rejectWithDestroy"),L0=jA.buildQueryString(Q||{}),b0=h.path;if(L0)b0+=`?${L0}`;if(h.fragment)b0+=`#${h.fragment}`;let $1=y.request({...h.headers,[DA.constants.HTTP2_HEADER_PATH]:b0,[DA.constants.HTTP2_HEADER_METHOD]:L});if(y.ref(),$1.on("response",(X0)=>{let p1=new yA.HttpResponse({statusCode:X0[":status"]||-1,headers:OA(X0),body:$1});if(U=!0,F({response:p1}),$)y.close(),this.connectionManager.deleteSession(q,y)}),s)$1.setTimeout(s,()=>{$1.close();let X0=new Error(`Stream timed out because of no activity for ${s} ms`);X0.name="TimeoutError",n(X0)});if(w){let X0=K0(()=>{$1.close();let p1=new Error("Request aborted");p1.name="AbortError",n(p1)},"onAbort");if(typeof w.addEventListener==="function"){let p1=w;p1.addEventListener("abort",X0,{once:!0}),$1.once("close",()=>p1.removeEventListener("abort",X0))}else w.onabort=X0}$1.on("frameError",(X0,p1,Nj)=>{n(new Error(`Frame type id ${X0} in stream id ${Nj} has failed with code ${p1}.`))}),$1.on("error",n),$1.on("aborted",()=>{n(new Error(`HTTP/2 stream is abnormally aborted in mid-communication with result code ${$1.rstCode}.`))}),$1.on("close",()=>{if(y.unref(),$)y.destroy();if(!U)n(new Error("Unexpected error: http2 request did not get a response"))}),T=uT($1,h,s)})}updateHttpClientConfig(h,w){this.config=void 0,this.configProvider=this.configProvider.then((s)=>{return{...s,[h]:w}})}httpHandlerConfigs(){return this.config??{}}destroySession(h){if(!h.destroyed)h.destroy()}},Rv=class extends lA.Writable{constructor(){super(...arguments);this.bufferedBytes=[]}static{K0(this,"Collector")}_write(f,h,w){this.bufferedBytes.push(f),w()}},Xv=K0((f)=>{if(Sv(f))return mA(f);return new Promise((h,w)=>{let s=new Rv;f.pipe(s),f.on("error",($)=>{s.end(),w($)}),s.on("error",w),s.on("finish",function(){let $=new Uint8Array(Buffer.concat(this.bufferedBytes));h($)})})},"streamCollector"),Sv=K0((f)=>typeof ReadableStream==="function"&&f instanceof ReadableStream,"isReadableStreamInstance");async function mA(f){let h=[],w=f.getReader(),s=!1,$=0;while(!s){let{done:U,value:T}=await w.read();if(T)h.push(T),$+=T.length;s=U}let r=new Uint8Array($),E=0;for(let U of h)r.set(U,E),E+=U.length;return r}K0(mA,"collectReadableStream")});var aA=H((LU0,eA)=>{var{defineProperty:Y4,getOwnPropertyDescriptor:Yv,getOwnPropertyNames:Mv}=Object,Qv=Object.prototype.hasOwnProperty,Rf=(f,h)=>Y4(f,"name",{value:h,configurable:!0}),Kv=(f,h)=>{for(var w in h)Y4(f,w,{get:h[w],enumerable:!0})},Zv=(f,h,w,s)=>{if(h&&typeof h==="object"||typeof h==="function"){for(let $ of Mv(h))if(!Qv.call(f,$)&&$!==w)Y4(f,$,{get:()=>h[$],enumerable:!(s=Yv(h,$))||s.enumerable})}return f},Jv=(f)=>Zv(Y4({},"__esModule",{value:!0}),f),cA={};Kv(cA,{FetchHttpHandler:()=>Pv,keepAliveSupport:()=>S4,streamCollector:()=>Nv});eA.exports=Jv(cA);var iA=t0(),Vv=aT();function tT(f,h){return new Request(f,h)}Rf(tT,"createRequest");function gA(f=0){return new Promise((h,w)=>{if(f)setTimeout(()=>{let s=new Error(`Request did not complete within ${f} ms`);s.name="TimeoutError",w(s)},f)})}Rf(gA,"requestTimeout");var S4={supported:void 0},Pv=class f{static{Rf(this,"FetchHttpHandler")}static create(h){if(typeof h?.handle==="function")return h;return new f(h)}constructor(h){if(typeof h==="function")this.configProvider=h().then((w)=>w||{});else this.config=h??{},this.configProvider=Promise.resolve(this.config);if(S4.supported===void 0)S4.supported=Boolean(typeof Request!=="undefined"&&"keepalive"in tT("https://[::1]"))}destroy(){}async handle(h,{abortSignal:w}={}){if(!this.config)this.config=await this.configProvider;let s=this.config.requestTimeout,$=this.config.keepAlive===!0,r=this.config.credentials;if(w?.aborted){let q=new Error("Request aborted");return q.name="AbortError",Promise.reject(q)}let E=h.path,U=Vv.buildQueryString(h.query||{});if(U)E+=`?${U}`;if(h.fragment)E+=`#${h.fragment}`;let T="";if(h.username!=null||h.password!=null){let q=h.username??"",N=h.password??"";T=`${q}:${N}@`}let{port:F,method:C}=h,I=`${h.protocol}//${T}${h.hostname}${F?`:${F}`:""}${E}`,L=C==="GET"||C==="HEAD"?void 0:h.body,G={body:L,headers:new Headers(h.headers),method:C,credentials:r};if(this.config?.cache)G.cache=this.config.cache;if(L)G.duplex="half";if(typeof AbortController!=="undefined")G.signal=w;if(S4.supported)G.keepalive=$;if(typeof this.config.requestInit==="function")Object.assign(G,this.config.requestInit(h));let X=Rf(()=>{},"removeSignalEventListener"),Q=tT(I,G),M=[fetch(Q).then((q)=>{let N=q.headers,y={};for(let L0 of N.entries())y[L0[0]]=L0[1];if(q.body==null)return q.blob().then((L0)=>({response:new iA.HttpResponse({headers:y,reason:q.statusText,statusCode:q.status,body:L0})}));return{response:new iA.HttpResponse({headers:y,reason:q.statusText,statusCode:q.status,body:q.body})}}),gA(s)];if(w)M.push(new Promise((q,N)=>{let y=Rf(()=>{let n=new Error("Request aborted");n.name="AbortError",N(n)},"onAbort");if(typeof w.addEventListener==="function"){let n=w;n.addEventListener("abort",y,{once:!0}),X=Rf(()=>n.removeEventListener("abort",y),"removeSignalEventListener")}else w.onabort=y}));return Promise.race(M).finally(X)}updateHttpClientConfig(h,w){this.config=void 0,this.configProvider=this.configProvider.then((s)=>{return s[h]=w,s})}httpHandlerConfigs(){return this.config??{}}},Hv=Ih(),Nv=Rf(async(f)=>{if(typeof Blob==="function"&&f instanceof Blob||f.constructor?.name==="Blob"){if(Blob.prototype.arrayBuffer!==void 0)return new Uint8Array(await f.arrayBuffer());return xA(f)}return _A(f)},"streamCollector");async function xA(f){let h=await nA(f),w=Hv.fromBase64(h);return new Uint8Array(w)}Rf(xA,"collectBlob");async function _A(f){let h=[],w=f.getReader(),s=!1,$=0;while(!s){let{done:U,value:T}=await w.read();if(T)h.push(T),$+=T.length;s=U}let r=new Uint8Array($),E=0;for(let U of h)r.set(U,E),E+=U.length;return r}Rf(_A,"collectStream");function nA(f){return new Promise((h,w)=>{let s=new FileReader;s.onloadend=()=>{if(s.readyState!==2)return w(new Error("Reader aborted too early"));let $=s.result??"",r=$.indexOf(","),E=r>-1?r+1:$.length;h($.substring(E))},s.onabort=()=>w(new Error("Read aborted")),s.onerror=()=>w(s.error),s.readAsDataURL(f)})}Rf(nA,"readToBase64")});var h2=H((BU0,hG)=>{var{defineProperty:M4,getOwnPropertyDescriptor:Dv,getOwnPropertyNames:qv}=Object,kv=Object.prototype.hasOwnProperty,oA=(f,h)=>M4(f,"name",{value:h,configurable:!0}),yv=(f,h)=>{for(var w in h)M4(f,w,{get:h[w],enumerable:!0})},jv=(f,h,w,s)=>{if(h&&typeof h==="object"||typeof h==="function"){for(let $ of qv(h))if(!kv.call(f,$)&&$!==w)M4(f,$,{get:()=>h[$],enumerable:!(s=Dv(h,$))||s.enumerable})}return f},Ov=(f)=>jv(M4({},"__esModule",{value:!0}),f),pA={};yv(pA,{fromHex:()=>tA,toHex:()=>fG});hG.exports=Ov(pA);var uA={},f2={};for(let f=0;f<256;f++){let h=f.toString(16).toLowerCase();if(h.length===1)h=`0${h}`;uA[f]=h,f2[h]=f}function tA(f){if(f.length%2!==0)throw new Error("Hex encoded strings must have an even number length");let h=new Uint8Array(f.length/2);for(let w=0;w<f.length;w+=2){let s=f.slice(w,w+2).toLowerCase();if(s in f2)h[w/2]=f2[s];else throw new Error(`Cannot decode unrecognized sequence ${s} as hexadecimal`)}return h}oA(tA,"fromHex");function fG(f){let h="";for(let w=0;w<f.byteLength;w++)h+=uA[f[w]];return h}oA(fG,"toHex")});var UG=H((rG)=>{Object.defineProperty(rG,"__esModule",{value:!0});rG.sdkStreamMixin=void 0;var lv=aA(),vv=Ih(),bv=h2(),mv=u1(),wG=Lh(),sG="The stream has already been transformed.",dv=(f)=>{var h,w;if(!$G(f)&&!wG.isReadableStream(f)){let E=((w=(h=f===null||f===void 0?void 0:f.__proto__)===null||h===void 0?void 0:h.constructor)===null||w===void 0?void 0:w.name)||f;throw new Error(`Unexpected stream implementation, expect Blob or ReadableStream, got ${E}`)}let s=!1,$=async()=>{if(s)throw new Error(sG);return s=!0,await lv.streamCollector(f)},r=(E)=>{if(typeof E.stream!=="function")throw new Error(`Cannot transform payload Blob to web stream. Please make sure the Blob.stream() is polyfilled.
11
- If you are using React Native, this API is not yet supported, see: https://react-native.canny.io/feature-requests/p/fetch-streaming-body`);return E.stream()};return Object.assign(f,{transformToByteArray:$,transformToString:async(E)=>{let U=await $();if(E==="base64")return vv.toBase64(U);else if(E==="hex")return bv.toHex(U);else if(E===void 0||E==="utf8"||E==="utf-8")return mv.toUtf8(U);else if(typeof TextDecoder==="function")return new TextDecoder(E).decode(U);else throw new Error("TextDecoder is not available, please make sure polyfill is provided.")},transformToWebStream:()=>{if(s)throw new Error(sG);if(s=!0,$G(f))return r(f);else if(wG.isReadableStream(f))return f;else throw new Error(`Cannot transform payload to web stream, got ${f}`)}})};rG.sdkStreamMixin=dv;var $G=(f)=>typeof Blob==="function"&&f instanceof Blob});var IG=H((FG)=>{Object.defineProperty(FG,"__esModule",{value:!0});FG.sdkStreamMixin=void 0;var iv=X4(),cv=qw(),w2=B0("stream"),gv=UG(),TG="The stream has already been transformed.",xv=(f)=>{var h,w;if(!(f instanceof w2.Readable))try{return gv.sdkStreamMixin(f)}catch(r){let E=((w=(h=f===null||f===void 0?void 0:f.__proto__)===null||h===void 0?void 0:h.constructor)===null||w===void 0?void 0:w.name)||f;throw new Error(`Unexpected stream implementation, expect Stream.Readable instance, got ${E}`)}let s=!1,$=async()=>{if(s)throw new Error(TG);return s=!0,await iv.streamCollector(f)};return Object.assign(f,{transformToByteArray:$,transformToString:async(r)=>{let E=await $();if(r===void 0||Buffer.isEncoding(r))return cv.fromArrayBuffer(E.buffer,E.byteOffset,E.byteLength).toString(r);else return new TextDecoder(r).decode(E)},transformToWebStream:()=>{if(s)throw new Error(TG);if(f.readableFlowing!==null)throw new Error("The stream has been consumed by other callbacks.");if(typeof w2.Readable.toWeb!=="function")throw new Error("Readable.toWeb() is not supported. Please ensure a polyfill is available.");return s=!0,w2.Readable.toWeb(f)}})};FG.sdkStreamMixin=xv});var AG=H((LG)=>{Object.defineProperty(LG,"__esModule",{value:!0});LG.splitStream=void 0;async function _v(f){if(typeof f.stream==="function")f=f.stream();return f.tee()}LG.splitStream=_v});var XG=H((zG)=>{Object.defineProperty(zG,"__esModule",{value:!0});zG.splitStream=void 0;var GG=B0("stream"),nv=AG(),WG=Lh();async function ev(f){if(WG.isReadableStream(f)||WG.isBlob(f))return nv.splitStream(f);let h=new GG.PassThrough,w=new GG.PassThrough;return f.pipe(h),f.pipe(w),[h,w]}zG.splitStream=ev});var E2=H((RU0,Sf)=>{var{defineProperty:Q4,getOwnPropertyDescriptor:av,getOwnPropertyNames:ov}=Object,pv=Object.prototype.hasOwnProperty,r2=(f,h)=>Q4(f,"name",{value:h,configurable:!0}),uv=(f,h)=>{for(var w in h)Q4(f,w,{get:h[w],enumerable:!0})},s2=(f,h,w,s)=>{if(h&&typeof h==="object"||typeof h==="function"){for(let $ of ov(h))if(!pv.call(f,$)&&$!==w)Q4(f,$,{get:()=>h[$],enumerable:!(s=av(h,$))||s.enumerable})}return f},Bh=(f,h,w)=>(s2(f,h,"default"),w&&s2(w,h,"default")),tv=(f)=>s2(Q4({},"__esModule",{value:!0}),f),Xf={};uv(Xf,{Uint8ArrayBlobAdapter:()=>$2});Sf.exports=tv(Xf);var SG=Ih(),YG=u1();function MG(f,h="utf-8"){if(h==="base64")return SG.toBase64(f);return YG.toUtf8(f)}r2(MG,"transformToString");function QG(f,h){if(h==="base64")return $2.mutate(SG.fromBase64(f));return $2.mutate(YG.fromUtf8(f))}r2(QG,"transformFromString");var $2=class f extends Uint8Array{static{r2(this,"Uint8ArrayBlobAdapter")}static fromString(h,w="utf-8"){switch(typeof h){case"string":return QG(h,w);default:throw new Error(`Unsupported conversion from ${typeof h} to Uint8ArrayBlobAdapter.`)}}static mutate(h){return Object.setPrototypeOf(h,f.prototype),h}transformToString(h="utf-8"){return MG(this,h)}};Bh(Xf,xT(),Sf.exports);Bh(Xf,uB(),Sf.exports);Bh(Xf,IA(),Sf.exports);Bh(Xf,AA(),Sf.exports);Bh(Xf,YA(),Sf.exports);Bh(Xf,IG(),Sf.exports);Bh(Xf,XG(),Sf.exports);Bh(Xf,Lh(),Sf.exports)});var yw=H((XU0,VG)=>{var{defineProperty:F2,getOwnPropertyDescriptor:fb,getOwnPropertyNames:hb}=Object,wb=Object.prototype.hasOwnProperty,sb=(f,h)=>{for(var w in h)F2(f,w,{get:h[w],enumerable:!0})},$b=(f,h,w,s)=>{if(h&&typeof h==="object"||typeof h==="function"){for(let $ of hb(h))if(!wb.call(f,$)&&$!==w)F2(f,$,{get:()=>h[$],enumerable:!(s=fb(h,$))||s.enumerable})}return f},rb=(f)=>$b(F2({},"__esModule",{value:!0}),f),KG={};sb(KG,{RequestBuilder:()=>JG,collectBody:()=>Eb,extendedEncodeURIComponent:()=>T2,requestBuilder:()=>Tb,resolvedPath:()=>ZG});VG.exports=rb(KG);var U2=E2(),Eb=async(f=new Uint8Array,h)=>{if(f instanceof Uint8Array)return U2.Uint8ArrayBlobAdapter.mutate(f);if(!f)return U2.Uint8ArrayBlobAdapter.mutate(new Uint8Array);let w=h.streamCollector(f);return U2.Uint8ArrayBlobAdapter.mutate(await w)};function T2(f){return encodeURIComponent(f).replace(/[!'()*]/g,function(h){return"%"+h.charCodeAt(0).toString(16).toUpperCase()})}var Ub=t0(),ZG=(f,h,w,s,$,r)=>{if(h!=null&&h[w]!==void 0){let E=s();if(E.length<=0)throw new Error("Empty value provided for input HTTP label: "+w+".");f=f.replace($,r?E.split("/").map((U)=>T2(U)).join("/"):T2(E))}else throw new Error("No value provided for input HTTP label: "+w+".");return f};function Tb(f,h){return new JG(f,h)}var JG=class{constructor(f,h){this.input=f,this.context=h,this.query={},this.method="",this.headers={},this.path="",this.body=null,this.hostname="",this.resolvePathStack=[]}async build(){let{hostname:f,protocol:h="https",port:w,path:s}=await this.context.endpoint();this.path=s;for(let $ of this.resolvePathStack)$(this.path);return new Ub.HttpRequest({protocol:h,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((h)=>{this.path=`${h?.endsWith("/")?h.slice(0,-1):h||""}`+f}),this}p(f,h,w,s){return this.resolvePathStack.push(($)=>{this.path=ZG($,this.input,f,h,w,s)}),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}}});var m0=H((YU0,mG)=>{var{defineProperty:Z4,getOwnPropertyDescriptor:Fb,getOwnPropertyNames:Cb}=Object,Ib=Object.prototype.hasOwnProperty,j0=(f,h)=>Z4(f,"name",{value:h,configurable:!0}),Lb=(f,h)=>{for(var w in h)Z4(f,w,{get:h[w],enumerable:!0})},Bb=(f,h,w,s)=>{if(h&&typeof h==="object"||typeof h==="function"){for(let $ of Cb(h))if(!Ib.call(f,$)&&$!==w)Z4(f,$,{get:()=>h[$],enumerable:!(s=Fb(h,$))||s.enumerable})}return f},Ab=(f)=>Bb(Z4({},"__esModule",{value:!0}),f),PG={};Lb(PG,{DefaultIdentityProviderConfig:()=>Jb,EXPIRATION_MS:()=>vG,HttpApiKeyAuthSigner:()=>Vb,HttpBearerAuthSigner:()=>Pb,NoAuthSigner:()=>Hb,createIsIdentityExpiredFunction:()=>lG,createPaginator:()=>jG,doesIdentityRequireRefresh:()=>bG,getHttpAuthSchemeEndpointRuleSetPlugin:()=>Wb,getHttpAuthSchemePlugin:()=>Rb,getHttpSigningPlugin:()=>Yb,getSmithyContext:()=>Gb,httpAuthSchemeEndpointRuleSetMiddlewareOptions:()=>DG,httpAuthSchemeMiddleware:()=>C2,httpAuthSchemeMiddlewareOptions:()=>qG,httpSigningMiddleware:()=>kG,httpSigningMiddlewareOptions:()=>yG,isIdentityExpired:()=>Nb,memoizeIdentityProvider:()=>Db,normalizeProvider:()=>Mb,requestBuilder:()=>Zb.requestBuilder,setFeature:()=>OG});mG.exports=Ab(PG);var K4=T1(),Gb=j0((f)=>f[K4.SMITHY_CONTEXT_KEY]||(f[K4.SMITHY_CONTEXT_KEY]={}),"getSmithyContext"),HG=Fh();function NG(f){let h=new Map;for(let w of f)h.set(w.schemeId,w);return h}j0(NG,"convertHttpAuthSchemesToMap");var C2=j0((f,h)=>(w,s)=>async($)=>{let r=f.httpAuthSchemeProvider(await h.httpAuthSchemeParametersProvider(f,s,$.input)),E=NG(f.httpAuthSchemes),U=HG.getSmithyContext(s),T=[];for(let F of r){let C=E.get(F.schemeId);if(!C){T.push(`HttpAuthScheme \`${F.schemeId}\` was not enabled for this service.`);continue}let I=C.identityProvider(await h.identityProviderConfigProvider(f));if(!I){T.push(`HttpAuthScheme \`${F.schemeId}\` did not have an IdentityProvider configured.`);continue}let{identityProperties:L={},signingProperties:G={}}=F.propertiesExtractor?.(f,s)||{};F.identityProperties=Object.assign(F.identityProperties||{},L),F.signingProperties=Object.assign(F.signingProperties||{},G),U.selectedHttpAuthScheme={httpAuthOption:F,identity:await I(F.identityProperties),signer:C.signer};break}if(!U.selectedHttpAuthScheme)throw new Error(T.join(`
12
- `));return w($)},"httpAuthSchemeMiddleware"),DG={step:"serialize",tags:["HTTP_AUTH_SCHEME"],name:"httpAuthSchemeMiddleware",override:!0,relation:"before",toMiddleware:"endpointV2Middleware"},Wb=j0((f,{httpAuthSchemeParametersProvider:h,identityProviderConfigProvider:w})=>({applyToStack:(s)=>{s.addRelativeTo(C2(f,{httpAuthSchemeParametersProvider:h,identityProviderConfigProvider:w}),DG)}}),"getHttpAuthSchemeEndpointRuleSetPlugin"),zb=Dw(),qG={step:"serialize",tags:["HTTP_AUTH_SCHEME"],name:"httpAuthSchemeMiddleware",override:!0,relation:"before",toMiddleware:zb.serializerMiddlewareOption.name},Rb=j0((f,{httpAuthSchemeParametersProvider:h,identityProviderConfigProvider:w})=>({applyToStack:(s)=>{s.addRelativeTo(C2(f,{httpAuthSchemeParametersProvider:h,identityProviderConfigProvider:w}),qG)}}),"getHttpAuthSchemePlugin"),I2=t0(),Xb=j0((f)=>(h)=>{throw h},"defaultErrorHandler"),Sb=j0((f,h)=>{},"defaultSuccessHandler"),kG=j0((f)=>(h,w)=>async(s)=>{if(!I2.HttpRequest.isInstance(s.request))return h(s);let r=HG.getSmithyContext(w).selectedHttpAuthScheme;if(!r)throw new Error("No HttpAuthScheme was selected: unable to sign request");let{httpAuthOption:{signingProperties:E={}},identity:U,signer:T}=r,F=await h({...s,request:await T.sign(s.request,U,E)}).catch((T.errorHandler||Xb)(E));return(T.successHandler||Sb)(F.response,E),F},"httpSigningMiddleware"),yG={step:"finalizeRequest",tags:["HTTP_SIGNING"],name:"httpSigningMiddleware",aliases:["apiKeyMiddleware","tokenMiddleware","awsAuthMiddleware"],override:!0,relation:"after",toMiddleware:"retryMiddleware"},Yb=j0((f)=>({applyToStack:(h)=>{h.addRelativeTo(kG(f),yG)}}),"getHttpSigningPlugin"),Mb=j0((f)=>{if(typeof f==="function")return f;let h=Promise.resolve(f);return()=>h},"normalizeProvider"),Qb=j0(async(f,h,w,s=(r)=>r,...$)=>{let r=new f(w);return r=s(r)??r,await h.send(r,...$)},"makePagedClientRequest");function jG(f,h,w,s,$){return j0(async function*r(E,U,...T){let F=U,C=E.startingToken??F[w],I=!0,L;while(I){if(F[w]=C,$)F[$]=F[$]??E.pageSize;if(E.client instanceof f)L=await Qb(h,E.client,U,E.withCommand,...T);else throw new Error(`Invalid client, expected instance of ${f.name}`);yield L;let G=C;C=Kb(L,s),I=!!(C&&(!E.stopOnSameToken||C!==G))}return},"paginateOperation")}j0(jG,"createPaginator");var Kb=j0((f,h)=>{let w=f,s=h.split(".");for(let $ of s){if(!w||typeof w!=="object")return;w=w[$]}return w},"get"),Zb=yw();function OG(f,h,w){if(!f.__smithy_context)f.__smithy_context={features:{}};else if(!f.__smithy_context.features)f.__smithy_context.features={};f.__smithy_context.features[h]=w}j0(OG,"setFeature");var Jb=class{constructor(f){this.authSchemes=new Map;for(let[h,w]of Object.entries(f))if(w!==void 0)this.authSchemes.set(h,w)}static{j0(this,"DefaultIdentityProviderConfig")}getIdentityProvider(f){return this.authSchemes.get(f)}},Vb=class{static{j0(this,"HttpApiKeyAuthSigner")}async sign(f,h,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(!h.apiKey)throw new Error("request could not be signed with `apiKey` since the `apiKey` is not defined");let s=I2.HttpRequest.clone(f);if(w.in===K4.HttpApiKeyAuthLocation.QUERY)s.query[w.name]=h.apiKey;else if(w.in===K4.HttpApiKeyAuthLocation.HEADER)s.headers[w.name]=w.scheme?`${w.scheme} ${h.apiKey}`:h.apiKey;else throw new Error("request can only be signed with `apiKey` locations `query` or `header`, but found: `"+w.in+"`");return s}},Pb=class{static{j0(this,"HttpBearerAuthSigner")}async sign(f,h,w){let s=I2.HttpRequest.clone(f);if(!h.token)throw new Error("request could not be signed with `token` since the `token` is not defined");return s.headers.Authorization=`Bearer ${h.token}`,s}},Hb=class{static{j0(this,"NoAuthSigner")}async sign(f,h,w){return f}},lG=j0((f)=>(h)=>bG(h)&&h.expiration.getTime()-Date.now()<f,"createIsIdentityExpiredFunction"),vG=300000,Nb=lG(vG),bG=j0((f)=>f.expiration!==void 0,"doesIdentityRequireRefresh"),Db=j0((f,h,w)=>{if(f===void 0)return;let s=typeof f!=="function"?async()=>Promise.resolve(f):f,$,r,E,U=!1,T=j0(async(F)=>{if(!r)r=s(F);try{$=await r,E=!0,U=!1}finally{r=void 0}return $},"coalesceProvider");if(h===void 0)return async(F)=>{if(!E||F?.forceRefresh)$=await T(F);return $};return async(F)=>{if(!E||F?.forceRefresh)$=await T(F);if(U)return $;if(!w($))return U=!0,$;if(h($))return await T(F),$;return $}},"memoizeIdentityProvider")});function qb(f){if(f===void 0)return!0;return typeof f==="string"&&f.length<=50}function jw(f){let h=dG.normalizeProvider(f.userAgentAppId??L2);return{...f,customUserAgent:typeof f.customUserAgent==="string"?[[f.customUserAgent]]:f.customUserAgent,userAgentAppId:async()=>{let w=await h();if(!qb(w)){let s=f.logger?.constructor?.name==="NoOpLogger"||!f.logger?console:f.logger;if(typeof w!=="string")s?.warn("userAgentAppId must be a string or undefined.");else if(w.length>50)s?.warn("The provided userAgentAppId exceeds the maximum length of 50 characters.")}return w}}}var dG,L2=void 0;var iG=B(()=>{dG=p(m0(),1)});class gh{constructor({size:f,params:h}){if(this.data=new Map,this.parameters=[],this.capacity=f??50,h)this.parameters=h}get(f,h){let w=this.hash(f);if(w===!1)return h();if(!this.data.has(w)){if(this.data.size>this.capacity+10){let s=this.data.keys(),$=0;while(!0){let{value:r,done:E}=s.next();if(this.data.delete(r),E||++$>10)break}}this.data.set(w,h())}return this.data.get(w)}size(){return this.data.size}hash(f){let h="",{parameters:w}=this;if(w.length===0)return!1;for(let s of w){let $=String(f[s]??"");if($.includes("|;"))return!1;h+=$+"|;"}return h}}var kb,J$=(f)=>kb.test(f)||f.startsWith("[")&&f.endsWith("]");var B2=B(()=>{kb=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 yb,V$=(f,h=!1)=>{if(!h)return yb.test(f);let w=f.split(".");for(let s of w)if(!V$(s))return!1;return!0};var A2=B(()=>{yb=new RegExp("^(?!.*-$)(?!-)[a-zA-Z0-9-]{1,63}$")});var t1;var J4=B(()=>{t1={}});var mf="endpoints";function N1(f){if(typeof f!=="object"||f==null)return f;if("ref"in f)return`$${N1(f.ref)}`;if("fn"in f)return`${f.fn}(${(f.argv||[]).map(N1).join(", ")})`;return JSON.stringify(f,null,2)}var P$=()=>{};var H0;var cG=B(()=>{H0=class H0 extends Error{constructor(f){super(f);this.name="EndpointError"}}});var gG=()=>{};var xG=()=>{};var _G=()=>{};var nG=()=>{};var eG=()=>{};var aG=()=>{};var D1=B(()=>{cG();gG();xG();_G();nG();eG();aG()});var oG=(f,h)=>f===h;var pG=(f)=>{let h=f.split("."),w=[];for(let s of h){let $=s.indexOf("[");if($!==-1){if(s.indexOf("]")!==s.length-1)throw new H0(`Path: '${f}' does not end with ']'`);let r=s.slice($+1,-1);if(Number.isNaN(parseInt(r)))throw new H0(`Invalid array index: '${r}' in path: '${f}'`);if($!==0)w.push(s.slice(0,$));w.push(r)}else w.push(s)}return w};var uG=B(()=>{D1()});var V4=(f,h)=>pG(h).reduce((w,s)=>{if(typeof w!=="object")throw new H0(`Index '${s}' in '${h}' not found in '${JSON.stringify(f)}'`);else if(Array.isArray(w))return w[parseInt(s)];return w[s]},f);var tG=B(()=>{D1();uG()});var fW=(f)=>f!=null;var hW=(f)=>!f;var P4,G2,wW=(f)=>{let h=(()=>{try{if(f instanceof URL)return f;if(typeof f==="object"&&"hostname"in f){let{hostname:L,port:G,protocol:X="",path:Q="",query:M={}}=f,q=new URL(`${X}//${L}${G?`:${G}`:""}${Q}`);return q.search=Object.entries(M).map(([N,y])=>`${N}=${y}`).join("&"),q}return new URL(f)}catch(L){return null}})();if(!h)return console.error(`Unable to parse ${JSON.stringify(f)} as a whatwg URL.`),null;let w=h.href,{host:s,hostname:$,pathname:r,protocol:E,search:U}=h;if(U)return null;let T=E.slice(0,-1);if(!Object.values(P4.EndpointURLScheme).includes(T))return null;let F=J$($),C=w.includes(`${s}:${G2[T]}`)||typeof f==="string"&&f.includes(`${s}:${G2[T]}`),I=`${s}${C?`:${G2[T]}`:""}`;return{scheme:T,authority:I,path:r,normalizedPath:r.endsWith("/")?r:`${r}/`,isIp:F}};var sW=B(()=>{P4=p(T1(),1);B2();G2={[P4.EndpointURLScheme.HTTP]:80,[P4.EndpointURLScheme.HTTPS]:443}});var $W=(f,h)=>f===h;var rW=(f,h,w,s)=>{if(h>=w||f.length<w)return null;if(!s)return f.substring(h,w);return f.substring(f.length-w,f.length-h)};var EW=(f)=>encodeURIComponent(f).replace(/[!*'()]/g,(h)=>`%${h.charCodeAt(0).toString(16).toUpperCase()}`);var W2=B(()=>{tG();A2();sW()});var UW;var TW=B(()=>{W2();UW={booleanEquals:oG,getAttr:V4,isSet:fW,isValidHostLabel:V$,not:hW,parseURL:wW,stringEquals:$W,substring:rW,uriEncode:EW}});var H4=(f,h)=>{let w=[],s={...h.endpointParams,...h.referenceRecord},$=0;while($<f.length){let r=f.indexOf("{",$);if(r===-1){w.push(f.slice($));break}w.push(f.slice($,r));let E=f.indexOf("}",r);if(E===-1){w.push(f.slice(r));break}if(f[r+1]==="{"&&f[E+1]==="}")w.push(f.slice(r+1,E)),$=E+2;let U=f.substring(r+1,E);if(U.includes("#")){let[T,F]=U.split("#");w.push(V4(s[T],F))}else w.push(s[U]);$=E+1}return w.join("")};var z2=B(()=>{W2()});var FW=({ref:f},h)=>{return{...h.endpointParams,...h.referenceRecord}[f]};var Ah=(f,h,w)=>{if(typeof f==="string")return H4(f,w);else if(f.fn)return N4(f,w);else if(f.ref)return FW(f,w);throw new H0(`'${h}': ${String(f)} is not a string, function or reference.`)};var H$=B(()=>{D1();R2();z2()});var N4=({fn:f,argv:h},w)=>{let s=h.map((r)=>["boolean","number"].includes(typeof r)?r:Ah(r,"arg",w)),$=f.split(".");if($[0]in t1&&$[1]!=null)return t1[$[0]][$[1]](...s);return UW[f](...s)};var R2=B(()=>{J4();TW();H$()});var CW=({assign:f,...h},w)=>{if(f&&f in w.referenceRecord)throw new H0(`'${f}' is already defined in Reference Record.`);let s=N4(h,w);return w.logger?.debug?.(`${mf} evaluateCondition: ${N1(h)} = ${N1(s)}`),{result:s===""?!0:!!s,...f!=null&&{toAssign:{name:f,value:s}}}};var IW=B(()=>{P$();D1();R2()});var Ow=(f=[],h)=>{let w={};for(let s of f){let{result:$,toAssign:r}=CW(s,{...h,referenceRecord:{...h.referenceRecord,...w}});if(!$)return{result:$};if(r)w[r.name]=r.value,h.logger?.debug?.(`${mf} assign: ${r.name} := ${N1(r.value)}`)}return{result:!0,referenceRecord:w}};var D4=B(()=>{P$();IW()});var LW=(f,h)=>Object.entries(f).reduce((w,[s,$])=>({...w,[s]:$.map((r)=>{let E=Ah(r,"Header value entry",h);if(typeof E!=="string")throw new H0(`Header '${s}' value '${E}' is not a string`);return E})}),{});var BW=B(()=>{D1();H$()});var X2=(f,h)=>{if(Array.isArray(f))return f.map((w)=>X2(w,h));switch(typeof f){case"string":return H4(f,h);case"object":if(f===null)throw new H0(`Unexpected endpoint property: ${f}`);return q4(f,h);case"boolean":return f;default:throw new H0(`Unexpected endpoint property type: ${typeof f}`)}};var AW=B(()=>{D1();z2();S2()});var q4=(f,h)=>Object.entries(f).reduce((w,[s,$])=>({...w,[s]:X2($,h)}),{});var S2=B(()=>{AW()});var GW=(f,h)=>{let w=Ah(f,"Endpoint URL",h);if(typeof w==="string")try{return new URL(w)}catch(s){throw console.error(`Failed to construct URL with ${w}`,s),s}throw new H0(`Endpoint URL must be a string, got ${typeof w}`)};var WW=B(()=>{D1();H$()});var zW=(f,h)=>{let{conditions:w,endpoint:s}=f,{result:$,referenceRecord:r}=Ow(w,h);if(!$)return;let E={...h,referenceRecord:{...h.referenceRecord,...r}},{url:U,properties:T,headers:F}=s;return h.logger?.debug?.(`${mf} Resolving endpoint from template: ${N1(s)}`),{...F!=null&&{headers:LW(F,E)},...T!=null&&{properties:q4(T,E)},url:GW(U,E)}};var RW=B(()=>{P$();D4();BW();S2();WW()});var XW=(f,h)=>{let{conditions:w,error:s}=f,{result:$,referenceRecord:r}=Ow(w,h);if(!$)return;throw new H0(Ah(s,"Error",{...h,referenceRecord:{...h.referenceRecord,...r}}))};var SW=B(()=>{D1();D4();H$()});var YW=(f,h)=>{let{conditions:w,rules:s}=f,{result:$,referenceRecord:r}=Ow(w,h);if(!$)return;return k4(s,{...h,referenceRecord:{...h.referenceRecord,...r}})};var MW=B(()=>{D4();Y2()});var k4=(f,h)=>{for(let w of f)if(w.type==="endpoint"){let s=zW(w,h);if(s)return s}else if(w.type==="error")XW(w,h);else if(w.type==="tree"){let s=YW(w,h);if(s)return s}else throw new H0(`Unknown endpoint rule: ${w}`);throw new H0("Rules evaluation failed")};var Y2=B(()=>{D1();RW();SW();MW()});var QW=B(()=>{J4();Y2()});var xh=(f,h)=>{let{endpointParams:w,logger:s}=h,{parameters:$,rules:r}=f;h.logger?.debug?.(`${mf} Initial EndpointParams: ${N1(w)}`);let E=Object.entries($).filter(([,F])=>F.default!=null).map(([F,C])=>[F,C.default]);if(E.length>0)for(let[F,C]of E)w[F]=w[F]??C;let U=Object.entries($).filter(([,F])=>F.required).map(([F])=>F);for(let F of U)if(w[F]==null)throw new H0(`Missing required parameter: '${F}'`);let T=k4(r,{endpointParams:w,logger:s,referenceRecord:{}});return h.logger?.debug?.(`${mf} Resolved endpoint: ${N1(T)}`),T};var KW=B(()=>{P$();D1();QW()});var df=B(()=>{B2();A2();J4();KW();D1()});var M2=B(()=>{df()});var Q2=(f,h=!1)=>{if(h){for(let w of f.split("."))if(!Q2(w))return!1;return!0}if(!V$(f))return!1;if(f.length<3||f.length>63)return!1;if(f!==f.toLowerCase())return!1;if(J$(f))return!1;return!0};var ZW=B(()=>{df();M2()});var JW=(f)=>{let h=f.split(":");if(h.length<6)return null;let[w,s,$,r,E,...U]=h;if(w!=="arn"||s===""||$===""||U.join(":")==="")return null;let T=U.map((F)=>F.split("/")).flat();return{partition:s,service:$,region:r,accountId:E,resourceId:T}};var PW;var VW=B(()=>{PW={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)"},"ap-southeast-7":{description:"Asia Pacific (Thailand)"},"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)"},"mx-central-1":{description:"Mexico (Central)"},"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:{"aws-iso-f-global":{description:"AWS ISOF global region"},"us-isof-east-1":{description:"US ISOF EAST"},"us-isof-south-1":{description:"US ISOF SOUTH"}}}],version:"1.1"}});var Ob,lb="",HW=(f)=>{let{partitions:h}=Ob;for(let s of h){let{regions:$,outputs:r}=s;for(let[E,U]of Object.entries($))if(E===f)return{...r,...U}}for(let s of h){let{regionRegex:$,outputs:r}=s;if(new RegExp($).test(f))return{...r}}let w=h.find((s)=>s.id==="aws");if(!w)throw new Error("Provided region was not found in the partition array or regex, and default partition with id 'aws' doesn't exist.");return{...w.outputs}},NW=()=>lb;var K2=B(()=>{VW();Ob=PW});var _h;var DW=B(()=>{df();ZW();K2();_h={isVirtualHostableS3Bucket:Q2,parseArn:JW,partition:HW};t1.aws=_h});var qW=B(()=>{df()});var kW=B(()=>{df()});var yW=()=>{};var jW=()=>{};var OW=()=>{};var lW=()=>{};var vW=()=>{};var bW=B(()=>{kW();yW();jW();OW();lW();vW()});var N$=B(()=>{DW();K2();M2();qW();bW()});var l4=H((w20,O4)=>{var mW,dW,iW,cW,gW,xW,_W,nW,eW,aW,oW,pW,uW,y4,Z2,tW,fz,hz,lw,wz,sz,$z,rz,Ez,Uz,Tz,Fz,Cz,j4,Iz,Lz,Bz;(function(f){var h=typeof global==="object"?global:typeof self==="object"?self:typeof this==="object"?this:{};if(typeof define==="function"&&define.amd)define("tslib",["exports"],function(s){f(w(h,w(s)))});else if(typeof O4==="object"&&typeof w20==="object")f(w(h,w(w20)));else f(w(h));function w(s,$){if(s!==h)if(typeof Object.create==="function")Object.defineProperty(s,"__esModule",{value:!0});else s.__esModule=!0;return function(r,E){return s[r]=$?$(r,E):E}}})(function(f){var h=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,E){r.__proto__=E}||function(r,E){for(var U in E)if(Object.prototype.hasOwnProperty.call(E,U))r[U]=E[U]};mW=function(r,E){if(typeof E!=="function"&&E!==null)throw new TypeError("Class extends value "+String(E)+" is not a constructor or null");h(r,E);function U(){this.constructor=r}r.prototype=E===null?Object.create(E):(U.prototype=E.prototype,new U)},dW=Object.assign||function(r){for(var E,U=1,T=arguments.length;U<T;U++){E=arguments[U];for(var F in E)if(Object.prototype.hasOwnProperty.call(E,F))r[F]=E[F]}return r},iW=function(r,E){var U={};for(var T in r)if(Object.prototype.hasOwnProperty.call(r,T)&&E.indexOf(T)<0)U[T]=r[T];if(r!=null&&typeof Object.getOwnPropertySymbols==="function"){for(var F=0,T=Object.getOwnPropertySymbols(r);F<T.length;F++)if(E.indexOf(T[F])<0&&Object.prototype.propertyIsEnumerable.call(r,T[F]))U[T[F]]=r[T[F]]}return U},cW=function(r,E,U,T){var F=arguments.length,C=F<3?E:T===null?T=Object.getOwnPropertyDescriptor(E,U):T,I;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")C=Reflect.decorate(r,E,U,T);else for(var L=r.length-1;L>=0;L--)if(I=r[L])C=(F<3?I(C):F>3?I(E,U,C):I(E,U))||C;return F>3&&C&&Object.defineProperty(E,U,C),C},gW=function(r,E){return function(U,T){E(U,T,r)}},xW=function(r,E,U,T,F,C){function I(b0){if(b0!==void 0&&typeof b0!=="function")throw new TypeError("Function expected");return b0}var L=T.kind,G=L==="getter"?"get":L==="setter"?"set":"value",X=!E&&r?T.static?r:r.prototype:null,Q=E||(X?Object.getOwnPropertyDescriptor(X,T.name):{}),M,q=!1;for(var N=U.length-1;N>=0;N--){var y={};for(var n in T)y[n]=n==="access"?{}:T[n];for(var n in T.access)y.access[n]=T.access[n];y.addInitializer=function(b0){if(q)throw new TypeError("Cannot add initializers after decoration has completed");C.push(I(b0||null))};var L0=U[N](L==="accessor"?{get:Q.get,set:Q.set}:Q[G],y);if(L==="accessor"){if(L0===void 0)continue;if(L0===null||typeof L0!=="object")throw new TypeError("Object expected");if(M=I(L0.get))Q.get=M;if(M=I(L0.set))Q.set=M;if(M=I(L0.init))F.unshift(M)}else if(M=I(L0))if(L==="field")F.unshift(M);else Q[G]=M}if(X)Object.defineProperty(X,T.name,Q);q=!0},_W=function(r,E,U){var T=arguments.length>2;for(var F=0;F<E.length;F++)U=T?E[F].call(r,U):E[F].call(r);return T?U:void 0},nW=function(r){return typeof r==="symbol"?r:"".concat(r)},eW=function(r,E,U){if(typeof E==="symbol")E=E.description?"[".concat(E.description,"]"):"";return Object.defineProperty(r,"name",{configurable:!0,value:U?"".concat(U," ",E):E})},aW=function(r,E){if(typeof Reflect==="object"&&typeof Reflect.metadata==="function")return Reflect.metadata(r,E)},oW=function(r,E,U,T){function F(C){return C instanceof U?C:new U(function(I){I(C)})}return new(U||(U=Promise))(function(C,I){function L(Q){try{X(T.next(Q))}catch(M){I(M)}}function G(Q){try{X(T.throw(Q))}catch(M){I(M)}}function X(Q){Q.done?C(Q.value):F(Q.value).then(L,G)}X((T=T.apply(r,E||[])).next())})},pW=function(r,E){var U={label:0,sent:function(){if(C[0]&1)throw C[1];return C[1]},trys:[],ops:[]},T,F,C,I=Object.create((typeof Iterator==="function"?Iterator:Object).prototype);return I.next=L(0),I.throw=L(1),I.return=L(2),typeof Symbol==="function"&&(I[Symbol.iterator]=function(){return this}),I;function L(X){return function(Q){return G([X,Q])}}function G(X){if(T)throw new TypeError("Generator is already executing.");while(I&&(I=0,X[0]&&(U=0)),U)try{if(T=1,F&&(C=X[0]&2?F.return:X[0]?F.throw||((C=F.return)&&C.call(F),0):F.next)&&!(C=C.call(F,X[1])).done)return C;if(F=0,C)X=[X[0]&2,C.value];switch(X[0]){case 0:case 1:C=X;break;case 4:return U.label++,{value:X[1],done:!1};case 5:U.label++,F=X[1],X=[0];continue;case 7:X=U.ops.pop(),U.trys.pop();continue;default:if((C=U.trys,!(C=C.length>0&&C[C.length-1]))&&(X[0]===6||X[0]===2)){U=0;continue}if(X[0]===3&&(!C||X[1]>C[0]&&X[1]<C[3])){U.label=X[1];break}if(X[0]===6&&U.label<C[1]){U.label=C[1],C=X;break}if(C&&U.label<C[2]){U.label=C[2],U.ops.push(X);break}if(C[2])U.ops.pop();U.trys.pop();continue}X=E.call(r,U)}catch(Q){X=[6,Q],F=0}finally{T=C=0}if(X[0]&5)throw X[1];return{value:X[0]?X[1]:void 0,done:!0}}},uW=function(r,E){for(var U in r)if(U!=="default"&&!Object.prototype.hasOwnProperty.call(E,U))j4(E,r,U)},j4=Object.create?function(r,E,U,T){if(T===void 0)T=U;var F=Object.getOwnPropertyDescriptor(E,U);if(!F||("get"in F?!E.__esModule:F.writable||F.configurable))F={enumerable:!0,get:function(){return E[U]}};Object.defineProperty(r,T,F)}:function(r,E,U,T){if(T===void 0)T=U;r[T]=E[U]},y4=function(r){var E=typeof Symbol==="function"&&Symbol.iterator,U=E&&r[E],T=0;if(U)return U.call(r);if(r&&typeof r.length==="number")return{next:function(){if(r&&T>=r.length)r=void 0;return{value:r&&r[T++],done:!r}}};throw new TypeError(E?"Object is not iterable.":"Symbol.iterator is not defined.")},Z2=function(r,E){var U=typeof Symbol==="function"&&r[Symbol.iterator];if(!U)return r;var T=U.call(r),F,C=[],I;try{while((E===void 0||E-- >0)&&!(F=T.next()).done)C.push(F.value)}catch(L){I={error:L}}finally{try{if(F&&!F.done&&(U=T.return))U.call(T)}finally{if(I)throw I.error}}return C},tW=function(){for(var r=[],E=0;E<arguments.length;E++)r=r.concat(Z2(arguments[E]));return r},fz=function(){for(var r=0,E=0,U=arguments.length;E<U;E++)r+=arguments[E].length;for(var T=Array(r),F=0,E=0;E<U;E++)for(var C=arguments[E],I=0,L=C.length;I<L;I++,F++)T[F]=C[I];return T},hz=function(r,E,U){if(U||arguments.length===2){for(var T=0,F=E.length,C;T<F;T++)if(C||!(T in E)){if(!C)C=Array.prototype.slice.call(E,0,T);C[T]=E[T]}}return r.concat(C||Array.prototype.slice.call(E))},lw=function(r){return this instanceof lw?(this.v=r,this):new lw(r)},wz=function(r,E,U){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var T=U.apply(r,E||[]),F,C=[];return F=Object.create((typeof AsyncIterator==="function"?AsyncIterator:Object).prototype),L("next"),L("throw"),L("return",I),F[Symbol.asyncIterator]=function(){return this},F;function I(N){return function(y){return Promise.resolve(y).then(N,M)}}function L(N,y){if(T[N]){if(F[N]=function(n){return new Promise(function(L0,b0){C.push([N,n,L0,b0])>1||G(N,n)})},y)F[N]=y(F[N])}}function G(N,y){try{X(T[N](y))}catch(n){q(C[0][3],n)}}function X(N){N.value instanceof lw?Promise.resolve(N.value.v).then(Q,M):q(C[0][2],N)}function Q(N){G("next",N)}function M(N){G("throw",N)}function q(N,y){if(N(y),C.shift(),C.length)G(C[0][0],C[0][1])}},sz=function(r){var E,U;return E={},T("next"),T("throw",function(F){throw F}),T("return"),E[Symbol.iterator]=function(){return this},E;function T(F,C){E[F]=r[F]?function(I){return(U=!U)?{value:lw(r[F](I)),done:!1}:C?C(I):I}:C}},$z=function(r){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var E=r[Symbol.asyncIterator],U;return E?E.call(r):(r=typeof y4==="function"?y4(r):r[Symbol.iterator](),U={},T("next"),T("throw"),T("return"),U[Symbol.asyncIterator]=function(){return this},U);function T(C){U[C]=r[C]&&function(I){return new Promise(function(L,G){I=r[C](I),F(L,G,I.done,I.value)})}}function F(C,I,L,G){Promise.resolve(G).then(function(X){C({value:X,done:L})},I)}},rz=function(r,E){if(Object.defineProperty)Object.defineProperty(r,"raw",{value:E});else r.raw=E;return r};var w=Object.create?function(r,E){Object.defineProperty(r,"default",{enumerable:!0,value:E})}:function(r,E){r.default=E},s=function(r){return s=Object.getOwnPropertyNames||function(E){var U=[];for(var T in E)if(Object.prototype.hasOwnProperty.call(E,T))U[U.length]=T;return U},s(r)};Ez=function(r){if(r&&r.__esModule)return r;var E={};if(r!=null){for(var U=s(r),T=0;T<U.length;T++)if(U[T]!=="default")j4(E,r,U[T])}return w(E,r),E},Uz=function(r){return r&&r.__esModule?r:{default:r}},Tz=function(r,E,U,T){if(U==="a"&&!T)throw new TypeError("Private accessor was defined without a getter");if(typeof E==="function"?r!==E||!T:!E.has(r))throw new TypeError("Cannot read private member from an object whose class did not declare it");return U==="m"?T:U==="a"?T.call(r):T?T.value:E.get(r)},Fz=function(r,E,U,T,F){if(T==="m")throw new TypeError("Private method is not writable");if(T==="a"&&!F)throw new TypeError("Private accessor was defined without a setter");if(typeof E==="function"?r!==E||!F:!E.has(r))throw new TypeError("Cannot write private member to an object whose class did not declare it");return T==="a"?F.call(r,U):F?F.value=U:E.set(r,U),U},Cz=function(r,E){if(E===null||typeof E!=="object"&&typeof E!=="function")throw new TypeError("Cannot use 'in' operator on non-object");return typeof r==="function"?E===r:r.has(E)},Iz=function(r,E,U){if(E!==null&&E!==void 0){if(typeof E!=="object"&&typeof E!=="function")throw new TypeError("Object expected.");var T,F;if(U){if(!Symbol.asyncDispose)throw new TypeError("Symbol.asyncDispose is not defined.");T=E[Symbol.asyncDispose]}if(T===void 0){if(!Symbol.dispose)throw new TypeError("Symbol.dispose is not defined.");if(T=E[Symbol.dispose],U)F=T}if(typeof T!=="function")throw new TypeError("Object not disposable.");if(F)T=function(){try{F.call(this)}catch(C){return Promise.reject(C)}};r.stack.push({value:E,dispose:T,async:U})}else if(U)r.stack.push({async:!0});return E};var $=typeof SuppressedError==="function"?SuppressedError:function(r,E,U){var T=new Error(U);return T.name="SuppressedError",T.error=r,T.suppressed=E,T};Lz=function(r){function E(C){r.error=r.hasError?new $(C,r.error,"An error was suppressed during disposal."):C,r.hasError=!0}var U,T=0;function F(){while(U=r.stack.pop())try{if(!U.async&&T===1)return T=0,r.stack.push(U),Promise.resolve().then(F);if(U.dispose){var C=U.dispose.call(U.value);if(U.async)return T|=2,Promise.resolve(C).then(F,function(I){return E(I),F()})}else T|=1}catch(I){E(I)}if(T===1)return r.hasError?Promise.reject(r.error):Promise.resolve();if(r.hasError)throw r.error}return F()},Bz=function(r,E){if(typeof r==="string"&&/^\.\.?\//.test(r))return r.replace(/\.(tsx)$|((?:\.d)?)((?:\.[^./]+?)?)\.([cm]?)ts$/i,function(U,T,F,C,I){return T?E?".jsx":".js":F&&(!C||!I)?U:F+C+"."+I.toLowerCase()+"js"});return r},f("__extends",mW),f("__assign",dW),f("__rest",iW),f("__decorate",cW),f("__param",gW),f("__esDecorate",xW),f("__runInitializers",_W),f("__propKey",nW),f("__setFunctionName",eW),f("__metadata",aW),f("__awaiter",oW),f("__generator",pW),f("__exportStar",uW),f("__createBinding",j4),f("__values",y4),f("__read",Z2),f("__spread",tW),f("__spreadArrays",fz),f("__spreadArray",hz),f("__await",lw),f("__asyncGenerator",wz),f("__asyncDelegator",sz),f("__asyncValues",$z),f("__makeTemplateObject",rz),f("__importStar",Ez),f("__importDefault",Uz),f("__classPrivateFieldGet",Tz),f("__classPrivateFieldSet",Fz),f("__classPrivateFieldIn",Cz),f("__addDisposableResource",Iz),f("__disposeResources",Lz),f("__rewriteRelativeImportExtension",Bz)})});var C1=H((s20,zz)=>{var{defineProperty:v4,getOwnPropertyDescriptor:vb,getOwnPropertyNames:bb}=Object,mb=Object.prototype.hasOwnProperty,V2=(f,h)=>v4(f,"name",{value:h,configurable:!0}),db=(f,h)=>{for(var w in h)v4(f,w,{get:h[w],enumerable:!0})},ib=(f,h,w,s)=>{if(h&&typeof h==="object"||typeof h==="function"){for(let $ of bb(h))if(!mb.call(f,$)&&$!==w)v4(f,$,{get:()=>h[$],enumerable:!(s=vb(h,$))||s.enumerable})}return f},cb=(f)=>ib(v4({},"__esModule",{value:!0}),f),Az={};db(Az,{emitWarningIfUnsupportedVersion:()=>gb,setCredentialFeature:()=>Gz,setFeature:()=>Wz,state:()=>J2});zz.exports=cb(Az);var J2={warningEmitted:!1},gb=V2((f)=>{if(f&&!J2.warningEmitted&&parseInt(f.substring(1,f.indexOf(".")))<18)J2.warningEmitted=!0,process.emitWarning(`NodeDeprecationWarning: The AWS SDK for JavaScript (v3) will
10
+ or increase socketAcquisitionWarningTimeout=(millis) in the NodeHttpHandler config.`),Date.now()}return w}resolveDefaultConfig(h){let{requestTimeout:w,connectionTimeout:s,socketTimeout:$,socketAcquisitionWarningTimeout:r,httpAgent:E,httpsAgent:U}=h||{},T=!0,F=50;return{connectionTimeout:s,requestTimeout:w??$,socketAcquisitionWarningTimeout:r,httpAgent:(()=>{if(E instanceof oT.Agent||typeof E?.destroy==="function")return E;return new oT.Agent({keepAlive:!0,maxSockets:50,...E})})(),httpsAgent:(()=>{if(U instanceof pT.Agent||typeof U?.destroy==="function")return U;return new pT.Agent({keepAlive:!0,maxSockets:50,...U})})(),logger:console}}destroy(){this.config?.httpAgent?.destroy(),this.config?.httpsAgent?.destroy()}async handle(h,{abortSignal:w}={}){if(!this.config)this.config=await this.configProvider;return new Promise((s,$)=>{let r=void 0,E=[],U=K0(async(y)=>{await r,E.forEach(z1.clearTimeout),s(y)},"resolve"),T=K0(async(y)=>{await r,E.forEach(z1.clearTimeout),$(y)},"reject");if(!this.config)throw new Error("Node HTTP request handler config is not resolved");if(w?.aborted){let y=new Error("Request aborted");y.name="AbortError",T(y);return}let F=h.protocol==="https:",C=F?this.config.httpsAgent:this.config.httpAgent;E.push(z1.setTimeout(()=>{this.socketWarningTimestamp=f.checkSocketUsage(C,this.socketWarningTimestamp,this.config.logger)},this.config.socketAcquisitionWarningTimeout??(this.config.requestTimeout??2000)+(this.config.connectionTimeout??1000)));let I=jA.buildQueryString(h.query||{}),L=void 0;if(h.username!=null||h.password!=null){let y=h.username??"",n=h.password??"";L=`${y}:${n}`}let G=h.path;if(I)G+=`?${I}`;if(h.fragment)G+=`#${h.fragment}`;let X=h.hostname??"";if(X[0]==="["&&X.endsWith("]"))X=h.hostname.slice(1,-1);else X=h.hostname;let Q={headers:h.headers,host:X,method:h.method,path:G,port:h.port,agent:C,auth:L},q=(F?pT.request:oT.request)(Q,(y)=>{let n=new yA.HttpResponse({statusCode:y.statusCode||-1,reason:y.statusMessage,headers:OA(y.headers),body:y});U({response:n})});if(q.on("error",(y)=>{if(Cv.includes(y.code))T(Object.assign(y,{name:"TimeoutError"}));else T(y)}),w){let y=K0(()=>{q.destroy();let n=new Error("Request aborted");n.name="AbortError",T(n)},"onAbort");if(typeof w.addEventListener==="function"){let n=w;n.addEventListener("abort",y,{once:!0}),q.once("close",()=>n.removeEventListener("abort",y))}else w.onabort=y}E.push(Iv(q,T,this.config.connectionTimeout)),E.push(Av(q,T,this.config.requestTimeout));let N=Q.agent;if(typeof N==="object"&&"keepAlive"in N)E.push(Bv(q,{keepAlive:N.keepAlive,keepAliveMsecs:N.keepAliveMsecs}));r=uT(q,h,this.config.requestTimeout).catch((y)=>{return E.forEach(z1.clearTimeout),$(y)})})}updateHttpClientConfig(h,w){this.config=void 0,this.configProvider=this.configProvider.then((s)=>{return{...s,[h]:w}})}httpHandlerConfigs(){return this.config??{}}},DA=B0("http2"),Wv=Tv(B0("http2")),zv=class{constructor(f){this.sessions=[],this.sessions=f??[]}static{K0(this,"NodeHttp2ConnectionPool")}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((h)=>h!==f)}[Symbol.iterator](){return this.sessions[Symbol.iterator]()}destroy(f){for(let h of this.sessions)if(h===f){if(!h.destroyed)h.destroy()}}},Rv=class{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.")}static{K0(this,"NodeHttp2ConnectionManager")}lease(f,h){let w=this.getUrlString(f),s=this.sessionCache.get(w);if(s){let U=s.poll();if(U&&!this.config.disableConcurrency)return U}let $=Wv.default.connect(w);if(this.config.maxConcurrency)$.settings({maxConcurrentStreams:this.config.maxConcurrency},(U)=>{if(U)throw new Error("Fail to set maxConcurrentStreams to "+this.config.maxConcurrency+"when creating new session for "+f.destination.toString())});$.unref();let r=K0(()=>{$.destroy(),this.deleteSession(w,$)},"destroySessionCb");if($.on("goaway",r),$.on("error",r),$.on("frameError",r),$.on("close",()=>this.deleteSession(w,$)),h.requestTimeout)$.setTimeout(h.requestTimeout,r);let E=this.sessionCache.get(w)||new zv;return E.offerLast($),this.sessionCache.set(w,E),$}deleteSession(f,h){let w=this.sessionCache.get(f);if(!w)return;if(!w.contains(h))return;w.remove(h),this.sessionCache.set(f,w)}release(f,h){let w=this.getUrlString(f);this.sessionCache.get(w)?.offerLast(h)}destroy(){for(let[f,h]of this.sessionCache){for(let w of h){if(!w.destroyed)w.destroy();h.remove(w)}this.sessionCache.delete(f)}}setMaxConcurrentStreams(f){if(f&&f<=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()}},Xv=class f{constructor(h){this.metadata={handlerProtocol:"h2"},this.connectionManager=new Rv({}),this.configProvider=new Promise((w,s)=>{if(typeof h==="function")h().then(($)=>{w($||{})}).catch(s);else w(h||{})})}static{K0(this,"NodeHttp2Handler")}static create(h){if(typeof h?.handle==="function")return h;return new f(h)}destroy(){this.connectionManager.destroy()}async handle(h,{abortSignal:w}={}){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)}let{requestTimeout:s,disableConcurrentStreams:$}=this.config;return new Promise((r,E)=>{let U=!1,T=void 0,F=K0(async(X0)=>{await T,r(X0)},"resolve"),C=K0(async(X0)=>{await T,E(X0)},"reject");if(w?.aborted){U=!0;let X0=new Error("Request aborted");X0.name="AbortError",C(X0);return}let{hostname:I,method:L,port:G,protocol:X,query:Q}=h,M="";if(h.username!=null||h.password!=null){let X0=h.username??"",p1=h.password??"";M=`${X0}:${p1}@`}let q=`${X}//${M}${I}${G?`:${G}`:""}`,N={destination:new URL(q)},y=this.connectionManager.lease(N,{requestTimeout:this.config?.sessionTimeout,disableConcurrentStreams:$||!1}),n=K0((X0)=>{if($)this.destroySession(y);U=!0,C(X0)},"rejectWithDestroy"),L0=jA.buildQueryString(Q||{}),b0=h.path;if(L0)b0+=`?${L0}`;if(h.fragment)b0+=`#${h.fragment}`;let $1=y.request({...h.headers,[DA.constants.HTTP2_HEADER_PATH]:b0,[DA.constants.HTTP2_HEADER_METHOD]:L});if(y.ref(),$1.on("response",(X0)=>{let p1=new yA.HttpResponse({statusCode:X0[":status"]||-1,headers:OA(X0),body:$1});if(U=!0,F({response:p1}),$)y.close(),this.connectionManager.deleteSession(q,y)}),s)$1.setTimeout(s,()=>{$1.close();let X0=new Error(`Stream timed out because of no activity for ${s} ms`);X0.name="TimeoutError",n(X0)});if(w){let X0=K0(()=>{$1.close();let p1=new Error("Request aborted");p1.name="AbortError",n(p1)},"onAbort");if(typeof w.addEventListener==="function"){let p1=w;p1.addEventListener("abort",X0,{once:!0}),$1.once("close",()=>p1.removeEventListener("abort",X0))}else w.onabort=X0}$1.on("frameError",(X0,p1,qj)=>{n(new Error(`Frame type id ${X0} in stream id ${qj} has failed with code ${p1}.`))}),$1.on("error",n),$1.on("aborted",()=>{n(new Error(`HTTP/2 stream is abnormally aborted in mid-communication with result code ${$1.rstCode}.`))}),$1.on("close",()=>{if(y.unref(),$)y.destroy();if(!U)n(new Error("Unexpected error: http2 request did not get a response"))}),T=uT($1,h,s)})}updateHttpClientConfig(h,w){this.config=void 0,this.configProvider=this.configProvider.then((s)=>{return{...s,[h]:w}})}httpHandlerConfigs(){return this.config??{}}destroySession(h){if(!h.destroyed)h.destroy()}},Sv=class extends lA.Writable{constructor(){super(...arguments);this.bufferedBytes=[]}static{K0(this,"Collector")}_write(f,h,w){this.bufferedBytes.push(f),w()}},Yv=K0((f)=>{if(Mv(f))return mA(f);return new Promise((h,w)=>{let s=new Sv;f.pipe(s),f.on("error",($)=>{s.end(),w($)}),s.on("error",w),s.on("finish",function(){let $=new Uint8Array(Buffer.concat(this.bufferedBytes));h($)})})},"streamCollector"),Mv=K0((f)=>typeof ReadableStream==="function"&&f instanceof ReadableStream,"isReadableStreamInstance");async function mA(f){let h=[],w=f.getReader(),s=!1,$=0;while(!s){let{done:U,value:T}=await w.read();if(T)h.push(T),$+=T.length;s=U}let r=new Uint8Array($),E=0;for(let U of h)r.set(U,E),E+=U.length;return r}K0(mA,"collectReadableStream")});var aA=H((GU0,eA)=>{var{defineProperty:Y4,getOwnPropertyDescriptor:Qv,getOwnPropertyNames:Kv}=Object,Zv=Object.prototype.hasOwnProperty,Rf=(f,h)=>Y4(f,"name",{value:h,configurable:!0}),Jv=(f,h)=>{for(var w in h)Y4(f,w,{get:h[w],enumerable:!0})},Vv=(f,h,w,s)=>{if(h&&typeof h==="object"||typeof h==="function"){for(let $ of Kv(h))if(!Zv.call(f,$)&&$!==w)Y4(f,$,{get:()=>h[$],enumerable:!(s=Qv(h,$))||s.enumerable})}return f},Pv=(f)=>Vv(Y4({},"__esModule",{value:!0}),f),cA={};Jv(cA,{FetchHttpHandler:()=>Nv,keepAliveSupport:()=>S4,streamCollector:()=>qv});eA.exports=Pv(cA);var iA=t0(),Hv=aT();function tT(f,h){return new Request(f,h)}Rf(tT,"createRequest");function gA(f=0){return new Promise((h,w)=>{if(f)setTimeout(()=>{let s=new Error(`Request did not complete within ${f} ms`);s.name="TimeoutError",w(s)},f)})}Rf(gA,"requestTimeout");var S4={supported:void 0},Nv=class f{static{Rf(this,"FetchHttpHandler")}static create(h){if(typeof h?.handle==="function")return h;return new f(h)}constructor(h){if(typeof h==="function")this.configProvider=h().then((w)=>w||{});else this.config=h??{},this.configProvider=Promise.resolve(this.config);if(S4.supported===void 0)S4.supported=Boolean(typeof Request!=="undefined"&&"keepalive"in tT("https://[::1]"))}destroy(){}async handle(h,{abortSignal:w}={}){if(!this.config)this.config=await this.configProvider;let s=this.config.requestTimeout,$=this.config.keepAlive===!0,r=this.config.credentials;if(w?.aborted){let q=new Error("Request aborted");return q.name="AbortError",Promise.reject(q)}let E=h.path,U=Hv.buildQueryString(h.query||{});if(U)E+=`?${U}`;if(h.fragment)E+=`#${h.fragment}`;let T="";if(h.username!=null||h.password!=null){let q=h.username??"",N=h.password??"";T=`${q}:${N}@`}let{port:F,method:C}=h,I=`${h.protocol}//${T}${h.hostname}${F?`:${F}`:""}${E}`,L=C==="GET"||C==="HEAD"?void 0:h.body,G={body:L,headers:new Headers(h.headers),method:C,credentials:r};if(this.config?.cache)G.cache=this.config.cache;if(L)G.duplex="half";if(typeof AbortController!=="undefined")G.signal=w;if(S4.supported)G.keepalive=$;if(typeof this.config.requestInit==="function")Object.assign(G,this.config.requestInit(h));let X=Rf(()=>{},"removeSignalEventListener"),Q=tT(I,G),M=[fetch(Q).then((q)=>{let N=q.headers,y={};for(let L0 of N.entries())y[L0[0]]=L0[1];if(q.body==null)return q.blob().then((L0)=>({response:new iA.HttpResponse({headers:y,reason:q.statusText,statusCode:q.status,body:L0})}));return{response:new iA.HttpResponse({headers:y,reason:q.statusText,statusCode:q.status,body:q.body})}}),gA(s)];if(w)M.push(new Promise((q,N)=>{let y=Rf(()=>{let n=new Error("Request aborted");n.name="AbortError",N(n)},"onAbort");if(typeof w.addEventListener==="function"){let n=w;n.addEventListener("abort",y,{once:!0}),X=Rf(()=>n.removeEventListener("abort",y),"removeSignalEventListener")}else w.onabort=y}));return Promise.race(M).finally(X)}updateHttpClientConfig(h,w){this.config=void 0,this.configProvider=this.configProvider.then((s)=>{return s[h]=w,s})}httpHandlerConfigs(){return this.config??{}}},Dv=Ih(),qv=Rf(async(f)=>{if(typeof Blob==="function"&&f instanceof Blob||f.constructor?.name==="Blob"){if(Blob.prototype.arrayBuffer!==void 0)return new Uint8Array(await f.arrayBuffer());return xA(f)}return _A(f)},"streamCollector");async function xA(f){let h=await nA(f),w=Dv.fromBase64(h);return new Uint8Array(w)}Rf(xA,"collectBlob");async function _A(f){let h=[],w=f.getReader(),s=!1,$=0;while(!s){let{done:U,value:T}=await w.read();if(T)h.push(T),$+=T.length;s=U}let r=new Uint8Array($),E=0;for(let U of h)r.set(U,E),E+=U.length;return r}Rf(_A,"collectStream");function nA(f){return new Promise((h,w)=>{let s=new FileReader;s.onloadend=()=>{if(s.readyState!==2)return w(new Error("Reader aborted too early"));let $=s.result??"",r=$.indexOf(","),E=r>-1?r+1:$.length;h($.substring(E))},s.onabort=()=>w(new Error("Read aborted")),s.onerror=()=>w(s.error),s.readAsDataURL(f)})}Rf(nA,"readToBase64")});var h2=H((WU0,hG)=>{var{defineProperty:M4,getOwnPropertyDescriptor:kv,getOwnPropertyNames:yv}=Object,jv=Object.prototype.hasOwnProperty,oA=(f,h)=>M4(f,"name",{value:h,configurable:!0}),Ov=(f,h)=>{for(var w in h)M4(f,w,{get:h[w],enumerable:!0})},lv=(f,h,w,s)=>{if(h&&typeof h==="object"||typeof h==="function"){for(let $ of yv(h))if(!jv.call(f,$)&&$!==w)M4(f,$,{get:()=>h[$],enumerable:!(s=kv(h,$))||s.enumerable})}return f},vv=(f)=>lv(M4({},"__esModule",{value:!0}),f),pA={};Ov(pA,{fromHex:()=>tA,toHex:()=>fG});hG.exports=vv(pA);var uA={},f2={};for(let f=0;f<256;f++){let h=f.toString(16).toLowerCase();if(h.length===1)h=`0${h}`;uA[f]=h,f2[h]=f}function tA(f){if(f.length%2!==0)throw new Error("Hex encoded strings must have an even number length");let h=new Uint8Array(f.length/2);for(let w=0;w<f.length;w+=2){let s=f.slice(w,w+2).toLowerCase();if(s in f2)h[w/2]=f2[s];else throw new Error(`Cannot decode unrecognized sequence ${s} as hexadecimal`)}return h}oA(tA,"fromHex");function fG(f){let h="";for(let w=0;w<f.byteLength;w++)h+=uA[f[w]];return h}oA(fG,"toHex")});var UG=H((rG)=>{Object.defineProperty(rG,"__esModule",{value:!0});rG.sdkStreamMixin=void 0;var bv=aA(),mv=Ih(),dv=h2(),iv=u1(),wG=Lh(),sG="The stream has already been transformed.",cv=(f)=>{var h,w;if(!$G(f)&&!wG.isReadableStream(f)){let E=((w=(h=f===null||f===void 0?void 0:f.__proto__)===null||h===void 0?void 0:h.constructor)===null||w===void 0?void 0:w.name)||f;throw new Error(`Unexpected stream implementation, expect Blob or ReadableStream, got ${E}`)}let s=!1,$=async()=>{if(s)throw new Error(sG);return s=!0,await bv.streamCollector(f)},r=(E)=>{if(typeof E.stream!=="function")throw new Error(`Cannot transform payload Blob to web stream. Please make sure the Blob.stream() is polyfilled.
11
+ If you are using React Native, this API is not yet supported, see: https://react-native.canny.io/feature-requests/p/fetch-streaming-body`);return E.stream()};return Object.assign(f,{transformToByteArray:$,transformToString:async(E)=>{let U=await $();if(E==="base64")return mv.toBase64(U);else if(E==="hex")return dv.toHex(U);else if(E===void 0||E==="utf8"||E==="utf-8")return iv.toUtf8(U);else if(typeof TextDecoder==="function")return new TextDecoder(E).decode(U);else throw new Error("TextDecoder is not available, please make sure polyfill is provided.")},transformToWebStream:()=>{if(s)throw new Error(sG);if(s=!0,$G(f))return r(f);else if(wG.isReadableStream(f))return f;else throw new Error(`Cannot transform payload to web stream, got ${f}`)}})};rG.sdkStreamMixin=cv;var $G=(f)=>typeof Blob==="function"&&f instanceof Blob});var IG=H((FG)=>{Object.defineProperty(FG,"__esModule",{value:!0});FG.sdkStreamMixin=void 0;var gv=X4(),xv=qw(),w2=B0("stream"),_v=UG(),TG="The stream has already been transformed.",nv=(f)=>{var h,w;if(!(f instanceof w2.Readable))try{return _v.sdkStreamMixin(f)}catch(r){let E=((w=(h=f===null||f===void 0?void 0:f.__proto__)===null||h===void 0?void 0:h.constructor)===null||w===void 0?void 0:w.name)||f;throw new Error(`Unexpected stream implementation, expect Stream.Readable instance, got ${E}`)}let s=!1,$=async()=>{if(s)throw new Error(TG);return s=!0,await gv.streamCollector(f)};return Object.assign(f,{transformToByteArray:$,transformToString:async(r)=>{let E=await $();if(r===void 0||Buffer.isEncoding(r))return xv.fromArrayBuffer(E.buffer,E.byteOffset,E.byteLength).toString(r);else return new TextDecoder(r).decode(E)},transformToWebStream:()=>{if(s)throw new Error(TG);if(f.readableFlowing!==null)throw new Error("The stream has been consumed by other callbacks.");if(typeof w2.Readable.toWeb!=="function")throw new Error("Readable.toWeb() is not supported. Please ensure a polyfill is available.");return s=!0,w2.Readable.toWeb(f)}})};FG.sdkStreamMixin=nv});var AG=H((LG)=>{Object.defineProperty(LG,"__esModule",{value:!0});LG.splitStream=void 0;async function ev(f){if(typeof f.stream==="function")f=f.stream();return f.tee()}LG.splitStream=ev});var XG=H((zG)=>{Object.defineProperty(zG,"__esModule",{value:!0});zG.splitStream=void 0;var GG=B0("stream"),av=AG(),WG=Lh();async function ov(f){if(WG.isReadableStream(f)||WG.isBlob(f))return av.splitStream(f);let h=new GG.PassThrough,w=new GG.PassThrough;return f.pipe(h),f.pipe(w),[h,w]}zG.splitStream=ov});var E2=H((YU0,Sf)=>{var{defineProperty:Q4,getOwnPropertyDescriptor:pv,getOwnPropertyNames:uv}=Object,tv=Object.prototype.hasOwnProperty,r2=(f,h)=>Q4(f,"name",{value:h,configurable:!0}),fb=(f,h)=>{for(var w in h)Q4(f,w,{get:h[w],enumerable:!0})},s2=(f,h,w,s)=>{if(h&&typeof h==="object"||typeof h==="function"){for(let $ of uv(h))if(!tv.call(f,$)&&$!==w)Q4(f,$,{get:()=>h[$],enumerable:!(s=pv(h,$))||s.enumerable})}return f},Bh=(f,h,w)=>(s2(f,h,"default"),w&&s2(w,h,"default")),hb=(f)=>s2(Q4({},"__esModule",{value:!0}),f),Xf={};fb(Xf,{Uint8ArrayBlobAdapter:()=>$2});Sf.exports=hb(Xf);var SG=Ih(),YG=u1();function MG(f,h="utf-8"){if(h==="base64")return SG.toBase64(f);return YG.toUtf8(f)}r2(MG,"transformToString");function QG(f,h){if(h==="base64")return $2.mutate(SG.fromBase64(f));return $2.mutate(YG.fromUtf8(f))}r2(QG,"transformFromString");var $2=class f extends Uint8Array{static{r2(this,"Uint8ArrayBlobAdapter")}static fromString(h,w="utf-8"){switch(typeof h){case"string":return QG(h,w);default:throw new Error(`Unsupported conversion from ${typeof h} to Uint8ArrayBlobAdapter.`)}}static mutate(h){return Object.setPrototypeOf(h,f.prototype),h}transformToString(h="utf-8"){return MG(this,h)}};Bh(Xf,gT(),Sf.exports);Bh(Xf,uB(),Sf.exports);Bh(Xf,IA(),Sf.exports);Bh(Xf,AA(),Sf.exports);Bh(Xf,YA(),Sf.exports);Bh(Xf,IG(),Sf.exports);Bh(Xf,XG(),Sf.exports);Bh(Xf,Lh(),Sf.exports)});var yw=H((MU0,VG)=>{var{defineProperty:F2,getOwnPropertyDescriptor:wb,getOwnPropertyNames:sb}=Object,$b=Object.prototype.hasOwnProperty,rb=(f,h)=>{for(var w in h)F2(f,w,{get:h[w],enumerable:!0})},Eb=(f,h,w,s)=>{if(h&&typeof h==="object"||typeof h==="function"){for(let $ of sb(h))if(!$b.call(f,$)&&$!==w)F2(f,$,{get:()=>h[$],enumerable:!(s=wb(h,$))||s.enumerable})}return f},Ub=(f)=>Eb(F2({},"__esModule",{value:!0}),f),KG={};rb(KG,{RequestBuilder:()=>JG,collectBody:()=>Tb,extendedEncodeURIComponent:()=>T2,requestBuilder:()=>Cb,resolvedPath:()=>ZG});VG.exports=Ub(KG);var U2=E2(),Tb=async(f=new Uint8Array,h)=>{if(f instanceof Uint8Array)return U2.Uint8ArrayBlobAdapter.mutate(f);if(!f)return U2.Uint8ArrayBlobAdapter.mutate(new Uint8Array);let w=h.streamCollector(f);return U2.Uint8ArrayBlobAdapter.mutate(await w)};function T2(f){return encodeURIComponent(f).replace(/[!'()*]/g,function(h){return"%"+h.charCodeAt(0).toString(16).toUpperCase()})}var Fb=t0(),ZG=(f,h,w,s,$,r)=>{if(h!=null&&h[w]!==void 0){let E=s();if(E.length<=0)throw new Error("Empty value provided for input HTTP label: "+w+".");f=f.replace($,r?E.split("/").map((U)=>T2(U)).join("/"):T2(E))}else throw new Error("No value provided for input HTTP label: "+w+".");return f};function Cb(f,h){return new JG(f,h)}var JG=class{constructor(f,h){this.input=f,this.context=h,this.query={},this.method="",this.headers={},this.path="",this.body=null,this.hostname="",this.resolvePathStack=[]}async build(){let{hostname:f,protocol:h="https",port:w,path:s}=await this.context.endpoint();this.path=s;for(let $ of this.resolvePathStack)$(this.path);return new Fb.HttpRequest({protocol:h,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((h)=>{this.path=`${h?.endsWith("/")?h.slice(0,-1):h||""}`+f}),this}p(f,h,w,s){return this.resolvePathStack.push(($)=>{this.path=ZG($,this.input,f,h,w,s)}),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}}});var m0=H((KU0,mG)=>{var{defineProperty:Z4,getOwnPropertyDescriptor:Ib,getOwnPropertyNames:Lb}=Object,Bb=Object.prototype.hasOwnProperty,j0=(f,h)=>Z4(f,"name",{value:h,configurable:!0}),Ab=(f,h)=>{for(var w in h)Z4(f,w,{get:h[w],enumerable:!0})},Gb=(f,h,w,s)=>{if(h&&typeof h==="object"||typeof h==="function"){for(let $ of Lb(h))if(!Bb.call(f,$)&&$!==w)Z4(f,$,{get:()=>h[$],enumerable:!(s=Ib(h,$))||s.enumerable})}return f},Wb=(f)=>Gb(Z4({},"__esModule",{value:!0}),f),PG={};Ab(PG,{DefaultIdentityProviderConfig:()=>Pb,EXPIRATION_MS:()=>vG,HttpApiKeyAuthSigner:()=>Hb,HttpBearerAuthSigner:()=>Nb,NoAuthSigner:()=>Db,createIsIdentityExpiredFunction:()=>lG,createPaginator:()=>jG,doesIdentityRequireRefresh:()=>bG,getHttpAuthSchemeEndpointRuleSetPlugin:()=>Rb,getHttpAuthSchemePlugin:()=>Sb,getHttpSigningPlugin:()=>Qb,getSmithyContext:()=>zb,httpAuthSchemeEndpointRuleSetMiddlewareOptions:()=>DG,httpAuthSchemeMiddleware:()=>C2,httpAuthSchemeMiddlewareOptions:()=>qG,httpSigningMiddleware:()=>kG,httpSigningMiddlewareOptions:()=>yG,isIdentityExpired:()=>qb,memoizeIdentityProvider:()=>kb,normalizeProvider:()=>Kb,requestBuilder:()=>Vb.requestBuilder,setFeature:()=>OG});mG.exports=Wb(PG);var K4=T1(),zb=j0((f)=>f[K4.SMITHY_CONTEXT_KEY]||(f[K4.SMITHY_CONTEXT_KEY]={}),"getSmithyContext"),HG=Fh();function NG(f){let h=new Map;for(let w of f)h.set(w.schemeId,w);return h}j0(NG,"convertHttpAuthSchemesToMap");var C2=j0((f,h)=>(w,s)=>async($)=>{let r=f.httpAuthSchemeProvider(await h.httpAuthSchemeParametersProvider(f,s,$.input)),E=NG(f.httpAuthSchemes),U=HG.getSmithyContext(s),T=[];for(let F of r){let C=E.get(F.schemeId);if(!C){T.push(`HttpAuthScheme \`${F.schemeId}\` was not enabled for this service.`);continue}let I=C.identityProvider(await h.identityProviderConfigProvider(f));if(!I){T.push(`HttpAuthScheme \`${F.schemeId}\` did not have an IdentityProvider configured.`);continue}let{identityProperties:L={},signingProperties:G={}}=F.propertiesExtractor?.(f,s)||{};F.identityProperties=Object.assign(F.identityProperties||{},L),F.signingProperties=Object.assign(F.signingProperties||{},G),U.selectedHttpAuthScheme={httpAuthOption:F,identity:await I(F.identityProperties),signer:C.signer};break}if(!U.selectedHttpAuthScheme)throw new Error(T.join(`
12
+ `));return w($)},"httpAuthSchemeMiddleware"),DG={step:"serialize",tags:["HTTP_AUTH_SCHEME"],name:"httpAuthSchemeMiddleware",override:!0,relation:"before",toMiddleware:"endpointV2Middleware"},Rb=j0((f,{httpAuthSchemeParametersProvider:h,identityProviderConfigProvider:w})=>({applyToStack:(s)=>{s.addRelativeTo(C2(f,{httpAuthSchemeParametersProvider:h,identityProviderConfigProvider:w}),DG)}}),"getHttpAuthSchemeEndpointRuleSetPlugin"),Xb=Dw(),qG={step:"serialize",tags:["HTTP_AUTH_SCHEME"],name:"httpAuthSchemeMiddleware",override:!0,relation:"before",toMiddleware:Xb.serializerMiddlewareOption.name},Sb=j0((f,{httpAuthSchemeParametersProvider:h,identityProviderConfigProvider:w})=>({applyToStack:(s)=>{s.addRelativeTo(C2(f,{httpAuthSchemeParametersProvider:h,identityProviderConfigProvider:w}),qG)}}),"getHttpAuthSchemePlugin"),I2=t0(),Yb=j0((f)=>(h)=>{throw h},"defaultErrorHandler"),Mb=j0((f,h)=>{},"defaultSuccessHandler"),kG=j0((f)=>(h,w)=>async(s)=>{if(!I2.HttpRequest.isInstance(s.request))return h(s);let r=HG.getSmithyContext(w).selectedHttpAuthScheme;if(!r)throw new Error("No HttpAuthScheme was selected: unable to sign request");let{httpAuthOption:{signingProperties:E={}},identity:U,signer:T}=r,F=await h({...s,request:await T.sign(s.request,U,E)}).catch((T.errorHandler||Yb)(E));return(T.successHandler||Mb)(F.response,E),F},"httpSigningMiddleware"),yG={step:"finalizeRequest",tags:["HTTP_SIGNING"],name:"httpSigningMiddleware",aliases:["apiKeyMiddleware","tokenMiddleware","awsAuthMiddleware"],override:!0,relation:"after",toMiddleware:"retryMiddleware"},Qb=j0((f)=>({applyToStack:(h)=>{h.addRelativeTo(kG(f),yG)}}),"getHttpSigningPlugin"),Kb=j0((f)=>{if(typeof f==="function")return f;let h=Promise.resolve(f);return()=>h},"normalizeProvider"),Zb=j0(async(f,h,w,s=(r)=>r,...$)=>{let r=new f(w);return r=s(r)??r,await h.send(r,...$)},"makePagedClientRequest");function jG(f,h,w,s,$){return j0(async function*r(E,U,...T){let F=U,C=E.startingToken??F[w],I=!0,L;while(I){if(F[w]=C,$)F[$]=F[$]??E.pageSize;if(E.client instanceof f)L=await Zb(h,E.client,U,E.withCommand,...T);else throw new Error(`Invalid client, expected instance of ${f.name}`);yield L;let G=C;C=Jb(L,s),I=!!(C&&(!E.stopOnSameToken||C!==G))}return},"paginateOperation")}j0(jG,"createPaginator");var Jb=j0((f,h)=>{let w=f,s=h.split(".");for(let $ of s){if(!w||typeof w!=="object")return;w=w[$]}return w},"get"),Vb=yw();function OG(f,h,w){if(!f.__smithy_context)f.__smithy_context={features:{}};else if(!f.__smithy_context.features)f.__smithy_context.features={};f.__smithy_context.features[h]=w}j0(OG,"setFeature");var Pb=class{constructor(f){this.authSchemes=new Map;for(let[h,w]of Object.entries(f))if(w!==void 0)this.authSchemes.set(h,w)}static{j0(this,"DefaultIdentityProviderConfig")}getIdentityProvider(f){return this.authSchemes.get(f)}},Hb=class{static{j0(this,"HttpApiKeyAuthSigner")}async sign(f,h,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(!h.apiKey)throw new Error("request could not be signed with `apiKey` since the `apiKey` is not defined");let s=I2.HttpRequest.clone(f);if(w.in===K4.HttpApiKeyAuthLocation.QUERY)s.query[w.name]=h.apiKey;else if(w.in===K4.HttpApiKeyAuthLocation.HEADER)s.headers[w.name]=w.scheme?`${w.scheme} ${h.apiKey}`:h.apiKey;else throw new Error("request can only be signed with `apiKey` locations `query` or `header`, but found: `"+w.in+"`");return s}},Nb=class{static{j0(this,"HttpBearerAuthSigner")}async sign(f,h,w){let s=I2.HttpRequest.clone(f);if(!h.token)throw new Error("request could not be signed with `token` since the `token` is not defined");return s.headers.Authorization=`Bearer ${h.token}`,s}},Db=class{static{j0(this,"NoAuthSigner")}async sign(f,h,w){return f}},lG=j0((f)=>(h)=>bG(h)&&h.expiration.getTime()-Date.now()<f,"createIsIdentityExpiredFunction"),vG=300000,qb=lG(vG),bG=j0((f)=>f.expiration!==void 0,"doesIdentityRequireRefresh"),kb=j0((f,h,w)=>{if(f===void 0)return;let s=typeof f!=="function"?async()=>Promise.resolve(f):f,$,r,E,U=!1,T=j0(async(F)=>{if(!r)r=s(F);try{$=await r,E=!0,U=!1}finally{r=void 0}return $},"coalesceProvider");if(h===void 0)return async(F)=>{if(!E||F?.forceRefresh)$=await T(F);return $};return async(F)=>{if(!E||F?.forceRefresh)$=await T(F);if(U)return $;if(!w($))return U=!0,$;if(h($))return await T(F),$;return $}},"memoizeIdentityProvider")});function yb(f){if(f===void 0)return!0;return typeof f==="string"&&f.length<=50}function jw(f){let h=dG.normalizeProvider(f.userAgentAppId??L2);return{...f,customUserAgent:typeof f.customUserAgent==="string"?[[f.customUserAgent]]:f.customUserAgent,userAgentAppId:async()=>{let w=await h();if(!yb(w)){let s=f.logger?.constructor?.name==="NoOpLogger"||!f.logger?console:f.logger;if(typeof w!=="string")s?.warn("userAgentAppId must be a string or undefined.");else if(w.length>50)s?.warn("The provided userAgentAppId exceeds the maximum length of 50 characters.")}return w}}}var dG,L2=void 0;var iG=B(()=>{dG=p(m0(),1)});class gh{constructor({size:f,params:h}){if(this.data=new Map,this.parameters=[],this.capacity=f??50,h)this.parameters=h}get(f,h){let w=this.hash(f);if(w===!1)return h();if(!this.data.has(w)){if(this.data.size>this.capacity+10){let s=this.data.keys(),$=0;while(!0){let{value:r,done:E}=s.next();if(this.data.delete(r),E||++$>10)break}}this.data.set(w,h())}return this.data.get(w)}size(){return this.data.size}hash(f){let h="",{parameters:w}=this;if(w.length===0)return!1;for(let s of w){let $=String(f[s]??"");if($.includes("|;"))return!1;h+=$+"|;"}return h}}var jb,J$=(f)=>jb.test(f)||f.startsWith("[")&&f.endsWith("]");var B2=B(()=>{jb=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 Ob,V$=(f,h=!1)=>{if(!h)return Ob.test(f);let w=f.split(".");for(let s of w)if(!V$(s))return!1;return!0};var A2=B(()=>{Ob=new RegExp("^(?!.*-$)(?!-)[a-zA-Z0-9-]{1,63}$")});var t1;var J4=B(()=>{t1={}});var mf="endpoints";function N1(f){if(typeof f!=="object"||f==null)return f;if("ref"in f)return`$${N1(f.ref)}`;if("fn"in f)return`${f.fn}(${(f.argv||[]).map(N1).join(", ")})`;return JSON.stringify(f,null,2)}var P$=()=>{};var H0;var cG=B(()=>{H0=class H0 extends Error{constructor(f){super(f);this.name="EndpointError"}}});var gG=()=>{};var xG=()=>{};var _G=()=>{};var nG=()=>{};var eG=()=>{};var aG=()=>{};var D1=B(()=>{cG();gG();xG();_G();nG();eG();aG()});var oG=(f,h)=>f===h;var pG=(f)=>{let h=f.split("."),w=[];for(let s of h){let $=s.indexOf("[");if($!==-1){if(s.indexOf("]")!==s.length-1)throw new H0(`Path: '${f}' does not end with ']'`);let r=s.slice($+1,-1);if(Number.isNaN(parseInt(r)))throw new H0(`Invalid array index: '${r}' in path: '${f}'`);if($!==0)w.push(s.slice(0,$));w.push(r)}else w.push(s)}return w};var uG=B(()=>{D1()});var V4=(f,h)=>pG(h).reduce((w,s)=>{if(typeof w!=="object")throw new H0(`Index '${s}' in '${h}' not found in '${JSON.stringify(f)}'`);else if(Array.isArray(w))return w[parseInt(s)];return w[s]},f);var tG=B(()=>{D1();uG()});var fW=(f)=>f!=null;var hW=(f)=>!f;var P4,G2,wW=(f)=>{let h=(()=>{try{if(f instanceof URL)return f;if(typeof f==="object"&&"hostname"in f){let{hostname:L,port:G,protocol:X="",path:Q="",query:M={}}=f,q=new URL(`${X}//${L}${G?`:${G}`:""}${Q}`);return q.search=Object.entries(M).map(([N,y])=>`${N}=${y}`).join("&"),q}return new URL(f)}catch(L){return null}})();if(!h)return console.error(`Unable to parse ${JSON.stringify(f)} as a whatwg URL.`),null;let w=h.href,{host:s,hostname:$,pathname:r,protocol:E,search:U}=h;if(U)return null;let T=E.slice(0,-1);if(!Object.values(P4.EndpointURLScheme).includes(T))return null;let F=J$($),C=w.includes(`${s}:${G2[T]}`)||typeof f==="string"&&f.includes(`${s}:${G2[T]}`),I=`${s}${C?`:${G2[T]}`:""}`;return{scheme:T,authority:I,path:r,normalizedPath:r.endsWith("/")?r:`${r}/`,isIp:F}};var sW=B(()=>{P4=p(T1(),1);B2();G2={[P4.EndpointURLScheme.HTTP]:80,[P4.EndpointURLScheme.HTTPS]:443}});var $W=(f,h)=>f===h;var rW=(f,h,w,s)=>{if(h>=w||f.length<w)return null;if(!s)return f.substring(h,w);return f.substring(f.length-w,f.length-h)};var EW=(f)=>encodeURIComponent(f).replace(/[!*'()]/g,(h)=>`%${h.charCodeAt(0).toString(16).toUpperCase()}`);var W2=B(()=>{tG();A2();sW()});var UW;var TW=B(()=>{W2();UW={booleanEquals:oG,getAttr:V4,isSet:fW,isValidHostLabel:V$,not:hW,parseURL:wW,stringEquals:$W,substring:rW,uriEncode:EW}});var H4=(f,h)=>{let w=[],s={...h.endpointParams,...h.referenceRecord},$=0;while($<f.length){let r=f.indexOf("{",$);if(r===-1){w.push(f.slice($));break}w.push(f.slice($,r));let E=f.indexOf("}",r);if(E===-1){w.push(f.slice(r));break}if(f[r+1]==="{"&&f[E+1]==="}")w.push(f.slice(r+1,E)),$=E+2;let U=f.substring(r+1,E);if(U.includes("#")){let[T,F]=U.split("#");w.push(V4(s[T],F))}else w.push(s[U]);$=E+1}return w.join("")};var z2=B(()=>{W2()});var FW=({ref:f},h)=>{return{...h.endpointParams,...h.referenceRecord}[f]};var Ah=(f,h,w)=>{if(typeof f==="string")return H4(f,w);else if(f.fn)return N4(f,w);else if(f.ref)return FW(f,w);throw new H0(`'${h}': ${String(f)} is not a string, function or reference.`)};var H$=B(()=>{D1();R2();z2()});var N4=({fn:f,argv:h},w)=>{let s=h.map((r)=>["boolean","number"].includes(typeof r)?r:Ah(r,"arg",w)),$=f.split(".");if($[0]in t1&&$[1]!=null)return t1[$[0]][$[1]](...s);return UW[f](...s)};var R2=B(()=>{J4();TW();H$()});var CW=({assign:f,...h},w)=>{if(f&&f in w.referenceRecord)throw new H0(`'${f}' is already defined in Reference Record.`);let s=N4(h,w);return w.logger?.debug?.(`${mf} evaluateCondition: ${N1(h)} = ${N1(s)}`),{result:s===""?!0:!!s,...f!=null&&{toAssign:{name:f,value:s}}}};var IW=B(()=>{P$();D1();R2()});var Ow=(f=[],h)=>{let w={};for(let s of f){let{result:$,toAssign:r}=CW(s,{...h,referenceRecord:{...h.referenceRecord,...w}});if(!$)return{result:$};if(r)w[r.name]=r.value,h.logger?.debug?.(`${mf} assign: ${r.name} := ${N1(r.value)}`)}return{result:!0,referenceRecord:w}};var D4=B(()=>{P$();IW()});var LW=(f,h)=>Object.entries(f).reduce((w,[s,$])=>({...w,[s]:$.map((r)=>{let E=Ah(r,"Header value entry",h);if(typeof E!=="string")throw new H0(`Header '${s}' value '${E}' is not a string`);return E})}),{});var BW=B(()=>{D1();H$()});var X2=(f,h)=>{if(Array.isArray(f))return f.map((w)=>X2(w,h));switch(typeof f){case"string":return H4(f,h);case"object":if(f===null)throw new H0(`Unexpected endpoint property: ${f}`);return q4(f,h);case"boolean":return f;default:throw new H0(`Unexpected endpoint property type: ${typeof f}`)}};var AW=B(()=>{D1();z2();S2()});var q4=(f,h)=>Object.entries(f).reduce((w,[s,$])=>({...w,[s]:X2($,h)}),{});var S2=B(()=>{AW()});var GW=(f,h)=>{let w=Ah(f,"Endpoint URL",h);if(typeof w==="string")try{return new URL(w)}catch(s){throw console.error(`Failed to construct URL with ${w}`,s),s}throw new H0(`Endpoint URL must be a string, got ${typeof w}`)};var WW=B(()=>{D1();H$()});var zW=(f,h)=>{let{conditions:w,endpoint:s}=f,{result:$,referenceRecord:r}=Ow(w,h);if(!$)return;let E={...h,referenceRecord:{...h.referenceRecord,...r}},{url:U,properties:T,headers:F}=s;return h.logger?.debug?.(`${mf} Resolving endpoint from template: ${N1(s)}`),{...F!=null&&{headers:LW(F,E)},...T!=null&&{properties:q4(T,E)},url:GW(U,E)}};var RW=B(()=>{P$();D4();BW();S2();WW()});var XW=(f,h)=>{let{conditions:w,error:s}=f,{result:$,referenceRecord:r}=Ow(w,h);if(!$)return;throw new H0(Ah(s,"Error",{...h,referenceRecord:{...h.referenceRecord,...r}}))};var SW=B(()=>{D1();D4();H$()});var YW=(f,h)=>{let{conditions:w,rules:s}=f,{result:$,referenceRecord:r}=Ow(w,h);if(!$)return;return k4(s,{...h,referenceRecord:{...h.referenceRecord,...r}})};var MW=B(()=>{D4();Y2()});var k4=(f,h)=>{for(let w of f)if(w.type==="endpoint"){let s=zW(w,h);if(s)return s}else if(w.type==="error")XW(w,h);else if(w.type==="tree"){let s=YW(w,h);if(s)return s}else throw new H0(`Unknown endpoint rule: ${w}`);throw new H0("Rules evaluation failed")};var Y2=B(()=>{D1();RW();SW();MW()});var QW=B(()=>{J4();Y2()});var xh=(f,h)=>{let{endpointParams:w,logger:s}=h,{parameters:$,rules:r}=f;h.logger?.debug?.(`${mf} Initial EndpointParams: ${N1(w)}`);let E=Object.entries($).filter(([,F])=>F.default!=null).map(([F,C])=>[F,C.default]);if(E.length>0)for(let[F,C]of E)w[F]=w[F]??C;let U=Object.entries($).filter(([,F])=>F.required).map(([F])=>F);for(let F of U)if(w[F]==null)throw new H0(`Missing required parameter: '${F}'`);let T=k4(r,{endpointParams:w,logger:s,referenceRecord:{}});return h.logger?.debug?.(`${mf} Resolved endpoint: ${N1(T)}`),T};var KW=B(()=>{P$();D1();QW()});var df=B(()=>{B2();A2();J4();KW();D1()});var M2=B(()=>{df()});var Q2=(f,h=!1)=>{if(h){for(let w of f.split("."))if(!Q2(w))return!1;return!0}if(!V$(f))return!1;if(f.length<3||f.length>63)return!1;if(f!==f.toLowerCase())return!1;if(J$(f))return!1;return!0};var ZW=B(()=>{df();M2()});var JW=(f)=>{let h=f.split(":");if(h.length<6)return null;let[w,s,$,r,E,...U]=h;if(w!=="arn"||s===""||$===""||U.join(":")==="")return null;let T=U.map((F)=>F.split("/")).flat();return{partition:s,service:$,region:r,accountId:E,resourceId:T}};var PW;var VW=B(()=>{PW={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)"},"ap-southeast-7":{description:"Asia Pacific (Thailand)"},"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)"},"mx-central-1":{description:"Mexico (Central)"},"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:{"aws-iso-f-global":{description:"AWS ISOF global region"},"us-isof-east-1":{description:"US ISOF EAST"},"us-isof-south-1":{description:"US ISOF SOUTH"}}}],version:"1.1"}});var vb,bb="",HW=(f)=>{let{partitions:h}=vb;for(let s of h){let{regions:$,outputs:r}=s;for(let[E,U]of Object.entries($))if(E===f)return{...r,...U}}for(let s of h){let{regionRegex:$,outputs:r}=s;if(new RegExp($).test(f))return{...r}}let w=h.find((s)=>s.id==="aws");if(!w)throw new Error("Provided region was not found in the partition array or regex, and default partition with id 'aws' doesn't exist.");return{...w.outputs}},NW=()=>bb;var K2=B(()=>{VW();vb=PW});var _h;var DW=B(()=>{df();ZW();K2();_h={isVirtualHostableS3Bucket:Q2,parseArn:JW,partition:HW};t1.aws=_h});var qW=B(()=>{df()});var kW=B(()=>{df()});var yW=()=>{};var jW=()=>{};var OW=()=>{};var lW=()=>{};var vW=()=>{};var bW=B(()=>{kW();yW();jW();OW();lW();vW()});var N$=B(()=>{DW();K2();M2();qW();bW()});var l4=H((r20,O4)=>{var mW,dW,iW,cW,gW,xW,_W,nW,eW,aW,oW,pW,uW,y4,Z2,tW,fz,hz,lw,wz,sz,$z,rz,Ez,Uz,Tz,Fz,Cz,j4,Iz,Lz,Bz;(function(f){var h=typeof global==="object"?global:typeof self==="object"?self:typeof this==="object"?this:{};if(typeof define==="function"&&define.amd)define("tslib",["exports"],function(s){f(w(h,w(s)))});else if(typeof O4==="object"&&typeof r20==="object")f(w(h,w(r20)));else f(w(h));function w(s,$){if(s!==h)if(typeof Object.create==="function")Object.defineProperty(s,"__esModule",{value:!0});else s.__esModule=!0;return function(r,E){return s[r]=$?$(r,E):E}}})(function(f){var h=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,E){r.__proto__=E}||function(r,E){for(var U in E)if(Object.prototype.hasOwnProperty.call(E,U))r[U]=E[U]};mW=function(r,E){if(typeof E!=="function"&&E!==null)throw new TypeError("Class extends value "+String(E)+" is not a constructor or null");h(r,E);function U(){this.constructor=r}r.prototype=E===null?Object.create(E):(U.prototype=E.prototype,new U)},dW=Object.assign||function(r){for(var E,U=1,T=arguments.length;U<T;U++){E=arguments[U];for(var F in E)if(Object.prototype.hasOwnProperty.call(E,F))r[F]=E[F]}return r},iW=function(r,E){var U={};for(var T in r)if(Object.prototype.hasOwnProperty.call(r,T)&&E.indexOf(T)<0)U[T]=r[T];if(r!=null&&typeof Object.getOwnPropertySymbols==="function"){for(var F=0,T=Object.getOwnPropertySymbols(r);F<T.length;F++)if(E.indexOf(T[F])<0&&Object.prototype.propertyIsEnumerable.call(r,T[F]))U[T[F]]=r[T[F]]}return U},cW=function(r,E,U,T){var F=arguments.length,C=F<3?E:T===null?T=Object.getOwnPropertyDescriptor(E,U):T,I;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")C=Reflect.decorate(r,E,U,T);else for(var L=r.length-1;L>=0;L--)if(I=r[L])C=(F<3?I(C):F>3?I(E,U,C):I(E,U))||C;return F>3&&C&&Object.defineProperty(E,U,C),C},gW=function(r,E){return function(U,T){E(U,T,r)}},xW=function(r,E,U,T,F,C){function I(b0){if(b0!==void 0&&typeof b0!=="function")throw new TypeError("Function expected");return b0}var L=T.kind,G=L==="getter"?"get":L==="setter"?"set":"value",X=!E&&r?T.static?r:r.prototype:null,Q=E||(X?Object.getOwnPropertyDescriptor(X,T.name):{}),M,q=!1;for(var N=U.length-1;N>=0;N--){var y={};for(var n in T)y[n]=n==="access"?{}:T[n];for(var n in T.access)y.access[n]=T.access[n];y.addInitializer=function(b0){if(q)throw new TypeError("Cannot add initializers after decoration has completed");C.push(I(b0||null))};var L0=U[N](L==="accessor"?{get:Q.get,set:Q.set}:Q[G],y);if(L==="accessor"){if(L0===void 0)continue;if(L0===null||typeof L0!=="object")throw new TypeError("Object expected");if(M=I(L0.get))Q.get=M;if(M=I(L0.set))Q.set=M;if(M=I(L0.init))F.unshift(M)}else if(M=I(L0))if(L==="field")F.unshift(M);else Q[G]=M}if(X)Object.defineProperty(X,T.name,Q);q=!0},_W=function(r,E,U){var T=arguments.length>2;for(var F=0;F<E.length;F++)U=T?E[F].call(r,U):E[F].call(r);return T?U:void 0},nW=function(r){return typeof r==="symbol"?r:"".concat(r)},eW=function(r,E,U){if(typeof E==="symbol")E=E.description?"[".concat(E.description,"]"):"";return Object.defineProperty(r,"name",{configurable:!0,value:U?"".concat(U," ",E):E})},aW=function(r,E){if(typeof Reflect==="object"&&typeof Reflect.metadata==="function")return Reflect.metadata(r,E)},oW=function(r,E,U,T){function F(C){return C instanceof U?C:new U(function(I){I(C)})}return new(U||(U=Promise))(function(C,I){function L(Q){try{X(T.next(Q))}catch(M){I(M)}}function G(Q){try{X(T.throw(Q))}catch(M){I(M)}}function X(Q){Q.done?C(Q.value):F(Q.value).then(L,G)}X((T=T.apply(r,E||[])).next())})},pW=function(r,E){var U={label:0,sent:function(){if(C[0]&1)throw C[1];return C[1]},trys:[],ops:[]},T,F,C,I=Object.create((typeof Iterator==="function"?Iterator:Object).prototype);return I.next=L(0),I.throw=L(1),I.return=L(2),typeof Symbol==="function"&&(I[Symbol.iterator]=function(){return this}),I;function L(X){return function(Q){return G([X,Q])}}function G(X){if(T)throw new TypeError("Generator is already executing.");while(I&&(I=0,X[0]&&(U=0)),U)try{if(T=1,F&&(C=X[0]&2?F.return:X[0]?F.throw||((C=F.return)&&C.call(F),0):F.next)&&!(C=C.call(F,X[1])).done)return C;if(F=0,C)X=[X[0]&2,C.value];switch(X[0]){case 0:case 1:C=X;break;case 4:return U.label++,{value:X[1],done:!1};case 5:U.label++,F=X[1],X=[0];continue;case 7:X=U.ops.pop(),U.trys.pop();continue;default:if((C=U.trys,!(C=C.length>0&&C[C.length-1]))&&(X[0]===6||X[0]===2)){U=0;continue}if(X[0]===3&&(!C||X[1]>C[0]&&X[1]<C[3])){U.label=X[1];break}if(X[0]===6&&U.label<C[1]){U.label=C[1],C=X;break}if(C&&U.label<C[2]){U.label=C[2],U.ops.push(X);break}if(C[2])U.ops.pop();U.trys.pop();continue}X=E.call(r,U)}catch(Q){X=[6,Q],F=0}finally{T=C=0}if(X[0]&5)throw X[1];return{value:X[0]?X[1]:void 0,done:!0}}},uW=function(r,E){for(var U in r)if(U!=="default"&&!Object.prototype.hasOwnProperty.call(E,U))j4(E,r,U)},j4=Object.create?function(r,E,U,T){if(T===void 0)T=U;var F=Object.getOwnPropertyDescriptor(E,U);if(!F||("get"in F?!E.__esModule:F.writable||F.configurable))F={enumerable:!0,get:function(){return E[U]}};Object.defineProperty(r,T,F)}:function(r,E,U,T){if(T===void 0)T=U;r[T]=E[U]},y4=function(r){var E=typeof Symbol==="function"&&Symbol.iterator,U=E&&r[E],T=0;if(U)return U.call(r);if(r&&typeof r.length==="number")return{next:function(){if(r&&T>=r.length)r=void 0;return{value:r&&r[T++],done:!r}}};throw new TypeError(E?"Object is not iterable.":"Symbol.iterator is not defined.")},Z2=function(r,E){var U=typeof Symbol==="function"&&r[Symbol.iterator];if(!U)return r;var T=U.call(r),F,C=[],I;try{while((E===void 0||E-- >0)&&!(F=T.next()).done)C.push(F.value)}catch(L){I={error:L}}finally{try{if(F&&!F.done&&(U=T.return))U.call(T)}finally{if(I)throw I.error}}return C},tW=function(){for(var r=[],E=0;E<arguments.length;E++)r=r.concat(Z2(arguments[E]));return r},fz=function(){for(var r=0,E=0,U=arguments.length;E<U;E++)r+=arguments[E].length;for(var T=Array(r),F=0,E=0;E<U;E++)for(var C=arguments[E],I=0,L=C.length;I<L;I++,F++)T[F]=C[I];return T},hz=function(r,E,U){if(U||arguments.length===2){for(var T=0,F=E.length,C;T<F;T++)if(C||!(T in E)){if(!C)C=Array.prototype.slice.call(E,0,T);C[T]=E[T]}}return r.concat(C||Array.prototype.slice.call(E))},lw=function(r){return this instanceof lw?(this.v=r,this):new lw(r)},wz=function(r,E,U){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var T=U.apply(r,E||[]),F,C=[];return F=Object.create((typeof AsyncIterator==="function"?AsyncIterator:Object).prototype),L("next"),L("throw"),L("return",I),F[Symbol.asyncIterator]=function(){return this},F;function I(N){return function(y){return Promise.resolve(y).then(N,M)}}function L(N,y){if(T[N]){if(F[N]=function(n){return new Promise(function(L0,b0){C.push([N,n,L0,b0])>1||G(N,n)})},y)F[N]=y(F[N])}}function G(N,y){try{X(T[N](y))}catch(n){q(C[0][3],n)}}function X(N){N.value instanceof lw?Promise.resolve(N.value.v).then(Q,M):q(C[0][2],N)}function Q(N){G("next",N)}function M(N){G("throw",N)}function q(N,y){if(N(y),C.shift(),C.length)G(C[0][0],C[0][1])}},sz=function(r){var E,U;return E={},T("next"),T("throw",function(F){throw F}),T("return"),E[Symbol.iterator]=function(){return this},E;function T(F,C){E[F]=r[F]?function(I){return(U=!U)?{value:lw(r[F](I)),done:!1}:C?C(I):I}:C}},$z=function(r){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var E=r[Symbol.asyncIterator],U;return E?E.call(r):(r=typeof y4==="function"?y4(r):r[Symbol.iterator](),U={},T("next"),T("throw"),T("return"),U[Symbol.asyncIterator]=function(){return this},U);function T(C){U[C]=r[C]&&function(I){return new Promise(function(L,G){I=r[C](I),F(L,G,I.done,I.value)})}}function F(C,I,L,G){Promise.resolve(G).then(function(X){C({value:X,done:L})},I)}},rz=function(r,E){if(Object.defineProperty)Object.defineProperty(r,"raw",{value:E});else r.raw=E;return r};var w=Object.create?function(r,E){Object.defineProperty(r,"default",{enumerable:!0,value:E})}:function(r,E){r.default=E},s=function(r){return s=Object.getOwnPropertyNames||function(E){var U=[];for(var T in E)if(Object.prototype.hasOwnProperty.call(E,T))U[U.length]=T;return U},s(r)};Ez=function(r){if(r&&r.__esModule)return r;var E={};if(r!=null){for(var U=s(r),T=0;T<U.length;T++)if(U[T]!=="default")j4(E,r,U[T])}return w(E,r),E},Uz=function(r){return r&&r.__esModule?r:{default:r}},Tz=function(r,E,U,T){if(U==="a"&&!T)throw new TypeError("Private accessor was defined without a getter");if(typeof E==="function"?r!==E||!T:!E.has(r))throw new TypeError("Cannot read private member from an object whose class did not declare it");return U==="m"?T:U==="a"?T.call(r):T?T.value:E.get(r)},Fz=function(r,E,U,T,F){if(T==="m")throw new TypeError("Private method is not writable");if(T==="a"&&!F)throw new TypeError("Private accessor was defined without a setter");if(typeof E==="function"?r!==E||!F:!E.has(r))throw new TypeError("Cannot write private member to an object whose class did not declare it");return T==="a"?F.call(r,U):F?F.value=U:E.set(r,U),U},Cz=function(r,E){if(E===null||typeof E!=="object"&&typeof E!=="function")throw new TypeError("Cannot use 'in' operator on non-object");return typeof r==="function"?E===r:r.has(E)},Iz=function(r,E,U){if(E!==null&&E!==void 0){if(typeof E!=="object"&&typeof E!=="function")throw new TypeError("Object expected.");var T,F;if(U){if(!Symbol.asyncDispose)throw new TypeError("Symbol.asyncDispose is not defined.");T=E[Symbol.asyncDispose]}if(T===void 0){if(!Symbol.dispose)throw new TypeError("Symbol.dispose is not defined.");if(T=E[Symbol.dispose],U)F=T}if(typeof T!=="function")throw new TypeError("Object not disposable.");if(F)T=function(){try{F.call(this)}catch(C){return Promise.reject(C)}};r.stack.push({value:E,dispose:T,async:U})}else if(U)r.stack.push({async:!0});return E};var $=typeof SuppressedError==="function"?SuppressedError:function(r,E,U){var T=new Error(U);return T.name="SuppressedError",T.error=r,T.suppressed=E,T};Lz=function(r){function E(C){r.error=r.hasError?new $(C,r.error,"An error was suppressed during disposal."):C,r.hasError=!0}var U,T=0;function F(){while(U=r.stack.pop())try{if(!U.async&&T===1)return T=0,r.stack.push(U),Promise.resolve().then(F);if(U.dispose){var C=U.dispose.call(U.value);if(U.async)return T|=2,Promise.resolve(C).then(F,function(I){return E(I),F()})}else T|=1}catch(I){E(I)}if(T===1)return r.hasError?Promise.reject(r.error):Promise.resolve();if(r.hasError)throw r.error}return F()},Bz=function(r,E){if(typeof r==="string"&&/^\.\.?\//.test(r))return r.replace(/\.(tsx)$|((?:\.d)?)((?:\.[^./]+?)?)\.([cm]?)ts$/i,function(U,T,F,C,I){return T?E?".jsx":".js":F&&(!C||!I)?U:F+C+"."+I.toLowerCase()+"js"});return r},f("__extends",mW),f("__assign",dW),f("__rest",iW),f("__decorate",cW),f("__param",gW),f("__esDecorate",xW),f("__runInitializers",_W),f("__propKey",nW),f("__setFunctionName",eW),f("__metadata",aW),f("__awaiter",oW),f("__generator",pW),f("__exportStar",uW),f("__createBinding",j4),f("__values",y4),f("__read",Z2),f("__spread",tW),f("__spreadArrays",fz),f("__spreadArray",hz),f("__await",lw),f("__asyncGenerator",wz),f("__asyncDelegator",sz),f("__asyncValues",$z),f("__makeTemplateObject",rz),f("__importStar",Ez),f("__importDefault",Uz),f("__classPrivateFieldGet",Tz),f("__classPrivateFieldSet",Fz),f("__classPrivateFieldIn",Cz),f("__addDisposableResource",Iz),f("__disposeResources",Lz),f("__rewriteRelativeImportExtension",Bz)})});var C1=H((E20,zz)=>{var{defineProperty:v4,getOwnPropertyDescriptor:mb,getOwnPropertyNames:db}=Object,ib=Object.prototype.hasOwnProperty,V2=(f,h)=>v4(f,"name",{value:h,configurable:!0}),cb=(f,h)=>{for(var w in h)v4(f,w,{get:h[w],enumerable:!0})},gb=(f,h,w,s)=>{if(h&&typeof h==="object"||typeof h==="function"){for(let $ of db(h))if(!ib.call(f,$)&&$!==w)v4(f,$,{get:()=>h[$],enumerable:!(s=mb(h,$))||s.enumerable})}return f},xb=(f)=>gb(v4({},"__esModule",{value:!0}),f),Az={};cb(Az,{emitWarningIfUnsupportedVersion:()=>_b,setCredentialFeature:()=>Gz,setFeature:()=>Wz,state:()=>J2});zz.exports=xb(Az);var J2={warningEmitted:!1},_b=V2((f)=>{if(f&&!J2.warningEmitted&&parseInt(f.substring(1,f.indexOf(".")))<18)J2.warningEmitted=!0,process.emitWarning(`NodeDeprecationWarning: The AWS SDK for JavaScript (v3) will
13
13
  no longer support Node.js 16.x on January 6, 2025.
14
14
 
15
15
  To continue receiving updates to AWS services, bug fixes, and security
16
16
  updates please upgrade to a supported Node.js LTS version.
17
17
 
18
- More information can be found at: https://a.co/74kJMmI`)},"emitWarningIfUnsupportedVersion");function Gz(f,h,w){if(!f.$source)f.$source={};return f.$source[h]=w,f}V2(Gz,"setCredentialFeature");function Wz(f,h,w){if(!f.__aws_sdk_context)f.__aws_sdk_context={features:{}};else if(!f.__aws_sdk_context.features)f.__aws_sdk_context.features={};f.__aws_sdk_context.features[h]=w}V2(Wz,"setFeature")});var D$=H(($20,Xz)=>{var{defineProperty:b4,getOwnPropertyDescriptor:xb,getOwnPropertyNames:_b}=Object,nb=Object.prototype.hasOwnProperty,nh=(f,h)=>b4(f,"name",{value:h,configurable:!0}),eb=(f,h)=>{for(var w in h)b4(f,w,{get:h[w],enumerable:!0})},ab=(f,h,w,s)=>{if(h&&typeof h==="object"||typeof h==="function"){for(let $ of _b(h))if(!nb.call(f,$)&&$!==w)b4(f,$,{get:()=>h[$],enumerable:!(s=xb(h,$))||s.enumerable})}return f},ob=(f)=>ab(b4({},"__esModule",{value:!0}),f),Rz={};eb(Rz,{CredentialsProviderError:()=>pb,ProviderError:()=>m4,TokenProviderError:()=>ub,chain:()=>tb,fromStatic:()=>fm,memoize:()=>hm});Xz.exports=ob(Rz);var m4=class f extends Error{constructor(h,w=!0){let s,$=!0;if(typeof w==="boolean")s=void 0,$=w;else if(w!=null&&typeof w==="object")s=w.logger,$=w.tryNextLink??!0;super(h);this.name="ProviderError",this.tryNextLink=$,Object.setPrototypeOf(this,f.prototype),s?.debug?.(`@smithy/property-provider ${$?"->":"(!)"} ${h}`)}static{nh(this,"ProviderError")}static from(h,w=!0){return Object.assign(new this(h.message,w),h)}},pb=class f extends m4{constructor(h,w=!0){super(h,w);this.name="CredentialsProviderError",Object.setPrototypeOf(this,f.prototype)}static{nh(this,"CredentialsProviderError")}},ub=class f extends m4{constructor(h,w=!0){super(h,w);this.name="TokenProviderError",Object.setPrototypeOf(this,f.prototype)}static{nh(this,"TokenProviderError")}},tb=nh((...f)=>async()=>{if(f.length===0)throw new m4("No providers in chain");let h;for(let w of f)try{return await w()}catch(s){if(h=s,s?.tryNextLink)continue;throw s}throw h},"chain"),fm=nh((f)=>()=>Promise.resolve(f),"fromStatic"),hm=nh((f,h,w)=>{let s,$,r,E=!1,U=nh(async()=>{if(!$)$=f();try{s=await $,r=!0,E=!1}finally{$=void 0}return s},"coalesceProvider");if(h===void 0)return async(T)=>{if(!r||T?.forceRefresh)s=await U();return s};return async(T)=>{if(!r||T?.forceRefresh)s=await U();if(E)return s;if(w&&!w(s))return E=!0,s;if(h(s))return await U(),s;return s}},"memoize")});var Oz=H((r20,jz)=>{var{defineProperty:_4,getOwnPropertyDescriptor:wm,getOwnPropertyNames:sm}=Object,$m=Object.prototype.hasOwnProperty,o0=(f,h)=>_4(f,"name",{value:h,configurable:!0}),rm=(f,h)=>{for(var w in h)_4(f,w,{get:h[w],enumerable:!0})},Em=(f,h,w,s)=>{if(h&&typeof h==="object"||typeof h==="function"){for(let $ of sm(h))if(!$m.call(f,$)&&$!==w)_4(f,$,{get:()=>h[$],enumerable:!(s=wm(h,$))||s.enumerable})}return f},Um=(f)=>Em(_4({},"__esModule",{value:!0}),f),Kz={};rm(Kz,{SignatureV4:()=>km,clearCredentialCache:()=>Km,createScope:()=>c4,getCanonicalHeaders:()=>D2,getCanonicalQuery:()=>qz,getPayloadHash:()=>x4,getSigningKey:()=>Dz,moveHeadersToQuery:()=>yz,prepareRequest:()=>k2});jz.exports=Um(Kz);var Sz=Fh(),P2=u1(),Tm="X-Amz-Algorithm",Fm="X-Amz-Credential",Zz="X-Amz-Date",Cm="X-Amz-SignedHeaders",Im="X-Amz-Expires",Jz="X-Amz-Signature",Vz="X-Amz-Security-Token",Pz="authorization",Hz=Zz.toLowerCase(),Lm="date",Bm=[Pz,Hz,Lm],Am=Jz.toLowerCase(),N2="x-amz-content-sha256",Gm=Vz.toLowerCase(),Wm={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},zm=/^proxy-/,Rm=/^sec-/,H2="AWS4-HMAC-SHA256",Xm="AWS4-HMAC-SHA256-PAYLOAD",Sm="UNSIGNED-PAYLOAD",Ym=50,Nz="aws4_request",Mm=604800,Gh=h2(),Qm=u1(),vw={},i4=[],c4=o0((f,h,w)=>`${f}/${h}/${w}/${Nz}`,"createScope"),Dz=o0(async(f,h,w,s,$)=>{let r=await Yz(f,h.secretAccessKey,h.accessKeyId),E=`${w}:${s}:${$}:${Gh.toHex(r)}:${h.sessionToken}`;if(E in vw)return vw[E];i4.push(E);while(i4.length>Ym)delete vw[i4.shift()];let U=`AWS4${h.secretAccessKey}`;for(let T of[w,s,$,Nz])U=await Yz(f,U,T);return vw[E]=U},"getSigningKey"),Km=o0(()=>{i4.length=0,Object.keys(vw).forEach((f)=>{delete vw[f]})},"clearCredentialCache"),Yz=o0((f,h,w)=>{let s=new f(h);return s.update(Qm.toUint8Array(w)),s.digest()},"hmac"),D2=o0(({headers:f},h,w)=>{let s={};for(let $ of Object.keys(f).sort()){if(f[$]==null)continue;let r=$.toLowerCase();if(r in Wm||h?.has(r)||zm.test(r)||Rm.test(r)){if(!w||w&&!w.has(r))continue}s[r]=f[$].trim().replace(/\s+/g," ")}return s},"getCanonicalHeaders"),g4=z4(),qz=o0(({query:f={}})=>{let h=[],w={};for(let s of Object.keys(f)){if(s.toLowerCase()===Am)continue;let $=g4.escapeUri(s);h.push($);let r=f[s];if(typeof r==="string")w[$]=`${$}=${g4.escapeUri(r)}`;else if(Array.isArray(r))w[$]=r.slice(0).reduce((E,U)=>E.concat([`${$}=${g4.escapeUri(U)}`]),[]).sort().join("&")}return h.sort().map((s)=>w[s]).filter((s)=>s).join("&")},"getCanonicalQuery"),Zm=mT(),Jm=u1(),x4=o0(async({headers:f,body:h},w)=>{for(let s of Object.keys(f))if(s.toLowerCase()===N2)return f[s];if(h==null)return"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855";else if(typeof h==="string"||ArrayBuffer.isView(h)||Zm.isArrayBuffer(h)){let s=new w;return s.update(Jm.toUint8Array(h)),Gh.toHex(await s.digest())}return Sm},"getPayloadHash"),Mz=u1(),Vm=class{static{o0(this,"HeaderFormatter")}format(f){let h=[];for(let $ of Object.keys(f)){let r=Mz.fromUtf8($);h.push(Uint8Array.from([r.byteLength]),r,this.formatHeaderValue(f[$]))}let w=new Uint8Array(h.reduce(($,r)=>$+r.byteLength,0)),s=0;for(let $ of h)w.set($,s),s+=$.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":let h=new DataView(new ArrayBuffer(3));return h.setUint8(0,3),h.setInt16(1,f.value,!1),new Uint8Array(h.buffer);case"integer":let w=new DataView(new ArrayBuffer(5));return w.setUint8(0,4),w.setInt32(1,f.value,!1),new Uint8Array(w.buffer);case"long":let s=new Uint8Array(9);return s[0]=5,s.set(f.value.bytes,1),s;case"binary":let $=new DataView(new ArrayBuffer(3+f.value.byteLength));$.setUint8(0,6),$.setUint16(1,f.value.byteLength,!1);let r=new Uint8Array($.buffer);return r.set(f.value,3),r;case"string":let E=Mz.fromUtf8(f.value),U=new DataView(new ArrayBuffer(3+E.byteLength));U.setUint8(0,7),U.setUint16(1,E.byteLength,!1);let T=new Uint8Array(U.buffer);return T.set(E,3),T;case"timestamp":let F=new Uint8Array(9);return F[0]=8,F.set(Hm.fromNumber(f.value.valueOf()).bytes,1),F;case"uuid":if(!Pm.test(f.value))throw new Error(`Invalid UUID received: ${f.value}`);let C=new Uint8Array(17);return C[0]=9,C.set(Gh.fromHex(f.value.replace(/\-/g,"")),1),C}}},Pm=/^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$/,Hm=class f{constructor(h){if(this.bytes=h,h.byteLength!==8)throw new Error("Int64 buffers must be exactly 8 bytes")}static{o0(this,"Int64")}static fromNumber(h){if(h>9223372036854776000||h<-9223372036854776000)throw new Error(`${h} is too large (or, if negative, too small) to represent as an Int64`);let w=new Uint8Array(8);for(let s=7,$=Math.abs(Math.round(h));s>-1&&$>0;s--,$/=256)w[s]=$;if(h<0)q2(w);return new f(w)}valueOf(){let h=this.bytes.slice(0),w=h[0]&128;if(w)q2(h);return parseInt(Gh.toHex(h),16)*(w?-1:1)}toString(){return String(this.valueOf())}};function q2(f){for(let h=0;h<8;h++)f[h]^=255;for(let h=7;h>-1;h--)if(f[h]++,f[h]!==0)break}o0(q2,"negate");var Nm=o0((f,h)=>{f=f.toLowerCase();for(let w of Object.keys(h))if(f===w.toLowerCase())return!0;return!1},"hasHeader"),kz=t0(),yz=o0((f,h={})=>{let{headers:w,query:s={}}=kz.HttpRequest.clone(f);for(let $ of Object.keys(w)){let r=$.toLowerCase();if(r.slice(0,6)==="x-amz-"&&!h.unhoistableHeaders?.has(r)||h.hoistableHeaders?.has(r))s[$]=w[$],delete w[$]}return{...f,headers:w,query:s}},"moveHeadersToQuery"),k2=o0((f)=>{f=kz.HttpRequest.clone(f);for(let h of Object.keys(f.headers))if(Bm.indexOf(h.toLowerCase())>-1)delete f.headers[h];return f},"prepareRequest"),Dm=o0((f)=>qm(f).toISOString().replace(/\.\d{3}Z$/,"Z"),"iso8601"),qm=o0((f)=>{if(typeof f==="number")return new Date(f*1000);if(typeof f==="string"){if(Number(f))return new Date(Number(f)*1000);return new Date(f)}return f},"toDate"),km=class{constructor({applyChecksum:f,credentials:h,region:w,service:s,sha256:$,uriEscapePath:r=!0}){this.headerFormatter=new Vm,this.service=s,this.sha256=$,this.uriEscapePath=r,this.applyChecksum=typeof f==="boolean"?f:!0,this.regionProvider=Sz.normalizeProvider(w),this.credentialProvider=Sz.normalizeProvider(h)}static{o0(this,"SignatureV4")}async presign(f,h={}){let{signingDate:w=new Date,expiresIn:s=3600,unsignableHeaders:$,unhoistableHeaders:r,signableHeaders:E,hoistableHeaders:U,signingRegion:T,signingService:F}=h,C=await this.credentialProvider();this.validateResolvedCredentials(C);let I=T??await this.regionProvider(),{longDate:L,shortDate:G}=d4(w);if(s>Mm)return Promise.reject("Signature version 4 presigned URLs must have an expiration date less than one week in the future");let X=c4(G,I,F??this.service),Q=yz(k2(f),{unhoistableHeaders:r,hoistableHeaders:U});if(C.sessionToken)Q.query[Vz]=C.sessionToken;Q.query[Tm]=H2,Q.query[Fm]=`${C.accessKeyId}/${X}`,Q.query[Zz]=L,Q.query[Im]=s.toString(10);let M=D2(Q,$,E);return Q.query[Cm]=Qz(M),Q.query[Jz]=await this.getSignature(L,X,this.getSigningKey(C,I,G,F),this.createCanonicalRequest(Q,M,await x4(f,this.sha256))),Q}async sign(f,h){if(typeof f==="string")return this.signString(f,h);else if(f.headers&&f.payload)return this.signEvent(f,h);else if(f.message)return this.signMessage(f,h);else return this.signRequest(f,h)}async signEvent({headers:f,payload:h},{signingDate:w=new Date,priorSignature:s,signingRegion:$,signingService:r}){let E=$??await this.regionProvider(),{shortDate:U,longDate:T}=d4(w),F=c4(U,E,r??this.service),C=await x4({headers:{},body:h},this.sha256),I=new this.sha256;I.update(f);let L=Gh.toHex(await I.digest()),G=[Xm,T,F,s,L,C].join(`
19
- `);return this.signString(G,{signingDate:w,signingRegion:E,signingService:r})}async signMessage(f,{signingDate:h=new Date,signingRegion:w,signingService:s}){return this.signEvent({headers:this.headerFormatter.format(f.message.headers),payload:f.message.body},{signingDate:h,signingRegion:w,signingService:s,priorSignature:f.priorSignature}).then((r)=>{return{message:f.message,signature:r}})}async signString(f,{signingDate:h=new Date,signingRegion:w,signingService:s}={}){let $=await this.credentialProvider();this.validateResolvedCredentials($);let r=w??await this.regionProvider(),{shortDate:E}=d4(h),U=new this.sha256(await this.getSigningKey($,r,E,s));return U.update(P2.toUint8Array(f)),Gh.toHex(await U.digest())}async signRequest(f,{signingDate:h=new Date,signableHeaders:w,unsignableHeaders:s,signingRegion:$,signingService:r}={}){let E=await this.credentialProvider();this.validateResolvedCredentials(E);let U=$??await this.regionProvider(),T=k2(f),{longDate:F,shortDate:C}=d4(h),I=c4(C,U,r??this.service);if(T.headers[Hz]=F,E.sessionToken)T.headers[Gm]=E.sessionToken;let L=await x4(T,this.sha256);if(!Nm(N2,T.headers)&&this.applyChecksum)T.headers[N2]=L;let G=D2(T,s,w),X=await this.getSignature(F,I,this.getSigningKey(E,U,C,r),this.createCanonicalRequest(T,G,L));return T.headers[Pz]=`${H2} Credential=${E.accessKeyId}/${I}, SignedHeaders=${Qz(G)}, Signature=${X}`,T}createCanonicalRequest(f,h,w){let s=Object.keys(h).sort();return`${f.method}
18
+ More information can be found at: https://a.co/74kJMmI`)},"emitWarningIfUnsupportedVersion");function Gz(f,h,w){if(!f.$source)f.$source={};return f.$source[h]=w,f}V2(Gz,"setCredentialFeature");function Wz(f,h,w){if(!f.__aws_sdk_context)f.__aws_sdk_context={features:{}};else if(!f.__aws_sdk_context.features)f.__aws_sdk_context.features={};f.__aws_sdk_context.features[h]=w}V2(Wz,"setFeature")});var D$=H((U20,Xz)=>{var{defineProperty:b4,getOwnPropertyDescriptor:nb,getOwnPropertyNames:eb}=Object,ab=Object.prototype.hasOwnProperty,nh=(f,h)=>b4(f,"name",{value:h,configurable:!0}),ob=(f,h)=>{for(var w in h)b4(f,w,{get:h[w],enumerable:!0})},pb=(f,h,w,s)=>{if(h&&typeof h==="object"||typeof h==="function"){for(let $ of eb(h))if(!ab.call(f,$)&&$!==w)b4(f,$,{get:()=>h[$],enumerable:!(s=nb(h,$))||s.enumerable})}return f},ub=(f)=>pb(b4({},"__esModule",{value:!0}),f),Rz={};ob(Rz,{CredentialsProviderError:()=>tb,ProviderError:()=>m4,TokenProviderError:()=>fm,chain:()=>hm,fromStatic:()=>wm,memoize:()=>sm});Xz.exports=ub(Rz);var m4=class f extends Error{constructor(h,w=!0){let s,$=!0;if(typeof w==="boolean")s=void 0,$=w;else if(w!=null&&typeof w==="object")s=w.logger,$=w.tryNextLink??!0;super(h);this.name="ProviderError",this.tryNextLink=$,Object.setPrototypeOf(this,f.prototype),s?.debug?.(`@smithy/property-provider ${$?"->":"(!)"} ${h}`)}static{nh(this,"ProviderError")}static from(h,w=!0){return Object.assign(new this(h.message,w),h)}},tb=class f extends m4{constructor(h,w=!0){super(h,w);this.name="CredentialsProviderError",Object.setPrototypeOf(this,f.prototype)}static{nh(this,"CredentialsProviderError")}},fm=class f extends m4{constructor(h,w=!0){super(h,w);this.name="TokenProviderError",Object.setPrototypeOf(this,f.prototype)}static{nh(this,"TokenProviderError")}},hm=nh((...f)=>async()=>{if(f.length===0)throw new m4("No providers in chain");let h;for(let w of f)try{return await w()}catch(s){if(h=s,s?.tryNextLink)continue;throw s}throw h},"chain"),wm=nh((f)=>()=>Promise.resolve(f),"fromStatic"),sm=nh((f,h,w)=>{let s,$,r,E=!1,U=nh(async()=>{if(!$)$=f();try{s=await $,r=!0,E=!1}finally{$=void 0}return s},"coalesceProvider");if(h===void 0)return async(T)=>{if(!r||T?.forceRefresh)s=await U();return s};return async(T)=>{if(!r||T?.forceRefresh)s=await U();if(E)return s;if(w&&!w(s))return E=!0,s;if(h(s))return await U(),s;return s}},"memoize")});var Oz=H((T20,jz)=>{var{defineProperty:_4,getOwnPropertyDescriptor:$m,getOwnPropertyNames:rm}=Object,Em=Object.prototype.hasOwnProperty,o0=(f,h)=>_4(f,"name",{value:h,configurable:!0}),Um=(f,h)=>{for(var w in h)_4(f,w,{get:h[w],enumerable:!0})},Tm=(f,h,w,s)=>{if(h&&typeof h==="object"||typeof h==="function"){for(let $ of rm(h))if(!Em.call(f,$)&&$!==w)_4(f,$,{get:()=>h[$],enumerable:!(s=$m(h,$))||s.enumerable})}return f},Fm=(f)=>Tm(_4({},"__esModule",{value:!0}),f),Kz={};Um(Kz,{SignatureV4:()=>jm,clearCredentialCache:()=>Jm,createScope:()=>c4,getCanonicalHeaders:()=>D2,getCanonicalQuery:()=>qz,getPayloadHash:()=>x4,getSigningKey:()=>Dz,moveHeadersToQuery:()=>yz,prepareRequest:()=>k2});jz.exports=Fm(Kz);var Sz=Fh(),P2=u1(),Cm="X-Amz-Algorithm",Im="X-Amz-Credential",Zz="X-Amz-Date",Lm="X-Amz-SignedHeaders",Bm="X-Amz-Expires",Jz="X-Amz-Signature",Vz="X-Amz-Security-Token",Pz="authorization",Hz=Zz.toLowerCase(),Am="date",Gm=[Pz,Hz,Am],Wm=Jz.toLowerCase(),N2="x-amz-content-sha256",zm=Vz.toLowerCase(),Rm={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},Xm=/^proxy-/,Sm=/^sec-/,H2="AWS4-HMAC-SHA256",Ym="AWS4-HMAC-SHA256-PAYLOAD",Mm="UNSIGNED-PAYLOAD",Qm=50,Nz="aws4_request",Km=604800,Gh=h2(),Zm=u1(),vw={},i4=[],c4=o0((f,h,w)=>`${f}/${h}/${w}/${Nz}`,"createScope"),Dz=o0(async(f,h,w,s,$)=>{let r=await Yz(f,h.secretAccessKey,h.accessKeyId),E=`${w}:${s}:${$}:${Gh.toHex(r)}:${h.sessionToken}`;if(E in vw)return vw[E];i4.push(E);while(i4.length>Qm)delete vw[i4.shift()];let U=`AWS4${h.secretAccessKey}`;for(let T of[w,s,$,Nz])U=await Yz(f,U,T);return vw[E]=U},"getSigningKey"),Jm=o0(()=>{i4.length=0,Object.keys(vw).forEach((f)=>{delete vw[f]})},"clearCredentialCache"),Yz=o0((f,h,w)=>{let s=new f(h);return s.update(Zm.toUint8Array(w)),s.digest()},"hmac"),D2=o0(({headers:f},h,w)=>{let s={};for(let $ of Object.keys(f).sort()){if(f[$]==null)continue;let r=$.toLowerCase();if(r in Rm||h?.has(r)||Xm.test(r)||Sm.test(r)){if(!w||w&&!w.has(r))continue}s[r]=f[$].trim().replace(/\s+/g," ")}return s},"getCanonicalHeaders"),g4=nT(),qz=o0(({query:f={}})=>{let h=[],w={};for(let s of Object.keys(f)){if(s.toLowerCase()===Wm)continue;let $=g4.escapeUri(s);h.push($);let r=f[s];if(typeof r==="string")w[$]=`${$}=${g4.escapeUri(r)}`;else if(Array.isArray(r))w[$]=r.slice(0).reduce((E,U)=>E.concat([`${$}=${g4.escapeUri(U)}`]),[]).sort().join("&")}return h.sort().map((s)=>w[s]).filter((s)=>s).join("&")},"getCanonicalQuery"),Vm=bT(),Pm=u1(),x4=o0(async({headers:f,body:h},w)=>{for(let s of Object.keys(f))if(s.toLowerCase()===N2)return f[s];if(h==null)return"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855";else if(typeof h==="string"||ArrayBuffer.isView(h)||Vm.isArrayBuffer(h)){let s=new w;return s.update(Pm.toUint8Array(h)),Gh.toHex(await s.digest())}return Mm},"getPayloadHash"),Mz=u1(),Hm=class{static{o0(this,"HeaderFormatter")}format(f){let h=[];for(let $ of Object.keys(f)){let r=Mz.fromUtf8($);h.push(Uint8Array.from([r.byteLength]),r,this.formatHeaderValue(f[$]))}let w=new Uint8Array(h.reduce(($,r)=>$+r.byteLength,0)),s=0;for(let $ of h)w.set($,s),s+=$.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":let h=new DataView(new ArrayBuffer(3));return h.setUint8(0,3),h.setInt16(1,f.value,!1),new Uint8Array(h.buffer);case"integer":let w=new DataView(new ArrayBuffer(5));return w.setUint8(0,4),w.setInt32(1,f.value,!1),new Uint8Array(w.buffer);case"long":let s=new Uint8Array(9);return s[0]=5,s.set(f.value.bytes,1),s;case"binary":let $=new DataView(new ArrayBuffer(3+f.value.byteLength));$.setUint8(0,6),$.setUint16(1,f.value.byteLength,!1);let r=new Uint8Array($.buffer);return r.set(f.value,3),r;case"string":let E=Mz.fromUtf8(f.value),U=new DataView(new ArrayBuffer(3+E.byteLength));U.setUint8(0,7),U.setUint16(1,E.byteLength,!1);let T=new Uint8Array(U.buffer);return T.set(E,3),T;case"timestamp":let F=new Uint8Array(9);return F[0]=8,F.set(Dm.fromNumber(f.value.valueOf()).bytes,1),F;case"uuid":if(!Nm.test(f.value))throw new Error(`Invalid UUID received: ${f.value}`);let C=new Uint8Array(17);return C[0]=9,C.set(Gh.fromHex(f.value.replace(/\-/g,"")),1),C}}},Nm=/^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$/,Dm=class f{constructor(h){if(this.bytes=h,h.byteLength!==8)throw new Error("Int64 buffers must be exactly 8 bytes")}static{o0(this,"Int64")}static fromNumber(h){if(h>9223372036854776000||h<-9223372036854776000)throw new Error(`${h} is too large (or, if negative, too small) to represent as an Int64`);let w=new Uint8Array(8);for(let s=7,$=Math.abs(Math.round(h));s>-1&&$>0;s--,$/=256)w[s]=$;if(h<0)q2(w);return new f(w)}valueOf(){let h=this.bytes.slice(0),w=h[0]&128;if(w)q2(h);return parseInt(Gh.toHex(h),16)*(w?-1:1)}toString(){return String(this.valueOf())}};function q2(f){for(let h=0;h<8;h++)f[h]^=255;for(let h=7;h>-1;h--)if(f[h]++,f[h]!==0)break}o0(q2,"negate");var qm=o0((f,h)=>{f=f.toLowerCase();for(let w of Object.keys(h))if(f===w.toLowerCase())return!0;return!1},"hasHeader"),kz=t0(),yz=o0((f,h={})=>{let{headers:w,query:s={}}=kz.HttpRequest.clone(f);for(let $ of Object.keys(w)){let r=$.toLowerCase();if(r.slice(0,6)==="x-amz-"&&!h.unhoistableHeaders?.has(r)||h.hoistableHeaders?.has(r))s[$]=w[$],delete w[$]}return{...f,headers:w,query:s}},"moveHeadersToQuery"),k2=o0((f)=>{f=kz.HttpRequest.clone(f);for(let h of Object.keys(f.headers))if(Gm.indexOf(h.toLowerCase())>-1)delete f.headers[h];return f},"prepareRequest"),km=o0((f)=>ym(f).toISOString().replace(/\.\d{3}Z$/,"Z"),"iso8601"),ym=o0((f)=>{if(typeof f==="number")return new Date(f*1000);if(typeof f==="string"){if(Number(f))return new Date(Number(f)*1000);return new Date(f)}return f},"toDate"),jm=class{constructor({applyChecksum:f,credentials:h,region:w,service:s,sha256:$,uriEscapePath:r=!0}){this.headerFormatter=new Hm,this.service=s,this.sha256=$,this.uriEscapePath=r,this.applyChecksum=typeof f==="boolean"?f:!0,this.regionProvider=Sz.normalizeProvider(w),this.credentialProvider=Sz.normalizeProvider(h)}static{o0(this,"SignatureV4")}async presign(f,h={}){let{signingDate:w=new Date,expiresIn:s=3600,unsignableHeaders:$,unhoistableHeaders:r,signableHeaders:E,hoistableHeaders:U,signingRegion:T,signingService:F}=h,C=await this.credentialProvider();this.validateResolvedCredentials(C);let I=T??await this.regionProvider(),{longDate:L,shortDate:G}=d4(w);if(s>Km)return Promise.reject("Signature version 4 presigned URLs must have an expiration date less than one week in the future");let X=c4(G,I,F??this.service),Q=yz(k2(f),{unhoistableHeaders:r,hoistableHeaders:U});if(C.sessionToken)Q.query[Vz]=C.sessionToken;Q.query[Cm]=H2,Q.query[Im]=`${C.accessKeyId}/${X}`,Q.query[Zz]=L,Q.query[Bm]=s.toString(10);let M=D2(Q,$,E);return Q.query[Lm]=Qz(M),Q.query[Jz]=await this.getSignature(L,X,this.getSigningKey(C,I,G,F),this.createCanonicalRequest(Q,M,await x4(f,this.sha256))),Q}async sign(f,h){if(typeof f==="string")return this.signString(f,h);else if(f.headers&&f.payload)return this.signEvent(f,h);else if(f.message)return this.signMessage(f,h);else return this.signRequest(f,h)}async signEvent({headers:f,payload:h},{signingDate:w=new Date,priorSignature:s,signingRegion:$,signingService:r}){let E=$??await this.regionProvider(),{shortDate:U,longDate:T}=d4(w),F=c4(U,E,r??this.service),C=await x4({headers:{},body:h},this.sha256),I=new this.sha256;I.update(f);let L=Gh.toHex(await I.digest()),G=[Ym,T,F,s,L,C].join(`
19
+ `);return this.signString(G,{signingDate:w,signingRegion:E,signingService:r})}async signMessage(f,{signingDate:h=new Date,signingRegion:w,signingService:s}){return this.signEvent({headers:this.headerFormatter.format(f.message.headers),payload:f.message.body},{signingDate:h,signingRegion:w,signingService:s,priorSignature:f.priorSignature}).then((r)=>{return{message:f.message,signature:r}})}async signString(f,{signingDate:h=new Date,signingRegion:w,signingService:s}={}){let $=await this.credentialProvider();this.validateResolvedCredentials($);let r=w??await this.regionProvider(),{shortDate:E}=d4(h),U=new this.sha256(await this.getSigningKey($,r,E,s));return U.update(P2.toUint8Array(f)),Gh.toHex(await U.digest())}async signRequest(f,{signingDate:h=new Date,signableHeaders:w,unsignableHeaders:s,signingRegion:$,signingService:r}={}){let E=await this.credentialProvider();this.validateResolvedCredentials(E);let U=$??await this.regionProvider(),T=k2(f),{longDate:F,shortDate:C}=d4(h),I=c4(C,U,r??this.service);if(T.headers[Hz]=F,E.sessionToken)T.headers[zm]=E.sessionToken;let L=await x4(T,this.sha256);if(!qm(N2,T.headers)&&this.applyChecksum)T.headers[N2]=L;let G=D2(T,s,w),X=await this.getSignature(F,I,this.getSigningKey(E,U,C,r),this.createCanonicalRequest(T,G,L));return T.headers[Pz]=`${H2} Credential=${E.accessKeyId}/${I}, SignedHeaders=${Qz(G)}, Signature=${X}`,T}createCanonicalRequest(f,h,w){let s=Object.keys(h).sort();return`${f.method}
20
20
  ${this.getCanonicalPath(f)}
21
21
  ${qz(f)}
22
22
  ${s.map(($)=>`${$}:${h[$]}`).join(`
@@ -26,29 +26,29 @@ ${s.join(";")}
26
26
  ${w}`}async createStringToSign(f,h,w){let s=new this.sha256;s.update(P2.toUint8Array(w));let $=await s.digest();return`${H2}
27
27
  ${f}
28
28
  ${h}
29
- ${Gh.toHex($)}`}getCanonicalPath({path:f}){if(this.uriEscapePath){let h=[];for(let $ of f.split("/")){if($?.length===0)continue;if($===".")continue;if($==="..")h.pop();else h.push($)}let w=`${f?.startsWith("/")?"/":""}${h.join("/")}${h.length>0&&f?.endsWith("/")?"/":""}`;return g4.escapeUri(w).replace(/%2F/g,"/")}return f}async getSignature(f,h,w,s){let $=await this.createStringToSign(f,h,s),r=new this.sha256(await w);return r.update(P2.toUint8Array($)),Gh.toHex(await r.digest())}getSigningKey(f,h,w,s){return Dz(this.sha256,f,w,h,s||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")}},d4=o0((f)=>{let h=Dm(f).replace(/[\-:]/g,"");return{longDate:h,shortDate:h.slice(0,8)}},"formatDate"),Qz=o0((f)=>Object.keys(f).sort().join(";"),"getCanonicalHeaderList")});var gz=H((T20,cz)=>{var{defineProperty:n4,getOwnPropertyDescriptor:ym,getOwnPropertyNames:jm}=Object,Om=Object.prototype.hasOwnProperty,R1=(f,h)=>n4(f,"name",{value:h,configurable:!0}),lm=(f,h)=>{for(var w in h)n4(f,w,{get:h[w],enumerable:!0})},vm=(f,h,w,s)=>{if(h&&typeof h==="object"||typeof h==="function"){for(let $ of jm(h))if(!Om.call(f,$)&&$!==w)n4(f,$,{get:()=>h[$],enumerable:!(s=ym(h,$))||s.enumerable})}return f},bm=(f)=>vm(n4({},"__esModule",{value:!0}),f),dz={};lm(dz,{AWSSDKSigV4Signer:()=>cm,AwsSdkSigV4ASigner:()=>xm,AwsSdkSigV4Signer:()=>O2,NODE_SIGV4A_CONFIG_OPTIONS:()=>em,resolveAWSSDKSigV4Config:()=>om,resolveAwsSdkSigV4AConfig:()=>nm,resolveAwsSdkSigV4Config:()=>iz,validateSigningProperties:()=>j2});cz.exports=bm(dz);var mm=t0(),dm=t0(),lz=R1((f)=>dm.HttpResponse.isInstance(f)?f.headers?.date??f.headers?.Date:void 0,"getDateHeader"),y2=R1((f)=>new Date(Date.now()+f),"getSkewCorrectedDate"),im=R1((f,h)=>Math.abs(y2(h).getTime()-f)>=300000,"isClockSkewed"),vz=R1((f,h)=>{let w=Date.parse(f);if(im(w,h))return w-Date.now();return h},"getUpdatedSystemClockOffset"),q$=R1((f,h)=>{if(!h)throw new Error(`Property \`${f}\` is not resolved for AWS SDK SigV4Auth`);return h},"throwSigningPropertyError"),j2=R1(async(f)=>{let h=q$("context",f.context),w=q$("config",f.config),s=h.endpointV2?.properties?.authSchemes?.[0],r=await q$("signer",w.signer)(s),E=f?.signingRegion,U=f?.signingRegionSet,T=f?.signingName;return{config:w,signer:r,signingRegion:E,signingRegionSet:U,signingName:T}},"validateSigningProperties"),O2=class{static{R1(this,"AwsSdkSigV4Signer")}async sign(f,h,w){if(!mm.HttpRequest.isInstance(f))throw new Error("The request is not an instance of `HttpRequest` and cannot be signed");let s=await j2(w),{config:$,signer:r}=s,{signingRegion:E,signingName:U}=s,T=w.context;if(T?.authSchemes?.length??0>1){let[C,I]=T.authSchemes;if(C?.name==="sigv4a"&&I?.name==="sigv4")E=I?.signingRegion??E,U=I?.signingName??U}return await r.sign(f,{signingDate:y2($.systemClockOffset),signingRegion:E,signingService:U})}errorHandler(f){return(h)=>{let w=h.ServerTime??lz(h.$response);if(w){let s=q$("config",f.config),$=s.systemClockOffset;if(s.systemClockOffset=vz(w,s.systemClockOffset),s.systemClockOffset!==$&&h.$metadata)h.$metadata.clockSkewCorrected=!0}throw h}}successHandler(f,h){let w=lz(f);if(w){let s=q$("config",h.config);s.systemClockOffset=vz(w,s.systemClockOffset)}}},cm=O2,gm=t0(),xm=class extends O2{static{R1(this,"AwsSdkSigV4ASigner")}async sign(f,h,w){if(!gm.HttpRequest.isInstance(f))throw new Error("The request is not an instance of `HttpRequest` and cannot be signed");let{config:s,signer:$,signingRegion:r,signingRegionSet:E,signingName:U}=await j2(w),F=(await s.sigv4aSigningRegionSet?.()??E??[r]).join(",");return await $.sign(f,{signingDate:y2(s.systemClockOffset),signingRegion:F,signingService:U})}},_m=m0(),bz=D$(),nm=R1((f)=>{return f.sigv4aSigningRegionSet=_m.normalizeProvider(f.sigv4aSigningRegionSet),f},"resolveAwsSdkSigV4AConfig"),em={environmentVariableSelector(f){if(f.AWS_SIGV4A_SIGNING_REGION_SET)return f.AWS_SIGV4A_SIGNING_REGION_SET.split(",").map((h)=>h.trim());throw new bz.ProviderError("AWS_SIGV4A_SIGNING_REGION_SET not set in env.",{tryNextLink:!0})},configFileSelector(f){if(f.sigv4a_signing_region_set)return(f.sigv4a_signing_region_set??"").split(",").map((h)=>h.trim());throw new bz.ProviderError("sigv4a_signing_region_set not set in profile.",{tryNextLink:!0})},default:void 0},am=C1(),eh=m0(),mz=Oz(),iz=R1((f)=>{let h=!1,w;if(f.credentials)h=!0,w=eh.memoizeIdentityProvider(f.credentials,eh.isIdentityExpired,eh.doesIdentityRequireRefresh);if(!w)if(f.credentialDefaultProvider)w=eh.normalizeProvider(f.credentialDefaultProvider(Object.assign({},f,{parentClientConfig:f})));else w=R1(async()=>{throw new Error("`credentials` is missing")},"credentialsProvider");let s=R1(async()=>w({callerClientConfig:f}),"boundCredentialsProvider"),{signingEscapePath:$=!0,systemClockOffset:r=f.systemClockOffset||0,sha256:E}=f,U;if(f.signer)U=eh.normalizeProvider(f.signer);else if(f.regionInfoProvider)U=R1(()=>eh.normalizeProvider(f.region)().then(async(T)=>[await f.regionInfoProvider(T,{useFipsEndpoint:await f.useFipsEndpoint(),useDualstackEndpoint:await f.useDualstackEndpoint()})||{},T]).then(([T,F])=>{let{signingRegion:C,signingService:I}=T;f.signingRegion=f.signingRegion||C||F,f.signingName=f.signingName||I||f.serviceId;let L={...f,credentials:s,region:f.signingRegion,service:f.signingName,sha256:E,uriEscapePath:$};return new(f.signerConstructor||mz.SignatureV4)(L)}),"signer");else U=R1(async(T)=>{T=Object.assign({},{name:"sigv4",signingName:f.signingName||f.defaultSigningName,signingRegion:await eh.normalizeProvider(f.region)(),properties:{}},T);let{signingRegion:F,signingName:C}=T;f.signingRegion=f.signingRegion||F,f.signingName=f.signingName||C||f.serviceId;let I={...f,credentials:s,region:f.signingRegion,service:f.signingName,sha256:E,uriEscapePath:$};return new(f.signerConstructor||mz.SignatureV4)(I)},"signer");return{...f,systemClockOffset:r,signingEscapePath:$,credentials:h?async()=>s().then((T)=>am.setCredentialFeature(T,"CREDENTIALS_CODE","e")):s,signer:U}},"resolveAwsSdkSigV4Config"),om=iz});var az=H((I20,ez)=>{var{defineProperty:e4,getOwnPropertyDescriptor:pm,getOwnPropertyNames:um}=Object,tm=Object.prototype.hasOwnProperty,q1=(f,h)=>e4(f,"name",{value:h,configurable:!0}),fd=(f,h)=>{for(var w in h)e4(f,w,{get:h[w],enumerable:!0})},hd=(f,h,w,s)=>{if(h&&typeof h==="object"||typeof h==="function"){for(let $ of um(h))if(!tm.call(f,$)&&$!==w)e4(f,$,{get:()=>h[$],enumerable:!(s=pm(h,$))||s.enumerable})}return f},wd=(f)=>hd(e4({},"__esModule",{value:!0}),f),nz={};fd(nz,{constructStack:()=>l2});ez.exports=wd(nz);var ah=q1((f,h)=>{let w=[];if(f)w.push(f);if(h)for(let s of h)w.push(s);return w},"getAllAliases"),Wh=q1((f,h)=>{return`${f||"anonymous"}${h&&h.length>0?` (a.k.a. ${h.join(",")})`:""}`},"getMiddlewareNameWithAliases"),l2=q1(()=>{let f=[],h=[],w=!1,s=new Set,$=q1((I)=>I.sort((L,G)=>xz[G.step]-xz[L.step]||_z[G.priority||"normal"]-_z[L.priority||"normal"]),"sort"),r=q1((I)=>{let L=!1,G=q1((X)=>{let Q=ah(X.name,X.aliases);if(Q.includes(I)){L=!0;for(let M of Q)s.delete(M);return!1}return!0},"filterCb");return f=f.filter(G),h=h.filter(G),L},"removeByName"),E=q1((I)=>{let L=!1,G=q1((X)=>{if(X.middleware===I){L=!0;for(let Q of ah(X.name,X.aliases))s.delete(Q);return!1}return!0},"filterCb");return f=f.filter(G),h=h.filter(G),L},"removeByReference"),U=q1((I)=>{return f.forEach((L)=>{I.add(L.middleware,{...L})}),h.forEach((L)=>{I.addRelativeTo(L.middleware,{...L})}),I.identifyOnResolve?.(C.identifyOnResolve()),I},"cloneTo"),T=q1((I)=>{let L=[];return I.before.forEach((G)=>{if(G.before.length===0&&G.after.length===0)L.push(G);else L.push(...T(G))}),L.push(I),I.after.reverse().forEach((G)=>{if(G.before.length===0&&G.after.length===0)L.push(G);else L.push(...T(G))}),L},"expandRelativeMiddlewareList"),F=q1((I=!1)=>{let L=[],G=[],X={};return f.forEach((M)=>{let q={...M,before:[],after:[]};for(let N of ah(q.name,q.aliases))X[N]=q;L.push(q)}),h.forEach((M)=>{let q={...M,before:[],after:[]};for(let N of ah(q.name,q.aliases))X[N]=q;G.push(q)}),G.forEach((M)=>{if(M.toMiddleware){let q=X[M.toMiddleware];if(q===void 0){if(I)return;throw new Error(`${M.toMiddleware} is not found when adding ${Wh(M.name,M.aliases)} middleware ${M.relation} ${M.toMiddleware}`)}if(M.relation==="after")q.after.push(M);if(M.relation==="before")q.before.push(M)}}),$(L).map(T).reduce((M,q)=>{return M.push(...q),M},[])},"getMiddlewareList"),C={add:(I,L={})=>{let{name:G,override:X,aliases:Q}=L,M={step:"initialize",priority:"normal",middleware:I,...L},q=ah(G,Q);if(q.length>0){if(q.some((N)=>s.has(N))){if(!X)throw new Error(`Duplicate middleware name '${Wh(G,Q)}'`);for(let N of q){let y=f.findIndex((L0)=>L0.name===N||L0.aliases?.some((b0)=>b0===N));if(y===-1)continue;let n=f[y];if(n.step!==M.step||M.priority!==n.priority)throw new Error(`"${Wh(n.name,n.aliases)}" middleware with ${n.priority} priority in ${n.step} step cannot be overridden by "${Wh(G,Q)}" middleware with ${M.priority} priority in ${M.step} step.`);f.splice(y,1)}}for(let N of q)s.add(N)}f.push(M)},addRelativeTo:(I,L)=>{let{name:G,override:X,aliases:Q}=L,M={middleware:I,...L},q=ah(G,Q);if(q.length>0){if(q.some((N)=>s.has(N))){if(!X)throw new Error(`Duplicate middleware name '${Wh(G,Q)}'`);for(let N of q){let y=h.findIndex((L0)=>L0.name===N||L0.aliases?.some((b0)=>b0===N));if(y===-1)continue;let n=h[y];if(n.toMiddleware!==M.toMiddleware||n.relation!==M.relation)throw new Error(`"${Wh(n.name,n.aliases)}" middleware ${n.relation} "${n.toMiddleware}" middleware cannot be overridden by "${Wh(G,Q)}" middleware ${M.relation} "${M.toMiddleware}" middleware.`);h.splice(y,1)}}for(let N of q)s.add(N)}h.push(M)},clone:()=>U(l2()),use:(I)=>{I.applyToStack(C)},remove:(I)=>{if(typeof I==="string")return r(I);else return E(I)},removeByTag:(I)=>{let L=!1,G=q1((X)=>{let{tags:Q,name:M,aliases:q}=X;if(Q&&Q.includes(I)){let N=ah(M,q);for(let y of N)s.delete(y);return L=!0,!1}return!0},"filterCb");return f=f.filter(G),h=h.filter(G),L},concat:(I)=>{let L=U(l2());return L.use(I),L.identifyOnResolve(w||L.identifyOnResolve()||(I.identifyOnResolve?.()??!1)),L},applyToStack:U,identify:()=>{return F(!0).map((I)=>{let L=I.step??I.relation+" "+I.toMiddleware;return Wh(I.name,I.aliases)+" - "+L})},identifyOnResolve(I){if(typeof I==="boolean")w=I;return w},resolve:(I,L)=>{for(let G of F().map((X)=>X.middleware).reverse())I=G(I,L);if(w)console.log(C.identify());return I}};return C},"constructStack"),xz={initialize:5,serialize:4,build:3,finalizeRequest:2,deserialize:1},_z={high:3,normal:2,low:1}});var J0=H((L20,BR)=>{var{defineProperty:p4,getOwnPropertyDescriptor:sd,getOwnPropertyNames:$d}=Object,rd=Object.prototype.hasOwnProperty,b=(f,h)=>p4(f,"name",{value:h,configurable:!0}),Ed=(f,h)=>{for(var w in h)p4(f,w,{get:h[w],enumerable:!0})},Ud=(f,h,w,s)=>{if(h&&typeof h==="object"||typeof h==="function"){for(let $ of $d(h))if(!rd.call(f,$)&&$!==w)p4(f,$,{get:()=>h[$],enumerable:!(s=sd(h,$))||s.enumerable})}return f},Td=(f)=>Ud(p4({},"__esModule",{value:!0}),f),pz={};Ed(pz,{Client:()=>Fd,Command:()=>tz,LazyJsonString:()=>oh,NoOpLogger:()=>ri,SENSITIVE_STRING:()=>Id,ServiceException:()=>_d,_json:()=>g2,collectBody:()=>v2.collectBody,convertMap:()=>Ei,createAggregatedClient:()=>Ld,dateToUtcString:()=>rR,decorateServiceException:()=>ER,emitWarningIfUnsupportedVersion:()=>od,expectBoolean:()=>Ad,expectByte:()=>c2,expectFloat32:()=>a4,expectInt:()=>Wd,expectInt32:()=>d2,expectLong:()=>j$,expectNonNull:()=>Rd,expectNumber:()=>y$,expectObject:()=>fR,expectShort:()=>i2,expectString:()=>Xd,expectUnion:()=>Sd,extendedEncodeURIComponent:()=>v2.extendedEncodeURIComponent,getArrayIfSingleItem:()=>si,getDefaultClientConfiguration:()=>hi,getDefaultExtensionConfiguration:()=>TR,getValueFromTextNode:()=>FR,handleFloat:()=>Qd,isSerializableHeaderValue:()=>$i,limitedParseDouble:()=>n2,limitedParseFloat:()=>Kd,limitedParseFloat32:()=>Zd,loadConfigsForDefaultMode:()=>ad,logger:()=>O$,map:()=>a2,parseBoolean:()=>Bd,parseEpochTimestamp:()=>ld,parseRfc3339DateTime:()=>Nd,parseRfc3339DateTimeWithOffset:()=>qd,parseRfc7231DateTime:()=>Od,quoteHeader:()=>IR,resolveDefaultRuntimeConfig:()=>wi,resolvedPath:()=>v2.resolvedPath,serializeDateTime:()=>Li,serializeFloat:()=>Ii,splitEvery:()=>LR,splitHeader:()=>Bi,strictParseByte:()=>$R,strictParseDouble:()=>_2,strictParseFloat:()=>Yd,strictParseFloat32:()=>hR,strictParseInt:()=>Jd,strictParseInt32:()=>Vd,strictParseLong:()=>sR,strictParseShort:()=>bw,take:()=>Ui,throwDefaultError:()=>UR,withBaseException:()=>nd});BR.exports=Td(pz);var uz=az(),Fd=class{constructor(f){this.config=f,this.middlewareStack=uz.constructStack()}static{b(this,"Client")}send(f,h,w){let s=typeof h!=="function"?h:void 0,$=typeof h==="function"?h:w,r=s===void 0&&this.config.cacheMiddleware===!0,E;if(r){if(!this.handlers)this.handlers=new WeakMap;let U=this.handlers;if(U.has(f.constructor))E=U.get(f.constructor);else E=f.resolveMiddleware(this.middlewareStack,this.config,s),U.set(f.constructor,E)}else delete this.handlers,E=f.resolveMiddleware(this.middlewareStack,this.config,s);if($)E(f).then((U)=>$(null,U.output),(U)=>$(U)).catch(()=>{});else return E(f).then((U)=>U.output)}destroy(){this.config?.requestHandler?.destroy?.(),delete this.handlers}},v2=yw(),m2=T1(),tz=class{constructor(){this.middlewareStack=uz.constructStack()}static{b(this,"Command")}static classBuilder(){return new Cd}resolveMiddlewareWithContext(f,h,w,{middlewareFn:s,clientName:$,commandName:r,inputFilterSensitiveLog:E,outputFilterSensitiveLog:U,smithyContext:T,additionalContext:F,CommandCtor:C}){for(let Q of s.bind(this)(C,f,h,w))this.middlewareStack.use(Q);let I=f.concat(this.middlewareStack),{logger:L}=h,G={logger:L,clientName:$,commandName:r,inputFilterSensitiveLog:E,outputFilterSensitiveLog:U,[m2.SMITHY_CONTEXT_KEY]:{commandInstance:this,...T},...F},{requestHandler:X}=h;return I.resolve((Q)=>X.handle(Q.request,w||{}),G)}},Cd=class{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}static{b(this,"ClassBuilder")}init(f){this._init=f}ep(f){return this._ep=f,this}m(f){return this._middlewareFn=f,this}s(f,h,w={}){return this._smithyContext={service:f,operation:h,...w},this}c(f={}){return this._additionalContext=f,this}n(f,h){return this._clientName=f,this._commandName=h,this}f(f=(w)=>w,h=(w)=>w){return this._inputFilterSensitiveLog=f,this._outputFilterSensitiveLog=h,this}ser(f){return this._serializer=f,this}de(f){return this._deserializer=f,this}build(){let f=this,h;return h=class extends tz{constructor(...[w]){super();this.serialize=f._serializer,this.deserialize=f._deserializer,this.input=w??{},f._init(this)}static{b(this,"CommandRef")}static getEndpointParameterInstructions(){return f._ep}resolveMiddleware(w,s,$){return this.resolveMiddlewareWithContext(w,s,$,{CommandCtor:h,middlewareFn:f._middlewareFn,clientName:f._clientName,commandName:f._commandName,inputFilterSensitiveLog:f._inputFilterSensitiveLog,outputFilterSensitiveLog:f._outputFilterSensitiveLog,smithyContext:f._smithyContext,additionalContext:f._additionalContext})}}}},Id="***SensitiveInformation***",Ld=b((f,h)=>{for(let w of Object.keys(f)){let s=f[w],$=b(async function(E,U,T){let F=new s(E);if(typeof U==="function")this.send(F,U);else if(typeof T==="function"){if(typeof U!=="object")throw new Error(`Expected http options but got ${typeof U}`);this.send(F,U||{},T)}else return this.send(F,U)},"methodImpl"),r=(w[0].toLowerCase()+w.slice(1)).replace(/Command$/,"");h.prototype[r]=$}},"createAggregatedClient"),Bd=b((f)=>{switch(f){case"true":return!0;case"false":return!1;default:throw new Error(`Unable to parse boolean value "${f}"`)}},"parseBoolean"),Ad=b((f)=>{if(f===null||f===void 0)return;if(typeof f==="number"){if(f===0||f===1)O$.warn(o4(`Expected boolean, got ${typeof f}: ${f}`));if(f===0)return!1;if(f===1)return!0}if(typeof f==="string"){let h=f.toLowerCase();if(h==="false"||h==="true")O$.warn(o4(`Expected boolean, got ${typeof f}: ${f}`));if(h==="false")return!1;if(h==="true")return!0}if(typeof f==="boolean")return f;throw new TypeError(`Expected boolean, got ${typeof f}: ${f}`)},"expectBoolean"),y$=b((f)=>{if(f===null||f===void 0)return;if(typeof f==="string"){let h=parseFloat(f);if(!Number.isNaN(h)){if(String(h)!==String(f))O$.warn(o4(`Expected number but observed string: ${f}`));return h}}if(typeof f==="number")return f;throw new TypeError(`Expected number, got ${typeof f}: ${f}`)},"expectNumber"),Gd=Math.ceil(340282346638528860000000000000000000000),a4=b((f)=>{let h=y$(f);if(h!==void 0&&!Number.isNaN(h)&&h!==1/0&&h!==-1/0){if(Math.abs(h)>Gd)throw new TypeError(`Expected 32-bit float, got ${f}`)}return h},"expectFloat32"),j$=b((f)=>{if(f===null||f===void 0)return;if(Number.isInteger(f)&&!Number.isNaN(f))return f;throw new TypeError(`Expected integer, got ${typeof f}: ${f}`)},"expectLong"),Wd=j$,d2=b((f)=>x2(f,32),"expectInt32"),i2=b((f)=>x2(f,16),"expectShort"),c2=b((f)=>x2(f,8),"expectByte"),x2=b((f,h)=>{let w=j$(f);if(w!==void 0&&zd(w,h)!==w)throw new TypeError(`Expected ${h}-bit integer, got ${f}`);return w},"expectSizedInt"),zd=b((f,h)=>{switch(h){case 32:return Int32Array.of(f)[0];case 16:return Int16Array.of(f)[0];case 8:return Int8Array.of(f)[0]}},"castInt"),Rd=b((f,h)=>{if(f===null||f===void 0){if(h)throw new TypeError(`Expected a non-null value for ${h}`);throw new TypeError("Expected a non-null value")}return f},"expectNonNull"),fR=b((f)=>{if(f===null||f===void 0)return;if(typeof f==="object"&&!Array.isArray(f))return f;let h=Array.isArray(f)?"array":typeof f;throw new TypeError(`Expected object, got ${h}: ${f}`)},"expectObject"),Xd=b((f)=>{if(f===null||f===void 0)return;if(typeof f==="string")return f;if(["boolean","number","bigint"].includes(typeof f))return O$.warn(o4(`Expected string, got ${typeof f}: ${f}`)),String(f);throw new TypeError(`Expected string, got ${typeof f}: ${f}`)},"expectString"),Sd=b((f)=>{if(f===null||f===void 0)return;let h=fR(f),w=Object.entries(h).filter(([,s])=>s!=null).map(([s])=>s);if(w.length===0)throw new TypeError("Unions must have exactly one non-null member. None were found.");if(w.length>1)throw new TypeError(`Unions must have exactly one non-null member. Keys ${w} were not null.`);return h},"expectUnion"),_2=b((f)=>{if(typeof f=="string")return y$(dw(f));return y$(f)},"strictParseDouble"),Yd=_2,hR=b((f)=>{if(typeof f=="string")return a4(dw(f));return a4(f)},"strictParseFloat32"),Md=/(-?(?:0|[1-9]\d*)(?:\.\d+)?(?:[eE][+-]?\d+)?)|(-?Infinity)|(NaN)/g,dw=b((f)=>{let h=f.match(Md);if(h===null||h[0].length!==f.length)throw new TypeError("Expected real number, got implicit NaN");return parseFloat(f)},"parseNumber"),n2=b((f)=>{if(typeof f=="string")return wR(f);return y$(f)},"limitedParseDouble"),Qd=n2,Kd=n2,Zd=b((f)=>{if(typeof f=="string")return wR(f);return a4(f)},"limitedParseFloat32"),wR=b((f)=>{switch(f){case"NaN":return NaN;case"Infinity":return 1/0;case"-Infinity":return-1/0;default:throw new Error(`Unable to parse float value: ${f}`)}},"parseFloatString"),sR=b((f)=>{if(typeof f==="string")return j$(dw(f));return j$(f)},"strictParseLong"),Jd=sR,Vd=b((f)=>{if(typeof f==="string")return d2(dw(f));return d2(f)},"strictParseInt32"),bw=b((f)=>{if(typeof f==="string")return i2(dw(f));return i2(f)},"strictParseShort"),$R=b((f)=>{if(typeof f==="string")return c2(dw(f));return c2(f)},"strictParseByte"),o4=b((f)=>{return String(new TypeError(f).stack||f).split(`
29
+ ${Gh.toHex($)}`}getCanonicalPath({path:f}){if(this.uriEscapePath){let h=[];for(let $ of f.split("/")){if($?.length===0)continue;if($===".")continue;if($==="..")h.pop();else h.push($)}let w=`${f?.startsWith("/")?"/":""}${h.join("/")}${h.length>0&&f?.endsWith("/")?"/":""}`;return g4.escapeUri(w).replace(/%2F/g,"/")}return f}async getSignature(f,h,w,s){let $=await this.createStringToSign(f,h,s),r=new this.sha256(await w);return r.update(P2.toUint8Array($)),Gh.toHex(await r.digest())}getSigningKey(f,h,w,s){return Dz(this.sha256,f,w,h,s||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")}},d4=o0((f)=>{let h=km(f).replace(/[\-:]/g,"");return{longDate:h,shortDate:h.slice(0,8)}},"formatDate"),Qz=o0((f)=>Object.keys(f).sort().join(";"),"getCanonicalHeaderList")});var gz=H((I20,cz)=>{var{defineProperty:n4,getOwnPropertyDescriptor:Om,getOwnPropertyNames:lm}=Object,vm=Object.prototype.hasOwnProperty,R1=(f,h)=>n4(f,"name",{value:h,configurable:!0}),bm=(f,h)=>{for(var w in h)n4(f,w,{get:h[w],enumerable:!0})},mm=(f,h,w,s)=>{if(h&&typeof h==="object"||typeof h==="function"){for(let $ of lm(h))if(!vm.call(f,$)&&$!==w)n4(f,$,{get:()=>h[$],enumerable:!(s=Om(h,$))||s.enumerable})}return f},dm=(f)=>mm(n4({},"__esModule",{value:!0}),f),dz={};bm(dz,{AWSSDKSigV4Signer:()=>xm,AwsSdkSigV4ASigner:()=>nm,AwsSdkSigV4Signer:()=>O2,NODE_SIGV4A_CONFIG_OPTIONS:()=>om,resolveAWSSDKSigV4Config:()=>um,resolveAwsSdkSigV4AConfig:()=>am,resolveAwsSdkSigV4Config:()=>iz,validateSigningProperties:()=>j2});cz.exports=dm(dz);var im=t0(),cm=t0(),lz=R1((f)=>cm.HttpResponse.isInstance(f)?f.headers?.date??f.headers?.Date:void 0,"getDateHeader"),y2=R1((f)=>new Date(Date.now()+f),"getSkewCorrectedDate"),gm=R1((f,h)=>Math.abs(y2(h).getTime()-f)>=300000,"isClockSkewed"),vz=R1((f,h)=>{let w=Date.parse(f);if(gm(w,h))return w-Date.now();return h},"getUpdatedSystemClockOffset"),q$=R1((f,h)=>{if(!h)throw new Error(`Property \`${f}\` is not resolved for AWS SDK SigV4Auth`);return h},"throwSigningPropertyError"),j2=R1(async(f)=>{let h=q$("context",f.context),w=q$("config",f.config),s=h.endpointV2?.properties?.authSchemes?.[0],r=await q$("signer",w.signer)(s),E=f?.signingRegion,U=f?.signingRegionSet,T=f?.signingName;return{config:w,signer:r,signingRegion:E,signingRegionSet:U,signingName:T}},"validateSigningProperties"),O2=class{static{R1(this,"AwsSdkSigV4Signer")}async sign(f,h,w){if(!im.HttpRequest.isInstance(f))throw new Error("The request is not an instance of `HttpRequest` and cannot be signed");let s=await j2(w),{config:$,signer:r}=s,{signingRegion:E,signingName:U}=s,T=w.context;if(T?.authSchemes?.length??0>1){let[C,I]=T.authSchemes;if(C?.name==="sigv4a"&&I?.name==="sigv4")E=I?.signingRegion??E,U=I?.signingName??U}return await r.sign(f,{signingDate:y2($.systemClockOffset),signingRegion:E,signingService:U})}errorHandler(f){return(h)=>{let w=h.ServerTime??lz(h.$response);if(w){let s=q$("config",f.config),$=s.systemClockOffset;if(s.systemClockOffset=vz(w,s.systemClockOffset),s.systemClockOffset!==$&&h.$metadata)h.$metadata.clockSkewCorrected=!0}throw h}}successHandler(f,h){let w=lz(f);if(w){let s=q$("config",h.config);s.systemClockOffset=vz(w,s.systemClockOffset)}}},xm=O2,_m=t0(),nm=class extends O2{static{R1(this,"AwsSdkSigV4ASigner")}async sign(f,h,w){if(!_m.HttpRequest.isInstance(f))throw new Error("The request is not an instance of `HttpRequest` and cannot be signed");let{config:s,signer:$,signingRegion:r,signingRegionSet:E,signingName:U}=await j2(w),F=(await s.sigv4aSigningRegionSet?.()??E??[r]).join(",");return await $.sign(f,{signingDate:y2(s.systemClockOffset),signingRegion:F,signingService:U})}},em=m0(),bz=D$(),am=R1((f)=>{return f.sigv4aSigningRegionSet=em.normalizeProvider(f.sigv4aSigningRegionSet),f},"resolveAwsSdkSigV4AConfig"),om={environmentVariableSelector(f){if(f.AWS_SIGV4A_SIGNING_REGION_SET)return f.AWS_SIGV4A_SIGNING_REGION_SET.split(",").map((h)=>h.trim());throw new bz.ProviderError("AWS_SIGV4A_SIGNING_REGION_SET not set in env.",{tryNextLink:!0})},configFileSelector(f){if(f.sigv4a_signing_region_set)return(f.sigv4a_signing_region_set??"").split(",").map((h)=>h.trim());throw new bz.ProviderError("sigv4a_signing_region_set not set in profile.",{tryNextLink:!0})},default:void 0},pm=C1(),eh=m0(),mz=Oz(),iz=R1((f)=>{let h=!1,w;if(f.credentials)h=!0,w=eh.memoizeIdentityProvider(f.credentials,eh.isIdentityExpired,eh.doesIdentityRequireRefresh);if(!w)if(f.credentialDefaultProvider)w=eh.normalizeProvider(f.credentialDefaultProvider(Object.assign({},f,{parentClientConfig:f})));else w=R1(async()=>{throw new Error("`credentials` is missing")},"credentialsProvider");let s=R1(async()=>w({callerClientConfig:f}),"boundCredentialsProvider"),{signingEscapePath:$=!0,systemClockOffset:r=f.systemClockOffset||0,sha256:E}=f,U;if(f.signer)U=eh.normalizeProvider(f.signer);else if(f.regionInfoProvider)U=R1(()=>eh.normalizeProvider(f.region)().then(async(T)=>[await f.regionInfoProvider(T,{useFipsEndpoint:await f.useFipsEndpoint(),useDualstackEndpoint:await f.useDualstackEndpoint()})||{},T]).then(([T,F])=>{let{signingRegion:C,signingService:I}=T;f.signingRegion=f.signingRegion||C||F,f.signingName=f.signingName||I||f.serviceId;let L={...f,credentials:s,region:f.signingRegion,service:f.signingName,sha256:E,uriEscapePath:$};return new(f.signerConstructor||mz.SignatureV4)(L)}),"signer");else U=R1(async(T)=>{T=Object.assign({},{name:"sigv4",signingName:f.signingName||f.defaultSigningName,signingRegion:await eh.normalizeProvider(f.region)(),properties:{}},T);let{signingRegion:F,signingName:C}=T;f.signingRegion=f.signingRegion||F,f.signingName=f.signingName||C||f.serviceId;let I={...f,credentials:s,region:f.signingRegion,service:f.signingName,sha256:E,uriEscapePath:$};return new(f.signerConstructor||mz.SignatureV4)(I)},"signer");return{...f,systemClockOffset:r,signingEscapePath:$,credentials:h?async()=>s().then((T)=>pm.setCredentialFeature(T,"CREDENTIALS_CODE","e")):s,signer:U}},"resolveAwsSdkSigV4Config"),um=iz});var az=H((A20,ez)=>{var{defineProperty:e4,getOwnPropertyDescriptor:tm,getOwnPropertyNames:fd}=Object,hd=Object.prototype.hasOwnProperty,q1=(f,h)=>e4(f,"name",{value:h,configurable:!0}),wd=(f,h)=>{for(var w in h)e4(f,w,{get:h[w],enumerable:!0})},sd=(f,h,w,s)=>{if(h&&typeof h==="object"||typeof h==="function"){for(let $ of fd(h))if(!hd.call(f,$)&&$!==w)e4(f,$,{get:()=>h[$],enumerable:!(s=tm(h,$))||s.enumerable})}return f},$d=(f)=>sd(e4({},"__esModule",{value:!0}),f),nz={};wd(nz,{constructStack:()=>l2});ez.exports=$d(nz);var ah=q1((f,h)=>{let w=[];if(f)w.push(f);if(h)for(let s of h)w.push(s);return w},"getAllAliases"),Wh=q1((f,h)=>{return`${f||"anonymous"}${h&&h.length>0?` (a.k.a. ${h.join(",")})`:""}`},"getMiddlewareNameWithAliases"),l2=q1(()=>{let f=[],h=[],w=!1,s=new Set,$=q1((I)=>I.sort((L,G)=>xz[G.step]-xz[L.step]||_z[G.priority||"normal"]-_z[L.priority||"normal"]),"sort"),r=q1((I)=>{let L=!1,G=q1((X)=>{let Q=ah(X.name,X.aliases);if(Q.includes(I)){L=!0;for(let M of Q)s.delete(M);return!1}return!0},"filterCb");return f=f.filter(G),h=h.filter(G),L},"removeByName"),E=q1((I)=>{let L=!1,G=q1((X)=>{if(X.middleware===I){L=!0;for(let Q of ah(X.name,X.aliases))s.delete(Q);return!1}return!0},"filterCb");return f=f.filter(G),h=h.filter(G),L},"removeByReference"),U=q1((I)=>{return f.forEach((L)=>{I.add(L.middleware,{...L})}),h.forEach((L)=>{I.addRelativeTo(L.middleware,{...L})}),I.identifyOnResolve?.(C.identifyOnResolve()),I},"cloneTo"),T=q1((I)=>{let L=[];return I.before.forEach((G)=>{if(G.before.length===0&&G.after.length===0)L.push(G);else L.push(...T(G))}),L.push(I),I.after.reverse().forEach((G)=>{if(G.before.length===0&&G.after.length===0)L.push(G);else L.push(...T(G))}),L},"expandRelativeMiddlewareList"),F=q1((I=!1)=>{let L=[],G=[],X={};return f.forEach((M)=>{let q={...M,before:[],after:[]};for(let N of ah(q.name,q.aliases))X[N]=q;L.push(q)}),h.forEach((M)=>{let q={...M,before:[],after:[]};for(let N of ah(q.name,q.aliases))X[N]=q;G.push(q)}),G.forEach((M)=>{if(M.toMiddleware){let q=X[M.toMiddleware];if(q===void 0){if(I)return;throw new Error(`${M.toMiddleware} is not found when adding ${Wh(M.name,M.aliases)} middleware ${M.relation} ${M.toMiddleware}`)}if(M.relation==="after")q.after.push(M);if(M.relation==="before")q.before.push(M)}}),$(L).map(T).reduce((M,q)=>{return M.push(...q),M},[])},"getMiddlewareList"),C={add:(I,L={})=>{let{name:G,override:X,aliases:Q}=L,M={step:"initialize",priority:"normal",middleware:I,...L},q=ah(G,Q);if(q.length>0){if(q.some((N)=>s.has(N))){if(!X)throw new Error(`Duplicate middleware name '${Wh(G,Q)}'`);for(let N of q){let y=f.findIndex((L0)=>L0.name===N||L0.aliases?.some((b0)=>b0===N));if(y===-1)continue;let n=f[y];if(n.step!==M.step||M.priority!==n.priority)throw new Error(`"${Wh(n.name,n.aliases)}" middleware with ${n.priority} priority in ${n.step} step cannot be overridden by "${Wh(G,Q)}" middleware with ${M.priority} priority in ${M.step} step.`);f.splice(y,1)}}for(let N of q)s.add(N)}f.push(M)},addRelativeTo:(I,L)=>{let{name:G,override:X,aliases:Q}=L,M={middleware:I,...L},q=ah(G,Q);if(q.length>0){if(q.some((N)=>s.has(N))){if(!X)throw new Error(`Duplicate middleware name '${Wh(G,Q)}'`);for(let N of q){let y=h.findIndex((L0)=>L0.name===N||L0.aliases?.some((b0)=>b0===N));if(y===-1)continue;let n=h[y];if(n.toMiddleware!==M.toMiddleware||n.relation!==M.relation)throw new Error(`"${Wh(n.name,n.aliases)}" middleware ${n.relation} "${n.toMiddleware}" middleware cannot be overridden by "${Wh(G,Q)}" middleware ${M.relation} "${M.toMiddleware}" middleware.`);h.splice(y,1)}}for(let N of q)s.add(N)}h.push(M)},clone:()=>U(l2()),use:(I)=>{I.applyToStack(C)},remove:(I)=>{if(typeof I==="string")return r(I);else return E(I)},removeByTag:(I)=>{let L=!1,G=q1((X)=>{let{tags:Q,name:M,aliases:q}=X;if(Q&&Q.includes(I)){let N=ah(M,q);for(let y of N)s.delete(y);return L=!0,!1}return!0},"filterCb");return f=f.filter(G),h=h.filter(G),L},concat:(I)=>{let L=U(l2());return L.use(I),L.identifyOnResolve(w||L.identifyOnResolve()||(I.identifyOnResolve?.()??!1)),L},applyToStack:U,identify:()=>{return F(!0).map((I)=>{let L=I.step??I.relation+" "+I.toMiddleware;return Wh(I.name,I.aliases)+" - "+L})},identifyOnResolve(I){if(typeof I==="boolean")w=I;return w},resolve:(I,L)=>{for(let G of F().map((X)=>X.middleware).reverse())I=G(I,L);if(w)console.log(C.identify());return I}};return C},"constructStack"),xz={initialize:5,serialize:4,build:3,finalizeRequest:2,deserialize:1},_z={high:3,normal:2,low:1}});var J0=H((G20,BR)=>{var{defineProperty:p4,getOwnPropertyDescriptor:rd,getOwnPropertyNames:Ed}=Object,Ud=Object.prototype.hasOwnProperty,b=(f,h)=>p4(f,"name",{value:h,configurable:!0}),Td=(f,h)=>{for(var w in h)p4(f,w,{get:h[w],enumerable:!0})},Fd=(f,h,w,s)=>{if(h&&typeof h==="object"||typeof h==="function"){for(let $ of Ed(h))if(!Ud.call(f,$)&&$!==w)p4(f,$,{get:()=>h[$],enumerable:!(s=rd(h,$))||s.enumerable})}return f},Cd=(f)=>Fd(p4({},"__esModule",{value:!0}),f),pz={};Td(pz,{Client:()=>Id,Command:()=>tz,LazyJsonString:()=>oh,NoOpLogger:()=>Ui,SENSITIVE_STRING:()=>Bd,ServiceException:()=>ed,_json:()=>g2,collectBody:()=>v2.collectBody,convertMap:()=>Ti,createAggregatedClient:()=>Ad,dateToUtcString:()=>rR,decorateServiceException:()=>ER,emitWarningIfUnsupportedVersion:()=>ud,expectBoolean:()=>Wd,expectByte:()=>c2,expectFloat32:()=>a4,expectInt:()=>Rd,expectInt32:()=>d2,expectLong:()=>j$,expectNonNull:()=>Sd,expectNumber:()=>y$,expectObject:()=>fR,expectShort:()=>i2,expectString:()=>Yd,expectUnion:()=>Md,extendedEncodeURIComponent:()=>v2.extendedEncodeURIComponent,getArrayIfSingleItem:()=>ri,getDefaultClientConfiguration:()=>si,getDefaultExtensionConfiguration:()=>TR,getValueFromTextNode:()=>FR,handleFloat:()=>Zd,isSerializableHeaderValue:()=>Ei,limitedParseDouble:()=>n2,limitedParseFloat:()=>Jd,limitedParseFloat32:()=>Vd,loadConfigsForDefaultMode:()=>pd,logger:()=>O$,map:()=>a2,parseBoolean:()=>Gd,parseEpochTimestamp:()=>bd,parseRfc3339DateTime:()=>qd,parseRfc3339DateTimeWithOffset:()=>yd,parseRfc7231DateTime:()=>vd,quoteHeader:()=>IR,resolveDefaultRuntimeConfig:()=>$i,resolvedPath:()=>v2.resolvedPath,serializeDateTime:()=>Ai,serializeFloat:()=>Bi,splitEvery:()=>LR,splitHeader:()=>Gi,strictParseByte:()=>$R,strictParseDouble:()=>_2,strictParseFloat:()=>Qd,strictParseFloat32:()=>hR,strictParseInt:()=>Pd,strictParseInt32:()=>Hd,strictParseLong:()=>sR,strictParseShort:()=>bw,take:()=>Fi,throwDefaultError:()=>UR,withBaseException:()=>ad});BR.exports=Cd(pz);var uz=az(),Id=class{constructor(f){this.config=f,this.middlewareStack=uz.constructStack()}static{b(this,"Client")}send(f,h,w){let s=typeof h!=="function"?h:void 0,$=typeof h==="function"?h:w,r=s===void 0&&this.config.cacheMiddleware===!0,E;if(r){if(!this.handlers)this.handlers=new WeakMap;let U=this.handlers;if(U.has(f.constructor))E=U.get(f.constructor);else E=f.resolveMiddleware(this.middlewareStack,this.config,s),U.set(f.constructor,E)}else delete this.handlers,E=f.resolveMiddleware(this.middlewareStack,this.config,s);if($)E(f).then((U)=>$(null,U.output),(U)=>$(U)).catch(()=>{});else return E(f).then((U)=>U.output)}destroy(){this.config?.requestHandler?.destroy?.(),delete this.handlers}},v2=yw(),m2=T1(),tz=class{constructor(){this.middlewareStack=uz.constructStack()}static{b(this,"Command")}static classBuilder(){return new Ld}resolveMiddlewareWithContext(f,h,w,{middlewareFn:s,clientName:$,commandName:r,inputFilterSensitiveLog:E,outputFilterSensitiveLog:U,smithyContext:T,additionalContext:F,CommandCtor:C}){for(let Q of s.bind(this)(C,f,h,w))this.middlewareStack.use(Q);let I=f.concat(this.middlewareStack),{logger:L}=h,G={logger:L,clientName:$,commandName:r,inputFilterSensitiveLog:E,outputFilterSensitiveLog:U,[m2.SMITHY_CONTEXT_KEY]:{commandInstance:this,...T},...F},{requestHandler:X}=h;return I.resolve((Q)=>X.handle(Q.request,w||{}),G)}},Ld=class{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}static{b(this,"ClassBuilder")}init(f){this._init=f}ep(f){return this._ep=f,this}m(f){return this._middlewareFn=f,this}s(f,h,w={}){return this._smithyContext={service:f,operation:h,...w},this}c(f={}){return this._additionalContext=f,this}n(f,h){return this._clientName=f,this._commandName=h,this}f(f=(w)=>w,h=(w)=>w){return this._inputFilterSensitiveLog=f,this._outputFilterSensitiveLog=h,this}ser(f){return this._serializer=f,this}de(f){return this._deserializer=f,this}build(){let f=this,h;return h=class extends tz{constructor(...[w]){super();this.serialize=f._serializer,this.deserialize=f._deserializer,this.input=w??{},f._init(this)}static{b(this,"CommandRef")}static getEndpointParameterInstructions(){return f._ep}resolveMiddleware(w,s,$){return this.resolveMiddlewareWithContext(w,s,$,{CommandCtor:h,middlewareFn:f._middlewareFn,clientName:f._clientName,commandName:f._commandName,inputFilterSensitiveLog:f._inputFilterSensitiveLog,outputFilterSensitiveLog:f._outputFilterSensitiveLog,smithyContext:f._smithyContext,additionalContext:f._additionalContext})}}}},Bd="***SensitiveInformation***",Ad=b((f,h)=>{for(let w of Object.keys(f)){let s=f[w],$=b(async function(E,U,T){let F=new s(E);if(typeof U==="function")this.send(F,U);else if(typeof T==="function"){if(typeof U!=="object")throw new Error(`Expected http options but got ${typeof U}`);this.send(F,U||{},T)}else return this.send(F,U)},"methodImpl"),r=(w[0].toLowerCase()+w.slice(1)).replace(/Command$/,"");h.prototype[r]=$}},"createAggregatedClient"),Gd=b((f)=>{switch(f){case"true":return!0;case"false":return!1;default:throw new Error(`Unable to parse boolean value "${f}"`)}},"parseBoolean"),Wd=b((f)=>{if(f===null||f===void 0)return;if(typeof f==="number"){if(f===0||f===1)O$.warn(o4(`Expected boolean, got ${typeof f}: ${f}`));if(f===0)return!1;if(f===1)return!0}if(typeof f==="string"){let h=f.toLowerCase();if(h==="false"||h==="true")O$.warn(o4(`Expected boolean, got ${typeof f}: ${f}`));if(h==="false")return!1;if(h==="true")return!0}if(typeof f==="boolean")return f;throw new TypeError(`Expected boolean, got ${typeof f}: ${f}`)},"expectBoolean"),y$=b((f)=>{if(f===null||f===void 0)return;if(typeof f==="string"){let h=parseFloat(f);if(!Number.isNaN(h)){if(String(h)!==String(f))O$.warn(o4(`Expected number but observed string: ${f}`));return h}}if(typeof f==="number")return f;throw new TypeError(`Expected number, got ${typeof f}: ${f}`)},"expectNumber"),zd=Math.ceil(340282346638528860000000000000000000000),a4=b((f)=>{let h=y$(f);if(h!==void 0&&!Number.isNaN(h)&&h!==1/0&&h!==-1/0){if(Math.abs(h)>zd)throw new TypeError(`Expected 32-bit float, got ${f}`)}return h},"expectFloat32"),j$=b((f)=>{if(f===null||f===void 0)return;if(Number.isInteger(f)&&!Number.isNaN(f))return f;throw new TypeError(`Expected integer, got ${typeof f}: ${f}`)},"expectLong"),Rd=j$,d2=b((f)=>x2(f,32),"expectInt32"),i2=b((f)=>x2(f,16),"expectShort"),c2=b((f)=>x2(f,8),"expectByte"),x2=b((f,h)=>{let w=j$(f);if(w!==void 0&&Xd(w,h)!==w)throw new TypeError(`Expected ${h}-bit integer, got ${f}`);return w},"expectSizedInt"),Xd=b((f,h)=>{switch(h){case 32:return Int32Array.of(f)[0];case 16:return Int16Array.of(f)[0];case 8:return Int8Array.of(f)[0]}},"castInt"),Sd=b((f,h)=>{if(f===null||f===void 0){if(h)throw new TypeError(`Expected a non-null value for ${h}`);throw new TypeError("Expected a non-null value")}return f},"expectNonNull"),fR=b((f)=>{if(f===null||f===void 0)return;if(typeof f==="object"&&!Array.isArray(f))return f;let h=Array.isArray(f)?"array":typeof f;throw new TypeError(`Expected object, got ${h}: ${f}`)},"expectObject"),Yd=b((f)=>{if(f===null||f===void 0)return;if(typeof f==="string")return f;if(["boolean","number","bigint"].includes(typeof f))return O$.warn(o4(`Expected string, got ${typeof f}: ${f}`)),String(f);throw new TypeError(`Expected string, got ${typeof f}: ${f}`)},"expectString"),Md=b((f)=>{if(f===null||f===void 0)return;let h=fR(f),w=Object.entries(h).filter(([,s])=>s!=null).map(([s])=>s);if(w.length===0)throw new TypeError("Unions must have exactly one non-null member. None were found.");if(w.length>1)throw new TypeError(`Unions must have exactly one non-null member. Keys ${w} were not null.`);return h},"expectUnion"),_2=b((f)=>{if(typeof f=="string")return y$(dw(f));return y$(f)},"strictParseDouble"),Qd=_2,hR=b((f)=>{if(typeof f=="string")return a4(dw(f));return a4(f)},"strictParseFloat32"),Kd=/(-?(?:0|[1-9]\d*)(?:\.\d+)?(?:[eE][+-]?\d+)?)|(-?Infinity)|(NaN)/g,dw=b((f)=>{let h=f.match(Kd);if(h===null||h[0].length!==f.length)throw new TypeError("Expected real number, got implicit NaN");return parseFloat(f)},"parseNumber"),n2=b((f)=>{if(typeof f=="string")return wR(f);return y$(f)},"limitedParseDouble"),Zd=n2,Jd=n2,Vd=b((f)=>{if(typeof f=="string")return wR(f);return a4(f)},"limitedParseFloat32"),wR=b((f)=>{switch(f){case"NaN":return NaN;case"Infinity":return 1/0;case"-Infinity":return-1/0;default:throw new Error(`Unable to parse float value: ${f}`)}},"parseFloatString"),sR=b((f)=>{if(typeof f==="string")return j$(dw(f));return j$(f)},"strictParseLong"),Pd=sR,Hd=b((f)=>{if(typeof f==="string")return d2(dw(f));return d2(f)},"strictParseInt32"),bw=b((f)=>{if(typeof f==="string")return i2(dw(f));return i2(f)},"strictParseShort"),$R=b((f)=>{if(typeof f==="string")return c2(dw(f));return c2(f)},"strictParseByte"),o4=b((f)=>{return String(new TypeError(f).stack||f).split(`
30
30
  `).slice(0,5).filter((h)=>!h.includes("stackTraceWarning")).join(`
31
- `)},"stackTraceWarning"),O$={warn:console.warn},Pd=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],e2=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function rR(f){let h=f.getUTCFullYear(),w=f.getUTCMonth(),s=f.getUTCDay(),$=f.getUTCDate(),r=f.getUTCHours(),E=f.getUTCMinutes(),U=f.getUTCSeconds(),T=$<10?`0${$}`:`${$}`,F=r<10?`0${r}`:`${r}`,C=E<10?`0${E}`:`${E}`,I=U<10?`0${U}`:`${U}`;return`${Pd[s]}, ${T} ${e2[w]} ${h} ${F}:${C}:${I} GMT`}b(rR,"dateToUtcString");var Hd=new RegExp(/^(\d{4})-(\d{2})-(\d{2})[tT](\d{2}):(\d{2}):(\d{2})(?:\.(\d+))?[zZ]$/),Nd=b((f)=>{if(f===null||f===void 0)return;if(typeof f!=="string")throw new TypeError("RFC-3339 date-times must be expressed as strings");let h=Hd.exec(f);if(!h)throw new TypeError("Invalid RFC-3339 date-time value");let[w,s,$,r,E,U,T,F]=h,C=bw(mw(s)),I=Yf($,"month",1,12),L=Yf(r,"day",1,31);return k$(C,I,L,{hours:E,minutes:U,seconds:T,fractionalMilliseconds:F})},"parseRfc3339DateTime"),Dd=new RegExp(/^(\d{4})-(\d{2})-(\d{2})[tT](\d{2}):(\d{2}):(\d{2})(?:\.(\d+))?(([-+]\d{2}\:\d{2})|[zZ])$/),qd=b((f)=>{if(f===null||f===void 0)return;if(typeof f!=="string")throw new TypeError("RFC-3339 date-times must be expressed as strings");let h=Dd.exec(f);if(!h)throw new TypeError("Invalid RFC-3339 date-time value");let[w,s,$,r,E,U,T,F,C]=h,I=bw(mw(s)),L=Yf($,"month",1,12),G=Yf(r,"day",1,31),X=k$(I,L,G,{hours:E,minutes:U,seconds:T,fractionalMilliseconds:F});if(C.toUpperCase()!="Z")X.setTime(X.getTime()-xd(C));return X},"parseRfc3339DateTimeWithOffset"),kd=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$/),yd=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$/),jd=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})$/),Od=b((f)=>{if(f===null||f===void 0)return;if(typeof f!=="string")throw new TypeError("RFC-7231 date-times must be expressed as strings");let h=kd.exec(f);if(h){let[w,s,$,r,E,U,T,F]=h;return k$(bw(mw(r)),b2($),Yf(s,"day",1,31),{hours:E,minutes:U,seconds:T,fractionalMilliseconds:F})}if(h=yd.exec(f),h){let[w,s,$,r,E,U,T,F]=h;return md(k$(vd(r),b2($),Yf(s,"day",1,31),{hours:E,minutes:U,seconds:T,fractionalMilliseconds:F}))}if(h=jd.exec(f),h){let[w,s,$,r,E,U,T,F]=h;return k$(bw(mw(F)),b2(s),Yf($.trimLeft(),"day",1,31),{hours:r,minutes:E,seconds:U,fractionalMilliseconds:T})}throw new TypeError("Invalid RFC-7231 date-time value")},"parseRfc7231DateTime"),ld=b((f)=>{if(f===null||f===void 0)return;let h;if(typeof f==="number")h=f;else if(typeof f==="string")h=_2(f);else if(typeof f==="object"&&f.tag===1)h=f.value;else throw new TypeError("Epoch timestamps must be expressed as floating point numbers or their string representation");if(Number.isNaN(h)||h===1/0||h===-1/0)throw new TypeError("Epoch timestamps must be valid, non-Infinite, non-NaN numerics");return new Date(Math.round(h*1000))},"parseEpochTimestamp"),k$=b((f,h,w,s)=>{let $=h-1;return id(f,$,w),new Date(Date.UTC(f,$,w,Yf(s.hours,"hour",0,23),Yf(s.minutes,"minute",0,59),Yf(s.seconds,"seconds",0,60),gd(s.fractionalMilliseconds)))},"buildDate"),vd=b((f)=>{let h=new Date().getUTCFullYear(),w=Math.floor(h/100)*100+bw(mw(f));if(w<h)return w+100;return w},"parseTwoDigitYear"),bd=1576800000000,md=b((f)=>{if(f.getTime()-new Date().getTime()>bd)return new Date(Date.UTC(f.getUTCFullYear()-100,f.getUTCMonth(),f.getUTCDate(),f.getUTCHours(),f.getUTCMinutes(),f.getUTCSeconds(),f.getUTCMilliseconds()));return f},"adjustRfc850Year"),b2=b((f)=>{let h=e2.indexOf(f);if(h<0)throw new TypeError(`Invalid month: ${f}`);return h+1},"parseMonthByShortName"),dd=[31,28,31,30,31,30,31,31,30,31,30,31],id=b((f,h,w)=>{let s=dd[h];if(h===1&&cd(f))s=29;if(w>s)throw new TypeError(`Invalid day for ${e2[h]} in ${f}: ${w}`)},"validateDayOfMonth"),cd=b((f)=>{return f%4===0&&(f%100!==0||f%400===0)},"isLeapYear"),Yf=b((f,h,w,s)=>{let $=$R(mw(f));if($<w||$>s)throw new TypeError(`${h} must be between ${w} and ${s}, inclusive`);return $},"parseDateValue"),gd=b((f)=>{if(f===null||f===void 0)return 0;return hR("0."+f)*1000},"parseMilliseconds"),xd=b((f)=>{let h=f[0],w=1;if(h=="+")w=1;else if(h=="-")w=-1;else throw new TypeError(`Offset direction, ${h}, must be "+" or "-"`);let s=Number(f.substring(1,3)),$=Number(f.substring(4,6));return w*(s*60+$)*60*1000},"parseOffsetToMilliseconds"),mw=b((f)=>{let h=0;while(h<f.length-1&&f.charAt(h)==="0")h++;if(h===0)return f;return f.slice(h)},"stripLeadingZeroes"),_d=class f extends Error{static{b(this,"ServiceException")}constructor(h){super(h.message);Object.setPrototypeOf(this,Object.getPrototypeOf(this).constructor.prototype),this.name=h.name,this.$fault=h.$fault,this.$metadata=h.$metadata}static isInstance(h){if(!h)return!1;let w=h;return f.prototype.isPrototypeOf(w)||Boolean(w.$fault)&&Boolean(w.$metadata)&&(w.$fault==="client"||w.$fault==="server")}static[Symbol.hasInstance](h){if(!h)return!1;let w=h;if(this===f)return f.isInstance(h);if(f.isInstance(h)){if(w.name&&this.name)return this.prototype.isPrototypeOf(h)||w.name===this.name;return this.prototype.isPrototypeOf(h)}return!1}},ER=b((f,h={})=>{Object.entries(h).filter(([,s])=>s!==void 0).forEach(([s,$])=>{if(f[s]==null||f[s]==="")f[s]=$});let w=f.message||f.Message||"UnknownError";return f.message=w,delete f.Message,f},"decorateServiceException"),UR=b(({output:f,parsedBody:h,exceptionCtor:w,errorCode:s})=>{let $=ed(f),r=$.httpStatusCode?$.httpStatusCode+"":void 0,E=new w({name:h?.code||h?.Code||s||r||"UnknownError",$fault:"client",$metadata:$});throw ER(E,h)},"throwDefaultError"),nd=b((f)=>{return({output:h,parsedBody:w,errorCode:s})=>{UR({output:h,parsedBody:w,exceptionCtor:f,errorCode:s})}},"withBaseException"),ed=b((f)=>({httpStatusCode:f.statusCode,requestId:f.headers["x-amzn-requestid"]??f.headers["x-amzn-request-id"]??f.headers["x-amz-request-id"],extendedRequestId:f.headers["x-amz-id-2"],cfId:f.headers["x-amz-cf-id"]}),"deserializeMetadata"),ad=b((f)=>{switch(f){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"),oz=!1,od=b((f)=>{if(f&&!oz&&parseInt(f.substring(1,f.indexOf(".")))<16)oz=!0},"emitWarningIfUnsupportedVersion"),pd=b((f)=>{let h=[];for(let w in m2.AlgorithmId){let s=m2.AlgorithmId[w];if(f[s]===void 0)continue;h.push({algorithmId:()=>s,checksumConstructor:()=>f[s]})}return{_checksumAlgorithms:h,addChecksumAlgorithm(w){this._checksumAlgorithms.push(w)},checksumAlgorithms(){return this._checksumAlgorithms}}},"getChecksumConfiguration"),ud=b((f)=>{let h={};return f.checksumAlgorithms().forEach((w)=>{h[w.algorithmId()]=w.checksumConstructor()}),h},"resolveChecksumRuntimeConfig"),td=b((f)=>{let h=f.retryStrategy;return{setRetryStrategy(w){h=w},retryStrategy(){return h}}},"getRetryConfiguration"),fi=b((f)=>{let h={};return h.retryStrategy=f.retryStrategy(),h},"resolveRetryRuntimeConfig"),TR=b((f)=>{return{...pd(f),...td(f)}},"getDefaultExtensionConfiguration"),hi=TR,wi=b((f)=>{return{...ud(f),...fi(f)}},"resolveDefaultRuntimeConfig"),si=b((f)=>Array.isArray(f)?f:[f],"getArrayIfSingleItem"),FR=b((f)=>{for(let w in f)if(f.hasOwnProperty(w)&&f[w]["#text"]!==void 0)f[w]=f[w]["#text"];else if(typeof f[w]==="object"&&f[w]!==null)f[w]=FR(f[w]);return f},"getValueFromTextNode"),$i=b((f)=>{return f!=null},"isSerializableHeaderValue"),oh=b(function f(h){return Object.assign(new String(h),{deserializeJSON(){return JSON.parse(String(h))},toString(){return String(h)},toJSON(){return String(h)}})},"LazyJsonString");oh.from=(f)=>{if(f&&typeof f==="object"&&(f instanceof oh||("deserializeJSON"in f)))return f;else if(typeof f==="string"||Object.getPrototypeOf(f)===String.prototype)return oh(String(f));return oh(JSON.stringify(f))};oh.fromObject=oh.from;var ri=class{static{b(this,"NoOpLogger")}trace(){}debug(){}info(){}warn(){}error(){}};function a2(f,h,w){let s,$,r;if(typeof h==="undefined"&&typeof w==="undefined")s={},r=f;else if(s=f,typeof h==="function")return $=h,r=w,Ti(s,$,r);else r=h;for(let E of Object.keys(r)){if(!Array.isArray(r[E])){s[E]=r[E];continue}CR(s,null,r,E)}return s}b(a2,"map");var Ei=b((f)=>{let h={};for(let[w,s]of Object.entries(f||{}))h[w]=[,s];return h},"convertMap"),Ui=b((f,h)=>{let w={};for(let s in h)CR(w,f,h,s);return w},"take"),Ti=b((f,h,w)=>{return a2(f,Object.entries(w).reduce((s,[$,r])=>{if(Array.isArray(r))s[$]=r;else if(typeof r==="function")s[$]=[h,r()];else s[$]=[h,r];return s},{}))},"mapWithFilter"),CR=b((f,h,w,s)=>{if(h!==null){let E=w[s];if(typeof E==="function")E=[,E];let[U=Fi,T=Ci,F=s]=E;if(typeof U==="function"&&U(h[F])||typeof U!=="function"&&!!U)f[s]=T(h[F]);return}let[$,r]=w[s];if(typeof r==="function"){let E,U=$===void 0&&(E=r())!=null,T=typeof $==="function"&&!!$(void 0)||typeof $!=="function"&&!!$;if(U)f[s]=E;else if(T)f[s]=r()}else{let E=$===void 0&&r!=null,U=typeof $==="function"&&!!$(r)||typeof $!=="function"&&!!$;if(E||U)f[s]=r}},"applyInstruction"),Fi=b((f)=>f!=null,"nonNullish"),Ci=b((f)=>f,"pass");function IR(f){if(f.includes(",")||f.includes('"'))f=`"${f.replace(/"/g,"\\\"")}"`;return f}b(IR,"quoteHeader");var Ii=b((f)=>{if(f!==f)return"NaN";switch(f){case 1/0:return"Infinity";case-1/0:return"-Infinity";default:return f}},"serializeFloat"),Li=b((f)=>f.toISOString().replace(".000Z","Z"),"serializeDateTime"),g2=b((f)=>{if(f==null)return{};if(Array.isArray(f))return f.filter((h)=>h!=null).map(g2);if(typeof f==="object"){let h={};for(let w of Object.keys(f)){if(f[w]==null)continue;h[w]=g2(f[w])}return h}return f},"_json");function LR(f,h,w){if(w<=0||!Number.isInteger(w))throw new Error("Invalid number of delimiters ("+w+") for splitEvery.");let s=f.split(h);if(w===1)return s;let $=[],r="";for(let E=0;E<s.length;E++){if(r==="")r=s[E];else r+=h+s[E];if((E+1)%w===0)$.push(r),r=""}if(r!=="")$.push(r);return $}b(LR,"splitEvery");var Bi=b((f)=>{let h=f.length,w=[],s=!1,$=void 0,r=0;for(let E=0;E<h;++E){let U=f[E];switch(U){case'"':if($!=="\\")s=!s;break;case",":if(!s)w.push(f.slice(r,E)),r=E+1;break;default:}$=U}return w.push(f.slice(r)),w.map((E)=>{E=E.trim();let U=E.length;if(U<2)return E;if(E[0]==='"'&&E[U-1]==='"')E=E.slice(1,U-1);return E.replace(/\\"/g,'"')})},"splitHeader")});var u4=H((Ri)=>{var Ai=":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",AR="[: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]["+Ai+"]*",Gi=new RegExp("^"+AR+"$"),Wi=function(f,h){let w=[],s=h.exec(f);while(s){let $=[];$.startIndex=h.lastIndex-s[0].length;let r=s.length;for(let E=0;E<r;E++)$.push(s[E]);w.push($),s=h.exec(f)}return w},zi=function(f){let h=Gi.exec(f);return!(h===null||typeof h==="undefined")};Ri.isExist=function(f){return typeof f!=="undefined"};Ri.isEmptyObject=function(f){return Object.keys(f).length===0};Ri.merge=function(f,h,w){if(h){let s=Object.keys(h),$=s.length;for(let r=0;r<$;r++)if(w==="strict")f[s[r]]=[h[s[r]]];else f[s[r]]=h[s[r]]}};Ri.getValue=function(f){if(Ri.isExist(f))return f;else return""};Ri.isName=zi;Ri.getAllMatches=Wi;Ri.nameRegexp=AR});var p2=H((yi)=>{var o2=u4(),Zi={allowBooleanAttributes:!1,unpairedTags:[]};yi.validate=function(f,h){h=Object.assign({},Zi,h);let w=[],s=!1,$=!1;if(f[0]==="\uFEFF")f=f.substr(1);for(let r=0;r<f.length;r++)if(f[r]==="<"&&f[r+1]==="?"){if(r+=2,r=zR(f,r),r.err)return r}else if(f[r]==="<"){let E=r;if(r++,f[r]==="!"){r=RR(f,r);continue}else{let U=!1;if(f[r]==="/")U=!0,r++;let T="";for(;r<f.length&&f[r]!==">"&&f[r]!==" "&&f[r]!=="\t"&&f[r]!==`
32
- `&&f[r]!=="\r";r++)T+=f[r];if(T=T.trim(),T[T.length-1]==="/")T=T.substring(0,T.length-1),r--;if(!ki(T)){let I;if(T.trim().length===0)I="Invalid space after '<'.";else I="Tag '"+T+"' is an invalid name.";return d0("InvalidTag",I,I1(f,r))}let F=Pi(f,r);if(F===!1)return d0("InvalidAttr","Attributes for '"+T+"' have open quote.",I1(f,r));let C=F.value;if(r=F.index,C[C.length-1]==="/"){let I=r-C.length;C=C.substring(0,C.length-1);let L=XR(C,h);if(L===!0)s=!0;else return d0(L.err.code,L.err.msg,I1(f,I+L.err.line))}else if(U)if(!F.tagClosed)return d0("InvalidTag","Closing tag '"+T+"' doesn't have proper closing.",I1(f,r));else if(C.trim().length>0)return d0("InvalidTag","Closing tag '"+T+"' can't have attributes or invalid starting.",I1(f,E));else if(w.length===0)return d0("InvalidTag","Closing tag '"+T+"' has not been opened.",I1(f,E));else{let I=w.pop();if(T!==I.tagName){let L=I1(f,I.tagStartPos);return d0("InvalidTag","Expected closing tag '"+I.tagName+"' (opened in line "+L.line+", col "+L.col+") instead of closing tag '"+T+"'.",I1(f,E))}if(w.length==0)$=!0}else{let I=XR(C,h);if(I!==!0)return d0(I.err.code,I.err.msg,I1(f,r-C.length+I.err.line));if($===!0)return d0("InvalidXml","Multiple possible root nodes found.",I1(f,r));else if(h.unpairedTags.indexOf(T)!==-1);else w.push({tagName:T,tagStartPos:E});s=!0}for(r++;r<f.length;r++)if(f[r]==="<")if(f[r+1]==="!"){r++,r=RR(f,r);continue}else if(f[r+1]==="?"){if(r=zR(f,++r),r.err)return r}else break;else if(f[r]==="&"){let I=Di(f,r);if(I==-1)return d0("InvalidChar","char '&' is not expected.",I1(f,r));r=I}else if($===!0&&!WR(f[r]))return d0("InvalidXml","Extra text at the end",I1(f,r));if(f[r]==="<")r--}}else{if(WR(f[r]))continue;return d0("InvalidChar","char '"+f[r]+"' is not expected.",I1(f,r))}if(!s)return d0("InvalidXml","Start tag expected.",1);else if(w.length==1)return d0("InvalidTag","Unclosed tag '"+w[0].tagName+"'.",I1(f,w[0].tagStartPos));else if(w.length>0)return d0("InvalidXml","Invalid '"+JSON.stringify(w.map((r)=>r.tagName),null,4).replace(/\r?\n/g,"")+"' found.",{line:1,col:1});return!0};function WR(f){return f===" "||f==="\t"||f===`
33
- `||f==="\r"}function zR(f,h){let w=h;for(;h<f.length;h++)if(f[h]=="?"||f[h]==" "){let s=f.substr(w,h-w);if(h>5&&s==="xml")return d0("InvalidXml","XML declaration allowed only at the start of the document.",I1(f,h));else if(f[h]=="?"&&f[h+1]==">"){h++;break}else continue}return h}function RR(f,h){if(f.length>h+5&&f[h+1]==="-"&&f[h+2]==="-"){for(h+=3;h<f.length;h++)if(f[h]==="-"&&f[h+1]==="-"&&f[h+2]===">"){h+=2;break}}else if(f.length>h+8&&f[h+1]==="D"&&f[h+2]==="O"&&f[h+3]==="C"&&f[h+4]==="T"&&f[h+5]==="Y"&&f[h+6]==="P"&&f[h+7]==="E"){let w=1;for(h+=8;h<f.length;h++)if(f[h]==="<")w++;else if(f[h]===">"){if(w--,w===0)break}}else if(f.length>h+9&&f[h+1]==="["&&f[h+2]==="C"&&f[h+3]==="D"&&f[h+4]==="A"&&f[h+5]==="T"&&f[h+6]==="A"&&f[h+7]==="["){for(h+=8;h<f.length;h++)if(f[h]==="]"&&f[h+1]==="]"&&f[h+2]===">"){h+=2;break}}return h}var Ji='"',Vi="'";function Pi(f,h){let w="",s="",$=!1;for(;h<f.length;h++){if(f[h]===Ji||f[h]===Vi)if(s==="")s=f[h];else if(s!==f[h]);else s="";else if(f[h]===">"){if(s===""){$=!0;break}}w+=f[h]}if(s!=="")return!1;return{value:w,index:h,tagClosed:$}}var Hi=new RegExp(`(\\s*)([^\\s=]+)(\\s*=)?(\\s*(['"])(([\\s\\S])*?)\\5)?`,"g");function XR(f,h){let w=o2.getAllMatches(f,Hi),s={};for(let $=0;$<w.length;$++){if(w[$][1].length===0)return d0("InvalidAttr","Attribute '"+w[$][2]+"' has no space in starting.",l$(w[$]));else if(w[$][3]!==void 0&&w[$][4]===void 0)return d0("InvalidAttr","Attribute '"+w[$][2]+"' is without value.",l$(w[$]));else if(w[$][3]===void 0&&!h.allowBooleanAttributes)return d0("InvalidAttr","boolean attribute '"+w[$][2]+"' is not allowed.",l$(w[$]));let r=w[$][2];if(!qi(r))return d0("InvalidAttr","Attribute '"+r+"' is an invalid name.",l$(w[$]));if(!s.hasOwnProperty(r))s[r]=1;else return d0("InvalidAttr","Attribute '"+r+"' is repeated.",l$(w[$]))}return!0}function Ni(f,h){let w=/\d/;if(f[h]==="x")h++,w=/[\da-fA-F]/;for(;h<f.length;h++){if(f[h]===";")return h;if(!f[h].match(w))break}return-1}function Di(f,h){if(h++,f[h]===";")return-1;if(f[h]==="#")return h++,Ni(f,h);let w=0;for(;h<f.length;h++,w++){if(f[h].match(/\w/)&&w<20)continue;if(f[h]===";")break;return-1}return h}function d0(f,h,w){return{err:{code:f,msg:h,line:w.line||w,col:w.col}}}function qi(f){return o2.isName(f)}function ki(f){return o2.isName(f)}function I1(f,h){let w=f.substring(0,h).split(/\r?\n/);return{line:w.length,col:w[w.length-1].length+1}}function l$(f){return f.startIndex+f[1].length}});var YR=H((li)=>{var SR={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(f,h){return h},attributeValueProcessor:function(f,h){return h},stopNodes:[],alwaysCreateTextNode:!1,isArray:()=>!1,commentPropName:!1,unpairedTags:[],processEntities:!0,htmlEntities:!1,ignoreDeclaration:!1,ignorePiTags:!1,transformTagName:!1,transformAttributeName:!1,updateTag:function(f,h,w){return f}},Oi=function(f){return Object.assign({},SR,f)};li.buildOptions=Oi;li.defaultOptions=SR});var KR=H((Y20,QR)=>{class MR{constructor(f){this.tagname=f,this.child=[],this[":@"]={}}add(f,h){if(f==="__proto__")f="#__proto__";this.child.push({[f]:h})}addChild(f){if(f.tagname==="__proto__")f.tagname="#__proto__";if(f[":@"]&&Object.keys(f[":@"]).length>0)this.child.push({[f.tagname]:f.child,[":@"]:f[":@"]});else this.child.push({[f.tagname]:f.child})}}QR.exports=MR});var JR=H((M20,ZR)=>{var mi=u4();function di(f,h){let w={};if(f[h+3]==="O"&&f[h+4]==="C"&&f[h+5]==="T"&&f[h+6]==="Y"&&f[h+7]==="P"&&f[h+8]==="E"){h=h+9;let s=1,$=!1,r=!1,E="";for(;h<f.length;h++)if(f[h]==="<"&&!r){if($&&gi(f,h)){if(h+=7,[entityName,val,h]=ii(f,h+1),val.indexOf("&")===-1)w[ei(entityName)]={regx:RegExp(`&${entityName};`,"g"),val}}else if($&&xi(f,h))h+=8;else if($&&_i(f,h))h+=8;else if($&&ni(f,h))h+=9;else if(ci)r=!0;else throw new Error("Invalid DOCTYPE");s++,E=""}else if(f[h]===">"){if(r){if(f[h-1]==="-"&&f[h-2]==="-")r=!1,s--}else s--;if(s===0)break}else if(f[h]==="[")$=!0;else E+=f[h];if(s!==0)throw new Error("Unclosed DOCTYPE")}else throw new Error("Invalid Tag instead of DOCTYPE");return{entities:w,i:h}}function ii(f,h){let w="";for(;h<f.length&&(f[h]!=="'"&&f[h]!=='"');h++)w+=f[h];if(w=w.trim(),w.indexOf(" ")!==-1)throw new Error("External entites are not supported");let s=f[h++],$="";for(;h<f.length&&f[h]!==s;h++)$+=f[h];return[w,$,h]}function ci(f,h){if(f[h+1]==="!"&&f[h+2]==="-"&&f[h+3]==="-")return!0;return!1}function gi(f,h){if(f[h+1]==="!"&&f[h+2]==="E"&&f[h+3]==="N"&&f[h+4]==="T"&&f[h+5]==="I"&&f[h+6]==="T"&&f[h+7]==="Y")return!0;return!1}function xi(f,h){if(f[h+1]==="!"&&f[h+2]==="E"&&f[h+3]==="L"&&f[h+4]==="E"&&f[h+5]==="M"&&f[h+6]==="E"&&f[h+7]==="N"&&f[h+8]==="T")return!0;return!1}function _i(f,h){if(f[h+1]==="!"&&f[h+2]==="A"&&f[h+3]==="T"&&f[h+4]==="T"&&f[h+5]==="L"&&f[h+6]==="I"&&f[h+7]==="S"&&f[h+8]==="T")return!0;return!1}function ni(f,h){if(f[h+1]==="!"&&f[h+2]==="N"&&f[h+3]==="O"&&f[h+4]==="T"&&f[h+5]==="A"&&f[h+6]==="T"&&f[h+7]==="I"&&f[h+8]==="O"&&f[h+9]==="N")return!0;return!1}function ei(f){if(mi.isName(f))return f;else throw new Error(`Invalid entity name ${f}`)}ZR.exports=di});var PR=H((Q20,VR)=>{var ai=/^[-+]?0x[a-fA-F0-9]+$/,oi=/^([\-\+])?(0*)([0-9]*(\.[0-9]*)?)$/,pi={hex:!0,leadingZeros:!0,decimalPoint:".",eNotation:!0};function ui(f,h={}){if(h=Object.assign({},pi,h),!f||typeof f!=="string")return f;let w=f.trim();if(h.skipLike!==void 0&&h.skipLike.test(w))return f;else if(f==="0")return 0;else if(h.hex&&ai.test(w))return fc(w,16);else if(w.search(/[eE]/)!==-1){let s=w.match(/^([-\+])?(0*)([0-9]*(\.[0-9]*)?[eE][-\+]?[0-9]+)$/);if(s){if(h.leadingZeros)w=(s[1]||"")+s[3];else if(s[2]==="0"&&s[3][0]===".");else return f;return h.eNotation?Number(w):f}else return f}else{let s=oi.exec(w);if(s){let $=s[1],r=s[2],E=ti(s[3]);if(!h.leadingZeros&&r.length>0&&$&&w[2]!==".")return f;else if(!h.leadingZeros&&r.length>0&&!$&&w[1]!==".")return f;else if(h.leadingZeros&&r===f)return 0;else{let U=Number(w),T=""+U;if(T.search(/[eE]/)!==-1)if(h.eNotation)return U;else return f;else if(w.indexOf(".")!==-1)if(T==="0"&&E==="")return U;else if(T===E)return U;else if($&&T==="-"+E)return U;else return f;if(r)return E===T||$+E===T?U:f;else return w===T||w===$+T?U:f}}else return f}}function ti(f){if(f&&f.indexOf(".")!==-1){if(f=f.replace(/0+$/,""),f===".")f="0";else if(f[0]===".")f="0"+f;else if(f[f.length-1]===".")f=f.substr(0,f.length-1);return f}return f}function fc(f,h){if(parseInt)return parseInt(f,h);else if(Number.parseInt)return Number.parseInt(f,h);else if(window&&window.parseInt)return window.parseInt(f,h);else throw new Error("parseInt, Number.parseInt, window.parseInt are not supported")}VR.exports=ui});var qR=H((K20,DR)=>{var HR=u4(),v$=KR(),hc=JR(),wc=PR();class NR{constructor(f){this.options=f,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:(h,w)=>String.fromCharCode(Number.parseInt(w,10))},num_hex:{regex:/&#x([0-9a-fA-F]{1,6});/g,val:(h,w)=>String.fromCharCode(Number.parseInt(w,16))}},this.addExternalEntities=sc,this.parseXml=Tc,this.parseTextData=$c,this.resolveNameSpace=rc,this.buildAttributesMap=Uc,this.isItStopNode=Lc,this.replaceEntitiesValue=Cc,this.readStopNodeData=Ac,this.saveTextToParentTag=Ic,this.addChild=Fc}}function sc(f){let h=Object.keys(f);for(let w=0;w<h.length;w++){let s=h[w];this.lastEntities[s]={regex:new RegExp("&"+s+";","g"),val:f[s]}}}function $c(f,h,w,s,$,r,E){if(f!==void 0){if(this.options.trimValues&&!s)f=f.trim();if(f.length>0){if(!E)f=this.replaceEntitiesValue(f);let U=this.options.tagValueProcessor(h,f,w,$,r);if(U===null||U===void 0)return f;else if(typeof U!==typeof f||U!==f)return U;else if(this.options.trimValues)return t2(f,this.options.parseTagValue,this.options.numberParseOptions);else if(f.trim()===f)return t2(f,this.options.parseTagValue,this.options.numberParseOptions);else return f}}}function rc(f){if(this.options.removeNSPrefix){let h=f.split(":"),w=f.charAt(0)==="/"?"/":"";if(h[0]==="xmlns")return"";if(h.length===2)f=w+h[1]}return f}var Ec=new RegExp(`([^\\s=]+)\\s*(=\\s*(['"])([\\s\\S]*?)\\3)?`,"gm");function Uc(f,h,w){if(!this.options.ignoreAttributes&&typeof f==="string"){let s=HR.getAllMatches(f,Ec),$=s.length,r={};for(let E=0;E<$;E++){let U=this.resolveNameSpace(s[E][1]),T=s[E][4],F=this.options.attributeNamePrefix+U;if(U.length){if(this.options.transformAttributeName)F=this.options.transformAttributeName(F);if(F==="__proto__")F="#__proto__";if(T!==void 0){if(this.options.trimValues)T=T.trim();T=this.replaceEntitiesValue(T);let C=this.options.attributeValueProcessor(U,T,h);if(C===null||C===void 0)r[F]=T;else if(typeof C!==typeof T||C!==T)r[F]=C;else r[F]=t2(T,this.options.parseAttributeValue,this.options.numberParseOptions)}else if(this.options.allowBooleanAttributes)r[F]=!0}}if(!Object.keys(r).length)return;if(this.options.attributesGroupName){let E={};return E[this.options.attributesGroupName]=r,E}return r}}var Tc=function(f){f=f.replace(/\r\n?/g,`
34
- `);let h=new v$("!xml"),w=h,s="",$="";for(let r=0;r<f.length;r++)if(f[r]==="<")if(f[r+1]==="/"){let U=ph(f,">",r,"Closing Tag is not closed."),T=f.substring(r+2,U).trim();if(this.options.removeNSPrefix){let I=T.indexOf(":");if(I!==-1)T=T.substr(I+1)}if(this.options.transformTagName)T=this.options.transformTagName(T);if(w)s=this.saveTextToParentTag(s,w,$);let F=$.substring($.lastIndexOf(".")+1);if(T&&this.options.unpairedTags.indexOf(T)!==-1)throw new Error(`Unpaired tag can not be used as closing tag: </${T}>`);let C=0;if(F&&this.options.unpairedTags.indexOf(F)!==-1)C=$.lastIndexOf(".",$.lastIndexOf(".")-1),this.tagsNodeStack.pop();else C=$.lastIndexOf(".");$=$.substring(0,C),w=this.tagsNodeStack.pop(),s="",r=U}else if(f[r+1]==="?"){let U=u2(f,r,!1,"?>");if(!U)throw new Error("Pi Tag is not closed.");if(s=this.saveTextToParentTag(s,w,$),this.options.ignoreDeclaration&&U.tagName==="?xml"||this.options.ignorePiTags);else{let T=new v$(U.tagName);if(T.add(this.options.textNodeName,""),U.tagName!==U.tagExp&&U.attrExpPresent)T[":@"]=this.buildAttributesMap(U.tagExp,$,U.tagName);this.addChild(w,T,$)}r=U.closeIndex+1}else if(f.substr(r+1,3)==="!--"){let U=ph(f,"-->",r+4,"Comment is not closed.");if(this.options.commentPropName){let T=f.substring(r+4,U-2);s=this.saveTextToParentTag(s,w,$),w.add(this.options.commentPropName,[{[this.options.textNodeName]:T}])}r=U}else if(f.substr(r+1,2)==="!D"){let U=hc(f,r);this.docTypeEntities=U.entities,r=U.i}else if(f.substr(r+1,2)==="!["){let U=ph(f,"]]>",r,"CDATA is not closed.")-2,T=f.substring(r+9,U);s=this.saveTextToParentTag(s,w,$);let F=this.parseTextData(T,w.tagname,$,!0,!1,!0,!0);if(F==null)F="";if(this.options.cdataPropName)w.add(this.options.cdataPropName,[{[this.options.textNodeName]:T}]);else w.add(this.options.textNodeName,F);r=U+2}else{let U=u2(f,r,this.options.removeNSPrefix),T=U.tagName,F=U.rawTagName,C=U.tagExp,I=U.attrExpPresent,L=U.closeIndex;if(this.options.transformTagName)T=this.options.transformTagName(T);if(w&&s){if(w.tagname!=="!xml")s=this.saveTextToParentTag(s,w,$,!1)}let G=w;if(G&&this.options.unpairedTags.indexOf(G.tagname)!==-1)w=this.tagsNodeStack.pop(),$=$.substring(0,$.lastIndexOf("."));if(T!==h.tagname)$+=$?"."+T:T;if(this.isItStopNode(this.options.stopNodes,$,T)){let X="";if(C.length>0&&C.lastIndexOf("/")===C.length-1){if(T[T.length-1]==="/")T=T.substr(0,T.length-1),$=$.substr(0,$.length-1),C=T;else C=C.substr(0,C.length-1);r=U.closeIndex}else if(this.options.unpairedTags.indexOf(T)!==-1)r=U.closeIndex;else{let M=this.readStopNodeData(f,F,L+1);if(!M)throw new Error(`Unexpected end of ${F}`);r=M.i,X=M.tagContent}let Q=new v$(T);if(T!==C&&I)Q[":@"]=this.buildAttributesMap(C,$,T);if(X)X=this.parseTextData(X,T,$,!0,I,!0,!0);$=$.substr(0,$.lastIndexOf(".")),Q.add(this.options.textNodeName,X),this.addChild(w,Q,$)}else{if(C.length>0&&C.lastIndexOf("/")===C.length-1){if(T[T.length-1]==="/")T=T.substr(0,T.length-1),$=$.substr(0,$.length-1),C=T;else C=C.substr(0,C.length-1);if(this.options.transformTagName)T=this.options.transformTagName(T);let X=new v$(T);if(T!==C&&I)X[":@"]=this.buildAttributesMap(C,$,T);this.addChild(w,X,$),$=$.substr(0,$.lastIndexOf("."))}else{let X=new v$(T);if(this.tagsNodeStack.push(w),T!==C&&I)X[":@"]=this.buildAttributesMap(C,$,T);this.addChild(w,X,$),w=X}s="",r=L}}else s+=f[r];return h.child};function Fc(f,h,w){let s=this.options.updateTag(h.tagname,w,h[":@"]);if(s===!1);else if(typeof s==="string")h.tagname=s,f.addChild(h);else f.addChild(h)}var Cc=function(f){if(this.options.processEntities){for(let h in this.docTypeEntities){let w=this.docTypeEntities[h];f=f.replace(w.regx,w.val)}for(let h in this.lastEntities){let w=this.lastEntities[h];f=f.replace(w.regex,w.val)}if(this.options.htmlEntities)for(let h in this.htmlEntities){let w=this.htmlEntities[h];f=f.replace(w.regex,w.val)}f=f.replace(this.ampEntity.regex,this.ampEntity.val)}return f};function Ic(f,h,w,s){if(f){if(s===void 0)s=Object.keys(h.child).length===0;if(f=this.parseTextData(f,h.tagname,w,!1,h[":@"]?Object.keys(h[":@"]).length!==0:!1,s),f!==void 0&&f!=="")h.add(this.options.textNodeName,f);f=""}return f}function Lc(f,h,w){let s="*."+w;for(let $ in f){let r=f[$];if(s===r||h===r)return!0}return!1}function Bc(f,h,w=">"){let s,$="";for(let r=h;r<f.length;r++){let E=f[r];if(s){if(E===s)s=""}else if(E==='"'||E==="'")s=E;else if(E===w[0])if(w[1]){if(f[r+1]===w[1])return{data:$,index:r}}else return{data:$,index:r};else if(E==="\t")E=" ";$+=E}}function ph(f,h,w,s){let $=f.indexOf(h,w);if($===-1)throw new Error(s);else return $+h.length-1}function u2(f,h,w,s=">"){let $=Bc(f,h+1,s);if(!$)return;let{data:r,index:E}=$,U=r.search(/\s/),T=r,F=!0;if(U!==-1)T=r.substring(0,U),r=r.substring(U+1).trimStart();let C=T;if(w){let I=T.indexOf(":");if(I!==-1)T=T.substr(I+1),F=T!==$.data.substr(I+1)}return{tagName:T,tagExp:r,closeIndex:E,attrExpPresent:F,rawTagName:C}}function Ac(f,h,w){let s=w,$=1;for(;w<f.length;w++)if(f[w]==="<")if(f[w+1]==="/"){let r=ph(f,">",w,`${h} is not closed`);if(f.substring(w+2,r).trim()===h){if($--,$===0)return{tagContent:f.substring(s,w),i:r}}w=r}else if(f[w+1]==="?")w=ph(f,"?>",w+1,"StopNode is not closed.");else if(f.substr(w+1,3)==="!--")w=ph(f,"-->",w+3,"StopNode is not closed.");else if(f.substr(w+1,2)==="![")w=ph(f,"]]>",w,"StopNode is not closed.")-2;else{let r=u2(f,w,">");if(r){if((r&&r.tagName)===h&&r.tagExp[r.tagExp.length-1]!=="/")$++;w=r.closeIndex}}}function t2(f,h,w){if(h&&typeof f==="string"){let s=f.trim();if(s==="true")return!0;else if(s==="false")return!1;else return wc(f,w)}else if(HR.isExist(f))return f;else return""}DR.exports=NR});var yR=H((Xc)=>{function Gc(f,h){return kR(f,h)}function kR(f,h,w){let s,$={};for(let r=0;r<f.length;r++){let E=f[r],U=Wc(E),T="";if(w===void 0)T=U;else T=w+"."+U;if(U===h.textNodeName)if(s===void 0)s=E[U];else s+=""+E[U];else if(U===void 0)continue;else if(E[U]){let F=kR(E[U],h,T),C=Rc(F,h);if(E[":@"])zc(F,E[":@"],T,h);else if(Object.keys(F).length===1&&F[h.textNodeName]!==void 0&&!h.alwaysCreateTextNode)F=F[h.textNodeName];else if(Object.keys(F).length===0)if(h.alwaysCreateTextNode)F[h.textNodeName]="";else F="";if($[U]!==void 0&&$.hasOwnProperty(U)){if(!Array.isArray($[U]))$[U]=[$[U]];$[U].push(F)}else if(h.isArray(U,T,C))$[U]=[F];else $[U]=F}}if(typeof s==="string"){if(s.length>0)$[h.textNodeName]=s}else if(s!==void 0)$[h.textNodeName]=s;return $}function Wc(f){let h=Object.keys(f);for(let w=0;w<h.length;w++){let s=h[w];if(s!==":@")return s}}function zc(f,h,w,s){if(h){let $=Object.keys(h),r=$.length;for(let E=0;E<r;E++){let U=$[E];if(s.isArray(U,w+"."+U,!0,!0))f[U]=[h[U]];else f[U]=h[U]}}}function Rc(f,h){let{textNodeName:w}=h,s=Object.keys(f).length;if(s===0)return!0;if(s===1&&(f[w]||typeof f[w]==="boolean"||f[w]===0))return!0;return!1}Xc.prettify=Gc});var lR=H((J20,OR)=>{var{buildOptions:Yc}=YR(),Mc=qR(),{prettify:Qc}=yR(),Kc=p2();class jR{constructor(f){this.externalEntities={},this.options=Yc(f)}parse(f,h){if(typeof f==="string");else if(f.toString)f=f.toString();else throw new Error("XML data is accepted in String or Bytes[] form.");if(h){if(h===!0)h={};let $=Kc.validate(f,h);if($!==!0)throw Error(`${$.err.msg}:${$.err.line}:${$.err.col}`)}let w=new Mc(this.options);w.addExternalEntities(this.externalEntities);let s=w.parseXml(f);if(this.options.preserveOrder||s===void 0)return s;else return Qc(s,this.options)}addEntity(f,h){if(h.indexOf("&")!==-1)throw new Error("Entity value can't have '&'");else if(f.indexOf("&")!==-1||f.indexOf(";")!==-1)throw new Error("An entity must be set without '&' and ';'. Eg. use '#xD' for '&#xD;'");else if(h==="&")throw new Error("An entity with value '&' is not permitted");else this.externalEntities[f]=h}}OR.exports=jR});var iR=H((V20,dR)=>{function Zc(f,h){let w="";if(h.format&&h.indentBy.length>0)w=`
35
- `;return bR(f,h,"",w)}function bR(f,h,w,s){let $="",r=!1;for(let E=0;E<f.length;E++){let U=f[E],T=Jc(U);if(T===void 0)continue;let F="";if(w.length===0)F=T;else F=`${w}.${T}`;if(T===h.textNodeName){let X=U[T];if(!Vc(F,h))X=h.tagValueProcessor(T,X),X=mR(X,h);if(r)$+=s;$+=X,r=!1;continue}else if(T===h.cdataPropName){if(r)$+=s;$+=`<![CDATA[${U[T][0][h.textNodeName]}]]>`,r=!1;continue}else if(T===h.commentPropName){$+=s+`<!--${U[T][0][h.textNodeName]}-->`,r=!0;continue}else if(T[0]==="?"){let X=vR(U[":@"],h),Q=T==="?xml"?"":s,M=U[T][0][h.textNodeName];M=M.length!==0?" "+M:"",$+=Q+`<${T}${M}${X}?>`,r=!0;continue}let C=s;if(C!=="")C+=h.indentBy;let I=vR(U[":@"],h),L=s+`<${T}${I}`,G=bR(U[T],h,F,C);if(h.unpairedTags.indexOf(T)!==-1)if(h.suppressUnpairedNode)$+=L+">";else $+=L+"/>";else if((!G||G.length===0)&&h.suppressEmptyNode)$+=L+"/>";else if(G&&G.endsWith(">"))$+=L+`>${G}${s}</${T}>`;else{if($+=L+">",G&&s!==""&&(G.includes("/>")||G.includes("</")))$+=s+h.indentBy+G+s;else $+=G;$+=`</${T}>`}r=!0}return $}function Jc(f){let h=Object.keys(f);for(let w=0;w<h.length;w++){let s=h[w];if(!f.hasOwnProperty(s))continue;if(s!==":@")return s}}function vR(f,h){let w="";if(f&&!h.ignoreAttributes)for(let s in f){if(!f.hasOwnProperty(s))continue;let $=h.attributeValueProcessor(s,f[s]);if($=mR($,h),$===!0&&h.suppressBooleanAttributes)w+=` ${s.substr(h.attributeNamePrefix.length)}`;else w+=` ${s.substr(h.attributeNamePrefix.length)}="${$}"`}return w}function Vc(f,h){f=f.substr(0,f.length-h.textNodeName.length-1);let w=f.substr(f.lastIndexOf(".")+1);for(let s in h.stopNodes)if(h.stopNodes[s]===f||h.stopNodes[s]==="*."+w)return!0;return!1}function mR(f,h){if(f&&f.length>0&&h.processEntities)for(let w=0;w<h.entities.length;w++){let s=h.entities[w];f=f.replace(s.regex,s.val)}return f}dR.exports=Zc});var gR=H((P20,cR)=>{var Pc=iR(),Hc={attributeNamePrefix:"@_",attributesGroupName:!1,textNodeName:"#text",ignoreAttributes:!0,cdataPropName:!1,format:!1,indentBy:" ",suppressEmptyNode:!1,suppressUnpairedNode:!0,suppressBooleanAttributes:!0,tagValueProcessor:function(f,h){return h},attributeValueProcessor:function(f,h){return h},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};function zh(f){if(this.options=Object.assign({},Hc,f),this.options.ignoreAttributes||this.options.attributesGroupName)this.isAttribute=function(){return!1};else this.attrPrefixLen=this.options.attributeNamePrefix.length,this.isAttribute=qc;if(this.processTextOrObjNode=Nc,this.options.format)this.indentate=Dc,this.tagEndChar=`>
31
+ `)},"stackTraceWarning"),O$={warn:console.warn},Nd=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],e2=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function rR(f){let h=f.getUTCFullYear(),w=f.getUTCMonth(),s=f.getUTCDay(),$=f.getUTCDate(),r=f.getUTCHours(),E=f.getUTCMinutes(),U=f.getUTCSeconds(),T=$<10?`0${$}`:`${$}`,F=r<10?`0${r}`:`${r}`,C=E<10?`0${E}`:`${E}`,I=U<10?`0${U}`:`${U}`;return`${Nd[s]}, ${T} ${e2[w]} ${h} ${F}:${C}:${I} GMT`}b(rR,"dateToUtcString");var Dd=new RegExp(/^(\d{4})-(\d{2})-(\d{2})[tT](\d{2}):(\d{2}):(\d{2})(?:\.(\d+))?[zZ]$/),qd=b((f)=>{if(f===null||f===void 0)return;if(typeof f!=="string")throw new TypeError("RFC-3339 date-times must be expressed as strings");let h=Dd.exec(f);if(!h)throw new TypeError("Invalid RFC-3339 date-time value");let[w,s,$,r,E,U,T,F]=h,C=bw(mw(s)),I=Yf($,"month",1,12),L=Yf(r,"day",1,31);return k$(C,I,L,{hours:E,minutes:U,seconds:T,fractionalMilliseconds:F})},"parseRfc3339DateTime"),kd=new RegExp(/^(\d{4})-(\d{2})-(\d{2})[tT](\d{2}):(\d{2}):(\d{2})(?:\.(\d+))?(([-+]\d{2}\:\d{2})|[zZ])$/),yd=b((f)=>{if(f===null||f===void 0)return;if(typeof f!=="string")throw new TypeError("RFC-3339 date-times must be expressed as strings");let h=kd.exec(f);if(!h)throw new TypeError("Invalid RFC-3339 date-time value");let[w,s,$,r,E,U,T,F,C]=h,I=bw(mw(s)),L=Yf($,"month",1,12),G=Yf(r,"day",1,31),X=k$(I,L,G,{hours:E,minutes:U,seconds:T,fractionalMilliseconds:F});if(C.toUpperCase()!="Z")X.setTime(X.getTime()-nd(C));return X},"parseRfc3339DateTimeWithOffset"),jd=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$/),Od=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$/),ld=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})$/),vd=b((f)=>{if(f===null||f===void 0)return;if(typeof f!=="string")throw new TypeError("RFC-7231 date-times must be expressed as strings");let h=jd.exec(f);if(h){let[w,s,$,r,E,U,T,F]=h;return k$(bw(mw(r)),b2($),Yf(s,"day",1,31),{hours:E,minutes:U,seconds:T,fractionalMilliseconds:F})}if(h=Od.exec(f),h){let[w,s,$,r,E,U,T,F]=h;return id(k$(md(r),b2($),Yf(s,"day",1,31),{hours:E,minutes:U,seconds:T,fractionalMilliseconds:F}))}if(h=ld.exec(f),h){let[w,s,$,r,E,U,T,F]=h;return k$(bw(mw(F)),b2(s),Yf($.trimLeft(),"day",1,31),{hours:r,minutes:E,seconds:U,fractionalMilliseconds:T})}throw new TypeError("Invalid RFC-7231 date-time value")},"parseRfc7231DateTime"),bd=b((f)=>{if(f===null||f===void 0)return;let h;if(typeof f==="number")h=f;else if(typeof f==="string")h=_2(f);else if(typeof f==="object"&&f.tag===1)h=f.value;else throw new TypeError("Epoch timestamps must be expressed as floating point numbers or their string representation");if(Number.isNaN(h)||h===1/0||h===-1/0)throw new TypeError("Epoch timestamps must be valid, non-Infinite, non-NaN numerics");return new Date(Math.round(h*1000))},"parseEpochTimestamp"),k$=b((f,h,w,s)=>{let $=h-1;return gd(f,$,w),new Date(Date.UTC(f,$,w,Yf(s.hours,"hour",0,23),Yf(s.minutes,"minute",0,59),Yf(s.seconds,"seconds",0,60),_d(s.fractionalMilliseconds)))},"buildDate"),md=b((f)=>{let h=new Date().getUTCFullYear(),w=Math.floor(h/100)*100+bw(mw(f));if(w<h)return w+100;return w},"parseTwoDigitYear"),dd=1576800000000,id=b((f)=>{if(f.getTime()-new Date().getTime()>dd)return new Date(Date.UTC(f.getUTCFullYear()-100,f.getUTCMonth(),f.getUTCDate(),f.getUTCHours(),f.getUTCMinutes(),f.getUTCSeconds(),f.getUTCMilliseconds()));return f},"adjustRfc850Year"),b2=b((f)=>{let h=e2.indexOf(f);if(h<0)throw new TypeError(`Invalid month: ${f}`);return h+1},"parseMonthByShortName"),cd=[31,28,31,30,31,30,31,31,30,31,30,31],gd=b((f,h,w)=>{let s=cd[h];if(h===1&&xd(f))s=29;if(w>s)throw new TypeError(`Invalid day for ${e2[h]} in ${f}: ${w}`)},"validateDayOfMonth"),xd=b((f)=>{return f%4===0&&(f%100!==0||f%400===0)},"isLeapYear"),Yf=b((f,h,w,s)=>{let $=$R(mw(f));if($<w||$>s)throw new TypeError(`${h} must be between ${w} and ${s}, inclusive`);return $},"parseDateValue"),_d=b((f)=>{if(f===null||f===void 0)return 0;return hR("0."+f)*1000},"parseMilliseconds"),nd=b((f)=>{let h=f[0],w=1;if(h=="+")w=1;else if(h=="-")w=-1;else throw new TypeError(`Offset direction, ${h}, must be "+" or "-"`);let s=Number(f.substring(1,3)),$=Number(f.substring(4,6));return w*(s*60+$)*60*1000},"parseOffsetToMilliseconds"),mw=b((f)=>{let h=0;while(h<f.length-1&&f.charAt(h)==="0")h++;if(h===0)return f;return f.slice(h)},"stripLeadingZeroes"),ed=class f extends Error{static{b(this,"ServiceException")}constructor(h){super(h.message);Object.setPrototypeOf(this,Object.getPrototypeOf(this).constructor.prototype),this.name=h.name,this.$fault=h.$fault,this.$metadata=h.$metadata}static isInstance(h){if(!h)return!1;let w=h;return f.prototype.isPrototypeOf(w)||Boolean(w.$fault)&&Boolean(w.$metadata)&&(w.$fault==="client"||w.$fault==="server")}static[Symbol.hasInstance](h){if(!h)return!1;let w=h;if(this===f)return f.isInstance(h);if(f.isInstance(h)){if(w.name&&this.name)return this.prototype.isPrototypeOf(h)||w.name===this.name;return this.prototype.isPrototypeOf(h)}return!1}},ER=b((f,h={})=>{Object.entries(h).filter(([,s])=>s!==void 0).forEach(([s,$])=>{if(f[s]==null||f[s]==="")f[s]=$});let w=f.message||f.Message||"UnknownError";return f.message=w,delete f.Message,f},"decorateServiceException"),UR=b(({output:f,parsedBody:h,exceptionCtor:w,errorCode:s})=>{let $=od(f),r=$.httpStatusCode?$.httpStatusCode+"":void 0,E=new w({name:h?.code||h?.Code||s||r||"UnknownError",$fault:"client",$metadata:$});throw ER(E,h)},"throwDefaultError"),ad=b((f)=>{return({output:h,parsedBody:w,errorCode:s})=>{UR({output:h,parsedBody:w,exceptionCtor:f,errorCode:s})}},"withBaseException"),od=b((f)=>({httpStatusCode:f.statusCode,requestId:f.headers["x-amzn-requestid"]??f.headers["x-amzn-request-id"]??f.headers["x-amz-request-id"],extendedRequestId:f.headers["x-amz-id-2"],cfId:f.headers["x-amz-cf-id"]}),"deserializeMetadata"),pd=b((f)=>{switch(f){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"),oz=!1,ud=b((f)=>{if(f&&!oz&&parseInt(f.substring(1,f.indexOf(".")))<16)oz=!0},"emitWarningIfUnsupportedVersion"),td=b((f)=>{let h=[];for(let w in m2.AlgorithmId){let s=m2.AlgorithmId[w];if(f[s]===void 0)continue;h.push({algorithmId:()=>s,checksumConstructor:()=>f[s]})}return{_checksumAlgorithms:h,addChecksumAlgorithm(w){this._checksumAlgorithms.push(w)},checksumAlgorithms(){return this._checksumAlgorithms}}},"getChecksumConfiguration"),fi=b((f)=>{let h={};return f.checksumAlgorithms().forEach((w)=>{h[w.algorithmId()]=w.checksumConstructor()}),h},"resolveChecksumRuntimeConfig"),hi=b((f)=>{let h=f.retryStrategy;return{setRetryStrategy(w){h=w},retryStrategy(){return h}}},"getRetryConfiguration"),wi=b((f)=>{let h={};return h.retryStrategy=f.retryStrategy(),h},"resolveRetryRuntimeConfig"),TR=b((f)=>{return{...td(f),...hi(f)}},"getDefaultExtensionConfiguration"),si=TR,$i=b((f)=>{return{...fi(f),...wi(f)}},"resolveDefaultRuntimeConfig"),ri=b((f)=>Array.isArray(f)?f:[f],"getArrayIfSingleItem"),FR=b((f)=>{for(let w in f)if(f.hasOwnProperty(w)&&f[w]["#text"]!==void 0)f[w]=f[w]["#text"];else if(typeof f[w]==="object"&&f[w]!==null)f[w]=FR(f[w]);return f},"getValueFromTextNode"),Ei=b((f)=>{return f!=null},"isSerializableHeaderValue"),oh=b(function f(h){return Object.assign(new String(h),{deserializeJSON(){return JSON.parse(String(h))},toString(){return String(h)},toJSON(){return String(h)}})},"LazyJsonString");oh.from=(f)=>{if(f&&typeof f==="object"&&(f instanceof oh||("deserializeJSON"in f)))return f;else if(typeof f==="string"||Object.getPrototypeOf(f)===String.prototype)return oh(String(f));return oh(JSON.stringify(f))};oh.fromObject=oh.from;var Ui=class{static{b(this,"NoOpLogger")}trace(){}debug(){}info(){}warn(){}error(){}};function a2(f,h,w){let s,$,r;if(typeof h==="undefined"&&typeof w==="undefined")s={},r=f;else if(s=f,typeof h==="function")return $=h,r=w,Ci(s,$,r);else r=h;for(let E of Object.keys(r)){if(!Array.isArray(r[E])){s[E]=r[E];continue}CR(s,null,r,E)}return s}b(a2,"map");var Ti=b((f)=>{let h={};for(let[w,s]of Object.entries(f||{}))h[w]=[,s];return h},"convertMap"),Fi=b((f,h)=>{let w={};for(let s in h)CR(w,f,h,s);return w},"take"),Ci=b((f,h,w)=>{return a2(f,Object.entries(w).reduce((s,[$,r])=>{if(Array.isArray(r))s[$]=r;else if(typeof r==="function")s[$]=[h,r()];else s[$]=[h,r];return s},{}))},"mapWithFilter"),CR=b((f,h,w,s)=>{if(h!==null){let E=w[s];if(typeof E==="function")E=[,E];let[U=Ii,T=Li,F=s]=E;if(typeof U==="function"&&U(h[F])||typeof U!=="function"&&!!U)f[s]=T(h[F]);return}let[$,r]=w[s];if(typeof r==="function"){let E,U=$===void 0&&(E=r())!=null,T=typeof $==="function"&&!!$(void 0)||typeof $!=="function"&&!!$;if(U)f[s]=E;else if(T)f[s]=r()}else{let E=$===void 0&&r!=null,U=typeof $==="function"&&!!$(r)||typeof $!=="function"&&!!$;if(E||U)f[s]=r}},"applyInstruction"),Ii=b((f)=>f!=null,"nonNullish"),Li=b((f)=>f,"pass");function IR(f){if(f.includes(",")||f.includes('"'))f=`"${f.replace(/"/g,"\\\"")}"`;return f}b(IR,"quoteHeader");var Bi=b((f)=>{if(f!==f)return"NaN";switch(f){case 1/0:return"Infinity";case-1/0:return"-Infinity";default:return f}},"serializeFloat"),Ai=b((f)=>f.toISOString().replace(".000Z","Z"),"serializeDateTime"),g2=b((f)=>{if(f==null)return{};if(Array.isArray(f))return f.filter((h)=>h!=null).map(g2);if(typeof f==="object"){let h={};for(let w of Object.keys(f)){if(f[w]==null)continue;h[w]=g2(f[w])}return h}return f},"_json");function LR(f,h,w){if(w<=0||!Number.isInteger(w))throw new Error("Invalid number of delimiters ("+w+") for splitEvery.");let s=f.split(h);if(w===1)return s;let $=[],r="";for(let E=0;E<s.length;E++){if(r==="")r=s[E];else r+=h+s[E];if((E+1)%w===0)$.push(r),r=""}if(r!=="")$.push(r);return $}b(LR,"splitEvery");var Gi=b((f)=>{let h=f.length,w=[],s=!1,$=void 0,r=0;for(let E=0;E<h;++E){let U=f[E];switch(U){case'"':if($!=="\\")s=!s;break;case",":if(!s)w.push(f.slice(r,E)),r=E+1;break;default:}$=U}return w.push(f.slice(r)),w.map((E)=>{E=E.trim();let U=E.length;if(U<2)return E;if(E[0]==='"'&&E[U-1]==='"')E=E.slice(1,U-1);return E.replace(/\\"/g,'"')})},"splitHeader")});var u4=H((Si)=>{var Wi=":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",AR="[: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]["+Wi+"]*",zi=new RegExp("^"+AR+"$"),Ri=function(f,h){let w=[],s=h.exec(f);while(s){let $=[];$.startIndex=h.lastIndex-s[0].length;let r=s.length;for(let E=0;E<r;E++)$.push(s[E]);w.push($),s=h.exec(f)}return w},Xi=function(f){let h=zi.exec(f);return!(h===null||typeof h==="undefined")};Si.isExist=function(f){return typeof f!=="undefined"};Si.isEmptyObject=function(f){return Object.keys(f).length===0};Si.merge=function(f,h,w){if(h){let s=Object.keys(h),$=s.length;for(let r=0;r<$;r++)if(w==="strict")f[s[r]]=[h[s[r]]];else f[s[r]]=h[s[r]]}};Si.getValue=function(f){if(Si.isExist(f))return f;else return""};Si.isName=Xi;Si.getAllMatches=Ri;Si.nameRegexp=AR});var p2=H((Oi)=>{var o2=u4(),Vi={allowBooleanAttributes:!1,unpairedTags:[]};Oi.validate=function(f,h){h=Object.assign({},Vi,h);let w=[],s=!1,$=!1;if(f[0]==="\uFEFF")f=f.substr(1);for(let r=0;r<f.length;r++)if(f[r]==="<"&&f[r+1]==="?"){if(r+=2,r=zR(f,r),r.err)return r}else if(f[r]==="<"){let E=r;if(r++,f[r]==="!"){r=RR(f,r);continue}else{let U=!1;if(f[r]==="/")U=!0,r++;let T="";for(;r<f.length&&f[r]!==">"&&f[r]!==" "&&f[r]!=="\t"&&f[r]!==`
32
+ `&&f[r]!=="\r";r++)T+=f[r];if(T=T.trim(),T[T.length-1]==="/")T=T.substring(0,T.length-1),r--;if(!ji(T)){let I;if(T.trim().length===0)I="Invalid space after '<'.";else I="Tag '"+T+"' is an invalid name.";return d0("InvalidTag",I,I1(f,r))}let F=Ni(f,r);if(F===!1)return d0("InvalidAttr","Attributes for '"+T+"' have open quote.",I1(f,r));let C=F.value;if(r=F.index,C[C.length-1]==="/"){let I=r-C.length;C=C.substring(0,C.length-1);let L=XR(C,h);if(L===!0)s=!0;else return d0(L.err.code,L.err.msg,I1(f,I+L.err.line))}else if(U)if(!F.tagClosed)return d0("InvalidTag","Closing tag '"+T+"' doesn't have proper closing.",I1(f,r));else if(C.trim().length>0)return d0("InvalidTag","Closing tag '"+T+"' can't have attributes or invalid starting.",I1(f,E));else if(w.length===0)return d0("InvalidTag","Closing tag '"+T+"' has not been opened.",I1(f,E));else{let I=w.pop();if(T!==I.tagName){let L=I1(f,I.tagStartPos);return d0("InvalidTag","Expected closing tag '"+I.tagName+"' (opened in line "+L.line+", col "+L.col+") instead of closing tag '"+T+"'.",I1(f,E))}if(w.length==0)$=!0}else{let I=XR(C,h);if(I!==!0)return d0(I.err.code,I.err.msg,I1(f,r-C.length+I.err.line));if($===!0)return d0("InvalidXml","Multiple possible root nodes found.",I1(f,r));else if(h.unpairedTags.indexOf(T)!==-1);else w.push({tagName:T,tagStartPos:E});s=!0}for(r++;r<f.length;r++)if(f[r]==="<")if(f[r+1]==="!"){r++,r=RR(f,r);continue}else if(f[r+1]==="?"){if(r=zR(f,++r),r.err)return r}else break;else if(f[r]==="&"){let I=ki(f,r);if(I==-1)return d0("InvalidChar","char '&' is not expected.",I1(f,r));r=I}else if($===!0&&!WR(f[r]))return d0("InvalidXml","Extra text at the end",I1(f,r));if(f[r]==="<")r--}}else{if(WR(f[r]))continue;return d0("InvalidChar","char '"+f[r]+"' is not expected.",I1(f,r))}if(!s)return d0("InvalidXml","Start tag expected.",1);else if(w.length==1)return d0("InvalidTag","Unclosed tag '"+w[0].tagName+"'.",I1(f,w[0].tagStartPos));else if(w.length>0)return d0("InvalidXml","Invalid '"+JSON.stringify(w.map((r)=>r.tagName),null,4).replace(/\r?\n/g,"")+"' found.",{line:1,col:1});return!0};function WR(f){return f===" "||f==="\t"||f===`
33
+ `||f==="\r"}function zR(f,h){let w=h;for(;h<f.length;h++)if(f[h]=="?"||f[h]==" "){let s=f.substr(w,h-w);if(h>5&&s==="xml")return d0("InvalidXml","XML declaration allowed only at the start of the document.",I1(f,h));else if(f[h]=="?"&&f[h+1]==">"){h++;break}else continue}return h}function RR(f,h){if(f.length>h+5&&f[h+1]==="-"&&f[h+2]==="-"){for(h+=3;h<f.length;h++)if(f[h]==="-"&&f[h+1]==="-"&&f[h+2]===">"){h+=2;break}}else if(f.length>h+8&&f[h+1]==="D"&&f[h+2]==="O"&&f[h+3]==="C"&&f[h+4]==="T"&&f[h+5]==="Y"&&f[h+6]==="P"&&f[h+7]==="E"){let w=1;for(h+=8;h<f.length;h++)if(f[h]==="<")w++;else if(f[h]===">"){if(w--,w===0)break}}else if(f.length>h+9&&f[h+1]==="["&&f[h+2]==="C"&&f[h+3]==="D"&&f[h+4]==="A"&&f[h+5]==="T"&&f[h+6]==="A"&&f[h+7]==="["){for(h+=8;h<f.length;h++)if(f[h]==="]"&&f[h+1]==="]"&&f[h+2]===">"){h+=2;break}}return h}var Pi='"',Hi="'";function Ni(f,h){let w="",s="",$=!1;for(;h<f.length;h++){if(f[h]===Pi||f[h]===Hi)if(s==="")s=f[h];else if(s!==f[h]);else s="";else if(f[h]===">"){if(s===""){$=!0;break}}w+=f[h]}if(s!=="")return!1;return{value:w,index:h,tagClosed:$}}var Di=new RegExp(`(\\s*)([^\\s=]+)(\\s*=)?(\\s*(['"])(([\\s\\S])*?)\\5)?`,"g");function XR(f,h){let w=o2.getAllMatches(f,Di),s={};for(let $=0;$<w.length;$++){if(w[$][1].length===0)return d0("InvalidAttr","Attribute '"+w[$][2]+"' has no space in starting.",l$(w[$]));else if(w[$][3]!==void 0&&w[$][4]===void 0)return d0("InvalidAttr","Attribute '"+w[$][2]+"' is without value.",l$(w[$]));else if(w[$][3]===void 0&&!h.allowBooleanAttributes)return d0("InvalidAttr","boolean attribute '"+w[$][2]+"' is not allowed.",l$(w[$]));let r=w[$][2];if(!yi(r))return d0("InvalidAttr","Attribute '"+r+"' is an invalid name.",l$(w[$]));if(!s.hasOwnProperty(r))s[r]=1;else return d0("InvalidAttr","Attribute '"+r+"' is repeated.",l$(w[$]))}return!0}function qi(f,h){let w=/\d/;if(f[h]==="x")h++,w=/[\da-fA-F]/;for(;h<f.length;h++){if(f[h]===";")return h;if(!f[h].match(w))break}return-1}function ki(f,h){if(h++,f[h]===";")return-1;if(f[h]==="#")return h++,qi(f,h);let w=0;for(;h<f.length;h++,w++){if(f[h].match(/\w/)&&w<20)continue;if(f[h]===";")break;return-1}return h}function d0(f,h,w){return{err:{code:f,msg:h,line:w.line||w,col:w.col}}}function yi(f){return o2.isName(f)}function ji(f){return o2.isName(f)}function I1(f,h){let w=f.substring(0,h).split(/\r?\n/);return{line:w.length,col:w[w.length-1].length+1}}function l$(f){return f.startIndex+f[1].length}});var YR=H((bi)=>{var SR={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(f,h){return h},attributeValueProcessor:function(f,h){return h},stopNodes:[],alwaysCreateTextNode:!1,isArray:()=>!1,commentPropName:!1,unpairedTags:[],processEntities:!0,htmlEntities:!1,ignoreDeclaration:!1,ignorePiTags:!1,transformTagName:!1,transformAttributeName:!1,updateTag:function(f,h,w){return f}},vi=function(f){return Object.assign({},SR,f)};bi.buildOptions=vi;bi.defaultOptions=SR});var KR=H((K20,QR)=>{class MR{constructor(f){this.tagname=f,this.child=[],this[":@"]={}}add(f,h){if(f==="__proto__")f="#__proto__";this.child.push({[f]:h})}addChild(f){if(f.tagname==="__proto__")f.tagname="#__proto__";if(f[":@"]&&Object.keys(f[":@"]).length>0)this.child.push({[f.tagname]:f.child,[":@"]:f[":@"]});else this.child.push({[f.tagname]:f.child})}}QR.exports=MR});var JR=H((Z20,ZR)=>{var ii=u4();function ci(f,h){let w={};if(f[h+3]==="O"&&f[h+4]==="C"&&f[h+5]==="T"&&f[h+6]==="Y"&&f[h+7]==="P"&&f[h+8]==="E"){h=h+9;let s=1,$=!1,r=!1,E="";for(;h<f.length;h++)if(f[h]==="<"&&!r){if($&&_i(f,h)){if(h+=7,[entityName,val,h]=gi(f,h+1),val.indexOf("&")===-1)w[oi(entityName)]={regx:RegExp(`&${entityName};`,"g"),val}}else if($&&ni(f,h))h+=8;else if($&&ei(f,h))h+=8;else if($&&ai(f,h))h+=9;else if(xi)r=!0;else throw new Error("Invalid DOCTYPE");s++,E=""}else if(f[h]===">"){if(r){if(f[h-1]==="-"&&f[h-2]==="-")r=!1,s--}else s--;if(s===0)break}else if(f[h]==="[")$=!0;else E+=f[h];if(s!==0)throw new Error("Unclosed DOCTYPE")}else throw new Error("Invalid Tag instead of DOCTYPE");return{entities:w,i:h}}function gi(f,h){let w="";for(;h<f.length&&(f[h]!=="'"&&f[h]!=='"');h++)w+=f[h];if(w=w.trim(),w.indexOf(" ")!==-1)throw new Error("External entites are not supported");let s=f[h++],$="";for(;h<f.length&&f[h]!==s;h++)$+=f[h];return[w,$,h]}function xi(f,h){if(f[h+1]==="!"&&f[h+2]==="-"&&f[h+3]==="-")return!0;return!1}function _i(f,h){if(f[h+1]==="!"&&f[h+2]==="E"&&f[h+3]==="N"&&f[h+4]==="T"&&f[h+5]==="I"&&f[h+6]==="T"&&f[h+7]==="Y")return!0;return!1}function ni(f,h){if(f[h+1]==="!"&&f[h+2]==="E"&&f[h+3]==="L"&&f[h+4]==="E"&&f[h+5]==="M"&&f[h+6]==="E"&&f[h+7]==="N"&&f[h+8]==="T")return!0;return!1}function ei(f,h){if(f[h+1]==="!"&&f[h+2]==="A"&&f[h+3]==="T"&&f[h+4]==="T"&&f[h+5]==="L"&&f[h+6]==="I"&&f[h+7]==="S"&&f[h+8]==="T")return!0;return!1}function ai(f,h){if(f[h+1]==="!"&&f[h+2]==="N"&&f[h+3]==="O"&&f[h+4]==="T"&&f[h+5]==="A"&&f[h+6]==="T"&&f[h+7]==="I"&&f[h+8]==="O"&&f[h+9]==="N")return!0;return!1}function oi(f){if(ii.isName(f))return f;else throw new Error(`Invalid entity name ${f}`)}ZR.exports=ci});var PR=H((J20,VR)=>{var pi=/^[-+]?0x[a-fA-F0-9]+$/,ui=/^([\-\+])?(0*)([0-9]*(\.[0-9]*)?)$/,ti={hex:!0,leadingZeros:!0,decimalPoint:".",eNotation:!0};function fc(f,h={}){if(h=Object.assign({},ti,h),!f||typeof f!=="string")return f;let w=f.trim();if(h.skipLike!==void 0&&h.skipLike.test(w))return f;else if(f==="0")return 0;else if(h.hex&&pi.test(w))return wc(w,16);else if(w.search(/[eE]/)!==-1){let s=w.match(/^([-\+])?(0*)([0-9]*(\.[0-9]*)?[eE][-\+]?[0-9]+)$/);if(s){if(h.leadingZeros)w=(s[1]||"")+s[3];else if(s[2]==="0"&&s[3][0]===".");else return f;return h.eNotation?Number(w):f}else return f}else{let s=ui.exec(w);if(s){let $=s[1],r=s[2],E=hc(s[3]);if(!h.leadingZeros&&r.length>0&&$&&w[2]!==".")return f;else if(!h.leadingZeros&&r.length>0&&!$&&w[1]!==".")return f;else if(h.leadingZeros&&r===f)return 0;else{let U=Number(w),T=""+U;if(T.search(/[eE]/)!==-1)if(h.eNotation)return U;else return f;else if(w.indexOf(".")!==-1)if(T==="0"&&E==="")return U;else if(T===E)return U;else if($&&T==="-"+E)return U;else return f;if(r)return E===T||$+E===T?U:f;else return w===T||w===$+T?U:f}}else return f}}function hc(f){if(f&&f.indexOf(".")!==-1){if(f=f.replace(/0+$/,""),f===".")f="0";else if(f[0]===".")f="0"+f;else if(f[f.length-1]===".")f=f.substr(0,f.length-1);return f}return f}function wc(f,h){if(parseInt)return parseInt(f,h);else if(Number.parseInt)return Number.parseInt(f,h);else if(window&&window.parseInt)return window.parseInt(f,h);else throw new Error("parseInt, Number.parseInt, window.parseInt are not supported")}VR.exports=fc});var qR=H((V20,DR)=>{var HR=u4(),v$=KR(),sc=JR(),$c=PR();class NR{constructor(f){this.options=f,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:(h,w)=>String.fromCharCode(Number.parseInt(w,10))},num_hex:{regex:/&#x([0-9a-fA-F]{1,6});/g,val:(h,w)=>String.fromCharCode(Number.parseInt(w,16))}},this.addExternalEntities=rc,this.parseXml=Cc,this.parseTextData=Ec,this.resolveNameSpace=Uc,this.buildAttributesMap=Fc,this.isItStopNode=Ac,this.replaceEntitiesValue=Lc,this.readStopNodeData=Wc,this.saveTextToParentTag=Bc,this.addChild=Ic}}function rc(f){let h=Object.keys(f);for(let w=0;w<h.length;w++){let s=h[w];this.lastEntities[s]={regex:new RegExp("&"+s+";","g"),val:f[s]}}}function Ec(f,h,w,s,$,r,E){if(f!==void 0){if(this.options.trimValues&&!s)f=f.trim();if(f.length>0){if(!E)f=this.replaceEntitiesValue(f);let U=this.options.tagValueProcessor(h,f,w,$,r);if(U===null||U===void 0)return f;else if(typeof U!==typeof f||U!==f)return U;else if(this.options.trimValues)return t2(f,this.options.parseTagValue,this.options.numberParseOptions);else if(f.trim()===f)return t2(f,this.options.parseTagValue,this.options.numberParseOptions);else return f}}}function Uc(f){if(this.options.removeNSPrefix){let h=f.split(":"),w=f.charAt(0)==="/"?"/":"";if(h[0]==="xmlns")return"";if(h.length===2)f=w+h[1]}return f}var Tc=new RegExp(`([^\\s=]+)\\s*(=\\s*(['"])([\\s\\S]*?)\\3)?`,"gm");function Fc(f,h,w){if(!this.options.ignoreAttributes&&typeof f==="string"){let s=HR.getAllMatches(f,Tc),$=s.length,r={};for(let E=0;E<$;E++){let U=this.resolveNameSpace(s[E][1]),T=s[E][4],F=this.options.attributeNamePrefix+U;if(U.length){if(this.options.transformAttributeName)F=this.options.transformAttributeName(F);if(F==="__proto__")F="#__proto__";if(T!==void 0){if(this.options.trimValues)T=T.trim();T=this.replaceEntitiesValue(T);let C=this.options.attributeValueProcessor(U,T,h);if(C===null||C===void 0)r[F]=T;else if(typeof C!==typeof T||C!==T)r[F]=C;else r[F]=t2(T,this.options.parseAttributeValue,this.options.numberParseOptions)}else if(this.options.allowBooleanAttributes)r[F]=!0}}if(!Object.keys(r).length)return;if(this.options.attributesGroupName){let E={};return E[this.options.attributesGroupName]=r,E}return r}}var Cc=function(f){f=f.replace(/\r\n?/g,`
34
+ `);let h=new v$("!xml"),w=h,s="",$="";for(let r=0;r<f.length;r++)if(f[r]==="<")if(f[r+1]==="/"){let U=ph(f,">",r,"Closing Tag is not closed."),T=f.substring(r+2,U).trim();if(this.options.removeNSPrefix){let I=T.indexOf(":");if(I!==-1)T=T.substr(I+1)}if(this.options.transformTagName)T=this.options.transformTagName(T);if(w)s=this.saveTextToParentTag(s,w,$);let F=$.substring($.lastIndexOf(".")+1);if(T&&this.options.unpairedTags.indexOf(T)!==-1)throw new Error(`Unpaired tag can not be used as closing tag: </${T}>`);let C=0;if(F&&this.options.unpairedTags.indexOf(F)!==-1)C=$.lastIndexOf(".",$.lastIndexOf(".")-1),this.tagsNodeStack.pop();else C=$.lastIndexOf(".");$=$.substring(0,C),w=this.tagsNodeStack.pop(),s="",r=U}else if(f[r+1]==="?"){let U=u2(f,r,!1,"?>");if(!U)throw new Error("Pi Tag is not closed.");if(s=this.saveTextToParentTag(s,w,$),this.options.ignoreDeclaration&&U.tagName==="?xml"||this.options.ignorePiTags);else{let T=new v$(U.tagName);if(T.add(this.options.textNodeName,""),U.tagName!==U.tagExp&&U.attrExpPresent)T[":@"]=this.buildAttributesMap(U.tagExp,$,U.tagName);this.addChild(w,T,$)}r=U.closeIndex+1}else if(f.substr(r+1,3)==="!--"){let U=ph(f,"-->",r+4,"Comment is not closed.");if(this.options.commentPropName){let T=f.substring(r+4,U-2);s=this.saveTextToParentTag(s,w,$),w.add(this.options.commentPropName,[{[this.options.textNodeName]:T}])}r=U}else if(f.substr(r+1,2)==="!D"){let U=sc(f,r);this.docTypeEntities=U.entities,r=U.i}else if(f.substr(r+1,2)==="!["){let U=ph(f,"]]>",r,"CDATA is not closed.")-2,T=f.substring(r+9,U);s=this.saveTextToParentTag(s,w,$);let F=this.parseTextData(T,w.tagname,$,!0,!1,!0,!0);if(F==null)F="";if(this.options.cdataPropName)w.add(this.options.cdataPropName,[{[this.options.textNodeName]:T}]);else w.add(this.options.textNodeName,F);r=U+2}else{let U=u2(f,r,this.options.removeNSPrefix),T=U.tagName,F=U.rawTagName,C=U.tagExp,I=U.attrExpPresent,L=U.closeIndex;if(this.options.transformTagName)T=this.options.transformTagName(T);if(w&&s){if(w.tagname!=="!xml")s=this.saveTextToParentTag(s,w,$,!1)}let G=w;if(G&&this.options.unpairedTags.indexOf(G.tagname)!==-1)w=this.tagsNodeStack.pop(),$=$.substring(0,$.lastIndexOf("."));if(T!==h.tagname)$+=$?"."+T:T;if(this.isItStopNode(this.options.stopNodes,$,T)){let X="";if(C.length>0&&C.lastIndexOf("/")===C.length-1){if(T[T.length-1]==="/")T=T.substr(0,T.length-1),$=$.substr(0,$.length-1),C=T;else C=C.substr(0,C.length-1);r=U.closeIndex}else if(this.options.unpairedTags.indexOf(T)!==-1)r=U.closeIndex;else{let M=this.readStopNodeData(f,F,L+1);if(!M)throw new Error(`Unexpected end of ${F}`);r=M.i,X=M.tagContent}let Q=new v$(T);if(T!==C&&I)Q[":@"]=this.buildAttributesMap(C,$,T);if(X)X=this.parseTextData(X,T,$,!0,I,!0,!0);$=$.substr(0,$.lastIndexOf(".")),Q.add(this.options.textNodeName,X),this.addChild(w,Q,$)}else{if(C.length>0&&C.lastIndexOf("/")===C.length-1){if(T[T.length-1]==="/")T=T.substr(0,T.length-1),$=$.substr(0,$.length-1),C=T;else C=C.substr(0,C.length-1);if(this.options.transformTagName)T=this.options.transformTagName(T);let X=new v$(T);if(T!==C&&I)X[":@"]=this.buildAttributesMap(C,$,T);this.addChild(w,X,$),$=$.substr(0,$.lastIndexOf("."))}else{let X=new v$(T);if(this.tagsNodeStack.push(w),T!==C&&I)X[":@"]=this.buildAttributesMap(C,$,T);this.addChild(w,X,$),w=X}s="",r=L}}else s+=f[r];return h.child};function Ic(f,h,w){let s=this.options.updateTag(h.tagname,w,h[":@"]);if(s===!1);else if(typeof s==="string")h.tagname=s,f.addChild(h);else f.addChild(h)}var Lc=function(f){if(this.options.processEntities){for(let h in this.docTypeEntities){let w=this.docTypeEntities[h];f=f.replace(w.regx,w.val)}for(let h in this.lastEntities){let w=this.lastEntities[h];f=f.replace(w.regex,w.val)}if(this.options.htmlEntities)for(let h in this.htmlEntities){let w=this.htmlEntities[h];f=f.replace(w.regex,w.val)}f=f.replace(this.ampEntity.regex,this.ampEntity.val)}return f};function Bc(f,h,w,s){if(f){if(s===void 0)s=Object.keys(h.child).length===0;if(f=this.parseTextData(f,h.tagname,w,!1,h[":@"]?Object.keys(h[":@"]).length!==0:!1,s),f!==void 0&&f!=="")h.add(this.options.textNodeName,f);f=""}return f}function Ac(f,h,w){let s="*."+w;for(let $ in f){let r=f[$];if(s===r||h===r)return!0}return!1}function Gc(f,h,w=">"){let s,$="";for(let r=h;r<f.length;r++){let E=f[r];if(s){if(E===s)s=""}else if(E==='"'||E==="'")s=E;else if(E===w[0])if(w[1]){if(f[r+1]===w[1])return{data:$,index:r}}else return{data:$,index:r};else if(E==="\t")E=" ";$+=E}}function ph(f,h,w,s){let $=f.indexOf(h,w);if($===-1)throw new Error(s);else return $+h.length-1}function u2(f,h,w,s=">"){let $=Gc(f,h+1,s);if(!$)return;let{data:r,index:E}=$,U=r.search(/\s/),T=r,F=!0;if(U!==-1)T=r.substring(0,U),r=r.substring(U+1).trimStart();let C=T;if(w){let I=T.indexOf(":");if(I!==-1)T=T.substr(I+1),F=T!==$.data.substr(I+1)}return{tagName:T,tagExp:r,closeIndex:E,attrExpPresent:F,rawTagName:C}}function Wc(f,h,w){let s=w,$=1;for(;w<f.length;w++)if(f[w]==="<")if(f[w+1]==="/"){let r=ph(f,">",w,`${h} is not closed`);if(f.substring(w+2,r).trim()===h){if($--,$===0)return{tagContent:f.substring(s,w),i:r}}w=r}else if(f[w+1]==="?")w=ph(f,"?>",w+1,"StopNode is not closed.");else if(f.substr(w+1,3)==="!--")w=ph(f,"-->",w+3,"StopNode is not closed.");else if(f.substr(w+1,2)==="![")w=ph(f,"]]>",w,"StopNode is not closed.")-2;else{let r=u2(f,w,">");if(r){if((r&&r.tagName)===h&&r.tagExp[r.tagExp.length-1]!=="/")$++;w=r.closeIndex}}}function t2(f,h,w){if(h&&typeof f==="string"){let s=f.trim();if(s==="true")return!0;else if(s==="false")return!1;else return $c(f,w)}else if(HR.isExist(f))return f;else return""}DR.exports=NR});var yR=H((Yc)=>{function zc(f,h){return kR(f,h)}function kR(f,h,w){let s,$={};for(let r=0;r<f.length;r++){let E=f[r],U=Rc(E),T="";if(w===void 0)T=U;else T=w+"."+U;if(U===h.textNodeName)if(s===void 0)s=E[U];else s+=""+E[U];else if(U===void 0)continue;else if(E[U]){let F=kR(E[U],h,T),C=Sc(F,h);if(E[":@"])Xc(F,E[":@"],T,h);else if(Object.keys(F).length===1&&F[h.textNodeName]!==void 0&&!h.alwaysCreateTextNode)F=F[h.textNodeName];else if(Object.keys(F).length===0)if(h.alwaysCreateTextNode)F[h.textNodeName]="";else F="";if($[U]!==void 0&&$.hasOwnProperty(U)){if(!Array.isArray($[U]))$[U]=[$[U]];$[U].push(F)}else if(h.isArray(U,T,C))$[U]=[F];else $[U]=F}}if(typeof s==="string"){if(s.length>0)$[h.textNodeName]=s}else if(s!==void 0)$[h.textNodeName]=s;return $}function Rc(f){let h=Object.keys(f);for(let w=0;w<h.length;w++){let s=h[w];if(s!==":@")return s}}function Xc(f,h,w,s){if(h){let $=Object.keys(h),r=$.length;for(let E=0;E<r;E++){let U=$[E];if(s.isArray(U,w+"."+U,!0,!0))f[U]=[h[U]];else f[U]=h[U]}}}function Sc(f,h){let{textNodeName:w}=h,s=Object.keys(f).length;if(s===0)return!0;if(s===1&&(f[w]||typeof f[w]==="boolean"||f[w]===0))return!0;return!1}Yc.prettify=zc});var lR=H((H20,OR)=>{var{buildOptions:Qc}=YR(),Kc=qR(),{prettify:Zc}=yR(),Jc=p2();class jR{constructor(f){this.externalEntities={},this.options=Qc(f)}parse(f,h){if(typeof f==="string");else if(f.toString)f=f.toString();else throw new Error("XML data is accepted in String or Bytes[] form.");if(h){if(h===!0)h={};let $=Jc.validate(f,h);if($!==!0)throw Error(`${$.err.msg}:${$.err.line}:${$.err.col}`)}let w=new Kc(this.options);w.addExternalEntities(this.externalEntities);let s=w.parseXml(f);if(this.options.preserveOrder||s===void 0)return s;else return Zc(s,this.options)}addEntity(f,h){if(h.indexOf("&")!==-1)throw new Error("Entity value can't have '&'");else if(f.indexOf("&")!==-1||f.indexOf(";")!==-1)throw new Error("An entity must be set without '&' and ';'. Eg. use '#xD' for '&#xD;'");else if(h==="&")throw new Error("An entity with value '&' is not permitted");else this.externalEntities[f]=h}}OR.exports=jR});var iR=H((N20,dR)=>{function Vc(f,h){let w="";if(h.format&&h.indentBy.length>0)w=`
35
+ `;return bR(f,h,"",w)}function bR(f,h,w,s){let $="",r=!1;for(let E=0;E<f.length;E++){let U=f[E],T=Pc(U);if(T===void 0)continue;let F="";if(w.length===0)F=T;else F=`${w}.${T}`;if(T===h.textNodeName){let X=U[T];if(!Hc(F,h))X=h.tagValueProcessor(T,X),X=mR(X,h);if(r)$+=s;$+=X,r=!1;continue}else if(T===h.cdataPropName){if(r)$+=s;$+=`<![CDATA[${U[T][0][h.textNodeName]}]]>`,r=!1;continue}else if(T===h.commentPropName){$+=s+`<!--${U[T][0][h.textNodeName]}-->`,r=!0;continue}else if(T[0]==="?"){let X=vR(U[":@"],h),Q=T==="?xml"?"":s,M=U[T][0][h.textNodeName];M=M.length!==0?" "+M:"",$+=Q+`<${T}${M}${X}?>`,r=!0;continue}let C=s;if(C!=="")C+=h.indentBy;let I=vR(U[":@"],h),L=s+`<${T}${I}`,G=bR(U[T],h,F,C);if(h.unpairedTags.indexOf(T)!==-1)if(h.suppressUnpairedNode)$+=L+">";else $+=L+"/>";else if((!G||G.length===0)&&h.suppressEmptyNode)$+=L+"/>";else if(G&&G.endsWith(">"))$+=L+`>${G}${s}</${T}>`;else{if($+=L+">",G&&s!==""&&(G.includes("/>")||G.includes("</")))$+=s+h.indentBy+G+s;else $+=G;$+=`</${T}>`}r=!0}return $}function Pc(f){let h=Object.keys(f);for(let w=0;w<h.length;w++){let s=h[w];if(!f.hasOwnProperty(s))continue;if(s!==":@")return s}}function vR(f,h){let w="";if(f&&!h.ignoreAttributes)for(let s in f){if(!f.hasOwnProperty(s))continue;let $=h.attributeValueProcessor(s,f[s]);if($=mR($,h),$===!0&&h.suppressBooleanAttributes)w+=` ${s.substr(h.attributeNamePrefix.length)}`;else w+=` ${s.substr(h.attributeNamePrefix.length)}="${$}"`}return w}function Hc(f,h){f=f.substr(0,f.length-h.textNodeName.length-1);let w=f.substr(f.lastIndexOf(".")+1);for(let s in h.stopNodes)if(h.stopNodes[s]===f||h.stopNodes[s]==="*."+w)return!0;return!1}function mR(f,h){if(f&&f.length>0&&h.processEntities)for(let w=0;w<h.entities.length;w++){let s=h.entities[w];f=f.replace(s.regex,s.val)}return f}dR.exports=Vc});var gR=H((D20,cR)=>{var Nc=iR(),Dc={attributeNamePrefix:"@_",attributesGroupName:!1,textNodeName:"#text",ignoreAttributes:!0,cdataPropName:!1,format:!1,indentBy:" ",suppressEmptyNode:!1,suppressUnpairedNode:!0,suppressBooleanAttributes:!0,tagValueProcessor:function(f,h){return h},attributeValueProcessor:function(f,h){return h},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};function zh(f){if(this.options=Object.assign({},Dc,f),this.options.ignoreAttributes||this.options.attributesGroupName)this.isAttribute=function(){return!1};else this.attrPrefixLen=this.options.attributeNamePrefix.length,this.isAttribute=yc;if(this.processTextOrObjNode=qc,this.options.format)this.indentate=kc,this.tagEndChar=`>
36
36
  `,this.newLine=`
37
- `;else this.indentate=function(){return""},this.tagEndChar=">",this.newLine=""}zh.prototype.build=function(f){if(this.options.preserveOrder)return Pc(f,this.options);else{if(Array.isArray(f)&&this.options.arrayNodeName&&this.options.arrayNodeName.length>1)f={[this.options.arrayNodeName]:f};return this.j2x(f,0).val}};zh.prototype.j2x=function(f,h){let w="",s="";for(let $ in f){if(!Object.prototype.hasOwnProperty.call(f,$))continue;if(typeof f[$]==="undefined"){if(this.isAttribute($))s+=""}else if(f[$]===null)if(this.isAttribute($))s+="";else if($[0]==="?")s+=this.indentate(h)+"<"+$+"?"+this.tagEndChar;else s+=this.indentate(h)+"<"+$+"/"+this.tagEndChar;else if(f[$]instanceof Date)s+=this.buildTextValNode(f[$],$,"",h);else if(typeof f[$]!=="object"){let r=this.isAttribute($);if(r)w+=this.buildAttrPairStr(r,""+f[$]);else if($===this.options.textNodeName){let E=this.options.tagValueProcessor($,""+f[$]);s+=this.replaceEntitiesValue(E)}else s+=this.buildTextValNode(f[$],$,"",h)}else if(Array.isArray(f[$])){let r=f[$].length,E="",U="";for(let T=0;T<r;T++){let F=f[$][T];if(typeof F==="undefined");else if(F===null)if($[0]==="?")s+=this.indentate(h)+"<"+$+"?"+this.tagEndChar;else s+=this.indentate(h)+"<"+$+"/"+this.tagEndChar;else if(typeof F==="object")if(this.options.oneListGroup){let C=this.j2x(F,h+1);if(E+=C.val,this.options.attributesGroupName&&F.hasOwnProperty(this.options.attributesGroupName))U+=C.attrStr}else E+=this.processTextOrObjNode(F,$,h);else if(this.options.oneListGroup){let C=this.options.tagValueProcessor($,F);C=this.replaceEntitiesValue(C),E+=C}else E+=this.buildTextValNode(F,$,"",h)}if(this.options.oneListGroup)E=this.buildObjectNode(E,$,U,h);s+=E}else if(this.options.attributesGroupName&&$===this.options.attributesGroupName){let r=Object.keys(f[$]),E=r.length;for(let U=0;U<E;U++)w+=this.buildAttrPairStr(r[U],""+f[$][r[U]])}else s+=this.processTextOrObjNode(f[$],$,h)}return{attrStr:w,val:s}};zh.prototype.buildAttrPairStr=function(f,h){if(h=this.options.attributeValueProcessor(f,""+h),h=this.replaceEntitiesValue(h),this.options.suppressBooleanAttributes&&h==="true")return" "+f;else return" "+f+'="'+h+'"'};function Nc(f,h,w){let s=this.j2x(f,w+1);if(f[this.options.textNodeName]!==void 0&&Object.keys(f).length===1)return this.buildTextValNode(f[this.options.textNodeName],h,s.attrStr,w);else return this.buildObjectNode(s.val,h,s.attrStr,w)}zh.prototype.buildObjectNode=function(f,h,w,s){if(f==="")if(h[0]==="?")return this.indentate(s)+"<"+h+w+"?"+this.tagEndChar;else return this.indentate(s)+"<"+h+w+this.closeTag(h)+this.tagEndChar;else{let $="</"+h+this.tagEndChar,r="";if(h[0]==="?")r="?",$="";if((w||w==="")&&f.indexOf("<")===-1)return this.indentate(s)+"<"+h+w+r+">"+f+$;else if(this.options.commentPropName!==!1&&h===this.options.commentPropName&&r.length===0)return this.indentate(s)+`<!--${f}-->`+this.newLine;else return this.indentate(s)+"<"+h+w+r+this.tagEndChar+f+this.indentate(s)+$}};zh.prototype.closeTag=function(f){let h="";if(this.options.unpairedTags.indexOf(f)!==-1){if(!this.options.suppressUnpairedNode)h="/"}else if(this.options.suppressEmptyNode)h="/";else h=`></${f}`;return h};zh.prototype.buildTextValNode=function(f,h,w,s){if(this.options.cdataPropName!==!1&&h===this.options.cdataPropName)return this.indentate(s)+`<![CDATA[${f}]]>`+this.newLine;else if(this.options.commentPropName!==!1&&h===this.options.commentPropName)return this.indentate(s)+`<!--${f}-->`+this.newLine;else if(h[0]==="?")return this.indentate(s)+"<"+h+w+"?"+this.tagEndChar;else{let $=this.options.tagValueProcessor(h,f);if($=this.replaceEntitiesValue($),$==="")return this.indentate(s)+"<"+h+w+this.closeTag(h)+this.tagEndChar;else return this.indentate(s)+"<"+h+w+">"+$+"</"+h+this.tagEndChar}};zh.prototype.replaceEntitiesValue=function(f){if(f&&f.length>0&&this.options.processEntities)for(let h=0;h<this.options.entities.length;h++){let w=this.options.entities[h];f=f.replace(w.regex,w.val)}return f};function Dc(f){return this.options.indentBy.repeat(f)}function qc(f){if(f.startsWith(this.options.attributeNamePrefix)&&f!==this.options.textNodeName)return f.substr(this.attrPrefixLen);else return!1}cR.exports=zh});var _R=H((H20,xR)=>{var kc=p2(),yc=lR(),jc=gR();xR.exports={XMLParser:yc,XMLValidator:kc,XMLBuilder:jc}});var uR=H((N20,pR)=>{var{defineProperty:t4,getOwnPropertyDescriptor:Oc,getOwnPropertyNames:lc}=Object,vc=Object.prototype.hasOwnProperty,K1=(f,h)=>t4(f,"name",{value:h,configurable:!0}),bc=(f,h)=>{for(var w in h)t4(f,w,{get:h[w],enumerable:!0})},mc=(f,h,w,s)=>{if(h&&typeof h==="object"||typeof h==="function"){for(let $ of lc(h))if(!vc.call(f,$)&&$!==w)t4(f,$,{get:()=>h[$],enumerable:!(s=Oc(h,$))||s.enumerable})}return f},dc=(f)=>mc(t4({},"__esModule",{value:!0}),f),nR={};bc(nR,{_toBool:()=>cc,_toNum:()=>gc,_toStr:()=>ic,awsExpectUnion:()=>_c,loadRestJsonErrorCode:()=>ac,loadRestXmlErrorCode:()=>tc,parseJsonBody:()=>aR,parseJsonErrorBody:()=>ec,parseXmlBody:()=>oR,parseXmlErrorBody:()=>uc});pR.exports=dc(nR);var ic=K1((f)=>{if(f==null)return f;if(typeof f==="number"||typeof f==="bigint"){let h=new Error(`Received number ${f} where a string was expected.`);return h.name="Warning",console.warn(h),String(f)}if(typeof f==="boolean"){let h=new Error(`Received boolean ${f} where a string was expected.`);return h.name="Warning",console.warn(h),String(f)}return f},"_toStr"),cc=K1((f)=>{if(f==null)return f;if(typeof f==="string"){let h=f.toLowerCase();if(f!==""&&h!=="false"&&h!=="true"){let w=new Error(`Received string "${f}" where a boolean was expected.`);w.name="Warning",console.warn(w)}return f!==""&&h!=="false"}return f},"_toBool"),gc=K1((f)=>{if(f==null)return f;if(typeof f==="string"){let h=Number(f);if(h.toString()!==f){let w=new Error(`Received string "${f}" where a number was expected.`);return w.name="Warning",console.warn(w),f}return h}return f},"_toNum"),xc=J0(),_c=K1((f)=>{if(f==null)return;if(typeof f==="object"&&"__type"in f)delete f.__type;return xc.expectUnion(f)},"awsExpectUnion"),nc=J0(),eR=K1((f,h)=>nc.collectBody(f,h).then((w)=>h.utf8Encoder(w)),"collectBodyString"),aR=K1((f,h)=>eR(f,h).then((w)=>{if(w.length)try{return JSON.parse(w)}catch(s){if(s?.name==="SyntaxError")Object.defineProperty(s,"$responseBodyText",{value:w});throw s}return{}}),"parseJsonBody"),ec=K1(async(f,h)=>{let w=await aR(f,h);return w.message=w.message??w.Message,w},"parseJsonErrorBody"),ac=K1((f,h)=>{let w=K1((r,E)=>Object.keys(r).find((U)=>U.toLowerCase()===E.toLowerCase()),"findKey"),s=K1((r)=>{let E=r;if(typeof E==="number")E=E.toString();if(E.indexOf(",")>=0)E=E.split(",")[0];if(E.indexOf(":")>=0)E=E.split(":")[0];if(E.indexOf("#")>=0)E=E.split("#")[1];return E},"sanitizeErrorCode"),$=w(f.headers,"x-amzn-errortype");if($!==void 0)return s(f.headers[$]);if(h.code!==void 0)return s(h.code);if(h.__type!==void 0)return s(h.__type)},"loadRestJsonErrorCode"),oc=J0(),pc=_R(),oR=K1((f,h)=>eR(f,h).then((w)=>{if(w.length){let s=new pc.XMLParser({attributeNamePrefix:"",htmlEntities:!0,ignoreAttributes:!1,ignoreDeclaration:!0,parseTagValue:!1,trimValues:!1,tagValueProcessor:(T,F)=>F.trim()===""&&F.includes(`
37
+ `;else this.indentate=function(){return""},this.tagEndChar=">",this.newLine=""}zh.prototype.build=function(f){if(this.options.preserveOrder)return Nc(f,this.options);else{if(Array.isArray(f)&&this.options.arrayNodeName&&this.options.arrayNodeName.length>1)f={[this.options.arrayNodeName]:f};return this.j2x(f,0).val}};zh.prototype.j2x=function(f,h){let w="",s="";for(let $ in f){if(!Object.prototype.hasOwnProperty.call(f,$))continue;if(typeof f[$]==="undefined"){if(this.isAttribute($))s+=""}else if(f[$]===null)if(this.isAttribute($))s+="";else if($[0]==="?")s+=this.indentate(h)+"<"+$+"?"+this.tagEndChar;else s+=this.indentate(h)+"<"+$+"/"+this.tagEndChar;else if(f[$]instanceof Date)s+=this.buildTextValNode(f[$],$,"",h);else if(typeof f[$]!=="object"){let r=this.isAttribute($);if(r)w+=this.buildAttrPairStr(r,""+f[$]);else if($===this.options.textNodeName){let E=this.options.tagValueProcessor($,""+f[$]);s+=this.replaceEntitiesValue(E)}else s+=this.buildTextValNode(f[$],$,"",h)}else if(Array.isArray(f[$])){let r=f[$].length,E="",U="";for(let T=0;T<r;T++){let F=f[$][T];if(typeof F==="undefined");else if(F===null)if($[0]==="?")s+=this.indentate(h)+"<"+$+"?"+this.tagEndChar;else s+=this.indentate(h)+"<"+$+"/"+this.tagEndChar;else if(typeof F==="object")if(this.options.oneListGroup){let C=this.j2x(F,h+1);if(E+=C.val,this.options.attributesGroupName&&F.hasOwnProperty(this.options.attributesGroupName))U+=C.attrStr}else E+=this.processTextOrObjNode(F,$,h);else if(this.options.oneListGroup){let C=this.options.tagValueProcessor($,F);C=this.replaceEntitiesValue(C),E+=C}else E+=this.buildTextValNode(F,$,"",h)}if(this.options.oneListGroup)E=this.buildObjectNode(E,$,U,h);s+=E}else if(this.options.attributesGroupName&&$===this.options.attributesGroupName){let r=Object.keys(f[$]),E=r.length;for(let U=0;U<E;U++)w+=this.buildAttrPairStr(r[U],""+f[$][r[U]])}else s+=this.processTextOrObjNode(f[$],$,h)}return{attrStr:w,val:s}};zh.prototype.buildAttrPairStr=function(f,h){if(h=this.options.attributeValueProcessor(f,""+h),h=this.replaceEntitiesValue(h),this.options.suppressBooleanAttributes&&h==="true")return" "+f;else return" "+f+'="'+h+'"'};function qc(f,h,w){let s=this.j2x(f,w+1);if(f[this.options.textNodeName]!==void 0&&Object.keys(f).length===1)return this.buildTextValNode(f[this.options.textNodeName],h,s.attrStr,w);else return this.buildObjectNode(s.val,h,s.attrStr,w)}zh.prototype.buildObjectNode=function(f,h,w,s){if(f==="")if(h[0]==="?")return this.indentate(s)+"<"+h+w+"?"+this.tagEndChar;else return this.indentate(s)+"<"+h+w+this.closeTag(h)+this.tagEndChar;else{let $="</"+h+this.tagEndChar,r="";if(h[0]==="?")r="?",$="";if((w||w==="")&&f.indexOf("<")===-1)return this.indentate(s)+"<"+h+w+r+">"+f+$;else if(this.options.commentPropName!==!1&&h===this.options.commentPropName&&r.length===0)return this.indentate(s)+`<!--${f}-->`+this.newLine;else return this.indentate(s)+"<"+h+w+r+this.tagEndChar+f+this.indentate(s)+$}};zh.prototype.closeTag=function(f){let h="";if(this.options.unpairedTags.indexOf(f)!==-1){if(!this.options.suppressUnpairedNode)h="/"}else if(this.options.suppressEmptyNode)h="/";else h=`></${f}`;return h};zh.prototype.buildTextValNode=function(f,h,w,s){if(this.options.cdataPropName!==!1&&h===this.options.cdataPropName)return this.indentate(s)+`<![CDATA[${f}]]>`+this.newLine;else if(this.options.commentPropName!==!1&&h===this.options.commentPropName)return this.indentate(s)+`<!--${f}-->`+this.newLine;else if(h[0]==="?")return this.indentate(s)+"<"+h+w+"?"+this.tagEndChar;else{let $=this.options.tagValueProcessor(h,f);if($=this.replaceEntitiesValue($),$==="")return this.indentate(s)+"<"+h+w+this.closeTag(h)+this.tagEndChar;else return this.indentate(s)+"<"+h+w+">"+$+"</"+h+this.tagEndChar}};zh.prototype.replaceEntitiesValue=function(f){if(f&&f.length>0&&this.options.processEntities)for(let h=0;h<this.options.entities.length;h++){let w=this.options.entities[h];f=f.replace(w.regex,w.val)}return f};function kc(f){return this.options.indentBy.repeat(f)}function yc(f){if(f.startsWith(this.options.attributeNamePrefix)&&f!==this.options.textNodeName)return f.substr(this.attrPrefixLen);else return!1}cR.exports=zh});var _R=H((q20,xR)=>{var jc=p2(),Oc=lR(),lc=gR();xR.exports={XMLParser:Oc,XMLValidator:jc,XMLBuilder:lc}});var uR=H((k20,pR)=>{var{defineProperty:t4,getOwnPropertyDescriptor:vc,getOwnPropertyNames:bc}=Object,mc=Object.prototype.hasOwnProperty,K1=(f,h)=>t4(f,"name",{value:h,configurable:!0}),dc=(f,h)=>{for(var w in h)t4(f,w,{get:h[w],enumerable:!0})},ic=(f,h,w,s)=>{if(h&&typeof h==="object"||typeof h==="function"){for(let $ of bc(h))if(!mc.call(f,$)&&$!==w)t4(f,$,{get:()=>h[$],enumerable:!(s=vc(h,$))||s.enumerable})}return f},cc=(f)=>ic(t4({},"__esModule",{value:!0}),f),nR={};dc(nR,{_toBool:()=>xc,_toNum:()=>_c,_toStr:()=>gc,awsExpectUnion:()=>ec,loadRestJsonErrorCode:()=>pc,loadRestXmlErrorCode:()=>hg,parseJsonBody:()=>aR,parseJsonErrorBody:()=>oc,parseXmlBody:()=>oR,parseXmlErrorBody:()=>fg});pR.exports=cc(nR);var gc=K1((f)=>{if(f==null)return f;if(typeof f==="number"||typeof f==="bigint"){let h=new Error(`Received number ${f} where a string was expected.`);return h.name="Warning",console.warn(h),String(f)}if(typeof f==="boolean"){let h=new Error(`Received boolean ${f} where a string was expected.`);return h.name="Warning",console.warn(h),String(f)}return f},"_toStr"),xc=K1((f)=>{if(f==null)return f;if(typeof f==="string"){let h=f.toLowerCase();if(f!==""&&h!=="false"&&h!=="true"){let w=new Error(`Received string "${f}" where a boolean was expected.`);w.name="Warning",console.warn(w)}return f!==""&&h!=="false"}return f},"_toBool"),_c=K1((f)=>{if(f==null)return f;if(typeof f==="string"){let h=Number(f);if(h.toString()!==f){let w=new Error(`Received string "${f}" where a number was expected.`);return w.name="Warning",console.warn(w),f}return h}return f},"_toNum"),nc=J0(),ec=K1((f)=>{if(f==null)return;if(typeof f==="object"&&"__type"in f)delete f.__type;return nc.expectUnion(f)},"awsExpectUnion"),ac=J0(),eR=K1((f,h)=>ac.collectBody(f,h).then((w)=>h.utf8Encoder(w)),"collectBodyString"),aR=K1((f,h)=>eR(f,h).then((w)=>{if(w.length)try{return JSON.parse(w)}catch(s){if(s?.name==="SyntaxError")Object.defineProperty(s,"$responseBodyText",{value:w});throw s}return{}}),"parseJsonBody"),oc=K1(async(f,h)=>{let w=await aR(f,h);return w.message=w.message??w.Message,w},"parseJsonErrorBody"),pc=K1((f,h)=>{let w=K1((r,E)=>Object.keys(r).find((U)=>U.toLowerCase()===E.toLowerCase()),"findKey"),s=K1((r)=>{let E=r;if(typeof E==="number")E=E.toString();if(E.indexOf(",")>=0)E=E.split(",")[0];if(E.indexOf(":")>=0)E=E.split(":")[0];if(E.indexOf("#")>=0)E=E.split("#")[1];return E},"sanitizeErrorCode"),$=w(f.headers,"x-amzn-errortype");if($!==void 0)return s(f.headers[$]);if(h.code!==void 0)return s(h.code);if(h.__type!==void 0)return s(h.__type)},"loadRestJsonErrorCode"),uc=J0(),tc=_R(),oR=K1((f,h)=>eR(f,h).then((w)=>{if(w.length){let s=new tc.XMLParser({attributeNamePrefix:"",htmlEntities:!0,ignoreAttributes:!1,ignoreDeclaration:!0,parseTagValue:!1,trimValues:!1,tagValueProcessor:(T,F)=>F.trim()===""&&F.includes(`
38
38
  `)?"":void 0});s.addEntity("#xD","\r"),s.addEntity("#10",`
39
- `);let $;try{$=s.parse(w,!0)}catch(T){if(T&&typeof T==="object")Object.defineProperty(T,"$responseBodyText",{value:w});throw T}let r="#text",E=Object.keys($)[0],U=$[E];if(U[r])U[E]=U[r],delete U[r];return oc.getValueFromTextNode(U)}return{}}),"parseXmlBody"),uc=K1(async(f,h)=>{let w=await oR(f,h);if(w.Error)w.Error.message=w.Error.message??w.Error.Message;return w},"parseXmlErrorBody"),tc=K1((f,h)=>{if(h?.Error?.Code!==void 0)return h.Error.Code;if(h?.Code!==void 0)return h.Code;if(f.statusCode==404)return"NotFound"},"loadRestXmlErrorCode")});var O0=H((b$)=>{Object.defineProperty(b$,"__esModule",{value:!0});var f3=l4();f3.__exportStar(C1(),b$);f3.__exportStar(gz(),b$);f3.__exportStar(uR(),b$)});async function tR(f,h,w){if(w.request?.headers?.["smithy-protocol"]==="rpc-v2-cbor")ff.setFeature(f,"PROTOCOL_RPC_V2_CBOR","M");if(typeof h.retryStrategy==="function"){let r=await h.retryStrategy();if(typeof r.acquireInitialRetryToken==="function")if(r.constructor?.name?.includes("Adaptive"))ff.setFeature(f,"RETRY_MODE_ADAPTIVE","F");else ff.setFeature(f,"RETRY_MODE_STANDARD","E");else ff.setFeature(f,"RETRY_MODE_LEGACY","D")}if(typeof h.accountIdEndpointMode==="function"){let r=f.endpointV2;if(String(r?.url?.hostname).match(fg))ff.setFeature(f,"ACCOUNT_ID_ENDPOINT","O");switch(await h.accountIdEndpointMode?.()){case"disabled":ff.setFeature(f,"ACCOUNT_ID_MODE_DISABLED","Q");break;case"preferred":ff.setFeature(f,"ACCOUNT_ID_MODE_PREFERRED","P");break;case"required":ff.setFeature(f,"ACCOUNT_ID_MODE_REQUIRED","R");break}}let $=f.__smithy_context?.selectedHttpAuthScheme?.identity;if($?.$source){let r=$;if(r.accountId)ff.setFeature(f,"RESOLVED_ACCOUNT_ID","T");for(let[E,U]of Object.entries(r.$source??{}))ff.setFeature(f,E,U)}}var ff,fg;var f7=B(()=>{ff=p(O0(),1),fg=/\d{12}\.ddb/});var h3="user-agent",fE="x-amz-user-agent",w3=" ",hE="/",h7,w7,s3="-";var s7=B(()=>{h7=/[^\!\$\%\&\'\*\+\-\.\^\_\`\|\~\d\w]/g,w7=/[^\!\$\%\&\'\*\+\-\.\^\_\`\|\~\d\w\#]/g});function $7(f){let h="";for(let w in f){let s=f[w];if(h.length+s.length+1<=1024){if(h.length)h+=","+s;else h+=s;continue}break}return h}var hg=(f)=>(h,w)=>async(s)=>{let{request:$}=s;if(!n0.isInstance($))return h(s);let{headers:r}=$,E=w?.userAgent?.map(wE)||[],U=(await f.defaultUserAgentProvider()).map(wE);await tR(w,f,s);let T=w;U.push(`m/${$7(Object.assign({},w.__smithy_context?.features,T.__aws_sdk_context?.features))}`);let F=f?.customUserAgent?.map(wE)||[],C=await f.userAgentAppId();if(C)U.push(wE([`app/${C}`]));let I=NW(),L=(I?[I]:[]).concat([...U,...E,...F]).join(w3),G=[...U.filter((X)=>X.startsWith("aws-sdk-")),...F].join(w3);if(f.runtime!=="browser"){if(G)r[fE]=r[fE]?`${r[h3]} ${G}`:G;r[h3]=L}else r[fE]=L;return h({...s,request:$})},wE=(f)=>{let h=f[0].split(hE).map((E)=>E.replace(h7,s3)).join(hE),w=f[1]?.replace(w7,s3),s=h.indexOf(hE),$=h.substring(0,s),r=h.substring(s+1);if($==="api")r=r.toLowerCase();return[$,r,w].filter((E)=>E&&E.length>0).reduce((E,U,T)=>{switch(T){case 0:return U;case 1:return`${E}/${U}`;default:return`${E}#${U}`}},"")},wg,iw=(f)=>({applyToStack:(h)=>{h.add(hg(f),wg)}});var r7=B(()=>{N$();F1();f7();s7();wg={name:"getUserAgentMiddleware",step:"build",priority:"low",tags:["SET_USER_AGENT","USER_AGENT"],override:!0}});var m$=B(()=>{iG();r7()});var cw=(f,h,w)=>{if(!(h in f))return;if(f[h]==="true")return!0;if(f[h]==="false")return!1;throw new Error(`Cannot load ${w} "${h}". Expected "true" or "false", got ${f[h]}.`)};var Rh;var E7=B(()=>{(function(f){f.ENV="env",f.CONFIG="shared config entry"})(Rh||(Rh={}))});var $3=B(()=>{E7()});var sg="AWS_USE_DUALSTACK_ENDPOINT",$g="use_dualstack_endpoint",gw;var U7=B(()=>{$3();gw={environmentVariableSelector:(f)=>cw(f,sg,Rh.ENV),configFileSelector:(f)=>cw(f,$g,Rh.CONFIG),default:!1}});var rg="AWS_USE_FIPS_ENDPOINT",Eg="use_fips_endpoint",xw;var T7=B(()=>{$3();xw={environmentVariableSelector:(f)=>cw(f,rg,Rh.ENV),configFileSelector:(f)=>cw(f,Eg,Rh.CONFIG),default:!1}});var r3,Xh=(f)=>f[r3.SMITHY_CONTEXT_KEY]||(f[r3.SMITHY_CONTEXT_KEY]={});var F7=B(()=>{r3=p(T1(),1)});var L1=(f)=>{if(typeof f==="function")return f;let h=Promise.resolve(f);return()=>h};var cf=B(()=>{F7()});var C7=B(()=>{cf()});var I7=B(()=>{cf()});var L7=B(()=>{U7();T7();C7();I7()});var Sh,_w;var B7=B(()=>{Sh={environmentVariableSelector:(f)=>f.AWS_REGION,configFileSelector:(f)=>f.region,default:()=>{throw new Error("Region is missing")}},_w={preferredFile:"credentials"}});var sE=(f)=>typeof f==="string"&&(f.startsWith("fips-")||f.endsWith("-fips"));var E3=(f)=>sE(f)?["fips-aws-global","aws-fips"].includes(f)?"us-east-1":f.replace(/fips-(dkr-|prod-)?|-fips/,""):f;var A7=()=>{};var nw=(f)=>{let{region:h,useFipsEndpoint:w}=f;if(!h)throw new Error("Region is missing");return{...f,region:async()=>{if(typeof h==="string")return E3(h);let s=await h();return E3(s)},useFipsEndpoint:async()=>{let s=typeof h==="string"?h:await h();if(sE(s))return!0;return typeof w!=="function"?Promise.resolve(!!w):w()}}};var G7=B(()=>{A7()});var W7=B(()=>{B7();G7()});var z7=()=>{};var R7=()=>{};var X7=()=>{};var S7=B(()=>{z7();R7();X7()});var Yh=B(()=>{L7();W7();S7()});function Ug(f){return(h)=>async(w)=>{let s=w.request;if(n0.isInstance(s)){let{body:$,headers:r}=s;if($&&Object.keys(r).map((E)=>E.toLowerCase()).indexOf(Y7)===-1)try{let E=f($);s.headers={...s.headers,[Y7]:String(E)}}catch(E){}}return h({...w,request:s})}}var Y7="content-length",Tg,ew=(f)=>({applyToStack:(h)=>{h.add(Ug(f.bodyLengthChecker),Tg)}});var $E=B(()=>{F1();Tg={step:"build",tags:["SET_CONTENT_LENGTH","CONTENT_LENGTH"],name:"contentLengthMiddleware",override:!0}});var M7=async(f)=>{let h=f?.Bucket||"";if(typeof f.Bucket==="string")f.Bucket=h.replace(/#/g,encodeURIComponent("#")).replace(/\?/g,encodeURIComponent("?"));if(Bg(h)){if(f.ForcePathStyle===!0)throw new Error("Path-style addressing cannot be used with ARN buckets")}else if(!Lg(h)||h.indexOf(".")!==-1&&!String(f.Endpoint).startsWith("http:")||h.toLowerCase()!==h||h.length<3)f.ForcePathStyle=!0;if(f.DisableMultiRegionAccessPoints)f.disableMultiRegionAccessPoints=!0,f.DisableMRAP=!0;return f},Fg,Cg,Ig,Lg=(f)=>Fg.test(f)&&!Cg.test(f)&&!Ig.test(f),Bg=(f)=>{let[h,w,s,,,$]=f.split(":"),r=h==="arn"&&f.split(":").length>=6,E=Boolean(r&&w&&s&&$);if(r&&!E)throw new Error(`Invalid ARN: ${f} was an invalid ARN.`);return E};var Q7=B(()=>{Fg=/^[a-z0-9][a-z0-9\.\-]{1,61}[a-z0-9]$/,Cg=/(\d+\.){3}\d+/,Ig=/\.\./});var K7=B(()=>{Q7()});var Z7=(f,h,w)=>{let s=async()=>{let $=w[f]??w[h];if(typeof $==="function")return $();return $};if(f==="credentialScope"||h==="CredentialScope")return async()=>{let $=typeof w.credentials==="function"?await w.credentials():w.credentials;return $?.credentialScope??$?.CredentialScope};if(f==="accountId"||h==="AccountId")return async()=>{let $=typeof w.credentials==="function"?await w.credentials():w.credentials;return $?.accountId??$?.AccountId};if(f==="endpoint"||h==="endpoint")return async()=>{let $=await s();if($&&typeof $==="object"){if("url"in $)return $.url.href;if("hostname"in $){let{protocol:r,hostname:E,port:U,path:T}=$;return`${r}//${E}${U?":"+U:""}${T}`}}return $};return s};var k1;var d$=B(()=>{k1=class k1 extends Error{constructor(f,h=!0){let w,s=!0;if(typeof h==="boolean")w=void 0,s=h;else if(h!=null&&typeof h==="object")w=h.logger,s=h.tryNextLink??!0;super(f);this.name="ProviderError",this.tryNextLink=s,Object.setPrototypeOf(this,k1.prototype),w?.debug?.(`@smithy/property-provider ${s?"->":"(!)"} ${f}`)}static from(f,h=!0){return Object.assign(new this(f.message,h),f)}}});var a;var J7=B(()=>{d$();a=class a extends k1{constructor(f,h=!0){super(f,h);this.name="CredentialsProviderError",Object.setPrototypeOf(this,a.prototype)}}});var X1;var V7=B(()=>{d$();X1=class X1 extends k1{constructor(f,h=!0){super(f,h);this.name="TokenProviderError",Object.setPrototypeOf(this,X1.prototype)}}});var gf=(...f)=>async()=>{if(f.length===0)throw new k1("No providers in chain");let h;for(let w of f)try{return await w()}catch(s){if(h=s,s?.tryNextLink)continue;throw s}throw h};var P7=B(()=>{d$()});var H7=(f)=>()=>Promise.resolve(f);var uh=(f,h,w)=>{let s,$,r,E=!1,U=async()=>{if(!$)$=f();try{s=await $,r=!0,E=!1}finally{$=void 0}return s};if(h===void 0)return async(T)=>{if(!r||T?.forceRefresh)s=await U();return s};return async(T)=>{if(!r||T?.forceRefresh)s=await U();if(E)return s;if(w&&!w(s))return E=!0,s;if(h(s))return await U(),s;return s}};var Y0=B(()=>{J7();d$();V7();P7()});function rE(f){try{let h=new Set(Array.from(f.match(/([A-Z_]){3,}/g)??[]));return h.delete("CONFIG"),h.delete("CONFIG_PREFIX_SEPARATOR"),h.delete("ENV"),[...h].join(", ")}catch(h){return f}}var N7=(f,h)=>async()=>{try{let w=f(process.env);if(w===void 0)throw new Error;return w}catch(w){throw new a(w.message||`Not found in ENV: ${rE(f.toString())}`,{logger:h})}};var D7=B(()=>{Y0()});import{homedir as Ag}from"os";import{sep as Gg}from"path";var U3,Wg=()=>{if(process&&process.geteuid)return`${process.geteuid()}`;return"DEFAULT"},Mh=()=>{let{HOME:f,USERPROFILE:h,HOMEPATH:w,HOMEDRIVE:s=`C:${Gg}`}=process.env;if(f)return f;if(h)return h;if(w)return`${s}${w}`;let $=Wg();if(!U3[$])U3[$]=Ag();return U3[$]};var aw=B(()=>{U3={}});var q7="AWS_PROFILE",y1=(f)=>f.profile||process.env.AWS_PROFILE||"default";import{createHash as zg}from"crypto";import{join as Rg}from"path";var EE=(f)=>{let w=zg("sha1").update(f).digest("hex");return Rg(Mh(),".aws","sso","cache",`${w}.json`)};var T3=B(()=>{aw()});import{promises as Xg}from"fs";var Sg,UE=async(f)=>{let h=EE(f),w=await Sg(h,"utf8");return JSON.parse(w)};var k7=B(()=>{T3();({readFile:Sg}=Xg)});var F3,y7=(f)=>Object.entries(f).filter(([h])=>{let w=h.indexOf(j1);if(w===-1)return!1;return Object.values(F3.IniSectionType).includes(h.substring(0,w))}).reduce((h,[w,s])=>{let $=w.indexOf(j1),r=w.substring(0,$)===F3.IniSectionType.PROFILE?w.substring($+1):w;return h[r]=s,h},{...f.default&&{default:f.default}});var j7=B(()=>{F3=p(T1(),1);ow()});import{join as Yg}from"path";var Mg="AWS_CONFIG_FILE",TE=()=>process.env[Mg]||Yg(Mh(),".aws","config");var C3=B(()=>{aw()});import{join as Qg}from"path";var Kg="AWS_SHARED_CREDENTIALS_FILE",O7=()=>process.env[Kg]||Qg(Mh(),".aws","credentials");var l7=B(()=>{aw()});var v7,Zg,Jg,i$=(f)=>{let h={},w,s;for(let $ of f.split(/\r?\n/)){let r=$.split(/(^|\s)[;#]/)[0].trim();if(r[0]==="["&&r[r.length-1]==="]"){w=void 0,s=void 0;let U=r.substring(1,r.length-1),T=Zg.exec(U);if(T){let[,F,,C]=T;if(Object.values(v7.IniSectionType).includes(F))w=[F,C].join(j1)}else w=U;if(Jg.includes(U))throw new Error(`Found invalid profile name "${U}"`)}else if(w){let U=r.indexOf("=");if(![0,-1].includes(U)){let[T,F]=[r.substring(0,U).trim(),r.substring(U+1).trim()];if(F==="")s=T;else{if(s&&$.trimStart()===$)s=void 0;h[w]=h[w]||{};let C=s?[s,T].join(j1):T;h[w][C]=F}}}}return h};var I3=B(()=>{v7=p(T1(),1);ow();Zg=/^([\w-]+)\s(["'])?([\w-@\+\.%:/]+)\2$/,Jg=["__proto__","profile __proto__"]});import{promises as Vg}from"fs";var Pg,L3,c$=(f,h)=>{if(!L3[f]||h?.ignoreCache)L3[f]=Pg(f,"utf8");return L3[f]};var B3=B(()=>{({readFile:Pg}=Vg),L3={}});import{join as b7}from"path";var m7=()=>({}),j1=".",FE=async(f={})=>{let{filepath:h=O7(),configFilepath:w=TE()}=f,s=Mh(),$="~/",r=h;if(h.startsWith("~/"))r=b7(s,h.slice(2));let E=w;if(w.startsWith("~/"))E=b7(s,w.slice(2));let U=await Promise.all([c$(E,{ignoreCache:f.ignoreCache}).then(i$).then(y7).catch(m7),c$(r,{ignoreCache:f.ignoreCache}).then(i$).catch(m7)]);return{configFile:U[0],credentialsFile:U[1]}};var ow=B(()=>{j7();C3();l7();aw();I3();B3()});var d7,i7=(f)=>Object.entries(f).filter(([h])=>h.startsWith(d7.IniSectionType.SSO_SESSION+j1)).reduce((h,[w,s])=>({...h,[w.substring(w.indexOf(j1)+1)]:s}),{});var c7=B(()=>{d7=p(T1(),1);ow()});var Hg=()=>({}),CE=async(f={})=>c$(f.configFilepath??TE()).then(i$).then(i7).catch(Hg);var g7=B(()=>{C3();c7();I3();B3()});var x7=(...f)=>{let h={};for(let w of f)for(let[s,$]of Object.entries(w))if(h[s]!==void 0)Object.assign(h[s],$);else h[s]=$;return h};var Qh=async(f)=>{let h=await FE(f);return x7(h.configFile,h.credentialsFile)};var _7=B(()=>{ow()});var n7=()=>{};var hf=B(()=>{aw();T3();k7();ow();g7();_7();n7()});var e7=(f,{preferredFile:h="config",...w}={})=>async()=>{let s=y1(w),{configFile:$,credentialsFile:r}=await FE(w),E=r[s]||{},U=$[s]||{},T=h==="config"?{...E,...U}:{...U,...E};try{let C=f(T,h==="config"?$:r);if(C===void 0)throw new Error;return C}catch(F){throw new a(F.message||`Not found in config files w/ profile [${s}]: ${rE(f.toString())}`,{logger:w.logger})}};var a7=B(()=>{Y0();hf()});var Ng=(f)=>typeof f==="function",o7=(f)=>Ng(f)?async()=>await f():H7(f);var p7=B(()=>{Y0()});var z0=({environmentVariableSelector:f,configFileSelector:h,default:w},s={})=>uh(gf(N7(f),e7(h,s),o7(w)));var u7=B(()=>{Y0();D7();a7();p7()});var Kh=B(()=>{u7()});var t7="AWS_ENDPOINT_URL",fX="endpoint_url",hX=(f)=>({environmentVariableSelector:(h)=>{let w=f.split(" ").map((r)=>r.toUpperCase()),s=h[[t7,...w].join("_")];if(s)return s;let $=h[t7];if($)return $;return},configFileSelector:(h,w)=>{if(w&&h.services){let $=w[["services",h.services].join(j1)];if($){let r=f.split(" ").map((U)=>U.toLowerCase()),E=$[[r.join("_"),fX].join(j1)];if(E)return E}}let s=h[fX];if(s)return s;return},default:void 0});var wX=B(()=>{hf()});var IE=async(f)=>z0(hX(f??""))();var A3=B(()=>{Kh();wX()});function sX(f){let h={};if(f=f.replace(/^\?/,""),f)for(let w of f.split("&")){let[s,$=null]=w.split("=");if(s=decodeURIComponent(s),$)$=decodeURIComponent($);if(!(s in h))h[s]=$;else if(Array.isArray(h[s]))h[s].push($);else h[s]=[h[s],$]}return h}var O1=(f)=>{if(typeof f==="string")return O1(new URL(f));let{hostname:h,pathname:w,port:s,protocol:$,search:r}=f,E;if(r)E=sX(r);return{hostname:h,port:s?parseInt(s):void 0,protocol:$,path:w,query:E}};var pw=()=>{};var LE=(f)=>{if(typeof f==="object"){if("url"in f)return O1(f.url);return f}return O1(f)};var BE=B(()=>{pw()});var $X=async(f,h,w,s)=>{if(!w.endpoint){let E;if(w.serviceConfiguredEndpoint)E=await w.serviceConfiguredEndpoint();else E=await IE(w.serviceId);if(E)w.endpoint=()=>Promise.resolve(LE(E))}let $=await Dg(f,h,w);if(typeof w.endpointProvider!=="function")throw new Error("config.endpointProvider is not set.");return w.endpointProvider($,s)},Dg=async(f,h,w)=>{let s={},$=h?.getEndpointParameterInstructions?.()||{};for(let[r,E]of Object.entries($))switch(E.type){case"staticContextParams":s[r]=E.value;break;case"contextParams":s[r]=f[E.name];break;case"clientContextParams":case"builtInParams":s[r]=await Z7(E.name,r,w)();break;case"operationContextParams":s[r]=E.get(f);break;default:throw new Error("Unrecognized endpoint parameter instruction: "+JSON.stringify(E))}if(Object.keys($).length===0)Object.assign(s,w);if(String(w.serviceId).toLowerCase()==="s3")await M7(s);return s};var G3=B(()=>{K7();A3();BE()});var rX=B(()=>{G3();BE()});var EX,UX=({config:f,instructions:h})=>{return(w,s)=>async($)=>{if(f.endpoint)EX.setFeature(s,"ENDPOINT_OVERRIDE","N");let r=await $X($.input,{getEndpointParameterInstructions(){return h}},{...f},s);s.endpointV2=r,s.authSchemes=r.properties?.authSchemes;let E=s.authSchemes?.[0];if(E){s.signing_region=E.signingRegion,s.signing_service=E.signingName;let T=Xh(s)?.selectedHttpAuthScheme?.httpAuthOption;if(T)T.signingProperties=Object.assign(T.signingProperties||{},{signing_region:E.signingRegion,signingRegion:E.signingRegion,signing_service:E.signingName,signingName:E.signingName,signingRegionSet:E.signingRegionSet},E.properties)}return w({...$})}};var W3=B(()=>{EX=p(m0(),1);cf();G3()});var TX=(f,h)=>(w,s)=>async($)=>{let{response:r}=await w($);try{let E=await h(r,f);return{response:r,output:E}}catch(E){if(Object.defineProperty(E,"$response",{value:r}),!("$metadata"in E)){try{E.message+=`
40
- Deserialization error: to see the raw response, inspect the hidden field {error}.$response on this object.`}catch(T){if(!s.logger||s.logger?.constructor?.name==="NoOpLogger")console.warn("Deserialization error: to see the raw response, inspect the hidden field {error}.$response on this object.");else s.logger?.warn?.("Deserialization error: to see the raw response, inspect the hidden field {error}.$response on this object.")}if(typeof E.$responseBodyText!=="undefined"){if(E.$response)E.$response.body=E.$responseBodyText}}throw E}};var FX=(f,h)=>(w,s)=>async($)=>{let r=s.endpointV2?.url&&f.urlParser?async()=>f.urlParser(s.endpointV2.url):f.endpoint;if(!r)throw new Error("No valid endpoint provider available.");let E=await h($.input,{...f,endpoint:r});return w({...$,request:E})};function z(f,h,w){return{applyToStack:(s)=>{s.add(TX(f,w),qg),s.add(FX(f,h),z3)}}}var qg,z3;var CX=B(()=>{qg={name:"deserializerMiddleware",step:"deserialize",tags:["DESERIALIZER"],override:!0},z3={name:"serializerMiddleware",step:"serialize",tags:["SERIALIZER"],override:!0}});var k=B(()=>{CX()});var kg,R=(f,h)=>({applyToStack:(w)=>{w.addRelativeTo(UX({config:f,instructions:h}),kg)}});var IX=B(()=>{k();W3();kg={step:"serialize",tags:["ENDPOINT_PARAMETERS","ENDPOINT_V2","ENDPOINT"],name:"endpointV2Middleware",override:!0,relation:"before",toMiddleware:z3.name}});var uw=(f)=>{let h=f.tls??!0,{endpoint:w}=f,s=w!=null?async()=>LE(await L1(w)()):void 0,r={...f,endpoint:s,tls:h,isCustomEndpoint:!!w,useDualstackEndpoint:L1(f.useDualstackEndpoint??!1),useFipsEndpoint:L1(f.useFipsEndpoint??!1)},E=void 0;return r.serviceConfiguredEndpoint=async()=>{if(f.serviceId&&!E)E=IE(f.serviceId);return E},r};var LX=B(()=>{cf();A3();BE()});var BX=()=>{};var D=B(()=>{rX();W3();IX();LX();BX()});var l1,th=3,Zh;var AE=B(()=>{(function(f){f.STANDARD="standard",f.ADAPTIVE="adaptive"})(l1||(l1={}));Zh=l1.STANDARD});var AX,GX,WX,zX;var RX=B(()=>{AX=["BandwidthLimitExceeded","EC2ThrottledException","LimitExceededException","PriorRequestNotComplete","ProvisionedThroughputExceededException","RequestLimitExceeded","RequestThrottled","RequestThrottledException","SlowDown","ThrottledException","Throttling","ThrottlingException","TooManyRequestsException","TransactionInProgressException"],GX=["TimeoutError","RequestTimeout","RequestTimeoutException"],WX=[500,502,503,504],zX=["ECONNRESET","ECONNREFUSED","EPIPE","ETIMEDOUT"]});var yg=(f)=>f.$metadata?.clockSkewCorrected,tw=(f)=>f.$metadata?.httpStatusCode===429||AX.includes(f.name)||f.$retryable?.throttling==!0,g$=(f,h=0)=>yg(f)||GX.includes(f.name)||zX.includes(f?.code||"")||WX.includes(f.$metadata?.httpStatusCode||0)||f.cause!==void 0&&h<=10&&g$(f.cause,h+1),XX=(f)=>{if(f.$metadata?.httpStatusCode!==void 0){let h=f.$metadata.httpStatusCode;if(500<=h&&h<=599&&!g$(f))return!0;return!1}return!1};var x$=B(()=>{RX()});class fs{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?.beta??0.7,this.minCapacity=f?.minCapacity??1,this.minFillRate=f?.minFillRate??0.5,this.scaleConstant=f?.scaleConstant??0.4,this.smooth=f?.smooth??0.8;let h=this.getCurrentTimeInSeconds();this.lastThrottleTime=h,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){let h=(f-this.currentCapacity)/this.fillRate*1000;await new Promise((w)=>fs.setTimeoutFn(w,h))}this.currentCapacity=this.currentCapacity-f}refillTokenBucket(){let f=this.getCurrentTimeInSeconds();if(!this.lastTimestamp){this.lastTimestamp=f;return}let h=(f-this.lastTimestamp)*this.fillRate;this.currentCapacity=Math.min(this.maxCapacity,this.currentCapacity+h),this.lastTimestamp=f}updateClientSendingRate(f){let h;if(this.updateMeasuredRate(),tw(f)){let s=!this.enabled?this.measuredTxRate:Math.min(this.measuredTxRate,this.fillRate);this.lastMaxRate=s,this.calculateTimeWindow(),this.lastThrottleTime=this.getCurrentTimeInSeconds(),h=this.cubicThrottle(s),this.enableTokenBucket()}else this.calculateTimeWindow(),h=this.cubicSuccess(this.getCurrentTimeInSeconds());let w=Math.min(h,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(){let f=this.getCurrentTimeInSeconds(),h=Math.floor(f*2)/2;if(this.requestCount++,h>this.lastTxRateBucket){let w=this.requestCount/(h-this.lastTxRateBucket);this.measuredTxRate=this.getPrecise(w*this.smooth+this.measuredTxRate*(1-this.smooth)),this.requestCount=0,this.lastTxRateBucket=h}}getPrecise(f){return parseFloat(f.toFixed(8))}}var R3=B(()=>{x$();fs.setTimeoutFn=setTimeout});var fw=100,_$=20000,X3=500,GE=500,S3=5,Y3=10,M3=1,WE="amz-sdk-invocation-id",zE="amz-sdk-request";var SX=()=>{let f=fw;return{computeNextBackoffDelay:(s)=>{return Math.floor(Math.min(_$,Math.random()*2**s*f))},setDelayBase:(s)=>{f=s}}};var YX=()=>{};var Q3=({retryDelay:f,retryCount:h,retryCost:w})=>{return{getRetryCount:()=>h,getRetryDelay:()=>Math.min(_$,f),getRetryCost:()=>w}};var MX=()=>{};class hs{constructor(f){this.maxAttempts=f,this.mode=l1.STANDARD,this.capacity=GE,this.retryBackoffStrategy=SX(),this.maxAttemptsProvider=typeof f==="function"?f:async()=>f}async acquireInitialRetryToken(f){return Q3({retryDelay:fw,retryCount:0})}async refreshRetryTokenForRetry(f,h){let w=await this.getMaxAttempts();if(this.shouldRetry(f,h,w)){let s=h.errorType;this.retryBackoffStrategy.setDelayBase(s==="THROTTLING"?X3:fw);let $=this.retryBackoffStrategy.computeNextBackoffDelay(f.getRetryCount()),r=h.retryAfterHint?Math.max(h.retryAfterHint.getTime()-Date.now()||0,$):$,E=this.getCapacityCost(s);return this.capacity-=E,Q3({retryDelay:r,retryCount:f.getRetryCount()+1,retryCost:E})}throw new Error("No retry token available")}recordSuccess(f){this.capacity=Math.max(GE,this.capacity+(f.getRetryCost()??M3))}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 ${th}`),th}}shouldRetry(f,h,w){return f.getRetryCount()+1<w&&this.capacity>=this.getCapacityCost(h.errorType)&&this.isRetryableError(h.errorType)}getCapacityCost(f){return f==="TRANSIENT"?Y3:S3}isRetryableError(f){return f==="THROTTLING"||f==="TRANSIENT"}}var RE=B(()=>{AE();YX();MX()});class K3{constructor(f,h){this.maxAttemptsProvider=f,this.mode=l1.ADAPTIVE;let{rateLimiter:w}=h??{};this.rateLimiter=w??new fs,this.standardRetryStrategy=new hs(f)}async acquireInitialRetryToken(f){return await this.rateLimiter.getSendToken(),this.standardRetryStrategy.acquireInitialRetryToken(f)}async refreshRetryTokenForRetry(f,h){return this.rateLimiter.updateClientSendingRate(h),this.standardRetryStrategy.refreshRetryTokenForRetry(f,h)}recordSuccess(f){this.rateLimiter.updateClientSendingRate({}),this.standardRetryStrategy.recordSuccess(f)}}var QX=B(()=>{AE();R3();RE()});var KX=B(()=>{RE()});var ZX=()=>{};var wf=B(()=>{QX();KX();R3();RE();AE();ZX()});var Z3=H((JX)=>{Object.defineProperty(JX,"__esModule",{value:!0});JX.default=lg;var jg=Og(B0("crypto"));function Og(f){return f&&f.__esModule?f:{default:f}}var SE=new Uint8Array(256),XE=SE.length;function lg(){if(XE>SE.length-16)jg.default.randomFillSync(SE),XE=0;return SE.slice(XE,XE+=16)}});var HX=H((VX)=>{Object.defineProperty(VX,"__esModule",{value:!0});VX.default=void 0;var bg=/^(?:[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;VX.default=bg});var n$=H((NX)=>{Object.defineProperty(NX,"__esModule",{value:!0});NX.default=void 0;var mg=dg(HX());function dg(f){return f&&f.__esModule?f:{default:f}}function ig(f){return typeof f==="string"&&mg.default.test(f)}var cg=ig;NX.default=cg});var e$=H((kX)=>{Object.defineProperty(kX,"__esModule",{value:!0});kX.default=void 0;kX.unsafeStringify=qX;var gg=xg(n$());function xg(f){return f&&f.__esModule?f:{default:f}}var f1=[];for(let f=0;f<256;++f)f1.push((f+256).toString(16).slice(1));function qX(f,h=0){return f1[f[h+0]]+f1[f[h+1]]+f1[f[h+2]]+f1[f[h+3]]+"-"+f1[f[h+4]]+f1[f[h+5]]+"-"+f1[f[h+6]]+f1[f[h+7]]+"-"+f1[f[h+8]]+f1[f[h+9]]+"-"+f1[f[h+10]]+f1[f[h+11]]+f1[f[h+12]]+f1[f[h+13]]+f1[f[h+14]]+f1[f[h+15]]}function _g(f,h=0){let w=qX(f,h);if(!gg.default(w))throw TypeError("Stringified UUID is invalid");return w}var ng=_g;kX.default=ng});var vX=H((OX)=>{Object.defineProperty(OX,"__esModule",{value:!0});OX.default=void 0;var ag=pg(Z3()),og=e$();function pg(f){return f&&f.__esModule?f:{default:f}}var jX,J3,V3=0,P3=0;function ug(f,h,w){let s=h&&w||0,$=h||new Array(16);f=f||{};let r=f.node||jX,E=f.clockseq!==void 0?f.clockseq:J3;if(r==null||E==null){let L=f.random||(f.rng||ag.default)();if(r==null)r=jX=[L[0]|1,L[1],L[2],L[3],L[4],L[5]];if(E==null)E=J3=(L[6]<<8|L[7])&16383}let U=f.msecs!==void 0?f.msecs:Date.now(),T=f.nsecs!==void 0?f.nsecs:P3+1,F=U-V3+(T-P3)/1e4;if(F<0&&f.clockseq===void 0)E=E+1&16383;if((F<0||U>V3)&&f.nsecs===void 0)T=0;if(T>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");V3=U,P3=T,J3=E,U+=12219292800000;let C=((U&268435455)*1e4+T)%4294967296;$[s++]=C>>>24&255,$[s++]=C>>>16&255,$[s++]=C>>>8&255,$[s++]=C&255;let I=U/4294967296*1e4&268435455;$[s++]=I>>>8&255,$[s++]=I&255,$[s++]=I>>>24&15|16,$[s++]=I>>>16&255,$[s++]=E>>>8|128,$[s++]=E&255;for(let L=0;L<6;++L)$[s+L]=r[L];return h||og.unsafeStringify($)}var tg=ug;OX.default=tg});var H3=H((bX)=>{Object.defineProperty(bX,"__esModule",{value:!0});bX.default=void 0;var fx=hx(n$());function hx(f){return f&&f.__esModule?f:{default:f}}function wx(f){if(!fx.default(f))throw TypeError("Invalid UUID");let h,w=new Uint8Array(16);return w[0]=(h=parseInt(f.slice(0,8),16))>>>24,w[1]=h>>>16&255,w[2]=h>>>8&255,w[3]=h&255,w[4]=(h=parseInt(f.slice(9,13),16))>>>8,w[5]=h&255,w[6]=(h=parseInt(f.slice(14,18),16))>>>8,w[7]=h&255,w[8]=(h=parseInt(f.slice(19,23),16))>>>8,w[9]=h&255,w[10]=(h=parseInt(f.slice(24,36),16))/1099511627776&255,w[11]=h/4294967296&255,w[12]=h>>>24&255,w[13]=h>>>16&255,w[14]=h>>>8&255,w[15]=h&255,w}var sx=wx;bX.default=sx});var N3=H((cX)=>{Object.defineProperty(cX,"__esModule",{value:!0});cX.URL=cX.DNS=void 0;cX.default=Tx;var $x=e$(),rx=Ex(H3());function Ex(f){return f&&f.__esModule?f:{default:f}}function Ux(f){f=unescape(encodeURIComponent(f));let h=[];for(let w=0;w<f.length;++w)h.push(f.charCodeAt(w));return h}var dX="6ba7b810-9dad-11d1-80b4-00c04fd430c8";cX.DNS=dX;var iX="6ba7b811-9dad-11d1-80b4-00c04fd430c8";cX.URL=iX;function Tx(f,h,w){function s($,r,E,U){var T;if(typeof $==="string")$=Ux($);if(typeof r==="string")r=rx.default(r);if(((T=r)===null||T===void 0?void 0:T.length)!==16)throw TypeError("Namespace must be array-like (16 iterable integer values, 0-255)");let F=new Uint8Array(16+$.length);if(F.set(r),F.set($,r.length),F=w(F),F[6]=F[6]&15|h,F[8]=F[8]&63|128,E){U=U||0;for(let C=0;C<16;++C)E[U+C]=F[C];return E}return $x.unsafeStringify(F)}try{s.name=f}catch($){}return s.DNS=dX,s.URL=iX,s}});var nX=H((xX)=>{Object.defineProperty(xX,"__esModule",{value:!0});xX.default=void 0;var Ix=Lx(B0("crypto"));function Lx(f){return f&&f.__esModule?f:{default:f}}function Bx(f){if(Array.isArray(f))f=Buffer.from(f);else if(typeof f==="string")f=Buffer.from(f,"utf8");return Ix.default.createHash("md5").update(f).digest()}var Ax=Bx;xX.default=Ax});var pX=H((aX)=>{Object.defineProperty(aX,"__esModule",{value:!0});aX.default=void 0;var Gx=eX(N3()),Wx=eX(nX());function eX(f){return f&&f.__esModule?f:{default:f}}var zx=Gx.default("v3",48,Wx.default),Rx=zx;aX.default=Rx});var fS=H((uX)=>{Object.defineProperty(uX,"__esModule",{value:!0});uX.default=void 0;var Xx=Sx(B0("crypto"));function Sx(f){return f&&f.__esModule?f:{default:f}}var Yx={randomUUID:Xx.default.randomUUID};uX.default=Yx});var rS=H((sS)=>{Object.defineProperty(sS,"__esModule",{value:!0});sS.default=void 0;var hS=wS(fS()),Mx=wS(Z3()),Qx=e$();function wS(f){return f&&f.__esModule?f:{default:f}}function Kx(f,h,w){if(hS.default.randomUUID&&!h&&!f)return hS.default.randomUUID();f=f||{};let s=f.random||(f.rng||Mx.default)();if(s[6]=s[6]&15|64,s[8]=s[8]&63|128,h){w=w||0;for(let $=0;$<16;++$)h[w+$]=s[$];return h}return Qx.unsafeStringify(s)}var Zx=Kx;sS.default=Zx});var TS=H((ES)=>{Object.defineProperty(ES,"__esModule",{value:!0});ES.default=void 0;var Jx=Vx(B0("crypto"));function Vx(f){return f&&f.__esModule?f:{default:f}}function Px(f){if(Array.isArray(f))f=Buffer.from(f);else if(typeof f==="string")f=Buffer.from(f,"utf8");return Jx.default.createHash("sha1").update(f).digest()}var Hx=Px;ES.default=Hx});var LS=H((CS)=>{Object.defineProperty(CS,"__esModule",{value:!0});CS.default=void 0;var Nx=FS(N3()),Dx=FS(TS());function FS(f){return f&&f.__esModule?f:{default:f}}var qx=Nx.default("v5",80,Dx.default),kx=qx;CS.default=kx});var GS=H((BS)=>{Object.defineProperty(BS,"__esModule",{value:!0});BS.default=void 0;var yx="00000000-0000-0000-0000-000000000000";BS.default=yx});var RS=H((WS)=>{Object.defineProperty(WS,"__esModule",{value:!0});WS.default=void 0;var jx=Ox(n$());function Ox(f){return f&&f.__esModule?f:{default:f}}function lx(f){if(!jx.default(f))throw TypeError("Invalid UUID");return parseInt(f.slice(14,15),16)}var vx=lx;WS.default=vx});var D3=H((sf)=>{Object.defineProperty(sf,"__esModule",{value:!0});Object.defineProperty(sf,"NIL",{enumerable:!0,get:function(){return cx.default}});Object.defineProperty(sf,"parse",{enumerable:!0,get:function(){return nx.default}});Object.defineProperty(sf,"stringify",{enumerable:!0,get:function(){return _x.default}});Object.defineProperty(sf,"v1",{enumerable:!0,get:function(){return bx.default}});Object.defineProperty(sf,"v3",{enumerable:!0,get:function(){return mx.default}});Object.defineProperty(sf,"v4",{enumerable:!0,get:function(){return dx.default}});Object.defineProperty(sf,"v5",{enumerable:!0,get:function(){return ix.default}});Object.defineProperty(sf,"validate",{enumerable:!0,get:function(){return xx.default}});Object.defineProperty(sf,"version",{enumerable:!0,get:function(){return gx.default}});var bx=xf(vX()),mx=xf(pX()),dx=xf(rS()),ix=xf(LS()),cx=xf(GS()),gx=xf(RS()),xx=xf(n$()),_x=xf(e$()),nx=xf(H3());function xf(f){return f&&f.__esModule?f:{default:f}}});var Mf,AC0,GC0,XS,WC0,zC0,RC0,XC0,SC0,YC0;var SS=B(()=>{Mf=p(D3(),1),AC0=Mf.default.v1,GC0=Mf.default.v3,XS=Mf.default.v4,WC0=Mf.default.v5,zC0=Mf.default.NIL,RC0=Mf.default.version,XC0=Mf.default.validate,SC0=Mf.default.stringify,YC0=Mf.default.parse});var YS=B(()=>{wf()});var q3=B(()=>{wf()});var k3=B(()=>{x$()});var y3=(f)=>{if(f instanceof Error)return f;if(f instanceof Object)return Object.assign(new Error,f);if(typeof f==="string")return new Error(f);return new Error(`AWS SDK error wrapper for ${f}`)};var j3=B(()=>{F1();x$();wf();YS();q3();k3()});var MS=B(()=>{wf();j3()});var QS="AWS_MAX_ATTEMPTS",KS="max_attempts",ws,ss=(f)=>{let{retryStrategy:h}=f,w=L1(f.maxAttempts??th);return{...f,maxAttempts:w,retryStrategy:async()=>{if(h)return h;if(await L1(f.retryMode)()===l1.ADAPTIVE)return new K3(w);return new hs(w)}}},ex="AWS_RETRY_MODE",ax="retry_mode",$s;var ZS=B(()=>{cf();wf();ws={environmentVariableSelector:(f)=>{let h=f[QS];if(!h)return;let w=parseInt(h);if(Number.isNaN(w))throw new Error(`Environment variable ${QS} mast be a number, got "${h}"`);return w},configFileSelector:(f)=>{let h=f[KS];if(!h)return;let w=parseInt(h);if(Number.isNaN(w))throw new Error(`Shared config file entry ${KS} mast be a number, got "${h}"`);return w},default:th},$s={environmentVariableSelector:(f)=>f[ex],configFileSelector:(f)=>f[ax],default:Zh}});var JS=B(()=>{F1();wf()});var hw=(f,h)=>{let w=[];if(f)w.push(f);if(h)for(let s of h)w.push(s);return w},Jh=(f,h)=>{return`${f||"anonymous"}${h&&h.length>0?` (a.k.a. ${h.join(",")})`:""}`},rs=()=>{let f=[],h=[],w=!1,s=new Set,$=(I)=>I.sort((L,G)=>VS[G.step]-VS[L.step]||PS[G.priority||"normal"]-PS[L.priority||"normal"]),r=(I)=>{let L=!1,G=(X)=>{let Q=hw(X.name,X.aliases);if(Q.includes(I)){L=!0;for(let M of Q)s.delete(M);return!1}return!0};return f=f.filter(G),h=h.filter(G),L},E=(I)=>{let L=!1,G=(X)=>{if(X.middleware===I){L=!0;for(let Q of hw(X.name,X.aliases))s.delete(Q);return!1}return!0};return f=f.filter(G),h=h.filter(G),L},U=(I)=>{return f.forEach((L)=>{I.add(L.middleware,{...L})}),h.forEach((L)=>{I.addRelativeTo(L.middleware,{...L})}),I.identifyOnResolve?.(C.identifyOnResolve()),I},T=(I)=>{let L=[];return I.before.forEach((G)=>{if(G.before.length===0&&G.after.length===0)L.push(G);else L.push(...T(G))}),L.push(I),I.after.reverse().forEach((G)=>{if(G.before.length===0&&G.after.length===0)L.push(G);else L.push(...T(G))}),L},F=(I=!1)=>{let L=[],G=[],X={};return f.forEach((M)=>{let q={...M,before:[],after:[]};for(let N of hw(q.name,q.aliases))X[N]=q;L.push(q)}),h.forEach((M)=>{let q={...M,before:[],after:[]};for(let N of hw(q.name,q.aliases))X[N]=q;G.push(q)}),G.forEach((M)=>{if(M.toMiddleware){let q=X[M.toMiddleware];if(q===void 0){if(I)return;throw new Error(`${M.toMiddleware} is not found when adding ${Jh(M.name,M.aliases)} middleware ${M.relation} ${M.toMiddleware}`)}if(M.relation==="after")q.after.push(M);if(M.relation==="before")q.before.push(M)}}),$(L).map(T).reduce((M,q)=>{return M.push(...q),M},[])},C={add:(I,L={})=>{let{name:G,override:X,aliases:Q}=L,M={step:"initialize",priority:"normal",middleware:I,...L},q=hw(G,Q);if(q.length>0){if(q.some((N)=>s.has(N))){if(!X)throw new Error(`Duplicate middleware name '${Jh(G,Q)}'`);for(let N of q){let y=f.findIndex((L0)=>L0.name===N||L0.aliases?.some((b0)=>b0===N));if(y===-1)continue;let n=f[y];if(n.step!==M.step||M.priority!==n.priority)throw new Error(`"${Jh(n.name,n.aliases)}" middleware with ${n.priority} priority in ${n.step} step cannot be overridden by "${Jh(G,Q)}" middleware with ${M.priority} priority in ${M.step} step.`);f.splice(y,1)}}for(let N of q)s.add(N)}f.push(M)},addRelativeTo:(I,L)=>{let{name:G,override:X,aliases:Q}=L,M={middleware:I,...L},q=hw(G,Q);if(q.length>0){if(q.some((N)=>s.has(N))){if(!X)throw new Error(`Duplicate middleware name '${Jh(G,Q)}'`);for(let N of q){let y=h.findIndex((L0)=>L0.name===N||L0.aliases?.some((b0)=>b0===N));if(y===-1)continue;let n=h[y];if(n.toMiddleware!==M.toMiddleware||n.relation!==M.relation)throw new Error(`"${Jh(n.name,n.aliases)}" middleware ${n.relation} "${n.toMiddleware}" middleware cannot be overridden by "${Jh(G,Q)}" middleware ${M.relation} "${M.toMiddleware}" middleware.`);h.splice(y,1)}}for(let N of q)s.add(N)}h.push(M)},clone:()=>U(rs()),use:(I)=>{I.applyToStack(C)},remove:(I)=>{if(typeof I==="string")return r(I);else return E(I)},removeByTag:(I)=>{let L=!1,G=(X)=>{let{tags:Q,name:M,aliases:q}=X;if(Q&&Q.includes(I)){let N=hw(M,q);for(let y of N)s.delete(y);return L=!0,!1}return!0};return f=f.filter(G),h=h.filter(G),L},concat:(I)=>{let L=U(rs());return L.use(I),L.identifyOnResolve(w||L.identifyOnResolve()||(I.identifyOnResolve?.()??!1)),L},applyToStack:U,identify:()=>{return F(!0).map((I)=>{let L=I.step??I.relation+" "+I.toMiddleware;return Jh(I.name,I.aliases)+" - "+L})},identifyOnResolve(I){if(typeof I==="boolean")w=I;return w},resolve:(I,L)=>{for(let G of F().map((X)=>X.middleware).reverse())I=G(I,L);if(w)console.log(C.identify());return I}};return C},VS,PS;var HS=B(()=>{VS={initialize:5,serialize:4,build:3,finalizeRequest:2,deserialize:1},PS={high:3,normal:2,low:1}});var O3=B(()=>{HS()});class ww{constructor(f){this.config=f,this.middlewareStack=rs()}send(f,h,w){let s=typeof h!=="function"?h:void 0,$=typeof h==="function"?h:w,r=s===void 0&&this.config.cacheMiddleware===!0,E;if(r){if(!this.handlers)this.handlers=new WeakMap;let U=this.handlers;if(U.has(f.constructor))E=U.get(f.constructor);else E=f.resolveMiddleware(this.middlewareStack,this.config,s),U.set(f.constructor,E)}else delete this.handlers,E=f.resolveMiddleware(this.middlewareStack,this.config,s);if($)E(f).then((U)=>$(null,U.output),(U)=>$(U)).catch(()=>{});else return E(f).then((U)=>U.output)}destroy(){this.config?.requestHandler?.destroy?.(),delete this.handlers}}var NS=B(()=>{O3()});var B1;var DS=B(()=>{B1=p(yw(),1)});class W{constructor(){this.middlewareStack=rs()}static classBuilder(){return new kS}resolveMiddlewareWithContext(f,h,w,{middlewareFn:s,clientName:$,commandName:r,inputFilterSensitiveLog:E,outputFilterSensitiveLog:U,smithyContext:T,additionalContext:F,CommandCtor:C}){for(let Q of s.bind(this)(C,f,h,w))this.middlewareStack.use(Q);let I=f.concat(this.middlewareStack),{logger:L}=h,G={logger:L,clientName:$,commandName:r,inputFilterSensitiveLog:E,outputFilterSensitiveLog:U,[qS.SMITHY_CONTEXT_KEY]:{commandInstance:this,...T},...F},{requestHandler:X}=h;return I.resolve((Q)=>X.handle(Q.request,w||{}),G)}}class kS{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,h,w={}){return this._smithyContext={service:f,operation:h,...w},this}c(f={}){return this._additionalContext=f,this}n(f,h){return this._clientName=f,this._commandName=h,this}f(f=(w)=>w,h=(w)=>w){return this._inputFilterSensitiveLog=f,this._outputFilterSensitiveLog=h,this}ser(f){return this._serializer=f,this}de(f){return this._deserializer=f,this}build(){let f=this,h;return h=class extends W{static getEndpointParameterInstructions(){return f._ep}constructor(...[w]){super();this.serialize=f._serializer,this.deserialize=f._deserializer,this.input=w??{},f._init(this)}resolveMiddleware(w,s,$){return this.resolveMiddlewareWithContext(w,s,$,{CommandCtor:h,middlewareFn:f._middlewareFn,clientName:f._clientName,commandName:f._commandName,inputFilterSensitiveLog:f._inputFilterSensitiveLog,outputFilterSensitiveLog:f._outputFilterSensitiveLog,smithyContext:f._smithyContext,additionalContext:f._additionalContext})}}}}var qS;var yS=B(()=>{O3();qS=p(T1(),1)});var T0="***SensitiveInformation***";var Es=(f,h)=>{for(let w of Object.keys(f)){let s=f[w],$=async function(E,U,T){let F=new s(E);if(typeof U==="function")this.send(F,U);else if(typeof T==="function"){if(typeof U!=="object")throw new Error(`Expected http options but got ${typeof U}`);this.send(F,U||{},T)}else return this.send(F,U)},r=(w[0].toLowerCase()+w.slice(1)).replace(/Command$/,"");h.prototype[r]=$}};var e0=(f)=>{switch(f){case"true":return!0;case"false":return!1;default:throw new Error(`Unable to parse boolean value "${f}"`)}},Vh=(f)=>{if(f===null||f===void 0)return;if(typeof f==="number"){if(f===0||f===1)ME.warn(YE(`Expected boolean, got ${typeof f}: ${f}`));if(f===0)return!1;if(f===1)return!0}if(typeof f==="string"){let h=f.toLowerCase();if(h==="false"||h==="true")ME.warn(YE(`Expected boolean, got ${typeof f}: ${f}`));if(h==="false")return!1;if(h==="true")return!0}if(typeof f==="boolean")return f;throw new TypeError(`Expected boolean, got ${typeof f}: ${f}`)},S1=(f)=>{if(f===null||f===void 0)return;if(typeof f==="string"){let h=parseFloat(f);if(!Number.isNaN(h)){if(String(h)!==String(f))ME.warn(YE(`Expected number but observed string: ${f}`));return h}}if(typeof f==="number")return f;throw new TypeError(`Expected number, got ${typeof f}: ${f}`)},ox,jS=(f)=>{let h=S1(f);if(h!==void 0&&!Number.isNaN(h)&&h!==1/0&&h!==-1/0){if(Math.abs(h)>ox)throw new TypeError(`Expected 32-bit float, got ${f}`)}return h},l3=(f)=>{if(f===null||f===void 0)return;if(Number.isInteger(f)&&!Number.isNaN(f))return f;throw new TypeError(`Expected integer, got ${typeof f}: ${f}`)},OS=(f)=>v3(f,32),lS=(f)=>v3(f,16),vS=(f)=>v3(f,8),v3=(f,h)=>{let w=l3(f);if(w!==void 0&&px(w,h)!==w)throw new TypeError(`Expected ${h}-bit integer, got ${f}`);return w},px=(f,h)=>{switch(h){case 32:return Int32Array.of(f)[0];case 16:return Int16Array.of(f)[0];case 8:return Int8Array.of(f)[0]}},j=(f,h)=>{if(f===null||f===void 0){if(h)throw new TypeError(`Expected a non-null value for ${h}`);throw new TypeError("Expected a non-null value")}return f},g=(f)=>{if(f===null||f===void 0)return;if(typeof f==="object"&&!Array.isArray(f))return f;let h=Array.isArray(f)?"array":typeof f;throw new TypeError(`Expected object, got ${h}: ${f}`)},A=(f)=>{if(f===null||f===void 0)return;if(typeof f==="string")return f;if(["boolean","number","bigint"].includes(typeof f))return ME.warn(YE(`Expected string, got ${typeof f}: ${f}`)),String(f);throw new TypeError(`Expected string, got ${typeof f}: ${f}`)},b3=(f)=>{if(typeof f=="string")return S1(Us(f));return S1(f)},bS,mS=(f)=>{if(typeof f=="string")return jS(Us(f));return jS(f)},ux,Us=(f)=>{let h=f.match(ux);if(h===null||h[0].length!==f.length)throw new TypeError("Expected real number, got implicit NaN");return parseFloat(f)},m3=(f)=>{if(typeof f=="string")return tx(f);return S1(f)},tx=(f)=>{switch(f){case"NaN":return NaN;case"Infinity":return 1/0;case"-Infinity":return-1/0;default:throw new Error(`Unable to parse float value: ${f}`)}},r1=(f)=>{if(typeof f==="string")return l3(Us(f));return l3(f)},M0=(f)=>{if(typeof f==="string")return OS(Us(f));return OS(f)},d3=(f)=>{if(typeof f==="string")return lS(Us(f));return lS(f)},dS=(f)=>{if(typeof f==="string")return vS(Us(f));return vS(f)},YE=(f)=>{return String(new TypeError(f).stack||f).split(`
39
+ `);let $;try{$=s.parse(w,!0)}catch(T){if(T&&typeof T==="object")Object.defineProperty(T,"$responseBodyText",{value:w});throw T}let r="#text",E=Object.keys($)[0],U=$[E];if(U[r])U[E]=U[r],delete U[r];return uc.getValueFromTextNode(U)}return{}}),"parseXmlBody"),fg=K1(async(f,h)=>{let w=await oR(f,h);if(w.Error)w.Error.message=w.Error.message??w.Error.Message;return w},"parseXmlErrorBody"),hg=K1((f,h)=>{if(h?.Error?.Code!==void 0)return h.Error.Code;if(h?.Code!==void 0)return h.Code;if(f.statusCode==404)return"NotFound"},"loadRestXmlErrorCode")});var O0=H((b$)=>{Object.defineProperty(b$,"__esModule",{value:!0});var f3=l4();f3.__exportStar(C1(),b$);f3.__exportStar(gz(),b$);f3.__exportStar(uR(),b$)});async function tR(f,h,w){if(w.request?.headers?.["smithy-protocol"]==="rpc-v2-cbor")ff.setFeature(f,"PROTOCOL_RPC_V2_CBOR","M");if(typeof h.retryStrategy==="function"){let r=await h.retryStrategy();if(typeof r.acquireInitialRetryToken==="function")if(r.constructor?.name?.includes("Adaptive"))ff.setFeature(f,"RETRY_MODE_ADAPTIVE","F");else ff.setFeature(f,"RETRY_MODE_STANDARD","E");else ff.setFeature(f,"RETRY_MODE_LEGACY","D")}if(typeof h.accountIdEndpointMode==="function"){let r=f.endpointV2;if(String(r?.url?.hostname).match(wg))ff.setFeature(f,"ACCOUNT_ID_ENDPOINT","O");switch(await h.accountIdEndpointMode?.()){case"disabled":ff.setFeature(f,"ACCOUNT_ID_MODE_DISABLED","Q");break;case"preferred":ff.setFeature(f,"ACCOUNT_ID_MODE_PREFERRED","P");break;case"required":ff.setFeature(f,"ACCOUNT_ID_MODE_REQUIRED","R");break}}let $=f.__smithy_context?.selectedHttpAuthScheme?.identity;if($?.$source){let r=$;if(r.accountId)ff.setFeature(f,"RESOLVED_ACCOUNT_ID","T");for(let[E,U]of Object.entries(r.$source??{}))ff.setFeature(f,E,U)}}var ff,wg;var f7=B(()=>{ff=p(O0(),1),wg=/\d{12}\.ddb/});var h3="user-agent",fE="x-amz-user-agent",w3=" ",hE="/",h7,w7,s3="-";var s7=B(()=>{h7=/[^\!\$\%\&\'\*\+\-\.\^\_\`\|\~\d\w]/g,w7=/[^\!\$\%\&\'\*\+\-\.\^\_\`\|\~\d\w\#]/g});function $7(f){let h="";for(let w in f){let s=f[w];if(h.length+s.length+1<=1024){if(h.length)h+=","+s;else h+=s;continue}break}return h}var sg=(f)=>(h,w)=>async(s)=>{let{request:$}=s;if(!n0.isInstance($))return h(s);let{headers:r}=$,E=w?.userAgent?.map(wE)||[],U=(await f.defaultUserAgentProvider()).map(wE);await tR(w,f,s);let T=w;U.push(`m/${$7(Object.assign({},w.__smithy_context?.features,T.__aws_sdk_context?.features))}`);let F=f?.customUserAgent?.map(wE)||[],C=await f.userAgentAppId();if(C)U.push(wE([`app/${C}`]));let I=NW(),L=(I?[I]:[]).concat([...U,...E,...F]).join(w3),G=[...U.filter((X)=>X.startsWith("aws-sdk-")),...F].join(w3);if(f.runtime!=="browser"){if(G)r[fE]=r[fE]?`${r[h3]} ${G}`:G;r[h3]=L}else r[fE]=L;return h({...s,request:$})},wE=(f)=>{let h=f[0].split(hE).map((E)=>E.replace(h7,s3)).join(hE),w=f[1]?.replace(w7,s3),s=h.indexOf(hE),$=h.substring(0,s),r=h.substring(s+1);if($==="api")r=r.toLowerCase();return[$,r,w].filter((E)=>E&&E.length>0).reduce((E,U,T)=>{switch(T){case 0:return U;case 1:return`${E}/${U}`;default:return`${E}#${U}`}},"")},$g,iw=(f)=>({applyToStack:(h)=>{h.add(sg(f),$g)}});var r7=B(()=>{N$();F1();f7();s7();$g={name:"getUserAgentMiddleware",step:"build",priority:"low",tags:["SET_USER_AGENT","USER_AGENT"],override:!0}});var m$=B(()=>{iG();r7()});var cw=(f,h,w)=>{if(!(h in f))return;if(f[h]==="true")return!0;if(f[h]==="false")return!1;throw new Error(`Cannot load ${w} "${h}". Expected "true" or "false", got ${f[h]}.`)};var Rh;var E7=B(()=>{(function(f){f.ENV="env",f.CONFIG="shared config entry"})(Rh||(Rh={}))});var $3=B(()=>{E7()});var rg="AWS_USE_DUALSTACK_ENDPOINT",Eg="use_dualstack_endpoint",gw;var U7=B(()=>{$3();gw={environmentVariableSelector:(f)=>cw(f,rg,Rh.ENV),configFileSelector:(f)=>cw(f,Eg,Rh.CONFIG),default:!1}});var Ug="AWS_USE_FIPS_ENDPOINT",Tg="use_fips_endpoint",xw;var T7=B(()=>{$3();xw={environmentVariableSelector:(f)=>cw(f,Ug,Rh.ENV),configFileSelector:(f)=>cw(f,Tg,Rh.CONFIG),default:!1}});var r3,Xh=(f)=>f[r3.SMITHY_CONTEXT_KEY]||(f[r3.SMITHY_CONTEXT_KEY]={});var F7=B(()=>{r3=p(T1(),1)});var L1=(f)=>{if(typeof f==="function")return f;let h=Promise.resolve(f);return()=>h};var cf=B(()=>{F7()});var C7=B(()=>{cf()});var I7=B(()=>{cf()});var L7=B(()=>{U7();T7();C7();I7()});var Sh,_w;var B7=B(()=>{Sh={environmentVariableSelector:(f)=>f.AWS_REGION,configFileSelector:(f)=>f.region,default:()=>{throw new Error("Region is missing")}},_w={preferredFile:"credentials"}});var sE=(f)=>typeof f==="string"&&(f.startsWith("fips-")||f.endsWith("-fips"));var E3=(f)=>sE(f)?["fips-aws-global","aws-fips"].includes(f)?"us-east-1":f.replace(/fips-(dkr-|prod-)?|-fips/,""):f;var A7=()=>{};var nw=(f)=>{let{region:h,useFipsEndpoint:w}=f;if(!h)throw new Error("Region is missing");return{...f,region:async()=>{if(typeof h==="string")return E3(h);let s=await h();return E3(s)},useFipsEndpoint:async()=>{let s=typeof h==="string"?h:await h();if(sE(s))return!0;return typeof w!=="function"?Promise.resolve(!!w):w()}}};var G7=B(()=>{A7()});var W7=B(()=>{B7();G7()});var z7=()=>{};var R7=()=>{};var X7=()=>{};var S7=B(()=>{z7();R7();X7()});var Yh=B(()=>{L7();W7();S7()});function Fg(f){return(h)=>async(w)=>{let s=w.request;if(n0.isInstance(s)){let{body:$,headers:r}=s;if($&&Object.keys(r).map((E)=>E.toLowerCase()).indexOf(Y7)===-1)try{let E=f($);s.headers={...s.headers,[Y7]:String(E)}}catch(E){}}return h({...w,request:s})}}var Y7="content-length",Cg,ew=(f)=>({applyToStack:(h)=>{h.add(Fg(f.bodyLengthChecker),Cg)}});var $E=B(()=>{F1();Cg={step:"build",tags:["SET_CONTENT_LENGTH","CONTENT_LENGTH"],name:"contentLengthMiddleware",override:!0}});var M7=async(f)=>{let h=f?.Bucket||"";if(typeof f.Bucket==="string")f.Bucket=h.replace(/#/g,encodeURIComponent("#")).replace(/\?/g,encodeURIComponent("?"));if(Gg(h)){if(f.ForcePathStyle===!0)throw new Error("Path-style addressing cannot be used with ARN buckets")}else if(!Ag(h)||h.indexOf(".")!==-1&&!String(f.Endpoint).startsWith("http:")||h.toLowerCase()!==h||h.length<3)f.ForcePathStyle=!0;if(f.DisableMultiRegionAccessPoints)f.disableMultiRegionAccessPoints=!0,f.DisableMRAP=!0;return f},Ig,Lg,Bg,Ag=(f)=>Ig.test(f)&&!Lg.test(f)&&!Bg.test(f),Gg=(f)=>{let[h,w,s,,,$]=f.split(":"),r=h==="arn"&&f.split(":").length>=6,E=Boolean(r&&w&&s&&$);if(r&&!E)throw new Error(`Invalid ARN: ${f} was an invalid ARN.`);return E};var Q7=B(()=>{Ig=/^[a-z0-9][a-z0-9\.\-]{1,61}[a-z0-9]$/,Lg=/(\d+\.){3}\d+/,Bg=/\.\./});var K7=B(()=>{Q7()});var Z7=(f,h,w)=>{let s=async()=>{let $=w[f]??w[h];if(typeof $==="function")return $();return $};if(f==="credentialScope"||h==="CredentialScope")return async()=>{let $=typeof w.credentials==="function"?await w.credentials():w.credentials;return $?.credentialScope??$?.CredentialScope};if(f==="accountId"||h==="AccountId")return async()=>{let $=typeof w.credentials==="function"?await w.credentials():w.credentials;return $?.accountId??$?.AccountId};if(f==="endpoint"||h==="endpoint")return async()=>{let $=await s();if($&&typeof $==="object"){if("url"in $)return $.url.href;if("hostname"in $){let{protocol:r,hostname:E,port:U,path:T}=$;return`${r}//${E}${U?":"+U:""}${T}`}}return $};return s};var k1;var d$=B(()=>{k1=class k1 extends Error{constructor(f,h=!0){let w,s=!0;if(typeof h==="boolean")w=void 0,s=h;else if(h!=null&&typeof h==="object")w=h.logger,s=h.tryNextLink??!0;super(f);this.name="ProviderError",this.tryNextLink=s,Object.setPrototypeOf(this,k1.prototype),w?.debug?.(`@smithy/property-provider ${s?"->":"(!)"} ${f}`)}static from(f,h=!0){return Object.assign(new this(f.message,h),f)}}});var a;var J7=B(()=>{d$();a=class a extends k1{constructor(f,h=!0){super(f,h);this.name="CredentialsProviderError",Object.setPrototypeOf(this,a.prototype)}}});var X1;var V7=B(()=>{d$();X1=class X1 extends k1{constructor(f,h=!0){super(f,h);this.name="TokenProviderError",Object.setPrototypeOf(this,X1.prototype)}}});var gf=(...f)=>async()=>{if(f.length===0)throw new k1("No providers in chain");let h;for(let w of f)try{return await w()}catch(s){if(h=s,s?.tryNextLink)continue;throw s}throw h};var P7=B(()=>{d$()});var H7=(f)=>()=>Promise.resolve(f);var uh=(f,h,w)=>{let s,$,r,E=!1,U=async()=>{if(!$)$=f();try{s=await $,r=!0,E=!1}finally{$=void 0}return s};if(h===void 0)return async(T)=>{if(!r||T?.forceRefresh)s=await U();return s};return async(T)=>{if(!r||T?.forceRefresh)s=await U();if(E)return s;if(w&&!w(s))return E=!0,s;if(h(s))return await U(),s;return s}};var Y0=B(()=>{J7();d$();V7();P7()});function rE(f){try{let h=new Set(Array.from(f.match(/([A-Z_]){3,}/g)??[]));return h.delete("CONFIG"),h.delete("CONFIG_PREFIX_SEPARATOR"),h.delete("ENV"),[...h].join(", ")}catch(h){return f}}var N7=(f,h)=>async()=>{try{let w=f(process.env);if(w===void 0)throw new Error;return w}catch(w){throw new a(w.message||`Not found in ENV: ${rE(f.toString())}`,{logger:h})}};var D7=B(()=>{Y0()});import{homedir as Wg}from"os";import{sep as zg}from"path";var U3,Rg=()=>{if(process&&process.geteuid)return`${process.geteuid()}`;return"DEFAULT"},Mh=()=>{let{HOME:f,USERPROFILE:h,HOMEPATH:w,HOMEDRIVE:s=`C:${zg}`}=process.env;if(f)return f;if(h)return h;if(w)return`${s}${w}`;let $=Rg();if(!U3[$])U3[$]=Wg();return U3[$]};var aw=B(()=>{U3={}});var q7="AWS_PROFILE",y1=(f)=>f.profile||process.env.AWS_PROFILE||"default";import{createHash as Xg}from"crypto";import{join as Sg}from"path";var EE=(f)=>{let w=Xg("sha1").update(f).digest("hex");return Sg(Mh(),".aws","sso","cache",`${w}.json`)};var T3=B(()=>{aw()});import{promises as Yg}from"fs";var Mg,UE=async(f)=>{let h=EE(f),w=await Mg(h,"utf8");return JSON.parse(w)};var k7=B(()=>{T3();({readFile:Mg}=Yg)});var F3,y7=(f)=>Object.entries(f).filter(([h])=>{let w=h.indexOf(j1);if(w===-1)return!1;return Object.values(F3.IniSectionType).includes(h.substring(0,w))}).reduce((h,[w,s])=>{let $=w.indexOf(j1),r=w.substring(0,$)===F3.IniSectionType.PROFILE?w.substring($+1):w;return h[r]=s,h},{...f.default&&{default:f.default}});var j7=B(()=>{F3=p(T1(),1);ow()});import{join as Qg}from"path";var Kg="AWS_CONFIG_FILE",TE=()=>process.env[Kg]||Qg(Mh(),".aws","config");var C3=B(()=>{aw()});import{join as Zg}from"path";var Jg="AWS_SHARED_CREDENTIALS_FILE",O7=()=>process.env[Jg]||Zg(Mh(),".aws","credentials");var l7=B(()=>{aw()});var v7,Vg,Pg,i$=(f)=>{let h={},w,s;for(let $ of f.split(/\r?\n/)){let r=$.split(/(^|\s)[;#]/)[0].trim();if(r[0]==="["&&r[r.length-1]==="]"){w=void 0,s=void 0;let U=r.substring(1,r.length-1),T=Vg.exec(U);if(T){let[,F,,C]=T;if(Object.values(v7.IniSectionType).includes(F))w=[F,C].join(j1)}else w=U;if(Pg.includes(U))throw new Error(`Found invalid profile name "${U}"`)}else if(w){let U=r.indexOf("=");if(![0,-1].includes(U)){let[T,F]=[r.substring(0,U).trim(),r.substring(U+1).trim()];if(F==="")s=T;else{if(s&&$.trimStart()===$)s=void 0;h[w]=h[w]||{};let C=s?[s,T].join(j1):T;h[w][C]=F}}}}return h};var I3=B(()=>{v7=p(T1(),1);ow();Vg=/^([\w-]+)\s(["'])?([\w-@\+\.%:/]+)\2$/,Pg=["__proto__","profile __proto__"]});import{promises as Hg}from"fs";var Ng,L3,c$=(f,h)=>{if(!L3[f]||h?.ignoreCache)L3[f]=Ng(f,"utf8");return L3[f]};var B3=B(()=>{({readFile:Ng}=Hg),L3={}});import{join as b7}from"path";var m7=()=>({}),j1=".",FE=async(f={})=>{let{filepath:h=O7(),configFilepath:w=TE()}=f,s=Mh(),$="~/",r=h;if(h.startsWith("~/"))r=b7(s,h.slice(2));let E=w;if(w.startsWith("~/"))E=b7(s,w.slice(2));let U=await Promise.all([c$(E,{ignoreCache:f.ignoreCache}).then(i$).then(y7).catch(m7),c$(r,{ignoreCache:f.ignoreCache}).then(i$).catch(m7)]);return{configFile:U[0],credentialsFile:U[1]}};var ow=B(()=>{j7();C3();l7();aw();I3();B3()});var d7,i7=(f)=>Object.entries(f).filter(([h])=>h.startsWith(d7.IniSectionType.SSO_SESSION+j1)).reduce((h,[w,s])=>({...h,[w.substring(w.indexOf(j1)+1)]:s}),{});var c7=B(()=>{d7=p(T1(),1);ow()});var Dg=()=>({}),CE=async(f={})=>c$(f.configFilepath??TE()).then(i$).then(i7).catch(Dg);var g7=B(()=>{C3();c7();I3();B3()});var x7=(...f)=>{let h={};for(let w of f)for(let[s,$]of Object.entries(w))if(h[s]!==void 0)Object.assign(h[s],$);else h[s]=$;return h};var Qh=async(f)=>{let h=await FE(f);return x7(h.configFile,h.credentialsFile)};var _7=B(()=>{ow()});var n7=()=>{};var hf=B(()=>{aw();T3();k7();ow();g7();_7();n7()});var e7=(f,{preferredFile:h="config",...w}={})=>async()=>{let s=y1(w),{configFile:$,credentialsFile:r}=await FE(w),E=r[s]||{},U=$[s]||{},T=h==="config"?{...E,...U}:{...U,...E};try{let C=f(T,h==="config"?$:r);if(C===void 0)throw new Error;return C}catch(F){throw new a(F.message||`Not found in config files w/ profile [${s}]: ${rE(f.toString())}`,{logger:w.logger})}};var a7=B(()=>{Y0();hf()});var qg=(f)=>typeof f==="function",o7=(f)=>qg(f)?async()=>await f():H7(f);var p7=B(()=>{Y0()});var z0=({environmentVariableSelector:f,configFileSelector:h,default:w},s={})=>uh(gf(N7(f),e7(h,s),o7(w)));var u7=B(()=>{Y0();D7();a7();p7()});var Kh=B(()=>{u7()});var t7="AWS_ENDPOINT_URL",fX="endpoint_url",hX=(f)=>({environmentVariableSelector:(h)=>{let w=f.split(" ").map((r)=>r.toUpperCase()),s=h[[t7,...w].join("_")];if(s)return s;let $=h[t7];if($)return $;return},configFileSelector:(h,w)=>{if(w&&h.services){let $=w[["services",h.services].join(j1)];if($){let r=f.split(" ").map((U)=>U.toLowerCase()),E=$[[r.join("_"),fX].join(j1)];if(E)return E}}let s=h[fX];if(s)return s;return},default:void 0});var wX=B(()=>{hf()});var IE=async(f)=>z0(hX(f??""))();var A3=B(()=>{Kh();wX()});function sX(f){let h={};if(f=f.replace(/^\?/,""),f)for(let w of f.split("&")){let[s,$=null]=w.split("=");if(s=decodeURIComponent(s),$)$=decodeURIComponent($);if(!(s in h))h[s]=$;else if(Array.isArray(h[s]))h[s].push($);else h[s]=[h[s],$]}return h}var O1=(f)=>{if(typeof f==="string")return O1(new URL(f));let{hostname:h,pathname:w,port:s,protocol:$,search:r}=f,E;if(r)E=sX(r);return{hostname:h,port:s?parseInt(s):void 0,protocol:$,path:w,query:E}};var pw=()=>{};var LE=(f)=>{if(typeof f==="object"){if("url"in f)return O1(f.url);return f}return O1(f)};var BE=B(()=>{pw()});var $X=async(f,h,w,s)=>{if(!w.endpoint){let E;if(w.serviceConfiguredEndpoint)E=await w.serviceConfiguredEndpoint();else E=await IE(w.serviceId);if(E)w.endpoint=()=>Promise.resolve(LE(E))}let $=await kg(f,h,w);if(typeof w.endpointProvider!=="function")throw new Error("config.endpointProvider is not set.");return w.endpointProvider($,s)},kg=async(f,h,w)=>{let s={},$=h?.getEndpointParameterInstructions?.()||{};for(let[r,E]of Object.entries($))switch(E.type){case"staticContextParams":s[r]=E.value;break;case"contextParams":s[r]=f[E.name];break;case"clientContextParams":case"builtInParams":s[r]=await Z7(E.name,r,w)();break;case"operationContextParams":s[r]=E.get(f);break;default:throw new Error("Unrecognized endpoint parameter instruction: "+JSON.stringify(E))}if(Object.keys($).length===0)Object.assign(s,w);if(String(w.serviceId).toLowerCase()==="s3")await M7(s);return s};var G3=B(()=>{K7();A3();BE()});var rX=B(()=>{G3();BE()});var EX,UX=({config:f,instructions:h})=>{return(w,s)=>async($)=>{if(f.endpoint)EX.setFeature(s,"ENDPOINT_OVERRIDE","N");let r=await $X($.input,{getEndpointParameterInstructions(){return h}},{...f},s);s.endpointV2=r,s.authSchemes=r.properties?.authSchemes;let E=s.authSchemes?.[0];if(E){s.signing_region=E.signingRegion,s.signing_service=E.signingName;let T=Xh(s)?.selectedHttpAuthScheme?.httpAuthOption;if(T)T.signingProperties=Object.assign(T.signingProperties||{},{signing_region:E.signingRegion,signingRegion:E.signingRegion,signing_service:E.signingName,signingName:E.signingName,signingRegionSet:E.signingRegionSet},E.properties)}return w({...$})}};var W3=B(()=>{EX=p(m0(),1);cf();G3()});var TX=(f,h)=>(w,s)=>async($)=>{let{response:r}=await w($);try{let E=await h(r,f);return{response:r,output:E}}catch(E){if(Object.defineProperty(E,"$response",{value:r}),!("$metadata"in E)){try{E.message+=`
40
+ Deserialization error: to see the raw response, inspect the hidden field {error}.$response on this object.`}catch(T){if(!s.logger||s.logger?.constructor?.name==="NoOpLogger")console.warn("Deserialization error: to see the raw response, inspect the hidden field {error}.$response on this object.");else s.logger?.warn?.("Deserialization error: to see the raw response, inspect the hidden field {error}.$response on this object.")}if(typeof E.$responseBodyText!=="undefined"){if(E.$response)E.$response.body=E.$responseBodyText}}throw E}};var FX=(f,h)=>(w,s)=>async($)=>{let r=s.endpointV2?.url&&f.urlParser?async()=>f.urlParser(s.endpointV2.url):f.endpoint;if(!r)throw new Error("No valid endpoint provider available.");let E=await h($.input,{...f,endpoint:r});return w({...$,request:E})};function z(f,h,w){return{applyToStack:(s)=>{s.add(TX(f,w),yg),s.add(FX(f,h),z3)}}}var yg,z3;var CX=B(()=>{yg={name:"deserializerMiddleware",step:"deserialize",tags:["DESERIALIZER"],override:!0},z3={name:"serializerMiddleware",step:"serialize",tags:["SERIALIZER"],override:!0}});var k=B(()=>{CX()});var jg,R=(f,h)=>({applyToStack:(w)=>{w.addRelativeTo(UX({config:f,instructions:h}),jg)}});var IX=B(()=>{k();W3();jg={step:"serialize",tags:["ENDPOINT_PARAMETERS","ENDPOINT_V2","ENDPOINT"],name:"endpointV2Middleware",override:!0,relation:"before",toMiddleware:z3.name}});var uw=(f)=>{let h=f.tls??!0,{endpoint:w}=f,s=w!=null?async()=>LE(await L1(w)()):void 0,r={...f,endpoint:s,tls:h,isCustomEndpoint:!!w,useDualstackEndpoint:L1(f.useDualstackEndpoint??!1),useFipsEndpoint:L1(f.useFipsEndpoint??!1)},E=void 0;return r.serviceConfiguredEndpoint=async()=>{if(f.serviceId&&!E)E=IE(f.serviceId);return E},r};var LX=B(()=>{cf();A3();BE()});var BX=()=>{};var D=B(()=>{rX();W3();IX();LX();BX()});var l1,th=3,Zh;var AE=B(()=>{(function(f){f.STANDARD="standard",f.ADAPTIVE="adaptive"})(l1||(l1={}));Zh=l1.STANDARD});var AX,GX,WX,zX;var RX=B(()=>{AX=["BandwidthLimitExceeded","EC2ThrottledException","LimitExceededException","PriorRequestNotComplete","ProvisionedThroughputExceededException","RequestLimitExceeded","RequestThrottled","RequestThrottledException","SlowDown","ThrottledException","Throttling","ThrottlingException","TooManyRequestsException","TransactionInProgressException"],GX=["TimeoutError","RequestTimeout","RequestTimeoutException"],WX=[500,502,503,504],zX=["ECONNRESET","ECONNREFUSED","EPIPE","ETIMEDOUT"]});var Og=(f)=>f.$metadata?.clockSkewCorrected,tw=(f)=>f.$metadata?.httpStatusCode===429||AX.includes(f.name)||f.$retryable?.throttling==!0,g$=(f,h=0)=>Og(f)||GX.includes(f.name)||zX.includes(f?.code||"")||WX.includes(f.$metadata?.httpStatusCode||0)||f.cause!==void 0&&h<=10&&g$(f.cause,h+1),XX=(f)=>{if(f.$metadata?.httpStatusCode!==void 0){let h=f.$metadata.httpStatusCode;if(500<=h&&h<=599&&!g$(f))return!0;return!1}return!1};var x$=B(()=>{RX()});class fs{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?.beta??0.7,this.minCapacity=f?.minCapacity??1,this.minFillRate=f?.minFillRate??0.5,this.scaleConstant=f?.scaleConstant??0.4,this.smooth=f?.smooth??0.8;let h=this.getCurrentTimeInSeconds();this.lastThrottleTime=h,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){let h=(f-this.currentCapacity)/this.fillRate*1000;await new Promise((w)=>fs.setTimeoutFn(w,h))}this.currentCapacity=this.currentCapacity-f}refillTokenBucket(){let f=this.getCurrentTimeInSeconds();if(!this.lastTimestamp){this.lastTimestamp=f;return}let h=(f-this.lastTimestamp)*this.fillRate;this.currentCapacity=Math.min(this.maxCapacity,this.currentCapacity+h),this.lastTimestamp=f}updateClientSendingRate(f){let h;if(this.updateMeasuredRate(),tw(f)){let s=!this.enabled?this.measuredTxRate:Math.min(this.measuredTxRate,this.fillRate);this.lastMaxRate=s,this.calculateTimeWindow(),this.lastThrottleTime=this.getCurrentTimeInSeconds(),h=this.cubicThrottle(s),this.enableTokenBucket()}else this.calculateTimeWindow(),h=this.cubicSuccess(this.getCurrentTimeInSeconds());let w=Math.min(h,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(){let f=this.getCurrentTimeInSeconds(),h=Math.floor(f*2)/2;if(this.requestCount++,h>this.lastTxRateBucket){let w=this.requestCount/(h-this.lastTxRateBucket);this.measuredTxRate=this.getPrecise(w*this.smooth+this.measuredTxRate*(1-this.smooth)),this.requestCount=0,this.lastTxRateBucket=h}}getPrecise(f){return parseFloat(f.toFixed(8))}}var R3=B(()=>{x$();fs.setTimeoutFn=setTimeout});var fw=100,_$=20000,X3=500,GE=500,S3=5,Y3=10,M3=1,WE="amz-sdk-invocation-id",zE="amz-sdk-request";var SX=()=>{let f=fw;return{computeNextBackoffDelay:(s)=>{return Math.floor(Math.min(_$,Math.random()*2**s*f))},setDelayBase:(s)=>{f=s}}};var YX=()=>{};var Q3=({retryDelay:f,retryCount:h,retryCost:w})=>{return{getRetryCount:()=>h,getRetryDelay:()=>Math.min(_$,f),getRetryCost:()=>w}};var MX=()=>{};class hs{constructor(f){this.maxAttempts=f,this.mode=l1.STANDARD,this.capacity=GE,this.retryBackoffStrategy=SX(),this.maxAttemptsProvider=typeof f==="function"?f:async()=>f}async acquireInitialRetryToken(f){return Q3({retryDelay:fw,retryCount:0})}async refreshRetryTokenForRetry(f,h){let w=await this.getMaxAttempts();if(this.shouldRetry(f,h,w)){let s=h.errorType;this.retryBackoffStrategy.setDelayBase(s==="THROTTLING"?X3:fw);let $=this.retryBackoffStrategy.computeNextBackoffDelay(f.getRetryCount()),r=h.retryAfterHint?Math.max(h.retryAfterHint.getTime()-Date.now()||0,$):$,E=this.getCapacityCost(s);return this.capacity-=E,Q3({retryDelay:r,retryCount:f.getRetryCount()+1,retryCost:E})}throw new Error("No retry token available")}recordSuccess(f){this.capacity=Math.max(GE,this.capacity+(f.getRetryCost()??M3))}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 ${th}`),th}}shouldRetry(f,h,w){return f.getRetryCount()+1<w&&this.capacity>=this.getCapacityCost(h.errorType)&&this.isRetryableError(h.errorType)}getCapacityCost(f){return f==="TRANSIENT"?Y3:S3}isRetryableError(f){return f==="THROTTLING"||f==="TRANSIENT"}}var RE=B(()=>{AE();YX();MX()});class K3{constructor(f,h){this.maxAttemptsProvider=f,this.mode=l1.ADAPTIVE;let{rateLimiter:w}=h??{};this.rateLimiter=w??new fs,this.standardRetryStrategy=new hs(f)}async acquireInitialRetryToken(f){return await this.rateLimiter.getSendToken(),this.standardRetryStrategy.acquireInitialRetryToken(f)}async refreshRetryTokenForRetry(f,h){return this.rateLimiter.updateClientSendingRate(h),this.standardRetryStrategy.refreshRetryTokenForRetry(f,h)}recordSuccess(f){this.rateLimiter.updateClientSendingRate({}),this.standardRetryStrategy.recordSuccess(f)}}var QX=B(()=>{AE();R3();RE()});var KX=B(()=>{RE()});var ZX=()=>{};var wf=B(()=>{QX();KX();R3();RE();AE();ZX()});var Z3=H((JX)=>{Object.defineProperty(JX,"__esModule",{value:!0});JX.default=bg;var lg=vg(B0("crypto"));function vg(f){return f&&f.__esModule?f:{default:f}}var SE=new Uint8Array(256),XE=SE.length;function bg(){if(XE>SE.length-16)lg.default.randomFillSync(SE),XE=0;return SE.slice(XE,XE+=16)}});var HX=H((VX)=>{Object.defineProperty(VX,"__esModule",{value:!0});VX.default=void 0;var dg=/^(?:[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;VX.default=dg});var n$=H((NX)=>{Object.defineProperty(NX,"__esModule",{value:!0});NX.default=void 0;var ig=cg(HX());function cg(f){return f&&f.__esModule?f:{default:f}}function gg(f){return typeof f==="string"&&ig.default.test(f)}var xg=gg;NX.default=xg});var e$=H((kX)=>{Object.defineProperty(kX,"__esModule",{value:!0});kX.default=void 0;kX.unsafeStringify=qX;var _g=ng(n$());function ng(f){return f&&f.__esModule?f:{default:f}}var f1=[];for(let f=0;f<256;++f)f1.push((f+256).toString(16).slice(1));function qX(f,h=0){return f1[f[h+0]]+f1[f[h+1]]+f1[f[h+2]]+f1[f[h+3]]+"-"+f1[f[h+4]]+f1[f[h+5]]+"-"+f1[f[h+6]]+f1[f[h+7]]+"-"+f1[f[h+8]]+f1[f[h+9]]+"-"+f1[f[h+10]]+f1[f[h+11]]+f1[f[h+12]]+f1[f[h+13]]+f1[f[h+14]]+f1[f[h+15]]}function eg(f,h=0){let w=qX(f,h);if(!_g.default(w))throw TypeError("Stringified UUID is invalid");return w}var ag=eg;kX.default=ag});var vX=H((OX)=>{Object.defineProperty(OX,"__esModule",{value:!0});OX.default=void 0;var pg=tg(Z3()),ug=e$();function tg(f){return f&&f.__esModule?f:{default:f}}var jX,J3,V3=0,P3=0;function fx(f,h,w){let s=h&&w||0,$=h||new Array(16);f=f||{};let r=f.node||jX,E=f.clockseq!==void 0?f.clockseq:J3;if(r==null||E==null){let L=f.random||(f.rng||pg.default)();if(r==null)r=jX=[L[0]|1,L[1],L[2],L[3],L[4],L[5]];if(E==null)E=J3=(L[6]<<8|L[7])&16383}let U=f.msecs!==void 0?f.msecs:Date.now(),T=f.nsecs!==void 0?f.nsecs:P3+1,F=U-V3+(T-P3)/1e4;if(F<0&&f.clockseq===void 0)E=E+1&16383;if((F<0||U>V3)&&f.nsecs===void 0)T=0;if(T>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");V3=U,P3=T,J3=E,U+=12219292800000;let C=((U&268435455)*1e4+T)%4294967296;$[s++]=C>>>24&255,$[s++]=C>>>16&255,$[s++]=C>>>8&255,$[s++]=C&255;let I=U/4294967296*1e4&268435455;$[s++]=I>>>8&255,$[s++]=I&255,$[s++]=I>>>24&15|16,$[s++]=I>>>16&255,$[s++]=E>>>8|128,$[s++]=E&255;for(let L=0;L<6;++L)$[s+L]=r[L];return h||ug.unsafeStringify($)}var hx=fx;OX.default=hx});var H3=H((bX)=>{Object.defineProperty(bX,"__esModule",{value:!0});bX.default=void 0;var wx=sx(n$());function sx(f){return f&&f.__esModule?f:{default:f}}function $x(f){if(!wx.default(f))throw TypeError("Invalid UUID");let h,w=new Uint8Array(16);return w[0]=(h=parseInt(f.slice(0,8),16))>>>24,w[1]=h>>>16&255,w[2]=h>>>8&255,w[3]=h&255,w[4]=(h=parseInt(f.slice(9,13),16))>>>8,w[5]=h&255,w[6]=(h=parseInt(f.slice(14,18),16))>>>8,w[7]=h&255,w[8]=(h=parseInt(f.slice(19,23),16))>>>8,w[9]=h&255,w[10]=(h=parseInt(f.slice(24,36),16))/1099511627776&255,w[11]=h/4294967296&255,w[12]=h>>>24&255,w[13]=h>>>16&255,w[14]=h>>>8&255,w[15]=h&255,w}var rx=$x;bX.default=rx});var N3=H((cX)=>{Object.defineProperty(cX,"__esModule",{value:!0});cX.URL=cX.DNS=void 0;cX.default=Cx;var Ex=e$(),Ux=Tx(H3());function Tx(f){return f&&f.__esModule?f:{default:f}}function Fx(f){f=unescape(encodeURIComponent(f));let h=[];for(let w=0;w<f.length;++w)h.push(f.charCodeAt(w));return h}var dX="6ba7b810-9dad-11d1-80b4-00c04fd430c8";cX.DNS=dX;var iX="6ba7b811-9dad-11d1-80b4-00c04fd430c8";cX.URL=iX;function Cx(f,h,w){function s($,r,E,U){var T;if(typeof $==="string")$=Fx($);if(typeof r==="string")r=Ux.default(r);if(((T=r)===null||T===void 0?void 0:T.length)!==16)throw TypeError("Namespace must be array-like (16 iterable integer values, 0-255)");let F=new Uint8Array(16+$.length);if(F.set(r),F.set($,r.length),F=w(F),F[6]=F[6]&15|h,F[8]=F[8]&63|128,E){U=U||0;for(let C=0;C<16;++C)E[U+C]=F[C];return E}return Ex.unsafeStringify(F)}try{s.name=f}catch($){}return s.DNS=dX,s.URL=iX,s}});var nX=H((xX)=>{Object.defineProperty(xX,"__esModule",{value:!0});xX.default=void 0;var Bx=Ax(B0("crypto"));function Ax(f){return f&&f.__esModule?f:{default:f}}function Gx(f){if(Array.isArray(f))f=Buffer.from(f);else if(typeof f==="string")f=Buffer.from(f,"utf8");return Bx.default.createHash("md5").update(f).digest()}var Wx=Gx;xX.default=Wx});var pX=H((aX)=>{Object.defineProperty(aX,"__esModule",{value:!0});aX.default=void 0;var zx=eX(N3()),Rx=eX(nX());function eX(f){return f&&f.__esModule?f:{default:f}}var Xx=zx.default("v3",48,Rx.default),Sx=Xx;aX.default=Sx});var fS=H((uX)=>{Object.defineProperty(uX,"__esModule",{value:!0});uX.default=void 0;var Yx=Mx(B0("crypto"));function Mx(f){return f&&f.__esModule?f:{default:f}}var Qx={randomUUID:Yx.default.randomUUID};uX.default=Qx});var rS=H((sS)=>{Object.defineProperty(sS,"__esModule",{value:!0});sS.default=void 0;var hS=wS(fS()),Kx=wS(Z3()),Zx=e$();function wS(f){return f&&f.__esModule?f:{default:f}}function Jx(f,h,w){if(hS.default.randomUUID&&!h&&!f)return hS.default.randomUUID();f=f||{};let s=f.random||(f.rng||Kx.default)();if(s[6]=s[6]&15|64,s[8]=s[8]&63|128,h){w=w||0;for(let $=0;$<16;++$)h[w+$]=s[$];return h}return Zx.unsafeStringify(s)}var Vx=Jx;sS.default=Vx});var TS=H((ES)=>{Object.defineProperty(ES,"__esModule",{value:!0});ES.default=void 0;var Px=Hx(B0("crypto"));function Hx(f){return f&&f.__esModule?f:{default:f}}function Nx(f){if(Array.isArray(f))f=Buffer.from(f);else if(typeof f==="string")f=Buffer.from(f,"utf8");return Px.default.createHash("sha1").update(f).digest()}var Dx=Nx;ES.default=Dx});var LS=H((CS)=>{Object.defineProperty(CS,"__esModule",{value:!0});CS.default=void 0;var qx=FS(N3()),kx=FS(TS());function FS(f){return f&&f.__esModule?f:{default:f}}var yx=qx.default("v5",80,kx.default),jx=yx;CS.default=jx});var GS=H((BS)=>{Object.defineProperty(BS,"__esModule",{value:!0});BS.default=void 0;var Ox="00000000-0000-0000-0000-000000000000";BS.default=Ox});var RS=H((WS)=>{Object.defineProperty(WS,"__esModule",{value:!0});WS.default=void 0;var lx=vx(n$());function vx(f){return f&&f.__esModule?f:{default:f}}function bx(f){if(!lx.default(f))throw TypeError("Invalid UUID");return parseInt(f.slice(14,15),16)}var mx=bx;WS.default=mx});var D3=H((sf)=>{Object.defineProperty(sf,"__esModule",{value:!0});Object.defineProperty(sf,"NIL",{enumerable:!0,get:function(){return xx.default}});Object.defineProperty(sf,"parse",{enumerable:!0,get:function(){return ax.default}});Object.defineProperty(sf,"stringify",{enumerable:!0,get:function(){return ex.default}});Object.defineProperty(sf,"v1",{enumerable:!0,get:function(){return dx.default}});Object.defineProperty(sf,"v3",{enumerable:!0,get:function(){return ix.default}});Object.defineProperty(sf,"v4",{enumerable:!0,get:function(){return cx.default}});Object.defineProperty(sf,"v5",{enumerable:!0,get:function(){return gx.default}});Object.defineProperty(sf,"validate",{enumerable:!0,get:function(){return nx.default}});Object.defineProperty(sf,"version",{enumerable:!0,get:function(){return _x.default}});var dx=xf(vX()),ix=xf(pX()),cx=xf(rS()),gx=xf(LS()),xx=xf(GS()),_x=xf(RS()),nx=xf(n$()),ex=xf(e$()),ax=xf(H3());function xf(f){return f&&f.__esModule?f:{default:f}}});var Mf,z80,R80,XS,X80,S80,Y80,M80,Q80,K80;var SS=B(()=>{Mf=p(D3(),1),z80=Mf.default.v1,R80=Mf.default.v3,XS=Mf.default.v4,X80=Mf.default.v5,S80=Mf.default.NIL,Y80=Mf.default.version,M80=Mf.default.validate,Q80=Mf.default.stringify,K80=Mf.default.parse});var YS=B(()=>{wf()});var q3=B(()=>{wf()});var k3=B(()=>{x$()});var y3=(f)=>{if(f instanceof Error)return f;if(f instanceof Object)return Object.assign(new Error,f);if(typeof f==="string")return new Error(f);return new Error(`AWS SDK error wrapper for ${f}`)};var j3=B(()=>{F1();x$();wf();YS();q3();k3()});var MS=B(()=>{wf();j3()});var QS="AWS_MAX_ATTEMPTS",KS="max_attempts",ws,ss=(f)=>{let{retryStrategy:h}=f,w=L1(f.maxAttempts??th);return{...f,maxAttempts:w,retryStrategy:async()=>{if(h)return h;if(await L1(f.retryMode)()===l1.ADAPTIVE)return new K3(w);return new hs(w)}}},ox="AWS_RETRY_MODE",px="retry_mode",$s;var ZS=B(()=>{cf();wf();ws={environmentVariableSelector:(f)=>{let h=f[QS];if(!h)return;let w=parseInt(h);if(Number.isNaN(w))throw new Error(`Environment variable ${QS} mast be a number, got "${h}"`);return w},configFileSelector:(f)=>{let h=f[KS];if(!h)return;let w=parseInt(h);if(Number.isNaN(w))throw new Error(`Shared config file entry ${KS} mast be a number, got "${h}"`);return w},default:th},$s={environmentVariableSelector:(f)=>f[ox],configFileSelector:(f)=>f[px],default:Zh}});var JS=B(()=>{F1();wf()});var hw=(f,h)=>{let w=[];if(f)w.push(f);if(h)for(let s of h)w.push(s);return w},Jh=(f,h)=>{return`${f||"anonymous"}${h&&h.length>0?` (a.k.a. ${h.join(",")})`:""}`},rs=()=>{let f=[],h=[],w=!1,s=new Set,$=(I)=>I.sort((L,G)=>VS[G.step]-VS[L.step]||PS[G.priority||"normal"]-PS[L.priority||"normal"]),r=(I)=>{let L=!1,G=(X)=>{let Q=hw(X.name,X.aliases);if(Q.includes(I)){L=!0;for(let M of Q)s.delete(M);return!1}return!0};return f=f.filter(G),h=h.filter(G),L},E=(I)=>{let L=!1,G=(X)=>{if(X.middleware===I){L=!0;for(let Q of hw(X.name,X.aliases))s.delete(Q);return!1}return!0};return f=f.filter(G),h=h.filter(G),L},U=(I)=>{return f.forEach((L)=>{I.add(L.middleware,{...L})}),h.forEach((L)=>{I.addRelativeTo(L.middleware,{...L})}),I.identifyOnResolve?.(C.identifyOnResolve()),I},T=(I)=>{let L=[];return I.before.forEach((G)=>{if(G.before.length===0&&G.after.length===0)L.push(G);else L.push(...T(G))}),L.push(I),I.after.reverse().forEach((G)=>{if(G.before.length===0&&G.after.length===0)L.push(G);else L.push(...T(G))}),L},F=(I=!1)=>{let L=[],G=[],X={};return f.forEach((M)=>{let q={...M,before:[],after:[]};for(let N of hw(q.name,q.aliases))X[N]=q;L.push(q)}),h.forEach((M)=>{let q={...M,before:[],after:[]};for(let N of hw(q.name,q.aliases))X[N]=q;G.push(q)}),G.forEach((M)=>{if(M.toMiddleware){let q=X[M.toMiddleware];if(q===void 0){if(I)return;throw new Error(`${M.toMiddleware} is not found when adding ${Jh(M.name,M.aliases)} middleware ${M.relation} ${M.toMiddleware}`)}if(M.relation==="after")q.after.push(M);if(M.relation==="before")q.before.push(M)}}),$(L).map(T).reduce((M,q)=>{return M.push(...q),M},[])},C={add:(I,L={})=>{let{name:G,override:X,aliases:Q}=L,M={step:"initialize",priority:"normal",middleware:I,...L},q=hw(G,Q);if(q.length>0){if(q.some((N)=>s.has(N))){if(!X)throw new Error(`Duplicate middleware name '${Jh(G,Q)}'`);for(let N of q){let y=f.findIndex((L0)=>L0.name===N||L0.aliases?.some((b0)=>b0===N));if(y===-1)continue;let n=f[y];if(n.step!==M.step||M.priority!==n.priority)throw new Error(`"${Jh(n.name,n.aliases)}" middleware with ${n.priority} priority in ${n.step} step cannot be overridden by "${Jh(G,Q)}" middleware with ${M.priority} priority in ${M.step} step.`);f.splice(y,1)}}for(let N of q)s.add(N)}f.push(M)},addRelativeTo:(I,L)=>{let{name:G,override:X,aliases:Q}=L,M={middleware:I,...L},q=hw(G,Q);if(q.length>0){if(q.some((N)=>s.has(N))){if(!X)throw new Error(`Duplicate middleware name '${Jh(G,Q)}'`);for(let N of q){let y=h.findIndex((L0)=>L0.name===N||L0.aliases?.some((b0)=>b0===N));if(y===-1)continue;let n=h[y];if(n.toMiddleware!==M.toMiddleware||n.relation!==M.relation)throw new Error(`"${Jh(n.name,n.aliases)}" middleware ${n.relation} "${n.toMiddleware}" middleware cannot be overridden by "${Jh(G,Q)}" middleware ${M.relation} "${M.toMiddleware}" middleware.`);h.splice(y,1)}}for(let N of q)s.add(N)}h.push(M)},clone:()=>U(rs()),use:(I)=>{I.applyToStack(C)},remove:(I)=>{if(typeof I==="string")return r(I);else return E(I)},removeByTag:(I)=>{let L=!1,G=(X)=>{let{tags:Q,name:M,aliases:q}=X;if(Q&&Q.includes(I)){let N=hw(M,q);for(let y of N)s.delete(y);return L=!0,!1}return!0};return f=f.filter(G),h=h.filter(G),L},concat:(I)=>{let L=U(rs());return L.use(I),L.identifyOnResolve(w||L.identifyOnResolve()||(I.identifyOnResolve?.()??!1)),L},applyToStack:U,identify:()=>{return F(!0).map((I)=>{let L=I.step??I.relation+" "+I.toMiddleware;return Jh(I.name,I.aliases)+" - "+L})},identifyOnResolve(I){if(typeof I==="boolean")w=I;return w},resolve:(I,L)=>{for(let G of F().map((X)=>X.middleware).reverse())I=G(I,L);if(w)console.log(C.identify());return I}};return C},VS,PS;var HS=B(()=>{VS={initialize:5,serialize:4,build:3,finalizeRequest:2,deserialize:1},PS={high:3,normal:2,low:1}});var O3=B(()=>{HS()});class ww{constructor(f){this.config=f,this.middlewareStack=rs()}send(f,h,w){let s=typeof h!=="function"?h:void 0,$=typeof h==="function"?h:w,r=s===void 0&&this.config.cacheMiddleware===!0,E;if(r){if(!this.handlers)this.handlers=new WeakMap;let U=this.handlers;if(U.has(f.constructor))E=U.get(f.constructor);else E=f.resolveMiddleware(this.middlewareStack,this.config,s),U.set(f.constructor,E)}else delete this.handlers,E=f.resolveMiddleware(this.middlewareStack,this.config,s);if($)E(f).then((U)=>$(null,U.output),(U)=>$(U)).catch(()=>{});else return E(f).then((U)=>U.output)}destroy(){this.config?.requestHandler?.destroy?.(),delete this.handlers}}var NS=B(()=>{O3()});var B1;var DS=B(()=>{B1=p(yw(),1)});class W{constructor(){this.middlewareStack=rs()}static classBuilder(){return new kS}resolveMiddlewareWithContext(f,h,w,{middlewareFn:s,clientName:$,commandName:r,inputFilterSensitiveLog:E,outputFilterSensitiveLog:U,smithyContext:T,additionalContext:F,CommandCtor:C}){for(let Q of s.bind(this)(C,f,h,w))this.middlewareStack.use(Q);let I=f.concat(this.middlewareStack),{logger:L}=h,G={logger:L,clientName:$,commandName:r,inputFilterSensitiveLog:E,outputFilterSensitiveLog:U,[qS.SMITHY_CONTEXT_KEY]:{commandInstance:this,...T},...F},{requestHandler:X}=h;return I.resolve((Q)=>X.handle(Q.request,w||{}),G)}}class kS{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,h,w={}){return this._smithyContext={service:f,operation:h,...w},this}c(f={}){return this._additionalContext=f,this}n(f,h){return this._clientName=f,this._commandName=h,this}f(f=(w)=>w,h=(w)=>w){return this._inputFilterSensitiveLog=f,this._outputFilterSensitiveLog=h,this}ser(f){return this._serializer=f,this}de(f){return this._deserializer=f,this}build(){let f=this,h;return h=class extends W{static getEndpointParameterInstructions(){return f._ep}constructor(...[w]){super();this.serialize=f._serializer,this.deserialize=f._deserializer,this.input=w??{},f._init(this)}resolveMiddleware(w,s,$){return this.resolveMiddlewareWithContext(w,s,$,{CommandCtor:h,middlewareFn:f._middlewareFn,clientName:f._clientName,commandName:f._commandName,inputFilterSensitiveLog:f._inputFilterSensitiveLog,outputFilterSensitiveLog:f._outputFilterSensitiveLog,smithyContext:f._smithyContext,additionalContext:f._additionalContext})}}}}var qS;var yS=B(()=>{O3();qS=p(T1(),1)});var T0="***SensitiveInformation***";var Es=(f,h)=>{for(let w of Object.keys(f)){let s=f[w],$=async function(E,U,T){let F=new s(E);if(typeof U==="function")this.send(F,U);else if(typeof T==="function"){if(typeof U!=="object")throw new Error(`Expected http options but got ${typeof U}`);this.send(F,U||{},T)}else return this.send(F,U)},r=(w[0].toLowerCase()+w.slice(1)).replace(/Command$/,"");h.prototype[r]=$}};var e0=(f)=>{switch(f){case"true":return!0;case"false":return!1;default:throw new Error(`Unable to parse boolean value "${f}"`)}},Vh=(f)=>{if(f===null||f===void 0)return;if(typeof f==="number"){if(f===0||f===1)ME.warn(YE(`Expected boolean, got ${typeof f}: ${f}`));if(f===0)return!1;if(f===1)return!0}if(typeof f==="string"){let h=f.toLowerCase();if(h==="false"||h==="true")ME.warn(YE(`Expected boolean, got ${typeof f}: ${f}`));if(h==="false")return!1;if(h==="true")return!0}if(typeof f==="boolean")return f;throw new TypeError(`Expected boolean, got ${typeof f}: ${f}`)},S1=(f)=>{if(f===null||f===void 0)return;if(typeof f==="string"){let h=parseFloat(f);if(!Number.isNaN(h)){if(String(h)!==String(f))ME.warn(YE(`Expected number but observed string: ${f}`));return h}}if(typeof f==="number")return f;throw new TypeError(`Expected number, got ${typeof f}: ${f}`)},ux,jS=(f)=>{let h=S1(f);if(h!==void 0&&!Number.isNaN(h)&&h!==1/0&&h!==-1/0){if(Math.abs(h)>ux)throw new TypeError(`Expected 32-bit float, got ${f}`)}return h},l3=(f)=>{if(f===null||f===void 0)return;if(Number.isInteger(f)&&!Number.isNaN(f))return f;throw new TypeError(`Expected integer, got ${typeof f}: ${f}`)},OS=(f)=>v3(f,32),lS=(f)=>v3(f,16),vS=(f)=>v3(f,8),v3=(f,h)=>{let w=l3(f);if(w!==void 0&&tx(w,h)!==w)throw new TypeError(`Expected ${h}-bit integer, got ${f}`);return w},tx=(f,h)=>{switch(h){case 32:return Int32Array.of(f)[0];case 16:return Int16Array.of(f)[0];case 8:return Int8Array.of(f)[0]}},j=(f,h)=>{if(f===null||f===void 0){if(h)throw new TypeError(`Expected a non-null value for ${h}`);throw new TypeError("Expected a non-null value")}return f},g=(f)=>{if(f===null||f===void 0)return;if(typeof f==="object"&&!Array.isArray(f))return f;let h=Array.isArray(f)?"array":typeof f;throw new TypeError(`Expected object, got ${h}: ${f}`)},A=(f)=>{if(f===null||f===void 0)return;if(typeof f==="string")return f;if(["boolean","number","bigint"].includes(typeof f))return ME.warn(YE(`Expected string, got ${typeof f}: ${f}`)),String(f);throw new TypeError(`Expected string, got ${typeof f}: ${f}`)},b3=(f)=>{if(typeof f=="string")return S1(Us(f));return S1(f)},bS,mS=(f)=>{if(typeof f=="string")return jS(Us(f));return jS(f)},f_,Us=(f)=>{let h=f.match(f_);if(h===null||h[0].length!==f.length)throw new TypeError("Expected real number, got implicit NaN");return parseFloat(f)},m3=(f)=>{if(typeof f=="string")return h_(f);return S1(f)},h_=(f)=>{switch(f){case"NaN":return NaN;case"Infinity":return 1/0;case"-Infinity":return-1/0;default:throw new Error(`Unable to parse float value: ${f}`)}},r1=(f)=>{if(typeof f==="string")return l3(Us(f));return l3(f)},M0=(f)=>{if(typeof f==="string")return OS(Us(f));return OS(f)},d3=(f)=>{if(typeof f==="string")return lS(Us(f));return lS(f)},dS=(f)=>{if(typeof f==="string")return vS(Us(f));return vS(f)},YE=(f)=>{return String(new TypeError(f).stack||f).split(`
41
41
  `).slice(0,5).filter((h)=>!h.includes("stackTraceWarning")).join(`
42
- `)},ME;var i3=B(()=>{ox=Math.ceil(340282346638528860000000000000000000000),bS=b3,ux=/(-?(?:0|[1-9]\d*)(?:\.\d+)?(?:[eE][+-]?\d+)?)|(-?Infinity)|(NaN)/g,ME={warn:console.warn}});var f_,h_,iS=(f)=>{if(f===null||f===void 0)return;if(typeof f!=="string")throw new TypeError("RFC-3339 date-times must be expressed as strings");let h=h_.exec(f);if(!h)throw new TypeError("Invalid RFC-3339 date-time value");let[w,s,$,r,E,U,T,F]=h,C=d3(c3(s)),I=sw($,"month",1,12),L=sw(r,"day",1,31);return cS(C,I,L,{hours:E,minutes:U,seconds:T,fractionalMilliseconds:F})},w_,a$=(f)=>{if(f===null||f===void 0)return;if(typeof f!=="string")throw new TypeError("RFC-3339 date-times must be expressed as strings");let h=w_.exec(f);if(!h)throw new TypeError("Invalid RFC-3339 date-time value");let[w,s,$,r,E,U,T,F,C]=h,I=d3(c3(s)),L=sw($,"month",1,12),G=sw(r,"day",1,31),X=cS(I,L,G,{hours:E,minutes:U,seconds:T,fractionalMilliseconds:F});if(C.toUpperCase()!="Z")X.setTime(X.getTime()-U_(C));return X},LI0,BI0,AI0,Qf=(f)=>{if(f===null||f===void 0)return;let h;if(typeof f==="number")h=f;else if(typeof f==="string")h=b3(f);else if(typeof f==="object"&&f.tag===1)h=f.value;else throw new TypeError("Epoch timestamps must be expressed as floating point numbers or their string representation");if(Number.isNaN(h)||h===1/0||h===-1/0)throw new TypeError("Epoch timestamps must be valid, non-Infinite, non-NaN numerics");return new Date(Math.round(h*1000))},cS=(f,h,w,s)=>{let $=h-1;return $_(f,$,w),new Date(Date.UTC(f,$,w,sw(s.hours,"hour",0,23),sw(s.minutes,"minute",0,59),sw(s.seconds,"seconds",0,60),E_(s.fractionalMilliseconds)))},s_,$_=(f,h,w)=>{let s=s_[h];if(h===1&&r_(f))s=29;if(w>s)throw new TypeError(`Invalid day for ${f_[h]} in ${f}: ${w}`)},r_=(f)=>{return f%4===0&&(f%100!==0||f%400===0)},sw=(f,h,w,s)=>{let $=dS(c3(f));if($<w||$>s)throw new TypeError(`${h} must be between ${w} and ${s}, inclusive`);return $},E_=(f)=>{if(f===null||f===void 0)return 0;return mS("0."+f)*1000},U_=(f)=>{let h=f[0],w=1;if(h=="+")w=1;else if(h=="-")w=-1;else throw new TypeError(`Offset direction, ${h}, must be "+" or "-"`);let s=Number(f.substring(1,3)),$=Number(f.substring(4,6));return w*(s*60+$)*60*1000},c3=(f)=>{let h=0;while(h<f.length-1&&f.charAt(h)==="0")h++;if(h===0)return f;return f.slice(h)};var gS=B(()=>{i3();f_=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],h_=new RegExp(/^(\d{4})-(\d{2})-(\d{2})[tT](\d{2}):(\d{2}):(\d{2})(?:\.(\d+))?[zZ]$/),w_=new RegExp(/^(\d{4})-(\d{2})-(\d{2})[tT](\d{2}):(\d{2}):(\d{2})(?:\.(\d+))?(([-+]\d{2}\:\d{2})|[zZ])$/),LI0=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$/),BI0=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$/),AI0=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})$/),s_=[31,28,31,30,31,30,31,31,30,31,30,31]});var $f,l=(f,h={})=>{Object.entries(h).filter(([,s])=>s!==void 0).forEach(([s,$])=>{if(f[s]==null||f[s]==="")f[s]=$});let w=f.message||f.Message||"UnknownError";return f.message=w,delete f.Message,f};var g3=B(()=>{$f=class $f extends Error{constructor(f){super(f.message);Object.setPrototypeOf(this,Object.getPrototypeOf(this).constructor.prototype),this.name=f.name,this.$fault=f.$fault,this.$metadata=f.$metadata}static isInstance(f){if(!f)return!1;let h=f;return $f.prototype.isPrototypeOf(h)||Boolean(h.$fault)&&Boolean(h.$metadata)&&(h.$fault==="client"||h.$fault==="server")}static[Symbol.hasInstance](f){if(!f)return!1;let h=f;if(this===$f)return $f.isInstance(f);if($f.isInstance(f)){if(h.name&&this.name)return this.prototype.isPrototypeOf(f)||h.name===this.name;return this.prototype.isPrototypeOf(f)}return!1}}});var T_=({output:f,parsedBody:h,exceptionCtor:w,errorCode:s})=>{let $=F_(f),r=$.httpStatusCode?$.httpStatusCode+"":void 0,E=new w({name:h?.code||h?.Code||s||r||"UnknownError",$fault:"client",$metadata:$});throw l(E,h)},Ts=(f)=>{return({output:h,parsedBody:w,errorCode:s})=>{T_({output:h,parsedBody:w,exceptionCtor:f,errorCode:s})}},F_=(f)=>({httpStatusCode:f.statusCode,requestId:f.headers["x-amzn-requestid"]??f.headers["x-amzn-request-id"]??f.headers["x-amz-request-id"],extendedRequestId:f.headers["x-amz-id-2"],cfId:f.headers["x-amz-cf-id"]});var xS=B(()=>{g3()});var Fs=(f)=>{switch(f){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 _S=!1,Cs=(f)=>{if(f&&!_S&&parseInt(f.substring(1,f.indexOf(".")))<16)_S=!0};var C_;var nS=B(()=>{C_=p(yw(),1)});var x3,eS=(f)=>{let h=[];for(let w in x3.AlgorithmId){let s=x3.AlgorithmId[w];if(f[s]===void 0)continue;h.push({algorithmId:()=>s,checksumConstructor:()=>f[s]})}return{_checksumAlgorithms:h,addChecksumAlgorithm(w){this._checksumAlgorithms.push(w)},checksumAlgorithms(){return this._checksumAlgorithms}}},aS=(f)=>{let h={};return f.checksumAlgorithms().forEach((w)=>{h[w.algorithmId()]=w.checksumConstructor()}),h};var oS=B(()=>{x3=p(T1(),1)});var pS=(f)=>{let h=f.retryStrategy;return{setRetryStrategy(w){h=w},retryStrategy(){return h}}},uS=(f)=>{let h={};return h.retryStrategy=f.retryStrategy(),h};var Is=(f)=>{return{...eS(f),...pS(f)}},Ls=(f)=>{return{...aS(f),...uS(f)}};var tS=B(()=>{oS()});var fY=B(()=>{tS()});var A0=(f)=>Array.isArray(f)?f:[f];var o$=(f)=>{return f!=null};var Bs=function f(h){return Object.assign(new String(h),{deserializeJSON(){return JSON.parse(String(h))},toString(){return String(h)},toJSON(){return String(h)}})};var hY=B(()=>{Bs.from=(f)=>{if(f&&typeof f==="object"&&(f instanceof Bs||("deserializeJSON"in f)))return f;else if(typeof f==="string"||Object.getPrototypeOf(f)===String.prototype)return Bs(String(f));return Bs(JSON.stringify(f))};Bs.fromObject=Bs.from});class _f{trace(){}debug(){}info(){}warn(){}error(){}}function Y(f,h,w){let s,$,r;if(typeof h==="undefined"&&typeof w==="undefined")s={},r=f;else if(s=f,typeof h==="function")return $=h,r=w,I_(s,$,r);else r=h;for(let E of Object.keys(r)){if(!Array.isArray(r[E])){s[E]=r[E];continue}wY(s,null,r,E)}return s}var N0=(f,h)=>{let w={};for(let s in h)wY(w,f,h,s);return w},I_=(f,h,w)=>{return Y(f,Object.entries(w).reduce((s,[$,r])=>{if(Array.isArray(r))s[$]=r;else if(typeof r==="function")s[$]=[h,r()];else s[$]=[h,r];return s},{}))},wY=(f,h,w,s)=>{if(h!==null){let E=w[s];if(typeof E==="function")E=[,E];let[U=L_,T=B_,F=s]=E;if(typeof U==="function"&&U(h[F])||typeof U!=="function"&&!!U)f[s]=T(h[F]);return}let[$,r]=w[s];if(typeof r==="function"){let E,U=$===void 0&&(E=r())!=null,T=typeof $==="function"&&!!$(void 0)||typeof $!=="function"&&!!$;if(U)f[s]=E;else if(T)f[s]=r()}else{let E=$===void 0&&r!=null,U=typeof $==="function"&&!!$(r)||typeof $!=="function"&&!!$;if(E||U)f[s]=r}},L_=(f)=>f!=null,B_=(f)=>f;var A_;var sY=B(()=>{A_=p(yw(),1)});var $Y=(f)=>{if(f!==f)return"NaN";switch(f){case 1/0:return"Infinity";case-1/0:return"-Infinity";default:return f}};var v=(f)=>{if(f==null)return{};if(Array.isArray(f))return f.filter((h)=>h!=null).map(v);if(typeof f==="object"){let h={};for(let w of Object.keys(f)){if(f[w]==null)continue;h[w]=v(f[w])}return h}return f};var J=B(()=>{NS();DS();yS();gS();xS();g3();nS();fY();hY();i3();sY()});import{Readable as G_}from"stream";var rY=(f)=>f?.body instanceof G_||typeof ReadableStream!=="undefined"&&f?.body instanceof ReadableStream;var EY=()=>{};var W_=(f)=>(h,w)=>async(s)=>{let $=await f.retryStrategy(),r=await f.maxAttempts();if(z_($)){$=$;let E=await $.acquireInitialRetryToken(w.partition_id),U=new Error,T=0,F=0,{request:C}=s,I=n0.isInstance(C);if(I)C.headers[WE]=XS();while(!0)try{if(I)C.headers[zE]=`attempt=${T+1}; max=${r}`;let{response:L,output:G}=await h(s);return $.recordSuccess(E),G.$metadata.attempts=T+1,G.$metadata.totalRetryDelay=F,{response:L,output:G}}catch(L){let G=R_(L);if(U=y3(L),I&&rY(C))throw(w.logger instanceof _f?console:w.logger)?.warn("An error was encountered in a non-retryable streaming request."),U;try{E=await $.refreshRetryTokenForRetry(E,G)}catch(Q){if(!U.$metadata)U.$metadata={};throw U.$metadata.attempts=T+1,U.$metadata.totalRetryDelay=F,U}T=E.getRetryCount();let X=E.getRetryDelay();F+=X,await new Promise((Q)=>setTimeout(Q,X))}}else{if($=$,$?.mode)w.userAgent=[...w.userAgent||[],["cfg/retry-mode",$.mode]];return $.retry(h,s)}},z_=(f)=>typeof f.acquireInitialRetryToken!=="undefined"&&typeof f.refreshRetryTokenForRetry!=="undefined"&&typeof f.recordSuccess!=="undefined",R_=(f)=>{let h={error:f,errorType:X_(f)},w=Y_(f.$response);if(w)h.retryAfterHint=w;return h},X_=(f)=>{if(tw(f))return"THROTTLING";if(g$(f))return"TRANSIENT";if(XX(f))return"SERVER_ERROR";return"CLIENT_ERROR"},S_,As=(f)=>({applyToStack:(h)=>{h.add(W_(f),S_)}}),Y_=(f)=>{if(!ch.isInstance(f))return;let h=Object.keys(f.headers).find((r)=>r.toLowerCase()==="retry-after");if(!h)return;let w=f.headers[h],s=Number(w);if(!Number.isNaN(s))return new Date(s*1000);return new Date(w)};var UY=B(()=>{F1();x$();J();wf();SS();EY();S_={name:"retryMiddleware",tags:["RETRY"],step:"finalizeRequest",priority:"high",override:!0}});var $w=B(()=>{MS();j3();ZS();q3();JS();k3();UY()});var AY,QE="AWS_ACCESS_KEY_ID",KE="AWS_SECRET_ACCESS_KEY",GY="AWS_SESSION_TOKEN",WY="AWS_CREDENTIAL_EXPIRATION",zY="AWS_CREDENTIAL_SCOPE",RY="AWS_ACCOUNT_ID",_3=(f)=>async()=>{f?.logger?.debug("@aws-sdk/credential-provider-env - fromEnv");let h=process.env[QE],w=process.env[KE],s=process.env[GY],$=process.env[WY],r=process.env[zY],E=process.env[RY];if(h&&w){let U={accessKeyId:h,secretAccessKey:w,...s&&{sessionToken:s},...$&&{expiration:new Date($)},...r&&{credentialScope:r},...E&&{accountId:E}};return AY.setCredentialFeature(U,"CREDENTIALS_ENV_VARS","g"),U}throw new a("Unable to find environment variable credentials.",{logger:f?.logger})};var XY=B(()=>{AY=p(C1(),1);Y0()});var SY={};Th(SY,{fromEnv:()=>_3,ENV_SESSION:()=>GY,ENV_SECRET:()=>KE,ENV_KEY:()=>QE,ENV_EXPIRATION:()=>WY,ENV_CREDENTIAL_SCOPE:()=>zY,ENV_ACCOUNT_ID:()=>RY});var n3=B(()=>{XY()});import{Buffer as K_}from"buffer";import{request as Z_}from"http";function Ph(f){return new Promise((h,w)=>{let s=Z_({method:"GET",...f,hostname:f.hostname?.replace(/^\[(.+)\]$/,"$1")});s.on("error",($)=>{w(Object.assign(new k1("Unable to connect to instance metadata service"),$)),s.destroy()}),s.on("timeout",()=>{w(new k1("TimeoutError from instance metadata service")),s.destroy()}),s.on("response",($)=>{let{statusCode:r=400}=$;if(r<200||300<=r)w(Object.assign(new k1("Error response received from instance metadata service"),{statusCode:r})),s.destroy();let E=[];$.on("data",(U)=>{E.push(U)}),$.on("end",()=>{h(K_.concat(E)),s.destroy()})}),s.end()})}var ZE=B(()=>{Y0()});var JE=(f)=>Boolean(f)&&typeof f==="object"&&typeof f.AccessKeyId==="string"&&typeof f.SecretAccessKey==="string"&&typeof f.Token==="string"&&typeof f.Expiration==="string",VE=(f)=>({accessKeyId:f.AccessKeyId,secretAccessKey:f.SecretAccessKey,sessionToken:f.Token,expiration:new Date(f.Expiration),...f.AccountId&&{accountId:f.AccountId}});var J_=1000,V_=0,p$=({maxRetries:f=0,timeout:h=1000})=>({maxRetries:f,timeout:h});var u$=(f,h)=>{let w=f();for(let s=0;s<h;s++)w=w.catch(f);return w};import{parse as P_}from"url";var PE="AWS_CONTAINER_CREDENTIALS_FULL_URI",HE="AWS_CONTAINER_CREDENTIALS_RELATIVE_URI",e3="AWS_CONTAINER_AUTHORIZATION_TOKEN",H_=(f={})=>{let{timeout:h,maxRetries:w}=p$(f);return()=>u$(async()=>{let s=await y_({logger:f.logger}),$=JSON.parse(await N_(h,s));if(!JE($))throw new a("Invalid response received from instance metadata service.",{logger:f.logger});return VE($)},w)},N_=async(f,h)=>{if(process.env[e3])h.headers={...h.headers,Authorization:process.env[e3]};return(await Ph({...h,timeout:f})).toString()},D_="169.254.170.2",q_,k_,y_=async({logger:f})=>{if(process.env[HE])return{hostname:D_,path:process.env[HE]};if(process.env[PE]){let h=P_(process.env[PE]);if(!h.hostname||!(h.hostname in q_))throw new a(`${h.hostname} is not a valid container metadata service hostname`,{tryNextLink:!1,logger:f});if(!h.protocol||!(h.protocol in k_))throw new a(`${h.protocol} is not a valid container metadata service protocol`,{tryNextLink:!1,logger:f});return{...h,port:h.port?parseInt(h.port,10):void 0}}throw new a(`The container metadata credential provider cannot be used unless the ${HE} or ${PE} environment variable is set`,{tryNextLink:!1,logger:f})};var YY=B(()=>{Y0();ZE();q_={localhost:!0,"127.0.0.1":!0},k_={"http:":!0,"https:":!0}});var NE;var MY=B(()=>{Y0();NE=class NE extends a{constructor(f,h=!0){super(f,h);this.tryNextLink=h,this.name="InstanceMetadataV1FallbackError",Object.setPrototypeOf(this,NE.prototype)}}});var rw;var a3=B(()=>{(function(f){f.IPv4="http://169.254.169.254",f.IPv6="http://[fd00:ec2::254]"})(rw||(rw={}))});var QY;var KY=B(()=>{QY={environmentVariableSelector:(f)=>f.AWS_EC2_METADATA_SERVICE_ENDPOINT,configFileSelector:(f)=>f.ec2_metadata_service_endpoint,default:void 0}});var Hh;var o3=B(()=>{(function(f){f.IPv4="IPv4",f.IPv6="IPv6"})(Hh||(Hh={}))});var j_="AWS_EC2_METADATA_SERVICE_ENDPOINT_MODE",O_="ec2_metadata_service_endpoint_mode",ZY;var JY=B(()=>{o3();ZY={environmentVariableSelector:(f)=>f[j_],configFileSelector:(f)=>f[O_],default:Hh.IPv4}});var DE=async()=>O1(await l_()||await v_()),l_=async()=>z0(QY)(),v_=async()=>{let f=await z0(ZY)();switch(f){case Hh.IPv4:return rw.IPv4;case Hh.IPv6:return rw.IPv6;default:throw new Error(`Unsupported endpoint mode: ${f}. Select from ${Object.values(Hh)}`)}};var p3=B(()=>{Kh();pw();a3();KY();o3();JY()});var u3=(f,h)=>{let w=300+Math.floor(Math.random()*300),s=new Date(Date.now()+w*1000);h.warn(`Attempting credential expiration extension due to a credential service availability issue. A refresh of these credentials will be attempted after ${new Date(s)}.
43
- For more information, please visit: https://docs.aws.amazon.com/sdkref/latest/guide/feature-static-credentials.html`);let $=f.originalExpiration??f.expiration;return{...f,...$?{originalExpiration:$}:{},expiration:s}};var VY=(f,h={})=>{let w=h?.logger||console,s;return async()=>{let $;try{if($=await f(),$.expiration&&$.expiration.getTime()<Date.now())$=u3($,w)}catch(r){if(s)w.warn("Credential renew failed: ",r),$=u3(s,w);else throw r}return s=$,$}};var PY=()=>{};var DY="/latest/meta-data/iam/security-credentials/",b_="/latest/api/token",t3="AWS_EC2_METADATA_V1_DISABLED",HY="ec2_metadata_v1_disabled",NY="x-aws-ec2-metadata-token",m_=(f={})=>VY(d_(f),{logger:f.logger}),d_=(f={})=>{let h=!1,{logger:w,profile:s}=f,{timeout:$,maxRetries:r}=p$(f),E=async(U,T)=>{if(h||T.headers?.[NY]==null){let I=!1,L=!1,G=await z0({environmentVariableSelector:(X)=>{let Q=X[t3];if(L=!!Q&&Q!=="false",Q===void 0)throw new a(`${t3} not set in env, checking config file next.`,{logger:f.logger});return L},configFileSelector:(X)=>{let Q=X[HY];return I=!!Q&&Q!=="false",I},default:!1},{profile:s})();if(f.ec2MetadataV1Disabled||G){let X=[];if(f.ec2MetadataV1Disabled)X.push("credential provider initialization (runtime option ec2MetadataV1Disabled)");if(I)X.push(`config file profile (${HY})`);if(L)X.push(`process environment variable (${t3})`);throw new NE(`AWS EC2 Metadata v1 fallback has been blocked by AWS SDK configuration in the following: [${X.join(", ")}].`)}}let C=(await u$(async()=>{let I;try{I=await c_(T)}catch(L){if(L.statusCode===401)h=!1;throw L}return I},U)).trim();return u$(async()=>{let I;try{I=await g_(C,T,f)}catch(L){if(L.statusCode===401)h=!1;throw L}return I},U)};return async()=>{let U=await DE();if(h)return w?.debug("AWS SDK Instance Metadata","using v1 fallback (no token fetch)"),E(r,{...U,timeout:$});else{let T;try{T=(await i_({...U,timeout:$})).toString()}catch(F){if(F?.statusCode===400)throw Object.assign(F,{message:"EC2 Metadata token request returned error"});else if(F.message==="TimeoutError"||[403,404,405].includes(F.statusCode))h=!0;return w?.debug("AWS SDK Instance Metadata","using v1 fallback (initial)"),E(r,{...U,timeout:$})}return E(r,{...U,headers:{[NY]:T},timeout:$})}}},i_=async(f)=>Ph({...f,path:b_,method:"PUT",headers:{"x-aws-ec2-metadata-token-ttl-seconds":"21600"}}),c_=async(f)=>(await Ph({...f,path:DY})).toString(),g_=async(f,h,w)=>{let s=JSON.parse((await Ph({...h,path:DY+f})).toString());if(!JE(s))throw new a("Invalid response received from instance metadata service.",{logger:w.logger});return VE(s)};var qY=B(()=>{Kh();Y0();MY();ZE();p3();PY()});var kY=()=>{};var t$={};Th(t$,{providerConfigFromInit:()=>p$,httpRequest:()=>Ph,getInstanceMetadataEndpoint:()=>DE,fromInstanceMetadata:()=>m_,fromContainerMetadata:()=>H_,Endpoint:()=>rw,ENV_CMDS_RELATIVE_URI:()=>HE,ENV_CMDS_FULL_URI:()=>PE,ENV_CMDS_AUTH_TOKEN:()=>e3,DEFAULT_TIMEOUT:()=>J_,DEFAULT_MAX_RETRIES:()=>V_});var fr=B(()=>{YY();qY();kY();ZE();p3();a3()});function fF(f){let h=[];for(let w of Object.keys(f).sort()){let s=f[w];if(w=qE.escapeUri(w),Array.isArray(s))for(let $=0,r=s.length;$<r;$++)h.push(`${w}=${qE.escapeUri(s[$])}`);else{let $=w;if(s||typeof s==="string")$+=`=${qE.escapeUri(s)}`;h.push($)}}return h.join("&")}var qE;var hF=B(()=>{qE=p(z4(),1)});var yY;var jY=B(()=>{yY=["ECONNRESET","EPIPE","ETIMEDOUT"]});var wF=(f)=>{let h={};for(let w of Object.keys(f)){let s=f[w];h[w]=Array.isArray(s)?s.join(","):s}return h};var sF=()=>{};var a0;var Gs=B(()=>{a0={setTimeout:(f,h)=>setTimeout(f,h),clearTimeout:(f)=>clearTimeout(f)}});var OY=1000,lY=(f,h,w=0)=>{if(!w)return-1;let s=($)=>{let r=a0.setTimeout(()=>{f.destroy(),h(Object.assign(new Error(`Socket timed out without establishing a connection within ${w} ms`),{name:"TimeoutError"}))},w-$),E=(U)=>{if(U?.connecting)U.on("connect",()=>{a0.clearTimeout(r)});else a0.clearTimeout(r)};if(f.socket)E(f.socket);else f.on("socket",E)};if(w<2000)return s(0),0;return a0.setTimeout(s.bind(null,OY),OY)};var vY=B(()=>{Gs()});var x_=3000,bY=(f,{keepAlive:h,keepAliveMsecs:w},s=x_)=>{if(h!==!0)return-1;let $=()=>{if(f.socket)f.socket.setKeepAlive(h,w||0);else f.on("socket",(r)=>{r.setKeepAlive(h,w||0)})};if(s===0)return $(),0;return a0.setTimeout($,s)};var mY=B(()=>{Gs()});var dY=3000,iY=(f,h,w=gY)=>{let s=($)=>{let r=w-$,E=()=>{f.destroy(),h(Object.assign(new Error(`Connection timed out after ${w} ms`),{name:"TimeoutError"}))};if(f.socket)f.socket.setTimeout(r,E),f.on("close",()=>f.socket?.removeListener("timeout",E));else f.setTimeout(r,E)};if(0<w&&w<6000)return s(0),0;return a0.setTimeout(s.bind(null,w===0?0:dY),dY)};var cY=B(()=>{$F();Gs()});import{Readable as __}from"stream";async function rF(f,h,w=xY){let s=h.headers??{},$=s.Expect||s.expect,r=-1,E=!0;if($==="100-continue")E=await Promise.race([new Promise((U)=>{r=Number(a0.setTimeout(()=>U(!0),Math.max(xY,w)))}),new Promise((U)=>{f.on("continue",()=>{a0.clearTimeout(r),U(!0)}),f.on("response",()=>{a0.clearTimeout(r),U(!1)}),f.on("error",()=>{a0.clearTimeout(r),U(!1)})})]);if(E)n_(f,h.body)}function n_(f,h){if(h instanceof __){h.pipe(f);return}if(h){if(Buffer.isBuffer(h)||typeof h==="string"){f.end(h);return}let w=h;if(typeof w==="object"&&w.buffer&&typeof w.byteOffset==="number"&&typeof w.byteLength==="number"){f.end(Buffer.from(w.buffer,w.byteOffset,w.byteLength));return}f.end(Buffer.from(h));return}f.end()}var xY=6000;var EF=B(()=>{Gs()});import{Agent as _Y,request as e_}from"http";import{Agent as nY,request as a_}from"https";class rf{static create(f){if(typeof f?.handle==="function")return f;return new rf(f)}static checkSocketUsage(f,h,w=console){let{sockets:s,requests:$,maxSockets:r}=f;if(typeof r!=="number"||r===1/0)return h;let E=15000;if(Date.now()-E<h)return h;if(s&&$)for(let U in s){let T=s[U]?.length??0,F=$[U]?.length??0;if(T>=r&&F>=2*r)return w?.warn?.(`@smithy/node-http-handler:WARN - socket usage at capacity=${T} and ${F} additional requests are enqueued.
42
+ `)},ME;var i3=B(()=>{ux=Math.ceil(340282346638528860000000000000000000000),bS=b3,f_=/(-?(?:0|[1-9]\d*)(?:\.\d+)?(?:[eE][+-]?\d+)?)|(-?Infinity)|(NaN)/g,ME={warn:console.warn}});var w_,s_,iS=(f)=>{if(f===null||f===void 0)return;if(typeof f!=="string")throw new TypeError("RFC-3339 date-times must be expressed as strings");let h=s_.exec(f);if(!h)throw new TypeError("Invalid RFC-3339 date-time value");let[w,s,$,r,E,U,T,F]=h,C=d3(c3(s)),I=sw($,"month",1,12),L=sw(r,"day",1,31);return cS(C,I,L,{hours:E,minutes:U,seconds:T,fractionalMilliseconds:F})},$_,a$=(f)=>{if(f===null||f===void 0)return;if(typeof f!=="string")throw new TypeError("RFC-3339 date-times must be expressed as strings");let h=$_.exec(f);if(!h)throw new TypeError("Invalid RFC-3339 date-time value");let[w,s,$,r,E,U,T,F,C]=h,I=d3(c3(s)),L=sw($,"month",1,12),G=sw(r,"day",1,31),X=cS(I,L,G,{hours:E,minutes:U,seconds:T,fractionalMilliseconds:F});if(C.toUpperCase()!="Z")X.setTime(X.getTime()-F_(C));return X},GI0,WI0,zI0,Qf=(f)=>{if(f===null||f===void 0)return;let h;if(typeof f==="number")h=f;else if(typeof f==="string")h=b3(f);else if(typeof f==="object"&&f.tag===1)h=f.value;else throw new TypeError("Epoch timestamps must be expressed as floating point numbers or their string representation");if(Number.isNaN(h)||h===1/0||h===-1/0)throw new TypeError("Epoch timestamps must be valid, non-Infinite, non-NaN numerics");return new Date(Math.round(h*1000))},cS=(f,h,w,s)=>{let $=h-1;return E_(f,$,w),new Date(Date.UTC(f,$,w,sw(s.hours,"hour",0,23),sw(s.minutes,"minute",0,59),sw(s.seconds,"seconds",0,60),T_(s.fractionalMilliseconds)))},r_,E_=(f,h,w)=>{let s=r_[h];if(h===1&&U_(f))s=29;if(w>s)throw new TypeError(`Invalid day for ${w_[h]} in ${f}: ${w}`)},U_=(f)=>{return f%4===0&&(f%100!==0||f%400===0)},sw=(f,h,w,s)=>{let $=dS(c3(f));if($<w||$>s)throw new TypeError(`${h} must be between ${w} and ${s}, inclusive`);return $},T_=(f)=>{if(f===null||f===void 0)return 0;return mS("0."+f)*1000},F_=(f)=>{let h=f[0],w=1;if(h=="+")w=1;else if(h=="-")w=-1;else throw new TypeError(`Offset direction, ${h}, must be "+" or "-"`);let s=Number(f.substring(1,3)),$=Number(f.substring(4,6));return w*(s*60+$)*60*1000},c3=(f)=>{let h=0;while(h<f.length-1&&f.charAt(h)==="0")h++;if(h===0)return f;return f.slice(h)};var gS=B(()=>{i3();w_=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],s_=new RegExp(/^(\d{4})-(\d{2})-(\d{2})[tT](\d{2}):(\d{2}):(\d{2})(?:\.(\d+))?[zZ]$/),$_=new RegExp(/^(\d{4})-(\d{2})-(\d{2})[tT](\d{2}):(\d{2}):(\d{2})(?:\.(\d+))?(([-+]\d{2}\:\d{2})|[zZ])$/),GI0=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$/),WI0=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$/),zI0=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})$/),r_=[31,28,31,30,31,30,31,31,30,31,30,31]});var $f,l=(f,h={})=>{Object.entries(h).filter(([,s])=>s!==void 0).forEach(([s,$])=>{if(f[s]==null||f[s]==="")f[s]=$});let w=f.message||f.Message||"UnknownError";return f.message=w,delete f.Message,f};var g3=B(()=>{$f=class $f extends Error{constructor(f){super(f.message);Object.setPrototypeOf(this,Object.getPrototypeOf(this).constructor.prototype),this.name=f.name,this.$fault=f.$fault,this.$metadata=f.$metadata}static isInstance(f){if(!f)return!1;let h=f;return $f.prototype.isPrototypeOf(h)||Boolean(h.$fault)&&Boolean(h.$metadata)&&(h.$fault==="client"||h.$fault==="server")}static[Symbol.hasInstance](f){if(!f)return!1;let h=f;if(this===$f)return $f.isInstance(f);if($f.isInstance(f)){if(h.name&&this.name)return this.prototype.isPrototypeOf(f)||h.name===this.name;return this.prototype.isPrototypeOf(f)}return!1}}});var C_=({output:f,parsedBody:h,exceptionCtor:w,errorCode:s})=>{let $=I_(f),r=$.httpStatusCode?$.httpStatusCode+"":void 0,E=new w({name:h?.code||h?.Code||s||r||"UnknownError",$fault:"client",$metadata:$});throw l(E,h)},Ts=(f)=>{return({output:h,parsedBody:w,errorCode:s})=>{C_({output:h,parsedBody:w,exceptionCtor:f,errorCode:s})}},I_=(f)=>({httpStatusCode:f.statusCode,requestId:f.headers["x-amzn-requestid"]??f.headers["x-amzn-request-id"]??f.headers["x-amz-request-id"],extendedRequestId:f.headers["x-amz-id-2"],cfId:f.headers["x-amz-cf-id"]});var xS=B(()=>{g3()});var Fs=(f)=>{switch(f){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 _S=!1,Cs=(f)=>{if(f&&!_S&&parseInt(f.substring(1,f.indexOf(".")))<16)_S=!0};var L_;var nS=B(()=>{L_=p(yw(),1)});var x3,eS=(f)=>{let h=[];for(let w in x3.AlgorithmId){let s=x3.AlgorithmId[w];if(f[s]===void 0)continue;h.push({algorithmId:()=>s,checksumConstructor:()=>f[s]})}return{_checksumAlgorithms:h,addChecksumAlgorithm(w){this._checksumAlgorithms.push(w)},checksumAlgorithms(){return this._checksumAlgorithms}}},aS=(f)=>{let h={};return f.checksumAlgorithms().forEach((w)=>{h[w.algorithmId()]=w.checksumConstructor()}),h};var oS=B(()=>{x3=p(T1(),1)});var pS=(f)=>{let h=f.retryStrategy;return{setRetryStrategy(w){h=w},retryStrategy(){return h}}},uS=(f)=>{let h={};return h.retryStrategy=f.retryStrategy(),h};var Is=(f)=>{return{...eS(f),...pS(f)}},Ls=(f)=>{return{...aS(f),...uS(f)}};var tS=B(()=>{oS()});var fY=B(()=>{tS()});var A0=(f)=>Array.isArray(f)?f:[f];var o$=(f)=>{return f!=null};var Bs=function f(h){return Object.assign(new String(h),{deserializeJSON(){return JSON.parse(String(h))},toString(){return String(h)},toJSON(){return String(h)}})};var hY=B(()=>{Bs.from=(f)=>{if(f&&typeof f==="object"&&(f instanceof Bs||("deserializeJSON"in f)))return f;else if(typeof f==="string"||Object.getPrototypeOf(f)===String.prototype)return Bs(String(f));return Bs(JSON.stringify(f))};Bs.fromObject=Bs.from});class _f{trace(){}debug(){}info(){}warn(){}error(){}}function Y(f,h,w){let s,$,r;if(typeof h==="undefined"&&typeof w==="undefined")s={},r=f;else if(s=f,typeof h==="function")return $=h,r=w,B_(s,$,r);else r=h;for(let E of Object.keys(r)){if(!Array.isArray(r[E])){s[E]=r[E];continue}wY(s,null,r,E)}return s}var N0=(f,h)=>{let w={};for(let s in h)wY(w,f,h,s);return w},B_=(f,h,w)=>{return Y(f,Object.entries(w).reduce((s,[$,r])=>{if(Array.isArray(r))s[$]=r;else if(typeof r==="function")s[$]=[h,r()];else s[$]=[h,r];return s},{}))},wY=(f,h,w,s)=>{if(h!==null){let E=w[s];if(typeof E==="function")E=[,E];let[U=A_,T=G_,F=s]=E;if(typeof U==="function"&&U(h[F])||typeof U!=="function"&&!!U)f[s]=T(h[F]);return}let[$,r]=w[s];if(typeof r==="function"){let E,U=$===void 0&&(E=r())!=null,T=typeof $==="function"&&!!$(void 0)||typeof $!=="function"&&!!$;if(U)f[s]=E;else if(T)f[s]=r()}else{let E=$===void 0&&r!=null,U=typeof $==="function"&&!!$(r)||typeof $!=="function"&&!!$;if(E||U)f[s]=r}},A_=(f)=>f!=null,G_=(f)=>f;var W_;var sY=B(()=>{W_=p(yw(),1)});var $Y=(f)=>{if(f!==f)return"NaN";switch(f){case 1/0:return"Infinity";case-1/0:return"-Infinity";default:return f}};var v=(f)=>{if(f==null)return{};if(Array.isArray(f))return f.filter((h)=>h!=null).map(v);if(typeof f==="object"){let h={};for(let w of Object.keys(f)){if(f[w]==null)continue;h[w]=v(f[w])}return h}return f};var J=B(()=>{NS();DS();yS();gS();xS();g3();nS();fY();hY();i3();sY()});import{Readable as z_}from"stream";var rY=(f)=>f?.body instanceof z_||typeof ReadableStream!=="undefined"&&f?.body instanceof ReadableStream;var EY=()=>{};var R_=(f)=>(h,w)=>async(s)=>{let $=await f.retryStrategy(),r=await f.maxAttempts();if(X_($)){$=$;let E=await $.acquireInitialRetryToken(w.partition_id),U=new Error,T=0,F=0,{request:C}=s,I=n0.isInstance(C);if(I)C.headers[WE]=XS();while(!0)try{if(I)C.headers[zE]=`attempt=${T+1}; max=${r}`;let{response:L,output:G}=await h(s);return $.recordSuccess(E),G.$metadata.attempts=T+1,G.$metadata.totalRetryDelay=F,{response:L,output:G}}catch(L){let G=S_(L);if(U=y3(L),I&&rY(C))throw(w.logger instanceof _f?console:w.logger)?.warn("An error was encountered in a non-retryable streaming request."),U;try{E=await $.refreshRetryTokenForRetry(E,G)}catch(Q){if(!U.$metadata)U.$metadata={};throw U.$metadata.attempts=T+1,U.$metadata.totalRetryDelay=F,U}T=E.getRetryCount();let X=E.getRetryDelay();F+=X,await new Promise((Q)=>setTimeout(Q,X))}}else{if($=$,$?.mode)w.userAgent=[...w.userAgent||[],["cfg/retry-mode",$.mode]];return $.retry(h,s)}},X_=(f)=>typeof f.acquireInitialRetryToken!=="undefined"&&typeof f.refreshRetryTokenForRetry!=="undefined"&&typeof f.recordSuccess!=="undefined",S_=(f)=>{let h={error:f,errorType:Y_(f)},w=Q_(f.$response);if(w)h.retryAfterHint=w;return h},Y_=(f)=>{if(tw(f))return"THROTTLING";if(g$(f))return"TRANSIENT";if(XX(f))return"SERVER_ERROR";return"CLIENT_ERROR"},M_,As=(f)=>({applyToStack:(h)=>{h.add(R_(f),M_)}}),Q_=(f)=>{if(!ch.isInstance(f))return;let h=Object.keys(f.headers).find((r)=>r.toLowerCase()==="retry-after");if(!h)return;let w=f.headers[h],s=Number(w);if(!Number.isNaN(s))return new Date(s*1000);return new Date(w)};var UY=B(()=>{F1();x$();J();wf();SS();EY();M_={name:"retryMiddleware",tags:["RETRY"],step:"finalizeRequest",priority:"high",override:!0}});var $w=B(()=>{MS();j3();ZS();q3();JS();k3();UY()});var AY,QE="AWS_ACCESS_KEY_ID",KE="AWS_SECRET_ACCESS_KEY",GY="AWS_SESSION_TOKEN",WY="AWS_CREDENTIAL_EXPIRATION",zY="AWS_CREDENTIAL_SCOPE",RY="AWS_ACCOUNT_ID",_3=(f)=>async()=>{f?.logger?.debug("@aws-sdk/credential-provider-env - fromEnv");let h=process.env[QE],w=process.env[KE],s=process.env[GY],$=process.env[WY],r=process.env[zY],E=process.env[RY];if(h&&w){let U={accessKeyId:h,secretAccessKey:w,...s&&{sessionToken:s},...$&&{expiration:new Date($)},...r&&{credentialScope:r},...E&&{accountId:E}};return AY.setCredentialFeature(U,"CREDENTIALS_ENV_VARS","g"),U}throw new a("Unable to find environment variable credentials.",{logger:f?.logger})};var XY=B(()=>{AY=p(C1(),1);Y0()});var SY={};Th(SY,{fromEnv:()=>_3,ENV_SESSION:()=>GY,ENV_SECRET:()=>KE,ENV_KEY:()=>QE,ENV_EXPIRATION:()=>WY,ENV_CREDENTIAL_SCOPE:()=>zY,ENV_ACCOUNT_ID:()=>RY});var n3=B(()=>{XY()});import{Buffer as J_}from"buffer";import{request as V_}from"http";function Ph(f){return new Promise((h,w)=>{let s=V_({method:"GET",...f,hostname:f.hostname?.replace(/^\[(.+)\]$/,"$1")});s.on("error",($)=>{w(Object.assign(new k1("Unable to connect to instance metadata service"),$)),s.destroy()}),s.on("timeout",()=>{w(new k1("TimeoutError from instance metadata service")),s.destroy()}),s.on("response",($)=>{let{statusCode:r=400}=$;if(r<200||300<=r)w(Object.assign(new k1("Error response received from instance metadata service"),{statusCode:r})),s.destroy();let E=[];$.on("data",(U)=>{E.push(U)}),$.on("end",()=>{h(J_.concat(E)),s.destroy()})}),s.end()})}var ZE=B(()=>{Y0()});var JE=(f)=>Boolean(f)&&typeof f==="object"&&typeof f.AccessKeyId==="string"&&typeof f.SecretAccessKey==="string"&&typeof f.Token==="string"&&typeof f.Expiration==="string",VE=(f)=>({accessKeyId:f.AccessKeyId,secretAccessKey:f.SecretAccessKey,sessionToken:f.Token,expiration:new Date(f.Expiration),...f.AccountId&&{accountId:f.AccountId}});var P_=1000,H_=0,p$=({maxRetries:f=0,timeout:h=1000})=>({maxRetries:f,timeout:h});var u$=(f,h)=>{let w=f();for(let s=0;s<h;s++)w=w.catch(f);return w};import{parse as N_}from"url";var PE="AWS_CONTAINER_CREDENTIALS_FULL_URI",HE="AWS_CONTAINER_CREDENTIALS_RELATIVE_URI",e3="AWS_CONTAINER_AUTHORIZATION_TOKEN",D_=(f={})=>{let{timeout:h,maxRetries:w}=p$(f);return()=>u$(async()=>{let s=await O_({logger:f.logger}),$=JSON.parse(await q_(h,s));if(!JE($))throw new a("Invalid response received from instance metadata service.",{logger:f.logger});return VE($)},w)},q_=async(f,h)=>{if(process.env[e3])h.headers={...h.headers,Authorization:process.env[e3]};return(await Ph({...h,timeout:f})).toString()},k_="169.254.170.2",y_,j_,O_=async({logger:f})=>{if(process.env[HE])return{hostname:k_,path:process.env[HE]};if(process.env[PE]){let h=N_(process.env[PE]);if(!h.hostname||!(h.hostname in y_))throw new a(`${h.hostname} is not a valid container metadata service hostname`,{tryNextLink:!1,logger:f});if(!h.protocol||!(h.protocol in j_))throw new a(`${h.protocol} is not a valid container metadata service protocol`,{tryNextLink:!1,logger:f});return{...h,port:h.port?parseInt(h.port,10):void 0}}throw new a(`The container metadata credential provider cannot be used unless the ${HE} or ${PE} environment variable is set`,{tryNextLink:!1,logger:f})};var YY=B(()=>{Y0();ZE();y_={localhost:!0,"127.0.0.1":!0},j_={"http:":!0,"https:":!0}});var NE;var MY=B(()=>{Y0();NE=class NE extends a{constructor(f,h=!0){super(f,h);this.tryNextLink=h,this.name="InstanceMetadataV1FallbackError",Object.setPrototypeOf(this,NE.prototype)}}});var rw;var a3=B(()=>{(function(f){f.IPv4="http://169.254.169.254",f.IPv6="http://[fd00:ec2::254]"})(rw||(rw={}))});var QY;var KY=B(()=>{QY={environmentVariableSelector:(f)=>f.AWS_EC2_METADATA_SERVICE_ENDPOINT,configFileSelector:(f)=>f.ec2_metadata_service_endpoint,default:void 0}});var Hh;var o3=B(()=>{(function(f){f.IPv4="IPv4",f.IPv6="IPv6"})(Hh||(Hh={}))});var l_="AWS_EC2_METADATA_SERVICE_ENDPOINT_MODE",v_="ec2_metadata_service_endpoint_mode",ZY;var JY=B(()=>{o3();ZY={environmentVariableSelector:(f)=>f[l_],configFileSelector:(f)=>f[v_],default:Hh.IPv4}});var DE=async()=>O1(await b_()||await m_()),b_=async()=>z0(QY)(),m_=async()=>{let f=await z0(ZY)();switch(f){case Hh.IPv4:return rw.IPv4;case Hh.IPv6:return rw.IPv6;default:throw new Error(`Unsupported endpoint mode: ${f}. Select from ${Object.values(Hh)}`)}};var p3=B(()=>{Kh();pw();a3();KY();o3();JY()});var u3=(f,h)=>{let w=300+Math.floor(Math.random()*300),s=new Date(Date.now()+w*1000);h.warn(`Attempting credential expiration extension due to a credential service availability issue. A refresh of these credentials will be attempted after ${new Date(s)}.
43
+ For more information, please visit: https://docs.aws.amazon.com/sdkref/latest/guide/feature-static-credentials.html`);let $=f.originalExpiration??f.expiration;return{...f,...$?{originalExpiration:$}:{},expiration:s}};var VY=(f,h={})=>{let w=h?.logger||console,s;return async()=>{let $;try{if($=await f(),$.expiration&&$.expiration.getTime()<Date.now())$=u3($,w)}catch(r){if(s)w.warn("Credential renew failed: ",r),$=u3(s,w);else throw r}return s=$,$}};var PY=()=>{};var DY="/latest/meta-data/iam/security-credentials/",d_="/latest/api/token",t3="AWS_EC2_METADATA_V1_DISABLED",HY="ec2_metadata_v1_disabled",NY="x-aws-ec2-metadata-token",i_=(f={})=>VY(c_(f),{logger:f.logger}),c_=(f={})=>{let h=!1,{logger:w,profile:s}=f,{timeout:$,maxRetries:r}=p$(f),E=async(U,T)=>{if(h||T.headers?.[NY]==null){let I=!1,L=!1,G=await z0({environmentVariableSelector:(X)=>{let Q=X[t3];if(L=!!Q&&Q!=="false",Q===void 0)throw new a(`${t3} not set in env, checking config file next.`,{logger:f.logger});return L},configFileSelector:(X)=>{let Q=X[HY];return I=!!Q&&Q!=="false",I},default:!1},{profile:s})();if(f.ec2MetadataV1Disabled||G){let X=[];if(f.ec2MetadataV1Disabled)X.push("credential provider initialization (runtime option ec2MetadataV1Disabled)");if(I)X.push(`config file profile (${HY})`);if(L)X.push(`process environment variable (${t3})`);throw new NE(`AWS EC2 Metadata v1 fallback has been blocked by AWS SDK configuration in the following: [${X.join(", ")}].`)}}let C=(await u$(async()=>{let I;try{I=await x_(T)}catch(L){if(L.statusCode===401)h=!1;throw L}return I},U)).trim();return u$(async()=>{let I;try{I=await __(C,T,f)}catch(L){if(L.statusCode===401)h=!1;throw L}return I},U)};return async()=>{let U=await DE();if(h)return w?.debug("AWS SDK Instance Metadata","using v1 fallback (no token fetch)"),E(r,{...U,timeout:$});else{let T;try{T=(await g_({...U,timeout:$})).toString()}catch(F){if(F?.statusCode===400)throw Object.assign(F,{message:"EC2 Metadata token request returned error"});else if(F.message==="TimeoutError"||[403,404,405].includes(F.statusCode))h=!0;return w?.debug("AWS SDK Instance Metadata","using v1 fallback (initial)"),E(r,{...U,timeout:$})}return E(r,{...U,headers:{[NY]:T},timeout:$})}}},g_=async(f)=>Ph({...f,path:d_,method:"PUT",headers:{"x-aws-ec2-metadata-token-ttl-seconds":"21600"}}),x_=async(f)=>(await Ph({...f,path:DY})).toString(),__=async(f,h,w)=>{let s=JSON.parse((await Ph({...h,path:DY+f})).toString());if(!JE(s))throw new a("Invalid response received from instance metadata service.",{logger:w.logger});return VE(s)};var qY=B(()=>{Kh();Y0();MY();ZE();p3();PY()});var kY=()=>{};var t$={};Th(t$,{providerConfigFromInit:()=>p$,httpRequest:()=>Ph,getInstanceMetadataEndpoint:()=>DE,fromInstanceMetadata:()=>i_,fromContainerMetadata:()=>D_,Endpoint:()=>rw,ENV_CMDS_RELATIVE_URI:()=>HE,ENV_CMDS_FULL_URI:()=>PE,ENV_CMDS_AUTH_TOKEN:()=>e3,DEFAULT_TIMEOUT:()=>P_,DEFAULT_MAX_RETRIES:()=>H_});var fr=B(()=>{YY();qY();kY();ZE();p3();a3()});var hr=(f)=>encodeURIComponent(f).replace(/[!'()*]/g,n_),n_=(f)=>`%${f.charCodeAt(0).toString(16).toUpperCase()}`;var yY=()=>{};var jY=B(()=>{yY()});function fF(f){let h=[];for(let w of Object.keys(f).sort()){let s=f[w];if(w=hr(w),Array.isArray(s))for(let $=0,r=s.length;$<r;$++)h.push(`${w}=${hr(s[$])}`);else{let $=w;if(s||typeof s==="string")$+=`=${hr(s)}`;h.push($)}}return h.join("&")}var hF=B(()=>{jY()});var OY;var lY=B(()=>{OY=["ECONNRESET","EPIPE","ETIMEDOUT"]});var wF=(f)=>{let h={};for(let w of Object.keys(f)){let s=f[w];h[w]=Array.isArray(s)?s.join(","):s}return h};var sF=()=>{};var a0;var Gs=B(()=>{a0={setTimeout:(f,h)=>setTimeout(f,h),clearTimeout:(f)=>clearTimeout(f)}});var vY=1000,bY=(f,h,w=0)=>{if(!w)return-1;let s=($)=>{let r=a0.setTimeout(()=>{f.destroy(),h(Object.assign(new Error(`Socket timed out without establishing a connection within ${w} ms`),{name:"TimeoutError"}))},w-$),E=(U)=>{if(U?.connecting)U.on("connect",()=>{a0.clearTimeout(r)});else a0.clearTimeout(r)};if(f.socket)E(f.socket);else f.on("socket",E)};if(w<2000)return s(0),0;return a0.setTimeout(s.bind(null,vY),vY)};var mY=B(()=>{Gs()});var e_=3000,dY=(f,{keepAlive:h,keepAliveMsecs:w},s=e_)=>{if(h!==!0)return-1;let $=()=>{if(f.socket)f.socket.setKeepAlive(h,w||0);else f.on("socket",(r)=>{r.setKeepAlive(h,w||0)})};if(s===0)return $(),0;return a0.setTimeout($,s)};var iY=B(()=>{Gs()});var cY=3000,gY=(f,h,w=_Y)=>{let s=($)=>{let r=w-$,E=()=>{f.destroy(),h(Object.assign(new Error(`Connection timed out after ${w} ms`),{name:"TimeoutError"}))};if(f.socket)f.socket.setTimeout(r,E),f.on("close",()=>f.socket?.removeListener("timeout",E));else f.setTimeout(r,E)};if(0<w&&w<6000)return s(0),0;return a0.setTimeout(s.bind(null,w===0?0:cY),cY)};var xY=B(()=>{$F();Gs()});import{Readable as a_}from"stream";async function rF(f,h,w=nY){let s=h.headers??{},$=s.Expect||s.expect,r=-1,E=!0;if($==="100-continue")E=await Promise.race([new Promise((U)=>{r=Number(a0.setTimeout(()=>U(!0),Math.max(nY,w)))}),new Promise((U)=>{f.on("continue",()=>{a0.clearTimeout(r),U(!0)}),f.on("response",()=>{a0.clearTimeout(r),U(!1)}),f.on("error",()=>{a0.clearTimeout(r),U(!1)})})]);if(E)o_(f,h.body)}function o_(f,h){if(h instanceof a_){h.pipe(f);return}if(h){if(Buffer.isBuffer(h)||typeof h==="string"){f.end(h);return}let w=h;if(typeof w==="object"&&w.buffer&&typeof w.byteOffset==="number"&&typeof w.byteLength==="number"){f.end(Buffer.from(w.buffer,w.byteOffset,w.byteLength));return}f.end(Buffer.from(h));return}f.end()}var nY=6000;var EF=B(()=>{Gs()});import{Agent as eY,request as p_}from"http";import{Agent as aY,request as u_}from"https";class rf{static create(f){if(typeof f?.handle==="function")return f;return new rf(f)}static checkSocketUsage(f,h,w=console){let{sockets:s,requests:$,maxSockets:r}=f;if(typeof r!=="number"||r===1/0)return h;let E=15000;if(Date.now()-E<h)return h;if(s&&$)for(let U in s){let T=s[U]?.length??0,F=$[U]?.length??0;if(T>=r&&F>=2*r)return w?.warn?.(`@smithy/node-http-handler:WARN - socket usage at capacity=${T} and ${F} additional requests are enqueued.
44
44
  See https://docs.aws.amazon.com/sdk-for-javascript/v3/developer-guide/node-configuring-maxsockets.html
45
- or increase socketAcquisitionWarningTimeout=(millis) in the NodeHttpHandler config.`),Date.now()}return h}constructor(f){this.socketWarningTimestamp=0,this.metadata={handlerProtocol:"http/1.1"},this.configProvider=new Promise((h,w)=>{if(typeof f==="function")f().then((s)=>{h(this.resolveDefaultConfig(s))}).catch(w);else h(this.resolveDefaultConfig(f))})}resolveDefaultConfig(f){let{requestTimeout:h,connectionTimeout:w,socketTimeout:s,socketAcquisitionWarningTimeout:$,httpAgent:r,httpsAgent:E}=f||{},U=!0,T=50;return{connectionTimeout:w,requestTimeout:h??s,socketAcquisitionWarningTimeout:$,httpAgent:(()=>{if(r instanceof _Y||typeof r?.destroy==="function")return r;return new _Y({keepAlive:!0,maxSockets:50,...r})})(),httpsAgent:(()=>{if(E instanceof nY||typeof E?.destroy==="function")return E;return new nY({keepAlive:!0,maxSockets:50,...E})})(),logger:console}}destroy(){this.config?.httpAgent?.destroy(),this.config?.httpsAgent?.destroy()}async handle(f,{abortSignal:h}={}){if(!this.config)this.config=await this.configProvider;return new Promise((w,s)=>{let $=void 0,r=[],E=async(N)=>{await $,r.forEach(a0.clearTimeout),w(N)},U=async(N)=>{await $,r.forEach(a0.clearTimeout),s(N)};if(!this.config)throw new Error("Node HTTP request handler config is not resolved");if(h?.aborted){let N=new Error("Request aborted");N.name="AbortError",U(N);return}let T=f.protocol==="https:",F=T?this.config.httpsAgent:this.config.httpAgent;r.push(a0.setTimeout(()=>{this.socketWarningTimestamp=rf.checkSocketUsage(F,this.socketWarningTimestamp,this.config.logger)},this.config.socketAcquisitionWarningTimeout??(this.config.requestTimeout??2000)+(this.config.connectionTimeout??1000)));let C=fF(f.query||{}),I=void 0;if(f.username!=null||f.password!=null){let N=f.username??"",y=f.password??"";I=`${N}:${y}`}let L=f.path;if(C)L+=`?${C}`;if(f.fragment)L+=`#${f.fragment}`;let G=f.hostname??"";if(G[0]==="["&&G.endsWith("]"))G=f.hostname.slice(1,-1);else G=f.hostname;let X={headers:f.headers,host:G,method:f.method,path:L,port:f.port,agent:F,auth:I},M=(T?a_:e_)(X,(N)=>{let y=new ch({statusCode:N.statusCode||-1,reason:N.statusMessage,headers:wF(N.headers),body:N});E({response:y})});if(M.on("error",(N)=>{if(yY.includes(N.code))U(Object.assign(N,{name:"TimeoutError"}));else U(N)}),h){let N=()=>{M.destroy();let y=new Error("Request aborted");y.name="AbortError",U(y)};if(typeof h.addEventListener==="function"){let y=h;y.addEventListener("abort",N,{once:!0}),M.once("close",()=>y.removeEventListener("abort",N))}else h.onabort=N}r.push(lY(M,U,this.config.connectionTimeout)),r.push(iY(M,U,this.config.requestTimeout));let q=X.agent;if(typeof q==="object"&&"keepAlive"in q)r.push(bY(M,{keepAlive:q.keepAlive,keepAliveMsecs:q.keepAliveMsecs}));$=rF(M,f,this.config.requestTimeout).catch((N)=>{return r.forEach(a0.clearTimeout),s(N)})})}updateHttpClientConfig(f,h){this.config=void 0,this.configProvider=this.configProvider.then((w)=>{return{...w,[f]:h}})}httpHandlerConfigs(){return this.config??{}}}var gY=0;var $F=B(()=>{F1();hF();jY();sF();vY();mY();cY();Gs();EF()});var eY=()=>{};var aY=B(()=>{eY()});var oY=B(()=>{F1();hF();sF();aY();EF()});import{Writable as o_}from"stream";var UF;var pY=B(()=>{UF=class UF extends o_{constructor(){super(...arguments);this.bufferedBytes=[]}_write(f,h,w){this.bufferedBytes.push(f),w()}}});async function u_(f){let h=[],w=f.getReader(),s=!1,$=0;while(!s){let{done:U,value:T}=await w.read();if(T)h.push(T),$+=T.length;s=U}let r=new Uint8Array($),E=0;for(let U of h)r.set(U,E),E+=U.length;return r}var Ws=(f)=>{if(p_(f))return u_(f);return new Promise((h,w)=>{let s=new UF;f.pipe(s),f.on("error",($)=>{s.end(),w($)}),s.on("error",w),s.on("finish",function(){let $=new Uint8Array(Buffer.concat(this.bufferedBytes));h($)})})},p_=(f)=>typeof ReadableStream==="function"&&f instanceof ReadableStream;var uY=B(()=>{pY()});var hr=B(()=>{$F();oY();uY()});var t_="169.254.170.2",fn="169.254.170.23",hn="[fd00:ec2::23]",tY=(f,h)=>{if(f.protocol==="https:")return;if(f.hostname===t_||f.hostname===fn||f.hostname===hn)return;if(f.hostname.includes("[")){if(f.hostname==="[::1]"||f.hostname==="[0000:0000:0000:0000:0000:0000:0000:0001]")return}else{if(f.hostname==="localhost")return;let w=f.hostname.split("."),s=($)=>{let r=parseInt($,10);return 0<=r&&r<=255};if(w[0]==="127"&&s(w[1])&&s(w[2])&&s(w[3])&&w.length===4)return}throw new a(`URL not accepted. It must either be HTTPS or match one of the following:
45
+ or increase socketAcquisitionWarningTimeout=(millis) in the NodeHttpHandler config.`),Date.now()}return h}constructor(f){this.socketWarningTimestamp=0,this.metadata={handlerProtocol:"http/1.1"},this.configProvider=new Promise((h,w)=>{if(typeof f==="function")f().then((s)=>{h(this.resolveDefaultConfig(s))}).catch(w);else h(this.resolveDefaultConfig(f))})}resolveDefaultConfig(f){let{requestTimeout:h,connectionTimeout:w,socketTimeout:s,socketAcquisitionWarningTimeout:$,httpAgent:r,httpsAgent:E}=f||{},U=!0,T=50;return{connectionTimeout:w,requestTimeout:h??s,socketAcquisitionWarningTimeout:$,httpAgent:(()=>{if(r instanceof eY||typeof r?.destroy==="function")return r;return new eY({keepAlive:!0,maxSockets:50,...r})})(),httpsAgent:(()=>{if(E instanceof aY||typeof E?.destroy==="function")return E;return new aY({keepAlive:!0,maxSockets:50,...E})})(),logger:console}}destroy(){this.config?.httpAgent?.destroy(),this.config?.httpsAgent?.destroy()}async handle(f,{abortSignal:h}={}){if(!this.config)this.config=await this.configProvider;return new Promise((w,s)=>{let $=void 0,r=[],E=async(N)=>{await $,r.forEach(a0.clearTimeout),w(N)},U=async(N)=>{await $,r.forEach(a0.clearTimeout),s(N)};if(!this.config)throw new Error("Node HTTP request handler config is not resolved");if(h?.aborted){let N=new Error("Request aborted");N.name="AbortError",U(N);return}let T=f.protocol==="https:",F=T?this.config.httpsAgent:this.config.httpAgent;r.push(a0.setTimeout(()=>{this.socketWarningTimestamp=rf.checkSocketUsage(F,this.socketWarningTimestamp,this.config.logger)},this.config.socketAcquisitionWarningTimeout??(this.config.requestTimeout??2000)+(this.config.connectionTimeout??1000)));let C=fF(f.query||{}),I=void 0;if(f.username!=null||f.password!=null){let N=f.username??"",y=f.password??"";I=`${N}:${y}`}let L=f.path;if(C)L+=`?${C}`;if(f.fragment)L+=`#${f.fragment}`;let G=f.hostname??"";if(G[0]==="["&&G.endsWith("]"))G=f.hostname.slice(1,-1);else G=f.hostname;let X={headers:f.headers,host:G,method:f.method,path:L,port:f.port,agent:F,auth:I},M=(T?u_:p_)(X,(N)=>{let y=new ch({statusCode:N.statusCode||-1,reason:N.statusMessage,headers:wF(N.headers),body:N});E({response:y})});if(M.on("error",(N)=>{if(OY.includes(N.code))U(Object.assign(N,{name:"TimeoutError"}));else U(N)}),h){let N=()=>{M.destroy();let y=new Error("Request aborted");y.name="AbortError",U(y)};if(typeof h.addEventListener==="function"){let y=h;y.addEventListener("abort",N,{once:!0}),M.once("close",()=>y.removeEventListener("abort",N))}else h.onabort=N}r.push(bY(M,U,this.config.connectionTimeout)),r.push(gY(M,U,this.config.requestTimeout));let q=X.agent;if(typeof q==="object"&&"keepAlive"in q)r.push(dY(M,{keepAlive:q.keepAlive,keepAliveMsecs:q.keepAliveMsecs}));$=rF(M,f,this.config.requestTimeout).catch((N)=>{return r.forEach(a0.clearTimeout),s(N)})})}updateHttpClientConfig(f,h){this.config=void 0,this.configProvider=this.configProvider.then((w)=>{return{...w,[f]:h}})}httpHandlerConfigs(){return this.config??{}}}var _Y=0;var $F=B(()=>{F1();hF();lY();sF();mY();iY();xY();Gs();EF()});var oY=()=>{};var pY=B(()=>{oY()});var uY=B(()=>{F1();hF();sF();pY();EF()});import{Writable as t_}from"stream";var UF;var tY=B(()=>{UF=class UF extends t_{constructor(){super(...arguments);this.bufferedBytes=[]}_write(f,h,w){this.bufferedBytes.push(f),w()}}});async function hn(f){let h=[],w=f.getReader(),s=!1,$=0;while(!s){let{done:U,value:T}=await w.read();if(T)h.push(T),$+=T.length;s=U}let r=new Uint8Array($),E=0;for(let U of h)r.set(U,E),E+=U.length;return r}var Ws=(f)=>{if(fn(f))return hn(f);return new Promise((h,w)=>{let s=new UF;f.pipe(s),f.on("error",($)=>{s.end(),w($)}),s.on("error",w),s.on("finish",function(){let $=new Uint8Array(Buffer.concat(this.bufferedBytes));h($)})})},fn=(f)=>typeof ReadableStream==="function"&&f instanceof ReadableStream;var f9=B(()=>{tY()});var wr=B(()=>{$F();uY();f9()});var wn="169.254.170.2",sn="169.254.170.23",$n="[fd00:ec2::23]",h9=(f,h)=>{if(f.protocol==="https:")return;if(f.hostname===wn||f.hostname===sn||f.hostname===$n)return;if(f.hostname.includes("[")){if(f.hostname==="[::1]"||f.hostname==="[0000:0000:0000:0000:0000:0000:0000:0001]")return}else{if(f.hostname==="localhost")return;let w=f.hostname.split("."),s=($)=>{let r=parseInt($,10);return 0<=r&&r<=255};if(w[0]==="127"&&s(w[1])&&s(w[2])&&s(w[3])&&w.length===4)return}throw new a(`URL not accepted. It must either be HTTPS or match one of the following:
46
46
  - loopback CIDR 127.0.0.0/8 or [::1/128]
47
47
  - ECS container host 169.254.170.2
48
- - EKS container host 169.254.170.23 or [fd00:ec2::23]`,{logger:h})};var f9=B(()=>{Y0()});function w9(f){return new n0({protocol:f.protocol,hostname:f.hostname,port:Number(f.port),path:f.pathname,query:Array.from(f.searchParams.entries()).reduce((h,[w,s])=>{return h[w]=s,h},{}),fragment:f.hash})}async function s9(f,h){let s=await h9.sdkStreamMixin(f.body).transformToString();if(f.statusCode===200){let $=JSON.parse(s);if(typeof $.AccessKeyId!=="string"||typeof $.SecretAccessKey!=="string"||typeof $.Token!=="string"||typeof $.Expiration!=="string")throw new a("HTTP credential provider response not of the required format, an object matching: { AccessKeyId: string, SecretAccessKey: string, Token: string, Expiration: string(rfc3339) }",{logger:h});return{accessKeyId:$.AccessKeyId,secretAccessKey:$.SecretAccessKey,sessionToken:$.Token,expiration:iS($.Expiration)}}if(f.statusCode>=400&&f.statusCode<500){let $={};try{$=JSON.parse(s)}catch(r){}throw Object.assign(new a(`Server responded with status: ${f.statusCode}`,{logger:h}),{Code:$.Code,Message:$.Message})}throw new a(`Server responded with status: ${f.statusCode}`,{logger:h})}var h9;var $9=B(()=>{Y0();F1();J();h9=p(E2(),1)});var r9=(f,h,w)=>{return async()=>{for(let s=0;s<h;++s)try{return await f()}catch($){await new Promise((r)=>setTimeout(r,w))}return await f()}};import wn from"fs/promises";var E9,sn="AWS_CONTAINER_CREDENTIALS_RELATIVE_URI",$n="http://169.254.170.2",rn="AWS_CONTAINER_CREDENTIALS_FULL_URI",En="AWS_CONTAINER_AUTHORIZATION_TOKEN_FILE",Un="AWS_CONTAINER_AUTHORIZATION_TOKEN",U9=(f={})=>{f.logger?.debug("@aws-sdk/credential-provider-http - fromHttp");let h,w=f.awsContainerCredentialsRelativeUri??process.env[sn],s=f.awsContainerCredentialsFullUri??process.env[rn],$=f.awsContainerAuthorizationToken??process.env[Un],r=f.awsContainerAuthorizationTokenFile??process.env[En],E=f.logger?.constructor?.name==="NoOpLogger"||!f.logger?console.warn:f.logger.warn;if(w&&s)E("@aws-sdk/credential-provider-http: you have set both awsContainerCredentialsRelativeUri and awsContainerCredentialsFullUri."),E("awsContainerCredentialsFullUri will take precedence.");if($&&r)E("@aws-sdk/credential-provider-http: you have set both awsContainerAuthorizationToken and awsContainerAuthorizationTokenFile."),E("awsContainerAuthorizationToken will take precedence.");if(s)h=s;else if(w)h=`${$n}${w}`;else throw new a(`No HTTP credential provider host provided.
49
- Set AWS_CONTAINER_CREDENTIALS_FULL_URI or AWS_CONTAINER_CREDENTIALS_RELATIVE_URI.`,{logger:f.logger});let U=new URL(h);tY(U,f.logger);let T=new rf({requestTimeout:f.timeout??1000,connectionTimeout:f.timeout??1000});return r9(async()=>{let F=w9(U);if($)F.headers.Authorization=$;else if(r)F.headers.Authorization=(await wn.readFile(r)).toString();try{let C=await T.handle(F);return s9(C.response).then((I)=>E9.setCredentialFeature(I,"CREDENTIALS_HTTP","z"))}catch(C){throw new a(String(C),{logger:f.logger})}},f.maxRetries??3,f.timeout??1000)};var T9=B(()=>{E9=p(C1(),1);hr();Y0();f9();$9()});var TF={};Th(TF,{fromHttp:()=>U9});var FF=B(()=>{T9()});var CF=(f)=>f&&(typeof f.sso_start_url==="string"||typeof f.sso_account_id==="string"||typeof f.sso_session==="string"||typeof f.sso_region==="string"||typeof f.sso_role_name==="string");var I9=300000,zs="To refresh this SSO session run 'aws sso login' with the corresponding profile.";var LF=H((iA0,W9)=>{var{defineProperty:kE,getOwnPropertyDescriptor:Tn,getOwnPropertyNames:Fn}=Object,Cn=Object.prototype.hasOwnProperty,IF=(f,h)=>kE(f,"name",{value:h,configurable:!0}),In=(f,h)=>{for(var w in h)kE(f,w,{get:h[w],enumerable:!0})},Ln=(f,h,w,s)=>{if(h&&typeof h==="object"||typeof h==="function"){for(let $ of Fn(h))if(!Cn.call(f,$)&&$!==w)kE(f,$,{get:()=>h[$],enumerable:!(s=Tn(h,$))||s.enumerable})}return f},Bn=(f)=>Ln(kE({},"__esModule",{value:!0}),f),L9={};In(L9,{getHostHeaderPlugin:()=>Gn,hostHeaderMiddleware:()=>A9,hostHeaderMiddlewareOptions:()=>G9,resolveHostHeaderConfig:()=>B9});W9.exports=Bn(L9);var An=t0();function B9(f){return f}IF(B9,"resolveHostHeaderConfig");var A9=IF((f)=>(h)=>async(w)=>{if(!An.HttpRequest.isInstance(w.request))return h(w);let{request:s}=w,{handlerProtocol:$=""}=f.requestHandler.metadata||{};if($.indexOf("h2")>=0&&!s.headers[":authority"])delete s.headers.host,s.headers[":authority"]=s.hostname+(s.port?":"+s.port:"");else if(!s.headers.host){let r=s.hostname;if(s.port!=null)r+=`:${s.port}`;s.headers.host=r}return h(w)},"hostHeaderMiddleware"),G9={name:"hostHeaderMiddleware",step:"build",priority:"low",tags:["HOST"],override:!0},Gn=IF((f)=>({applyToStack:(h)=>{h.add(A9(f),G9)}}),"getHostHeaderPlugin")});var BF=H((cA0,Y9)=>{var{defineProperty:yE,getOwnPropertyDescriptor:Wn,getOwnPropertyNames:zn}=Object,Rn=Object.prototype.hasOwnProperty,z9=(f,h)=>yE(f,"name",{value:h,configurable:!0}),Xn=(f,h)=>{for(var w in h)yE(f,w,{get:h[w],enumerable:!0})},Sn=(f,h,w,s)=>{if(h&&typeof h==="object"||typeof h==="function"){for(let $ of zn(h))if(!Rn.call(f,$)&&$!==w)yE(f,$,{get:()=>h[$],enumerable:!(s=Wn(h,$))||s.enumerable})}return f},Yn=(f)=>Sn(yE({},"__esModule",{value:!0}),f),R9={};Xn(R9,{getLoggerPlugin:()=>Mn,loggerMiddleware:()=>X9,loggerMiddlewareOptions:()=>S9});Y9.exports=Yn(R9);var X9=z9(()=>(f,h)=>async(w)=>{try{let s=await f(w),{clientName:$,commandName:r,logger:E,dynamoDbDocumentClientOptions:U={}}=h,{overrideInputFilterSensitiveLog:T,overrideOutputFilterSensitiveLog:F}=U,C=T??h.inputFilterSensitiveLog,I=F??h.outputFilterSensitiveLog,{$metadata:L,...G}=s.output;return E?.info?.({clientName:$,commandName:r,input:C(w.input),output:I(G),metadata:L}),s}catch(s){let{clientName:$,commandName:r,logger:E,dynamoDbDocumentClientOptions:U={}}=h,{overrideInputFilterSensitiveLog:T}=U,F=T??h.inputFilterSensitiveLog;throw E?.error?.({clientName:$,commandName:r,input:F(w.input),error:s,metadata:s.$metadata}),s}},"loggerMiddleware"),S9={name:"loggerMiddleware",tags:["LOGGER"],step:"initialize",override:!0},Mn=z9((f)=>({applyToStack:(h)=>{h.add(X9(),S9)}}),"getLoggerPlugin")});var GF=H((gA0,Z9)=>{var{defineProperty:OE,getOwnPropertyDescriptor:Qn,getOwnPropertyNames:Kn}=Object,Zn=Object.prototype.hasOwnProperty,jE=(f,h)=>OE(f,"name",{value:h,configurable:!0}),Jn=(f,h)=>{for(var w in h)OE(f,w,{get:h[w],enumerable:!0})},Vn=(f,h,w,s)=>{if(h&&typeof h==="object"||typeof h==="function"){for(let $ of Kn(h))if(!Zn.call(f,$)&&$!==w)OE(f,$,{get:()=>h[$],enumerable:!(s=Qn(h,$))||s.enumerable})}return f},Pn=(f)=>Vn(OE({},"__esModule",{value:!0}),f),M9={};Jn(M9,{addRecursionDetectionMiddlewareOptions:()=>K9,getRecursionDetectionPlugin:()=>qn,recursionDetectionMiddleware:()=>Q9});Z9.exports=Pn(M9);var Hn=t0(),AF="X-Amzn-Trace-Id",Nn="AWS_LAMBDA_FUNCTION_NAME",Dn="_X_AMZN_TRACE_ID",Q9=jE((f)=>(h)=>async(w)=>{let{request:s}=w;if(!Hn.HttpRequest.isInstance(s)||f.runtime!=="node")return h(w);let $=Object.keys(s.headers??{}).find((T)=>T.toLowerCase()===AF.toLowerCase())??AF;if(s.headers.hasOwnProperty($))return h(w);let r=process.env[Nn],E=process.env[Dn],U=jE((T)=>typeof T==="string"&&T.length>0,"nonEmptyString");if(U(r)&&U(E))s.headers[AF]=E;return h({...w,request:s})},"recursionDetectionMiddleware"),K9={step:"build",tags:["RECURSION_DETECTION"],name:"recursionDetectionMiddleware",override:!0,priority:"low"},qn=jE((f)=>({applyToStack:jE((h)=>{h.add(Q9(f),K9)},"applyToStack")}),"getRecursionDetectionPlugin")});var bE=H((xA0,y9)=>{var{defineProperty:lE,getOwnPropertyDescriptor:kn,getOwnPropertyNames:yn}=Object,jn=Object.prototype.hasOwnProperty,Q0=(f,h)=>lE(f,"name",{value:h,configurable:!0}),On=(f,h)=>{for(var w in h)lE(f,w,{get:h[w],enumerable:!0})},ln=(f,h,w,s)=>{if(h&&typeof h==="object"||typeof h==="function"){for(let $ of yn(h))if(!jn.call(f,$)&&$!==w)lE(f,$,{get:()=>h[$],enumerable:!(s=kn(h,$))||s.enumerable})}return f},vn=(f)=>ln(lE({},"__esModule",{value:!0}),f),J9={};On(J9,{EndpointCache:()=>bn,EndpointError:()=>Y1,customEndpointFunctions:()=>zF,isIpAddress:()=>V9,isValidHostLabel:()=>XF,resolveEndpoint:()=>re});y9.exports=vn(J9);var bn=class{constructor({size:f,params:h}){if(this.data=new Map,this.parameters=[],this.capacity=f??50,h)this.parameters=h}static{Q0(this,"EndpointCache")}get(f,h){let w=this.hash(f);if(w===!1)return h();if(!this.data.has(w)){if(this.data.size>this.capacity+10){let s=this.data.keys(),$=0;while(!0){let{value:r,done:E}=s.next();if(this.data.delete(r),E||++$>10)break}}this.data.set(w,h())}return this.data.get(w)}size(){return this.data.size}hash(f){let h="",{parameters:w}=this;if(w.length===0)return!1;for(let s of w){let $=String(f[s]??"");if($.includes("|;"))return!1;h+=$+"|;"}return h}},mn=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}$"),V9=Q0((f)=>mn.test(f)||f.startsWith("[")&&f.endsWith("]"),"isIpAddress"),dn=new RegExp("^(?!.*-$)(?!-)[a-zA-Z0-9-]{1,63}$"),XF=Q0((f,h=!1)=>{if(!h)return dn.test(f);let w=f.split(".");for(let s of w)if(!XF(s))return!1;return!0},"isValidHostLabel"),zF={},wr="endpoints";function nf(f){if(typeof f!=="object"||f==null)return f;if("ref"in f)return`$${nf(f.ref)}`;if("fn"in f)return`${f.fn}(${(f.argv||[]).map(nf).join(", ")})`;return JSON.stringify(f,null,2)}Q0(nf,"toDebugString");var Y1=class extends Error{static{Q0(this,"EndpointError")}constructor(f){super(f);this.name="EndpointError"}},cn=Q0((f,h)=>f===h,"booleanEquals"),gn=Q0((f)=>{let h=f.split("."),w=[];for(let s of h){let $=s.indexOf("[");if($!==-1){if(s.indexOf("]")!==s.length-1)throw new Y1(`Path: '${f}' does not end with ']'`);let r=s.slice($+1,-1);if(Number.isNaN(parseInt(r)))throw new Y1(`Invalid array index: '${r}' in path: '${f}'`);if($!==0)w.push(s.slice(0,$));w.push(r)}else w.push(s)}return w},"getAttrPathList"),P9=Q0((f,h)=>gn(h).reduce((w,s)=>{if(typeof w!=="object")throw new Y1(`Index '${s}' in '${h}' not found in '${JSON.stringify(f)}'`);else if(Array.isArray(w))return w[parseInt(s)];return w[s]},f),"getAttr"),xn=Q0((f)=>f!=null,"isSet"),_n=Q0((f)=>!f,"not"),RF=T1(),WF={[RF.EndpointURLScheme.HTTP]:80,[RF.EndpointURLScheme.HTTPS]:443},nn=Q0((f)=>{let h=(()=>{try{if(f instanceof URL)return f;if(typeof f==="object"&&"hostname"in f){let{hostname:L,port:G,protocol:X="",path:Q="",query:M={}}=f,q=new URL(`${X}//${L}${G?`:${G}`:""}${Q}`);return q.search=Object.entries(M).map(([N,y])=>`${N}=${y}`).join("&"),q}return new URL(f)}catch(L){return null}})();if(!h)return console.error(`Unable to parse ${JSON.stringify(f)} as a whatwg URL.`),null;let w=h.href,{host:s,hostname:$,pathname:r,protocol:E,search:U}=h;if(U)return null;let T=E.slice(0,-1);if(!Object.values(RF.EndpointURLScheme).includes(T))return null;let F=V9($),C=w.includes(`${s}:${WF[T]}`)||typeof f==="string"&&f.includes(`${s}:${WF[T]}`),I=`${s}${C?`:${WF[T]}`:""}`;return{scheme:T,authority:I,path:r,normalizedPath:r.endsWith("/")?r:`${r}/`,isIp:F}},"parseURL"),en=Q0((f,h)=>f===h,"stringEquals"),an=Q0((f,h,w,s)=>{if(h>=w||f.length<w)return null;if(!s)return f.substring(h,w);return f.substring(f.length-w,f.length-h)},"substring"),on=Q0((f)=>encodeURIComponent(f).replace(/[!*'()]/g,(h)=>`%${h.charCodeAt(0).toString(16).toUpperCase()}`),"uriEncode"),pn={booleanEquals:cn,getAttr:P9,isSet:xn,isValidHostLabel:XF,not:_n,parseURL:nn,stringEquals:en,substring:an,uriEncode:on},H9=Q0((f,h)=>{let w=[],s={...h.endpointParams,...h.referenceRecord},$=0;while($<f.length){let r=f.indexOf("{",$);if(r===-1){w.push(f.slice($));break}w.push(f.slice($,r));let E=f.indexOf("}",r);if(E===-1){w.push(f.slice(r));break}if(f[r+1]==="{"&&f[E+1]==="}")w.push(f.slice(r+1,E)),$=E+2;let U=f.substring(r+1,E);if(U.includes("#")){let[T,F]=U.split("#");w.push(P9(s[T],F))}else w.push(s[U]);$=E+1}return w.join("")},"evaluateTemplate"),un=Q0(({ref:f},h)=>{return{...h.endpointParams,...h.referenceRecord}[f]},"getReferenceValue"),vE=Q0((f,h,w)=>{if(typeof f==="string")return H9(f,w);else if(f.fn)return N9(f,w);else if(f.ref)return un(f,w);throw new Y1(`'${h}': ${String(f)} is not a string, function or reference.`)},"evaluateExpression"),N9=Q0(({fn:f,argv:h},w)=>{let s=h.map((r)=>["boolean","number"].includes(typeof r)?r:vE(r,"arg",w)),$=f.split(".");if($[0]in zF&&$[1]!=null)return zF[$[0]][$[1]](...s);return pn[f](...s)},"callFunction"),tn=Q0(({assign:f,...h},w)=>{if(f&&f in w.referenceRecord)throw new Y1(`'${f}' is already defined in Reference Record.`);let s=N9(h,w);return w.logger?.debug?.(`${wr} evaluateCondition: ${nf(h)} = ${nf(s)}`),{result:s===""?!0:!!s,...f!=null&&{toAssign:{name:f,value:s}}}},"evaluateCondition"),SF=Q0((f=[],h)=>{let w={};for(let s of f){let{result:$,toAssign:r}=tn(s,{...h,referenceRecord:{...h.referenceRecord,...w}});if(!$)return{result:$};if(r)w[r.name]=r.value,h.logger?.debug?.(`${wr} assign: ${r.name} := ${nf(r.value)}`)}return{result:!0,referenceRecord:w}},"evaluateConditions"),fe=Q0((f,h)=>Object.entries(f).reduce((w,[s,$])=>({...w,[s]:$.map((r)=>{let E=vE(r,"Header value entry",h);if(typeof E!=="string")throw new Y1(`Header '${s}' value '${E}' is not a string`);return E})}),{}),"getEndpointHeaders"),D9=Q0((f,h)=>{if(Array.isArray(f))return f.map((w)=>D9(w,h));switch(typeof f){case"string":return H9(f,h);case"object":if(f===null)throw new Y1(`Unexpected endpoint property: ${f}`);return q9(f,h);case"boolean":return f;default:throw new Y1(`Unexpected endpoint property type: ${typeof f}`)}},"getEndpointProperty"),q9=Q0((f,h)=>Object.entries(f).reduce((w,[s,$])=>({...w,[s]:D9($,h)}),{}),"getEndpointProperties"),he=Q0((f,h)=>{let w=vE(f,"Endpoint URL",h);if(typeof w==="string")try{return new URL(w)}catch(s){throw console.error(`Failed to construct URL with ${w}`,s),s}throw new Y1(`Endpoint URL must be a string, got ${typeof w}`)},"getEndpointUrl"),we=Q0((f,h)=>{let{conditions:w,endpoint:s}=f,{result:$,referenceRecord:r}=SF(w,h);if(!$)return;let E={...h,referenceRecord:{...h.referenceRecord,...r}},{url:U,properties:T,headers:F}=s;return h.logger?.debug?.(`${wr} Resolving endpoint from template: ${nf(s)}`),{...F!=null&&{headers:fe(F,E)},...T!=null&&{properties:q9(T,E)},url:he(U,E)}},"evaluateEndpointRule"),se=Q0((f,h)=>{let{conditions:w,error:s}=f,{result:$,referenceRecord:r}=SF(w,h);if(!$)return;throw new Y1(vE(s,"Error",{...h,referenceRecord:{...h.referenceRecord,...r}}))},"evaluateErrorRule"),$e=Q0((f,h)=>{let{conditions:w,rules:s}=f,{result:$,referenceRecord:r}=SF(w,h);if(!$)return;return k9(s,{...h,referenceRecord:{...h.referenceRecord,...r}})},"evaluateTreeRule"),k9=Q0((f,h)=>{for(let w of f)if(w.type==="endpoint"){let s=we(w,h);if(s)return s}else if(w.type==="error")se(w,h);else if(w.type==="tree"){let s=$e(w,h);if(s)return s}else throw new Y1(`Unknown endpoint rule: ${w}`);throw new Y1("Rules evaluation failed")},"evaluateRules"),re=Q0((f,h)=>{let{endpointParams:w,logger:s}=h,{parameters:$,rules:r}=f;h.logger?.debug?.(`${wr} Initial EndpointParams: ${nf(w)}`);let E=Object.entries($).filter(([,F])=>F.default!=null).map(([F,C])=>[F,C.default]);if(E.length>0)for(let[F,C]of E)w[F]=w[F]??C;let U=Object.entries($).filter(([,F])=>F.required).map(([F])=>F);for(let F of U)if(w[F]==null)throw new Y1(`Missing required parameter: '${F}'`);let T=k9(r,{endpointParams:w,logger:s,referenceRecord:{}});return h.logger?.debug?.(`${wr} Resolved endpoint: ${nf(T)}`),T},"resolveEndpoint")});var dE=H((eA0,g9)=>{var{defineProperty:mE,getOwnPropertyDescriptor:Ee,getOwnPropertyNames:Ue}=Object,Te=Object.prototype.hasOwnProperty,Rs=(f,h)=>mE(f,"name",{value:h,configurable:!0}),Fe=(f,h)=>{for(var w in h)mE(f,w,{get:h[w],enumerable:!0})},Ce=(f,h,w,s)=>{if(h&&typeof h==="object"||typeof h==="function"){for(let $ of Ue(h))if(!Te.call(f,$)&&$!==w)mE(f,$,{get:()=>h[$],enumerable:!(s=Ee(h,$))||s.enumerable})}return f},Ie=(f)=>Ce(mE({},"__esModule",{value:!0}),f),O9={};Fe(O9,{ConditionObject:()=>V0.ConditionObject,DeprecatedObject:()=>V0.DeprecatedObject,EndpointError:()=>V0.EndpointError,EndpointObject:()=>V0.EndpointObject,EndpointObjectHeaders:()=>V0.EndpointObjectHeaders,EndpointObjectProperties:()=>V0.EndpointObjectProperties,EndpointParams:()=>V0.EndpointParams,EndpointResolverOptions:()=>V0.EndpointResolverOptions,EndpointRuleObject:()=>V0.EndpointRuleObject,ErrorRuleObject:()=>V0.ErrorRuleObject,EvaluateOptions:()=>V0.EvaluateOptions,Expression:()=>V0.Expression,FunctionArgv:()=>V0.FunctionArgv,FunctionObject:()=>V0.FunctionObject,FunctionReturn:()=>V0.FunctionReturn,ParameterObject:()=>V0.ParameterObject,ReferenceObject:()=>V0.ReferenceObject,ReferenceRecord:()=>V0.ReferenceRecord,RuleSetObject:()=>V0.RuleSetObject,RuleSetRules:()=>V0.RuleSetRules,TreeRuleObject:()=>V0.TreeRuleObject,awsEndpointFunctions:()=>c9,getUserAgentPrefix:()=>Ge,isIpAddress:()=>V0.isIpAddress,partition:()=>d9,resolveEndpoint:()=>V0.resolveEndpoint,setPartitionInfo:()=>i9,useDefaultPartitionInfo:()=>Ae});g9.exports=Ie(O9);var V0=bE(),l9=Rs((f,h=!1)=>{if(h){for(let w of f.split("."))if(!l9(w))return!1;return!0}if(!V0.isValidHostLabel(f))return!1;if(f.length<3||f.length>63)return!1;if(f!==f.toLowerCase())return!1;if(V0.isIpAddress(f))return!1;return!0},"isVirtualHostableS3Bucket"),j9=":",Le="/",Be=Rs((f)=>{let h=f.split(j9);if(h.length<6)return null;let[w,s,$,r,E,...U]=h;if(w!=="arn"||s===""||$===""||U.join(j9)==="")return null;let T=U.map((F)=>F.split(Le)).flat();return{partition:s,service:$,region:r,accountId:E,resourceId:T}},"parseArn"),v9={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)"},"ap-southeast-7":{description:"Asia Pacific (Thailand)"},"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)"},"mx-central-1":{description:"Mexico (Central)"},"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:{"aws-iso-f-global":{description:"AWS ISOF global region"},"us-isof-east-1":{description:"US ISOF EAST"},"us-isof-south-1":{description:"US ISOF SOUTH"}}}],version:"1.1"},b9=v9,m9="",d9=Rs((f)=>{let{partitions:h}=b9;for(let s of h){let{regions:$,outputs:r}=s;for(let[E,U]of Object.entries($))if(E===f)return{...r,...U}}for(let s of h){let{regionRegex:$,outputs:r}=s;if(new RegExp($).test(f))return{...r}}let w=h.find((s)=>s.id==="aws");if(!w)throw new Error("Provided region was not found in the partition array or regex, and default partition with id 'aws' doesn't exist.");return{...w.outputs}},"partition"),i9=Rs((f,h="")=>{b9=f,m9=h},"setPartitionInfo"),Ae=Rs(()=>{i9(v9,"")},"useDefaultPartitionInfo"),Ge=Rs(()=>m9,"getUserAgentPrefix"),c9={isVirtualHostableS3Bucket:l9,parseArn:Be,partition:d9};V0.customEndpointFunctions.aws=c9});var gE=H((aA0,wM)=>{var{defineProperty:cE,getOwnPropertyDescriptor:We,getOwnPropertyNames:ze}=Object,Re=Object.prototype.hasOwnProperty,Ew=(f,h)=>cE(f,"name",{value:h,configurable:!0}),Xe=(f,h)=>{for(var w in h)cE(f,w,{get:h[w],enumerable:!0})},Se=(f,h,w,s)=>{if(h&&typeof h==="object"||typeof h==="function"){for(let $ of ze(h))if(!Re.call(f,$)&&$!==w)cE(f,$,{get:()=>h[$],enumerable:!(s=We(h,$))||s.enumerable})}return f},Ye=(f)=>Se(cE({},"__esModule",{value:!0}),f),e9={};Xe(e9,{DEFAULT_UA_APP_ID:()=>a9,getUserAgentMiddlewareOptions:()=>hM,getUserAgentPlugin:()=>He,resolveUserAgentConfig:()=>p9,userAgentMiddleware:()=>fM});wM.exports=Ye(e9);var Me=m0(),a9=void 0;function o9(f){if(f===void 0)return!0;return typeof f==="string"&&f.length<=50}Ew(o9,"isValidUserAgentAppId");function p9(f){let h=Me.normalizeProvider(f.userAgentAppId??a9);return{...f,customUserAgent:typeof f.customUserAgent==="string"?[[f.customUserAgent]]:f.customUserAgent,userAgentAppId:async()=>{let w=await h();if(!o9(w)){let s=f.logger?.constructor?.name==="NoOpLogger"||!f.logger?console:f.logger;if(typeof w!=="string")s?.warn("userAgentAppId must be a string or undefined.");else if(w.length>50)s?.warn("The provided userAgentAppId exceeds the maximum length of 50 characters.")}return w}}}Ew(p9,"resolveUserAgentConfig");var Qe=dE(),Ke=t0(),Kf=O0(),Ze=/\d{12}\.ddb/;async function u9(f,h,w){if(w.request?.headers?.["smithy-protocol"]==="rpc-v2-cbor")Kf.setFeature(f,"PROTOCOL_RPC_V2_CBOR","M");if(typeof h.retryStrategy==="function"){let r=await h.retryStrategy();if(typeof r.acquireInitialRetryToken==="function")if(r.constructor?.name?.includes("Adaptive"))Kf.setFeature(f,"RETRY_MODE_ADAPTIVE","F");else Kf.setFeature(f,"RETRY_MODE_STANDARD","E");else Kf.setFeature(f,"RETRY_MODE_LEGACY","D")}if(typeof h.accountIdEndpointMode==="function"){let r=f.endpointV2;if(String(r?.url?.hostname).match(Ze))Kf.setFeature(f,"ACCOUNT_ID_ENDPOINT","O");switch(await h.accountIdEndpointMode?.()){case"disabled":Kf.setFeature(f,"ACCOUNT_ID_MODE_DISABLED","Q");break;case"preferred":Kf.setFeature(f,"ACCOUNT_ID_MODE_PREFERRED","P");break;case"required":Kf.setFeature(f,"ACCOUNT_ID_MODE_REQUIRED","R");break}}let $=f.__smithy_context?.selectedHttpAuthScheme?.identity;if($?.$source){let r=$;if(r.accountId)Kf.setFeature(f,"RESOLVED_ACCOUNT_ID","T");for(let[E,U]of Object.entries(r.$source??{}))Kf.setFeature(f,E,U)}}Ew(u9,"checkFeatures");var x9="user-agent",YF="x-amz-user-agent",_9=" ",MF="/",Je=/[^\!\$\%\&\'\*\+\-\.\^\_\`\|\~\d\w]/g,Ve=/[^\!\$\%\&\'\*\+\-\.\^\_\`\|\~\d\w\#]/g,n9="-",Pe=1024;function t9(f){let h="";for(let w in f){let s=f[w];if(h.length+s.length+1<=Pe){if(h.length)h+=","+s;else h+=s;continue}break}return h}Ew(t9,"encodeFeatures");var fM=Ew((f)=>(h,w)=>async(s)=>{let{request:$}=s;if(!Ke.HttpRequest.isInstance($))return h(s);let{headers:r}=$,E=w?.userAgent?.map(iE)||[],U=(await f.defaultUserAgentProvider()).map(iE);await u9(w,f,s);let T=w;U.push(`m/${t9(Object.assign({},w.__smithy_context?.features,T.__aws_sdk_context?.features))}`);let F=f?.customUserAgent?.map(iE)||[],C=await f.userAgentAppId();if(C)U.push(iE([`app/${C}`]));let I=Qe.getUserAgentPrefix(),L=(I?[I]:[]).concat([...U,...E,...F]).join(_9),G=[...U.filter((X)=>X.startsWith("aws-sdk-")),...F].join(_9);if(f.runtime!=="browser"){if(G)r[YF]=r[YF]?`${r[x9]} ${G}`:G;r[x9]=L}else r[YF]=L;return h({...s,request:$})},"userAgentMiddleware"),iE=Ew((f)=>{let h=f[0].split(MF).map((E)=>E.replace(Je,n9)).join(MF),w=f[1]?.replace(Ve,n9),s=h.indexOf(MF),$=h.substring(0,s),r=h.substring(s+1);if($==="api")r=r.toLowerCase();return[$,r,w].filter((E)=>E&&E.length>0).reduce((E,U,T)=>{switch(T){case 0:return U;case 1:return`${E}/${U}`;default:return`${E}#${U}`}},"")},"escapeUserAgent"),hM={name:"getUserAgentMiddleware",step:"build",priority:"low",tags:["SET_USER_AGENT","USER_AGENT"],override:!0},He=Ew((f)=>({applyToStack:(h)=>{h.add(fM(f),hM)}}),"getUserAgentPlugin")});var UM=H((oA0,EM)=>{var{defineProperty:xE,getOwnPropertyDescriptor:Ne,getOwnPropertyNames:De}=Object,qe=Object.prototype.hasOwnProperty,sM=(f,h)=>xE(f,"name",{value:h,configurable:!0}),ke=(f,h)=>{for(var w in h)xE(f,w,{get:h[w],enumerable:!0})},ye=(f,h,w,s)=>{if(h&&typeof h==="object"||typeof h==="function"){for(let $ of De(h))if(!qe.call(f,$)&&$!==w)xE(f,$,{get:()=>h[$],enumerable:!(s=Ne(h,$))||s.enumerable})}return f},je=(f)=>ye(xE({},"__esModule",{value:!0}),f),$M={};ke($M,{SelectorType:()=>rM,booleanSelector:()=>Oe,numberSelector:()=>le});EM.exports=je($M);var Oe=sM((f,h,w)=>{if(!(h in f))return;if(f[h]==="true")return!0;if(f[h]==="false")return!1;throw new Error(`Cannot load ${w} "${h}". Expected "true" or "false", got ${f[h]}.`)},"booleanSelector"),le=sM((f,h,w)=>{if(!(h in f))return;let s=parseInt(f[h],10);if(Number.isNaN(s))throw new TypeError(`Cannot load ${w} '${h}'. Expected number, got '${f[h]}'.`);return s},"numberSelector"),rM=((f)=>{return f.ENV="env",f.CONFIG="shared config entry",f})(rM||{})});var Xs=H((pA0,RM)=>{var{defineProperty:nE,getOwnPropertyDescriptor:ve,getOwnPropertyNames:be}=Object,me=Object.prototype.hasOwnProperty,Ef=(f,h)=>nE(f,"name",{value:h,configurable:!0}),de=(f,h)=>{for(var w in h)nE(f,w,{get:h[w],enumerable:!0})},ie=(f,h,w,s)=>{if(h&&typeof h==="object"||typeof h==="function"){for(let $ of be(h))if(!me.call(f,$)&&$!==w)nE(f,$,{get:()=>h[$],enumerable:!(s=ve(h,$))||s.enumerable})}return f},ce=(f)=>ie(nE({},"__esModule",{value:!0}),f),CM={};de(CM,{CONFIG_USE_DUALSTACK_ENDPOINT:()=>LM,CONFIG_USE_FIPS_ENDPOINT:()=>AM,DEFAULT_USE_DUALSTACK_ENDPOINT:()=>ge,DEFAULT_USE_FIPS_ENDPOINT:()=>_e,ENV_USE_DUALSTACK_ENDPOINT:()=>IM,ENV_USE_FIPS_ENDPOINT:()=>BM,NODE_REGION_CONFIG_FILE_OPTIONS:()=>ue,NODE_REGION_CONFIG_OPTIONS:()=>pe,NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS:()=>xe,NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS:()=>ne,REGION_ENV_NAME:()=>GM,REGION_INI_NAME:()=>WM,getRegionInfo:()=>sa,resolveCustomEndpointsConfig:()=>ee,resolveEndpointsConfig:()=>oe,resolveRegionConfig:()=>te});RM.exports=ce(CM);var Nh=UM(),IM="AWS_USE_DUALSTACK_ENDPOINT",LM="use_dualstack_endpoint",ge=!1,xe={environmentVariableSelector:(f)=>Nh.booleanSelector(f,IM,Nh.SelectorType.ENV),configFileSelector:(f)=>Nh.booleanSelector(f,LM,Nh.SelectorType.CONFIG),default:!1},BM="AWS_USE_FIPS_ENDPOINT",AM="use_fips_endpoint",_e=!1,ne={environmentVariableSelector:(f)=>Nh.booleanSelector(f,BM,Nh.SelectorType.ENV),configFileSelector:(f)=>Nh.booleanSelector(f,AM,Nh.SelectorType.CONFIG),default:!1},_E=Fh(),ee=Ef((f)=>{let{endpoint:h,urlParser:w}=f;return{...f,tls:f.tls??!0,endpoint:_E.normalizeProvider(typeof h==="string"?w(h):h),isCustomEndpoint:!0,useDualstackEndpoint:_E.normalizeProvider(f.useDualstackEndpoint??!1)}},"resolveCustomEndpointsConfig"),ae=Ef(async(f)=>{let{tls:h=!0}=f,w=await f.region();if(!new RegExp(/^([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9-]{0,61}[a-zA-Z0-9])$/).test(w))throw new Error("Invalid region in client config");let $=await f.useDualstackEndpoint(),r=await f.useFipsEndpoint(),{hostname:E}=await f.regionInfoProvider(w,{useDualstackEndpoint:$,useFipsEndpoint:r})??{};if(!E)throw new Error("Cannot resolve hostname from client config");return f.urlParser(`${h?"https:":"http:"}//${E}`)},"getEndpointFromRegion"),oe=Ef((f)=>{let h=_E.normalizeProvider(f.useDualstackEndpoint??!1),{endpoint:w,useFipsEndpoint:s,urlParser:$}=f;return{...f,tls:f.tls??!0,endpoint:w?_E.normalizeProvider(typeof w==="string"?$(w):w):()=>ae({...f,useDualstackEndpoint:h,useFipsEndpoint:s}),isCustomEndpoint:!!w,useDualstackEndpoint:h}},"resolveEndpointsConfig"),GM="AWS_REGION",WM="region",pe={environmentVariableSelector:(f)=>f[GM],configFileSelector:(f)=>f[WM],default:()=>{throw new Error("Region is missing")}},ue={preferredFile:"credentials"},zM=Ef((f)=>typeof f==="string"&&(f.startsWith("fips-")||f.endsWith("-fips")),"isFipsRegion"),TM=Ef((f)=>zM(f)?["fips-aws-global","aws-fips"].includes(f)?"us-east-1":f.replace(/fips-(dkr-|prod-)?|-fips/,""):f,"getRealRegion"),te=Ef((f)=>{let{region:h,useFipsEndpoint:w}=f;if(!h)throw new Error("Region is missing");return{...f,region:async()=>{if(typeof h==="string")return TM(h);let s=await h();return TM(s)},useFipsEndpoint:async()=>{let s=typeof h==="string"?h:await h();if(zM(s))return!0;return typeof w!=="function"?Promise.resolve(!!w):w()}}},"resolveRegionConfig"),FM=Ef((f=[],{useFipsEndpoint:h,useDualstackEndpoint:w})=>f.find(({tags:s})=>h===s.includes("fips")&&w===s.includes("dualstack"))?.hostname,"getHostnameFromVariants"),fa=Ef((f,{regionHostname:h,partitionHostname:w})=>h?h:w?w.replace("{region}",f):void 0,"getResolvedHostname"),ha=Ef((f,{partitionHash:h})=>Object.keys(h||{}).find((w)=>h[w].regions.includes(f))??"aws","getResolvedPartition"),wa=Ef((f,{signingRegion:h,regionRegex:w,useFipsEndpoint:s})=>{if(h)return h;else if(s){let $=w.replace("\\\\","\\").replace(/^\^/g,"\\.").replace(/\$$/g,"\\."),r=f.match($);if(r)return r[0].slice(1,-1)}},"getResolvedSigningRegion"),sa=Ef((f,{useFipsEndpoint:h=!1,useDualstackEndpoint:w=!1,signingService:s,regionHash:$,partitionHash:r})=>{let E=ha(f,{partitionHash:r}),U=f in $?f:r[E]?.endpoint??f,T={useFipsEndpoint:h,useDualstackEndpoint:w},F=FM($[U]?.variants,T),C=FM(r[E]?.variants,T),I=fa(U,{regionHostname:F,partitionHostname:C});if(I===void 0)throw new Error(`Endpoint resolution failed for: ${{resolvedRegion:U,useFipsEndpoint:h,useDualstackEndpoint:w}}`);let L=wa(I,{signingRegion:$[U]?.signingRegion,regionRegex:r[E].regionRegex,useFipsEndpoint:h});return{partition:E,signingService:s,hostname:I,...L&&{signingRegion:L},...$[U]?.signingService&&{signingService:$[U].signingService}}},"getRegionInfo")});var KF=H((uA0,QM)=>{var{defineProperty:eE,getOwnPropertyDescriptor:$a,getOwnPropertyNames:ra}=Object,Ea=Object.prototype.hasOwnProperty,SM=(f,h)=>eE(f,"name",{value:h,configurable:!0}),Ua=(f,h)=>{for(var w in h)eE(f,w,{get:h[w],enumerable:!0})},Ta=(f,h,w,s)=>{if(h&&typeof h==="object"||typeof h==="function"){for(let $ of ra(h))if(!Ea.call(f,$)&&$!==w)eE(f,$,{get:()=>h[$],enumerable:!(s=$a(h,$))||s.enumerable})}return f},Fa=(f)=>Ta(eE({},"__esModule",{value:!0}),f),YM={};Ua(YM,{contentLengthMiddleware:()=>QF,contentLengthMiddlewareOptions:()=>MM,getContentLengthPlugin:()=>Ia});QM.exports=Fa(YM);var Ca=t0(),XM="content-length";function QF(f){return(h)=>async(w)=>{let s=w.request;if(Ca.HttpRequest.isInstance(s)){let{body:$,headers:r}=s;if($&&Object.keys(r).map((E)=>E.toLowerCase()).indexOf(XM)===-1)try{let E=f($);s.headers={...s.headers,[XM]:String(E)}}catch(E){}}return h({...w,request:s})}}SM(QF,"contentLengthMiddleware");var MM={step:"build",tags:["SET_CONTENT_LENGTH","CONTENT_LENGTH"],name:"contentLengthMiddleware",override:!0},Ia=SM((f)=>({applyToStack:(h)=>{h.add(QF(f.bodyLengthChecker),MM)}}),"getContentLengthPlugin")});var Ss=H((KM)=>{Object.defineProperty(KM,"__esModule",{value:!0});KM.getHomeDir=void 0;var La=B0("os"),Ba=B0("path"),ZF={},Aa=()=>{if(process&&process.geteuid)return`${process.geteuid()}`;return"DEFAULT"},Ga=()=>{let{HOME:f,USERPROFILE:h,HOMEPATH:w,HOMEDRIVE:s=`C:${Ba.sep}`}=process.env;if(f)return f;if(h)return h;if(w)return`${s}${w}`;let $=Aa();if(!ZF[$])ZF[$]=La.homedir();return ZF[$]};KM.getHomeDir=Ga});var JF=H((JM)=>{Object.defineProperty(JM,"__esModule",{value:!0});JM.getSSOTokenFilepath=void 0;var Wa=B0("crypto"),za=B0("path"),Ra=Ss(),Xa=(f)=>{let w=Wa.createHash("sha1").update(f).digest("hex");return za.join(Ra.getHomeDir(),".aws","sso","cache",`${w}.json`)};JM.getSSOTokenFilepath=Xa});var NM=H((PM)=>{Object.defineProperty(PM,"__esModule",{value:!0});PM.getSSOTokenFromFile=void 0;var Sa=B0("fs"),Ya=JF(),{readFile:Ma}=Sa.promises,Qa=async(f)=>{let h=Ya.getSSOTokenFilepath(f),w=await Ma(h,"utf8");return JSON.parse(w)};PM.getSSOTokenFromFile=Qa});var PF=H((DM)=>{Object.defineProperty(DM,"__esModule",{value:!0});DM.slurpFile=void 0;var Ka=B0("fs"),{readFile:Za}=Ka.promises,VF={},Ja=(f,h)=>{if(!VF[f]||(h===null||h===void 0?void 0:h.ignoreCache))VF[f]=Za(f,"utf8");return VF[f]};DM.slurpFile=Ja});var qF=H((sG0,$r)=>{var{defineProperty:pE,getOwnPropertyDescriptor:Va,getOwnPropertyNames:Pa}=Object,Ha=Object.prototype.hasOwnProperty,v1=(f,h)=>pE(f,"name",{value:h,configurable:!0}),Na=(f,h)=>{for(var w in h)pE(f,w,{get:h[w],enumerable:!0})},HF=(f,h,w,s)=>{if(h&&typeof h==="object"||typeof h==="function"){for(let $ of Pa(h))if(!Ha.call(f,$)&&$!==w)pE(f,$,{get:()=>h[$],enumerable:!(s=Va(h,$))||s.enumerable})}return f},DF=(f,h,w)=>(HF(f,h,"default"),w&&HF(w,h,"default")),Da=(f)=>HF(pE({},"__esModule",{value:!0}),f),sr={};Na(sr,{CONFIG_PREFIX_SEPARATOR:()=>Uw,DEFAULT_PROFILE:()=>OM,ENV_PROFILE:()=>jM,getProfileName:()=>qa,loadSharedConfigFiles:()=>vM,loadSsoSessionData:()=>xa,parseKnownFiles:()=>na});$r.exports=Da(sr);DF(sr,Ss(),$r.exports);var jM="AWS_PROFILE",OM="default",qa=v1((f)=>f.profile||process.env[jM]||OM,"getProfileName");DF(sr,JF(),$r.exports);DF(sr,NM(),$r.exports);var aE=T1(),ka=v1((f)=>Object.entries(f).filter(([h])=>{let w=h.indexOf(Uw);if(w===-1)return!1;return Object.values(aE.IniSectionType).includes(h.substring(0,w))}).reduce((h,[w,s])=>{let $=w.indexOf(Uw),r=w.substring(0,$)===aE.IniSectionType.PROFILE?w.substring($+1):w;return h[r]=s,h},{...f.default&&{default:f.default}}),"getConfigData"),oE=B0("path"),ya=Ss(),ja="AWS_CONFIG_FILE",lM=v1(()=>process.env[ja]||oE.join(ya.getHomeDir(),".aws","config"),"getConfigFilepath"),Oa=Ss(),la="AWS_SHARED_CREDENTIALS_FILE",va=v1(()=>process.env[la]||oE.join(Oa.getHomeDir(),".aws","credentials"),"getCredentialsFilepath"),ba=Ss(),ma=/^([\w-]+)\s(["'])?([\w-@\+\.%:/]+)\2$/,da=["__proto__","profile __proto__"],NF=v1((f)=>{let h={},w,s;for(let $ of f.split(/\r?\n/)){let r=$.split(/(^|\s)[;#]/)[0].trim();if(r[0]==="["&&r[r.length-1]==="]"){w=void 0,s=void 0;let U=r.substring(1,r.length-1),T=ma.exec(U);if(T){let[,F,,C]=T;if(Object.values(aE.IniSectionType).includes(F))w=[F,C].join(Uw)}else w=U;if(da.includes(U))throw new Error(`Found invalid profile name "${U}"`)}else if(w){let U=r.indexOf("=");if(![0,-1].includes(U)){let[T,F]=[r.substring(0,U).trim(),r.substring(U+1).trim()];if(F==="")s=T;else{if(s&&$.trimStart()===$)s=void 0;h[w]=h[w]||{};let C=s?[s,T].join(Uw):T;h[w][C]=F}}}}return h},"parseIni"),kM=PF(),yM=v1(()=>({}),"swallowError"),Uw=".",vM=v1(async(f={})=>{let{filepath:h=va(),configFilepath:w=lM()}=f,s=ba.getHomeDir(),$="~/",r=h;if(h.startsWith("~/"))r=oE.join(s,h.slice(2));let E=w;if(w.startsWith("~/"))E=oE.join(s,w.slice(2));let U=await Promise.all([kM.slurpFile(E,{ignoreCache:f.ignoreCache}).then(NF).then(ka).catch(yM),kM.slurpFile(r,{ignoreCache:f.ignoreCache}).then(NF).catch(yM)]);return{configFile:U[0],credentialsFile:U[1]}},"loadSharedConfigFiles"),ia=v1((f)=>Object.entries(f).filter(([h])=>h.startsWith(aE.IniSectionType.SSO_SESSION+Uw)).reduce((h,[w,s])=>({...h,[w.substring(w.indexOf(Uw)+1)]:s}),{}),"getSsoSessionData"),ca=PF(),ga=v1(()=>({}),"swallowError"),xa=v1(async(f={})=>ca.slurpFile(f.configFilepath??lM()).then(NF).then(ia).catch(ga),"loadSsoSessionData"),_a=v1((...f)=>{let h={};for(let w of f)for(let[s,$]of Object.entries(w))if(h[s]!==void 0)Object.assign(h[s],$);else h[s]=$;return h},"mergeConfigFiles"),na=v1(async(f)=>{let h=await vM(f);return _a(h.configFile,h.credentialsFile)},"parseKnownFiles")});var Ms=H(($G0,dM)=>{var{defineProperty:uE,getOwnPropertyDescriptor:ea,getOwnPropertyNames:aa}=Object,oa=Object.prototype.hasOwnProperty,Ys=(f,h)=>uE(f,"name",{value:h,configurable:!0}),pa=(f,h)=>{for(var w in h)uE(f,w,{get:h[w],enumerable:!0})},ua=(f,h,w,s)=>{if(h&&typeof h==="object"||typeof h==="function"){for(let $ of aa(h))if(!oa.call(f,$)&&$!==w)uE(f,$,{get:()=>h[$],enumerable:!(s=ea(h,$))||s.enumerable})}return f},ta=(f)=>ua(uE({},"__esModule",{value:!0}),f),mM={};pa(mM,{loadConfig:()=>$o});dM.exports=ta(mM);var rr=D$();function kF(f){try{let h=new Set(Array.from(f.match(/([A-Z_]){3,}/g)??[]));return h.delete("CONFIG"),h.delete("CONFIG_PREFIX_SEPARATOR"),h.delete("ENV"),[...h].join(", ")}catch(h){return f}}Ys(kF,"getSelectorName");var fo=Ys((f,h)=>async()=>{try{let w=f(process.env);if(w===void 0)throw new Error;return w}catch(w){throw new rr.CredentialsProviderError(w.message||`Not found in ENV: ${kF(f.toString())}`,{logger:h})}},"fromEnv"),bM=qF(),ho=Ys((f,{preferredFile:h="config",...w}={})=>async()=>{let s=bM.getProfileName(w),{configFile:$,credentialsFile:r}=await bM.loadSharedConfigFiles(w),E=r[s]||{},U=$[s]||{},T=h==="config"?{...E,...U}:{...U,...E};try{let C=f(T,h==="config"?$:r);if(C===void 0)throw new Error;return C}catch(F){throw new rr.CredentialsProviderError(F.message||`Not found in config files w/ profile [${s}]: ${kF(f.toString())}`,{logger:w.logger})}},"fromSharedConfigFiles"),wo=Ys((f)=>typeof f==="function","isFunction"),so=Ys((f)=>wo(f)?async()=>await f():rr.fromStatic(f),"fromStatic"),$o=Ys(({environmentVariableSelector:f,configFileSelector:h,default:w},s={})=>rr.memoize(rr.chain(fo(f),ho(h,s),so(w))),"loadConfig")});var nM=H((xM)=>{Object.defineProperty(xM,"__esModule",{value:!0});xM.getEndpointUrlConfig=void 0;var iM=qF(),cM="AWS_ENDPOINT_URL",gM="endpoint_url",ro=(f)=>({environmentVariableSelector:(h)=>{let w=f.split(" ").map((r)=>r.toUpperCase()),s=h[[cM,...w].join("_")];if(s)return s;let $=h[cM];if($)return $;return},configFileSelector:(h,w)=>{if(w&&h.services){let $=w[["services",h.services].join(iM.CONFIG_PREFIX_SEPARATOR)];if($){let r=f.split(" ").map((U)=>U.toLowerCase()),E=$[[r.join("_"),gM].join(iM.CONFIG_PREFIX_SEPARATOR)];if(E)return E}}let s=h[gM];if(s)return s;return},default:void 0});xM.getEndpointUrlConfig=ro});var yF=H((eM)=>{Object.defineProperty(eM,"__esModule",{value:!0});eM.getEndpointFromConfig=void 0;var Eo=Ms(),Uo=nM(),To=async(f)=>Eo.loadConfig(Uo.getEndpointUrlConfig(f!==null&&f!==void 0?f:""))();eM.getEndpointFromConfig=To});var tM=H((UG0,uM)=>{var{defineProperty:tE,getOwnPropertyDescriptor:Fo,getOwnPropertyNames:Co}=Object,Io=Object.prototype.hasOwnProperty,Lo=(f,h)=>tE(f,"name",{value:h,configurable:!0}),Bo=(f,h)=>{for(var w in h)tE(f,w,{get:h[w],enumerable:!0})},Ao=(f,h,w,s)=>{if(h&&typeof h==="object"||typeof h==="function"){for(let $ of Co(h))if(!Io.call(f,$)&&$!==w)tE(f,$,{get:()=>h[$],enumerable:!(s=Fo(h,$))||s.enumerable})}return f},Go=(f)=>Ao(tE({},"__esModule",{value:!0}),f),oM={};Bo(oM,{parseQueryString:()=>pM});uM.exports=Go(oM);function pM(f){let h={};if(f=f.replace(/^\?/,""),f)for(let w of f.split("&")){let[s,$=null]=w.split("=");if(s=decodeURIComponent(s),$)$=decodeURIComponent($);if(!(s in h))h[s]=$;else if(Array.isArray(h[s]))h[s].push($);else h[s]=[h[s],$]}return h}Lo(pM,"parseQueryString")});var Er=H((TG0,wQ)=>{var{defineProperty:fU,getOwnPropertyDescriptor:Wo,getOwnPropertyNames:zo}=Object,Ro=Object.prototype.hasOwnProperty,Xo=(f,h)=>fU(f,"name",{value:h,configurable:!0}),So=(f,h)=>{for(var w in h)fU(f,w,{get:h[w],enumerable:!0})},Yo=(f,h,w,s)=>{if(h&&typeof h==="object"||typeof h==="function"){for(let $ of zo(h))if(!Ro.call(f,$)&&$!==w)fU(f,$,{get:()=>h[$],enumerable:!(s=Wo(h,$))||s.enumerable})}return f},Mo=(f)=>Yo(fU({},"__esModule",{value:!0}),f),fQ={};So(fQ,{parseUrl:()=>hQ});wQ.exports=Mo(fQ);var Qo=tM(),hQ=Xo((f)=>{if(typeof f==="string")return hQ(new URL(f));let{hostname:h,pathname:w,port:s,protocol:$,search:r}=f,E;if(r)E=Qo.parseQueryString(r);return{hostname:h,port:s?parseInt(s):void 0,protocol:$,path:w,query:E}},"parseUrl")});var Qs=H((FG0,FQ)=>{var{defineProperty:wU,getOwnPropertyDescriptor:Ko,getOwnPropertyNames:Zo}=Object,Jo=Object.prototype.hasOwnProperty,Uf=(f,h)=>wU(f,"name",{value:h,configurable:!0}),Vo=(f,h)=>{for(var w in h)wU(f,w,{get:h[w],enumerable:!0})},Po=(f,h,w,s)=>{if(h&&typeof h==="object"||typeof h==="function"){for(let $ of Zo(h))if(!Jo.call(f,$)&&$!==w)wU(f,$,{get:()=>h[$],enumerable:!(s=Ko(h,$))||s.enumerable})}return f},Ho=(f)=>Po(wU({},"__esModule",{value:!0}),f),$Q={};Vo($Q,{endpointMiddleware:()=>UQ,endpointMiddlewareOptions:()=>TQ,getEndpointFromInstructions:()=>rQ,getEndpointPlugin:()=>mo,resolveEndpointConfig:()=>co,resolveParams:()=>EQ,toEndpointV1:()=>jF});FQ.exports=Ho($Q);var No=Uf(async(f)=>{let h=f?.Bucket||"";if(typeof f.Bucket==="string")f.Bucket=h.replace(/#/g,encodeURIComponent("#")).replace(/\?/g,encodeURIComponent("?"));if(jo(h)){if(f.ForcePathStyle===!0)throw new Error("Path-style addressing cannot be used with ARN buckets")}else if(!yo(h)||h.indexOf(".")!==-1&&!String(f.Endpoint).startsWith("http:")||h.toLowerCase()!==h||h.length<3)f.ForcePathStyle=!0;if(f.DisableMultiRegionAccessPoints)f.disableMultiRegionAccessPoints=!0,f.DisableMRAP=!0;return f},"resolveParamsForS3"),Do=/^[a-z0-9][a-z0-9\.\-]{1,61}[a-z0-9]$/,qo=/(\d+\.){3}\d+/,ko=/\.\./,yo=Uf((f)=>Do.test(f)&&!qo.test(f)&&!ko.test(f),"isDnsCompatibleBucketName"),jo=Uf((f)=>{let[h,w,s,,,$]=f.split(":"),r=h==="arn"&&f.split(":").length>=6,E=Boolean(r&&w&&s&&$);if(r&&!E)throw new Error(`Invalid ARN: ${f} was an invalid ARN.`);return E},"isArnBucketName"),Oo=Uf((f,h,w)=>{let s=Uf(async()=>{let $=w[f]??w[h];if(typeof $==="function")return $();return $},"configProvider");if(f==="credentialScope"||h==="CredentialScope")return async()=>{let $=typeof w.credentials==="function"?await w.credentials():w.credentials;return $?.credentialScope??$?.CredentialScope};if(f==="accountId"||h==="AccountId")return async()=>{let $=typeof w.credentials==="function"?await w.credentials():w.credentials;return $?.accountId??$?.AccountId};if(f==="endpoint"||h==="endpoint")return async()=>{let $=await s();if($&&typeof $==="object"){if("url"in $)return $.url.href;if("hostname"in $){let{protocol:r,hostname:E,port:U,path:T}=$;return`${r}//${E}${U?":"+U:""}${T}`}}return $};return s},"createConfigValueProvider"),lo=yF(),sQ=Er(),jF=Uf((f)=>{if(typeof f==="object"){if("url"in f)return sQ.parseUrl(f.url);return f}return sQ.parseUrl(f)},"toEndpointV1"),rQ=Uf(async(f,h,w,s)=>{if(!w.endpoint){let E;if(w.serviceConfiguredEndpoint)E=await w.serviceConfiguredEndpoint();else E=await lo.getEndpointFromConfig(w.serviceId);if(E)w.endpoint=()=>Promise.resolve(jF(E))}let $=await EQ(f,h,w);if(typeof w.endpointProvider!=="function")throw new Error("config.endpointProvider is not set.");return w.endpointProvider($,s)},"getEndpointFromInstructions"),EQ=Uf(async(f,h,w)=>{let s={},$=h?.getEndpointParameterInstructions?.()||{};for(let[r,E]of Object.entries($))switch(E.type){case"staticContextParams":s[r]=E.value;break;case"contextParams":s[r]=f[E.name];break;case"clientContextParams":case"builtInParams":s[r]=await Oo(E.name,r,w)();break;case"operationContextParams":s[r]=E.get(f);break;default:throw new Error("Unrecognized endpoint parameter instruction: "+JSON.stringify(E))}if(Object.keys($).length===0)Object.assign(s,w);if(String(w.serviceId).toLowerCase()==="s3")await No(s);return s},"resolveParams"),vo=m0(),hU=Fh(),UQ=Uf(({config:f,instructions:h})=>{return(w,s)=>async($)=>{if(f.endpoint)vo.setFeature(s,"ENDPOINT_OVERRIDE","N");let r=await rQ($.input,{getEndpointParameterInstructions(){return h}},{...f},s);s.endpointV2=r,s.authSchemes=r.properties?.authSchemes;let E=s.authSchemes?.[0];if(E){s.signing_region=E.signingRegion,s.signing_service=E.signingName;let T=hU.getSmithyContext(s)?.selectedHttpAuthScheme?.httpAuthOption;if(T)T.signingProperties=Object.assign(T.signingProperties||{},{signing_region:E.signingRegion,signingRegion:E.signingRegion,signing_service:E.signingName,signingName:E.signingName,signingRegionSet:E.signingRegionSet},E.properties)}return w({...$})}},"endpointMiddleware"),bo=Dw(),TQ={step:"serialize",tags:["ENDPOINT_PARAMETERS","ENDPOINT_V2","ENDPOINT"],name:"endpointV2Middleware",override:!0,relation:"before",toMiddleware:bo.serializerMiddlewareOption.name},mo=Uf((f,h)=>({applyToStack:(w)=>{w.addRelativeTo(UQ({config:f,instructions:h}),TQ)}}),"getEndpointPlugin"),io=yF(),co=Uf((f)=>{let h=f.tls??!0,{endpoint:w}=f,s=w!=null?async()=>jF(await hU.normalizeProvider(w)()):void 0,r={...f,endpoint:s,tls:h,isCustomEndpoint:!!w,useDualstackEndpoint:hU.normalizeProvider(f.useDualstackEndpoint??!1),useFipsEndpoint:hU.normalizeProvider(f.useFipsEndpoint??!1)},E=void 0;return r.serviceConfiguredEndpoint=async()=>{if(f.serviceId&&!E)E=io.getEndpointFromConfig(f.serviceId);return E},r},"resolveEndpointConfig")});var lF=H((CG0,LQ)=>{var{defineProperty:sU,getOwnPropertyDescriptor:go,getOwnPropertyNames:xo}=Object,_o=Object.prototype.hasOwnProperty,Ks=(f,h)=>sU(f,"name",{value:h,configurable:!0}),no=(f,h)=>{for(var w in h)sU(f,w,{get:h[w],enumerable:!0})},eo=(f,h,w,s)=>{if(h&&typeof h==="object"||typeof h==="function"){for(let $ of xo(h))if(!_o.call(f,$)&&$!==w)sU(f,$,{get:()=>h[$],enumerable:!(s=go(h,$))||s.enumerable})}return f},ao=(f)=>eo(sU({},"__esModule",{value:!0}),f),CQ={};no(CQ,{isClockSkewCorrectedError:()=>IQ,isClockSkewError:()=>wp,isRetryableByTrait:()=>hp,isServerError:()=>$p,isThrottlingError:()=>sp,isTransientError:()=>OF});LQ.exports=ao(CQ);var oo=["AuthFailure","InvalidSignatureException","RequestExpired","RequestInTheFuture","RequestTimeTooSkewed","SignatureDoesNotMatch"],po=["BandwidthLimitExceeded","EC2ThrottledException","LimitExceededException","PriorRequestNotComplete","ProvisionedThroughputExceededException","RequestLimitExceeded","RequestThrottled","RequestThrottledException","SlowDown","ThrottledException","Throttling","ThrottlingException","TooManyRequestsException","TransactionInProgressException"],uo=["TimeoutError","RequestTimeout","RequestTimeoutException"],to=[500,502,503,504],fp=["ECONNRESET","ECONNREFUSED","EPIPE","ETIMEDOUT"],hp=Ks((f)=>f.$retryable!==void 0,"isRetryableByTrait"),wp=Ks((f)=>oo.includes(f.name),"isClockSkewError"),IQ=Ks((f)=>f.$metadata?.clockSkewCorrected,"isClockSkewCorrectedError"),sp=Ks((f)=>f.$metadata?.httpStatusCode===429||po.includes(f.name)||f.$retryable?.throttling==!0,"isThrottlingError"),OF=Ks((f,h=0)=>IQ(f)||uo.includes(f.name)||fp.includes(f?.code||"")||to.includes(f.$metadata?.httpStatusCode||0)||f.cause!==void 0&&h<=10&&OF(f.cause,h+1),"isTransientError"),$p=Ks((f)=>{if(f.$metadata?.httpStatusCode!==void 0){let h=f.$metadata.httpStatusCode;if(500<=h&&h<=599&&!OF(f))return!0;return!1}return!1},"isServerError")});var rU=H((IG0,YQ)=>{var{defineProperty:$U,getOwnPropertyDescriptor:rp,getOwnPropertyNames:Ep}=Object,Up=Object.prototype.hasOwnProperty,Tf=(f,h)=>$U(f,"name",{value:h,configurable:!0}),Tp=(f,h)=>{for(var w in h)$U(f,w,{get:h[w],enumerable:!0})},Fp=(f,h,w,s)=>{if(h&&typeof h==="object"||typeof h==="function"){for(let $ of Ep(h))if(!Up.call(f,$)&&$!==w)$U(f,$,{get:()=>h[$],enumerable:!(s=rp(h,$))||s.enumerable})}return f},Cp=(f)=>Fp($U({},"__esModule",{value:!0}),f),AQ={};Tp(AQ,{AdaptiveRetryStrategy:()=>Wp,ConfiguredRetryStrategy:()=>zp,DEFAULT_MAX_ATTEMPTS:()=>vF,DEFAULT_RETRY_DELAY_BASE:()=>Ur,DEFAULT_RETRY_MODE:()=>Ip,DefaultRateLimiter:()=>WQ,INITIAL_RETRY_TOKENS:()=>bF,INVOCATION_ID_HEADER:()=>Bp,MAXIMUM_RETRY_DELAY:()=>mF,NO_RETRY_INCREMENT:()=>SQ,REQUEST_HEADER:()=>Ap,RETRY_COST:()=>RQ,RETRY_MODES:()=>GQ,StandardRetryStrategy:()=>dF,THROTTLING_RETRY_DELAY_BASE:()=>zQ,TIMEOUT_RETRY_COST:()=>XQ});YQ.exports=Cp(AQ);var GQ=((f)=>{return f.STANDARD="standard",f.ADAPTIVE="adaptive",f})(GQ||{}),vF=3,Ip="standard",Lp=lF(),WQ=class f{constructor(h){this.currentCapacity=0,this.enabled=!1,this.lastMaxRate=0,this.measuredTxRate=0,this.requestCount=0,this.lastTimestamp=0,this.timeWindow=0,this.beta=h?.beta??0.7,this.minCapacity=h?.minCapacity??1,this.minFillRate=h?.minFillRate??0.5,this.scaleConstant=h?.scaleConstant??0.4,this.smooth=h?.smooth??0.8;let w=this.getCurrentTimeInSeconds();this.lastThrottleTime=w,this.lastTxRateBucket=Math.floor(this.getCurrentTimeInSeconds()),this.fillRate=this.minFillRate,this.maxCapacity=this.minCapacity}static{Tf(this,"DefaultRateLimiter")}static{this.setTimeoutFn=setTimeout}getCurrentTimeInSeconds(){return Date.now()/1000}async getSendToken(){return this.acquireTokenBucket(1)}async acquireTokenBucket(h){if(!this.enabled)return;if(this.refillTokenBucket(),h>this.currentCapacity){let w=(h-this.currentCapacity)/this.fillRate*1000;await new Promise((s)=>f.setTimeoutFn(s,w))}this.currentCapacity=this.currentCapacity-h}refillTokenBucket(){let h=this.getCurrentTimeInSeconds();if(!this.lastTimestamp){this.lastTimestamp=h;return}let w=(h-this.lastTimestamp)*this.fillRate;this.currentCapacity=Math.min(this.maxCapacity,this.currentCapacity+w),this.lastTimestamp=h}updateClientSendingRate(h){let w;if(this.updateMeasuredRate(),Lp.isThrottlingError(h)){let $=!this.enabled?this.measuredTxRate:Math.min(this.measuredTxRate,this.fillRate);this.lastMaxRate=$,this.calculateTimeWindow(),this.lastThrottleTime=this.getCurrentTimeInSeconds(),w=this.cubicThrottle($),this.enableTokenBucket()}else this.calculateTimeWindow(),w=this.cubicSuccess(this.getCurrentTimeInSeconds());let s=Math.min(w,2*this.measuredTxRate);this.updateTokenBucketRate(s)}calculateTimeWindow(){this.timeWindow=this.getPrecise(Math.pow(this.lastMaxRate*(1-this.beta)/this.scaleConstant,0.3333333333333333))}cubicThrottle(h){return this.getPrecise(h*this.beta)}cubicSuccess(h){return this.getPrecise(this.scaleConstant*Math.pow(h-this.lastThrottleTime-this.timeWindow,3)+this.lastMaxRate)}enableTokenBucket(){this.enabled=!0}updateTokenBucketRate(h){this.refillTokenBucket(),this.fillRate=Math.max(h,this.minFillRate),this.maxCapacity=Math.max(h,this.minCapacity),this.currentCapacity=Math.min(this.currentCapacity,this.maxCapacity)}updateMeasuredRate(){let h=this.getCurrentTimeInSeconds(),w=Math.floor(h*2)/2;if(this.requestCount++,w>this.lastTxRateBucket){let s=this.requestCount/(w-this.lastTxRateBucket);this.measuredTxRate=this.getPrecise(s*this.smooth+this.measuredTxRate*(1-this.smooth)),this.requestCount=0,this.lastTxRateBucket=w}}getPrecise(h){return parseFloat(h.toFixed(8))}},Ur=100,mF=20000,zQ=500,bF=500,RQ=5,XQ=10,SQ=1,Bp="amz-sdk-invocation-id",Ap="amz-sdk-request",Gp=Tf(()=>{let f=Ur;return{computeNextBackoffDelay:Tf((s)=>{return Math.floor(Math.min(mF,Math.random()*2**s*f))},"computeNextBackoffDelay"),setDelayBase:Tf((s)=>{f=s},"setDelayBase")}},"getDefaultRetryBackoffStrategy"),BQ=Tf(({retryDelay:f,retryCount:h,retryCost:w})=>{return{getRetryCount:Tf(()=>h,"getRetryCount"),getRetryDelay:Tf(()=>Math.min(mF,f),"getRetryDelay"),getRetryCost:Tf(()=>w,"getRetryCost")}},"createDefaultRetryToken"),dF=class{constructor(f){this.maxAttempts=f,this.mode="standard",this.capacity=bF,this.retryBackoffStrategy=Gp(),this.maxAttemptsProvider=typeof f==="function"?f:async()=>f}static{Tf(this,"StandardRetryStrategy")}async acquireInitialRetryToken(f){return BQ({retryDelay:Ur,retryCount:0})}async refreshRetryTokenForRetry(f,h){let w=await this.getMaxAttempts();if(this.shouldRetry(f,h,w)){let s=h.errorType;this.retryBackoffStrategy.setDelayBase(s==="THROTTLING"?zQ:Ur);let $=this.retryBackoffStrategy.computeNextBackoffDelay(f.getRetryCount()),r=h.retryAfterHint?Math.max(h.retryAfterHint.getTime()-Date.now()||0,$):$,E=this.getCapacityCost(s);return this.capacity-=E,BQ({retryDelay:r,retryCount:f.getRetryCount()+1,retryCost:E})}throw new Error("No retry token available")}recordSuccess(f){this.capacity=Math.max(bF,this.capacity+(f.getRetryCost()??SQ))}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 ${vF}`),vF}}shouldRetry(f,h,w){return f.getRetryCount()+1<w&&this.capacity>=this.getCapacityCost(h.errorType)&&this.isRetryableError(h.errorType)}getCapacityCost(f){return f==="TRANSIENT"?XQ:RQ}isRetryableError(f){return f==="THROTTLING"||f==="TRANSIENT"}},Wp=class{constructor(f,h){this.maxAttemptsProvider=f,this.mode="adaptive";let{rateLimiter:w}=h??{};this.rateLimiter=w??new WQ,this.standardRetryStrategy=new dF(f)}static{Tf(this,"AdaptiveRetryStrategy")}async acquireInitialRetryToken(f){return await this.rateLimiter.getSendToken(),this.standardRetryStrategy.acquireInitialRetryToken(f)}async refreshRetryTokenForRetry(f,h){return this.rateLimiter.updateClientSendingRate(h),this.standardRetryStrategy.refreshRetryTokenForRetry(f,h)}recordSuccess(f){this.rateLimiter.updateClientSendingRate({}),this.standardRetryStrategy.recordSuccess(f)}},zp=class extends dF{static{Tf(this,"ConfiguredRetryStrategy")}constructor(f,h=Ur){super(typeof f==="function"?f:async()=>f);if(typeof h==="number")this.computeNextBackoffDelay=()=>h;else this.computeNextBackoffDelay=h}async refreshRetryTokenForRetry(f,h){let w=await super.refreshRetryTokenForRetry(f,h);return w.getRetryDelay=()=>this.computeNextBackoffDelay(w.getRetryCount()),w}}});var KQ=H((MQ)=>{Object.defineProperty(MQ,"__esModule",{value:!0});MQ.isStreamingPayload=void 0;var Rp=B0("stream"),Xp=(f)=>(f===null||f===void 0?void 0:f.body)instanceof Rp.Readable||typeof ReadableStream!=="undefined"&&(f===null||f===void 0?void 0:f.body)instanceof ReadableStream;MQ.isStreamingPayload=Xp});var Tr=H((WG0,bQ)=>{var{defineProperty:EU,getOwnPropertyDescriptor:Sp,getOwnPropertyNames:Yp}=Object,Mp=Object.prototype.hasOwnProperty,x0=(f,h)=>EU(f,"name",{value:h,configurable:!0}),Qp=(f,h)=>{for(var w in h)EU(f,w,{get:h[w],enumerable:!0})},Kp=(f,h,w,s)=>{if(h&&typeof h==="object"||typeof h==="function"){for(let $ of Yp(h))if(!Mp.call(f,$)&&$!==w)EU(f,$,{get:()=>h[$],enumerable:!(s=Sp(h,$))||s.enumerable})}return f},Zp=(f)=>Kp(EU({},"__esModule",{value:!0}),f),JQ={};Qp(JQ,{AdaptiveRetryStrategy:()=>Pp,CONFIG_MAX_ATTEMPTS:()=>cF,CONFIG_RETRY_MODE:()=>kQ,ENV_MAX_ATTEMPTS:()=>iF,ENV_RETRY_MODE:()=>qQ,NODE_MAX_ATTEMPT_CONFIG_OPTIONS:()=>Hp,NODE_RETRY_MODE_CONFIG_OPTIONS:()=>Dp,StandardRetryStrategy:()=>DQ,defaultDelayDecider:()=>PQ,defaultRetryDecider:()=>HQ,getOmitRetryHeadersPlugin:()=>qp,getRetryAfterHint:()=>vQ,getRetryPlugin:()=>vp,omitRetryHeadersMiddleware:()=>yQ,omitRetryHeadersMiddlewareOptions:()=>jQ,resolveRetryConfig:()=>Np,retryMiddleware:()=>OQ,retryMiddlewareOptions:()=>lQ});bQ.exports=Zp(JQ);var Zs=t0(),VQ=D3(),l0=rU(),Jp=x0((f,h)=>{let w=f,s=h?.noRetryIncrement??l0.NO_RETRY_INCREMENT,$=h?.retryCost??l0.RETRY_COST,r=h?.timeoutRetryCost??l0.TIMEOUT_RETRY_COST,E=f,U=x0((I)=>I.name==="TimeoutError"?r:$,"getCapacityAmount"),T=x0((I)=>U(I)<=E,"hasRetryTokens");return Object.freeze({hasRetryTokens:T,retrieveRetryTokens:x0((I)=>{if(!T(I))throw new Error("No retry token available");let L=U(I);return E-=L,L},"retrieveRetryTokens"),releaseRetryTokens:x0((I)=>{E+=I??s,E=Math.min(E,w)},"releaseRetryTokens")})},"getDefaultRetryQuota"),PQ=x0((f,h)=>Math.floor(Math.min(l0.MAXIMUM_RETRY_DELAY,Math.random()*2**h*f)),"defaultDelayDecider"),Dh=lF(),HQ=x0((f)=>{if(!f)return!1;return Dh.isRetryableByTrait(f)||Dh.isClockSkewError(f)||Dh.isThrottlingError(f)||Dh.isTransientError(f)},"defaultRetryDecider"),NQ=x0((f)=>{if(f instanceof Error)return f;if(f instanceof Object)return Object.assign(new Error,f);if(typeof f==="string")return new Error(f);return new Error(`AWS SDK error wrapper for ${f}`)},"asSdkError"),DQ=class{constructor(f,h){this.maxAttemptsProvider=f,this.mode=l0.RETRY_MODES.STANDARD,this.retryDecider=h?.retryDecider??HQ,this.delayDecider=h?.delayDecider??PQ,this.retryQuota=h?.retryQuota??Jp(l0.INITIAL_RETRY_TOKENS)}static{x0(this,"StandardRetryStrategy")}shouldRetry(f,h,w){return h<w&&this.retryDecider(f)&&this.retryQuota.hasRetryTokens(f)}async getMaxAttempts(){let f;try{f=await this.maxAttemptsProvider()}catch(h){f=l0.DEFAULT_MAX_ATTEMPTS}return f}async retry(f,h,w){let s,$=0,r=0,E=await this.getMaxAttempts(),{request:U}=h;if(Zs.HttpRequest.isInstance(U))U.headers[l0.INVOCATION_ID_HEADER]=VQ.v4();while(!0)try{if(Zs.HttpRequest.isInstance(U))U.headers[l0.REQUEST_HEADER]=`attempt=${$+1}; max=${E}`;if(w?.beforeRequest)await w.beforeRequest();let{response:T,output:F}=await f(h);if(w?.afterRequest)w.afterRequest(T);return this.retryQuota.releaseRetryTokens(s),F.$metadata.attempts=$+1,F.$metadata.totalRetryDelay=r,{response:T,output:F}}catch(T){let F=NQ(T);if($++,this.shouldRetry(F,$,E)){s=this.retryQuota.retrieveRetryTokens(F);let C=this.delayDecider(Dh.isThrottlingError(F)?l0.THROTTLING_RETRY_DELAY_BASE:l0.DEFAULT_RETRY_DELAY_BASE,$),I=Vp(F.$response),L=Math.max(I||0,C);r+=L,await new Promise((G)=>setTimeout(G,L));continue}if(!F.$metadata)F.$metadata={};throw F.$metadata.attempts=$,F.$metadata.totalRetryDelay=r,F}}},Vp=x0((f)=>{if(!Zs.HttpResponse.isInstance(f))return;let h=Object.keys(f.headers).find((r)=>r.toLowerCase()==="retry-after");if(!h)return;let w=f.headers[h],s=Number(w);if(!Number.isNaN(s))return s*1000;return new Date(w).getTime()-Date.now()},"getDelayFromRetryAfterHeader"),Pp=class extends DQ{static{x0(this,"AdaptiveRetryStrategy")}constructor(f,h){let{rateLimiter:w,...s}=h??{};super(f,s);this.rateLimiter=w??new l0.DefaultRateLimiter,this.mode=l0.RETRY_MODES.ADAPTIVE}async retry(f,h){return super.retry(f,h,{beforeRequest:async()=>{return this.rateLimiter.getSendToken()},afterRequest:(w)=>{this.rateLimiter.updateClientSendingRate(w)}})}},ZQ=Fh(),iF="AWS_MAX_ATTEMPTS",cF="max_attempts",Hp={environmentVariableSelector:(f)=>{let h=f[iF];if(!h)return;let w=parseInt(h);if(Number.isNaN(w))throw new Error(`Environment variable ${iF} mast be a number, got "${h}"`);return w},configFileSelector:(f)=>{let h=f[cF];if(!h)return;let w=parseInt(h);if(Number.isNaN(w))throw new Error(`Shared config file entry ${cF} mast be a number, got "${h}"`);return w},default:l0.DEFAULT_MAX_ATTEMPTS},Np=x0((f)=>{let{retryStrategy:h}=f,w=ZQ.normalizeProvider(f.maxAttempts??l0.DEFAULT_MAX_ATTEMPTS);return{...f,maxAttempts:w,retryStrategy:async()=>{if(h)return h;if(await ZQ.normalizeProvider(f.retryMode)()===l0.RETRY_MODES.ADAPTIVE)return new l0.AdaptiveRetryStrategy(w);return new l0.StandardRetryStrategy(w)}}},"resolveRetryConfig"),qQ="AWS_RETRY_MODE",kQ="retry_mode",Dp={environmentVariableSelector:(f)=>f[qQ],configFileSelector:(f)=>f[kQ],default:l0.DEFAULT_RETRY_MODE},yQ=x0(()=>(f)=>async(h)=>{let{request:w}=h;if(Zs.HttpRequest.isInstance(w))delete w.headers[l0.INVOCATION_ID_HEADER],delete w.headers[l0.REQUEST_HEADER];return f(h)},"omitRetryHeadersMiddleware"),jQ={name:"omitRetryHeadersMiddleware",tags:["RETRY","HEADERS","OMIT_RETRY_HEADERS"],relation:"before",toMiddleware:"awsAuthMiddleware",override:!0},qp=x0((f)=>({applyToStack:(h)=>{h.addRelativeTo(yQ(),jQ)}}),"getOmitRetryHeadersPlugin"),kp=J0(),yp=KQ(),OQ=x0((f)=>(h,w)=>async(s)=>{let $=await f.retryStrategy(),r=await f.maxAttempts();if(jp($)){$=$;let E=await $.acquireInitialRetryToken(w.partition_id),U=new Error,T=0,F=0,{request:C}=s,I=Zs.HttpRequest.isInstance(C);if(I)C.headers[l0.INVOCATION_ID_HEADER]=VQ.v4();while(!0)try{if(I)C.headers[l0.REQUEST_HEADER]=`attempt=${T+1}; max=${r}`;let{response:L,output:G}=await h(s);return $.recordSuccess(E),G.$metadata.attempts=T+1,G.$metadata.totalRetryDelay=F,{response:L,output:G}}catch(L){let G=Op(L);if(U=NQ(L),I&&yp.isStreamingPayload(C))throw(w.logger instanceof kp.NoOpLogger?console:w.logger)?.warn("An error was encountered in a non-retryable streaming request."),U;try{E=await $.refreshRetryTokenForRetry(E,G)}catch(Q){if(!U.$metadata)U.$metadata={};throw U.$metadata.attempts=T+1,U.$metadata.totalRetryDelay=F,U}T=E.getRetryCount();let X=E.getRetryDelay();F+=X,await new Promise((Q)=>setTimeout(Q,X))}}else{if($=$,$?.mode)w.userAgent=[...w.userAgent||[],["cfg/retry-mode",$.mode]];return $.retry(h,s)}},"retryMiddleware"),jp=x0((f)=>typeof f.acquireInitialRetryToken!=="undefined"&&typeof f.refreshRetryTokenForRetry!=="undefined"&&typeof f.recordSuccess!=="undefined","isRetryStrategyV2"),Op=x0((f)=>{let h={error:f,errorType:lp(f)},w=vQ(f.$response);if(w)h.retryAfterHint=w;return h},"getRetryErrorInfo"),lp=x0((f)=>{if(Dh.isThrottlingError(f))return"THROTTLING";if(Dh.isTransientError(f))return"TRANSIENT";if(Dh.isServerError(f))return"SERVER_ERROR";return"CLIENT_ERROR"},"getRetryErrorType"),lQ={name:"retryMiddleware",tags:["RETRY"],step:"finalizeRequest",priority:"high",override:!0},vp=x0((f)=>({applyToStack:(h)=>{h.add(OQ(f),lQ)}}),"getRetryPlugin"),vQ=x0((f)=>{if(!Zs.HttpResponse.isInstance(f))return;let h=Object.keys(f.headers).find((r)=>r.toLowerCase()==="retry-after");if(!h)return;let w=f.headers[h],s=Number(w);if(!Number.isNaN(s))return new Date(s*1000);return new Date(w)},"getRetryAfterHint")});var gF=H((dQ)=>{Object.defineProperty(dQ,"__esModule",{value:!0});dQ.resolveHttpAuthSchemeConfig=dQ.defaultSSOOIDCHttpAuthSchemeProvider=dQ.defaultSSOOIDCHttpAuthSchemeParametersProvider=void 0;var bp=O0(),mQ=Fh(),mp=async(f,h,w)=>{return{operation:mQ.getSmithyContext(h).operation,region:await mQ.normalizeProvider(f.region)()||(()=>{throw new Error("expected `region` to be configured for `aws.auth#sigv4`")})()}};dQ.defaultSSOOIDCHttpAuthSchemeParametersProvider=mp;function dp(f){return{schemeId:"aws.auth#sigv4",signingProperties:{name:"sso-oauth",region:f.region},propertiesExtractor:(h,w)=>({signingProperties:{config:h,context:w}})}}function ip(f){return{schemeId:"smithy.api#noAuth"}}var cp=(f)=>{let h=[];switch(f.operation){case"CreateToken":{h.push(ip(f));break}default:h.push(dp(f))}return h};dQ.defaultSSOOIDCHttpAuthSchemeProvider=cp;var gp=(f)=>{return{...bp.resolveAwsSdkSigV4Config(f)}};dQ.resolveHttpAuthSchemeConfig=gp});var xF=H((SG0,np)=>{np.exports={name:"@aws-sdk/nested-clients",version:"3.772.0",description:"Nested clients for AWS SDK packages.",main:"./dist-cjs/index.js",module:"./dist-es/index.js",types:"./dist-types/index.d.ts",scripts:{build:"yarn lint && concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'","build:cjs":"node ../../scripts/compilation/inline nested-clients","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",lint:"node ../../scripts/validation/submodules-linter.js --pkg nested-clients",test:"yarn g:vitest run","test:watch":"yarn g:vitest watch"},engines:{node:">=18.0.0"},author:{name:"AWS SDK for JavaScript Team",url:"https://aws.amazon.com/javascript/"},license:"Apache-2.0",dependencies:{"@aws-crypto/sha256-browser":"5.2.0","@aws-crypto/sha256-js":"5.2.0","@aws-sdk/core":"3.758.0","@aws-sdk/middleware-host-header":"3.734.0","@aws-sdk/middleware-logger":"3.734.0","@aws-sdk/middleware-recursion-detection":"3.772.0","@aws-sdk/middleware-user-agent":"3.758.0","@aws-sdk/region-config-resolver":"3.734.0","@aws-sdk/types":"3.734.0","@aws-sdk/util-endpoints":"3.743.0","@aws-sdk/util-user-agent-browser":"3.734.0","@aws-sdk/util-user-agent-node":"3.758.0","@smithy/config-resolver":"^4.0.1","@smithy/core":"^3.1.5","@smithy/fetch-http-handler":"^5.0.1","@smithy/hash-node":"^4.0.1","@smithy/invalid-dependency":"^4.0.1","@smithy/middleware-content-length":"^4.0.1","@smithy/middleware-endpoint":"^4.0.6","@smithy/middleware-retry":"^4.0.7","@smithy/middleware-serde":"^4.0.2","@smithy/middleware-stack":"^4.0.1","@smithy/node-config-provider":"^4.0.1","@smithy/node-http-handler":"^4.0.3","@smithy/protocol-http":"^5.0.1","@smithy/smithy-client":"^4.1.6","@smithy/types":"^4.1.0","@smithy/url-parser":"^4.0.1","@smithy/util-base64":"^4.0.0","@smithy/util-body-length-browser":"^4.0.0","@smithy/util-body-length-node":"^4.0.0","@smithy/util-defaults-mode-browser":"^4.0.7","@smithy/util-defaults-mode-node":"^4.0.7","@smithy/util-endpoints":"^3.0.1","@smithy/util-middleware":"^4.0.1","@smithy/util-retry":"^4.0.1","@smithy/util-utf8":"^4.0.0",tslib:"^2.6.2"},devDependencies:{concurrently:"7.0.0","downlevel-dts":"0.10.1",rimraf:"3.0.2",typescript:"~5.2.2"},typesVersions:{"<4.0":{"dist-types/*":["dist-types/ts3.4/*"]}},files:["./sso-oidc.d.ts","./sso-oidc.js","./sts.d.ts","./sts.js","dist-*/**"],browser:{"./dist-es/submodules/sso-oidc/runtimeConfig":"./dist-es/submodules/sso-oidc/runtimeConfig.browser","./dist-es/submodules/sts/runtimeConfig":"./dist-es/submodules/sts/runtimeConfig.browser"},"react-native":{},homepage:"https://github.com/aws/aws-sdk-js-v3/tree/main/packages/nested-clients",repository:{type:"git",url:"https://github.com/aws/aws-sdk-js-v3.git",directory:"packages/nested-clients"},exports:{"./sso-oidc":{module:"./dist-es/submodules/sso-oidc/index.js",node:"./dist-cjs/submodules/sso-oidc/index.js",import:"./dist-es/submodules/sso-oidc/index.js",require:"./dist-cjs/submodules/sso-oidc/index.js",types:"./dist-types/submodules/sso-oidc/index.d.ts"},"./sts":{module:"./dist-es/submodules/sts/index.js",node:"./dist-cjs/submodules/sts/index.js",import:"./dist-es/submodules/sts/index.js",require:"./dist-cjs/submodules/sts/index.js",types:"./dist-types/submodules/sts/index.d.ts"}}}});var nF=H((YG0,oQ)=>{var{defineProperty:UU,getOwnPropertyDescriptor:ep,getOwnPropertyNames:ap}=Object,op=Object.prototype.hasOwnProperty,gQ=(f,h)=>UU(f,"name",{value:h,configurable:!0}),pp=(f,h)=>{for(var w in h)UU(f,w,{get:h[w],enumerable:!0})},up=(f,h,w,s)=>{if(h&&typeof h==="object"||typeof h==="function"){for(let $ of ap(h))if(!op.call(f,$)&&$!==w)UU(f,$,{get:()=>h[$],enumerable:!(s=ep(h,$))||s.enumerable})}return f},tp=(f)=>up(UU({},"__esModule",{value:!0}),f),xQ={};pp(xQ,{NODE_APP_ID_CONFIG_OPTIONS:()=>$u,UA_APP_ID_ENV_NAME:()=>eQ,UA_APP_ID_INI_NAME:()=>aQ,createDefaultUserAgentProvider:()=>nQ,crtAvailability:()=>_Q,defaultUserAgent:()=>hu});oQ.exports=tp(xQ);var cQ=B0("os"),_F=B0("process"),_Q={isCrtAvailable:!1},fu=gQ(()=>{if(_Q.isCrtAvailable)return["md/crt-avail"];return null},"isCrtAvailable"),nQ=gQ(({serviceId:f,clientVersion:h})=>{return async(w)=>{let s=[["aws-sdk-js",h],["ua","2.1"],[`os/${cQ.platform()}`,cQ.release()],["lang/js"],["md/nodejs",`${_F.versions.node}`]],$=fu();if($)s.push($);if(f)s.push([`api/${f}`,h]);if(_F.env.AWS_EXECUTION_ENV)s.push([`exec-env/${_F.env.AWS_EXECUTION_ENV}`]);let r=await w?.userAgentAppId?.();return r?[...s,[`app/${r}`]]:[...s]}},"createDefaultUserAgentProvider"),hu=nQ,wu=gE(),eQ="AWS_SDK_UA_APP_ID",aQ="sdk_ua_app_id",su="sdk-ua-app-id",$u={environmentVariableSelector:(f)=>f[eQ],configFileSelector:(f)=>f[aQ]??f[su],default:wu.DEFAULT_UA_APP_ID}});var oF=H((MG0,fK)=>{var{defineProperty:TU,getOwnPropertyDescriptor:ru,getOwnPropertyNames:Eu}=Object,Uu=Object.prototype.hasOwnProperty,uQ=(f,h)=>TU(f,"name",{value:h,configurable:!0}),Tu=(f,h)=>{for(var w in h)TU(f,w,{get:h[w],enumerable:!0})},Fu=(f,h,w,s)=>{if(h&&typeof h==="object"||typeof h==="function"){for(let $ of Eu(h))if(!Uu.call(f,$)&&$!==w)TU(f,$,{get:()=>h[$],enumerable:!(s=ru(h,$))||s.enumerable})}return f},Cu=(f)=>Fu(TU({},"__esModule",{value:!0}),f),tQ={};Tu(tQ,{Hash:()=>Bu});fK.exports=Cu(tQ);var eF=qw(),Iu=u1(),Lu=B0("buffer"),pQ=B0("crypto"),Bu=class{static{uQ(this,"Hash")}constructor(f,h){this.algorithmIdentifier=f,this.secret=h,this.reset()}update(f,h){this.hash.update(Iu.toUint8Array(aF(f,h)))}digest(){return Promise.resolve(this.hash.digest())}reset(){this.hash=this.secret?pQ.createHmac(this.algorithmIdentifier,aF(this.secret)):pQ.createHash(this.algorithmIdentifier)}};function aF(f,h){if(Lu.Buffer.isBuffer(f))return f;if(typeof f==="string")return eF.fromString(f,h);if(ArrayBuffer.isView(f))return eF.fromArrayBuffer(f.buffer,f.byteOffset,f.byteLength);return eF.fromArrayBuffer(f)}uQ(aF,"castSourceData")});var pF=H((KG0,sK)=>{var{defineProperty:FU,getOwnPropertyDescriptor:Au,getOwnPropertyNames:Gu}=Object,Wu=Object.prototype.hasOwnProperty,zu=(f,h)=>FU(f,"name",{value:h,configurable:!0}),Ru=(f,h)=>{for(var w in h)FU(f,w,{get:h[w],enumerable:!0})},Xu=(f,h,w,s)=>{if(h&&typeof h==="object"||typeof h==="function"){for(let $ of Gu(h))if(!Wu.call(f,$)&&$!==w)FU(f,$,{get:()=>h[$],enumerable:!(s=Au(h,$))||s.enumerable})}return f},Su=(f)=>Xu(FU({},"__esModule",{value:!0}),f),wK={};Ru(wK,{calculateBodyLength:()=>Yu});sK.exports=Su(wK);var hK=B0("fs"),Yu=zu((f)=>{if(!f)return 0;if(typeof f==="string")return Buffer.byteLength(f);else if(typeof f.byteLength==="number")return f.byteLength;else if(typeof f.size==="number")return f.size;else if(typeof f.start==="number"&&typeof f.end==="number")return f.end+1-f.start;else if(typeof f.path==="string"||Buffer.isBuffer(f.path))return hK.lstatSync(f.path).size;else if(typeof f.fd==="number")return hK.fstatSync(f.fd).size;throw new Error(`Body Length computation failed for ${f}`)},"calculateBodyLength")});var SK=H((RK)=>{Object.defineProperty(RK,"__esModule",{value:!0});RK.ruleSet=void 0;var AK="required",m1="fn",d1="argv",Ps="ref",$K=!0,rK="isSet",Fr="booleanEquals",Js="error",Vs="endpoint",ef="tree",uF="PartitionResult",tF="getAttr",EK={[AK]:!1,type:"String"},UK={[AK]:!0,default:!1,type:"Boolean"},TK={[Ps]:"Endpoint"},GK={[m1]:Fr,[d1]:[{[Ps]:"UseFIPS"},!0]},WK={[m1]:Fr,[d1]:[{[Ps]:"UseDualStack"},!0]},b1={},FK={[m1]:tF,[d1]:[{[Ps]:uF},"supportsFIPS"]},zK={[Ps]:uF},CK={[m1]:Fr,[d1]:[!0,{[m1]:tF,[d1]:[zK,"supportsDualStack"]}]},IK=[GK],LK=[WK],BK=[{[Ps]:"Region"}],Mu={version:"1.0",parameters:{Region:EK,UseDualStack:UK,UseFIPS:UK,Endpoint:EK},rules:[{conditions:[{[m1]:rK,[d1]:[TK]}],rules:[{conditions:IK,error:"Invalid Configuration: FIPS and custom endpoint are not supported",type:Js},{conditions:LK,error:"Invalid Configuration: Dualstack and custom endpoint are not supported",type:Js},{endpoint:{url:TK,properties:b1,headers:b1},type:Vs}],type:ef},{conditions:[{[m1]:rK,[d1]:BK}],rules:[{conditions:[{[m1]:"aws.partition",[d1]:BK,assign:uF}],rules:[{conditions:[GK,WK],rules:[{conditions:[{[m1]:Fr,[d1]:[$K,FK]},CK],rules:[{endpoint:{url:"https://oidc-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:b1,headers:b1},type:Vs}],type:ef},{error:"FIPS and DualStack are enabled, but this partition does not support one or both",type:Js}],type:ef},{conditions:IK,rules:[{conditions:[{[m1]:Fr,[d1]:[FK,$K]}],rules:[{conditions:[{[m1]:"stringEquals",[d1]:[{[m1]:tF,[d1]:[zK,"name"]},"aws-us-gov"]}],endpoint:{url:"https://oidc.{Region}.amazonaws.com",properties:b1,headers:b1},type:Vs},{endpoint:{url:"https://oidc-fips.{Region}.{PartitionResult#dnsSuffix}",properties:b1,headers:b1},type:Vs}],type:ef},{error:"FIPS is enabled but this partition does not support FIPS",type:Js}],type:ef},{conditions:LK,rules:[{conditions:[CK],rules:[{endpoint:{url:"https://oidc.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:b1,headers:b1},type:Vs}],type:ef},{error:"DualStack is enabled but this partition does not support DualStack",type:Js}],type:ef},{endpoint:{url:"https://oidc.{Region}.{PartitionResult#dnsSuffix}",properties:b1,headers:b1},type:Vs}],type:ef}],type:ef},{error:"Invalid Configuration: Missing Region",type:Js}]};RK.ruleSet=Mu});var QK=H((YK)=>{Object.defineProperty(YK,"__esModule",{value:!0});YK.defaultEndpointResolver=void 0;var Qu=dE(),f6=bE(),Ku=SK(),Zu=new f6.EndpointCache({size:50,params:["Endpoint","Region","UseDualStack","UseFIPS"]}),Ju=(f,h={})=>{return Zu.get(f,()=>f6.resolveEndpoint(Ku.ruleSet,{endpointParams:f,logger:h.logger}))};YK.defaultEndpointResolver=Ju;f6.customEndpointFunctions.aws=Qu.awsEndpointFunctions});var PK=H((JK)=>{Object.defineProperty(JK,"__esModule",{value:!0});JK.getRuntimeConfig=void 0;var Vu=O0(),Pu=m0(),Hu=J0(),Nu=Er(),KK=Ih(),ZK=u1(),Du=gF(),qu=QK(),ku=(f)=>{return{apiVersion:"2019-06-10",base64Decoder:f?.base64Decoder??KK.fromBase64,base64Encoder:f?.base64Encoder??KK.toBase64,disableHostPrefix:f?.disableHostPrefix??!1,endpointProvider:f?.endpointProvider??qu.defaultEndpointResolver,extensions:f?.extensions??[],httpAuthSchemeProvider:f?.httpAuthSchemeProvider??Du.defaultSSOOIDCHttpAuthSchemeProvider,httpAuthSchemes:f?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:(h)=>h.getIdentityProvider("aws.auth#sigv4"),signer:new Vu.AwsSdkSigV4Signer},{schemeId:"smithy.api#noAuth",identityProvider:(h)=>h.getIdentityProvider("smithy.api#noAuth")||(async()=>({})),signer:new Pu.NoAuthSigner}],logger:f?.logger??new Hu.NoOpLogger,serviceId:f?.serviceId??"SSO OIDC",urlParser:f?.urlParser??Nu.parseUrl,utf8Decoder:f?.utf8Decoder??ZK.fromUtf8,utf8Encoder:f?.utf8Encoder??ZK.toUtf8}};JK.getRuntimeConfig=ku});var iK=H((PG0,dK)=>{var{defineProperty:LU,getOwnPropertyDescriptor:yu,getOwnPropertyNames:ju}=Object,Ou=Object.prototype.hasOwnProperty,_0=(f,h)=>LU(f,"name",{value:h,configurable:!0}),lu=(f,h)=>{for(var w in h)LU(f,w,{get:h[w],enumerable:!0})},vu=(f,h,w,s)=>{if(h&&typeof h==="object"||typeof h==="function"){for(let $ of ju(h))if(!Ou.call(f,$)&&$!==w)LU(f,$,{get:()=>h[$],enumerable:!(s=yu(h,$))||s.enumerable})}return f},bu=(f)=>vu(LU({},"__esModule",{value:!0}),f),qK={};lu(qK,{DEFAULT_MAX_RETRIES:()=>OK,DEFAULT_TIMEOUT:()=>jK,ENV_CMDS_AUTH_TOKEN:()=>s6,ENV_CMDS_FULL_URI:()=>CU,ENV_CMDS_RELATIVE_URI:()=>IU,Endpoint:()=>lK,fromContainerMetadata:()=>cu,fromInstanceMetadata:()=>Ct,getInstanceMetadataEndpoint:()=>bK,httpRequest:()=>Hs,providerConfigFromInit:()=>$6});dK.exports=bu(qK);var mu=B0("url"),Zf=D$(),du=B0("buffer"),iu=B0("http");function Hs(f){return new Promise((h,w)=>{let s=iu.request({method:"GET",...f,hostname:f.hostname?.replace(/^\[(.+)\]$/,"$1")});s.on("error",($)=>{w(Object.assign(new Zf.ProviderError("Unable to connect to instance metadata service"),$)),s.destroy()}),s.on("timeout",()=>{w(new Zf.ProviderError("TimeoutError from instance metadata service")),s.destroy()}),s.on("response",($)=>{let{statusCode:r=400}=$;if(r<200||300<=r)w(Object.assign(new Zf.ProviderError("Error response received from instance metadata service"),{statusCode:r})),s.destroy();let E=[];$.on("data",(U)=>{E.push(U)}),$.on("end",()=>{h(du.Buffer.concat(E)),s.destroy()})}),s.end()})}_0(Hs,"httpRequest");var kK=_0((f)=>Boolean(f)&&typeof f==="object"&&typeof f.AccessKeyId==="string"&&typeof f.SecretAccessKey==="string"&&typeof f.Token==="string"&&typeof f.Expiration==="string","isImdsCredentials"),yK=_0((f)=>({accessKeyId:f.AccessKeyId,secretAccessKey:f.SecretAccessKey,sessionToken:f.Token,expiration:new Date(f.Expiration),...f.AccountId&&{accountId:f.AccountId}}),"fromImdsCredentials"),jK=1000,OK=0,$6=_0(({maxRetries:f=OK,timeout:h=jK})=>({maxRetries:f,timeout:h}),"providerConfigFromInit"),w6=_0((f,h)=>{let w=f();for(let s=0;s<h;s++)w=w.catch(f);return w},"retry"),CU="AWS_CONTAINER_CREDENTIALS_FULL_URI",IU="AWS_CONTAINER_CREDENTIALS_RELATIVE_URI",s6="AWS_CONTAINER_AUTHORIZATION_TOKEN",cu=_0((f={})=>{let{timeout:h,maxRetries:w}=$6(f);return()=>w6(async()=>{let s=await eu({logger:f.logger}),$=JSON.parse(await gu(h,s));if(!kK($))throw new Zf.CredentialsProviderError("Invalid response received from instance metadata service.",{logger:f.logger});return yK($)},w)},"fromContainerMetadata"),gu=_0(async(f,h)=>{if(process.env[s6])h.headers={...h.headers,Authorization:process.env[s6]};return(await Hs({...h,timeout:f})).toString()},"requestFromEcsImds"),xu="169.254.170.2",_u={localhost:!0,"127.0.0.1":!0},nu={"http:":!0,"https:":!0},eu=_0(async({logger:f})=>{if(process.env[IU])return{hostname:xu,path:process.env[IU]};if(process.env[CU]){let h=mu.parse(process.env[CU]);if(!h.hostname||!(h.hostname in _u))throw new Zf.CredentialsProviderError(`${h.hostname} is not a valid container metadata service hostname`,{tryNextLink:!1,logger:f});if(!h.protocol||!(h.protocol in nu))throw new Zf.CredentialsProviderError(`${h.protocol} is not a valid container metadata service protocol`,{tryNextLink:!1,logger:f});return{...h,port:h.port?parseInt(h.port,10):void 0}}throw new Zf.CredentialsProviderError(`The container metadata credential provider cannot be used unless the ${IU} or ${CU} environment variable is set`,{tryNextLink:!1,logger:f})},"getCmdsUri"),au=class f extends Zf.CredentialsProviderError{constructor(h,w=!0){super(h,w);this.tryNextLink=w,this.name="InstanceMetadataV1FallbackError",Object.setPrototypeOf(this,f.prototype)}static{_0(this,"InstanceMetadataV1FallbackError")}},r6=Ms(),ou=Er(),lK=((f)=>{return f.IPv4="http://169.254.169.254",f.IPv6="http://[fd00:ec2::254]",f})(lK||{}),pu="AWS_EC2_METADATA_SERVICE_ENDPOINT",uu="ec2_metadata_service_endpoint",tu={environmentVariableSelector:(f)=>f[pu],configFileSelector:(f)=>f[uu],default:void 0},vK=((f)=>{return f.IPv4="IPv4",f.IPv6="IPv6",f})(vK||{}),ft="AWS_EC2_METADATA_SERVICE_ENDPOINT_MODE",ht="ec2_metadata_service_endpoint_mode",wt={environmentVariableSelector:(f)=>f[ft],configFileSelector:(f)=>f[ht],default:"IPv4"},bK=_0(async()=>ou.parseUrl(await st()||await $t()),"getInstanceMetadataEndpoint"),st=_0(async()=>r6.loadConfig(tu)(),"getFromEndpointConfig"),$t=_0(async()=>{let f=await r6.loadConfig(wt)();switch(f){case"IPv4":return"http://169.254.169.254";case"IPv6":return"http://[fd00:ec2::254]";default:throw new Error(`Unsupported endpoint mode: ${f}. Select from ${Object.values(vK)}`)}},"getFromEndpointModeConfig"),rt=300,Et=300,Ut="https://docs.aws.amazon.com/sdkref/latest/guide/feature-static-credentials.html",HK=_0((f,h)=>{let w=rt+Math.floor(Math.random()*Et),s=new Date(Date.now()+w*1000);h.warn(`Attempting credential expiration extension due to a credential service availability issue. A refresh of these credentials will be attempted after ${new Date(s)}.
50
- For more information, please visit: `+Ut);let $=f.originalExpiration??f.expiration;return{...f,...$?{originalExpiration:$}:{},expiration:s}},"getExtendedInstanceMetadataCredentials"),Tt=_0((f,h={})=>{let w=h?.logger||console,s;return async()=>{let $;try{if($=await f(),$.expiration&&$.expiration.getTime()<Date.now())$=HK($,w)}catch(r){if(s)w.warn("Credential renew failed: ",r),$=HK(s,w);else throw r}return s=$,$}},"staticStabilityProvider"),mK="/latest/meta-data/iam/security-credentials/",Ft="/latest/api/token",h6="AWS_EC2_METADATA_V1_DISABLED",NK="ec2_metadata_v1_disabled",DK="x-aws-ec2-metadata-token",Ct=_0((f={})=>Tt(It(f),{logger:f.logger}),"fromInstanceMetadata"),It=_0((f={})=>{let h=!1,{logger:w,profile:s}=f,{timeout:$,maxRetries:r}=$6(f),E=_0(async(U,T)=>{if(h||T.headers?.[DK]==null){let I=!1,L=!1,G=await r6.loadConfig({environmentVariableSelector:(X)=>{let Q=X[h6];if(L=!!Q&&Q!=="false",Q===void 0)throw new Zf.CredentialsProviderError(`${h6} not set in env, checking config file next.`,{logger:f.logger});return L},configFileSelector:(X)=>{let Q=X[NK];return I=!!Q&&Q!=="false",I},default:!1},{profile:s})();if(f.ec2MetadataV1Disabled||G){let X=[];if(f.ec2MetadataV1Disabled)X.push("credential provider initialization (runtime option ec2MetadataV1Disabled)");if(I)X.push(`config file profile (${NK})`);if(L)X.push(`process environment variable (${h6})`);throw new au(`AWS EC2 Metadata v1 fallback has been blocked by AWS SDK configuration in the following: [${X.join(", ")}].`)}}let C=(await w6(async()=>{let I;try{I=await Bt(T)}catch(L){if(L.statusCode===401)h=!1;throw L}return I},U)).trim();return w6(async()=>{let I;try{I=await At(C,T,f)}catch(L){if(L.statusCode===401)h=!1;throw L}return I},U)},"getCredentials");return async()=>{let U=await bK();if(h)return w?.debug("AWS SDK Instance Metadata","using v1 fallback (no token fetch)"),E(r,{...U,timeout:$});else{let T;try{T=(await Lt({...U,timeout:$})).toString()}catch(F){if(F?.statusCode===400)throw Object.assign(F,{message:"EC2 Metadata token request returned error"});else if(F.message==="TimeoutError"||[403,404,405].includes(F.statusCode))h=!0;return w?.debug("AWS SDK Instance Metadata","using v1 fallback (initial)"),E(r,{...U,timeout:$})}return E(r,{...U,headers:{[DK]:T},timeout:$})}}},"getInstanceMetadataProvider"),Lt=_0(async(f)=>Hs({...f,path:Ft,method:"PUT",headers:{"x-aws-ec2-metadata-token-ttl-seconds":"21600"}}),"getMetadataToken"),Bt=_0(async(f)=>(await Hs({...f,path:mK})).toString(),"getProfile"),At=_0(async(f,h,w)=>{let s=JSON.parse((await Hs({...h,path:mK+f})).toString());if(!kK(s))throw new Zf.CredentialsProviderError("Invalid response received from instance metadata service.",{logger:w.logger});return yK(s)},"getCredentialsFromProfile")});var U6=H((HG0,eK)=>{var{create:Gt,defineProperty:Cr,getOwnPropertyDescriptor:Wt,getOwnPropertyNames:zt,getPrototypeOf:Rt}=Object,Xt=Object.prototype.hasOwnProperty,E6=(f,h)=>Cr(f,"name",{value:h,configurable:!0}),St=(f,h)=>{for(var w in h)Cr(f,w,{get:h[w],enumerable:!0})},_K=(f,h,w,s)=>{if(h&&typeof h==="object"||typeof h==="function"){for(let $ of zt(h))if(!Xt.call(f,$)&&$!==w)Cr(f,$,{get:()=>h[$],enumerable:!(s=Wt(h,$))||s.enumerable})}return f},Yt=(f,h,w)=>(w=f!=null?Gt(Rt(f)):{},_K(h||!f||!f.__esModule?Cr(w,"default",{value:f,enumerable:!0}):w,f)),Mt=(f)=>_K(Cr({},"__esModule",{value:!0}),f),nK={};St(nK,{resolveDefaultsModeConfig:()=>qt});eK.exports=Mt(nK);var Qt=Xs(),cK=Ms(),Kt=D$(),Zt="AWS_EXECUTION_ENV",gK="AWS_REGION",xK="AWS_DEFAULT_REGION",Jt="AWS_EC2_METADATA_DISABLED",Vt=["in-region","cross-region","mobile","standard","legacy"],Pt="/latest/meta-data/placement/region",Ht="AWS_DEFAULTS_MODE",Nt="defaults_mode",Dt={environmentVariableSelector:(f)=>{return f[Ht]},configFileSelector:(f)=>{return f[Nt]},default:"legacy"},qt=E6(({region:f=cK.loadConfig(Qt.NODE_REGION_CONFIG_OPTIONS),defaultsMode:h=cK.loadConfig(Dt)}={})=>Kt.memoize(async()=>{let w=typeof h==="function"?await h():h;switch(w?.toLowerCase()){case"auto":return kt(f);case"in-region":case"cross-region":case"mobile":case"standard":case"legacy":return Promise.resolve(w?.toLocaleLowerCase());case void 0:return Promise.resolve("legacy");default:throw new Error(`Invalid parameter for "defaultsMode", expect ${Vt.join(", ")}, got ${w}`)}}),"resolveDefaultsModeConfig"),kt=E6(async(f)=>{if(f){let h=typeof f==="function"?await f():f,w=await yt();if(!w)return"standard";if(h===w)return"in-region";else return"cross-region"}return"standard"},"resolveNodeDefaultsModeAuto"),yt=E6(async()=>{if(process.env[Zt]&&(process.env[gK]||process.env[xK]))return process.env[gK]??process.env[xK];if(!process.env[Jt])try{let{getInstanceMetadataEndpoint:f,httpRequest:h}=await Promise.resolve().then(()=>Yt(iK())),w=await f();return(await h({...w,path:Pt})).toString()}catch(f){}},"inferPhysicalRegion")});var fZ=H((uK)=>{Object.defineProperty(uK,"__esModule",{value:!0});uK.getRuntimeConfig=void 0;var jt=l4(),Ot=jt.__importDefault(xF()),lt=O0(),aK=nF(),BU=Xs(),vt=oF(),oK=Tr(),Ns=Ms(),pK=X4(),bt=pF(),mt=rU(),dt=PK(),it=J0(),ct=U6(),gt=J0(),xt=(f)=>{gt.emitWarningIfUnsupportedVersion(process.version);let h=ct.resolveDefaultsModeConfig(f),w=()=>h().then(it.loadConfigsForDefaultMode),s=dt.getRuntimeConfig(f);lt.emitWarningIfUnsupportedVersion(process.version);let $={profile:f?.profile};return{...s,...f,runtime:"node",defaultsMode:h,bodyLengthChecker:f?.bodyLengthChecker??bt.calculateBodyLength,defaultUserAgentProvider:f?.defaultUserAgentProvider??aK.createDefaultUserAgentProvider({serviceId:s.serviceId,clientVersion:Ot.default.version}),maxAttempts:f?.maxAttempts??Ns.loadConfig(oK.NODE_MAX_ATTEMPT_CONFIG_OPTIONS,f),region:f?.region??Ns.loadConfig(BU.NODE_REGION_CONFIG_OPTIONS,{...BU.NODE_REGION_CONFIG_FILE_OPTIONS,...$}),requestHandler:pK.NodeHttpHandler.create(f?.requestHandler??w),retryMode:f?.retryMode??Ns.loadConfig({...oK.NODE_RETRY_MODE_CONFIG_OPTIONS,default:async()=>(await w()).retryMode||mt.DEFAULT_RETRY_MODE},f),sha256:f?.sha256??vt.Hash.bind(null,"sha256"),streamCollector:f?.streamCollector??pK.streamCollector,useDualstackEndpoint:f?.useDualstackEndpoint??Ns.loadConfig(BU.NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS,$),useFipsEndpoint:f?.useFipsEndpoint??Ns.loadConfig(BU.NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS,$),userAgentAppId:f?.userAgentAppId??Ns.loadConfig(aK.NODE_APP_ID_CONFIG_OPTIONS,$)}};uK.getRuntimeConfig=xt});var T6=H((DG0,EZ)=>{var{defineProperty:AU,getOwnPropertyDescriptor:_t,getOwnPropertyNames:nt}=Object,et=Object.prototype.hasOwnProperty,Ds=(f,h)=>AU(f,"name",{value:h,configurable:!0}),at=(f,h)=>{for(var w in h)AU(f,w,{get:h[w],enumerable:!0})},ot=(f,h,w,s)=>{if(h&&typeof h==="object"||typeof h==="function"){for(let $ of nt(h))if(!et.call(f,$)&&$!==w)AU(f,$,{get:()=>h[$],enumerable:!(s=_t(h,$))||s.enumerable})}return f},pt=(f)=>ot(AU({},"__esModule",{value:!0}),f),wZ={};at(wZ,{NODE_REGION_CONFIG_FILE_OPTIONS:()=>h00,NODE_REGION_CONFIG_OPTIONS:()=>f00,REGION_ENV_NAME:()=>sZ,REGION_INI_NAME:()=>$Z,getAwsRegionExtensionConfiguration:()=>ut,resolveAwsRegionExtensionConfiguration:()=>tt,resolveRegionConfig:()=>w00});EZ.exports=pt(wZ);var ut=Ds((f)=>{let h=Ds(async()=>{if(f.region===void 0)throw new Error("Region is missing from runtimeConfig");let w=f.region;if(typeof w==="string")return w;return w()},"runtimeConfigRegion");return{setRegion(w){h=w},region(){return h}}},"getAwsRegionExtensionConfiguration"),tt=Ds((f)=>{return{region:f.region()}},"resolveAwsRegionExtensionConfiguration"),sZ="AWS_REGION",$Z="region",f00={environmentVariableSelector:(f)=>f[sZ],configFileSelector:(f)=>f[$Z],default:()=>{throw new Error("Region is missing")}},h00={preferredFile:"credentials"},rZ=Ds((f)=>typeof f==="string"&&(f.startsWith("fips-")||f.endsWith("-fips")),"isFipsRegion"),hZ=Ds((f)=>rZ(f)?["fips-aws-global","aws-fips"].includes(f)?"us-east-1":f.replace(/fips-(dkr-|prod-)?|-fips/,""):f,"getRealRegion"),w00=Ds((f)=>{let{region:h,useFipsEndpoint:w}=f;if(!h)throw new Error("Region is missing");return{...f,region:async()=>{if(typeof h==="string")return hZ(h);let s=await h();return hZ(s)},useFipsEndpoint:async()=>{let s=typeof h==="string"?h:await h();if(rZ(s))return!0;return typeof w!=="function"?Promise.resolve(!!w):w()}}},"resolveRegionConfig")});var I6=H((qG0,kZ)=>{var{defineProperty:WU,getOwnPropertyDescriptor:s00,getOwnPropertyNames:$00}=Object,r00=Object.prototype.hasOwnProperty,w0=(f,h)=>WU(f,"name",{value:h,configurable:!0}),E00=(f,h)=>{for(var w in h)WU(f,w,{get:h[w],enumerable:!0})},U00=(f,h,w,s)=>{if(h&&typeof h==="object"||typeof h==="function"){for(let $ of $00(h))if(!r00.call(f,$)&&$!==w)WU(f,$,{get:()=>h[$],enumerable:!(s=s00(h,$))||s.enumerable})}return f},T00=(f)=>U00(WU({},"__esModule",{value:!0}),f),AZ={};E00(AZ,{$Command:()=>zZ.Command,AccessDeniedException:()=>RZ,AuthorizationPendingException:()=>XZ,CreateTokenCommand:()=>DZ,CreateTokenRequestFilterSensitiveLog:()=>SZ,CreateTokenResponseFilterSensitiveLog:()=>YZ,ExpiredTokenException:()=>MZ,InternalServerException:()=>QZ,InvalidClientException:()=>KZ,InvalidGrantException:()=>ZZ,InvalidRequestException:()=>JZ,InvalidScopeException:()=>VZ,SSOOIDC:()=>qZ,SSOOIDCClient:()=>WZ,SSOOIDCServiceException:()=>Z1,SlowDownException:()=>PZ,UnauthorizedClientException:()=>HZ,UnsupportedGrantTypeException:()=>NZ,__Client:()=>GZ.Client});kZ.exports=T00(AZ);var UZ=LF(),F00=BF(),C00=GF(),TZ=gE(),I00=Xs(),F6=m0(),L00=KF(),B00=Qs(),FZ=Tr(),GZ=J0(),CZ=gF(),A00=w0((f)=>{return{...f,useDualstackEndpoint:f.useDualstackEndpoint??!1,useFipsEndpoint:f.useFipsEndpoint??!1,defaultSigningName:"sso-oauth"}},"resolveClientEndpointParameters"),G00={UseFIPS:{type:"builtInParams",name:"useFipsEndpoint"},Endpoint:{type:"builtInParams",name:"endpoint"},Region:{type:"builtInParams",name:"region"},UseDualStack:{type:"builtInParams",name:"useDualstackEndpoint"}},W00=fZ(),IZ=T6(),LZ=t0(),BZ=J0(),z00=w0((f)=>{let{httpAuthSchemes:h,httpAuthSchemeProvider:w,credentials:s}=f;return{setHttpAuthScheme($){let r=h.findIndex((E)=>E.schemeId===$.schemeId);if(r===-1)h.push($);else h.splice(r,1,$)},httpAuthSchemes(){return h},setHttpAuthSchemeProvider($){w=$},httpAuthSchemeProvider(){return w},setCredentials($){s=$},credentials(){return s}}},"getHttpAuthExtensionConfiguration"),R00=w0((f)=>{return{httpAuthSchemes:f.httpAuthSchemes(),httpAuthSchemeProvider:f.httpAuthSchemeProvider(),credentials:f.credentials()}},"resolveHttpAuthRuntimeConfig"),GU=w0((f)=>f,"asPartial"),X00=w0((f,h)=>{let w={...GU(IZ.getAwsRegionExtensionConfiguration(f)),...GU(BZ.getDefaultExtensionConfiguration(f)),...GU(LZ.getHttpHandlerExtensionConfiguration(f)),...GU(z00(f))};return h.forEach((s)=>s.configure(w)),{...f,...IZ.resolveAwsRegionExtensionConfiguration(w),...BZ.resolveDefaultRuntimeConfig(w),...LZ.resolveHttpHandlerRuntimeConfig(w),...R00(w)}},"resolveRuntimeExtensions"),WZ=class extends GZ.Client{static{w0(this,"SSOOIDCClient")}config;constructor(...[f]){let h=W00.getRuntimeConfig(f||{}),w=A00(h),s=TZ.resolveUserAgentConfig(w),$=FZ.resolveRetryConfig(s),r=I00.resolveRegionConfig($),E=UZ.resolveHostHeaderConfig(r),U=B00.resolveEndpointConfig(E),T=CZ.resolveHttpAuthSchemeConfig(U),F=X00(T,f?.extensions||[]);super(F);this.config=F,this.middlewareStack.use(TZ.getUserAgentPlugin(this.config)),this.middlewareStack.use(FZ.getRetryPlugin(this.config)),this.middlewareStack.use(L00.getContentLengthPlugin(this.config)),this.middlewareStack.use(UZ.getHostHeaderPlugin(this.config)),this.middlewareStack.use(F00.getLoggerPlugin(this.config)),this.middlewareStack.use(C00.getRecursionDetectionPlugin(this.config)),this.middlewareStack.use(F6.getHttpAuthSchemeEndpointRuleSetPlugin(this.config,{httpAuthSchemeParametersProvider:CZ.defaultSSOOIDCHttpAuthSchemeParametersProvider,identityProviderConfigProvider:w0(async(C)=>new F6.DefaultIdentityProviderConfig({"aws.auth#sigv4":C.credentials}),"identityProviderConfigProvider")})),this.middlewareStack.use(F6.getHttpSigningPlugin(this.config))}destroy(){super.destroy()}},S00=J0(),Y00=Qs(),M00=Dw(),zZ=J0(),qs=J0(),Q00=J0(),Z1=class f extends Q00.ServiceException{static{w0(this,"SSOOIDCServiceException")}constructor(h){super(h);Object.setPrototypeOf(this,f.prototype)}},RZ=class f extends Z1{static{w0(this,"AccessDeniedException")}name="AccessDeniedException";$fault="client";error;error_description;constructor(h){super({name:"AccessDeniedException",$fault:"client",...h});Object.setPrototypeOf(this,f.prototype),this.error=h.error,this.error_description=h.error_description}},XZ=class f extends Z1{static{w0(this,"AuthorizationPendingException")}name="AuthorizationPendingException";$fault="client";error;error_description;constructor(h){super({name:"AuthorizationPendingException",$fault:"client",...h});Object.setPrototypeOf(this,f.prototype),this.error=h.error,this.error_description=h.error_description}},SZ=w0((f)=>({...f,...f.clientSecret&&{clientSecret:qs.SENSITIVE_STRING},...f.refreshToken&&{refreshToken:qs.SENSITIVE_STRING},...f.codeVerifier&&{codeVerifier:qs.SENSITIVE_STRING}}),"CreateTokenRequestFilterSensitiveLog"),YZ=w0((f)=>({...f,...f.accessToken&&{accessToken:qs.SENSITIVE_STRING},...f.refreshToken&&{refreshToken:qs.SENSITIVE_STRING},...f.idToken&&{idToken:qs.SENSITIVE_STRING}}),"CreateTokenResponseFilterSensitiveLog"),MZ=class f extends Z1{static{w0(this,"ExpiredTokenException")}name="ExpiredTokenException";$fault="client";error;error_description;constructor(h){super({name:"ExpiredTokenException",$fault:"client",...h});Object.setPrototypeOf(this,f.prototype),this.error=h.error,this.error_description=h.error_description}},QZ=class f extends Z1{static{w0(this,"InternalServerException")}name="InternalServerException";$fault="server";error;error_description;constructor(h){super({name:"InternalServerException",$fault:"server",...h});Object.setPrototypeOf(this,f.prototype),this.error=h.error,this.error_description=h.error_description}},KZ=class f extends Z1{static{w0(this,"InvalidClientException")}name="InvalidClientException";$fault="client";error;error_description;constructor(h){super({name:"InvalidClientException",$fault:"client",...h});Object.setPrototypeOf(this,f.prototype),this.error=h.error,this.error_description=h.error_description}},ZZ=class f extends Z1{static{w0(this,"InvalidGrantException")}name="InvalidGrantException";$fault="client";error;error_description;constructor(h){super({name:"InvalidGrantException",$fault:"client",...h});Object.setPrototypeOf(this,f.prototype),this.error=h.error,this.error_description=h.error_description}},JZ=class f extends Z1{static{w0(this,"InvalidRequestException")}name="InvalidRequestException";$fault="client";error;error_description;constructor(h){super({name:"InvalidRequestException",$fault:"client",...h});Object.setPrototypeOf(this,f.prototype),this.error=h.error,this.error_description=h.error_description}},VZ=class f extends Z1{static{w0(this,"InvalidScopeException")}name="InvalidScopeException";$fault="client";error;error_description;constructor(h){super({name:"InvalidScopeException",$fault:"client",...h});Object.setPrototypeOf(this,f.prototype),this.error=h.error,this.error_description=h.error_description}},PZ=class f extends Z1{static{w0(this,"SlowDownException")}name="SlowDownException";$fault="client";error;error_description;constructor(h){super({name:"SlowDownException",$fault:"client",...h});Object.setPrototypeOf(this,f.prototype),this.error=h.error,this.error_description=h.error_description}},HZ=class f extends Z1{static{w0(this,"UnauthorizedClientException")}name="UnauthorizedClientException";$fault="client";error;error_description;constructor(h){super({name:"UnauthorizedClientException",$fault:"client",...h});Object.setPrototypeOf(this,f.prototype),this.error=h.error,this.error_description=h.error_description}},NZ=class f extends Z1{static{w0(this,"UnsupportedGrantTypeException")}name="UnsupportedGrantTypeException";$fault="client";error;error_description;constructor(h){super({name:"UnsupportedGrantTypeException",$fault:"client",...h});Object.setPrototypeOf(this,f.prototype),this.error=h.error,this.error_description=h.error_description}},C6=O0(),K00=m0(),x=J0(),Z00=w0(async(f,h)=>{let w=K00.requestBuilder(f,h),s={"content-type":"application/json"};w.bp("/token");let $;return $=JSON.stringify(x.take(f,{clientId:[],clientSecret:[],code:[],codeVerifier:[],deviceCode:[],grantType:[],redirectUri:[],refreshToken:[],scope:w0((r)=>x._json(r),"scope")})),w.m("POST").h(s).b($),w.build()},"se_CreateTokenCommand"),J00=w0(async(f,h)=>{if(f.statusCode!==200&&f.statusCode>=300)return V00(f,h);let w=x.map({$metadata:i1(f)}),s=x.expectNonNull(x.expectObject(await C6.parseJsonBody(f.body,h)),"body"),$=x.take(s,{accessToken:x.expectString,expiresIn:x.expectInt32,idToken:x.expectString,refreshToken:x.expectString,tokenType:x.expectString});return Object.assign(w,$),w},"de_CreateTokenCommand"),V00=w0(async(f,h)=>{let w={...f,body:await C6.parseJsonErrorBody(f.body,h)},s=C6.loadRestJsonErrorCode(f,w.body);switch(s){case"AccessDeniedException":case"com.amazonaws.ssooidc#AccessDeniedException":throw await H00(w,h);case"AuthorizationPendingException":case"com.amazonaws.ssooidc#AuthorizationPendingException":throw await N00(w,h);case"ExpiredTokenException":case"com.amazonaws.ssooidc#ExpiredTokenException":throw await D00(w,h);case"InternalServerException":case"com.amazonaws.ssooidc#InternalServerException":throw await q00(w,h);case"InvalidClientException":case"com.amazonaws.ssooidc#InvalidClientException":throw await k00(w,h);case"InvalidGrantException":case"com.amazonaws.ssooidc#InvalidGrantException":throw await y00(w,h);case"InvalidRequestException":case"com.amazonaws.ssooidc#InvalidRequestException":throw await j00(w,h);case"InvalidScopeException":case"com.amazonaws.ssooidc#InvalidScopeException":throw await O00(w,h);case"SlowDownException":case"com.amazonaws.ssooidc#SlowDownException":throw await l00(w,h);case"UnauthorizedClientException":case"com.amazonaws.ssooidc#UnauthorizedClientException":throw await v00(w,h);case"UnsupportedGrantTypeException":case"com.amazonaws.ssooidc#UnsupportedGrantTypeException":throw await b00(w,h);default:let $=w.body;return P00({output:f,parsedBody:$,errorCode:s})}},"de_CommandError"),P00=x.withBaseException(Z1),H00=w0(async(f,h)=>{let w=x.map({}),s=f.body,$=x.take(s,{error:x.expectString,error_description:x.expectString});Object.assign(w,$);let r=new RZ({$metadata:i1(f),...w});return x.decorateServiceException(r,f.body)},"de_AccessDeniedExceptionRes"),N00=w0(async(f,h)=>{let w=x.map({}),s=f.body,$=x.take(s,{error:x.expectString,error_description:x.expectString});Object.assign(w,$);let r=new XZ({$metadata:i1(f),...w});return x.decorateServiceException(r,f.body)},"de_AuthorizationPendingExceptionRes"),D00=w0(async(f,h)=>{let w=x.map({}),s=f.body,$=x.take(s,{error:x.expectString,error_description:x.expectString});Object.assign(w,$);let r=new MZ({$metadata:i1(f),...w});return x.decorateServiceException(r,f.body)},"de_ExpiredTokenExceptionRes"),q00=w0(async(f,h)=>{let w=x.map({}),s=f.body,$=x.take(s,{error:x.expectString,error_description:x.expectString});Object.assign(w,$);let r=new QZ({$metadata:i1(f),...w});return x.decorateServiceException(r,f.body)},"de_InternalServerExceptionRes"),k00=w0(async(f,h)=>{let w=x.map({}),s=f.body,$=x.take(s,{error:x.expectString,error_description:x.expectString});Object.assign(w,$);let r=new KZ({$metadata:i1(f),...w});return x.decorateServiceException(r,f.body)},"de_InvalidClientExceptionRes"),y00=w0(async(f,h)=>{let w=x.map({}),s=f.body,$=x.take(s,{error:x.expectString,error_description:x.expectString});Object.assign(w,$);let r=new ZZ({$metadata:i1(f),...w});return x.decorateServiceException(r,f.body)},"de_InvalidGrantExceptionRes"),j00=w0(async(f,h)=>{let w=x.map({}),s=f.body,$=x.take(s,{error:x.expectString,error_description:x.expectString});Object.assign(w,$);let r=new JZ({$metadata:i1(f),...w});return x.decorateServiceException(r,f.body)},"de_InvalidRequestExceptionRes"),O00=w0(async(f,h)=>{let w=x.map({}),s=f.body,$=x.take(s,{error:x.expectString,error_description:x.expectString});Object.assign(w,$);let r=new VZ({$metadata:i1(f),...w});return x.decorateServiceException(r,f.body)},"de_InvalidScopeExceptionRes"),l00=w0(async(f,h)=>{let w=x.map({}),s=f.body,$=x.take(s,{error:x.expectString,error_description:x.expectString});Object.assign(w,$);let r=new PZ({$metadata:i1(f),...w});return x.decorateServiceException(r,f.body)},"de_SlowDownExceptionRes"),v00=w0(async(f,h)=>{let w=x.map({}),s=f.body,$=x.take(s,{error:x.expectString,error_description:x.expectString});Object.assign(w,$);let r=new HZ({$metadata:i1(f),...w});return x.decorateServiceException(r,f.body)},"de_UnauthorizedClientExceptionRes"),b00=w0(async(f,h)=>{let w=x.map({}),s=f.body,$=x.take(s,{error:x.expectString,error_description:x.expectString});Object.assign(w,$);let r=new NZ({$metadata:i1(f),...w});return x.decorateServiceException(r,f.body)},"de_UnsupportedGrantTypeExceptionRes"),i1=w0((f)=>({httpStatusCode:f.statusCode,requestId:f.headers["x-amzn-requestid"]??f.headers["x-amzn-request-id"]??f.headers["x-amz-request-id"],extendedRequestId:f.headers["x-amz-id-2"],cfId:f.headers["x-amz-cf-id"]}),"deserializeMetadata"),DZ=class extends zZ.Command.classBuilder().ep(G00).m(function(f,h,w,s){return[M00.getSerdePlugin(w,this.serialize,this.deserialize),Y00.getEndpointPlugin(w,f.getEndpointParameterInstructions())]}).s("AWSSSOOIDCService","CreateToken",{}).n("SSOOIDCClient","CreateTokenCommand").f(SZ,YZ).ser(Z00).de(J00).build(){static{w0(this,"CreateTokenCommand")}},m00={CreateTokenCommand:DZ},qZ=class extends WZ{static{w0(this,"SSOOIDC")}};S00.createAggregatedClient(m00,qZ)});var yZ=async(f,h={})=>{let{SSOOIDCClient:w}=await Promise.resolve().then(() => p(I6(),1));return new w(Object.assign({},h.clientConfig??{},{region:f??h.clientConfig?.region,logger:h.clientConfig?.logger??h.parentClientConfig?.logger}))};var jZ=async(f,h,w={})=>{let{CreateTokenCommand:s}=await Promise.resolve().then(() => p(I6(),1));return(await yZ(h,w)).send(new s({clientId:f.clientId,clientSecret:f.clientSecret,refreshToken:f.refreshToken,grantType:"refresh_token"}))};var OZ=()=>{};var L6=(f)=>{if(f.expiration&&f.expiration.getTime()<Date.now())throw new X1(`Token is expired. ${zs}`,!1)};var lZ=B(()=>{Y0()});var qh=(f,h,w=!1)=>{if(typeof h==="undefined")throw new X1(`Value not present for '${f}' in SSO Token${w?". Cannot refresh":""}. ${zs}`,!1)};var vZ=B(()=>{Y0()});import{promises as d00}from"fs";var i00,bZ=(f,h)=>{let w=EE(f),s=JSON.stringify(h,null,2);return i00(w,s)};var mZ=B(()=>{hf();({writeFile:i00}=d00)});var dZ,iZ=(f={})=>async({callerClientConfig:h}={})=>{let w={...f,parentClientConfig:{...h,...f.parentClientConfig}};w.logger?.debug("@aws-sdk/token-providers - fromSso");let s=await Qh(w),$=y1({profile:w.profile??h?.profile}),r=s[$];if(!r)throw new X1(`Profile '${$}' could not be found in shared credentials file.`,!1);else if(!r.sso_session)throw new X1(`Profile '${$}' is missing required property 'sso_session'.`);let E=r.sso_session,T=(await CE(w))[E];if(!T)throw new X1(`Sso session '${E}' could not be found in shared credentials file.`,!1);for(let Q of["sso_start_url","sso_region"])if(!T[Q])throw new X1(`Sso session '${E}' is missing required property '${Q}'.`,!1);let{sso_start_url:F,sso_region:C}=T,I;try{I=await UE(E)}catch(Q){throw new X1(`The SSO session token associated with profile=${$} was not found or is invalid. ${zs}`,!1)}qh("accessToken",I.accessToken),qh("expiresAt",I.expiresAt);let{accessToken:L,expiresAt:G}=I,X={token:L,expiration:new Date(G)};if(X.expiration.getTime()-Date.now()>I9)return X;if(Date.now()-dZ.getTime()<30000)return L6(X),X;qh("clientId",I.clientId,!0),qh("clientSecret",I.clientSecret,!0),qh("refreshToken",I.refreshToken,!0);try{dZ.setTime(Date.now());let Q=await jZ(I,C,w);qh("accessToken",Q.accessToken),qh("expiresIn",Q.expiresIn);let M=new Date(Date.now()+Q.expiresIn*1000);try{await bZ(E,{...I,accessToken:Q.accessToken,expiresAt:M.toISOString(),refreshToken:Q.refreshToken})}catch(q){}return{token:Q.accessToken,expiration:M}}catch(Q){return L6(X),X}};var cZ=B(()=>{Y0();hf();OZ();lZ();vZ();mZ();dZ=new Date(0)});var gZ=B(()=>{Y0()});var xZ=B(()=>{Y0()});var _Z=B(()=>{cZ();gZ();xZ()});function c00(f){return{schemeId:"aws.auth#sigv4",signingProperties:{name:"awsssoportal",region:f.region},propertiesExtractor:(h,w)=>({signingProperties:{config:h,context:w}})}}function zU(f){return{schemeId:"smithy.api#noAuth"}}var nZ,eZ=async(f,h,w)=>{return{operation:Xh(h).operation,region:await L1(f.region)()||(()=>{throw new Error("expected `region` to be configured for `aws.auth#sigv4`")})()}},aZ=(f)=>{let h=[];switch(f.operation){case"GetRoleCredentials":{h.push(zU(f));break}case"ListAccountRoles":{h.push(zU(f));break}case"ListAccounts":{h.push(zU(f));break}case"Logout":{h.push(zU(f));break}default:h.push(c00(f))}return h},oZ=(f)=>{return{...nZ.resolveAwsSdkSigV4Config(f)}};var B6=B(()=>{nZ=p(O0(),1);cf()});var pZ=(f)=>{return{...f,useDualstackEndpoint:f.useDualstackEndpoint??!1,useFipsEndpoint:f.useFipsEndpoint??!1,defaultSigningName:"awsssoportal"}},kh;var ks=B(()=>{kh={UseFIPS:{type:"builtInParams",name:"useFipsEndpoint"},Endpoint:{type:"builtInParams",name:"endpoint"},Region:{type:"builtInParams",name:"region"},UseDualStack:{type:"builtInParams",name:"useDualstackEndpoint"}}});var tZ;var uZ=B(()=>{tZ={name:"@aws-sdk/client-sso",description:"AWS SDK for JavaScript Sso Client for Node.js, Browser and React Native",version:"3.772.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.758.0","@aws-sdk/middleware-host-header":"3.734.0","@aws-sdk/middleware-logger":"3.734.0","@aws-sdk/middleware-recursion-detection":"3.772.0","@aws-sdk/middleware-user-agent":"3.758.0","@aws-sdk/region-config-resolver":"3.734.0","@aws-sdk/types":"3.734.0","@aws-sdk/util-endpoints":"3.743.0","@aws-sdk/util-user-agent-browser":"3.734.0","@aws-sdk/util-user-agent-node":"3.758.0","@smithy/config-resolver":"^4.0.1","@smithy/core":"^3.1.5","@smithy/fetch-http-handler":"^5.0.1","@smithy/hash-node":"^4.0.1","@smithy/invalid-dependency":"^4.0.1","@smithy/middleware-content-length":"^4.0.1","@smithy/middleware-endpoint":"^4.0.6","@smithy/middleware-retry":"^4.0.7","@smithy/middleware-serde":"^4.0.2","@smithy/middleware-stack":"^4.0.1","@smithy/node-config-provider":"^4.0.1","@smithy/node-http-handler":"^4.0.3","@smithy/protocol-http":"^5.0.1","@smithy/smithy-client":"^4.1.6","@smithy/types":"^4.1.0","@smithy/url-parser":"^4.0.1","@smithy/util-base64":"^4.0.0","@smithy/util-body-length-browser":"^4.0.0","@smithy/util-body-length-node":"^4.0.0","@smithy/util-defaults-mode-browser":"^4.0.7","@smithy/util-defaults-mode-node":"^4.0.7","@smithy/util-endpoints":"^3.0.1","@smithy/util-middleware":"^4.0.1","@smithy/util-retry":"^4.0.1","@smithy/util-utf8":"^4.0.0",tslib:"^2.6.2"},devDependencies:{"@tsconfig/node18":"18.2.4","@types/node":"^18.19.69",concurrently:"7.0.0","downlevel-dts":"0.10.1",rimraf:"3.0.2",typescript:"~5.2.2"},engines:{node:">=18.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 A6;var G6=B(()=>{A6={isCrtAvailable:!1}});var fJ=()=>{if(A6.isCrtAvailable)return["md/crt-avail"];return null};var hJ=B(()=>{G6()});import{platform as x00,release as _00}from"os";import{env as wJ,versions as n00}from"process";var ys=({serviceId:f,clientVersion:h})=>{return async(w)=>{let s=[["aws-sdk-js",h],["ua","2.1"],[`os/${x00()}`,_00()],["lang/js"],["md/nodejs",`${n00.node}`]],$=fJ();if($)s.push($);if(f)s.push([`api/${f}`,h]);if(wJ.AWS_EXECUTION_ENV)s.push([`exec-env/${wJ.AWS_EXECUTION_ENV}`]);let r=await w?.userAgentAppId?.();return r?[...s,[`app/${r}`]]:[...s]}};var sJ=B(()=>{hJ();G6()});var e00="AWS_SDK_UA_APP_ID",a00="sdk_ua_app_id",o00="sdk-ua-app-id",js;var $J=B(()=>{m$();js={environmentVariableSelector:(f)=>f[e00],configFileSelector:(f)=>f[a00]??f[o00],default:L2}});var RU=B(()=>{sJ();$J()});var rJ=(f)=>typeof ArrayBuffer==="function"&&f instanceof ArrayBuffer||Object.prototype.toString.call(f)==="[object ArrayBuffer]";import{Buffer as W6}from"buffer";var Tw=(f,h=0,w=f.byteLength-h)=>{if(!rJ(f))throw new TypeError(`The "input" argument must be ArrayBuffer. Received type ${typeof f} (${f})`);return W6.from(f,h,w)},Os=(f,h)=>{if(typeof f!=="string")throw new TypeError(`The "input" argument must be of type string. Received type ${typeof f} (${f})`);return h?W6.from(f,h):W6.from(f)};var ls=()=>{};var Jf=(f)=>{let h=Os(f,"utf8");return new Uint8Array(h.buffer,h.byteOffset,h.byteLength/Uint8Array.BYTES_PER_ELEMENT)};var z6=B(()=>{ls()});var EJ=(f)=>{if(typeof f==="string")return Jf(f);if(ArrayBuffer.isView(f))return new Uint8Array(f.buffer,f.byteOffset,f.byteLength/Uint8Array.BYTES_PER_ELEMENT);return new Uint8Array(f)};var UJ=B(()=>{z6()});var vs=(f)=>{if(typeof f==="string")return f;if(typeof f!=="object"||typeof f.byteOffset!=="number"||typeof f.byteLength!=="number")throw new Error("@smithy/util-utf8: toUtf8 encoder function only accepts string | Uint8Array.");return Tw(f.buffer,f.byteOffset,f.byteLength).toString("utf8")};var TJ=B(()=>{ls()});var bs=B(()=>{z6();UJ();TJ()});import{Buffer as p00}from"buffer";import{createHash as u00,createHmac as t00}from"crypto";class Fw{constructor(f,h){this.algorithmIdentifier=f,this.secret=h,this.reset()}update(f,h){this.hash.update(EJ(FJ(f,h)))}digest(){return Promise.resolve(this.hash.digest())}reset(){this.hash=this.secret?t00(this.algorithmIdentifier,FJ(this.secret)):u00(this.algorithmIdentifier)}}function FJ(f,h){if(p00.isBuffer(f))return f;if(typeof f==="string")return Os(f,h);if(ArrayBuffer.isView(f))return Tw(f.buffer,f.byteOffset,f.byteLength);return Tw(f)}var XU=B(()=>{ls();bs()});import{fstatSync as f10,lstatSync as h10}from"fs";var ms=(f)=>{if(!f)return 0;if(typeof f==="string")return Buffer.byteLength(f);else if(typeof f.byteLength==="number")return f.byteLength;else if(typeof f.size==="number")return f.size;else if(typeof f.start==="number"&&typeof f.end==="number")return f.end+1-f.start;else if(typeof f.path==="string"||Buffer.isBuffer(f.path))return h10(f.path).size;else if(typeof f.fd==="number")return f10(f.fd).size;throw new Error(`Body Length computation failed for ${f}`)};var CJ=()=>{};var SU=B(()=>{CJ()});var w10,ds=(f)=>{if(f.length*3%4!==0)throw new TypeError("Incorrect padding on base64 string.");if(!w10.exec(f))throw new TypeError("Invalid base64 string.");let h=Os(f,"base64");return new Uint8Array(h.buffer,h.byteOffset,h.byteLength)};var IJ=B(()=>{ls();w10=/^[A-Za-z0-9+/]*={0,2}$/});var is=(f)=>{let h;if(typeof f==="string")h=Jf(f);else h=f;if(typeof h!=="object"||typeof h.byteOffset!=="number"||typeof h.byteLength!=="number")throw new Error("@smithy/util-base64: toBase64 encoder function only accepts string | Uint8Array.");return Tw(h.buffer,h.byteOffset,h.byteLength).toString("base64")};var LJ=B(()=>{ls();bs()});var YU=B(()=>{IJ();LJ()});var BJ,AJ,GJ,YJ,MJ,c1,WJ,QJ,zJ,RJ,XJ,SJ,s10,KJ;var ZJ=B(()=>{BJ={["required"]:!1,type:"String"},AJ={["required"]:!0,default:!1,type:"Boolean"},GJ={["ref"]:"Endpoint"},YJ={["fn"]:"booleanEquals",["argv"]:[{["ref"]:"UseFIPS"},!0]},MJ={["fn"]:"booleanEquals",["argv"]:[{["ref"]:"UseDualStack"},!0]},c1={},WJ={["fn"]:"getAttr",["argv"]:[{["ref"]:"PartitionResult"},"supportsFIPS"]},QJ={["ref"]:"PartitionResult"},zJ={["fn"]:"booleanEquals",["argv"]:[!0,{["fn"]:"getAttr",["argv"]:[QJ,"supportsDualStack"]}]},RJ=[YJ],XJ=[MJ],SJ=[{["ref"]:"Region"}],s10={version:"1.0",parameters:{Region:BJ,UseDualStack:AJ,UseFIPS:AJ,Endpoint:BJ},rules:[{conditions:[{["fn"]:"isSet",["argv"]:[GJ]}],rules:[{conditions:RJ,error:"Invalid Configuration: FIPS and custom endpoint are not supported",type:"error"},{conditions:XJ,error:"Invalid Configuration: Dualstack and custom endpoint are not supported",type:"error"},{endpoint:{url:GJ,properties:c1,headers:c1},type:"endpoint"}],type:"tree"},{conditions:[{["fn"]:"isSet",["argv"]:SJ}],rules:[{conditions:[{["fn"]:"aws.partition",["argv"]:SJ,assign:"PartitionResult"}],rules:[{conditions:[YJ,MJ],rules:[{conditions:[{["fn"]:"booleanEquals",["argv"]:[!0,WJ]},zJ],rules:[{endpoint:{url:"https://portal.sso-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:c1,headers:c1},type:"endpoint"}],type:"tree"},{error:"FIPS and DualStack are enabled, but this partition does not support one or both",type:"error"}],type:"tree"},{conditions:RJ,rules:[{conditions:[{["fn"]:"booleanEquals",["argv"]:[WJ,!0]}],rules:[{conditions:[{["fn"]:"stringEquals",["argv"]:[{["fn"]:"getAttr",["argv"]:[QJ,"name"]},"aws-us-gov"]}],endpoint:{url:"https://portal.sso.{Region}.amazonaws.com",properties:c1,headers:c1},type:"endpoint"},{endpoint:{url:"https://portal.sso-fips.{Region}.{PartitionResult#dnsSuffix}",properties:c1,headers:c1},type:"endpoint"}],type:"tree"},{error:"FIPS is enabled but this partition does not support FIPS",type:"error"}],type:"tree"},{conditions:XJ,rules:[{conditions:[zJ],rules:[{endpoint:{url:"https://portal.sso.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:c1,headers:c1},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:c1,headers:c1},type:"endpoint"}],type:"tree"}],type:"tree"},{error:"Invalid Configuration: Missing Region",type:"error"}]},KJ=s10});var $10,JJ=(f,h={})=>{return $10.get(f,()=>xh(KJ,{endpointParams:f,logger:h.logger}))};var VJ=B(()=>{N$();df();ZJ();$10=new gh({size:50,params:["Endpoint","Region","UseDualStack","UseFIPS"]});t1.aws=_h});var PJ,HJ,NJ=(f)=>{return{apiVersion:"2019-06-10",base64Decoder:f?.base64Decoder??ds,base64Encoder:f?.base64Encoder??is,disableHostPrefix:f?.disableHostPrefix??!1,endpointProvider:f?.endpointProvider??JJ,extensions:f?.extensions??[],httpAuthSchemeProvider:f?.httpAuthSchemeProvider??aZ,httpAuthSchemes:f?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:(h)=>h.getIdentityProvider("aws.auth#sigv4"),signer:new PJ.AwsSdkSigV4Signer},{schemeId:"smithy.api#noAuth",identityProvider:(h)=>h.getIdentityProvider("smithy.api#noAuth")||(async()=>({})),signer:new HJ.NoAuthSigner}],logger:f?.logger??new _f,serviceId:f?.serviceId??"SSO",urlParser:f?.urlParser??O1,utf8Decoder:f?.utf8Decoder??Jf,utf8Encoder:f?.utf8Encoder??vs}};var DJ=B(()=>{PJ=p(O0(),1),HJ=p(m0(),1);J();pw();YU();bs();B6();VJ()});var qJ="AWS_EXECUTION_ENV",R6="AWS_REGION",X6="AWS_DEFAULT_REGION",kJ="AWS_EC2_METADATA_DISABLED",yJ,jJ="/latest/meta-data/placement/region";var OJ=B(()=>{yJ=["in-region","cross-region","mobile","standard","legacy"]});var lJ;var vJ=B(()=>{lJ={environmentVariableSelector:(f)=>{return f.AWS_DEFAULTS_MODE},configFileSelector:(f)=>{return f.defaults_mode},default:"legacy"}});var cs=({region:f=z0(Sh),defaultsMode:h=z0(lJ)}={})=>uh(async()=>{let w=typeof h==="function"?await h():h;switch(w?.toLowerCase()){case"auto":return r10(f);case"in-region":case"cross-region":case"mobile":case"standard":case"legacy":return Promise.resolve(w?.toLocaleLowerCase());case void 0:return Promise.resolve("legacy");default:throw new Error(`Invalid parameter for "defaultsMode", expect ${yJ.join(", ")}, got ${w}`)}}),r10=async(f)=>{if(f){let h=typeof f==="function"?await f():f,w=await E10();if(!w)return"standard";if(h===w)return"in-region";else return"cross-region"}return"standard"},E10=async()=>{if(process.env[qJ]&&(process.env[R6]||process.env[X6]))return process.env[R6]??process.env[X6];if(!process.env[kJ])try{let{getInstanceMetadataEndpoint:f,httpRequest:h}=await Promise.resolve().then(() => (fr(),t$)),w=await f();return(await h({...w,path:jJ})).toString()}catch(f){}};var bJ=B(()=>{Yh();Kh();Y0();OJ();vJ()});var MU=B(()=>{bJ()});var mJ,dJ=(f)=>{Cs(process.version);let h=cs(f),w=()=>h().then(Fs),s=NJ(f);mJ.emitWarningIfUnsupportedVersion(process.version);let $={profile:f?.profile};return{...s,...f,runtime:"node",defaultsMode:h,bodyLengthChecker:f?.bodyLengthChecker??ms,defaultUserAgentProvider:f?.defaultUserAgentProvider??ys({serviceId:s.serviceId,clientVersion:tZ.version}),maxAttempts:f?.maxAttempts??z0(ws,f),region:f?.region??z0(Sh,{..._w,...$}),requestHandler:rf.create(f?.requestHandler??w),retryMode:f?.retryMode??z0({...$s,default:async()=>(await w()).retryMode||Zh},f),sha256:f?.sha256??Fw.bind(null,"sha256"),streamCollector:f?.streamCollector??Ws,useDualstackEndpoint:f?.useDualstackEndpoint??z0(gw,$),useFipsEndpoint:f?.useFipsEndpoint??z0(xw,$),userAgentAppId:f?.userAgentAppId??z0(js,$)}};var iJ=B(()=>{uZ();mJ=p(O0(),1);RU();Yh();XU();$w();Kh();hr();SU();wf();DJ();J();MU();J()});var gs=(f)=>{let h=async()=>{if(f.region===void 0)throw new Error("Region is missing from runtimeConfig");let w=f.region;if(typeof w==="string")return w;return w()};return{setRegion(w){h=w},region(){return h}}},xs=(f)=>{return{region:f.region()}};var cJ=()=>{};var gJ=()=>{};var xJ=B(()=>{gJ()});var _J=B(()=>{cJ();xJ()});var QU=B(()=>{_J()});var nJ=(f)=>{let{httpAuthSchemes:h,httpAuthSchemeProvider:w,credentials:s}=f;return{setHttpAuthScheme($){let r=h.findIndex((E)=>E.schemeId===$.schemeId);if(r===-1)h.push($);else h.splice(r,1,$)},httpAuthSchemes(){return h},setHttpAuthSchemeProvider($){w=$},httpAuthSchemeProvider(){return w},setCredentials($){s=$},credentials(){return s}}},eJ=(f)=>{return{httpAuthSchemes:f.httpAuthSchemes(),httpAuthSchemeProvider:f.httpAuthSchemeProvider(),credentials:f.credentials()}};var KU=(f)=>f,aJ=(f,h)=>{let w={...KU(gs(f)),...KU(Is(f)),...KU(Zw(f)),...KU(nJ(f))};return h.forEach((s)=>s.configure(w)),{...f,...xs(w),...Ls(w),...Jw(w),...eJ(w)}};var oJ=B(()=>{QU();F1();J()});var _s,af;var Ir=B(()=>{r4();E4();U4();m$();Yh();_s=p(m0(),1);$E();D();$w();J();B6();ks();iJ();oJ();af=class af extends ww{config;constructor(...[f]){let h=dJ(f||{}),w=pZ(h),s=jw(w),$=ss(s),r=nw($),E=Vw(r),U=uw(E),T=oZ(U),F=aJ(T,f?.extensions||[]);super(F);this.config=F,this.middlewareStack.use(iw(this.config)),this.middlewareStack.use(As(this.config)),this.middlewareStack.use(ew(this.config)),this.middlewareStack.use(Pw(this.config)),this.middlewareStack.use(Hw(this.config)),this.middlewareStack.use(Nw(this.config)),this.middlewareStack.use(_s.getHttpAuthSchemeEndpointRuleSetPlugin(this.config,{httpAuthSchemeParametersProvider:eZ,identityProviderConfigProvider:async(C)=>new _s.DefaultIdentityProviderConfig({"aws.auth#sigv4":C.credentials})})),this.middlewareStack.use(_s.getHttpSigningPlugin(this.config))}destroy(){super.destroy()}}});var of;var S6=B(()=>{J();of=class of extends $f{constructor(f){super(f);Object.setPrototypeOf(this,of.prototype)}}});var ZU,JU,VU,PU,pJ=(f)=>({...f,...f.accessToken&&{accessToken:T0}}),T10=(f)=>({...f,...f.secretAccessKey&&{secretAccessKey:T0},...f.sessionToken&&{sessionToken:T0}}),uJ=(f)=>({...f,...f.roleCredentials&&{roleCredentials:T10(f.roleCredentials)}}),tJ=(f)=>({...f,...f.accessToken&&{accessToken:T0}}),fV=(f)=>({...f,...f.accessToken&&{accessToken:T0}}),hV=(f)=>({...f,...f.accessToken&&{accessToken:T0}});var Cw=B(()=>{J();S6();ZU=class ZU extends of{name="InvalidRequestException";$fault="client";constructor(f){super({name:"InvalidRequestException",$fault:"client",...f});Object.setPrototypeOf(this,ZU.prototype)}};JU=class JU extends of{name="ResourceNotFoundException";$fault="client";constructor(f){super({name:"ResourceNotFoundException",$fault:"client",...f});Object.setPrototypeOf(this,JU.prototype)}};VU=class VU extends of{name="TooManyRequestsException";$fault="client";constructor(f){super({name:"TooManyRequestsException",$fault:"client",...f});Object.setPrototypeOf(this,VU.prototype)}};PU=class PU extends of{name="UnauthorizedException";$fault="client";constructor(f){super({name:"UnauthorizedException",$fault:"client",...f});Object.setPrototypeOf(this,PU.prototype)}}});var yh,Lr,wV=async(f,h)=>{let w=Lr.requestBuilder(f,h),s=Y({},o$,{[DU]:f[NU]});w.bp("/federation/credentials");let $=Y({[G10]:[,j(f[A10],"roleName")],[IV]:[,j(f[CV],"accountId")]}),r;return w.m("GET").h(s).q($).b(r),w.build()},sV=async(f,h)=>{let w=Lr.requestBuilder(f,h),s=Y({},o$,{[DU]:f[NU]});w.bp("/assignment/roles");let $=Y({[GV]:[,f[AV]],[BV]:[()=>f.maxResults!==void 0,()=>f[LV].toString()],[IV]:[,j(f[CV],"accountId")]}),r;return w.m("GET").h(s).q($).b(r),w.build()},$V=async(f,h)=>{let w=Lr.requestBuilder(f,h),s=Y({},o$,{[DU]:f[NU]});w.bp("/assignment/accounts");let $=Y({[GV]:[,f[AV]],[BV]:[()=>f.maxResults!==void 0,()=>f[LV].toString()]}),r;return w.m("GET").h(s).q($).b(r),w.build()},rV=async(f,h)=>{let w=Lr.requestBuilder(f,h),s=Y({},o$,{[DU]:f[NU]});w.bp("/logout");let $;return w.m("POST").h(s).b($),w.build()},EV=async(f,h)=>{if(f.statusCode!==200&&f.statusCode>=300)return HU(f,h);let w=Y({$metadata:jh(f)}),s=j(g(await yh.parseJsonBody(f.body,h)),"body"),$=N0(s,{roleCredentials:v});return Object.assign(w,$),w},UV=async(f,h)=>{if(f.statusCode!==200&&f.statusCode>=300)return HU(f,h);let w=Y({$metadata:jh(f)}),s=j(g(await yh.parseJsonBody(f.body,h)),"body"),$=N0(s,{nextToken:A,roleList:v});return Object.assign(w,$),w},TV=async(f,h)=>{if(f.statusCode!==200&&f.statusCode>=300)return HU(f,h);let w=Y({$metadata:jh(f)}),s=j(g(await yh.parseJsonBody(f.body,h)),"body"),$=N0(s,{accountList:v,nextToken:A});return Object.assign(w,$),w},FV=async(f,h)=>{if(f.statusCode!==200&&f.statusCode>=300)return HU(f,h);let w=Y({$metadata:jh(f)});return await B1.collectBody(f.body,h),w},HU=async(f,h)=>{let w={...f,body:await yh.parseJsonErrorBody(f.body,h)},s=yh.loadRestJsonErrorCode(f,w.body);switch(s){case"InvalidRequestException":case"com.amazonaws.sso#InvalidRequestException":throw await C10(w,h);case"ResourceNotFoundException":case"com.amazonaws.sso#ResourceNotFoundException":throw await I10(w,h);case"TooManyRequestsException":case"com.amazonaws.sso#TooManyRequestsException":throw await L10(w,h);case"UnauthorizedException":case"com.amazonaws.sso#UnauthorizedException":throw await B10(w,h);default:let $=w.body;return F10({output:f,parsedBody:$,errorCode:s})}},F10,C10=async(f,h)=>{let w=Y({}),s=f.body,$=N0(s,{message:A});Object.assign(w,$);let r=new ZU({$metadata:jh(f),...w});return l(r,f.body)},I10=async(f,h)=>{let w=Y({}),s=f.body,$=N0(s,{message:A});Object.assign(w,$);let r=new JU({$metadata:jh(f),...w});return l(r,f.body)},L10=async(f,h)=>{let w=Y({}),s=f.body,$=N0(s,{message:A});Object.assign(w,$);let r=new VU({$metadata:jh(f),...w});return l(r,f.body)},B10=async(f,h)=>{let w=Y({}),s=f.body,$=N0(s,{message:A});Object.assign(w,$);let r=new PU({$metadata:jh(f),...w});return l(r,f.body)},jh=(f)=>({httpStatusCode:f.statusCode,requestId:f.headers["x-amzn-requestid"]??f.headers["x-amzn-request-id"]??f.headers["x-amz-request-id"],extendedRequestId:f.headers["x-amz-id-2"],cfId:f.headers["x-amz-cf-id"]}),CV="accountId",NU="accessToken",IV="account_id",LV="maxResults",BV="max_result",AV="nextToken",GV="next_token",A10="roleName",G10="role_name",DU="x-amz-sso_bearer_token";var Br=B(()=>{yh=p(O0(),1),Lr=p(m0(),1);J();Cw();S6();F10=Ts(of)});var Ar;var Y6=B(()=>{D();k();J();ks();Cw();Br();Ar=class Ar extends W.classBuilder().ep(kh).m(function(f,h,w,s){return[z(w,this.serialize,this.deserialize),R(w,f.getEndpointParameterInstructions())]}).s("SWBPortalService","GetRoleCredentials",{}).n("SSOClient","GetRoleCredentialsCommand").f(pJ,uJ).ser(wV).de(EV).build(){}});var Gr;var qU=B(()=>{D();k();J();ks();Cw();Br();Gr=class Gr extends W.classBuilder().ep(kh).m(function(f,h,w,s){return[z(w,this.serialize,this.deserialize),R(w,f.getEndpointParameterInstructions())]}).s("SWBPortalService","ListAccountRoles",{}).n("SSOClient","ListAccountRolesCommand").f(tJ,void 0).ser(sV).de(UV).build(){}});var Wr;var kU=B(()=>{D();k();J();ks();Cw();Br();Wr=class Wr extends W.classBuilder().ep(kh).m(function(f,h,w,s){return[z(w,this.serialize,this.deserialize),R(w,f.getEndpointParameterInstructions())]}).s("SWBPortalService","ListAccounts",{}).n("SSOClient","ListAccountsCommand").f(fV,void 0).ser($V).de(TV).build(){}});var M6;var Q6=B(()=>{D();k();J();ks();Cw();Br();M6=class M6 extends W.classBuilder().ep(kh).m(function(f,h,w,s){return[z(w,this.serialize,this.deserialize),R(w,f.getEndpointParameterInstructions())]}).s("SWBPortalService","Logout",{}).n("SSOClient","LogoutCommand").f(hV,void 0).ser(rV).de(FV).build(){}});var W10,WV;var zV=B(()=>{J();Y6();qU();kU();Q6();Ir();W10={GetRoleCredentialsCommand:Ar,ListAccountRolesCommand:Gr,ListAccountsCommand:Wr,LogoutCommand:M6};WV=class WV extends af{};Es(W10,WV)});var RV=B(()=>{Y6();qU();kU();Q6()});var XV=()=>{};var SV,R70;var YV=B(()=>{SV=p(m0(),1);qU();Ir();R70=SV.createPaginator(af,Gr,"nextToken","nextToken","maxResults")});var MV,M70;var QV=B(()=>{MV=p(m0(),1);kU();Ir();M70=MV.createPaginator(af,Wr,"nextToken","nextToken","maxResults")});var KV=B(()=>{XV();YV();QV()});var ZV=B(()=>{Cw()});var JV=B(()=>{Ir();zV();RV();KV();ZV()});var VV={};Th(VV,{SSOClient:()=>af,GetRoleCredentialsCommand:()=>Ar});var PV=B(()=>{JV()});var K6,zr=!1,Z6=async({ssoStartUrl:f,ssoSession:h,ssoAccountId:w,ssoRegion:s,ssoRoleName:$,ssoClient:r,clientConfig:E,parentClientConfig:U,profile:T,logger:F})=>{let C,I="To refresh this SSO session run aws sso login with the corresponding profile.";if(h)try{let X0=await iZ({profile:T})();C={accessToken:X0.token,expiresAt:new Date(X0.expiration).toISOString()}}catch(X0){throw new a(X0.message,{tryNextLink:zr,logger:F})}else try{C=await UE(f)}catch(X0){throw new a("The SSO session associated with this profile is invalid. To refresh this SSO session run aws sso login with the corresponding profile.",{tryNextLink:zr,logger:F})}if(new Date(C.expiresAt).getTime()-Date.now()<=0)throw new a("The SSO session associated with this profile has expired. To refresh this SSO session run aws sso login with the corresponding profile.",{tryNextLink:zr,logger:F});let{accessToken:L}=C,{SSOClient:G,GetRoleCredentialsCommand:X}=await Promise.resolve().then(() => (PV(),VV)),Q=r||new G(Object.assign({},E??{},{logger:E?.logger??U?.logger,region:E?.region??s})),M;try{M=await Q.send(new X({accountId:w,roleName:$,accessToken:L}))}catch(X0){throw new a(X0,{tryNextLink:zr,logger:F})}let{roleCredentials:{accessKeyId:q,secretAccessKey:N,sessionToken:y,expiration:n,credentialScope:L0,accountId:b0}={}}=M;if(!q||!N||!y||!n)throw new a("SSO returns an invalid temporary credential.",{tryNextLink:zr,logger:F});let $1={accessKeyId:q,secretAccessKey:N,sessionToken:y,expiration:new Date(n),...L0&&{credentialScope:L0},...b0&&{accountId:b0}};if(h)K6.setCredentialFeature($1,"CREDENTIALS_SSO","s");else K6.setCredentialFeature($1,"CREDENTIALS_SSO_LEGACY","u");return $1};var HV=B(()=>{K6=p(C1(),1);_Z();Y0();hf()});var J6=(f,h)=>{let{sso_start_url:w,sso_account_id:s,sso_region:$,sso_role_name:r}=f;if(!w||!s||!$||!r)throw new a(`Profile is configured with invalid SSO credentials. Required parameters "sso_account_id", "sso_region", "sso_role_name", "sso_start_url". Got ${Object.keys(f).join(", ")}
51
- Reference: https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-sso.html`,{tryNextLink:!1,logger:h});return f};var V6=B(()=>{Y0()});var z10=(f={})=>async({callerClientConfig:h}={})=>{f.logger?.debug("@aws-sdk/credential-provider-sso - fromSSO");let{ssoStartUrl:w,ssoAccountId:s,ssoRegion:$,ssoRoleName:r,ssoSession:E}=f,{ssoClient:U}=f,T=y1({profile:f.profile??h?.profile});if(!w&&!s&&!$&&!r&&!E){let C=(await Qh(f))[T];if(!C)throw new a(`Profile ${T} was not found.`,{logger:f.logger});if(!CF(C))throw new a(`Profile ${T} is not configured with SSO credentials.`,{logger:f.logger});if(C?.sso_session){let q=(await CE(f))[C.sso_session],N=` configurations in profile ${T} and sso-session ${C.sso_session}`;if($&&$!==q.sso_region)throw new a("Conflicting SSO region"+N,{tryNextLink:!1,logger:f.logger});if(w&&w!==q.sso_start_url)throw new a("Conflicting SSO start_url"+N,{tryNextLink:!1,logger:f.logger});C.sso_region=q.sso_region,C.sso_start_url=q.sso_start_url}let{sso_start_url:I,sso_account_id:L,sso_region:G,sso_role_name:X,sso_session:Q}=J6(C,f.logger);return Z6({ssoStartUrl:I,ssoSession:Q,ssoAccountId:L,ssoRegion:G,ssoRoleName:X,ssoClient:U,clientConfig:f.clientConfig,parentClientConfig:f.parentClientConfig,profile:T})}else if(!w||!s||!$||!r)throw new a('Incomplete configuration. The fromSSO() argument hash must include "ssoStartUrl", "ssoAccountId", "ssoRegion", "ssoRoleName"',{tryNextLink:!1,logger:f.logger});else return Z6({ssoStartUrl:w,ssoSession:E,ssoAccountId:s,ssoRegion:$,ssoRoleName:r,ssoClient:U,clientConfig:f.clientConfig,parentClientConfig:f.parentClientConfig,profile:T})};var NV=B(()=>{Y0();hf();HV();V6()});var DV=()=>{};var P6={};Th(P6,{validateSsoProfile:()=>J6,isSsoProfile:()=>CF,fromSSO:()=>z10});var H6=B(()=>{NV();DV();V6()});var qV,kV=(f,h,w)=>{let s={EcsContainer:async($)=>{let{fromHttp:r}=await Promise.resolve().then(() => (FF(),TF)),{fromContainerMetadata:E}=await Promise.resolve().then(() => (fr(),t$));return w?.debug("@aws-sdk/credential-provider-ini - credential_source is EcsContainer"),async()=>gf(r($??{}),E($))().then(N6)},Ec2InstanceMetadata:async($)=>{w?.debug("@aws-sdk/credential-provider-ini - credential_source is Ec2InstanceMetadata");let{fromInstanceMetadata:r}=await Promise.resolve().then(() => (fr(),t$));return async()=>r($)().then(N6)},Environment:async($)=>{w?.debug("@aws-sdk/credential-provider-ini - credential_source is Environment");let{fromEnv:r}=await Promise.resolve().then(() => (n3(),SY));return async()=>r($)().then(N6)}};if(f in s)return s[f];else throw new a(`Unsupported credential source in profile ${h}. Got ${f}, expected EcsContainer or Ec2InstanceMetadata or Environment.`,{logger:w})},N6=(f)=>qV.setCredentialFeature(f,"CREDENTIALS_PROFILE_NAMED_PROVIDER","p");var yV=B(()=>{qV=p(C1(),1);Y0()});var D6=H((OV)=>{Object.defineProperty(OV,"__esModule",{value:!0});OV.resolveHttpAuthSchemeConfig=OV.resolveStsAuthConfig=OV.defaultSTSHttpAuthSchemeProvider=OV.defaultSTSHttpAuthSchemeParametersProvider=void 0;var R10=O0(),jV=Fh(),X10=Rr(),S10=async(f,h,w)=>{return{operation:jV.getSmithyContext(h).operation,region:await jV.normalizeProvider(f.region)()||(()=>{throw new Error("expected `region` to be configured for `aws.auth#sigv4`")})()}};OV.defaultSTSHttpAuthSchemeParametersProvider=S10;function Y10(f){return{schemeId:"aws.auth#sigv4",signingProperties:{name:"sts",region:f.region},propertiesExtractor:(h,w)=>({signingProperties:{config:h,context:w}})}}function M10(f){return{schemeId:"smithy.api#noAuth"}}var Q10=(f)=>{let h=[];switch(f.operation){case"AssumeRoleWithWebIdentity":{h.push(M10(f));break}default:h.push(Y10(f))}return h};OV.defaultSTSHttpAuthSchemeProvider=Q10;var K10=(f)=>({...f,stsClientCtor:X10.STSClient});OV.resolveStsAuthConfig=K10;var Z10=(f)=>{let h=OV.resolveStsAuthConfig(f);return{...R10.resolveAwsSdkSigV4Config(h)}};OV.resolveHttpAuthSchemeConfig=Z10});var Xr=H((bV)=>{Object.defineProperty(bV,"__esModule",{value:!0});bV.commonParams=bV.resolveClientEndpointParameters=void 0;var P10=(f)=>{return{...f,useDualstackEndpoint:f.useDualstackEndpoint??!1,useFipsEndpoint:f.useFipsEndpoint??!1,useGlobalEndpoint:f.useGlobalEndpoint??!1,defaultSigningName:"sts"}};bV.resolveClientEndpointParameters=P10;bV.commonParams={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 CP=H((TP)=>{Object.defineProperty(TP,"__esModule",{value:!0});TP.ruleSet=void 0;var uV="required",t="type",G0="fn",W0="argv",lh="ref",dV=!1,q6=!0,Oh="booleanEquals",h1="stringEquals",tV="sigv4",fP="sts",hP="us-east-1",D0="endpoint",iV="https://sts.{Region}.{PartitionResult#dnsSuffix}",Vf="tree",ns="error",y6="getAttr",cV={[uV]:!1,[t]:"String"},k6={[uV]:!0,default:!1,[t]:"Boolean"},wP={[lh]:"Endpoint"},gV={[G0]:"isSet",[W0]:[{[lh]:"Region"}]},w1={[lh]:"Region"},xV={[G0]:"aws.partition",[W0]:[w1],assign:"PartitionResult"},sP={[lh]:"UseFIPS"},$P={[lh]:"UseDualStack"},E1={url:"https://sts.amazonaws.com",properties:{authSchemes:[{name:tV,signingName:fP,signingRegion:hP}]},headers:{}},J1={},_V={conditions:[{[G0]:h1,[W0]:[w1,"aws-global"]}],[D0]:E1,[t]:D0},rP={[G0]:Oh,[W0]:[sP,!0]},EP={[G0]:Oh,[W0]:[$P,!0]},nV={[G0]:y6,[W0]:[{[lh]:"PartitionResult"},"supportsFIPS"]},UP={[lh]:"PartitionResult"},eV={[G0]:Oh,[W0]:[!0,{[G0]:y6,[W0]:[UP,"supportsDualStack"]}]},aV=[{[G0]:"isSet",[W0]:[wP]}],oV=[rP],pV=[EP],N10={version:"1.0",parameters:{Region:cV,UseDualStack:k6,UseFIPS:k6,Endpoint:cV,UseGlobalEndpoint:k6},rules:[{conditions:[{[G0]:Oh,[W0]:[{[lh]:"UseGlobalEndpoint"},q6]},{[G0]:"not",[W0]:aV},gV,xV,{[G0]:Oh,[W0]:[sP,dV]},{[G0]:Oh,[W0]:[$P,dV]}],rules:[{conditions:[{[G0]:h1,[W0]:[w1,"ap-northeast-1"]}],endpoint:E1,[t]:D0},{conditions:[{[G0]:h1,[W0]:[w1,"ap-south-1"]}],endpoint:E1,[t]:D0},{conditions:[{[G0]:h1,[W0]:[w1,"ap-southeast-1"]}],endpoint:E1,[t]:D0},{conditions:[{[G0]:h1,[W0]:[w1,"ap-southeast-2"]}],endpoint:E1,[t]:D0},_V,{conditions:[{[G0]:h1,[W0]:[w1,"ca-central-1"]}],endpoint:E1,[t]:D0},{conditions:[{[G0]:h1,[W0]:[w1,"eu-central-1"]}],endpoint:E1,[t]:D0},{conditions:[{[G0]:h1,[W0]:[w1,"eu-north-1"]}],endpoint:E1,[t]:D0},{conditions:[{[G0]:h1,[W0]:[w1,"eu-west-1"]}],endpoint:E1,[t]:D0},{conditions:[{[G0]:h1,[W0]:[w1,"eu-west-2"]}],endpoint:E1,[t]:D0},{conditions:[{[G0]:h1,[W0]:[w1,"eu-west-3"]}],endpoint:E1,[t]:D0},{conditions:[{[G0]:h1,[W0]:[w1,"sa-east-1"]}],endpoint:E1,[t]:D0},{conditions:[{[G0]:h1,[W0]:[w1,hP]}],endpoint:E1,[t]:D0},{conditions:[{[G0]:h1,[W0]:[w1,"us-east-2"]}],endpoint:E1,[t]:D0},{conditions:[{[G0]:h1,[W0]:[w1,"us-west-1"]}],endpoint:E1,[t]:D0},{conditions:[{[G0]:h1,[W0]:[w1,"us-west-2"]}],endpoint:E1,[t]:D0},{endpoint:{url:iV,properties:{authSchemes:[{name:tV,signingName:fP,signingRegion:"{Region}"}]},headers:J1},[t]:D0}],[t]:Vf},{conditions:aV,rules:[{conditions:oV,error:"Invalid Configuration: FIPS and custom endpoint are not supported",[t]:ns},{conditions:pV,error:"Invalid Configuration: Dualstack and custom endpoint are not supported",[t]:ns},{endpoint:{url:wP,properties:J1,headers:J1},[t]:D0}],[t]:Vf},{conditions:[gV],rules:[{conditions:[xV],rules:[{conditions:[rP,EP],rules:[{conditions:[{[G0]:Oh,[W0]:[q6,nV]},eV],rules:[{endpoint:{url:"https://sts-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:J1,headers:J1},[t]:D0}],[t]:Vf},{error:"FIPS and DualStack are enabled, but this partition does not support one or both",[t]:ns}],[t]:Vf},{conditions:oV,rules:[{conditions:[{[G0]:Oh,[W0]:[nV,q6]}],rules:[{conditions:[{[G0]:h1,[W0]:[{[G0]:y6,[W0]:[UP,"name"]},"aws-us-gov"]}],endpoint:{url:"https://sts.{Region}.amazonaws.com",properties:J1,headers:J1},[t]:D0},{endpoint:{url:"https://sts-fips.{Region}.{PartitionResult#dnsSuffix}",properties:J1,headers:J1},[t]:D0}],[t]:Vf},{error:"FIPS is enabled but this partition does not support FIPS",[t]:ns}],[t]:Vf},{conditions:pV,rules:[{conditions:[eV],rules:[{endpoint:{url:"https://sts.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:J1,headers:J1},[t]:D0}],[t]:Vf},{error:"DualStack is enabled but this partition does not support DualStack",[t]:ns}],[t]:Vf},_V,{endpoint:{url:iV,properties:J1,headers:J1},[t]:D0}],[t]:Vf}],[t]:Vf},{error:"Invalid Configuration: Missing Region",[t]:ns}]};TP.ruleSet=N10});var BP=H((IP)=>{Object.defineProperty(IP,"__esModule",{value:!0});IP.defaultEndpointResolver=void 0;var D10=dE(),j6=bE(),q10=CP(),k10=new j6.EndpointCache({size:50,params:["Endpoint","Region","UseDualStack","UseFIPS","UseGlobalEndpoint"]}),y10=(f,h={})=>{return k10.get(f,()=>j6.resolveEndpoint(q10.ruleSet,{endpointParams:f,logger:h.logger}))};IP.defaultEndpointResolver=y10;j6.customEndpointFunctions.aws=D10.awsEndpointFunctions});var RP=H((WP)=>{Object.defineProperty(WP,"__esModule",{value:!0});WP.getRuntimeConfig=void 0;var j10=O0(),O10=m0(),l10=J0(),v10=Er(),AP=Ih(),GP=u1(),b10=D6(),m10=BP(),d10=(f)=>{return{apiVersion:"2011-06-15",base64Decoder:f?.base64Decoder??AP.fromBase64,base64Encoder:f?.base64Encoder??AP.toBase64,disableHostPrefix:f?.disableHostPrefix??!1,endpointProvider:f?.endpointProvider??m10.defaultEndpointResolver,extensions:f?.extensions??[],httpAuthSchemeProvider:f?.httpAuthSchemeProvider??b10.defaultSTSHttpAuthSchemeProvider,httpAuthSchemes:f?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:(h)=>h.getIdentityProvider("aws.auth#sigv4"),signer:new j10.AwsSdkSigV4Signer},{schemeId:"smithy.api#noAuth",identityProvider:(h)=>h.getIdentityProvider("smithy.api#noAuth")||(async()=>({})),signer:new O10.NoAuthSigner}],logger:f?.logger??new l10.NoOpLogger,serviceId:f?.serviceId??"STS",urlParser:f?.urlParser??v10.parseUrl,utf8Decoder:f?.utf8Decoder??GP.fromUtf8,utf8Encoder:f?.utf8Encoder??GP.toUtf8}};WP.getRuntimeConfig=d10});var ZP=H((QP)=>{Object.defineProperty(QP,"__esModule",{value:!0});QP.getRuntimeConfig=void 0;var i10=l4(),c10=i10.__importDefault(xF()),XP=O0(),SP=nF(),yU=Xs(),g10=m0(),x10=oF(),YP=Tr(),es=Ms(),MP=X4(),_10=pF(),n10=rU(),e10=RP(),a10=J0(),o10=U6(),p10=J0(),u10=(f)=>{p10.emitWarningIfUnsupportedVersion(process.version);let h=o10.resolveDefaultsModeConfig(f),w=()=>h().then(a10.loadConfigsForDefaultMode),s=e10.getRuntimeConfig(f);XP.emitWarningIfUnsupportedVersion(process.version);let $={profile:f?.profile};return{...s,...f,runtime:"node",defaultsMode:h,bodyLengthChecker:f?.bodyLengthChecker??_10.calculateBodyLength,defaultUserAgentProvider:f?.defaultUserAgentProvider??SP.createDefaultUserAgentProvider({serviceId:s.serviceId,clientVersion:c10.default.version}),httpAuthSchemes:f?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:(r)=>r.getIdentityProvider("aws.auth#sigv4")||(async(E)=>await f.credentialDefaultProvider(E?.__config||{})()),signer:new XP.AwsSdkSigV4Signer},{schemeId:"smithy.api#noAuth",identityProvider:(r)=>r.getIdentityProvider("smithy.api#noAuth")||(async()=>({})),signer:new g10.NoAuthSigner}],maxAttempts:f?.maxAttempts??es.loadConfig(YP.NODE_MAX_ATTEMPT_CONFIG_OPTIONS,f),region:f?.region??es.loadConfig(yU.NODE_REGION_CONFIG_OPTIONS,{...yU.NODE_REGION_CONFIG_FILE_OPTIONS,...$}),requestHandler:MP.NodeHttpHandler.create(f?.requestHandler??w),retryMode:f?.retryMode??es.loadConfig({...YP.NODE_RETRY_MODE_CONFIG_OPTIONS,default:async()=>(await w()).retryMode||n10.DEFAULT_RETRY_MODE},f),sha256:f?.sha256??x10.Hash.bind(null,"sha256"),streamCollector:f?.streamCollector??MP.streamCollector,useDualstackEndpoint:f?.useDualstackEndpoint??es.loadConfig(yU.NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS,$),useFipsEndpoint:f?.useFipsEndpoint??es.loadConfig(yU.NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS,$),userAgentAppId:f?.userAgentAppId??es.loadConfig(SP.NODE_APP_ID_CONFIG_OPTIONS,$)}};QP.getRuntimeConfig=u10});var PP=H((JP)=>{Object.defineProperty(JP,"__esModule",{value:!0});JP.resolveHttpAuthRuntimeConfig=JP.getHttpAuthExtensionConfiguration=void 0;var t10=(f)=>{let{httpAuthSchemes:h,httpAuthSchemeProvider:w,credentials:s}=f;return{setHttpAuthScheme($){let r=h.findIndex((E)=>E.schemeId===$.schemeId);if(r===-1)h.push($);else h.splice(r,1,$)},httpAuthSchemes(){return h},setHttpAuthSchemeProvider($){w=$},httpAuthSchemeProvider(){return w},setCredentials($){s=$},credentials(){return s}}};JP.getHttpAuthExtensionConfiguration=t10;var ff0=(f)=>{return{httpAuthSchemes:f.httpAuthSchemes(),httpAuthSchemeProvider:f.httpAuthSchemeProvider(),credentials:f.credentials()}};JP.resolveHttpAuthRuntimeConfig=ff0});var jP=H((kP)=>{Object.defineProperty(kP,"__esModule",{value:!0});kP.resolveRuntimeExtensions=void 0;var HP=T6(),NP=t0(),DP=J0(),qP=PP(),jU=(f)=>f,wf0=(f,h)=>{let w={...jU(HP.getAwsRegionExtensionConfiguration(f)),...jU(DP.getDefaultExtensionConfiguration(f)),...jU(NP.getHttpHandlerExtensionConfiguration(f)),...jU(qP.getHttpAuthExtensionConfiguration(f))};return h.forEach((s)=>s.configure(w)),{...f,...HP.resolveAwsRegionExtensionConfiguration(w),...DP.resolveDefaultRuntimeConfig(w),...NP.resolveHttpHandlerRuntimeConfig(w),...qP.resolveHttpAuthRuntimeConfig(w)}};kP.resolveRuntimeExtensions=wf0});var Rr=H((l6)=>{Object.defineProperty(l6,"__esModule",{value:!0});l6.STSClient=l6.__Client=void 0;var OP=LF(),sf0=BF(),$f0=GF(),lP=gE(),rf0=Xs(),O6=m0(),Ef0=KF(),Uf0=Qs(),vP=Tr(),mP=J0();Object.defineProperty(l6,"__Client",{enumerable:!0,get:function(){return mP.Client}});var bP=D6(),Tf0=Xr(),Ff0=ZP(),Cf0=jP();class dP extends mP.Client{config;constructor(...[f]){let h=Ff0.getRuntimeConfig(f||{}),w=Tf0.resolveClientEndpointParameters(h),s=lP.resolveUserAgentConfig(w),$=vP.resolveRetryConfig(s),r=rf0.resolveRegionConfig($),E=OP.resolveHostHeaderConfig(r),U=Uf0.resolveEndpointConfig(E),T=bP.resolveHttpAuthSchemeConfig(U),F=Cf0.resolveRuntimeExtensions(T,f?.extensions||[]);super(F);this.config=F,this.middlewareStack.use(lP.getUserAgentPlugin(this.config)),this.middlewareStack.use(vP.getRetryPlugin(this.config)),this.middlewareStack.use(Ef0.getContentLengthPlugin(this.config)),this.middlewareStack.use(OP.getHostHeaderPlugin(this.config)),this.middlewareStack.use(sf0.getLoggerPlugin(this.config)),this.middlewareStack.use($f0.getRecursionDetectionPlugin(this.config)),this.middlewareStack.use(O6.getHttpAuthSchemeEndpointRuleSetPlugin(this.config,{httpAuthSchemeParametersProvider:bP.defaultSTSHttpAuthSchemeParametersProvider,identityProviderConfigProvider:async(C)=>new O6.DefaultIdentityProviderConfig({"aws.auth#sigv4":C.credentials})})),this.middlewareStack.use(O6.getHttpSigningPlugin(this.config))}destroy(){super.destroy()}}l6.STSClient=dP});var A8=H((IX0,B8)=>{var{defineProperty:OU,getOwnPropertyDescriptor:If0,getOwnPropertyNames:Lf0}=Object,Bf0=Object.prototype.hasOwnProperty,e=(f,h)=>OU(f,"name",{value:h,configurable:!0}),Af0=(f,h)=>{for(var w in h)OU(f,w,{get:h[w],enumerable:!0})},E8=(f,h,w,s)=>{if(h&&typeof h==="object"||typeof h==="function"){for(let $ of Lf0(h))if(!Bf0.call(f,$)&&$!==w)OU(f,$,{get:()=>h[$],enumerable:!(s=If0(h,$))||s.enumerable})}return f},Gf0=(f,h,w)=>(E8(f,h,"default"),w&&E8(w,h,"default")),Wf0=(f)=>E8(OU({},"__esModule",{value:!0}),f),T8={};Af0(T8,{AssumeRoleCommand:()=>I8,AssumeRoleResponseFilterSensitiveLog:()=>xP,AssumeRoleWithWebIdentityCommand:()=>L8,AssumeRoleWithWebIdentityRequestFilterSensitiveLog:()=>uP,AssumeRoleWithWebIdentityResponseFilterSensitiveLog:()=>tP,ClientInputEndpointParameters:()=>Th0.ClientInputEndpointParameters,CredentialsFilterSensitiveLog:()=>F8,ExpiredTokenException:()=>_P,IDPCommunicationErrorException:()=>fH,IDPRejectedClaimException:()=>oP,InvalidIdentityTokenException:()=>pP,MalformedPolicyDocumentException:()=>nP,PackedPolicyTooLargeException:()=>eP,RegionDisabledException:()=>aP,STS:()=>IH,STSServiceException:()=>uf,decorateDefaultCredentialProvider:()=>Ih0,getDefaultRoleAssumer:()=>zH,getDefaultRoleAssumerWithWebIdentity:()=>RH});B8.exports=Wf0(T8);Gf0(T8,Rr(),B8.exports);var zf0=J0(),Rf0=Qs(),Xf0=Dw(),Sf0=J0(),Yf0=Xr(),gP=J0(),Mf0=J0(),uf=class f extends Mf0.ServiceException{static{e(this,"STSServiceException")}constructor(h){super(h);Object.setPrototypeOf(this,f.prototype)}},F8=e((f)=>({...f,...f.SecretAccessKey&&{SecretAccessKey:gP.SENSITIVE_STRING}}),"CredentialsFilterSensitiveLog"),xP=e((f)=>({...f,...f.Credentials&&{Credentials:F8(f.Credentials)}}),"AssumeRoleResponseFilterSensitiveLog"),_P=class f extends uf{static{e(this,"ExpiredTokenException")}name="ExpiredTokenException";$fault="client";constructor(h){super({name:"ExpiredTokenException",$fault:"client",...h});Object.setPrototypeOf(this,f.prototype)}},nP=class f extends uf{static{e(this,"MalformedPolicyDocumentException")}name="MalformedPolicyDocumentException";$fault="client";constructor(h){super({name:"MalformedPolicyDocumentException",$fault:"client",...h});Object.setPrototypeOf(this,f.prototype)}},eP=class f extends uf{static{e(this,"PackedPolicyTooLargeException")}name="PackedPolicyTooLargeException";$fault="client";constructor(h){super({name:"PackedPolicyTooLargeException",$fault:"client",...h});Object.setPrototypeOf(this,f.prototype)}},aP=class f extends uf{static{e(this,"RegionDisabledException")}name="RegionDisabledException";$fault="client";constructor(h){super({name:"RegionDisabledException",$fault:"client",...h});Object.setPrototypeOf(this,f.prototype)}},oP=class f extends uf{static{e(this,"IDPRejectedClaimException")}name="IDPRejectedClaimException";$fault="client";constructor(h){super({name:"IDPRejectedClaimException",$fault:"client",...h});Object.setPrototypeOf(this,f.prototype)}},pP=class f extends uf{static{e(this,"InvalidIdentityTokenException")}name="InvalidIdentityTokenException";$fault="client";constructor(h){super({name:"InvalidIdentityTokenException",$fault:"client",...h});Object.setPrototypeOf(this,f.prototype)}},uP=e((f)=>({...f,...f.WebIdentityToken&&{WebIdentityToken:gP.SENSITIVE_STRING}}),"AssumeRoleWithWebIdentityRequestFilterSensitiveLog"),tP=e((f)=>({...f,...f.Credentials&&{Credentials:F8(f.Credentials)}}),"AssumeRoleWithWebIdentityResponseFilterSensitiveLog"),fH=class f extends uf{static{e(this,"IDPCommunicationErrorException")}name="IDPCommunicationErrorException";$fault="client";constructor(h){super({name:"IDPCommunicationErrorException",$fault:"client",...h});Object.setPrototypeOf(this,f.prototype)}},C8=O0(),Qf0=t0(),R0=J0(),Kf0=e(async(f,h)=>{let w=EH,s;return s=CH({...jf0(f,h),[TH]:tf0,[FH]:UH}),rH(h,w,"/",void 0,s)},"se_AssumeRoleCommand"),Zf0=e(async(f,h)=>{let w=EH,s;return s=CH({...Of0(f,h),[TH]:fh0,[FH]:UH}),rH(h,w,"/",void 0,s)},"se_AssumeRoleWithWebIdentityCommand"),Jf0=e(async(f,h)=>{if(f.statusCode>=300)return hH(f,h);let w=await C8.parseXmlBody(f.body,h),s={};return s=cf0(w.AssumeRoleResult,h),{$metadata:tf(f),...s}},"de_AssumeRoleCommand"),Vf0=e(async(f,h)=>{if(f.statusCode>=300)return hH(f,h);let w=await C8.parseXmlBody(f.body,h),s={};return s=gf0(w.AssumeRoleWithWebIdentityResult,h),{$metadata:tf(f),...s}},"de_AssumeRoleWithWebIdentityCommand"),hH=e(async(f,h)=>{let w={...f,body:await C8.parseXmlErrorBody(f.body,h)},s=hh0(f,w.body);switch(s){case"ExpiredTokenException":case"com.amazonaws.sts#ExpiredTokenException":throw await Pf0(w,h);case"MalformedPolicyDocument":case"com.amazonaws.sts#MalformedPolicyDocumentException":throw await qf0(w,h);case"PackedPolicyTooLarge":case"com.amazonaws.sts#PackedPolicyTooLargeException":throw await kf0(w,h);case"RegionDisabledException":case"com.amazonaws.sts#RegionDisabledException":throw await yf0(w,h);case"IDPCommunicationError":case"com.amazonaws.sts#IDPCommunicationErrorException":throw await Hf0(w,h);case"IDPRejectedClaim":case"com.amazonaws.sts#IDPRejectedClaimException":throw await Nf0(w,h);case"InvalidIdentityToken":case"com.amazonaws.sts#InvalidIdentityTokenException":throw await Df0(w,h);default:let $=w.body;return uf0({output:f,parsedBody:$.Error,errorCode:s})}},"de_CommandError"),Pf0=e(async(f,h)=>{let w=f.body,s=xf0(w.Error,h),$=new _P({$metadata:tf(f),...s});return R0.decorateServiceException($,w)},"de_ExpiredTokenExceptionRes"),Hf0=e(async(f,h)=>{let w=f.body,s=_f0(w.Error,h),$=new fH({$metadata:tf(f),...s});return R0.decorateServiceException($,w)},"de_IDPCommunicationErrorExceptionRes"),Nf0=e(async(f,h)=>{let w=f.body,s=nf0(w.Error,h),$=new oP({$metadata:tf(f),...s});return R0.decorateServiceException($,w)},"de_IDPRejectedClaimExceptionRes"),Df0=e(async(f,h)=>{let w=f.body,s=ef0(w.Error,h),$=new pP({$metadata:tf(f),...s});return R0.decorateServiceException($,w)},"de_InvalidIdentityTokenExceptionRes"),qf0=e(async(f,h)=>{let w=f.body,s=af0(w.Error,h),$=new nP({$metadata:tf(f),...s});return R0.decorateServiceException($,w)},"de_MalformedPolicyDocumentExceptionRes"),kf0=e(async(f,h)=>{let w=f.body,s=of0(w.Error,h),$=new eP({$metadata:tf(f),...s});return R0.decorateServiceException($,w)},"de_PackedPolicyTooLargeExceptionRes"),yf0=e(async(f,h)=>{let w=f.body,s=pf0(w.Error,h),$=new aP({$metadata:tf(f),...s});return R0.decorateServiceException($,w)},"de_RegionDisabledExceptionRes"),jf0=e((f,h)=>{let w={};if(f[h$]!=null)w[h$]=f[h$];if(f[w$]!=null)w[w$]=f[w$];if(f[ts]!=null){let s=wH(f[ts],h);if(f[ts]?.length===0)w.PolicyArns=[];Object.entries(s).forEach(([$,r])=>{let E=`PolicyArns.${$}`;w[E]=r})}if(f[us]!=null)w[us]=f[us];if(f[ps]!=null)w[ps]=f[ps];if(f[f8]!=null){let s=if0(f[f8],h);if(f[f8]?.length===0)w.Tags=[];Object.entries(s).forEach(([$,r])=>{let E=`Tags.${$}`;w[E]=r})}if(f[w8]!=null){let s=df0(f[w8],h);if(f[w8]?.length===0)w.TransitiveTagKeys=[];Object.entries(s).forEach(([$,r])=>{let E=`TransitiveTagKeys.${$}`;w[E]=r})}if(f[g6]!=null)w[g6]=f[g6];if(f[u6]!=null)w[u6]=f[u6];if(f[h8]!=null)w[h8]=f[h8];if(f[pf]!=null)w[pf]=f[pf];if(f[n6]!=null){let s=bf0(f[n6],h);if(f[n6]?.length===0)w.ProvidedContexts=[];Object.entries(s).forEach(([$,r])=>{let E=`ProvidedContexts.${$}`;w[E]=r})}return w},"se_AssumeRoleRequest"),Of0=e((f,h)=>{let w={};if(f[h$]!=null)w[h$]=f[h$];if(f[w$]!=null)w[w$]=f[w$];if(f[$8]!=null)w[$8]=f[$8];if(f[e6]!=null)w[e6]=f[e6];if(f[ts]!=null){let s=wH(f[ts],h);if(f[ts]?.length===0)w.PolicyArns=[];Object.entries(s).forEach(([$,r])=>{let E=`PolicyArns.${$}`;w[E]=r})}if(f[us]!=null)w[us]=f[us];if(f[ps]!=null)w[ps]=f[ps];return w},"se_AssumeRoleWithWebIdentityRequest"),wH=e((f,h)=>{let w={},s=1;for(let $ of f){if($===null)continue;let r=lf0($,h);Object.entries(r).forEach(([E,U])=>{w[`member.${s}.${E}`]=U}),s++}return w},"se_policyDescriptorListType"),lf0=e((f,h)=>{let w={};if(f[r8]!=null)w[r8]=f[r8];return w},"se_PolicyDescriptorType"),vf0=e((f,h)=>{let w={};if(f[_6]!=null)w[_6]=f[_6];if(f[i6]!=null)w[i6]=f[i6];return w},"se_ProvidedContext"),bf0=e((f,h)=>{let w={},s=1;for(let $ of f){if($===null)continue;let r=vf0($,h);Object.entries(r).forEach(([E,U])=>{w[`member.${s}.${E}`]=U}),s++}return w},"se_ProvidedContextsListType"),mf0=e((f,h)=>{let w={};if(f[x6]!=null)w[x6]=f[x6];if(f[s8]!=null)w[s8]=f[s8];return w},"se_Tag"),df0=e((f,h)=>{let w={},s=1;for(let $ of f){if($===null)continue;w[`member.${s}`]=$,s++}return w},"se_tagKeyListType"),if0=e((f,h)=>{let w={},s=1;for(let $ of f){if($===null)continue;let r=mf0($,h);Object.entries(r).forEach(([E,U])=>{w[`member.${s}.${E}`]=U}),s++}return w},"se_tagListType"),sH=e((f,h)=>{let w={};if(f[b6]!=null)w[b6]=R0.expectString(f[b6]);if(f[m6]!=null)w[m6]=R0.expectString(f[m6]);return w},"de_AssumedRoleUser"),cf0=e((f,h)=>{let w={};if(f[os]!=null)w[os]=$H(f[os],h);if(f[as]!=null)w[as]=sH(f[as],h);if(f[f$]!=null)w[f$]=R0.strictParseInt32(f[f$]);if(f[pf]!=null)w[pf]=R0.expectString(f[pf]);return w},"de_AssumeRoleResponse"),gf0=e((f,h)=>{let w={};if(f[os]!=null)w[os]=$H(f[os],h);if(f[p6]!=null)w[p6]=R0.expectString(f[p6]);if(f[as]!=null)w[as]=sH(f[as],h);if(f[f$]!=null)w[f$]=R0.strictParseInt32(f[f$]);if(f[a6]!=null)w[a6]=R0.expectString(f[a6]);if(f[d6]!=null)w[d6]=R0.expectString(f[d6]);if(f[pf]!=null)w[pf]=R0.expectString(f[pf]);return w},"de_AssumeRoleWithWebIdentityResponse"),$H=e((f,h)=>{let w={};if(f[v6]!=null)w[v6]=R0.expectString(f[v6]);if(f[o6]!=null)w[o6]=R0.expectString(f[o6]);if(f[t6]!=null)w[t6]=R0.expectString(f[t6]);if(f[c6]!=null)w[c6]=R0.expectNonNull(R0.parseRfc3339DateTimeWithOffset(f[c6]));return w},"de_Credentials"),xf0=e((f,h)=>{let w={};if(f[i0]!=null)w[i0]=R0.expectString(f[i0]);return w},"de_ExpiredTokenException"),_f0=e((f,h)=>{let w={};if(f[i0]!=null)w[i0]=R0.expectString(f[i0]);return w},"de_IDPCommunicationErrorException"),nf0=e((f,h)=>{let w={};if(f[i0]!=null)w[i0]=R0.expectString(f[i0]);return w},"de_IDPRejectedClaimException"),ef0=e((f,h)=>{let w={};if(f[i0]!=null)w[i0]=R0.expectString(f[i0]);return w},"de_InvalidIdentityTokenException"),af0=e((f,h)=>{let w={};if(f[i0]!=null)w[i0]=R0.expectString(f[i0]);return w},"de_MalformedPolicyDocumentException"),of0=e((f,h)=>{let w={};if(f[i0]!=null)w[i0]=R0.expectString(f[i0]);return w},"de_PackedPolicyTooLargeException"),pf0=e((f,h)=>{let w={};if(f[i0]!=null)w[i0]=R0.expectString(f[i0]);return w},"de_RegionDisabledException"),tf=e((f)=>({httpStatusCode:f.statusCode,requestId:f.headers["x-amzn-requestid"]??f.headers["x-amzn-request-id"]??f.headers["x-amz-request-id"],extendedRequestId:f.headers["x-amz-id-2"],cfId:f.headers["x-amz-cf-id"]}),"deserializeMetadata"),uf0=R0.withBaseException(uf),rH=e(async(f,h,w,s,$)=>{let{hostname:r,protocol:E="https",port:U,path:T}=await f.endpoint(),F={protocol:E,hostname:r,port:U,method:"POST",path:T.endsWith("/")?T.slice(0,-1)+w:T+w,headers:h};if(s!==void 0)F.hostname=s;if($!==void 0)F.body=$;return new Qf0.HttpRequest(F)},"buildHttpRpcRequest"),EH={"content-type":"application/x-www-form-urlencoded"},UH="2011-06-15",TH="Action",v6="AccessKeyId",tf0="AssumeRole",b6="AssumedRoleId",as="AssumedRoleUser",fh0="AssumeRoleWithWebIdentity",m6="Arn",d6="Audience",os="Credentials",i6="ContextAssertion",ps="DurationSeconds",c6="Expiration",g6="ExternalId",x6="Key",us="Policy",ts="PolicyArns",_6="ProviderArn",n6="ProvidedContexts",e6="ProviderId",f$="PackedPolicySize",a6="Provider",h$="RoleArn",w$="RoleSessionName",o6="SecretAccessKey",p6="SubjectFromWebIdentityToken",pf="SourceIdentity",u6="SerialNumber",t6="SessionToken",f8="Tags",h8="TokenCode",w8="TransitiveTagKeys",FH="Version",s8="Value",$8="WebIdentityToken",r8="arn",i0="message",CH=e((f)=>Object.entries(f).map(([h,w])=>R0.extendedEncodeURIComponent(h)+"="+R0.extendedEncodeURIComponent(w)).join("&"),"buildFormUrlencodedString"),hh0=e((f,h)=>{if(h.Error?.Code!==void 0)return h.Error.Code;if(f.statusCode==404)return"NotFound"},"loadQueryErrorCode"),I8=class extends Sf0.Command.classBuilder().ep(Yf0.commonParams).m(function(f,h,w,s){return[Xf0.getSerdePlugin(w,this.serialize,this.deserialize),Rf0.getEndpointPlugin(w,f.getEndpointParameterInstructions())]}).s("AWSSecurityTokenServiceV20110615","AssumeRole",{}).n("STSClient","AssumeRoleCommand").f(void 0,xP).ser(Kf0).de(Jf0).build(){static{e(this,"AssumeRoleCommand")}},wh0=Qs(),sh0=Dw(),$h0=J0(),rh0=Xr(),L8=class extends $h0.Command.classBuilder().ep(rh0.commonParams).m(function(f,h,w,s){return[sh0.getSerdePlugin(w,this.serialize,this.deserialize),wh0.getEndpointPlugin(w,f.getEndpointParameterInstructions())]}).s("AWSSecurityTokenServiceV20110615","AssumeRoleWithWebIdentity",{}).n("STSClient","AssumeRoleWithWebIdentityCommand").f(uP,tP).ser(Zf0).de(Vf0).build(){static{e(this,"AssumeRoleWithWebIdentityCommand")}},Eh0=Rr(),Uh0={AssumeRoleCommand:I8,AssumeRoleWithWebIdentityCommand:L8},IH=class extends Eh0.STSClient{static{e(this,"STS")}};zf0.createAggregatedClient(Uh0,IH);var Th0=Xr(),U8=C1(),cP="us-east-1",LH=e((f)=>{if(typeof f?.Arn==="string"){let h=f.Arn.split(":");if(h.length>4&&h[4]!=="")return h[4]}return},"getAccountIdFromAssumedRoleUser"),BH=e(async(f,h,w)=>{let s=typeof f==="function"?await f():f,$=typeof h==="function"?await h():h;return w?.debug?.("@aws-sdk/client-sts::resolveRegion","accepting first of:",`${s} (provider)`,`${$} (parent client)`,`${cP} (STS default)`),s??$??cP},"resolveRegion"),Fh0=e((f,h)=>{let w,s;return async($,r)=>{if(s=$,!w){let{logger:C=f?.parentClientConfig?.logger,region:I,requestHandler:L=f?.parentClientConfig?.requestHandler,credentialProviderLogger:G}=f,X=await BH(I,f?.parentClientConfig?.region,G),Q=!AH(L);w=new h({profile:f?.parentClientConfig?.profile,credentialDefaultProvider:e(()=>async()=>s,"credentialDefaultProvider"),region:X,requestHandler:Q?L:void 0,logger:C})}let{Credentials:E,AssumedRoleUser:U}=await w.send(new I8(r));if(!E||!E.AccessKeyId||!E.SecretAccessKey)throw new Error(`Invalid response from STS.assumeRole call with role ${r.RoleArn}`);let T=LH(U),F={accessKeyId:E.AccessKeyId,secretAccessKey:E.SecretAccessKey,sessionToken:E.SessionToken,expiration:E.Expiration,...E.CredentialScope&&{credentialScope:E.CredentialScope},...T&&{accountId:T}};return U8.setCredentialFeature(F,"CREDENTIALS_STS_ASSUME_ROLE","i"),F}},"getDefaultRoleAssumer"),Ch0=e((f,h)=>{let w;return async(s)=>{if(!w){let{logger:T=f?.parentClientConfig?.logger,region:F,requestHandler:C=f?.parentClientConfig?.requestHandler,credentialProviderLogger:I}=f,L=await BH(F,f?.parentClientConfig?.region,I),G=!AH(C);w=new h({profile:f?.parentClientConfig?.profile,region:L,requestHandler:G?C:void 0,logger:T})}let{Credentials:$,AssumedRoleUser:r}=await w.send(new L8(s));if(!$||!$.AccessKeyId||!$.SecretAccessKey)throw new Error(`Invalid response from STS.assumeRoleWithWebIdentity call with role ${s.RoleArn}`);let E=LH(r),U={accessKeyId:$.AccessKeyId,secretAccessKey:$.SecretAccessKey,sessionToken:$.SessionToken,expiration:$.Expiration,...$.CredentialScope&&{credentialScope:$.CredentialScope},...E&&{accountId:E}};if(E)U8.setCredentialFeature(U,"RESOLVED_ACCOUNT_ID","T");return U8.setCredentialFeature(U,"CREDENTIALS_STS_ASSUME_ROLE_WEB_ID","k"),U}},"getDefaultRoleAssumerWithWebIdentity"),AH=e((f)=>{return f?.metadata?.handlerProtocol==="h2"},"isH2"),GH=Rr(),WH=e((f,h)=>{if(!h)return f;else return class w extends f{static{e(this,"CustomizableSTSClient")}constructor(s){super(s);for(let $ of h)this.middlewareStack.use($)}}},"getCustomizableStsClientCtor"),zH=e((f={},h)=>Fh0(f,WH(GH.STSClient,h)),"getDefaultRoleAssumer"),RH=e((f={},h)=>Ch0(f,WH(GH.STSClient,h)),"getDefaultRoleAssumerWithWebIdentity"),Ih0=e((f)=>(h)=>f({roleAssumer:zH(h),roleAssumerWithWebIdentity:RH(h),...h}),"decorateDefaultCredentialProvider")});var G8,SH=(f,{profile:h="default",logger:w}={})=>{return Boolean(f)&&typeof f==="object"&&typeof f.role_arn==="string"&&["undefined","string"].indexOf(typeof f.role_session_name)>-1&&["undefined","string"].indexOf(typeof f.external_id)>-1&&["undefined","string"].indexOf(typeof f.mfa_serial)>-1&&(Lh0(f,{profile:h,logger:w})||Bh0(f,{profile:h,logger:w}))},Lh0=(f,{profile:h,logger:w})=>{let s=typeof f.source_profile==="string"&&typeof f.credential_source==="undefined";if(s)w?.debug?.(` ${h} isAssumeRoleWithSourceProfile source_profile=${f.source_profile}`);return s},Bh0=(f,{profile:h,logger:w})=>{let s=typeof f.credential_source==="string"&&typeof f.source_profile==="undefined";if(s)w?.debug?.(` ${h} isCredentialSourceProfile credential_source=${f.credential_source}`);return s},YH=async(f,h,w,s={})=>{w.logger?.debug("@aws-sdk/credential-provider-ini - resolveAssumeRoleCredentials (STS)");let $=h[f],{source_profile:r,region:E}=$;if(!w.roleAssumer){let{getDefaultRoleAssumer:T}=await Promise.resolve().then(() => p(A8(),1));w.roleAssumer=T({...w.clientConfig,credentialProviderLogger:w.logger,parentClientConfig:{...w?.parentClientConfig,region:E??w?.parentClientConfig?.region}},w.clientPlugins)}if(r&&r in s)throw new a(`Detected a cycle attempting to resolve credentials for profile ${y1(w)}. Profiles visited: `+Object.keys(s).join(", "),{logger:w.logger});w.logger?.debug(`@aws-sdk/credential-provider-ini - finding credential resolver using ${r?`source_profile=[${r}]`:`profile=[${f}]`}`);let U=r?lU(r,h,w,{...s,[r]:!0},XH(h[r]??{})):(await kV($.credential_source,f,w.logger)(w))();if(XH($))return U.then((T)=>G8.setCredentialFeature(T,"CREDENTIALS_PROFILE_SOURCE_PROFILE","o"));else{let T={RoleArn:$.role_arn,RoleSessionName:$.role_session_name||`aws-sdk-js-${Date.now()}`,ExternalId:$.external_id,DurationSeconds:parseInt($.duration_seconds||"3600",10)},{mfa_serial:F}=$;if(F){if(!w.mfaCodeProvider)throw new a(`Profile ${f} requires multi-factor authentication, but no MFA code callback was provided.`,{logger:w.logger,tryNextLink:!1});T.SerialNumber=F,T.TokenCode=await w.mfaCodeProvider(F)}let C=await U;return w.roleAssumer(C,T).then((I)=>G8.setCredentialFeature(I,"CREDENTIALS_PROFILE_SOURCE_PROFILE","o"))}},XH=(f)=>{return!f.role_arn&&!!f.credential_source};var MH=B(()=>{G8=p(C1(),1);Y0();hf();yV();W8()});var QH,KH=(f,h,w)=>{if(h.Version!==1)throw Error(`Profile ${f} credential_process did not return Version 1.`);if(h.AccessKeyId===void 0||h.SecretAccessKey===void 0)throw Error(`Profile ${f} credential_process returned invalid credentials.`);if(h.Expiration){let r=new Date;if(new Date(h.Expiration)<r)throw Error(`Profile ${f} credential_process returned expired credentials.`)}let s=h.AccountId;if(!s&&w?.[f]?.aws_account_id)s=w[f].aws_account_id;let $={accessKeyId:h.AccessKeyId,secretAccessKey:h.SecretAccessKey,...h.SessionToken&&{sessionToken:h.SessionToken},...h.Expiration&&{expiration:new Date(h.Expiration)},...h.CredentialScope&&{credentialScope:h.CredentialScope},...s&&{accountId:s}};return QH.setCredentialFeature($,"CREDENTIALS_PROCESS","w"),$};var ZH=B(()=>{QH=p(C1(),1)});import{exec as Ah0}from"child_process";import{promisify as Gh0}from"util";var JH=async(f,h,w)=>{let s=h[f];if(h[f]){let $=s.credential_process;if($!==void 0){let r=Gh0(Ah0);try{let{stdout:E}=await r($),U;try{U=JSON.parse(E.trim())}catch{throw Error(`Profile ${f} credential_process returned invalid JSON.`)}return KH(f,U,h)}catch(E){throw new a(E.message,{logger:w})}}else throw new a(`Profile ${f} did not contain credential_process.`,{logger:w})}else throw new a(`Profile ${f} could not be found in shared credentials file.`,{logger:w})};var VH=B(()=>{Y0();ZH()});var Wh0=(f={})=>async({callerClientConfig:h}={})=>{f.logger?.debug("@aws-sdk/credential-provider-process - fromProcess");let w=await Qh(f);return JH(y1({profile:f.profile??h?.profile}),w,f.logger)};var PH=B(()=>{hf();VH()});var z8={};Th(z8,{fromProcess:()=>Wh0});var R8=B(()=>{PH()});var HH,NH=(f)=>Boolean(f)&&typeof f==="object"&&typeof f.credential_process==="string",DH=async(f,h)=>Promise.resolve().then(() => (R8(),z8)).then(({fromProcess:w})=>w({...f,profile:h})().then((s)=>HH.setCredentialFeature(s,"CREDENTIALS_PROFILE_PROCESS","v")));var qH=B(()=>{HH=p(C1(),1)});var X8,kH=async(f,h,w={})=>{let{fromSSO:s}=await Promise.resolve().then(() => (H6(),P6));return s({profile:f,logger:w.logger,parentClientConfig:w.parentClientConfig,clientConfig:w.clientConfig})().then(($)=>{if(h.sso_session)return X8.setCredentialFeature($,"CREDENTIALS_PROFILE_SSO","r");else return X8.setCredentialFeature($,"CREDENTIALS_PROFILE_SSO_LEGACY","t")})},yH=(f)=>f&&(typeof f.sso_start_url==="string"||typeof f.sso_account_id==="string"||typeof f.sso_session==="string"||typeof f.sso_region==="string"||typeof f.sso_role_name==="string");var jH=B(()=>{X8=p(C1(),1)});var OH,S8=(f)=>Boolean(f)&&typeof f==="object"&&typeof f.aws_access_key_id==="string"&&typeof f.aws_secret_access_key==="string"&&["undefined","string"].indexOf(typeof f.aws_session_token)>-1&&["undefined","string"].indexOf(typeof f.aws_account_id)>-1,Y8=async(f,h)=>{h?.logger?.debug("@aws-sdk/credential-provider-ini - resolveStaticCredentials");let w={accessKeyId:f.aws_access_key_id,secretAccessKey:f.aws_secret_access_key,sessionToken:f.aws_session_token,...f.aws_credential_scope&&{credentialScope:f.aws_credential_scope},...f.aws_account_id&&{accountId:f.aws_account_id}};return OH.setCredentialFeature(w,"CREDENTIALS_PROFILE","n")};var lH=B(()=>{OH=p(C1(),1)});var M8=(f)=>async(h)=>{f.logger?.debug("@aws-sdk/credential-provider-web-identity - fromWebToken");let{roleArn:w,roleSessionName:s,webIdentityToken:$,providerId:r,policyArns:E,policy:U,durationSeconds:T}=f,{roleAssumerWithWebIdentity:F}=f;if(!F){let{getDefaultRoleAssumerWithWebIdentity:C}=await Promise.resolve().then(() => p(A8(),1));F=C({...f.clientConfig,credentialProviderLogger:f.logger,parentClientConfig:{...h?.callerClientConfig,...f.parentClientConfig}},f.clientPlugins)}return F({RoleArn:w,RoleSessionName:s??`aws-sdk-js-session-${Date.now()}`,WebIdentityToken:$,ProviderId:r,PolicyArns:E,Policy:U,DurationSeconds:T})};import{readFileSync as zh0}from"fs";var bH,vH="AWS_WEB_IDENTITY_TOKEN_FILE",Rh0="AWS_ROLE_ARN",Xh0="AWS_ROLE_SESSION_NAME",Sh0=(f={})=>async()=>{f.logger?.debug("@aws-sdk/credential-provider-web-identity - fromTokenFile");let h=f?.webIdentityTokenFile??process.env[vH],w=f?.roleArn??process.env[Rh0],s=f?.roleSessionName??process.env[Xh0];if(!h||!w)throw new a("Web identity configuration not specified",{logger:f.logger});let $=await M8({...f,webIdentityToken:zh0(h,{encoding:"ascii"}),roleArn:w,roleSessionName:s})();if(h===process.env[vH])bH.setCredentialFeature($,"CREDENTIALS_ENV_VARS_STS_WEB_ID_TOKEN","h");return $};var mH=B(()=>{bH=p(C1(),1);Y0()});var Q8={};Th(Q8,{fromWebToken:()=>M8,fromTokenFile:()=>Sh0});var K8=B(()=>{mH()});var dH,iH=(f)=>Boolean(f)&&typeof f==="object"&&typeof f.web_identity_token_file==="string"&&typeof f.role_arn==="string"&&["undefined","string"].indexOf(typeof f.role_session_name)>-1,cH=async(f,h)=>Promise.resolve().then(() => (K8(),Q8)).then(({fromTokenFile:w})=>w({webIdentityTokenFile:f.web_identity_token_file,roleArn:f.role_arn,roleSessionName:f.role_session_name,roleAssumerWithWebIdentity:h.roleAssumerWithWebIdentity,logger:h.logger,parentClientConfig:h.parentClientConfig})().then((s)=>dH.setCredentialFeature(s,"CREDENTIALS_PROFILE_STS_WEB_ID_TOKEN","q")));var gH=B(()=>{dH=p(C1(),1)});var lU=async(f,h,w,s={},$=!1)=>{let r=h[f];if(Object.keys(s).length>0&&S8(r))return Y8(r,w);if($||SH(r,{profile:f,logger:w.logger}))return YH(f,h,w,s);if(S8(r))return Y8(r,w);if(iH(r))return cH(r,w);if(NH(r))return DH(w,f);if(yH(r))return await kH(f,r,w);throw new a(`Could not resolve credentials using profile: [${f}] in configuration/credentials file(s).`,{logger:w.logger})};var W8=B(()=>{Y0();MH();qH();jH();lH();gH()});var Yh0=(f={})=>async({callerClientConfig:h}={})=>{let w={...f,parentClientConfig:{...h,...f.parentClientConfig}};w.logger?.debug("@aws-sdk/credential-provider-ini - fromIni");let s=await Qh(w);return lU(y1({profile:f.profile??h?.profile}),s,w)};var xH=B(()=>{hf();W8()});var _H={};Th(_H,{fromIni:()=>Yh0});var nH=B(()=>{xH()});r4();E4();U4();m$();Yh();var $$=p(m0(),1);$E();D();$w();J();var TY=p(O0(),1);cf();var FY=async(f,h,w)=>{return{operation:Xh(h).operation,region:await L1(f.region)()||(()=>{throw new Error("expected `region` to be configured for `aws.auth#sigv4`")})()}};function M_(f){return{schemeId:"aws.auth#sigv4",signingProperties:{name:"route53",region:f.region},propertiesExtractor:(h,w)=>({signingProperties:{config:h,context:w}})}}var CY=(f)=>{let h=[];switch(f.operation){default:h.push(M_(f))}return h},IY=(f)=>{return{...TY.resolveAwsSdkSigV4Config(f)}};var LY=(f)=>{return{...f,useDualstackEndpoint:f.useDualstackEndpoint??!1,useFipsEndpoint:f.useFipsEndpoint??!1,defaultSigningName:"route53"}},K={UseFIPS:{type:"builtInParams",name:"useFipsEndpoint"},Endpoint:{type:"builtInParams",name:"endpoint"},Region:{type:"builtInParams",name:"region"},UseDualStack:{type:"builtInParams",name:"useDualstackEndpoint"}};var BY={name:"@aws-sdk/client-route-53",description:"AWS SDK for JavaScript Route 53 Client for Node.js, Browser and React Native",version:"3.772.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/core":"3.758.0","@aws-sdk/credential-provider-node":"3.772.0","@aws-sdk/middleware-host-header":"3.734.0","@aws-sdk/middleware-logger":"3.734.0","@aws-sdk/middleware-recursion-detection":"3.772.0","@aws-sdk/middleware-sdk-route53":"3.734.0","@aws-sdk/middleware-user-agent":"3.758.0","@aws-sdk/region-config-resolver":"3.734.0","@aws-sdk/types":"3.734.0","@aws-sdk/util-endpoints":"3.743.0","@aws-sdk/util-user-agent-browser":"3.734.0","@aws-sdk/util-user-agent-node":"3.758.0","@aws-sdk/xml-builder":"3.734.0","@smithy/config-resolver":"^4.0.1","@smithy/core":"^3.1.5","@smithy/fetch-http-handler":"^5.0.1","@smithy/hash-node":"^4.0.1","@smithy/invalid-dependency":"^4.0.1","@smithy/middleware-content-length":"^4.0.1","@smithy/middleware-endpoint":"^4.0.6","@smithy/middleware-retry":"^4.0.7","@smithy/middleware-serde":"^4.0.2","@smithy/middleware-stack":"^4.0.1","@smithy/node-config-provider":"^4.0.1","@smithy/node-http-handler":"^4.0.3","@smithy/protocol-http":"^5.0.1","@smithy/smithy-client":"^4.1.6","@smithy/types":"^4.1.0","@smithy/url-parser":"^4.0.1","@smithy/util-base64":"^4.0.0","@smithy/util-body-length-browser":"^4.0.0","@smithy/util-body-length-node":"^4.0.0","@smithy/util-defaults-mode-browser":"^4.0.7","@smithy/util-defaults-mode-node":"^4.0.7","@smithy/util-endpoints":"^3.0.1","@smithy/util-middleware":"^4.0.1","@smithy/util-retry":"^4.0.1","@smithy/util-utf8":"^4.0.0","@smithy/util-waiter":"^4.0.2",tslib:"^2.6.2"},devDependencies:{"@tsconfig/node18":"18.2.4","@types/node":"^18.19.69",concurrently:"7.0.0","downlevel-dts":"0.10.1",rimraf:"3.0.2",typescript:"~5.2.2"},engines:{node:">=18.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 LN=p(O0(),1);n3();Y0();hf();Y0();var F9="AWS_EC2_METADATA_DISABLED",C9=async(f)=>{let{ENV_CMDS_FULL_URI:h,ENV_CMDS_RELATIVE_URI:w,fromContainerMetadata:s,fromInstanceMetadata:$}=await Promise.resolve().then(() => (fr(),t$));if(process.env[w]||process.env[h]){f.logger?.debug("@aws-sdk/credential-provider-node - remoteProvider::fromHttp/fromContainerMetadata");let{fromHttp:r}=await Promise.resolve().then(() => (FF(),TF));return gf(r(f),s(f))}if(process.env[F9]&&process.env[F9]!=="false")return async()=>{throw new a("EC2 Instance Metadata Service access disabled",{logger:f.logger})};return f.logger?.debug("@aws-sdk/credential-provider-node - remoteProvider::fromInstanceMetadata"),$(f)};var eH=!1,vU=(f={})=>uh(gf(async()=>{if(f.profile??process.env[q7]){if(process.env[QE]&&process.env[KE]){if(!eH)(f.logger?.warn&&f.logger?.constructor?.name!=="NoOpLogger"?f.logger.warn:console.warn)(`@aws-sdk/credential-provider-node - defaultProvider::fromEnv WARNING:
48
+ - EKS container host 169.254.170.23 or [fd00:ec2::23]`,{logger:h})};var w9=B(()=>{Y0()});function $9(f){return new n0({protocol:f.protocol,hostname:f.hostname,port:Number(f.port),path:f.pathname,query:Array.from(f.searchParams.entries()).reduce((h,[w,s])=>{return h[w]=s,h},{}),fragment:f.hash})}async function r9(f,h){let s=await s9.sdkStreamMixin(f.body).transformToString();if(f.statusCode===200){let $=JSON.parse(s);if(typeof $.AccessKeyId!=="string"||typeof $.SecretAccessKey!=="string"||typeof $.Token!=="string"||typeof $.Expiration!=="string")throw new a("HTTP credential provider response not of the required format, an object matching: { AccessKeyId: string, SecretAccessKey: string, Token: string, Expiration: string(rfc3339) }",{logger:h});return{accessKeyId:$.AccessKeyId,secretAccessKey:$.SecretAccessKey,sessionToken:$.Token,expiration:iS($.Expiration)}}if(f.statusCode>=400&&f.statusCode<500){let $={};try{$=JSON.parse(s)}catch(r){}throw Object.assign(new a(`Server responded with status: ${f.statusCode}`,{logger:h}),{Code:$.Code,Message:$.Message})}throw new a(`Server responded with status: ${f.statusCode}`,{logger:h})}var s9;var E9=B(()=>{Y0();F1();J();s9=p(E2(),1)});var U9=(f,h,w)=>{return async()=>{for(let s=0;s<h;++s)try{return await f()}catch($){await new Promise((r)=>setTimeout(r,w))}return await f()}};import rn from"fs/promises";var T9,En="AWS_CONTAINER_CREDENTIALS_RELATIVE_URI",Un="http://169.254.170.2",Tn="AWS_CONTAINER_CREDENTIALS_FULL_URI",Fn="AWS_CONTAINER_AUTHORIZATION_TOKEN_FILE",Cn="AWS_CONTAINER_AUTHORIZATION_TOKEN",F9=(f={})=>{f.logger?.debug("@aws-sdk/credential-provider-http - fromHttp");let h,w=f.awsContainerCredentialsRelativeUri??process.env[En],s=f.awsContainerCredentialsFullUri??process.env[Tn],$=f.awsContainerAuthorizationToken??process.env[Cn],r=f.awsContainerAuthorizationTokenFile??process.env[Fn],E=f.logger?.constructor?.name==="NoOpLogger"||!f.logger?console.warn:f.logger.warn;if(w&&s)E("@aws-sdk/credential-provider-http: you have set both awsContainerCredentialsRelativeUri and awsContainerCredentialsFullUri."),E("awsContainerCredentialsFullUri will take precedence.");if($&&r)E("@aws-sdk/credential-provider-http: you have set both awsContainerAuthorizationToken and awsContainerAuthorizationTokenFile."),E("awsContainerAuthorizationToken will take precedence.");if(s)h=s;else if(w)h=`${Un}${w}`;else throw new a(`No HTTP credential provider host provided.
49
+ Set AWS_CONTAINER_CREDENTIALS_FULL_URI or AWS_CONTAINER_CREDENTIALS_RELATIVE_URI.`,{logger:f.logger});let U=new URL(h);h9(U,f.logger);let T=new rf({requestTimeout:f.timeout??1000,connectionTimeout:f.timeout??1000});return U9(async()=>{let F=$9(U);if($)F.headers.Authorization=$;else if(r)F.headers.Authorization=(await rn.readFile(r)).toString();try{let C=await T.handle(F);return r9(C.response).then((I)=>T9.setCredentialFeature(I,"CREDENTIALS_HTTP","z"))}catch(C){throw new a(String(C),{logger:f.logger})}},f.maxRetries??3,f.timeout??1000)};var C9=B(()=>{T9=p(C1(),1);wr();Y0();w9();E9()});var TF={};Th(TF,{fromHttp:()=>F9});var FF=B(()=>{C9()});var CF=(f)=>f&&(typeof f.sso_start_url==="string"||typeof f.sso_account_id==="string"||typeof f.sso_session==="string"||typeof f.sso_region==="string"||typeof f.sso_role_name==="string");var B9=300000,zs="To refresh this SSO session run 'aws sso login' with the corresponding profile.";var LF=H((uA0,R9)=>{var{defineProperty:qE,getOwnPropertyDescriptor:In,getOwnPropertyNames:Ln}=Object,Bn=Object.prototype.hasOwnProperty,IF=(f,h)=>qE(f,"name",{value:h,configurable:!0}),An=(f,h)=>{for(var w in h)qE(f,w,{get:h[w],enumerable:!0})},Gn=(f,h,w,s)=>{if(h&&typeof h==="object"||typeof h==="function"){for(let $ of Ln(h))if(!Bn.call(f,$)&&$!==w)qE(f,$,{get:()=>h[$],enumerable:!(s=In(h,$))||s.enumerable})}return f},Wn=(f)=>Gn(qE({},"__esModule",{value:!0}),f),A9={};An(A9,{getHostHeaderPlugin:()=>Rn,hostHeaderMiddleware:()=>W9,hostHeaderMiddlewareOptions:()=>z9,resolveHostHeaderConfig:()=>G9});R9.exports=Wn(A9);var zn=t0();function G9(f){return f}IF(G9,"resolveHostHeaderConfig");var W9=IF((f)=>(h)=>async(w)=>{if(!zn.HttpRequest.isInstance(w.request))return h(w);let{request:s}=w,{handlerProtocol:$=""}=f.requestHandler.metadata||{};if($.indexOf("h2")>=0&&!s.headers[":authority"])delete s.headers.host,s.headers[":authority"]=s.hostname+(s.port?":"+s.port:"");else if(!s.headers.host){let r=s.hostname;if(s.port!=null)r+=`:${s.port}`;s.headers.host=r}return h(w)},"hostHeaderMiddleware"),z9={name:"hostHeaderMiddleware",step:"build",priority:"low",tags:["HOST"],override:!0},Rn=IF((f)=>({applyToStack:(h)=>{h.add(W9(f),z9)}}),"getHostHeaderPlugin")});var BF=H((tA0,Q9)=>{var{defineProperty:kE,getOwnPropertyDescriptor:Xn,getOwnPropertyNames:Sn}=Object,Yn=Object.prototype.hasOwnProperty,X9=(f,h)=>kE(f,"name",{value:h,configurable:!0}),Mn=(f,h)=>{for(var w in h)kE(f,w,{get:h[w],enumerable:!0})},Qn=(f,h,w,s)=>{if(h&&typeof h==="object"||typeof h==="function"){for(let $ of Sn(h))if(!Yn.call(f,$)&&$!==w)kE(f,$,{get:()=>h[$],enumerable:!(s=Xn(h,$))||s.enumerable})}return f},Kn=(f)=>Qn(kE({},"__esModule",{value:!0}),f),S9={};Mn(S9,{getLoggerPlugin:()=>Zn,loggerMiddleware:()=>Y9,loggerMiddlewareOptions:()=>M9});Q9.exports=Kn(S9);var Y9=X9(()=>(f,h)=>async(w)=>{try{let s=await f(w),{clientName:$,commandName:r,logger:E,dynamoDbDocumentClientOptions:U={}}=h,{overrideInputFilterSensitiveLog:T,overrideOutputFilterSensitiveLog:F}=U,C=T??h.inputFilterSensitiveLog,I=F??h.outputFilterSensitiveLog,{$metadata:L,...G}=s.output;return E?.info?.({clientName:$,commandName:r,input:C(w.input),output:I(G),metadata:L}),s}catch(s){let{clientName:$,commandName:r,logger:E,dynamoDbDocumentClientOptions:U={}}=h,{overrideInputFilterSensitiveLog:T}=U,F=T??h.inputFilterSensitiveLog;throw E?.error?.({clientName:$,commandName:r,input:F(w.input),error:s,metadata:s.$metadata}),s}},"loggerMiddleware"),M9={name:"loggerMiddleware",tags:["LOGGER"],step:"initialize",override:!0},Zn=X9((f)=>({applyToStack:(h)=>{h.add(Y9(),M9)}}),"getLoggerPlugin")});var GF=H((fG0,V9)=>{var{defineProperty:jE,getOwnPropertyDescriptor:Jn,getOwnPropertyNames:Vn}=Object,Pn=Object.prototype.hasOwnProperty,yE=(f,h)=>jE(f,"name",{value:h,configurable:!0}),Hn=(f,h)=>{for(var w in h)jE(f,w,{get:h[w],enumerable:!0})},Nn=(f,h,w,s)=>{if(h&&typeof h==="object"||typeof h==="function"){for(let $ of Vn(h))if(!Pn.call(f,$)&&$!==w)jE(f,$,{get:()=>h[$],enumerable:!(s=Jn(h,$))||s.enumerable})}return f},Dn=(f)=>Nn(jE({},"__esModule",{value:!0}),f),K9={};Hn(K9,{addRecursionDetectionMiddlewareOptions:()=>J9,getRecursionDetectionPlugin:()=>jn,recursionDetectionMiddleware:()=>Z9});V9.exports=Dn(K9);var qn=t0(),AF="X-Amzn-Trace-Id",kn="AWS_LAMBDA_FUNCTION_NAME",yn="_X_AMZN_TRACE_ID",Z9=yE((f)=>(h)=>async(w)=>{let{request:s}=w;if(!qn.HttpRequest.isInstance(s)||f.runtime!=="node")return h(w);let $=Object.keys(s.headers??{}).find((T)=>T.toLowerCase()===AF.toLowerCase())??AF;if(s.headers.hasOwnProperty($))return h(w);let r=process.env[kn],E=process.env[yn],U=yE((T)=>typeof T==="string"&&T.length>0,"nonEmptyString");if(U(r)&&U(E))s.headers[AF]=E;return h({...w,request:s})},"recursionDetectionMiddleware"),J9={step:"build",tags:["RECURSION_DETECTION"],name:"recursionDetectionMiddleware",override:!0,priority:"low"},jn=yE((f)=>({applyToStack:yE((h)=>{h.add(Z9(f),J9)},"applyToStack")}),"getRecursionDetectionPlugin")});var vE=H((hG0,O9)=>{var{defineProperty:OE,getOwnPropertyDescriptor:On,getOwnPropertyNames:ln}=Object,vn=Object.prototype.hasOwnProperty,Q0=(f,h)=>OE(f,"name",{value:h,configurable:!0}),bn=(f,h)=>{for(var w in h)OE(f,w,{get:h[w],enumerable:!0})},mn=(f,h,w,s)=>{if(h&&typeof h==="object"||typeof h==="function"){for(let $ of ln(h))if(!vn.call(f,$)&&$!==w)OE(f,$,{get:()=>h[$],enumerable:!(s=On(h,$))||s.enumerable})}return f},dn=(f)=>mn(OE({},"__esModule",{value:!0}),f),P9={};bn(P9,{EndpointCache:()=>cn,EndpointError:()=>Y1,customEndpointFunctions:()=>zF,isIpAddress:()=>H9,isValidHostLabel:()=>XF,resolveEndpoint:()=>Te});O9.exports=dn(P9);var cn=class{constructor({size:f,params:h}){if(this.data=new Map,this.parameters=[],this.capacity=f??50,h)this.parameters=h}static{Q0(this,"EndpointCache")}get(f,h){let w=this.hash(f);if(w===!1)return h();if(!this.data.has(w)){if(this.data.size>this.capacity+10){let s=this.data.keys(),$=0;while(!0){let{value:r,done:E}=s.next();if(this.data.delete(r),E||++$>10)break}}this.data.set(w,h())}return this.data.get(w)}size(){return this.data.size}hash(f){let h="",{parameters:w}=this;if(w.length===0)return!1;for(let s of w){let $=String(f[s]??"");if($.includes("|;"))return!1;h+=$+"|;"}return h}},gn=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}$"),H9=Q0((f)=>gn.test(f)||f.startsWith("[")&&f.endsWith("]"),"isIpAddress"),xn=new RegExp("^(?!.*-$)(?!-)[a-zA-Z0-9-]{1,63}$"),XF=Q0((f,h=!1)=>{if(!h)return xn.test(f);let w=f.split(".");for(let s of w)if(!XF(s))return!1;return!0},"isValidHostLabel"),zF={},sr="endpoints";function nf(f){if(typeof f!=="object"||f==null)return f;if("ref"in f)return`$${nf(f.ref)}`;if("fn"in f)return`${f.fn}(${(f.argv||[]).map(nf).join(", ")})`;return JSON.stringify(f,null,2)}Q0(nf,"toDebugString");var Y1=class extends Error{static{Q0(this,"EndpointError")}constructor(f){super(f);this.name="EndpointError"}},_n=Q0((f,h)=>f===h,"booleanEquals"),nn=Q0((f)=>{let h=f.split("."),w=[];for(let s of h){let $=s.indexOf("[");if($!==-1){if(s.indexOf("]")!==s.length-1)throw new Y1(`Path: '${f}' does not end with ']'`);let r=s.slice($+1,-1);if(Number.isNaN(parseInt(r)))throw new Y1(`Invalid array index: '${r}' in path: '${f}'`);if($!==0)w.push(s.slice(0,$));w.push(r)}else w.push(s)}return w},"getAttrPathList"),N9=Q0((f,h)=>nn(h).reduce((w,s)=>{if(typeof w!=="object")throw new Y1(`Index '${s}' in '${h}' not found in '${JSON.stringify(f)}'`);else if(Array.isArray(w))return w[parseInt(s)];return w[s]},f),"getAttr"),en=Q0((f)=>f!=null,"isSet"),an=Q0((f)=>!f,"not"),RF=T1(),WF={[RF.EndpointURLScheme.HTTP]:80,[RF.EndpointURLScheme.HTTPS]:443},on=Q0((f)=>{let h=(()=>{try{if(f instanceof URL)return f;if(typeof f==="object"&&"hostname"in f){let{hostname:L,port:G,protocol:X="",path:Q="",query:M={}}=f,q=new URL(`${X}//${L}${G?`:${G}`:""}${Q}`);return q.search=Object.entries(M).map(([N,y])=>`${N}=${y}`).join("&"),q}return new URL(f)}catch(L){return null}})();if(!h)return console.error(`Unable to parse ${JSON.stringify(f)} as a whatwg URL.`),null;let w=h.href,{host:s,hostname:$,pathname:r,protocol:E,search:U}=h;if(U)return null;let T=E.slice(0,-1);if(!Object.values(RF.EndpointURLScheme).includes(T))return null;let F=H9($),C=w.includes(`${s}:${WF[T]}`)||typeof f==="string"&&f.includes(`${s}:${WF[T]}`),I=`${s}${C?`:${WF[T]}`:""}`;return{scheme:T,authority:I,path:r,normalizedPath:r.endsWith("/")?r:`${r}/`,isIp:F}},"parseURL"),pn=Q0((f,h)=>f===h,"stringEquals"),un=Q0((f,h,w,s)=>{if(h>=w||f.length<w)return null;if(!s)return f.substring(h,w);return f.substring(f.length-w,f.length-h)},"substring"),tn=Q0((f)=>encodeURIComponent(f).replace(/[!*'()]/g,(h)=>`%${h.charCodeAt(0).toString(16).toUpperCase()}`),"uriEncode"),fe={booleanEquals:_n,getAttr:N9,isSet:en,isValidHostLabel:XF,not:an,parseURL:on,stringEquals:pn,substring:un,uriEncode:tn},D9=Q0((f,h)=>{let w=[],s={...h.endpointParams,...h.referenceRecord},$=0;while($<f.length){let r=f.indexOf("{",$);if(r===-1){w.push(f.slice($));break}w.push(f.slice($,r));let E=f.indexOf("}",r);if(E===-1){w.push(f.slice(r));break}if(f[r+1]==="{"&&f[E+1]==="}")w.push(f.slice(r+1,E)),$=E+2;let U=f.substring(r+1,E);if(U.includes("#")){let[T,F]=U.split("#");w.push(N9(s[T],F))}else w.push(s[U]);$=E+1}return w.join("")},"evaluateTemplate"),he=Q0(({ref:f},h)=>{return{...h.endpointParams,...h.referenceRecord}[f]},"getReferenceValue"),lE=Q0((f,h,w)=>{if(typeof f==="string")return D9(f,w);else if(f.fn)return q9(f,w);else if(f.ref)return he(f,w);throw new Y1(`'${h}': ${String(f)} is not a string, function or reference.`)},"evaluateExpression"),q9=Q0(({fn:f,argv:h},w)=>{let s=h.map((r)=>["boolean","number"].includes(typeof r)?r:lE(r,"arg",w)),$=f.split(".");if($[0]in zF&&$[1]!=null)return zF[$[0]][$[1]](...s);return fe[f](...s)},"callFunction"),we=Q0(({assign:f,...h},w)=>{if(f&&f in w.referenceRecord)throw new Y1(`'${f}' is already defined in Reference Record.`);let s=q9(h,w);return w.logger?.debug?.(`${sr} evaluateCondition: ${nf(h)} = ${nf(s)}`),{result:s===""?!0:!!s,...f!=null&&{toAssign:{name:f,value:s}}}},"evaluateCondition"),SF=Q0((f=[],h)=>{let w={};for(let s of f){let{result:$,toAssign:r}=we(s,{...h,referenceRecord:{...h.referenceRecord,...w}});if(!$)return{result:$};if(r)w[r.name]=r.value,h.logger?.debug?.(`${sr} assign: ${r.name} := ${nf(r.value)}`)}return{result:!0,referenceRecord:w}},"evaluateConditions"),se=Q0((f,h)=>Object.entries(f).reduce((w,[s,$])=>({...w,[s]:$.map((r)=>{let E=lE(r,"Header value entry",h);if(typeof E!=="string")throw new Y1(`Header '${s}' value '${E}' is not a string`);return E})}),{}),"getEndpointHeaders"),k9=Q0((f,h)=>{if(Array.isArray(f))return f.map((w)=>k9(w,h));switch(typeof f){case"string":return D9(f,h);case"object":if(f===null)throw new Y1(`Unexpected endpoint property: ${f}`);return y9(f,h);case"boolean":return f;default:throw new Y1(`Unexpected endpoint property type: ${typeof f}`)}},"getEndpointProperty"),y9=Q0((f,h)=>Object.entries(f).reduce((w,[s,$])=>({...w,[s]:k9($,h)}),{}),"getEndpointProperties"),$e=Q0((f,h)=>{let w=lE(f,"Endpoint URL",h);if(typeof w==="string")try{return new URL(w)}catch(s){throw console.error(`Failed to construct URL with ${w}`,s),s}throw new Y1(`Endpoint URL must be a string, got ${typeof w}`)},"getEndpointUrl"),re=Q0((f,h)=>{let{conditions:w,endpoint:s}=f,{result:$,referenceRecord:r}=SF(w,h);if(!$)return;let E={...h,referenceRecord:{...h.referenceRecord,...r}},{url:U,properties:T,headers:F}=s;return h.logger?.debug?.(`${sr} Resolving endpoint from template: ${nf(s)}`),{...F!=null&&{headers:se(F,E)},...T!=null&&{properties:y9(T,E)},url:$e(U,E)}},"evaluateEndpointRule"),Ee=Q0((f,h)=>{let{conditions:w,error:s}=f,{result:$,referenceRecord:r}=SF(w,h);if(!$)return;throw new Y1(lE(s,"Error",{...h,referenceRecord:{...h.referenceRecord,...r}}))},"evaluateErrorRule"),Ue=Q0((f,h)=>{let{conditions:w,rules:s}=f,{result:$,referenceRecord:r}=SF(w,h);if(!$)return;return j9(s,{...h,referenceRecord:{...h.referenceRecord,...r}})},"evaluateTreeRule"),j9=Q0((f,h)=>{for(let w of f)if(w.type==="endpoint"){let s=re(w,h);if(s)return s}else if(w.type==="error")Ee(w,h);else if(w.type==="tree"){let s=Ue(w,h);if(s)return s}else throw new Y1(`Unknown endpoint rule: ${w}`);throw new Y1("Rules evaluation failed")},"evaluateRules"),Te=Q0((f,h)=>{let{endpointParams:w,logger:s}=h,{parameters:$,rules:r}=f;h.logger?.debug?.(`${sr} Initial EndpointParams: ${nf(w)}`);let E=Object.entries($).filter(([,F])=>F.default!=null).map(([F,C])=>[F,C.default]);if(E.length>0)for(let[F,C]of E)w[F]=w[F]??C;let U=Object.entries($).filter(([,F])=>F.required).map(([F])=>F);for(let F of U)if(w[F]==null)throw new Y1(`Missing required parameter: '${F}'`);let T=j9(r,{endpointParams:w,logger:s,referenceRecord:{}});return h.logger?.debug?.(`${sr} Resolved endpoint: ${nf(T)}`),T},"resolveEndpoint")});var mE=H(($G0,_9)=>{var{defineProperty:bE,getOwnPropertyDescriptor:Fe,getOwnPropertyNames:Ce}=Object,Ie=Object.prototype.hasOwnProperty,Rs=(f,h)=>bE(f,"name",{value:h,configurable:!0}),Le=(f,h)=>{for(var w in h)bE(f,w,{get:h[w],enumerable:!0})},Be=(f,h,w,s)=>{if(h&&typeof h==="object"||typeof h==="function"){for(let $ of Ce(h))if(!Ie.call(f,$)&&$!==w)bE(f,$,{get:()=>h[$],enumerable:!(s=Fe(h,$))||s.enumerable})}return f},Ae=(f)=>Be(bE({},"__esModule",{value:!0}),f),v9={};Le(v9,{ConditionObject:()=>V0.ConditionObject,DeprecatedObject:()=>V0.DeprecatedObject,EndpointError:()=>V0.EndpointError,EndpointObject:()=>V0.EndpointObject,EndpointObjectHeaders:()=>V0.EndpointObjectHeaders,EndpointObjectProperties:()=>V0.EndpointObjectProperties,EndpointParams:()=>V0.EndpointParams,EndpointResolverOptions:()=>V0.EndpointResolverOptions,EndpointRuleObject:()=>V0.EndpointRuleObject,ErrorRuleObject:()=>V0.ErrorRuleObject,EvaluateOptions:()=>V0.EvaluateOptions,Expression:()=>V0.Expression,FunctionArgv:()=>V0.FunctionArgv,FunctionObject:()=>V0.FunctionObject,FunctionReturn:()=>V0.FunctionReturn,ParameterObject:()=>V0.ParameterObject,ReferenceObject:()=>V0.ReferenceObject,ReferenceRecord:()=>V0.ReferenceRecord,RuleSetObject:()=>V0.RuleSetObject,RuleSetRules:()=>V0.RuleSetRules,TreeRuleObject:()=>V0.TreeRuleObject,awsEndpointFunctions:()=>x9,getUserAgentPrefix:()=>Re,isIpAddress:()=>V0.isIpAddress,partition:()=>c9,resolveEndpoint:()=>V0.resolveEndpoint,setPartitionInfo:()=>g9,useDefaultPartitionInfo:()=>ze});_9.exports=Ae(v9);var V0=vE(),b9=Rs((f,h=!1)=>{if(h){for(let w of f.split("."))if(!b9(w))return!1;return!0}if(!V0.isValidHostLabel(f))return!1;if(f.length<3||f.length>63)return!1;if(f!==f.toLowerCase())return!1;if(V0.isIpAddress(f))return!1;return!0},"isVirtualHostableS3Bucket"),l9=":",Ge="/",We=Rs((f)=>{let h=f.split(l9);if(h.length<6)return null;let[w,s,$,r,E,...U]=h;if(w!=="arn"||s===""||$===""||U.join(l9)==="")return null;let T=U.map((F)=>F.split(Ge)).flat();return{partition:s,service:$,region:r,accountId:E,resourceId:T}},"parseArn"),m9={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)"},"ap-southeast-7":{description:"Asia Pacific (Thailand)"},"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)"},"mx-central-1":{description:"Mexico (Central)"},"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:{"aws-iso-f-global":{description:"AWS ISOF global region"},"us-isof-east-1":{description:"US ISOF EAST"},"us-isof-south-1":{description:"US ISOF SOUTH"}}}],version:"1.1"},d9=m9,i9="",c9=Rs((f)=>{let{partitions:h}=d9;for(let s of h){let{regions:$,outputs:r}=s;for(let[E,U]of Object.entries($))if(E===f)return{...r,...U}}for(let s of h){let{regionRegex:$,outputs:r}=s;if(new RegExp($).test(f))return{...r}}let w=h.find((s)=>s.id==="aws");if(!w)throw new Error("Provided region was not found in the partition array or regex, and default partition with id 'aws' doesn't exist.");return{...w.outputs}},"partition"),g9=Rs((f,h="")=>{d9=f,i9=h},"setPartitionInfo"),ze=Rs(()=>{g9(m9,"")},"useDefaultPartitionInfo"),Re=Rs(()=>i9,"getUserAgentPrefix"),x9={isVirtualHostableS3Bucket:b9,parseArn:We,partition:c9};V0.customEndpointFunctions.aws=x9});var cE=H((rG0,$M)=>{var{defineProperty:iE,getOwnPropertyDescriptor:Xe,getOwnPropertyNames:Se}=Object,Ye=Object.prototype.hasOwnProperty,Ew=(f,h)=>iE(f,"name",{value:h,configurable:!0}),Me=(f,h)=>{for(var w in h)iE(f,w,{get:h[w],enumerable:!0})},Qe=(f,h,w,s)=>{if(h&&typeof h==="object"||typeof h==="function"){for(let $ of Se(h))if(!Ye.call(f,$)&&$!==w)iE(f,$,{get:()=>h[$],enumerable:!(s=Xe(h,$))||s.enumerable})}return f},Ke=(f)=>Qe(iE({},"__esModule",{value:!0}),f),o9={};Me(o9,{DEFAULT_UA_APP_ID:()=>p9,getUserAgentMiddlewareOptions:()=>sM,getUserAgentPlugin:()=>qe,resolveUserAgentConfig:()=>t9,userAgentMiddleware:()=>wM});$M.exports=Ke(o9);var Ze=m0(),p9=void 0;function u9(f){if(f===void 0)return!0;return typeof f==="string"&&f.length<=50}Ew(u9,"isValidUserAgentAppId");function t9(f){let h=Ze.normalizeProvider(f.userAgentAppId??p9);return{...f,customUserAgent:typeof f.customUserAgent==="string"?[[f.customUserAgent]]:f.customUserAgent,userAgentAppId:async()=>{let w=await h();if(!u9(w)){let s=f.logger?.constructor?.name==="NoOpLogger"||!f.logger?console:f.logger;if(typeof w!=="string")s?.warn("userAgentAppId must be a string or undefined.");else if(w.length>50)s?.warn("The provided userAgentAppId exceeds the maximum length of 50 characters.")}return w}}}Ew(t9,"resolveUserAgentConfig");var Je=mE(),Ve=t0(),Kf=O0(),Pe=/\d{12}\.ddb/;async function fM(f,h,w){if(w.request?.headers?.["smithy-protocol"]==="rpc-v2-cbor")Kf.setFeature(f,"PROTOCOL_RPC_V2_CBOR","M");if(typeof h.retryStrategy==="function"){let r=await h.retryStrategy();if(typeof r.acquireInitialRetryToken==="function")if(r.constructor?.name?.includes("Adaptive"))Kf.setFeature(f,"RETRY_MODE_ADAPTIVE","F");else Kf.setFeature(f,"RETRY_MODE_STANDARD","E");else Kf.setFeature(f,"RETRY_MODE_LEGACY","D")}if(typeof h.accountIdEndpointMode==="function"){let r=f.endpointV2;if(String(r?.url?.hostname).match(Pe))Kf.setFeature(f,"ACCOUNT_ID_ENDPOINT","O");switch(await h.accountIdEndpointMode?.()){case"disabled":Kf.setFeature(f,"ACCOUNT_ID_MODE_DISABLED","Q");break;case"preferred":Kf.setFeature(f,"ACCOUNT_ID_MODE_PREFERRED","P");break;case"required":Kf.setFeature(f,"ACCOUNT_ID_MODE_REQUIRED","R");break}}let $=f.__smithy_context?.selectedHttpAuthScheme?.identity;if($?.$source){let r=$;if(r.accountId)Kf.setFeature(f,"RESOLVED_ACCOUNT_ID","T");for(let[E,U]of Object.entries(r.$source??{}))Kf.setFeature(f,E,U)}}Ew(fM,"checkFeatures");var n9="user-agent",YF="x-amz-user-agent",e9=" ",MF="/",He=/[^\!\$\%\&\'\*\+\-\.\^\_\`\|\~\d\w]/g,Ne=/[^\!\$\%\&\'\*\+\-\.\^\_\`\|\~\d\w\#]/g,a9="-",De=1024;function hM(f){let h="";for(let w in f){let s=f[w];if(h.length+s.length+1<=De){if(h.length)h+=","+s;else h+=s;continue}break}return h}Ew(hM,"encodeFeatures");var wM=Ew((f)=>(h,w)=>async(s)=>{let{request:$}=s;if(!Ve.HttpRequest.isInstance($))return h(s);let{headers:r}=$,E=w?.userAgent?.map(dE)||[],U=(await f.defaultUserAgentProvider()).map(dE);await fM(w,f,s);let T=w;U.push(`m/${hM(Object.assign({},w.__smithy_context?.features,T.__aws_sdk_context?.features))}`);let F=f?.customUserAgent?.map(dE)||[],C=await f.userAgentAppId();if(C)U.push(dE([`app/${C}`]));let I=Je.getUserAgentPrefix(),L=(I?[I]:[]).concat([...U,...E,...F]).join(e9),G=[...U.filter((X)=>X.startsWith("aws-sdk-")),...F].join(e9);if(f.runtime!=="browser"){if(G)r[YF]=r[YF]?`${r[n9]} ${G}`:G;r[n9]=L}else r[YF]=L;return h({...s,request:$})},"userAgentMiddleware"),dE=Ew((f)=>{let h=f[0].split(MF).map((E)=>E.replace(He,a9)).join(MF),w=f[1]?.replace(Ne,a9),s=h.indexOf(MF),$=h.substring(0,s),r=h.substring(s+1);if($==="api")r=r.toLowerCase();return[$,r,w].filter((E)=>E&&E.length>0).reduce((E,U,T)=>{switch(T){case 0:return U;case 1:return`${E}/${U}`;default:return`${E}#${U}`}},"")},"escapeUserAgent"),sM={name:"getUserAgentMiddleware",step:"build",priority:"low",tags:["SET_USER_AGENT","USER_AGENT"],override:!0},qe=Ew((f)=>({applyToStack:(h)=>{h.add(wM(f),sM)}}),"getUserAgentPlugin")});var FM=H((EG0,TM)=>{var{defineProperty:gE,getOwnPropertyDescriptor:ke,getOwnPropertyNames:ye}=Object,je=Object.prototype.hasOwnProperty,rM=(f,h)=>gE(f,"name",{value:h,configurable:!0}),Oe=(f,h)=>{for(var w in h)gE(f,w,{get:h[w],enumerable:!0})},le=(f,h,w,s)=>{if(h&&typeof h==="object"||typeof h==="function"){for(let $ of ye(h))if(!je.call(f,$)&&$!==w)gE(f,$,{get:()=>h[$],enumerable:!(s=ke(h,$))||s.enumerable})}return f},ve=(f)=>le(gE({},"__esModule",{value:!0}),f),EM={};Oe(EM,{SelectorType:()=>UM,booleanSelector:()=>be,numberSelector:()=>me});TM.exports=ve(EM);var be=rM((f,h,w)=>{if(!(h in f))return;if(f[h]==="true")return!0;if(f[h]==="false")return!1;throw new Error(`Cannot load ${w} "${h}". Expected "true" or "false", got ${f[h]}.`)},"booleanSelector"),me=rM((f,h,w)=>{if(!(h in f))return;let s=parseInt(f[h],10);if(Number.isNaN(s))throw new TypeError(`Cannot load ${w} '${h}'. Expected number, got '${f[h]}'.`);return s},"numberSelector"),UM=((f)=>{return f.ENV="env",f.CONFIG="shared config entry",f})(UM||{})});var Xs=H((UG0,SM)=>{var{defineProperty:_E,getOwnPropertyDescriptor:de,getOwnPropertyNames:ie}=Object,ce=Object.prototype.hasOwnProperty,Ef=(f,h)=>_E(f,"name",{value:h,configurable:!0}),ge=(f,h)=>{for(var w in h)_E(f,w,{get:h[w],enumerable:!0})},xe=(f,h,w,s)=>{if(h&&typeof h==="object"||typeof h==="function"){for(let $ of ie(h))if(!ce.call(f,$)&&$!==w)_E(f,$,{get:()=>h[$],enumerable:!(s=de(h,$))||s.enumerable})}return f},_e=(f)=>xe(_E({},"__esModule",{value:!0}),f),LM={};ge(LM,{CONFIG_USE_DUALSTACK_ENDPOINT:()=>AM,CONFIG_USE_FIPS_ENDPOINT:()=>WM,DEFAULT_USE_DUALSTACK_ENDPOINT:()=>ne,DEFAULT_USE_FIPS_ENDPOINT:()=>ae,ENV_USE_DUALSTACK_ENDPOINT:()=>BM,ENV_USE_FIPS_ENDPOINT:()=>GM,NODE_REGION_CONFIG_FILE_OPTIONS:()=>ha,NODE_REGION_CONFIG_OPTIONS:()=>fa,NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS:()=>ee,NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS:()=>oe,REGION_ENV_NAME:()=>zM,REGION_INI_NAME:()=>RM,getRegionInfo:()=>Ea,resolveCustomEndpointsConfig:()=>pe,resolveEndpointsConfig:()=>te,resolveRegionConfig:()=>wa});SM.exports=_e(LM);var Nh=FM(),BM="AWS_USE_DUALSTACK_ENDPOINT",AM="use_dualstack_endpoint",ne=!1,ee={environmentVariableSelector:(f)=>Nh.booleanSelector(f,BM,Nh.SelectorType.ENV),configFileSelector:(f)=>Nh.booleanSelector(f,AM,Nh.SelectorType.CONFIG),default:!1},GM="AWS_USE_FIPS_ENDPOINT",WM="use_fips_endpoint",ae=!1,oe={environmentVariableSelector:(f)=>Nh.booleanSelector(f,GM,Nh.SelectorType.ENV),configFileSelector:(f)=>Nh.booleanSelector(f,WM,Nh.SelectorType.CONFIG),default:!1},xE=Fh(),pe=Ef((f)=>{let{endpoint:h,urlParser:w}=f;return{...f,tls:f.tls??!0,endpoint:xE.normalizeProvider(typeof h==="string"?w(h):h),isCustomEndpoint:!0,useDualstackEndpoint:xE.normalizeProvider(f.useDualstackEndpoint??!1)}},"resolveCustomEndpointsConfig"),ue=Ef(async(f)=>{let{tls:h=!0}=f,w=await f.region();if(!new RegExp(/^([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9-]{0,61}[a-zA-Z0-9])$/).test(w))throw new Error("Invalid region in client config");let $=await f.useDualstackEndpoint(),r=await f.useFipsEndpoint(),{hostname:E}=await f.regionInfoProvider(w,{useDualstackEndpoint:$,useFipsEndpoint:r})??{};if(!E)throw new Error("Cannot resolve hostname from client config");return f.urlParser(`${h?"https:":"http:"}//${E}`)},"getEndpointFromRegion"),te=Ef((f)=>{let h=xE.normalizeProvider(f.useDualstackEndpoint??!1),{endpoint:w,useFipsEndpoint:s,urlParser:$}=f;return{...f,tls:f.tls??!0,endpoint:w?xE.normalizeProvider(typeof w==="string"?$(w):w):()=>ue({...f,useDualstackEndpoint:h,useFipsEndpoint:s}),isCustomEndpoint:!!w,useDualstackEndpoint:h}},"resolveEndpointsConfig"),zM="AWS_REGION",RM="region",fa={environmentVariableSelector:(f)=>f[zM],configFileSelector:(f)=>f[RM],default:()=>{throw new Error("Region is missing")}},ha={preferredFile:"credentials"},XM=Ef((f)=>typeof f==="string"&&(f.startsWith("fips-")||f.endsWith("-fips")),"isFipsRegion"),CM=Ef((f)=>XM(f)?["fips-aws-global","aws-fips"].includes(f)?"us-east-1":f.replace(/fips-(dkr-|prod-)?|-fips/,""):f,"getRealRegion"),wa=Ef((f)=>{let{region:h,useFipsEndpoint:w}=f;if(!h)throw new Error("Region is missing");return{...f,region:async()=>{if(typeof h==="string")return CM(h);let s=await h();return CM(s)},useFipsEndpoint:async()=>{let s=typeof h==="string"?h:await h();if(XM(s))return!0;return typeof w!=="function"?Promise.resolve(!!w):w()}}},"resolveRegionConfig"),IM=Ef((f=[],{useFipsEndpoint:h,useDualstackEndpoint:w})=>f.find(({tags:s})=>h===s.includes("fips")&&w===s.includes("dualstack"))?.hostname,"getHostnameFromVariants"),sa=Ef((f,{regionHostname:h,partitionHostname:w})=>h?h:w?w.replace("{region}",f):void 0,"getResolvedHostname"),$a=Ef((f,{partitionHash:h})=>Object.keys(h||{}).find((w)=>h[w].regions.includes(f))??"aws","getResolvedPartition"),ra=Ef((f,{signingRegion:h,regionRegex:w,useFipsEndpoint:s})=>{if(h)return h;else if(s){let $=w.replace("\\\\","\\").replace(/^\^/g,"\\.").replace(/\$$/g,"\\."),r=f.match($);if(r)return r[0].slice(1,-1)}},"getResolvedSigningRegion"),Ea=Ef((f,{useFipsEndpoint:h=!1,useDualstackEndpoint:w=!1,signingService:s,regionHash:$,partitionHash:r})=>{let E=$a(f,{partitionHash:r}),U=f in $?f:r[E]?.endpoint??f,T={useFipsEndpoint:h,useDualstackEndpoint:w},F=IM($[U]?.variants,T),C=IM(r[E]?.variants,T),I=sa(U,{regionHostname:F,partitionHostname:C});if(I===void 0)throw new Error(`Endpoint resolution failed for: ${{resolvedRegion:U,useFipsEndpoint:h,useDualstackEndpoint:w}}`);let L=ra(I,{signingRegion:$[U]?.signingRegion,regionRegex:r[E].regionRegex,useFipsEndpoint:h});return{partition:E,signingService:s,hostname:I,...L&&{signingRegion:L},...$[U]?.signingService&&{signingService:$[U].signingService}}},"getRegionInfo")});var KF=H((TG0,ZM)=>{var{defineProperty:nE,getOwnPropertyDescriptor:Ua,getOwnPropertyNames:Ta}=Object,Fa=Object.prototype.hasOwnProperty,MM=(f,h)=>nE(f,"name",{value:h,configurable:!0}),Ca=(f,h)=>{for(var w in h)nE(f,w,{get:h[w],enumerable:!0})},Ia=(f,h,w,s)=>{if(h&&typeof h==="object"||typeof h==="function"){for(let $ of Ta(h))if(!Fa.call(f,$)&&$!==w)nE(f,$,{get:()=>h[$],enumerable:!(s=Ua(h,$))||s.enumerable})}return f},La=(f)=>Ia(nE({},"__esModule",{value:!0}),f),QM={};Ca(QM,{contentLengthMiddleware:()=>QF,contentLengthMiddlewareOptions:()=>KM,getContentLengthPlugin:()=>Aa});ZM.exports=La(QM);var Ba=t0(),YM="content-length";function QF(f){return(h)=>async(w)=>{let s=w.request;if(Ba.HttpRequest.isInstance(s)){let{body:$,headers:r}=s;if($&&Object.keys(r).map((E)=>E.toLowerCase()).indexOf(YM)===-1)try{let E=f($);s.headers={...s.headers,[YM]:String(E)}}catch(E){}}return h({...w,request:s})}}MM(QF,"contentLengthMiddleware");var KM={step:"build",tags:["SET_CONTENT_LENGTH","CONTENT_LENGTH"],name:"contentLengthMiddleware",override:!0},Aa=MM((f)=>({applyToStack:(h)=>{h.add(QF(f.bodyLengthChecker),KM)}}),"getContentLengthPlugin")});var Ss=H((JM)=>{Object.defineProperty(JM,"__esModule",{value:!0});JM.getHomeDir=void 0;var Ga=B0("os"),Wa=B0("path"),ZF={},za=()=>{if(process&&process.geteuid)return`${process.geteuid()}`;return"DEFAULT"},Ra=()=>{let{HOME:f,USERPROFILE:h,HOMEPATH:w,HOMEDRIVE:s=`C:${Wa.sep}`}=process.env;if(f)return f;if(h)return h;if(w)return`${s}${w}`;let $=za();if(!ZF[$])ZF[$]=Ga.homedir();return ZF[$]};JM.getHomeDir=Ra});var JF=H((PM)=>{Object.defineProperty(PM,"__esModule",{value:!0});PM.getSSOTokenFilepath=void 0;var Xa=B0("crypto"),Sa=B0("path"),Ya=Ss(),Ma=(f)=>{let w=Xa.createHash("sha1").update(f).digest("hex");return Sa.join(Ya.getHomeDir(),".aws","sso","cache",`${w}.json`)};PM.getSSOTokenFilepath=Ma});var qM=H((NM)=>{Object.defineProperty(NM,"__esModule",{value:!0});NM.getSSOTokenFromFile=void 0;var Qa=B0("fs"),Ka=JF(),{readFile:Za}=Qa.promises,Ja=async(f)=>{let h=Ka.getSSOTokenFilepath(f),w=await Za(h,"utf8");return JSON.parse(w)};NM.getSSOTokenFromFile=Ja});var PF=H((kM)=>{Object.defineProperty(kM,"__esModule",{value:!0});kM.slurpFile=void 0;var Va=B0("fs"),{readFile:Pa}=Va.promises,VF={},Ha=(f,h)=>{if(!VF[f]||(h===null||h===void 0?void 0:h.ignoreCache))VF[f]=Pa(f,"utf8");return VF[f]};kM.slurpFile=Ha});var qF=H((BG0,rr)=>{var{defineProperty:oE,getOwnPropertyDescriptor:Na,getOwnPropertyNames:Da}=Object,qa=Object.prototype.hasOwnProperty,v1=(f,h)=>oE(f,"name",{value:h,configurable:!0}),ka=(f,h)=>{for(var w in h)oE(f,w,{get:h[w],enumerable:!0})},HF=(f,h,w,s)=>{if(h&&typeof h==="object"||typeof h==="function"){for(let $ of Da(h))if(!qa.call(f,$)&&$!==w)oE(f,$,{get:()=>h[$],enumerable:!(s=Na(h,$))||s.enumerable})}return f},DF=(f,h,w)=>(HF(f,h,"default"),w&&HF(w,h,"default")),ya=(f)=>HF(oE({},"__esModule",{value:!0}),f),$r={};ka($r,{CONFIG_PREFIX_SEPARATOR:()=>Uw,DEFAULT_PROFILE:()=>vM,ENV_PROFILE:()=>lM,getProfileName:()=>ja,loadSharedConfigFiles:()=>mM,loadSsoSessionData:()=>ea,parseKnownFiles:()=>oa});rr.exports=ya($r);DF($r,Ss(),rr.exports);var lM="AWS_PROFILE",vM="default",ja=v1((f)=>f.profile||process.env[lM]||vM,"getProfileName");DF($r,JF(),rr.exports);DF($r,qM(),rr.exports);var eE=T1(),Oa=v1((f)=>Object.entries(f).filter(([h])=>{let w=h.indexOf(Uw);if(w===-1)return!1;return Object.values(eE.IniSectionType).includes(h.substring(0,w))}).reduce((h,[w,s])=>{let $=w.indexOf(Uw),r=w.substring(0,$)===eE.IniSectionType.PROFILE?w.substring($+1):w;return h[r]=s,h},{...f.default&&{default:f.default}}),"getConfigData"),aE=B0("path"),la=Ss(),va="AWS_CONFIG_FILE",bM=v1(()=>process.env[va]||aE.join(la.getHomeDir(),".aws","config"),"getConfigFilepath"),ba=Ss(),ma="AWS_SHARED_CREDENTIALS_FILE",da=v1(()=>process.env[ma]||aE.join(ba.getHomeDir(),".aws","credentials"),"getCredentialsFilepath"),ia=Ss(),ca=/^([\w-]+)\s(["'])?([\w-@\+\.%:/]+)\2$/,ga=["__proto__","profile __proto__"],NF=v1((f)=>{let h={},w,s;for(let $ of f.split(/\r?\n/)){let r=$.split(/(^|\s)[;#]/)[0].trim();if(r[0]==="["&&r[r.length-1]==="]"){w=void 0,s=void 0;let U=r.substring(1,r.length-1),T=ca.exec(U);if(T){let[,F,,C]=T;if(Object.values(eE.IniSectionType).includes(F))w=[F,C].join(Uw)}else w=U;if(ga.includes(U))throw new Error(`Found invalid profile name "${U}"`)}else if(w){let U=r.indexOf("=");if(![0,-1].includes(U)){let[T,F]=[r.substring(0,U).trim(),r.substring(U+1).trim()];if(F==="")s=T;else{if(s&&$.trimStart()===$)s=void 0;h[w]=h[w]||{};let C=s?[s,T].join(Uw):T;h[w][C]=F}}}}return h},"parseIni"),jM=PF(),OM=v1(()=>({}),"swallowError"),Uw=".",mM=v1(async(f={})=>{let{filepath:h=da(),configFilepath:w=bM()}=f,s=ia.getHomeDir(),$="~/",r=h;if(h.startsWith("~/"))r=aE.join(s,h.slice(2));let E=w;if(w.startsWith("~/"))E=aE.join(s,w.slice(2));let U=await Promise.all([jM.slurpFile(E,{ignoreCache:f.ignoreCache}).then(NF).then(Oa).catch(OM),jM.slurpFile(r,{ignoreCache:f.ignoreCache}).then(NF).catch(OM)]);return{configFile:U[0],credentialsFile:U[1]}},"loadSharedConfigFiles"),xa=v1((f)=>Object.entries(f).filter(([h])=>h.startsWith(eE.IniSectionType.SSO_SESSION+Uw)).reduce((h,[w,s])=>({...h,[w.substring(w.indexOf(Uw)+1)]:s}),{}),"getSsoSessionData"),_a=PF(),na=v1(()=>({}),"swallowError"),ea=v1(async(f={})=>_a.slurpFile(f.configFilepath??bM()).then(NF).then(xa).catch(na),"loadSsoSessionData"),aa=v1((...f)=>{let h={};for(let w of f)for(let[s,$]of Object.entries(w))if(h[s]!==void 0)Object.assign(h[s],$);else h[s]=$;return h},"mergeConfigFiles"),oa=v1(async(f)=>{let h=await mM(f);return aa(h.configFile,h.credentialsFile)},"parseKnownFiles")});var Ms=H((AG0,cM)=>{var{defineProperty:pE,getOwnPropertyDescriptor:pa,getOwnPropertyNames:ua}=Object,ta=Object.prototype.hasOwnProperty,Ys=(f,h)=>pE(f,"name",{value:h,configurable:!0}),fo=(f,h)=>{for(var w in h)pE(f,w,{get:h[w],enumerable:!0})},ho=(f,h,w,s)=>{if(h&&typeof h==="object"||typeof h==="function"){for(let $ of ua(h))if(!ta.call(f,$)&&$!==w)pE(f,$,{get:()=>h[$],enumerable:!(s=pa(h,$))||s.enumerable})}return f},wo=(f)=>ho(pE({},"__esModule",{value:!0}),f),iM={};fo(iM,{loadConfig:()=>Uo});cM.exports=wo(iM);var Er=D$();function kF(f){try{let h=new Set(Array.from(f.match(/([A-Z_]){3,}/g)??[]));return h.delete("CONFIG"),h.delete("CONFIG_PREFIX_SEPARATOR"),h.delete("ENV"),[...h].join(", ")}catch(h){return f}}Ys(kF,"getSelectorName");var so=Ys((f,h)=>async()=>{try{let w=f(process.env);if(w===void 0)throw new Error;return w}catch(w){throw new Er.CredentialsProviderError(w.message||`Not found in ENV: ${kF(f.toString())}`,{logger:h})}},"fromEnv"),dM=qF(),$o=Ys((f,{preferredFile:h="config",...w}={})=>async()=>{let s=dM.getProfileName(w),{configFile:$,credentialsFile:r}=await dM.loadSharedConfigFiles(w),E=r[s]||{},U=$[s]||{},T=h==="config"?{...E,...U}:{...U,...E};try{let C=f(T,h==="config"?$:r);if(C===void 0)throw new Error;return C}catch(F){throw new Er.CredentialsProviderError(F.message||`Not found in config files w/ profile [${s}]: ${kF(f.toString())}`,{logger:w.logger})}},"fromSharedConfigFiles"),ro=Ys((f)=>typeof f==="function","isFunction"),Eo=Ys((f)=>ro(f)?async()=>await f():Er.fromStatic(f),"fromStatic"),Uo=Ys(({environmentVariableSelector:f,configFileSelector:h,default:w},s={})=>Er.memoize(Er.chain(so(f),$o(h,s),Eo(w))),"loadConfig")});var aM=H((nM)=>{Object.defineProperty(nM,"__esModule",{value:!0});nM.getEndpointUrlConfig=void 0;var gM=qF(),xM="AWS_ENDPOINT_URL",_M="endpoint_url",To=(f)=>({environmentVariableSelector:(h)=>{let w=f.split(" ").map((r)=>r.toUpperCase()),s=h[[xM,...w].join("_")];if(s)return s;let $=h[xM];if($)return $;return},configFileSelector:(h,w)=>{if(w&&h.services){let $=w[["services",h.services].join(gM.CONFIG_PREFIX_SEPARATOR)];if($){let r=f.split(" ").map((U)=>U.toLowerCase()),E=$[[r.join("_"),_M].join(gM.CONFIG_PREFIX_SEPARATOR)];if(E)return E}}let s=h[_M];if(s)return s;return},default:void 0});nM.getEndpointUrlConfig=To});var yF=H((oM)=>{Object.defineProperty(oM,"__esModule",{value:!0});oM.getEndpointFromConfig=void 0;var Fo=Ms(),Co=aM(),Io=async(f)=>Fo.loadConfig(Co.getEndpointUrlConfig(f!==null&&f!==void 0?f:""))();oM.getEndpointFromConfig=Io});var hQ=H((zG0,fQ)=>{var{defineProperty:uE,getOwnPropertyDescriptor:Lo,getOwnPropertyNames:Bo}=Object,Ao=Object.prototype.hasOwnProperty,Go=(f,h)=>uE(f,"name",{value:h,configurable:!0}),Wo=(f,h)=>{for(var w in h)uE(f,w,{get:h[w],enumerable:!0})},zo=(f,h,w,s)=>{if(h&&typeof h==="object"||typeof h==="function"){for(let $ of Bo(h))if(!Ao.call(f,$)&&$!==w)uE(f,$,{get:()=>h[$],enumerable:!(s=Lo(h,$))||s.enumerable})}return f},Ro=(f)=>zo(uE({},"__esModule",{value:!0}),f),uM={};Wo(uM,{parseQueryString:()=>tM});fQ.exports=Ro(uM);function tM(f){let h={};if(f=f.replace(/^\?/,""),f)for(let w of f.split("&")){let[s,$=null]=w.split("=");if(s=decodeURIComponent(s),$)$=decodeURIComponent($);if(!(s in h))h[s]=$;else if(Array.isArray(h[s]))h[s].push($);else h[s]=[h[s],$]}return h}Go(tM,"parseQueryString")});var Ur=H((RG0,$Q)=>{var{defineProperty:tE,getOwnPropertyDescriptor:Xo,getOwnPropertyNames:So}=Object,Yo=Object.prototype.hasOwnProperty,Mo=(f,h)=>tE(f,"name",{value:h,configurable:!0}),Qo=(f,h)=>{for(var w in h)tE(f,w,{get:h[w],enumerable:!0})},Ko=(f,h,w,s)=>{if(h&&typeof h==="object"||typeof h==="function"){for(let $ of So(h))if(!Yo.call(f,$)&&$!==w)tE(f,$,{get:()=>h[$],enumerable:!(s=Xo(h,$))||s.enumerable})}return f},Zo=(f)=>Ko(tE({},"__esModule",{value:!0}),f),wQ={};Qo(wQ,{parseUrl:()=>sQ});$Q.exports=Zo(wQ);var Jo=hQ(),sQ=Mo((f)=>{if(typeof f==="string")return sQ(new URL(f));let{hostname:h,pathname:w,port:s,protocol:$,search:r}=f,E;if(r)E=Jo.parseQueryString(r);return{hostname:h,port:s?parseInt(s):void 0,protocol:$,path:w,query:E}},"parseUrl")});var Qs=H((XG0,IQ)=>{var{defineProperty:hU,getOwnPropertyDescriptor:Vo,getOwnPropertyNames:Po}=Object,Ho=Object.prototype.hasOwnProperty,Uf=(f,h)=>hU(f,"name",{value:h,configurable:!0}),No=(f,h)=>{for(var w in h)hU(f,w,{get:h[w],enumerable:!0})},Do=(f,h,w,s)=>{if(h&&typeof h==="object"||typeof h==="function"){for(let $ of Po(h))if(!Ho.call(f,$)&&$!==w)hU(f,$,{get:()=>h[$],enumerable:!(s=Vo(h,$))||s.enumerable})}return f},qo=(f)=>Do(hU({},"__esModule",{value:!0}),f),EQ={};No(EQ,{endpointMiddleware:()=>FQ,endpointMiddlewareOptions:()=>CQ,getEndpointFromInstructions:()=>UQ,getEndpointPlugin:()=>go,resolveEndpointConfig:()=>_o,resolveParams:()=>TQ,toEndpointV1:()=>jF});IQ.exports=qo(EQ);var ko=Uf(async(f)=>{let h=f?.Bucket||"";if(typeof f.Bucket==="string")f.Bucket=h.replace(/#/g,encodeURIComponent("#")).replace(/\?/g,encodeURIComponent("?"));if(vo(h)){if(f.ForcePathStyle===!0)throw new Error("Path-style addressing cannot be used with ARN buckets")}else if(!lo(h)||h.indexOf(".")!==-1&&!String(f.Endpoint).startsWith("http:")||h.toLowerCase()!==h||h.length<3)f.ForcePathStyle=!0;if(f.DisableMultiRegionAccessPoints)f.disableMultiRegionAccessPoints=!0,f.DisableMRAP=!0;return f},"resolveParamsForS3"),yo=/^[a-z0-9][a-z0-9\.\-]{1,61}[a-z0-9]$/,jo=/(\d+\.){3}\d+/,Oo=/\.\./,lo=Uf((f)=>yo.test(f)&&!jo.test(f)&&!Oo.test(f),"isDnsCompatibleBucketName"),vo=Uf((f)=>{let[h,w,s,,,$]=f.split(":"),r=h==="arn"&&f.split(":").length>=6,E=Boolean(r&&w&&s&&$);if(r&&!E)throw new Error(`Invalid ARN: ${f} was an invalid ARN.`);return E},"isArnBucketName"),bo=Uf((f,h,w)=>{let s=Uf(async()=>{let $=w[f]??w[h];if(typeof $==="function")return $();return $},"configProvider");if(f==="credentialScope"||h==="CredentialScope")return async()=>{let $=typeof w.credentials==="function"?await w.credentials():w.credentials;return $?.credentialScope??$?.CredentialScope};if(f==="accountId"||h==="AccountId")return async()=>{let $=typeof w.credentials==="function"?await w.credentials():w.credentials;return $?.accountId??$?.AccountId};if(f==="endpoint"||h==="endpoint")return async()=>{let $=await s();if($&&typeof $==="object"){if("url"in $)return $.url.href;if("hostname"in $){let{protocol:r,hostname:E,port:U,path:T}=$;return`${r}//${E}${U?":"+U:""}${T}`}}return $};return s},"createConfigValueProvider"),mo=yF(),rQ=Ur(),jF=Uf((f)=>{if(typeof f==="object"){if("url"in f)return rQ.parseUrl(f.url);return f}return rQ.parseUrl(f)},"toEndpointV1"),UQ=Uf(async(f,h,w,s)=>{if(!w.endpoint){let E;if(w.serviceConfiguredEndpoint)E=await w.serviceConfiguredEndpoint();else E=await mo.getEndpointFromConfig(w.serviceId);if(E)w.endpoint=()=>Promise.resolve(jF(E))}let $=await TQ(f,h,w);if(typeof w.endpointProvider!=="function")throw new Error("config.endpointProvider is not set.");return w.endpointProvider($,s)},"getEndpointFromInstructions"),TQ=Uf(async(f,h,w)=>{let s={},$=h?.getEndpointParameterInstructions?.()||{};for(let[r,E]of Object.entries($))switch(E.type){case"staticContextParams":s[r]=E.value;break;case"contextParams":s[r]=f[E.name];break;case"clientContextParams":case"builtInParams":s[r]=await bo(E.name,r,w)();break;case"operationContextParams":s[r]=E.get(f);break;default:throw new Error("Unrecognized endpoint parameter instruction: "+JSON.stringify(E))}if(Object.keys($).length===0)Object.assign(s,w);if(String(w.serviceId).toLowerCase()==="s3")await ko(s);return s},"resolveParams"),io=m0(),fU=Fh(),FQ=Uf(({config:f,instructions:h})=>{return(w,s)=>async($)=>{if(f.endpoint)io.setFeature(s,"ENDPOINT_OVERRIDE","N");let r=await UQ($.input,{getEndpointParameterInstructions(){return h}},{...f},s);s.endpointV2=r,s.authSchemes=r.properties?.authSchemes;let E=s.authSchemes?.[0];if(E){s.signing_region=E.signingRegion,s.signing_service=E.signingName;let T=fU.getSmithyContext(s)?.selectedHttpAuthScheme?.httpAuthOption;if(T)T.signingProperties=Object.assign(T.signingProperties||{},{signing_region:E.signingRegion,signingRegion:E.signingRegion,signing_service:E.signingName,signingName:E.signingName,signingRegionSet:E.signingRegionSet},E.properties)}return w({...$})}},"endpointMiddleware"),co=Dw(),CQ={step:"serialize",tags:["ENDPOINT_PARAMETERS","ENDPOINT_V2","ENDPOINT"],name:"endpointV2Middleware",override:!0,relation:"before",toMiddleware:co.serializerMiddlewareOption.name},go=Uf((f,h)=>({applyToStack:(w)=>{w.addRelativeTo(FQ({config:f,instructions:h}),CQ)}}),"getEndpointPlugin"),xo=yF(),_o=Uf((f)=>{let h=f.tls??!0,{endpoint:w}=f,s=w!=null?async()=>jF(await fU.normalizeProvider(w)()):void 0,r={...f,endpoint:s,tls:h,isCustomEndpoint:!!w,useDualstackEndpoint:fU.normalizeProvider(f.useDualstackEndpoint??!1),useFipsEndpoint:fU.normalizeProvider(f.useFipsEndpoint??!1)},E=void 0;return r.serviceConfiguredEndpoint=async()=>{if(f.serviceId&&!E)E=xo.getEndpointFromConfig(f.serviceId);return E},r},"resolveEndpointConfig")});var lF=H((SG0,AQ)=>{var{defineProperty:wU,getOwnPropertyDescriptor:no,getOwnPropertyNames:eo}=Object,ao=Object.prototype.hasOwnProperty,Ks=(f,h)=>wU(f,"name",{value:h,configurable:!0}),oo=(f,h)=>{for(var w in h)wU(f,w,{get:h[w],enumerable:!0})},po=(f,h,w,s)=>{if(h&&typeof h==="object"||typeof h==="function"){for(let $ of eo(h))if(!ao.call(f,$)&&$!==w)wU(f,$,{get:()=>h[$],enumerable:!(s=no(h,$))||s.enumerable})}return f},uo=(f)=>po(wU({},"__esModule",{value:!0}),f),LQ={};oo(LQ,{isClockSkewCorrectedError:()=>BQ,isClockSkewError:()=>rp,isRetryableByTrait:()=>$p,isServerError:()=>Up,isThrottlingError:()=>Ep,isTransientError:()=>OF});AQ.exports=uo(LQ);var to=["AuthFailure","InvalidSignatureException","RequestExpired","RequestInTheFuture","RequestTimeTooSkewed","SignatureDoesNotMatch"],fp=["BandwidthLimitExceeded","EC2ThrottledException","LimitExceededException","PriorRequestNotComplete","ProvisionedThroughputExceededException","RequestLimitExceeded","RequestThrottled","RequestThrottledException","SlowDown","ThrottledException","Throttling","ThrottlingException","TooManyRequestsException","TransactionInProgressException"],hp=["TimeoutError","RequestTimeout","RequestTimeoutException"],wp=[500,502,503,504],sp=["ECONNRESET","ECONNREFUSED","EPIPE","ETIMEDOUT"],$p=Ks((f)=>f.$retryable!==void 0,"isRetryableByTrait"),rp=Ks((f)=>to.includes(f.name),"isClockSkewError"),BQ=Ks((f)=>f.$metadata?.clockSkewCorrected,"isClockSkewCorrectedError"),Ep=Ks((f)=>f.$metadata?.httpStatusCode===429||fp.includes(f.name)||f.$retryable?.throttling==!0,"isThrottlingError"),OF=Ks((f,h=0)=>BQ(f)||hp.includes(f.name)||sp.includes(f?.code||"")||wp.includes(f.$metadata?.httpStatusCode||0)||f.cause!==void 0&&h<=10&&OF(f.cause,h+1),"isTransientError"),Up=Ks((f)=>{if(f.$metadata?.httpStatusCode!==void 0){let h=f.$metadata.httpStatusCode;if(500<=h&&h<=599&&!OF(f))return!0;return!1}return!1},"isServerError")});var $U=H((YG0,QQ)=>{var{defineProperty:sU,getOwnPropertyDescriptor:Tp,getOwnPropertyNames:Fp}=Object,Cp=Object.prototype.hasOwnProperty,Tf=(f,h)=>sU(f,"name",{value:h,configurable:!0}),Ip=(f,h)=>{for(var w in h)sU(f,w,{get:h[w],enumerable:!0})},Lp=(f,h,w,s)=>{if(h&&typeof h==="object"||typeof h==="function"){for(let $ of Fp(h))if(!Cp.call(f,$)&&$!==w)sU(f,$,{get:()=>h[$],enumerable:!(s=Tp(h,$))||s.enumerable})}return f},Bp=(f)=>Lp(sU({},"__esModule",{value:!0}),f),WQ={};Ip(WQ,{AdaptiveRetryStrategy:()=>Xp,ConfiguredRetryStrategy:()=>Sp,DEFAULT_MAX_ATTEMPTS:()=>vF,DEFAULT_RETRY_DELAY_BASE:()=>Tr,DEFAULT_RETRY_MODE:()=>Ap,DefaultRateLimiter:()=>RQ,INITIAL_RETRY_TOKENS:()=>bF,INVOCATION_ID_HEADER:()=>Wp,MAXIMUM_RETRY_DELAY:()=>mF,NO_RETRY_INCREMENT:()=>MQ,REQUEST_HEADER:()=>zp,RETRY_COST:()=>SQ,RETRY_MODES:()=>zQ,StandardRetryStrategy:()=>dF,THROTTLING_RETRY_DELAY_BASE:()=>XQ,TIMEOUT_RETRY_COST:()=>YQ});QQ.exports=Bp(WQ);var zQ=((f)=>{return f.STANDARD="standard",f.ADAPTIVE="adaptive",f})(zQ||{}),vF=3,Ap="standard",Gp=lF(),RQ=class f{constructor(h){this.currentCapacity=0,this.enabled=!1,this.lastMaxRate=0,this.measuredTxRate=0,this.requestCount=0,this.lastTimestamp=0,this.timeWindow=0,this.beta=h?.beta??0.7,this.minCapacity=h?.minCapacity??1,this.minFillRate=h?.minFillRate??0.5,this.scaleConstant=h?.scaleConstant??0.4,this.smooth=h?.smooth??0.8;let w=this.getCurrentTimeInSeconds();this.lastThrottleTime=w,this.lastTxRateBucket=Math.floor(this.getCurrentTimeInSeconds()),this.fillRate=this.minFillRate,this.maxCapacity=this.minCapacity}static{Tf(this,"DefaultRateLimiter")}static{this.setTimeoutFn=setTimeout}getCurrentTimeInSeconds(){return Date.now()/1000}async getSendToken(){return this.acquireTokenBucket(1)}async acquireTokenBucket(h){if(!this.enabled)return;if(this.refillTokenBucket(),h>this.currentCapacity){let w=(h-this.currentCapacity)/this.fillRate*1000;await new Promise((s)=>f.setTimeoutFn(s,w))}this.currentCapacity=this.currentCapacity-h}refillTokenBucket(){let h=this.getCurrentTimeInSeconds();if(!this.lastTimestamp){this.lastTimestamp=h;return}let w=(h-this.lastTimestamp)*this.fillRate;this.currentCapacity=Math.min(this.maxCapacity,this.currentCapacity+w),this.lastTimestamp=h}updateClientSendingRate(h){let w;if(this.updateMeasuredRate(),Gp.isThrottlingError(h)){let $=!this.enabled?this.measuredTxRate:Math.min(this.measuredTxRate,this.fillRate);this.lastMaxRate=$,this.calculateTimeWindow(),this.lastThrottleTime=this.getCurrentTimeInSeconds(),w=this.cubicThrottle($),this.enableTokenBucket()}else this.calculateTimeWindow(),w=this.cubicSuccess(this.getCurrentTimeInSeconds());let s=Math.min(w,2*this.measuredTxRate);this.updateTokenBucketRate(s)}calculateTimeWindow(){this.timeWindow=this.getPrecise(Math.pow(this.lastMaxRate*(1-this.beta)/this.scaleConstant,0.3333333333333333))}cubicThrottle(h){return this.getPrecise(h*this.beta)}cubicSuccess(h){return this.getPrecise(this.scaleConstant*Math.pow(h-this.lastThrottleTime-this.timeWindow,3)+this.lastMaxRate)}enableTokenBucket(){this.enabled=!0}updateTokenBucketRate(h){this.refillTokenBucket(),this.fillRate=Math.max(h,this.minFillRate),this.maxCapacity=Math.max(h,this.minCapacity),this.currentCapacity=Math.min(this.currentCapacity,this.maxCapacity)}updateMeasuredRate(){let h=this.getCurrentTimeInSeconds(),w=Math.floor(h*2)/2;if(this.requestCount++,w>this.lastTxRateBucket){let s=this.requestCount/(w-this.lastTxRateBucket);this.measuredTxRate=this.getPrecise(s*this.smooth+this.measuredTxRate*(1-this.smooth)),this.requestCount=0,this.lastTxRateBucket=w}}getPrecise(h){return parseFloat(h.toFixed(8))}},Tr=100,mF=20000,XQ=500,bF=500,SQ=5,YQ=10,MQ=1,Wp="amz-sdk-invocation-id",zp="amz-sdk-request",Rp=Tf(()=>{let f=Tr;return{computeNextBackoffDelay:Tf((s)=>{return Math.floor(Math.min(mF,Math.random()*2**s*f))},"computeNextBackoffDelay"),setDelayBase:Tf((s)=>{f=s},"setDelayBase")}},"getDefaultRetryBackoffStrategy"),GQ=Tf(({retryDelay:f,retryCount:h,retryCost:w})=>{return{getRetryCount:Tf(()=>h,"getRetryCount"),getRetryDelay:Tf(()=>Math.min(mF,f),"getRetryDelay"),getRetryCost:Tf(()=>w,"getRetryCost")}},"createDefaultRetryToken"),dF=class{constructor(f){this.maxAttempts=f,this.mode="standard",this.capacity=bF,this.retryBackoffStrategy=Rp(),this.maxAttemptsProvider=typeof f==="function"?f:async()=>f}static{Tf(this,"StandardRetryStrategy")}async acquireInitialRetryToken(f){return GQ({retryDelay:Tr,retryCount:0})}async refreshRetryTokenForRetry(f,h){let w=await this.getMaxAttempts();if(this.shouldRetry(f,h,w)){let s=h.errorType;this.retryBackoffStrategy.setDelayBase(s==="THROTTLING"?XQ:Tr);let $=this.retryBackoffStrategy.computeNextBackoffDelay(f.getRetryCount()),r=h.retryAfterHint?Math.max(h.retryAfterHint.getTime()-Date.now()||0,$):$,E=this.getCapacityCost(s);return this.capacity-=E,GQ({retryDelay:r,retryCount:f.getRetryCount()+1,retryCost:E})}throw new Error("No retry token available")}recordSuccess(f){this.capacity=Math.max(bF,this.capacity+(f.getRetryCost()??MQ))}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 ${vF}`),vF}}shouldRetry(f,h,w){return f.getRetryCount()+1<w&&this.capacity>=this.getCapacityCost(h.errorType)&&this.isRetryableError(h.errorType)}getCapacityCost(f){return f==="TRANSIENT"?YQ:SQ}isRetryableError(f){return f==="THROTTLING"||f==="TRANSIENT"}},Xp=class{constructor(f,h){this.maxAttemptsProvider=f,this.mode="adaptive";let{rateLimiter:w}=h??{};this.rateLimiter=w??new RQ,this.standardRetryStrategy=new dF(f)}static{Tf(this,"AdaptiveRetryStrategy")}async acquireInitialRetryToken(f){return await this.rateLimiter.getSendToken(),this.standardRetryStrategy.acquireInitialRetryToken(f)}async refreshRetryTokenForRetry(f,h){return this.rateLimiter.updateClientSendingRate(h),this.standardRetryStrategy.refreshRetryTokenForRetry(f,h)}recordSuccess(f){this.rateLimiter.updateClientSendingRate({}),this.standardRetryStrategy.recordSuccess(f)}},Sp=class extends dF{static{Tf(this,"ConfiguredRetryStrategy")}constructor(f,h=Tr){super(typeof f==="function"?f:async()=>f);if(typeof h==="number")this.computeNextBackoffDelay=()=>h;else this.computeNextBackoffDelay=h}async refreshRetryTokenForRetry(f,h){let w=await super.refreshRetryTokenForRetry(f,h);return w.getRetryDelay=()=>this.computeNextBackoffDelay(w.getRetryCount()),w}}});var JQ=H((KQ)=>{Object.defineProperty(KQ,"__esModule",{value:!0});KQ.isStreamingPayload=void 0;var Yp=B0("stream"),Mp=(f)=>(f===null||f===void 0?void 0:f.body)instanceof Yp.Readable||typeof ReadableStream!=="undefined"&&(f===null||f===void 0?void 0:f.body)instanceof ReadableStream;KQ.isStreamingPayload=Mp});var Fr=H((JG0,dQ)=>{var{defineProperty:rU,getOwnPropertyDescriptor:Qp,getOwnPropertyNames:Kp}=Object,Zp=Object.prototype.hasOwnProperty,x0=(f,h)=>rU(f,"name",{value:h,configurable:!0}),Jp=(f,h)=>{for(var w in h)rU(f,w,{get:h[w],enumerable:!0})},Vp=(f,h,w,s)=>{if(h&&typeof h==="object"||typeof h==="function"){for(let $ of Kp(h))if(!Zp.call(f,$)&&$!==w)rU(f,$,{get:()=>h[$],enumerable:!(s=Qp(h,$))||s.enumerable})}return f},Pp=(f)=>Vp(rU({},"__esModule",{value:!0}),f),PQ={};Jp(PQ,{AdaptiveRetryStrategy:()=>Dp,CONFIG_MAX_ATTEMPTS:()=>cF,CONFIG_RETRY_MODE:()=>jQ,ENV_MAX_ATTEMPTS:()=>iF,ENV_RETRY_MODE:()=>yQ,NODE_MAX_ATTEMPT_CONFIG_OPTIONS:()=>qp,NODE_RETRY_MODE_CONFIG_OPTIONS:()=>yp,StandardRetryStrategy:()=>kQ,defaultDelayDecider:()=>NQ,defaultRetryDecider:()=>DQ,getOmitRetryHeadersPlugin:()=>jp,getRetryAfterHint:()=>mQ,getRetryPlugin:()=>dp,omitRetryHeadersMiddleware:()=>OQ,omitRetryHeadersMiddlewareOptions:()=>lQ,resolveRetryConfig:()=>kp,retryMiddleware:()=>vQ,retryMiddlewareOptions:()=>bQ});dQ.exports=Pp(PQ);var Zs=t0(),HQ=D3(),l0=$U(),Hp=x0((f,h)=>{let w=f,s=h?.noRetryIncrement??l0.NO_RETRY_INCREMENT,$=h?.retryCost??l0.RETRY_COST,r=h?.timeoutRetryCost??l0.TIMEOUT_RETRY_COST,E=f,U=x0((I)=>I.name==="TimeoutError"?r:$,"getCapacityAmount"),T=x0((I)=>U(I)<=E,"hasRetryTokens");return Object.freeze({hasRetryTokens:T,retrieveRetryTokens:x0((I)=>{if(!T(I))throw new Error("No retry token available");let L=U(I);return E-=L,L},"retrieveRetryTokens"),releaseRetryTokens:x0((I)=>{E+=I??s,E=Math.min(E,w)},"releaseRetryTokens")})},"getDefaultRetryQuota"),NQ=x0((f,h)=>Math.floor(Math.min(l0.MAXIMUM_RETRY_DELAY,Math.random()*2**h*f)),"defaultDelayDecider"),Dh=lF(),DQ=x0((f)=>{if(!f)return!1;return Dh.isRetryableByTrait(f)||Dh.isClockSkewError(f)||Dh.isThrottlingError(f)||Dh.isTransientError(f)},"defaultRetryDecider"),qQ=x0((f)=>{if(f instanceof Error)return f;if(f instanceof Object)return Object.assign(new Error,f);if(typeof f==="string")return new Error(f);return new Error(`AWS SDK error wrapper for ${f}`)},"asSdkError"),kQ=class{constructor(f,h){this.maxAttemptsProvider=f,this.mode=l0.RETRY_MODES.STANDARD,this.retryDecider=h?.retryDecider??DQ,this.delayDecider=h?.delayDecider??NQ,this.retryQuota=h?.retryQuota??Hp(l0.INITIAL_RETRY_TOKENS)}static{x0(this,"StandardRetryStrategy")}shouldRetry(f,h,w){return h<w&&this.retryDecider(f)&&this.retryQuota.hasRetryTokens(f)}async getMaxAttempts(){let f;try{f=await this.maxAttemptsProvider()}catch(h){f=l0.DEFAULT_MAX_ATTEMPTS}return f}async retry(f,h,w){let s,$=0,r=0,E=await this.getMaxAttempts(),{request:U}=h;if(Zs.HttpRequest.isInstance(U))U.headers[l0.INVOCATION_ID_HEADER]=HQ.v4();while(!0)try{if(Zs.HttpRequest.isInstance(U))U.headers[l0.REQUEST_HEADER]=`attempt=${$+1}; max=${E}`;if(w?.beforeRequest)await w.beforeRequest();let{response:T,output:F}=await f(h);if(w?.afterRequest)w.afterRequest(T);return this.retryQuota.releaseRetryTokens(s),F.$metadata.attempts=$+1,F.$metadata.totalRetryDelay=r,{response:T,output:F}}catch(T){let F=qQ(T);if($++,this.shouldRetry(F,$,E)){s=this.retryQuota.retrieveRetryTokens(F);let C=this.delayDecider(Dh.isThrottlingError(F)?l0.THROTTLING_RETRY_DELAY_BASE:l0.DEFAULT_RETRY_DELAY_BASE,$),I=Np(F.$response),L=Math.max(I||0,C);r+=L,await new Promise((G)=>setTimeout(G,L));continue}if(!F.$metadata)F.$metadata={};throw F.$metadata.attempts=$,F.$metadata.totalRetryDelay=r,F}}},Np=x0((f)=>{if(!Zs.HttpResponse.isInstance(f))return;let h=Object.keys(f.headers).find((r)=>r.toLowerCase()==="retry-after");if(!h)return;let w=f.headers[h],s=Number(w);if(!Number.isNaN(s))return s*1000;return new Date(w).getTime()-Date.now()},"getDelayFromRetryAfterHeader"),Dp=class extends kQ{static{x0(this,"AdaptiveRetryStrategy")}constructor(f,h){let{rateLimiter:w,...s}=h??{};super(f,s);this.rateLimiter=w??new l0.DefaultRateLimiter,this.mode=l0.RETRY_MODES.ADAPTIVE}async retry(f,h){return super.retry(f,h,{beforeRequest:async()=>{return this.rateLimiter.getSendToken()},afterRequest:(w)=>{this.rateLimiter.updateClientSendingRate(w)}})}},VQ=Fh(),iF="AWS_MAX_ATTEMPTS",cF="max_attempts",qp={environmentVariableSelector:(f)=>{let h=f[iF];if(!h)return;let w=parseInt(h);if(Number.isNaN(w))throw new Error(`Environment variable ${iF} mast be a number, got "${h}"`);return w},configFileSelector:(f)=>{let h=f[cF];if(!h)return;let w=parseInt(h);if(Number.isNaN(w))throw new Error(`Shared config file entry ${cF} mast be a number, got "${h}"`);return w},default:l0.DEFAULT_MAX_ATTEMPTS},kp=x0((f)=>{let{retryStrategy:h}=f,w=VQ.normalizeProvider(f.maxAttempts??l0.DEFAULT_MAX_ATTEMPTS);return{...f,maxAttempts:w,retryStrategy:async()=>{if(h)return h;if(await VQ.normalizeProvider(f.retryMode)()===l0.RETRY_MODES.ADAPTIVE)return new l0.AdaptiveRetryStrategy(w);return new l0.StandardRetryStrategy(w)}}},"resolveRetryConfig"),yQ="AWS_RETRY_MODE",jQ="retry_mode",yp={environmentVariableSelector:(f)=>f[yQ],configFileSelector:(f)=>f[jQ],default:l0.DEFAULT_RETRY_MODE},OQ=x0(()=>(f)=>async(h)=>{let{request:w}=h;if(Zs.HttpRequest.isInstance(w))delete w.headers[l0.INVOCATION_ID_HEADER],delete w.headers[l0.REQUEST_HEADER];return f(h)},"omitRetryHeadersMiddleware"),lQ={name:"omitRetryHeadersMiddleware",tags:["RETRY","HEADERS","OMIT_RETRY_HEADERS"],relation:"before",toMiddleware:"awsAuthMiddleware",override:!0},jp=x0((f)=>({applyToStack:(h)=>{h.addRelativeTo(OQ(),lQ)}}),"getOmitRetryHeadersPlugin"),Op=J0(),lp=JQ(),vQ=x0((f)=>(h,w)=>async(s)=>{let $=await f.retryStrategy(),r=await f.maxAttempts();if(vp($)){$=$;let E=await $.acquireInitialRetryToken(w.partition_id),U=new Error,T=0,F=0,{request:C}=s,I=Zs.HttpRequest.isInstance(C);if(I)C.headers[l0.INVOCATION_ID_HEADER]=HQ.v4();while(!0)try{if(I)C.headers[l0.REQUEST_HEADER]=`attempt=${T+1}; max=${r}`;let{response:L,output:G}=await h(s);return $.recordSuccess(E),G.$metadata.attempts=T+1,G.$metadata.totalRetryDelay=F,{response:L,output:G}}catch(L){let G=bp(L);if(U=qQ(L),I&&lp.isStreamingPayload(C))throw(w.logger instanceof Op.NoOpLogger?console:w.logger)?.warn("An error was encountered in a non-retryable streaming request."),U;try{E=await $.refreshRetryTokenForRetry(E,G)}catch(Q){if(!U.$metadata)U.$metadata={};throw U.$metadata.attempts=T+1,U.$metadata.totalRetryDelay=F,U}T=E.getRetryCount();let X=E.getRetryDelay();F+=X,await new Promise((Q)=>setTimeout(Q,X))}}else{if($=$,$?.mode)w.userAgent=[...w.userAgent||[],["cfg/retry-mode",$.mode]];return $.retry(h,s)}},"retryMiddleware"),vp=x0((f)=>typeof f.acquireInitialRetryToken!=="undefined"&&typeof f.refreshRetryTokenForRetry!=="undefined"&&typeof f.recordSuccess!=="undefined","isRetryStrategyV2"),bp=x0((f)=>{let h={error:f,errorType:mp(f)},w=mQ(f.$response);if(w)h.retryAfterHint=w;return h},"getRetryErrorInfo"),mp=x0((f)=>{if(Dh.isThrottlingError(f))return"THROTTLING";if(Dh.isTransientError(f))return"TRANSIENT";if(Dh.isServerError(f))return"SERVER_ERROR";return"CLIENT_ERROR"},"getRetryErrorType"),bQ={name:"retryMiddleware",tags:["RETRY"],step:"finalizeRequest",priority:"high",override:!0},dp=x0((f)=>({applyToStack:(h)=>{h.add(vQ(f),bQ)}}),"getRetryPlugin"),mQ=x0((f)=>{if(!Zs.HttpResponse.isInstance(f))return;let h=Object.keys(f.headers).find((r)=>r.toLowerCase()==="retry-after");if(!h)return;let w=f.headers[h],s=Number(w);if(!Number.isNaN(s))return new Date(s*1000);return new Date(w)},"getRetryAfterHint")});var gF=H((cQ)=>{Object.defineProperty(cQ,"__esModule",{value:!0});cQ.resolveHttpAuthSchemeConfig=cQ.defaultSSOOIDCHttpAuthSchemeProvider=cQ.defaultSSOOIDCHttpAuthSchemeParametersProvider=void 0;var ip=O0(),iQ=Fh(),cp=async(f,h,w)=>{return{operation:iQ.getSmithyContext(h).operation,region:await iQ.normalizeProvider(f.region)()||(()=>{throw new Error("expected `region` to be configured for `aws.auth#sigv4`")})()}};cQ.defaultSSOOIDCHttpAuthSchemeParametersProvider=cp;function gp(f){return{schemeId:"aws.auth#sigv4",signingProperties:{name:"sso-oauth",region:f.region},propertiesExtractor:(h,w)=>({signingProperties:{config:h,context:w}})}}function xp(f){return{schemeId:"smithy.api#noAuth"}}var _p=(f)=>{let h=[];switch(f.operation){case"CreateToken":{h.push(xp(f));break}default:h.push(gp(f))}return h};cQ.defaultSSOOIDCHttpAuthSchemeProvider=_p;var np=(f)=>{return{...ip.resolveAwsSdkSigV4Config(f)}};cQ.resolveHttpAuthSchemeConfig=np});var xF=H((NG0,op)=>{op.exports={name:"@aws-sdk/nested-clients",version:"3.772.0",description:"Nested clients for AWS SDK packages.",main:"./dist-cjs/index.js",module:"./dist-es/index.js",types:"./dist-types/index.d.ts",scripts:{build:"yarn lint && concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'","build:cjs":"node ../../scripts/compilation/inline nested-clients","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",lint:"node ../../scripts/validation/submodules-linter.js --pkg nested-clients",test:"yarn g:vitest run","test:watch":"yarn g:vitest watch"},engines:{node:">=18.0.0"},author:{name:"AWS SDK for JavaScript Team",url:"https://aws.amazon.com/javascript/"},license:"Apache-2.0",dependencies:{"@aws-crypto/sha256-browser":"5.2.0","@aws-crypto/sha256-js":"5.2.0","@aws-sdk/core":"3.758.0","@aws-sdk/middleware-host-header":"3.734.0","@aws-sdk/middleware-logger":"3.734.0","@aws-sdk/middleware-recursion-detection":"3.772.0","@aws-sdk/middleware-user-agent":"3.758.0","@aws-sdk/region-config-resolver":"3.734.0","@aws-sdk/types":"3.734.0","@aws-sdk/util-endpoints":"3.743.0","@aws-sdk/util-user-agent-browser":"3.734.0","@aws-sdk/util-user-agent-node":"3.758.0","@smithy/config-resolver":"^4.0.1","@smithy/core":"^3.1.5","@smithy/fetch-http-handler":"^5.0.1","@smithy/hash-node":"^4.0.1","@smithy/invalid-dependency":"^4.0.1","@smithy/middleware-content-length":"^4.0.1","@smithy/middleware-endpoint":"^4.0.6","@smithy/middleware-retry":"^4.0.7","@smithy/middleware-serde":"^4.0.2","@smithy/middleware-stack":"^4.0.1","@smithy/node-config-provider":"^4.0.1","@smithy/node-http-handler":"^4.0.3","@smithy/protocol-http":"^5.0.1","@smithy/smithy-client":"^4.1.6","@smithy/types":"^4.1.0","@smithy/url-parser":"^4.0.1","@smithy/util-base64":"^4.0.0","@smithy/util-body-length-browser":"^4.0.0","@smithy/util-body-length-node":"^4.0.0","@smithy/util-defaults-mode-browser":"^4.0.7","@smithy/util-defaults-mode-node":"^4.0.7","@smithy/util-endpoints":"^3.0.1","@smithy/util-middleware":"^4.0.1","@smithy/util-retry":"^4.0.1","@smithy/util-utf8":"^4.0.0",tslib:"^2.6.2"},devDependencies:{concurrently:"7.0.0","downlevel-dts":"0.10.1",rimraf:"3.0.2",typescript:"~5.2.2"},typesVersions:{"<4.0":{"dist-types/*":["dist-types/ts3.4/*"]}},files:["./sso-oidc.d.ts","./sso-oidc.js","./sts.d.ts","./sts.js","dist-*/**"],browser:{"./dist-es/submodules/sso-oidc/runtimeConfig":"./dist-es/submodules/sso-oidc/runtimeConfig.browser","./dist-es/submodules/sts/runtimeConfig":"./dist-es/submodules/sts/runtimeConfig.browser"},"react-native":{},homepage:"https://github.com/aws/aws-sdk-js-v3/tree/main/packages/nested-clients",repository:{type:"git",url:"https://github.com/aws/aws-sdk-js-v3.git",directory:"packages/nested-clients"},exports:{"./sso-oidc":{module:"./dist-es/submodules/sso-oidc/index.js",node:"./dist-cjs/submodules/sso-oidc/index.js",import:"./dist-es/submodules/sso-oidc/index.js",require:"./dist-cjs/submodules/sso-oidc/index.js",types:"./dist-types/submodules/sso-oidc/index.d.ts"},"./sts":{module:"./dist-es/submodules/sts/index.js",node:"./dist-cjs/submodules/sts/index.js",import:"./dist-es/submodules/sts/index.js",require:"./dist-cjs/submodules/sts/index.js",types:"./dist-types/submodules/sts/index.d.ts"}}}});var nF=H((DG0,uQ)=>{var{defineProperty:EU,getOwnPropertyDescriptor:pp,getOwnPropertyNames:up}=Object,tp=Object.prototype.hasOwnProperty,_Q=(f,h)=>EU(f,"name",{value:h,configurable:!0}),fu=(f,h)=>{for(var w in h)EU(f,w,{get:h[w],enumerable:!0})},hu=(f,h,w,s)=>{if(h&&typeof h==="object"||typeof h==="function"){for(let $ of up(h))if(!tp.call(f,$)&&$!==w)EU(f,$,{get:()=>h[$],enumerable:!(s=pp(h,$))||s.enumerable})}return f},wu=(f)=>hu(EU({},"__esModule",{value:!0}),f),nQ={};fu(nQ,{NODE_APP_ID_CONFIG_OPTIONS:()=>Uu,UA_APP_ID_ENV_NAME:()=>oQ,UA_APP_ID_INI_NAME:()=>pQ,createDefaultUserAgentProvider:()=>aQ,crtAvailability:()=>eQ,defaultUserAgent:()=>$u});uQ.exports=wu(nQ);var xQ=B0("os"),_F=B0("process"),eQ={isCrtAvailable:!1},su=_Q(()=>{if(eQ.isCrtAvailable)return["md/crt-avail"];return null},"isCrtAvailable"),aQ=_Q(({serviceId:f,clientVersion:h})=>{return async(w)=>{let s=[["aws-sdk-js",h],["ua","2.1"],[`os/${xQ.platform()}`,xQ.release()],["lang/js"],["md/nodejs",`${_F.versions.node}`]],$=su();if($)s.push($);if(f)s.push([`api/${f}`,h]);if(_F.env.AWS_EXECUTION_ENV)s.push([`exec-env/${_F.env.AWS_EXECUTION_ENV}`]);let r=await w?.userAgentAppId?.();return r?[...s,[`app/${r}`]]:[...s]}},"createDefaultUserAgentProvider"),$u=aQ,ru=cE(),oQ="AWS_SDK_UA_APP_ID",pQ="sdk_ua_app_id",Eu="sdk-ua-app-id",Uu={environmentVariableSelector:(f)=>f[oQ],configFileSelector:(f)=>f[pQ]??f[Eu],default:ru.DEFAULT_UA_APP_ID}});var oF=H((qG0,wK)=>{var{defineProperty:UU,getOwnPropertyDescriptor:Tu,getOwnPropertyNames:Fu}=Object,Cu=Object.prototype.hasOwnProperty,fK=(f,h)=>UU(f,"name",{value:h,configurable:!0}),Iu=(f,h)=>{for(var w in h)UU(f,w,{get:h[w],enumerable:!0})},Lu=(f,h,w,s)=>{if(h&&typeof h==="object"||typeof h==="function"){for(let $ of Fu(h))if(!Cu.call(f,$)&&$!==w)UU(f,$,{get:()=>h[$],enumerable:!(s=Tu(h,$))||s.enumerable})}return f},Bu=(f)=>Lu(UU({},"__esModule",{value:!0}),f),hK={};Iu(hK,{Hash:()=>Wu});wK.exports=Bu(hK);var eF=qw(),Au=u1(),Gu=B0("buffer"),tQ=B0("crypto"),Wu=class{static{fK(this,"Hash")}constructor(f,h){this.algorithmIdentifier=f,this.secret=h,this.reset()}update(f,h){this.hash.update(Au.toUint8Array(aF(f,h)))}digest(){return Promise.resolve(this.hash.digest())}reset(){this.hash=this.secret?tQ.createHmac(this.algorithmIdentifier,aF(this.secret)):tQ.createHash(this.algorithmIdentifier)}};function aF(f,h){if(Gu.Buffer.isBuffer(f))return f;if(typeof f==="string")return eF.fromString(f,h);if(ArrayBuffer.isView(f))return eF.fromArrayBuffer(f.buffer,f.byteOffset,f.byteLength);return eF.fromArrayBuffer(f)}fK(aF,"castSourceData")});var pF=H((yG0,rK)=>{var{defineProperty:TU,getOwnPropertyDescriptor:zu,getOwnPropertyNames:Ru}=Object,Xu=Object.prototype.hasOwnProperty,Su=(f,h)=>TU(f,"name",{value:h,configurable:!0}),Yu=(f,h)=>{for(var w in h)TU(f,w,{get:h[w],enumerable:!0})},Mu=(f,h,w,s)=>{if(h&&typeof h==="object"||typeof h==="function"){for(let $ of Ru(h))if(!Xu.call(f,$)&&$!==w)TU(f,$,{get:()=>h[$],enumerable:!(s=zu(h,$))||s.enumerable})}return f},Qu=(f)=>Mu(TU({},"__esModule",{value:!0}),f),$K={};Yu($K,{calculateBodyLength:()=>Ku});rK.exports=Qu($K);var sK=B0("fs"),Ku=Su((f)=>{if(!f)return 0;if(typeof f==="string")return Buffer.byteLength(f);else if(typeof f.byteLength==="number")return f.byteLength;else if(typeof f.size==="number")return f.size;else if(typeof f.start==="number"&&typeof f.end==="number")return f.end+1-f.start;else if(typeof f.path==="string"||Buffer.isBuffer(f.path))return sK.lstatSync(f.path).size;else if(typeof f.fd==="number")return sK.fstatSync(f.fd).size;throw new Error(`Body Length computation failed for ${f}`)},"calculateBodyLength")});var MK=H((SK)=>{Object.defineProperty(SK,"__esModule",{value:!0});SK.ruleSet=void 0;var WK="required",m1="fn",d1="argv",Ps="ref",EK=!0,UK="isSet",Cr="booleanEquals",Js="error",Vs="endpoint",ef="tree",uF="PartitionResult",tF="getAttr",TK={[WK]:!1,type:"String"},FK={[WK]:!0,default:!1,type:"Boolean"},CK={[Ps]:"Endpoint"},zK={[m1]:Cr,[d1]:[{[Ps]:"UseFIPS"},!0]},RK={[m1]:Cr,[d1]:[{[Ps]:"UseDualStack"},!0]},b1={},IK={[m1]:tF,[d1]:[{[Ps]:uF},"supportsFIPS"]},XK={[Ps]:uF},LK={[m1]:Cr,[d1]:[!0,{[m1]:tF,[d1]:[XK,"supportsDualStack"]}]},BK=[zK],AK=[RK],GK=[{[Ps]:"Region"}],Zu={version:"1.0",parameters:{Region:TK,UseDualStack:FK,UseFIPS:FK,Endpoint:TK},rules:[{conditions:[{[m1]:UK,[d1]:[CK]}],rules:[{conditions:BK,error:"Invalid Configuration: FIPS and custom endpoint are not supported",type:Js},{conditions:AK,error:"Invalid Configuration: Dualstack and custom endpoint are not supported",type:Js},{endpoint:{url:CK,properties:b1,headers:b1},type:Vs}],type:ef},{conditions:[{[m1]:UK,[d1]:GK}],rules:[{conditions:[{[m1]:"aws.partition",[d1]:GK,assign:uF}],rules:[{conditions:[zK,RK],rules:[{conditions:[{[m1]:Cr,[d1]:[EK,IK]},LK],rules:[{endpoint:{url:"https://oidc-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:b1,headers:b1},type:Vs}],type:ef},{error:"FIPS and DualStack are enabled, but this partition does not support one or both",type:Js}],type:ef},{conditions:BK,rules:[{conditions:[{[m1]:Cr,[d1]:[IK,EK]}],rules:[{conditions:[{[m1]:"stringEquals",[d1]:[{[m1]:tF,[d1]:[XK,"name"]},"aws-us-gov"]}],endpoint:{url:"https://oidc.{Region}.amazonaws.com",properties:b1,headers:b1},type:Vs},{endpoint:{url:"https://oidc-fips.{Region}.{PartitionResult#dnsSuffix}",properties:b1,headers:b1},type:Vs}],type:ef},{error:"FIPS is enabled but this partition does not support FIPS",type:Js}],type:ef},{conditions:AK,rules:[{conditions:[LK],rules:[{endpoint:{url:"https://oidc.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:b1,headers:b1},type:Vs}],type:ef},{error:"DualStack is enabled but this partition does not support DualStack",type:Js}],type:ef},{endpoint:{url:"https://oidc.{Region}.{PartitionResult#dnsSuffix}",properties:b1,headers:b1},type:Vs}],type:ef}],type:ef},{error:"Invalid Configuration: Missing Region",type:Js}]};SK.ruleSet=Zu});var ZK=H((QK)=>{Object.defineProperty(QK,"__esModule",{value:!0});QK.defaultEndpointResolver=void 0;var Ju=mE(),f6=vE(),Vu=MK(),Pu=new f6.EndpointCache({size:50,params:["Endpoint","Region","UseDualStack","UseFIPS"]}),Hu=(f,h={})=>{return Pu.get(f,()=>f6.resolveEndpoint(Vu.ruleSet,{endpointParams:f,logger:h.logger}))};QK.defaultEndpointResolver=Hu;f6.customEndpointFunctions.aws=Ju.awsEndpointFunctions});var NK=H((PK)=>{Object.defineProperty(PK,"__esModule",{value:!0});PK.getRuntimeConfig=void 0;var Nu=O0(),Du=m0(),qu=J0(),ku=Ur(),JK=Ih(),VK=u1(),yu=gF(),ju=ZK(),Ou=(f)=>{return{apiVersion:"2019-06-10",base64Decoder:f?.base64Decoder??JK.fromBase64,base64Encoder:f?.base64Encoder??JK.toBase64,disableHostPrefix:f?.disableHostPrefix??!1,endpointProvider:f?.endpointProvider??ju.defaultEndpointResolver,extensions:f?.extensions??[],httpAuthSchemeProvider:f?.httpAuthSchemeProvider??yu.defaultSSOOIDCHttpAuthSchemeProvider,httpAuthSchemes:f?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:(h)=>h.getIdentityProvider("aws.auth#sigv4"),signer:new Nu.AwsSdkSigV4Signer},{schemeId:"smithy.api#noAuth",identityProvider:(h)=>h.getIdentityProvider("smithy.api#noAuth")||(async()=>({})),signer:new Du.NoAuthSigner}],logger:f?.logger??new qu.NoOpLogger,serviceId:f?.serviceId??"SSO OIDC",urlParser:f?.urlParser??ku.parseUrl,utf8Decoder:f?.utf8Decoder??VK.fromUtf8,utf8Encoder:f?.utf8Encoder??VK.toUtf8}};PK.getRuntimeConfig=Ou});var gK=H((vG0,cK)=>{var{defineProperty:IU,getOwnPropertyDescriptor:lu,getOwnPropertyNames:vu}=Object,bu=Object.prototype.hasOwnProperty,_0=(f,h)=>IU(f,"name",{value:h,configurable:!0}),mu=(f,h)=>{for(var w in h)IU(f,w,{get:h[w],enumerable:!0})},du=(f,h,w,s)=>{if(h&&typeof h==="object"||typeof h==="function"){for(let $ of vu(h))if(!bu.call(f,$)&&$!==w)IU(f,$,{get:()=>h[$],enumerable:!(s=lu(h,$))||s.enumerable})}return f},iu=(f)=>du(IU({},"__esModule",{value:!0}),f),yK={};mu(yK,{DEFAULT_MAX_RETRIES:()=>vK,DEFAULT_TIMEOUT:()=>lK,ENV_CMDS_AUTH_TOKEN:()=>s6,ENV_CMDS_FULL_URI:()=>FU,ENV_CMDS_RELATIVE_URI:()=>CU,Endpoint:()=>bK,fromContainerMetadata:()=>_u,fromInstanceMetadata:()=>Bt,getInstanceMetadataEndpoint:()=>dK,httpRequest:()=>Hs,providerConfigFromInit:()=>$6});cK.exports=iu(yK);var cu=B0("url"),Zf=D$(),gu=B0("buffer"),xu=B0("http");function Hs(f){return new Promise((h,w)=>{let s=xu.request({method:"GET",...f,hostname:f.hostname?.replace(/^\[(.+)\]$/,"$1")});s.on("error",($)=>{w(Object.assign(new Zf.ProviderError("Unable to connect to instance metadata service"),$)),s.destroy()}),s.on("timeout",()=>{w(new Zf.ProviderError("TimeoutError from instance metadata service")),s.destroy()}),s.on("response",($)=>{let{statusCode:r=400}=$;if(r<200||300<=r)w(Object.assign(new Zf.ProviderError("Error response received from instance metadata service"),{statusCode:r})),s.destroy();let E=[];$.on("data",(U)=>{E.push(U)}),$.on("end",()=>{h(gu.Buffer.concat(E)),s.destroy()})}),s.end()})}_0(Hs,"httpRequest");var jK=_0((f)=>Boolean(f)&&typeof f==="object"&&typeof f.AccessKeyId==="string"&&typeof f.SecretAccessKey==="string"&&typeof f.Token==="string"&&typeof f.Expiration==="string","isImdsCredentials"),OK=_0((f)=>({accessKeyId:f.AccessKeyId,secretAccessKey:f.SecretAccessKey,sessionToken:f.Token,expiration:new Date(f.Expiration),...f.AccountId&&{accountId:f.AccountId}}),"fromImdsCredentials"),lK=1000,vK=0,$6=_0(({maxRetries:f=vK,timeout:h=lK})=>({maxRetries:f,timeout:h}),"providerConfigFromInit"),w6=_0((f,h)=>{let w=f();for(let s=0;s<h;s++)w=w.catch(f);return w},"retry"),FU="AWS_CONTAINER_CREDENTIALS_FULL_URI",CU="AWS_CONTAINER_CREDENTIALS_RELATIVE_URI",s6="AWS_CONTAINER_AUTHORIZATION_TOKEN",_u=_0((f={})=>{let{timeout:h,maxRetries:w}=$6(f);return()=>w6(async()=>{let s=await pu({logger:f.logger}),$=JSON.parse(await nu(h,s));if(!jK($))throw new Zf.CredentialsProviderError("Invalid response received from instance metadata service.",{logger:f.logger});return OK($)},w)},"fromContainerMetadata"),nu=_0(async(f,h)=>{if(process.env[s6])h.headers={...h.headers,Authorization:process.env[s6]};return(await Hs({...h,timeout:f})).toString()},"requestFromEcsImds"),eu="169.254.170.2",au={localhost:!0,"127.0.0.1":!0},ou={"http:":!0,"https:":!0},pu=_0(async({logger:f})=>{if(process.env[CU])return{hostname:eu,path:process.env[CU]};if(process.env[FU]){let h=cu.parse(process.env[FU]);if(!h.hostname||!(h.hostname in au))throw new Zf.CredentialsProviderError(`${h.hostname} is not a valid container metadata service hostname`,{tryNextLink:!1,logger:f});if(!h.protocol||!(h.protocol in ou))throw new Zf.CredentialsProviderError(`${h.protocol} is not a valid container metadata service protocol`,{tryNextLink:!1,logger:f});return{...h,port:h.port?parseInt(h.port,10):void 0}}throw new Zf.CredentialsProviderError(`The container metadata credential provider cannot be used unless the ${CU} or ${FU} environment variable is set`,{tryNextLink:!1,logger:f})},"getCmdsUri"),uu=class f extends Zf.CredentialsProviderError{constructor(h,w=!0){super(h,w);this.tryNextLink=w,this.name="InstanceMetadataV1FallbackError",Object.setPrototypeOf(this,f.prototype)}static{_0(this,"InstanceMetadataV1FallbackError")}},r6=Ms(),tu=Ur(),bK=((f)=>{return f.IPv4="http://169.254.169.254",f.IPv6="http://[fd00:ec2::254]",f})(bK||{}),ft="AWS_EC2_METADATA_SERVICE_ENDPOINT",ht="ec2_metadata_service_endpoint",wt={environmentVariableSelector:(f)=>f[ft],configFileSelector:(f)=>f[ht],default:void 0},mK=((f)=>{return f.IPv4="IPv4",f.IPv6="IPv6",f})(mK||{}),st="AWS_EC2_METADATA_SERVICE_ENDPOINT_MODE",$t="ec2_metadata_service_endpoint_mode",rt={environmentVariableSelector:(f)=>f[st],configFileSelector:(f)=>f[$t],default:"IPv4"},dK=_0(async()=>tu.parseUrl(await Et()||await Ut()),"getInstanceMetadataEndpoint"),Et=_0(async()=>r6.loadConfig(wt)(),"getFromEndpointConfig"),Ut=_0(async()=>{let f=await r6.loadConfig(rt)();switch(f){case"IPv4":return"http://169.254.169.254";case"IPv6":return"http://[fd00:ec2::254]";default:throw new Error(`Unsupported endpoint mode: ${f}. Select from ${Object.values(mK)}`)}},"getFromEndpointModeConfig"),Tt=300,Ft=300,Ct="https://docs.aws.amazon.com/sdkref/latest/guide/feature-static-credentials.html",DK=_0((f,h)=>{let w=Tt+Math.floor(Math.random()*Ft),s=new Date(Date.now()+w*1000);h.warn(`Attempting credential expiration extension due to a credential service availability issue. A refresh of these credentials will be attempted after ${new Date(s)}.
50
+ For more information, please visit: `+Ct);let $=f.originalExpiration??f.expiration;return{...f,...$?{originalExpiration:$}:{},expiration:s}},"getExtendedInstanceMetadataCredentials"),It=_0((f,h={})=>{let w=h?.logger||console,s;return async()=>{let $;try{if($=await f(),$.expiration&&$.expiration.getTime()<Date.now())$=DK($,w)}catch(r){if(s)w.warn("Credential renew failed: ",r),$=DK(s,w);else throw r}return s=$,$}},"staticStabilityProvider"),iK="/latest/meta-data/iam/security-credentials/",Lt="/latest/api/token",h6="AWS_EC2_METADATA_V1_DISABLED",qK="ec2_metadata_v1_disabled",kK="x-aws-ec2-metadata-token",Bt=_0((f={})=>It(At(f),{logger:f.logger}),"fromInstanceMetadata"),At=_0((f={})=>{let h=!1,{logger:w,profile:s}=f,{timeout:$,maxRetries:r}=$6(f),E=_0(async(U,T)=>{if(h||T.headers?.[kK]==null){let I=!1,L=!1,G=await r6.loadConfig({environmentVariableSelector:(X)=>{let Q=X[h6];if(L=!!Q&&Q!=="false",Q===void 0)throw new Zf.CredentialsProviderError(`${h6} not set in env, checking config file next.`,{logger:f.logger});return L},configFileSelector:(X)=>{let Q=X[qK];return I=!!Q&&Q!=="false",I},default:!1},{profile:s})();if(f.ec2MetadataV1Disabled||G){let X=[];if(f.ec2MetadataV1Disabled)X.push("credential provider initialization (runtime option ec2MetadataV1Disabled)");if(I)X.push(`config file profile (${qK})`);if(L)X.push(`process environment variable (${h6})`);throw new uu(`AWS EC2 Metadata v1 fallback has been blocked by AWS SDK configuration in the following: [${X.join(", ")}].`)}}let C=(await w6(async()=>{let I;try{I=await Wt(T)}catch(L){if(L.statusCode===401)h=!1;throw L}return I},U)).trim();return w6(async()=>{let I;try{I=await zt(C,T,f)}catch(L){if(L.statusCode===401)h=!1;throw L}return I},U)},"getCredentials");return async()=>{let U=await dK();if(h)return w?.debug("AWS SDK Instance Metadata","using v1 fallback (no token fetch)"),E(r,{...U,timeout:$});else{let T;try{T=(await Gt({...U,timeout:$})).toString()}catch(F){if(F?.statusCode===400)throw Object.assign(F,{message:"EC2 Metadata token request returned error"});else if(F.message==="TimeoutError"||[403,404,405].includes(F.statusCode))h=!0;return w?.debug("AWS SDK Instance Metadata","using v1 fallback (initial)"),E(r,{...U,timeout:$})}return E(r,{...U,headers:{[kK]:T},timeout:$})}}},"getInstanceMetadataProvider"),Gt=_0(async(f)=>Hs({...f,path:Lt,method:"PUT",headers:{"x-aws-ec2-metadata-token-ttl-seconds":"21600"}}),"getMetadataToken"),Wt=_0(async(f)=>(await Hs({...f,path:iK})).toString(),"getProfile"),zt=_0(async(f,h,w)=>{let s=JSON.parse((await Hs({...h,path:iK+f})).toString());if(!jK(s))throw new Zf.CredentialsProviderError("Invalid response received from instance metadata service.",{logger:w.logger});return OK(s)},"getCredentialsFromProfile")});var U6=H((bG0,oK)=>{var{create:Rt,defineProperty:Ir,getOwnPropertyDescriptor:Xt,getOwnPropertyNames:St,getPrototypeOf:Yt}=Object,Mt=Object.prototype.hasOwnProperty,E6=(f,h)=>Ir(f,"name",{value:h,configurable:!0}),Qt=(f,h)=>{for(var w in h)Ir(f,w,{get:h[w],enumerable:!0})},eK=(f,h,w,s)=>{if(h&&typeof h==="object"||typeof h==="function"){for(let $ of St(h))if(!Mt.call(f,$)&&$!==w)Ir(f,$,{get:()=>h[$],enumerable:!(s=Xt(h,$))||s.enumerable})}return f},Kt=(f,h,w)=>(w=f!=null?Rt(Yt(f)):{},eK(h||!f||!f.__esModule?Ir(w,"default",{value:f,enumerable:!0}):w,f)),Zt=(f)=>eK(Ir({},"__esModule",{value:!0}),f),aK={};Qt(aK,{resolveDefaultsModeConfig:()=>jt});oK.exports=Zt(aK);var Jt=Xs(),xK=Ms(),Vt=D$(),Pt="AWS_EXECUTION_ENV",_K="AWS_REGION",nK="AWS_DEFAULT_REGION",Ht="AWS_EC2_METADATA_DISABLED",Nt=["in-region","cross-region","mobile","standard","legacy"],Dt="/latest/meta-data/placement/region",qt="AWS_DEFAULTS_MODE",kt="defaults_mode",yt={environmentVariableSelector:(f)=>{return f[qt]},configFileSelector:(f)=>{return f[kt]},default:"legacy"},jt=E6(({region:f=xK.loadConfig(Jt.NODE_REGION_CONFIG_OPTIONS),defaultsMode:h=xK.loadConfig(yt)}={})=>Vt.memoize(async()=>{let w=typeof h==="function"?await h():h;switch(w?.toLowerCase()){case"auto":return Ot(f);case"in-region":case"cross-region":case"mobile":case"standard":case"legacy":return Promise.resolve(w?.toLocaleLowerCase());case void 0:return Promise.resolve("legacy");default:throw new Error(`Invalid parameter for "defaultsMode", expect ${Nt.join(", ")}, got ${w}`)}}),"resolveDefaultsModeConfig"),Ot=E6(async(f)=>{if(f){let h=typeof f==="function"?await f():f,w=await lt();if(!w)return"standard";if(h===w)return"in-region";else return"cross-region"}return"standard"},"resolveNodeDefaultsModeAuto"),lt=E6(async()=>{if(process.env[Pt]&&(process.env[_K]||process.env[nK]))return process.env[_K]??process.env[nK];if(!process.env[Ht])try{let{getInstanceMetadataEndpoint:f,httpRequest:h}=await Promise.resolve().then(()=>Kt(gK())),w=await f();return(await h({...w,path:Dt})).toString()}catch(f){}},"inferPhysicalRegion")});var wZ=H((fZ)=>{Object.defineProperty(fZ,"__esModule",{value:!0});fZ.getRuntimeConfig=void 0;var vt=l4(),bt=vt.__importDefault(xF()),mt=O0(),pK=nF(),LU=Xs(),dt=oF(),uK=Fr(),Ns=Ms(),tK=X4(),it=pF(),ct=$U(),gt=NK(),xt=J0(),_t=U6(),nt=J0(),et=(f)=>{nt.emitWarningIfUnsupportedVersion(process.version);let h=_t.resolveDefaultsModeConfig(f),w=()=>h().then(xt.loadConfigsForDefaultMode),s=gt.getRuntimeConfig(f);mt.emitWarningIfUnsupportedVersion(process.version);let $={profile:f?.profile};return{...s,...f,runtime:"node",defaultsMode:h,bodyLengthChecker:f?.bodyLengthChecker??it.calculateBodyLength,defaultUserAgentProvider:f?.defaultUserAgentProvider??pK.createDefaultUserAgentProvider({serviceId:s.serviceId,clientVersion:bt.default.version}),maxAttempts:f?.maxAttempts??Ns.loadConfig(uK.NODE_MAX_ATTEMPT_CONFIG_OPTIONS,f),region:f?.region??Ns.loadConfig(LU.NODE_REGION_CONFIG_OPTIONS,{...LU.NODE_REGION_CONFIG_FILE_OPTIONS,...$}),requestHandler:tK.NodeHttpHandler.create(f?.requestHandler??w),retryMode:f?.retryMode??Ns.loadConfig({...uK.NODE_RETRY_MODE_CONFIG_OPTIONS,default:async()=>(await w()).retryMode||ct.DEFAULT_RETRY_MODE},f),sha256:f?.sha256??dt.Hash.bind(null,"sha256"),streamCollector:f?.streamCollector??tK.streamCollector,useDualstackEndpoint:f?.useDualstackEndpoint??Ns.loadConfig(LU.NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS,$),useFipsEndpoint:f?.useFipsEndpoint??Ns.loadConfig(LU.NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS,$),userAgentAppId:f?.userAgentAppId??Ns.loadConfig(pK.NODE_APP_ID_CONFIG_OPTIONS,$)}};fZ.getRuntimeConfig=et});var T6=H((dG0,TZ)=>{var{defineProperty:BU,getOwnPropertyDescriptor:at,getOwnPropertyNames:ot}=Object,pt=Object.prototype.hasOwnProperty,Ds=(f,h)=>BU(f,"name",{value:h,configurable:!0}),ut=(f,h)=>{for(var w in h)BU(f,w,{get:h[w],enumerable:!0})},tt=(f,h,w,s)=>{if(h&&typeof h==="object"||typeof h==="function"){for(let $ of ot(h))if(!pt.call(f,$)&&$!==w)BU(f,$,{get:()=>h[$],enumerable:!(s=at(h,$))||s.enumerable})}return f},f00=(f)=>tt(BU({},"__esModule",{value:!0}),f),$Z={};ut($Z,{NODE_REGION_CONFIG_FILE_OPTIONS:()=>$00,NODE_REGION_CONFIG_OPTIONS:()=>s00,REGION_ENV_NAME:()=>rZ,REGION_INI_NAME:()=>EZ,getAwsRegionExtensionConfiguration:()=>h00,resolveAwsRegionExtensionConfiguration:()=>w00,resolveRegionConfig:()=>r00});TZ.exports=f00($Z);var h00=Ds((f)=>{let h=Ds(async()=>{if(f.region===void 0)throw new Error("Region is missing from runtimeConfig");let w=f.region;if(typeof w==="string")return w;return w()},"runtimeConfigRegion");return{setRegion(w){h=w},region(){return h}}},"getAwsRegionExtensionConfiguration"),w00=Ds((f)=>{return{region:f.region()}},"resolveAwsRegionExtensionConfiguration"),rZ="AWS_REGION",EZ="region",s00={environmentVariableSelector:(f)=>f[rZ],configFileSelector:(f)=>f[EZ],default:()=>{throw new Error("Region is missing")}},$00={preferredFile:"credentials"},UZ=Ds((f)=>typeof f==="string"&&(f.startsWith("fips-")||f.endsWith("-fips")),"isFipsRegion"),sZ=Ds((f)=>UZ(f)?["fips-aws-global","aws-fips"].includes(f)?"us-east-1":f.replace(/fips-(dkr-|prod-)?|-fips/,""):f,"getRealRegion"),r00=Ds((f)=>{let{region:h,useFipsEndpoint:w}=f;if(!h)throw new Error("Region is missing");return{...f,region:async()=>{if(typeof h==="string")return sZ(h);let s=await h();return sZ(s)},useFipsEndpoint:async()=>{let s=typeof h==="string"?h:await h();if(UZ(s))return!0;return typeof w!=="function"?Promise.resolve(!!w):w()}}},"resolveRegionConfig")});var I6=H((iG0,jZ)=>{var{defineProperty:GU,getOwnPropertyDescriptor:E00,getOwnPropertyNames:U00}=Object,T00=Object.prototype.hasOwnProperty,w0=(f,h)=>GU(f,"name",{value:h,configurable:!0}),F00=(f,h)=>{for(var w in h)GU(f,w,{get:h[w],enumerable:!0})},C00=(f,h,w,s)=>{if(h&&typeof h==="object"||typeof h==="function"){for(let $ of U00(h))if(!T00.call(f,$)&&$!==w)GU(f,$,{get:()=>h[$],enumerable:!(s=E00(h,$))||s.enumerable})}return f},I00=(f)=>C00(GU({},"__esModule",{value:!0}),f),WZ={};F00(WZ,{$Command:()=>XZ.Command,AccessDeniedException:()=>SZ,AuthorizationPendingException:()=>YZ,CreateTokenCommand:()=>kZ,CreateTokenRequestFilterSensitiveLog:()=>MZ,CreateTokenResponseFilterSensitiveLog:()=>QZ,ExpiredTokenException:()=>KZ,InternalServerException:()=>ZZ,InvalidClientException:()=>JZ,InvalidGrantException:()=>VZ,InvalidRequestException:()=>PZ,InvalidScopeException:()=>HZ,SSOOIDC:()=>yZ,SSOOIDCClient:()=>RZ,SSOOIDCServiceException:()=>Z1,SlowDownException:()=>NZ,UnauthorizedClientException:()=>DZ,UnsupportedGrantTypeException:()=>qZ,__Client:()=>zZ.Client});jZ.exports=I00(WZ);var FZ=LF(),L00=BF(),B00=GF(),CZ=cE(),A00=Xs(),F6=m0(),G00=KF(),W00=Qs(),IZ=Fr(),zZ=J0(),LZ=gF(),z00=w0((f)=>{return{...f,useDualstackEndpoint:f.useDualstackEndpoint??!1,useFipsEndpoint:f.useFipsEndpoint??!1,defaultSigningName:"sso-oauth"}},"resolveClientEndpointParameters"),R00={UseFIPS:{type:"builtInParams",name:"useFipsEndpoint"},Endpoint:{type:"builtInParams",name:"endpoint"},Region:{type:"builtInParams",name:"region"},UseDualStack:{type:"builtInParams",name:"useDualstackEndpoint"}},X00=wZ(),BZ=T6(),AZ=t0(),GZ=J0(),S00=w0((f)=>{let{httpAuthSchemes:h,httpAuthSchemeProvider:w,credentials:s}=f;return{setHttpAuthScheme($){let r=h.findIndex((E)=>E.schemeId===$.schemeId);if(r===-1)h.push($);else h.splice(r,1,$)},httpAuthSchemes(){return h},setHttpAuthSchemeProvider($){w=$},httpAuthSchemeProvider(){return w},setCredentials($){s=$},credentials(){return s}}},"getHttpAuthExtensionConfiguration"),Y00=w0((f)=>{return{httpAuthSchemes:f.httpAuthSchemes(),httpAuthSchemeProvider:f.httpAuthSchemeProvider(),credentials:f.credentials()}},"resolveHttpAuthRuntimeConfig"),AU=w0((f)=>f,"asPartial"),M00=w0((f,h)=>{let w={...AU(BZ.getAwsRegionExtensionConfiguration(f)),...AU(GZ.getDefaultExtensionConfiguration(f)),...AU(AZ.getHttpHandlerExtensionConfiguration(f)),...AU(S00(f))};return h.forEach((s)=>s.configure(w)),{...f,...BZ.resolveAwsRegionExtensionConfiguration(w),...GZ.resolveDefaultRuntimeConfig(w),...AZ.resolveHttpHandlerRuntimeConfig(w),...Y00(w)}},"resolveRuntimeExtensions"),RZ=class extends zZ.Client{static{w0(this,"SSOOIDCClient")}config;constructor(...[f]){let h=X00.getRuntimeConfig(f||{}),w=z00(h),s=CZ.resolveUserAgentConfig(w),$=IZ.resolveRetryConfig(s),r=A00.resolveRegionConfig($),E=FZ.resolveHostHeaderConfig(r),U=W00.resolveEndpointConfig(E),T=LZ.resolveHttpAuthSchemeConfig(U),F=M00(T,f?.extensions||[]);super(F);this.config=F,this.middlewareStack.use(CZ.getUserAgentPlugin(this.config)),this.middlewareStack.use(IZ.getRetryPlugin(this.config)),this.middlewareStack.use(G00.getContentLengthPlugin(this.config)),this.middlewareStack.use(FZ.getHostHeaderPlugin(this.config)),this.middlewareStack.use(L00.getLoggerPlugin(this.config)),this.middlewareStack.use(B00.getRecursionDetectionPlugin(this.config)),this.middlewareStack.use(F6.getHttpAuthSchemeEndpointRuleSetPlugin(this.config,{httpAuthSchemeParametersProvider:LZ.defaultSSOOIDCHttpAuthSchemeParametersProvider,identityProviderConfigProvider:w0(async(C)=>new F6.DefaultIdentityProviderConfig({"aws.auth#sigv4":C.credentials}),"identityProviderConfigProvider")})),this.middlewareStack.use(F6.getHttpSigningPlugin(this.config))}destroy(){super.destroy()}},Q00=J0(),K00=Qs(),Z00=Dw(),XZ=J0(),qs=J0(),J00=J0(),Z1=class f extends J00.ServiceException{static{w0(this,"SSOOIDCServiceException")}constructor(h){super(h);Object.setPrototypeOf(this,f.prototype)}},SZ=class f extends Z1{static{w0(this,"AccessDeniedException")}name="AccessDeniedException";$fault="client";error;error_description;constructor(h){super({name:"AccessDeniedException",$fault:"client",...h});Object.setPrototypeOf(this,f.prototype),this.error=h.error,this.error_description=h.error_description}},YZ=class f extends Z1{static{w0(this,"AuthorizationPendingException")}name="AuthorizationPendingException";$fault="client";error;error_description;constructor(h){super({name:"AuthorizationPendingException",$fault:"client",...h});Object.setPrototypeOf(this,f.prototype),this.error=h.error,this.error_description=h.error_description}},MZ=w0((f)=>({...f,...f.clientSecret&&{clientSecret:qs.SENSITIVE_STRING},...f.refreshToken&&{refreshToken:qs.SENSITIVE_STRING},...f.codeVerifier&&{codeVerifier:qs.SENSITIVE_STRING}}),"CreateTokenRequestFilterSensitiveLog"),QZ=w0((f)=>({...f,...f.accessToken&&{accessToken:qs.SENSITIVE_STRING},...f.refreshToken&&{refreshToken:qs.SENSITIVE_STRING},...f.idToken&&{idToken:qs.SENSITIVE_STRING}}),"CreateTokenResponseFilterSensitiveLog"),KZ=class f extends Z1{static{w0(this,"ExpiredTokenException")}name="ExpiredTokenException";$fault="client";error;error_description;constructor(h){super({name:"ExpiredTokenException",$fault:"client",...h});Object.setPrototypeOf(this,f.prototype),this.error=h.error,this.error_description=h.error_description}},ZZ=class f extends Z1{static{w0(this,"InternalServerException")}name="InternalServerException";$fault="server";error;error_description;constructor(h){super({name:"InternalServerException",$fault:"server",...h});Object.setPrototypeOf(this,f.prototype),this.error=h.error,this.error_description=h.error_description}},JZ=class f extends Z1{static{w0(this,"InvalidClientException")}name="InvalidClientException";$fault="client";error;error_description;constructor(h){super({name:"InvalidClientException",$fault:"client",...h});Object.setPrototypeOf(this,f.prototype),this.error=h.error,this.error_description=h.error_description}},VZ=class f extends Z1{static{w0(this,"InvalidGrantException")}name="InvalidGrantException";$fault="client";error;error_description;constructor(h){super({name:"InvalidGrantException",$fault:"client",...h});Object.setPrototypeOf(this,f.prototype),this.error=h.error,this.error_description=h.error_description}},PZ=class f extends Z1{static{w0(this,"InvalidRequestException")}name="InvalidRequestException";$fault="client";error;error_description;constructor(h){super({name:"InvalidRequestException",$fault:"client",...h});Object.setPrototypeOf(this,f.prototype),this.error=h.error,this.error_description=h.error_description}},HZ=class f extends Z1{static{w0(this,"InvalidScopeException")}name="InvalidScopeException";$fault="client";error;error_description;constructor(h){super({name:"InvalidScopeException",$fault:"client",...h});Object.setPrototypeOf(this,f.prototype),this.error=h.error,this.error_description=h.error_description}},NZ=class f extends Z1{static{w0(this,"SlowDownException")}name="SlowDownException";$fault="client";error;error_description;constructor(h){super({name:"SlowDownException",$fault:"client",...h});Object.setPrototypeOf(this,f.prototype),this.error=h.error,this.error_description=h.error_description}},DZ=class f extends Z1{static{w0(this,"UnauthorizedClientException")}name="UnauthorizedClientException";$fault="client";error;error_description;constructor(h){super({name:"UnauthorizedClientException",$fault:"client",...h});Object.setPrototypeOf(this,f.prototype),this.error=h.error,this.error_description=h.error_description}},qZ=class f extends Z1{static{w0(this,"UnsupportedGrantTypeException")}name="UnsupportedGrantTypeException";$fault="client";error;error_description;constructor(h){super({name:"UnsupportedGrantTypeException",$fault:"client",...h});Object.setPrototypeOf(this,f.prototype),this.error=h.error,this.error_description=h.error_description}},C6=O0(),V00=m0(),x=J0(),P00=w0(async(f,h)=>{let w=V00.requestBuilder(f,h),s={"content-type":"application/json"};w.bp("/token");let $;return $=JSON.stringify(x.take(f,{clientId:[],clientSecret:[],code:[],codeVerifier:[],deviceCode:[],grantType:[],redirectUri:[],refreshToken:[],scope:w0((r)=>x._json(r),"scope")})),w.m("POST").h(s).b($),w.build()},"se_CreateTokenCommand"),H00=w0(async(f,h)=>{if(f.statusCode!==200&&f.statusCode>=300)return N00(f,h);let w=x.map({$metadata:i1(f)}),s=x.expectNonNull(x.expectObject(await C6.parseJsonBody(f.body,h)),"body"),$=x.take(s,{accessToken:x.expectString,expiresIn:x.expectInt32,idToken:x.expectString,refreshToken:x.expectString,tokenType:x.expectString});return Object.assign(w,$),w},"de_CreateTokenCommand"),N00=w0(async(f,h)=>{let w={...f,body:await C6.parseJsonErrorBody(f.body,h)},s=C6.loadRestJsonErrorCode(f,w.body);switch(s){case"AccessDeniedException":case"com.amazonaws.ssooidc#AccessDeniedException":throw await q00(w,h);case"AuthorizationPendingException":case"com.amazonaws.ssooidc#AuthorizationPendingException":throw await k00(w,h);case"ExpiredTokenException":case"com.amazonaws.ssooidc#ExpiredTokenException":throw await y00(w,h);case"InternalServerException":case"com.amazonaws.ssooidc#InternalServerException":throw await j00(w,h);case"InvalidClientException":case"com.amazonaws.ssooidc#InvalidClientException":throw await O00(w,h);case"InvalidGrantException":case"com.amazonaws.ssooidc#InvalidGrantException":throw await l00(w,h);case"InvalidRequestException":case"com.amazonaws.ssooidc#InvalidRequestException":throw await v00(w,h);case"InvalidScopeException":case"com.amazonaws.ssooidc#InvalidScopeException":throw await b00(w,h);case"SlowDownException":case"com.amazonaws.ssooidc#SlowDownException":throw await m00(w,h);case"UnauthorizedClientException":case"com.amazonaws.ssooidc#UnauthorizedClientException":throw await d00(w,h);case"UnsupportedGrantTypeException":case"com.amazonaws.ssooidc#UnsupportedGrantTypeException":throw await i00(w,h);default:let $=w.body;return D00({output:f,parsedBody:$,errorCode:s})}},"de_CommandError"),D00=x.withBaseException(Z1),q00=w0(async(f,h)=>{let w=x.map({}),s=f.body,$=x.take(s,{error:x.expectString,error_description:x.expectString});Object.assign(w,$);let r=new SZ({$metadata:i1(f),...w});return x.decorateServiceException(r,f.body)},"de_AccessDeniedExceptionRes"),k00=w0(async(f,h)=>{let w=x.map({}),s=f.body,$=x.take(s,{error:x.expectString,error_description:x.expectString});Object.assign(w,$);let r=new YZ({$metadata:i1(f),...w});return x.decorateServiceException(r,f.body)},"de_AuthorizationPendingExceptionRes"),y00=w0(async(f,h)=>{let w=x.map({}),s=f.body,$=x.take(s,{error:x.expectString,error_description:x.expectString});Object.assign(w,$);let r=new KZ({$metadata:i1(f),...w});return x.decorateServiceException(r,f.body)},"de_ExpiredTokenExceptionRes"),j00=w0(async(f,h)=>{let w=x.map({}),s=f.body,$=x.take(s,{error:x.expectString,error_description:x.expectString});Object.assign(w,$);let r=new ZZ({$metadata:i1(f),...w});return x.decorateServiceException(r,f.body)},"de_InternalServerExceptionRes"),O00=w0(async(f,h)=>{let w=x.map({}),s=f.body,$=x.take(s,{error:x.expectString,error_description:x.expectString});Object.assign(w,$);let r=new JZ({$metadata:i1(f),...w});return x.decorateServiceException(r,f.body)},"de_InvalidClientExceptionRes"),l00=w0(async(f,h)=>{let w=x.map({}),s=f.body,$=x.take(s,{error:x.expectString,error_description:x.expectString});Object.assign(w,$);let r=new VZ({$metadata:i1(f),...w});return x.decorateServiceException(r,f.body)},"de_InvalidGrantExceptionRes"),v00=w0(async(f,h)=>{let w=x.map({}),s=f.body,$=x.take(s,{error:x.expectString,error_description:x.expectString});Object.assign(w,$);let r=new PZ({$metadata:i1(f),...w});return x.decorateServiceException(r,f.body)},"de_InvalidRequestExceptionRes"),b00=w0(async(f,h)=>{let w=x.map({}),s=f.body,$=x.take(s,{error:x.expectString,error_description:x.expectString});Object.assign(w,$);let r=new HZ({$metadata:i1(f),...w});return x.decorateServiceException(r,f.body)},"de_InvalidScopeExceptionRes"),m00=w0(async(f,h)=>{let w=x.map({}),s=f.body,$=x.take(s,{error:x.expectString,error_description:x.expectString});Object.assign(w,$);let r=new NZ({$metadata:i1(f),...w});return x.decorateServiceException(r,f.body)},"de_SlowDownExceptionRes"),d00=w0(async(f,h)=>{let w=x.map({}),s=f.body,$=x.take(s,{error:x.expectString,error_description:x.expectString});Object.assign(w,$);let r=new DZ({$metadata:i1(f),...w});return x.decorateServiceException(r,f.body)},"de_UnauthorizedClientExceptionRes"),i00=w0(async(f,h)=>{let w=x.map({}),s=f.body,$=x.take(s,{error:x.expectString,error_description:x.expectString});Object.assign(w,$);let r=new qZ({$metadata:i1(f),...w});return x.decorateServiceException(r,f.body)},"de_UnsupportedGrantTypeExceptionRes"),i1=w0((f)=>({httpStatusCode:f.statusCode,requestId:f.headers["x-amzn-requestid"]??f.headers["x-amzn-request-id"]??f.headers["x-amz-request-id"],extendedRequestId:f.headers["x-amz-id-2"],cfId:f.headers["x-amz-cf-id"]}),"deserializeMetadata"),kZ=class extends XZ.Command.classBuilder().ep(R00).m(function(f,h,w,s){return[Z00.getSerdePlugin(w,this.serialize,this.deserialize),K00.getEndpointPlugin(w,f.getEndpointParameterInstructions())]}).s("AWSSSOOIDCService","CreateToken",{}).n("SSOOIDCClient","CreateTokenCommand").f(MZ,QZ).ser(P00).de(H00).build(){static{w0(this,"CreateTokenCommand")}},c00={CreateTokenCommand:kZ},yZ=class extends RZ{static{w0(this,"SSOOIDC")}};Q00.createAggregatedClient(c00,yZ)});var OZ=async(f,h={})=>{let{SSOOIDCClient:w}=await Promise.resolve().then(() => p(I6(),1));return new w(Object.assign({},h.clientConfig??{},{region:f??h.clientConfig?.region,logger:h.clientConfig?.logger??h.parentClientConfig?.logger}))};var lZ=async(f,h,w={})=>{let{CreateTokenCommand:s}=await Promise.resolve().then(() => p(I6(),1));return(await OZ(h,w)).send(new s({clientId:f.clientId,clientSecret:f.clientSecret,refreshToken:f.refreshToken,grantType:"refresh_token"}))};var vZ=()=>{};var L6=(f)=>{if(f.expiration&&f.expiration.getTime()<Date.now())throw new X1(`Token is expired. ${zs}`,!1)};var bZ=B(()=>{Y0()});var qh=(f,h,w=!1)=>{if(typeof h==="undefined")throw new X1(`Value not present for '${f}' in SSO Token${w?". Cannot refresh":""}. ${zs}`,!1)};var mZ=B(()=>{Y0()});import{promises as g00}from"fs";var x00,dZ=(f,h)=>{let w=EE(f),s=JSON.stringify(h,null,2);return x00(w,s)};var iZ=B(()=>{hf();({writeFile:x00}=g00)});var cZ,gZ=(f={})=>async({callerClientConfig:h}={})=>{let w={...f,parentClientConfig:{...h,...f.parentClientConfig}};w.logger?.debug("@aws-sdk/token-providers - fromSso");let s=await Qh(w),$=y1({profile:w.profile??h?.profile}),r=s[$];if(!r)throw new X1(`Profile '${$}' could not be found in shared credentials file.`,!1);else if(!r.sso_session)throw new X1(`Profile '${$}' is missing required property 'sso_session'.`);let E=r.sso_session,T=(await CE(w))[E];if(!T)throw new X1(`Sso session '${E}' could not be found in shared credentials file.`,!1);for(let Q of["sso_start_url","sso_region"])if(!T[Q])throw new X1(`Sso session '${E}' is missing required property '${Q}'.`,!1);let{sso_start_url:F,sso_region:C}=T,I;try{I=await UE(E)}catch(Q){throw new X1(`The SSO session token associated with profile=${$} was not found or is invalid. ${zs}`,!1)}qh("accessToken",I.accessToken),qh("expiresAt",I.expiresAt);let{accessToken:L,expiresAt:G}=I,X={token:L,expiration:new Date(G)};if(X.expiration.getTime()-Date.now()>B9)return X;if(Date.now()-cZ.getTime()<30000)return L6(X),X;qh("clientId",I.clientId,!0),qh("clientSecret",I.clientSecret,!0),qh("refreshToken",I.refreshToken,!0);try{cZ.setTime(Date.now());let Q=await lZ(I,C,w);qh("accessToken",Q.accessToken),qh("expiresIn",Q.expiresIn);let M=new Date(Date.now()+Q.expiresIn*1000);try{await dZ(E,{...I,accessToken:Q.accessToken,expiresAt:M.toISOString(),refreshToken:Q.refreshToken})}catch(q){}return{token:Q.accessToken,expiration:M}}catch(Q){return L6(X),X}};var xZ=B(()=>{Y0();hf();vZ();bZ();mZ();iZ();cZ=new Date(0)});var _Z=B(()=>{Y0()});var nZ=B(()=>{Y0()});var eZ=B(()=>{xZ();_Z();nZ()});function _00(f){return{schemeId:"aws.auth#sigv4",signingProperties:{name:"awsssoportal",region:f.region},propertiesExtractor:(h,w)=>({signingProperties:{config:h,context:w}})}}function WU(f){return{schemeId:"smithy.api#noAuth"}}var aZ,oZ=async(f,h,w)=>{return{operation:Xh(h).operation,region:await L1(f.region)()||(()=>{throw new Error("expected `region` to be configured for `aws.auth#sigv4`")})()}},pZ=(f)=>{let h=[];switch(f.operation){case"GetRoleCredentials":{h.push(WU(f));break}case"ListAccountRoles":{h.push(WU(f));break}case"ListAccounts":{h.push(WU(f));break}case"Logout":{h.push(WU(f));break}default:h.push(_00(f))}return h},uZ=(f)=>{return{...aZ.resolveAwsSdkSigV4Config(f)}};var B6=B(()=>{aZ=p(O0(),1);cf()});var tZ=(f)=>{return{...f,useDualstackEndpoint:f.useDualstackEndpoint??!1,useFipsEndpoint:f.useFipsEndpoint??!1,defaultSigningName:"awsssoportal"}},kh;var ks=B(()=>{kh={UseFIPS:{type:"builtInParams",name:"useFipsEndpoint"},Endpoint:{type:"builtInParams",name:"endpoint"},Region:{type:"builtInParams",name:"region"},UseDualStack:{type:"builtInParams",name:"useDualstackEndpoint"}}});var hJ;var fJ=B(()=>{hJ={name:"@aws-sdk/client-sso",description:"AWS SDK for JavaScript Sso Client for Node.js, Browser and React Native",version:"3.772.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.758.0","@aws-sdk/middleware-host-header":"3.734.0","@aws-sdk/middleware-logger":"3.734.0","@aws-sdk/middleware-recursion-detection":"3.772.0","@aws-sdk/middleware-user-agent":"3.758.0","@aws-sdk/region-config-resolver":"3.734.0","@aws-sdk/types":"3.734.0","@aws-sdk/util-endpoints":"3.743.0","@aws-sdk/util-user-agent-browser":"3.734.0","@aws-sdk/util-user-agent-node":"3.758.0","@smithy/config-resolver":"^4.0.1","@smithy/core":"^3.1.5","@smithy/fetch-http-handler":"^5.0.1","@smithy/hash-node":"^4.0.1","@smithy/invalid-dependency":"^4.0.1","@smithy/middleware-content-length":"^4.0.1","@smithy/middleware-endpoint":"^4.0.6","@smithy/middleware-retry":"^4.0.7","@smithy/middleware-serde":"^4.0.2","@smithy/middleware-stack":"^4.0.1","@smithy/node-config-provider":"^4.0.1","@smithy/node-http-handler":"^4.0.3","@smithy/protocol-http":"^5.0.1","@smithy/smithy-client":"^4.1.6","@smithy/types":"^4.1.0","@smithy/url-parser":"^4.0.1","@smithy/util-base64":"^4.0.0","@smithy/util-body-length-browser":"^4.0.0","@smithy/util-body-length-node":"^4.0.0","@smithy/util-defaults-mode-browser":"^4.0.7","@smithy/util-defaults-mode-node":"^4.0.7","@smithy/util-endpoints":"^3.0.1","@smithy/util-middleware":"^4.0.1","@smithy/util-retry":"^4.0.1","@smithy/util-utf8":"^4.0.0",tslib:"^2.6.2"},devDependencies:{"@tsconfig/node18":"18.2.4","@types/node":"^18.19.69",concurrently:"7.0.0","downlevel-dts":"0.10.1",rimraf:"3.0.2",typescript:"~5.2.2"},engines:{node:">=18.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 A6;var G6=B(()=>{A6={isCrtAvailable:!1}});var wJ=()=>{if(A6.isCrtAvailable)return["md/crt-avail"];return null};var sJ=B(()=>{G6()});import{platform as e00,release as a00}from"os";import{env as $J,versions as o00}from"process";var ys=({serviceId:f,clientVersion:h})=>{return async(w)=>{let s=[["aws-sdk-js",h],["ua","2.1"],[`os/${e00()}`,a00()],["lang/js"],["md/nodejs",`${o00.node}`]],$=wJ();if($)s.push($);if(f)s.push([`api/${f}`,h]);if($J.AWS_EXECUTION_ENV)s.push([`exec-env/${$J.AWS_EXECUTION_ENV}`]);let r=await w?.userAgentAppId?.();return r?[...s,[`app/${r}`]]:[...s]}};var rJ=B(()=>{sJ();G6()});var p00="AWS_SDK_UA_APP_ID",u00="sdk_ua_app_id",t00="sdk-ua-app-id",js;var EJ=B(()=>{m$();js={environmentVariableSelector:(f)=>f[p00],configFileSelector:(f)=>f[u00]??f[t00],default:L2}});var zU=B(()=>{rJ();EJ()});var UJ=(f)=>typeof ArrayBuffer==="function"&&f instanceof ArrayBuffer||Object.prototype.toString.call(f)==="[object ArrayBuffer]";import{Buffer as W6}from"buffer";var Tw=(f,h=0,w=f.byteLength-h)=>{if(!UJ(f))throw new TypeError(`The "input" argument must be ArrayBuffer. Received type ${typeof f} (${f})`);return W6.from(f,h,w)},Os=(f,h)=>{if(typeof f!=="string")throw new TypeError(`The "input" argument must be of type string. Received type ${typeof f} (${f})`);return h?W6.from(f,h):W6.from(f)};var ls=()=>{};var Jf=(f)=>{let h=Os(f,"utf8");return new Uint8Array(h.buffer,h.byteOffset,h.byteLength/Uint8Array.BYTES_PER_ELEMENT)};var z6=B(()=>{ls()});var TJ=(f)=>{if(typeof f==="string")return Jf(f);if(ArrayBuffer.isView(f))return new Uint8Array(f.buffer,f.byteOffset,f.byteLength/Uint8Array.BYTES_PER_ELEMENT);return new Uint8Array(f)};var FJ=B(()=>{z6()});var vs=(f)=>{if(typeof f==="string")return f;if(typeof f!=="object"||typeof f.byteOffset!=="number"||typeof f.byteLength!=="number")throw new Error("@smithy/util-utf8: toUtf8 encoder function only accepts string | Uint8Array.");return Tw(f.buffer,f.byteOffset,f.byteLength).toString("utf8")};var CJ=B(()=>{ls()});var bs=B(()=>{z6();FJ();CJ()});import{Buffer as f10}from"buffer";import{createHash as h10,createHmac as w10}from"crypto";class Fw{constructor(f,h){this.algorithmIdentifier=f,this.secret=h,this.reset()}update(f,h){this.hash.update(TJ(IJ(f,h)))}digest(){return Promise.resolve(this.hash.digest())}reset(){this.hash=this.secret?w10(this.algorithmIdentifier,IJ(this.secret)):h10(this.algorithmIdentifier)}}function IJ(f,h){if(f10.isBuffer(f))return f;if(typeof f==="string")return Os(f,h);if(ArrayBuffer.isView(f))return Tw(f.buffer,f.byteOffset,f.byteLength);return Tw(f)}var RU=B(()=>{ls();bs()});import{fstatSync as s10,lstatSync as $10}from"fs";var ms=(f)=>{if(!f)return 0;if(typeof f==="string")return Buffer.byteLength(f);else if(typeof f.byteLength==="number")return f.byteLength;else if(typeof f.size==="number")return f.size;else if(typeof f.start==="number"&&typeof f.end==="number")return f.end+1-f.start;else if(typeof f.path==="string"||Buffer.isBuffer(f.path))return $10(f.path).size;else if(typeof f.fd==="number")return s10(f.fd).size;throw new Error(`Body Length computation failed for ${f}`)};var LJ=()=>{};var XU=B(()=>{LJ()});var r10,ds=(f)=>{if(f.length*3%4!==0)throw new TypeError("Incorrect padding on base64 string.");if(!r10.exec(f))throw new TypeError("Invalid base64 string.");let h=Os(f,"base64");return new Uint8Array(h.buffer,h.byteOffset,h.byteLength)};var BJ=B(()=>{ls();r10=/^[A-Za-z0-9+/]*={0,2}$/});var is=(f)=>{let h;if(typeof f==="string")h=Jf(f);else h=f;if(typeof h!=="object"||typeof h.byteOffset!=="number"||typeof h.byteLength!=="number")throw new Error("@smithy/util-base64: toBase64 encoder function only accepts string | Uint8Array.");return Tw(h.buffer,h.byteOffset,h.byteLength).toString("base64")};var AJ=B(()=>{ls();bs()});var SU=B(()=>{BJ();AJ()});var GJ,WJ,zJ,QJ,KJ,c1,RJ,ZJ,XJ,SJ,YJ,MJ,E10,JJ;var VJ=B(()=>{GJ={["required"]:!1,type:"String"},WJ={["required"]:!0,default:!1,type:"Boolean"},zJ={["ref"]:"Endpoint"},QJ={["fn"]:"booleanEquals",["argv"]:[{["ref"]:"UseFIPS"},!0]},KJ={["fn"]:"booleanEquals",["argv"]:[{["ref"]:"UseDualStack"},!0]},c1={},RJ={["fn"]:"getAttr",["argv"]:[{["ref"]:"PartitionResult"},"supportsFIPS"]},ZJ={["ref"]:"PartitionResult"},XJ={["fn"]:"booleanEquals",["argv"]:[!0,{["fn"]:"getAttr",["argv"]:[ZJ,"supportsDualStack"]}]},SJ=[QJ],YJ=[KJ],MJ=[{["ref"]:"Region"}],E10={version:"1.0",parameters:{Region:GJ,UseDualStack:WJ,UseFIPS:WJ,Endpoint:GJ},rules:[{conditions:[{["fn"]:"isSet",["argv"]:[zJ]}],rules:[{conditions:SJ,error:"Invalid Configuration: FIPS and custom endpoint are not supported",type:"error"},{conditions:YJ,error:"Invalid Configuration: Dualstack and custom endpoint are not supported",type:"error"},{endpoint:{url:zJ,properties:c1,headers:c1},type:"endpoint"}],type:"tree"},{conditions:[{["fn"]:"isSet",["argv"]:MJ}],rules:[{conditions:[{["fn"]:"aws.partition",["argv"]:MJ,assign:"PartitionResult"}],rules:[{conditions:[QJ,KJ],rules:[{conditions:[{["fn"]:"booleanEquals",["argv"]:[!0,RJ]},XJ],rules:[{endpoint:{url:"https://portal.sso-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:c1,headers:c1},type:"endpoint"}],type:"tree"},{error:"FIPS and DualStack are enabled, but this partition does not support one or both",type:"error"}],type:"tree"},{conditions:SJ,rules:[{conditions:[{["fn"]:"booleanEquals",["argv"]:[RJ,!0]}],rules:[{conditions:[{["fn"]:"stringEquals",["argv"]:[{["fn"]:"getAttr",["argv"]:[ZJ,"name"]},"aws-us-gov"]}],endpoint:{url:"https://portal.sso.{Region}.amazonaws.com",properties:c1,headers:c1},type:"endpoint"},{endpoint:{url:"https://portal.sso-fips.{Region}.{PartitionResult#dnsSuffix}",properties:c1,headers:c1},type:"endpoint"}],type:"tree"},{error:"FIPS is enabled but this partition does not support FIPS",type:"error"}],type:"tree"},{conditions:YJ,rules:[{conditions:[XJ],rules:[{endpoint:{url:"https://portal.sso.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:c1,headers:c1},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:c1,headers:c1},type:"endpoint"}],type:"tree"}],type:"tree"},{error:"Invalid Configuration: Missing Region",type:"error"}]},JJ=E10});var U10,PJ=(f,h={})=>{return U10.get(f,()=>xh(JJ,{endpointParams:f,logger:h.logger}))};var HJ=B(()=>{N$();df();VJ();U10=new gh({size:50,params:["Endpoint","Region","UseDualStack","UseFIPS"]});t1.aws=_h});var NJ,DJ,qJ=(f)=>{return{apiVersion:"2019-06-10",base64Decoder:f?.base64Decoder??ds,base64Encoder:f?.base64Encoder??is,disableHostPrefix:f?.disableHostPrefix??!1,endpointProvider:f?.endpointProvider??PJ,extensions:f?.extensions??[],httpAuthSchemeProvider:f?.httpAuthSchemeProvider??pZ,httpAuthSchemes:f?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:(h)=>h.getIdentityProvider("aws.auth#sigv4"),signer:new NJ.AwsSdkSigV4Signer},{schemeId:"smithy.api#noAuth",identityProvider:(h)=>h.getIdentityProvider("smithy.api#noAuth")||(async()=>({})),signer:new DJ.NoAuthSigner}],logger:f?.logger??new _f,serviceId:f?.serviceId??"SSO",urlParser:f?.urlParser??O1,utf8Decoder:f?.utf8Decoder??Jf,utf8Encoder:f?.utf8Encoder??vs}};var kJ=B(()=>{NJ=p(O0(),1),DJ=p(m0(),1);J();pw();SU();bs();B6();HJ()});var yJ="AWS_EXECUTION_ENV",R6="AWS_REGION",X6="AWS_DEFAULT_REGION",jJ="AWS_EC2_METADATA_DISABLED",OJ,lJ="/latest/meta-data/placement/region";var vJ=B(()=>{OJ=["in-region","cross-region","mobile","standard","legacy"]});var bJ;var mJ=B(()=>{bJ={environmentVariableSelector:(f)=>{return f.AWS_DEFAULTS_MODE},configFileSelector:(f)=>{return f.defaults_mode},default:"legacy"}});var cs=({region:f=z0(Sh),defaultsMode:h=z0(bJ)}={})=>uh(async()=>{let w=typeof h==="function"?await h():h;switch(w?.toLowerCase()){case"auto":return T10(f);case"in-region":case"cross-region":case"mobile":case"standard":case"legacy":return Promise.resolve(w?.toLocaleLowerCase());case void 0:return Promise.resolve("legacy");default:throw new Error(`Invalid parameter for "defaultsMode", expect ${OJ.join(", ")}, got ${w}`)}}),T10=async(f)=>{if(f){let h=typeof f==="function"?await f():f,w=await F10();if(!w)return"standard";if(h===w)return"in-region";else return"cross-region"}return"standard"},F10=async()=>{if(process.env[yJ]&&(process.env[R6]||process.env[X6]))return process.env[R6]??process.env[X6];if(!process.env[jJ])try{let{getInstanceMetadataEndpoint:f,httpRequest:h}=await Promise.resolve().then(() => (fr(),t$)),w=await f();return(await h({...w,path:lJ})).toString()}catch(f){}};var dJ=B(()=>{Yh();Kh();Y0();vJ();mJ()});var YU=B(()=>{dJ()});var iJ,cJ=(f)=>{Cs(process.version);let h=cs(f),w=()=>h().then(Fs),s=qJ(f);iJ.emitWarningIfUnsupportedVersion(process.version);let $={profile:f?.profile};return{...s,...f,runtime:"node",defaultsMode:h,bodyLengthChecker:f?.bodyLengthChecker??ms,defaultUserAgentProvider:f?.defaultUserAgentProvider??ys({serviceId:s.serviceId,clientVersion:hJ.version}),maxAttempts:f?.maxAttempts??z0(ws,f),region:f?.region??z0(Sh,{..._w,...$}),requestHandler:rf.create(f?.requestHandler??w),retryMode:f?.retryMode??z0({...$s,default:async()=>(await w()).retryMode||Zh},f),sha256:f?.sha256??Fw.bind(null,"sha256"),streamCollector:f?.streamCollector??Ws,useDualstackEndpoint:f?.useDualstackEndpoint??z0(gw,$),useFipsEndpoint:f?.useFipsEndpoint??z0(xw,$),userAgentAppId:f?.userAgentAppId??z0(js,$)}};var gJ=B(()=>{fJ();iJ=p(O0(),1);zU();Yh();RU();$w();Kh();wr();XU();wf();kJ();J();YU();J()});var gs=(f)=>{let h=async()=>{if(f.region===void 0)throw new Error("Region is missing from runtimeConfig");let w=f.region;if(typeof w==="string")return w;return w()};return{setRegion(w){h=w},region(){return h}}},xs=(f)=>{return{region:f.region()}};var xJ=()=>{};var _J=()=>{};var nJ=B(()=>{_J()});var eJ=B(()=>{xJ();nJ()});var MU=B(()=>{eJ()});var aJ=(f)=>{let{httpAuthSchemes:h,httpAuthSchemeProvider:w,credentials:s}=f;return{setHttpAuthScheme($){let r=h.findIndex((E)=>E.schemeId===$.schemeId);if(r===-1)h.push($);else h.splice(r,1,$)},httpAuthSchemes(){return h},setHttpAuthSchemeProvider($){w=$},httpAuthSchemeProvider(){return w},setCredentials($){s=$},credentials(){return s}}},oJ=(f)=>{return{httpAuthSchemes:f.httpAuthSchemes(),httpAuthSchemeProvider:f.httpAuthSchemeProvider(),credentials:f.credentials()}};var QU=(f)=>f,pJ=(f,h)=>{let w={...QU(gs(f)),...QU(Is(f)),...QU(Zw(f)),...QU(aJ(f))};return h.forEach((s)=>s.configure(w)),{...f,...xs(w),...Ls(w),...Jw(w),...oJ(w)}};var uJ=B(()=>{MU();F1();J()});var _s,af;var Lr=B(()=>{E4();U4();T4();m$();Yh();_s=p(m0(),1);$E();D();$w();J();B6();ks();gJ();uJ();af=class af extends ww{config;constructor(...[f]){let h=cJ(f||{}),w=tZ(h),s=jw(w),$=ss(s),r=nw($),E=Vw(r),U=uw(E),T=uZ(U),F=pJ(T,f?.extensions||[]);super(F);this.config=F,this.middlewareStack.use(iw(this.config)),this.middlewareStack.use(As(this.config)),this.middlewareStack.use(ew(this.config)),this.middlewareStack.use(Pw(this.config)),this.middlewareStack.use(Hw(this.config)),this.middlewareStack.use(Nw(this.config)),this.middlewareStack.use(_s.getHttpAuthSchemeEndpointRuleSetPlugin(this.config,{httpAuthSchemeParametersProvider:oZ,identityProviderConfigProvider:async(C)=>new _s.DefaultIdentityProviderConfig({"aws.auth#sigv4":C.credentials})})),this.middlewareStack.use(_s.getHttpSigningPlugin(this.config))}destroy(){super.destroy()}}});var of;var S6=B(()=>{J();of=class of extends $f{constructor(f){super(f);Object.setPrototypeOf(this,of.prototype)}}});var KU,ZU,JU,VU,tJ=(f)=>({...f,...f.accessToken&&{accessToken:T0}}),I10=(f)=>({...f,...f.secretAccessKey&&{secretAccessKey:T0},...f.sessionToken&&{sessionToken:T0}}),fV=(f)=>({...f,...f.roleCredentials&&{roleCredentials:I10(f.roleCredentials)}}),hV=(f)=>({...f,...f.accessToken&&{accessToken:T0}}),wV=(f)=>({...f,...f.accessToken&&{accessToken:T0}}),sV=(f)=>({...f,...f.accessToken&&{accessToken:T0}});var Cw=B(()=>{J();S6();KU=class KU extends of{name="InvalidRequestException";$fault="client";constructor(f){super({name:"InvalidRequestException",$fault:"client",...f});Object.setPrototypeOf(this,KU.prototype)}};ZU=class ZU extends of{name="ResourceNotFoundException";$fault="client";constructor(f){super({name:"ResourceNotFoundException",$fault:"client",...f});Object.setPrototypeOf(this,ZU.prototype)}};JU=class JU extends of{name="TooManyRequestsException";$fault="client";constructor(f){super({name:"TooManyRequestsException",$fault:"client",...f});Object.setPrototypeOf(this,JU.prototype)}};VU=class VU extends of{name="UnauthorizedException";$fault="client";constructor(f){super({name:"UnauthorizedException",$fault:"client",...f});Object.setPrototypeOf(this,VU.prototype)}}});var yh,Br,$V=async(f,h)=>{let w=Br.requestBuilder(f,h),s=Y({},o$,{[NU]:f[HU]});w.bp("/federation/credentials");let $=Y({[R10]:[,j(f[z10],"roleName")],[BV]:[,j(f[LV],"accountId")]}),r;return w.m("GET").h(s).q($).b(r),w.build()},rV=async(f,h)=>{let w=Br.requestBuilder(f,h),s=Y({},o$,{[NU]:f[HU]});w.bp("/assignment/roles");let $=Y({[zV]:[,f[WV]],[GV]:[()=>f.maxResults!==void 0,()=>f[AV].toString()],[BV]:[,j(f[LV],"accountId")]}),r;return w.m("GET").h(s).q($).b(r),w.build()},EV=async(f,h)=>{let w=Br.requestBuilder(f,h),s=Y({},o$,{[NU]:f[HU]});w.bp("/assignment/accounts");let $=Y({[zV]:[,f[WV]],[GV]:[()=>f.maxResults!==void 0,()=>f[AV].toString()]}),r;return w.m("GET").h(s).q($).b(r),w.build()},UV=async(f,h)=>{let w=Br.requestBuilder(f,h),s=Y({},o$,{[NU]:f[HU]});w.bp("/logout");let $;return w.m("POST").h(s).b($),w.build()},TV=async(f,h)=>{if(f.statusCode!==200&&f.statusCode>=300)return PU(f,h);let w=Y({$metadata:jh(f)}),s=j(g(await yh.parseJsonBody(f.body,h)),"body"),$=N0(s,{roleCredentials:v});return Object.assign(w,$),w},FV=async(f,h)=>{if(f.statusCode!==200&&f.statusCode>=300)return PU(f,h);let w=Y({$metadata:jh(f)}),s=j(g(await yh.parseJsonBody(f.body,h)),"body"),$=N0(s,{nextToken:A,roleList:v});return Object.assign(w,$),w},CV=async(f,h)=>{if(f.statusCode!==200&&f.statusCode>=300)return PU(f,h);let w=Y({$metadata:jh(f)}),s=j(g(await yh.parseJsonBody(f.body,h)),"body"),$=N0(s,{accountList:v,nextToken:A});return Object.assign(w,$),w},IV=async(f,h)=>{if(f.statusCode!==200&&f.statusCode>=300)return PU(f,h);let w=Y({$metadata:jh(f)});return await B1.collectBody(f.body,h),w},PU=async(f,h)=>{let w={...f,body:await yh.parseJsonErrorBody(f.body,h)},s=yh.loadRestJsonErrorCode(f,w.body);switch(s){case"InvalidRequestException":case"com.amazonaws.sso#InvalidRequestException":throw await B10(w,h);case"ResourceNotFoundException":case"com.amazonaws.sso#ResourceNotFoundException":throw await A10(w,h);case"TooManyRequestsException":case"com.amazonaws.sso#TooManyRequestsException":throw await G10(w,h);case"UnauthorizedException":case"com.amazonaws.sso#UnauthorizedException":throw await W10(w,h);default:let $=w.body;return L10({output:f,parsedBody:$,errorCode:s})}},L10,B10=async(f,h)=>{let w=Y({}),s=f.body,$=N0(s,{message:A});Object.assign(w,$);let r=new KU({$metadata:jh(f),...w});return l(r,f.body)},A10=async(f,h)=>{let w=Y({}),s=f.body,$=N0(s,{message:A});Object.assign(w,$);let r=new ZU({$metadata:jh(f),...w});return l(r,f.body)},G10=async(f,h)=>{let w=Y({}),s=f.body,$=N0(s,{message:A});Object.assign(w,$);let r=new JU({$metadata:jh(f),...w});return l(r,f.body)},W10=async(f,h)=>{let w=Y({}),s=f.body,$=N0(s,{message:A});Object.assign(w,$);let r=new VU({$metadata:jh(f),...w});return l(r,f.body)},jh=(f)=>({httpStatusCode:f.statusCode,requestId:f.headers["x-amzn-requestid"]??f.headers["x-amzn-request-id"]??f.headers["x-amz-request-id"],extendedRequestId:f.headers["x-amz-id-2"],cfId:f.headers["x-amz-cf-id"]}),LV="accountId",HU="accessToken",BV="account_id",AV="maxResults",GV="max_result",WV="nextToken",zV="next_token",z10="roleName",R10="role_name",NU="x-amz-sso_bearer_token";var Ar=B(()=>{yh=p(O0(),1),Br=p(m0(),1);J();Cw();S6();L10=Ts(of)});var Gr;var Y6=B(()=>{D();k();J();ks();Cw();Ar();Gr=class Gr extends W.classBuilder().ep(kh).m(function(f,h,w,s){return[z(w,this.serialize,this.deserialize),R(w,f.getEndpointParameterInstructions())]}).s("SWBPortalService","GetRoleCredentials",{}).n("SSOClient","GetRoleCredentialsCommand").f(tJ,fV).ser($V).de(TV).build(){}});var Wr;var DU=B(()=>{D();k();J();ks();Cw();Ar();Wr=class Wr extends W.classBuilder().ep(kh).m(function(f,h,w,s){return[z(w,this.serialize,this.deserialize),R(w,f.getEndpointParameterInstructions())]}).s("SWBPortalService","ListAccountRoles",{}).n("SSOClient","ListAccountRolesCommand").f(hV,void 0).ser(rV).de(FV).build(){}});var zr;var qU=B(()=>{D();k();J();ks();Cw();Ar();zr=class zr extends W.classBuilder().ep(kh).m(function(f,h,w,s){return[z(w,this.serialize,this.deserialize),R(w,f.getEndpointParameterInstructions())]}).s("SWBPortalService","ListAccounts",{}).n("SSOClient","ListAccountsCommand").f(wV,void 0).ser(EV).de(CV).build(){}});var M6;var Q6=B(()=>{D();k();J();ks();Cw();Ar();M6=class M6 extends W.classBuilder().ep(kh).m(function(f,h,w,s){return[z(w,this.serialize,this.deserialize),R(w,f.getEndpointParameterInstructions())]}).s("SWBPortalService","Logout",{}).n("SSOClient","LogoutCommand").f(sV,void 0).ser(UV).de(IV).build(){}});var X10,RV;var XV=B(()=>{J();Y6();DU();qU();Q6();Lr();X10={GetRoleCredentialsCommand:Gr,ListAccountRolesCommand:Wr,ListAccountsCommand:zr,LogoutCommand:M6};RV=class RV extends af{};Es(X10,RV)});var SV=B(()=>{Y6();DU();qU();Q6()});var YV=()=>{};var MV,P70;var QV=B(()=>{MV=p(m0(),1);DU();Lr();P70=MV.createPaginator(af,Wr,"nextToken","nextToken","maxResults")});var KV,q70;var ZV=B(()=>{KV=p(m0(),1);qU();Lr();q70=KV.createPaginator(af,zr,"nextToken","nextToken","maxResults")});var JV=B(()=>{YV();QV();ZV()});var VV=B(()=>{Cw()});var PV=B(()=>{Lr();XV();SV();JV();VV()});var HV={};Th(HV,{SSOClient:()=>af,GetRoleCredentialsCommand:()=>Gr});var NV=B(()=>{PV()});var K6,Rr=!1,Z6=async({ssoStartUrl:f,ssoSession:h,ssoAccountId:w,ssoRegion:s,ssoRoleName:$,ssoClient:r,clientConfig:E,parentClientConfig:U,profile:T,logger:F})=>{let C,I="To refresh this SSO session run aws sso login with the corresponding profile.";if(h)try{let X0=await gZ({profile:T})();C={accessToken:X0.token,expiresAt:new Date(X0.expiration).toISOString()}}catch(X0){throw new a(X0.message,{tryNextLink:Rr,logger:F})}else try{C=await UE(f)}catch(X0){throw new a("The SSO session associated with this profile is invalid. To refresh this SSO session run aws sso login with the corresponding profile.",{tryNextLink:Rr,logger:F})}if(new Date(C.expiresAt).getTime()-Date.now()<=0)throw new a("The SSO session associated with this profile has expired. To refresh this SSO session run aws sso login with the corresponding profile.",{tryNextLink:Rr,logger:F});let{accessToken:L}=C,{SSOClient:G,GetRoleCredentialsCommand:X}=await Promise.resolve().then(() => (NV(),HV)),Q=r||new G(Object.assign({},E??{},{logger:E?.logger??U?.logger,region:E?.region??s})),M;try{M=await Q.send(new X({accountId:w,roleName:$,accessToken:L}))}catch(X0){throw new a(X0,{tryNextLink:Rr,logger:F})}let{roleCredentials:{accessKeyId:q,secretAccessKey:N,sessionToken:y,expiration:n,credentialScope:L0,accountId:b0}={}}=M;if(!q||!N||!y||!n)throw new a("SSO returns an invalid temporary credential.",{tryNextLink:Rr,logger:F});let $1={accessKeyId:q,secretAccessKey:N,sessionToken:y,expiration:new Date(n),...L0&&{credentialScope:L0},...b0&&{accountId:b0}};if(h)K6.setCredentialFeature($1,"CREDENTIALS_SSO","s");else K6.setCredentialFeature($1,"CREDENTIALS_SSO_LEGACY","u");return $1};var DV=B(()=>{K6=p(C1(),1);eZ();Y0();hf()});var J6=(f,h)=>{let{sso_start_url:w,sso_account_id:s,sso_region:$,sso_role_name:r}=f;if(!w||!s||!$||!r)throw new a(`Profile is configured with invalid SSO credentials. Required parameters "sso_account_id", "sso_region", "sso_role_name", "sso_start_url". Got ${Object.keys(f).join(", ")}
51
+ Reference: https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-sso.html`,{tryNextLink:!1,logger:h});return f};var V6=B(()=>{Y0()});var S10=(f={})=>async({callerClientConfig:h}={})=>{f.logger?.debug("@aws-sdk/credential-provider-sso - fromSSO");let{ssoStartUrl:w,ssoAccountId:s,ssoRegion:$,ssoRoleName:r,ssoSession:E}=f,{ssoClient:U}=f,T=y1({profile:f.profile??h?.profile});if(!w&&!s&&!$&&!r&&!E){let C=(await Qh(f))[T];if(!C)throw new a(`Profile ${T} was not found.`,{logger:f.logger});if(!CF(C))throw new a(`Profile ${T} is not configured with SSO credentials.`,{logger:f.logger});if(C?.sso_session){let q=(await CE(f))[C.sso_session],N=` configurations in profile ${T} and sso-session ${C.sso_session}`;if($&&$!==q.sso_region)throw new a("Conflicting SSO region"+N,{tryNextLink:!1,logger:f.logger});if(w&&w!==q.sso_start_url)throw new a("Conflicting SSO start_url"+N,{tryNextLink:!1,logger:f.logger});C.sso_region=q.sso_region,C.sso_start_url=q.sso_start_url}let{sso_start_url:I,sso_account_id:L,sso_region:G,sso_role_name:X,sso_session:Q}=J6(C,f.logger);return Z6({ssoStartUrl:I,ssoSession:Q,ssoAccountId:L,ssoRegion:G,ssoRoleName:X,ssoClient:U,clientConfig:f.clientConfig,parentClientConfig:f.parentClientConfig,profile:T})}else if(!w||!s||!$||!r)throw new a('Incomplete configuration. The fromSSO() argument hash must include "ssoStartUrl", "ssoAccountId", "ssoRegion", "ssoRoleName"',{tryNextLink:!1,logger:f.logger});else return Z6({ssoStartUrl:w,ssoSession:E,ssoAccountId:s,ssoRegion:$,ssoRoleName:r,ssoClient:U,clientConfig:f.clientConfig,parentClientConfig:f.parentClientConfig,profile:T})};var qV=B(()=>{Y0();hf();DV();V6()});var kV=()=>{};var P6={};Th(P6,{validateSsoProfile:()=>J6,isSsoProfile:()=>CF,fromSSO:()=>S10});var H6=B(()=>{qV();kV();V6()});var yV,jV=(f,h,w)=>{let s={EcsContainer:async($)=>{let{fromHttp:r}=await Promise.resolve().then(() => (FF(),TF)),{fromContainerMetadata:E}=await Promise.resolve().then(() => (fr(),t$));return w?.debug("@aws-sdk/credential-provider-ini - credential_source is EcsContainer"),async()=>gf(r($??{}),E($))().then(N6)},Ec2InstanceMetadata:async($)=>{w?.debug("@aws-sdk/credential-provider-ini - credential_source is Ec2InstanceMetadata");let{fromInstanceMetadata:r}=await Promise.resolve().then(() => (fr(),t$));return async()=>r($)().then(N6)},Environment:async($)=>{w?.debug("@aws-sdk/credential-provider-ini - credential_source is Environment");let{fromEnv:r}=await Promise.resolve().then(() => (n3(),SY));return async()=>r($)().then(N6)}};if(f in s)return s[f];else throw new a(`Unsupported credential source in profile ${h}. Got ${f}, expected EcsContainer or Ec2InstanceMetadata or Environment.`,{logger:w})},N6=(f)=>yV.setCredentialFeature(f,"CREDENTIALS_PROFILE_NAMED_PROVIDER","p");var OV=B(()=>{yV=p(C1(),1);Y0()});var D6=H((vV)=>{Object.defineProperty(vV,"__esModule",{value:!0});vV.resolveHttpAuthSchemeConfig=vV.resolveStsAuthConfig=vV.defaultSTSHttpAuthSchemeProvider=vV.defaultSTSHttpAuthSchemeParametersProvider=void 0;var Y10=O0(),lV=Fh(),M10=Xr(),Q10=async(f,h,w)=>{return{operation:lV.getSmithyContext(h).operation,region:await lV.normalizeProvider(f.region)()||(()=>{throw new Error("expected `region` to be configured for `aws.auth#sigv4`")})()}};vV.defaultSTSHttpAuthSchemeParametersProvider=Q10;function K10(f){return{schemeId:"aws.auth#sigv4",signingProperties:{name:"sts",region:f.region},propertiesExtractor:(h,w)=>({signingProperties:{config:h,context:w}})}}function Z10(f){return{schemeId:"smithy.api#noAuth"}}var J10=(f)=>{let h=[];switch(f.operation){case"AssumeRoleWithWebIdentity":{h.push(Z10(f));break}default:h.push(K10(f))}return h};vV.defaultSTSHttpAuthSchemeProvider=J10;var V10=(f)=>({...f,stsClientCtor:M10.STSClient});vV.resolveStsAuthConfig=V10;var P10=(f)=>{let h=vV.resolveStsAuthConfig(f);return{...Y10.resolveAwsSdkSigV4Config(h)}};vV.resolveHttpAuthSchemeConfig=P10});var Sr=H((dV)=>{Object.defineProperty(dV,"__esModule",{value:!0});dV.commonParams=dV.resolveClientEndpointParameters=void 0;var D10=(f)=>{return{...f,useDualstackEndpoint:f.useDualstackEndpoint??!1,useFipsEndpoint:f.useFipsEndpoint??!1,useGlobalEndpoint:f.useGlobalEndpoint??!1,defaultSigningName:"sts"}};dV.resolveClientEndpointParameters=D10;dV.commonParams={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 LP=H((CP)=>{Object.defineProperty(CP,"__esModule",{value:!0});CP.ruleSet=void 0;var fP="required",t="type",G0="fn",W0="argv",lh="ref",cV=!1,q6=!0,Oh="booleanEquals",h1="stringEquals",hP="sigv4",wP="sts",sP="us-east-1",D0="endpoint",gV="https://sts.{Region}.{PartitionResult#dnsSuffix}",Vf="tree",ns="error",y6="getAttr",xV={[fP]:!1,[t]:"String"},k6={[fP]:!0,default:!1,[t]:"Boolean"},$P={[lh]:"Endpoint"},_V={[G0]:"isSet",[W0]:[{[lh]:"Region"}]},w1={[lh]:"Region"},nV={[G0]:"aws.partition",[W0]:[w1],assign:"PartitionResult"},rP={[lh]:"UseFIPS"},EP={[lh]:"UseDualStack"},E1={url:"https://sts.amazonaws.com",properties:{authSchemes:[{name:hP,signingName:wP,signingRegion:sP}]},headers:{}},J1={},eV={conditions:[{[G0]:h1,[W0]:[w1,"aws-global"]}],[D0]:E1,[t]:D0},UP={[G0]:Oh,[W0]:[rP,!0]},TP={[G0]:Oh,[W0]:[EP,!0]},aV={[G0]:y6,[W0]:[{[lh]:"PartitionResult"},"supportsFIPS"]},FP={[lh]:"PartitionResult"},oV={[G0]:Oh,[W0]:[!0,{[G0]:y6,[W0]:[FP,"supportsDualStack"]}]},pV=[{[G0]:"isSet",[W0]:[$P]}],uV=[UP],tV=[TP],k10={version:"1.0",parameters:{Region:xV,UseDualStack:k6,UseFIPS:k6,Endpoint:xV,UseGlobalEndpoint:k6},rules:[{conditions:[{[G0]:Oh,[W0]:[{[lh]:"UseGlobalEndpoint"},q6]},{[G0]:"not",[W0]:pV},_V,nV,{[G0]:Oh,[W0]:[rP,cV]},{[G0]:Oh,[W0]:[EP,cV]}],rules:[{conditions:[{[G0]:h1,[W0]:[w1,"ap-northeast-1"]}],endpoint:E1,[t]:D0},{conditions:[{[G0]:h1,[W0]:[w1,"ap-south-1"]}],endpoint:E1,[t]:D0},{conditions:[{[G0]:h1,[W0]:[w1,"ap-southeast-1"]}],endpoint:E1,[t]:D0},{conditions:[{[G0]:h1,[W0]:[w1,"ap-southeast-2"]}],endpoint:E1,[t]:D0},eV,{conditions:[{[G0]:h1,[W0]:[w1,"ca-central-1"]}],endpoint:E1,[t]:D0},{conditions:[{[G0]:h1,[W0]:[w1,"eu-central-1"]}],endpoint:E1,[t]:D0},{conditions:[{[G0]:h1,[W0]:[w1,"eu-north-1"]}],endpoint:E1,[t]:D0},{conditions:[{[G0]:h1,[W0]:[w1,"eu-west-1"]}],endpoint:E1,[t]:D0},{conditions:[{[G0]:h1,[W0]:[w1,"eu-west-2"]}],endpoint:E1,[t]:D0},{conditions:[{[G0]:h1,[W0]:[w1,"eu-west-3"]}],endpoint:E1,[t]:D0},{conditions:[{[G0]:h1,[W0]:[w1,"sa-east-1"]}],endpoint:E1,[t]:D0},{conditions:[{[G0]:h1,[W0]:[w1,sP]}],endpoint:E1,[t]:D0},{conditions:[{[G0]:h1,[W0]:[w1,"us-east-2"]}],endpoint:E1,[t]:D0},{conditions:[{[G0]:h1,[W0]:[w1,"us-west-1"]}],endpoint:E1,[t]:D0},{conditions:[{[G0]:h1,[W0]:[w1,"us-west-2"]}],endpoint:E1,[t]:D0},{endpoint:{url:gV,properties:{authSchemes:[{name:hP,signingName:wP,signingRegion:"{Region}"}]},headers:J1},[t]:D0}],[t]:Vf},{conditions:pV,rules:[{conditions:uV,error:"Invalid Configuration: FIPS and custom endpoint are not supported",[t]:ns},{conditions:tV,error:"Invalid Configuration: Dualstack and custom endpoint are not supported",[t]:ns},{endpoint:{url:$P,properties:J1,headers:J1},[t]:D0}],[t]:Vf},{conditions:[_V],rules:[{conditions:[nV],rules:[{conditions:[UP,TP],rules:[{conditions:[{[G0]:Oh,[W0]:[q6,aV]},oV],rules:[{endpoint:{url:"https://sts-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:J1,headers:J1},[t]:D0}],[t]:Vf},{error:"FIPS and DualStack are enabled, but this partition does not support one or both",[t]:ns}],[t]:Vf},{conditions:uV,rules:[{conditions:[{[G0]:Oh,[W0]:[aV,q6]}],rules:[{conditions:[{[G0]:h1,[W0]:[{[G0]:y6,[W0]:[FP,"name"]},"aws-us-gov"]}],endpoint:{url:"https://sts.{Region}.amazonaws.com",properties:J1,headers:J1},[t]:D0},{endpoint:{url:"https://sts-fips.{Region}.{PartitionResult#dnsSuffix}",properties:J1,headers:J1},[t]:D0}],[t]:Vf},{error:"FIPS is enabled but this partition does not support FIPS",[t]:ns}],[t]:Vf},{conditions:tV,rules:[{conditions:[oV],rules:[{endpoint:{url:"https://sts.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:J1,headers:J1},[t]:D0}],[t]:Vf},{error:"DualStack is enabled but this partition does not support DualStack",[t]:ns}],[t]:Vf},eV,{endpoint:{url:gV,properties:J1,headers:J1},[t]:D0}],[t]:Vf}],[t]:Vf},{error:"Invalid Configuration: Missing Region",[t]:ns}]};CP.ruleSet=k10});var GP=H((BP)=>{Object.defineProperty(BP,"__esModule",{value:!0});BP.defaultEndpointResolver=void 0;var y10=mE(),j6=vE(),j10=LP(),O10=new j6.EndpointCache({size:50,params:["Endpoint","Region","UseDualStack","UseFIPS","UseGlobalEndpoint"]}),l10=(f,h={})=>{return O10.get(f,()=>j6.resolveEndpoint(j10.ruleSet,{endpointParams:f,logger:h.logger}))};BP.defaultEndpointResolver=l10;j6.customEndpointFunctions.aws=y10.awsEndpointFunctions});var SP=H((RP)=>{Object.defineProperty(RP,"__esModule",{value:!0});RP.getRuntimeConfig=void 0;var v10=O0(),b10=m0(),m10=J0(),d10=Ur(),WP=Ih(),zP=u1(),i10=D6(),c10=GP(),g10=(f)=>{return{apiVersion:"2011-06-15",base64Decoder:f?.base64Decoder??WP.fromBase64,base64Encoder:f?.base64Encoder??WP.toBase64,disableHostPrefix:f?.disableHostPrefix??!1,endpointProvider:f?.endpointProvider??c10.defaultEndpointResolver,extensions:f?.extensions??[],httpAuthSchemeProvider:f?.httpAuthSchemeProvider??i10.defaultSTSHttpAuthSchemeProvider,httpAuthSchemes:f?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:(h)=>h.getIdentityProvider("aws.auth#sigv4"),signer:new v10.AwsSdkSigV4Signer},{schemeId:"smithy.api#noAuth",identityProvider:(h)=>h.getIdentityProvider("smithy.api#noAuth")||(async()=>({})),signer:new b10.NoAuthSigner}],logger:f?.logger??new m10.NoOpLogger,serviceId:f?.serviceId??"STS",urlParser:f?.urlParser??d10.parseUrl,utf8Decoder:f?.utf8Decoder??zP.fromUtf8,utf8Encoder:f?.utf8Encoder??zP.toUtf8}};RP.getRuntimeConfig=g10});var VP=H((ZP)=>{Object.defineProperty(ZP,"__esModule",{value:!0});ZP.getRuntimeConfig=void 0;var x10=l4(),_10=x10.__importDefault(xF()),YP=O0(),MP=nF(),kU=Xs(),n10=m0(),e10=oF(),QP=Fr(),es=Ms(),KP=X4(),a10=pF(),o10=$U(),p10=SP(),u10=J0(),t10=U6(),ff0=J0(),hf0=(f)=>{ff0.emitWarningIfUnsupportedVersion(process.version);let h=t10.resolveDefaultsModeConfig(f),w=()=>h().then(u10.loadConfigsForDefaultMode),s=p10.getRuntimeConfig(f);YP.emitWarningIfUnsupportedVersion(process.version);let $={profile:f?.profile};return{...s,...f,runtime:"node",defaultsMode:h,bodyLengthChecker:f?.bodyLengthChecker??a10.calculateBodyLength,defaultUserAgentProvider:f?.defaultUserAgentProvider??MP.createDefaultUserAgentProvider({serviceId:s.serviceId,clientVersion:_10.default.version}),httpAuthSchemes:f?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:(r)=>r.getIdentityProvider("aws.auth#sigv4")||(async(E)=>await f.credentialDefaultProvider(E?.__config||{})()),signer:new YP.AwsSdkSigV4Signer},{schemeId:"smithy.api#noAuth",identityProvider:(r)=>r.getIdentityProvider("smithy.api#noAuth")||(async()=>({})),signer:new n10.NoAuthSigner}],maxAttempts:f?.maxAttempts??es.loadConfig(QP.NODE_MAX_ATTEMPT_CONFIG_OPTIONS,f),region:f?.region??es.loadConfig(kU.NODE_REGION_CONFIG_OPTIONS,{...kU.NODE_REGION_CONFIG_FILE_OPTIONS,...$}),requestHandler:KP.NodeHttpHandler.create(f?.requestHandler??w),retryMode:f?.retryMode??es.loadConfig({...QP.NODE_RETRY_MODE_CONFIG_OPTIONS,default:async()=>(await w()).retryMode||o10.DEFAULT_RETRY_MODE},f),sha256:f?.sha256??e10.Hash.bind(null,"sha256"),streamCollector:f?.streamCollector??KP.streamCollector,useDualstackEndpoint:f?.useDualstackEndpoint??es.loadConfig(kU.NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS,$),useFipsEndpoint:f?.useFipsEndpoint??es.loadConfig(kU.NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS,$),userAgentAppId:f?.userAgentAppId??es.loadConfig(MP.NODE_APP_ID_CONFIG_OPTIONS,$)}};ZP.getRuntimeConfig=hf0});var NP=H((PP)=>{Object.defineProperty(PP,"__esModule",{value:!0});PP.resolveHttpAuthRuntimeConfig=PP.getHttpAuthExtensionConfiguration=void 0;var wf0=(f)=>{let{httpAuthSchemes:h,httpAuthSchemeProvider:w,credentials:s}=f;return{setHttpAuthScheme($){let r=h.findIndex((E)=>E.schemeId===$.schemeId);if(r===-1)h.push($);else h.splice(r,1,$)},httpAuthSchemes(){return h},setHttpAuthSchemeProvider($){w=$},httpAuthSchemeProvider(){return w},setCredentials($){s=$},credentials(){return s}}};PP.getHttpAuthExtensionConfiguration=wf0;var sf0=(f)=>{return{httpAuthSchemes:f.httpAuthSchemes(),httpAuthSchemeProvider:f.httpAuthSchemeProvider(),credentials:f.credentials()}};PP.resolveHttpAuthRuntimeConfig=sf0});var lP=H((jP)=>{Object.defineProperty(jP,"__esModule",{value:!0});jP.resolveRuntimeExtensions=void 0;var DP=T6(),qP=t0(),kP=J0(),yP=NP(),yU=(f)=>f,rf0=(f,h)=>{let w={...yU(DP.getAwsRegionExtensionConfiguration(f)),...yU(kP.getDefaultExtensionConfiguration(f)),...yU(qP.getHttpHandlerExtensionConfiguration(f)),...yU(yP.getHttpAuthExtensionConfiguration(f))};return h.forEach((s)=>s.configure(w)),{...f,...DP.resolveAwsRegionExtensionConfiguration(w),...kP.resolveDefaultRuntimeConfig(w),...qP.resolveHttpHandlerRuntimeConfig(w),...yP.resolveHttpAuthRuntimeConfig(w)}};jP.resolveRuntimeExtensions=rf0});var Xr=H((l6)=>{Object.defineProperty(l6,"__esModule",{value:!0});l6.STSClient=l6.__Client=void 0;var vP=LF(),Ef0=BF(),Uf0=GF(),bP=cE(),Tf0=Xs(),O6=m0(),Ff0=KF(),Cf0=Qs(),mP=Fr(),iP=J0();Object.defineProperty(l6,"__Client",{enumerable:!0,get:function(){return iP.Client}});var dP=D6(),If0=Sr(),Lf0=VP(),Bf0=lP();class cP extends iP.Client{config;constructor(...[f]){let h=Lf0.getRuntimeConfig(f||{}),w=If0.resolveClientEndpointParameters(h),s=bP.resolveUserAgentConfig(w),$=mP.resolveRetryConfig(s),r=Tf0.resolveRegionConfig($),E=vP.resolveHostHeaderConfig(r),U=Cf0.resolveEndpointConfig(E),T=dP.resolveHttpAuthSchemeConfig(U),F=Bf0.resolveRuntimeExtensions(T,f?.extensions||[]);super(F);this.config=F,this.middlewareStack.use(bP.getUserAgentPlugin(this.config)),this.middlewareStack.use(mP.getRetryPlugin(this.config)),this.middlewareStack.use(Ff0.getContentLengthPlugin(this.config)),this.middlewareStack.use(vP.getHostHeaderPlugin(this.config)),this.middlewareStack.use(Ef0.getLoggerPlugin(this.config)),this.middlewareStack.use(Uf0.getRecursionDetectionPlugin(this.config)),this.middlewareStack.use(O6.getHttpAuthSchemeEndpointRuleSetPlugin(this.config,{httpAuthSchemeParametersProvider:dP.defaultSTSHttpAuthSchemeParametersProvider,identityProviderConfigProvider:async(C)=>new O6.DefaultIdentityProviderConfig({"aws.auth#sigv4":C.credentials})})),this.middlewareStack.use(O6.getHttpSigningPlugin(this.config))}destroy(){super.destroy()}}l6.STSClient=cP});var AC=H((YX0,BC)=>{var{defineProperty:jU,getOwnPropertyDescriptor:Af0,getOwnPropertyNames:Gf0}=Object,Wf0=Object.prototype.hasOwnProperty,e=(f,h)=>jU(f,"name",{value:h,configurable:!0}),zf0=(f,h)=>{for(var w in h)jU(f,w,{get:h[w],enumerable:!0})},EC=(f,h,w,s)=>{if(h&&typeof h==="object"||typeof h==="function"){for(let $ of Gf0(h))if(!Wf0.call(f,$)&&$!==w)jU(f,$,{get:()=>h[$],enumerable:!(s=Af0(h,$))||s.enumerable})}return f},Rf0=(f,h,w)=>(EC(f,h,"default"),w&&EC(w,h,"default")),Xf0=(f)=>EC(jU({},"__esModule",{value:!0}),f),TC={};zf0(TC,{AssumeRoleCommand:()=>IC,AssumeRoleResponseFilterSensitiveLog:()=>nP,AssumeRoleWithWebIdentityCommand:()=>LC,AssumeRoleWithWebIdentityRequestFilterSensitiveLog:()=>fH,AssumeRoleWithWebIdentityResponseFilterSensitiveLog:()=>hH,ClientInputEndpointParameters:()=>Ih0.ClientInputEndpointParameters,CredentialsFilterSensitiveLog:()=>FC,ExpiredTokenException:()=>eP,IDPCommunicationErrorException:()=>wH,IDPRejectedClaimException:()=>uP,InvalidIdentityTokenException:()=>tP,MalformedPolicyDocumentException:()=>aP,PackedPolicyTooLargeException:()=>oP,RegionDisabledException:()=>pP,STS:()=>BH,STSServiceException:()=>uf,decorateDefaultCredentialProvider:()=>Ah0,getDefaultRoleAssumer:()=>XH,getDefaultRoleAssumerWithWebIdentity:()=>SH});BC.exports=Xf0(TC);Rf0(TC,Xr(),BC.exports);var Sf0=J0(),Yf0=Qs(),Mf0=Dw(),Qf0=J0(),Kf0=Sr(),_P=J0(),Zf0=J0(),uf=class f extends Zf0.ServiceException{static{e(this,"STSServiceException")}constructor(h){super(h);Object.setPrototypeOf(this,f.prototype)}},FC=e((f)=>({...f,...f.SecretAccessKey&&{SecretAccessKey:_P.SENSITIVE_STRING}}),"CredentialsFilterSensitiveLog"),nP=e((f)=>({...f,...f.Credentials&&{Credentials:FC(f.Credentials)}}),"AssumeRoleResponseFilterSensitiveLog"),eP=class f extends uf{static{e(this,"ExpiredTokenException")}name="ExpiredTokenException";$fault="client";constructor(h){super({name:"ExpiredTokenException",$fault:"client",...h});Object.setPrototypeOf(this,f.prototype)}},aP=class f extends uf{static{e(this,"MalformedPolicyDocumentException")}name="MalformedPolicyDocumentException";$fault="client";constructor(h){super({name:"MalformedPolicyDocumentException",$fault:"client",...h});Object.setPrototypeOf(this,f.prototype)}},oP=class f extends uf{static{e(this,"PackedPolicyTooLargeException")}name="PackedPolicyTooLargeException";$fault="client";constructor(h){super({name:"PackedPolicyTooLargeException",$fault:"client",...h});Object.setPrototypeOf(this,f.prototype)}},pP=class f extends uf{static{e(this,"RegionDisabledException")}name="RegionDisabledException";$fault="client";constructor(h){super({name:"RegionDisabledException",$fault:"client",...h});Object.setPrototypeOf(this,f.prototype)}},uP=class f extends uf{static{e(this,"IDPRejectedClaimException")}name="IDPRejectedClaimException";$fault="client";constructor(h){super({name:"IDPRejectedClaimException",$fault:"client",...h});Object.setPrototypeOf(this,f.prototype)}},tP=class f extends uf{static{e(this,"InvalidIdentityTokenException")}name="InvalidIdentityTokenException";$fault="client";constructor(h){super({name:"InvalidIdentityTokenException",$fault:"client",...h});Object.setPrototypeOf(this,f.prototype)}},fH=e((f)=>({...f,...f.WebIdentityToken&&{WebIdentityToken:_P.SENSITIVE_STRING}}),"AssumeRoleWithWebIdentityRequestFilterSensitiveLog"),hH=e((f)=>({...f,...f.Credentials&&{Credentials:FC(f.Credentials)}}),"AssumeRoleWithWebIdentityResponseFilterSensitiveLog"),wH=class f extends uf{static{e(this,"IDPCommunicationErrorException")}name="IDPCommunicationErrorException";$fault="client";constructor(h){super({name:"IDPCommunicationErrorException",$fault:"client",...h});Object.setPrototypeOf(this,f.prototype)}},CC=O0(),Jf0=t0(),R0=J0(),Vf0=e(async(f,h)=>{let w=TH,s;return s=LH({...vf0(f,h),[CH]:wh0,[IH]:FH}),UH(h,w,"/",void 0,s)},"se_AssumeRoleCommand"),Pf0=e(async(f,h)=>{let w=TH,s;return s=LH({...bf0(f,h),[CH]:sh0,[IH]:FH}),UH(h,w,"/",void 0,s)},"se_AssumeRoleWithWebIdentityCommand"),Hf0=e(async(f,h)=>{if(f.statusCode>=300)return sH(f,h);let w=await CC.parseXmlBody(f.body,h),s={};return s=_f0(w.AssumeRoleResult,h),{$metadata:tf(f),...s}},"de_AssumeRoleCommand"),Nf0=e(async(f,h)=>{if(f.statusCode>=300)return sH(f,h);let w=await CC.parseXmlBody(f.body,h),s={};return s=nf0(w.AssumeRoleWithWebIdentityResult,h),{$metadata:tf(f),...s}},"de_AssumeRoleWithWebIdentityCommand"),sH=e(async(f,h)=>{let w={...f,body:await CC.parseXmlErrorBody(f.body,h)},s=$h0(f,w.body);switch(s){case"ExpiredTokenException":case"com.amazonaws.sts#ExpiredTokenException":throw await Df0(w,h);case"MalformedPolicyDocument":case"com.amazonaws.sts#MalformedPolicyDocumentException":throw await jf0(w,h);case"PackedPolicyTooLarge":case"com.amazonaws.sts#PackedPolicyTooLargeException":throw await Of0(w,h);case"RegionDisabledException":case"com.amazonaws.sts#RegionDisabledException":throw await lf0(w,h);case"IDPCommunicationError":case"com.amazonaws.sts#IDPCommunicationErrorException":throw await qf0(w,h);case"IDPRejectedClaim":case"com.amazonaws.sts#IDPRejectedClaimException":throw await kf0(w,h);case"InvalidIdentityToken":case"com.amazonaws.sts#InvalidIdentityTokenException":throw await yf0(w,h);default:let $=w.body;return hh0({output:f,parsedBody:$.Error,errorCode:s})}},"de_CommandError"),Df0=e(async(f,h)=>{let w=f.body,s=ef0(w.Error,h),$=new eP({$metadata:tf(f),...s});return R0.decorateServiceException($,w)},"de_ExpiredTokenExceptionRes"),qf0=e(async(f,h)=>{let w=f.body,s=af0(w.Error,h),$=new wH({$metadata:tf(f),...s});return R0.decorateServiceException($,w)},"de_IDPCommunicationErrorExceptionRes"),kf0=e(async(f,h)=>{let w=f.body,s=of0(w.Error,h),$=new uP({$metadata:tf(f),...s});return R0.decorateServiceException($,w)},"de_IDPRejectedClaimExceptionRes"),yf0=e(async(f,h)=>{let w=f.body,s=pf0(w.Error,h),$=new tP({$metadata:tf(f),...s});return R0.decorateServiceException($,w)},"de_InvalidIdentityTokenExceptionRes"),jf0=e(async(f,h)=>{let w=f.body,s=uf0(w.Error,h),$=new aP({$metadata:tf(f),...s});return R0.decorateServiceException($,w)},"de_MalformedPolicyDocumentExceptionRes"),Of0=e(async(f,h)=>{let w=f.body,s=tf0(w.Error,h),$=new oP({$metadata:tf(f),...s});return R0.decorateServiceException($,w)},"de_PackedPolicyTooLargeExceptionRes"),lf0=e(async(f,h)=>{let w=f.body,s=fh0(w.Error,h),$=new pP({$metadata:tf(f),...s});return R0.decorateServiceException($,w)},"de_RegionDisabledExceptionRes"),vf0=e((f,h)=>{let w={};if(f[h$]!=null)w[h$]=f[h$];if(f[w$]!=null)w[w$]=f[w$];if(f[ts]!=null){let s=$H(f[ts],h);if(f[ts]?.length===0)w.PolicyArns=[];Object.entries(s).forEach(([$,r])=>{let E=`PolicyArns.${$}`;w[E]=r})}if(f[us]!=null)w[us]=f[us];if(f[ps]!=null)w[ps]=f[ps];if(f[fC]!=null){let s=xf0(f[fC],h);if(f[fC]?.length===0)w.Tags=[];Object.entries(s).forEach(([$,r])=>{let E=`Tags.${$}`;w[E]=r})}if(f[wC]!=null){let s=gf0(f[wC],h);if(f[wC]?.length===0)w.TransitiveTagKeys=[];Object.entries(s).forEach(([$,r])=>{let E=`TransitiveTagKeys.${$}`;w[E]=r})}if(f[g6]!=null)w[g6]=f[g6];if(f[u6]!=null)w[u6]=f[u6];if(f[hC]!=null)w[hC]=f[hC];if(f[pf]!=null)w[pf]=f[pf];if(f[n6]!=null){let s=if0(f[n6],h);if(f[n6]?.length===0)w.ProvidedContexts=[];Object.entries(s).forEach(([$,r])=>{let E=`ProvidedContexts.${$}`;w[E]=r})}return w},"se_AssumeRoleRequest"),bf0=e((f,h)=>{let w={};if(f[h$]!=null)w[h$]=f[h$];if(f[w$]!=null)w[w$]=f[w$];if(f[$C]!=null)w[$C]=f[$C];if(f[e6]!=null)w[e6]=f[e6];if(f[ts]!=null){let s=$H(f[ts],h);if(f[ts]?.length===0)w.PolicyArns=[];Object.entries(s).forEach(([$,r])=>{let E=`PolicyArns.${$}`;w[E]=r})}if(f[us]!=null)w[us]=f[us];if(f[ps]!=null)w[ps]=f[ps];return w},"se_AssumeRoleWithWebIdentityRequest"),$H=e((f,h)=>{let w={},s=1;for(let $ of f){if($===null)continue;let r=mf0($,h);Object.entries(r).forEach(([E,U])=>{w[`member.${s}.${E}`]=U}),s++}return w},"se_policyDescriptorListType"),mf0=e((f,h)=>{let w={};if(f[rC]!=null)w[rC]=f[rC];return w},"se_PolicyDescriptorType"),df0=e((f,h)=>{let w={};if(f[_6]!=null)w[_6]=f[_6];if(f[i6]!=null)w[i6]=f[i6];return w},"se_ProvidedContext"),if0=e((f,h)=>{let w={},s=1;for(let $ of f){if($===null)continue;let r=df0($,h);Object.entries(r).forEach(([E,U])=>{w[`member.${s}.${E}`]=U}),s++}return w},"se_ProvidedContextsListType"),cf0=e((f,h)=>{let w={};if(f[x6]!=null)w[x6]=f[x6];if(f[sC]!=null)w[sC]=f[sC];return w},"se_Tag"),gf0=e((f,h)=>{let w={},s=1;for(let $ of f){if($===null)continue;w[`member.${s}`]=$,s++}return w},"se_tagKeyListType"),xf0=e((f,h)=>{let w={},s=1;for(let $ of f){if($===null)continue;let r=cf0($,h);Object.entries(r).forEach(([E,U])=>{w[`member.${s}.${E}`]=U}),s++}return w},"se_tagListType"),rH=e((f,h)=>{let w={};if(f[b6]!=null)w[b6]=R0.expectString(f[b6]);if(f[m6]!=null)w[m6]=R0.expectString(f[m6]);return w},"de_AssumedRoleUser"),_f0=e((f,h)=>{let w={};if(f[os]!=null)w[os]=EH(f[os],h);if(f[as]!=null)w[as]=rH(f[as],h);if(f[f$]!=null)w[f$]=R0.strictParseInt32(f[f$]);if(f[pf]!=null)w[pf]=R0.expectString(f[pf]);return w},"de_AssumeRoleResponse"),nf0=e((f,h)=>{let w={};if(f[os]!=null)w[os]=EH(f[os],h);if(f[p6]!=null)w[p6]=R0.expectString(f[p6]);if(f[as]!=null)w[as]=rH(f[as],h);if(f[f$]!=null)w[f$]=R0.strictParseInt32(f[f$]);if(f[a6]!=null)w[a6]=R0.expectString(f[a6]);if(f[d6]!=null)w[d6]=R0.expectString(f[d6]);if(f[pf]!=null)w[pf]=R0.expectString(f[pf]);return w},"de_AssumeRoleWithWebIdentityResponse"),EH=e((f,h)=>{let w={};if(f[v6]!=null)w[v6]=R0.expectString(f[v6]);if(f[o6]!=null)w[o6]=R0.expectString(f[o6]);if(f[t6]!=null)w[t6]=R0.expectString(f[t6]);if(f[c6]!=null)w[c6]=R0.expectNonNull(R0.parseRfc3339DateTimeWithOffset(f[c6]));return w},"de_Credentials"),ef0=e((f,h)=>{let w={};if(f[i0]!=null)w[i0]=R0.expectString(f[i0]);return w},"de_ExpiredTokenException"),af0=e((f,h)=>{let w={};if(f[i0]!=null)w[i0]=R0.expectString(f[i0]);return w},"de_IDPCommunicationErrorException"),of0=e((f,h)=>{let w={};if(f[i0]!=null)w[i0]=R0.expectString(f[i0]);return w},"de_IDPRejectedClaimException"),pf0=e((f,h)=>{let w={};if(f[i0]!=null)w[i0]=R0.expectString(f[i0]);return w},"de_InvalidIdentityTokenException"),uf0=e((f,h)=>{let w={};if(f[i0]!=null)w[i0]=R0.expectString(f[i0]);return w},"de_MalformedPolicyDocumentException"),tf0=e((f,h)=>{let w={};if(f[i0]!=null)w[i0]=R0.expectString(f[i0]);return w},"de_PackedPolicyTooLargeException"),fh0=e((f,h)=>{let w={};if(f[i0]!=null)w[i0]=R0.expectString(f[i0]);return w},"de_RegionDisabledException"),tf=e((f)=>({httpStatusCode:f.statusCode,requestId:f.headers["x-amzn-requestid"]??f.headers["x-amzn-request-id"]??f.headers["x-amz-request-id"],extendedRequestId:f.headers["x-amz-id-2"],cfId:f.headers["x-amz-cf-id"]}),"deserializeMetadata"),hh0=R0.withBaseException(uf),UH=e(async(f,h,w,s,$)=>{let{hostname:r,protocol:E="https",port:U,path:T}=await f.endpoint(),F={protocol:E,hostname:r,port:U,method:"POST",path:T.endsWith("/")?T.slice(0,-1)+w:T+w,headers:h};if(s!==void 0)F.hostname=s;if($!==void 0)F.body=$;return new Jf0.HttpRequest(F)},"buildHttpRpcRequest"),TH={"content-type":"application/x-www-form-urlencoded"},FH="2011-06-15",CH="Action",v6="AccessKeyId",wh0="AssumeRole",b6="AssumedRoleId",as="AssumedRoleUser",sh0="AssumeRoleWithWebIdentity",m6="Arn",d6="Audience",os="Credentials",i6="ContextAssertion",ps="DurationSeconds",c6="Expiration",g6="ExternalId",x6="Key",us="Policy",ts="PolicyArns",_6="ProviderArn",n6="ProvidedContexts",e6="ProviderId",f$="PackedPolicySize",a6="Provider",h$="RoleArn",w$="RoleSessionName",o6="SecretAccessKey",p6="SubjectFromWebIdentityToken",pf="SourceIdentity",u6="SerialNumber",t6="SessionToken",fC="Tags",hC="TokenCode",wC="TransitiveTagKeys",IH="Version",sC="Value",$C="WebIdentityToken",rC="arn",i0="message",LH=e((f)=>Object.entries(f).map(([h,w])=>R0.extendedEncodeURIComponent(h)+"="+R0.extendedEncodeURIComponent(w)).join("&"),"buildFormUrlencodedString"),$h0=e((f,h)=>{if(h.Error?.Code!==void 0)return h.Error.Code;if(f.statusCode==404)return"NotFound"},"loadQueryErrorCode"),IC=class extends Qf0.Command.classBuilder().ep(Kf0.commonParams).m(function(f,h,w,s){return[Mf0.getSerdePlugin(w,this.serialize,this.deserialize),Yf0.getEndpointPlugin(w,f.getEndpointParameterInstructions())]}).s("AWSSecurityTokenServiceV20110615","AssumeRole",{}).n("STSClient","AssumeRoleCommand").f(void 0,nP).ser(Vf0).de(Hf0).build(){static{e(this,"AssumeRoleCommand")}},rh0=Qs(),Eh0=Dw(),Uh0=J0(),Th0=Sr(),LC=class extends Uh0.Command.classBuilder().ep(Th0.commonParams).m(function(f,h,w,s){return[Eh0.getSerdePlugin(w,this.serialize,this.deserialize),rh0.getEndpointPlugin(w,f.getEndpointParameterInstructions())]}).s("AWSSecurityTokenServiceV20110615","AssumeRoleWithWebIdentity",{}).n("STSClient","AssumeRoleWithWebIdentityCommand").f(fH,hH).ser(Pf0).de(Nf0).build(){static{e(this,"AssumeRoleWithWebIdentityCommand")}},Fh0=Xr(),Ch0={AssumeRoleCommand:IC,AssumeRoleWithWebIdentityCommand:LC},BH=class extends Fh0.STSClient{static{e(this,"STS")}};Sf0.createAggregatedClient(Ch0,BH);var Ih0=Sr(),UC=C1(),xP="us-east-1",AH=e((f)=>{if(typeof f?.Arn==="string"){let h=f.Arn.split(":");if(h.length>4&&h[4]!=="")return h[4]}return},"getAccountIdFromAssumedRoleUser"),GH=e(async(f,h,w)=>{let s=typeof f==="function"?await f():f,$=typeof h==="function"?await h():h;return w?.debug?.("@aws-sdk/client-sts::resolveRegion","accepting first of:",`${s} (provider)`,`${$} (parent client)`,`${xP} (STS default)`),s??$??xP},"resolveRegion"),Lh0=e((f,h)=>{let w,s;return async($,r)=>{if(s=$,!w){let{logger:C=f?.parentClientConfig?.logger,region:I,requestHandler:L=f?.parentClientConfig?.requestHandler,credentialProviderLogger:G}=f,X=await GH(I,f?.parentClientConfig?.region,G),Q=!WH(L);w=new h({profile:f?.parentClientConfig?.profile,credentialDefaultProvider:e(()=>async()=>s,"credentialDefaultProvider"),region:X,requestHandler:Q?L:void 0,logger:C})}let{Credentials:E,AssumedRoleUser:U}=await w.send(new IC(r));if(!E||!E.AccessKeyId||!E.SecretAccessKey)throw new Error(`Invalid response from STS.assumeRole call with role ${r.RoleArn}`);let T=AH(U),F={accessKeyId:E.AccessKeyId,secretAccessKey:E.SecretAccessKey,sessionToken:E.SessionToken,expiration:E.Expiration,...E.CredentialScope&&{credentialScope:E.CredentialScope},...T&&{accountId:T}};return UC.setCredentialFeature(F,"CREDENTIALS_STS_ASSUME_ROLE","i"),F}},"getDefaultRoleAssumer"),Bh0=e((f,h)=>{let w;return async(s)=>{if(!w){let{logger:T=f?.parentClientConfig?.logger,region:F,requestHandler:C=f?.parentClientConfig?.requestHandler,credentialProviderLogger:I}=f,L=await GH(F,f?.parentClientConfig?.region,I),G=!WH(C);w=new h({profile:f?.parentClientConfig?.profile,region:L,requestHandler:G?C:void 0,logger:T})}let{Credentials:$,AssumedRoleUser:r}=await w.send(new LC(s));if(!$||!$.AccessKeyId||!$.SecretAccessKey)throw new Error(`Invalid response from STS.assumeRoleWithWebIdentity call with role ${s.RoleArn}`);let E=AH(r),U={accessKeyId:$.AccessKeyId,secretAccessKey:$.SecretAccessKey,sessionToken:$.SessionToken,expiration:$.Expiration,...$.CredentialScope&&{credentialScope:$.CredentialScope},...E&&{accountId:E}};if(E)UC.setCredentialFeature(U,"RESOLVED_ACCOUNT_ID","T");return UC.setCredentialFeature(U,"CREDENTIALS_STS_ASSUME_ROLE_WEB_ID","k"),U}},"getDefaultRoleAssumerWithWebIdentity"),WH=e((f)=>{return f?.metadata?.handlerProtocol==="h2"},"isH2"),zH=Xr(),RH=e((f,h)=>{if(!h)return f;else return class w extends f{static{e(this,"CustomizableSTSClient")}constructor(s){super(s);for(let $ of h)this.middlewareStack.use($)}}},"getCustomizableStsClientCtor"),XH=e((f={},h)=>Lh0(f,RH(zH.STSClient,h)),"getDefaultRoleAssumer"),SH=e((f={},h)=>Bh0(f,RH(zH.STSClient,h)),"getDefaultRoleAssumerWithWebIdentity"),Ah0=e((f)=>(h)=>f({roleAssumer:XH(h),roleAssumerWithWebIdentity:SH(h),...h}),"decorateDefaultCredentialProvider")});var GC,MH=(f,{profile:h="default",logger:w}={})=>{return Boolean(f)&&typeof f==="object"&&typeof f.role_arn==="string"&&["undefined","string"].indexOf(typeof f.role_session_name)>-1&&["undefined","string"].indexOf(typeof f.external_id)>-1&&["undefined","string"].indexOf(typeof f.mfa_serial)>-1&&(Gh0(f,{profile:h,logger:w})||Wh0(f,{profile:h,logger:w}))},Gh0=(f,{profile:h,logger:w})=>{let s=typeof f.source_profile==="string"&&typeof f.credential_source==="undefined";if(s)w?.debug?.(` ${h} isAssumeRoleWithSourceProfile source_profile=${f.source_profile}`);return s},Wh0=(f,{profile:h,logger:w})=>{let s=typeof f.credential_source==="string"&&typeof f.source_profile==="undefined";if(s)w?.debug?.(` ${h} isCredentialSourceProfile credential_source=${f.credential_source}`);return s},QH=async(f,h,w,s={})=>{w.logger?.debug("@aws-sdk/credential-provider-ini - resolveAssumeRoleCredentials (STS)");let $=h[f],{source_profile:r,region:E}=$;if(!w.roleAssumer){let{getDefaultRoleAssumer:T}=await Promise.resolve().then(() => p(AC(),1));w.roleAssumer=T({...w.clientConfig,credentialProviderLogger:w.logger,parentClientConfig:{...w?.parentClientConfig,region:E??w?.parentClientConfig?.region}},w.clientPlugins)}if(r&&r in s)throw new a(`Detected a cycle attempting to resolve credentials for profile ${y1(w)}. Profiles visited: `+Object.keys(s).join(", "),{logger:w.logger});w.logger?.debug(`@aws-sdk/credential-provider-ini - finding credential resolver using ${r?`source_profile=[${r}]`:`profile=[${f}]`}`);let U=r?OU(r,h,w,{...s,[r]:!0},YH(h[r]??{})):(await jV($.credential_source,f,w.logger)(w))();if(YH($))return U.then((T)=>GC.setCredentialFeature(T,"CREDENTIALS_PROFILE_SOURCE_PROFILE","o"));else{let T={RoleArn:$.role_arn,RoleSessionName:$.role_session_name||`aws-sdk-js-${Date.now()}`,ExternalId:$.external_id,DurationSeconds:parseInt($.duration_seconds||"3600",10)},{mfa_serial:F}=$;if(F){if(!w.mfaCodeProvider)throw new a(`Profile ${f} requires multi-factor authentication, but no MFA code callback was provided.`,{logger:w.logger,tryNextLink:!1});T.SerialNumber=F,T.TokenCode=await w.mfaCodeProvider(F)}let C=await U;return w.roleAssumer(C,T).then((I)=>GC.setCredentialFeature(I,"CREDENTIALS_PROFILE_SOURCE_PROFILE","o"))}},YH=(f)=>{return!f.role_arn&&!!f.credential_source};var KH=B(()=>{GC=p(C1(),1);Y0();hf();OV();WC()});var ZH,JH=(f,h,w)=>{if(h.Version!==1)throw Error(`Profile ${f} credential_process did not return Version 1.`);if(h.AccessKeyId===void 0||h.SecretAccessKey===void 0)throw Error(`Profile ${f} credential_process returned invalid credentials.`);if(h.Expiration){let r=new Date;if(new Date(h.Expiration)<r)throw Error(`Profile ${f} credential_process returned expired credentials.`)}let s=h.AccountId;if(!s&&w?.[f]?.aws_account_id)s=w[f].aws_account_id;let $={accessKeyId:h.AccessKeyId,secretAccessKey:h.SecretAccessKey,...h.SessionToken&&{sessionToken:h.SessionToken},...h.Expiration&&{expiration:new Date(h.Expiration)},...h.CredentialScope&&{credentialScope:h.CredentialScope},...s&&{accountId:s}};return ZH.setCredentialFeature($,"CREDENTIALS_PROCESS","w"),$};var VH=B(()=>{ZH=p(C1(),1)});import{exec as zh0}from"child_process";import{promisify as Rh0}from"util";var PH=async(f,h,w)=>{let s=h[f];if(h[f]){let $=s.credential_process;if($!==void 0){let r=Rh0(zh0);try{let{stdout:E}=await r($),U;try{U=JSON.parse(E.trim())}catch{throw Error(`Profile ${f} credential_process returned invalid JSON.`)}return JH(f,U,h)}catch(E){throw new a(E.message,{logger:w})}}else throw new a(`Profile ${f} did not contain credential_process.`,{logger:w})}else throw new a(`Profile ${f} could not be found in shared credentials file.`,{logger:w})};var HH=B(()=>{Y0();VH()});var Xh0=(f={})=>async({callerClientConfig:h}={})=>{f.logger?.debug("@aws-sdk/credential-provider-process - fromProcess");let w=await Qh(f);return PH(y1({profile:f.profile??h?.profile}),w,f.logger)};var NH=B(()=>{hf();HH()});var zC={};Th(zC,{fromProcess:()=>Xh0});var RC=B(()=>{NH()});var DH,qH=(f)=>Boolean(f)&&typeof f==="object"&&typeof f.credential_process==="string",kH=async(f,h)=>Promise.resolve().then(() => (RC(),zC)).then(({fromProcess:w})=>w({...f,profile:h})().then((s)=>DH.setCredentialFeature(s,"CREDENTIALS_PROFILE_PROCESS","v")));var yH=B(()=>{DH=p(C1(),1)});var XC,jH=async(f,h,w={})=>{let{fromSSO:s}=await Promise.resolve().then(() => (H6(),P6));return s({profile:f,logger:w.logger,parentClientConfig:w.parentClientConfig,clientConfig:w.clientConfig})().then(($)=>{if(h.sso_session)return XC.setCredentialFeature($,"CREDENTIALS_PROFILE_SSO","r");else return XC.setCredentialFeature($,"CREDENTIALS_PROFILE_SSO_LEGACY","t")})},OH=(f)=>f&&(typeof f.sso_start_url==="string"||typeof f.sso_account_id==="string"||typeof f.sso_session==="string"||typeof f.sso_region==="string"||typeof f.sso_role_name==="string");var lH=B(()=>{XC=p(C1(),1)});var vH,SC=(f)=>Boolean(f)&&typeof f==="object"&&typeof f.aws_access_key_id==="string"&&typeof f.aws_secret_access_key==="string"&&["undefined","string"].indexOf(typeof f.aws_session_token)>-1&&["undefined","string"].indexOf(typeof f.aws_account_id)>-1,YC=async(f,h)=>{h?.logger?.debug("@aws-sdk/credential-provider-ini - resolveStaticCredentials");let w={accessKeyId:f.aws_access_key_id,secretAccessKey:f.aws_secret_access_key,sessionToken:f.aws_session_token,...f.aws_credential_scope&&{credentialScope:f.aws_credential_scope},...f.aws_account_id&&{accountId:f.aws_account_id}};return vH.setCredentialFeature(w,"CREDENTIALS_PROFILE","n")};var bH=B(()=>{vH=p(C1(),1)});var MC=(f)=>async(h)=>{f.logger?.debug("@aws-sdk/credential-provider-web-identity - fromWebToken");let{roleArn:w,roleSessionName:s,webIdentityToken:$,providerId:r,policyArns:E,policy:U,durationSeconds:T}=f,{roleAssumerWithWebIdentity:F}=f;if(!F){let{getDefaultRoleAssumerWithWebIdentity:C}=await Promise.resolve().then(() => p(AC(),1));F=C({...f.clientConfig,credentialProviderLogger:f.logger,parentClientConfig:{...h?.callerClientConfig,...f.parentClientConfig}},f.clientPlugins)}return F({RoleArn:w,RoleSessionName:s??`aws-sdk-js-session-${Date.now()}`,WebIdentityToken:$,ProviderId:r,PolicyArns:E,Policy:U,DurationSeconds:T})};import{readFileSync as Sh0}from"fs";var dH,mH="AWS_WEB_IDENTITY_TOKEN_FILE",Yh0="AWS_ROLE_ARN",Mh0="AWS_ROLE_SESSION_NAME",Qh0=(f={})=>async()=>{f.logger?.debug("@aws-sdk/credential-provider-web-identity - fromTokenFile");let h=f?.webIdentityTokenFile??process.env[mH],w=f?.roleArn??process.env[Yh0],s=f?.roleSessionName??process.env[Mh0];if(!h||!w)throw new a("Web identity configuration not specified",{logger:f.logger});let $=await MC({...f,webIdentityToken:Sh0(h,{encoding:"ascii"}),roleArn:w,roleSessionName:s})();if(h===process.env[mH])dH.setCredentialFeature($,"CREDENTIALS_ENV_VARS_STS_WEB_ID_TOKEN","h");return $};var iH=B(()=>{dH=p(C1(),1);Y0()});var QC={};Th(QC,{fromWebToken:()=>MC,fromTokenFile:()=>Qh0});var KC=B(()=>{iH()});var cH,gH=(f)=>Boolean(f)&&typeof f==="object"&&typeof f.web_identity_token_file==="string"&&typeof f.role_arn==="string"&&["undefined","string"].indexOf(typeof f.role_session_name)>-1,xH=async(f,h)=>Promise.resolve().then(() => (KC(),QC)).then(({fromTokenFile:w})=>w({webIdentityTokenFile:f.web_identity_token_file,roleArn:f.role_arn,roleSessionName:f.role_session_name,roleAssumerWithWebIdentity:h.roleAssumerWithWebIdentity,logger:h.logger,parentClientConfig:h.parentClientConfig})().then((s)=>cH.setCredentialFeature(s,"CREDENTIALS_PROFILE_STS_WEB_ID_TOKEN","q")));var _H=B(()=>{cH=p(C1(),1)});var OU=async(f,h,w,s={},$=!1)=>{let r=h[f];if(Object.keys(s).length>0&&SC(r))return YC(r,w);if($||MH(r,{profile:f,logger:w.logger}))return QH(f,h,w,s);if(SC(r))return YC(r,w);if(gH(r))return xH(r,w);if(qH(r))return kH(w,f);if(OH(r))return await jH(f,r,w);throw new a(`Could not resolve credentials using profile: [${f}] in configuration/credentials file(s).`,{logger:w.logger})};var WC=B(()=>{Y0();KH();yH();lH();bH();_H()});var Kh0=(f={})=>async({callerClientConfig:h}={})=>{let w={...f,parentClientConfig:{...h,...f.parentClientConfig}};w.logger?.debug("@aws-sdk/credential-provider-ini - fromIni");let s=await Qh(w);return OU(y1({profile:f.profile??h?.profile}),s,w)};var nH=B(()=>{hf();WC()});var eH={};Th(eH,{fromIni:()=>Kh0});var aH=B(()=>{nH()});E4();U4();T4();m$();Yh();var $$=p(m0(),1);$E();D();$w();J();var TY=p(O0(),1);cf();var FY=async(f,h,w)=>{return{operation:Xh(h).operation,region:await L1(f.region)()||(()=>{throw new Error("expected `region` to be configured for `aws.auth#sigv4`")})()}};function K_(f){return{schemeId:"aws.auth#sigv4",signingProperties:{name:"route53",region:f.region},propertiesExtractor:(h,w)=>({signingProperties:{config:h,context:w}})}}var CY=(f)=>{let h=[];switch(f.operation){default:h.push(K_(f))}return h},IY=(f)=>{return{...TY.resolveAwsSdkSigV4Config(f)}};var LY=(f)=>{return{...f,useDualstackEndpoint:f.useDualstackEndpoint??!1,useFipsEndpoint:f.useFipsEndpoint??!1,defaultSigningName:"route53"}},K={UseFIPS:{type:"builtInParams",name:"useFipsEndpoint"},Endpoint:{type:"builtInParams",name:"endpoint"},Region:{type:"builtInParams",name:"region"},UseDualStack:{type:"builtInParams",name:"useDualstackEndpoint"}};var BY={name:"@aws-sdk/client-route-53",description:"AWS SDK for JavaScript Route 53 Client for Node.js, Browser and React Native",version:"3.772.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/core":"3.758.0","@aws-sdk/credential-provider-node":"3.772.0","@aws-sdk/middleware-host-header":"3.734.0","@aws-sdk/middleware-logger":"3.734.0","@aws-sdk/middleware-recursion-detection":"3.772.0","@aws-sdk/middleware-sdk-route53":"3.734.0","@aws-sdk/middleware-user-agent":"3.758.0","@aws-sdk/region-config-resolver":"3.734.0","@aws-sdk/types":"3.734.0","@aws-sdk/util-endpoints":"3.743.0","@aws-sdk/util-user-agent-browser":"3.734.0","@aws-sdk/util-user-agent-node":"3.758.0","@aws-sdk/xml-builder":"3.734.0","@smithy/config-resolver":"^4.0.1","@smithy/core":"^3.1.5","@smithy/fetch-http-handler":"^5.0.1","@smithy/hash-node":"^4.0.1","@smithy/invalid-dependency":"^4.0.1","@smithy/middleware-content-length":"^4.0.1","@smithy/middleware-endpoint":"^4.0.6","@smithy/middleware-retry":"^4.0.7","@smithy/middleware-serde":"^4.0.2","@smithy/middleware-stack":"^4.0.1","@smithy/node-config-provider":"^4.0.1","@smithy/node-http-handler":"^4.0.3","@smithy/protocol-http":"^5.0.1","@smithy/smithy-client":"^4.1.6","@smithy/types":"^4.1.0","@smithy/url-parser":"^4.0.1","@smithy/util-base64":"^4.0.0","@smithy/util-body-length-browser":"^4.0.0","@smithy/util-body-length-node":"^4.0.0","@smithy/util-defaults-mode-browser":"^4.0.7","@smithy/util-defaults-mode-node":"^4.0.7","@smithy/util-endpoints":"^3.0.1","@smithy/util-middleware":"^4.0.1","@smithy/util-retry":"^4.0.1","@smithy/util-utf8":"^4.0.0","@smithy/util-waiter":"^4.0.2",tslib:"^2.6.2"},devDependencies:{"@tsconfig/node18":"18.2.4","@types/node":"^18.19.69",concurrently:"7.0.0","downlevel-dts":"0.10.1",rimraf:"3.0.2",typescript:"~5.2.2"},engines:{node:">=18.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 AN=p(O0(),1);n3();Y0();hf();Y0();var I9="AWS_EC2_METADATA_DISABLED",L9=async(f)=>{let{ENV_CMDS_FULL_URI:h,ENV_CMDS_RELATIVE_URI:w,fromContainerMetadata:s,fromInstanceMetadata:$}=await Promise.resolve().then(() => (fr(),t$));if(process.env[w]||process.env[h]){f.logger?.debug("@aws-sdk/credential-provider-node - remoteProvider::fromHttp/fromContainerMetadata");let{fromHttp:r}=await Promise.resolve().then(() => (FF(),TF));return gf(r(f),s(f))}if(process.env[I9]&&process.env[I9]!=="false")return async()=>{throw new a("EC2 Instance Metadata Service access disabled",{logger:f.logger})};return f.logger?.debug("@aws-sdk/credential-provider-node - remoteProvider::fromInstanceMetadata"),$(f)};var oH=!1,lU=(f={})=>uh(gf(async()=>{if(f.profile??process.env[q7]){if(process.env[QE]&&process.env[KE]){if(!oH)(f.logger?.warn&&f.logger?.constructor?.name!=="NoOpLogger"?f.logger.warn:console.warn)(`@aws-sdk/credential-provider-node - defaultProvider::fromEnv WARNING:
52
52
  Multiple credential sources detected:
53
53
  Both AWS_PROFILE and the pair AWS_ACCESS_KEY_ID/AWS_SECRET_ACCESS_KEY static credentials are set.
54
54
  This SDK will proceed with the AWS_PROFILE value.
@@ -56,9 +56,9 @@ Reference: https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-sso.ht
56
56
  However, a future version may change this behavior to prefer the ENV static credentials.
57
57
  Please ensure that your environment only sets either the AWS_PROFILE or the
58
58
  AWS_ACCESS_KEY_ID/AWS_SECRET_ACCESS_KEY pair.
59
- `),eH=!0}throw new a("AWS_PROFILE is set, skipping fromEnv provider.",{logger:f.logger,tryNextLink:!0})}return f.logger?.debug("@aws-sdk/credential-provider-node - defaultProvider::fromEnv"),_3(f)()},async()=>{f.logger?.debug("@aws-sdk/credential-provider-node - defaultProvider::fromSSO");let{ssoStartUrl:h,ssoAccountId:w,ssoRegion:s,ssoRoleName:$,ssoSession:r}=f;if(!h&&!w&&!s&&!$&&!r)throw new a("Skipping SSO provider in default chain (inputs do not include SSO fields).",{logger:f.logger});let{fromSSO:E}=await Promise.resolve().then(() => (H6(),P6));return E(f)()},async()=>{f.logger?.debug("@aws-sdk/credential-provider-node - defaultProvider::fromIni");let{fromIni:h}=await Promise.resolve().then(() => (nH(),_H));return h(f)()},async()=>{f.logger?.debug("@aws-sdk/credential-provider-node - defaultProvider::fromProcess");let{fromProcess:h}=await Promise.resolve().then(() => (R8(),z8));return h(f)()},async()=>{f.logger?.debug("@aws-sdk/credential-provider-node - defaultProvider::fromTokenFile");let{fromTokenFile:h}=await Promise.resolve().then(() => (K8(),Q8));return h(f)()},async()=>{return f.logger?.debug("@aws-sdk/credential-provider-node - defaultProvider::remoteProvider"),(await C9(f))()},async()=>{throw new a("Could not load credentials from any providers",{tryNextLink:!1,logger:f.logger})}),Qh0,Mh0),Mh0=(f)=>f?.expiration!==void 0,Qh0=(f)=>f?.expiration!==void 0&&f.expiration.getTime()-Date.now()<300000;RU();Yh();XU();$w();Kh();hr();SU();wf();var CN=p(O0(),1);J();pw();YU();bs();N$();df();var aH={["required"]:!1,type:"String"},oH={["required"]:!0,default:!1,type:"Boolean"},pH={["ref"]:"Endpoint"},bU={["fn"]:"booleanEquals",["argv"]:[{["ref"]:"UseFIPS"},!0]},UN={["fn"]:"booleanEquals",["argv"]:[{["ref"]:"UseDualStack"},!0]},s1={},uH={["fn"]:"stringEquals",["argv"]:[{["fn"]:"getAttr",["argv"]:[{["ref"]:"PartitionResult"},"name"]},"aws"]},s$={["fn"]:"getAttr",["argv"]:[{["ref"]:"PartitionResult"},"name"]},Iw={["fn"]:"booleanEquals",["argv"]:[{["ref"]:"UseFIPS"},!1]},fh={["fn"]:"booleanEquals",["argv"]:[{["ref"]:"UseDualStack"},!1]},tH={["authSchemes"]:[{name:"sigv4",["signingName"]:"route53",["signingRegion"]:"us-east-1"}]},fN={["fn"]:"stringEquals",["argv"]:[s$,"aws-us-gov"]},hN={url:"https://route53.us-gov.amazonaws.com",properties:{["authSchemes"]:[{name:"sigv4",["signingName"]:"route53",["signingRegion"]:"us-gov-west-1"}]},headers:{}},wN={["fn"]:"getAttr",["argv"]:[{["ref"]:"PartitionResult"},"supportsFIPS"]},sN={["fn"]:"booleanEquals",["argv"]:[!0,{["fn"]:"getAttr",["argv"]:[{["ref"]:"PartitionResult"},"supportsDualStack"]}]},$N=[bU],rN=[UN],EN=[{["ref"]:"Region"}],Kh0={version:"1.0",parameters:{Region:aH,UseDualStack:oH,UseFIPS:oH,Endpoint:aH},rules:[{conditions:[{["fn"]:"isSet",["argv"]:[pH]}],rules:[{conditions:$N,error:"Invalid Configuration: FIPS and custom endpoint are not supported",type:"error"},{conditions:rN,error:"Invalid Configuration: Dualstack and custom endpoint are not supported",type:"error"},{endpoint:{url:pH,properties:s1,headers:s1},type:"endpoint"}],type:"tree"},{conditions:[{["fn"]:"isSet",["argv"]:EN}],rules:[{conditions:[{["fn"]:"aws.partition",["argv"]:EN,assign:"PartitionResult"}],rules:[{conditions:[uH,Iw,fh],endpoint:{url:"https://route53.amazonaws.com",properties:tH,headers:s1},type:"endpoint"},{conditions:[uH,bU,fh],endpoint:{url:"https://route53-fips.amazonaws.com",properties:tH,headers:s1},type:"endpoint"},{conditions:[{["fn"]:"stringEquals",["argv"]:[s$,"aws-cn"]},Iw,fh],endpoint:{url:"https://route53.amazonaws.com.cn",properties:{["authSchemes"]:[{name:"sigv4",["signingName"]:"route53",["signingRegion"]:"cn-northwest-1"}]},headers:s1},type:"endpoint"},{conditions:[fN,Iw,fh],endpoint:hN,type:"endpoint"},{conditions:[fN,bU,fh],endpoint:hN,type:"endpoint"},{conditions:[{["fn"]:"stringEquals",["argv"]:[s$,"aws-iso"]},Iw,fh],endpoint:{url:"https://route53.c2s.ic.gov",properties:{["authSchemes"]:[{name:"sigv4",["signingName"]:"route53",["signingRegion"]:"us-iso-east-1"}]},headers:s1},type:"endpoint"},{conditions:[{["fn"]:"stringEquals",["argv"]:[s$,"aws-iso-b"]},Iw,fh],endpoint:{url:"https://route53.sc2s.sgov.gov",properties:{["authSchemes"]:[{name:"sigv4",["signingName"]:"route53",["signingRegion"]:"us-isob-east-1"}]},headers:s1},type:"endpoint"},{conditions:[{["fn"]:"stringEquals",["argv"]:[s$,"aws-iso-e"]},Iw,fh],endpoint:{url:"https://route53.cloud.adc-e.uk",properties:{["authSchemes"]:[{name:"sigv4",["signingName"]:"route53",["signingRegion"]:"eu-isoe-west-1"}]},headers:s1},type:"endpoint"},{conditions:[{["fn"]:"stringEquals",["argv"]:[s$,"aws-iso-f"]},Iw,fh],endpoint:{url:"https://route53.csp.hci.ic.gov",properties:{["authSchemes"]:[{name:"sigv4",["signingName"]:"route53",["signingRegion"]:"us-isof-south-1"}]},headers:s1},type:"endpoint"},{conditions:[bU,UN],rules:[{conditions:[{["fn"]:"booleanEquals",["argv"]:[!0,wN]},sN],rules:[{endpoint:{url:"https://route53-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:s1,headers:s1},type:"endpoint"}],type:"tree"},{error:"FIPS and DualStack are enabled, but this partition does not support one or both",type:"error"}],type:"tree"},{conditions:$N,rules:[{conditions:[{["fn"]:"booleanEquals",["argv"]:[wN,!0]}],rules:[{endpoint:{url:"https://route53-fips.{Region}.{PartitionResult#dnsSuffix}",properties:s1,headers:s1},type:"endpoint"}],type:"tree"},{error:"FIPS is enabled but this partition does not support FIPS",type:"error"}],type:"tree"},{conditions:rN,rules:[{conditions:[sN],rules:[{endpoint:{url:"https://route53.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:s1,headers:s1},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:s1,headers:s1},type:"endpoint"}],type:"tree"}],type:"tree"},{error:"Invalid Configuration: Missing Region",type:"error"}]},TN=Kh0;var Zh0=new gh({size:50,params:["Endpoint","Region","UseDualStack","UseFIPS"]}),FN=(f,h={})=>{return Zh0.get(f,()=>xh(TN,{endpointParams:f,logger:h.logger}))};t1.aws=_h;var IN=(f)=>{return{apiVersion:"2013-04-01",base64Decoder:f?.base64Decoder??ds,base64Encoder:f?.base64Encoder??is,disableHostPrefix:f?.disableHostPrefix??!1,endpointProvider:f?.endpointProvider??FN,extensions:f?.extensions??[],httpAuthSchemeProvider:f?.httpAuthSchemeProvider??CY,httpAuthSchemes:f?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:(h)=>h.getIdentityProvider("aws.auth#sigv4"),signer:new CN.AwsSdkSigV4Signer}],logger:f?.logger??new _f,serviceId:f?.serviceId??"Route 53",urlParser:f?.urlParser??O1,utf8Decoder:f?.utf8Decoder??Jf,utf8Encoder:f?.utf8Encoder??vs}};J();MU();J();var BN=(f)=>{Cs(process.version);let h=cs(f),w=()=>h().then(Fs),s=IN(f);LN.emitWarningIfUnsupportedVersion(process.version);let $={profile:f?.profile};return{...s,...f,runtime:"node",defaultsMode:h,bodyLengthChecker:f?.bodyLengthChecker??ms,credentialDefaultProvider:f?.credentialDefaultProvider??vU,defaultUserAgentProvider:f?.defaultUserAgentProvider??ys({serviceId:s.serviceId,clientVersion:BY.version}),maxAttempts:f?.maxAttempts??z0(ws,f),region:f?.region??z0(Sh,{..._w,...$}),requestHandler:rf.create(f?.requestHandler??w),retryMode:f?.retryMode??z0({...$s,default:async()=>(await w()).retryMode||Zh},f),sha256:f?.sha256??Fw.bind(null,"sha256"),streamCollector:f?.streamCollector??Ws,useDualstackEndpoint:f?.useDualstackEndpoint??z0(gw,$),useFipsEndpoint:f?.useFipsEndpoint??z0(xw,$),userAgentAppId:f?.userAgentAppId??z0(js,$)}};QU();F1();J();var AN=(f)=>{let{httpAuthSchemes:h,httpAuthSchemeProvider:w,credentials:s}=f;return{setHttpAuthScheme($){let r=h.findIndex((E)=>E.schemeId===$.schemeId);if(r===-1)h.push($);else h.splice(r,1,$)},httpAuthSchemes(){return h},setHttpAuthSchemeProvider($){w=$},httpAuthSchemeProvider(){return w},setCredentials($){s=$},credentials(){return s}}},GN=(f)=>{return{httpAuthSchemes:f.httpAuthSchemes(),httpAuthSchemeProvider:f.httpAuthSchemeProvider(),credentials:f.credentials()}};var mU=(f)=>f,WN=(f,h)=>{let w={...mU(gs(f)),...mU(Is(f)),...mU(Zw(f)),...mU(AN(f))};return h.forEach((s)=>s.configure(w)),{...f,...xs(w),...Ls(w),...Jw(w),...GN(w)}};class Z8 extends ww{config;constructor(...[f]){let h=BN(f||{}),w=LY(h),s=jw(w),$=ss(s),r=nw($),E=Vw(r),U=uw(E),T=IY(U),F=WN(T,f?.extensions||[]);super(F);this.config=F,this.middlewareStack.use(iw(this.config)),this.middlewareStack.use(As(this.config)),this.middlewareStack.use(ew(this.config)),this.middlewareStack.use(Pw(this.config)),this.middlewareStack.use(Hw(this.config)),this.middlewareStack.use(Nw(this.config)),this.middlewareStack.use($$.getHttpAuthSchemeEndpointRuleSetPlugin(this.config,{httpAuthSchemeParametersProvider:FY,identityProviderConfigProvider:async(C)=>new $$.DefaultIdentityProviderConfig({"aws.auth#sigv4":C.credentials})})),this.middlewareStack.use($$.getHttpSigningPlugin(this.config))}destroy(){super.destroy()}}J();var dU=/^\/(hostedzone|change|delegationset)\//;function Jh0(){return(f)=>async(h)=>{let{ChangeBatch:w}=h.input,s=[];for(let $ of w.Changes){let{AliasTarget:r}=$.ResourceRecordSet;if(r)s.push({...$,ResourceRecordSet:{...$.ResourceRecordSet,AliasTarget:{...r,HostedZoneId:r.HostedZoneId.replace(dU,"")}}});else s.push($)}return f({...h,input:{...h.input,ChangeBatch:{...w,Changes:s}}})}}var Vh0={step:"initialize",tags:["ROUTE53_IDS","CHANGE_RESOURCE_RECORD_SETS"],name:"changeResourceRecordSetsMiddleware",override:!0},zN=(f)=>({applyToStack:(h)=>{h.add(Jh0(),Vh0)}});var Ph0=["DelegationSetId","HostedZoneId","Id"];function Hh0(){return(f)=>async(h)=>{let w={...h.input};for(let s of Ph0){let $=w[s];if($)w[s]=$.replace(dU,"")}return f({...h,input:w})}}var Nh0={step:"initialize",tags:["ROUTE53_IDS"],name:"idNormalizerMiddleware",override:!0},O=(f)=>({applyToStack:(h)=>{h.add(Hh0(),Nh0)}});D();k();J();var _=p(O0(),1);function RN(f){return f.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;")}function XN(f){return f.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 J8{value;constructor(f){this.value=f}toString(){return XN(""+this.value)}}class P{name;children;attributes={};static of(f,h,w){let s=new P(f);if(h!==void 0)s.addChildNode(new J8(h));if(w!==void 0)s.withName(w);return s}constructor(f,h=[]){this.name=f,this.children=h}withName(f){return this.name=f,this}addAttribute(f,h){return this.attributes[f]=h,this}addChildNode(f){return this.children.push(f),this}removeAttribute(f){return delete this.attributes[f],this}n(f){return this.name=f,this}c(f){return this.children.push(f),this}a(f,h){if(h!=null)this.attributes[f]=h;return this}cc(f,h,w=h){if(f[h]!=null){let s=P.of(h,f[h]).withName(w);this.c(s)}}l(f,h,w,s){if(f[h]!=null)s().map((r)=>{r.withName(w),this.c(r)})}lc(f,h,w,s){if(f[h]!=null){let $=s(),r=new P(w);$.map((E)=>{r.c(E)}),this.c(r)}}toString(){let f=Boolean(this.children.length),h=`<${this.name}`,w=this.attributes;for(let s of Object.keys(w)){let $=w[s];if($!=null)h+=` ${s}="${RN(""+$)}"`}return h+=!f?"/>":`>${this.children.map((s)=>s.toString()).join("")}</${this.name}>`}}var d=p(m0(),1);J();J();class m extends $f{constructor(f){super(f);Object.setPrototypeOf(this,m.prototype)}}class iU extends m{name="ConcurrentModification";$fault="client";constructor(f){super({name:"ConcurrentModification",$fault:"client",...f});Object.setPrototypeOf(this,iU.prototype)}}class cU extends m{name="InvalidInput";$fault="client";constructor(f){super({name:"InvalidInput",$fault:"client",...f});Object.setPrototypeOf(this,cU.prototype)}}class gU extends m{name="InvalidKeySigningKeyStatus";$fault="client";constructor(f){super({name:"InvalidKeySigningKeyStatus",$fault:"client",...f});Object.setPrototypeOf(this,gU.prototype)}}class xU extends m{name="InvalidKMSArn";$fault="client";constructor(f){super({name:"InvalidKMSArn",$fault:"client",...f});Object.setPrototypeOf(this,xU.prototype)}}class _U extends m{name="InvalidSigningStatus";$fault="client";constructor(f){super({name:"InvalidSigningStatus",$fault:"client",...f});Object.setPrototypeOf(this,_U.prototype)}}class nU extends m{name="NoSuchKeySigningKey";$fault="client";constructor(f){super({name:"NoSuchKeySigningKey",$fault:"client",...f});Object.setPrototypeOf(this,nU.prototype)}}class eU extends m{name="ConflictingDomainExists";$fault="client";constructor(f){super({name:"ConflictingDomainExists",$fault:"client",...f});Object.setPrototypeOf(this,eU.prototype)}}class aU extends m{name="InvalidVPCId";$fault="client";constructor(f){super({name:"InvalidVPCId",$fault:"client",...f});Object.setPrototypeOf(this,aU.prototype)}}class oU extends m{name="LimitsExceeded";$fault="client";constructor(f){super({name:"LimitsExceeded",$fault:"client",...f});Object.setPrototypeOf(this,oU.prototype)}}class pU extends m{name="NoSuchHostedZone";$fault="client";constructor(f){super({name:"NoSuchHostedZone",$fault:"client",...f});Object.setPrototypeOf(this,pU.prototype)}}class uU extends m{name="NotAuthorizedException";$fault="client";constructor(f){super({name:"NotAuthorizedException",$fault:"client",...f});Object.setPrototypeOf(this,uU.prototype)}}class tU extends m{name="PriorRequestNotComplete";$fault="client";constructor(f){super({name:"PriorRequestNotComplete",$fault:"client",...f});Object.setPrototypeOf(this,tU.prototype)}}class f5 extends m{name="PublicZoneVPCAssociation";$fault="client";constructor(f){super({name:"PublicZoneVPCAssociation",$fault:"client",...f});Object.setPrototypeOf(this,f5.prototype)}}class h5 extends m{name="CidrBlockInUseException";$fault="client";Message;constructor(f){super({name:"CidrBlockInUseException",$fault:"client",...f});Object.setPrototypeOf(this,h5.prototype),this.Message=f.Message}}class w5 extends m{name="CidrCollectionVersionMismatchException";$fault="client";Message;constructor(f){super({name:"CidrCollectionVersionMismatchException",$fault:"client",...f});Object.setPrototypeOf(this,w5.prototype),this.Message=f.Message}}class s5 extends m{name="NoSuchCidrCollectionException";$fault="client";Message;constructor(f){super({name:"NoSuchCidrCollectionException",$fault:"client",...f});Object.setPrototypeOf(this,s5.prototype),this.Message=f.Message}}class $5 extends m{name="InvalidChangeBatch";$fault="client";messages;constructor(f){super({name:"InvalidChangeBatch",$fault:"client",...f});Object.setPrototypeOf(this,$5.prototype),this.messages=f.messages}}class r5 extends m{name="NoSuchHealthCheck";$fault="client";constructor(f){super({name:"NoSuchHealthCheck",$fault:"client",...f});Object.setPrototypeOf(this,r5.prototype)}}class E5 extends m{name="ThrottlingException";$fault="client";constructor(f){super({name:"ThrottlingException",$fault:"client",...f});Object.setPrototypeOf(this,E5.prototype)}}class U5 extends m{name="CidrCollectionAlreadyExistsException";$fault="client";Message;constructor(f){super({name:"CidrCollectionAlreadyExistsException",$fault:"client",...f});Object.setPrototypeOf(this,U5.prototype),this.Message=f.Message}}class T5 extends m{name="HealthCheckAlreadyExists";$fault="client";constructor(f){super({name:"HealthCheckAlreadyExists",$fault:"client",...f});Object.setPrototypeOf(this,T5.prototype)}}class F5 extends m{name="TooManyHealthChecks";$fault="client";constructor(f){super({name:"TooManyHealthChecks",$fault:"client",...f});Object.setPrototypeOf(this,F5.prototype)}}class C5 extends m{name="DelegationSetNotAvailable";$fault="client";constructor(f){super({name:"DelegationSetNotAvailable",$fault:"client",...f});Object.setPrototypeOf(this,C5.prototype)}}class I5 extends m{name="DelegationSetNotReusable";$fault="client";constructor(f){super({name:"DelegationSetNotReusable",$fault:"client",...f});Object.setPrototypeOf(this,I5.prototype)}}class L5 extends m{name="HostedZoneAlreadyExists";$fault="client";constructor(f){super({name:"HostedZoneAlreadyExists",$fault:"client",...f});Object.setPrototypeOf(this,L5.prototype)}}class B5 extends m{name="InvalidDomainName";$fault="client";constructor(f){super({name:"InvalidDomainName",$fault:"client",...f});Object.setPrototypeOf(this,B5.prototype)}}class A5 extends m{name="NoSuchDelegationSet";$fault="client";constructor(f){super({name:"NoSuchDelegationSet",$fault:"client",...f});Object.setPrototypeOf(this,A5.prototype)}}class G5 extends m{name="TooManyHostedZones";$fault="client";constructor(f){super({name:"TooManyHostedZones",$fault:"client",...f});Object.setPrototypeOf(this,G5.prototype)}}class W5 extends m{name="InvalidArgument";$fault="client";constructor(f){super({name:"InvalidArgument",$fault:"client",...f});Object.setPrototypeOf(this,W5.prototype)}}class z5 extends m{name="InvalidKeySigningKeyName";$fault="client";constructor(f){super({name:"InvalidKeySigningKeyName",$fault:"client",...f});Object.setPrototypeOf(this,z5.prototype)}}class R5 extends m{name="KeySigningKeyAlreadyExists";$fault="client";constructor(f){super({name:"KeySigningKeyAlreadyExists",$fault:"client",...f});Object.setPrototypeOf(this,R5.prototype)}}class X5 extends m{name="TooManyKeySigningKeys";$fault="client";constructor(f){super({name:"TooManyKeySigningKeys",$fault:"client",...f});Object.setPrototypeOf(this,X5.prototype)}}class S5 extends m{name="InsufficientCloudWatchLogsResourcePolicy";$fault="client";constructor(f){super({name:"InsufficientCloudWatchLogsResourcePolicy",$fault:"client",...f});Object.setPrototypeOf(this,S5.prototype)}}class Y5 extends m{name="NoSuchCloudWatchLogsLogGroup";$fault="client";constructor(f){super({name:"NoSuchCloudWatchLogsLogGroup",$fault:"client",...f});Object.setPrototypeOf(this,Y5.prototype)}}class M5 extends m{name="QueryLoggingConfigAlreadyExists";$fault="client";constructor(f){super({name:"QueryLoggingConfigAlreadyExists",$fault:"client",...f});Object.setPrototypeOf(this,M5.prototype)}}class Q5 extends m{name="DelegationSetAlreadyCreated";$fault="client";constructor(f){super({name:"DelegationSetAlreadyCreated",$fault:"client",...f});Object.setPrototypeOf(this,Q5.prototype)}}class K5 extends m{name="DelegationSetAlreadyReusable";$fault="client";constructor(f){super({name:"DelegationSetAlreadyReusable",$fault:"client",...f});Object.setPrototypeOf(this,K5.prototype)}}class Z5 extends m{name="HostedZoneNotFound";$fault="client";constructor(f){super({name:"HostedZoneNotFound",$fault:"client",...f});Object.setPrototypeOf(this,Z5.prototype)}}class J5 extends m{name="InvalidTrafficPolicyDocument";$fault="client";constructor(f){super({name:"InvalidTrafficPolicyDocument",$fault:"client",...f});Object.setPrototypeOf(this,J5.prototype)}}class V5 extends m{name="TooManyTrafficPolicies";$fault="client";constructor(f){super({name:"TooManyTrafficPolicies",$fault:"client",...f});Object.setPrototypeOf(this,V5.prototype)}}class P5 extends m{name="TrafficPolicyAlreadyExists";$fault="client";constructor(f){super({name:"TrafficPolicyAlreadyExists",$fault:"client",...f});Object.setPrototypeOf(this,P5.prototype)}}class H5 extends m{name="NoSuchTrafficPolicy";$fault="client";constructor(f){super({name:"NoSuchTrafficPolicy",$fault:"client",...f});Object.setPrototypeOf(this,H5.prototype)}}class N5 extends m{name="TooManyTrafficPolicyInstances";$fault="client";constructor(f){super({name:"TooManyTrafficPolicyInstances",$fault:"client",...f});Object.setPrototypeOf(this,N5.prototype)}}class D5 extends m{name="TrafficPolicyInstanceAlreadyExists";$fault="client";constructor(f){super({name:"TrafficPolicyInstanceAlreadyExists",$fault:"client",...f});Object.setPrototypeOf(this,D5.prototype)}}class q5 extends m{name="TooManyTrafficPolicyVersionsForCurrentPolicy";$fault="client";constructor(f){super({name:"TooManyTrafficPolicyVersionsForCurrentPolicy",$fault:"client",...f});Object.setPrototypeOf(this,q5.prototype)}}class k5 extends m{name="TooManyVPCAssociationAuthorizations";$fault="client";constructor(f){super({name:"TooManyVPCAssociationAuthorizations",$fault:"client",...f});Object.setPrototypeOf(this,k5.prototype)}}class y5 extends m{name="KeySigningKeyInParentDSRecord";$fault="client";constructor(f){super({name:"KeySigningKeyInParentDSRecord",$fault:"client",...f});Object.setPrototypeOf(this,y5.prototype)}}class j5 extends m{name="KeySigningKeyInUse";$fault="client";constructor(f){super({name:"KeySigningKeyInUse",$fault:"client",...f});Object.setPrototypeOf(this,j5.prototype)}}class O5 extends m{name="CidrCollectionInUseException";$fault="client";Message;constructor(f){super({name:"CidrCollectionInUseException",$fault:"client",...f});Object.setPrototypeOf(this,O5.prototype),this.Message=f.Message}}class l5 extends m{name="HealthCheckInUse";$fault="client";constructor(f){super({name:"HealthCheckInUse",$fault:"client",...f});Object.setPrototypeOf(this,l5.prototype)}}class v5 extends m{name="HostedZoneNotEmpty";$fault="client";constructor(f){super({name:"HostedZoneNotEmpty",$fault:"client",...f});Object.setPrototypeOf(this,v5.prototype)}}class b5 extends m{name="NoSuchQueryLoggingConfig";$fault="client";constructor(f){super({name:"NoSuchQueryLoggingConfig",$fault:"client",...f});Object.setPrototypeOf(this,b5.prototype)}}class m5 extends m{name="DelegationSetInUse";$fault="client";constructor(f){super({name:"DelegationSetInUse",$fault:"client",...f});Object.setPrototypeOf(this,m5.prototype)}}class d5 extends m{name="TrafficPolicyInUse";$fault="client";constructor(f){super({name:"TrafficPolicyInUse",$fault:"client",...f});Object.setPrototypeOf(this,d5.prototype)}}class i5 extends m{name="NoSuchTrafficPolicyInstance";$fault="client";constructor(f){super({name:"NoSuchTrafficPolicyInstance",$fault:"client",...f});Object.setPrototypeOf(this,i5.prototype)}}class c5 extends m{name="VPCAssociationAuthorizationNotFound";$fault="client";constructor(f){super({name:"VPCAssociationAuthorizationNotFound",$fault:"client",...f});Object.setPrototypeOf(this,c5.prototype)}}class g5 extends m{name="DNSSECNotFound";$fault="client";constructor(f){super({name:"DNSSECNotFound",$fault:"client",...f});Object.setPrototypeOf(this,g5.prototype)}}class x5 extends m{name="LastVPCAssociation";$fault="client";constructor(f){super({name:"LastVPCAssociation",$fault:"client",...f});Object.setPrototypeOf(this,x5.prototype)}}class _5 extends m{name="VPCAssociationNotFound";$fault="client";constructor(f){super({name:"VPCAssociationNotFound",$fault:"client",...f});Object.setPrototypeOf(this,_5.prototype)}}class n5 extends m{name="HostedZonePartiallyDelegated";$fault="client";constructor(f){super({name:"HostedZonePartiallyDelegated",$fault:"client",...f});Object.setPrototypeOf(this,n5.prototype)}}class e5 extends m{name="KeySigningKeyWithActiveStatusNotFound";$fault="client";constructor(f){super({name:"KeySigningKeyWithActiveStatusNotFound",$fault:"client",...f});Object.setPrototypeOf(this,e5.prototype)}}class a5 extends m{name="NoSuchChange";$fault="client";constructor(f){super({name:"NoSuchChange",$fault:"client",...f});Object.setPrototypeOf(this,a5.prototype)}}class o5 extends m{name="NoSuchGeoLocation";$fault="client";constructor(f){super({name:"NoSuchGeoLocation",$fault:"client",...f});Object.setPrototypeOf(this,o5.prototype)}}class p5 extends m{name="IncompatibleVersion";$fault="client";constructor(f){super({name:"IncompatibleVersion",$fault:"client",...f});Object.setPrototypeOf(this,p5.prototype)}}class u5 extends m{name="HostedZoneNotPrivate";$fault="client";constructor(f){super({name:"HostedZoneNotPrivate",$fault:"client",...f});Object.setPrototypeOf(this,u5.prototype)}}class t5 extends m{name="NoSuchCidrLocationException";$fault="client";Message;constructor(f){super({name:"NoSuchCidrLocationException",$fault:"client",...f});Object.setPrototypeOf(this,t5.prototype),this.Message=f.Message}}class fT extends m{name="InvalidPaginationToken";$fault="client";constructor(f){super({name:"InvalidPaginationToken",$fault:"client",...f});Object.setPrototypeOf(this,fT.prototype)}}class hT extends m{name="HealthCheckVersionMismatch";$fault="client";constructor(f){super({name:"HealthCheckVersionMismatch",$fault:"client",...f});Object.setPrototypeOf(this,hT.prototype)}}class wT extends m{name="ConflictingTypes";$fault="client";constructor(f){super({name:"ConflictingTypes",$fault:"client",...f});Object.setPrototypeOf(this,wT.prototype)}}var VN=async(f,h)=>{let w=d.requestBuilder(f,h),s={};w.bp("/2013-04-01/keysigningkey/{HostedZoneId}/{Name}/activate"),w.p("HostedZoneId",()=>f.HostedZoneId,"{HostedZoneId}",!1),w.p("Name",()=>f.Name,"{Name}",!1);let $;return w.m("POST").h(s).b($),w.build()},PN=async(f,h)=>{let w=d.requestBuilder(f,h),s={"content-type":"application/xml"};w.bp("/2013-04-01/hostedzone/{HostedZoneId}/associatevpc"),w.p("HostedZoneId",()=>f.HostedZoneId,"{HostedZoneId}",!1);let $;$=c0;let r=new P(L$0);if(r.a("xmlns","https://route53.amazonaws.com/doc/2013-04-01/"),f[F0]!=null)r.c(P.of(I$0,f[F0]).n(F0));if(f[P0]!=null)r.c(er(f[P0],h).n(P0));return $+=r.toString(),w.m("POST").h(s).b($),w.build()},HN=async(f,h)=>{let w=d.requestBuilder(f,h),s={"content-type":"application/xml"};w.bp("/2013-04-01/cidrcollection/{Id}"),w.p("Id",()=>f.Id,"{Id}",!1);let $;$=c0;let r=new P(W$0);if(r.a("xmlns","https://route53.amazonaws.com/doc/2013-04-01/"),r.lc(f,"Changes","Changes",()=>uw0(f[Gk],h)),f[sT]!=null)r.c(P.of(sT,String(f[sT])).n(sT));return $+=r.toString(),w.m("POST").h(s).b($),w.build()},NN=async(f,h)=>{let w=d.requestBuilder(f,h),s={"content-type":"application/xml"};w.bp("/2013-04-01/hostedzone/{HostedZoneId}/rrset"),w.p("HostedZoneId",()=>f.HostedZoneId,"{HostedZoneId}",!1);let $;$=c0;let r=new P(P$0);if(r.a("xmlns","https://route53.amazonaws.com/doc/2013-04-01/"),f[rT]!=null)r.c(aw0(f[rT],h).n(rT));return $+=r.toString(),w.m("POST").h(s).b($),w.build()},DN=async(f,h)=>{let w=d.requestBuilder(f,h),s={"content-type":"application/xml"};w.bp("/2013-04-01/tags/{ResourceType}/{ResourceId}"),w.p("ResourceType",()=>f.ResourceType,"{ResourceType}",!1),w.p("ResourceId",()=>f.ResourceId,"{ResourceId}",!1);let $;$=c0;let r=new P(H$0);return r.a("xmlns","https://route53.amazonaws.com/doc/2013-04-01/"),r.lc(f,"AddTags","AddTags",()=>Ls0(f[C$0],h)),r.lc(f,"RemoveTagKeys","RemoveTagKeys",()=>Is0(f[rr0],h)),$+=r.toString(),w.m("POST").h(s).b($),w.build()},qN=async(f,h)=>{let w=d.requestBuilder(f,h),s={"content-type":"application/xml"};w.bp("/2013-04-01/cidrcollection");let $;$=c0;let r=new P(z$0);if(r.a("xmlns","https://route53.amazonaws.com/doc/2013-04-01/"),f[q0]!=null)r.c(P.of(K$0,f[q0]).n(q0));if(f[o]!=null)r.c(P.of(Z$0,f[o]).n(o));return $+=r.toString(),w.m("POST").h(s).b($),w.build()},kN=async(f,h)=>{let w=d.requestBuilder(f,h),s={"content-type":"application/xml"};w.bp("/2013-04-01/healthcheck");let $;$=c0;let r=new P(R$0);if(r.a("xmlns","https://route53.amazonaws.com/doc/2013-04-01/"),f[q0]!=null)r.c(P.of(c$0,f[q0]).n(q0));if(f[Qw]!=null)r.c($s0(f[Qw],h).n(Qw));return $+=r.toString(),w.m("POST").h(s).b($),w.build()},yN=async(f,h)=>{let w=d.requestBuilder(f,h),s={"content-type":"application/xml"};w.bp("/2013-04-01/hostedzone");let $;$=c0;let r=new P(X$0);if(r.a("xmlns","https://route53.amazonaws.com/doc/2013-04-01/"),f[q0]!=null)r.c(P.of(jC,f[q0]).n(q0));if(f[UT]!=null)r.c(P.of(yf,f[UT]).n(UT));if(f[TT]!=null)r.c(rs0(f[TT],h).n(TT));if(f[o]!=null)r.c(P.of(Gf,f[o]).n(o));if(f[P0]!=null)r.c(er(f[P0],h).n(P0));return $+=r.toString(),w.m("POST").h(s).b($),w.build()},jN=async(f,h)=>{let w=d.requestBuilder(f,h),s={"content-type":"application/xml"};w.bp("/2013-04-01/keysigningkey");let $;$=c0;let r=new P(S$0);if(r.a("xmlns","https://route53.amazonaws.com/doc/2013-04-01/"),f[q0]!=null)r.c(P.of(jC,f[q0]).n(q0));if(f[h0]!=null)r.c(P.of(yf,f[h0]).n(h0));if(f[n8]!=null)r.c(P.of(Fr0,f[n8]).n(n8));if(f[o]!=null)r.c(P.of(Tr0,f[o]).n(o));if(f[G1]!=null)r.c(P.of(Cr0,f[G1]).n(G1));return $+=r.toString(),w.m("POST").h(s).b($),w.build()},ON=async(f,h)=>{let w=d.requestBuilder(f,h),s={"content-type":"application/xml"};w.bp("/2013-04-01/queryloggingconfig");let $;$=c0;let r=new P(J$0);if(r.a("xmlns","https://route53.amazonaws.com/doc/2013-04-01/"),r.cc(f,ET),f[h0]!=null)r.c(P.of(yf,f[h0]).n(h0));return $+=r.toString(),w.m("POST").h(s).b($),w.build()},lN=async(f,h)=>{let w=d.requestBuilder(f,h),s={"content-type":"application/xml"};w.bp("/2013-04-01/delegationset");let $;$=c0;let r=new P(V$0);if(r.a("xmlns","https://route53.amazonaws.com/doc/2013-04-01/"),f[q0]!=null)r.c(P.of(jC,f[q0]).n(q0));if(f[h0]!=null)r.c(P.of(yf,f[h0]).n(h0));return $+=r.toString(),w.m("POST").h(s).b($),w.build()},vN=async(f,h)=>{let w=d.requestBuilder(f,h),s={"content-type":"application/xml"};w.bp("/2013-04-01/trafficpolicy");let $;$=c0;let r=new P(D$0);if(r.a("xmlns","https://route53.amazonaws.com/doc/2013-04-01/"),f[F0]!=null)r.c(P.of(lC,f[F0]).n(F0));if(f[wh]!=null)r.c(P.of(Rk,f[wh]).n(wh));if(f[o]!=null)r.c(P.of(Gr0,f[o]).n(o));return $+=r.toString(),w.m("POST").h(s).b($),w.build()},bN=async(f,h)=>{let w=d.requestBuilder(f,h),s={"content-type":"application/xml"};w.bp("/2013-04-01/trafficpolicyinstance");let $;$=c0;let r=new P(N$0);if(r.a("xmlns","https://route53.amazonaws.com/doc/2013-04-01/"),f[h0]!=null)r.c(P.of(yf,f[h0]).n(h0));if(f[o]!=null)r.c(P.of(Gf,f[o]).n(o));if(f[p0]!=null)r.c(P.of(p0,String(f[p0])).n(p0));if(r.cc(f,z$),f[g1]!=null)r.c(P.of(g1,String(f[g1])).n(g1));return $+=r.toString(),w.m("POST").h(s).b($),w.build()},mN=async(f,h)=>{let w=d.requestBuilder(f,h),s={"content-type":"application/xml"};w.bp("/2013-04-01/trafficpolicy/{Id}"),w.p("Id",()=>f.Id,"{Id}",!1);let $;$=c0;let r=new P(q$0);if(r.a("xmlns","https://route53.amazonaws.com/doc/2013-04-01/"),f[F0]!=null)r.c(P.of(lC,f[F0]).n(F0));if(f[wh]!=null)r.c(P.of(Rk,f[wh]).n(wh));return $+=r.toString(),w.m("POST").h(s).b($),w.build()},dN=async(f,h)=>{let w=d.requestBuilder(f,h),s={"content-type":"application/xml"};w.bp("/2013-04-01/hostedzone/{HostedZoneId}/authorizevpcassociation"),w.p("HostedZoneId",()=>f.HostedZoneId,"{HostedZoneId}",!1);let $;$=c0;let r=new P(k$0);if(r.a("xmlns","https://route53.amazonaws.com/doc/2013-04-01/"),f[P0]!=null)r.c(er(f[P0],h).n(P0));return $+=r.toString(),w.m("POST").h(s).b($),w.build()},iN=async(f,h)=>{let w=d.requestBuilder(f,h),s={};w.bp("/2013-04-01/keysigningkey/{HostedZoneId}/{Name}/deactivate"),w.p("HostedZoneId",()=>f.HostedZoneId,"{HostedZoneId}",!1),w.p("Name",()=>f.Name,"{Name}",!1);let $;return w.m("POST").h(s).b($),w.build()},cN=async(f,h)=>{let w=d.requestBuilder(f,h),s={};w.bp("/2013-04-01/cidrcollection/{Id}"),w.p("Id",()=>f.Id,"{Id}",!1);let $;return w.m("DELETE").h(s).b($),w.build()},gN=async(f,h)=>{let w=d.requestBuilder(f,h),s={};w.bp("/2013-04-01/healthcheck/{HealthCheckId}"),w.p("HealthCheckId",()=>f.HealthCheckId,"{HealthCheckId}",!1);let $;return w.m("DELETE").h(s).b($),w.build()},xN=async(f,h)=>{let w=d.requestBuilder(f,h),s={};w.bp("/2013-04-01/hostedzone/{Id}"),w.p("Id",()=>f.Id,"{Id}",!1);let $;return w.m("DELETE").h(s).b($),w.build()},_N=async(f,h)=>{let w=d.requestBuilder(f,h),s={};w.bp("/2013-04-01/keysigningkey/{HostedZoneId}/{Name}"),w.p("HostedZoneId",()=>f.HostedZoneId,"{HostedZoneId}",!1),w.p("Name",()=>f.Name,"{Name}",!1);let $;return w.m("DELETE").h(s).b($),w.build()},nN=async(f,h)=>{let w=d.requestBuilder(f,h),s={};w.bp("/2013-04-01/queryloggingconfig/{Id}"),w.p("Id",()=>f.Id,"{Id}",!1);let $;return w.m("DELETE").h(s).b($),w.build()},eN=async(f,h)=>{let w=d.requestBuilder(f,h),s={};w.bp("/2013-04-01/delegationset/{Id}"),w.p("Id",()=>f.Id,"{Id}",!1);let $;return w.m("DELETE").h(s).b($),w.build()},aN=async(f,h)=>{let w=d.requestBuilder(f,h),s={};w.bp("/2013-04-01/trafficpolicy/{Id}/{Version}"),w.p("Id",()=>f.Id,"{Id}",!1),w.p("Version",()=>f.Version.toString(),"{Version}",!1);let $;return w.m("DELETE").h(s).b($),w.build()},oN=async(f,h)=>{let w=d.requestBuilder(f,h),s={};w.bp("/2013-04-01/trafficpolicyinstance/{Id}"),w.p("Id",()=>f.Id,"{Id}",!1);let $;return w.m("DELETE").h(s).b($),w.build()},pN=async(f,h)=>{let w=d.requestBuilder(f,h),s={"content-type":"application/xml"};w.bp("/2013-04-01/hostedzone/{HostedZoneId}/deauthorizevpcassociation"),w.p("HostedZoneId",()=>f.HostedZoneId,"{HostedZoneId}",!1);let $;$=c0;let r=new P(j$0);if(r.a("xmlns","https://route53.amazonaws.com/doc/2013-04-01/"),f[P0]!=null)r.c(er(f[P0],h).n(P0));return $+=r.toString(),w.m("POST").h(s).b($),w.build()},uN=async(f,h)=>{let w=d.requestBuilder(f,h),s={};w.bp("/2013-04-01/hostedzone/{HostedZoneId}/disable-dnssec"),w.p("HostedZoneId",()=>f.HostedZoneId,"{HostedZoneId}",!1);let $;return w.m("POST").h(s).b($),w.build()},tN=async(f,h)=>{let w=d.requestBuilder(f,h),s={"content-type":"application/xml"};w.bp("/2013-04-01/hostedzone/{HostedZoneId}/disassociatevpc"),w.p("HostedZoneId",()=>f.HostedZoneId,"{HostedZoneId}",!1);let $;$=c0;let r=new P(l$0);if(r.a("xmlns","https://route53.amazonaws.com/doc/2013-04-01/"),f[F0]!=null)r.c(P.of(O$0,f[F0]).n(F0));if(f[P0]!=null)r.c(er(f[P0],h).n(P0));return $+=r.toString(),w.m("POST").h(s).b($),w.build()},fD=async(f,h)=>{let w=d.requestBuilder(f,h),s={};w.bp("/2013-04-01/hostedzone/{HostedZoneId}/enable-dnssec"),w.p("HostedZoneId",()=>f.HostedZoneId,"{HostedZoneId}",!1);let $;return w.m("POST").h(s).b($),w.build()},hD=async(f,h)=>{let w=d.requestBuilder(f,h),s={};w.bp("/2013-04-01/accountlimit/{Type}"),w.p("Type",()=>f.Type,"{Type}",!1);let $;return w.m("GET").h(s).b($),w.build()},wD=async(f,h)=>{let w=d.requestBuilder(f,h),s={};w.bp("/2013-04-01/change/{Id}"),w.p("Id",()=>f.Id,"{Id}",!1);let $;return w.m("GET").h(s).b($),w.build()},sD=async(f,h)=>{let w=d.requestBuilder(f,h),s={};w.bp("/2013-04-01/checkeripranges");let $;return w.m("GET").h(s).b($),w.build()},$D=async(f,h)=>{let w=d.requestBuilder(f,h),s={};w.bp("/2013-04-01/hostedzone/{HostedZoneId}/dnssec"),w.p("HostedZoneId",()=>f.HostedZoneId,"{HostedZoneId}",!1);let $;return w.m("GET").h(s).b($),w.build()},rD=async(f,h)=>{let w=d.requestBuilder(f,h),s={};w.bp("/2013-04-01/geolocation");let $=Y({[Qr0]:[,f[qf]],[Kr0]:[,f[kf]],[jr0]:[,f[jf]]}),r;return w.m("GET").h(s).q($).b(r),w.build()},ED=async(f,h)=>{let w=d.requestBuilder(f,h),s={};w.bp("/2013-04-01/healthcheck/{HealthCheckId}"),w.p("HealthCheckId",()=>f.HealthCheckId,"{HealthCheckId}",!1);let $;return w.m("GET").h(s).b($),w.build()},UD=async(f,h)=>{let w=d.requestBuilder(f,h),s={};w.bp("/2013-04-01/healthcheckcount");let $;return w.m("GET").h(s).b($),w.build()},TD=async(f,h)=>{let w=d.requestBuilder(f,h),s={};w.bp("/2013-04-01/healthcheck/{HealthCheckId}/lastfailurereason"),w.p("HealthCheckId",()=>f.HealthCheckId,"{HealthCheckId}",!1);let $;return w.m("GET").h(s).b($),w.build()},FD=async(f,h)=>{let w=d.requestBuilder(f,h),s={};w.bp("/2013-04-01/healthcheck/{HealthCheckId}/status"),w.p("HealthCheckId",()=>f.HealthCheckId,"{HealthCheckId}",!1);let $;return w.m("GET").h(s).b($),w.build()},CD=async(f,h)=>{let w=d.requestBuilder(f,h),s={};w.bp("/2013-04-01/hostedzone/{Id}"),w.p("Id",()=>f.Id,"{Id}",!1);let $;return w.m("GET").h(s).b($),w.build()},ID=async(f,h)=>{let w=d.requestBuilder(f,h),s={};w.bp("/2013-04-01/hostedzonecount");let $;return w.m("GET").h(s).b($),w.build()},LD=async(f,h)=>{let w=d.requestBuilder(f,h),s={};w.bp("/2013-04-01/hostedzonelimit/{HostedZoneId}/{Type}"),w.p("Type",()=>f.Type,"{Type}",!1),w.p("HostedZoneId",()=>f.HostedZoneId,"{HostedZoneId}",!1);let $;return w.m("GET").h(s).b($),w.build()},BD=async(f,h)=>{let w=d.requestBuilder(f,h),s={};w.bp("/2013-04-01/queryloggingconfig/{Id}"),w.p("Id",()=>f.Id,"{Id}",!1);let $;return w.m("GET").h(s).b($),w.build()},AD=async(f,h)=>{let w=d.requestBuilder(f,h),s={};w.bp("/2013-04-01/delegationset/{Id}"),w.p("Id",()=>f.Id,"{Id}",!1);let $;return w.m("GET").h(s).b($),w.build()},GD=async(f,h)=>{let w=d.requestBuilder(f,h),s={};w.bp("/2013-04-01/reusabledelegationsetlimit/{DelegationSetId}/{Type}"),w.p("Type",()=>f.Type,"{Type}",!1),w.p("DelegationSetId",()=>f.DelegationSetId,"{DelegationSetId}",!1);let $;return w.m("GET").h(s).b($),w.build()},WD=async(f,h)=>{let w=d.requestBuilder(f,h),s={};w.bp("/2013-04-01/trafficpolicy/{Id}/{Version}"),w.p("Id",()=>f.Id,"{Id}",!1),w.p("Version",()=>f.Version.toString(),"{Version}",!1);let $;return w.m("GET").h(s).b($),w.build()},zD=async(f,h)=>{let w=d.requestBuilder(f,h),s={};w.bp("/2013-04-01/trafficpolicyinstance/{Id}"),w.p("Id",()=>f.Id,"{Id}",!1);let $;return w.m("GET").h(s).b($),w.build()},RD=async(f,h)=>{let w=d.requestBuilder(f,h),s={};w.bp("/2013-04-01/trafficpolicyinstancecount");let $;return w.m("GET").h(s).b($),w.build()},XD=async(f,h)=>{let w=d.requestBuilder(f,h),s={};w.bp("/2013-04-01/cidrcollection/{CollectionId}/cidrblocks"),w.p("CollectionId",()=>f.CollectionId,"{CollectionId}",!1);let $=Y({[Of]:[,f[U1]],[X$]:[,f[k0]],[tr]:[()=>f.MaxResults!==void 0,()=>f[pr].toString()]}),r;return w.m("GET").h(s).q($).b(r),w.build()},SD=async(f,h)=>{let w=d.requestBuilder(f,h),s={};w.bp("/2013-04-01/cidrcollection");let $=Y({[X$]:[,f[k0]],[tr]:[()=>f.MaxResults!==void 0,()=>f[pr].toString()]}),r;return w.m("GET").h(s).q($).b(r),w.build()},YD=async(f,h)=>{let w=d.requestBuilder(f,h),s={};w.bp("/2013-04-01/cidrcollection/{CollectionId}"),w.p("CollectionId",()=>f.CollectionId,"{CollectionId}",!1);let $=Y({[X$]:[,f[k0]],[tr]:[()=>f.MaxResults!==void 0,()=>f[pr].toString()]}),r;return w.m("GET").h(s).q($).b(r),w.build()},MD=async(f,h)=>{let w=d.requestBuilder(f,h),s={};w.bp("/2013-04-01/geolocations");let $=Y({[Or0]:[,f[Er0]],[lr0]:[,f[Ur0]],[vr0]:[,f[Ar0]],[a1]:[()=>f.MaxItems!==void 0,()=>f[u].toString()]}),r;return w.m("GET").h(s).q($).b(r),w.build()},QD=async(f,h)=>{let w=d.requestBuilder(f,h),s={};w.bp("/2013-04-01/healthcheck");let $=Y({[vC]:[,f[x1]],[a1]:[()=>f.MaxItems!==void 0,()=>f[u].toString()]}),r;return w.m("GET").h(s).q($).b(r),w.build()},KD=async(f,h)=>{let w=d.requestBuilder(f,h),s={};w.bp("/2013-04-01/hostedzone");let $=Y({[vC]:[,f[x1]],[a1]:[()=>f.MaxItems!==void 0,()=>f[u].toString()],[Zr0]:[,f[UT]],[Hr0]:[,f[_$0]]}),r;return w.m("GET").h(s).q($).b(r),w.build()},ZD=async(f,h)=>{let w=d.requestBuilder(f,h),s={};w.bp("/2013-04-01/hostedzonesbyname");let $=Y({[Jr0]:[,f[Gf]],[ur]:[,f[h0]],[a1]:[()=>f.MaxItems!==void 0,()=>f[u].toString()]}),r;return w.m("GET").h(s).q($).b(r),w.build()},JD=async(f,h)=>{let w=d.requestBuilder(f,h),s={};w.bp("/2013-04-01/hostedzonesbyvpc");let $=Y({[ir0]:[,j(f[_r],"VPCId")],[gr0]:[,j(f[nr],"VPCRegion")],[a1]:[()=>f.MaxItems!==void 0,()=>f[u].toString()],[X$]:[,f[k0]]}),r;return w.m("GET").h(s).q($).b(r),w.build()},VD=async(f,h)=>{let w=d.requestBuilder(f,h),s={};w.bp("/2013-04-01/queryloggingconfig");let $=Y({[ur]:[,f[h0]],[X$]:[,f[k0]],[tr]:[()=>f.MaxResults!==void 0,()=>f[pr].toString()]}),r;return w.m("GET").h(s).q($).b(r),w.build()},PD=async(f,h)=>{let w=d.requestBuilder(f,h),s={};w.bp("/2013-04-01/hostedzone/{HostedZoneId}/rrset"),w.p("HostedZoneId",()=>f.HostedZoneId,"{HostedZoneId}",!1);let $=Y({[Dr0]:[,f[Lr0]],[br0]:[,f[Br0]],[Nr0]:[,f[Ir0]],[a1]:[()=>f.MaxItems!==void 0,()=>f[u].toString()]}),r;return w.m("GET").h(s).q($).b(r),w.build()},HD=async(f,h)=>{let w=d.requestBuilder(f,h),s={};w.bp("/2013-04-01/delegationset");let $=Y({[vC]:[,f[x1]],[a1]:[()=>f.MaxItems!==void 0,()=>f[u].toString()]}),r;return w.m("GET").h(s).q($).b(r),w.build()},ND=async(f,h)=>{let w=d.requestBuilder(f,h),s={};w.bp("/2013-04-01/tags/{ResourceType}/{ResourceId}"),w.p("ResourceType",()=>f.ResourceType,"{ResourceType}",!1),w.p("ResourceId",()=>f.ResourceId,"{ResourceId}",!1);let $;return w.m("GET").h(s).b($),w.build()},DD=async(f,h)=>{let w=d.requestBuilder(f,h),s={"content-type":"application/xml"};w.bp("/2013-04-01/tags/{ResourceType}"),w.p("ResourceType",()=>f.ResourceType,"{ResourceType}",!1);let $;$=c0;let r=new P(e$0);return r.a("xmlns","https://route53.amazonaws.com/doc/2013-04-01/"),r.lc(f,"ResourceIds","ResourceIds",()=>Bs0(f[u$0],h)),$+=r.toString(),w.m("POST").h(s).b($),w.build()},qD=async(f,h)=>{let w=d.requestBuilder(f,h),s={};w.bp("/2013-04-01/trafficpolicies");let $=Y({[mr0]:[,f[WT]],[a1]:[()=>f.MaxItems!==void 0,()=>f[u].toString()]}),r;return w.m("GET").h(s).q($).b(r),w.build()},kD=async(f,h)=>{let w=d.requestBuilder(f,h),s={};w.bp("/2013-04-01/trafficpolicyinstances");let $=Y({[ur]:[,f[vh]],[bC]:[,f[_1]],[mC]:[,f[n1]],[a1]:[()=>f.MaxItems!==void 0,()=>f[u].toString()]}),r;return w.m("GET").h(s).q($).b(r),w.build()},yD=async(f,h)=>{let w=d.requestBuilder(f,h),s={};w.bp("/2013-04-01/trafficpolicyinstances/hostedzone");let $=Y({[Xk]:[,j(f[h0],"HostedZoneId")],[bC]:[,f[_1]],[mC]:[,f[n1]],[a1]:[()=>f.MaxItems!==void 0,()=>f[u].toString()]}),r;return w.m("GET").h(s).q($).b(r),w.build()},jD=async(f,h)=>{let w=d.requestBuilder(f,h),s={};w.bp("/2013-04-01/trafficpolicyinstances/trafficpolicy");let $=Y({[Xk]:[,j(f[z$],"TrafficPolicyId")],[cr0]:[j(f.TrafficPolicyVersion,"TrafficPolicyVersion")!=null,()=>f[g1].toString()],[ur]:[,f[vh]],[bC]:[,f[_1]],[mC]:[,f[n1]],[a1]:[()=>f.MaxItems!==void 0,()=>f[u].toString()]}),r;return w.m("GET").h(s).q($).b(r),w.build()},OD=async(f,h)=>{let w=d.requestBuilder(f,h),s={};w.bp("/2013-04-01/trafficpolicies/{Id}/versions"),w.p("Id",()=>f.Id,"{Id}",!1);let $=Y({[dr0]:[,f[zT]],[a1]:[()=>f.MaxItems!==void 0,()=>f[u].toString()]}),r;return w.m("GET").h(s).q($).b(r),w.build()},lD=async(f,h)=>{let w=d.requestBuilder(f,h),s={};w.bp("/2013-04-01/hostedzone/{HostedZoneId}/authorizevpcassociation"),w.p("HostedZoneId",()=>f.HostedZoneId,"{HostedZoneId}",!1);let $=Y({[X$]:[,f[k0]],[tr]:[()=>f.MaxResults!==void 0,()=>f[pr].toString()]}),r;return w.m("GET").h(s).q($).b(r),w.build()},vD=async(f,h)=>{let w=d.requestBuilder(f,h),s={};w.bp("/2013-04-01/testdnsanswer");let $=Y({[ur]:[,j(f[h0],"HostedZoneId")],[qr0]:[,j(f[BT],"RecordName")],[kr0]:[,j(f[AT],"RecordType")],[yr0]:[,f[p$0]],[Vr0]:[,f[v$0]],[Pr0]:[,f[b$0]]}),r;return w.m("GET").h(s).q($).b(r),w.build()},bD=async(f,h)=>{let w=d.requestBuilder(f,h),s={"content-type":"application/xml"};w.bp("/2013-04-01/healthcheck/{HealthCheckId}"),w.p("HealthCheckId",()=>f.HealthCheckId,"{HealthCheckId}",!1);let $;$=c0;let r=new P(Rr0);if(r.a("xmlns","https://route53.amazonaws.com/doc/2013-04-01/"),f[Df]!=null)r.c(rk(f[Df],h).n(Df));if(r.lc(f,"ChildHealthChecks","ChildHealthChecks",()=>Ek(f[Lw],h)),f[Ff]!=null)r.c(P.of(Ff,String(f[Ff])).n(Ff));if(f[Cf]!=null)r.c(P.of(Cf,String(f[Cf])).n(Cf));if(f[If]!=null)r.c(P.of(If,String(f[If])).n(If));if(r.cc(f,br),f[Gw]!=null)r.c(P.of(Gw,String(f[Gw])).n(Gw));if(f[Lf]!=null)r.c(P.of(Lf,String(f[Lf])).n(Lf));if(r.cc(f,bh),r.cc(f,ir),f[Bf]!=null)r.c(P.of(Bf,String(f[Bf])).n(Bf));if(f[Af]!=null)r.c(P.of(Af,String(f[Af])).n(Af));return r.lc(f,"Regions","Regions",()=>Uk(f[Bw],h)),r.lc(f,"ResetElements","ResetElements",()=>Es0(f[o$0],h)),r.cc(f,cr),r.cc(f,xr),$+=r.toString(),w.m("POST").h(s).b($),w.build()},mD=async(f,h)=>{let w=d.requestBuilder(f,h),s={"content-type":"application/xml"};w.bp("/2013-04-01/hostedzone/{Id}"),w.p("Id",()=>f.Id,"{Id}",!1);let $;$=c0;let r=new P(Xr0);if(r.a("xmlns","https://route53.amazonaws.com/doc/2013-04-01/"),f[F0]!=null)r.c(P.of(OC,f[F0]).n(F0));return $+=r.toString(),w.m("POST").h(s).b($),w.build()},dD=async(f,h)=>{let w=d.requestBuilder(f,h),s={"content-type":"application/xml"};w.bp("/2013-04-01/trafficpolicy/{Id}/{Version}"),w.p("Id",()=>f.Id,"{Id}",!1),w.p("Version",()=>f.Version.toString(),"{Version}",!1);let $;$=c0;let r=new P(Sr0);if(r.a("xmlns","https://route53.amazonaws.com/doc/2013-04-01/"),f[F0]!=null)r.c(P.of(lC,f[F0]).n(F0));return $+=r.toString(),w.m("POST").h(s).b($),w.build()},iD=async(f,h)=>{let w=d.requestBuilder(f,h),s={"content-type":"application/xml"};w.bp("/2013-04-01/trafficpolicyinstance/{Id}"),w.p("Id",()=>f.Id,"{Id}",!1);let $;$=c0;let r=new P(Yr0);if(r.a("xmlns","https://route53.amazonaws.com/doc/2013-04-01/"),f[p0]!=null)r.c(P.of(p0,String(f[p0])).n(p0));if(r.cc(f,z$),f[g1]!=null)r.c(P.of(g1,String(f[g1])).n(g1));return $+=r.toString(),w.m("POST").h(s).b($),w.build()},cD=async(f,h)=>{if(f.statusCode!==200&&f.statusCode>=300)return i(f,h);let w=Y({$metadata:Z(f)}),s=j(g(await _.parseXmlBody(f.body,h)),"body");if(s[$0]!=null)w[$0]=e1(s[$0],h);return w},gD=async(f,h)=>{if(f.statusCode!==200&&f.statusCode>=300)return i(f,h);let w=Y({$metadata:Z(f)}),s=j(g(await _.parseXmlBody(f.body,h)),"body");if(s[$0]!=null)w[$0]=e1(s[$0],h);return w},xD=async(f,h)=>{if(f.statusCode!==200&&f.statusCode>=300)return i(f,h);let w=Y({$metadata:Z(f)}),s=j(g(await _.parseXmlBody(f.body,h)),"body");if(s[I0]!=null)w[I0]=A(s[I0]);return w},_D=async(f,h)=>{if(f.statusCode!==200&&f.statusCode>=300)return i(f,h);let w=Y({$metadata:Z(f)}),s=j(g(await _.parseXmlBody(f.body,h)),"body");if(s[$0]!=null)w[$0]=e1(s[$0],h);return w},nD=async(f,h)=>{if(f.statusCode!==200&&f.statusCode>=300)return i(f,h);let w=Y({$metadata:Z(f)});return await B1.collectBody(f.body,h),w},eD=async(f,h)=>{if(f.statusCode!==201&&f.statusCode>=300)return i(f,h);let w=Y({$metadata:Z(f),[Eh]:[,f.headers[Of]]}),s=j(g(await _.parseXmlBody(f.body,h)),"body");if(s[y8]!=null)w[y8]=Ys0(s[y8],h);return w},aD=async(f,h)=>{if(f.statusCode!==201&&f.statusCode>=300)return i(f,h);let w=Y({$metadata:Z(f),[Eh]:[,f.headers[Of]]}),s=j(g(await _.parseXmlBody(f.body,h)),"body");if(s[Wf]!=null)w[Wf]=YT(s[Wf],h);return w},oD=async(f,h)=>{if(f.statusCode!==201&&f.statusCode>=300)return i(f,h);let w=Y({$metadata:Z(f),[Eh]:[,f.headers[Of]]}),s=j(g(await _.parseXmlBody(f.body,h)),"body");if(s[$0]!=null)w[$0]=e1(s[$0],h);if(s[M1]!=null)w[M1]=ar(s[M1],h);if(s[V1]!=null)w[V1]=MT(s[V1],h);if(s[P0]!=null)w[P0]=yC(s[P0],h);return w},pD=async(f,h)=>{if(f.statusCode!==201&&f.statusCode>=300)return i(f,h);let w=Y({$metadata:Z(f),[Eh]:[,f.headers[Of]]}),s=j(g(await _.parseXmlBody(f.body,h)),"body");if(s[$0]!=null)w[$0]=e1(s[$0],h);if(s[e8]!=null)w[e8]=Ik(s[e8],h);return w},uD=async(f,h)=>{if(f.statusCode!==201&&f.statusCode>=300)return i(f,h);let w=Y({$metadata:Z(f),[Eh]:[,f.headers[Of]]}),s=j(g(await _.parseXmlBody(f.body,h)),"body");if(s[mh]!=null)w[mh]=qC(s[mh],h);return w},tD=async(f,h)=>{if(f.statusCode!==201&&f.statusCode>=300)return i(f,h);let w=Y({$metadata:Z(f),[Eh]:[,f.headers[Of]]}),s=j(g(await _.parseXmlBody(f.body,h)),"body");if(s[M1]!=null)w[M1]=ar(s[M1],h);return w},fq=async(f,h)=>{if(f.statusCode!==201&&f.statusCode>=300)return i(f,h);let w=Y({$metadata:Z(f),[Eh]:[,f.headers[Of]]}),s=j(g(await _.parseXmlBody(f.body,h)),"body");if(s[Q1]!=null)w[Q1]=or(s[Q1],h);return w},hq=async(f,h)=>{if(f.statusCode!==201&&f.statusCode>=300)return i(f,h);let w=Y({$metadata:Z(f),[Eh]:[,f.headers[Of]]}),s=j(g(await _.parseXmlBody(f.body,h)),"body");if(s[W1]!=null)w[W1]=QT(s[W1],h);return w},wq=async(f,h)=>{if(f.statusCode!==201&&f.statusCode>=300)return i(f,h);let w=Y({$metadata:Z(f),[Eh]:[,f.headers[Of]]}),s=j(g(await _.parseXmlBody(f.body,h)),"body");if(s[Q1]!=null)w[Q1]=or(s[Q1],h);return w},sq=async(f,h)=>{if(f.statusCode!==200&&f.statusCode>=300)return i(f,h);let w=Y({$metadata:Z(f)}),s=j(g(await _.parseXmlBody(f.body,h)),"body");if(s[h0]!=null)w[h0]=A(s[h0]);if(s[P0]!=null)w[P0]=yC(s[P0],h);return w},$q=async(f,h)=>{if(f.statusCode!==200&&f.statusCode>=300)return i(f,h);let w=Y({$metadata:Z(f)}),s=j(g(await _.parseXmlBody(f.body,h)),"body");if(s[$0]!=null)w[$0]=e1(s[$0],h);return w},rq=async(f,h)=>{if(f.statusCode!==200&&f.statusCode>=300)return i(f,h);let w=Y({$metadata:Z(f)});return await B1.collectBody(f.body,h),w},Eq=async(f,h)=>{if(f.statusCode!==200&&f.statusCode>=300)return i(f,h);let w=Y({$metadata:Z(f)});return await B1.collectBody(f.body,h),w},Uq=async(f,h)=>{if(f.statusCode!==200&&f.statusCode>=300)return i(f,h);let w=Y({$metadata:Z(f)}),s=j(g(await _.parseXmlBody(f.body,h)),"body");if(s[$0]!=null)w[$0]=e1(s[$0],h);return w},Tq=async(f,h)=>{if(f.statusCode!==200&&f.statusCode>=300)return i(f,h);let w=Y({$metadata:Z(f)}),s=j(g(await _.parseXmlBody(f.body,h)),"body");if(s[$0]!=null)w[$0]=e1(s[$0],h);return w},Fq=async(f,h)=>{if(f.statusCode!==200&&f.statusCode>=300)return i(f,h);let w=Y({$metadata:Z(f)});return await B1.collectBody(f.body,h),w},Cq=async(f,h)=>{if(f.statusCode!==200&&f.statusCode>=300)return i(f,h);let w=Y({$metadata:Z(f)});return await B1.collectBody(f.body,h),w},Iq=async(f,h)=>{if(f.statusCode!==200&&f.statusCode>=300)return i(f,h);let w=Y({$metadata:Z(f)});return await B1.collectBody(f.body,h),w},Lq=async(f,h)=>{if(f.statusCode!==200&&f.statusCode>=300)return i(f,h);let w=Y({$metadata:Z(f)});return await B1.collectBody(f.body,h),w},Bq=async(f,h)=>{if(f.statusCode!==200&&f.statusCode>=300)return i(f,h);let w=Y({$metadata:Z(f)});return await B1.collectBody(f.body,h),w},Aq=async(f,h)=>{if(f.statusCode!==200&&f.statusCode>=300)return i(f,h);let w=Y({$metadata:Z(f)}),s=j(g(await _.parseXmlBody(f.body,h)),"body");if(s[$0]!=null)w[$0]=e1(s[$0],h);return w},Gq=async(f,h)=>{if(f.statusCode!==200&&f.statusCode>=300)return i(f,h);let w=Y({$metadata:Z(f)}),s=j(g(await _.parseXmlBody(f.body,h)),"body");if(s[$0]!=null)w[$0]=e1(s[$0],h);return w},Wq=async(f,h)=>{if(f.statusCode!==200&&f.statusCode>=300)return i(f,h);let w=Y({$metadata:Z(f)}),s=j(g(await _.parseXmlBody(f.body,h)),"body");if(s[$0]!=null)w[$0]=e1(s[$0],h);return w},zq=async(f,h)=>{if(f.statusCode!==200&&f.statusCode>=300)return i(f,h);let w=Y({$metadata:Z(f)}),s=j(g(await _.parseXmlBody(f.body,h)),"body");if(s[hh]!=null)w[hh]=r1(s[hh]);if(s[sh]!=null)w[sh]=As0(s[sh],h);return w},Rq=async(f,h)=>{if(f.statusCode!==200&&f.statusCode>=300)return i(f,h);let w=Y({$metadata:Z(f)}),s=j(g(await _.parseXmlBody(f.body,h)),"body");if(s[$0]!=null)w[$0]=e1(s[$0],h);return w},Xq=async(f,h)=>{if(f.statusCode!==200&&f.statusCode>=300)return i(f,h);let w=Y({$metadata:Z(f)}),s=j(g(await _.parseXmlBody(f.body,h)),"body");if(s.CheckerIpRanges==="")w[Mr]=[];else if(s[Mr]!=null&&s[Mr][zf]!=null)w[Mr]=zs0(A0(s[Mr][zf]),h);return w},Sq=async(f,h)=>{if(f.statusCode!==200&&f.statusCode>=300)return i(f,h);let w=Y({$metadata:Z(f)}),s=j(g(await _.parseXmlBody(f.body,h)),"body");if(s.KeySigningKeys==="")w[Hr]=[];else if(s[Hr]!=null&&s[Hr][zf]!=null)w[Hr]=xs0(A0(s[Hr][zf]),h);if(s[G1]!=null)w[G1]=Ds0(s[G1],h);return w},Yq=async(f,h)=>{if(f.statusCode!==200&&f.statusCode>=300)return i(f,h);let w=Y({$metadata:Z(f)}),s=j(g(await _.parseXmlBody(f.body,h)),"body");if(s[mr]!=null)w[mr]=Tk(s[mr],h);return w},Mq=async(f,h)=>{if(f.statusCode!==200&&f.statusCode>=300)return i(f,h);let w=Y({$metadata:Z(f)}),s=j(g(await _.parseXmlBody(f.body,h)),"body");if(s[Wf]!=null)w[Wf]=YT(s[Wf],h);return w},Qq=async(f,h)=>{if(f.statusCode!==200&&f.statusCode>=300)return i(f,h);let w=Y({$metadata:Z(f)}),s=j(g(await _.parseXmlBody(f.body,h)),"body");if(s[g8]!=null)w[g8]=r1(s[g8]);return w},Kq=async(f,h)=>{if(f.statusCode!==200&&f.statusCode>=300)return i(f,h);let w=Y({$metadata:Z(f)}),s=j(g(await _.parseXmlBody(f.body,h)),"body");if(s.HealthCheckObservations==="")w[Pf]=[];else if(s[Pf]!=null&&s[Pf][RT]!=null)w[Pf]=Fk(A0(s[Pf][RT]),h);return w},Zq=async(f,h)=>{if(f.statusCode!==200&&f.statusCode>=300)return i(f,h);let w=Y({$metadata:Z(f)}),s=j(g(await _.parseXmlBody(f.body,h)),"body");if(s.HealthCheckObservations==="")w[Pf]=[];else if(s[Pf]!=null&&s[Pf][RT]!=null)w[Pf]=Fk(A0(s[Pf][RT]),h);return w},Jq=async(f,h)=>{if(f.statusCode!==200&&f.statusCode>=300)return i(f,h);let w=Y({$metadata:Z(f)}),s=j(g(await _.parseXmlBody(f.body,h)),"body");if(s[M1]!=null)w[M1]=ar(s[M1],h);if(s[V1]!=null)w[V1]=MT(s[V1],h);if(s.VPCs==="")w[Nf]=[];else if(s[Nf]!=null&&s[Nf][P0]!=null)w[Nf]=Ak(A0(s[Nf][P0]),h);return w},Vq=async(f,h)=>{if(f.statusCode!==200&&f.statusCode>=300)return i(f,h);let w=Y({$metadata:Z(f)}),s=j(g(await _.parseXmlBody(f.body,h)),"body");if(s[x8]!=null)w[x8]=r1(s[x8]);return w},Pq=async(f,h)=>{if(f.statusCode!==200&&f.statusCode>=300)return i(f,h);let w=Y({$metadata:Z(f)}),s=j(g(await _.parseXmlBody(f.body,h)),"body");if(s[hh]!=null)w[hh]=r1(s[hh]);if(s[sh]!=null)w[sh]=ds0(s[sh],h);return w},Hq=async(f,h)=>{if(f.statusCode!==200&&f.statusCode>=300)return i(f,h);let w=Y({$metadata:Z(f)}),s=j(g(await _.parseXmlBody(f.body,h)),"body");if(s[mh]!=null)w[mh]=qC(s[mh],h);return w},Nq=async(f,h)=>{if(f.statusCode!==200&&f.statusCode>=300)return i(f,h);let w=Y({$metadata:Z(f)}),s=j(g(await _.parseXmlBody(f.body,h)),"body");if(s[M1]!=null)w[M1]=ar(s[M1],h);return w},Dq=async(f,h)=>{if(f.statusCode!==200&&f.statusCode>=300)return i(f,h);let w=Y({$metadata:Z(f)}),s=j(g(await _.parseXmlBody(f.body,h)),"body");if(s[hh]!=null)w[hh]=r1(s[hh]);if(s[sh]!=null)w[sh]=h$0(s[sh],h);return w},qq=async(f,h)=>{if(f.statusCode!==200&&f.statusCode>=300)return i(f,h);let w=Y({$metadata:Z(f)}),s=j(g(await _.parseXmlBody(f.body,h)),"body");if(s[Q1]!=null)w[Q1]=or(s[Q1],h);return w},kq=async(f,h)=>{if(f.statusCode!==200&&f.statusCode>=300)return i(f,h);let w=Y({$metadata:Z(f)}),s=j(g(await _.parseXmlBody(f.body,h)),"body");if(s[W1]!=null)w[W1]=QT(s[W1],h);return w},yq=async(f,h)=>{if(f.statusCode!==200&&f.statusCode>=300)return i(f,h);let w=Y({$metadata:Z(f)}),s=j(g(await _.parseXmlBody(f.body,h)),"body");if(s[PC]!=null)w[PC]=M0(s[PC]);return w},jq=async(f,h)=>{if(f.statusCode!==200&&f.statusCode>=300)return i(f,h);let w=Y({$metadata:Z(f)}),s=j(g(await _.parseXmlBody(f.body,h)),"body");if(s.CidrBlocks==="")w[Sr]=[];else if(s[Sr]!=null&&s[Sr][zf]!=null)w[Sr]=Xs0(A0(s[Sr][zf]),h);if(s[k0]!=null)w[k0]=A(s[k0]);return w},Oq=async(f,h)=>{if(f.statusCode!==200&&f.statusCode>=300)return i(f,h);let w=Y({$metadata:Z(f)}),s=j(g(await _.parseXmlBody(f.body,h)),"body");if(s.CidrCollections==="")w[Yr]=[];else if(s[Yr]!=null&&s[Yr][zf]!=null)w[Yr]=Ks0(A0(s[Yr][zf]),h);if(s[k0]!=null)w[k0]=A(s[k0]);return w},lq=async(f,h)=>{if(f.statusCode!==200&&f.statusCode>=300)return i(f,h);let w=Y({$metadata:Z(f)}),s=j(g(await _.parseXmlBody(f.body,h)),"body");if(s.CidrLocations==="")w[Qr]=[];else if(s[Qr]!=null&&s[Qr][zf]!=null)w[Qr]=_s0(A0(s[Qr][zf]),h);if(s[k0]!=null)w[k0]=A(s[k0]);return w},vq=async(f,h)=>{if(f.statusCode!==200&&f.statusCode>=300)return i(f,h);let w=Y({$metadata:Z(f)}),s=j(g(await _.parseXmlBody(f.body,h)),"body");if(s.GeoLocationDetailsList==="")w[Jr]=[];else if(s[Jr]!=null&&s[Jr][mr]!=null)w[Jr]=ys0(A0(s[Jr][mr]),h);if(s[C0]!=null)w[C0]=e0(s[C0]);if(s[u]!=null)w[u]=M0(s[u]);if(s[t8]!=null)w[t8]=A(s[t8]);if(s[fC]!=null)w[fC]=A(s[fC]);if(s[EC]!=null)w[EC]=A(s[EC]);return w},bq=async(f,h)=>{if(f.statusCode!==200&&f.statusCode>=300)return i(f,h);let w=Y({$metadata:Z(f)}),s=j(g(await _.parseXmlBody(f.body,h)),"body");if(s.HealthChecks==="")w[Vr]=[];else if(s[Vr]!=null&&s[Vr][Wf]!=null)w[Vr]=bs0(A0(s[Vr][Wf]),h);if(s[C0]!=null)w[C0]=e0(s[C0]);if(s[x1]!=null)w[x1]=A(s[x1]);if(s[u]!=null)w[u]=M0(s[u]);if(s[$h]!=null)w[$h]=A(s[$h]);return w},mq=async(f,h)=>{if(f.statusCode!==200&&f.statusCode>=300)return i(f,h);let w=Y({$metadata:Z(f)}),s=j(g(await _.parseXmlBody(f.body,h)),"body");if(s.HostedZones==="")w[Hf]=[];else if(s[Hf]!=null&&s[Hf][V1]!=null)w[Hf]=Ck(A0(s[Hf][V1]),h);if(s[C0]!=null)w[C0]=e0(s[C0]);if(s[x1]!=null)w[x1]=A(s[x1]);if(s[u]!=null)w[u]=M0(s[u]);if(s[$h]!=null)w[$h]=A(s[$h]);return w},dq=async(f,h)=>{if(f.statusCode!==200&&f.statusCode>=300)return i(f,h);let w=Y({$metadata:Z(f)}),s=j(g(await _.parseXmlBody(f.body,h)),"body");if(s[Gf]!=null)w[Gf]=A(s[Gf]);if(s[h0]!=null)w[h0]=A(s[h0]);if(s.HostedZones==="")w[Hf]=[];else if(s[Hf]!=null&&s[Hf][V1]!=null)w[Hf]=Ck(A0(s[Hf][V1]),h);if(s[C0]!=null)w[C0]=e0(s[C0]);if(s[u]!=null)w[u]=M0(s[u]);if(s[hC]!=null)w[hC]=A(s[hC]);if(s[wC]!=null)w[wC]=A(s[wC]);return w},iq=async(f,h)=>{if(f.statusCode!==200&&f.statusCode>=300)return i(f,h);let w=Y({$metadata:Z(f)}),s=j(g(await _.parseXmlBody(f.body,h)),"body");if(s.HostedZoneSummaries==="")w[Pr]=[];else if(s[Pr]!=null&&s[Pr][MN]!=null)w[Pr]=cs0(A0(s[Pr][MN]),h);if(s[u]!=null)w[u]=M0(s[u]);if(s[k0]!=null)w[k0]=A(s[k0]);return w},cq=async(f,h)=>{if(f.statusCode!==200&&f.statusCode>=300)return i(f,h);let w=Y({$metadata:Z(f)}),s=j(g(await _.parseXmlBody(f.body,h)),"body");if(s[k0]!=null)w[k0]=A(s[k0]);if(s.QueryLoggingConfigs==="")w[Dr]=[];else if(s[Dr]!=null&&s[Dr][mh]!=null)w[Dr]=es0(A0(s[Dr][mh]),h);return w},gq=async(f,h)=>{if(f.statusCode!==200&&f.statusCode>=300)return i(f,h);let w=Y({$metadata:Z(f)}),s=j(g(await _.parseXmlBody(f.body,h)),"body");if(s[C0]!=null)w[C0]=e0(s[C0]);if(s[u]!=null)w[u]=M0(s[u]);if(s[sC]!=null)w[sC]=A(s[sC]);if(s[$C]!=null)w[$C]=A(s[$C]);if(s[rC]!=null)w[rC]=A(s[rC]);if(s.ResourceRecordSets==="")w[kr]=[];else if(s[kr]!=null&&s[kr][A$]!=null)w[kr]=ts0(A0(s[kr][A$]),h);return w},xq=async(f,h)=>{if(f.statusCode!==200&&f.statusCode>=300)return i(f,h);let w=Y({$metadata:Z(f)}),s=j(g(await _.parseXmlBody(f.body,h)),"body");if(s.DelegationSets==="")w[Kr]=[];else if(s[Kr]!=null&&s[Kr][M1]!=null)w[Kr]=Ps0(A0(s[Kr][M1]),h);if(s[C0]!=null)w[C0]=e0(s[C0]);if(s[x1]!=null)w[x1]=A(s[x1]);if(s[u]!=null)w[u]=M0(s[u]);if(s[$h]!=null)w[$h]=A(s[$h]);return w},_q=async(f,h)=>{if(f.statusCode!==200&&f.statusCode>=300)return i(f,h);let w=Y({$metadata:Z(f)}),s=j(g(await _.parseXmlBody(f.body,h)),"body");if(s[gr]!=null)w[gr]=Bk(s[gr],h);return w},nq=async(f,h)=>{if(f.statusCode!==200&&f.statusCode>=300)return i(f,h);let w=Y({$metadata:Z(f)}),s=j(g(await _.parseXmlBody(f.body,h)),"body");if(s.ResourceTagSets==="")w[yr]=[];else if(s[yr]!=null&&s[yr][gr]!=null)w[yr]=f$0(A0(s[yr][gr]),h);return w},eq=async(f,h)=>{if(f.statusCode!==200&&f.statusCode>=300)return i(f,h);let w=Y({$metadata:Z(f)}),s=j(g(await _.parseXmlBody(f.body,h)),"body");if(s[C0]!=null)w[C0]=e0(s[C0]);if(s[u]!=null)w[u]=M0(s[u]);if(s[WT]!=null)w[WT]=A(s[WT]);if(s.TrafficPolicySummaries==="")w[jr]=[];else if(s[jr]!=null&&s[jr][JN]!=null)w[jr]=E$0(A0(s[jr][JN]),h);return w},aq=async(f,h)=>{if(f.statusCode!==200&&f.statusCode>=300)return i(f,h);let w=Y({$metadata:Z(f)}),s=j(g(await _.parseXmlBody(f.body,h)),"body");if(s[vh]!=null)w[vh]=A(s[vh]);if(s[C0]!=null)w[C0]=e0(s[C0]);if(s[u]!=null)w[u]=M0(s[u]);if(s[_1]!=null)w[_1]=A(s[_1]);if(s[n1]!=null)w[n1]=A(s[n1]);if(s.TrafficPolicyInstances==="")w[A1]=[];else if(s[A1]!=null&&s[A1][W1]!=null)w[A1]=kC(A0(s[A1][W1]),h);return w},oq=async(f,h)=>{if(f.statusCode!==200&&f.statusCode>=300)return i(f,h);let w=Y({$metadata:Z(f)}),s=j(g(await _.parseXmlBody(f.body,h)),"body");if(s[C0]!=null)w[C0]=e0(s[C0]);if(s[u]!=null)w[u]=M0(s[u]);if(s[_1]!=null)w[_1]=A(s[_1]);if(s[n1]!=null)w[n1]=A(s[n1]);if(s.TrafficPolicyInstances==="")w[A1]=[];else if(s[A1]!=null&&s[A1][W1]!=null)w[A1]=kC(A0(s[A1][W1]),h);return w},pq=async(f,h)=>{if(f.statusCode!==200&&f.statusCode>=300)return i(f,h);let w=Y({$metadata:Z(f)}),s=j(g(await _.parseXmlBody(f.body,h)),"body");if(s[vh]!=null)w[vh]=A(s[vh]);if(s[C0]!=null)w[C0]=e0(s[C0]);if(s[u]!=null)w[u]=M0(s[u]);if(s[_1]!=null)w[_1]=A(s[_1]);if(s[n1]!=null)w[n1]=A(s[n1]);if(s.TrafficPolicyInstances==="")w[A1]=[];else if(s[A1]!=null&&s[A1][W1]!=null)w[A1]=kC(A0(s[A1][W1]),h);return w},uq=async(f,h)=>{if(f.statusCode!==200&&f.statusCode>=300)return i(f,h);let w=Y({$metadata:Z(f)}),s=j(g(await _.parseXmlBody(f.body,h)),"body");if(s[C0]!=null)w[C0]=e0(s[C0]);if(s[u]!=null)w[u]=M0(s[u]);if(s.TrafficPolicies==="")w[Or]=[];else if(s[Or]!=null&&s[Or][Q1]!=null)w[Or]=r$0(A0(s[Or][Q1]),h);if(s[zT]!=null)w[zT]=A(s[zT]);return w},tq=async(f,h)=>{if(f.statusCode!==200&&f.statusCode>=300)return i(f,h);let w=Y({$metadata:Z(f)}),s=j(g(await _.parseXmlBody(f.body,h)),"body");if(s[h0]!=null)w[h0]=A(s[h0]);if(s[k0]!=null)w[k0]=A(s[k0]);if(s.VPCs==="")w[Nf]=[];else if(s[Nf]!=null&&s[Nf][P0]!=null)w[Nf]=Ak(A0(s[Nf][P0]),h);return w},fk=async(f,h)=>{if(f.statusCode!==200&&f.statusCode>=300)return i(f,h);let w=Y({$metadata:Z(f)}),s=j(g(await _.parseXmlBody(f.body,h)),"body");if(s[UC]!=null)w[UC]=A(s[UC]);if(s[AC]!=null)w[AC]=A(s[AC]);if(s.RecordData==="")w[qr]=[];else if(s[qr]!=null&&s[qr][KN]!=null)w[qr]=as0(A0(s[qr][KN]),h);if(s[BT]!=null)w[BT]=A(s[BT]);if(s[AT]!=null)w[AT]=A(s[AT]);if(s[GC]!=null)w[GC]=A(s[GC]);return w},hk=async(f,h)=>{if(f.statusCode!==200&&f.statusCode>=300)return i(f,h);let w=Y({$metadata:Z(f)}),s=j(g(await _.parseXmlBody(f.body,h)),"body");if(s[Wf]!=null)w[Wf]=YT(s[Wf],h);return w},wk=async(f,h)=>{if(f.statusCode!==200&&f.statusCode>=300)return i(f,h);let w=Y({$metadata:Z(f)}),s=j(g(await _.parseXmlBody(f.body,h)),"body");if(s[V1]!=null)w[V1]=MT(s[V1],h);return w},sk=async(f,h)=>{if(f.statusCode!==200&&f.statusCode>=300)return i(f,h);let w=Y({$metadata:Z(f)}),s=j(g(await _.parseXmlBody(f.body,h)),"body");if(s[Q1]!=null)w[Q1]=or(s[Q1],h);return w},$k=async(f,h)=>{if(f.statusCode!==200&&f.statusCode>=300)return i(f,h);let w=Y({$metadata:Z(f)}),s=j(g(await _.parseXmlBody(f.body,h)),"body");if(s[W1]!=null)w[W1]=QT(s[W1],h);return w},i=async(f,h)=>{let w={...f,body:await _.parseXmlErrorBody(f.body,h)},s=_.loadRestXmlErrorCode(f,w.body);switch(s){case"ConcurrentModification":case"com.amazonaws.route53#ConcurrentModification":throw await Oh0(w,h);case"InvalidInput":case"com.amazonaws.route53#InvalidInput":throw await $w0(w,h);case"InvalidKMSArn":case"com.amazonaws.route53#InvalidKMSArn":throw await Uw0(w,h);case"InvalidKeySigningKeyStatus":case"com.amazonaws.route53#InvalidKeySigningKeyStatus":throw await Ew0(w,h);case"InvalidSigningStatus":case"com.amazonaws.route53#InvalidSigningStatus":throw await Fw0(w,h);case"NoSuchKeySigningKey":case"com.amazonaws.route53#NoSuchKeySigningKey":throw await Jw0(w,h);case"ConflictingDomainExists":case"com.amazonaws.route53#ConflictingDomainExists":throw await lh0(w,h);case"InvalidVPCId":case"com.amazonaws.route53#InvalidVPCId":throw await Iw0(w,h);case"LimitsExceeded":case"com.amazonaws.route53#LimitsExceeded":throw await zw0(w,h);case"NoSuchHostedZone":case"com.amazonaws.route53#NoSuchHostedZone":throw await Zw0(w,h);case"NotAuthorizedException":case"com.amazonaws.route53#NotAuthorizedException":throw await Nw0(w,h);case"PriorRequestNotComplete":case"com.amazonaws.route53#PriorRequestNotComplete":throw await Dw0(w,h);case"PublicZoneVPCAssociation":case"com.amazonaws.route53#PublicZoneVPCAssociation":throw await qw0(w,h);case"CidrBlockInUseException":case"com.amazonaws.route53#CidrBlockInUseException":throw await qh0(w,h);case"CidrCollectionVersionMismatchException":case"com.amazonaws.route53#CidrCollectionVersionMismatchException":throw await jh0(w,h);case"NoSuchCidrCollectionException":case"com.amazonaws.route53#NoSuchCidrCollectionException":throw await Xw0(w,h);case"InvalidChangeBatch":case"com.amazonaws.route53#InvalidChangeBatch":throw await ww0(w,h);case"NoSuchHealthCheck":case"com.amazonaws.route53#NoSuchHealthCheck":throw await Kw0(w,h);case"ThrottlingException":case"com.amazonaws.route53#ThrottlingException":throw await yw0(w,h);case"CidrCollectionAlreadyExistsException":case"com.amazonaws.route53#CidrCollectionAlreadyExistsException":throw await kh0(w,h);case"HealthCheckAlreadyExists":case"com.amazonaws.route53#HealthCheckAlreadyExists":throw await xh0(w,h);case"TooManyHealthChecks":case"com.amazonaws.route53#TooManyHealthChecks":throw await jw0(w,h);case"DelegationSetNotAvailable":case"com.amazonaws.route53#DelegationSetNotAvailable":throw await ih0(w,h);case"DelegationSetNotReusable":case"com.amazonaws.route53#DelegationSetNotReusable":throw await ch0(w,h);case"HostedZoneAlreadyExists":case"com.amazonaws.route53#HostedZoneAlreadyExists":throw await eh0(w,h);case"InvalidDomainName":case"com.amazonaws.route53#InvalidDomainName":throw await sw0(w,h);case"NoSuchDelegationSet":case"com.amazonaws.route53#NoSuchDelegationSet":throw await Mw0(w,h);case"TooManyHostedZones":case"com.amazonaws.route53#TooManyHostedZones":throw await Ow0(w,h);case"InvalidArgument":case"com.amazonaws.route53#InvalidArgument":throw await hw0(w,h);case"InvalidKeySigningKeyName":case"com.amazonaws.route53#InvalidKeySigningKeyName":throw await rw0(w,h);case"KeySigningKeyAlreadyExists":case"com.amazonaws.route53#KeySigningKeyAlreadyExists":throw await Lw0(w,h);case"TooManyKeySigningKeys":case"com.amazonaws.route53#TooManyKeySigningKeys":throw await lw0(w,h);case"InsufficientCloudWatchLogsResourcePolicy":case"com.amazonaws.route53#InsufficientCloudWatchLogsResourcePolicy":throw await fw0(w,h);case"NoSuchCloudWatchLogsLogGroup":case"com.amazonaws.route53#NoSuchCloudWatchLogsLogGroup":throw await Yw0(w,h);case"QueryLoggingConfigAlreadyExists":case"com.amazonaws.route53#QueryLoggingConfigAlreadyExists":throw await kw0(w,h);case"DelegationSetAlreadyCreated":case"com.amazonaws.route53#DelegationSetAlreadyCreated":throw await bh0(w,h);case"DelegationSetAlreadyReusable":case"com.amazonaws.route53#DelegationSetAlreadyReusable":throw await mh0(w,h);case"HostedZoneNotFound":case"com.amazonaws.route53#HostedZoneNotFound":throw await oh0(w,h);case"InvalidTrafficPolicyDocument":case"com.amazonaws.route53#InvalidTrafficPolicyDocument":throw await Cw0(w,h);case"TooManyTrafficPolicies":case"com.amazonaws.route53#TooManyTrafficPolicies":throw await vw0(w,h);case"TrafficPolicyAlreadyExists":case"com.amazonaws.route53#TrafficPolicyAlreadyExists":throw await iw0(w,h);case"NoSuchTrafficPolicy":case"com.amazonaws.route53#NoSuchTrafficPolicy":throw await Pw0(w,h);case"TooManyTrafficPolicyInstances":case"com.amazonaws.route53#TooManyTrafficPolicyInstances":throw await bw0(w,h);case"TrafficPolicyInstanceAlreadyExists":case"com.amazonaws.route53#TrafficPolicyInstanceAlreadyExists":throw await cw0(w,h);case"TooManyTrafficPolicyVersionsForCurrentPolicy":case"com.amazonaws.route53#TooManyTrafficPolicyVersionsForCurrentPolicy":throw await mw0(w,h);case"TooManyVPCAssociationAuthorizations":case"com.amazonaws.route53#TooManyVPCAssociationAuthorizations":throw await dw0(w,h);case"KeySigningKeyInParentDSRecord":case"com.amazonaws.route53#KeySigningKeyInParentDSRecord":throw await Bw0(w,h);case"KeySigningKeyInUse":case"com.amazonaws.route53#KeySigningKeyInUse":throw await Aw0(w,h);case"CidrCollectionInUseException":case"com.amazonaws.route53#CidrCollectionInUseException":throw await yh0(w,h);case"HealthCheckInUse":case"com.amazonaws.route53#HealthCheckInUse":throw await _h0(w,h);case"HostedZoneNotEmpty":case"com.amazonaws.route53#HostedZoneNotEmpty":throw await ah0(w,h);case"NoSuchQueryLoggingConfig":case"com.amazonaws.route53#NoSuchQueryLoggingConfig":throw await Vw0(w,h);case"DelegationSetInUse":case"com.amazonaws.route53#DelegationSetInUse":throw await dh0(w,h);case"TrafficPolicyInUse":case"com.amazonaws.route53#TrafficPolicyInUse":throw await gw0(w,h);case"NoSuchTrafficPolicyInstance":case"com.amazonaws.route53#NoSuchTrafficPolicyInstance":throw await Hw0(w,h);case"VPCAssociationAuthorizationNotFound":case"com.amazonaws.route53#VPCAssociationAuthorizationNotFound":throw await xw0(w,h);case"DNSSECNotFound":case"com.amazonaws.route53#DNSSECNotFound":throw await gh0(w,h);case"LastVPCAssociation":case"com.amazonaws.route53#LastVPCAssociation":throw await Ww0(w,h);case"VPCAssociationNotFound":case"com.amazonaws.route53#VPCAssociationNotFound":throw await _w0(w,h);case"HostedZonePartiallyDelegated":case"com.amazonaws.route53#HostedZonePartiallyDelegated":throw await uh0(w,h);case"KeySigningKeyWithActiveStatusNotFound":case"com.amazonaws.route53#KeySigningKeyWithActiveStatusNotFound":throw await Gw0(w,h);case"NoSuchChange":case"com.amazonaws.route53#NoSuchChange":throw await Rw0(w,h);case"NoSuchGeoLocation":case"com.amazonaws.route53#NoSuchGeoLocation":throw await Qw0(w,h);case"IncompatibleVersion":case"com.amazonaws.route53#IncompatibleVersion":throw await th0(w,h);case"HostedZoneNotPrivate":case"com.amazonaws.route53#HostedZoneNotPrivate":throw await ph0(w,h);case"NoSuchCidrLocationException":case"com.amazonaws.route53#NoSuchCidrLocationException":throw await Sw0(w,h);case"InvalidPaginationToken":case"com.amazonaws.route53#InvalidPaginationToken":throw await Tw0(w,h);case"HealthCheckVersionMismatch":case"com.amazonaws.route53#HealthCheckVersionMismatch":throw await nh0(w,h);case"ConflictingTypes":case"com.amazonaws.route53#ConflictingTypes":throw await vh0(w,h);default:let $=w.body;return Dh0({output:f,parsedBody:$.Error,errorCode:s})}},Dh0=Ts(m),qh0=async(f,h)=>{let w=Y({}),s=f.body.Error;if(s[v0]!=null)w[v0]=A(s[v0]);let $=new h5({$metadata:Z(f),...w});return l($,f.body.Error)},kh0=async(f,h)=>{let w=Y({}),s=f.body.Error;if(s[v0]!=null)w[v0]=A(s[v0]);let $=new U5({$metadata:Z(f),...w});return l($,f.body.Error)},yh0=async(f,h)=>{let w=Y({}),s=f.body.Error;if(s[v0]!=null)w[v0]=A(s[v0]);let $=new O5({$metadata:Z(f),...w});return l($,f.body.Error)},jh0=async(f,h)=>{let w=Y({}),s=f.body.Error;if(s[v0]!=null)w[v0]=A(s[v0]);let $=new w5({$metadata:Z(f),...w});return l($,f.body.Error)},Oh0=async(f,h)=>{let w=Y({}),s=f.body.Error;if(s[S]!=null)w[S]=A(s[S]);let $=new iU({$metadata:Z(f),...w});return l($,f.body.Error)},lh0=async(f,h)=>{let w=Y({}),s=f.body.Error;if(s[S]!=null)w[S]=A(s[S]);let $=new eU({$metadata:Z(f),...w});return l($,f.body.Error)},vh0=async(f,h)=>{let w=Y({}),s=f.body.Error;if(s[S]!=null)w[S]=A(s[S]);let $=new wT({$metadata:Z(f),...w});return l($,f.body.Error)},bh0=async(f,h)=>{let w=Y({}),s=f.body.Error;if(s[S]!=null)w[S]=A(s[S]);let $=new Q5({$metadata:Z(f),...w});return l($,f.body.Error)},mh0=async(f,h)=>{let w=Y({}),s=f.body.Error;if(s[S]!=null)w[S]=A(s[S]);let $=new K5({$metadata:Z(f),...w});return l($,f.body.Error)},dh0=async(f,h)=>{let w=Y({}),s=f.body.Error;if(s[S]!=null)w[S]=A(s[S]);let $=new m5({$metadata:Z(f),...w});return l($,f.body.Error)},ih0=async(f,h)=>{let w=Y({}),s=f.body.Error;if(s[S]!=null)w[S]=A(s[S]);let $=new C5({$metadata:Z(f),...w});return l($,f.body.Error)},ch0=async(f,h)=>{let w=Y({}),s=f.body.Error;if(s[S]!=null)w[S]=A(s[S]);let $=new I5({$metadata:Z(f),...w});return l($,f.body.Error)},gh0=async(f,h)=>{let w=Y({}),s=f.body.Error;if(s[S]!=null)w[S]=A(s[S]);let $=new g5({$metadata:Z(f),...w});return l($,f.body.Error)},xh0=async(f,h)=>{let w=Y({}),s=f.body.Error;if(s[S]!=null)w[S]=A(s[S]);let $=new T5({$metadata:Z(f),...w});return l($,f.body.Error)},_h0=async(f,h)=>{let w=Y({}),s=f.body.Error;if(s[S]!=null)w[S]=A(s[S]);let $=new l5({$metadata:Z(f),...w});return l($,f.body.Error)},nh0=async(f,h)=>{let w=Y({}),s=f.body.Error;if(s[S]!=null)w[S]=A(s[S]);let $=new hT({$metadata:Z(f),...w});return l($,f.body.Error)},eh0=async(f,h)=>{let w=Y({}),s=f.body.Error;if(s[S]!=null)w[S]=A(s[S]);let $=new L5({$metadata:Z(f),...w});return l($,f.body.Error)},ah0=async(f,h)=>{let w=Y({}),s=f.body.Error;if(s[S]!=null)w[S]=A(s[S]);let $=new v5({$metadata:Z(f),...w});return l($,f.body.Error)},oh0=async(f,h)=>{let w=Y({}),s=f.body.Error;if(s[S]!=null)w[S]=A(s[S]);let $=new Z5({$metadata:Z(f),...w});return l($,f.body.Error)},ph0=async(f,h)=>{let w=Y({}),s=f.body.Error;if(s[S]!=null)w[S]=A(s[S]);let $=new u5({$metadata:Z(f),...w});return l($,f.body.Error)},uh0=async(f,h)=>{let w=Y({}),s=f.body.Error;if(s[S]!=null)w[S]=A(s[S]);let $=new n5({$metadata:Z(f),...w});return l($,f.body.Error)},th0=async(f,h)=>{let w=Y({}),s=f.body.Error;if(s[S]!=null)w[S]=A(s[S]);let $=new p5({$metadata:Z(f),...w});return l($,f.body.Error)},fw0=async(f,h)=>{let w=Y({}),s=f.body.Error;if(s[S]!=null)w[S]=A(s[S]);let $=new S5({$metadata:Z(f),...w});return l($,f.body.Error)},hw0=async(f,h)=>{let w=Y({}),s=f.body.Error;if(s[S]!=null)w[S]=A(s[S]);let $=new W5({$metadata:Z(f),...w});return l($,f.body.Error)},ww0=async(f,h)=>{let w=Y({}),s=f.body.Error;if(s[S]!=null)w[S]=A(s[S]);if(s.messages==="")w[vr]=[];else if(s[vr]!=null&&s[vr][v0]!=null)w[vr]=qs0(A0(s[vr][v0]),h);let $=new $5({$metadata:Z(f),...w});return l($,f.body.Error)},sw0=async(f,h)=>{let w=Y({}),s=f.body.Error;if(s[S]!=null)w[S]=A(s[S]);let $=new B5({$metadata:Z(f),...w});return l($,f.body.Error)},$w0=async(f,h)=>{let w=Y({}),s=f.body.Error;if(s[S]!=null)w[S]=A(s[S]);let $=new cU({$metadata:Z(f),...w});return l($,f.body.Error)},rw0=async(f,h)=>{let w=Y({}),s=f.body.Error;if(s[S]!=null)w[S]=A(s[S]);let $=new z5({$metadata:Z(f),...w});return l($,f.body.Error)},Ew0=async(f,h)=>{let w=Y({}),s=f.body.Error;if(s[S]!=null)w[S]=A(s[S]);let $=new gU({$metadata:Z(f),...w});return l($,f.body.Error)},Uw0=async(f,h)=>{let w=Y({}),s=f.body.Error;if(s[S]!=null)w[S]=A(s[S]);let $=new xU({$metadata:Z(f),...w});return l($,f.body.Error)},Tw0=async(f,h)=>{let w=Y({}),s=f.body.Error;if(s[S]!=null)w[S]=A(s[S]);let $=new fT({$metadata:Z(f),...w});return l($,f.body.Error)},Fw0=async(f,h)=>{let w=Y({}),s=f.body.Error;if(s[S]!=null)w[S]=A(s[S]);let $=new _U({$metadata:Z(f),...w});return l($,f.body.Error)},Cw0=async(f,h)=>{let w=Y({}),s=f.body.Error;if(s[S]!=null)w[S]=A(s[S]);let $=new J5({$metadata:Z(f),...w});return l($,f.body.Error)},Iw0=async(f,h)=>{let w=Y({}),s=f.body.Error;if(s[S]!=null)w[S]=A(s[S]);let $=new aU({$metadata:Z(f),...w});return l($,f.body.Error)},Lw0=async(f,h)=>{let w=Y({}),s=f.body.Error;if(s[S]!=null)w[S]=A(s[S]);let $=new R5({$metadata:Z(f),...w});return l($,f.body.Error)},Bw0=async(f,h)=>{let w=Y({}),s=f.body.Error;if(s[S]!=null)w[S]=A(s[S]);let $=new y5({$metadata:Z(f),...w});return l($,f.body.Error)},Aw0=async(f,h)=>{let w=Y({}),s=f.body.Error;if(s[S]!=null)w[S]=A(s[S]);let $=new j5({$metadata:Z(f),...w});return l($,f.body.Error)},Gw0=async(f,h)=>{let w=Y({}),s=f.body.Error;if(s[S]!=null)w[S]=A(s[S]);let $=new e5({$metadata:Z(f),...w});return l($,f.body.Error)},Ww0=async(f,h)=>{let w=Y({}),s=f.body.Error;if(s[S]!=null)w[S]=A(s[S]);let $=new x5({$metadata:Z(f),...w});return l($,f.body.Error)},zw0=async(f,h)=>{let w=Y({}),s=f.body.Error;if(s[S]!=null)w[S]=A(s[S]);let $=new oU({$metadata:Z(f),...w});return l($,f.body.Error)},Rw0=async(f,h)=>{let w=Y({}),s=f.body.Error;if(s[S]!=null)w[S]=A(s[S]);let $=new a5({$metadata:Z(f),...w});return l($,f.body.Error)},Xw0=async(f,h)=>{let w=Y({}),s=f.body.Error;if(s[v0]!=null)w[v0]=A(s[v0]);let $=new s5({$metadata:Z(f),...w});return l($,f.body.Error)},Sw0=async(f,h)=>{let w=Y({}),s=f.body.Error;if(s[v0]!=null)w[v0]=A(s[v0]);let $=new t5({$metadata:Z(f),...w});return l($,f.body.Error)},Yw0=async(f,h)=>{let w=Y({}),s=f.body.Error;if(s[S]!=null)w[S]=A(s[S]);let $=new Y5({$metadata:Z(f),...w});return l($,f.body.Error)},Mw0=async(f,h)=>{let w=Y({}),s=f.body.Error;if(s[S]!=null)w[S]=A(s[S]);let $=new A5({$metadata:Z(f),...w});return l($,f.body.Error)},Qw0=async(f,h)=>{let w=Y({}),s=f.body.Error;if(s[S]!=null)w[S]=A(s[S]);let $=new o5({$metadata:Z(f),...w});return l($,f.body.Error)},Kw0=async(f,h)=>{let w=Y({}),s=f.body.Error;if(s[S]!=null)w[S]=A(s[S]);let $=new r5({$metadata:Z(f),...w});return l($,f.body.Error)},Zw0=async(f,h)=>{let w=Y({}),s=f.body.Error;if(s[S]!=null)w[S]=A(s[S]);let $=new pU({$metadata:Z(f),...w});return l($,f.body.Error)},Jw0=async(f,h)=>{let w=Y({}),s=f.body.Error;if(s[S]!=null)w[S]=A(s[S]);let $=new nU({$metadata:Z(f),...w});return l($,f.body.Error)},Vw0=async(f,h)=>{let w=Y({}),s=f.body.Error;if(s[S]!=null)w[S]=A(s[S]);let $=new b5({$metadata:Z(f),...w});return l($,f.body.Error)},Pw0=async(f,h)=>{let w=Y({}),s=f.body.Error;if(s[S]!=null)w[S]=A(s[S]);let $=new H5({$metadata:Z(f),...w});return l($,f.body.Error)},Hw0=async(f,h)=>{let w=Y({}),s=f.body.Error;if(s[S]!=null)w[S]=A(s[S]);let $=new i5({$metadata:Z(f),...w});return l($,f.body.Error)},Nw0=async(f,h)=>{let w=Y({}),s=f.body.Error;if(s[S]!=null)w[S]=A(s[S]);let $=new uU({$metadata:Z(f),...w});return l($,f.body.Error)},Dw0=async(f,h)=>{let w=Y({}),s=f.body.Error;if(s[S]!=null)w[S]=A(s[S]);let $=new tU({$metadata:Z(f),...w});return l($,f.body.Error)},qw0=async(f,h)=>{let w=Y({}),s=f.body.Error;if(s[S]!=null)w[S]=A(s[S]);let $=new f5({$metadata:Z(f),...w});return l($,f.body.Error)},kw0=async(f,h)=>{let w=Y({}),s=f.body.Error;if(s[S]!=null)w[S]=A(s[S]);let $=new M5({$metadata:Z(f),...w});return l($,f.body.Error)},yw0=async(f,h)=>{let w=Y({}),s=f.body.Error;if(s[S]!=null)w[S]=A(s[S]);let $=new E5({$metadata:Z(f),...w});return l($,f.body.Error)},jw0=async(f,h)=>{let w=Y({}),s=f.body.Error;if(s[S]!=null)w[S]=A(s[S]);let $=new F5({$metadata:Z(f),...w});return l($,f.body.Error)},Ow0=async(f,h)=>{let w=Y({}),s=f.body.Error;if(s[S]!=null)w[S]=A(s[S]);let $=new G5({$metadata:Z(f),...w});return l($,f.body.Error)},lw0=async(f,h)=>{let w=Y({}),s=f.body.Error;if(s[S]!=null)w[S]=A(s[S]);let $=new X5({$metadata:Z(f),...w});return l($,f.body.Error)},vw0=async(f,h)=>{let w=Y({}),s=f.body.Error;if(s[S]!=null)w[S]=A(s[S]);let $=new V5({$metadata:Z(f),...w});return l($,f.body.Error)},bw0=async(f,h)=>{let w=Y({}),s=f.body.Error;if(s[S]!=null)w[S]=A(s[S]);let $=new N5({$metadata:Z(f),...w});return l($,f.body.Error)},mw0=async(f,h)=>{let w=Y({}),s=f.body.Error;if(s[S]!=null)w[S]=A(s[S]);let $=new q5({$metadata:Z(f),...w});return l($,f.body.Error)},dw0=async(f,h)=>{let w=Y({}),s=f.body.Error;if(s[S]!=null)w[S]=A(s[S]);let $=new k5({$metadata:Z(f),...w});return l($,f.body.Error)},iw0=async(f,h)=>{let w=Y({}),s=f.body.Error;if(s[S]!=null)w[S]=A(s[S]);let $=new P5({$metadata:Z(f),...w});return l($,f.body.Error)},cw0=async(f,h)=>{let w=Y({}),s=f.body.Error;if(s[S]!=null)w[S]=A(s[S]);let $=new D5({$metadata:Z(f),...w});return l($,f.body.Error)},gw0=async(f,h)=>{let w=Y({}),s=f.body.Error;if(s[S]!=null)w[S]=A(s[S]);let $=new d5({$metadata:Z(f),...w});return l($,f.body.Error)},xw0=async(f,h)=>{let w=Y({}),s=f.body.Error;if(s[S]!=null)w[S]=A(s[S]);let $=new c5({$metadata:Z(f),...w});return l($,f.body.Error)},_w0=async(f,h)=>{let w=Y({}),s=f.body.Error;if(s[S]!=null)w[S]=A(s[S]);let $=new _5({$metadata:Z(f),...w});return l($,f.body.Error)},rk=(f,h)=>{let w=new P(Df);if(f[u0]!=null)w.c(P.of(y$0,f[u0]).n(u0));if(f[o]!=null)w.c(P.of(F$0,f[o]).n(o));return w},nw0=(f,h)=>{let w=new P(Rw);if(f[h0]!=null)w.c(P.of(yf,f[h0]).n(h0));if(w.cc(f,Gf),f[F$]!=null)w.c(P.of(T$0,String(f[F$])).n(F$));return w},ew0=(f,h)=>{let w=new P(Wk);if(f[E$]!=null)w.c(P.of(B$0,f[E$]).n(E$));if(f[A$]!=null)w.c(Fs0(f[A$],h).n(A$));return w},aw0=(f,h)=>{let w=new P(rT);if(f[F0]!=null)w.c(P.of(OC,f[F0]).n(F0));return w.lc(f,"Changes","Changes",()=>ow0(f[Gk],h)),w},ow0=(f,h)=>{return f.filter((w)=>w!=null).map((w)=>{return ew0(w,h).n(Wk)})},Ek=(f,h)=>{return f.filter((w)=>w!=null).map((w)=>{return P.of(dr,w).n(DC)})},pw0=(f,h)=>{let w=new P(A$0);if(f[U1]!=null)w.c(P.of(M$0,f[U1]).n(U1));if(f[E$]!=null)w.c(P.of(G$0,f[E$]).n(E$));return w.lc(f,"CidrList","CidrList",()=>tw0(f[Q$0],h)),w},uw0=(f,h)=>{return f.filter((w)=>w!=null).map((w)=>{return pw0(w,h).n(zf)})},tw0=(f,h)=>{return f.filter((w)=>w!=null).map((w)=>{return P.of(SN,w).n(SN)})},fs0=(f,h)=>{let w=new P(Xw);if(f[T$]!=null)w.c(P.of(Mr0,f[T$]).n(T$));if(f[U1]!=null)w.c(P.of(Y$0,f[U1]).n(U1));return w},hs0=(f,h)=>{let w=new P(Sw);return w.cc(f,CT),w.cc(f,IT),w},ws0=(f,h)=>{let w=new P(Yw);if(f[qf]!=null)w.c(P.of(m$0,f[qf]).n(qf));if(f[kf]!=null)w.c(P.of(d$0,f[kf]).n(kf));if(f[jf]!=null)w.c(P.of(i$0,f[jf]).n(jf));return w},ss0=(f,h)=>{let w=new P(Mw);if(w.cc(f,$T),w.cc(f,FT),f[Sw]!=null)w.c(hs0(f[Sw],h).n(Sw));if(f[Aw]!=null)w.c(P.of(Aw,String(f[Aw])).n(Aw));return w},$s0=(f,h)=>{let w=new P(Qw);if(w.cc(f,bh),f[Af]!=null)w.c(P.of(Af,String(f[Af])).n(Af));if(f[Z0]!=null)w.c(P.of(x$0,f[Z0]).n(Z0));if(w.cc(f,cr),w.cc(f,br),w.cc(f,xr),f[zw]!=null)w.c(P.of(zw,String(f[zw])).n(zw));if(f[If]!=null)w.c(P.of(If,String(f[If])).n(If));if(f[Ww]!=null)w.c(P.of(Ww,String(f[Ww])).n(Ww));if(f[Bf]!=null)w.c(P.of(Bf,String(f[Bf])).n(Bf));if(f[Ff]!=null)w.c(P.of(Ff,String(f[Ff])).n(Ff));if(f[Lf]!=null)w.c(P.of(Lf,String(f[Lf])).n(Lf));if(w.lc(f,"ChildHealthChecks","ChildHealthChecks",()=>Ek(f[Lw],h)),f[Cf]!=null)w.c(P.of(Cf,String(f[Cf])).n(Cf));if(w.lc(f,"Regions","Regions",()=>Uk(f[Bw],h)),f[Df]!=null)w.c(rk(f[Df],h).n(Df));return w.cc(f,ir),w.cc(f,LT),w},Uk=(f,h)=>{return f.filter((w)=>w!=null).map((w)=>{return P.of(g$0,w).n(u0)})},rs0=(f,h)=>{let w=new P(TT);if(f[F0]!=null)w.c(P.of(OC,f[F0]).n(F0));if(f[B$]!=null)w.c(P.of(n$0,String(f[B$])).n(B$));return w},Es0=(f,h)=>{return f.filter((w)=>w!=null).map((w)=>{return P.of(ZN,w).n(ZN)})},Us0=(f,h)=>{let w=new P(XT);if(f[y0]!=null)w.c(P.of(a$0,f[y0]).n(y0));return w},Ts0=(f,h)=>{return f.filter((w)=>w!=null).map((w)=>{return Us0(w,h).n(XT)})},Fs0=(f,h)=>{let w=new P(A$);if(f[o]!=null)w.c(P.of(Gf,f[o]).n(o));if(f[Z0]!=null)w.c(P.of($r0,f[Z0]).n(Z0));if(f[G$]!=null)w.c(P.of(fr0,f[G$]).n(G$));if(f[R$]!=null)w.c(P.of(sr0,String(f[R$])).n(R$));if(f[u0]!=null)w.c(P.of(wr0,f[u0]).n(u0));if(f[Yw]!=null)w.c(ws0(f[Yw],h).n(Yw));if(f[C$]!=null)w.c(P.of(t$0,f[C$]).n(C$));if(f[L$]!=null)w.c(P.of(hr0,String(f[L$])).n(L$));if(f[p0]!=null)w.c(P.of(p0,String(f[p0])).n(p0));if(w.lc(f,"ResourceRecords","ResourceRecords",()=>Ts0(f[r$],h)),f[Rw]!=null)w.c(nw0(f[Rw],h).n(Rw));if(w.cc(f,dr),w.cc(f,GT),f[Xw]!=null)w.c(fs0(f[Xw],h).n(Xw));if(f[Mw]!=null)w.c(ss0(f[Mw],h).n(Mw));return w},Cs0=(f,h)=>{let w=new P(ST);if(f[Kw]!=null)w.c(P.of(zk,f[Kw]).n(Kw));if(f[y0]!=null)w.c(P.of(zr0,f[y0]).n(y0));return w},Is0=(f,h)=>{return f.filter((w)=>w!=null).map((w)=>{return P.of(zk,w).n(Kw)})},Ls0=(f,h)=>{return f.filter((w)=>w!=null).map((w)=>{return Cs0(w,h).n(ST)})},Bs0=(f,h)=>{return f.filter((w)=>w!=null).map((w)=>{return P.of(Wr0,w).n(yf)})},er=(f,h)=>{let w=new P(P0);return w.cc(f,nr),w.cc(f,_r),w},As0=(f,h)=>{let w={};if(f[Z0]!=null)w[Z0]=A(f[Z0]);if(f[y0]!=null)w[y0]=r1(f[y0]);return w},Gs0=(f,h)=>{let w={};if(f[u0]!=null)w[u0]=A(f[u0]);if(f[o]!=null)w[o]=A(f[o]);return w},Ws0=(f,h)=>{let w={};if(f[h0]!=null)w[h0]=A(f[h0]);if(f[Gf]!=null)w[Gf]=A(f[Gf]);if(f[F$]!=null)w[F$]=e0(f[F$]);return w},e1=(f,h)=>{let w={};if(f[I0]!=null)w[I0]=A(f[I0]);if(f[G1]!=null)w[G1]=A(f[G1]);if(f[RC]!=null)w[RC]=j(a$(f[RC]));if(f[F0]!=null)w[F0]=A(f[F0]);return w},zs0=(f,h)=>{return(f||[]).filter((w)=>w!=null).map((w)=>{return A(w)})},Rs0=(f,h)=>{return(f||[]).filter((w)=>w!=null).map((w)=>{return A(w)})},Xs0=(f,h)=>{return(f||[]).filter((w)=>w!=null).map((w)=>{return Ss0(w,h)})},Ss0=(f,h)=>{let w={};if(f[V8]!=null)w[V8]=A(f[V8]);if(f[U1]!=null)w[U1]=A(f[U1]);return w},Ys0=(f,h)=>{let w={};if(f[U$]!=null)w[U$]=A(f[U$]);if(f[I0]!=null)w[I0]=A(f[I0]);if(f[o]!=null)w[o]=A(f[o]);if(f[rh]!=null)w[rh]=r1(f[rh]);return w},Ms0=(f,h)=>{let w={};if(f[T$]!=null)w[T$]=A(f[T$]);if(f[U1]!=null)w[U1]=A(f[U1]);return w},Qs0=(f,h)=>{let w={};if(f[i8]!=null)w[i8]=M0(f[i8]);if(f[NC]!=null)w[NC]=bS(f[NC]);if(f[D8]!=null)w[D8]=A(f[D8]);if(f[BC]!=null)w[BC]=M0(f[BC]);if(f[u8]!=null)w[u8]=A(f[u8]);if(f[TC]!=null)w[TC]=A(f[TC]);if(f[ZC]!=null)w[ZC]=A(f[ZC]);if(f.Dimensions==="")w[Zr]=[];else if(f[Zr]!=null&&f[Zr][YN]!=null)w[Zr]=Ns0(A0(f[Zr][YN]),h);return w},Ks0=(f,h)=>{return(f||[]).filter((w)=>w!=null).map((w)=>{return Zs0(w,h)})},Zs0=(f,h)=>{let w={};if(f[U$]!=null)w[U$]=A(f[U$]);if(f[I0]!=null)w[I0]=A(f[I0]);if(f[o]!=null)w[o]=A(f[o]);if(f[rh]!=null)w[rh]=r1(f[rh]);return w},Js0=(f,h)=>{let w={};if(f[CT]!=null)w[CT]=A(f[CT]);if(f[IT]!=null)w[IT]=A(f[IT]);return w},ar=(f,h)=>{let w={};if(f[I0]!=null)w[I0]=A(f[I0]);if(f[q0]!=null)w[q0]=A(f[q0]);if(f.NameServers==="")w[Nr]=[];else if(f[Nr]!=null&&f[Nr][QN]!=null)w[Nr]=Vs0(A0(f[Nr][QN]),h);return w},Vs0=(f,h)=>{return(f||[]).filter((w)=>w!=null).map((w)=>{return A(w)})},Ps0=(f,h)=>{return(f||[]).filter((w)=>w!=null).map((w)=>{return ar(w,h)})},Hs0=(f,h)=>{let w={};if(f[o]!=null)w[o]=A(f[o]);if(f[y0]!=null)w[y0]=A(f[y0]);return w},Ns0=(f,h)=>{return(f||[]).filter((w)=>w!=null).map((w)=>{return Hs0(w,h)})},Ds0=(f,h)=>{let w={};if(f[KC]!=null)w[KC]=A(f[KC]);if(f[W$]!=null)w[W$]=A(f[W$]);return w},qs0=(f,h)=>{return(f||[]).filter((w)=>w!=null).map((w)=>{return A(w)})},ks0=(f,h)=>{let w={};if(f[qf]!=null)w[qf]=A(f[qf]);if(f[kf]!=null)w[kf]=A(f[kf]);if(f[jf]!=null)w[jf]=A(f[jf]);return w},Tk=(f,h)=>{let w={};if(f[qf]!=null)w[qf]=A(f[qf]);if(f[H8]!=null)w[H8]=A(f[H8]);if(f[kf]!=null)w[kf]=A(f[kf]);if(f[N8]!=null)w[N8]=A(f[N8]);if(f[jf]!=null)w[jf]=A(f[jf]);if(f[YC]!=null)w[YC]=A(f[YC]);return w},ys0=(f,h)=>{return(f||[]).filter((w)=>w!=null).map((w)=>{return Tk(w,h)})},js0=(f,h)=>{let w={};if(f[$T]!=null)w[$T]=A(f[$T]);if(f[FT]!=null)w[FT]=A(f[FT]);if(f[Sw]!=null)w[Sw]=Js0(f[Sw],h);if(f[Aw]!=null)w[Aw]=M0(f[Aw]);return w},YT=(f,h)=>{let w={};if(f[I0]!=null)w[I0]=A(f[I0]);if(f[q0]!=null)w[q0]=A(f[q0]);if(f[I$]!=null)w[I$]=Lk(f[I$],h);if(f[Qw]!=null)w[Qw]=Os0(f[Qw],h);if(f[Gw]!=null)w[Gw]=r1(f[Gw]);if(f[k8]!=null)w[k8]=Qs0(f[k8],h);return w},Os0=(f,h)=>{let w={};if(f[bh]!=null)w[bh]=A(f[bh]);if(f[Af]!=null)w[Af]=M0(f[Af]);if(f[Z0]!=null)w[Z0]=A(f[Z0]);if(f[cr]!=null)w[cr]=A(f[cr]);if(f[br]!=null)w[br]=A(f[br]);if(f[xr]!=null)w[xr]=A(f[xr]);if(f[zw]!=null)w[zw]=M0(f[zw]);if(f[If]!=null)w[If]=M0(f[If]);if(f[Ww]!=null)w[Ww]=e0(f[Ww]);if(f[Bf]!=null)w[Bf]=e0(f[Bf]);if(f[Ff]!=null)w[Ff]=e0(f[Ff]);if(f[Lf]!=null)w[Lf]=M0(f[Lf]);if(f.ChildHealthChecks==="")w[Lw]=[];else if(f[Lw]!=null&&f[Lw][DC]!=null)w[Lw]=Rs0(A0(f[Lw][DC]),h);if(f[Cf]!=null)w[Cf]=e0(f[Cf]);if(f.Regions==="")w[Bw]=[];else if(f[Bw]!=null&&f[Bw][u0]!=null)w[Bw]=vs0(A0(f[Bw][u0]),h);if(f[Df]!=null)w[Df]=Gs0(f[Df],h);if(f[ir]!=null)w[ir]=A(f[ir]);if(f[LT]!=null)w[LT]=A(f[LT]);return w},ls0=(f,h)=>{let w={};if(f[u0]!=null)w[u0]=A(f[u0]);if(f[bh]!=null)w[bh]=A(f[bh]);if(f[QC]!=null)w[QC]=w$0(f[QC],h);return w},Fk=(f,h)=>{return(f||[]).filter((w)=>w!=null).map((w)=>{return ls0(w,h)})},vs0=(f,h)=>{return(f||[]).filter((w)=>w!=null).map((w)=>{return A(w)})},bs0=(f,h)=>{return(f||[]).filter((w)=>w!=null).map((w)=>{return YT(w,h)})},MT=(f,h)=>{let w={};if(f[I0]!=null)w[I0]=A(f[I0]);if(f[o]!=null)w[o]=A(f[o]);if(f[q0]!=null)w[q0]=A(f[q0]);if(f[j8]!=null)w[j8]=ms0(f[j8],h);if(f[WC]!=null)w[WC]=r1(f[WC]);if(f[I$]!=null)w[I$]=Lk(f[I$],h);return w},ms0=(f,h)=>{let w={};if(f[F0]!=null)w[F0]=A(f[F0]);if(f[B$]!=null)w[B$]=e0(f[B$]);return w},ds0=(f,h)=>{let w={};if(f[Z0]!=null)w[Z0]=A(f[Z0]);if(f[y0]!=null)w[y0]=r1(f[y0]);return w},is0=(f,h)=>{let w={};if(f[CC]!=null)w[CC]=A(f[CC]);if(f[IC]!=null)w[IC]=A(f[IC]);return w},Ck=(f,h)=>{return(f||[]).filter((w)=>w!=null).map((w)=>{return MT(w,h)})},cs0=(f,h)=>{return(f||[]).filter((w)=>w!=null).map((w)=>{return gs0(w,h)})},gs0=(f,h)=>{let w={};if(f[h0]!=null)w[h0]=A(f[h0]);if(f[o]!=null)w[o]=A(f[o]);if(f[FC]!=null)w[FC]=is0(f[FC],h);return w},Ik=(f,h)=>{let w={};if(f[o]!=null)w[o]=A(f[o]);if(f[_8]!=null)w[_8]=A(f[_8]);if(f[c8]!=null)w[c8]=M0(f[c8]);if(f[XC]!=null)w[XC]=A(f[XC]);if(f[SC]!=null)w[SC]=M0(f[SC]);if(f[O8]!=null)w[O8]=A(f[O8]);if(f[l8]!=null)w[l8]=M0(f[l8]);if(f[a8]!=null)w[a8]=M0(f[a8]);if(f[m8]!=null)w[m8]=A(f[m8]);if(f[LC]!=null)w[LC]=A(f[LC]);if(f[b8]!=null)w[b8]=A(f[b8]);if(f[v8]!=null)w[v8]=A(f[v8]);if(f[G1]!=null)w[G1]=A(f[G1]);if(f[W$]!=null)w[W$]=A(f[W$]);if(f[P8]!=null)w[P8]=j(a$(f[P8]));if(f[o8]!=null)w[o8]=j(a$(f[o8]));return w},xs0=(f,h)=>{return(f||[]).filter((w)=>w!=null).map((w)=>{return Ik(w,h)})},Lk=(f,h)=>{let w={};if(f[MC]!=null)w[MC]=A(f[MC]);if(f[d8]!=null)w[d8]=A(f[d8]);return w},_s0=(f,h)=>{return(f||[]).filter((w)=>w!=null).map((w)=>{return ns0(w,h)})},ns0=(f,h)=>{let w={};if(f[U1]!=null)w[U1]=A(f[U1]);return w},qC=(f,h)=>{let w={};if(f[I0]!=null)w[I0]=A(f[I0]);if(f[h0]!=null)w[h0]=A(f[h0]);if(f[ET]!=null)w[ET]=A(f[ET]);return w},es0=(f,h)=>{return(f||[]).filter((w)=>w!=null).map((w)=>{return qC(w,h)})},as0=(f,h)=>{return(f||[]).filter((w)=>w!=null).map((w)=>{return A(w)})},os0=(f,h)=>{let w={};if(f[y0]!=null)w[y0]=A(f[y0]);return w},ps0=(f,h)=>{return(f||[]).filter((w)=>w!=null).map((w)=>{return os0(w,h)})},us0=(f,h)=>{let w={};if(f[o]!=null)w[o]=A(f[o]);if(f[Z0]!=null)w[Z0]=A(f[Z0]);if(f[G$]!=null)w[G$]=A(f[G$]);if(f[R$]!=null)w[R$]=r1(f[R$]);if(f[u0]!=null)w[u0]=A(f[u0]);if(f[Yw]!=null)w[Yw]=ks0(f[Yw],h);if(f[C$]!=null)w[C$]=A(f[C$]);if(f[L$]!=null)w[L$]=e0(f[L$]);if(f[p0]!=null)w[p0]=r1(f[p0]);if(f.ResourceRecords==="")w[r$]=[];else if(f[r$]!=null&&f[r$][XT]!=null)w[r$]=ps0(A0(f[r$][XT]),h);if(f[Rw]!=null)w[Rw]=Ws0(f[Rw],h);if(f[dr]!=null)w[dr]=A(f[dr]);if(f[GT]!=null)w[GT]=A(f[GT]);if(f[Xw]!=null)w[Xw]=Ms0(f[Xw],h);if(f[Mw]!=null)w[Mw]=js0(f[Mw],h);return w},ts0=(f,h)=>{return(f||[]).filter((w)=>w!=null).map((w)=>{return us0(w,h)})},Bk=(f,h)=>{let w={};if(f[zC]!=null)w[zC]=A(f[zC]);if(f[yf]!=null)w[yf]=A(f[yf]);if(f.Tags==="")w[lr]=[];else if(f[lr]!=null&&f[lr][ST]!=null)w[lr]=$$0(A0(f[lr][ST]),h);return w},f$0=(f,h)=>{return(f||[]).filter((w)=>w!=null).map((w)=>{return Bk(w,h)})},h$0=(f,h)=>{let w={};if(f[Z0]!=null)w[Z0]=A(f[Z0]);if(f[y0]!=null)w[y0]=r1(f[y0]);return w},w$0=(f,h)=>{let w={};if(f[G1]!=null)w[G1]=A(f[G1]);if(f[q8]!=null)w[q8]=j(a$(f[q8]));return w},s$0=(f,h)=>{let w={};if(f[Kw]!=null)w[Kw]=A(f[Kw]);if(f[y0]!=null)w[y0]=A(f[y0]);return w},$$0=(f,h)=>{return(f||[]).filter((w)=>w!=null).map((w)=>{return s$0(w,h)})},r$0=(f,h)=>{return(f||[]).filter((w)=>w!=null).map((w)=>{return or(w,h)})},or=(f,h)=>{let w={};if(f[I0]!=null)w[I0]=A(f[I0]);if(f[rh]!=null)w[rh]=M0(f[rh]);if(f[o]!=null)w[o]=A(f[o]);if(f[Z0]!=null)w[Z0]=A(f[Z0]);if(f[wh]!=null)w[wh]=A(f[wh]);if(f[F0]!=null)w[F0]=A(f[F0]);return w},QT=(f,h)=>{let w={};if(f[I0]!=null)w[I0]=A(f[I0]);if(f[h0]!=null)w[h0]=A(f[h0]);if(f[o]!=null)w[o]=A(f[o]);if(f[p0]!=null)w[p0]=r1(f[p0]);if(f[JC]!=null)w[JC]=A(f[JC]);if(f[v0]!=null)w[v0]=A(f[v0]);if(f[z$]!=null)w[z$]=A(f[z$]);if(f[g1]!=null)w[g1]=M0(f[g1]);if(f[HC]!=null)w[HC]=A(f[HC]);return w},kC=(f,h)=>{return(f||[]).filter((w)=>w!=null).map((w)=>{return QT(w,h)})},E$0=(f,h)=>{return(f||[]).filter((w)=>w!=null).map((w)=>{return U$0(w,h)})},U$0=(f,h)=>{let w={};if(f[I0]!=null)w[I0]=A(f[I0]);if(f[o]!=null)w[o]=A(f[o]);if(f[Z0]!=null)w[Z0]=A(f[Z0]);if(f[p8]!=null)w[p8]=M0(f[p8]);if(f[VC]!=null)w[VC]=M0(f[VC]);return w},yC=(f,h)=>{let w={};if(f[nr]!=null)w[nr]=A(f[nr]);if(f[_r]!=null)w[_r]=A(f[_r]);return w},Ak=(f,h)=>{return(f||[]).filter((w)=>w!=null).map((w)=>{return yC(w,h)})},Z=(f)=>({httpStatusCode:f.statusCode,requestId:f.headers["x-amzn-requestid"]??f.headers["x-amzn-request-id"]??f.headers["x-amz-request-id"],extendedRequestId:f.headers["x-amz-id-2"],cfId:f.headers["x-amz-cf-id"]});var E$="Action",T$0="AliasHealthEnabled",Df="AlarmIdentifier",F$0="AlarmName",C$0="AddTags",Rw="AliasTarget",I$0="AssociateVPCComment",L$0="AssociateVPCWithHostedZoneRequest",$T="AWSRegion",U$="Arn",Aw="Bias",F0="Comment",B$0="ChangeAction",rT="ChangeBatch",Sr="CidrBlocks",V8="CidrBlock",qf="ContinentCode",A$0="CidrCollectionChange",G$0="CidrCollectionChangeAction",W$0="ChangeCidrCollectionRequest",z$0="CreateCidrCollectionRequest",Yr="CidrCollections",kf="CountryCode",P8="CreatedDate",Lw="ChildHealthChecks",R$0="CreateHealthCheckRequest",DC="ChildHealthCheck",X$0="CreateHostedZoneRequest",$0="ChangeInfo",Mr="CheckerIpRanges",T$="CollectionId",S$0="CreateKeySigningKeyRequest",Qr="CidrLocations",Y$0="CidrLocationNameDefaultAllowed",M$0="CidrLocationNameDefaultNotAllowed",Q$0="CidrList",K$0="CidrNonce",Z$0="CollectionName",H8="ContinentName",N8="CountryName",D8="ComparisonOperator",J$0="CreateQueryLoggingConfigRequest",q0="CallerReference",Xw="CidrRoutingConfig",V$0="CreateReusableDelegationSetRequest",P$0="ChangeResourceRecordSetsRequest",q8="CheckedTime",H$0="ChangeTagsForResourceRequest",N$0="CreateTrafficPolicyInstanceRequest",D$0="CreateTrafficPolicyRequest",q$0="CreateTrafficPolicyVersionRequest",sT="CollectionVersion",k$0="CreateVPCAssociationAuthorizationRequest",k8="CloudWatchAlarmConfiguration",ET="CloudWatchLogsLogGroupArn",y$0="CloudWatchRegion",Gk="Changes",Wk="Change",SN="Cidr",y8="Collection",j8="Config",Sw="Coordinates",hh="Count",wh="Document",O8="DigestAlgorithmMnemonic",l8="DigestAlgorithmType",v8="DNSKEYRecord",Gf="DNSName",M1="DelegationSet",UT="DelegationSetId",b8="DSRecord",Kr="DelegationSets",m8="DigestValue",j$0="DeleteVPCAssociationAuthorizationRequest",O$0="DisassociateVPCComment",l$0="DisassociateVPCFromHostedZoneRequest",d8="Description",Ff="Disabled",Zr="Dimensions",YN="Dimension",v$0="EDNS0ClientSubnetIP",b$0="EDNS0ClientSubnetMask",i8="EvaluationPeriods",Cf="EnableSNI",F$="EvaluateTargetHealth",C$="Failover",br="FullyQualifiedDomainName",If="FailureThreshold",c8="Flag",Yw="GeoLocation",m$0="GeoLocationContinentCode",d$0="GeoLocationCountryCode",mr="GeoLocationDetails",Jr="GeoLocationDetailsList",i$0="GeoLocationSubdivisionCode",Mw="GeoProximityLocation",Wf="HealthCheck",Qw="HealthCheckConfig",g8="HealthCheckCount",dr="HealthCheckId",c$0="HealthCheckNonce",Pf="HealthCheckObservations",RT="HealthCheckObservation",g$0="HealthCheckRegion",x$0="HealthCheckType",Gw="HealthCheckVersion",Vr="HealthChecks",Lf="HealthThreshold",V1="HostedZone",TT="HostedZoneConfig",x8="HostedZoneCount",h0="HostedZoneId",vh="HostedZoneIdMarker",Pr="HostedZoneSummaries",MN="HostedZoneSummary",_$0="HostedZoneType",Hf="HostedZones",Bf="Inverted",ir="InsufficientDataHealthStatus",bh="IPAddress",n$0="IsPrivateZone",C0="IsTruncated",I0="Id",Kw="Key",_8="KmsArn",n8="KeyManagementServiceArn",e8="KeySigningKey",Hr="KeySigningKeys",a8="KeyTag",Eh="Location",o8="LastModifiedDate",U1="LocationName",I$="LinkedService",e$0="ListTagsForResourcesRequest",p8="LatestVersion",FT="LocalZoneGroup",CT="Latitude",sh="Limit",IT="Longitude",x1="Marker",u="MaxItems",Ww="MeasureLatency",u8="MetricName",pr="MaxResults",L$="MultiValueAnswer",v0="Message",o="Name",t8="NextContinentCode",fC="NextCountryCode",hC="NextDNSName",wC="NextHostedZoneId",$h="NextMarker",sC="NextRecordIdentifier",$C="NextRecordName",rC="NextRecordType",Nr="NameServers",EC="NextSubdivisionCode",QN="NameServer",k0="NextToken",UC="Nameserver",TC="Namespace",jC="Nonce",FC="Owner",CC="OwningAccount",IC="OwningService",Af="Port",LC="PublicKey",B$="PrivateZone",BC="Period",AC="Protocol",mh="QueryLoggingConfig",Dr="QueryLoggingConfigs",Bw="Regions",GC="ResponseCode",LT="RoutingControlArn",OC="ResourceDescription",KN="RecordDataEntry",a$0="RData",qr="RecordData",o$0="ResetElements",ZN="ResettableElementName",yf="ResourceId",p$0="ResolverIP",u$0="ResourceIds",zw="RequestInterval",BT="RecordName",cr="ResourcePath",XT="ResourceRecord",kr="ResourceRecordSets",WC="ResourceRecordSetCount",t$0="ResourceRecordSetFailover",fr0="ResourceRecordSetIdentifier",hr0="ResourceRecordSetMultiValueAnswer",wr0="ResourceRecordSetRegion",sr0="ResourceRecordSetWeight",A$="ResourceRecordSet",$r0="RRType",r$="ResourceRecords",AT="RecordType",rr0="RemoveTagKeys",gr="ResourceTagSet",yr="ResourceTagSets",zC="ResourceType",u0="Region",G1="Status",RC="SubmittedAt",XC="SigningAlgorithmMnemonic",SC="SigningAlgorithmType",jf="SubdivisionCode",Er0="StartContinentCode",Ur0="StartCountryCode",G$="SetIdentifier",Tr0="SigningKeyName",Fr0="SigningKeyString",Cr0="SigningKeyStatus",W$="StatusMessage",YC="SubdivisionName",MC="ServicePrincipal",QC="StatusReport",Ir0="StartRecordIdentifier",Lr0="StartRecordName",Br0="StartRecordType",xr="SearchString",Ar0="StartSubdivisionCode",KC="ServeSignature",ZC="Statistic",JC="State",Z0="Type",zk="TagKey",Q1="TrafficPolicy",lC="TrafficPolicyComment",VC="TrafficPolicyCount",Rk="TrafficPolicyDocument",z$="TrafficPolicyId",PC="TrafficPolicyInstanceCount",GT="TrafficPolicyInstanceId",WT="TrafficPolicyIdMarker",_1="TrafficPolicyInstanceNameMarker",n1="TrafficPolicyInstanceTypeMarker",W1="TrafficPolicyInstance",A1="TrafficPolicyInstances",Gr0="TrafficPolicyName",jr="TrafficPolicySummaries",JN="TrafficPolicySummary",HC="TrafficPolicyType",g1="TrafficPolicyVersion",zT="TrafficPolicyVersionMarker",Or="TrafficPolicies",Wr0="TagResourceId",p0="TTL",zr0="TagValue",ST="Tag",lr="Tags",NC="Threshold",Rr0="UpdateHealthCheckRequest",Xr0="UpdateHostedZoneCommentRequest",Sr0="UpdateTrafficPolicyCommentRequest",Yr0="UpdateTrafficPolicyInstanceRequest",Mr0="UUID",y0="Value",P0="VPC",_r="VPCId",nr="VPCRegion",Nf="VPCs",rh="Version",R$="Weight",Qr0="continentcode",Kr0="countrycode",Zr0="delegationsetid",Jr0="dnsname",Vr0="edns0clientsubnetip",Pr0="edns0clientsubnetmask",Hr0="hostedzonetype",ur="hostedzoneid",Nr0="identifier",Xk="id",Of="location",tr="maxresults",a1="maxitems",vC="marker",zf="member",S="message",vr="messages",X$="nexttoken",Dr0="name",qr0="recordname",kr0="recordtype",yr0="resolverip",jr0="subdivisioncode",Or0="startcontinentcode",lr0="startcountrycode",vr0="startsubdivisioncode",br0="type",mr0="trafficpolicyid",bC="trafficpolicyinstancename",mC="trafficpolicyinstancetype",dr0="trafficpolicyversion",ir0="vpcid",c0='<?xml version="1.0" encoding="UTF-8"?>',cr0="version",gr0="vpcregion";class dC extends W.classBuilder().ep(K).m(function(f,h,w,s){return[z(w,this.serialize,this.deserialize),R(w,f.getEndpointParameterInstructions()),O(w)]}).s("AWSDnsV20130401","ActivateKeySigningKey",{}).n("Route53Client","ActivateKeySigningKeyCommand").f(void 0,void 0).ser(VN).de(cD).build(){}D();k();J();class iC extends W.classBuilder().ep(K).m(function(f,h,w,s){return[z(w,this.serialize,this.deserialize),R(w,f.getEndpointParameterInstructions()),O(w)]}).s("AWSDnsV20130401","AssociateVPCWithHostedZone",{}).n("Route53Client","AssociateVPCWithHostedZoneCommand").f(void 0,void 0).ser(PN).de(gD).build(){}D();k();J();class cC extends W.classBuilder().ep(K).m(function(f,h,w,s){return[z(w,this.serialize,this.deserialize),R(w,f.getEndpointParameterInstructions()),O(w)]}).s("AWSDnsV20130401","ChangeCidrCollection",{}).n("Route53Client","ChangeCidrCollectionCommand").f(void 0,void 0).ser(HN).de(xD).build(){}D();k();J();class gC extends W.classBuilder().ep(K).m(function(f,h,w,s){return[z(w,this.serialize,this.deserialize),R(w,f.getEndpointParameterInstructions()),zN(w),O(w)]}).s("AWSDnsV20130401","ChangeResourceRecordSets",{}).n("Route53Client","ChangeResourceRecordSetsCommand").f(void 0,void 0).ser(NN).de(_D).build(){}D();k();J();class xC extends W.classBuilder().ep(K).m(function(f,h,w,s){return[z(w,this.serialize,this.deserialize),R(w,f.getEndpointParameterInstructions())]}).s("AWSDnsV20130401","ChangeTagsForResource",{}).n("Route53Client","ChangeTagsForResourceCommand").f(void 0,void 0).ser(DN).de(nD).build(){}D();k();J();class _C extends W.classBuilder().ep(K).m(function(f,h,w,s){return[z(w,this.serialize,this.deserialize),R(w,f.getEndpointParameterInstructions())]}).s("AWSDnsV20130401","CreateCidrCollection",{}).n("Route53Client","CreateCidrCollectionCommand").f(void 0,void 0).ser(qN).de(eD).build(){}D();k();J();class nC extends W.classBuilder().ep(K).m(function(f,h,w,s){return[z(w,this.serialize,this.deserialize),R(w,f.getEndpointParameterInstructions())]}).s("AWSDnsV20130401","CreateHealthCheck",{}).n("Route53Client","CreateHealthCheckCommand").f(void 0,void 0).ser(kN).de(aD).build(){}D();k();J();class eC extends W.classBuilder().ep(K).m(function(f,h,w,s){return[z(w,this.serialize,this.deserialize),R(w,f.getEndpointParameterInstructions()),O(w)]}).s("AWSDnsV20130401","CreateHostedZone",{}).n("Route53Client","CreateHostedZoneCommand").f(void 0,void 0).ser(yN).de(oD).build(){}D();k();J();class aC extends W.classBuilder().ep(K).m(function(f,h,w,s){return[z(w,this.serialize,this.deserialize),R(w,f.getEndpointParameterInstructions()),O(w)]}).s("AWSDnsV20130401","CreateKeySigningKey",{}).n("Route53Client","CreateKeySigningKeyCommand").f(void 0,void 0).ser(jN).de(pD).build(){}D();k();J();class oC extends W.classBuilder().ep(K).m(function(f,h,w,s){return[z(w,this.serialize,this.deserialize),R(w,f.getEndpointParameterInstructions()),O(w)]}).s("AWSDnsV20130401","CreateQueryLoggingConfig",{}).n("Route53Client","CreateQueryLoggingConfigCommand").f(void 0,void 0).ser(ON).de(uD).build(){}D();k();J();class pC extends W.classBuilder().ep(K).m(function(f,h,w,s){return[z(w,this.serialize,this.deserialize),R(w,f.getEndpointParameterInstructions()),O(w)]}).s("AWSDnsV20130401","CreateReusableDelegationSet",{}).n("Route53Client","CreateReusableDelegationSetCommand").f(void 0,void 0).ser(lN).de(tD).build(){}D();k();J();class uC extends W.classBuilder().ep(K).m(function(f,h,w,s){return[z(w,this.serialize,this.deserialize),R(w,f.getEndpointParameterInstructions())]}).s("AWSDnsV20130401","CreateTrafficPolicy",{}).n("Route53Client","CreateTrafficPolicyCommand").f(void 0,void 0).ser(vN).de(fq).build(){}D();k();J();class tC extends W.classBuilder().ep(K).m(function(f,h,w,s){return[z(w,this.serialize,this.deserialize),R(w,f.getEndpointParameterInstructions()),O(w)]}).s("AWSDnsV20130401","CreateTrafficPolicyInstance",{}).n("Route53Client","CreateTrafficPolicyInstanceCommand").f(void 0,void 0).ser(bN).de(hq).build(){}D();k();J();class fI extends W.classBuilder().ep(K).m(function(f,h,w,s){return[z(w,this.serialize,this.deserialize),R(w,f.getEndpointParameterInstructions()),O(w)]}).s("AWSDnsV20130401","CreateTrafficPolicyVersion",{}).n("Route53Client","CreateTrafficPolicyVersionCommand").f(void 0,void 0).ser(mN).de(wq).build(){}D();k();J();class hI extends W.classBuilder().ep(K).m(function(f,h,w,s){return[z(w,this.serialize,this.deserialize),R(w,f.getEndpointParameterInstructions()),O(w)]}).s("AWSDnsV20130401","CreateVPCAssociationAuthorization",{}).n("Route53Client","CreateVPCAssociationAuthorizationCommand").f(void 0,void 0).ser(dN).de(sq).build(){}D();k();J();class wI extends W.classBuilder().ep(K).m(function(f,h,w,s){return[z(w,this.serialize,this.deserialize),R(w,f.getEndpointParameterInstructions()),O(w)]}).s("AWSDnsV20130401","DeactivateKeySigningKey",{}).n("Route53Client","DeactivateKeySigningKeyCommand").f(void 0,void 0).ser(iN).de($q).build(){}D();k();J();class sI extends W.classBuilder().ep(K).m(function(f,h,w,s){return[z(w,this.serialize,this.deserialize),R(w,f.getEndpointParameterInstructions()),O(w)]}).s("AWSDnsV20130401","DeleteCidrCollection",{}).n("Route53Client","DeleteCidrCollectionCommand").f(void 0,void 0).ser(cN).de(rq).build(){}D();k();J();class $I extends W.classBuilder().ep(K).m(function(f,h,w,s){return[z(w,this.serialize,this.deserialize),R(w,f.getEndpointParameterInstructions())]}).s("AWSDnsV20130401","DeleteHealthCheck",{}).n("Route53Client","DeleteHealthCheckCommand").f(void 0,void 0).ser(gN).de(Eq).build(){}D();k();J();class rI extends W.classBuilder().ep(K).m(function(f,h,w,s){return[z(w,this.serialize,this.deserialize),R(w,f.getEndpointParameterInstructions()),O(w)]}).s("AWSDnsV20130401","DeleteHostedZone",{}).n("Route53Client","DeleteHostedZoneCommand").f(void 0,void 0).ser(xN).de(Uq).build(){}D();k();J();class EI extends W.classBuilder().ep(K).m(function(f,h,w,s){return[z(w,this.serialize,this.deserialize),R(w,f.getEndpointParameterInstructions()),O(w)]}).s("AWSDnsV20130401","DeleteKeySigningKey",{}).n("Route53Client","DeleteKeySigningKeyCommand").f(void 0,void 0).ser(_N).de(Tq).build(){}D();k();J();class UI extends W.classBuilder().ep(K).m(function(f,h,w,s){return[z(w,this.serialize,this.deserialize),R(w,f.getEndpointParameterInstructions()),O(w)]}).s("AWSDnsV20130401","DeleteQueryLoggingConfig",{}).n("Route53Client","DeleteQueryLoggingConfigCommand").f(void 0,void 0).ser(nN).de(Fq).build(){}D();k();J();class TI extends W.classBuilder().ep(K).m(function(f,h,w,s){return[z(w,this.serialize,this.deserialize),R(w,f.getEndpointParameterInstructions()),O(w)]}).s("AWSDnsV20130401","DeleteReusableDelegationSet",{}).n("Route53Client","DeleteReusableDelegationSetCommand").f(void 0,void 0).ser(eN).de(Cq).build(){}D();k();J();class FI extends W.classBuilder().ep(K).m(function(f,h,w,s){return[z(w,this.serialize,this.deserialize),R(w,f.getEndpointParameterInstructions()),O(w)]}).s("AWSDnsV20130401","DeleteTrafficPolicy",{}).n("Route53Client","DeleteTrafficPolicyCommand").f(void 0,void 0).ser(aN).de(Iq).build(){}D();k();J();class CI extends W.classBuilder().ep(K).m(function(f,h,w,s){return[z(w,this.serialize,this.deserialize),R(w,f.getEndpointParameterInstructions()),O(w)]}).s("AWSDnsV20130401","DeleteTrafficPolicyInstance",{}).n("Route53Client","DeleteTrafficPolicyInstanceCommand").f(void 0,void 0).ser(oN).de(Lq).build(){}D();k();J();class II extends W.classBuilder().ep(K).m(function(f,h,w,s){return[z(w,this.serialize,this.deserialize),R(w,f.getEndpointParameterInstructions()),O(w)]}).s("AWSDnsV20130401","DeleteVPCAssociationAuthorization",{}).n("Route53Client","DeleteVPCAssociationAuthorizationCommand").f(void 0,void 0).ser(pN).de(Bq).build(){}D();k();J();class LI extends W.classBuilder().ep(K).m(function(f,h,w,s){return[z(w,this.serialize,this.deserialize),R(w,f.getEndpointParameterInstructions()),O(w)]}).s("AWSDnsV20130401","DisableHostedZoneDNSSEC",{}).n("Route53Client","DisableHostedZoneDNSSECCommand").f(void 0,void 0).ser(uN).de(Aq).build(){}D();k();J();class BI extends W.classBuilder().ep(K).m(function(f,h,w,s){return[z(w,this.serialize,this.deserialize),R(w,f.getEndpointParameterInstructions()),O(w)]}).s("AWSDnsV20130401","DisassociateVPCFromHostedZone",{}).n("Route53Client","DisassociateVPCFromHostedZoneCommand").f(void 0,void 0).ser(tN).de(Gq).build(){}D();k();J();class AI extends W.classBuilder().ep(K).m(function(f,h,w,s){return[z(w,this.serialize,this.deserialize),R(w,f.getEndpointParameterInstructions()),O(w)]}).s("AWSDnsV20130401","EnableHostedZoneDNSSEC",{}).n("Route53Client","EnableHostedZoneDNSSECCommand").f(void 0,void 0).ser(fD).de(Wq).build(){}D();k();J();class GI extends W.classBuilder().ep(K).m(function(f,h,w,s){return[z(w,this.serialize,this.deserialize),R(w,f.getEndpointParameterInstructions())]}).s("AWSDnsV20130401","GetAccountLimit",{}).n("Route53Client","GetAccountLimitCommand").f(void 0,void 0).ser(hD).de(zq).build(){}D();k();J();class WI extends W.classBuilder().ep(K).m(function(f,h,w,s){return[z(w,this.serialize,this.deserialize),R(w,f.getEndpointParameterInstructions()),O(w)]}).s("AWSDnsV20130401","GetChange",{}).n("Route53Client","GetChangeCommand").f(void 0,void 0).ser(wD).de(Rq).build(){}D();k();J();class zI extends W.classBuilder().ep(K).m(function(f,h,w,s){return[z(w,this.serialize,this.deserialize),R(w,f.getEndpointParameterInstructions())]}).s("AWSDnsV20130401","GetCheckerIpRanges",{}).n("Route53Client","GetCheckerIpRangesCommand").f(void 0,void 0).ser(sD).de(Xq).build(){}D();k();J();class RI extends W.classBuilder().ep(K).m(function(f,h,w,s){return[z(w,this.serialize,this.deserialize),R(w,f.getEndpointParameterInstructions()),O(w)]}).s("AWSDnsV20130401","GetDNSSEC",{}).n("Route53Client","GetDNSSECCommand").f(void 0,void 0).ser($D).de(Sq).build(){}D();k();J();class XI extends W.classBuilder().ep(K).m(function(f,h,w,s){return[z(w,this.serialize,this.deserialize),R(w,f.getEndpointParameterInstructions())]}).s("AWSDnsV20130401","GetGeoLocation",{}).n("Route53Client","GetGeoLocationCommand").f(void 0,void 0).ser(rD).de(Yq).build(){}D();k();J();class SI extends W.classBuilder().ep(K).m(function(f,h,w,s){return[z(w,this.serialize,this.deserialize),R(w,f.getEndpointParameterInstructions())]}).s("AWSDnsV20130401","GetHealthCheck",{}).n("Route53Client","GetHealthCheckCommand").f(void 0,void 0).ser(ED).de(Mq).build(){}D();k();J();class YI extends W.classBuilder().ep(K).m(function(f,h,w,s){return[z(w,this.serialize,this.deserialize),R(w,f.getEndpointParameterInstructions())]}).s("AWSDnsV20130401","GetHealthCheckCount",{}).n("Route53Client","GetHealthCheckCountCommand").f(void 0,void 0).ser(UD).de(Qq).build(){}D();k();J();class MI extends W.classBuilder().ep(K).m(function(f,h,w,s){return[z(w,this.serialize,this.deserialize),R(w,f.getEndpointParameterInstructions())]}).s("AWSDnsV20130401","GetHealthCheckLastFailureReason",{}).n("Route53Client","GetHealthCheckLastFailureReasonCommand").f(void 0,void 0).ser(TD).de(Kq).build(){}D();k();J();class QI extends W.classBuilder().ep(K).m(function(f,h,w,s){return[z(w,this.serialize,this.deserialize),R(w,f.getEndpointParameterInstructions())]}).s("AWSDnsV20130401","GetHealthCheckStatus",{}).n("Route53Client","GetHealthCheckStatusCommand").f(void 0,void 0).ser(FD).de(Zq).build(){}D();k();J();class KI extends W.classBuilder().ep(K).m(function(f,h,w,s){return[z(w,this.serialize,this.deserialize),R(w,f.getEndpointParameterInstructions()),O(w)]}).s("AWSDnsV20130401","GetHostedZone",{}).n("Route53Client","GetHostedZoneCommand").f(void 0,void 0).ser(CD).de(Jq).build(){}D();k();J();class ZI extends W.classBuilder().ep(K).m(function(f,h,w,s){return[z(w,this.serialize,this.deserialize),R(w,f.getEndpointParameterInstructions())]}).s("AWSDnsV20130401","GetHostedZoneCount",{}).n("Route53Client","GetHostedZoneCountCommand").f(void 0,void 0).ser(ID).de(Vq).build(){}D();k();J();class JI extends W.classBuilder().ep(K).m(function(f,h,w,s){return[z(w,this.serialize,this.deserialize),R(w,f.getEndpointParameterInstructions()),O(w)]}).s("AWSDnsV20130401","GetHostedZoneLimit",{}).n("Route53Client","GetHostedZoneLimitCommand").f(void 0,void 0).ser(LD).de(Pq).build(){}D();k();J();class VI extends W.classBuilder().ep(K).m(function(f,h,w,s){return[z(w,this.serialize,this.deserialize),R(w,f.getEndpointParameterInstructions()),O(w)]}).s("AWSDnsV20130401","GetQueryLoggingConfig",{}).n("Route53Client","GetQueryLoggingConfigCommand").f(void 0,void 0).ser(BD).de(Hq).build(){}D();k();J();class PI extends W.classBuilder().ep(K).m(function(f,h,w,s){return[z(w,this.serialize,this.deserialize),R(w,f.getEndpointParameterInstructions()),O(w)]}).s("AWSDnsV20130401","GetReusableDelegationSet",{}).n("Route53Client","GetReusableDelegationSetCommand").f(void 0,void 0).ser(AD).de(Nq).build(){}D();k();J();class HI extends W.classBuilder().ep(K).m(function(f,h,w,s){return[z(w,this.serialize,this.deserialize),R(w,f.getEndpointParameterInstructions()),O(w)]}).s("AWSDnsV20130401","GetReusableDelegationSetLimit",{}).n("Route53Client","GetReusableDelegationSetLimitCommand").f(void 0,void 0).ser(GD).de(Dq).build(){}D();k();J();class NI extends W.classBuilder().ep(K).m(function(f,h,w,s){return[z(w,this.serialize,this.deserialize),R(w,f.getEndpointParameterInstructions()),O(w)]}).s("AWSDnsV20130401","GetTrafficPolicy",{}).n("Route53Client","GetTrafficPolicyCommand").f(void 0,void 0).ser(WD).de(qq).build(){}D();k();J();class DI extends W.classBuilder().ep(K).m(function(f,h,w,s){return[z(w,this.serialize,this.deserialize),R(w,f.getEndpointParameterInstructions()),O(w)]}).s("AWSDnsV20130401","GetTrafficPolicyInstance",{}).n("Route53Client","GetTrafficPolicyInstanceCommand").f(void 0,void 0).ser(zD).de(kq).build(){}D();k();J();class qI extends W.classBuilder().ep(K).m(function(f,h,w,s){return[z(w,this.serialize,this.deserialize),R(w,f.getEndpointParameterInstructions())]}).s("AWSDnsV20130401","GetTrafficPolicyInstanceCount",{}).n("Route53Client","GetTrafficPolicyInstanceCountCommand").f(void 0,void 0).ser(RD).de(yq).build(){}D();k();J();class kI extends W.classBuilder().ep(K).m(function(f,h,w,s){return[z(w,this.serialize,this.deserialize),R(w,f.getEndpointParameterInstructions())]}).s("AWSDnsV20130401","ListCidrBlocks",{}).n("Route53Client","ListCidrBlocksCommand").f(void 0,void 0).ser(XD).de(jq).build(){}D();k();J();class yI extends W.classBuilder().ep(K).m(function(f,h,w,s){return[z(w,this.serialize,this.deserialize),R(w,f.getEndpointParameterInstructions())]}).s("AWSDnsV20130401","ListCidrCollections",{}).n("Route53Client","ListCidrCollectionsCommand").f(void 0,void 0).ser(SD).de(Oq).build(){}D();k();J();class jI extends W.classBuilder().ep(K).m(function(f,h,w,s){return[z(w,this.serialize,this.deserialize),R(w,f.getEndpointParameterInstructions())]}).s("AWSDnsV20130401","ListCidrLocations",{}).n("Route53Client","ListCidrLocationsCommand").f(void 0,void 0).ser(YD).de(lq).build(){}D();k();J();class OI extends W.classBuilder().ep(K).m(function(f,h,w,s){return[z(w,this.serialize,this.deserialize),R(w,f.getEndpointParameterInstructions())]}).s("AWSDnsV20130401","ListGeoLocations",{}).n("Route53Client","ListGeoLocationsCommand").f(void 0,void 0).ser(MD).de(vq).build(){}D();k();J();class lI extends W.classBuilder().ep(K).m(function(f,h,w,s){return[z(w,this.serialize,this.deserialize),R(w,f.getEndpointParameterInstructions())]}).s("AWSDnsV20130401","ListHealthChecks",{}).n("Route53Client","ListHealthChecksCommand").f(void 0,void 0).ser(QD).de(bq).build(){}D();k();J();class vI extends W.classBuilder().ep(K).m(function(f,h,w,s){return[z(w,this.serialize,this.deserialize),R(w,f.getEndpointParameterInstructions()),O(w)]}).s("AWSDnsV20130401","ListHostedZonesByName",{}).n("Route53Client","ListHostedZonesByNameCommand").f(void 0,void 0).ser(ZD).de(dq).build(){}D();k();J();class bI extends W.classBuilder().ep(K).m(function(f,h,w,s){return[z(w,this.serialize,this.deserialize),R(w,f.getEndpointParameterInstructions())]}).s("AWSDnsV20130401","ListHostedZonesByVPC",{}).n("Route53Client","ListHostedZonesByVPCCommand").f(void 0,void 0).ser(JD).de(iq).build(){}D();k();J();class mI extends W.classBuilder().ep(K).m(function(f,h,w,s){return[z(w,this.serialize,this.deserialize),R(w,f.getEndpointParameterInstructions()),O(w)]}).s("AWSDnsV20130401","ListHostedZones",{}).n("Route53Client","ListHostedZonesCommand").f(void 0,void 0).ser(KD).de(mq).build(){}D();k();J();class dI extends W.classBuilder().ep(K).m(function(f,h,w,s){return[z(w,this.serialize,this.deserialize),R(w,f.getEndpointParameterInstructions()),O(w)]}).s("AWSDnsV20130401","ListQueryLoggingConfigs",{}).n("Route53Client","ListQueryLoggingConfigsCommand").f(void 0,void 0).ser(VD).de(cq).build(){}D();k();J();class iI extends W.classBuilder().ep(K).m(function(f,h,w,s){return[z(w,this.serialize,this.deserialize),R(w,f.getEndpointParameterInstructions()),O(w)]}).s("AWSDnsV20130401","ListResourceRecordSets",{}).n("Route53Client","ListResourceRecordSetsCommand").f(void 0,void 0).ser(PD).de(gq).build(){}D();k();J();class cI extends W.classBuilder().ep(K).m(function(f,h,w,s){return[z(w,this.serialize,this.deserialize),R(w,f.getEndpointParameterInstructions())]}).s("AWSDnsV20130401","ListReusableDelegationSets",{}).n("Route53Client","ListReusableDelegationSetsCommand").f(void 0,void 0).ser(HD).de(xq).build(){}D();k();J();class gI extends W.classBuilder().ep(K).m(function(f,h,w,s){return[z(w,this.serialize,this.deserialize),R(w,f.getEndpointParameterInstructions())]}).s("AWSDnsV20130401","ListTagsForResource",{}).n("Route53Client","ListTagsForResourceCommand").f(void 0,void 0).ser(ND).de(_q).build(){}D();k();J();class xI extends W.classBuilder().ep(K).m(function(f,h,w,s){return[z(w,this.serialize,this.deserialize),R(w,f.getEndpointParameterInstructions())]}).s("AWSDnsV20130401","ListTagsForResources",{}).n("Route53Client","ListTagsForResourcesCommand").f(void 0,void 0).ser(DD).de(nq).build(){}D();k();J();class _I extends W.classBuilder().ep(K).m(function(f,h,w,s){return[z(w,this.serialize,this.deserialize),R(w,f.getEndpointParameterInstructions())]}).s("AWSDnsV20130401","ListTrafficPolicies",{}).n("Route53Client","ListTrafficPoliciesCommand").f(void 0,void 0).ser(qD).de(eq).build(){}D();k();J();class nI extends W.classBuilder().ep(K).m(function(f,h,w,s){return[z(w,this.serialize,this.deserialize),R(w,f.getEndpointParameterInstructions()),O(w)]}).s("AWSDnsV20130401","ListTrafficPolicyInstancesByHostedZone",{}).n("Route53Client","ListTrafficPolicyInstancesByHostedZoneCommand").f(void 0,void 0).ser(yD).de(oq).build(){}D();k();J();class eI extends W.classBuilder().ep(K).m(function(f,h,w,s){return[z(w,this.serialize,this.deserialize),R(w,f.getEndpointParameterInstructions())]}).s("AWSDnsV20130401","ListTrafficPolicyInstancesByPolicy",{}).n("Route53Client","ListTrafficPolicyInstancesByPolicyCommand").f(void 0,void 0).ser(jD).de(pq).build(){}D();k();J();class aI extends W.classBuilder().ep(K).m(function(f,h,w,s){return[z(w,this.serialize,this.deserialize),R(w,f.getEndpointParameterInstructions())]}).s("AWSDnsV20130401","ListTrafficPolicyInstances",{}).n("Route53Client","ListTrafficPolicyInstancesCommand").f(void 0,void 0).ser(kD).de(aq).build(){}D();k();J();class oI extends W.classBuilder().ep(K).m(function(f,h,w,s){return[z(w,this.serialize,this.deserialize),R(w,f.getEndpointParameterInstructions()),O(w)]}).s("AWSDnsV20130401","ListTrafficPolicyVersions",{}).n("Route53Client","ListTrafficPolicyVersionsCommand").f(void 0,void 0).ser(OD).de(uq).build(){}D();k();J();class pI extends W.classBuilder().ep(K).m(function(f,h,w,s){return[z(w,this.serialize,this.deserialize),R(w,f.getEndpointParameterInstructions()),O(w)]}).s("AWSDnsV20130401","ListVPCAssociationAuthorizations",{}).n("Route53Client","ListVPCAssociationAuthorizationsCommand").f(void 0,void 0).ser(lD).de(tq).build(){}D();k();J();class uI extends W.classBuilder().ep(K).m(function(f,h,w,s){return[z(w,this.serialize,this.deserialize),R(w,f.getEndpointParameterInstructions()),O(w)]}).s("AWSDnsV20130401","TestDNSAnswer",{}).n("Route53Client","TestDNSAnswerCommand").f(void 0,void 0).ser(vD).de(fk).build(){}D();k();J();class tI extends W.classBuilder().ep(K).m(function(f,h,w,s){return[z(w,this.serialize,this.deserialize),R(w,f.getEndpointParameterInstructions())]}).s("AWSDnsV20130401","UpdateHealthCheck",{}).n("Route53Client","UpdateHealthCheckCommand").f(void 0,void 0).ser(bD).de(hk).build(){}D();k();J();class fL extends W.classBuilder().ep(K).m(function(f,h,w,s){return[z(w,this.serialize,this.deserialize),R(w,f.getEndpointParameterInstructions()),O(w)]}).s("AWSDnsV20130401","UpdateHostedZoneComment",{}).n("Route53Client","UpdateHostedZoneCommentCommand").f(void 0,void 0).ser(mD).de(wk).build(){}D();k();J();class hL extends W.classBuilder().ep(K).m(function(f,h,w,s){return[z(w,this.serialize,this.deserialize),R(w,f.getEndpointParameterInstructions()),O(w)]}).s("AWSDnsV20130401","UpdateTrafficPolicyComment",{}).n("Route53Client","UpdateTrafficPolicyCommentCommand").f(void 0,void 0).ser(dD).de(sk).build(){}D();k();J();class wL extends W.classBuilder().ep(K).m(function(f,h,w,s){return[z(w,this.serialize,this.deserialize),R(w,f.getEndpointParameterInstructions()),O(w)]}).s("AWSDnsV20130401","UpdateTrafficPolicyInstance",{}).n("Route53Client","UpdateTrafficPolicyInstanceCommand").f(void 0,void 0).ser(iD).de($k).build(){}var xr0={ActivateKeySigningKeyCommand:dC,AssociateVPCWithHostedZoneCommand:iC,ChangeCidrCollectionCommand:cC,ChangeResourceRecordSetsCommand:gC,ChangeTagsForResourceCommand:xC,CreateCidrCollectionCommand:_C,CreateHealthCheckCommand:nC,CreateHostedZoneCommand:eC,CreateKeySigningKeyCommand:aC,CreateQueryLoggingConfigCommand:oC,CreateReusableDelegationSetCommand:pC,CreateTrafficPolicyCommand:uC,CreateTrafficPolicyInstanceCommand:tC,CreateTrafficPolicyVersionCommand:fI,CreateVPCAssociationAuthorizationCommand:hI,DeactivateKeySigningKeyCommand:wI,DeleteCidrCollectionCommand:sI,DeleteHealthCheckCommand:$I,DeleteHostedZoneCommand:rI,DeleteKeySigningKeyCommand:EI,DeleteQueryLoggingConfigCommand:UI,DeleteReusableDelegationSetCommand:TI,DeleteTrafficPolicyCommand:FI,DeleteTrafficPolicyInstanceCommand:CI,DeleteVPCAssociationAuthorizationCommand:II,DisableHostedZoneDNSSECCommand:LI,DisassociateVPCFromHostedZoneCommand:BI,EnableHostedZoneDNSSECCommand:AI,GetAccountLimitCommand:GI,GetChangeCommand:WI,GetCheckerIpRangesCommand:zI,GetDNSSECCommand:RI,GetGeoLocationCommand:XI,GetHealthCheckCommand:SI,GetHealthCheckCountCommand:YI,GetHealthCheckLastFailureReasonCommand:MI,GetHealthCheckStatusCommand:QI,GetHostedZoneCommand:KI,GetHostedZoneCountCommand:ZI,GetHostedZoneLimitCommand:JI,GetQueryLoggingConfigCommand:VI,GetReusableDelegationSetCommand:PI,GetReusableDelegationSetLimitCommand:HI,GetTrafficPolicyCommand:NI,GetTrafficPolicyInstanceCommand:DI,GetTrafficPolicyInstanceCountCommand:qI,ListCidrBlocksCommand:kI,ListCidrCollectionsCommand:yI,ListCidrLocationsCommand:jI,ListGeoLocationsCommand:OI,ListHealthChecksCommand:lI,ListHostedZonesCommand:mI,ListHostedZonesByNameCommand:vI,ListHostedZonesByVPCCommand:bI,ListQueryLoggingConfigsCommand:dI,ListResourceRecordSetsCommand:iI,ListReusableDelegationSetsCommand:cI,ListTagsForResourceCommand:gI,ListTagsForResourcesCommand:xI,ListTrafficPoliciesCommand:_I,ListTrafficPolicyInstancesCommand:aI,ListTrafficPolicyInstancesByHostedZoneCommand:nI,ListTrafficPolicyInstancesByPolicyCommand:eI,ListTrafficPolicyVersionsCommand:oI,ListVPCAssociationAuthorizationsCommand:pI,TestDNSAnswerCommand:uI,UpdateHealthCheckCommand:tI,UpdateHostedZoneCommentCommand:fL,UpdateTrafficPolicyCommentCommand:hL,UpdateTrafficPolicyInstanceCommand:wL};class dh extends Z8{}Es(xr0,dh);r4();E4();U4();m$();Yh();var S$=p(m0(),1);$E();D();$w();J();var Sk=p(O0(),1);cf();var Yk=async(f,h,w)=>{return{operation:Xh(h).operation,region:await L1(f.region)()||(()=>{throw new Error("expected `region` to be configured for `aws.auth#sigv4`")})()}};function _r0(f){return{schemeId:"aws.auth#sigv4",signingProperties:{name:"route53domains",region:f.region},propertiesExtractor:(h,w)=>({signingProperties:{config:h,context:w}})}}var Mk=(f)=>{let h=[];switch(f.operation){default:h.push(_r0(f))}return h},Qk=(f)=>{return{...Sk.resolveAwsSdkSigV4Config(f)}};var Kk=(f)=>{return{...f,useDualstackEndpoint:f.useDualstackEndpoint??!1,useFipsEndpoint:f.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 Zk={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.772.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/core":"3.758.0","@aws-sdk/credential-provider-node":"3.772.0","@aws-sdk/middleware-host-header":"3.734.0","@aws-sdk/middleware-logger":"3.734.0","@aws-sdk/middleware-recursion-detection":"3.772.0","@aws-sdk/middleware-user-agent":"3.758.0","@aws-sdk/region-config-resolver":"3.734.0","@aws-sdk/types":"3.734.0","@aws-sdk/util-endpoints":"3.743.0","@aws-sdk/util-user-agent-browser":"3.734.0","@aws-sdk/util-user-agent-node":"3.758.0","@smithy/config-resolver":"^4.0.1","@smithy/core":"^3.1.5","@smithy/fetch-http-handler":"^5.0.1","@smithy/hash-node":"^4.0.1","@smithy/invalid-dependency":"^4.0.1","@smithy/middleware-content-length":"^4.0.1","@smithy/middleware-endpoint":"^4.0.6","@smithy/middleware-retry":"^4.0.7","@smithy/middleware-serde":"^4.0.2","@smithy/middleware-stack":"^4.0.1","@smithy/node-config-provider":"^4.0.1","@smithy/node-http-handler":"^4.0.3","@smithy/protocol-http":"^5.0.1","@smithy/smithy-client":"^4.1.6","@smithy/types":"^4.1.0","@smithy/url-parser":"^4.0.1","@smithy/util-base64":"^4.0.0","@smithy/util-body-length-browser":"^4.0.0","@smithy/util-body-length-node":"^4.0.0","@smithy/util-defaults-mode-browser":"^4.0.7","@smithy/util-defaults-mode-node":"^4.0.7","@smithy/util-endpoints":"^3.0.1","@smithy/util-middleware":"^4.0.1","@smithy/util-retry":"^4.0.1","@smithy/util-utf8":"^4.0.0",tslib:"^2.6.2"},devDependencies:{"@tsconfig/node18":"18.2.4","@types/node":"^18.19.69",concurrently:"7.0.0","downlevel-dts":"0.10.1",rimraf:"3.0.2",typescript:"~5.2.2"},engines:{node:">=18.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 mk=p(O0(),1);RU();Yh();XU();$w();Kh();hr();SU();wf();var vk=p(O0(),1);J();pw();YU();bs();N$();df();var Jk={["required"]:!1,type:"String"},Vk={["required"]:!0,default:!1,type:"Boolean"},Pk={["ref"]:"Endpoint"},yk={["fn"]:"booleanEquals",["argv"]:[{["ref"]:"UseFIPS"},!0]},jk={["fn"]:"booleanEquals",["argv"]:[{["ref"]:"UseDualStack"},!0]},lf={},Hk={["fn"]:"getAttr",["argv"]:[{["ref"]:"PartitionResult"},"supportsFIPS"]},Nk={["fn"]:"booleanEquals",["argv"]:[!0,{["fn"]:"getAttr",["argv"]:[{["ref"]:"PartitionResult"},"supportsDualStack"]}]},Dk=[yk],qk=[jk],kk=[{["ref"]:"Region"}],er0={version:"1.0",parameters:{Region:Jk,UseDualStack:Vk,UseFIPS:Vk,Endpoint:Jk},rules:[{conditions:[{["fn"]:"isSet",["argv"]:[Pk]}],rules:[{conditions:Dk,error:"Invalid Configuration: FIPS and custom endpoint are not supported",type:"error"},{conditions:qk,error:"Invalid Configuration: Dualstack and custom endpoint are not supported",type:"error"},{endpoint:{url:Pk,properties:lf,headers:lf},type:"endpoint"}],type:"tree"},{conditions:[{["fn"]:"isSet",["argv"]:kk}],rules:[{conditions:[{["fn"]:"aws.partition",["argv"]:kk,assign:"PartitionResult"}],rules:[{conditions:[yk,jk],rules:[{conditions:[{["fn"]:"booleanEquals",["argv"]:[!0,Hk]},Nk],rules:[{endpoint:{url:"https://route53domains-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:lf,headers:lf},type:"endpoint"}],type:"tree"},{error:"FIPS and DualStack are enabled, but this partition does not support one or both",type:"error"}],type:"tree"},{conditions:Dk,rules:[{conditions:[{["fn"]:"booleanEquals",["argv"]:[Hk,!0]}],rules:[{endpoint:{url:"https://route53domains-fips.{Region}.{PartitionResult#dnsSuffix}",properties:lf,headers:lf},type:"endpoint"}],type:"tree"},{error:"FIPS is enabled but this partition does not support FIPS",type:"error"}],type:"tree"},{conditions:qk,rules:[{conditions:[Nk],rules:[{endpoint:{url:"https://route53domains.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:lf,headers:lf},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:lf,headers:lf},type:"endpoint"}],type:"tree"}],type:"tree"},{error:"Invalid Configuration: Missing Region",type:"error"}]},Ok=er0;var ar0=new gh({size:50,params:["Endpoint","Region","UseDualStack","UseFIPS"]}),lk=(f,h={})=>{return ar0.get(f,()=>xh(Ok,{endpointParams:f,logger:h.logger}))};t1.aws=_h;var bk=(f)=>{return{apiVersion:"2014-05-15",base64Decoder:f?.base64Decoder??ds,base64Encoder:f?.base64Encoder??is,disableHostPrefix:f?.disableHostPrefix??!1,endpointProvider:f?.endpointProvider??lk,extensions:f?.extensions??[],httpAuthSchemeProvider:f?.httpAuthSchemeProvider??Mk,httpAuthSchemes:f?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:(h)=>h.getIdentityProvider("aws.auth#sigv4"),signer:new vk.AwsSdkSigV4Signer}],logger:f?.logger??new _f,serviceId:f?.serviceId??"Route 53 Domains",urlParser:f?.urlParser??O1,utf8Decoder:f?.utf8Decoder??Jf,utf8Encoder:f?.utf8Encoder??vs}};J();MU();J();var dk=(f)=>{Cs(process.version);let h=cs(f),w=()=>h().then(Fs),s=bk(f);mk.emitWarningIfUnsupportedVersion(process.version);let $={profile:f?.profile};return{...s,...f,runtime:"node",defaultsMode:h,bodyLengthChecker:f?.bodyLengthChecker??ms,credentialDefaultProvider:f?.credentialDefaultProvider??vU,defaultUserAgentProvider:f?.defaultUserAgentProvider??ys({serviceId:s.serviceId,clientVersion:Zk.version}),maxAttempts:f?.maxAttempts??z0(ws,f),region:f?.region??z0(Sh,{..._w,...$}),requestHandler:rf.create(f?.requestHandler??w),retryMode:f?.retryMode??z0({...$s,default:async()=>(await w()).retryMode||Zh},f),sha256:f?.sha256??Fw.bind(null,"sha256"),streamCollector:f?.streamCollector??Ws,useDualstackEndpoint:f?.useDualstackEndpoint??z0(gw,$),useFipsEndpoint:f?.useFipsEndpoint??z0(xw,$),userAgentAppId:f?.userAgentAppId??z0(js,$)}};QU();F1();J();var ik=(f)=>{let{httpAuthSchemes:h,httpAuthSchemeProvider:w,credentials:s}=f;return{setHttpAuthScheme($){let r=h.findIndex((E)=>E.schemeId===$.schemeId);if(r===-1)h.push($);else h.splice(r,1,$)},httpAuthSchemes(){return h},setHttpAuthSchemeProvider($){w=$},httpAuthSchemeProvider(){return w},setCredentials($){s=$},credentials(){return s}}},ck=(f)=>{return{httpAuthSchemes:f.httpAuthSchemes(),httpAuthSchemeProvider:f.httpAuthSchemeProvider(),credentials:f.credentials()}};var KT=(f)=>f,gk=(f,h)=>{let w={...KT(gs(f)),...KT(Is(f)),...KT(Zw(f)),...KT(ik(f))};return h.forEach((s)=>s.configure(w)),{...f,...xs(w),...Ls(w),...Jw(w),...ck(w)}};class sL extends ww{config;constructor(...[f]){let h=dk(f||{}),w=Kk(h),s=jw(w),$=ss(s),r=nw($),E=Vw(r),U=uw(E),T=Qk(U),F=gk(T,f?.extensions||[]);super(F);this.config=F,this.middlewareStack.use(iw(this.config)),this.middlewareStack.use(As(this.config)),this.middlewareStack.use(ew(this.config)),this.middlewareStack.use(Pw(this.config)),this.middlewareStack.use(Hw(this.config)),this.middlewareStack.use(Nw(this.config)),this.middlewareStack.use(S$.getHttpAuthSchemeEndpointRuleSetPlugin(this.config,{httpAuthSchemeParametersProvider:Yk,identityProviderConfigProvider:async(C)=>new S$.DefaultIdentityProviderConfig({"aws.auth#sigv4":C.credentials})})),this.middlewareStack.use(S$.getHttpSigningPlugin(this.config))}destroy(){super.destroy()}}J();D();k();J();J();J();class o1 extends $f{constructor(f){super(f);Object.setPrototypeOf(this,o1.prototype)}}class ZT extends o1{name="DomainLimitExceeded";$fault="client";constructor(f){super({name:"DomainLimitExceeded",$fault:"client",...f});Object.setPrototypeOf(this,ZT.prototype)}}class JT extends o1{name="InvalidInput";$fault="client";constructor(f){super({name:"InvalidInput",$fault:"client",...f});Object.setPrototypeOf(this,JT.prototype)}}class VT extends o1{name="OperationLimitExceeded";$fault="client";constructor(f){super({name:"OperationLimitExceeded",$fault:"client",...f});Object.setPrototypeOf(this,VT.prototype)}}class PT extends o1{name="UnsupportedTLD";$fault="client";constructor(f){super({name:"UnsupportedTLD",$fault:"client",...f});Object.setPrototypeOf(this,PT.prototype)}}class HT extends o1{name="DnssecLimitExceeded";$fault="client";constructor(f){super({name:"DnssecLimitExceeded",$fault:"client",...f});Object.setPrototypeOf(this,HT.prototype)}}class NT extends o1{name="DuplicateRequest";$fault="client";requestId;constructor(f){super({name:"DuplicateRequest",$fault:"client",...f});Object.setPrototypeOf(this,NT.prototype),this.requestId=f.requestId}}class DT extends o1{name="TLDRulesViolation";$fault="client";constructor(f){super({name:"TLDRulesViolation",$fault:"client",...f});Object.setPrototypeOf(this,DT.prototype)}}var xk=(f)=>({...f,...f.Password&&{Password:T0}}),_k=(f)=>({...f,...f.AuthCode&&{AuthCode:T0}});var nk=(f)=>({...f,...f.AdminContact&&{AdminContact:T0},...f.RegistrantContact&&{RegistrantContact:T0},...f.TechContact&&{TechContact:T0},...f.AbuseContactEmail&&{AbuseContactEmail:T0},...f.AbuseContactPhone&&{AbuseContactPhone:T0},...f.BillingContact&&{BillingContact:T0}}),ek=(f)=>({...f,...f.AdminContact&&{AdminContact:T0},...f.RegistrantContact&&{RegistrantContact:T0},...f.TechContact&&{TechContact:T0},...f.BillingContact&&{BillingContact:T0}}),ak=(f)=>({...f,...f.emailAddress&&{emailAddress:T0}}),ok=(f)=>({...f,...f.AuthCode&&{AuthCode:T0}}),pk=(f)=>({...f,...f.AuthCode&&{AuthCode:T0},...f.AdminContact&&{AdminContact:T0},...f.RegistrantContact&&{RegistrantContact:T0},...f.TechContact&&{TechContact:T0},...f.BillingContact&&{BillingContact:T0}}),uk=(f)=>({...f,...f.Password&&{Password:T0}}),tk=(f)=>({...f,...f.AdminContact&&{AdminContact:T0},...f.RegistrantContact&&{RegistrantContact:T0},...f.TechContact&&{TechContact:T0},...f.BillingContact&&{BillingContact:T0}}),fy=(f)=>({...f,...f.FIAuthKey&&{FIAuthKey:T0}});var s0=p(O0(),1);F1();J();var hy=async(f,h)=>{let w=U0("AcceptDomainTransferFromAnotherAwsAccount"),s;return s=JSON.stringify(v(f)),E0(h,w,"/",void 0,s)},wy=async(f,h)=>{let w=U0("AssociateDelegationSignerToDomain"),s;return s=JSON.stringify(v(f)),E0(h,w,"/",void 0,s)},sy=async(f,h)=>{let w=U0("CancelDomainTransferToAnotherAwsAccount"),s;return s=JSON.stringify(v(f)),E0(h,w,"/",void 0,s)},$y=async(f,h)=>{let w=U0("CheckDomainAvailability"),s;return s=JSON.stringify(v(f)),E0(h,w,"/",void 0,s)},ry=async(f,h)=>{let w=U0("CheckDomainTransferability"),s;return s=JSON.stringify(v(f)),E0(h,w,"/",void 0,s)},Ey=async(f,h)=>{let w=U0("DeleteDomain"),s;return s=JSON.stringify(v(f)),E0(h,w,"/",void 0,s)},Uy=async(f,h)=>{let w=U0("DeleteTagsForDomain"),s;return s=JSON.stringify(v(f)),E0(h,w,"/",void 0,s)},Ty=async(f,h)=>{let w=U0("DisableDomainAutoRenew"),s;return s=JSON.stringify(v(f)),E0(h,w,"/",void 0,s)},Fy=async(f,h)=>{let w=U0("DisableDomainTransferLock"),s;return s=JSON.stringify(v(f)),E0(h,w,"/",void 0,s)},Cy=async(f,h)=>{let w=U0("DisassociateDelegationSignerFromDomain"),s;return s=JSON.stringify(v(f)),E0(h,w,"/",void 0,s)},Iy=async(f,h)=>{let w=U0("EnableDomainAutoRenew"),s;return s=JSON.stringify(v(f)),E0(h,w,"/",void 0,s)},Ly=async(f,h)=>{let w=U0("EnableDomainTransferLock"),s;return s=JSON.stringify(v(f)),E0(h,w,"/",void 0,s)},By=async(f,h)=>{let w=U0("GetContactReachabilityStatus"),s;return s=JSON.stringify(v(f)),E0(h,w,"/",void 0,s)},Ay=async(f,h)=>{let w=U0("GetDomainDetail"),s;return s=JSON.stringify(v(f)),E0(h,w,"/",void 0,s)},Gy=async(f,h)=>{let w=U0("GetDomainSuggestions"),s;return s=JSON.stringify(v(f)),E0(h,w,"/",void 0,s)},Wy=async(f,h)=>{let w=U0("GetOperationDetail"),s;return s=JSON.stringify(v(f)),E0(h,w,"/",void 0,s)},zy=async(f,h)=>{let w=U0("ListDomains"),s;return s=JSON.stringify(v(f)),E0(h,w,"/",void 0,s)},Ry=async(f,h)=>{let w=U0("ListOperations"),s;return s=JSON.stringify($40(f,h)),E0(h,w,"/",void 0,s)},Xy=async(f,h)=>{let w=U0("ListPrices"),s;return s=JSON.stringify(v(f)),E0(h,w,"/",void 0,s)},Sy=async(f,h)=>{let w=U0("ListTagsForDomain"),s;return s=JSON.stringify(v(f)),E0(h,w,"/",void 0,s)},Yy=async(f,h)=>{let w=U0("PushDomain"),s;return s=JSON.stringify(v(f)),E0(h,w,"/",void 0,s)},My=async(f,h)=>{let w=U0("RegisterDomain"),s;return s=JSON.stringify(v(f)),E0(h,w,"/",void 0,s)},Qy=async(f,h)=>{let w=U0("RejectDomainTransferFromAnotherAwsAccount"),s;return s=JSON.stringify(v(f)),E0(h,w,"/",void 0,s)},Ky=async(f,h)=>{let w=U0("RenewDomain"),s;return s=JSON.stringify(v(f)),E0(h,w,"/",void 0,s)},Zy=async(f,h)=>{let w=U0("ResendContactReachabilityEmail"),s;return s=JSON.stringify(v(f)),E0(h,w,"/",void 0,s)},Jy=async(f,h)=>{let w=U0("ResendOperationAuthorization"),s;return s=JSON.stringify(v(f)),E0(h,w,"/",void 0,s)},Vy=async(f,h)=>{let w=U0("RetrieveDomainAuthCode"),s;return s=JSON.stringify(v(f)),E0(h,w,"/",void 0,s)},Py=async(f,h)=>{let w=U0("TransferDomain"),s;return s=JSON.stringify(v(f)),E0(h,w,"/",void 0,s)},Hy=async(f,h)=>{let w=U0("TransferDomainToAnotherAwsAccount"),s;return s=JSON.stringify(v(f)),E0(h,w,"/",void 0,s)},Ny=async(f,h)=>{let w=U0("UpdateDomainContact"),s;return s=JSON.stringify(r40(f,h)),E0(h,w,"/",void 0,s)},Dy=async(f,h)=>{let w=U0("UpdateDomainContactPrivacy"),s;return s=JSON.stringify(v(f)),E0(h,w,"/",void 0,s)},qy=async(f,h)=>{let w=U0("UpdateDomainNameservers"),s;return s=JSON.stringify(v(f)),E0(h,w,"/",void 0,s)},ky=async(f,h)=>{let w=U0("UpdateTagsForDomain"),s;return s=JSON.stringify(v(f)),E0(h,w,"/",void 0,s)},yy=async(f,h)=>{let w=U0("ViewBilling"),s;return s=JSON.stringify(E40(f,h)),E0(h,w,"/",void 0,s)},jy=async(f,h)=>{if(f.statusCode>=300)return r0(f,h);let w=await s0.parseJsonBody(f.body,h),s={};return s=v(w),{$metadata:f0(f),...s}},Oy=async(f,h)=>{if(f.statusCode>=300)return r0(f,h);let w=await s0.parseJsonBody(f.body,h),s={};return s=v(w),{$metadata:f0(f),...s}},ly=async(f,h)=>{if(f.statusCode>=300)return r0(f,h);let w=await s0.parseJsonBody(f.body,h),s={};return s=v(w),{$metadata:f0(f),...s}},vy=async(f,h)=>{if(f.statusCode>=300)return r0(f,h);let w=await s0.parseJsonBody(f.body,h),s={};return s=v(w),{$metadata:f0(f),...s}},by=async(f,h)=>{if(f.statusCode>=300)return r0(f,h);let w=await s0.parseJsonBody(f.body,h),s={};return s=v(w),{$metadata:f0(f),...s}},my=async(f,h)=>{if(f.statusCode>=300)return r0(f,h);let w=await s0.parseJsonBody(f.body,h),s={};return s=v(w),{$metadata:f0(f),...s}},dy=async(f,h)=>{if(f.statusCode>=300)return r0(f,h);let w=await s0.parseJsonBody(f.body,h),s={};return s=v(w),{$metadata:f0(f),...s}},iy=async(f,h)=>{if(f.statusCode>=300)return r0(f,h);let w=await s0.parseJsonBody(f.body,h),s={};return s=v(w),{$metadata:f0(f),...s}},cy=async(f,h)=>{if(f.statusCode>=300)return r0(f,h);let w=await s0.parseJsonBody(f.body,h),s={};return s=v(w),{$metadata:f0(f),...s}},gy=async(f,h)=>{if(f.statusCode>=300)return r0(f,h);let w=await s0.parseJsonBody(f.body,h),s={};return s=v(w),{$metadata:f0(f),...s}},xy=async(f,h)=>{if(f.statusCode>=300)return r0(f,h);let w=await s0.parseJsonBody(f.body,h),s={};return s=v(w),{$metadata:f0(f),...s}},_y=async(f,h)=>{if(f.statusCode>=300)return r0(f,h);let w=await s0.parseJsonBody(f.body,h),s={};return s=v(w),{$metadata:f0(f),...s}},ny=async(f,h)=>{if(f.statusCode>=300)return r0(f,h);let w=await s0.parseJsonBody(f.body,h),s={};return s=v(w),{$metadata:f0(f),...s}},ey=async(f,h)=>{if(f.statusCode>=300)return r0(f,h);let w=await s0.parseJsonBody(f.body,h),s={};return s=B40(w,h),{$metadata:f0(f),...s}},ay=async(f,h)=>{if(f.statusCode>=300)return r0(f,h);let w=await s0.parseJsonBody(f.body,h),s={};return s=v(w),{$metadata:f0(f),...s}},oy=async(f,h)=>{if(f.statusCode>=300)return r0(f,h);let w=await s0.parseJsonBody(f.body,h),s={};return s=A40(w,h),{$metadata:f0(f),...s}},py=async(f,h)=>{if(f.statusCode>=300)return r0(f,h);let w=await s0.parseJsonBody(f.body,h),s={};return s=G40(w,h),{$metadata:f0(f),...s}},uy=async(f,h)=>{if(f.statusCode>=300)return r0(f,h);let w=await s0.parseJsonBody(f.body,h),s={};return s=W40(w,h),{$metadata:f0(f),...s}},ty=async(f,h)=>{if(f.statusCode>=300)return r0(f,h);let w=await s0.parseJsonBody(f.body,h),s={};return s=z40(w,h),{$metadata:f0(f),...s}},fj=async(f,h)=>{if(f.statusCode>=300)return r0(f,h);let w=await s0.parseJsonBody(f.body,h),s={};return s=v(w),{$metadata:f0(f),...s}},hj=async(f,h)=>{if(f.statusCode>=300)return r0(f,h);return await B1.collectBody(f.body,h),{$metadata:f0(f)}},wj=async(f,h)=>{if(f.statusCode>=300)return r0(f,h);let w=await s0.parseJsonBody(f.body,h),s={};return s=v(w),{$metadata:f0(f),...s}},sj=async(f,h)=>{if(f.statusCode>=300)return r0(f,h);let w=await s0.parseJsonBody(f.body,h),s={};return s=v(w),{$metadata:f0(f),...s}},$j=async(f,h)=>{if(f.statusCode>=300)return r0(f,h);let w=await s0.parseJsonBody(f.body,h),s={};return s=v(w),{$metadata:f0(f),...s}},rj=async(f,h)=>{if(f.statusCode>=300)return r0(f,h);let w=await s0.parseJsonBody(f.body,h),s={};return s=v(w),{$metadata:f0(f),...s}},Ej=async(f,h)=>{if(f.statusCode>=300)return r0(f,h);return await B1.collectBody(f.body,h),{$metadata:f0(f)}},Uj=async(f,h)=>{if(f.statusCode>=300)return r0(f,h);let w=await s0.parseJsonBody(f.body,h),s={};return s=v(w),{$metadata:f0(f),...s}},Tj=async(f,h)=>{if(f.statusCode>=300)return r0(f,h);let w=await s0.parseJsonBody(f.body,h),s={};return s=v(w),{$metadata:f0(f),...s}},Fj=async(f,h)=>{if(f.statusCode>=300)return r0(f,h);let w=await s0.parseJsonBody(f.body,h),s={};return s=v(w),{$metadata:f0(f),...s}},Cj=async(f,h)=>{if(f.statusCode>=300)return r0(f,h);let w=await s0.parseJsonBody(f.body,h),s={};return s=v(w),{$metadata:f0(f),...s}},Ij=async(f,h)=>{if(f.statusCode>=300)return r0(f,h);let w=await s0.parseJsonBody(f.body,h),s={};return s=v(w),{$metadata:f0(f),...s}},Lj=async(f,h)=>{if(f.statusCode>=300)return r0(f,h);let w=await s0.parseJsonBody(f.body,h),s={};return s=v(w),{$metadata:f0(f),...s}},Bj=async(f,h)=>{if(f.statusCode>=300)return r0(f,h);let w=await s0.parseJsonBody(f.body,h),s={};return s=v(w),{$metadata:f0(f),...s}},Aj=async(f,h)=>{if(f.statusCode>=300)return r0(f,h);let w=await s0.parseJsonBody(f.body,h),s={};return s=S40(w,h),{$metadata:f0(f),...s}},r0=async(f,h)=>{let w={...f,body:await s0.parseJsonErrorBody(f.body,h)},s=s0.loadRestJsonErrorCode(f,w.body);switch(s){case"DomainLimitExceeded":case"com.amazonaws.route53domains#DomainLimitExceeded":throw await pr0(w,h);case"InvalidInput":case"com.amazonaws.route53domains#InvalidInput":throw await tr0(w,h);case"OperationLimitExceeded":case"com.amazonaws.route53domains#OperationLimitExceeded":throw await f40(w,h);case"UnsupportedTLD":case"com.amazonaws.route53domains#UnsupportedTLD":throw await w40(w,h);case"DnssecLimitExceeded":case"com.amazonaws.route53domains#DnssecLimitExceeded":throw await or0(w,h);case"DuplicateRequest":case"com.amazonaws.route53domains#DuplicateRequest":throw await ur0(w,h);case"TLDRulesViolation":case"com.amazonaws.route53domains#TLDRulesViolation":throw await h40(w,h);default:let $=w.body;return Y40({output:f,parsedBody:$,errorCode:s})}},or0=async(f,h)=>{let w=f.body,s=v(w),$=new HT({$metadata:f0(f),...s});return l($,w)},pr0=async(f,h)=>{let w=f.body,s=v(w),$=new ZT({$metadata:f0(f),...s});return l($,w)},ur0=async(f,h)=>{let w=f.body,s=v(w),$=new NT({$metadata:f0(f),...s});return l($,w)},tr0=async(f,h)=>{let w=f.body,s=v(w),$=new JT({$metadata:f0(f),...s});return l($,w)},f40=async(f,h)=>{let w=f.body,s=v(w),$=new VT({$metadata:f0(f),...s});return l($,w)},h40=async(f,h)=>{let w=f.body,s=v(w),$=new DT({$metadata:f0(f),...s});return l($,w)},w40=async(f,h)=>{let w=f.body,s=v(w),$=new PT({$metadata:f0(f),...s});return l($,w)},s40=(f,h)=>{return N0(f,{Currency:[],MaxPrice:$Y})},$40=(f,h)=>{return N0(f,{Marker:[],MaxItems:[],SortBy:[],SortOrder:[],Status:v,SubmittedSince:(w)=>w.getTime()/1000,Type:v})},r40=(f,h)=>{return N0(f,{AdminContact:v,BillingContact:v,Consent:(w)=>s40(w,h),DomainName:[],RegistrantContact:v,TechContact:v})},E40=(f,h)=>{return N0(f,{End:(w)=>w.getTime()/1000,Marker:[],MaxItems:[],Start:(w)=>w.getTime()/1000})},U40=(f,h)=>{return N0(f,{BillDate:(w)=>j(Qf(S1(w))),DomainName:A,InvoiceId:A,Operation:A,Price:m3})},T40=(f,h)=>{return(f||[]).filter((s)=>s!=null).map((s)=>{return U40(s,h)})},F40=(f,h)=>{return N0(f,{ChangeOwnershipPrice:(w)=>f4(w,h),Name:A,RegistrationPrice:(w)=>f4(w,h),RenewalPrice:(w)=>f4(w,h),RestorationPrice:(w)=>f4(w,h),TransferPrice:(w)=>f4(w,h)})},C40=(f,h)=>{return(f||[]).filter((s)=>s!=null).map((s)=>{return F40(s,h)})},I40=(f,h)=>{return N0(f,{AutoRenew:Vh,DomainName:A,Expiry:(w)=>j(Qf(S1(w))),TransferLock:Vh})},L40=(f,h)=>{return(f||[]).filter((s)=>s!=null).map((s)=>{return I40(s,h)})},B40=(f,h)=>{return N0(f,{AbuseContactEmail:A,AbuseContactPhone:A,AdminContact:v,AdminPrivacy:Vh,AutoRenew:Vh,BillingContact:v,BillingPrivacy:Vh,CreationDate:(w)=>j(Qf(S1(w))),DnsSec:A,DnssecKeys:v,DomainName:A,ExpirationDate:(w)=>j(Qf(S1(w))),Nameservers:v,RegistrantContact:v,RegistrantPrivacy:Vh,RegistrarName:A,RegistrarUrl:A,RegistryDomainId:A,Reseller:A,StatusList:v,TechContact:v,TechPrivacy:Vh,UpdatedDate:(w)=>j(Qf(S1(w))),WhoIsServer:A})},A40=(f,h)=>{return N0(f,{DomainName:A,LastUpdatedDate:(w)=>j(Qf(S1(w))),Message:A,OperationId:A,Status:A,StatusFlag:A,SubmittedDate:(w)=>j(Qf(S1(w))),Type:A})},G40=(f,h)=>{return N0(f,{Domains:(w)=>L40(w,h),NextPageMarker:A})},W40=(f,h)=>{return N0(f,{NextPageMarker:A,Operations:(w)=>X40(w,h)})},z40=(f,h)=>{return N0(f,{NextPageMarker:A,Prices:(w)=>C40(w,h)})},R40=(f,h)=>{return N0(f,{DomainName:A,LastUpdatedDate:(w)=>j(Qf(S1(w))),Message:A,OperationId:A,Status:A,StatusFlag:A,SubmittedDate:(w)=>j(Qf(S1(w))),Type:A})},X40=(f,h)=>{return(f||[]).filter((s)=>s!=null).map((s)=>{return R40(s,h)})},f4=(f,h)=>{return N0(f,{Currency:A,Price:m3})},S40=(f,h)=>{return N0(f,{BillingRecords:(w)=>T40(w,h),NextPageMarker:A})},f0=(f)=>({httpStatusCode:f.statusCode,requestId:f.headers["x-amzn-requestid"]??f.headers["x-amzn-request-id"]??f.headers["x-amz-request-id"],extendedRequestId:f.headers["x-amz-id-2"],cfId:f.headers["x-amz-cf-id"]});var Y40=Ts(o1),E0=async(f,h,w,s,$)=>{let{hostname:r,protocol:E="https",port:U,path:T}=await f.endpoint(),F={protocol:E,hostname:r,port:U,method:"POST",path:T.endsWith("/")?T.slice(0,-1)+w:T+w,headers:h};if(s!==void 0)F.hostname=s;if($!==void 0)F.body=$;return new n0(F)};function U0(f){return{"content-type":"application/x-amz-json-1.1","x-amz-target":`Route53Domains_v20140515.${f}`}}class $L extends W.classBuilder().ep(c).m(function(f,h,w,s){return[z(w,this.serialize,this.deserialize),R(w,f.getEndpointParameterInstructions())]}).s("Route53Domains_v20140515","AcceptDomainTransferFromAnotherAwsAccount",{}).n("Route53DomainsClient","AcceptDomainTransferFromAnotherAwsAccountCommand").f(xk,void 0).ser(hy).de(jy).build(){}D();k();J();class rL extends W.classBuilder().ep(c).m(function(f,h,w,s){return[z(w,this.serialize,this.deserialize),R(w,f.getEndpointParameterInstructions())]}).s("Route53Domains_v20140515","AssociateDelegationSignerToDomain",{}).n("Route53DomainsClient","AssociateDelegationSignerToDomainCommand").f(void 0,void 0).ser(wy).de(Oy).build(){}D();k();J();class EL extends W.classBuilder().ep(c).m(function(f,h,w,s){return[z(w,this.serialize,this.deserialize),R(w,f.getEndpointParameterInstructions())]}).s("Route53Domains_v20140515","CancelDomainTransferToAnotherAwsAccount",{}).n("Route53DomainsClient","CancelDomainTransferToAnotherAwsAccountCommand").f(void 0,void 0).ser(sy).de(ly).build(){}D();k();J();class UL extends W.classBuilder().ep(c).m(function(f,h,w,s){return[z(w,this.serialize,this.deserialize),R(w,f.getEndpointParameterInstructions())]}).s("Route53Domains_v20140515","CheckDomainAvailability",{}).n("Route53DomainsClient","CheckDomainAvailabilityCommand").f(void 0,void 0).ser($y).de(vy).build(){}D();k();J();class TL extends W.classBuilder().ep(c).m(function(f,h,w,s){return[z(w,this.serialize,this.deserialize),R(w,f.getEndpointParameterInstructions())]}).s("Route53Domains_v20140515","CheckDomainTransferability",{}).n("Route53DomainsClient","CheckDomainTransferabilityCommand").f(_k,void 0).ser(ry).de(by).build(){}D();k();J();class FL extends W.classBuilder().ep(c).m(function(f,h,w,s){return[z(w,this.serialize,this.deserialize),R(w,f.getEndpointParameterInstructions())]}).s("Route53Domains_v20140515","DeleteDomain",{}).n("Route53DomainsClient","DeleteDomainCommand").f(void 0,void 0).ser(Ey).de(my).build(){}D();k();J();class CL extends W.classBuilder().ep(c).m(function(f,h,w,s){return[z(w,this.serialize,this.deserialize),R(w,f.getEndpointParameterInstructions())]}).s("Route53Domains_v20140515","DeleteTagsForDomain",{}).n("Route53DomainsClient","DeleteTagsForDomainCommand").f(void 0,void 0).ser(Uy).de(dy).build(){}D();k();J();class IL extends W.classBuilder().ep(c).m(function(f,h,w,s){return[z(w,this.serialize,this.deserialize),R(w,f.getEndpointParameterInstructions())]}).s("Route53Domains_v20140515","DisableDomainAutoRenew",{}).n("Route53DomainsClient","DisableDomainAutoRenewCommand").f(void 0,void 0).ser(Ty).de(iy).build(){}D();k();J();class LL extends W.classBuilder().ep(c).m(function(f,h,w,s){return[z(w,this.serialize,this.deserialize),R(w,f.getEndpointParameterInstructions())]}).s("Route53Domains_v20140515","DisableDomainTransferLock",{}).n("Route53DomainsClient","DisableDomainTransferLockCommand").f(void 0,void 0).ser(Fy).de(cy).build(){}D();k();J();class BL extends W.classBuilder().ep(c).m(function(f,h,w,s){return[z(w,this.serialize,this.deserialize),R(w,f.getEndpointParameterInstructions())]}).s("Route53Domains_v20140515","DisassociateDelegationSignerFromDomain",{}).n("Route53DomainsClient","DisassociateDelegationSignerFromDomainCommand").f(void 0,void 0).ser(Cy).de(gy).build(){}D();k();J();class AL extends W.classBuilder().ep(c).m(function(f,h,w,s){return[z(w,this.serialize,this.deserialize),R(w,f.getEndpointParameterInstructions())]}).s("Route53Domains_v20140515","EnableDomainAutoRenew",{}).n("Route53DomainsClient","EnableDomainAutoRenewCommand").f(void 0,void 0).ser(Iy).de(xy).build(){}D();k();J();class GL extends W.classBuilder().ep(c).m(function(f,h,w,s){return[z(w,this.serialize,this.deserialize),R(w,f.getEndpointParameterInstructions())]}).s("Route53Domains_v20140515","EnableDomainTransferLock",{}).n("Route53DomainsClient","EnableDomainTransferLockCommand").f(void 0,void 0).ser(Ly).de(_y).build(){}D();k();J();class WL extends W.classBuilder().ep(c).m(function(f,h,w,s){return[z(w,this.serialize,this.deserialize),R(w,f.getEndpointParameterInstructions())]}).s("Route53Domains_v20140515","GetContactReachabilityStatus",{}).n("Route53DomainsClient","GetContactReachabilityStatusCommand").f(void 0,void 0).ser(By).de(ny).build(){}D();k();J();class zL extends W.classBuilder().ep(c).m(function(f,h,w,s){return[z(w,this.serialize,this.deserialize),R(w,f.getEndpointParameterInstructions())]}).s("Route53Domains_v20140515","GetDomainDetail",{}).n("Route53DomainsClient","GetDomainDetailCommand").f(void 0,nk).ser(Ay).de(ey).build(){}D();k();J();class RL extends W.classBuilder().ep(c).m(function(f,h,w,s){return[z(w,this.serialize,this.deserialize),R(w,f.getEndpointParameterInstructions())]}).s("Route53Domains_v20140515","GetDomainSuggestions",{}).n("Route53DomainsClient","GetDomainSuggestionsCommand").f(void 0,void 0).ser(Gy).de(ay).build(){}D();k();J();class XL extends W.classBuilder().ep(c).m(function(f,h,w,s){return[z(w,this.serialize,this.deserialize),R(w,f.getEndpointParameterInstructions())]}).s("Route53Domains_v20140515","GetOperationDetail",{}).n("Route53DomainsClient","GetOperationDetailCommand").f(void 0,void 0).ser(Wy).de(oy).build(){}D();k();J();class SL extends W.classBuilder().ep(c).m(function(f,h,w,s){return[z(w,this.serialize,this.deserialize),R(w,f.getEndpointParameterInstructions())]}).s("Route53Domains_v20140515","ListDomains",{}).n("Route53DomainsClient","ListDomainsCommand").f(void 0,void 0).ser(zy).de(py).build(){}D();k();J();class YL extends W.classBuilder().ep(c).m(function(f,h,w,s){return[z(w,this.serialize,this.deserialize),R(w,f.getEndpointParameterInstructions())]}).s("Route53Domains_v20140515","ListOperations",{}).n("Route53DomainsClient","ListOperationsCommand").f(void 0,void 0).ser(Ry).de(uy).build(){}D();k();J();class ML extends W.classBuilder().ep(c).m(function(f,h,w,s){return[z(w,this.serialize,this.deserialize),R(w,f.getEndpointParameterInstructions())]}).s("Route53Domains_v20140515","ListPrices",{}).n("Route53DomainsClient","ListPricesCommand").f(void 0,void 0).ser(Xy).de(ty).build(){}D();k();J();class QL extends W.classBuilder().ep(c).m(function(f,h,w,s){return[z(w,this.serialize,this.deserialize),R(w,f.getEndpointParameterInstructions())]}).s("Route53Domains_v20140515","ListTagsForDomain",{}).n("Route53DomainsClient","ListTagsForDomainCommand").f(void 0,void 0).ser(Sy).de(fj).build(){}D();k();J();class KL extends W.classBuilder().ep(c).m(function(f,h,w,s){return[z(w,this.serialize,this.deserialize),R(w,f.getEndpointParameterInstructions())]}).s("Route53Domains_v20140515","PushDomain",{}).n("Route53DomainsClient","PushDomainCommand").f(void 0,void 0).ser(Yy).de(hj).build(){}D();k();J();class ZL extends W.classBuilder().ep(c).m(function(f,h,w,s){return[z(w,this.serialize,this.deserialize),R(w,f.getEndpointParameterInstructions())]}).s("Route53Domains_v20140515","RegisterDomain",{}).n("Route53DomainsClient","RegisterDomainCommand").f(ek,void 0).ser(My).de(wj).build(){}D();k();J();class JL extends W.classBuilder().ep(c).m(function(f,h,w,s){return[z(w,this.serialize,this.deserialize),R(w,f.getEndpointParameterInstructions())]}).s("Route53Domains_v20140515","RejectDomainTransferFromAnotherAwsAccount",{}).n("Route53DomainsClient","RejectDomainTransferFromAnotherAwsAccountCommand").f(void 0,void 0).ser(Qy).de(sj).build(){}D();k();J();class VL extends W.classBuilder().ep(c).m(function(f,h,w,s){return[z(w,this.serialize,this.deserialize),R(w,f.getEndpointParameterInstructions())]}).s("Route53Domains_v20140515","RenewDomain",{}).n("Route53DomainsClient","RenewDomainCommand").f(void 0,void 0).ser(Ky).de($j).build(){}D();k();J();class PL extends W.classBuilder().ep(c).m(function(f,h,w,s){return[z(w,this.serialize,this.deserialize),R(w,f.getEndpointParameterInstructions())]}).s("Route53Domains_v20140515","ResendContactReachabilityEmail",{}).n("Route53DomainsClient","ResendContactReachabilityEmailCommand").f(void 0,ak).ser(Zy).de(rj).build(){}D();k();J();class HL extends W.classBuilder().ep(c).m(function(f,h,w,s){return[z(w,this.serialize,this.deserialize),R(w,f.getEndpointParameterInstructions())]}).s("Route53Domains_v20140515","ResendOperationAuthorization",{}).n("Route53DomainsClient","ResendOperationAuthorizationCommand").f(void 0,void 0).ser(Jy).de(Ej).build(){}D();k();J();class NL extends W.classBuilder().ep(c).m(function(f,h,w,s){return[z(w,this.serialize,this.deserialize),R(w,f.getEndpointParameterInstructions())]}).s("Route53Domains_v20140515","RetrieveDomainAuthCode",{}).n("Route53DomainsClient","RetrieveDomainAuthCodeCommand").f(void 0,ok).ser(Vy).de(Uj).build(){}D();k();J();class DL extends W.classBuilder().ep(c).m(function(f,h,w,s){return[z(w,this.serialize,this.deserialize),R(w,f.getEndpointParameterInstructions())]}).s("Route53Domains_v20140515","TransferDomain",{}).n("Route53DomainsClient","TransferDomainCommand").f(pk,void 0).ser(Py).de(Tj).build(){}D();k();J();class qL extends W.classBuilder().ep(c).m(function(f,h,w,s){return[z(w,this.serialize,this.deserialize),R(w,f.getEndpointParameterInstructions())]}).s("Route53Domains_v20140515","TransferDomainToAnotherAwsAccount",{}).n("Route53DomainsClient","TransferDomainToAnotherAwsAccountCommand").f(void 0,uk).ser(Hy).de(Fj).build(){}D();k();J();class kL extends W.classBuilder().ep(c).m(function(f,h,w,s){return[z(w,this.serialize,this.deserialize),R(w,f.getEndpointParameterInstructions())]}).s("Route53Domains_v20140515","UpdateDomainContact",{}).n("Route53DomainsClient","UpdateDomainContactCommand").f(tk,void 0).ser(Ny).de(Cj).build(){}D();k();J();class yL extends W.classBuilder().ep(c).m(function(f,h,w,s){return[z(w,this.serialize,this.deserialize),R(w,f.getEndpointParameterInstructions())]}).s("Route53Domains_v20140515","UpdateDomainContactPrivacy",{}).n("Route53DomainsClient","UpdateDomainContactPrivacyCommand").f(void 0,void 0).ser(Dy).de(Ij).build(){}D();k();J();class jL extends W.classBuilder().ep(c).m(function(f,h,w,s){return[z(w,this.serialize,this.deserialize),R(w,f.getEndpointParameterInstructions())]}).s("Route53Domains_v20140515","UpdateDomainNameservers",{}).n("Route53DomainsClient","UpdateDomainNameserversCommand").f(fy,void 0).ser(qy).de(Lj).build(){}D();k();J();class OL extends W.classBuilder().ep(c).m(function(f,h,w,s){return[z(w,this.serialize,this.deserialize),R(w,f.getEndpointParameterInstructions())]}).s("Route53Domains_v20140515","UpdateTagsForDomain",{}).n("Route53DomainsClient","UpdateTagsForDomainCommand").f(void 0,void 0).ser(ky).de(Bj).build(){}D();k();J();class lL extends W.classBuilder().ep(c).m(function(f,h,w,s){return[z(w,this.serialize,this.deserialize),R(w,f.getEndpointParameterInstructions())]}).s("Route53Domains_v20140515","ViewBilling",{}).n("Route53DomainsClient","ViewBillingCommand").f(void 0,void 0).ser(yy).de(Aj).build(){}var M40={AcceptDomainTransferFromAnotherAwsAccountCommand:$L,AssociateDelegationSignerToDomainCommand:rL,CancelDomainTransferToAnotherAwsAccountCommand:EL,CheckDomainAvailabilityCommand:UL,CheckDomainTransferabilityCommand:TL,DeleteDomainCommand:FL,DeleteTagsForDomainCommand:CL,DisableDomainAutoRenewCommand:IL,DisableDomainTransferLockCommand:LL,DisassociateDelegationSignerFromDomainCommand:BL,EnableDomainAutoRenewCommand:AL,EnableDomainTransferLockCommand:GL,GetContactReachabilityStatusCommand:WL,GetDomainDetailCommand:zL,GetDomainSuggestionsCommand:RL,GetOperationDetailCommand:XL,ListDomainsCommand:SL,ListOperationsCommand:YL,ListPricesCommand:ML,ListTagsForDomainCommand:QL,PushDomainCommand:KL,RegisterDomainCommand:ZL,RejectDomainTransferFromAnotherAwsAccountCommand:JL,RenewDomainCommand:VL,ResendContactReachabilityEmailCommand:PL,ResendOperationAuthorizationCommand:HL,RetrieveDomainAuthCodeCommand:NL,TransferDomainCommand:DL,TransferDomainToAnotherAwsAccountCommand:qL,UpdateDomainContactCommand:kL,UpdateDomainContactPrivacyCommand:yL,UpdateDomainNameserversCommand:jL,UpdateTagsForDomainCommand:OL,ViewBillingCommand:lL};class h4 extends sL{}Es(M40,h4);import{runAction as Q40}from"@stacksjs/actions";import{config as Wj}from"@stacksjs/config";import{Action as K40}from"@stacksjs/enums";import{err as Uh,handleError as vf,ok as Y$}from"@stacksjs/error-handling";import{log as P1}from"@stacksjs/logging";import{path as Z40}from"@stacksjs/path";import{fs as Gj}from"@stacksjs/storage";async function RO0(f){let h=new dh,w=await h.listHostedZonesByName({DNSName:f});if(!w||!w.HostedZones)return Uh(vf(`No hosted zones found for domain: ${f}`));let s=w.HostedZones.find((r)=>r.Name===`${f}.`);if(!s)return Uh(vf(`Hosted Zone not found for domain: ${f}`));let $=await h.listResourceRecordSets({HostedZoneId:s.Id});if(!$||!$.ResourceRecordSets)return Uh(vf(`No DNS records found for domain: ${f}`));for(let r of $.ResourceRecordSets)if(r.Type!=="NS"&&r.Type!=="SOA")await h.changeResourceRecordSets({HostedZoneId:s.Id,ChangeBatch:{Changes:[{Action:"DELETE",ResourceRecordSet:r}]}});return await h.deleteHostedZone({Id:s.Id}),P1.info(`Deleted Hosted Zone for domain: ${f}`),Y$("success")}async function XO0(f){let h=new dh,w=await h.listHostedZonesByName({DNSName:f});if(!w||!w.HostedZones)return Uh(vf(`No hosted zones found for domain: ${f}`));let s=w.HostedZones.find((r)=>r.Name===`${f}.`);if(!s)return Uh(vf(`Hosted Zone not found for domain: ${f}`));let $=await h.listResourceRecordSets({HostedZoneId:s.Id});if(!$||!$.ResourceRecordSets)return Uh(vf(`No DNS records found for domain: ${f}`));for(let r of $.ResourceRecordSets)if(r.Type!=="NS"&&r.Type!=="SOA")await h.changeResourceRecordSets({HostedZoneId:s.Id,ChangeBatch:{Changes:[{Action:"DELETE",ResourceRecordSet:r}]}});return P1.info(`Deleted DNS records for domain: ${f}`),Y$("success")}async function SO0(f){let h=new dh,s=(await h.listHostedZonesByName({DNSName:f})).HostedZones?.find((r)=>r.Name===`${f}.`);if(s)return Y$(s);let $=await h.createHostedZone({Name:f,CallerReference:`${Date.now()}`});if(!$.HostedZone)return Uh(vf("Failed to create hosted zone"));return Y$($)}function J40(f){try{let h=Z40.projectConfigPath("dns.ts"),s=Gj.readFileSync(h,"utf-8").replace(/nameservers: \[.*?\]/s,`nameservers: [${f.map(($)=>`'${$}'`).join(", ")}]`);Gj.writeFileSync(h,s,"utf-8"),P1.info("Nameservers have been set.")}catch(h){console.error("Error updating nameservers:",h)}}async function YO0(f){try{let h=new dh,{HostedZones:w}=await h.listHostedZonesByName({DNSName:f});if(!w)return Uh(vf(`No hosted zones found for domain ${f}`));let s=w[0];if(s&&s.Name===`${f}.`)return Y$(s.Id);return Y$(null)}catch(h){return Uh(vf(`Failed to find hosted zone for domain ${f}`,h))}}async function V40(f){if(P1.debug("Getting nameservers for domain:",f),!f)return[];try{return(await new h4().getDomainDetail({DomainName:f}))?.Nameservers?.map((s)=>s.Name)||[]}catch(h){vf("Error getting domain detail",h)}}async function P40(f,h){if(!h)h=Wj.app.url;let w=await V40(h);if(w&&f&&JSON.stringify(w.sort())!==JSON.stringify(f.sort()))return P1.info("Updating your domain nameservers to match the ones in your hosted zone..."),P1.debug("Hosted zone nameservers:",f),P1.debug("Domain nameservers:",w),await new h4().updateDomainNameservers({DomainName:h,Nameservers:f.map(($)=>({Name:$}))}),J40(f),P1.info("Nameservers updated."),!0;P1.success("Your nameservers are up to date.")}async function MO0(f){if(P1.debug("Checking if domain has been added to cloud..."),!f)f=Wj.app.url;P1.debug("domainName:",f);let h=new dh,w=await h.listHostedZonesByName({DNSName:f});if(P1.debug("Existing hosted zones:",w),!w||!w.HostedZones)return!1;let s=w.HostedZones.find(($)=>$.Name===`${f}.`);if(s){P1.debug("Hosted zone found:",s);let r=(await h.getHostedZone({Id:s.Id})).DelegationSet?.NameServers||[];return await P40(r,f),!0}return!1}async function QO0(f){return await Q40(K40.DomainsAdd,f)}import{Buffer as Mj}from"buffer";import{Buffer as gL}from"buffer";import b40 from"dgram";import m40 from"https";import d40 from"net";import i40 from"tls";import{URL as Rj}from"url";import{promises as c40}from"fs";import{platform as g40}from"os";var H40=Object.create,{getPrototypeOf:N40,defineProperty:zj,getOwnPropertyNames:D40}=Object,q40=Object.prototype.hasOwnProperty,k40=(f,h,w)=>{w=f!=null?H40(N40(f)):{};let s=h||!f||!f.__esModule?zj(w,"default",{value:f,enumerable:!0}):w;for(let $ of D40(f))if(!q40.call(s,$))zj(s,$,{get:()=>f[$],enumerable:!0});return s},y40=(f,h)=>()=>(h||f((h={exports:{}}).exports,h),h.exports),j40=y40((f,h)=>{var w=process||{},s=w.argv||[],$=w.env||{},r=!(!!$.NO_COLOR||s.includes("--no-color"))&&(!!$.FORCE_COLOR||s.includes("--color")||w.platform==="win32"||(w.stdout||{}).isTTY&&$.TERM!=="dumb"||!!$.CI),E=(F,C,I=F)=>(L)=>{let G=""+L,X=G.indexOf(C,F.length);return~X?F+U(G,C,I,X)+C:F+G+C},U=(F,C,I,L)=>{let G="",X=0;do G+=F.substring(X,L)+I,X=L+C.length,L=F.indexOf(C,X);while(~L);return G+F.substring(X)},T=(F=r)=>{let C=F?E:()=>String;return{isColorSupported:F,reset:C("\x1B[0m","\x1B[0m"),bold:C("\x1B[1m","\x1B[22m","\x1B[22m\x1B[1m"),dim:C("\x1B[2m","\x1B[22m","\x1B[22m\x1B[2m"),italic:C("\x1B[3m","\x1B[23m"),underline:C("\x1B[4m","\x1B[24m"),inverse:C("\x1B[7m","\x1B[27m"),hidden:C("\x1B[8m","\x1B[28m"),strikethrough:C("\x1B[9m","\x1B[29m"),black:C("\x1B[30m","\x1B[39m"),red:C("\x1B[31m","\x1B[39m"),green:C("\x1B[32m","\x1B[39m"),yellow:C("\x1B[33m","\x1B[39m"),blue:C("\x1B[34m","\x1B[39m"),magenta:C("\x1B[35m","\x1B[39m"),cyan:C("\x1B[36m","\x1B[39m"),white:C("\x1B[37m","\x1B[39m"),gray:C("\x1B[90m","\x1B[39m"),bgBlack:C("\x1B[40m","\x1B[49m"),bgRed:C("\x1B[41m","\x1B[49m"),bgGreen:C("\x1B[42m","\x1B[49m"),bgYellow:C("\x1B[43m","\x1B[49m"),bgBlue:C("\x1B[44m","\x1B[49m"),bgMagenta:C("\x1B[45m","\x1B[49m"),bgCyan:C("\x1B[46m","\x1B[49m"),bgWhite:C("\x1B[47m","\x1B[49m"),blackBright:C("\x1B[90m","\x1B[39m"),redBright:C("\x1B[91m","\x1B[39m"),greenBright:C("\x1B[92m","\x1B[39m"),yellowBright:C("\x1B[93m","\x1B[39m"),blueBright:C("\x1B[94m","\x1B[39m"),magentaBright:C("\x1B[95m","\x1B[39m"),cyanBright:C("\x1B[96m","\x1B[39m"),whiteBright:C("\x1B[97m","\x1B[39m"),bgBlackBright:C("\x1B[100m","\x1B[49m"),bgRedBright:C("\x1B[101m","\x1B[49m"),bgGreenBright:C("\x1B[102m","\x1B[49m"),bgYellowBright:C("\x1B[103m","\x1B[49m"),bgBlueBright:C("\x1B[104m","\x1B[49m"),bgMagentaBright:C("\x1B[105m","\x1B[49m"),bgCyanBright:C("\x1B[106m","\x1B[49m"),bgWhiteBright:C("\x1B[107m","\x1B[49m")}};h.exports=T(),h.exports.createColors=T}),ih;((f)=>{f[f.A=1]="A",f[f.NS=2]="NS",f[f.CNAME=5]="CNAME",f[f.SOA=6]="SOA",f[f.PTR=12]="PTR",f[f.MX=15]="MX",f[f.TXT=16]="TXT",f[f.AAAA=28]="AAAA",f[f.SRV=33]="SRV",f[f.NAPTR=35]="NAPTR",f[f.OPT=41]="OPT",f[f.SSHFP=44]="SSHFP",f[f.TLSA=52]="TLSA",f[f.DNSKEY=48]="DNSKEY",f[f.CAA=257]="CAA"})(ih||={});var dL;((f)=>{f[f.IN=1]="IN",f[f.CH=3]="CH",f[f.HS=4]="HS"})(dL||={});var Xj;((f)=>{f.Disable="disable",f.Hide="hide",f.Show="show"})(Xj||={});var Sj;((f)=>{f[f.NoError=0]="NoError",f[f.FormErr=1]="FormErr",f[f.ServFail=2]="ServFail",f[f.NXDomain=3]="NXDomain",f[f.NotImp=4]="NotImp",f[f.Refused=5]="Refused",f[f.YXDomain=6]="YXDomain",f[f.YXRRSet=7]="YXRRSet",f[f.NXRRSet=8]="NXRRSet",f[f.NotAuth=9]="NotAuth",f[f.NotZone=10]="NotZone"})(Sj||={});var Yj;((f)=>{f.TruncatedPacket="TRUNCATED_PACKET",f.InvalidLength="INVALID_LENGTH",f.InvalidFormat="INVALID_FORMAT",f.InvalidName="INVALID_NAME",f.InvalidLabel="INVALID_LABEL",f.InvalidPointer="INVALID_POINTER",f.InvalidType="INVALID_TYPE",f.InvalidClass="INVALID_CLASS",f.NetworkError="NETWORK_ERROR"})(Yj||={});function O40(f){if(!f)return;let h=Array.isArray(f)?f:[f],w={};for(let s of h)if(s==="aa"||s==="authoritative")w.authoritative=!0;else if(s==="ad"||s==="authentic")w.authenticData=!0;else if(s==="cd"||s==="checking-disabled")w.checkingDisabled=!0;else if(s.startsWith("bufsize="))w.udpPayloadSize=Number.parseInt(s.split("=")[1]);return w}function S0(f,h,w){if(w)console.debug(`[dnsx:${f}] ${h}`)}var l40=12,v40=63;class w4{response=!1;opcode=0;authoritative=!1;truncated=!1;recursionDesired=!1;recursionAvailable=!1;authenticData=!1;checkingDisabled=!1;responseCode=0;static fromBuffer(f){let h=new w4,w=f.readUInt16BE(0);return h.response=(w&32768)!==0,h.opcode=(w&30720)>>>11,h.authoritative=(w&1024)!==0,h.truncated=(w&512)!==0,h.recursionDesired=(w&256)!==0,h.recursionAvailable=(w&128)!==0,h.authenticData=(w&32)!==0,h.checkingDisabled=(w&16)!==0,h.responseCode=w&15,h}toBuffer(){let f=Mj.alloc(2),h=0;if(this.response)h|=32768;if(h|=(this.opcode&15)<<11,this.authoritative)h|=1024;if(this.truncated)h|=512;if(this.recursionDesired)h|=256;if(this.recursionAvailable)h|=128;if(this.authenticData)h|=32;if(this.checkingDisabled)h|=16;return h|=this.responseCode&15,f.writeUInt16BE(h,0),f}}class iL{buffer;offset;nameOffsets;verbose;constructor(f=512,h){this.buffer=Mj.alloc(f),this.offset=0,this.nameOffsets=new Map,this.verbose=h}writeHeader(f,h,w){S0("encoder",`Writing DNS header: ${JSON.stringify({id:f,flags:{response:h.response,opcode:h.opcode,recursionDesired:h.recursionDesired},counts:w})}`,this.verbose),this.writeUint16(f);let s=h.toBuffer();this.buffer.set(s,this.offset),this.offset+=2,this.writeUint16(w.qdcount),this.writeUint16(w.ancount),this.writeUint16(w.nscount),this.writeUint16(w.arcount)}writeName(f){S0("encoder",`Writing DNS name: ${f}`,this.verbose);let h=f.split(".");for(let w of h){if(w.length>v40)throw new Error(`Label too long: ${w}`);this.buffer[this.offset++]=w.length,this.buffer.write(w,this.offset),this.offset+=w.length}this.buffer[this.offset++]=0}writeQuestion(f){this.writeName(f.name),this.writeUint16(f.type),this.writeUint16(f.class)}writeUint16(f){this.buffer.writeUInt16BE(f,this.offset),this.offset+=2}writeUint32(f){this.buffer.writeUInt32BE(f,this.offset),this.offset+=4}getBuffer(){return this.buffer.slice(0,this.offset)}}class cL{buffer;offset;constructor(f){this.buffer=f,this.offset=0}canRead(f){return this.offset+f<=this.buffer.length}readName(){let f=[],h=!1,w=this.offset;for(let s=0;s<5;s++){if(w>=this.buffer.length)throw new Error("Out of bounds access");let $=this.buffer[w];if($===0){if(!h)this.offset=w+1;break}if(($&192)===192){if(!this.canRead(2))throw new Error("Out of bounds access");if(!h)this.offset=w+2,h=!0;w=($&63)<<8|this.buffer[w+1];continue}if(w++,w+$>this.buffer.length)throw new Error("Out of bounds access");let r=this.buffer.slice(w,w+$).toString("ascii");f.push(r),w+=$}return f.join(".")}readHeader(){if(!this.canRead(l40))throw new Error(`Invalid DNS header size: ${this.buffer.length} bytes`);let f=this.readUint16(),h=w4.fromBuffer(this.buffer.slice(this.offset,this.offset+2));this.offset+=2;let w={qdcount:this.readUint16(),ancount:this.readUint16(),nscount:this.readUint16(),arcount:this.readUint16()};return{id:f,flags:h,counts:w}}readQuestion(){let f=this.readName();if(!this.canRead(4))throw new Error("Out of bounds access");let h=this.readUint16(),w=this.readUint16();return{name:f,type:h,class:w}}readAnswer(){let f=this.readName();if(!this.canRead(10))throw new Error("Out of bounds access");let h=this.readUint16(),w=this.readUint16(),s=this.readUint32(),$=this.readUint16();if(!this.canRead($))throw new Error("Out of bounds access");let r=this.readRData(h,$);return{name:f,type:h,class:w,ttl:s,data:r}}readRData(f,h){let w=this.offset,s;switch(f){case 1:if(h!==4)throw new Error("Invalid IPv4 length");s=this.readIPv4();break;case 28:if(h!==16)throw new Error("Invalid IPv6 length");s=this.readIPv6();break;case 15:if(h<3)throw new Error("Invalid MX record length");s={preference:this.readUint16(),exchange:this.readName()};break;case 16:s=this.readString(h);break;case 5:case 2:case 12:s=this.readName();break;default:s=this.buffer.slice(this.offset,this.offset+h).toString("hex"),this.offset+=h}if(this.offset-w!==h)this.offset=w+h;return s}readUint16(){if(!this.canRead(2))throw new Error("Out of bounds access");let f=this.buffer.readUInt16BE(this.offset);return this.offset+=2,f}readUint32(){if(!this.canRead(4))throw new Error("Out of bounds access");let f=this.buffer.readUInt32BE(this.offset);return this.offset+=4,f}readIPv4(){if(!this.canRead(4))throw new Error("Out of bounds access");let f=[];for(let h=0;h<4;h++)f.push(this.buffer[this.offset++]);return f.join(".")}readIPv6(){if(!this.canRead(16))throw new Error("Out of bounds access");let f=[];for(let h=0;h<8;h++)f.push(this.buffer.readUInt16BE(this.offset).toString(16)),this.offset+=2;return f.join(":")}readString(f){if(!this.canRead(f))throw new Error("Out of bounds access");let h=this.buffer.slice(this.offset,this.offset+f).toString();return this.offset+=f,h}}function Qj(f,h={}){let w=new iL(512,h.verbose),s=new w4;s.recursionDesired=!0,s.response=!1;let $=h.txid??h.id??Math.floor(Math.random()*65536);return w.writeHeader($,s,{qdcount:1,ancount:0,nscount:0,arcount:0}),w.writeQuestion({name:f.name,type:typeof f.type==="string"?ih[f.type]:f.type,class:f.class}),w.getBuffer()}function bL(f){let h=new cL(f);if((f.readUInt16BE(2)&32768)===0)throw new Error("Not a DNS response");let{id:w,flags:s,counts:$}=h.readHeader();for(let T=0;T<$.qdcount;T++)h.readQuestion();let r=[];for(let T=0;T<$.ancount;T++)r.push(h.readAnswer());let E=[];for(let T=0;T<$.nscount;T++)E.push(h.readAnswer());let U=[];for(let T=0;T<$.arcount;T++)U.push(h.readAnswer());return{id:w,flags:s,answers:r,authorities:E,additionals:U}}var Kj;((f)=>{f.UDP="udp",f.TCP="tcp",f.TLS="tls",f.HTTPS="https"})(Kj||={});class kT{static DEFAULT_PORT=53;static TIMEOUT=5000;async query(f,h){return new Promise((w,s)=>{let $=b40.createSocket("udp4"),r,E,U=kT.DEFAULT_PORT;if(f.includes(":")){let[F,C]=f.split(":");E=F;let I=Number.parseInt(C,10);if(I>0&&I<65536)U=I}else E=f;$.on("error",(F)=>{clearTimeout(r),$.close(),s(F)}),$.on("message",(F)=>{clearTimeout(r),$.close(),w(F)}),r=setTimeout(()=>{$.close(),s(new Error("UDP query timed out"))},kT.TIMEOUT);let T=new Uint8Array(h.buffer,h.byteOffset,h.length);$.send(T,U,E,(F)=>{if(F)clearTimeout(r),$.close(),s(F)})})}}class yT{static DEFAULT_PORT=53;static TIMEOUT=5000;async query(f,h){return new Promise((w,s)=>{let $=new d40.Socket,r,E=new Uint8Array(0),U=-1;$.on("error",(C)=>{clearTimeout(r),$.destroy(),s(C)}),$.on("data",(C)=>{let I=new Uint8Array(E.length+C.length);if(I.set(E),I.set(new Uint8Array(C.buffer,C.byteOffset,C.length),E.length),E=I,U===-1&&E.length>=2)U=new DataView(E.buffer,E.byteOffset).getUint16(0)+2;if(U!==-1&&E.length>=U)clearTimeout(r),$.destroy(),w(gL.from(E.slice(2,U)))}),r=setTimeout(()=>{$.destroy(),s(new Error("TCP query timed out"))},yT.TIMEOUT);let[T,F=yT.DEFAULT_PORT]=f.split(":");$.connect(Number(F),T,()=>{let C=new Uint8Array(2);new DataView(C.buffer).setUint16(0,h.length);let I=new Uint8Array(h.buffer,h.byteOffset,h.length),L=new Uint8Array(C.length+I.length);L.set(C),L.set(I,C.length),$.write(L,(G)=>{if(G)clearTimeout(r),$.destroy(),s(G)})})})}}class jT{static DEFAULT_PORT=853;static TIMEOUT=5000;async query(f,h){return new Promise((w,s)=>{let $={host:f.split(":")[0],port:Number(f.split(":")[1])||jT.DEFAULT_PORT,servername:f.split(":")[0]},r,E=i40.connect($,()=>{if(!E.authorized){E.destroy(),s(new Error("TLS authorization failed"));return}let F=new Uint8Array(2);new DataView(F.buffer).setUint16(0,h.length);let C=new Uint8Array(h.buffer,h.byteOffset,h.length),I=new Uint8Array(F.length+C.length);I.set(F),I.set(C,F.length),E.write(I,(L)=>{if(L)clearTimeout(r),E.destroy(),s(L)})}),U=new Uint8Array(0),T=-1;E.on("error",(F)=>{clearTimeout(r),E.destroy(),s(F)}),E.on("data",(F)=>{let C=new Uint8Array(U.length+F.length);if(C.set(U),C.set(new Uint8Array(F.buffer,F.byteOffset,F.length),U.length),U=C,T===-1&&U.length>=2)T=new DataView(U.buffer,U.byteOffset).getUint16(0)+2;if(T!==-1&&U.length>=T)clearTimeout(r),E.destroy(),w(gL.from(U.slice(2,T)))}),r=setTimeout(()=>{E.destroy(),s(new Error("TLS query timed out"))},jT.TIMEOUT)})}}class M${static TIMEOUT=5000;static CONTENT_TYPE="application/dns-message";async query(f,h){return new Promise((w,s)=>{let $;try{$=new Rj(f)}catch{$=new Rj(`https://${f}/dns-query`)}let r={method:"POST",headers:{"Content-Type":M$.CONTENT_TYPE,"Content-Length":h.length.toString(),Accept:M$.CONTENT_TYPE},timeout:M$.TIMEOUT},E=m40.request($,r,(U)=>{let T=[];U.on("data",(F)=>{T.push(new Uint8Array(F.buffer,F.byteOffset,F.length))}),U.on("end",()=>{if(U.statusCode!==200){s(new Error(`HTTPS query failed with status ${U.statusCode}`));return}let F=U.headers["content-type"];if(F!==M$.CONTENT_TYPE){s(new Error(`Invalid content type: ${F}`));return}let C=T.reduce((G,X)=>G+X.length,0),I=new Uint8Array(C),L=0;for(let G of T)I.set(G,L),L+=G.length;w(gL.from(I))})});E.on("error",s),E.on("timeout",()=>{E.destroy(),s(new Error("HTTPS query timed out"))}),E.write(new Uint8Array(h.buffer,h.byteOffset,h.length)),E.end()})}}function mL(f){switch(f){case"udp":return new kT;case"tcp":return new yT;case"tls":return new jT;case"https":return new M$}}class H1{options;static DEFAULT_NAMESERVER="1.1.1.1";static RESOLV_CONF_PATH="/etc/resolv.conf";static WINDOWS_DNS_KEY="SYSTEM\\CurrentControlSet\\Services\\Tcpip\\Parameters\\Nameserver";validateDomainName(f){if(f.includes(".."))throw new Error(`Invalid domain name: ${f} (consecutive dots)`);if(f.startsWith(".")||f.endsWith("."))throw new Error(`Invalid domain name: ${f} (starts or ends with dot)`);if(f.length>253)throw new Error(`Domain name too long: ${f}`);let h=f.split(".");for(let w of h){if(w.length>63)throw new Error(`Label too long in domain: ${f}`);if(!/^[a-z0-9-]+$/i.test(w))throw new Error(`Invalid characters in domain label: ${w}`)}}validateRecordType(f){if(typeof f==="string"){if(!(f.toUpperCase()in ih))throw new Error(`Invalid record type: ${f}`)}else if(typeof f==="number"){if(!Object.values(ih).filter((h)=>typeof h==="number").includes(f))throw new Error(`Invalid record type number: ${f}`)}else throw new TypeError("Record type must be string or number")}constructor(f){this.options={transport:{type:"udp"},verbose:!1,...f},this.validateOptions()}async query(){try{let f=this.determineTransportType();S0("client",`Selected transport type: ${f}`,this.options.verbose);let h=mL(f);if(!h)throw new Error(`Failed to create transport for type: ${f}`);let w=[],s=await this.resolveNameserver();if(S0("client",`Resolved nameserver: ${s}`,this.options.verbose),!s)throw new Error("Failed to resolve nameserver");let $=this.buildQueries();S0("client",`Built ${$.length} queries`,this.options.verbose);for(let r of $){S0("client",`Processing query: ${JSON.stringify({query:r,nameserver:s,transportType:f})}`,this.options.verbose);let E=Qj(r,{txid:this.options.txid,edns:this.options.edns,tweaks:this.options.tweaks,verbose:this.options.verbose});S0("client",`Built DNS request: ${JSON.stringify({hexData:E.toString("hex"),length:E.length,txid:E.readUInt16BE(0),flags:E.readUInt16BE(2).toString(16)})}`,this.options.verbose);let U=this.options.retries||3;for(let T=0;T<U;T++)try{S0("client",`Attempt ${T+1}/${U}`,this.options.verbose);let F=await h.query(s,E);if(S0("client",`Received DNS response: ${JSON.stringify({hexData:F.toString("hex"),length:F.length,txid:F.readUInt16BE(0),flags:F.readUInt16BE(2).toString(16)})}`,this.options.verbose),F.length<12)throw new Error(`Response too short: ${F.length} bytes`);if(!(F.readUInt16BE(2)&32768))throw new Error("Response flag not set in DNS message");let C=bL(F);if(S0("client",`Parsed DNS response: ${JSON.stringify({id:C.id,answerCount:C.answers.length,authorityCount:C.authorities.length,additionalCount:C.additionals.length})}`,this.options.verbose),f==="udp"&&C.flags.truncated){S0("client","Response truncated, retrying with TCP",this.options.verbose);let I=await mL("tcp").query(s,E);w.push(bL(I))}else w.push(C);break}catch(F){if(S0("client",`Attempt ${T+1} failed: ${F.message}`,this.options.verbose),T===U-1)throw S0("client","All retry attempts failed",this.options.verbose),F;let C=2**T*1000;S0("client",`Waiting ${C}ms before retry`,this.options.verbose),await new Promise((I)=>setTimeout(I,C))}}if(w.length===0)throw new Error("No responses received");return w}catch(f){let h=f instanceof Error?f.message:"Unknown error occurred";throw S0("client",`Query failed with error: ${h}`,this.options.verbose),S0("client",`Full error: ${JSON.stringify(f)}`,this.options.verbose),new Error(`DNS query failed: ${h}`)}}buildQueries(){let f=[];if(!this.options.domains?.length)throw new Error("No domains specified");let h=Array.isArray(this.options.domains)?this.options.domains:[this.options.domains],w=this.resolveTypes(),s=this.resolveClasses();for(let $ of h)for(let r of w)for(let E of s)f.push({name:$,type:r,class:E});return S0("client",`Built queries: ${JSON.stringify(f)}`,this.options.verbose),f}resolveTypes(){if(!this.options.type)return[1];return(Array.isArray(this.options.type)?this.options.type:[this.options.type]).map((f)=>{if(this.validateRecordType(f),typeof f==="number")return f;let h=f.toUpperCase();return ih[h]})}resolveClasses(){if(!this.options.class)return[1];return(Array.isArray(this.options.class)?this.options.class:[this.options.class]).map((f)=>{if(typeof f==="number")return f;let h=f.toUpperCase(),w=dL[h];if(w===void 0)throw new Error(`Invalid query class: ${f}`);return w})}validateNameserver(f){if(f.startsWith("https://"))return!0;if(f.includes("%"))return!1;if(/^(?:\d{1,3}\.){3}\d{1,3}$/.test(f))return f.split(".").every((h)=>{let w=Number.parseInt(h,10);return w>=0&&w<=255});if(f.includes(":"))return!1;return!1}async resolveNameserver(){try{if(this.options.nameserver){if(S0("client",`Checking configured nameserver: ${this.options.nameserver}`,this.options.verbose),this.validateNameserver(this.options.nameserver))return this.options.nameserver}let f=g40();S0("client",`Resolving nameserver for platform: ${f}`,this.options.verbose);let h;if(f==="win32")h=await this.resolveWindowsNameserver();else h=await this.resolveUnixNameserver();if(this.validateNameserver(h))return h;return S0("client",`Using default nameserver: ${H1.DEFAULT_NAMESERVER}`,this.options.verbose),H1.DEFAULT_NAMESERVER}catch(f){return S0("client",`Failed to resolve nameserver: ${f.message}`,this.options.verbose),S0("client",`Using default nameserver: ${H1.DEFAULT_NAMESERVER}`,this.options.verbose),H1.DEFAULT_NAMESERVER}}async resolveUnixNameserver(){try{let f=(await c40.readFile(H1.RESOLV_CONF_PATH,"utf-8")).split(`
60
- `),h=[];for(let s of f){let $=s.trim();if($.startsWith("nameserver")){let[,r]=$.split(/\s+/);if(r&&!r.includes("%"))h.push(r)}}let w=h.find((s)=>!s.includes(":"));if(w)return S0("client",`Using IPv4 nameserver from resolv.conf: ${w}`,this.options.verbose),w;return S0("client",`No valid nameserver found in resolv.conf, using fallback: ${H1.DEFAULT_NAMESERVER}`,this.options.verbose),H1.DEFAULT_NAMESERVER}catch(f){return S0("client",`Failed to read resolv.conf: ${f.message}`,this.options.verbose),S0("client",`Using fallback nameserver: ${H1.DEFAULT_NAMESERVER}`,this.options.verbose),H1.DEFAULT_NAMESERVER}}async resolveWindowsNameserver(){try{return S0("client",`Using default nameserver for Windows: ${H1.DEFAULT_NAMESERVER}`,this.options.verbose),H1.DEFAULT_NAMESERVER}catch(f){throw S0("client",`Failed to get Windows nameserver: ${f.message}`,this.options.verbose),new Error("Failed to get Windows nameserver")}}determineTransportType(){if(this.options.https)return"https";if(this.options.tls)return"tls";if(this.options.tcp)return"tcp";if(this.options.udp)return"udp";if(typeof this.options.transport==="object")return this.options.transport.type||"udp";return"udp"}validateOptions(){if(this.options.domains)for(let f of Array.isArray(this.options.domains)?this.options.domains:[this.options.domains])this.validateDomainName(f);if(this.options.type){let f=Array.isArray(this.options.type)?this.options.type:[this.options.type];for(let h of f)this.validateRecordType(h)}if([this.options.udp,this.options.tcp,this.options.tls,this.options.https].filter(Boolean).length>1)throw new Error("Only one transport type can be specified");if(this.options.https&&!this.options.nameserver?.startsWith("https://"))throw new Error("HTTPS transport requires an HTTPS nameserver URL");S0("client","Options validation completed successfully",this.options.verbose)}}var x40=k40(j40(),1),_40={A:"green",AAAA:"green",CNAME:"yellow",MX:"cyan",NS:"red",PTR:"red",SOA:"magenta",SRV:"cyan",TXT:"yellow",CAA:"red",TLSA:"yellow"};function n40(f,h){if(h.json)return e40(f,h.showDuration);return a40(f,h)}function e40(f,h){let w={responses:f.map((s)=>({id:s.id,answers:s.answers.map(vL),authorities:s.authorities.map(vL),additionals:s.additionals.map(vL)}))};if(h!==void 0)w.duration={ms:h};return JSON.stringify(w,null,2)}function vL(f){let h={name:f.name,type:ih[f.type]||f.type,ttl:f.ttl};switch(f.type){case 1:case 28:return{...h,address:f.data};case 5:case 12:case 2:return{...h,target:f.data};case 15:return{...h,preference:f.data.preference,exchange:f.data.exchange};case 16:return{...h,text:f.data};case 33:return{...h,priority:f.data.priority,weight:f.data.weight,port:f.data.port,target:f.data.target};case 257:return{...h,flags:f.data.flags,tag:f.data.tag,value:f.data.value};default:return{...h,data:f.data}}}function a40(f,h){let w=[];for(let s of f){if(h.short){if(s.answers.length>0)w.push(qT(s.answers[0],h));continue}if(s.answers.length>0)for(let $ of s.answers)w.push(qT($,h));if(s.authorities.length>0){w.push(`
61
- Authority Records:`);for(let $ of s.authorities)w.push(qT($,h))}if(s.additionals.length>0){w.push(`
62
- Additional Records:`);for(let $ of s.additionals)w.push(qT($,h))}}if(h.showDuration!==void 0)w.push(`
63
- Query time: ${p40(h.showDuration,h.rawSeconds)}`);return w.join(`
64
- `)}function qT(f,h){let w=ih[f.type]||f.type.toString(),s=_40[w]||"white",$=h.colors.enabled?x40.default[s](w.padEnd(6)):w.padEnd(6),r=o40(f.ttl,h.rawSeconds).padStart(8),E;switch(f.type){case 1:case 28:E=f.data;break;case 5:case 12:case 2:E=f.data;break;case 15:E=`${f.data.preference} ${f.data.exchange}`;break;case 16:E=`"${f.data}"`;break;case 33:E=`${f.data.priority} ${f.data.weight} ${f.data.port} ${f.data.target}`;break;case 257:E=`${f.data.flags} ${f.data.tag} "${f.data.value}"`;break;default:E=JSON.stringify(f.data)}return`${$} ${r} ${f.name.padEnd(30)} ${E}`}function o40(f,h){if(h)return f.toString();if(f<60)return`${f}s`;if(f<3600){let $=Math.floor(f/60),r=f%60;return`${$}m${r}s`}if(f<86400){let $=Math.floor(f/3600),r=Math.floor(f%3600/60);return`${$}h${r}m`}let w=Math.floor(f/86400),s=Math.floor(f%86400/3600);return`${w}d${s}h`}function p40(f,h){if(h)return`${f}ms`;if(f<1000)return`${f}ms`;return`${(f/1000).toFixed(2)}s`}var{create:u40,defineProperty:Vj,getOwnPropertyDescriptor:t40,getOwnPropertyNames:fE0,getPrototypeOf:hE0}=Object,wE0=Object.prototype.hasOwnProperty,sE0=(f,h)=>()=>(h||f((h={exports:{}}).exports,h),h.exports),$E0=(f,h,w,s)=>{if(h&&typeof h=="object"||typeof h=="function")for(let $ of fE0(h))!wE0.call(f,$)&&$!==w&&Vj(f,$,{get:()=>h[$],enumerable:!(s=t40(h,$))||s.enumerable});return f},rE0=(f,h,w)=>(w=f!=null?u40(hE0(f)):{},$E0(h||!f||!f.__esModule?Vj(w,"default",{value:f,enumerable:!0}):w,f)),EE0=sE0((f,h)=>{function w(E){if(typeof E!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(E))}function s(E,U){for(var T="",F=0,C=-1,I=0,L,G=0;G<=E.length;++G){if(G<E.length)L=E.charCodeAt(G);else{if(L===47)break;L=47}if(L===47){if(!(C===G-1||I===1))if(C!==G-1&&I===2){if(T.length<2||F!==2||T.charCodeAt(T.length-1)!==46||T.charCodeAt(T.length-2)!==46){if(T.length>2){var X=T.lastIndexOf("/");if(X!==T.length-1){X===-1?(T="",F=0):(T=T.slice(0,X),F=T.length-1-T.lastIndexOf("/")),C=G,I=0;continue}}else if(T.length===2||T.length===1){T="",F=0,C=G,I=0;continue}}U&&(T.length>0?T+="/..":T="..",F=2)}else T.length>0?T+="/"+E.slice(C+1,G):T=E.slice(C+1,G),F=G-C-1;C=G,I=0}else L===46&&I!==-1?++I:I=-1}return T}function $(E,U){var T=U.dir||U.root,F=U.base||(U.name||"")+(U.ext||"");return T?T===U.root?T+F:T+E+F:F}var r={resolve:function(){for(var E="",U=!1,T,F=arguments.length-1;F>=-1&&!U;F--){var C;F>=0?C=arguments[F]:(T===void 0&&(T=process.cwd()),C=T),w(C),C.length!==0&&(E=C+"/"+E,U=C.charCodeAt(0)===47)}return E=s(E,!U),U?E.length>0?"/"+E:"/":E.length>0?E:"."},normalize:function(E){if(w(E),E.length===0)return".";var U=E.charCodeAt(0)===47,T=E.charCodeAt(E.length-1)===47;return E=s(E,!U),E.length===0&&!U&&(E="."),E.length>0&&T&&(E+="/"),U?"/"+E:E},isAbsolute:function(E){return w(E),E.length>0&&E.charCodeAt(0)===47},join:function(){if(arguments.length===0)return".";for(var E,U=0;U<arguments.length;++U){var T=arguments[U];w(T),T.length>0&&(E===void 0?E=T:E+="/"+T)}return E===void 0?".":r.normalize(E)},relative:function(E,U){if(w(E),w(U),E===U||(E=r.resolve(E),U=r.resolve(U),E===U))return"";for(var T=1;T<E.length&&E.charCodeAt(T)===47;++T);for(var F=E.length,C=F-T,I=1;I<U.length&&U.charCodeAt(I)===47;++I);for(var L=U.length,G=L-I,X=C<G?C:G,Q=-1,M=0;M<=X;++M){if(M===X){if(G>X){if(U.charCodeAt(I+M)===47)return U.slice(I+M+1);if(M===0)return U.slice(I+M)}else C>X&&(E.charCodeAt(T+M)===47?Q=M:M===0&&(Q=0));break}var q=E.charCodeAt(T+M),N=U.charCodeAt(I+M);if(q!==N)break;q===47&&(Q=M)}var y="";for(M=T+Q+1;M<=F;++M)(M===F||E.charCodeAt(M)===47)&&(y.length===0?y+="..":y+="/..");return y.length>0?y+U.slice(I+Q):(I+=Q,U.charCodeAt(I)===47&&++I,U.slice(I))},_makeLong:function(E){return E},dirname:function(E){if(w(E),E.length===0)return".";for(var U=E.charCodeAt(0),T=U===47,F=-1,C=!0,I=E.length-1;I>=1;--I)if(U=E.charCodeAt(I),U===47){if(!C){F=I;break}}else C=!1;return F===-1?T?"/":".":T&&F===1?"//":E.slice(0,F)},basename:function(E,U){if(U!==void 0&&typeof U!="string")throw new TypeError('"ext" argument must be a string');w(E);var T=0,F=-1,C=!0,I;if(U!==void 0&&U.length>0&&U.length<=E.length){if(U.length===E.length&&U===E)return"";var L=U.length-1,G=-1;for(I=E.length-1;I>=0;--I){var X=E.charCodeAt(I);if(X===47){if(!C){T=I+1;break}}else G===-1&&(C=!1,G=I+1),L>=0&&(X===U.charCodeAt(L)?--L===-1&&(F=I):(L=-1,F=G))}return T===F?F=G:F===-1&&(F=E.length),E.slice(T,F)}else{for(I=E.length-1;I>=0;--I)if(E.charCodeAt(I)===47){if(!C){T=I+1;break}}else F===-1&&(C=!1,F=I+1);return F===-1?"":E.slice(T,F)}},extname:function(E){w(E);for(var U=-1,T=0,F=-1,C=!0,I=0,L=E.length-1;L>=0;--L){var G=E.charCodeAt(L);if(G===47){if(!C){T=L+1;break}continue}F===-1&&(C=!1,F=L+1),G===46?U===-1?U=L:I!==1&&(I=1):U!==-1&&(I=-1)}return U===-1||F===-1||I===0||I===1&&U===F-1&&U===T+1?"":E.slice(U,F)},format:function(E){if(E===null||typeof E!="object")throw new TypeError('The "pathObject" argument must be of type Object. Received type '+typeof E);return $("/",E)},parse:function(E){w(E);var U={root:"",dir:"",base:"",ext:"",name:""};if(E.length===0)return U;var T=E.charCodeAt(0),F=T===47,C;F?(U.root="/",C=1):C=0;for(var I=-1,L=0,G=-1,X=!0,Q=E.length-1,M=0;Q>=C;--Q){if(T=E.charCodeAt(Q),T===47){if(!X){L=Q+1;break}continue}G===-1&&(X=!1,G=Q+1),T===46?I===-1?I=Q:M!==1&&(M=1):I!==-1&&(M=-1)}return I===-1||G===-1||M===0||M===1&&I===G-1&&I===L+1?G!==-1&&(L===0&&F?U.base=U.name=E.slice(1,G):U.base=U.name=E.slice(L,G)):(L===0&&F?(U.name=E.slice(1,I),U.base=E.slice(1,G)):(U.name=E.slice(L,I),U.base=E.slice(L,G)),U.ext=E.slice(I,G)),L>0?U.dir=E.slice(0,L-1):F&&(U.dir="/"),U},sep:"/",delimiter:":",win32:null,posix:null};r.posix=r,h.exports=r}),Pj=rE0(EE0()),g0=Pj,UE0=Pj,Zj=function(f){return f},Hj=function(){throw new Error("Not implemented")};g0.parse??=Hj;UE0.parse??=Hj;var K$={resolve:g0.resolve.bind(g0),normalize:g0.normalize.bind(g0),isAbsolute:g0.isAbsolute.bind(g0),join:g0.join.bind(g0),relative:g0.relative.bind(g0),toNamespacedPath:Zj,dirname:g0.dirname.bind(g0),basename:g0.basename.bind(g0),extname:g0.extname.bind(g0),format:g0.format.bind(g0),parse:g0.parse.bind(g0),sep:"/",delimiter:":",win32:void 0,posix:void 0,_makeLong:Zj},Jj={sep:"\\",delimiter:";",win32:void 0,...K$,posix:K$};K$.win32=Jj.win32=Jj;K$.posix=K$;var{resolve:TE0,normalize:OO0,isAbsolute:lO0,join:vO0,relative:bO0,toNamespacedPath:mO0,dirname:dO0,basename:iO0,extname:cO0,format:gO0,parse:xO0,sep:_O0,delimiter:nO0}=K$;function OT(f,h){if(Array.isArray(h)&&!Array.isArray(f))return h;if(Array.isArray(h)&&Array.isArray(f))return h.map((s,$)=>{let r=f[$];if(Q$(s)&&Q$(r))return OT(r,s);return s});if(!Q$(h)||!Q$(f))return h;let w={...f};for(let s in h)if(Object.prototype.hasOwnProperty.call(h,s)){let $=h[s],r=w[s];if($===null||$===void 0)w[s]=$;else if(Q$($)&&Q$(r))w[s]=OT(r,$);else w[s]=$}return w}function Q$(f){return Boolean(f&&typeof f==="object"&&!Array.isArray(f))}async function FE0({name:f,cwd:h,defaultConfig:w,endpoint:s,headers:$={Accept:"application/json","Content-Type":"application/json"}}){if(typeof window==="undefined"){let r=TE0(h||"../../../",`${f}.config`);try{let E=await import(r),U=E.default||E;return OT(w,U)}catch(E){return w}}if(!s)return console.warn("An API endpoint is required to load the client config."),w;try{let r=await fetch(s,{method:"GET",headers:$});if(!r.ok)throw new Error(`HTTP error! status: ${r.status}`);let E=await r.json();return OT(w,E)}catch(r){return console.error("Failed to load client config:",r),w}}var CE0={verbose:!0},eO0=await FE0({name:"dnsx",defaultConfig:CE0});export{J40 as writeNameserversToConfig,P40 as updateNameservers,bL as parseResponse,O40 as parseProtocolTweaks,MO0 as hasUserDomainBeenAddedToCloud,V40 as getNameservers,n40 as formatOutput,YO0 as findHostedZone,XO0 as deleteHostedZoneRecords,RO0 as deleteHostedZone,S0 as debugLog,mL as createTransport,SO0 as createHostedZone,eO0 as config,Qj as buildQuery,QO0 as addDomain,Yj as WireError,Kj as TransportType,ih as RecordType,dL as QClass,Xj as EDNSMode,Sj as DnsResponseCode,w4 as DnsFlags,iL as DnsEncoder,cL as DnsDecoder,H1 as DnsClient};
59
+ `),oH=!0}throw new a("AWS_PROFILE is set, skipping fromEnv provider.",{logger:f.logger,tryNextLink:!0})}return f.logger?.debug("@aws-sdk/credential-provider-node - defaultProvider::fromEnv"),_3(f)()},async()=>{f.logger?.debug("@aws-sdk/credential-provider-node - defaultProvider::fromSSO");let{ssoStartUrl:h,ssoAccountId:w,ssoRegion:s,ssoRoleName:$,ssoSession:r}=f;if(!h&&!w&&!s&&!$&&!r)throw new a("Skipping SSO provider in default chain (inputs do not include SSO fields).",{logger:f.logger});let{fromSSO:E}=await Promise.resolve().then(() => (H6(),P6));return E(f)()},async()=>{f.logger?.debug("@aws-sdk/credential-provider-node - defaultProvider::fromIni");let{fromIni:h}=await Promise.resolve().then(() => (aH(),eH));return h(f)()},async()=>{f.logger?.debug("@aws-sdk/credential-provider-node - defaultProvider::fromProcess");let{fromProcess:h}=await Promise.resolve().then(() => (RC(),zC));return h(f)()},async()=>{f.logger?.debug("@aws-sdk/credential-provider-node - defaultProvider::fromTokenFile");let{fromTokenFile:h}=await Promise.resolve().then(() => (KC(),QC));return h(f)()},async()=>{return f.logger?.debug("@aws-sdk/credential-provider-node - defaultProvider::remoteProvider"),(await L9(f))()},async()=>{throw new a("Could not load credentials from any providers",{tryNextLink:!1,logger:f.logger})}),Jh0,Zh0),Zh0=(f)=>f?.expiration!==void 0,Jh0=(f)=>f?.expiration!==void 0&&f.expiration.getTime()-Date.now()<300000;zU();Yh();RU();$w();Kh();wr();XU();wf();var LN=p(O0(),1);J();pw();SU();bs();N$();df();var pH={["required"]:!1,type:"String"},uH={["required"]:!0,default:!1,type:"Boolean"},tH={["ref"]:"Endpoint"},vU={["fn"]:"booleanEquals",["argv"]:[{["ref"]:"UseFIPS"},!0]},FN={["fn"]:"booleanEquals",["argv"]:[{["ref"]:"UseDualStack"},!0]},s1={},fN={["fn"]:"stringEquals",["argv"]:[{["fn"]:"getAttr",["argv"]:[{["ref"]:"PartitionResult"},"name"]},"aws"]},s$={["fn"]:"getAttr",["argv"]:[{["ref"]:"PartitionResult"},"name"]},Iw={["fn"]:"booleanEquals",["argv"]:[{["ref"]:"UseFIPS"},!1]},fh={["fn"]:"booleanEquals",["argv"]:[{["ref"]:"UseDualStack"},!1]},hN={["authSchemes"]:[{name:"sigv4",["signingName"]:"route53",["signingRegion"]:"us-east-1"}]},wN={["fn"]:"stringEquals",["argv"]:[s$,"aws-us-gov"]},sN={url:"https://route53.us-gov.amazonaws.com",properties:{["authSchemes"]:[{name:"sigv4",["signingName"]:"route53",["signingRegion"]:"us-gov-west-1"}]},headers:{}},$N={["fn"]:"getAttr",["argv"]:[{["ref"]:"PartitionResult"},"supportsFIPS"]},rN={["fn"]:"booleanEquals",["argv"]:[!0,{["fn"]:"getAttr",["argv"]:[{["ref"]:"PartitionResult"},"supportsDualStack"]}]},EN=[vU],UN=[FN],TN=[{["ref"]:"Region"}],Vh0={version:"1.0",parameters:{Region:pH,UseDualStack:uH,UseFIPS:uH,Endpoint:pH},rules:[{conditions:[{["fn"]:"isSet",["argv"]:[tH]}],rules:[{conditions:EN,error:"Invalid Configuration: FIPS and custom endpoint are not supported",type:"error"},{conditions:UN,error:"Invalid Configuration: Dualstack and custom endpoint are not supported",type:"error"},{endpoint:{url:tH,properties:s1,headers:s1},type:"endpoint"}],type:"tree"},{conditions:[{["fn"]:"isSet",["argv"]:TN}],rules:[{conditions:[{["fn"]:"aws.partition",["argv"]:TN,assign:"PartitionResult"}],rules:[{conditions:[fN,Iw,fh],endpoint:{url:"https://route53.amazonaws.com",properties:hN,headers:s1},type:"endpoint"},{conditions:[fN,vU,fh],endpoint:{url:"https://route53-fips.amazonaws.com",properties:hN,headers:s1},type:"endpoint"},{conditions:[{["fn"]:"stringEquals",["argv"]:[s$,"aws-cn"]},Iw,fh],endpoint:{url:"https://route53.amazonaws.com.cn",properties:{["authSchemes"]:[{name:"sigv4",["signingName"]:"route53",["signingRegion"]:"cn-northwest-1"}]},headers:s1},type:"endpoint"},{conditions:[wN,Iw,fh],endpoint:sN,type:"endpoint"},{conditions:[wN,vU,fh],endpoint:sN,type:"endpoint"},{conditions:[{["fn"]:"stringEquals",["argv"]:[s$,"aws-iso"]},Iw,fh],endpoint:{url:"https://route53.c2s.ic.gov",properties:{["authSchemes"]:[{name:"sigv4",["signingName"]:"route53",["signingRegion"]:"us-iso-east-1"}]},headers:s1},type:"endpoint"},{conditions:[{["fn"]:"stringEquals",["argv"]:[s$,"aws-iso-b"]},Iw,fh],endpoint:{url:"https://route53.sc2s.sgov.gov",properties:{["authSchemes"]:[{name:"sigv4",["signingName"]:"route53",["signingRegion"]:"us-isob-east-1"}]},headers:s1},type:"endpoint"},{conditions:[{["fn"]:"stringEquals",["argv"]:[s$,"aws-iso-e"]},Iw,fh],endpoint:{url:"https://route53.cloud.adc-e.uk",properties:{["authSchemes"]:[{name:"sigv4",["signingName"]:"route53",["signingRegion"]:"eu-isoe-west-1"}]},headers:s1},type:"endpoint"},{conditions:[{["fn"]:"stringEquals",["argv"]:[s$,"aws-iso-f"]},Iw,fh],endpoint:{url:"https://route53.csp.hci.ic.gov",properties:{["authSchemes"]:[{name:"sigv4",["signingName"]:"route53",["signingRegion"]:"us-isof-south-1"}]},headers:s1},type:"endpoint"},{conditions:[vU,FN],rules:[{conditions:[{["fn"]:"booleanEquals",["argv"]:[!0,$N]},rN],rules:[{endpoint:{url:"https://route53-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:s1,headers:s1},type:"endpoint"}],type:"tree"},{error:"FIPS and DualStack are enabled, but this partition does not support one or both",type:"error"}],type:"tree"},{conditions:EN,rules:[{conditions:[{["fn"]:"booleanEquals",["argv"]:[$N,!0]}],rules:[{endpoint:{url:"https://route53-fips.{Region}.{PartitionResult#dnsSuffix}",properties:s1,headers:s1},type:"endpoint"}],type:"tree"},{error:"FIPS is enabled but this partition does not support FIPS",type:"error"}],type:"tree"},{conditions:UN,rules:[{conditions:[rN],rules:[{endpoint:{url:"https://route53.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:s1,headers:s1},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:s1,headers:s1},type:"endpoint"}],type:"tree"}],type:"tree"},{error:"Invalid Configuration: Missing Region",type:"error"}]},CN=Vh0;var Ph0=new gh({size:50,params:["Endpoint","Region","UseDualStack","UseFIPS"]}),IN=(f,h={})=>{return Ph0.get(f,()=>xh(CN,{endpointParams:f,logger:h.logger}))};t1.aws=_h;var BN=(f)=>{return{apiVersion:"2013-04-01",base64Decoder:f?.base64Decoder??ds,base64Encoder:f?.base64Encoder??is,disableHostPrefix:f?.disableHostPrefix??!1,endpointProvider:f?.endpointProvider??IN,extensions:f?.extensions??[],httpAuthSchemeProvider:f?.httpAuthSchemeProvider??CY,httpAuthSchemes:f?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:(h)=>h.getIdentityProvider("aws.auth#sigv4"),signer:new LN.AwsSdkSigV4Signer}],logger:f?.logger??new _f,serviceId:f?.serviceId??"Route 53",urlParser:f?.urlParser??O1,utf8Decoder:f?.utf8Decoder??Jf,utf8Encoder:f?.utf8Encoder??vs}};J();YU();J();var GN=(f)=>{Cs(process.version);let h=cs(f),w=()=>h().then(Fs),s=BN(f);AN.emitWarningIfUnsupportedVersion(process.version);let $={profile:f?.profile};return{...s,...f,runtime:"node",defaultsMode:h,bodyLengthChecker:f?.bodyLengthChecker??ms,credentialDefaultProvider:f?.credentialDefaultProvider??lU,defaultUserAgentProvider:f?.defaultUserAgentProvider??ys({serviceId:s.serviceId,clientVersion:BY.version}),maxAttempts:f?.maxAttempts??z0(ws,f),region:f?.region??z0(Sh,{..._w,...$}),requestHandler:rf.create(f?.requestHandler??w),retryMode:f?.retryMode??z0({...$s,default:async()=>(await w()).retryMode||Zh},f),sha256:f?.sha256??Fw.bind(null,"sha256"),streamCollector:f?.streamCollector??Ws,useDualstackEndpoint:f?.useDualstackEndpoint??z0(gw,$),useFipsEndpoint:f?.useFipsEndpoint??z0(xw,$),userAgentAppId:f?.userAgentAppId??z0(js,$)}};MU();F1();J();var WN=(f)=>{let{httpAuthSchemes:h,httpAuthSchemeProvider:w,credentials:s}=f;return{setHttpAuthScheme($){let r=h.findIndex((E)=>E.schemeId===$.schemeId);if(r===-1)h.push($);else h.splice(r,1,$)},httpAuthSchemes(){return h},setHttpAuthSchemeProvider($){w=$},httpAuthSchemeProvider(){return w},setCredentials($){s=$},credentials(){return s}}},zN=(f)=>{return{httpAuthSchemes:f.httpAuthSchemes(),httpAuthSchemeProvider:f.httpAuthSchemeProvider(),credentials:f.credentials()}};var bU=(f)=>f,RN=(f,h)=>{let w={...bU(gs(f)),...bU(Is(f)),...bU(Zw(f)),...bU(WN(f))};return h.forEach((s)=>s.configure(w)),{...f,...xs(w),...Ls(w),...Jw(w),...zN(w)}};class ZC extends ww{config;constructor(...[f]){let h=GN(f||{}),w=LY(h),s=jw(w),$=ss(s),r=nw($),E=Vw(r),U=uw(E),T=IY(U),F=RN(T,f?.extensions||[]);super(F);this.config=F,this.middlewareStack.use(iw(this.config)),this.middlewareStack.use(As(this.config)),this.middlewareStack.use(ew(this.config)),this.middlewareStack.use(Pw(this.config)),this.middlewareStack.use(Hw(this.config)),this.middlewareStack.use(Nw(this.config)),this.middlewareStack.use($$.getHttpAuthSchemeEndpointRuleSetPlugin(this.config,{httpAuthSchemeParametersProvider:FY,identityProviderConfigProvider:async(C)=>new $$.DefaultIdentityProviderConfig({"aws.auth#sigv4":C.credentials})})),this.middlewareStack.use($$.getHttpSigningPlugin(this.config))}destroy(){super.destroy()}}J();var mU=/^\/(hostedzone|change|delegationset)\//;function Hh0(){return(f)=>async(h)=>{let{ChangeBatch:w}=h.input,s=[];for(let $ of w.Changes){let{AliasTarget:r}=$.ResourceRecordSet;if(r)s.push({...$,ResourceRecordSet:{...$.ResourceRecordSet,AliasTarget:{...r,HostedZoneId:r.HostedZoneId.replace(mU,"")}}});else s.push($)}return f({...h,input:{...h.input,ChangeBatch:{...w,Changes:s}}})}}var Nh0={step:"initialize",tags:["ROUTE53_IDS","CHANGE_RESOURCE_RECORD_SETS"],name:"changeResourceRecordSetsMiddleware",override:!0},XN=(f)=>({applyToStack:(h)=>{h.add(Hh0(),Nh0)}});var Dh0=["DelegationSetId","HostedZoneId","Id"];function qh0(){return(f)=>async(h)=>{let w={...h.input};for(let s of Dh0){let $=w[s];if($)w[s]=$.replace(mU,"")}return f({...h,input:w})}}var kh0={step:"initialize",tags:["ROUTE53_IDS"],name:"idNormalizerMiddleware",override:!0},O=(f)=>({applyToStack:(h)=>{h.add(qh0(),kh0)}});D();k();J();var _=p(O0(),1);function SN(f){return f.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;")}function YN(f){return f.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 JC{value;constructor(f){this.value=f}toString(){return YN(""+this.value)}}class P{name;children;attributes={};static of(f,h,w){let s=new P(f);if(h!==void 0)s.addChildNode(new JC(h));if(w!==void 0)s.withName(w);return s}constructor(f,h=[]){this.name=f,this.children=h}withName(f){return this.name=f,this}addAttribute(f,h){return this.attributes[f]=h,this}addChildNode(f){return this.children.push(f),this}removeAttribute(f){return delete this.attributes[f],this}n(f){return this.name=f,this}c(f){return this.children.push(f),this}a(f,h){if(h!=null)this.attributes[f]=h;return this}cc(f,h,w=h){if(f[h]!=null){let s=P.of(h,f[h]).withName(w);this.c(s)}}l(f,h,w,s){if(f[h]!=null)s().map((r)=>{r.withName(w),this.c(r)})}lc(f,h,w,s){if(f[h]!=null){let $=s(),r=new P(w);$.map((E)=>{r.c(E)}),this.c(r)}}toString(){let f=Boolean(this.children.length),h=`<${this.name}`,w=this.attributes;for(let s of Object.keys(w)){let $=w[s];if($!=null)h+=` ${s}="${SN(""+$)}"`}return h+=!f?"/>":`>${this.children.map((s)=>s.toString()).join("")}</${this.name}>`}}var d=p(m0(),1);J();J();class m extends $f{constructor(f){super(f);Object.setPrototypeOf(this,m.prototype)}}class dU extends m{name="ConcurrentModification";$fault="client";constructor(f){super({name:"ConcurrentModification",$fault:"client",...f});Object.setPrototypeOf(this,dU.prototype)}}class iU extends m{name="InvalidInput";$fault="client";constructor(f){super({name:"InvalidInput",$fault:"client",...f});Object.setPrototypeOf(this,iU.prototype)}}class cU extends m{name="InvalidKeySigningKeyStatus";$fault="client";constructor(f){super({name:"InvalidKeySigningKeyStatus",$fault:"client",...f});Object.setPrototypeOf(this,cU.prototype)}}class gU extends m{name="InvalidKMSArn";$fault="client";constructor(f){super({name:"InvalidKMSArn",$fault:"client",...f});Object.setPrototypeOf(this,gU.prototype)}}class xU extends m{name="InvalidSigningStatus";$fault="client";constructor(f){super({name:"InvalidSigningStatus",$fault:"client",...f});Object.setPrototypeOf(this,xU.prototype)}}class _U extends m{name="NoSuchKeySigningKey";$fault="client";constructor(f){super({name:"NoSuchKeySigningKey",$fault:"client",...f});Object.setPrototypeOf(this,_U.prototype)}}class nU extends m{name="ConflictingDomainExists";$fault="client";constructor(f){super({name:"ConflictingDomainExists",$fault:"client",...f});Object.setPrototypeOf(this,nU.prototype)}}class eU extends m{name="InvalidVPCId";$fault="client";constructor(f){super({name:"InvalidVPCId",$fault:"client",...f});Object.setPrototypeOf(this,eU.prototype)}}class aU extends m{name="LimitsExceeded";$fault="client";constructor(f){super({name:"LimitsExceeded",$fault:"client",...f});Object.setPrototypeOf(this,aU.prototype)}}class oU extends m{name="NoSuchHostedZone";$fault="client";constructor(f){super({name:"NoSuchHostedZone",$fault:"client",...f});Object.setPrototypeOf(this,oU.prototype)}}class pU extends m{name="NotAuthorizedException";$fault="client";constructor(f){super({name:"NotAuthorizedException",$fault:"client",...f});Object.setPrototypeOf(this,pU.prototype)}}class uU extends m{name="PriorRequestNotComplete";$fault="client";constructor(f){super({name:"PriorRequestNotComplete",$fault:"client",...f});Object.setPrototypeOf(this,uU.prototype)}}class tU extends m{name="PublicZoneVPCAssociation";$fault="client";constructor(f){super({name:"PublicZoneVPCAssociation",$fault:"client",...f});Object.setPrototypeOf(this,tU.prototype)}}class f5 extends m{name="CidrBlockInUseException";$fault="client";Message;constructor(f){super({name:"CidrBlockInUseException",$fault:"client",...f});Object.setPrototypeOf(this,f5.prototype),this.Message=f.Message}}class h5 extends m{name="CidrCollectionVersionMismatchException";$fault="client";Message;constructor(f){super({name:"CidrCollectionVersionMismatchException",$fault:"client",...f});Object.setPrototypeOf(this,h5.prototype),this.Message=f.Message}}class w5 extends m{name="NoSuchCidrCollectionException";$fault="client";Message;constructor(f){super({name:"NoSuchCidrCollectionException",$fault:"client",...f});Object.setPrototypeOf(this,w5.prototype),this.Message=f.Message}}class s5 extends m{name="InvalidChangeBatch";$fault="client";messages;constructor(f){super({name:"InvalidChangeBatch",$fault:"client",...f});Object.setPrototypeOf(this,s5.prototype),this.messages=f.messages}}class $5 extends m{name="NoSuchHealthCheck";$fault="client";constructor(f){super({name:"NoSuchHealthCheck",$fault:"client",...f});Object.setPrototypeOf(this,$5.prototype)}}class r5 extends m{name="ThrottlingException";$fault="client";constructor(f){super({name:"ThrottlingException",$fault:"client",...f});Object.setPrototypeOf(this,r5.prototype)}}class E5 extends m{name="CidrCollectionAlreadyExistsException";$fault="client";Message;constructor(f){super({name:"CidrCollectionAlreadyExistsException",$fault:"client",...f});Object.setPrototypeOf(this,E5.prototype),this.Message=f.Message}}class U5 extends m{name="HealthCheckAlreadyExists";$fault="client";constructor(f){super({name:"HealthCheckAlreadyExists",$fault:"client",...f});Object.setPrototypeOf(this,U5.prototype)}}class T5 extends m{name="TooManyHealthChecks";$fault="client";constructor(f){super({name:"TooManyHealthChecks",$fault:"client",...f});Object.setPrototypeOf(this,T5.prototype)}}class F5 extends m{name="DelegationSetNotAvailable";$fault="client";constructor(f){super({name:"DelegationSetNotAvailable",$fault:"client",...f});Object.setPrototypeOf(this,F5.prototype)}}class C5 extends m{name="DelegationSetNotReusable";$fault="client";constructor(f){super({name:"DelegationSetNotReusable",$fault:"client",...f});Object.setPrototypeOf(this,C5.prototype)}}class I5 extends m{name="HostedZoneAlreadyExists";$fault="client";constructor(f){super({name:"HostedZoneAlreadyExists",$fault:"client",...f});Object.setPrototypeOf(this,I5.prototype)}}class L5 extends m{name="InvalidDomainName";$fault="client";constructor(f){super({name:"InvalidDomainName",$fault:"client",...f});Object.setPrototypeOf(this,L5.prototype)}}class B5 extends m{name="NoSuchDelegationSet";$fault="client";constructor(f){super({name:"NoSuchDelegationSet",$fault:"client",...f});Object.setPrototypeOf(this,B5.prototype)}}class A5 extends m{name="TooManyHostedZones";$fault="client";constructor(f){super({name:"TooManyHostedZones",$fault:"client",...f});Object.setPrototypeOf(this,A5.prototype)}}class G5 extends m{name="InvalidArgument";$fault="client";constructor(f){super({name:"InvalidArgument",$fault:"client",...f});Object.setPrototypeOf(this,G5.prototype)}}class W5 extends m{name="InvalidKeySigningKeyName";$fault="client";constructor(f){super({name:"InvalidKeySigningKeyName",$fault:"client",...f});Object.setPrototypeOf(this,W5.prototype)}}class z5 extends m{name="KeySigningKeyAlreadyExists";$fault="client";constructor(f){super({name:"KeySigningKeyAlreadyExists",$fault:"client",...f});Object.setPrototypeOf(this,z5.prototype)}}class R5 extends m{name="TooManyKeySigningKeys";$fault="client";constructor(f){super({name:"TooManyKeySigningKeys",$fault:"client",...f});Object.setPrototypeOf(this,R5.prototype)}}class X5 extends m{name="InsufficientCloudWatchLogsResourcePolicy";$fault="client";constructor(f){super({name:"InsufficientCloudWatchLogsResourcePolicy",$fault:"client",...f});Object.setPrototypeOf(this,X5.prototype)}}class S5 extends m{name="NoSuchCloudWatchLogsLogGroup";$fault="client";constructor(f){super({name:"NoSuchCloudWatchLogsLogGroup",$fault:"client",...f});Object.setPrototypeOf(this,S5.prototype)}}class Y5 extends m{name="QueryLoggingConfigAlreadyExists";$fault="client";constructor(f){super({name:"QueryLoggingConfigAlreadyExists",$fault:"client",...f});Object.setPrototypeOf(this,Y5.prototype)}}class M5 extends m{name="DelegationSetAlreadyCreated";$fault="client";constructor(f){super({name:"DelegationSetAlreadyCreated",$fault:"client",...f});Object.setPrototypeOf(this,M5.prototype)}}class Q5 extends m{name="DelegationSetAlreadyReusable";$fault="client";constructor(f){super({name:"DelegationSetAlreadyReusable",$fault:"client",...f});Object.setPrototypeOf(this,Q5.prototype)}}class K5 extends m{name="HostedZoneNotFound";$fault="client";constructor(f){super({name:"HostedZoneNotFound",$fault:"client",...f});Object.setPrototypeOf(this,K5.prototype)}}class Z5 extends m{name="InvalidTrafficPolicyDocument";$fault="client";constructor(f){super({name:"InvalidTrafficPolicyDocument",$fault:"client",...f});Object.setPrototypeOf(this,Z5.prototype)}}class J5 extends m{name="TooManyTrafficPolicies";$fault="client";constructor(f){super({name:"TooManyTrafficPolicies",$fault:"client",...f});Object.setPrototypeOf(this,J5.prototype)}}class V5 extends m{name="TrafficPolicyAlreadyExists";$fault="client";constructor(f){super({name:"TrafficPolicyAlreadyExists",$fault:"client",...f});Object.setPrototypeOf(this,V5.prototype)}}class P5 extends m{name="NoSuchTrafficPolicy";$fault="client";constructor(f){super({name:"NoSuchTrafficPolicy",$fault:"client",...f});Object.setPrototypeOf(this,P5.prototype)}}class H5 extends m{name="TooManyTrafficPolicyInstances";$fault="client";constructor(f){super({name:"TooManyTrafficPolicyInstances",$fault:"client",...f});Object.setPrototypeOf(this,H5.prototype)}}class N5 extends m{name="TrafficPolicyInstanceAlreadyExists";$fault="client";constructor(f){super({name:"TrafficPolicyInstanceAlreadyExists",$fault:"client",...f});Object.setPrototypeOf(this,N5.prototype)}}class D5 extends m{name="TooManyTrafficPolicyVersionsForCurrentPolicy";$fault="client";constructor(f){super({name:"TooManyTrafficPolicyVersionsForCurrentPolicy",$fault:"client",...f});Object.setPrototypeOf(this,D5.prototype)}}class q5 extends m{name="TooManyVPCAssociationAuthorizations";$fault="client";constructor(f){super({name:"TooManyVPCAssociationAuthorizations",$fault:"client",...f});Object.setPrototypeOf(this,q5.prototype)}}class k5 extends m{name="KeySigningKeyInParentDSRecord";$fault="client";constructor(f){super({name:"KeySigningKeyInParentDSRecord",$fault:"client",...f});Object.setPrototypeOf(this,k5.prototype)}}class y5 extends m{name="KeySigningKeyInUse";$fault="client";constructor(f){super({name:"KeySigningKeyInUse",$fault:"client",...f});Object.setPrototypeOf(this,y5.prototype)}}class j5 extends m{name="CidrCollectionInUseException";$fault="client";Message;constructor(f){super({name:"CidrCollectionInUseException",$fault:"client",...f});Object.setPrototypeOf(this,j5.prototype),this.Message=f.Message}}class O5 extends m{name="HealthCheckInUse";$fault="client";constructor(f){super({name:"HealthCheckInUse",$fault:"client",...f});Object.setPrototypeOf(this,O5.prototype)}}class l5 extends m{name="HostedZoneNotEmpty";$fault="client";constructor(f){super({name:"HostedZoneNotEmpty",$fault:"client",...f});Object.setPrototypeOf(this,l5.prototype)}}class v5 extends m{name="NoSuchQueryLoggingConfig";$fault="client";constructor(f){super({name:"NoSuchQueryLoggingConfig",$fault:"client",...f});Object.setPrototypeOf(this,v5.prototype)}}class b5 extends m{name="DelegationSetInUse";$fault="client";constructor(f){super({name:"DelegationSetInUse",$fault:"client",...f});Object.setPrototypeOf(this,b5.prototype)}}class m5 extends m{name="TrafficPolicyInUse";$fault="client";constructor(f){super({name:"TrafficPolicyInUse",$fault:"client",...f});Object.setPrototypeOf(this,m5.prototype)}}class d5 extends m{name="NoSuchTrafficPolicyInstance";$fault="client";constructor(f){super({name:"NoSuchTrafficPolicyInstance",$fault:"client",...f});Object.setPrototypeOf(this,d5.prototype)}}class i5 extends m{name="VPCAssociationAuthorizationNotFound";$fault="client";constructor(f){super({name:"VPCAssociationAuthorizationNotFound",$fault:"client",...f});Object.setPrototypeOf(this,i5.prototype)}}class c5 extends m{name="DNSSECNotFound";$fault="client";constructor(f){super({name:"DNSSECNotFound",$fault:"client",...f});Object.setPrototypeOf(this,c5.prototype)}}class g5 extends m{name="LastVPCAssociation";$fault="client";constructor(f){super({name:"LastVPCAssociation",$fault:"client",...f});Object.setPrototypeOf(this,g5.prototype)}}class x5 extends m{name="VPCAssociationNotFound";$fault="client";constructor(f){super({name:"VPCAssociationNotFound",$fault:"client",...f});Object.setPrototypeOf(this,x5.prototype)}}class _5 extends m{name="HostedZonePartiallyDelegated";$fault="client";constructor(f){super({name:"HostedZonePartiallyDelegated",$fault:"client",...f});Object.setPrototypeOf(this,_5.prototype)}}class n5 extends m{name="KeySigningKeyWithActiveStatusNotFound";$fault="client";constructor(f){super({name:"KeySigningKeyWithActiveStatusNotFound",$fault:"client",...f});Object.setPrototypeOf(this,n5.prototype)}}class e5 extends m{name="NoSuchChange";$fault="client";constructor(f){super({name:"NoSuchChange",$fault:"client",...f});Object.setPrototypeOf(this,e5.prototype)}}class a5 extends m{name="NoSuchGeoLocation";$fault="client";constructor(f){super({name:"NoSuchGeoLocation",$fault:"client",...f});Object.setPrototypeOf(this,a5.prototype)}}class o5 extends m{name="IncompatibleVersion";$fault="client";constructor(f){super({name:"IncompatibleVersion",$fault:"client",...f});Object.setPrototypeOf(this,o5.prototype)}}class p5 extends m{name="HostedZoneNotPrivate";$fault="client";constructor(f){super({name:"HostedZoneNotPrivate",$fault:"client",...f});Object.setPrototypeOf(this,p5.prototype)}}class u5 extends m{name="NoSuchCidrLocationException";$fault="client";Message;constructor(f){super({name:"NoSuchCidrLocationException",$fault:"client",...f});Object.setPrototypeOf(this,u5.prototype),this.Message=f.Message}}class t5 extends m{name="InvalidPaginationToken";$fault="client";constructor(f){super({name:"InvalidPaginationToken",$fault:"client",...f});Object.setPrototypeOf(this,t5.prototype)}}class fT extends m{name="HealthCheckVersionMismatch";$fault="client";constructor(f){super({name:"HealthCheckVersionMismatch",$fault:"client",...f});Object.setPrototypeOf(this,fT.prototype)}}class hT extends m{name="ConflictingTypes";$fault="client";constructor(f){super({name:"ConflictingTypes",$fault:"client",...f});Object.setPrototypeOf(this,hT.prototype)}}var HN=async(f,h)=>{let w=d.requestBuilder(f,h),s={};w.bp("/2013-04-01/keysigningkey/{HostedZoneId}/{Name}/activate"),w.p("HostedZoneId",()=>f.HostedZoneId,"{HostedZoneId}",!1),w.p("Name",()=>f.Name,"{Name}",!1);let $;return w.m("POST").h(s).b($),w.build()},NN=async(f,h)=>{let w=d.requestBuilder(f,h),s={"content-type":"application/xml"};w.bp("/2013-04-01/hostedzone/{HostedZoneId}/associatevpc"),w.p("HostedZoneId",()=>f.HostedZoneId,"{HostedZoneId}",!1);let $;$=c0;let r=new P(G$0);if(r.a("xmlns","https://route53.amazonaws.com/doc/2013-04-01/"),f[F0]!=null)r.c(P.of(A$0,f[F0]).n(F0));if(f[P0]!=null)r.c(ar(f[P0],h).n(P0));return $+=r.toString(),w.m("POST").h(s).b($),w.build()},DN=async(f,h)=>{let w=d.requestBuilder(f,h),s={"content-type":"application/xml"};w.bp("/2013-04-01/cidrcollection/{Id}"),w.p("Id",()=>f.Id,"{Id}",!1);let $;$=c0;let r=new P(X$0);if(r.a("xmlns","https://route53.amazonaws.com/doc/2013-04-01/"),r.lc(f,"Changes","Changes",()=>hs0(f[zk],h)),f[wT]!=null)r.c(P.of(wT,String(f[wT])).n(wT));return $+=r.toString(),w.m("POST").h(s).b($),w.build()},qN=async(f,h)=>{let w=d.requestBuilder(f,h),s={"content-type":"application/xml"};w.bp("/2013-04-01/hostedzone/{HostedZoneId}/rrset"),w.p("HostedZoneId",()=>f.HostedZoneId,"{HostedZoneId}",!1);let $;$=c0;let r=new P(D$0);if(r.a("xmlns","https://route53.amazonaws.com/doc/2013-04-01/"),f[$T]!=null)r.c(uw0(f[$T],h).n($T));return $+=r.toString(),w.m("POST").h(s).b($),w.build()},kN=async(f,h)=>{let w=d.requestBuilder(f,h),s={"content-type":"application/xml"};w.bp("/2013-04-01/tags/{ResourceType}/{ResourceId}"),w.p("ResourceType",()=>f.ResourceType,"{ResourceType}",!1),w.p("ResourceId",()=>f.ResourceId,"{ResourceId}",!1);let $;$=c0;let r=new P(q$0);return r.a("xmlns","https://route53.amazonaws.com/doc/2013-04-01/"),r.lc(f,"AddTags","AddTags",()=>Gs0(f[B$0],h)),r.lc(f,"RemoveTagKeys","RemoveTagKeys",()=>As0(f[Tr0],h)),$+=r.toString(),w.m("POST").h(s).b($),w.build()},yN=async(f,h)=>{let w=d.requestBuilder(f,h),s={"content-type":"application/xml"};w.bp("/2013-04-01/cidrcollection");let $;$=c0;let r=new P(S$0);if(r.a("xmlns","https://route53.amazonaws.com/doc/2013-04-01/"),f[q0]!=null)r.c(P.of(V$0,f[q0]).n(q0));if(f[o]!=null)r.c(P.of(P$0,f[o]).n(o));return $+=r.toString(),w.m("POST").h(s).b($),w.build()},jN=async(f,h)=>{let w=d.requestBuilder(f,h),s={"content-type":"application/xml"};w.bp("/2013-04-01/healthcheck");let $;$=c0;let r=new P(Y$0);if(r.a("xmlns","https://route53.amazonaws.com/doc/2013-04-01/"),f[q0]!=null)r.c(P.of(_$0,f[q0]).n(q0));if(f[Qw]!=null)r.c(Us0(f[Qw],h).n(Qw));return $+=r.toString(),w.m("POST").h(s).b($),w.build()},ON=async(f,h)=>{let w=d.requestBuilder(f,h),s={"content-type":"application/xml"};w.bp("/2013-04-01/hostedzone");let $;$=c0;let r=new P(M$0);if(r.a("xmlns","https://route53.amazonaws.com/doc/2013-04-01/"),f[q0]!=null)r.c(P.of(j8,f[q0]).n(q0));if(f[ET]!=null)r.c(P.of(yf,f[ET]).n(ET));if(f[UT]!=null)r.c(Ts0(f[UT],h).n(UT));if(f[o]!=null)r.c(P.of(Gf,f[o]).n(o));if(f[P0]!=null)r.c(ar(f[P0],h).n(P0));return $+=r.toString(),w.m("POST").h(s).b($),w.build()},lN=async(f,h)=>{let w=d.requestBuilder(f,h),s={"content-type":"application/xml"};w.bp("/2013-04-01/keysigningkey");let $;$=c0;let r=new P(Q$0);if(r.a("xmlns","https://route53.amazonaws.com/doc/2013-04-01/"),f[q0]!=null)r.c(P.of(j8,f[q0]).n(q0));if(f[h0]!=null)r.c(P.of(yf,f[h0]).n(h0));if(f[nC]!=null)r.c(P.of(Lr0,f[nC]).n(nC));if(f[o]!=null)r.c(P.of(Ir0,f[o]).n(o));if(f[G1]!=null)r.c(P.of(Br0,f[G1]).n(G1));return $+=r.toString(),w.m("POST").h(s).b($),w.build()},vN=async(f,h)=>{let w=d.requestBuilder(f,h),s={"content-type":"application/xml"};w.bp("/2013-04-01/queryloggingconfig");let $;$=c0;let r=new P(H$0);if(r.a("xmlns","https://route53.amazonaws.com/doc/2013-04-01/"),r.cc(f,rT),f[h0]!=null)r.c(P.of(yf,f[h0]).n(h0));return $+=r.toString(),w.m("POST").h(s).b($),w.build()},bN=async(f,h)=>{let w=d.requestBuilder(f,h),s={"content-type":"application/xml"};w.bp("/2013-04-01/delegationset");let $;$=c0;let r=new P(N$0);if(r.a("xmlns","https://route53.amazonaws.com/doc/2013-04-01/"),f[q0]!=null)r.c(P.of(j8,f[q0]).n(q0));if(f[h0]!=null)r.c(P.of(yf,f[h0]).n(h0));return $+=r.toString(),w.m("POST").h(s).b($),w.build()},mN=async(f,h)=>{let w=d.requestBuilder(f,h),s={"content-type":"application/xml"};w.bp("/2013-04-01/trafficpolicy");let $;$=c0;let r=new P(y$0);if(r.a("xmlns","https://route53.amazonaws.com/doc/2013-04-01/"),f[F0]!=null)r.c(P.of(l8,f[F0]).n(F0));if(f[wh]!=null)r.c(P.of(Sk,f[wh]).n(wh));if(f[o]!=null)r.c(P.of(Rr0,f[o]).n(o));return $+=r.toString(),w.m("POST").h(s).b($),w.build()},dN=async(f,h)=>{let w=d.requestBuilder(f,h),s={"content-type":"application/xml"};w.bp("/2013-04-01/trafficpolicyinstance");let $;$=c0;let r=new P(k$0);if(r.a("xmlns","https://route53.amazonaws.com/doc/2013-04-01/"),f[h0]!=null)r.c(P.of(yf,f[h0]).n(h0));if(f[o]!=null)r.c(P.of(Gf,f[o]).n(o));if(f[p0]!=null)r.c(P.of(p0,String(f[p0])).n(p0));if(r.cc(f,z$),f[g1]!=null)r.c(P.of(g1,String(f[g1])).n(g1));return $+=r.toString(),w.m("POST").h(s).b($),w.build()},iN=async(f,h)=>{let w=d.requestBuilder(f,h),s={"content-type":"application/xml"};w.bp("/2013-04-01/trafficpolicy/{Id}"),w.p("Id",()=>f.Id,"{Id}",!1);let $;$=c0;let r=new P(j$0);if(r.a("xmlns","https://route53.amazonaws.com/doc/2013-04-01/"),f[F0]!=null)r.c(P.of(l8,f[F0]).n(F0));if(f[wh]!=null)r.c(P.of(Sk,f[wh]).n(wh));return $+=r.toString(),w.m("POST").h(s).b($),w.build()},cN=async(f,h)=>{let w=d.requestBuilder(f,h),s={"content-type":"application/xml"};w.bp("/2013-04-01/hostedzone/{HostedZoneId}/authorizevpcassociation"),w.p("HostedZoneId",()=>f.HostedZoneId,"{HostedZoneId}",!1);let $;$=c0;let r=new P(O$0);if(r.a("xmlns","https://route53.amazonaws.com/doc/2013-04-01/"),f[P0]!=null)r.c(ar(f[P0],h).n(P0));return $+=r.toString(),w.m("POST").h(s).b($),w.build()},gN=async(f,h)=>{let w=d.requestBuilder(f,h),s={};w.bp("/2013-04-01/keysigningkey/{HostedZoneId}/{Name}/deactivate"),w.p("HostedZoneId",()=>f.HostedZoneId,"{HostedZoneId}",!1),w.p("Name",()=>f.Name,"{Name}",!1);let $;return w.m("POST").h(s).b($),w.build()},xN=async(f,h)=>{let w=d.requestBuilder(f,h),s={};w.bp("/2013-04-01/cidrcollection/{Id}"),w.p("Id",()=>f.Id,"{Id}",!1);let $;return w.m("DELETE").h(s).b($),w.build()},_N=async(f,h)=>{let w=d.requestBuilder(f,h),s={};w.bp("/2013-04-01/healthcheck/{HealthCheckId}"),w.p("HealthCheckId",()=>f.HealthCheckId,"{HealthCheckId}",!1);let $;return w.m("DELETE").h(s).b($),w.build()},nN=async(f,h)=>{let w=d.requestBuilder(f,h),s={};w.bp("/2013-04-01/hostedzone/{Id}"),w.p("Id",()=>f.Id,"{Id}",!1);let $;return w.m("DELETE").h(s).b($),w.build()},eN=async(f,h)=>{let w=d.requestBuilder(f,h),s={};w.bp("/2013-04-01/keysigningkey/{HostedZoneId}/{Name}"),w.p("HostedZoneId",()=>f.HostedZoneId,"{HostedZoneId}",!1),w.p("Name",()=>f.Name,"{Name}",!1);let $;return w.m("DELETE").h(s).b($),w.build()},aN=async(f,h)=>{let w=d.requestBuilder(f,h),s={};w.bp("/2013-04-01/queryloggingconfig/{Id}"),w.p("Id",()=>f.Id,"{Id}",!1);let $;return w.m("DELETE").h(s).b($),w.build()},oN=async(f,h)=>{let w=d.requestBuilder(f,h),s={};w.bp("/2013-04-01/delegationset/{Id}"),w.p("Id",()=>f.Id,"{Id}",!1);let $;return w.m("DELETE").h(s).b($),w.build()},pN=async(f,h)=>{let w=d.requestBuilder(f,h),s={};w.bp("/2013-04-01/trafficpolicy/{Id}/{Version}"),w.p("Id",()=>f.Id,"{Id}",!1),w.p("Version",()=>f.Version.toString(),"{Version}",!1);let $;return w.m("DELETE").h(s).b($),w.build()},uN=async(f,h)=>{let w=d.requestBuilder(f,h),s={};w.bp("/2013-04-01/trafficpolicyinstance/{Id}"),w.p("Id",()=>f.Id,"{Id}",!1);let $;return w.m("DELETE").h(s).b($),w.build()},tN=async(f,h)=>{let w=d.requestBuilder(f,h),s={"content-type":"application/xml"};w.bp("/2013-04-01/hostedzone/{HostedZoneId}/deauthorizevpcassociation"),w.p("HostedZoneId",()=>f.HostedZoneId,"{HostedZoneId}",!1);let $;$=c0;let r=new P(v$0);if(r.a("xmlns","https://route53.amazonaws.com/doc/2013-04-01/"),f[P0]!=null)r.c(ar(f[P0],h).n(P0));return $+=r.toString(),w.m("POST").h(s).b($),w.build()},fD=async(f,h)=>{let w=d.requestBuilder(f,h),s={};w.bp("/2013-04-01/hostedzone/{HostedZoneId}/disable-dnssec"),w.p("HostedZoneId",()=>f.HostedZoneId,"{HostedZoneId}",!1);let $;return w.m("POST").h(s).b($),w.build()},hD=async(f,h)=>{let w=d.requestBuilder(f,h),s={"content-type":"application/xml"};w.bp("/2013-04-01/hostedzone/{HostedZoneId}/disassociatevpc"),w.p("HostedZoneId",()=>f.HostedZoneId,"{HostedZoneId}",!1);let $;$=c0;let r=new P(m$0);if(r.a("xmlns","https://route53.amazonaws.com/doc/2013-04-01/"),f[F0]!=null)r.c(P.of(b$0,f[F0]).n(F0));if(f[P0]!=null)r.c(ar(f[P0],h).n(P0));return $+=r.toString(),w.m("POST").h(s).b($),w.build()},wD=async(f,h)=>{let w=d.requestBuilder(f,h),s={};w.bp("/2013-04-01/hostedzone/{HostedZoneId}/enable-dnssec"),w.p("HostedZoneId",()=>f.HostedZoneId,"{HostedZoneId}",!1);let $;return w.m("POST").h(s).b($),w.build()},sD=async(f,h)=>{let w=d.requestBuilder(f,h),s={};w.bp("/2013-04-01/accountlimit/{Type}"),w.p("Type",()=>f.Type,"{Type}",!1);let $;return w.m("GET").h(s).b($),w.build()},$D=async(f,h)=>{let w=d.requestBuilder(f,h),s={};w.bp("/2013-04-01/change/{Id}"),w.p("Id",()=>f.Id,"{Id}",!1);let $;return w.m("GET").h(s).b($),w.build()},rD=async(f,h)=>{let w=d.requestBuilder(f,h),s={};w.bp("/2013-04-01/checkeripranges");let $;return w.m("GET").h(s).b($),w.build()},ED=async(f,h)=>{let w=d.requestBuilder(f,h),s={};w.bp("/2013-04-01/hostedzone/{HostedZoneId}/dnssec"),w.p("HostedZoneId",()=>f.HostedZoneId,"{HostedZoneId}",!1);let $;return w.m("GET").h(s).b($),w.build()},UD=async(f,h)=>{let w=d.requestBuilder(f,h),s={};w.bp("/2013-04-01/geolocation");let $=Y({[Jr0]:[,f[qf]],[Vr0]:[,f[kf]],[vr0]:[,f[jf]]}),r;return w.m("GET").h(s).q($).b(r),w.build()},TD=async(f,h)=>{let w=d.requestBuilder(f,h),s={};w.bp("/2013-04-01/healthcheck/{HealthCheckId}"),w.p("HealthCheckId",()=>f.HealthCheckId,"{HealthCheckId}",!1);let $;return w.m("GET").h(s).b($),w.build()},FD=async(f,h)=>{let w=d.requestBuilder(f,h),s={};w.bp("/2013-04-01/healthcheckcount");let $;return w.m("GET").h(s).b($),w.build()},CD=async(f,h)=>{let w=d.requestBuilder(f,h),s={};w.bp("/2013-04-01/healthcheck/{HealthCheckId}/lastfailurereason"),w.p("HealthCheckId",()=>f.HealthCheckId,"{HealthCheckId}",!1);let $;return w.m("GET").h(s).b($),w.build()},ID=async(f,h)=>{let w=d.requestBuilder(f,h),s={};w.bp("/2013-04-01/healthcheck/{HealthCheckId}/status"),w.p("HealthCheckId",()=>f.HealthCheckId,"{HealthCheckId}",!1);let $;return w.m("GET").h(s).b($),w.build()},LD=async(f,h)=>{let w=d.requestBuilder(f,h),s={};w.bp("/2013-04-01/hostedzone/{Id}"),w.p("Id",()=>f.Id,"{Id}",!1);let $;return w.m("GET").h(s).b($),w.build()},BD=async(f,h)=>{let w=d.requestBuilder(f,h),s={};w.bp("/2013-04-01/hostedzonecount");let $;return w.m("GET").h(s).b($),w.build()},AD=async(f,h)=>{let w=d.requestBuilder(f,h),s={};w.bp("/2013-04-01/hostedzonelimit/{HostedZoneId}/{Type}"),w.p("Type",()=>f.Type,"{Type}",!1),w.p("HostedZoneId",()=>f.HostedZoneId,"{HostedZoneId}",!1);let $;return w.m("GET").h(s).b($),w.build()},GD=async(f,h)=>{let w=d.requestBuilder(f,h),s={};w.bp("/2013-04-01/queryloggingconfig/{Id}"),w.p("Id",()=>f.Id,"{Id}",!1);let $;return w.m("GET").h(s).b($),w.build()},WD=async(f,h)=>{let w=d.requestBuilder(f,h),s={};w.bp("/2013-04-01/delegationset/{Id}"),w.p("Id",()=>f.Id,"{Id}",!1);let $;return w.m("GET").h(s).b($),w.build()},zD=async(f,h)=>{let w=d.requestBuilder(f,h),s={};w.bp("/2013-04-01/reusabledelegationsetlimit/{DelegationSetId}/{Type}"),w.p("Type",()=>f.Type,"{Type}",!1),w.p("DelegationSetId",()=>f.DelegationSetId,"{DelegationSetId}",!1);let $;return w.m("GET").h(s).b($),w.build()},RD=async(f,h)=>{let w=d.requestBuilder(f,h),s={};w.bp("/2013-04-01/trafficpolicy/{Id}/{Version}"),w.p("Id",()=>f.Id,"{Id}",!1),w.p("Version",()=>f.Version.toString(),"{Version}",!1);let $;return w.m("GET").h(s).b($),w.build()},XD=async(f,h)=>{let w=d.requestBuilder(f,h),s={};w.bp("/2013-04-01/trafficpolicyinstance/{Id}"),w.p("Id",()=>f.Id,"{Id}",!1);let $;return w.m("GET").h(s).b($),w.build()},SD=async(f,h)=>{let w=d.requestBuilder(f,h),s={};w.bp("/2013-04-01/trafficpolicyinstancecount");let $;return w.m("GET").h(s).b($),w.build()},YD=async(f,h)=>{let w=d.requestBuilder(f,h),s={};w.bp("/2013-04-01/cidrcollection/{CollectionId}/cidrblocks"),w.p("CollectionId",()=>f.CollectionId,"{CollectionId}",!1);let $=Y({[Of]:[,f[U1]],[X$]:[,f[k0]],[f4]:[()=>f.MaxResults!==void 0,()=>f[ur].toString()]}),r;return w.m("GET").h(s).q($).b(r),w.build()},MD=async(f,h)=>{let w=d.requestBuilder(f,h),s={};w.bp("/2013-04-01/cidrcollection");let $=Y({[X$]:[,f[k0]],[f4]:[()=>f.MaxResults!==void 0,()=>f[ur].toString()]}),r;return w.m("GET").h(s).q($).b(r),w.build()},QD=async(f,h)=>{let w=d.requestBuilder(f,h),s={};w.bp("/2013-04-01/cidrcollection/{CollectionId}"),w.p("CollectionId",()=>f.CollectionId,"{CollectionId}",!1);let $=Y({[X$]:[,f[k0]],[f4]:[()=>f.MaxResults!==void 0,()=>f[ur].toString()]}),r;return w.m("GET").h(s).q($).b(r),w.build()},KD=async(f,h)=>{let w=d.requestBuilder(f,h),s={};w.bp("/2013-04-01/geolocations");let $=Y({[br0]:[,f[Fr0]],[mr0]:[,f[Cr0]],[dr0]:[,f[zr0]],[a1]:[()=>f.MaxItems!==void 0,()=>f[u].toString()]}),r;return w.m("GET").h(s).q($).b(r),w.build()},ZD=async(f,h)=>{let w=d.requestBuilder(f,h),s={};w.bp("/2013-04-01/healthcheck");let $=Y({[v8]:[,f[x1]],[a1]:[()=>f.MaxItems!==void 0,()=>f[u].toString()]}),r;return w.m("GET").h(s).q($).b(r),w.build()},JD=async(f,h)=>{let w=d.requestBuilder(f,h),s={};w.bp("/2013-04-01/hostedzone");let $=Y({[v8]:[,f[x1]],[a1]:[()=>f.MaxItems!==void 0,()=>f[u].toString()],[Pr0]:[,f[ET]],[qr0]:[,f[a$0]]}),r;return w.m("GET").h(s).q($).b(r),w.build()},VD=async(f,h)=>{let w=d.requestBuilder(f,h),s={};w.bp("/2013-04-01/hostedzonesbyname");let $=Y({[Hr0]:[,f[Gf]],[tr]:[,f[h0]],[a1]:[()=>f.MaxItems!==void 0,()=>f[u].toString()]}),r;return w.m("GET").h(s).q($).b(r),w.build()},PD=async(f,h)=>{let w=d.requestBuilder(f,h),s={};w.bp("/2013-04-01/hostedzonesbyvpc");let $=Y({[xr0]:[,j(f[nr],"VPCId")],[nr0]:[,j(f[er],"VPCRegion")],[a1]:[()=>f.MaxItems!==void 0,()=>f[u].toString()],[X$]:[,f[k0]]}),r;return w.m("GET").h(s).q($).b(r),w.build()},HD=async(f,h)=>{let w=d.requestBuilder(f,h),s={};w.bp("/2013-04-01/queryloggingconfig");let $=Y({[tr]:[,f[h0]],[X$]:[,f[k0]],[f4]:[()=>f.MaxResults!==void 0,()=>f[ur].toString()]}),r;return w.m("GET").h(s).q($).b(r),w.build()},ND=async(f,h)=>{let w=d.requestBuilder(f,h),s={};w.bp("/2013-04-01/hostedzone/{HostedZoneId}/rrset"),w.p("HostedZoneId",()=>f.HostedZoneId,"{HostedZoneId}",!1);let $=Y({[yr0]:[,f[Gr0]],[ir0]:[,f[Wr0]],[kr0]:[,f[Ar0]],[a1]:[()=>f.MaxItems!==void 0,()=>f[u].toString()]}),r;return w.m("GET").h(s).q($).b(r),w.build()},DD=async(f,h)=>{let w=d.requestBuilder(f,h),s={};w.bp("/2013-04-01/delegationset");let $=Y({[v8]:[,f[x1]],[a1]:[()=>f.MaxItems!==void 0,()=>f[u].toString()]}),r;return w.m("GET").h(s).q($).b(r),w.build()},qD=async(f,h)=>{let w=d.requestBuilder(f,h),s={};w.bp("/2013-04-01/tags/{ResourceType}/{ResourceId}"),w.p("ResourceType",()=>f.ResourceType,"{ResourceType}",!1),w.p("ResourceId",()=>f.ResourceId,"{ResourceId}",!1);let $;return w.m("GET").h(s).b($),w.build()},kD=async(f,h)=>{let w=d.requestBuilder(f,h),s={"content-type":"application/xml"};w.bp("/2013-04-01/tags/{ResourceType}"),w.p("ResourceType",()=>f.ResourceType,"{ResourceType}",!1);let $;$=c0;let r=new P(p$0);return r.a("xmlns","https://route53.amazonaws.com/doc/2013-04-01/"),r.lc(f,"ResourceIds","ResourceIds",()=>Ws0(f[hr0],h)),$+=r.toString(),w.m("POST").h(s).b($),w.build()},yD=async(f,h)=>{let w=d.requestBuilder(f,h),s={};w.bp("/2013-04-01/trafficpolicies");let $=Y({[cr0]:[,f[GT]],[a1]:[()=>f.MaxItems!==void 0,()=>f[u].toString()]}),r;return w.m("GET").h(s).q($).b(r),w.build()},jD=async(f,h)=>{let w=d.requestBuilder(f,h),s={};w.bp("/2013-04-01/trafficpolicyinstances");let $=Y({[tr]:[,f[vh]],[b8]:[,f[_1]],[m8]:[,f[n1]],[a1]:[()=>f.MaxItems!==void 0,()=>f[u].toString()]}),r;return w.m("GET").h(s).q($).b(r),w.build()},OD=async(f,h)=>{let w=d.requestBuilder(f,h),s={};w.bp("/2013-04-01/trafficpolicyinstances/hostedzone");let $=Y({[Yk]:[,j(f[h0],"HostedZoneId")],[b8]:[,f[_1]],[m8]:[,f[n1]],[a1]:[()=>f.MaxItems!==void 0,()=>f[u].toString()]}),r;return w.m("GET").h(s).q($).b(r),w.build()},lD=async(f,h)=>{let w=d.requestBuilder(f,h),s={};w.bp("/2013-04-01/trafficpolicyinstances/trafficpolicy");let $=Y({[Yk]:[,j(f[z$],"TrafficPolicyId")],[_r0]:[j(f.TrafficPolicyVersion,"TrafficPolicyVersion")!=null,()=>f[g1].toString()],[tr]:[,f[vh]],[b8]:[,f[_1]],[m8]:[,f[n1]],[a1]:[()=>f.MaxItems!==void 0,()=>f[u].toString()]}),r;return w.m("GET").h(s).q($).b(r),w.build()},vD=async(f,h)=>{let w=d.requestBuilder(f,h),s={};w.bp("/2013-04-01/trafficpolicies/{Id}/versions"),w.p("Id",()=>f.Id,"{Id}",!1);let $=Y({[gr0]:[,f[WT]],[a1]:[()=>f.MaxItems!==void 0,()=>f[u].toString()]}),r;return w.m("GET").h(s).q($).b(r),w.build()},bD=async(f,h)=>{let w=d.requestBuilder(f,h),s={};w.bp("/2013-04-01/hostedzone/{HostedZoneId}/authorizevpcassociation"),w.p("HostedZoneId",()=>f.HostedZoneId,"{HostedZoneId}",!1);let $=Y({[X$]:[,f[k0]],[f4]:[()=>f.MaxResults!==void 0,()=>f[ur].toString()]}),r;return w.m("GET").h(s).q($).b(r),w.build()},mD=async(f,h)=>{let w=d.requestBuilder(f,h),s={};w.bp("/2013-04-01/testdnsanswer");let $=Y({[tr]:[,j(f[h0],"HostedZoneId")],[jr0]:[,j(f[LT],"RecordName")],[Or0]:[,j(f[BT],"RecordType")],[lr0]:[,f[fr0]],[Nr0]:[,f[d$0]],[Dr0]:[,f[i$0]]}),r;return w.m("GET").h(s).q($).b(r),w.build()},dD=async(f,h)=>{let w=d.requestBuilder(f,h),s={"content-type":"application/xml"};w.bp("/2013-04-01/healthcheck/{HealthCheckId}"),w.p("HealthCheckId",()=>f.HealthCheckId,"{HealthCheckId}",!1);let $;$=c0;let r=new P(Yr0);if(r.a("xmlns","https://route53.amazonaws.com/doc/2013-04-01/"),f[Df]!=null)r.c(Uk(f[Df],h).n(Df));if(r.lc(f,"ChildHealthChecks","ChildHealthChecks",()=>Tk(f[Lw],h)),f[Ff]!=null)r.c(P.of(Ff,String(f[Ff])).n(Ff));if(f[Cf]!=null)r.c(P.of(Cf,String(f[Cf])).n(Cf));if(f[If]!=null)r.c(P.of(If,String(f[If])).n(If));if(r.cc(f,mr),f[Gw]!=null)r.c(P.of(Gw,String(f[Gw])).n(Gw));if(f[Lf]!=null)r.c(P.of(Lf,String(f[Lf])).n(Lf));if(r.cc(f,bh),r.cc(f,cr),f[Bf]!=null)r.c(P.of(Bf,String(f[Bf])).n(Bf));if(f[Af]!=null)r.c(P.of(Af,String(f[Af])).n(Af));return r.lc(f,"Regions","Regions",()=>Fk(f[Bw],h)),r.lc(f,"ResetElements","ResetElements",()=>Fs0(f[t$0],h)),r.cc(f,gr),r.cc(f,_r),$+=r.toString(),w.m("POST").h(s).b($),w.build()},iD=async(f,h)=>{let w=d.requestBuilder(f,h),s={"content-type":"application/xml"};w.bp("/2013-04-01/hostedzone/{Id}"),w.p("Id",()=>f.Id,"{Id}",!1);let $;$=c0;let r=new P(Mr0);if(r.a("xmlns","https://route53.amazonaws.com/doc/2013-04-01/"),f[F0]!=null)r.c(P.of(O8,f[F0]).n(F0));return $+=r.toString(),w.m("POST").h(s).b($),w.build()},cD=async(f,h)=>{let w=d.requestBuilder(f,h),s={"content-type":"application/xml"};w.bp("/2013-04-01/trafficpolicy/{Id}/{Version}"),w.p("Id",()=>f.Id,"{Id}",!1),w.p("Version",()=>f.Version.toString(),"{Version}",!1);let $;$=c0;let r=new P(Qr0);if(r.a("xmlns","https://route53.amazonaws.com/doc/2013-04-01/"),f[F0]!=null)r.c(P.of(l8,f[F0]).n(F0));return $+=r.toString(),w.m("POST").h(s).b($),w.build()},gD=async(f,h)=>{let w=d.requestBuilder(f,h),s={"content-type":"application/xml"};w.bp("/2013-04-01/trafficpolicyinstance/{Id}"),w.p("Id",()=>f.Id,"{Id}",!1);let $;$=c0;let r=new P(Kr0);if(r.a("xmlns","https://route53.amazonaws.com/doc/2013-04-01/"),f[p0]!=null)r.c(P.of(p0,String(f[p0])).n(p0));if(r.cc(f,z$),f[g1]!=null)r.c(P.of(g1,String(f[g1])).n(g1));return $+=r.toString(),w.m("POST").h(s).b($),w.build()},xD=async(f,h)=>{if(f.statusCode!==200&&f.statusCode>=300)return i(f,h);let w=Y({$metadata:Z(f)}),s=j(g(await _.parseXmlBody(f.body,h)),"body");if(s[$0]!=null)w[$0]=e1(s[$0],h);return w},_D=async(f,h)=>{if(f.statusCode!==200&&f.statusCode>=300)return i(f,h);let w=Y({$metadata:Z(f)}),s=j(g(await _.parseXmlBody(f.body,h)),"body");if(s[$0]!=null)w[$0]=e1(s[$0],h);return w},nD=async(f,h)=>{if(f.statusCode!==200&&f.statusCode>=300)return i(f,h);let w=Y({$metadata:Z(f)}),s=j(g(await _.parseXmlBody(f.body,h)),"body");if(s[I0]!=null)w[I0]=A(s[I0]);return w},eD=async(f,h)=>{if(f.statusCode!==200&&f.statusCode>=300)return i(f,h);let w=Y({$metadata:Z(f)}),s=j(g(await _.parseXmlBody(f.body,h)),"body");if(s[$0]!=null)w[$0]=e1(s[$0],h);return w},aD=async(f,h)=>{if(f.statusCode!==200&&f.statusCode>=300)return i(f,h);let w=Y({$metadata:Z(f)});return await B1.collectBody(f.body,h),w},oD=async(f,h)=>{if(f.statusCode!==201&&f.statusCode>=300)return i(f,h);let w=Y({$metadata:Z(f),[Eh]:[,f.headers[Of]]}),s=j(g(await _.parseXmlBody(f.body,h)),"body");if(s[yC]!=null)w[yC]=Ks0(s[yC],h);return w},pD=async(f,h)=>{if(f.statusCode!==201&&f.statusCode>=300)return i(f,h);let w=Y({$metadata:Z(f),[Eh]:[,f.headers[Of]]}),s=j(g(await _.parseXmlBody(f.body,h)),"body");if(s[Wf]!=null)w[Wf]=ST(s[Wf],h);return w},uD=async(f,h)=>{if(f.statusCode!==201&&f.statusCode>=300)return i(f,h);let w=Y({$metadata:Z(f),[Eh]:[,f.headers[Of]]}),s=j(g(await _.parseXmlBody(f.body,h)),"body");if(s[$0]!=null)w[$0]=e1(s[$0],h);if(s[M1]!=null)w[M1]=or(s[M1],h);if(s[V1]!=null)w[V1]=YT(s[V1],h);if(s[P0]!=null)w[P0]=y8(s[P0],h);return w},tD=async(f,h)=>{if(f.statusCode!==201&&f.statusCode>=300)return i(f,h);let w=Y({$metadata:Z(f),[Eh]:[,f.headers[Of]]}),s=j(g(await _.parseXmlBody(f.body,h)),"body");if(s[$0]!=null)w[$0]=e1(s[$0],h);if(s[eC]!=null)w[eC]=Bk(s[eC],h);return w},fq=async(f,h)=>{if(f.statusCode!==201&&f.statusCode>=300)return i(f,h);let w=Y({$metadata:Z(f),[Eh]:[,f.headers[Of]]}),s=j(g(await _.parseXmlBody(f.body,h)),"body");if(s[mh]!=null)w[mh]=q8(s[mh],h);return w},hq=async(f,h)=>{if(f.statusCode!==201&&f.statusCode>=300)return i(f,h);let w=Y({$metadata:Z(f),[Eh]:[,f.headers[Of]]}),s=j(g(await _.parseXmlBody(f.body,h)),"body");if(s[M1]!=null)w[M1]=or(s[M1],h);return w},wq=async(f,h)=>{if(f.statusCode!==201&&f.statusCode>=300)return i(f,h);let w=Y({$metadata:Z(f),[Eh]:[,f.headers[Of]]}),s=j(g(await _.parseXmlBody(f.body,h)),"body");if(s[Q1]!=null)w[Q1]=pr(s[Q1],h);return w},sq=async(f,h)=>{if(f.statusCode!==201&&f.statusCode>=300)return i(f,h);let w=Y({$metadata:Z(f),[Eh]:[,f.headers[Of]]}),s=j(g(await _.parseXmlBody(f.body,h)),"body");if(s[W1]!=null)w[W1]=MT(s[W1],h);return w},$q=async(f,h)=>{if(f.statusCode!==201&&f.statusCode>=300)return i(f,h);let w=Y({$metadata:Z(f),[Eh]:[,f.headers[Of]]}),s=j(g(await _.parseXmlBody(f.body,h)),"body");if(s[Q1]!=null)w[Q1]=pr(s[Q1],h);return w},rq=async(f,h)=>{if(f.statusCode!==200&&f.statusCode>=300)return i(f,h);let w=Y({$metadata:Z(f)}),s=j(g(await _.parseXmlBody(f.body,h)),"body");if(s[h0]!=null)w[h0]=A(s[h0]);if(s[P0]!=null)w[P0]=y8(s[P0],h);return w},Eq=async(f,h)=>{if(f.statusCode!==200&&f.statusCode>=300)return i(f,h);let w=Y({$metadata:Z(f)}),s=j(g(await _.parseXmlBody(f.body,h)),"body");if(s[$0]!=null)w[$0]=e1(s[$0],h);return w},Uq=async(f,h)=>{if(f.statusCode!==200&&f.statusCode>=300)return i(f,h);let w=Y({$metadata:Z(f)});return await B1.collectBody(f.body,h),w},Tq=async(f,h)=>{if(f.statusCode!==200&&f.statusCode>=300)return i(f,h);let w=Y({$metadata:Z(f)});return await B1.collectBody(f.body,h),w},Fq=async(f,h)=>{if(f.statusCode!==200&&f.statusCode>=300)return i(f,h);let w=Y({$metadata:Z(f)}),s=j(g(await _.parseXmlBody(f.body,h)),"body");if(s[$0]!=null)w[$0]=e1(s[$0],h);return w},Cq=async(f,h)=>{if(f.statusCode!==200&&f.statusCode>=300)return i(f,h);let w=Y({$metadata:Z(f)}),s=j(g(await _.parseXmlBody(f.body,h)),"body");if(s[$0]!=null)w[$0]=e1(s[$0],h);return w},Iq=async(f,h)=>{if(f.statusCode!==200&&f.statusCode>=300)return i(f,h);let w=Y({$metadata:Z(f)});return await B1.collectBody(f.body,h),w},Lq=async(f,h)=>{if(f.statusCode!==200&&f.statusCode>=300)return i(f,h);let w=Y({$metadata:Z(f)});return await B1.collectBody(f.body,h),w},Bq=async(f,h)=>{if(f.statusCode!==200&&f.statusCode>=300)return i(f,h);let w=Y({$metadata:Z(f)});return await B1.collectBody(f.body,h),w},Aq=async(f,h)=>{if(f.statusCode!==200&&f.statusCode>=300)return i(f,h);let w=Y({$metadata:Z(f)});return await B1.collectBody(f.body,h),w},Gq=async(f,h)=>{if(f.statusCode!==200&&f.statusCode>=300)return i(f,h);let w=Y({$metadata:Z(f)});return await B1.collectBody(f.body,h),w},Wq=async(f,h)=>{if(f.statusCode!==200&&f.statusCode>=300)return i(f,h);let w=Y({$metadata:Z(f)}),s=j(g(await _.parseXmlBody(f.body,h)),"body");if(s[$0]!=null)w[$0]=e1(s[$0],h);return w},zq=async(f,h)=>{if(f.statusCode!==200&&f.statusCode>=300)return i(f,h);let w=Y({$metadata:Z(f)}),s=j(g(await _.parseXmlBody(f.body,h)),"body");if(s[$0]!=null)w[$0]=e1(s[$0],h);return w},Rq=async(f,h)=>{if(f.statusCode!==200&&f.statusCode>=300)return i(f,h);let w=Y({$metadata:Z(f)}),s=j(g(await _.parseXmlBody(f.body,h)),"body");if(s[$0]!=null)w[$0]=e1(s[$0],h);return w},Xq=async(f,h)=>{if(f.statusCode!==200&&f.statusCode>=300)return i(f,h);let w=Y({$metadata:Z(f)}),s=j(g(await _.parseXmlBody(f.body,h)),"body");if(s[hh]!=null)w[hh]=r1(s[hh]);if(s[sh]!=null)w[sh]=zs0(s[sh],h);return w},Sq=async(f,h)=>{if(f.statusCode!==200&&f.statusCode>=300)return i(f,h);let w=Y({$metadata:Z(f)}),s=j(g(await _.parseXmlBody(f.body,h)),"body");if(s[$0]!=null)w[$0]=e1(s[$0],h);return w},Yq=async(f,h)=>{if(f.statusCode!==200&&f.statusCode>=300)return i(f,h);let w=Y({$metadata:Z(f)}),s=j(g(await _.parseXmlBody(f.body,h)),"body");if(s.CheckerIpRanges==="")w[Qr]=[];else if(s[Qr]!=null&&s[Qr][zf]!=null)w[Qr]=Ss0(A0(s[Qr][zf]),h);return w},Mq=async(f,h)=>{if(f.statusCode!==200&&f.statusCode>=300)return i(f,h);let w=Y({$metadata:Z(f)}),s=j(g(await _.parseXmlBody(f.body,h)),"body");if(s.KeySigningKeys==="")w[Nr]=[];else if(s[Nr]!=null&&s[Nr][zf]!=null)w[Nr]=es0(A0(s[Nr][zf]),h);if(s[G1]!=null)w[G1]=ys0(s[G1],h);return w},Qq=async(f,h)=>{if(f.statusCode!==200&&f.statusCode>=300)return i(f,h);let w=Y({$metadata:Z(f)}),s=j(g(await _.parseXmlBody(f.body,h)),"body");if(s[dr]!=null)w[dr]=Ck(s[dr],h);return w},Kq=async(f,h)=>{if(f.statusCode!==200&&f.statusCode>=300)return i(f,h);let w=Y({$metadata:Z(f)}),s=j(g(await _.parseXmlBody(f.body,h)),"body");if(s[Wf]!=null)w[Wf]=ST(s[Wf],h);return w},Zq=async(f,h)=>{if(f.statusCode!==200&&f.statusCode>=300)return i(f,h);let w=Y({$metadata:Z(f)}),s=j(g(await _.parseXmlBody(f.body,h)),"body");if(s[gC]!=null)w[gC]=r1(s[gC]);return w},Jq=async(f,h)=>{if(f.statusCode!==200&&f.statusCode>=300)return i(f,h);let w=Y({$metadata:Z(f)}),s=j(g(await _.parseXmlBody(f.body,h)),"body");if(s.HealthCheckObservations==="")w[Pf]=[];else if(s[Pf]!=null&&s[Pf][zT]!=null)w[Pf]=Ik(A0(s[Pf][zT]),h);return w},Vq=async(f,h)=>{if(f.statusCode!==200&&f.statusCode>=300)return i(f,h);let w=Y({$metadata:Z(f)}),s=j(g(await _.parseXmlBody(f.body,h)),"body");if(s.HealthCheckObservations==="")w[Pf]=[];else if(s[Pf]!=null&&s[Pf][zT]!=null)w[Pf]=Ik(A0(s[Pf][zT]),h);return w},Pq=async(f,h)=>{if(f.statusCode!==200&&f.statusCode>=300)return i(f,h);let w=Y({$metadata:Z(f)}),s=j(g(await _.parseXmlBody(f.body,h)),"body");if(s[M1]!=null)w[M1]=or(s[M1],h);if(s[V1]!=null)w[V1]=YT(s[V1],h);if(s.VPCs==="")w[Nf]=[];else if(s[Nf]!=null&&s[Nf][P0]!=null)w[Nf]=Wk(A0(s[Nf][P0]),h);return w},Hq=async(f,h)=>{if(f.statusCode!==200&&f.statusCode>=300)return i(f,h);let w=Y({$metadata:Z(f)}),s=j(g(await _.parseXmlBody(f.body,h)),"body");if(s[xC]!=null)w[xC]=r1(s[xC]);return w},Nq=async(f,h)=>{if(f.statusCode!==200&&f.statusCode>=300)return i(f,h);let w=Y({$metadata:Z(f)}),s=j(g(await _.parseXmlBody(f.body,h)),"body");if(s[hh]!=null)w[hh]=r1(s[hh]);if(s[sh]!=null)w[sh]=gs0(s[sh],h);return w},Dq=async(f,h)=>{if(f.statusCode!==200&&f.statusCode>=300)return i(f,h);let w=Y({$metadata:Z(f)}),s=j(g(await _.parseXmlBody(f.body,h)),"body");if(s[mh]!=null)w[mh]=q8(s[mh],h);return w},qq=async(f,h)=>{if(f.statusCode!==200&&f.statusCode>=300)return i(f,h);let w=Y({$metadata:Z(f)}),s=j(g(await _.parseXmlBody(f.body,h)),"body");if(s[M1]!=null)w[M1]=or(s[M1],h);return w},kq=async(f,h)=>{if(f.statusCode!==200&&f.statusCode>=300)return i(f,h);let w=Y({$metadata:Z(f)}),s=j(g(await _.parseXmlBody(f.body,h)),"body");if(s[hh]!=null)w[hh]=r1(s[hh]);if(s[sh]!=null)w[sh]=$$0(s[sh],h);return w},yq=async(f,h)=>{if(f.statusCode!==200&&f.statusCode>=300)return i(f,h);let w=Y({$metadata:Z(f)}),s=j(g(await _.parseXmlBody(f.body,h)),"body");if(s[Q1]!=null)w[Q1]=pr(s[Q1],h);return w},jq=async(f,h)=>{if(f.statusCode!==200&&f.statusCode>=300)return i(f,h);let w=Y({$metadata:Z(f)}),s=j(g(await _.parseXmlBody(f.body,h)),"body");if(s[W1]!=null)w[W1]=MT(s[W1],h);return w},Oq=async(f,h)=>{if(f.statusCode!==200&&f.statusCode>=300)return i(f,h);let w=Y({$metadata:Z(f)}),s=j(g(await _.parseXmlBody(f.body,h)),"body");if(s[P8]!=null)w[P8]=M0(s[P8]);return w},lq=async(f,h)=>{if(f.statusCode!==200&&f.statusCode>=300)return i(f,h);let w=Y({$metadata:Z(f)}),s=j(g(await _.parseXmlBody(f.body,h)),"body");if(s.CidrBlocks==="")w[Yr]=[];else if(s[Yr]!=null&&s[Yr][zf]!=null)w[Yr]=Ms0(A0(s[Yr][zf]),h);if(s[k0]!=null)w[k0]=A(s[k0]);return w},vq=async(f,h)=>{if(f.statusCode!==200&&f.statusCode>=300)return i(f,h);let w=Y({$metadata:Z(f)}),s=j(g(await _.parseXmlBody(f.body,h)),"body");if(s.CidrCollections==="")w[Mr]=[];else if(s[Mr]!=null&&s[Mr][zf]!=null)w[Mr]=Vs0(A0(s[Mr][zf]),h);if(s[k0]!=null)w[k0]=A(s[k0]);return w},bq=async(f,h)=>{if(f.statusCode!==200&&f.statusCode>=300)return i(f,h);let w=Y({$metadata:Z(f)}),s=j(g(await _.parseXmlBody(f.body,h)),"body");if(s.CidrLocations==="")w[Kr]=[];else if(s[Kr]!=null&&s[Kr][zf]!=null)w[Kr]=as0(A0(s[Kr][zf]),h);if(s[k0]!=null)w[k0]=A(s[k0]);return w},mq=async(f,h)=>{if(f.statusCode!==200&&f.statusCode>=300)return i(f,h);let w=Y({$metadata:Z(f)}),s=j(g(await _.parseXmlBody(f.body,h)),"body");if(s.GeoLocationDetailsList==="")w[Vr]=[];else if(s[Vr]!=null&&s[Vr][dr]!=null)w[Vr]=ls0(A0(s[Vr][dr]),h);if(s[C0]!=null)w[C0]=e0(s[C0]);if(s[u]!=null)w[u]=M0(s[u]);if(s[tC]!=null)w[tC]=A(s[tC]);if(s[f8]!=null)w[f8]=A(s[f8]);if(s[E8]!=null)w[E8]=A(s[E8]);return w},dq=async(f,h)=>{if(f.statusCode!==200&&f.statusCode>=300)return i(f,h);let w=Y({$metadata:Z(f)}),s=j(g(await _.parseXmlBody(f.body,h)),"body");if(s.HealthChecks==="")w[Pr]=[];else if(s[Pr]!=null&&s[Pr][Wf]!=null)w[Pr]=is0(A0(s[Pr][Wf]),h);if(s[C0]!=null)w[C0]=e0(s[C0]);if(s[x1]!=null)w[x1]=A(s[x1]);if(s[u]!=null)w[u]=M0(s[u]);if(s[$h]!=null)w[$h]=A(s[$h]);return w},iq=async(f,h)=>{if(f.statusCode!==200&&f.statusCode>=300)return i(f,h);let w=Y({$metadata:Z(f)}),s=j(g(await _.parseXmlBody(f.body,h)),"body");if(s.HostedZones==="")w[Hf]=[];else if(s[Hf]!=null&&s[Hf][V1]!=null)w[Hf]=Lk(A0(s[Hf][V1]),h);if(s[C0]!=null)w[C0]=e0(s[C0]);if(s[x1]!=null)w[x1]=A(s[x1]);if(s[u]!=null)w[u]=M0(s[u]);if(s[$h]!=null)w[$h]=A(s[$h]);return w},cq=async(f,h)=>{if(f.statusCode!==200&&f.statusCode>=300)return i(f,h);let w=Y({$metadata:Z(f)}),s=j(g(await _.parseXmlBody(f.body,h)),"body");if(s[Gf]!=null)w[Gf]=A(s[Gf]);if(s[h0]!=null)w[h0]=A(s[h0]);if(s.HostedZones==="")w[Hf]=[];else if(s[Hf]!=null&&s[Hf][V1]!=null)w[Hf]=Lk(A0(s[Hf][V1]),h);if(s[C0]!=null)w[C0]=e0(s[C0]);if(s[u]!=null)w[u]=M0(s[u]);if(s[h8]!=null)w[h8]=A(s[h8]);if(s[w8]!=null)w[w8]=A(s[w8]);return w},gq=async(f,h)=>{if(f.statusCode!==200&&f.statusCode>=300)return i(f,h);let w=Y({$metadata:Z(f)}),s=j(g(await _.parseXmlBody(f.body,h)),"body");if(s.HostedZoneSummaries==="")w[Hr]=[];else if(s[Hr]!=null&&s[Hr][KN]!=null)w[Hr]=_s0(A0(s[Hr][KN]),h);if(s[u]!=null)w[u]=M0(s[u]);if(s[k0]!=null)w[k0]=A(s[k0]);return w},xq=async(f,h)=>{if(f.statusCode!==200&&f.statusCode>=300)return i(f,h);let w=Y({$metadata:Z(f)}),s=j(g(await _.parseXmlBody(f.body,h)),"body");if(s[k0]!=null)w[k0]=A(s[k0]);if(s.QueryLoggingConfigs==="")w[qr]=[];else if(s[qr]!=null&&s[qr][mh]!=null)w[qr]=ps0(A0(s[qr][mh]),h);return w},_q=async(f,h)=>{if(f.statusCode!==200&&f.statusCode>=300)return i(f,h);let w=Y({$metadata:Z(f)}),s=j(g(await _.parseXmlBody(f.body,h)),"body");if(s[C0]!=null)w[C0]=e0(s[C0]);if(s[u]!=null)w[u]=M0(s[u]);if(s[s8]!=null)w[s8]=A(s[s8]);if(s[$8]!=null)w[$8]=A(s[$8]);if(s[r8]!=null)w[r8]=A(s[r8]);if(s.ResourceRecordSets==="")w[yr]=[];else if(s[yr]!=null&&s[yr][A$]!=null)w[yr]=w$0(A0(s[yr][A$]),h);return w},nq=async(f,h)=>{if(f.statusCode!==200&&f.statusCode>=300)return i(f,h);let w=Y({$metadata:Z(f)}),s=j(g(await _.parseXmlBody(f.body,h)),"body");if(s.DelegationSets==="")w[Zr]=[];else if(s[Zr]!=null&&s[Zr][M1]!=null)w[Zr]=Ds0(A0(s[Zr][M1]),h);if(s[C0]!=null)w[C0]=e0(s[C0]);if(s[x1]!=null)w[x1]=A(s[x1]);if(s[u]!=null)w[u]=M0(s[u]);if(s[$h]!=null)w[$h]=A(s[$h]);return w},eq=async(f,h)=>{if(f.statusCode!==200&&f.statusCode>=300)return i(f,h);let w=Y({$metadata:Z(f)}),s=j(g(await _.parseXmlBody(f.body,h)),"body");if(s[xr]!=null)w[xr]=Gk(s[xr],h);return w},aq=async(f,h)=>{if(f.statusCode!==200&&f.statusCode>=300)return i(f,h);let w=Y({$metadata:Z(f)}),s=j(g(await _.parseXmlBody(f.body,h)),"body");if(s.ResourceTagSets==="")w[jr]=[];else if(s[jr]!=null&&s[jr][xr]!=null)w[jr]=s$0(A0(s[jr][xr]),h);return w},oq=async(f,h)=>{if(f.statusCode!==200&&f.statusCode>=300)return i(f,h);let w=Y({$metadata:Z(f)}),s=j(g(await _.parseXmlBody(f.body,h)),"body");if(s[C0]!=null)w[C0]=e0(s[C0]);if(s[u]!=null)w[u]=M0(s[u]);if(s[GT]!=null)w[GT]=A(s[GT]);if(s.TrafficPolicySummaries==="")w[Or]=[];else if(s[Or]!=null&&s[Or][PN]!=null)w[Or]=F$0(A0(s[Or][PN]),h);return w},pq=async(f,h)=>{if(f.statusCode!==200&&f.statusCode>=300)return i(f,h);let w=Y({$metadata:Z(f)}),s=j(g(await _.parseXmlBody(f.body,h)),"body");if(s[vh]!=null)w[vh]=A(s[vh]);if(s[C0]!=null)w[C0]=e0(s[C0]);if(s[u]!=null)w[u]=M0(s[u]);if(s[_1]!=null)w[_1]=A(s[_1]);if(s[n1]!=null)w[n1]=A(s[n1]);if(s.TrafficPolicyInstances==="")w[A1]=[];else if(s[A1]!=null&&s[A1][W1]!=null)w[A1]=k8(A0(s[A1][W1]),h);return w},uq=async(f,h)=>{if(f.statusCode!==200&&f.statusCode>=300)return i(f,h);let w=Y({$metadata:Z(f)}),s=j(g(await _.parseXmlBody(f.body,h)),"body");if(s[C0]!=null)w[C0]=e0(s[C0]);if(s[u]!=null)w[u]=M0(s[u]);if(s[_1]!=null)w[_1]=A(s[_1]);if(s[n1]!=null)w[n1]=A(s[n1]);if(s.TrafficPolicyInstances==="")w[A1]=[];else if(s[A1]!=null&&s[A1][W1]!=null)w[A1]=k8(A0(s[A1][W1]),h);return w},tq=async(f,h)=>{if(f.statusCode!==200&&f.statusCode>=300)return i(f,h);let w=Y({$metadata:Z(f)}),s=j(g(await _.parseXmlBody(f.body,h)),"body");if(s[vh]!=null)w[vh]=A(s[vh]);if(s[C0]!=null)w[C0]=e0(s[C0]);if(s[u]!=null)w[u]=M0(s[u]);if(s[_1]!=null)w[_1]=A(s[_1]);if(s[n1]!=null)w[n1]=A(s[n1]);if(s.TrafficPolicyInstances==="")w[A1]=[];else if(s[A1]!=null&&s[A1][W1]!=null)w[A1]=k8(A0(s[A1][W1]),h);return w},fk=async(f,h)=>{if(f.statusCode!==200&&f.statusCode>=300)return i(f,h);let w=Y({$metadata:Z(f)}),s=j(g(await _.parseXmlBody(f.body,h)),"body");if(s[C0]!=null)w[C0]=e0(s[C0]);if(s[u]!=null)w[u]=M0(s[u]);if(s.TrafficPolicies==="")w[lr]=[];else if(s[lr]!=null&&s[lr][Q1]!=null)w[lr]=T$0(A0(s[lr][Q1]),h);if(s[WT]!=null)w[WT]=A(s[WT]);return w},hk=async(f,h)=>{if(f.statusCode!==200&&f.statusCode>=300)return i(f,h);let w=Y({$metadata:Z(f)}),s=j(g(await _.parseXmlBody(f.body,h)),"body");if(s[h0]!=null)w[h0]=A(s[h0]);if(s[k0]!=null)w[k0]=A(s[k0]);if(s.VPCs==="")w[Nf]=[];else if(s[Nf]!=null&&s[Nf][P0]!=null)w[Nf]=Wk(A0(s[Nf][P0]),h);return w},wk=async(f,h)=>{if(f.statusCode!==200&&f.statusCode>=300)return i(f,h);let w=Y({$metadata:Z(f)}),s=j(g(await _.parseXmlBody(f.body,h)),"body");if(s[U8]!=null)w[U8]=A(s[U8]);if(s[A8]!=null)w[A8]=A(s[A8]);if(s.RecordData==="")w[kr]=[];else if(s[kr]!=null&&s[kr][JN]!=null)w[kr]=us0(A0(s[kr][JN]),h);if(s[LT]!=null)w[LT]=A(s[LT]);if(s[BT]!=null)w[BT]=A(s[BT]);if(s[G8]!=null)w[G8]=A(s[G8]);return w},sk=async(f,h)=>{if(f.statusCode!==200&&f.statusCode>=300)return i(f,h);let w=Y({$metadata:Z(f)}),s=j(g(await _.parseXmlBody(f.body,h)),"body");if(s[Wf]!=null)w[Wf]=ST(s[Wf],h);return w},$k=async(f,h)=>{if(f.statusCode!==200&&f.statusCode>=300)return i(f,h);let w=Y({$metadata:Z(f)}),s=j(g(await _.parseXmlBody(f.body,h)),"body");if(s[V1]!=null)w[V1]=YT(s[V1],h);return w},rk=async(f,h)=>{if(f.statusCode!==200&&f.statusCode>=300)return i(f,h);let w=Y({$metadata:Z(f)}),s=j(g(await _.parseXmlBody(f.body,h)),"body");if(s[Q1]!=null)w[Q1]=pr(s[Q1],h);return w},Ek=async(f,h)=>{if(f.statusCode!==200&&f.statusCode>=300)return i(f,h);let w=Y({$metadata:Z(f)}),s=j(g(await _.parseXmlBody(f.body,h)),"body");if(s[W1]!=null)w[W1]=MT(s[W1],h);return w},i=async(f,h)=>{let w={...f,body:await _.parseXmlErrorBody(f.body,h)},s=_.loadRestXmlErrorCode(f,w.body);switch(s){case"ConcurrentModification":case"com.amazonaws.route53#ConcurrentModification":throw await bh0(w,h);case"InvalidInput":case"com.amazonaws.route53#InvalidInput":throw await Uw0(w,h);case"InvalidKMSArn":case"com.amazonaws.route53#InvalidKMSArn":throw await Cw0(w,h);case"InvalidKeySigningKeyStatus":case"com.amazonaws.route53#InvalidKeySigningKeyStatus":throw await Fw0(w,h);case"InvalidSigningStatus":case"com.amazonaws.route53#InvalidSigningStatus":throw await Lw0(w,h);case"NoSuchKeySigningKey":case"com.amazonaws.route53#NoSuchKeySigningKey":throw await Hw0(w,h);case"ConflictingDomainExists":case"com.amazonaws.route53#ConflictingDomainExists":throw await mh0(w,h);case"InvalidVPCId":case"com.amazonaws.route53#InvalidVPCId":throw await Aw0(w,h);case"LimitsExceeded":case"com.amazonaws.route53#LimitsExceeded":throw await Sw0(w,h);case"NoSuchHostedZone":case"com.amazonaws.route53#NoSuchHostedZone":throw await Pw0(w,h);case"NotAuthorizedException":case"com.amazonaws.route53#NotAuthorizedException":throw await kw0(w,h);case"PriorRequestNotComplete":case"com.amazonaws.route53#PriorRequestNotComplete":throw await yw0(w,h);case"PublicZoneVPCAssociation":case"com.amazonaws.route53#PublicZoneVPCAssociation":throw await jw0(w,h);case"CidrBlockInUseException":case"com.amazonaws.route53#CidrBlockInUseException":throw await jh0(w,h);case"CidrCollectionVersionMismatchException":case"com.amazonaws.route53#CidrCollectionVersionMismatchException":throw await vh0(w,h);case"NoSuchCidrCollectionException":case"com.amazonaws.route53#NoSuchCidrCollectionException":throw await Mw0(w,h);case"InvalidChangeBatch":case"com.amazonaws.route53#InvalidChangeBatch":throw await rw0(w,h);case"NoSuchHealthCheck":case"com.amazonaws.route53#NoSuchHealthCheck":throw await Vw0(w,h);case"ThrottlingException":case"com.amazonaws.route53#ThrottlingException":throw await lw0(w,h);case"CidrCollectionAlreadyExistsException":case"com.amazonaws.route53#CidrCollectionAlreadyExistsException":throw await Oh0(w,h);case"HealthCheckAlreadyExists":case"com.amazonaws.route53#HealthCheckAlreadyExists":throw await eh0(w,h);case"TooManyHealthChecks":case"com.amazonaws.route53#TooManyHealthChecks":throw await vw0(w,h);case"DelegationSetNotAvailable":case"com.amazonaws.route53#DelegationSetNotAvailable":throw await xh0(w,h);case"DelegationSetNotReusable":case"com.amazonaws.route53#DelegationSetNotReusable":throw await _h0(w,h);case"HostedZoneAlreadyExists":case"com.amazonaws.route53#HostedZoneAlreadyExists":throw await ph0(w,h);case"InvalidDomainName":case"com.amazonaws.route53#InvalidDomainName":throw await Ew0(w,h);case"NoSuchDelegationSet":case"com.amazonaws.route53#NoSuchDelegationSet":throw await Zw0(w,h);case"TooManyHostedZones":case"com.amazonaws.route53#TooManyHostedZones":throw await bw0(w,h);case"InvalidArgument":case"com.amazonaws.route53#InvalidArgument":throw await $w0(w,h);case"InvalidKeySigningKeyName":case"com.amazonaws.route53#InvalidKeySigningKeyName":throw await Tw0(w,h);case"KeySigningKeyAlreadyExists":case"com.amazonaws.route53#KeySigningKeyAlreadyExists":throw await Gw0(w,h);case"TooManyKeySigningKeys":case"com.amazonaws.route53#TooManyKeySigningKeys":throw await mw0(w,h);case"InsufficientCloudWatchLogsResourcePolicy":case"com.amazonaws.route53#InsufficientCloudWatchLogsResourcePolicy":throw await sw0(w,h);case"NoSuchCloudWatchLogsLogGroup":case"com.amazonaws.route53#NoSuchCloudWatchLogsLogGroup":throw await Kw0(w,h);case"QueryLoggingConfigAlreadyExists":case"com.amazonaws.route53#QueryLoggingConfigAlreadyExists":throw await Ow0(w,h);case"DelegationSetAlreadyCreated":case"com.amazonaws.route53#DelegationSetAlreadyCreated":throw await ih0(w,h);case"DelegationSetAlreadyReusable":case"com.amazonaws.route53#DelegationSetAlreadyReusable":throw await ch0(w,h);case"HostedZoneNotFound":case"com.amazonaws.route53#HostedZoneNotFound":throw await th0(w,h);case"InvalidTrafficPolicyDocument":case"com.amazonaws.route53#InvalidTrafficPolicyDocument":throw await Bw0(w,h);case"TooManyTrafficPolicies":case"com.amazonaws.route53#TooManyTrafficPolicies":throw await dw0(w,h);case"TrafficPolicyAlreadyExists":case"com.amazonaws.route53#TrafficPolicyAlreadyExists":throw await xw0(w,h);case"NoSuchTrafficPolicy":case"com.amazonaws.route53#NoSuchTrafficPolicy":throw await Dw0(w,h);case"TooManyTrafficPolicyInstances":case"com.amazonaws.route53#TooManyTrafficPolicyInstances":throw await iw0(w,h);case"TrafficPolicyInstanceAlreadyExists":case"com.amazonaws.route53#TrafficPolicyInstanceAlreadyExists":throw await _w0(w,h);case"TooManyTrafficPolicyVersionsForCurrentPolicy":case"com.amazonaws.route53#TooManyTrafficPolicyVersionsForCurrentPolicy":throw await cw0(w,h);case"TooManyVPCAssociationAuthorizations":case"com.amazonaws.route53#TooManyVPCAssociationAuthorizations":throw await gw0(w,h);case"KeySigningKeyInParentDSRecord":case"com.amazonaws.route53#KeySigningKeyInParentDSRecord":throw await Ww0(w,h);case"KeySigningKeyInUse":case"com.amazonaws.route53#KeySigningKeyInUse":throw await zw0(w,h);case"CidrCollectionInUseException":case"com.amazonaws.route53#CidrCollectionInUseException":throw await lh0(w,h);case"HealthCheckInUse":case"com.amazonaws.route53#HealthCheckInUse":throw await ah0(w,h);case"HostedZoneNotEmpty":case"com.amazonaws.route53#HostedZoneNotEmpty":throw await uh0(w,h);case"NoSuchQueryLoggingConfig":case"com.amazonaws.route53#NoSuchQueryLoggingConfig":throw await Nw0(w,h);case"DelegationSetInUse":case"com.amazonaws.route53#DelegationSetInUse":throw await gh0(w,h);case"TrafficPolicyInUse":case"com.amazonaws.route53#TrafficPolicyInUse":throw await nw0(w,h);case"NoSuchTrafficPolicyInstance":case"com.amazonaws.route53#NoSuchTrafficPolicyInstance":throw await qw0(w,h);case"VPCAssociationAuthorizationNotFound":case"com.amazonaws.route53#VPCAssociationAuthorizationNotFound":throw await ew0(w,h);case"DNSSECNotFound":case"com.amazonaws.route53#DNSSECNotFound":throw await nh0(w,h);case"LastVPCAssociation":case"com.amazonaws.route53#LastVPCAssociation":throw await Xw0(w,h);case"VPCAssociationNotFound":case"com.amazonaws.route53#VPCAssociationNotFound":throw await aw0(w,h);case"HostedZonePartiallyDelegated":case"com.amazonaws.route53#HostedZonePartiallyDelegated":throw await hw0(w,h);case"KeySigningKeyWithActiveStatusNotFound":case"com.amazonaws.route53#KeySigningKeyWithActiveStatusNotFound":throw await Rw0(w,h);case"NoSuchChange":case"com.amazonaws.route53#NoSuchChange":throw await Yw0(w,h);case"NoSuchGeoLocation":case"com.amazonaws.route53#NoSuchGeoLocation":throw await Jw0(w,h);case"IncompatibleVersion":case"com.amazonaws.route53#IncompatibleVersion":throw await ww0(w,h);case"HostedZoneNotPrivate":case"com.amazonaws.route53#HostedZoneNotPrivate":throw await fw0(w,h);case"NoSuchCidrLocationException":case"com.amazonaws.route53#NoSuchCidrLocationException":throw await Qw0(w,h);case"InvalidPaginationToken":case"com.amazonaws.route53#InvalidPaginationToken":throw await Iw0(w,h);case"HealthCheckVersionMismatch":case"com.amazonaws.route53#HealthCheckVersionMismatch":throw await oh0(w,h);case"ConflictingTypes":case"com.amazonaws.route53#ConflictingTypes":throw await dh0(w,h);default:let $=w.body;return yh0({output:f,parsedBody:$.Error,errorCode:s})}},yh0=Ts(m),jh0=async(f,h)=>{let w=Y({}),s=f.body.Error;if(s[v0]!=null)w[v0]=A(s[v0]);let $=new f5({$metadata:Z(f),...w});return l($,f.body.Error)},Oh0=async(f,h)=>{let w=Y({}),s=f.body.Error;if(s[v0]!=null)w[v0]=A(s[v0]);let $=new E5({$metadata:Z(f),...w});return l($,f.body.Error)},lh0=async(f,h)=>{let w=Y({}),s=f.body.Error;if(s[v0]!=null)w[v0]=A(s[v0]);let $=new j5({$metadata:Z(f),...w});return l($,f.body.Error)},vh0=async(f,h)=>{let w=Y({}),s=f.body.Error;if(s[v0]!=null)w[v0]=A(s[v0]);let $=new h5({$metadata:Z(f),...w});return l($,f.body.Error)},bh0=async(f,h)=>{let w=Y({}),s=f.body.Error;if(s[S]!=null)w[S]=A(s[S]);let $=new dU({$metadata:Z(f),...w});return l($,f.body.Error)},mh0=async(f,h)=>{let w=Y({}),s=f.body.Error;if(s[S]!=null)w[S]=A(s[S]);let $=new nU({$metadata:Z(f),...w});return l($,f.body.Error)},dh0=async(f,h)=>{let w=Y({}),s=f.body.Error;if(s[S]!=null)w[S]=A(s[S]);let $=new hT({$metadata:Z(f),...w});return l($,f.body.Error)},ih0=async(f,h)=>{let w=Y({}),s=f.body.Error;if(s[S]!=null)w[S]=A(s[S]);let $=new M5({$metadata:Z(f),...w});return l($,f.body.Error)},ch0=async(f,h)=>{let w=Y({}),s=f.body.Error;if(s[S]!=null)w[S]=A(s[S]);let $=new Q5({$metadata:Z(f),...w});return l($,f.body.Error)},gh0=async(f,h)=>{let w=Y({}),s=f.body.Error;if(s[S]!=null)w[S]=A(s[S]);let $=new b5({$metadata:Z(f),...w});return l($,f.body.Error)},xh0=async(f,h)=>{let w=Y({}),s=f.body.Error;if(s[S]!=null)w[S]=A(s[S]);let $=new F5({$metadata:Z(f),...w});return l($,f.body.Error)},_h0=async(f,h)=>{let w=Y({}),s=f.body.Error;if(s[S]!=null)w[S]=A(s[S]);let $=new C5({$metadata:Z(f),...w});return l($,f.body.Error)},nh0=async(f,h)=>{let w=Y({}),s=f.body.Error;if(s[S]!=null)w[S]=A(s[S]);let $=new c5({$metadata:Z(f),...w});return l($,f.body.Error)},eh0=async(f,h)=>{let w=Y({}),s=f.body.Error;if(s[S]!=null)w[S]=A(s[S]);let $=new U5({$metadata:Z(f),...w});return l($,f.body.Error)},ah0=async(f,h)=>{let w=Y({}),s=f.body.Error;if(s[S]!=null)w[S]=A(s[S]);let $=new O5({$metadata:Z(f),...w});return l($,f.body.Error)},oh0=async(f,h)=>{let w=Y({}),s=f.body.Error;if(s[S]!=null)w[S]=A(s[S]);let $=new fT({$metadata:Z(f),...w});return l($,f.body.Error)},ph0=async(f,h)=>{let w=Y({}),s=f.body.Error;if(s[S]!=null)w[S]=A(s[S]);let $=new I5({$metadata:Z(f),...w});return l($,f.body.Error)},uh0=async(f,h)=>{let w=Y({}),s=f.body.Error;if(s[S]!=null)w[S]=A(s[S]);let $=new l5({$metadata:Z(f),...w});return l($,f.body.Error)},th0=async(f,h)=>{let w=Y({}),s=f.body.Error;if(s[S]!=null)w[S]=A(s[S]);let $=new K5({$metadata:Z(f),...w});return l($,f.body.Error)},fw0=async(f,h)=>{let w=Y({}),s=f.body.Error;if(s[S]!=null)w[S]=A(s[S]);let $=new p5({$metadata:Z(f),...w});return l($,f.body.Error)},hw0=async(f,h)=>{let w=Y({}),s=f.body.Error;if(s[S]!=null)w[S]=A(s[S]);let $=new _5({$metadata:Z(f),...w});return l($,f.body.Error)},ww0=async(f,h)=>{let w=Y({}),s=f.body.Error;if(s[S]!=null)w[S]=A(s[S]);let $=new o5({$metadata:Z(f),...w});return l($,f.body.Error)},sw0=async(f,h)=>{let w=Y({}),s=f.body.Error;if(s[S]!=null)w[S]=A(s[S]);let $=new X5({$metadata:Z(f),...w});return l($,f.body.Error)},$w0=async(f,h)=>{let w=Y({}),s=f.body.Error;if(s[S]!=null)w[S]=A(s[S]);let $=new G5({$metadata:Z(f),...w});return l($,f.body.Error)},rw0=async(f,h)=>{let w=Y({}),s=f.body.Error;if(s[S]!=null)w[S]=A(s[S]);if(s.messages==="")w[br]=[];else if(s[br]!=null&&s[br][v0]!=null)w[br]=js0(A0(s[br][v0]),h);let $=new s5({$metadata:Z(f),...w});return l($,f.body.Error)},Ew0=async(f,h)=>{let w=Y({}),s=f.body.Error;if(s[S]!=null)w[S]=A(s[S]);let $=new L5({$metadata:Z(f),...w});return l($,f.body.Error)},Uw0=async(f,h)=>{let w=Y({}),s=f.body.Error;if(s[S]!=null)w[S]=A(s[S]);let $=new iU({$metadata:Z(f),...w});return l($,f.body.Error)},Tw0=async(f,h)=>{let w=Y({}),s=f.body.Error;if(s[S]!=null)w[S]=A(s[S]);let $=new W5({$metadata:Z(f),...w});return l($,f.body.Error)},Fw0=async(f,h)=>{let w=Y({}),s=f.body.Error;if(s[S]!=null)w[S]=A(s[S]);let $=new cU({$metadata:Z(f),...w});return l($,f.body.Error)},Cw0=async(f,h)=>{let w=Y({}),s=f.body.Error;if(s[S]!=null)w[S]=A(s[S]);let $=new gU({$metadata:Z(f),...w});return l($,f.body.Error)},Iw0=async(f,h)=>{let w=Y({}),s=f.body.Error;if(s[S]!=null)w[S]=A(s[S]);let $=new t5({$metadata:Z(f),...w});return l($,f.body.Error)},Lw0=async(f,h)=>{let w=Y({}),s=f.body.Error;if(s[S]!=null)w[S]=A(s[S]);let $=new xU({$metadata:Z(f),...w});return l($,f.body.Error)},Bw0=async(f,h)=>{let w=Y({}),s=f.body.Error;if(s[S]!=null)w[S]=A(s[S]);let $=new Z5({$metadata:Z(f),...w});return l($,f.body.Error)},Aw0=async(f,h)=>{let w=Y({}),s=f.body.Error;if(s[S]!=null)w[S]=A(s[S]);let $=new eU({$metadata:Z(f),...w});return l($,f.body.Error)},Gw0=async(f,h)=>{let w=Y({}),s=f.body.Error;if(s[S]!=null)w[S]=A(s[S]);let $=new z5({$metadata:Z(f),...w});return l($,f.body.Error)},Ww0=async(f,h)=>{let w=Y({}),s=f.body.Error;if(s[S]!=null)w[S]=A(s[S]);let $=new k5({$metadata:Z(f),...w});return l($,f.body.Error)},zw0=async(f,h)=>{let w=Y({}),s=f.body.Error;if(s[S]!=null)w[S]=A(s[S]);let $=new y5({$metadata:Z(f),...w});return l($,f.body.Error)},Rw0=async(f,h)=>{let w=Y({}),s=f.body.Error;if(s[S]!=null)w[S]=A(s[S]);let $=new n5({$metadata:Z(f),...w});return l($,f.body.Error)},Xw0=async(f,h)=>{let w=Y({}),s=f.body.Error;if(s[S]!=null)w[S]=A(s[S]);let $=new g5({$metadata:Z(f),...w});return l($,f.body.Error)},Sw0=async(f,h)=>{let w=Y({}),s=f.body.Error;if(s[S]!=null)w[S]=A(s[S]);let $=new aU({$metadata:Z(f),...w});return l($,f.body.Error)},Yw0=async(f,h)=>{let w=Y({}),s=f.body.Error;if(s[S]!=null)w[S]=A(s[S]);let $=new e5({$metadata:Z(f),...w});return l($,f.body.Error)},Mw0=async(f,h)=>{let w=Y({}),s=f.body.Error;if(s[v0]!=null)w[v0]=A(s[v0]);let $=new w5({$metadata:Z(f),...w});return l($,f.body.Error)},Qw0=async(f,h)=>{let w=Y({}),s=f.body.Error;if(s[v0]!=null)w[v0]=A(s[v0]);let $=new u5({$metadata:Z(f),...w});return l($,f.body.Error)},Kw0=async(f,h)=>{let w=Y({}),s=f.body.Error;if(s[S]!=null)w[S]=A(s[S]);let $=new S5({$metadata:Z(f),...w});return l($,f.body.Error)},Zw0=async(f,h)=>{let w=Y({}),s=f.body.Error;if(s[S]!=null)w[S]=A(s[S]);let $=new B5({$metadata:Z(f),...w});return l($,f.body.Error)},Jw0=async(f,h)=>{let w=Y({}),s=f.body.Error;if(s[S]!=null)w[S]=A(s[S]);let $=new a5({$metadata:Z(f),...w});return l($,f.body.Error)},Vw0=async(f,h)=>{let w=Y({}),s=f.body.Error;if(s[S]!=null)w[S]=A(s[S]);let $=new $5({$metadata:Z(f),...w});return l($,f.body.Error)},Pw0=async(f,h)=>{let w=Y({}),s=f.body.Error;if(s[S]!=null)w[S]=A(s[S]);let $=new oU({$metadata:Z(f),...w});return l($,f.body.Error)},Hw0=async(f,h)=>{let w=Y({}),s=f.body.Error;if(s[S]!=null)w[S]=A(s[S]);let $=new _U({$metadata:Z(f),...w});return l($,f.body.Error)},Nw0=async(f,h)=>{let w=Y({}),s=f.body.Error;if(s[S]!=null)w[S]=A(s[S]);let $=new v5({$metadata:Z(f),...w});return l($,f.body.Error)},Dw0=async(f,h)=>{let w=Y({}),s=f.body.Error;if(s[S]!=null)w[S]=A(s[S]);let $=new P5({$metadata:Z(f),...w});return l($,f.body.Error)},qw0=async(f,h)=>{let w=Y({}),s=f.body.Error;if(s[S]!=null)w[S]=A(s[S]);let $=new d5({$metadata:Z(f),...w});return l($,f.body.Error)},kw0=async(f,h)=>{let w=Y({}),s=f.body.Error;if(s[S]!=null)w[S]=A(s[S]);let $=new pU({$metadata:Z(f),...w});return l($,f.body.Error)},yw0=async(f,h)=>{let w=Y({}),s=f.body.Error;if(s[S]!=null)w[S]=A(s[S]);let $=new uU({$metadata:Z(f),...w});return l($,f.body.Error)},jw0=async(f,h)=>{let w=Y({}),s=f.body.Error;if(s[S]!=null)w[S]=A(s[S]);let $=new tU({$metadata:Z(f),...w});return l($,f.body.Error)},Ow0=async(f,h)=>{let w=Y({}),s=f.body.Error;if(s[S]!=null)w[S]=A(s[S]);let $=new Y5({$metadata:Z(f),...w});return l($,f.body.Error)},lw0=async(f,h)=>{let w=Y({}),s=f.body.Error;if(s[S]!=null)w[S]=A(s[S]);let $=new r5({$metadata:Z(f),...w});return l($,f.body.Error)},vw0=async(f,h)=>{let w=Y({}),s=f.body.Error;if(s[S]!=null)w[S]=A(s[S]);let $=new T5({$metadata:Z(f),...w});return l($,f.body.Error)},bw0=async(f,h)=>{let w=Y({}),s=f.body.Error;if(s[S]!=null)w[S]=A(s[S]);let $=new A5({$metadata:Z(f),...w});return l($,f.body.Error)},mw0=async(f,h)=>{let w=Y({}),s=f.body.Error;if(s[S]!=null)w[S]=A(s[S]);let $=new R5({$metadata:Z(f),...w});return l($,f.body.Error)},dw0=async(f,h)=>{let w=Y({}),s=f.body.Error;if(s[S]!=null)w[S]=A(s[S]);let $=new J5({$metadata:Z(f),...w});return l($,f.body.Error)},iw0=async(f,h)=>{let w=Y({}),s=f.body.Error;if(s[S]!=null)w[S]=A(s[S]);let $=new H5({$metadata:Z(f),...w});return l($,f.body.Error)},cw0=async(f,h)=>{let w=Y({}),s=f.body.Error;if(s[S]!=null)w[S]=A(s[S]);let $=new D5({$metadata:Z(f),...w});return l($,f.body.Error)},gw0=async(f,h)=>{let w=Y({}),s=f.body.Error;if(s[S]!=null)w[S]=A(s[S]);let $=new q5({$metadata:Z(f),...w});return l($,f.body.Error)},xw0=async(f,h)=>{let w=Y({}),s=f.body.Error;if(s[S]!=null)w[S]=A(s[S]);let $=new V5({$metadata:Z(f),...w});return l($,f.body.Error)},_w0=async(f,h)=>{let w=Y({}),s=f.body.Error;if(s[S]!=null)w[S]=A(s[S]);let $=new N5({$metadata:Z(f),...w});return l($,f.body.Error)},nw0=async(f,h)=>{let w=Y({}),s=f.body.Error;if(s[S]!=null)w[S]=A(s[S]);let $=new m5({$metadata:Z(f),...w});return l($,f.body.Error)},ew0=async(f,h)=>{let w=Y({}),s=f.body.Error;if(s[S]!=null)w[S]=A(s[S]);let $=new i5({$metadata:Z(f),...w});return l($,f.body.Error)},aw0=async(f,h)=>{let w=Y({}),s=f.body.Error;if(s[S]!=null)w[S]=A(s[S]);let $=new x5({$metadata:Z(f),...w});return l($,f.body.Error)},Uk=(f,h)=>{let w=new P(Df);if(f[u0]!=null)w.c(P.of(l$0,f[u0]).n(u0));if(f[o]!=null)w.c(P.of(L$0,f[o]).n(o));return w},ow0=(f,h)=>{let w=new P(Rw);if(f[h0]!=null)w.c(P.of(yf,f[h0]).n(h0));if(w.cc(f,Gf),f[F$]!=null)w.c(P.of(I$0,String(f[F$])).n(F$));return w},pw0=(f,h)=>{let w=new P(Rk);if(f[E$]!=null)w.c(P.of(W$0,f[E$]).n(E$));if(f[A$]!=null)w.c(Ls0(f[A$],h).n(A$));return w},uw0=(f,h)=>{let w=new P($T);if(f[F0]!=null)w.c(P.of(O8,f[F0]).n(F0));return w.lc(f,"Changes","Changes",()=>tw0(f[zk],h)),w},tw0=(f,h)=>{return f.filter((w)=>w!=null).map((w)=>{return pw0(w,h).n(Rk)})},Tk=(f,h)=>{return f.filter((w)=>w!=null).map((w)=>{return P.of(ir,w).n(D8)})},fs0=(f,h)=>{let w=new P(z$0);if(f[U1]!=null)w.c(P.of(Z$0,f[U1]).n(U1));if(f[E$]!=null)w.c(P.of(R$0,f[E$]).n(E$));return w.lc(f,"CidrList","CidrList",()=>ws0(f[J$0],h)),w},hs0=(f,h)=>{return f.filter((w)=>w!=null).map((w)=>{return fs0(w,h).n(zf)})},ws0=(f,h)=>{return f.filter((w)=>w!=null).map((w)=>{return P.of(MN,w).n(MN)})},ss0=(f,h)=>{let w=new P(Xw);if(f[T$]!=null)w.c(P.of(Zr0,f[T$]).n(T$));if(f[U1]!=null)w.c(P.of(K$0,f[U1]).n(U1));return w},$s0=(f,h)=>{let w=new P(Sw);return w.cc(f,FT),w.cc(f,CT),w},rs0=(f,h)=>{let w=new P(Yw);if(f[qf]!=null)w.c(P.of(c$0,f[qf]).n(qf));if(f[kf]!=null)w.c(P.of(g$0,f[kf]).n(kf));if(f[jf]!=null)w.c(P.of(x$0,f[jf]).n(jf));return w},Es0=(f,h)=>{let w=new P(Mw);if(w.cc(f,sT),w.cc(f,TT),f[Sw]!=null)w.c($s0(f[Sw],h).n(Sw));if(f[Aw]!=null)w.c(P.of(Aw,String(f[Aw])).n(Aw));return w},Us0=(f,h)=>{let w=new P(Qw);if(w.cc(f,bh),f[Af]!=null)w.c(P.of(Af,String(f[Af])).n(Af));if(f[Z0]!=null)w.c(P.of(e$0,f[Z0]).n(Z0));if(w.cc(f,gr),w.cc(f,mr),w.cc(f,_r),f[zw]!=null)w.c(P.of(zw,String(f[zw])).n(zw));if(f[If]!=null)w.c(P.of(If,String(f[If])).n(If));if(f[Ww]!=null)w.c(P.of(Ww,String(f[Ww])).n(Ww));if(f[Bf]!=null)w.c(P.of(Bf,String(f[Bf])).n(Bf));if(f[Ff]!=null)w.c(P.of(Ff,String(f[Ff])).n(Ff));if(f[Lf]!=null)w.c(P.of(Lf,String(f[Lf])).n(Lf));if(w.lc(f,"ChildHealthChecks","ChildHealthChecks",()=>Tk(f[Lw],h)),f[Cf]!=null)w.c(P.of(Cf,String(f[Cf])).n(Cf));if(w.lc(f,"Regions","Regions",()=>Fk(f[Bw],h)),f[Df]!=null)w.c(Uk(f[Df],h).n(Df));return w.cc(f,cr),w.cc(f,IT),w},Fk=(f,h)=>{return f.filter((w)=>w!=null).map((w)=>{return P.of(n$0,w).n(u0)})},Ts0=(f,h)=>{let w=new P(UT);if(f[F0]!=null)w.c(P.of(O8,f[F0]).n(F0));if(f[B$]!=null)w.c(P.of(o$0,String(f[B$])).n(B$));return w},Fs0=(f,h)=>{return f.filter((w)=>w!=null).map((w)=>{return P.of(VN,w).n(VN)})},Cs0=(f,h)=>{let w=new P(RT);if(f[y0]!=null)w.c(P.of(u$0,f[y0]).n(y0));return w},Is0=(f,h)=>{return f.filter((w)=>w!=null).map((w)=>{return Cs0(w,h).n(RT)})},Ls0=(f,h)=>{let w=new P(A$);if(f[o]!=null)w.c(P.of(Gf,f[o]).n(o));if(f[Z0]!=null)w.c(P.of(Ur0,f[Z0]).n(Z0));if(f[G$]!=null)w.c(P.of(sr0,f[G$]).n(G$));if(f[R$]!=null)w.c(P.of(Er0,String(f[R$])).n(R$));if(f[u0]!=null)w.c(P.of(rr0,f[u0]).n(u0));if(f[Yw]!=null)w.c(rs0(f[Yw],h).n(Yw));if(f[C$]!=null)w.c(P.of(wr0,f[C$]).n(C$));if(f[L$]!=null)w.c(P.of($r0,String(f[L$])).n(L$));if(f[p0]!=null)w.c(P.of(p0,String(f[p0])).n(p0));if(w.lc(f,"ResourceRecords","ResourceRecords",()=>Is0(f[r$],h)),f[Rw]!=null)w.c(ow0(f[Rw],h).n(Rw));if(w.cc(f,ir),w.cc(f,AT),f[Xw]!=null)w.c(ss0(f[Xw],h).n(Xw));if(f[Mw]!=null)w.c(Es0(f[Mw],h).n(Mw));return w},Bs0=(f,h)=>{let w=new P(XT);if(f[Kw]!=null)w.c(P.of(Xk,f[Kw]).n(Kw));if(f[y0]!=null)w.c(P.of(Sr0,f[y0]).n(y0));return w},As0=(f,h)=>{return f.filter((w)=>w!=null).map((w)=>{return P.of(Xk,w).n(Kw)})},Gs0=(f,h)=>{return f.filter((w)=>w!=null).map((w)=>{return Bs0(w,h).n(XT)})},Ws0=(f,h)=>{return f.filter((w)=>w!=null).map((w)=>{return P.of(Xr0,w).n(yf)})},ar=(f,h)=>{let w=new P(P0);return w.cc(f,er),w.cc(f,nr),w},zs0=(f,h)=>{let w={};if(f[Z0]!=null)w[Z0]=A(f[Z0]);if(f[y0]!=null)w[y0]=r1(f[y0]);return w},Rs0=(f,h)=>{let w={};if(f[u0]!=null)w[u0]=A(f[u0]);if(f[o]!=null)w[o]=A(f[o]);return w},Xs0=(f,h)=>{let w={};if(f[h0]!=null)w[h0]=A(f[h0]);if(f[Gf]!=null)w[Gf]=A(f[Gf]);if(f[F$]!=null)w[F$]=e0(f[F$]);return w},e1=(f,h)=>{let w={};if(f[I0]!=null)w[I0]=A(f[I0]);if(f[G1]!=null)w[G1]=A(f[G1]);if(f[R8]!=null)w[R8]=j(a$(f[R8]));if(f[F0]!=null)w[F0]=A(f[F0]);return w},Ss0=(f,h)=>{return(f||[]).filter((w)=>w!=null).map((w)=>{return A(w)})},Ys0=(f,h)=>{return(f||[]).filter((w)=>w!=null).map((w)=>{return A(w)})},Ms0=(f,h)=>{return(f||[]).filter((w)=>w!=null).map((w)=>{return Qs0(w,h)})},Qs0=(f,h)=>{let w={};if(f[VC]!=null)w[VC]=A(f[VC]);if(f[U1]!=null)w[U1]=A(f[U1]);return w},Ks0=(f,h)=>{let w={};if(f[U$]!=null)w[U$]=A(f[U$]);if(f[I0]!=null)w[I0]=A(f[I0]);if(f[o]!=null)w[o]=A(f[o]);if(f[rh]!=null)w[rh]=r1(f[rh]);return w},Zs0=(f,h)=>{let w={};if(f[T$]!=null)w[T$]=A(f[T$]);if(f[U1]!=null)w[U1]=A(f[U1]);return w},Js0=(f,h)=>{let w={};if(f[iC]!=null)w[iC]=M0(f[iC]);if(f[N8]!=null)w[N8]=bS(f[N8]);if(f[DC]!=null)w[DC]=A(f[DC]);if(f[B8]!=null)w[B8]=M0(f[B8]);if(f[uC]!=null)w[uC]=A(f[uC]);if(f[T8]!=null)w[T8]=A(f[T8]);if(f[Z8]!=null)w[Z8]=A(f[Z8]);if(f.Dimensions==="")w[Jr]=[];else if(f[Jr]!=null&&f[Jr][QN]!=null)w[Jr]=ks0(A0(f[Jr][QN]),h);return w},Vs0=(f,h)=>{return(f||[]).filter((w)=>w!=null).map((w)=>{return Ps0(w,h)})},Ps0=(f,h)=>{let w={};if(f[U$]!=null)w[U$]=A(f[U$]);if(f[I0]!=null)w[I0]=A(f[I0]);if(f[o]!=null)w[o]=A(f[o]);if(f[rh]!=null)w[rh]=r1(f[rh]);return w},Hs0=(f,h)=>{let w={};if(f[FT]!=null)w[FT]=A(f[FT]);if(f[CT]!=null)w[CT]=A(f[CT]);return w},or=(f,h)=>{let w={};if(f[I0]!=null)w[I0]=A(f[I0]);if(f[q0]!=null)w[q0]=A(f[q0]);if(f.NameServers==="")w[Dr]=[];else if(f[Dr]!=null&&f[Dr][ZN]!=null)w[Dr]=Ns0(A0(f[Dr][ZN]),h);return w},Ns0=(f,h)=>{return(f||[]).filter((w)=>w!=null).map((w)=>{return A(w)})},Ds0=(f,h)=>{return(f||[]).filter((w)=>w!=null).map((w)=>{return or(w,h)})},qs0=(f,h)=>{let w={};if(f[o]!=null)w[o]=A(f[o]);if(f[y0]!=null)w[y0]=A(f[y0]);return w},ks0=(f,h)=>{return(f||[]).filter((w)=>w!=null).map((w)=>{return qs0(w,h)})},ys0=(f,h)=>{let w={};if(f[K8]!=null)w[K8]=A(f[K8]);if(f[W$]!=null)w[W$]=A(f[W$]);return w},js0=(f,h)=>{return(f||[]).filter((w)=>w!=null).map((w)=>{return A(w)})},Os0=(f,h)=>{let w={};if(f[qf]!=null)w[qf]=A(f[qf]);if(f[kf]!=null)w[kf]=A(f[kf]);if(f[jf]!=null)w[jf]=A(f[jf]);return w},Ck=(f,h)=>{let w={};if(f[qf]!=null)w[qf]=A(f[qf]);if(f[HC]!=null)w[HC]=A(f[HC]);if(f[kf]!=null)w[kf]=A(f[kf]);if(f[NC]!=null)w[NC]=A(f[NC]);if(f[jf]!=null)w[jf]=A(f[jf]);if(f[Y8]!=null)w[Y8]=A(f[Y8]);return w},ls0=(f,h)=>{return(f||[]).filter((w)=>w!=null).map((w)=>{return Ck(w,h)})},vs0=(f,h)=>{let w={};if(f[sT]!=null)w[sT]=A(f[sT]);if(f[TT]!=null)w[TT]=A(f[TT]);if(f[Sw]!=null)w[Sw]=Hs0(f[Sw],h);if(f[Aw]!=null)w[Aw]=M0(f[Aw]);return w},ST=(f,h)=>{let w={};if(f[I0]!=null)w[I0]=A(f[I0]);if(f[q0]!=null)w[q0]=A(f[q0]);if(f[I$]!=null)w[I$]=Ak(f[I$],h);if(f[Qw]!=null)w[Qw]=bs0(f[Qw],h);if(f[Gw]!=null)w[Gw]=r1(f[Gw]);if(f[kC]!=null)w[kC]=Js0(f[kC],h);return w},bs0=(f,h)=>{let w={};if(f[bh]!=null)w[bh]=A(f[bh]);if(f[Af]!=null)w[Af]=M0(f[Af]);if(f[Z0]!=null)w[Z0]=A(f[Z0]);if(f[gr]!=null)w[gr]=A(f[gr]);if(f[mr]!=null)w[mr]=A(f[mr]);if(f[_r]!=null)w[_r]=A(f[_r]);if(f[zw]!=null)w[zw]=M0(f[zw]);if(f[If]!=null)w[If]=M0(f[If]);if(f[Ww]!=null)w[Ww]=e0(f[Ww]);if(f[Bf]!=null)w[Bf]=e0(f[Bf]);if(f[Ff]!=null)w[Ff]=e0(f[Ff]);if(f[Lf]!=null)w[Lf]=M0(f[Lf]);if(f.ChildHealthChecks==="")w[Lw]=[];else if(f[Lw]!=null&&f[Lw][D8]!=null)w[Lw]=Ys0(A0(f[Lw][D8]),h);if(f[Cf]!=null)w[Cf]=e0(f[Cf]);if(f.Regions==="")w[Bw]=[];else if(f[Bw]!=null&&f[Bw][u0]!=null)w[Bw]=ds0(A0(f[Bw][u0]),h);if(f[Df]!=null)w[Df]=Rs0(f[Df],h);if(f[cr]!=null)w[cr]=A(f[cr]);if(f[IT]!=null)w[IT]=A(f[IT]);return w},ms0=(f,h)=>{let w={};if(f[u0]!=null)w[u0]=A(f[u0]);if(f[bh]!=null)w[bh]=A(f[bh]);if(f[Q8]!=null)w[Q8]=r$0(f[Q8],h);return w},Ik=(f,h)=>{return(f||[]).filter((w)=>w!=null).map((w)=>{return ms0(w,h)})},ds0=(f,h)=>{return(f||[]).filter((w)=>w!=null).map((w)=>{return A(w)})},is0=(f,h)=>{return(f||[]).filter((w)=>w!=null).map((w)=>{return ST(w,h)})},YT=(f,h)=>{let w={};if(f[I0]!=null)w[I0]=A(f[I0]);if(f[o]!=null)w[o]=A(f[o]);if(f[q0]!=null)w[q0]=A(f[q0]);if(f[jC]!=null)w[jC]=cs0(f[jC],h);if(f[W8]!=null)w[W8]=r1(f[W8]);if(f[I$]!=null)w[I$]=Ak(f[I$],h);return w},cs0=(f,h)=>{let w={};if(f[F0]!=null)w[F0]=A(f[F0]);if(f[B$]!=null)w[B$]=e0(f[B$]);return w},gs0=(f,h)=>{let w={};if(f[Z0]!=null)w[Z0]=A(f[Z0]);if(f[y0]!=null)w[y0]=r1(f[y0]);return w},xs0=(f,h)=>{let w={};if(f[C8]!=null)w[C8]=A(f[C8]);if(f[I8]!=null)w[I8]=A(f[I8]);return w},Lk=(f,h)=>{return(f||[]).filter((w)=>w!=null).map((w)=>{return YT(w,h)})},_s0=(f,h)=>{return(f||[]).filter((w)=>w!=null).map((w)=>{return ns0(w,h)})},ns0=(f,h)=>{let w={};if(f[h0]!=null)w[h0]=A(f[h0]);if(f[o]!=null)w[o]=A(f[o]);if(f[F8]!=null)w[F8]=xs0(f[F8],h);return w},Bk=(f,h)=>{let w={};if(f[o]!=null)w[o]=A(f[o]);if(f[_C]!=null)w[_C]=A(f[_C]);if(f[cC]!=null)w[cC]=M0(f[cC]);if(f[X8]!=null)w[X8]=A(f[X8]);if(f[S8]!=null)w[S8]=M0(f[S8]);if(f[OC]!=null)w[OC]=A(f[OC]);if(f[lC]!=null)w[lC]=M0(f[lC]);if(f[aC]!=null)w[aC]=M0(f[aC]);if(f[mC]!=null)w[mC]=A(f[mC]);if(f[L8]!=null)w[L8]=A(f[L8]);if(f[bC]!=null)w[bC]=A(f[bC]);if(f[vC]!=null)w[vC]=A(f[vC]);if(f[G1]!=null)w[G1]=A(f[G1]);if(f[W$]!=null)w[W$]=A(f[W$]);if(f[PC]!=null)w[PC]=j(a$(f[PC]));if(f[oC]!=null)w[oC]=j(a$(f[oC]));return w},es0=(f,h)=>{return(f||[]).filter((w)=>w!=null).map((w)=>{return Bk(w,h)})},Ak=(f,h)=>{let w={};if(f[M8]!=null)w[M8]=A(f[M8]);if(f[dC]!=null)w[dC]=A(f[dC]);return w},as0=(f,h)=>{return(f||[]).filter((w)=>w!=null).map((w)=>{return os0(w,h)})},os0=(f,h)=>{let w={};if(f[U1]!=null)w[U1]=A(f[U1]);return w},q8=(f,h)=>{let w={};if(f[I0]!=null)w[I0]=A(f[I0]);if(f[h0]!=null)w[h0]=A(f[h0]);if(f[rT]!=null)w[rT]=A(f[rT]);return w},ps0=(f,h)=>{return(f||[]).filter((w)=>w!=null).map((w)=>{return q8(w,h)})},us0=(f,h)=>{return(f||[]).filter((w)=>w!=null).map((w)=>{return A(w)})},ts0=(f,h)=>{let w={};if(f[y0]!=null)w[y0]=A(f[y0]);return w},f$0=(f,h)=>{return(f||[]).filter((w)=>w!=null).map((w)=>{return ts0(w,h)})},h$0=(f,h)=>{let w={};if(f[o]!=null)w[o]=A(f[o]);if(f[Z0]!=null)w[Z0]=A(f[Z0]);if(f[G$]!=null)w[G$]=A(f[G$]);if(f[R$]!=null)w[R$]=r1(f[R$]);if(f[u0]!=null)w[u0]=A(f[u0]);if(f[Yw]!=null)w[Yw]=Os0(f[Yw],h);if(f[C$]!=null)w[C$]=A(f[C$]);if(f[L$]!=null)w[L$]=e0(f[L$]);if(f[p0]!=null)w[p0]=r1(f[p0]);if(f.ResourceRecords==="")w[r$]=[];else if(f[r$]!=null&&f[r$][RT]!=null)w[r$]=f$0(A0(f[r$][RT]),h);if(f[Rw]!=null)w[Rw]=Xs0(f[Rw],h);if(f[ir]!=null)w[ir]=A(f[ir]);if(f[AT]!=null)w[AT]=A(f[AT]);if(f[Xw]!=null)w[Xw]=Zs0(f[Xw],h);if(f[Mw]!=null)w[Mw]=vs0(f[Mw],h);return w},w$0=(f,h)=>{return(f||[]).filter((w)=>w!=null).map((w)=>{return h$0(w,h)})},Gk=(f,h)=>{let w={};if(f[z8]!=null)w[z8]=A(f[z8]);if(f[yf]!=null)w[yf]=A(f[yf]);if(f.Tags==="")w[vr]=[];else if(f[vr]!=null&&f[vr][XT]!=null)w[vr]=U$0(A0(f[vr][XT]),h);return w},s$0=(f,h)=>{return(f||[]).filter((w)=>w!=null).map((w)=>{return Gk(w,h)})},$$0=(f,h)=>{let w={};if(f[Z0]!=null)w[Z0]=A(f[Z0]);if(f[y0]!=null)w[y0]=r1(f[y0]);return w},r$0=(f,h)=>{let w={};if(f[G1]!=null)w[G1]=A(f[G1]);if(f[qC]!=null)w[qC]=j(a$(f[qC]));return w},E$0=(f,h)=>{let w={};if(f[Kw]!=null)w[Kw]=A(f[Kw]);if(f[y0]!=null)w[y0]=A(f[y0]);return w},U$0=(f,h)=>{return(f||[]).filter((w)=>w!=null).map((w)=>{return E$0(w,h)})},T$0=(f,h)=>{return(f||[]).filter((w)=>w!=null).map((w)=>{return pr(w,h)})},pr=(f,h)=>{let w={};if(f[I0]!=null)w[I0]=A(f[I0]);if(f[rh]!=null)w[rh]=M0(f[rh]);if(f[o]!=null)w[o]=A(f[o]);if(f[Z0]!=null)w[Z0]=A(f[Z0]);if(f[wh]!=null)w[wh]=A(f[wh]);if(f[F0]!=null)w[F0]=A(f[F0]);return w},MT=(f,h)=>{let w={};if(f[I0]!=null)w[I0]=A(f[I0]);if(f[h0]!=null)w[h0]=A(f[h0]);if(f[o]!=null)w[o]=A(f[o]);if(f[p0]!=null)w[p0]=r1(f[p0]);if(f[J8]!=null)w[J8]=A(f[J8]);if(f[v0]!=null)w[v0]=A(f[v0]);if(f[z$]!=null)w[z$]=A(f[z$]);if(f[g1]!=null)w[g1]=M0(f[g1]);if(f[H8]!=null)w[H8]=A(f[H8]);return w},k8=(f,h)=>{return(f||[]).filter((w)=>w!=null).map((w)=>{return MT(w,h)})},F$0=(f,h)=>{return(f||[]).filter((w)=>w!=null).map((w)=>{return C$0(w,h)})},C$0=(f,h)=>{let w={};if(f[I0]!=null)w[I0]=A(f[I0]);if(f[o]!=null)w[o]=A(f[o]);if(f[Z0]!=null)w[Z0]=A(f[Z0]);if(f[pC]!=null)w[pC]=M0(f[pC]);if(f[V8]!=null)w[V8]=M0(f[V8]);return w},y8=(f,h)=>{let w={};if(f[er]!=null)w[er]=A(f[er]);if(f[nr]!=null)w[nr]=A(f[nr]);return w},Wk=(f,h)=>{return(f||[]).filter((w)=>w!=null).map((w)=>{return y8(w,h)})},Z=(f)=>({httpStatusCode:f.statusCode,requestId:f.headers["x-amzn-requestid"]??f.headers["x-amzn-request-id"]??f.headers["x-amz-request-id"],extendedRequestId:f.headers["x-amz-id-2"],cfId:f.headers["x-amz-cf-id"]});var E$="Action",I$0="AliasHealthEnabled",Df="AlarmIdentifier",L$0="AlarmName",B$0="AddTags",Rw="AliasTarget",A$0="AssociateVPCComment",G$0="AssociateVPCWithHostedZoneRequest",sT="AWSRegion",U$="Arn",Aw="Bias",F0="Comment",W$0="ChangeAction",$T="ChangeBatch",Yr="CidrBlocks",VC="CidrBlock",qf="ContinentCode",z$0="CidrCollectionChange",R$0="CidrCollectionChangeAction",X$0="ChangeCidrCollectionRequest",S$0="CreateCidrCollectionRequest",Mr="CidrCollections",kf="CountryCode",PC="CreatedDate",Lw="ChildHealthChecks",Y$0="CreateHealthCheckRequest",D8="ChildHealthCheck",M$0="CreateHostedZoneRequest",$0="ChangeInfo",Qr="CheckerIpRanges",T$="CollectionId",Q$0="CreateKeySigningKeyRequest",Kr="CidrLocations",K$0="CidrLocationNameDefaultAllowed",Z$0="CidrLocationNameDefaultNotAllowed",J$0="CidrList",V$0="CidrNonce",P$0="CollectionName",HC="ContinentName",NC="CountryName",DC="ComparisonOperator",H$0="CreateQueryLoggingConfigRequest",q0="CallerReference",Xw="CidrRoutingConfig",N$0="CreateReusableDelegationSetRequest",D$0="ChangeResourceRecordSetsRequest",qC="CheckedTime",q$0="ChangeTagsForResourceRequest",k$0="CreateTrafficPolicyInstanceRequest",y$0="CreateTrafficPolicyRequest",j$0="CreateTrafficPolicyVersionRequest",wT="CollectionVersion",O$0="CreateVPCAssociationAuthorizationRequest",kC="CloudWatchAlarmConfiguration",rT="CloudWatchLogsLogGroupArn",l$0="CloudWatchRegion",zk="Changes",Rk="Change",MN="Cidr",yC="Collection",jC="Config",Sw="Coordinates",hh="Count",wh="Document",OC="DigestAlgorithmMnemonic",lC="DigestAlgorithmType",vC="DNSKEYRecord",Gf="DNSName",M1="DelegationSet",ET="DelegationSetId",bC="DSRecord",Zr="DelegationSets",mC="DigestValue",v$0="DeleteVPCAssociationAuthorizationRequest",b$0="DisassociateVPCComment",m$0="DisassociateVPCFromHostedZoneRequest",dC="Description",Ff="Disabled",Jr="Dimensions",QN="Dimension",d$0="EDNS0ClientSubnetIP",i$0="EDNS0ClientSubnetMask",iC="EvaluationPeriods",Cf="EnableSNI",F$="EvaluateTargetHealth",C$="Failover",mr="FullyQualifiedDomainName",If="FailureThreshold",cC="Flag",Yw="GeoLocation",c$0="GeoLocationContinentCode",g$0="GeoLocationCountryCode",dr="GeoLocationDetails",Vr="GeoLocationDetailsList",x$0="GeoLocationSubdivisionCode",Mw="GeoProximityLocation",Wf="HealthCheck",Qw="HealthCheckConfig",gC="HealthCheckCount",ir="HealthCheckId",_$0="HealthCheckNonce",Pf="HealthCheckObservations",zT="HealthCheckObservation",n$0="HealthCheckRegion",e$0="HealthCheckType",Gw="HealthCheckVersion",Pr="HealthChecks",Lf="HealthThreshold",V1="HostedZone",UT="HostedZoneConfig",xC="HostedZoneCount",h0="HostedZoneId",vh="HostedZoneIdMarker",Hr="HostedZoneSummaries",KN="HostedZoneSummary",a$0="HostedZoneType",Hf="HostedZones",Bf="Inverted",cr="InsufficientDataHealthStatus",bh="IPAddress",o$0="IsPrivateZone",C0="IsTruncated",I0="Id",Kw="Key",_C="KmsArn",nC="KeyManagementServiceArn",eC="KeySigningKey",Nr="KeySigningKeys",aC="KeyTag",Eh="Location",oC="LastModifiedDate",U1="LocationName",I$="LinkedService",p$0="ListTagsForResourcesRequest",pC="LatestVersion",TT="LocalZoneGroup",FT="Latitude",sh="Limit",CT="Longitude",x1="Marker",u="MaxItems",Ww="MeasureLatency",uC="MetricName",ur="MaxResults",L$="MultiValueAnswer",v0="Message",o="Name",tC="NextContinentCode",f8="NextCountryCode",h8="NextDNSName",w8="NextHostedZoneId",$h="NextMarker",s8="NextRecordIdentifier",$8="NextRecordName",r8="NextRecordType",Dr="NameServers",E8="NextSubdivisionCode",ZN="NameServer",k0="NextToken",U8="Nameserver",T8="Namespace",j8="Nonce",F8="Owner",C8="OwningAccount",I8="OwningService",Af="Port",L8="PublicKey",B$="PrivateZone",B8="Period",A8="Protocol",mh="QueryLoggingConfig",qr="QueryLoggingConfigs",Bw="Regions",G8="ResponseCode",IT="RoutingControlArn",O8="ResourceDescription",JN="RecordDataEntry",u$0="RData",kr="RecordData",t$0="ResetElements",VN="ResettableElementName",yf="ResourceId",fr0="ResolverIP",hr0="ResourceIds",zw="RequestInterval",LT="RecordName",gr="ResourcePath",RT="ResourceRecord",yr="ResourceRecordSets",W8="ResourceRecordSetCount",wr0="ResourceRecordSetFailover",sr0="ResourceRecordSetIdentifier",$r0="ResourceRecordSetMultiValueAnswer",rr0="ResourceRecordSetRegion",Er0="ResourceRecordSetWeight",A$="ResourceRecordSet",Ur0="RRType",r$="ResourceRecords",BT="RecordType",Tr0="RemoveTagKeys",xr="ResourceTagSet",jr="ResourceTagSets",z8="ResourceType",u0="Region",G1="Status",R8="SubmittedAt",X8="SigningAlgorithmMnemonic",S8="SigningAlgorithmType",jf="SubdivisionCode",Fr0="StartContinentCode",Cr0="StartCountryCode",G$="SetIdentifier",Ir0="SigningKeyName",Lr0="SigningKeyString",Br0="SigningKeyStatus",W$="StatusMessage",Y8="SubdivisionName",M8="ServicePrincipal",Q8="StatusReport",Ar0="StartRecordIdentifier",Gr0="StartRecordName",Wr0="StartRecordType",_r="SearchString",zr0="StartSubdivisionCode",K8="ServeSignature",Z8="Statistic",J8="State",Z0="Type",Xk="TagKey",Q1="TrafficPolicy",l8="TrafficPolicyComment",V8="TrafficPolicyCount",Sk="TrafficPolicyDocument",z$="TrafficPolicyId",P8="TrafficPolicyInstanceCount",AT="TrafficPolicyInstanceId",GT="TrafficPolicyIdMarker",_1="TrafficPolicyInstanceNameMarker",n1="TrafficPolicyInstanceTypeMarker",W1="TrafficPolicyInstance",A1="TrafficPolicyInstances",Rr0="TrafficPolicyName",Or="TrafficPolicySummaries",PN="TrafficPolicySummary",H8="TrafficPolicyType",g1="TrafficPolicyVersion",WT="TrafficPolicyVersionMarker",lr="TrafficPolicies",Xr0="TagResourceId",p0="TTL",Sr0="TagValue",XT="Tag",vr="Tags",N8="Threshold",Yr0="UpdateHealthCheckRequest",Mr0="UpdateHostedZoneCommentRequest",Qr0="UpdateTrafficPolicyCommentRequest",Kr0="UpdateTrafficPolicyInstanceRequest",Zr0="UUID",y0="Value",P0="VPC",nr="VPCId",er="VPCRegion",Nf="VPCs",rh="Version",R$="Weight",Jr0="continentcode",Vr0="countrycode",Pr0="delegationsetid",Hr0="dnsname",Nr0="edns0clientsubnetip",Dr0="edns0clientsubnetmask",qr0="hostedzonetype",tr="hostedzoneid",kr0="identifier",Yk="id",Of="location",f4="maxresults",a1="maxitems",v8="marker",zf="member",S="message",br="messages",X$="nexttoken",yr0="name",jr0="recordname",Or0="recordtype",lr0="resolverip",vr0="subdivisioncode",br0="startcontinentcode",mr0="startcountrycode",dr0="startsubdivisioncode",ir0="type",cr0="trafficpolicyid",b8="trafficpolicyinstancename",m8="trafficpolicyinstancetype",gr0="trafficpolicyversion",xr0="vpcid",c0='<?xml version="1.0" encoding="UTF-8"?>',_r0="version",nr0="vpcregion";class d8 extends W.classBuilder().ep(K).m(function(f,h,w,s){return[z(w,this.serialize,this.deserialize),R(w,f.getEndpointParameterInstructions()),O(w)]}).s("AWSDnsV20130401","ActivateKeySigningKey",{}).n("Route53Client","ActivateKeySigningKeyCommand").f(void 0,void 0).ser(HN).de(xD).build(){}D();k();J();class i8 extends W.classBuilder().ep(K).m(function(f,h,w,s){return[z(w,this.serialize,this.deserialize),R(w,f.getEndpointParameterInstructions()),O(w)]}).s("AWSDnsV20130401","AssociateVPCWithHostedZone",{}).n("Route53Client","AssociateVPCWithHostedZoneCommand").f(void 0,void 0).ser(NN).de(_D).build(){}D();k();J();class c8 extends W.classBuilder().ep(K).m(function(f,h,w,s){return[z(w,this.serialize,this.deserialize),R(w,f.getEndpointParameterInstructions()),O(w)]}).s("AWSDnsV20130401","ChangeCidrCollection",{}).n("Route53Client","ChangeCidrCollectionCommand").f(void 0,void 0).ser(DN).de(nD).build(){}D();k();J();class g8 extends W.classBuilder().ep(K).m(function(f,h,w,s){return[z(w,this.serialize,this.deserialize),R(w,f.getEndpointParameterInstructions()),XN(w),O(w)]}).s("AWSDnsV20130401","ChangeResourceRecordSets",{}).n("Route53Client","ChangeResourceRecordSetsCommand").f(void 0,void 0).ser(qN).de(eD).build(){}D();k();J();class x8 extends W.classBuilder().ep(K).m(function(f,h,w,s){return[z(w,this.serialize,this.deserialize),R(w,f.getEndpointParameterInstructions())]}).s("AWSDnsV20130401","ChangeTagsForResource",{}).n("Route53Client","ChangeTagsForResourceCommand").f(void 0,void 0).ser(kN).de(aD).build(){}D();k();J();class _8 extends W.classBuilder().ep(K).m(function(f,h,w,s){return[z(w,this.serialize,this.deserialize),R(w,f.getEndpointParameterInstructions())]}).s("AWSDnsV20130401","CreateCidrCollection",{}).n("Route53Client","CreateCidrCollectionCommand").f(void 0,void 0).ser(yN).de(oD).build(){}D();k();J();class n8 extends W.classBuilder().ep(K).m(function(f,h,w,s){return[z(w,this.serialize,this.deserialize),R(w,f.getEndpointParameterInstructions())]}).s("AWSDnsV20130401","CreateHealthCheck",{}).n("Route53Client","CreateHealthCheckCommand").f(void 0,void 0).ser(jN).de(pD).build(){}D();k();J();class e8 extends W.classBuilder().ep(K).m(function(f,h,w,s){return[z(w,this.serialize,this.deserialize),R(w,f.getEndpointParameterInstructions()),O(w)]}).s("AWSDnsV20130401","CreateHostedZone",{}).n("Route53Client","CreateHostedZoneCommand").f(void 0,void 0).ser(ON).de(uD).build(){}D();k();J();class a8 extends W.classBuilder().ep(K).m(function(f,h,w,s){return[z(w,this.serialize,this.deserialize),R(w,f.getEndpointParameterInstructions()),O(w)]}).s("AWSDnsV20130401","CreateKeySigningKey",{}).n("Route53Client","CreateKeySigningKeyCommand").f(void 0,void 0).ser(lN).de(tD).build(){}D();k();J();class o8 extends W.classBuilder().ep(K).m(function(f,h,w,s){return[z(w,this.serialize,this.deserialize),R(w,f.getEndpointParameterInstructions()),O(w)]}).s("AWSDnsV20130401","CreateQueryLoggingConfig",{}).n("Route53Client","CreateQueryLoggingConfigCommand").f(void 0,void 0).ser(vN).de(fq).build(){}D();k();J();class p8 extends W.classBuilder().ep(K).m(function(f,h,w,s){return[z(w,this.serialize,this.deserialize),R(w,f.getEndpointParameterInstructions()),O(w)]}).s("AWSDnsV20130401","CreateReusableDelegationSet",{}).n("Route53Client","CreateReusableDelegationSetCommand").f(void 0,void 0).ser(bN).de(hq).build(){}D();k();J();class u8 extends W.classBuilder().ep(K).m(function(f,h,w,s){return[z(w,this.serialize,this.deserialize),R(w,f.getEndpointParameterInstructions())]}).s("AWSDnsV20130401","CreateTrafficPolicy",{}).n("Route53Client","CreateTrafficPolicyCommand").f(void 0,void 0).ser(mN).de(wq).build(){}D();k();J();class t8 extends W.classBuilder().ep(K).m(function(f,h,w,s){return[z(w,this.serialize,this.deserialize),R(w,f.getEndpointParameterInstructions()),O(w)]}).s("AWSDnsV20130401","CreateTrafficPolicyInstance",{}).n("Route53Client","CreateTrafficPolicyInstanceCommand").f(void 0,void 0).ser(dN).de(sq).build(){}D();k();J();class fI extends W.classBuilder().ep(K).m(function(f,h,w,s){return[z(w,this.serialize,this.deserialize),R(w,f.getEndpointParameterInstructions()),O(w)]}).s("AWSDnsV20130401","CreateTrafficPolicyVersion",{}).n("Route53Client","CreateTrafficPolicyVersionCommand").f(void 0,void 0).ser(iN).de($q).build(){}D();k();J();class hI extends W.classBuilder().ep(K).m(function(f,h,w,s){return[z(w,this.serialize,this.deserialize),R(w,f.getEndpointParameterInstructions()),O(w)]}).s("AWSDnsV20130401","CreateVPCAssociationAuthorization",{}).n("Route53Client","CreateVPCAssociationAuthorizationCommand").f(void 0,void 0).ser(cN).de(rq).build(){}D();k();J();class wI extends W.classBuilder().ep(K).m(function(f,h,w,s){return[z(w,this.serialize,this.deserialize),R(w,f.getEndpointParameterInstructions()),O(w)]}).s("AWSDnsV20130401","DeactivateKeySigningKey",{}).n("Route53Client","DeactivateKeySigningKeyCommand").f(void 0,void 0).ser(gN).de(Eq).build(){}D();k();J();class sI extends W.classBuilder().ep(K).m(function(f,h,w,s){return[z(w,this.serialize,this.deserialize),R(w,f.getEndpointParameterInstructions()),O(w)]}).s("AWSDnsV20130401","DeleteCidrCollection",{}).n("Route53Client","DeleteCidrCollectionCommand").f(void 0,void 0).ser(xN).de(Uq).build(){}D();k();J();class $I extends W.classBuilder().ep(K).m(function(f,h,w,s){return[z(w,this.serialize,this.deserialize),R(w,f.getEndpointParameterInstructions())]}).s("AWSDnsV20130401","DeleteHealthCheck",{}).n("Route53Client","DeleteHealthCheckCommand").f(void 0,void 0).ser(_N).de(Tq).build(){}D();k();J();class rI extends W.classBuilder().ep(K).m(function(f,h,w,s){return[z(w,this.serialize,this.deserialize),R(w,f.getEndpointParameterInstructions()),O(w)]}).s("AWSDnsV20130401","DeleteHostedZone",{}).n("Route53Client","DeleteHostedZoneCommand").f(void 0,void 0).ser(nN).de(Fq).build(){}D();k();J();class EI extends W.classBuilder().ep(K).m(function(f,h,w,s){return[z(w,this.serialize,this.deserialize),R(w,f.getEndpointParameterInstructions()),O(w)]}).s("AWSDnsV20130401","DeleteKeySigningKey",{}).n("Route53Client","DeleteKeySigningKeyCommand").f(void 0,void 0).ser(eN).de(Cq).build(){}D();k();J();class UI extends W.classBuilder().ep(K).m(function(f,h,w,s){return[z(w,this.serialize,this.deserialize),R(w,f.getEndpointParameterInstructions()),O(w)]}).s("AWSDnsV20130401","DeleteQueryLoggingConfig",{}).n("Route53Client","DeleteQueryLoggingConfigCommand").f(void 0,void 0).ser(aN).de(Iq).build(){}D();k();J();class TI extends W.classBuilder().ep(K).m(function(f,h,w,s){return[z(w,this.serialize,this.deserialize),R(w,f.getEndpointParameterInstructions()),O(w)]}).s("AWSDnsV20130401","DeleteReusableDelegationSet",{}).n("Route53Client","DeleteReusableDelegationSetCommand").f(void 0,void 0).ser(oN).de(Lq).build(){}D();k();J();class FI extends W.classBuilder().ep(K).m(function(f,h,w,s){return[z(w,this.serialize,this.deserialize),R(w,f.getEndpointParameterInstructions()),O(w)]}).s("AWSDnsV20130401","DeleteTrafficPolicy",{}).n("Route53Client","DeleteTrafficPolicyCommand").f(void 0,void 0).ser(pN).de(Bq).build(){}D();k();J();class CI extends W.classBuilder().ep(K).m(function(f,h,w,s){return[z(w,this.serialize,this.deserialize),R(w,f.getEndpointParameterInstructions()),O(w)]}).s("AWSDnsV20130401","DeleteTrafficPolicyInstance",{}).n("Route53Client","DeleteTrafficPolicyInstanceCommand").f(void 0,void 0).ser(uN).de(Aq).build(){}D();k();J();class II extends W.classBuilder().ep(K).m(function(f,h,w,s){return[z(w,this.serialize,this.deserialize),R(w,f.getEndpointParameterInstructions()),O(w)]}).s("AWSDnsV20130401","DeleteVPCAssociationAuthorization",{}).n("Route53Client","DeleteVPCAssociationAuthorizationCommand").f(void 0,void 0).ser(tN).de(Gq).build(){}D();k();J();class LI extends W.classBuilder().ep(K).m(function(f,h,w,s){return[z(w,this.serialize,this.deserialize),R(w,f.getEndpointParameterInstructions()),O(w)]}).s("AWSDnsV20130401","DisableHostedZoneDNSSEC",{}).n("Route53Client","DisableHostedZoneDNSSECCommand").f(void 0,void 0).ser(fD).de(Wq).build(){}D();k();J();class BI extends W.classBuilder().ep(K).m(function(f,h,w,s){return[z(w,this.serialize,this.deserialize),R(w,f.getEndpointParameterInstructions()),O(w)]}).s("AWSDnsV20130401","DisassociateVPCFromHostedZone",{}).n("Route53Client","DisassociateVPCFromHostedZoneCommand").f(void 0,void 0).ser(hD).de(zq).build(){}D();k();J();class AI extends W.classBuilder().ep(K).m(function(f,h,w,s){return[z(w,this.serialize,this.deserialize),R(w,f.getEndpointParameterInstructions()),O(w)]}).s("AWSDnsV20130401","EnableHostedZoneDNSSEC",{}).n("Route53Client","EnableHostedZoneDNSSECCommand").f(void 0,void 0).ser(wD).de(Rq).build(){}D();k();J();class GI extends W.classBuilder().ep(K).m(function(f,h,w,s){return[z(w,this.serialize,this.deserialize),R(w,f.getEndpointParameterInstructions())]}).s("AWSDnsV20130401","GetAccountLimit",{}).n("Route53Client","GetAccountLimitCommand").f(void 0,void 0).ser(sD).de(Xq).build(){}D();k();J();class WI extends W.classBuilder().ep(K).m(function(f,h,w,s){return[z(w,this.serialize,this.deserialize),R(w,f.getEndpointParameterInstructions()),O(w)]}).s("AWSDnsV20130401","GetChange",{}).n("Route53Client","GetChangeCommand").f(void 0,void 0).ser($D).de(Sq).build(){}D();k();J();class zI extends W.classBuilder().ep(K).m(function(f,h,w,s){return[z(w,this.serialize,this.deserialize),R(w,f.getEndpointParameterInstructions())]}).s("AWSDnsV20130401","GetCheckerIpRanges",{}).n("Route53Client","GetCheckerIpRangesCommand").f(void 0,void 0).ser(rD).de(Yq).build(){}D();k();J();class RI extends W.classBuilder().ep(K).m(function(f,h,w,s){return[z(w,this.serialize,this.deserialize),R(w,f.getEndpointParameterInstructions()),O(w)]}).s("AWSDnsV20130401","GetDNSSEC",{}).n("Route53Client","GetDNSSECCommand").f(void 0,void 0).ser(ED).de(Mq).build(){}D();k();J();class XI extends W.classBuilder().ep(K).m(function(f,h,w,s){return[z(w,this.serialize,this.deserialize),R(w,f.getEndpointParameterInstructions())]}).s("AWSDnsV20130401","GetGeoLocation",{}).n("Route53Client","GetGeoLocationCommand").f(void 0,void 0).ser(UD).de(Qq).build(){}D();k();J();class SI extends W.classBuilder().ep(K).m(function(f,h,w,s){return[z(w,this.serialize,this.deserialize),R(w,f.getEndpointParameterInstructions())]}).s("AWSDnsV20130401","GetHealthCheck",{}).n("Route53Client","GetHealthCheckCommand").f(void 0,void 0).ser(TD).de(Kq).build(){}D();k();J();class YI extends W.classBuilder().ep(K).m(function(f,h,w,s){return[z(w,this.serialize,this.deserialize),R(w,f.getEndpointParameterInstructions())]}).s("AWSDnsV20130401","GetHealthCheckCount",{}).n("Route53Client","GetHealthCheckCountCommand").f(void 0,void 0).ser(FD).de(Zq).build(){}D();k();J();class MI extends W.classBuilder().ep(K).m(function(f,h,w,s){return[z(w,this.serialize,this.deserialize),R(w,f.getEndpointParameterInstructions())]}).s("AWSDnsV20130401","GetHealthCheckLastFailureReason",{}).n("Route53Client","GetHealthCheckLastFailureReasonCommand").f(void 0,void 0).ser(CD).de(Jq).build(){}D();k();J();class QI extends W.classBuilder().ep(K).m(function(f,h,w,s){return[z(w,this.serialize,this.deserialize),R(w,f.getEndpointParameterInstructions())]}).s("AWSDnsV20130401","GetHealthCheckStatus",{}).n("Route53Client","GetHealthCheckStatusCommand").f(void 0,void 0).ser(ID).de(Vq).build(){}D();k();J();class KI extends W.classBuilder().ep(K).m(function(f,h,w,s){return[z(w,this.serialize,this.deserialize),R(w,f.getEndpointParameterInstructions()),O(w)]}).s("AWSDnsV20130401","GetHostedZone",{}).n("Route53Client","GetHostedZoneCommand").f(void 0,void 0).ser(LD).de(Pq).build(){}D();k();J();class ZI extends W.classBuilder().ep(K).m(function(f,h,w,s){return[z(w,this.serialize,this.deserialize),R(w,f.getEndpointParameterInstructions())]}).s("AWSDnsV20130401","GetHostedZoneCount",{}).n("Route53Client","GetHostedZoneCountCommand").f(void 0,void 0).ser(BD).de(Hq).build(){}D();k();J();class JI extends W.classBuilder().ep(K).m(function(f,h,w,s){return[z(w,this.serialize,this.deserialize),R(w,f.getEndpointParameterInstructions()),O(w)]}).s("AWSDnsV20130401","GetHostedZoneLimit",{}).n("Route53Client","GetHostedZoneLimitCommand").f(void 0,void 0).ser(AD).de(Nq).build(){}D();k();J();class VI extends W.classBuilder().ep(K).m(function(f,h,w,s){return[z(w,this.serialize,this.deserialize),R(w,f.getEndpointParameterInstructions()),O(w)]}).s("AWSDnsV20130401","GetQueryLoggingConfig",{}).n("Route53Client","GetQueryLoggingConfigCommand").f(void 0,void 0).ser(GD).de(Dq).build(){}D();k();J();class PI extends W.classBuilder().ep(K).m(function(f,h,w,s){return[z(w,this.serialize,this.deserialize),R(w,f.getEndpointParameterInstructions()),O(w)]}).s("AWSDnsV20130401","GetReusableDelegationSet",{}).n("Route53Client","GetReusableDelegationSetCommand").f(void 0,void 0).ser(WD).de(qq).build(){}D();k();J();class HI extends W.classBuilder().ep(K).m(function(f,h,w,s){return[z(w,this.serialize,this.deserialize),R(w,f.getEndpointParameterInstructions()),O(w)]}).s("AWSDnsV20130401","GetReusableDelegationSetLimit",{}).n("Route53Client","GetReusableDelegationSetLimitCommand").f(void 0,void 0).ser(zD).de(kq).build(){}D();k();J();class NI extends W.classBuilder().ep(K).m(function(f,h,w,s){return[z(w,this.serialize,this.deserialize),R(w,f.getEndpointParameterInstructions()),O(w)]}).s("AWSDnsV20130401","GetTrafficPolicy",{}).n("Route53Client","GetTrafficPolicyCommand").f(void 0,void 0).ser(RD).de(yq).build(){}D();k();J();class DI extends W.classBuilder().ep(K).m(function(f,h,w,s){return[z(w,this.serialize,this.deserialize),R(w,f.getEndpointParameterInstructions()),O(w)]}).s("AWSDnsV20130401","GetTrafficPolicyInstance",{}).n("Route53Client","GetTrafficPolicyInstanceCommand").f(void 0,void 0).ser(XD).de(jq).build(){}D();k();J();class qI extends W.classBuilder().ep(K).m(function(f,h,w,s){return[z(w,this.serialize,this.deserialize),R(w,f.getEndpointParameterInstructions())]}).s("AWSDnsV20130401","GetTrafficPolicyInstanceCount",{}).n("Route53Client","GetTrafficPolicyInstanceCountCommand").f(void 0,void 0).ser(SD).de(Oq).build(){}D();k();J();class kI extends W.classBuilder().ep(K).m(function(f,h,w,s){return[z(w,this.serialize,this.deserialize),R(w,f.getEndpointParameterInstructions())]}).s("AWSDnsV20130401","ListCidrBlocks",{}).n("Route53Client","ListCidrBlocksCommand").f(void 0,void 0).ser(YD).de(lq).build(){}D();k();J();class yI extends W.classBuilder().ep(K).m(function(f,h,w,s){return[z(w,this.serialize,this.deserialize),R(w,f.getEndpointParameterInstructions())]}).s("AWSDnsV20130401","ListCidrCollections",{}).n("Route53Client","ListCidrCollectionsCommand").f(void 0,void 0).ser(MD).de(vq).build(){}D();k();J();class jI extends W.classBuilder().ep(K).m(function(f,h,w,s){return[z(w,this.serialize,this.deserialize),R(w,f.getEndpointParameterInstructions())]}).s("AWSDnsV20130401","ListCidrLocations",{}).n("Route53Client","ListCidrLocationsCommand").f(void 0,void 0).ser(QD).de(bq).build(){}D();k();J();class OI extends W.classBuilder().ep(K).m(function(f,h,w,s){return[z(w,this.serialize,this.deserialize),R(w,f.getEndpointParameterInstructions())]}).s("AWSDnsV20130401","ListGeoLocations",{}).n("Route53Client","ListGeoLocationsCommand").f(void 0,void 0).ser(KD).de(mq).build(){}D();k();J();class lI extends W.classBuilder().ep(K).m(function(f,h,w,s){return[z(w,this.serialize,this.deserialize),R(w,f.getEndpointParameterInstructions())]}).s("AWSDnsV20130401","ListHealthChecks",{}).n("Route53Client","ListHealthChecksCommand").f(void 0,void 0).ser(ZD).de(dq).build(){}D();k();J();class vI extends W.classBuilder().ep(K).m(function(f,h,w,s){return[z(w,this.serialize,this.deserialize),R(w,f.getEndpointParameterInstructions()),O(w)]}).s("AWSDnsV20130401","ListHostedZonesByName",{}).n("Route53Client","ListHostedZonesByNameCommand").f(void 0,void 0).ser(VD).de(cq).build(){}D();k();J();class bI extends W.classBuilder().ep(K).m(function(f,h,w,s){return[z(w,this.serialize,this.deserialize),R(w,f.getEndpointParameterInstructions())]}).s("AWSDnsV20130401","ListHostedZonesByVPC",{}).n("Route53Client","ListHostedZonesByVPCCommand").f(void 0,void 0).ser(PD).de(gq).build(){}D();k();J();class mI extends W.classBuilder().ep(K).m(function(f,h,w,s){return[z(w,this.serialize,this.deserialize),R(w,f.getEndpointParameterInstructions()),O(w)]}).s("AWSDnsV20130401","ListHostedZones",{}).n("Route53Client","ListHostedZonesCommand").f(void 0,void 0).ser(JD).de(iq).build(){}D();k();J();class dI extends W.classBuilder().ep(K).m(function(f,h,w,s){return[z(w,this.serialize,this.deserialize),R(w,f.getEndpointParameterInstructions()),O(w)]}).s("AWSDnsV20130401","ListQueryLoggingConfigs",{}).n("Route53Client","ListQueryLoggingConfigsCommand").f(void 0,void 0).ser(HD).de(xq).build(){}D();k();J();class iI extends W.classBuilder().ep(K).m(function(f,h,w,s){return[z(w,this.serialize,this.deserialize),R(w,f.getEndpointParameterInstructions()),O(w)]}).s("AWSDnsV20130401","ListResourceRecordSets",{}).n("Route53Client","ListResourceRecordSetsCommand").f(void 0,void 0).ser(ND).de(_q).build(){}D();k();J();class cI extends W.classBuilder().ep(K).m(function(f,h,w,s){return[z(w,this.serialize,this.deserialize),R(w,f.getEndpointParameterInstructions())]}).s("AWSDnsV20130401","ListReusableDelegationSets",{}).n("Route53Client","ListReusableDelegationSetsCommand").f(void 0,void 0).ser(DD).de(nq).build(){}D();k();J();class gI extends W.classBuilder().ep(K).m(function(f,h,w,s){return[z(w,this.serialize,this.deserialize),R(w,f.getEndpointParameterInstructions())]}).s("AWSDnsV20130401","ListTagsForResource",{}).n("Route53Client","ListTagsForResourceCommand").f(void 0,void 0).ser(qD).de(eq).build(){}D();k();J();class xI extends W.classBuilder().ep(K).m(function(f,h,w,s){return[z(w,this.serialize,this.deserialize),R(w,f.getEndpointParameterInstructions())]}).s("AWSDnsV20130401","ListTagsForResources",{}).n("Route53Client","ListTagsForResourcesCommand").f(void 0,void 0).ser(kD).de(aq).build(){}D();k();J();class _I extends W.classBuilder().ep(K).m(function(f,h,w,s){return[z(w,this.serialize,this.deserialize),R(w,f.getEndpointParameterInstructions())]}).s("AWSDnsV20130401","ListTrafficPolicies",{}).n("Route53Client","ListTrafficPoliciesCommand").f(void 0,void 0).ser(yD).de(oq).build(){}D();k();J();class nI extends W.classBuilder().ep(K).m(function(f,h,w,s){return[z(w,this.serialize,this.deserialize),R(w,f.getEndpointParameterInstructions()),O(w)]}).s("AWSDnsV20130401","ListTrafficPolicyInstancesByHostedZone",{}).n("Route53Client","ListTrafficPolicyInstancesByHostedZoneCommand").f(void 0,void 0).ser(OD).de(uq).build(){}D();k();J();class eI extends W.classBuilder().ep(K).m(function(f,h,w,s){return[z(w,this.serialize,this.deserialize),R(w,f.getEndpointParameterInstructions())]}).s("AWSDnsV20130401","ListTrafficPolicyInstancesByPolicy",{}).n("Route53Client","ListTrafficPolicyInstancesByPolicyCommand").f(void 0,void 0).ser(lD).de(tq).build(){}D();k();J();class aI extends W.classBuilder().ep(K).m(function(f,h,w,s){return[z(w,this.serialize,this.deserialize),R(w,f.getEndpointParameterInstructions())]}).s("AWSDnsV20130401","ListTrafficPolicyInstances",{}).n("Route53Client","ListTrafficPolicyInstancesCommand").f(void 0,void 0).ser(jD).de(pq).build(){}D();k();J();class oI extends W.classBuilder().ep(K).m(function(f,h,w,s){return[z(w,this.serialize,this.deserialize),R(w,f.getEndpointParameterInstructions()),O(w)]}).s("AWSDnsV20130401","ListTrafficPolicyVersions",{}).n("Route53Client","ListTrafficPolicyVersionsCommand").f(void 0,void 0).ser(vD).de(fk).build(){}D();k();J();class pI extends W.classBuilder().ep(K).m(function(f,h,w,s){return[z(w,this.serialize,this.deserialize),R(w,f.getEndpointParameterInstructions()),O(w)]}).s("AWSDnsV20130401","ListVPCAssociationAuthorizations",{}).n("Route53Client","ListVPCAssociationAuthorizationsCommand").f(void 0,void 0).ser(bD).de(hk).build(){}D();k();J();class uI extends W.classBuilder().ep(K).m(function(f,h,w,s){return[z(w,this.serialize,this.deserialize),R(w,f.getEndpointParameterInstructions()),O(w)]}).s("AWSDnsV20130401","TestDNSAnswer",{}).n("Route53Client","TestDNSAnswerCommand").f(void 0,void 0).ser(mD).de(wk).build(){}D();k();J();class tI extends W.classBuilder().ep(K).m(function(f,h,w,s){return[z(w,this.serialize,this.deserialize),R(w,f.getEndpointParameterInstructions())]}).s("AWSDnsV20130401","UpdateHealthCheck",{}).n("Route53Client","UpdateHealthCheckCommand").f(void 0,void 0).ser(dD).de(sk).build(){}D();k();J();class fL extends W.classBuilder().ep(K).m(function(f,h,w,s){return[z(w,this.serialize,this.deserialize),R(w,f.getEndpointParameterInstructions()),O(w)]}).s("AWSDnsV20130401","UpdateHostedZoneComment",{}).n("Route53Client","UpdateHostedZoneCommentCommand").f(void 0,void 0).ser(iD).de($k).build(){}D();k();J();class hL extends W.classBuilder().ep(K).m(function(f,h,w,s){return[z(w,this.serialize,this.deserialize),R(w,f.getEndpointParameterInstructions()),O(w)]}).s("AWSDnsV20130401","UpdateTrafficPolicyComment",{}).n("Route53Client","UpdateTrafficPolicyCommentCommand").f(void 0,void 0).ser(cD).de(rk).build(){}D();k();J();class wL extends W.classBuilder().ep(K).m(function(f,h,w,s){return[z(w,this.serialize,this.deserialize),R(w,f.getEndpointParameterInstructions()),O(w)]}).s("AWSDnsV20130401","UpdateTrafficPolicyInstance",{}).n("Route53Client","UpdateTrafficPolicyInstanceCommand").f(void 0,void 0).ser(gD).de(Ek).build(){}var er0={ActivateKeySigningKeyCommand:d8,AssociateVPCWithHostedZoneCommand:i8,ChangeCidrCollectionCommand:c8,ChangeResourceRecordSetsCommand:g8,ChangeTagsForResourceCommand:x8,CreateCidrCollectionCommand:_8,CreateHealthCheckCommand:n8,CreateHostedZoneCommand:e8,CreateKeySigningKeyCommand:a8,CreateQueryLoggingConfigCommand:o8,CreateReusableDelegationSetCommand:p8,CreateTrafficPolicyCommand:u8,CreateTrafficPolicyInstanceCommand:t8,CreateTrafficPolicyVersionCommand:fI,CreateVPCAssociationAuthorizationCommand:hI,DeactivateKeySigningKeyCommand:wI,DeleteCidrCollectionCommand:sI,DeleteHealthCheckCommand:$I,DeleteHostedZoneCommand:rI,DeleteKeySigningKeyCommand:EI,DeleteQueryLoggingConfigCommand:UI,DeleteReusableDelegationSetCommand:TI,DeleteTrafficPolicyCommand:FI,DeleteTrafficPolicyInstanceCommand:CI,DeleteVPCAssociationAuthorizationCommand:II,DisableHostedZoneDNSSECCommand:LI,DisassociateVPCFromHostedZoneCommand:BI,EnableHostedZoneDNSSECCommand:AI,GetAccountLimitCommand:GI,GetChangeCommand:WI,GetCheckerIpRangesCommand:zI,GetDNSSECCommand:RI,GetGeoLocationCommand:XI,GetHealthCheckCommand:SI,GetHealthCheckCountCommand:YI,GetHealthCheckLastFailureReasonCommand:MI,GetHealthCheckStatusCommand:QI,GetHostedZoneCommand:KI,GetHostedZoneCountCommand:ZI,GetHostedZoneLimitCommand:JI,GetQueryLoggingConfigCommand:VI,GetReusableDelegationSetCommand:PI,GetReusableDelegationSetLimitCommand:HI,GetTrafficPolicyCommand:NI,GetTrafficPolicyInstanceCommand:DI,GetTrafficPolicyInstanceCountCommand:qI,ListCidrBlocksCommand:kI,ListCidrCollectionsCommand:yI,ListCidrLocationsCommand:jI,ListGeoLocationsCommand:OI,ListHealthChecksCommand:lI,ListHostedZonesCommand:mI,ListHostedZonesByNameCommand:vI,ListHostedZonesByVPCCommand:bI,ListQueryLoggingConfigsCommand:dI,ListResourceRecordSetsCommand:iI,ListReusableDelegationSetsCommand:cI,ListTagsForResourceCommand:gI,ListTagsForResourcesCommand:xI,ListTrafficPoliciesCommand:_I,ListTrafficPolicyInstancesCommand:aI,ListTrafficPolicyInstancesByHostedZoneCommand:nI,ListTrafficPolicyInstancesByPolicyCommand:eI,ListTrafficPolicyVersionsCommand:oI,ListVPCAssociationAuthorizationsCommand:pI,TestDNSAnswerCommand:uI,UpdateHealthCheckCommand:tI,UpdateHostedZoneCommentCommand:fL,UpdateTrafficPolicyCommentCommand:hL,UpdateTrafficPolicyInstanceCommand:wL};class dh extends ZC{}Es(er0,dh);E4();U4();T4();m$();Yh();var S$=p(m0(),1);$E();D();$w();J();var Mk=p(O0(),1);cf();var Qk=async(f,h,w)=>{return{operation:Xh(h).operation,region:await L1(f.region)()||(()=>{throw new Error("expected `region` to be configured for `aws.auth#sigv4`")})()}};function ar0(f){return{schemeId:"aws.auth#sigv4",signingProperties:{name:"route53domains",region:f.region},propertiesExtractor:(h,w)=>({signingProperties:{config:h,context:w}})}}var Kk=(f)=>{let h=[];switch(f.operation){default:h.push(ar0(f))}return h},Zk=(f)=>{return{...Mk.resolveAwsSdkSigV4Config(f)}};var Jk=(f)=>{return{...f,useDualstackEndpoint:f.useDualstackEndpoint??!1,useFipsEndpoint:f.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 Vk={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.772.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/core":"3.758.0","@aws-sdk/credential-provider-node":"3.772.0","@aws-sdk/middleware-host-header":"3.734.0","@aws-sdk/middleware-logger":"3.734.0","@aws-sdk/middleware-recursion-detection":"3.772.0","@aws-sdk/middleware-user-agent":"3.758.0","@aws-sdk/region-config-resolver":"3.734.0","@aws-sdk/types":"3.734.0","@aws-sdk/util-endpoints":"3.743.0","@aws-sdk/util-user-agent-browser":"3.734.0","@aws-sdk/util-user-agent-node":"3.758.0","@smithy/config-resolver":"^4.0.1","@smithy/core":"^3.1.5","@smithy/fetch-http-handler":"^5.0.1","@smithy/hash-node":"^4.0.1","@smithy/invalid-dependency":"^4.0.1","@smithy/middleware-content-length":"^4.0.1","@smithy/middleware-endpoint":"^4.0.6","@smithy/middleware-retry":"^4.0.7","@smithy/middleware-serde":"^4.0.2","@smithy/middleware-stack":"^4.0.1","@smithy/node-config-provider":"^4.0.1","@smithy/node-http-handler":"^4.0.3","@smithy/protocol-http":"^5.0.1","@smithy/smithy-client":"^4.1.6","@smithy/types":"^4.1.0","@smithy/url-parser":"^4.0.1","@smithy/util-base64":"^4.0.0","@smithy/util-body-length-browser":"^4.0.0","@smithy/util-body-length-node":"^4.0.0","@smithy/util-defaults-mode-browser":"^4.0.7","@smithy/util-defaults-mode-node":"^4.0.7","@smithy/util-endpoints":"^3.0.1","@smithy/util-middleware":"^4.0.1","@smithy/util-retry":"^4.0.1","@smithy/util-utf8":"^4.0.0",tslib:"^2.6.2"},devDependencies:{"@tsconfig/node18":"18.2.4","@types/node":"^18.19.69",concurrently:"7.0.0","downlevel-dts":"0.10.1",rimraf:"3.0.2",typescript:"~5.2.2"},engines:{node:">=18.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 ik=p(O0(),1);zU();Yh();RU();$w();Kh();wr();XU();wf();var mk=p(O0(),1);J();pw();SU();bs();N$();df();var Pk={["required"]:!1,type:"String"},Hk={["required"]:!0,default:!1,type:"Boolean"},Nk={["ref"]:"Endpoint"},Ok={["fn"]:"booleanEquals",["argv"]:[{["ref"]:"UseFIPS"},!0]},lk={["fn"]:"booleanEquals",["argv"]:[{["ref"]:"UseDualStack"},!0]},lf={},Dk={["fn"]:"getAttr",["argv"]:[{["ref"]:"PartitionResult"},"supportsFIPS"]},qk={["fn"]:"booleanEquals",["argv"]:[!0,{["fn"]:"getAttr",["argv"]:[{["ref"]:"PartitionResult"},"supportsDualStack"]}]},kk=[Ok],yk=[lk],jk=[{["ref"]:"Region"}],pr0={version:"1.0",parameters:{Region:Pk,UseDualStack:Hk,UseFIPS:Hk,Endpoint:Pk},rules:[{conditions:[{["fn"]:"isSet",["argv"]:[Nk]}],rules:[{conditions:kk,error:"Invalid Configuration: FIPS and custom endpoint are not supported",type:"error"},{conditions:yk,error:"Invalid Configuration: Dualstack and custom endpoint are not supported",type:"error"},{endpoint:{url:Nk,properties:lf,headers:lf},type:"endpoint"}],type:"tree"},{conditions:[{["fn"]:"isSet",["argv"]:jk}],rules:[{conditions:[{["fn"]:"aws.partition",["argv"]:jk,assign:"PartitionResult"}],rules:[{conditions:[Ok,lk],rules:[{conditions:[{["fn"]:"booleanEquals",["argv"]:[!0,Dk]},qk],rules:[{endpoint:{url:"https://route53domains-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:lf,headers:lf},type:"endpoint"}],type:"tree"},{error:"FIPS and DualStack are enabled, but this partition does not support one or both",type:"error"}],type:"tree"},{conditions:kk,rules:[{conditions:[{["fn"]:"booleanEquals",["argv"]:[Dk,!0]}],rules:[{endpoint:{url:"https://route53domains-fips.{Region}.{PartitionResult#dnsSuffix}",properties:lf,headers:lf},type:"endpoint"}],type:"tree"},{error:"FIPS is enabled but this partition does not support FIPS",type:"error"}],type:"tree"},{conditions:yk,rules:[{conditions:[qk],rules:[{endpoint:{url:"https://route53domains.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:lf,headers:lf},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:lf,headers:lf},type:"endpoint"}],type:"tree"}],type:"tree"},{error:"Invalid Configuration: Missing Region",type:"error"}]},vk=pr0;var ur0=new gh({size:50,params:["Endpoint","Region","UseDualStack","UseFIPS"]}),bk=(f,h={})=>{return ur0.get(f,()=>xh(vk,{endpointParams:f,logger:h.logger}))};t1.aws=_h;var dk=(f)=>{return{apiVersion:"2014-05-15",base64Decoder:f?.base64Decoder??ds,base64Encoder:f?.base64Encoder??is,disableHostPrefix:f?.disableHostPrefix??!1,endpointProvider:f?.endpointProvider??bk,extensions:f?.extensions??[],httpAuthSchemeProvider:f?.httpAuthSchemeProvider??Kk,httpAuthSchemes:f?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:(h)=>h.getIdentityProvider("aws.auth#sigv4"),signer:new mk.AwsSdkSigV4Signer}],logger:f?.logger??new _f,serviceId:f?.serviceId??"Route 53 Domains",urlParser:f?.urlParser??O1,utf8Decoder:f?.utf8Decoder??Jf,utf8Encoder:f?.utf8Encoder??vs}};J();YU();J();var ck=(f)=>{Cs(process.version);let h=cs(f),w=()=>h().then(Fs),s=dk(f);ik.emitWarningIfUnsupportedVersion(process.version);let $={profile:f?.profile};return{...s,...f,runtime:"node",defaultsMode:h,bodyLengthChecker:f?.bodyLengthChecker??ms,credentialDefaultProvider:f?.credentialDefaultProvider??lU,defaultUserAgentProvider:f?.defaultUserAgentProvider??ys({serviceId:s.serviceId,clientVersion:Vk.version}),maxAttempts:f?.maxAttempts??z0(ws,f),region:f?.region??z0(Sh,{..._w,...$}),requestHandler:rf.create(f?.requestHandler??w),retryMode:f?.retryMode??z0({...$s,default:async()=>(await w()).retryMode||Zh},f),sha256:f?.sha256??Fw.bind(null,"sha256"),streamCollector:f?.streamCollector??Ws,useDualstackEndpoint:f?.useDualstackEndpoint??z0(gw,$),useFipsEndpoint:f?.useFipsEndpoint??z0(xw,$),userAgentAppId:f?.userAgentAppId??z0(js,$)}};MU();F1();J();var gk=(f)=>{let{httpAuthSchemes:h,httpAuthSchemeProvider:w,credentials:s}=f;return{setHttpAuthScheme($){let r=h.findIndex((E)=>E.schemeId===$.schemeId);if(r===-1)h.push($);else h.splice(r,1,$)},httpAuthSchemes(){return h},setHttpAuthSchemeProvider($){w=$},httpAuthSchemeProvider(){return w},setCredentials($){s=$},credentials(){return s}}},xk=(f)=>{return{httpAuthSchemes:f.httpAuthSchemes(),httpAuthSchemeProvider:f.httpAuthSchemeProvider(),credentials:f.credentials()}};var QT=(f)=>f,_k=(f,h)=>{let w={...QT(gs(f)),...QT(Is(f)),...QT(Zw(f)),...QT(gk(f))};return h.forEach((s)=>s.configure(w)),{...f,...xs(w),...Ls(w),...Jw(w),...xk(w)}};class sL extends ww{config;constructor(...[f]){let h=ck(f||{}),w=Jk(h),s=jw(w),$=ss(s),r=nw($),E=Vw(r),U=uw(E),T=Zk(U),F=_k(T,f?.extensions||[]);super(F);this.config=F,this.middlewareStack.use(iw(this.config)),this.middlewareStack.use(As(this.config)),this.middlewareStack.use(ew(this.config)),this.middlewareStack.use(Pw(this.config)),this.middlewareStack.use(Hw(this.config)),this.middlewareStack.use(Nw(this.config)),this.middlewareStack.use(S$.getHttpAuthSchemeEndpointRuleSetPlugin(this.config,{httpAuthSchemeParametersProvider:Qk,identityProviderConfigProvider:async(C)=>new S$.DefaultIdentityProviderConfig({"aws.auth#sigv4":C.credentials})})),this.middlewareStack.use(S$.getHttpSigningPlugin(this.config))}destroy(){super.destroy()}}J();D();k();J();J();J();class o1 extends $f{constructor(f){super(f);Object.setPrototypeOf(this,o1.prototype)}}class KT extends o1{name="DomainLimitExceeded";$fault="client";constructor(f){super({name:"DomainLimitExceeded",$fault:"client",...f});Object.setPrototypeOf(this,KT.prototype)}}class ZT extends o1{name="InvalidInput";$fault="client";constructor(f){super({name:"InvalidInput",$fault:"client",...f});Object.setPrototypeOf(this,ZT.prototype)}}class JT extends o1{name="OperationLimitExceeded";$fault="client";constructor(f){super({name:"OperationLimitExceeded",$fault:"client",...f});Object.setPrototypeOf(this,JT.prototype)}}class VT extends o1{name="UnsupportedTLD";$fault="client";constructor(f){super({name:"UnsupportedTLD",$fault:"client",...f});Object.setPrototypeOf(this,VT.prototype)}}class PT extends o1{name="DnssecLimitExceeded";$fault="client";constructor(f){super({name:"DnssecLimitExceeded",$fault:"client",...f});Object.setPrototypeOf(this,PT.prototype)}}class HT extends o1{name="DuplicateRequest";$fault="client";requestId;constructor(f){super({name:"DuplicateRequest",$fault:"client",...f});Object.setPrototypeOf(this,HT.prototype),this.requestId=f.requestId}}class NT extends o1{name="TLDRulesViolation";$fault="client";constructor(f){super({name:"TLDRulesViolation",$fault:"client",...f});Object.setPrototypeOf(this,NT.prototype)}}var nk=(f)=>({...f,...f.Password&&{Password:T0}}),ek=(f)=>({...f,...f.AuthCode&&{AuthCode:T0}});var ak=(f)=>({...f,...f.AdminContact&&{AdminContact:T0},...f.RegistrantContact&&{RegistrantContact:T0},...f.TechContact&&{TechContact:T0},...f.AbuseContactEmail&&{AbuseContactEmail:T0},...f.AbuseContactPhone&&{AbuseContactPhone:T0},...f.BillingContact&&{BillingContact:T0}}),ok=(f)=>({...f,...f.AdminContact&&{AdminContact:T0},...f.RegistrantContact&&{RegistrantContact:T0},...f.TechContact&&{TechContact:T0},...f.BillingContact&&{BillingContact:T0}}),pk=(f)=>({...f,...f.emailAddress&&{emailAddress:T0}}),uk=(f)=>({...f,...f.AuthCode&&{AuthCode:T0}}),tk=(f)=>({...f,...f.AuthCode&&{AuthCode:T0},...f.AdminContact&&{AdminContact:T0},...f.RegistrantContact&&{RegistrantContact:T0},...f.TechContact&&{TechContact:T0},...f.BillingContact&&{BillingContact:T0}}),fy=(f)=>({...f,...f.Password&&{Password:T0}}),hy=(f)=>({...f,...f.AdminContact&&{AdminContact:T0},...f.RegistrantContact&&{RegistrantContact:T0},...f.TechContact&&{TechContact:T0},...f.BillingContact&&{BillingContact:T0}}),wy=(f)=>({...f,...f.FIAuthKey&&{FIAuthKey:T0}});var s0=p(O0(),1);F1();J();var sy=async(f,h)=>{let w=U0("AcceptDomainTransferFromAnotherAwsAccount"),s;return s=JSON.stringify(v(f)),E0(h,w,"/",void 0,s)},$y=async(f,h)=>{let w=U0("AssociateDelegationSignerToDomain"),s;return s=JSON.stringify(v(f)),E0(h,w,"/",void 0,s)},ry=async(f,h)=>{let w=U0("CancelDomainTransferToAnotherAwsAccount"),s;return s=JSON.stringify(v(f)),E0(h,w,"/",void 0,s)},Ey=async(f,h)=>{let w=U0("CheckDomainAvailability"),s;return s=JSON.stringify(v(f)),E0(h,w,"/",void 0,s)},Uy=async(f,h)=>{let w=U0("CheckDomainTransferability"),s;return s=JSON.stringify(v(f)),E0(h,w,"/",void 0,s)},Ty=async(f,h)=>{let w=U0("DeleteDomain"),s;return s=JSON.stringify(v(f)),E0(h,w,"/",void 0,s)},Fy=async(f,h)=>{let w=U0("DeleteTagsForDomain"),s;return s=JSON.stringify(v(f)),E0(h,w,"/",void 0,s)},Cy=async(f,h)=>{let w=U0("DisableDomainAutoRenew"),s;return s=JSON.stringify(v(f)),E0(h,w,"/",void 0,s)},Iy=async(f,h)=>{let w=U0("DisableDomainTransferLock"),s;return s=JSON.stringify(v(f)),E0(h,w,"/",void 0,s)},Ly=async(f,h)=>{let w=U0("DisassociateDelegationSignerFromDomain"),s;return s=JSON.stringify(v(f)),E0(h,w,"/",void 0,s)},By=async(f,h)=>{let w=U0("EnableDomainAutoRenew"),s;return s=JSON.stringify(v(f)),E0(h,w,"/",void 0,s)},Ay=async(f,h)=>{let w=U0("EnableDomainTransferLock"),s;return s=JSON.stringify(v(f)),E0(h,w,"/",void 0,s)},Gy=async(f,h)=>{let w=U0("GetContactReachabilityStatus"),s;return s=JSON.stringify(v(f)),E0(h,w,"/",void 0,s)},Wy=async(f,h)=>{let w=U0("GetDomainDetail"),s;return s=JSON.stringify(v(f)),E0(h,w,"/",void 0,s)},zy=async(f,h)=>{let w=U0("GetDomainSuggestions"),s;return s=JSON.stringify(v(f)),E0(h,w,"/",void 0,s)},Ry=async(f,h)=>{let w=U0("GetOperationDetail"),s;return s=JSON.stringify(v(f)),E0(h,w,"/",void 0,s)},Xy=async(f,h)=>{let w=U0("ListDomains"),s;return s=JSON.stringify(v(f)),E0(h,w,"/",void 0,s)},Sy=async(f,h)=>{let w=U0("ListOperations"),s;return s=JSON.stringify(U40(f,h)),E0(h,w,"/",void 0,s)},Yy=async(f,h)=>{let w=U0("ListPrices"),s;return s=JSON.stringify(v(f)),E0(h,w,"/",void 0,s)},My=async(f,h)=>{let w=U0("ListTagsForDomain"),s;return s=JSON.stringify(v(f)),E0(h,w,"/",void 0,s)},Qy=async(f,h)=>{let w=U0("PushDomain"),s;return s=JSON.stringify(v(f)),E0(h,w,"/",void 0,s)},Ky=async(f,h)=>{let w=U0("RegisterDomain"),s;return s=JSON.stringify(v(f)),E0(h,w,"/",void 0,s)},Zy=async(f,h)=>{let w=U0("RejectDomainTransferFromAnotherAwsAccount"),s;return s=JSON.stringify(v(f)),E0(h,w,"/",void 0,s)},Jy=async(f,h)=>{let w=U0("RenewDomain"),s;return s=JSON.stringify(v(f)),E0(h,w,"/",void 0,s)},Vy=async(f,h)=>{let w=U0("ResendContactReachabilityEmail"),s;return s=JSON.stringify(v(f)),E0(h,w,"/",void 0,s)},Py=async(f,h)=>{let w=U0("ResendOperationAuthorization"),s;return s=JSON.stringify(v(f)),E0(h,w,"/",void 0,s)},Hy=async(f,h)=>{let w=U0("RetrieveDomainAuthCode"),s;return s=JSON.stringify(v(f)),E0(h,w,"/",void 0,s)},Ny=async(f,h)=>{let w=U0("TransferDomain"),s;return s=JSON.stringify(v(f)),E0(h,w,"/",void 0,s)},Dy=async(f,h)=>{let w=U0("TransferDomainToAnotherAwsAccount"),s;return s=JSON.stringify(v(f)),E0(h,w,"/",void 0,s)},qy=async(f,h)=>{let w=U0("UpdateDomainContact"),s;return s=JSON.stringify(T40(f,h)),E0(h,w,"/",void 0,s)},ky=async(f,h)=>{let w=U0("UpdateDomainContactPrivacy"),s;return s=JSON.stringify(v(f)),E0(h,w,"/",void 0,s)},yy=async(f,h)=>{let w=U0("UpdateDomainNameservers"),s;return s=JSON.stringify(v(f)),E0(h,w,"/",void 0,s)},jy=async(f,h)=>{let w=U0("UpdateTagsForDomain"),s;return s=JSON.stringify(v(f)),E0(h,w,"/",void 0,s)},Oy=async(f,h)=>{let w=U0("ViewBilling"),s;return s=JSON.stringify(F40(f,h)),E0(h,w,"/",void 0,s)},ly=async(f,h)=>{if(f.statusCode>=300)return r0(f,h);let w=await s0.parseJsonBody(f.body,h),s={};return s=v(w),{$metadata:f0(f),...s}},vy=async(f,h)=>{if(f.statusCode>=300)return r0(f,h);let w=await s0.parseJsonBody(f.body,h),s={};return s=v(w),{$metadata:f0(f),...s}},by=async(f,h)=>{if(f.statusCode>=300)return r0(f,h);let w=await s0.parseJsonBody(f.body,h),s={};return s=v(w),{$metadata:f0(f),...s}},my=async(f,h)=>{if(f.statusCode>=300)return r0(f,h);let w=await s0.parseJsonBody(f.body,h),s={};return s=v(w),{$metadata:f0(f),...s}},dy=async(f,h)=>{if(f.statusCode>=300)return r0(f,h);let w=await s0.parseJsonBody(f.body,h),s={};return s=v(w),{$metadata:f0(f),...s}},iy=async(f,h)=>{if(f.statusCode>=300)return r0(f,h);let w=await s0.parseJsonBody(f.body,h),s={};return s=v(w),{$metadata:f0(f),...s}},cy=async(f,h)=>{if(f.statusCode>=300)return r0(f,h);let w=await s0.parseJsonBody(f.body,h),s={};return s=v(w),{$metadata:f0(f),...s}},gy=async(f,h)=>{if(f.statusCode>=300)return r0(f,h);let w=await s0.parseJsonBody(f.body,h),s={};return s=v(w),{$metadata:f0(f),...s}},xy=async(f,h)=>{if(f.statusCode>=300)return r0(f,h);let w=await s0.parseJsonBody(f.body,h),s={};return s=v(w),{$metadata:f0(f),...s}},_y=async(f,h)=>{if(f.statusCode>=300)return r0(f,h);let w=await s0.parseJsonBody(f.body,h),s={};return s=v(w),{$metadata:f0(f),...s}},ny=async(f,h)=>{if(f.statusCode>=300)return r0(f,h);let w=await s0.parseJsonBody(f.body,h),s={};return s=v(w),{$metadata:f0(f),...s}},ey=async(f,h)=>{if(f.statusCode>=300)return r0(f,h);let w=await s0.parseJsonBody(f.body,h),s={};return s=v(w),{$metadata:f0(f),...s}},ay=async(f,h)=>{if(f.statusCode>=300)return r0(f,h);let w=await s0.parseJsonBody(f.body,h),s={};return s=v(w),{$metadata:f0(f),...s}},oy=async(f,h)=>{if(f.statusCode>=300)return r0(f,h);let w=await s0.parseJsonBody(f.body,h),s={};return s=W40(w,h),{$metadata:f0(f),...s}},py=async(f,h)=>{if(f.statusCode>=300)return r0(f,h);let w=await s0.parseJsonBody(f.body,h),s={};return s=v(w),{$metadata:f0(f),...s}},uy=async(f,h)=>{if(f.statusCode>=300)return r0(f,h);let w=await s0.parseJsonBody(f.body,h),s={};return s=z40(w,h),{$metadata:f0(f),...s}},ty=async(f,h)=>{if(f.statusCode>=300)return r0(f,h);let w=await s0.parseJsonBody(f.body,h),s={};return s=R40(w,h),{$metadata:f0(f),...s}},fj=async(f,h)=>{if(f.statusCode>=300)return r0(f,h);let w=await s0.parseJsonBody(f.body,h),s={};return s=X40(w,h),{$metadata:f0(f),...s}},hj=async(f,h)=>{if(f.statusCode>=300)return r0(f,h);let w=await s0.parseJsonBody(f.body,h),s={};return s=S40(w,h),{$metadata:f0(f),...s}},wj=async(f,h)=>{if(f.statusCode>=300)return r0(f,h);let w=await s0.parseJsonBody(f.body,h),s={};return s=v(w),{$metadata:f0(f),...s}},sj=async(f,h)=>{if(f.statusCode>=300)return r0(f,h);return await B1.collectBody(f.body,h),{$metadata:f0(f)}},$j=async(f,h)=>{if(f.statusCode>=300)return r0(f,h);let w=await s0.parseJsonBody(f.body,h),s={};return s=v(w),{$metadata:f0(f),...s}},rj=async(f,h)=>{if(f.statusCode>=300)return r0(f,h);let w=await s0.parseJsonBody(f.body,h),s={};return s=v(w),{$metadata:f0(f),...s}},Ej=async(f,h)=>{if(f.statusCode>=300)return r0(f,h);let w=await s0.parseJsonBody(f.body,h),s={};return s=v(w),{$metadata:f0(f),...s}},Uj=async(f,h)=>{if(f.statusCode>=300)return r0(f,h);let w=await s0.parseJsonBody(f.body,h),s={};return s=v(w),{$metadata:f0(f),...s}},Tj=async(f,h)=>{if(f.statusCode>=300)return r0(f,h);return await B1.collectBody(f.body,h),{$metadata:f0(f)}},Fj=async(f,h)=>{if(f.statusCode>=300)return r0(f,h);let w=await s0.parseJsonBody(f.body,h),s={};return s=v(w),{$metadata:f0(f),...s}},Cj=async(f,h)=>{if(f.statusCode>=300)return r0(f,h);let w=await s0.parseJsonBody(f.body,h),s={};return s=v(w),{$metadata:f0(f),...s}},Ij=async(f,h)=>{if(f.statusCode>=300)return r0(f,h);let w=await s0.parseJsonBody(f.body,h),s={};return s=v(w),{$metadata:f0(f),...s}},Lj=async(f,h)=>{if(f.statusCode>=300)return r0(f,h);let w=await s0.parseJsonBody(f.body,h),s={};return s=v(w),{$metadata:f0(f),...s}},Bj=async(f,h)=>{if(f.statusCode>=300)return r0(f,h);let w=await s0.parseJsonBody(f.body,h),s={};return s=v(w),{$metadata:f0(f),...s}},Aj=async(f,h)=>{if(f.statusCode>=300)return r0(f,h);let w=await s0.parseJsonBody(f.body,h),s={};return s=v(w),{$metadata:f0(f),...s}},Gj=async(f,h)=>{if(f.statusCode>=300)return r0(f,h);let w=await s0.parseJsonBody(f.body,h),s={};return s=v(w),{$metadata:f0(f),...s}},Wj=async(f,h)=>{if(f.statusCode>=300)return r0(f,h);let w=await s0.parseJsonBody(f.body,h),s={};return s=Q40(w,h),{$metadata:f0(f),...s}},r0=async(f,h)=>{let w={...f,body:await s0.parseJsonErrorBody(f.body,h)},s=s0.loadRestJsonErrorCode(f,w.body);switch(s){case"DomainLimitExceeded":case"com.amazonaws.route53domains#DomainLimitExceeded":throw await f40(w,h);case"InvalidInput":case"com.amazonaws.route53domains#InvalidInput":throw await w40(w,h);case"OperationLimitExceeded":case"com.amazonaws.route53domains#OperationLimitExceeded":throw await s40(w,h);case"UnsupportedTLD":case"com.amazonaws.route53domains#UnsupportedTLD":throw await r40(w,h);case"DnssecLimitExceeded":case"com.amazonaws.route53domains#DnssecLimitExceeded":throw await tr0(w,h);case"DuplicateRequest":case"com.amazonaws.route53domains#DuplicateRequest":throw await h40(w,h);case"TLDRulesViolation":case"com.amazonaws.route53domains#TLDRulesViolation":throw await $40(w,h);default:let $=w.body;return K40({output:f,parsedBody:$,errorCode:s})}},tr0=async(f,h)=>{let w=f.body,s=v(w),$=new PT({$metadata:f0(f),...s});return l($,w)},f40=async(f,h)=>{let w=f.body,s=v(w),$=new KT({$metadata:f0(f),...s});return l($,w)},h40=async(f,h)=>{let w=f.body,s=v(w),$=new HT({$metadata:f0(f),...s});return l($,w)},w40=async(f,h)=>{let w=f.body,s=v(w),$=new ZT({$metadata:f0(f),...s});return l($,w)},s40=async(f,h)=>{let w=f.body,s=v(w),$=new JT({$metadata:f0(f),...s});return l($,w)},$40=async(f,h)=>{let w=f.body,s=v(w),$=new NT({$metadata:f0(f),...s});return l($,w)},r40=async(f,h)=>{let w=f.body,s=v(w),$=new VT({$metadata:f0(f),...s});return l($,w)},E40=(f,h)=>{return N0(f,{Currency:[],MaxPrice:$Y})},U40=(f,h)=>{return N0(f,{Marker:[],MaxItems:[],SortBy:[],SortOrder:[],Status:v,SubmittedSince:(w)=>w.getTime()/1000,Type:v})},T40=(f,h)=>{return N0(f,{AdminContact:v,BillingContact:v,Consent:(w)=>E40(w,h),DomainName:[],RegistrantContact:v,TechContact:v})},F40=(f,h)=>{return N0(f,{End:(w)=>w.getTime()/1000,Marker:[],MaxItems:[],Start:(w)=>w.getTime()/1000})},C40=(f,h)=>{return N0(f,{BillDate:(w)=>j(Qf(S1(w))),DomainName:A,InvoiceId:A,Operation:A,Price:m3})},I40=(f,h)=>{return(f||[]).filter((s)=>s!=null).map((s)=>{return C40(s,h)})},L40=(f,h)=>{return N0(f,{ChangeOwnershipPrice:(w)=>h4(w,h),Name:A,RegistrationPrice:(w)=>h4(w,h),RenewalPrice:(w)=>h4(w,h),RestorationPrice:(w)=>h4(w,h),TransferPrice:(w)=>h4(w,h)})},B40=(f,h)=>{return(f||[]).filter((s)=>s!=null).map((s)=>{return L40(s,h)})},A40=(f,h)=>{return N0(f,{AutoRenew:Vh,DomainName:A,Expiry:(w)=>j(Qf(S1(w))),TransferLock:Vh})},G40=(f,h)=>{return(f||[]).filter((s)=>s!=null).map((s)=>{return A40(s,h)})},W40=(f,h)=>{return N0(f,{AbuseContactEmail:A,AbuseContactPhone:A,AdminContact:v,AdminPrivacy:Vh,AutoRenew:Vh,BillingContact:v,BillingPrivacy:Vh,CreationDate:(w)=>j(Qf(S1(w))),DnsSec:A,DnssecKeys:v,DomainName:A,ExpirationDate:(w)=>j(Qf(S1(w))),Nameservers:v,RegistrantContact:v,RegistrantPrivacy:Vh,RegistrarName:A,RegistrarUrl:A,RegistryDomainId:A,Reseller:A,StatusList:v,TechContact:v,TechPrivacy:Vh,UpdatedDate:(w)=>j(Qf(S1(w))),WhoIsServer:A})},z40=(f,h)=>{return N0(f,{DomainName:A,LastUpdatedDate:(w)=>j(Qf(S1(w))),Message:A,OperationId:A,Status:A,StatusFlag:A,SubmittedDate:(w)=>j(Qf(S1(w))),Type:A})},R40=(f,h)=>{return N0(f,{Domains:(w)=>G40(w,h),NextPageMarker:A})},X40=(f,h)=>{return N0(f,{NextPageMarker:A,Operations:(w)=>M40(w,h)})},S40=(f,h)=>{return N0(f,{NextPageMarker:A,Prices:(w)=>B40(w,h)})},Y40=(f,h)=>{return N0(f,{DomainName:A,LastUpdatedDate:(w)=>j(Qf(S1(w))),Message:A,OperationId:A,Status:A,StatusFlag:A,SubmittedDate:(w)=>j(Qf(S1(w))),Type:A})},M40=(f,h)=>{return(f||[]).filter((s)=>s!=null).map((s)=>{return Y40(s,h)})},h4=(f,h)=>{return N0(f,{Currency:A,Price:m3})},Q40=(f,h)=>{return N0(f,{BillingRecords:(w)=>I40(w,h),NextPageMarker:A})},f0=(f)=>({httpStatusCode:f.statusCode,requestId:f.headers["x-amzn-requestid"]??f.headers["x-amzn-request-id"]??f.headers["x-amz-request-id"],extendedRequestId:f.headers["x-amz-id-2"],cfId:f.headers["x-amz-cf-id"]});var K40=Ts(o1),E0=async(f,h,w,s,$)=>{let{hostname:r,protocol:E="https",port:U,path:T}=await f.endpoint(),F={protocol:E,hostname:r,port:U,method:"POST",path:T.endsWith("/")?T.slice(0,-1)+w:T+w,headers:h};if(s!==void 0)F.hostname=s;if($!==void 0)F.body=$;return new n0(F)};function U0(f){return{"content-type":"application/x-amz-json-1.1","x-amz-target":`Route53Domains_v20140515.${f}`}}class $L extends W.classBuilder().ep(c).m(function(f,h,w,s){return[z(w,this.serialize,this.deserialize),R(w,f.getEndpointParameterInstructions())]}).s("Route53Domains_v20140515","AcceptDomainTransferFromAnotherAwsAccount",{}).n("Route53DomainsClient","AcceptDomainTransferFromAnotherAwsAccountCommand").f(nk,void 0).ser(sy).de(ly).build(){}D();k();J();class rL extends W.classBuilder().ep(c).m(function(f,h,w,s){return[z(w,this.serialize,this.deserialize),R(w,f.getEndpointParameterInstructions())]}).s("Route53Domains_v20140515","AssociateDelegationSignerToDomain",{}).n("Route53DomainsClient","AssociateDelegationSignerToDomainCommand").f(void 0,void 0).ser($y).de(vy).build(){}D();k();J();class EL extends W.classBuilder().ep(c).m(function(f,h,w,s){return[z(w,this.serialize,this.deserialize),R(w,f.getEndpointParameterInstructions())]}).s("Route53Domains_v20140515","CancelDomainTransferToAnotherAwsAccount",{}).n("Route53DomainsClient","CancelDomainTransferToAnotherAwsAccountCommand").f(void 0,void 0).ser(ry).de(by).build(){}D();k();J();class UL extends W.classBuilder().ep(c).m(function(f,h,w,s){return[z(w,this.serialize,this.deserialize),R(w,f.getEndpointParameterInstructions())]}).s("Route53Domains_v20140515","CheckDomainAvailability",{}).n("Route53DomainsClient","CheckDomainAvailabilityCommand").f(void 0,void 0).ser(Ey).de(my).build(){}D();k();J();class TL extends W.classBuilder().ep(c).m(function(f,h,w,s){return[z(w,this.serialize,this.deserialize),R(w,f.getEndpointParameterInstructions())]}).s("Route53Domains_v20140515","CheckDomainTransferability",{}).n("Route53DomainsClient","CheckDomainTransferabilityCommand").f(ek,void 0).ser(Uy).de(dy).build(){}D();k();J();class FL extends W.classBuilder().ep(c).m(function(f,h,w,s){return[z(w,this.serialize,this.deserialize),R(w,f.getEndpointParameterInstructions())]}).s("Route53Domains_v20140515","DeleteDomain",{}).n("Route53DomainsClient","DeleteDomainCommand").f(void 0,void 0).ser(Ty).de(iy).build(){}D();k();J();class CL extends W.classBuilder().ep(c).m(function(f,h,w,s){return[z(w,this.serialize,this.deserialize),R(w,f.getEndpointParameterInstructions())]}).s("Route53Domains_v20140515","DeleteTagsForDomain",{}).n("Route53DomainsClient","DeleteTagsForDomainCommand").f(void 0,void 0).ser(Fy).de(cy).build(){}D();k();J();class IL extends W.classBuilder().ep(c).m(function(f,h,w,s){return[z(w,this.serialize,this.deserialize),R(w,f.getEndpointParameterInstructions())]}).s("Route53Domains_v20140515","DisableDomainAutoRenew",{}).n("Route53DomainsClient","DisableDomainAutoRenewCommand").f(void 0,void 0).ser(Cy).de(gy).build(){}D();k();J();class LL extends W.classBuilder().ep(c).m(function(f,h,w,s){return[z(w,this.serialize,this.deserialize),R(w,f.getEndpointParameterInstructions())]}).s("Route53Domains_v20140515","DisableDomainTransferLock",{}).n("Route53DomainsClient","DisableDomainTransferLockCommand").f(void 0,void 0).ser(Iy).de(xy).build(){}D();k();J();class BL extends W.classBuilder().ep(c).m(function(f,h,w,s){return[z(w,this.serialize,this.deserialize),R(w,f.getEndpointParameterInstructions())]}).s("Route53Domains_v20140515","DisassociateDelegationSignerFromDomain",{}).n("Route53DomainsClient","DisassociateDelegationSignerFromDomainCommand").f(void 0,void 0).ser(Ly).de(_y).build(){}D();k();J();class AL extends W.classBuilder().ep(c).m(function(f,h,w,s){return[z(w,this.serialize,this.deserialize),R(w,f.getEndpointParameterInstructions())]}).s("Route53Domains_v20140515","EnableDomainAutoRenew",{}).n("Route53DomainsClient","EnableDomainAutoRenewCommand").f(void 0,void 0).ser(By).de(ny).build(){}D();k();J();class GL extends W.classBuilder().ep(c).m(function(f,h,w,s){return[z(w,this.serialize,this.deserialize),R(w,f.getEndpointParameterInstructions())]}).s("Route53Domains_v20140515","EnableDomainTransferLock",{}).n("Route53DomainsClient","EnableDomainTransferLockCommand").f(void 0,void 0).ser(Ay).de(ey).build(){}D();k();J();class WL extends W.classBuilder().ep(c).m(function(f,h,w,s){return[z(w,this.serialize,this.deserialize),R(w,f.getEndpointParameterInstructions())]}).s("Route53Domains_v20140515","GetContactReachabilityStatus",{}).n("Route53DomainsClient","GetContactReachabilityStatusCommand").f(void 0,void 0).ser(Gy).de(ay).build(){}D();k();J();class zL extends W.classBuilder().ep(c).m(function(f,h,w,s){return[z(w,this.serialize,this.deserialize),R(w,f.getEndpointParameterInstructions())]}).s("Route53Domains_v20140515","GetDomainDetail",{}).n("Route53DomainsClient","GetDomainDetailCommand").f(void 0,ak).ser(Wy).de(oy).build(){}D();k();J();class RL extends W.classBuilder().ep(c).m(function(f,h,w,s){return[z(w,this.serialize,this.deserialize),R(w,f.getEndpointParameterInstructions())]}).s("Route53Domains_v20140515","GetDomainSuggestions",{}).n("Route53DomainsClient","GetDomainSuggestionsCommand").f(void 0,void 0).ser(zy).de(py).build(){}D();k();J();class XL extends W.classBuilder().ep(c).m(function(f,h,w,s){return[z(w,this.serialize,this.deserialize),R(w,f.getEndpointParameterInstructions())]}).s("Route53Domains_v20140515","GetOperationDetail",{}).n("Route53DomainsClient","GetOperationDetailCommand").f(void 0,void 0).ser(Ry).de(uy).build(){}D();k();J();class SL extends W.classBuilder().ep(c).m(function(f,h,w,s){return[z(w,this.serialize,this.deserialize),R(w,f.getEndpointParameterInstructions())]}).s("Route53Domains_v20140515","ListDomains",{}).n("Route53DomainsClient","ListDomainsCommand").f(void 0,void 0).ser(Xy).de(ty).build(){}D();k();J();class YL extends W.classBuilder().ep(c).m(function(f,h,w,s){return[z(w,this.serialize,this.deserialize),R(w,f.getEndpointParameterInstructions())]}).s("Route53Domains_v20140515","ListOperations",{}).n("Route53DomainsClient","ListOperationsCommand").f(void 0,void 0).ser(Sy).de(fj).build(){}D();k();J();class ML extends W.classBuilder().ep(c).m(function(f,h,w,s){return[z(w,this.serialize,this.deserialize),R(w,f.getEndpointParameterInstructions())]}).s("Route53Domains_v20140515","ListPrices",{}).n("Route53DomainsClient","ListPricesCommand").f(void 0,void 0).ser(Yy).de(hj).build(){}D();k();J();class QL extends W.classBuilder().ep(c).m(function(f,h,w,s){return[z(w,this.serialize,this.deserialize),R(w,f.getEndpointParameterInstructions())]}).s("Route53Domains_v20140515","ListTagsForDomain",{}).n("Route53DomainsClient","ListTagsForDomainCommand").f(void 0,void 0).ser(My).de(wj).build(){}D();k();J();class KL extends W.classBuilder().ep(c).m(function(f,h,w,s){return[z(w,this.serialize,this.deserialize),R(w,f.getEndpointParameterInstructions())]}).s("Route53Domains_v20140515","PushDomain",{}).n("Route53DomainsClient","PushDomainCommand").f(void 0,void 0).ser(Qy).de(sj).build(){}D();k();J();class ZL extends W.classBuilder().ep(c).m(function(f,h,w,s){return[z(w,this.serialize,this.deserialize),R(w,f.getEndpointParameterInstructions())]}).s("Route53Domains_v20140515","RegisterDomain",{}).n("Route53DomainsClient","RegisterDomainCommand").f(ok,void 0).ser(Ky).de($j).build(){}D();k();J();class JL extends W.classBuilder().ep(c).m(function(f,h,w,s){return[z(w,this.serialize,this.deserialize),R(w,f.getEndpointParameterInstructions())]}).s("Route53Domains_v20140515","RejectDomainTransferFromAnotherAwsAccount",{}).n("Route53DomainsClient","RejectDomainTransferFromAnotherAwsAccountCommand").f(void 0,void 0).ser(Zy).de(rj).build(){}D();k();J();class VL extends W.classBuilder().ep(c).m(function(f,h,w,s){return[z(w,this.serialize,this.deserialize),R(w,f.getEndpointParameterInstructions())]}).s("Route53Domains_v20140515","RenewDomain",{}).n("Route53DomainsClient","RenewDomainCommand").f(void 0,void 0).ser(Jy).de(Ej).build(){}D();k();J();class PL extends W.classBuilder().ep(c).m(function(f,h,w,s){return[z(w,this.serialize,this.deserialize),R(w,f.getEndpointParameterInstructions())]}).s("Route53Domains_v20140515","ResendContactReachabilityEmail",{}).n("Route53DomainsClient","ResendContactReachabilityEmailCommand").f(void 0,pk).ser(Vy).de(Uj).build(){}D();k();J();class HL extends W.classBuilder().ep(c).m(function(f,h,w,s){return[z(w,this.serialize,this.deserialize),R(w,f.getEndpointParameterInstructions())]}).s("Route53Domains_v20140515","ResendOperationAuthorization",{}).n("Route53DomainsClient","ResendOperationAuthorizationCommand").f(void 0,void 0).ser(Py).de(Tj).build(){}D();k();J();class NL extends W.classBuilder().ep(c).m(function(f,h,w,s){return[z(w,this.serialize,this.deserialize),R(w,f.getEndpointParameterInstructions())]}).s("Route53Domains_v20140515","RetrieveDomainAuthCode",{}).n("Route53DomainsClient","RetrieveDomainAuthCodeCommand").f(void 0,uk).ser(Hy).de(Fj).build(){}D();k();J();class DL extends W.classBuilder().ep(c).m(function(f,h,w,s){return[z(w,this.serialize,this.deserialize),R(w,f.getEndpointParameterInstructions())]}).s("Route53Domains_v20140515","TransferDomain",{}).n("Route53DomainsClient","TransferDomainCommand").f(tk,void 0).ser(Ny).de(Cj).build(){}D();k();J();class qL extends W.classBuilder().ep(c).m(function(f,h,w,s){return[z(w,this.serialize,this.deserialize),R(w,f.getEndpointParameterInstructions())]}).s("Route53Domains_v20140515","TransferDomainToAnotherAwsAccount",{}).n("Route53DomainsClient","TransferDomainToAnotherAwsAccountCommand").f(void 0,fy).ser(Dy).de(Ij).build(){}D();k();J();class kL extends W.classBuilder().ep(c).m(function(f,h,w,s){return[z(w,this.serialize,this.deserialize),R(w,f.getEndpointParameterInstructions())]}).s("Route53Domains_v20140515","UpdateDomainContact",{}).n("Route53DomainsClient","UpdateDomainContactCommand").f(hy,void 0).ser(qy).de(Lj).build(){}D();k();J();class yL extends W.classBuilder().ep(c).m(function(f,h,w,s){return[z(w,this.serialize,this.deserialize),R(w,f.getEndpointParameterInstructions())]}).s("Route53Domains_v20140515","UpdateDomainContactPrivacy",{}).n("Route53DomainsClient","UpdateDomainContactPrivacyCommand").f(void 0,void 0).ser(ky).de(Bj).build(){}D();k();J();class jL extends W.classBuilder().ep(c).m(function(f,h,w,s){return[z(w,this.serialize,this.deserialize),R(w,f.getEndpointParameterInstructions())]}).s("Route53Domains_v20140515","UpdateDomainNameservers",{}).n("Route53DomainsClient","UpdateDomainNameserversCommand").f(wy,void 0).ser(yy).de(Aj).build(){}D();k();J();class OL extends W.classBuilder().ep(c).m(function(f,h,w,s){return[z(w,this.serialize,this.deserialize),R(w,f.getEndpointParameterInstructions())]}).s("Route53Domains_v20140515","UpdateTagsForDomain",{}).n("Route53DomainsClient","UpdateTagsForDomainCommand").f(void 0,void 0).ser(jy).de(Gj).build(){}D();k();J();class lL extends W.classBuilder().ep(c).m(function(f,h,w,s){return[z(w,this.serialize,this.deserialize),R(w,f.getEndpointParameterInstructions())]}).s("Route53Domains_v20140515","ViewBilling",{}).n("Route53DomainsClient","ViewBillingCommand").f(void 0,void 0).ser(Oy).de(Wj).build(){}var Z40={AcceptDomainTransferFromAnotherAwsAccountCommand:$L,AssociateDelegationSignerToDomainCommand:rL,CancelDomainTransferToAnotherAwsAccountCommand:EL,CheckDomainAvailabilityCommand:UL,CheckDomainTransferabilityCommand:TL,DeleteDomainCommand:FL,DeleteTagsForDomainCommand:CL,DisableDomainAutoRenewCommand:IL,DisableDomainTransferLockCommand:LL,DisassociateDelegationSignerFromDomainCommand:BL,EnableDomainAutoRenewCommand:AL,EnableDomainTransferLockCommand:GL,GetContactReachabilityStatusCommand:WL,GetDomainDetailCommand:zL,GetDomainSuggestionsCommand:RL,GetOperationDetailCommand:XL,ListDomainsCommand:SL,ListOperationsCommand:YL,ListPricesCommand:ML,ListTagsForDomainCommand:QL,PushDomainCommand:KL,RegisterDomainCommand:ZL,RejectDomainTransferFromAnotherAwsAccountCommand:JL,RenewDomainCommand:VL,ResendContactReachabilityEmailCommand:PL,ResendOperationAuthorizationCommand:HL,RetrieveDomainAuthCodeCommand:NL,TransferDomainCommand:DL,TransferDomainToAnotherAwsAccountCommand:qL,UpdateDomainContactCommand:kL,UpdateDomainContactPrivacyCommand:yL,UpdateDomainNameserversCommand:jL,UpdateTagsForDomainCommand:OL,ViewBillingCommand:lL};class w4 extends sL{}Es(Z40,w4);import{runAction as J40}from"@stacksjs/actions";import{config as Rj}from"@stacksjs/config";import{Action as V40}from"@stacksjs/enums";import{err as Uh,handleError as vf,ok as Y$}from"@stacksjs/error-handling";import{log as P1}from"@stacksjs/logging";import{path as P40}from"@stacksjs/path";import{fs as zj}from"@stacksjs/storage";async function PO0(f){let h=new dh,w=await h.listHostedZonesByName({DNSName:f});if(!w||!w.HostedZones)return Uh(vf(`No hosted zones found for domain: ${f}`));let s=w.HostedZones.find((r)=>r.Name===`${f}.`);if(!s)return Uh(vf(`Hosted Zone not found for domain: ${f}`));let $=await h.listResourceRecordSets({HostedZoneId:s.Id});if(!$||!$.ResourceRecordSets)return Uh(vf(`No DNS records found for domain: ${f}`));for(let r of $.ResourceRecordSets)if(r.Type!=="NS"&&r.Type!=="SOA")await h.changeResourceRecordSets({HostedZoneId:s.Id,ChangeBatch:{Changes:[{Action:"DELETE",ResourceRecordSet:r}]}});return await h.deleteHostedZone({Id:s.Id}),P1.info(`Deleted Hosted Zone for domain: ${f}`),Y$("success")}async function HO0(f){let h=new dh,w=await h.listHostedZonesByName({DNSName:f});if(!w||!w.HostedZones)return Uh(vf(`No hosted zones found for domain: ${f}`));let s=w.HostedZones.find((r)=>r.Name===`${f}.`);if(!s)return Uh(vf(`Hosted Zone not found for domain: ${f}`));let $=await h.listResourceRecordSets({HostedZoneId:s.Id});if(!$||!$.ResourceRecordSets)return Uh(vf(`No DNS records found for domain: ${f}`));for(let r of $.ResourceRecordSets)if(r.Type!=="NS"&&r.Type!=="SOA")await h.changeResourceRecordSets({HostedZoneId:s.Id,ChangeBatch:{Changes:[{Action:"DELETE",ResourceRecordSet:r}]}});return P1.info(`Deleted DNS records for domain: ${f}`),Y$("success")}async function NO0(f){let h=new dh,s=(await h.listHostedZonesByName({DNSName:f})).HostedZones?.find((r)=>r.Name===`${f}.`);if(s)return Y$(s);let $=await h.createHostedZone({Name:f,CallerReference:`${Date.now()}`});if(!$.HostedZone)return Uh(vf("Failed to create hosted zone"));return Y$($)}function H40(f){try{let h=P40.projectConfigPath("dns.ts"),s=zj.readFileSync(h,"utf-8").replace(/nameservers: \[.*?\]/s,`nameservers: [${f.map(($)=>`'${$}'`).join(", ")}]`);zj.writeFileSync(h,s,"utf-8"),P1.info("Nameservers have been set.")}catch(h){console.error("Error updating nameservers:",h)}}async function DO0(f){try{let h=new dh,{HostedZones:w}=await h.listHostedZonesByName({DNSName:f});if(!w)return Uh(vf(`No hosted zones found for domain ${f}`));let s=w[0];if(s&&s.Name===`${f}.`)return Y$(s.Id);return Y$(null)}catch(h){return Uh(vf(`Failed to find hosted zone for domain ${f}`,h))}}async function N40(f){if(P1.debug("Getting nameservers for domain:",f),!f)return[];try{return(await new w4().getDomainDetail({DomainName:f}))?.Nameservers?.map((s)=>s.Name)||[]}catch(h){vf("Error getting domain detail",h)}}async function D40(f,h){if(!h)h=Rj.app.url;let w=await N40(h);if(w&&f&&JSON.stringify(w.sort())!==JSON.stringify(f.sort()))return P1.info("Updating your domain nameservers to match the ones in your hosted zone..."),P1.debug("Hosted zone nameservers:",f),P1.debug("Domain nameservers:",w),await new w4().updateDomainNameservers({DomainName:h,Nameservers:f.map(($)=>({Name:$}))}),H40(f),P1.info("Nameservers updated."),!0;P1.success("Your nameservers are up to date.")}async function qO0(f){if(P1.debug("Checking if domain has been added to cloud..."),!f)f=Rj.app.url;P1.debug("domainName:",f);let h=new dh,w=await h.listHostedZonesByName({DNSName:f});if(P1.debug("Existing hosted zones:",w),!w||!w.HostedZones)return!1;let s=w.HostedZones.find(($)=>$.Name===`${f}.`);if(s){P1.debug("Hosted zone found:",s);let r=(await h.getHostedZone({Id:s.Id})).DelegationSet?.NameServers||[];return await D40(r,f),!0}return!1}async function kO0(f){return await J40(V40.DomainsAdd,f)}import{Buffer as Kj}from"buffer";import{Buffer as gL}from"buffer";import i40 from"dgram";import c40 from"https";import g40 from"net";import x40 from"tls";import{URL as Sj}from"url";import{promises as _40}from"fs";import{platform as n40}from"os";var q40=Object.create,{getPrototypeOf:k40,defineProperty:Xj,getOwnPropertyNames:y40}=Object,j40=Object.prototype.hasOwnProperty,O40=(f,h,w)=>{w=f!=null?q40(k40(f)):{};let s=h||!f||!f.__esModule?Xj(w,"default",{value:f,enumerable:!0}):w;for(let $ of y40(f))if(!j40.call(s,$))Xj(s,$,{get:()=>f[$],enumerable:!0});return s},l40=(f,h)=>()=>(h||f((h={exports:{}}).exports,h),h.exports),v40=l40((f,h)=>{var w=process||{},s=w.argv||[],$=w.env||{},r=!(!!$.NO_COLOR||s.includes("--no-color"))&&(!!$.FORCE_COLOR||s.includes("--color")||w.platform==="win32"||(w.stdout||{}).isTTY&&$.TERM!=="dumb"||!!$.CI),E=(F,C,I=F)=>(L)=>{let G=""+L,X=G.indexOf(C,F.length);return~X?F+U(G,C,I,X)+C:F+G+C},U=(F,C,I,L)=>{let G="",X=0;do G+=F.substring(X,L)+I,X=L+C.length,L=F.indexOf(C,X);while(~L);return G+F.substring(X)},T=(F=r)=>{let C=F?E:()=>String;return{isColorSupported:F,reset:C("\x1B[0m","\x1B[0m"),bold:C("\x1B[1m","\x1B[22m","\x1B[22m\x1B[1m"),dim:C("\x1B[2m","\x1B[22m","\x1B[22m\x1B[2m"),italic:C("\x1B[3m","\x1B[23m"),underline:C("\x1B[4m","\x1B[24m"),inverse:C("\x1B[7m","\x1B[27m"),hidden:C("\x1B[8m","\x1B[28m"),strikethrough:C("\x1B[9m","\x1B[29m"),black:C("\x1B[30m","\x1B[39m"),red:C("\x1B[31m","\x1B[39m"),green:C("\x1B[32m","\x1B[39m"),yellow:C("\x1B[33m","\x1B[39m"),blue:C("\x1B[34m","\x1B[39m"),magenta:C("\x1B[35m","\x1B[39m"),cyan:C("\x1B[36m","\x1B[39m"),white:C("\x1B[37m","\x1B[39m"),gray:C("\x1B[90m","\x1B[39m"),bgBlack:C("\x1B[40m","\x1B[49m"),bgRed:C("\x1B[41m","\x1B[49m"),bgGreen:C("\x1B[42m","\x1B[49m"),bgYellow:C("\x1B[43m","\x1B[49m"),bgBlue:C("\x1B[44m","\x1B[49m"),bgMagenta:C("\x1B[45m","\x1B[49m"),bgCyan:C("\x1B[46m","\x1B[49m"),bgWhite:C("\x1B[47m","\x1B[49m"),blackBright:C("\x1B[90m","\x1B[39m"),redBright:C("\x1B[91m","\x1B[39m"),greenBright:C("\x1B[92m","\x1B[39m"),yellowBright:C("\x1B[93m","\x1B[39m"),blueBright:C("\x1B[94m","\x1B[39m"),magentaBright:C("\x1B[95m","\x1B[39m"),cyanBright:C("\x1B[96m","\x1B[39m"),whiteBright:C("\x1B[97m","\x1B[39m"),bgBlackBright:C("\x1B[100m","\x1B[49m"),bgRedBright:C("\x1B[101m","\x1B[49m"),bgGreenBright:C("\x1B[102m","\x1B[49m"),bgYellowBright:C("\x1B[103m","\x1B[49m"),bgBlueBright:C("\x1B[104m","\x1B[49m"),bgMagentaBright:C("\x1B[105m","\x1B[49m"),bgCyanBright:C("\x1B[106m","\x1B[49m"),bgWhiteBright:C("\x1B[107m","\x1B[49m")}};h.exports=T(),h.exports.createColors=T}),ih;((f)=>{f[f.A=1]="A",f[f.NS=2]="NS",f[f.CNAME=5]="CNAME",f[f.SOA=6]="SOA",f[f.PTR=12]="PTR",f[f.MX=15]="MX",f[f.TXT=16]="TXT",f[f.AAAA=28]="AAAA",f[f.SRV=33]="SRV",f[f.NAPTR=35]="NAPTR",f[f.OPT=41]="OPT",f[f.SSHFP=44]="SSHFP",f[f.TLSA=52]="TLSA",f[f.DNSKEY=48]="DNSKEY",f[f.CAA=257]="CAA"})(ih||={});var dL;((f)=>{f[f.IN=1]="IN",f[f.CH=3]="CH",f[f.HS=4]="HS"})(dL||={});var Yj;((f)=>{f.Disable="disable",f.Hide="hide",f.Show="show"})(Yj||={});var Mj;((f)=>{f[f.NoError=0]="NoError",f[f.FormErr=1]="FormErr",f[f.ServFail=2]="ServFail",f[f.NXDomain=3]="NXDomain",f[f.NotImp=4]="NotImp",f[f.Refused=5]="Refused",f[f.YXDomain=6]="YXDomain",f[f.YXRRSet=7]="YXRRSet",f[f.NXRRSet=8]="NXRRSet",f[f.NotAuth=9]="NotAuth",f[f.NotZone=10]="NotZone"})(Mj||={});var Qj;((f)=>{f.TruncatedPacket="TRUNCATED_PACKET",f.InvalidLength="INVALID_LENGTH",f.InvalidFormat="INVALID_FORMAT",f.InvalidName="INVALID_NAME",f.InvalidLabel="INVALID_LABEL",f.InvalidPointer="INVALID_POINTER",f.InvalidType="INVALID_TYPE",f.InvalidClass="INVALID_CLASS",f.NetworkError="NETWORK_ERROR"})(Qj||={});function b40(f){if(!f)return;let h=Array.isArray(f)?f:[f],w={};for(let s of h)if(s==="aa"||s==="authoritative")w.authoritative=!0;else if(s==="ad"||s==="authentic")w.authenticData=!0;else if(s==="cd"||s==="checking-disabled")w.checkingDisabled=!0;else if(s.startsWith("bufsize="))w.udpPayloadSize=Number.parseInt(s.split("=")[1]);return w}function S0(f,h,w){if(w)console.debug(`[dnsx:${f}] ${h}`)}var m40=12,d40=63;class s4{response=!1;opcode=0;authoritative=!1;truncated=!1;recursionDesired=!1;recursionAvailable=!1;authenticData=!1;checkingDisabled=!1;responseCode=0;static fromBuffer(f){let h=new s4,w=f.readUInt16BE(0);return h.response=(w&32768)!==0,h.opcode=(w&30720)>>>11,h.authoritative=(w&1024)!==0,h.truncated=(w&512)!==0,h.recursionDesired=(w&256)!==0,h.recursionAvailable=(w&128)!==0,h.authenticData=(w&32)!==0,h.checkingDisabled=(w&16)!==0,h.responseCode=w&15,h}toBuffer(){let f=Kj.alloc(2),h=0;if(this.response)h|=32768;if(h|=(this.opcode&15)<<11,this.authoritative)h|=1024;if(this.truncated)h|=512;if(this.recursionDesired)h|=256;if(this.recursionAvailable)h|=128;if(this.authenticData)h|=32;if(this.checkingDisabled)h|=16;return h|=this.responseCode&15,f.writeUInt16BE(h,0),f}}class iL{buffer;offset;nameOffsets;verbose;constructor(f=512,h){this.buffer=Kj.alloc(f),this.offset=0,this.nameOffsets=new Map,this.verbose=h}writeHeader(f,h,w){S0("encoder",`Writing DNS header: ${JSON.stringify({id:f,flags:{response:h.response,opcode:h.opcode,recursionDesired:h.recursionDesired},counts:w})}`,this.verbose),this.writeUint16(f);let s=h.toBuffer();this.buffer.set(s,this.offset),this.offset+=2,this.writeUint16(w.qdcount),this.writeUint16(w.ancount),this.writeUint16(w.nscount),this.writeUint16(w.arcount)}writeName(f){S0("encoder",`Writing DNS name: ${f}`,this.verbose);let h=f.split(".");for(let w of h){if(w.length>d40)throw new Error(`Label too long: ${w}`);this.buffer[this.offset++]=w.length,this.buffer.write(w,this.offset),this.offset+=w.length}this.buffer[this.offset++]=0}writeQuestion(f){this.writeName(f.name),this.writeUint16(f.type),this.writeUint16(f.class)}writeUint16(f){this.buffer.writeUInt16BE(f,this.offset),this.offset+=2}writeUint32(f){this.buffer.writeUInt32BE(f,this.offset),this.offset+=4}getBuffer(){return this.buffer.slice(0,this.offset)}}class cL{buffer;offset;constructor(f){this.buffer=f,this.offset=0}canRead(f){return this.offset+f<=this.buffer.length}readName(){let f=[],h=!1,w=this.offset;for(let s=0;s<5;s++){if(w>=this.buffer.length)throw new Error("Out of bounds access");let $=this.buffer[w];if($===0){if(!h)this.offset=w+1;break}if(($&192)===192){if(!this.canRead(2))throw new Error("Out of bounds access");if(!h)this.offset=w+2,h=!0;w=($&63)<<8|this.buffer[w+1];continue}if(w++,w+$>this.buffer.length)throw new Error("Out of bounds access");let r=this.buffer.slice(w,w+$).toString("ascii");f.push(r),w+=$}return f.join(".")}readHeader(){if(!this.canRead(m40))throw new Error(`Invalid DNS header size: ${this.buffer.length} bytes`);let f=this.readUint16(),h=s4.fromBuffer(this.buffer.slice(this.offset,this.offset+2));this.offset+=2;let w={qdcount:this.readUint16(),ancount:this.readUint16(),nscount:this.readUint16(),arcount:this.readUint16()};return{id:f,flags:h,counts:w}}readQuestion(){let f=this.readName();if(!this.canRead(4))throw new Error("Out of bounds access");let h=this.readUint16(),w=this.readUint16();return{name:f,type:h,class:w}}readAnswer(){let f=this.readName();if(!this.canRead(10))throw new Error("Out of bounds access");let h=this.readUint16(),w=this.readUint16(),s=this.readUint32(),$=this.readUint16();if(!this.canRead($))throw new Error("Out of bounds access");let r=this.readRData(h,$);return{name:f,type:h,class:w,ttl:s,data:r}}readRData(f,h){let w=this.offset,s;switch(f){case 1:if(h!==4)throw new Error("Invalid IPv4 length");s=this.readIPv4();break;case 28:if(h!==16)throw new Error("Invalid IPv6 length");s=this.readIPv6();break;case 15:if(h<3)throw new Error("Invalid MX record length");s={preference:this.readUint16(),exchange:this.readName()};break;case 16:s=this.readString(h);break;case 5:case 2:case 12:s=this.readName();break;default:s=this.buffer.slice(this.offset,this.offset+h).toString("hex"),this.offset+=h}if(this.offset-w!==h)this.offset=w+h;return s}readUint16(){if(!this.canRead(2))throw new Error("Out of bounds access");let f=this.buffer.readUInt16BE(this.offset);return this.offset+=2,f}readUint32(){if(!this.canRead(4))throw new Error("Out of bounds access");let f=this.buffer.readUInt32BE(this.offset);return this.offset+=4,f}readIPv4(){if(!this.canRead(4))throw new Error("Out of bounds access");let f=[];for(let h=0;h<4;h++)f.push(this.buffer[this.offset++]);return f.join(".")}readIPv6(){if(!this.canRead(16))throw new Error("Out of bounds access");let f=[];for(let h=0;h<8;h++)f.push(this.buffer.readUInt16BE(this.offset).toString(16)),this.offset+=2;return f.join(":")}readString(f){if(!this.canRead(f))throw new Error("Out of bounds access");let h=this.buffer.slice(this.offset,this.offset+f).toString();return this.offset+=f,h}}function Zj(f,h={}){let w=new iL(512,h.verbose),s=new s4;s.recursionDesired=!0,s.response=!1;let $=h.txid??h.id??Math.floor(Math.random()*65536);return w.writeHeader($,s,{qdcount:1,ancount:0,nscount:0,arcount:0}),w.writeQuestion({name:f.name,type:typeof f.type==="string"?ih[f.type]:f.type,class:f.class}),w.getBuffer()}function bL(f){let h=new cL(f);if((f.readUInt16BE(2)&32768)===0)throw new Error("Not a DNS response");let{id:w,flags:s,counts:$}=h.readHeader();for(let T=0;T<$.qdcount;T++)h.readQuestion();let r=[];for(let T=0;T<$.ancount;T++)r.push(h.readAnswer());let E=[];for(let T=0;T<$.nscount;T++)E.push(h.readAnswer());let U=[];for(let T=0;T<$.arcount;T++)U.push(h.readAnswer());return{id:w,flags:s,answers:r,authorities:E,additionals:U}}var Jj;((f)=>{f.UDP="udp",f.TCP="tcp",f.TLS="tls",f.HTTPS="https"})(Jj||={});class qT{static DEFAULT_PORT=53;static TIMEOUT=5000;async query(f,h){return new Promise((w,s)=>{let $=i40.createSocket("udp4"),r,E,U=qT.DEFAULT_PORT;if(f.includes(":")){let[F,C]=f.split(":");E=F;let I=Number.parseInt(C,10);if(I>0&&I<65536)U=I}else E=f;$.on("error",(F)=>{clearTimeout(r),$.close(),s(F)}),$.on("message",(F)=>{clearTimeout(r),$.close(),w(F)}),r=setTimeout(()=>{$.close(),s(new Error("UDP query timed out"))},qT.TIMEOUT);let T=new Uint8Array(h.buffer,h.byteOffset,h.length);$.send(T,U,E,(F)=>{if(F)clearTimeout(r),$.close(),s(F)})})}}class kT{static DEFAULT_PORT=53;static TIMEOUT=5000;async query(f,h){return new Promise((w,s)=>{let $=new g40.Socket,r,E=new Uint8Array(0),U=-1;$.on("error",(C)=>{clearTimeout(r),$.destroy(),s(C)}),$.on("data",(C)=>{let I=new Uint8Array(E.length+C.length);if(I.set(E),I.set(new Uint8Array(C.buffer,C.byteOffset,C.length),E.length),E=I,U===-1&&E.length>=2)U=new DataView(E.buffer,E.byteOffset).getUint16(0)+2;if(U!==-1&&E.length>=U)clearTimeout(r),$.destroy(),w(gL.from(E.slice(2,U)))}),r=setTimeout(()=>{$.destroy(),s(new Error("TCP query timed out"))},kT.TIMEOUT);let[T,F=kT.DEFAULT_PORT]=f.split(":");$.connect(Number(F),T,()=>{let C=new Uint8Array(2);new DataView(C.buffer).setUint16(0,h.length);let I=new Uint8Array(h.buffer,h.byteOffset,h.length),L=new Uint8Array(C.length+I.length);L.set(C),L.set(I,C.length),$.write(L,(G)=>{if(G)clearTimeout(r),$.destroy(),s(G)})})})}}class yT{static DEFAULT_PORT=853;static TIMEOUT=5000;async query(f,h){return new Promise((w,s)=>{let $={host:f.split(":")[0],port:Number(f.split(":")[1])||yT.DEFAULT_PORT,servername:f.split(":")[0]},r,E=x40.connect($,()=>{if(!E.authorized){E.destroy(),s(new Error("TLS authorization failed"));return}let F=new Uint8Array(2);new DataView(F.buffer).setUint16(0,h.length);let C=new Uint8Array(h.buffer,h.byteOffset,h.length),I=new Uint8Array(F.length+C.length);I.set(F),I.set(C,F.length),E.write(I,(L)=>{if(L)clearTimeout(r),E.destroy(),s(L)})}),U=new Uint8Array(0),T=-1;E.on("error",(F)=>{clearTimeout(r),E.destroy(),s(F)}),E.on("data",(F)=>{let C=new Uint8Array(U.length+F.length);if(C.set(U),C.set(new Uint8Array(F.buffer,F.byteOffset,F.length),U.length),U=C,T===-1&&U.length>=2)T=new DataView(U.buffer,U.byteOffset).getUint16(0)+2;if(T!==-1&&U.length>=T)clearTimeout(r),E.destroy(),w(gL.from(U.slice(2,T)))}),r=setTimeout(()=>{E.destroy(),s(new Error("TLS query timed out"))},yT.TIMEOUT)})}}class M${static TIMEOUT=5000;static CONTENT_TYPE="application/dns-message";async query(f,h){return new Promise((w,s)=>{let $;try{$=new Sj(f)}catch{$=new Sj(`https://${f}/dns-query`)}let r={method:"POST",headers:{"Content-Type":M$.CONTENT_TYPE,"Content-Length":h.length.toString(),Accept:M$.CONTENT_TYPE},timeout:M$.TIMEOUT},E=c40.request($,r,(U)=>{let T=[];U.on("data",(F)=>{T.push(new Uint8Array(F.buffer,F.byteOffset,F.length))}),U.on("end",()=>{if(U.statusCode!==200){s(new Error(`HTTPS query failed with status ${U.statusCode}`));return}let F=U.headers["content-type"];if(F!==M$.CONTENT_TYPE){s(new Error(`Invalid content type: ${F}`));return}let C=T.reduce((G,X)=>G+X.length,0),I=new Uint8Array(C),L=0;for(let G of T)I.set(G,L),L+=G.length;w(gL.from(I))})});E.on("error",s),E.on("timeout",()=>{E.destroy(),s(new Error("HTTPS query timed out"))}),E.write(new Uint8Array(h.buffer,h.byteOffset,h.length)),E.end()})}}function mL(f){switch(f){case"udp":return new qT;case"tcp":return new kT;case"tls":return new yT;case"https":return new M$}}class H1{options;static DEFAULT_NAMESERVER="1.1.1.1";static RESOLV_CONF_PATH="/etc/resolv.conf";static WINDOWS_DNS_KEY="SYSTEM\\CurrentControlSet\\Services\\Tcpip\\Parameters\\Nameserver";validateDomainName(f){if(f.includes(".."))throw new Error(`Invalid domain name: ${f} (consecutive dots)`);if(f.startsWith(".")||f.endsWith("."))throw new Error(`Invalid domain name: ${f} (starts or ends with dot)`);if(f.length>253)throw new Error(`Domain name too long: ${f}`);let h=f.split(".");for(let w of h){if(w.length>63)throw new Error(`Label too long in domain: ${f}`);if(!/^[a-z0-9-]+$/i.test(w))throw new Error(`Invalid characters in domain label: ${w}`)}}validateRecordType(f){if(typeof f==="string"){if(!(f.toUpperCase()in ih))throw new Error(`Invalid record type: ${f}`)}else if(typeof f==="number"){if(!Object.values(ih).filter((h)=>typeof h==="number").includes(f))throw new Error(`Invalid record type number: ${f}`)}else throw new TypeError("Record type must be string or number")}constructor(f){this.options={transport:{type:"udp"},verbose:!1,...f},this.validateOptions()}async query(){try{let f=this.determineTransportType();S0("client",`Selected transport type: ${f}`,this.options.verbose);let h=mL(f);if(!h)throw new Error(`Failed to create transport for type: ${f}`);let w=[],s=await this.resolveNameserver();if(S0("client",`Resolved nameserver: ${s}`,this.options.verbose),!s)throw new Error("Failed to resolve nameserver");let $=this.buildQueries();S0("client",`Built ${$.length} queries`,this.options.verbose);for(let r of $){S0("client",`Processing query: ${JSON.stringify({query:r,nameserver:s,transportType:f})}`,this.options.verbose);let E=Zj(r,{txid:this.options.txid,edns:this.options.edns,tweaks:this.options.tweaks,verbose:this.options.verbose});S0("client",`Built DNS request: ${JSON.stringify({hexData:E.toString("hex"),length:E.length,txid:E.readUInt16BE(0),flags:E.readUInt16BE(2).toString(16)})}`,this.options.verbose);let U=this.options.retries||3;for(let T=0;T<U;T++)try{S0("client",`Attempt ${T+1}/${U}`,this.options.verbose);let F=await h.query(s,E);if(S0("client",`Received DNS response: ${JSON.stringify({hexData:F.toString("hex"),length:F.length,txid:F.readUInt16BE(0),flags:F.readUInt16BE(2).toString(16)})}`,this.options.verbose),F.length<12)throw new Error(`Response too short: ${F.length} bytes`);if(!(F.readUInt16BE(2)&32768))throw new Error("Response flag not set in DNS message");let C=bL(F);if(S0("client",`Parsed DNS response: ${JSON.stringify({id:C.id,answerCount:C.answers.length,authorityCount:C.authorities.length,additionalCount:C.additionals.length})}`,this.options.verbose),f==="udp"&&C.flags.truncated){S0("client","Response truncated, retrying with TCP",this.options.verbose);let I=await mL("tcp").query(s,E);w.push(bL(I))}else w.push(C);break}catch(F){if(S0("client",`Attempt ${T+1} failed: ${F.message}`,this.options.verbose),T===U-1)throw S0("client","All retry attempts failed",this.options.verbose),F;let C=2**T*1000;S0("client",`Waiting ${C}ms before retry`,this.options.verbose),await new Promise((I)=>setTimeout(I,C))}}if(w.length===0)throw new Error("No responses received");return w}catch(f){let h=f instanceof Error?f.message:"Unknown error occurred";throw S0("client",`Query failed with error: ${h}`,this.options.verbose),S0("client",`Full error: ${JSON.stringify(f)}`,this.options.verbose),new Error(`DNS query failed: ${h}`)}}buildQueries(){let f=[];if(!this.options.domains?.length)throw new Error("No domains specified");let h=Array.isArray(this.options.domains)?this.options.domains:[this.options.domains],w=this.resolveTypes(),s=this.resolveClasses();for(let $ of h)for(let r of w)for(let E of s)f.push({name:$,type:r,class:E});return S0("client",`Built queries: ${JSON.stringify(f)}`,this.options.verbose),f}resolveTypes(){if(!this.options.type)return[1];return(Array.isArray(this.options.type)?this.options.type:[this.options.type]).map((f)=>{if(this.validateRecordType(f),typeof f==="number")return f;let h=f.toUpperCase();return ih[h]})}resolveClasses(){if(!this.options.class)return[1];return(Array.isArray(this.options.class)?this.options.class:[this.options.class]).map((f)=>{if(typeof f==="number")return f;let h=f.toUpperCase(),w=dL[h];if(w===void 0)throw new Error(`Invalid query class: ${f}`);return w})}validateNameserver(f){if(f.startsWith("https://"))return!0;if(f.includes("%"))return!1;if(/^(?:\d{1,3}\.){3}\d{1,3}$/.test(f))return f.split(".").every((h)=>{let w=Number.parseInt(h,10);return w>=0&&w<=255});if(f.includes(":"))return!1;return!1}async resolveNameserver(){try{if(this.options.nameserver){if(S0("client",`Checking configured nameserver: ${this.options.nameserver}`,this.options.verbose),this.validateNameserver(this.options.nameserver))return this.options.nameserver}let f=n40();S0("client",`Resolving nameserver for platform: ${f}`,this.options.verbose);let h;if(f==="win32")h=await this.resolveWindowsNameserver();else h=await this.resolveUnixNameserver();if(this.validateNameserver(h))return h;return S0("client",`Using default nameserver: ${H1.DEFAULT_NAMESERVER}`,this.options.verbose),H1.DEFAULT_NAMESERVER}catch(f){return S0("client",`Failed to resolve nameserver: ${f.message}`,this.options.verbose),S0("client",`Using default nameserver: ${H1.DEFAULT_NAMESERVER}`,this.options.verbose),H1.DEFAULT_NAMESERVER}}async resolveUnixNameserver(){try{let f=(await _40.readFile(H1.RESOLV_CONF_PATH,"utf-8")).split(`
60
+ `),h=[];for(let s of f){let $=s.trim();if($.startsWith("nameserver")){let[,r]=$.split(/\s+/);if(r&&!r.includes("%"))h.push(r)}}let w=h.find((s)=>!s.includes(":"));if(w)return S0("client",`Using IPv4 nameserver from resolv.conf: ${w}`,this.options.verbose),w;return S0("client",`No valid nameserver found in resolv.conf, using fallback: ${H1.DEFAULT_NAMESERVER}`,this.options.verbose),H1.DEFAULT_NAMESERVER}catch(f){return S0("client",`Failed to read resolv.conf: ${f.message}`,this.options.verbose),S0("client",`Using fallback nameserver: ${H1.DEFAULT_NAMESERVER}`,this.options.verbose),H1.DEFAULT_NAMESERVER}}async resolveWindowsNameserver(){try{return S0("client",`Using default nameserver for Windows: ${H1.DEFAULT_NAMESERVER}`,this.options.verbose),H1.DEFAULT_NAMESERVER}catch(f){throw S0("client",`Failed to get Windows nameserver: ${f.message}`,this.options.verbose),new Error("Failed to get Windows nameserver")}}determineTransportType(){if(this.options.https)return"https";if(this.options.tls)return"tls";if(this.options.tcp)return"tcp";if(this.options.udp)return"udp";if(typeof this.options.transport==="object")return this.options.transport.type||"udp";return"udp"}validateOptions(){if(this.options.domains)for(let f of Array.isArray(this.options.domains)?this.options.domains:[this.options.domains])this.validateDomainName(f);if(this.options.type){let f=Array.isArray(this.options.type)?this.options.type:[this.options.type];for(let h of f)this.validateRecordType(h)}if([this.options.udp,this.options.tcp,this.options.tls,this.options.https].filter(Boolean).length>1)throw new Error("Only one transport type can be specified");if(this.options.https&&!this.options.nameserver?.startsWith("https://"))throw new Error("HTTPS transport requires an HTTPS nameserver URL");S0("client","Options validation completed successfully",this.options.verbose)}}var e40=O40(v40(),1),a40={A:"green",AAAA:"green",CNAME:"yellow",MX:"cyan",NS:"red",PTR:"red",SOA:"magenta",SRV:"cyan",TXT:"yellow",CAA:"red",TLSA:"yellow"};function o40(f,h){if(h.json)return p40(f,h.showDuration);return u40(f,h)}function p40(f,h){let w={responses:f.map((s)=>({id:s.id,answers:s.answers.map(vL),authorities:s.authorities.map(vL),additionals:s.additionals.map(vL)}))};if(h!==void 0)w.duration={ms:h};return JSON.stringify(w,null,2)}function vL(f){let h={name:f.name,type:ih[f.type]||f.type,ttl:f.ttl};switch(f.type){case 1:case 28:return{...h,address:f.data};case 5:case 12:case 2:return{...h,target:f.data};case 15:return{...h,preference:f.data.preference,exchange:f.data.exchange};case 16:return{...h,text:f.data};case 33:return{...h,priority:f.data.priority,weight:f.data.weight,port:f.data.port,target:f.data.target};case 257:return{...h,flags:f.data.flags,tag:f.data.tag,value:f.data.value};default:return{...h,data:f.data}}}function u40(f,h){let w=[];for(let s of f){if(h.short){if(s.answers.length>0)w.push(DT(s.answers[0],h));continue}if(s.answers.length>0)for(let $ of s.answers)w.push(DT($,h));if(s.authorities.length>0){w.push(`
61
+ Authority Records:`);for(let $ of s.authorities)w.push(DT($,h))}if(s.additionals.length>0){w.push(`
62
+ Additional Records:`);for(let $ of s.additionals)w.push(DT($,h))}}if(h.showDuration!==void 0)w.push(`
63
+ Query time: ${fE0(h.showDuration,h.rawSeconds)}`);return w.join(`
64
+ `)}function DT(f,h){let w=ih[f.type]||f.type.toString(),s=a40[w]||"white",$=h.colors.enabled?e40.default[s](w.padEnd(6)):w.padEnd(6),r=t40(f.ttl,h.rawSeconds).padStart(8),E;switch(f.type){case 1:case 28:E=f.data;break;case 5:case 12:case 2:E=f.data;break;case 15:E=`${f.data.preference} ${f.data.exchange}`;break;case 16:E=`"${f.data}"`;break;case 33:E=`${f.data.priority} ${f.data.weight} ${f.data.port} ${f.data.target}`;break;case 257:E=`${f.data.flags} ${f.data.tag} "${f.data.value}"`;break;default:E=JSON.stringify(f.data)}return`${$} ${r} ${f.name.padEnd(30)} ${E}`}function t40(f,h){if(h)return f.toString();if(f<60)return`${f}s`;if(f<3600){let $=Math.floor(f/60),r=f%60;return`${$}m${r}s`}if(f<86400){let $=Math.floor(f/3600),r=Math.floor(f%3600/60);return`${$}h${r}m`}let w=Math.floor(f/86400),s=Math.floor(f%86400/3600);return`${w}d${s}h`}function fE0(f,h){if(h)return`${f}ms`;if(f<1000)return`${f}ms`;return`${(f/1000).toFixed(2)}s`}var{create:hE0,defineProperty:Hj,getOwnPropertyDescriptor:wE0,getOwnPropertyNames:sE0,getPrototypeOf:$E0}=Object,rE0=Object.prototype.hasOwnProperty,EE0=(f,h)=>()=>(h||f((h={exports:{}}).exports,h),h.exports),UE0=(f,h,w,s)=>{if(h&&typeof h=="object"||typeof h=="function")for(let $ of sE0(h))!rE0.call(f,$)&&$!==w&&Hj(f,$,{get:()=>h[$],enumerable:!(s=wE0(h,$))||s.enumerable});return f},TE0=(f,h,w)=>(w=f!=null?hE0($E0(f)):{},UE0(h||!f||!f.__esModule?Hj(w,"default",{value:f,enumerable:!0}):w,f)),FE0=EE0((f,h)=>{function w(E){if(typeof E!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(E))}function s(E,U){for(var T="",F=0,C=-1,I=0,L,G=0;G<=E.length;++G){if(G<E.length)L=E.charCodeAt(G);else{if(L===47)break;L=47}if(L===47){if(!(C===G-1||I===1))if(C!==G-1&&I===2){if(T.length<2||F!==2||T.charCodeAt(T.length-1)!==46||T.charCodeAt(T.length-2)!==46){if(T.length>2){var X=T.lastIndexOf("/");if(X!==T.length-1){X===-1?(T="",F=0):(T=T.slice(0,X),F=T.length-1-T.lastIndexOf("/")),C=G,I=0;continue}}else if(T.length===2||T.length===1){T="",F=0,C=G,I=0;continue}}U&&(T.length>0?T+="/..":T="..",F=2)}else T.length>0?T+="/"+E.slice(C+1,G):T=E.slice(C+1,G),F=G-C-1;C=G,I=0}else L===46&&I!==-1?++I:I=-1}return T}function $(E,U){var T=U.dir||U.root,F=U.base||(U.name||"")+(U.ext||"");return T?T===U.root?T+F:T+E+F:F}var r={resolve:function(){for(var E="",U=!1,T,F=arguments.length-1;F>=-1&&!U;F--){var C;F>=0?C=arguments[F]:(T===void 0&&(T=process.cwd()),C=T),w(C),C.length!==0&&(E=C+"/"+E,U=C.charCodeAt(0)===47)}return E=s(E,!U),U?E.length>0?"/"+E:"/":E.length>0?E:"."},normalize:function(E){if(w(E),E.length===0)return".";var U=E.charCodeAt(0)===47,T=E.charCodeAt(E.length-1)===47;return E=s(E,!U),E.length===0&&!U&&(E="."),E.length>0&&T&&(E+="/"),U?"/"+E:E},isAbsolute:function(E){return w(E),E.length>0&&E.charCodeAt(0)===47},join:function(){if(arguments.length===0)return".";for(var E,U=0;U<arguments.length;++U){var T=arguments[U];w(T),T.length>0&&(E===void 0?E=T:E+="/"+T)}return E===void 0?".":r.normalize(E)},relative:function(E,U){if(w(E),w(U),E===U||(E=r.resolve(E),U=r.resolve(U),E===U))return"";for(var T=1;T<E.length&&E.charCodeAt(T)===47;++T);for(var F=E.length,C=F-T,I=1;I<U.length&&U.charCodeAt(I)===47;++I);for(var L=U.length,G=L-I,X=C<G?C:G,Q=-1,M=0;M<=X;++M){if(M===X){if(G>X){if(U.charCodeAt(I+M)===47)return U.slice(I+M+1);if(M===0)return U.slice(I+M)}else C>X&&(E.charCodeAt(T+M)===47?Q=M:M===0&&(Q=0));break}var q=E.charCodeAt(T+M),N=U.charCodeAt(I+M);if(q!==N)break;q===47&&(Q=M)}var y="";for(M=T+Q+1;M<=F;++M)(M===F||E.charCodeAt(M)===47)&&(y.length===0?y+="..":y+="/..");return y.length>0?y+U.slice(I+Q):(I+=Q,U.charCodeAt(I)===47&&++I,U.slice(I))},_makeLong:function(E){return E},dirname:function(E){if(w(E),E.length===0)return".";for(var U=E.charCodeAt(0),T=U===47,F=-1,C=!0,I=E.length-1;I>=1;--I)if(U=E.charCodeAt(I),U===47){if(!C){F=I;break}}else C=!1;return F===-1?T?"/":".":T&&F===1?"//":E.slice(0,F)},basename:function(E,U){if(U!==void 0&&typeof U!="string")throw new TypeError('"ext" argument must be a string');w(E);var T=0,F=-1,C=!0,I;if(U!==void 0&&U.length>0&&U.length<=E.length){if(U.length===E.length&&U===E)return"";var L=U.length-1,G=-1;for(I=E.length-1;I>=0;--I){var X=E.charCodeAt(I);if(X===47){if(!C){T=I+1;break}}else G===-1&&(C=!1,G=I+1),L>=0&&(X===U.charCodeAt(L)?--L===-1&&(F=I):(L=-1,F=G))}return T===F?F=G:F===-1&&(F=E.length),E.slice(T,F)}else{for(I=E.length-1;I>=0;--I)if(E.charCodeAt(I)===47){if(!C){T=I+1;break}}else F===-1&&(C=!1,F=I+1);return F===-1?"":E.slice(T,F)}},extname:function(E){w(E);for(var U=-1,T=0,F=-1,C=!0,I=0,L=E.length-1;L>=0;--L){var G=E.charCodeAt(L);if(G===47){if(!C){T=L+1;break}continue}F===-1&&(C=!1,F=L+1),G===46?U===-1?U=L:I!==1&&(I=1):U!==-1&&(I=-1)}return U===-1||F===-1||I===0||I===1&&U===F-1&&U===T+1?"":E.slice(U,F)},format:function(E){if(E===null||typeof E!="object")throw new TypeError('The "pathObject" argument must be of type Object. Received type '+typeof E);return $("/",E)},parse:function(E){w(E);var U={root:"",dir:"",base:"",ext:"",name:""};if(E.length===0)return U;var T=E.charCodeAt(0),F=T===47,C;F?(U.root="/",C=1):C=0;for(var I=-1,L=0,G=-1,X=!0,Q=E.length-1,M=0;Q>=C;--Q){if(T=E.charCodeAt(Q),T===47){if(!X){L=Q+1;break}continue}G===-1&&(X=!1,G=Q+1),T===46?I===-1?I=Q:M!==1&&(M=1):I!==-1&&(M=-1)}return I===-1||G===-1||M===0||M===1&&I===G-1&&I===L+1?G!==-1&&(L===0&&F?U.base=U.name=E.slice(1,G):U.base=U.name=E.slice(L,G)):(L===0&&F?(U.name=E.slice(1,I),U.base=E.slice(1,G)):(U.name=E.slice(L,I),U.base=E.slice(L,G)),U.ext=E.slice(I,G)),L>0?U.dir=E.slice(0,L-1):F&&(U.dir="/"),U},sep:"/",delimiter:":",win32:null,posix:null};r.posix=r,h.exports=r}),Nj=TE0(FE0()),g0=Nj,CE0=Nj,Vj=function(f){return f},Dj=function(){throw new Error("Not implemented")};g0.parse??=Dj;CE0.parse??=Dj;var K$={resolve:g0.resolve.bind(g0),normalize:g0.normalize.bind(g0),isAbsolute:g0.isAbsolute.bind(g0),join:g0.join.bind(g0),relative:g0.relative.bind(g0),toNamespacedPath:Vj,dirname:g0.dirname.bind(g0),basename:g0.basename.bind(g0),extname:g0.extname.bind(g0),format:g0.format.bind(g0),parse:g0.parse.bind(g0),sep:"/",delimiter:":",win32:void 0,posix:void 0,_makeLong:Vj},Pj={sep:"\\",delimiter:";",win32:void 0,...K$,posix:K$};K$.win32=Pj.win32=Pj;K$.posix=K$;var{resolve:IE0,normalize:_O0,isAbsolute:nO0,join:eO0,relative:aO0,toNamespacedPath:oO0,dirname:pO0,basename:uO0,extname:tO0,format:fl0,parse:hl0,sep:wl0,delimiter:sl0}=K$;function jT(f,h){if(Array.isArray(h)&&!Array.isArray(f))return h;if(Array.isArray(h)&&Array.isArray(f))return h.map((s,$)=>{let r=f[$];if(Q$(s)&&Q$(r))return jT(r,s);return s});if(!Q$(h)||!Q$(f))return h;let w={...f};for(let s in h)if(Object.prototype.hasOwnProperty.call(h,s)){let $=h[s],r=w[s];if($===null||$===void 0)w[s]=$;else if(Q$($)&&Q$(r))w[s]=jT(r,$);else w[s]=$}return w}function Q$(f){return Boolean(f&&typeof f==="object"&&!Array.isArray(f))}async function LE0({name:f,cwd:h,defaultConfig:w,endpoint:s,headers:$={Accept:"application/json","Content-Type":"application/json"}}){if(typeof window==="undefined"){let r=IE0(h||"../../../",`${f}.config`);try{let E=await import(r),U=E.default||E;return jT(w,U)}catch(E){return w}}if(!s)return console.warn("An API endpoint is required to load the client config."),w;try{let r=await fetch(s,{method:"GET",headers:$});if(!r.ok)throw new Error(`HTTP error! status: ${r.status}`);let E=await r.json();return jT(w,E)}catch(r){return console.error("Failed to load client config:",r),w}}var BE0={verbose:!0},$l0=await LE0({name:"dnsx",defaultConfig:BE0});export{H40 as writeNameserversToConfig,D40 as updateNameservers,bL as parseResponse,b40 as parseProtocolTweaks,qO0 as hasUserDomainBeenAddedToCloud,N40 as getNameservers,o40 as formatOutput,DO0 as findHostedZone,HO0 as deleteHostedZoneRecords,PO0 as deleteHostedZone,S0 as debugLog,mL as createTransport,NO0 as createHostedZone,$l0 as config,Zj as buildQuery,kO0 as addDomain,Qj as WireError,Jj as TransportType,ih as RecordType,dL as QClass,Yj as EDNSMode,Mj as DnsResponseCode,s4 as DnsFlags,iL as DnsEncoder,cL as DnsDecoder,H1 as DnsClient};