@stacksjs/dns 0.70.22 → 0.70.25
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +3 -63
- package/dist/src/drivers/aws.d.ts +28 -0
- package/dist/src/index.d.ts +16 -0
- package/package.json +24 -14
- package/dist/aws.d.ts +0 -12
- package/dist/index.d.ts +0 -2
package/dist/index.js
CHANGED
|
@@ -1,64 +1,4 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
|
|
3
|
-
Deserialization error: to see the raw response, inspect the hidden field {error}.$response on this object.`}catch(F){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 T.$responseBodyText!=="undefined"){if(T.$response)T.$response.body=T.$responseBodyText}}throw T}},"deserializerMiddleware"),IW=OU((h,w)=>(f,s)=>async($)=>{let E=s.endpointV2?.url&&h.urlParser?async()=>h.urlParser(s.endpointV2.url):h.endpoint;if(!E)throw new Error("No valid endpoint provider available.");let T=await w($.input,{...h,endpoint:E});return f({...$,request:T})},"serializerMiddleware"),GW={name:"deserializerMiddleware",step:"deserialize",tags:["DESERIALIZER"],override:!0},BW={name:"serializerMiddleware",step:"serialize",tags:["SERIALIZER"],override:!0};function WW(h,w,f){return{applyToStack:(s)=>{s.add(CW(h,f),GW),s.add(IW(h,w),BW)}}}OU(WW,"getSerdePlugin")});var u0=H((_20,YW)=>{var{defineProperty:w5,getOwnPropertyDescriptor:MO,getOwnPropertyNames:QO}=Object,KO=Object.prototype.hasOwnProperty,Uw=(h,w)=>w5(h,"name",{value:w,configurable:!0}),ZO=(h,w)=>{for(var f in w)w5(h,f,{get:w[f],enumerable:!0})},JO=(h,w,f,s)=>{if(w&&typeof w==="object"||typeof w==="function"){for(let $ of QO(w))if(!KO.call(h,$)&&$!==f)w5(h,$,{get:()=>w[$],enumerable:!(s=MO(w,$))||s.enumerable})}return h},VO=(h)=>JO(w5({},"__esModule",{value:!0}),h),zW={};ZO(zW,{Field:()=>NO,Fields:()=>DO,HttpRequest:()=>qO,HttpResponse:()=>kO,IHttpRequest:()=>AW.HttpRequest,getHttpHandlerExtensionConfiguration:()=>PO,isValidHostname:()=>XW,resolveHttpHandlerRuntimeConfig:()=>HO});YW.exports=VO(zW);var PO=Uw((h)=>{return{setHttpHandler(w){h.httpHandler=w},httpHandler(){return h.httpHandler},updateHttpClientConfig(w,f){h.httpHandler?.updateHttpClientConfig(w,f)},httpHandlerConfigs(){return h.httpHandler.httpHandlerConfigs()}}},"getHttpHandlerExtensionConfiguration"),HO=Uw((h)=>{return{httpHandler:h.httpHandler()}},"resolveHttpHandlerRuntimeConfig"),AW=F1(),NO=class{static{Uw(this,"Field")}constructor({name:h,kind:w=AW.FieldPosition.HEADER,values:f=[]}){this.name=h,this.kind=w,this.values=f}add(h){this.values.push(h)}set(h){this.values=h}remove(h){this.values=this.values.filter((w)=>w!==h)}toString(){return this.values.map((h)=>h.includes(",")||h.includes(" ")?`"${h}"`:h).join(", ")}get(){return this.values}},DO=class{constructor({fields:h=[],encoding:w="utf-8"}){this.entries={},h.forEach(this.setField.bind(this)),this.encoding=w}static{Uw(this,"Fields")}setField(h){this.entries[h.name.toLowerCase()]=h}getField(h){return this.entries[h.toLowerCase()]}removeField(h){delete this.entries[h.toLowerCase()]}getByType(h){return Object.values(this.entries).filter((w)=>w.kind===h)}},qO=class h{static{Uw(this,"HttpRequest")}constructor(w){this.method=w.method||"GET",this.hostname=w.hostname||"localhost",this.port=w.port,this.query=w.query||{},this.headers=w.headers||{},this.body=w.body,this.protocol=w.protocol?w.protocol.slice(-1)!==":"?`${w.protocol}:`:w.protocol:"https:",this.path=w.path?w.path.charAt(0)!=="/"?`/${w.path}`:w.path:"/",this.username=w.username,this.password=w.password,this.fragment=w.fragment}static clone(w){let f=new h({...w,headers:{...w.headers}});if(f.query)f.query=RW(f.query);return f}static isInstance(w){if(!w)return!1;let f=w;return"method"in f&&"protocol"in f&&"hostname"in f&&"path"in f&&typeof f.query==="object"&&typeof f.headers==="object"}clone(){return h.clone(this)}};function RW(h){return Object.keys(h).reduce((w,f)=>{let s=h[f];return{...w,[f]:Array.isArray(s)?[...s]:s}},{})}Uw(RW,"cloneQuery");var kO=class{static{Uw(this,"HttpResponse")}constructor(h){this.statusCode=h.statusCode,this.reason=h.reason,this.headers=h.headers||{},this.body=h.body}static isInstance(h){if(!h)return!1;let w=h;return typeof w.statusCode==="number"&&typeof w.headers==="object"}};function XW(h){return/^[a-z0-9][a-z0-9\.\-]*[a-z0-9]$/.test(h)}Uw(XW,"isValidHostname")});var lU=H((p20,rW)=>{var{defineProperty:f5,getOwnPropertyDescriptor:jO,getOwnPropertyNames:yO}=Object,OO=Object.prototype.hasOwnProperty,lO=(h,w)=>f5(h,"name",{value:w,configurable:!0}),vO=(h,w)=>{for(var f in w)f5(h,f,{get:w[f],enumerable:!0})},bO=(h,w,f,s)=>{if(w&&typeof w==="object"||typeof w==="function"){for(let $ of yO(w))if(!OO.call(h,$)&&$!==f)f5(h,$,{get:()=>w[$],enumerable:!(s=jO(w,$))||s.enumerable})}return h},mO=(h)=>bO(f5({},"__esModule",{value:!0}),h),SW={};vO(SW,{isArrayBuffer:()=>dO});rW.exports=mO(SW);var dO=lO((h)=>typeof ArrayBuffer==="function"&&h instanceof ArrayBuffer||Object.prototype.toString.call(h)==="[object ArrayBuffer]","isArrayBuffer")});var Jf=H((o20,KW)=>{var{defineProperty:s5,getOwnPropertyDescriptor:iO,getOwnPropertyNames:cO}=Object,gO=Object.prototype.hasOwnProperty,MW=(h,w)=>s5(h,"name",{value:w,configurable:!0}),xO=(h,w)=>{for(var f in w)s5(h,f,{get:w[f],enumerable:!0})},_O=(h,w,f,s)=>{if(w&&typeof w==="object"||typeof w==="function"){for(let $ of cO(w))if(!gO.call(h,$)&&$!==f)s5(h,$,{get:()=>w[$],enumerable:!(s=iO(w,$))||s.enumerable})}return h},nO=(h)=>_O(s5({},"__esModule",{value:!0}),h),QW={};xO(QW,{fromArrayBuffer:()=>aO,fromString:()=>pO});KW.exports=nO(QW);var eO=lU(),vU=W0("node:buffer"),aO=MW((h,w=0,f=h.byteLength-w)=>{if(!eO.isArrayBuffer(h))throw new TypeError(`The "input" argument must be ArrayBuffer. Received type ${typeof h} (${h})`);return vU.Buffer.from(h,w,f)},"fromArrayBuffer"),pO=MW((h,w)=>{if(typeof h!=="string")throw new TypeError(`The "input" argument must be of type string. Received type ${typeof h} (${h})`);return w?vU.Buffer.from(h,w):vU.Buffer.from(h)},"fromString")});var VW=H((ZW)=>{Object.defineProperty(ZW,"__esModule",{value:!0});ZW.fromBase64=void 0;var oO=Jf(),uO=/^[A-Za-z0-9+/]*={0,2}$/,tO=(h)=>{if(h.length*3%4!==0)throw new TypeError("Incorrect padding on base64 string.");if(!uO.exec(h))throw new TypeError("Invalid base64 string.");let w=oO.fromString(h,"base64");return new Uint8Array(w.buffer,w.byteOffset,w.byteLength)};ZW.fromBase64=tO});var I1=H((t20,DW)=>{var{defineProperty:$5,getOwnPropertyDescriptor:hl,getOwnPropertyNames:wl}=Object,fl=Object.prototype.hasOwnProperty,bU=(h,w)=>$5(h,"name",{value:w,configurable:!0}),sl=(h,w)=>{for(var f in w)$5(h,f,{get:w[f],enumerable:!0})},$l=(h,w,f,s)=>{if(w&&typeof w==="object"||typeof w==="function"){for(let $ of wl(w))if(!fl.call(h,$)&&$!==f)$5(h,$,{get:()=>w[$],enumerable:!(s=hl(w,$))||s.enumerable})}return h},El=(h)=>$l($5({},"__esModule",{value:!0}),h),PW={};sl(PW,{fromUtf8:()=>NW,toUint8Array:()=>Tl,toUtf8:()=>Ul});DW.exports=El(PW);var HW=Jf(),NW=bU((h)=>{let w=HW.fromString(h,"utf8");return new Uint8Array(w.buffer,w.byteOffset,w.byteLength/Uint8Array.BYTES_PER_ELEMENT)},"fromUtf8"),Tl=bU((h)=>{if(typeof h==="string")return NW(h);if(ArrayBuffer.isView(h))return new Uint8Array(h.buffer,h.byteOffset,h.byteLength/Uint8Array.BYTES_PER_ELEMENT);return new Uint8Array(h)},"toUint8Array"),Ul=bU((h)=>{if(typeof h==="string")return h;if(typeof h!=="object"||typeof h.byteOffset!=="number"||typeof h.byteLength!=="number")throw new Error("@smithy/util-utf8: toUtf8 encoder function only accepts string | Uint8Array.");return HW.fromArrayBuffer(h.buffer,h.byteOffset,h.byteLength).toString("utf8")},"toUtf8")});var jW=H((qW)=>{Object.defineProperty(qW,"__esModule",{value:!0});qW.toBase64=void 0;var Fl=Jf(),Cl=I1(),Il=(h)=>{let w;if(typeof h==="string")w=Cl.fromUtf8(h);else w=h;if(typeof w!=="object"||typeof w.byteOffset!=="number"||typeof w.byteLength!=="number")throw new Error("@smithy/util-base64: toBase64 encoder function only accepts string | Uint8Array.");return Fl.fromArrayBuffer(w.buffer,w.byteOffset,w.byteLength).toString("base64")};qW.toBase64=Il});var p1=H((wE0,E5)=>{var{defineProperty:yW,getOwnPropertyDescriptor:Gl,getOwnPropertyNames:Bl}=Object,Wl=Object.prototype.hasOwnProperty,mU=(h,w,f,s)=>{if(w&&typeof w==="object"||typeof w==="function"){for(let $ of Bl(w))if(!Wl.call(h,$)&&$!==f)yW(h,$,{get:()=>w[$],enumerable:!(s=Gl(w,$))||s.enumerable})}return h},OW=(h,w,f)=>(mU(h,w,"default"),f&&mU(f,w,"default")),Ll=(h)=>mU(yW({},"__esModule",{value:!0}),h),dU={};E5.exports=Ll(dU);OW(dU,VW(),E5.exports);OW(dU,jW(),E5.exports)});var iU=H((vW)=>{Object.defineProperty(vW,"__esModule",{value:!0});vW.ChecksumStream=void 0;var zl=p1(),Al=W0("node:stream");class lW extends Al.Duplex{constructor({expectedChecksum:h,checksum:w,source:f,checksumSourceLocation:s,base64Encoder:$}){var E,T;super();if(typeof f.pipe==="function")this.source=f;else throw new Error(`@smithy/util-stream: unsupported source type ${(T=(E=f===null||f===void 0?void 0:f.constructor)===null||E===void 0?void 0:E.name)!==null&&T!==void 0?T:f} in ChecksumStream.`);this.base64Encoder=$!==null&&$!==void 0?$:zl.toBase64,this.expectedChecksum=h,this.checksum=w,this.checksumSourceLocation=s,this.source.pipe(this)}_read(h){}_write(h,w,f){try{this.checksum.update(h),this.push(h)}catch(s){return f(s)}return f()}async _final(h){try{let w=await this.checksum.digest(),f=this.base64Encoder(w);if(this.expectedChecksum!==f)return h(new Error(`Checksum mismatch: expected "${this.expectedChecksum}" but received "${f}" in response header "${this.checksumSourceLocation}".`))}catch(w){return h(w)}return this.push(null),h()}}vW.ChecksumStream=lW});var Fw=H((mW)=>{Object.defineProperty(mW,"__esModule",{value:!0});mW.isBlob=mW.isReadableStream=void 0;var Rl=(h)=>{var w;return typeof ReadableStream==="function"&&(((w=h===null||h===void 0?void 0:h.constructor)===null||w===void 0?void 0:w.name)===ReadableStream.name||h instanceof ReadableStream)};mW.isReadableStream=Rl;var Xl=(h)=>{var w;return typeof Blob==="function"&&(((w=h===null||h===void 0?void 0:h.constructor)===null||w===void 0?void 0:w.name)===Blob.name||h instanceof Blob)};mW.isBlob=Xl});var xW=H((cW)=>{Object.defineProperty(cW,"__esModule",{value:!0});cW.ChecksumStream=void 0;var Sl=typeof ReadableStream==="function"?ReadableStream:function(){};class iW extends Sl{}cW.ChecksumStream=iW});var eW=H((_W)=>{Object.defineProperty(_W,"__esModule",{value:!0});_W.createChecksumStream=void 0;var rl=p1(),Ml=Fw(),Ql=xW(),Kl=({expectedChecksum:h,checksum:w,source:f,checksumSourceLocation:s,base64Encoder:$})=>{var E,T;if(!Ml.isReadableStream(f))throw new Error(`@smithy/util-stream: unsupported source type ${(T=(E=f===null||f===void 0?void 0:f.constructor)===null||E===void 0?void 0:E.name)!==null&&T!==void 0?T:f} in ChecksumStream.`);let U=$!==null&&$!==void 0?$:rl.toBase64;if(typeof TransformStream!=="function")throw new Error("@smithy/util-stream: unable to instantiate ChecksumStream because API unavailable: ReadableStream/TransformStream.");let F=new TransformStream({start(){},async transform(I,G){w.update(I),G.enqueue(I)},async flush(I){let G=await w.digest(),B=U(G);if(h!==B){let z=new Error(`Checksum mismatch: expected "${h}" but received "${B}" in response header "${s}".`);I.error(z)}else I.terminate()}});f.pipeThrough(F);let C=F.readable;return Object.setPrototypeOf(C,Ql.ChecksumStream.prototype),C};_W.createChecksumStream=Kl});var oW=H((aW)=>{Object.defineProperty(aW,"__esModule",{value:!0});aW.createChecksumStream=void 0;var Zl=Fw(),Jl=iU(),Vl=eW();function Pl(h){if(typeof ReadableStream==="function"&&Zl.isReadableStream(h.source))return Vl.createChecksumStream(h);return new Jl.ChecksumStream(h)}aW.createChecksumStream=Pl});var cU=H((tW)=>{Object.defineProperty(tW,"__esModule",{value:!0});tW.ByteArrayCollector=void 0;class uW{constructor(h){this.allocByteArray=h,this.byteLength=0,this.byteArrays=[]}push(h){this.byteArrays.push(h),this.byteLength+=h.byteLength}flush(){if(this.byteArrays.length===1){let f=this.byteArrays[0];return this.reset(),f}let h=this.allocByteArray(this.byteLength),w=0;for(let f=0;f<this.byteArrays.length;++f){let s=this.byteArrays[f];h.set(s,w),w+=s.byteLength}return this.reset(),h}reset(){this.byteArrays=[],this.byteLength=0}}tW.ByteArrayCollector=uW});var TL=H(($L)=>{Object.defineProperty($L,"__esModule",{value:!0});$L.modeOf=$L.sizeOf=$L.flush=$L.merge=$L.createBufferedReadable=$L.createBufferedReadableStream=void 0;var Hl=cU();function wL(h,w,f){let s=h.getReader(),$=!1,E=0,T=["",new Hl.ByteArrayCollector((C)=>new Uint8Array(C))],U=-1,F=async(C)=>{let{value:I,done:G}=await s.read(),B=I;if(G){if(U!==-1){let z=T5(T,U);if(Vf(z)>0)C.enqueue(z)}C.close()}else{let z=sL(B,!1);if(U!==z){if(U>=0)C.enqueue(T5(T,U));U=z}if(U===-1){C.enqueue(B);return}let Y=Vf(B);E+=Y;let Q=Vf(T[U]);if(Y>=w&&Q===0)C.enqueue(B);else{let M=fL(T,U,B);if(!$&&E>w*2)$=!0,f===null||f===void 0||f.warn(`@smithy/util-stream - stream chunk size ${Y} is below threshold of ${w}, automatically buffering.`);if(M>=w)C.enqueue(T5(T,U));else await F(C)}}};return new ReadableStream({pull:F})}$L.createBufferedReadableStream=wL;$L.createBufferedReadable=wL;function fL(h,w,f){switch(w){case 0:return h[0]+=f,Vf(h[0]);case 1:case 2:return h[w].push(f),Vf(h[w])}}$L.merge=fL;function T5(h,w){switch(w){case 0:let f=h[0];return h[0]="",f;case 1:case 2:return h[w].flush()}throw new Error(`@smithy/util-stream - invalid index ${w} given to flush()`)}$L.flush=T5;function Vf(h){var w,f;return(f=(w=h===null||h===void 0?void 0:h.byteLength)!==null&&w!==void 0?w:h===null||h===void 0?void 0:h.length)!==null&&f!==void 0?f:0}$L.sizeOf=Vf;function sL(h,w=!0){if(w&&typeof Buffer!=="undefined"&&h instanceof Buffer)return 2;if(h instanceof Uint8Array)return 1;if(typeof h==="string")return 0;return-1}$L.modeOf=sL});var IL=H((FL)=>{Object.defineProperty(FL,"__esModule",{value:!0});FL.createBufferedReadable=void 0;var yl=W0("node:stream"),UL=cU(),lh=TL(),Ol=Fw();function ll(h,w,f){if(Ol.isReadableStream(h))return lh.createBufferedReadableStream(h,w,f);let s=new yl.Readable({read(){}}),$=!1,E=0,T=["",new UL.ByteArrayCollector((F)=>new Uint8Array(F)),new UL.ByteArrayCollector((F)=>Buffer.from(new Uint8Array(F)))],U=-1;return h.on("data",(F)=>{let C=lh.modeOf(F,!0);if(U!==C){if(U>=0)s.push(lh.flush(T,U));U=C}if(U===-1){s.push(F);return}let I=lh.sizeOf(F);E+=I;let G=lh.sizeOf(T[U]);if(I>=w&&G===0)s.push(F);else{let B=lh.merge(T,U,F);if(!$&&E>w*2)$=!0,f===null||f===void 0||f.warn(`@smithy/util-stream - stream chunk size ${I} is below threshold of ${w}, automatically buffering.`);if(B>=w)s.push(lh.flush(T,U))}}),h.on("end",()=>{if(U!==-1){let F=lh.flush(T,U);if(lh.sizeOf(F)>0)s.push(F)}s.push(null)}),s}FL.createBufferedReadable=ll});var WL=H((GL)=>{Object.defineProperty(GL,"__esModule",{value:!0});GL.getAwsChunkedEncodingStream=void 0;var vl=W0("node:stream"),bl=(h,w)=>{let{base64Encoder:f,bodyLengthChecker:s,checksumAlgorithmFn:$,checksumLocationName:E,streamHasher:T}=w,U=f!==void 0&&$!==void 0&&E!==void 0&&T!==void 0,F=U?T($,h):void 0,C=new vl.Readable({read:()=>{}});return h.on("data",(I)=>{let G=s(I)||0;C.push(`${G.toString(16)}\r
|
|
4
|
-
`),
|
|
5
|
-
`)}),h.on("end",async()=>{if(C.push(`0\r
|
|
6
|
-
`),U){let I=f(await F);C.push(`${E}:${I}\r
|
|
7
|
-
`),C.push(`\r
|
|
8
|
-
`)}C.push(null)}),C};GL.getAwsChunkedEncodingStream=bl});var AL=H((LL)=>{Object.defineProperty(LL,"__esModule",{value:!0});LL.headStream=void 0;async function ml(h,w){var f;let s=0,$=[],E=h.getReader(),T=!1;while(!T){let{done:C,value:I}=await E.read();if(I)$.push(I),s+=(f=I===null||I===void 0?void 0:I.byteLength)!==null&&f!==void 0?f:0;if(s>=w)break;T=C}E.releaseLock();let U=new Uint8Array(Math.min(w,s)),F=0;for(let C of $){if(C.byteLength>U.byteLength-F){U.set(C.subarray(0,U.byteLength-F),F);break}else U.set(C,F);F+=C.length}return U}LL.headStream=ml});var SL=H((XL)=>{Object.defineProperty(XL,"__esModule",{value:!0});XL.headStream=void 0;var dl=W0("node:stream"),il=AL(),cl=Fw(),gl=(h,w)=>{if(cl.isReadableStream(h))return il.headStream(h,w);return new Promise((f,s)=>{let $=new RL;$.limit=w,h.pipe($),h.on("error",(E)=>{$.end(),s(E)}),$.on("error",s),$.on("finish",function(){let E=new Uint8Array(Buffer.concat(this.buffers));f(E)})})};XL.headStream=gl;class RL extends dl.Writable{constructor(){super(...arguments);this.buffers=[],this.limit=1/0,this.bytesBuffered=0}_write(h,w,f){var s;if(this.buffers.push(h),this.bytesBuffered+=(s=h.byteLength)!==null&&s!==void 0?s:0,this.bytesBuffered>=this.limit){let $=this.bytesBuffered-this.limit,E=this.buffers[this.buffers.length-1];this.buffers[this.buffers.length-1]=E.subarray(0,E.byteLength-$),this.emit("finish")}f()}}});var xU=H((WE0,QL)=>{var{defineProperty:U5,getOwnPropertyDescriptor:xl,getOwnPropertyNames:_l}=Object,nl=Object.prototype.hasOwnProperty,gU=(h,w)=>U5(h,"name",{value:w,configurable:!0}),el=(h,w)=>{for(var f in w)U5(h,f,{get:w[f],enumerable:!0})},al=(h,w,f,s)=>{if(w&&typeof w==="object"||typeof w==="function"){for(let $ of _l(w))if(!nl.call(h,$)&&$!==f)U5(h,$,{get:()=>w[$],enumerable:!(s=xl(w,$))||s.enumerable})}return h},pl=(h)=>al(U5({},"__esModule",{value:!0}),h),rL={};el(rL,{escapeUri:()=>ML,escapeUriPath:()=>ul});QL.exports=pl(rL);var ML=gU((h)=>encodeURIComponent(h).replace(/[!'()*]/g,ol),"escapeUri"),ol=gU((h)=>`%${h.charCodeAt(0).toString(16).toUpperCase()}`,"hexEncode"),ul=gU((h)=>h.split("/").map(ML).join("/"),"escapeUriPath")});var A$=H((LE0,JL)=>{var{defineProperty:F5,getOwnPropertyDescriptor:tl,getOwnPropertyNames:hv}=Object,wv=Object.prototype.hasOwnProperty,fv=(h,w)=>F5(h,"name",{value:w,configurable:!0}),sv=(h,w)=>{for(var f in w)F5(h,f,{get:w[f],enumerable:!0})},$v=(h,w,f,s)=>{if(w&&typeof w==="object"||typeof w==="function"){for(let $ of hv(w))if(!wv.call(h,$)&&$!==f)F5(h,$,{get:()=>w[$],enumerable:!(s=tl(w,$))||s.enumerable})}return h},Ev=(h)=>$v(F5({},"__esModule",{value:!0}),h),KL={};sv(KL,{buildQueryString:()=>ZL});JL.exports=Ev(KL);var _U=xU();function ZL(h){let w=[];for(let f of Object.keys(h).sort()){let s=h[f];if(f=_U.escapeUri(f),Array.isArray(s))for(let $=0,E=s.length;$<E;$++)w.push(`${f}=${_U.escapeUri(s[$])}`);else{let $=f;if(s||typeof s==="string")$+=`=${_U.escapeUri(s)}`;w.push($)}}return w.join("&")}fv(ZL,"buildQueryString")});var C5=H((zE0,mL)=>{var{create:Tv,defineProperty:R$,getOwnPropertyDescriptor:Uv,getOwnPropertyNames:Fv,getPrototypeOf:Cv}=Object,Iv=Object.prototype.hasOwnProperty,Q0=(h,w)=>R$(h,"name",{value:w,configurable:!0}),Gv=(h,w)=>{for(var f in w)R$(h,f,{get:w[f],enumerable:!0})},DL=(h,w,f,s)=>{if(w&&typeof w==="object"||typeof w==="function"){for(let $ of Fv(w))if(!Iv.call(h,$)&&$!==f)R$(h,$,{get:()=>w[$],enumerable:!(s=Uv(w,$))||s.enumerable})}return h},Bv=(h,w,f)=>(f=h!=null?Tv(Cv(h)):{},DL(w||!h||!h.__esModule?R$(f,"default",{value:h,enumerable:!0}):f,h)),Wv=(h)=>DL(R$({},"__esModule",{value:!0}),h),qL={};Gv(qL,{DEFAULT_REQUEST_TIMEOUT:()=>vL,NodeHttp2Handler:()=>Qv,NodeHttpHandler:()=>Yv,streamCollector:()=>Zv});mL.exports=Wv(qL);var kL=u0(),jL=A$(),nU=W0("node:http"),eU=W0("node:https"),Lv=["ECONNRESET","EPIPE","ETIMEDOUT"],yL=Q0((h)=>{let w={};for(let f of Object.keys(h)){let s=h[f];w[f]=Array.isArray(s)?s.join(","):s}return w},"getTransformedHeaders"),X1={setTimeout:(h,w)=>setTimeout(h,w),clearTimeout:(h)=>clearTimeout(h)},VL=1000,zv=Q0((h,w,f=0)=>{if(!f)return-1;let s=Q0(($)=>{let E=X1.setTimeout(()=>{h.destroy(),w(Object.assign(new Error(`Socket timed out without establishing a connection within ${f} ms`),{name:"TimeoutError"}))},f-$),T=Q0((U)=>{if(U?.connecting)U.on("connect",()=>{X1.clearTimeout(E)});else X1.clearTimeout(E)},"doWithSocket");if(h.socket)T(h.socket);else h.on("socket",T)},"registerTimeout");if(f<2000)return s(0),0;return X1.setTimeout(s.bind(null,VL),VL)},"setConnectionTimeout"),Av=3000,Rv=Q0((h,{keepAlive:w,keepAliveMsecs:f},s=Av)=>{if(w!==!0)return-1;let $=Q0(()=>{if(h.socket)h.socket.setKeepAlive(w,f||0);else h.on("socket",(E)=>{E.setKeepAlive(w,f||0)})},"registerListener");if(s===0)return $(),0;return X1.setTimeout($,s)},"setSocketKeepAlive"),PL=3000,Xv=Q0((h,w,f=vL)=>{let s=Q0(($)=>{let E=f-$,T=Q0(()=>{h.destroy(),w(Object.assign(new Error(`Connection timed out after ${f} ms`),{name:"TimeoutError"}))},"onTimeout");if(h.socket)h.socket.setTimeout(E,T),h.on("close",()=>h.socket?.removeListener("timeout",T));else h.setTimeout(E,T)},"registerTimeout");if(0<f&&f<6000)return s(0),0;return X1.setTimeout(s.bind(null,f===0?0:PL),PL)},"setSocketTimeout"),OL=W0("node:stream"),HL=6000;async function aU(h,w,f=HL){let s=w.headers??{},$=s.Expect||s.expect,E=-1,T=!0;if($==="100-continue")T=await Promise.race([new Promise((U)=>{E=Number(X1.setTimeout(()=>U(!0),Math.max(HL,f)))}),new Promise((U)=>{h.on("continue",()=>{X1.clearTimeout(E),U(!0)}),h.on("response",()=>{X1.clearTimeout(E),U(!1)}),h.on("error",()=>{X1.clearTimeout(E),U(!1)})})]);if(T)lL(h,w.body)}Q0(aU,"writeRequestBody");function lL(h,w){if(w instanceof OL.Readable){w.pipe(h);return}if(w){if(Buffer.isBuffer(w)||typeof w==="string"){h.end(w);return}let f=w;if(typeof f==="object"&&f.buffer&&typeof f.byteOffset==="number"&&typeof f.byteLength==="number"){h.end(Buffer.from(f.buffer,f.byteOffset,f.byteLength));return}h.end(Buffer.from(w));return}h.end()}Q0(lL,"writeBody");var vL=0,Yv=class h{constructor(w){this.socketWarningTimestamp=0,this.metadata={handlerProtocol:"http/1.1"},this.configProvider=new Promise((f,s)=>{if(typeof w==="function")w().then(($)=>{f(this.resolveDefaultConfig($))}).catch(s);else f(this.resolveDefaultConfig(w))})}static{Q0(this,"NodeHttpHandler")}static create(w){if(typeof w?.handle==="function")return w;return new h(w)}static checkSocketUsage(w,f,s=console){let{sockets:$,requests:E,maxSockets:T}=w;if(typeof T!=="number"||T===1/0)return f;let U=15000;if(Date.now()-U<f)return f;if($&&E)for(let F in $){let C=$[F]?.length??0,I=E[F]?.length??0;if(C>=T&&I>=2*T)return s?.warn?.(`@smithy/node-http-handler:WARN - socket usage at capacity=${C} and ${I} additional requests are enqueued.
|
|
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 f}resolveDefaultConfig(w){let{requestTimeout:f,connectionTimeout:s,socketTimeout:$,socketAcquisitionWarningTimeout:E,httpAgent:T,httpsAgent:U}=w||{},F=!0,C=50;return{connectionTimeout:s,requestTimeout:f??$,socketAcquisitionWarningTimeout:E,httpAgent:(()=>{if(T instanceof nU.Agent||typeof T?.destroy==="function")return T;return new nU.Agent({keepAlive:!0,maxSockets:50,...T})})(),httpsAgent:(()=>{if(U instanceof eU.Agent||typeof U?.destroy==="function")return U;return new eU.Agent({keepAlive:!0,maxSockets:50,...U})})(),logger:console}}destroy(){this.config?.httpAgent?.destroy(),this.config?.httpsAgent?.destroy()}async handle(w,{abortSignal:f}={}){if(!this.config)this.config=await this.configProvider;return new Promise((s,$)=>{let E=void 0,T=[],U=Q0(async(j)=>{await E,T.forEach(X1.clearTimeout),s(j)},"resolve"),F=Q0(async(j)=>{await E,T.forEach(X1.clearTimeout),$(j)},"reject");if(!this.config)throw new Error("Node HTTP request handler config is not resolved");if(f?.aborted){let j=new Error("Request aborted");j.name="AbortError",F(j);return}let C=w.protocol==="https:",I=C?this.config.httpsAgent:this.config.httpAgent;T.push(X1.setTimeout(()=>{this.socketWarningTimestamp=h.checkSocketUsage(I,this.socketWarningTimestamp,this.config.logger)},this.config.socketAcquisitionWarningTimeout??(this.config.requestTimeout??2000)+(this.config.connectionTimeout??1000)));let G=jL.buildQueryString(w.query||{}),B=void 0;if(w.username!=null||w.password!=null){let j=w.username??"",e=w.password??"";B=`${j}:${e}`}let z=w.path;if(G)z+=`?${G}`;if(w.fragment)z+=`#${w.fragment}`;let Y=w.hostname??"";if(Y[0]==="["&&Y.endsWith("]"))Y=w.hostname.slice(1,-1);else Y=w.hostname;let Q={headers:w.headers,host:Y,method:w.method,path:z,port:w.port,agent:I,auth:B},q=(C?eU.request:nU.request)(Q,(j)=>{let e=new kL.HttpResponse({statusCode:j.statusCode||-1,reason:j.statusMessage,headers:yL(j.headers),body:j});U({response:e})});if(q.on("error",(j)=>{if(Lv.includes(j.code))F(Object.assign(j,{name:"TimeoutError"}));else F(j)}),f){let j=Q0(()=>{q.destroy();let e=new Error("Request aborted");e.name="AbortError",F(e)},"onAbort");if(typeof f.addEventListener==="function"){let e=f;e.addEventListener("abort",j,{once:!0}),q.once("close",()=>e.removeEventListener("abort",j))}else f.onabort=j}T.push(zv(q,F,this.config.connectionTimeout)),T.push(Xv(q,F,this.config.requestTimeout));let N=Q.agent;if(typeof N==="object"&&"keepAlive"in N)T.push(Rv(q,{keepAlive:N.keepAlive,keepAliveMsecs:N.keepAliveMsecs}));E=aU(q,w,this.config.requestTimeout).catch((j)=>{return T.forEach(X1.clearTimeout),$(j)})})}updateHttpClientConfig(w,f){this.config=void 0,this.configProvider=this.configProvider.then((s)=>{return{...s,[w]:f}})}httpHandlerConfigs(){return this.config??{}}},NL=W0("node:http2"),Sv=Bv(W0("node:http2")),rv=class{constructor(h){this.sessions=[],this.sessions=h??[]}static{Q0(this,"NodeHttp2ConnectionPool")}poll(){if(this.sessions.length>0)return this.sessions.shift()}offerLast(h){this.sessions.push(h)}contains(h){return this.sessions.includes(h)}remove(h){this.sessions=this.sessions.filter((w)=>w!==h)}[Symbol.iterator](){return this.sessions[Symbol.iterator]()}destroy(h){for(let w of this.sessions)if(w===h){if(!w.destroyed)w.destroy()}}},Mv=class{constructor(h){if(this.sessionCache=new Map,this.config=h,this.config.maxConcurrency&&this.config.maxConcurrency<=0)throw new RangeError("maxConcurrency must be greater than zero.")}static{Q0(this,"NodeHttp2ConnectionManager")}lease(h,w){let f=this.getUrlString(h),s=this.sessionCache.get(f);if(s){let U=s.poll();if(U&&!this.config.disableConcurrency)return U}let $=Sv.default.connect(f);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 "+h.destination.toString())});$.unref();let E=Q0(()=>{$.destroy(),this.deleteSession(f,$)},"destroySessionCb");if($.on("goaway",E),$.on("error",E),$.on("frameError",E),$.on("close",()=>this.deleteSession(f,$)),w.requestTimeout)$.setTimeout(w.requestTimeout,E);let T=this.sessionCache.get(f)||new rv;return T.offerLast($),this.sessionCache.set(f,T),$}deleteSession(h,w){let f=this.sessionCache.get(h);if(!f)return;if(!f.contains(w))return;f.remove(w),this.sessionCache.set(h,f)}release(h,w){let f=this.getUrlString(h);this.sessionCache.get(f)?.offerLast(w)}destroy(){for(let[h,w]of this.sessionCache){for(let f of w){if(!f.destroyed)f.destroy();w.remove(f)}this.sessionCache.delete(h)}}setMaxConcurrentStreams(h){if(h&&h<=0)throw new RangeError("maxConcurrentStreams must be greater than zero.");this.config.maxConcurrency=h}setDisableConcurrentStreams(h){this.config.disableConcurrency=h}getUrlString(h){return h.destination.toString()}},Qv=class h{constructor(w){this.metadata={handlerProtocol:"h2"},this.connectionManager=new Mv({}),this.configProvider=new Promise((f,s)=>{if(typeof w==="function")w().then(($)=>{f($||{})}).catch(s);else f(w||{})})}static{Q0(this,"NodeHttp2Handler")}static create(w){if(typeof w?.handle==="function")return w;return new h(w)}destroy(){this.connectionManager.destroy()}async handle(w,{abortSignal:f}={}){if(!this.config){if(this.config=await this.configProvider,this.connectionManager.setDisableConcurrentStreams(this.config.disableConcurrentStreams||!1),this.config.maxConcurrentStreams)this.connectionManager.setMaxConcurrentStreams(this.config.maxConcurrentStreams)}let{requestTimeout:s,disableConcurrentStreams:$}=this.config;return new Promise((E,T)=>{let U=!1,F=void 0,C=Q0(async(Y0)=>{await F,E(Y0)},"resolve"),I=Q0(async(Y0)=>{await F,T(Y0)},"reject");if(f?.aborted){U=!0;let Y0=new Error("Request aborted");Y0.name="AbortError",I(Y0);return}let{hostname:G,method:B,port:z,protocol:Y,query:Q}=w,M="";if(w.username!=null||w.password!=null){let Y0=w.username??"",a1=w.password??"";M=`${Y0}:${a1}@`}let q=`${Y}//${M}${G}${z?`:${z}`:""}`,N={destination:new URL(q)},j=this.connectionManager.lease(N,{requestTimeout:this.config?.sessionTimeout,disableConcurrentStreams:$||!1}),e=Q0((Y0)=>{if($)this.destroySession(j);U=!0,I(Y0)},"rejectWithDestroy"),B0=jL.buildQueryString(Q||{}),v0=w.path;if(B0)v0+=`?${B0}`;if(w.fragment)v0+=`#${w.fragment}`;let $1=j.request({...w.headers,[NL.constants.HTTP2_HEADER_PATH]:v0,[NL.constants.HTTP2_HEADER_METHOD]:B});if(j.ref(),$1.on("response",(Y0)=>{let a1=new kL.HttpResponse({statusCode:Y0[":status"]||-1,headers:yL(Y0),body:$1});if(U=!0,C({response:a1}),$)j.close(),this.connectionManager.deleteSession(q,j)}),s)$1.setTimeout(s,()=>{$1.close();let Y0=new Error(`Stream timed out because of no activity for ${s} ms`);Y0.name="TimeoutError",e(Y0)});if(f){let Y0=Q0(()=>{$1.close();let a1=new Error("Request aborted");a1.name="AbortError",e(a1)},"onAbort");if(typeof f.addEventListener==="function"){let a1=f;a1.addEventListener("abort",Y0,{once:!0}),$1.once("close",()=>a1.removeEventListener("abort",Y0))}else f.onabort=Y0}$1.on("frameError",(Y0,a1,Oy)=>{e(new Error(`Frame type id ${Y0} in stream id ${Oy} has failed with code ${a1}.`))}),$1.on("error",e),$1.on("aborted",()=>{e(new Error(`HTTP/2 stream is abnormally aborted in mid-communication with result code ${$1.rstCode}.`))}),$1.on("close",()=>{if(j.unref(),$)j.destroy();if(!U)e(new Error("Unexpected error: http2 request did not get a response"))}),F=aU($1,w,s)})}updateHttpClientConfig(w,f){this.config=void 0,this.configProvider=this.configProvider.then((s)=>{return{...s,[w]:f}})}httpHandlerConfigs(){return this.config??{}}destroySession(w){if(!w.destroyed)w.destroy()}},Kv=class extends OL.Writable{constructor(){super(...arguments);this.bufferedBytes=[]}static{Q0(this,"Collector")}_write(h,w,f){this.bufferedBytes.push(h),f()}},Zv=Q0((h)=>{if(Jv(h))return bL(h);return new Promise((w,f)=>{let s=new Kv;h.pipe(s),h.on("error",($)=>{s.end(),f($)}),s.on("error",f),s.on("finish",function(){let $=new Uint8Array(Buffer.concat(this.bufferedBytes));w($)})})},"streamCollector"),Jv=Q0((h)=>typeof ReadableStream==="function"&&h instanceof ReadableStream,"isReadableStreamInstance");async function bL(h){let w=[],f=h.getReader(),s=!1,$=0;while(!s){let{done:U,value:F}=await f.read();if(F)w.push(F),$+=F.length;s=U}let E=new Uint8Array($),T=0;for(let U of w)E.set(U,T),T+=U.length;return E}Q0(bL,"collectReadableStream")});var eL=H((YE0,nL)=>{var{defineProperty:G5,getOwnPropertyDescriptor:Vv,getOwnPropertyNames:Pv}=Object,Hv=Object.prototype.hasOwnProperty,Ah=(h,w)=>G5(h,"name",{value:w,configurable:!0}),Nv=(h,w)=>{for(var f in w)G5(h,f,{get:w[f],enumerable:!0})},Dv=(h,w,f,s)=>{if(w&&typeof w==="object"||typeof w==="function"){for(let $ of Pv(w))if(!Hv.call(h,$)&&$!==f)G5(h,$,{get:()=>w[$],enumerable:!(s=Vv(w,$))||s.enumerable})}return h},qv=(h)=>Dv(G5({},"__esModule",{value:!0}),h),iL={};Nv(iL,{FetchHttpHandler:()=>jv,keepAliveSupport:()=>I5,streamCollector:()=>Ov});nL.exports=qv(iL);var dL=u0(),kv=A$();function pU(h,w){return new Request(h,w)}Ah(pU,"createRequest");function cL(h=0){return new Promise((w,f)=>{if(h)setTimeout(()=>{let s=new Error(`Request did not complete within ${h} ms`);s.name="TimeoutError",f(s)},h)})}Ah(cL,"requestTimeout");var I5={supported:void 0},jv=class h{static{Ah(this,"FetchHttpHandler")}static create(w){if(typeof w?.handle==="function")return w;return new h(w)}constructor(w){if(typeof w==="function")this.configProvider=w().then((f)=>f||{});else this.config=w??{},this.configProvider=Promise.resolve(this.config);if(I5.supported===void 0)I5.supported=Boolean(typeof Request!=="undefined"&&"keepalive"in pU("https://[::1]"))}destroy(){}async handle(w,{abortSignal:f}={}){if(!this.config)this.config=await this.configProvider;let s=this.config.requestTimeout,$=this.config.keepAlive===!0,E=this.config.credentials;if(f?.aborted){let q=new Error("Request aborted");return q.name="AbortError",Promise.reject(q)}let T=w.path,U=kv.buildQueryString(w.query||{});if(U)T+=`?${U}`;if(w.fragment)T+=`#${w.fragment}`;let F="";if(w.username!=null||w.password!=null){let q=w.username??"",N=w.password??"";F=`${q}:${N}@`}let{port:C,method:I}=w,G=`${w.protocol}//${F}${w.hostname}${C?`:${C}`:""}${T}`,B=I==="GET"||I==="HEAD"?void 0:w.body,z={body:B,headers:new Headers(w.headers),method:I,credentials:E};if(this.config?.cache)z.cache=this.config.cache;if(B)z.duplex="half";if(typeof AbortController!=="undefined")z.signal=f;if(I5.supported)z.keepalive=$;if(typeof this.config.requestInit==="function")Object.assign(z,this.config.requestInit(w));let Y=Ah(()=>{},"removeSignalEventListener"),Q=pU(G,z),M=[fetch(Q).then((q)=>{let N=q.headers,j={};for(let B0 of N.entries())j[B0[0]]=B0[1];if(q.body==null)return q.blob().then((B0)=>({response:new dL.HttpResponse({headers:j,reason:q.statusText,statusCode:q.status,body:B0})}));return{response:new dL.HttpResponse({headers:j,reason:q.statusText,statusCode:q.status,body:q.body})}}),cL(s)];if(f)M.push(new Promise((q,N)=>{let j=Ah(()=>{let e=new Error("Request aborted");e.name="AbortError",N(e)},"onAbort");if(typeof f.addEventListener==="function"){let e=f;e.addEventListener("abort",j,{once:!0}),Y=Ah(()=>e.removeEventListener("abort",j),"removeSignalEventListener")}else f.onabort=j}));return Promise.race(M).finally(Y)}updateHttpClientConfig(w,f){this.config=void 0,this.configProvider=this.configProvider.then((s)=>{return s[w]=f,s})}httpHandlerConfigs(){return this.config??{}}},yv=p1(),Ov=Ah(async(h)=>{if(typeof Blob==="function"&&h instanceof Blob||h.constructor?.name==="Blob"){if(Blob.prototype.arrayBuffer!==void 0)return new Uint8Array(await h.arrayBuffer());return gL(h)}return xL(h)},"streamCollector");async function gL(h){let w=await _L(h),f=yv.fromBase64(w);return new Uint8Array(f)}Ah(gL,"collectBlob");async function xL(h){let w=[],f=h.getReader(),s=!1,$=0;while(!s){let{done:U,value:F}=await f.read();if(F)w.push(F),$+=F.length;s=U}let E=new Uint8Array($),T=0;for(let U of w)E.set(U,T),T+=U.length;return E}Ah(xL,"collectStream");function _L(h){return new Promise((w,f)=>{let s=new FileReader;s.onloadend=()=>{if(s.readyState!==2)return f(new Error("Reader aborted too early"));let $=s.result??"",E=$.indexOf(","),T=E>-1?E+1:$.length;w($.substring(T))},s.onabort=()=>f(new Error("Read aborted")),s.onerror=()=>f(s.error),s.readAsDataURL(h)})}Ah(_L,"readToBase64")});var uU=H((SE0,hz)=>{var{defineProperty:B5,getOwnPropertyDescriptor:lv,getOwnPropertyNames:vv}=Object,bv=Object.prototype.hasOwnProperty,aL=(h,w)=>B5(h,"name",{value:w,configurable:!0}),mv=(h,w)=>{for(var f in w)B5(h,f,{get:w[f],enumerable:!0})},dv=(h,w,f,s)=>{if(w&&typeof w==="object"||typeof w==="function"){for(let $ of vv(w))if(!bv.call(h,$)&&$!==f)B5(h,$,{get:()=>w[$],enumerable:!(s=lv(w,$))||s.enumerable})}return h},iv=(h)=>dv(B5({},"__esModule",{value:!0}),h),pL={};mv(pL,{fromHex:()=>uL,toHex:()=>tL});hz.exports=iv(pL);var oL={},oU={};for(let h=0;h<256;h++){let w=h.toString(16).toLowerCase();if(w.length===1)w=`0${w}`;oL[h]=w,oU[w]=h}function uL(h){if(h.length%2!==0)throw new Error("Hex encoded strings must have an even number length");let w=new Uint8Array(h.length/2);for(let f=0;f<h.length;f+=2){let s=h.slice(f,f+2).toLowerCase();if(s in oU)w[f/2]=oU[s];else throw new Error(`Cannot decode unrecognized sequence ${s} as hexadecimal`)}return w}aL(uL,"fromHex");function tL(h){let w="";for(let f=0;f<h.byteLength;f++)w+=oL[h[f]];return w}aL(tL,"toHex")});var Tz=H(($z)=>{Object.defineProperty($z,"__esModule",{value:!0});$z.sdkStreamMixin=void 0;var cv=eL(),gv=p1(),xv=uU(),_v=I1(),wz=Fw(),fz="The stream has already been transformed.",nv=(h)=>{var w,f;if(!sz(h)&&!wz.isReadableStream(h)){let T=((f=(w=h===null||h===void 0?void 0:h.__proto__)===null||w===void 0?void 0:w.constructor)===null||f===void 0?void 0:f.name)||h;throw new Error(`Unexpected stream implementation, expect Blob or ReadableStream, got ${T}`)}let s=!1,$=async()=>{if(s)throw new Error(fz);return s=!0,await cv.streamCollector(h)},E=(T)=>{if(typeof T.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 T.stream()};return Object.assign(h,{transformToByteArray:$,transformToString:async(T)=>{let U=await $();if(T==="base64")return gv.toBase64(U);else if(T==="hex")return xv.toHex(U);else if(T===void 0||T==="utf8"||T==="utf-8")return _v.toUtf8(U);else if(typeof TextDecoder==="function")return new TextDecoder(T).decode(U);else throw new Error("TextDecoder is not available, please make sure polyfill is provided.")},transformToWebStream:()=>{if(s)throw new Error(fz);if(s=!0,sz(h))return E(h);else if(wz.isReadableStream(h))return h;else throw new Error(`Cannot transform payload to web stream, got ${h}`)}})};$z.sdkStreamMixin=nv;var sz=(h)=>typeof Blob==="function"&&h instanceof Blob});var Iz=H((Fz)=>{Object.defineProperty(Fz,"__esModule",{value:!0});Fz.sdkStreamMixin=void 0;var ev=C5(),av=Jf(),tU=W0("node:stream"),pv=Tz(),Uz="The stream has already been transformed.",ov=(h)=>{var w,f;if(!(h instanceof tU.Readable))try{return pv.sdkStreamMixin(h)}catch(E){let T=((f=(w=h===null||h===void 0?void 0:h.__proto__)===null||w===void 0?void 0:w.constructor)===null||f===void 0?void 0:f.name)||h;throw new Error(`Unexpected stream implementation, expect Stream.Readable instance, got ${T}`)}let s=!1,$=async()=>{if(s)throw new Error(Uz);return s=!0,await ev.streamCollector(h)};return Object.assign(h,{transformToByteArray:$,transformToString:async(E)=>{let T=await $();if(E===void 0||Buffer.isEncoding(E))return av.fromArrayBuffer(T.buffer,T.byteOffset,T.byteLength).toString(E);else return new TextDecoder(E).decode(T)},transformToWebStream:()=>{if(s)throw new Error(Uz);if(h.readableFlowing!==null)throw new Error("The stream has been consumed by other callbacks.");if(typeof tU.Readable.toWeb!=="function")throw new Error("Readable.toWeb() is not supported. Please ensure a polyfill is available.");return s=!0,tU.Readable.toWeb(h)}})};Fz.sdkStreamMixin=ov});var Wz=H((Gz)=>{Object.defineProperty(Gz,"__esModule",{value:!0});Gz.splitStream=void 0;async function uv(h){if(typeof h.stream==="function")h=h.stream();return h.tee()}Gz.splitStream=uv});var Xz=H((Az)=>{Object.defineProperty(Az,"__esModule",{value:!0});Az.splitStream=void 0;var Lz=W0("node:stream"),tv=Wz(),zz=Fw();async function hb(h){if(zz.isReadableStream(h)||zz.isBlob(h))return tv.splitStream(h);let w=new Lz.PassThrough,f=new Lz.PassThrough;return h.pipe(w),h.pipe(f),[w,f]}Az.splitStream=hb});var sF=H((ZE0,Xh)=>{var{defineProperty:W5,getOwnPropertyDescriptor:wb,getOwnPropertyNames:fb}=Object,sb=Object.prototype.hasOwnProperty,fF=(h,w)=>W5(h,"name",{value:w,configurable:!0}),$b=(h,w)=>{for(var f in w)W5(h,f,{get:w[f],enumerable:!0})},hF=(h,w,f,s)=>{if(w&&typeof w==="object"||typeof w==="function"){for(let $ of fb(w))if(!sb.call(h,$)&&$!==f)W5(h,$,{get:()=>w[$],enumerable:!(s=wb(w,$))||s.enumerable})}return h},Cw=(h,w,f)=>(hF(h,w,"default"),f&&hF(f,w,"default")),Eb=(h)=>hF(W5({},"__esModule",{value:!0}),h),Rh={};$b(Rh,{Uint8ArrayBlobAdapter:()=>wF});Xh.exports=Eb(Rh);var Yz=p1(),Sz=I1();function rz(h,w="utf-8"){if(w==="base64")return Yz.toBase64(h);return Sz.toUtf8(h)}fF(rz,"transformToString");function Mz(h,w){if(w==="base64")return wF.mutate(Yz.fromBase64(h));return wF.mutate(Sz.fromUtf8(h))}fF(Mz,"transformFromString");var wF=class h extends Uint8Array{static{fF(this,"Uint8ArrayBlobAdapter")}static fromString(w,f="utf-8"){switch(typeof w){case"string":return Mz(w,f);default:throw new Error(`Unsupported conversion from ${typeof w} to Uint8ArrayBlobAdapter.`)}}static mutate(w){return Object.setPrototypeOf(w,h.prototype),w}transformToString(w="utf-8"){return rz(this,w)}};Cw(Rh,iU(),Xh.exports);Cw(Rh,oW(),Xh.exports);Cw(Rh,IL(),Xh.exports);Cw(Rh,WL(),Xh.exports);Cw(Rh,SL(),Xh.exports);Cw(Rh,Iz(),Xh.exports);Cw(Rh,Xz(),Xh.exports);Cw(Rh,Fw(),Xh.exports)});var Pf=H((JE0,Jz)=>{var{defineProperty:TF,getOwnPropertyDescriptor:Tb,getOwnPropertyNames:Ub}=Object,Fb=Object.prototype.hasOwnProperty,Cb=(h,w)=>{for(var f in w)TF(h,f,{get:w[f],enumerable:!0})},Ib=(h,w,f,s)=>{if(w&&typeof w==="object"||typeof w==="function"){for(let $ of Ub(w))if(!Fb.call(h,$)&&$!==f)TF(h,$,{get:()=>w[$],enumerable:!(s=Tb(w,$))||s.enumerable})}return h},Gb=(h)=>Ib(TF({},"__esModule",{value:!0}),h),Qz={};Cb(Qz,{RequestBuilder:()=>Zz,collectBody:()=>Bb,extendedEncodeURIComponent:()=>EF,requestBuilder:()=>Lb,resolvedPath:()=>Kz});Jz.exports=Gb(Qz);var $F=sF(),Bb=async(h=new Uint8Array,w)=>{if(h instanceof Uint8Array)return $F.Uint8ArrayBlobAdapter.mutate(h);if(!h)return $F.Uint8ArrayBlobAdapter.mutate(new Uint8Array);let f=w.streamCollector(h);return $F.Uint8ArrayBlobAdapter.mutate(await f)};function EF(h){return encodeURIComponent(h).replace(/[!'()*]/g,function(w){return"%"+w.charCodeAt(0).toString(16).toUpperCase()})}var Wb=u0(),Kz=(h,w,f,s,$,E)=>{if(w!=null&&w[f]!==void 0){let T=s();if(T.length<=0)throw new Error("Empty value provided for input HTTP label: "+f+".");h=h.replace($,E?T.split("/").map((U)=>EF(U)).join("/"):EF(T))}else throw new Error("No value provided for input HTTP label: "+f+".");return h};function Lb(h,w){return new Zz(h,w)}var Zz=class{constructor(h,w){this.input=h,this.context=w,this.query={},this.method="",this.headers={},this.path="",this.body=null,this.hostname="",this.resolvePathStack=[]}async build(){let{hostname:h,protocol:w="https",port:f,path:s}=await this.context.endpoint();this.path=s;for(let $ of this.resolvePathStack)$(this.path);return new Wb.HttpRequest({protocol:w,hostname:this.hostname||h,port:f,method:this.method,path:this.path,query:this.query,body:this.body,headers:this.headers})}hn(h){return this.hostname=h,this}bp(h){return this.resolvePathStack.push((w)=>{this.path=`${w?.endsWith("/")?w.slice(0,-1):w||""}`+h}),this}p(h,w,f,s){return this.resolvePathStack.push(($)=>{this.path=Kz($,this.input,h,w,f,s)}),this}h(h){return this.headers=h,this}q(h){return this.query=h,this}b(h){return this.body=h,this}m(h){return this.method=h,this}}});var b0=H((PE0,bz)=>{var{defineProperty:z5,getOwnPropertyDescriptor:zb,getOwnPropertyNames:Ab}=Object,Rb=Object.prototype.hasOwnProperty,j0=(h,w)=>z5(h,"name",{value:w,configurable:!0}),Xb=(h,w)=>{for(var f in w)z5(h,f,{get:w[f],enumerable:!0})},Yb=(h,w,f,s)=>{if(w&&typeof w==="object"||typeof w==="function"){for(let $ of Ab(w))if(!Rb.call(h,$)&&$!==f)z5(h,$,{get:()=>w[$],enumerable:!(s=zb(w,$))||s.enumerable})}return h},Sb=(h)=>Yb(z5({},"__esModule",{value:!0}),h),Vz={};Xb(Vz,{DefaultIdentityProviderConfig:()=>qb,EXPIRATION_MS:()=>lz,HttpApiKeyAuthSigner:()=>kb,HttpBearerAuthSigner:()=>jb,NoAuthSigner:()=>yb,createIsIdentityExpiredFunction:()=>Oz,createPaginator:()=>jz,doesIdentityRequireRefresh:()=>vz,getHttpAuthSchemeEndpointRuleSetPlugin:()=>Mb,getHttpAuthSchemePlugin:()=>Kb,getHttpSigningPlugin:()=>Vb,getSmithyContext:()=>rb,httpAuthSchemeEndpointRuleSetMiddlewareOptions:()=>Nz,httpAuthSchemeMiddleware:()=>UF,httpAuthSchemeMiddlewareOptions:()=>Dz,httpSigningMiddleware:()=>qz,httpSigningMiddlewareOptions:()=>kz,isIdentityExpired:()=>Ob,memoizeIdentityProvider:()=>lb,normalizeProvider:()=>Pb,requestBuilder:()=>Db.requestBuilder,setFeature:()=>yz});bz.exports=Sb(Vz);var L5=F1(),rb=j0((h)=>h[L5.SMITHY_CONTEXT_KEY]||(h[L5.SMITHY_CONTEXT_KEY]={}),"getSmithyContext"),Pz=Tw();function Hz(h){let w=new Map;for(let f of h)w.set(f.schemeId,f);return w}j0(Hz,"convertHttpAuthSchemesToMap");var UF=j0((h,w)=>(f,s)=>async($)=>{let E=h.httpAuthSchemeProvider(await w.httpAuthSchemeParametersProvider(h,s,$.input)),T=Hz(h.httpAuthSchemes),U=Pz.getSmithyContext(s),F=[];for(let C of E){let I=T.get(C.schemeId);if(!I){F.push(`HttpAuthScheme \`${C.schemeId}\` was not enabled for this service.`);continue}let G=I.identityProvider(await w.identityProviderConfigProvider(h));if(!G){F.push(`HttpAuthScheme \`${C.schemeId}\` did not have an IdentityProvider configured.`);continue}let{identityProperties:B={},signingProperties:z={}}=C.propertiesExtractor?.(h,s)||{};C.identityProperties=Object.assign(C.identityProperties||{},B),C.signingProperties=Object.assign(C.signingProperties||{},z),U.selectedHttpAuthScheme={httpAuthOption:C,identity:await G(C.identityProperties),signer:I.signer};break}if(!U.selectedHttpAuthScheme)throw new Error(F.join(`
|
|
12
|
-
`));return f($)},"httpAuthSchemeMiddleware"),Nz={step:"serialize",tags:["HTTP_AUTH_SCHEME"],name:"httpAuthSchemeMiddleware",override:!0,relation:"before",toMiddleware:"endpointV2Middleware"},Mb=j0((h,{httpAuthSchemeParametersProvider:w,identityProviderConfigProvider:f})=>({applyToStack:(s)=>{s.addRelativeTo(UF(h,{httpAuthSchemeParametersProvider:w,identityProviderConfigProvider:f}),Nz)}}),"getHttpAuthSchemeEndpointRuleSetPlugin"),Qb=Zf(),Dz={step:"serialize",tags:["HTTP_AUTH_SCHEME"],name:"httpAuthSchemeMiddleware",override:!0,relation:"before",toMiddleware:Qb.serializerMiddlewareOption.name},Kb=j0((h,{httpAuthSchemeParametersProvider:w,identityProviderConfigProvider:f})=>({applyToStack:(s)=>{s.addRelativeTo(UF(h,{httpAuthSchemeParametersProvider:w,identityProviderConfigProvider:f}),Dz)}}),"getHttpAuthSchemePlugin"),FF=u0(),Zb=j0((h)=>(w)=>{throw w},"defaultErrorHandler"),Jb=j0((h,w)=>{},"defaultSuccessHandler"),qz=j0((h)=>(w,f)=>async(s)=>{if(!FF.HttpRequest.isInstance(s.request))return w(s);let E=Pz.getSmithyContext(f).selectedHttpAuthScheme;if(!E)throw new Error("No HttpAuthScheme was selected: unable to sign request");let{httpAuthOption:{signingProperties:T={}},identity:U,signer:F}=E,C=await w({...s,request:await F.sign(s.request,U,T)}).catch((F.errorHandler||Zb)(T));return(F.successHandler||Jb)(C.response,T),C},"httpSigningMiddleware"),kz={step:"finalizeRequest",tags:["HTTP_SIGNING"],name:"httpSigningMiddleware",aliases:["apiKeyMiddleware","tokenMiddleware","awsAuthMiddleware"],override:!0,relation:"after",toMiddleware:"retryMiddleware"},Vb=j0((h)=>({applyToStack:(w)=>{w.addRelativeTo(qz(h),kz)}}),"getHttpSigningPlugin"),Pb=j0((h)=>{if(typeof h==="function")return h;let w=Promise.resolve(h);return()=>w},"normalizeProvider"),Hb=j0(async(h,w,f,s=(E)=>E,...$)=>{let E=new h(f);return E=s(E)??E,await w.send(E,...$)},"makePagedClientRequest");function jz(h,w,f,s,$){return j0(async function*E(T,U,...F){let C=U,I=T.startingToken??C[f],G=!0,B;while(G){if(C[f]=I,$)C[$]=C[$]??T.pageSize;if(T.client instanceof h)B=await Hb(w,T.client,U,T.withCommand,...F);else throw new Error(`Invalid client, expected instance of ${h.name}`);yield B;let z=I;I=Nb(B,s),G=!!(I&&(!T.stopOnSameToken||I!==z))}return},"paginateOperation")}j0(jz,"createPaginator");var Nb=j0((h,w)=>{let f=h,s=w.split(".");for(let $ of s){if(!f||typeof f!=="object")return;f=f[$]}return f},"get"),Db=Pf();function yz(h,w,f){if(!h.__smithy_context)h.__smithy_context={features:{}};else if(!h.__smithy_context.features)h.__smithy_context.features={};h.__smithy_context.features[w]=f}j0(yz,"setFeature");var qb=class{constructor(h){this.authSchemes=new Map;for(let[w,f]of Object.entries(h))if(f!==void 0)this.authSchemes.set(w,f)}static{j0(this,"DefaultIdentityProviderConfig")}getIdentityProvider(h){return this.authSchemes.get(h)}},kb=class{static{j0(this,"HttpApiKeyAuthSigner")}async sign(h,w,f){if(!f)throw new Error("request could not be signed with `apiKey` since the `name` and `in` signer properties are missing");if(!f.name)throw new Error("request could not be signed with `apiKey` since the `name` signer property is missing");if(!f.in)throw new Error("request could not be signed with `apiKey` since the `in` signer property is missing");if(!w.apiKey)throw new Error("request could not be signed with `apiKey` since the `apiKey` is not defined");let s=FF.HttpRequest.clone(h);if(f.in===L5.HttpApiKeyAuthLocation.QUERY)s.query[f.name]=w.apiKey;else if(f.in===L5.HttpApiKeyAuthLocation.HEADER)s.headers[f.name]=f.scheme?`${f.scheme} ${w.apiKey}`:w.apiKey;else throw new Error("request can only be signed with `apiKey` locations `query` or `header`, but found: `"+f.in+"`");return s}},jb=class{static{j0(this,"HttpBearerAuthSigner")}async sign(h,w,f){let s=FF.HttpRequest.clone(h);if(!w.token)throw new Error("request could not be signed with `token` since the `token` is not defined");return s.headers.Authorization=`Bearer ${w.token}`,s}},yb=class{static{j0(this,"NoAuthSigner")}async sign(h,w,f){return h}},Oz=j0((h)=>(w)=>vz(w)&&w.expiration.getTime()-Date.now()<h,"createIsIdentityExpiredFunction"),lz=300000,Ob=Oz(lz),vz=j0((h)=>h.expiration!==void 0,"doesIdentityRequireRefresh"),lb=j0((h,w,f)=>{if(h===void 0)return;let s=typeof h!=="function"?async()=>Promise.resolve(h):h,$,E,T,U=!1,F=j0(async(C)=>{if(!E)E=s(C);try{$=await E,T=!0,U=!1}finally{E=void 0}return $},"coalesceProvider");if(w===void 0)return async(C)=>{if(!T||C?.forceRefresh)$=await F(C);return $};return async(C)=>{if(!T||C?.forceRefresh)$=await F(C);if(U)return $;if(!f($))return U=!0,$;if(w($))return await F(C),$;return $}},"memoizeIdentityProvider")});function vb(h){if(h===void 0)return!0;return typeof h==="string"&&h.length<=50}function Hf(h){let w=mz.normalizeProvider(h.userAgentAppId??CF),{customUserAgent:f}=h;return Object.assign(h,{customUserAgent:typeof f==="string"?[[f]]:f,userAgentAppId:async()=>{let s=await w();if(!vb(s)){let $=h.logger?.constructor?.name==="NoOpLogger"||!h.logger?console:h.logger;if(typeof s!=="string")$?.warn("userAgentAppId must be a string or undefined.");else if(s.length>50)$?.warn("The provided userAgentAppId exceeds the maximum length of 50 characters.")}return s}})}var mz,CF=void 0;var dz=L(()=>{mz=O(b0(),1)});class dw{constructor({size:h,params:w}){if(this.data=new Map,this.parameters=[],this.capacity=h??50,w)this.parameters=w}get(h,w){let f=this.hash(h);if(f===!1)return w();if(!this.data.has(f)){if(this.data.size>this.capacity+10){let s=this.data.keys(),$=0;while(!0){let{value:E,done:T}=s.next();if(this.data.delete(E),T||++$>10)break}}this.data.set(f,w())}return this.data.get(f)}size(){return this.data.size}hash(h){let w="",{parameters:f}=this;if(f.length===0)return!1;for(let s of f){let $=String(h[s]??"");if($.includes("|;"))return!1;w+=$+"|;"}return w}}var bb,X$=(h)=>bb.test(h)||h.startsWith("[")&&h.endsWith("]");var IF=L(()=>{bb=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 mb,Y$=(h,w=!1)=>{if(!w)return mb.test(h);let f=h.split(".");for(let s of f)if(!Y$(s))return!1;return!0};var GF=L(()=>{mb=new RegExp("^(?!.*-$)(?!-)[a-zA-Z0-9-]{1,63}$")});var o1;var A5=L(()=>{o1={}});var vh="endpoints";function H1(h){if(typeof h!=="object"||h==null)return h;if("ref"in h)return`$${H1(h.ref)}`;if("fn"in h)return`${h.fn}(${(h.argv||[]).map(H1).join(", ")})`;return JSON.stringify(h,null,2)}var S$=()=>{};var P0;var iz=L(()=>{P0=class P0 extends Error{constructor(h){super(h);this.name="EndpointError"}}});var cz=()=>{};var gz=()=>{};var xz=()=>{};var _z=()=>{};var nz=()=>{};var ez=()=>{};var N1=L(()=>{iz();cz();gz();xz();_z();nz();ez()});var az=(h,w)=>h===w;var pz=(h)=>{let w=h.split("."),f=[];for(let s of w){let $=s.indexOf("[");if($!==-1){if(s.indexOf("]")!==s.length-1)throw new P0(`Path: '${h}' does not end with ']'`);let E=s.slice($+1,-1);if(Number.isNaN(parseInt(E)))throw new P0(`Invalid array index: '${E}' in path: '${h}'`);if($!==0)f.push(s.slice(0,$));f.push(E)}else f.push(s)}return f};var oz=L(()=>{N1()});var R5=(h,w)=>pz(w).reduce((f,s)=>{if(typeof f!=="object")throw new P0(`Index '${s}' in '${w}' not found in '${JSON.stringify(h)}'`);else if(Array.isArray(f))return f[parseInt(s)];return f[s]},h);var uz=L(()=>{N1();oz()});var tz=(h)=>h!=null;var h7=(h)=>!h;var X5,BF,w7=(h)=>{let w=(()=>{try{if(h instanceof URL)return h;if(typeof h==="object"&&"hostname"in h){let{hostname:B,port:z,protocol:Y="",path:Q="",query:M={}}=h,q=new URL(`${Y}//${B}${z?`:${z}`:""}${Q}`);return q.search=Object.entries(M).map(([N,j])=>`${N}=${j}`).join("&"),q}return new URL(h)}catch(B){return null}})();if(!w)return console.error(`Unable to parse ${JSON.stringify(h)} as a whatwg URL.`),null;let f=w.href,{host:s,hostname:$,pathname:E,protocol:T,search:U}=w;if(U)return null;let F=T.slice(0,-1);if(!Object.values(X5.EndpointURLScheme).includes(F))return null;let C=X$($),I=f.includes(`${s}:${BF[F]}`)||typeof h==="string"&&h.includes(`${s}:${BF[F]}`),G=`${s}${I?`:${BF[F]}`:""}`;return{scheme:F,authority:G,path:E,normalizedPath:E.endsWith("/")?E:`${E}/`,isIp:C}};var f7=L(()=>{X5=O(F1(),1);IF();BF={[X5.EndpointURLScheme.HTTP]:80,[X5.EndpointURLScheme.HTTPS]:443}});var s7=(h,w)=>h===w;var $7=(h,w,f,s)=>{if(w>=f||h.length<f)return null;if(!s)return h.substring(w,f);return h.substring(h.length-f,h.length-w)};var E7=(h)=>encodeURIComponent(h).replace(/[!*'()]/g,(w)=>`%${w.charCodeAt(0).toString(16).toUpperCase()}`);var WF=L(()=>{uz();GF();f7()});var T7;var U7=L(()=>{WF();T7={booleanEquals:az,getAttr:R5,isSet:tz,isValidHostLabel:Y$,not:h7,parseURL:w7,stringEquals:s7,substring:$7,uriEncode:E7}});var Y5=(h,w)=>{let f=[],s={...w.endpointParams,...w.referenceRecord},$=0;while($<h.length){let E=h.indexOf("{",$);if(E===-1){f.push(h.slice($));break}f.push(h.slice($,E));let T=h.indexOf("}",E);if(T===-1){f.push(h.slice(E));break}if(h[E+1]==="{"&&h[T+1]==="}")f.push(h.slice(E+1,T)),$=T+2;let U=h.substring(E+1,T);if(U.includes("#")){let[F,C]=U.split("#");f.push(R5(s[F],C))}else f.push(s[U]);$=T+1}return f.join("")};var LF=L(()=>{WF()});var F7=({ref:h},w)=>{return{...w.endpointParams,...w.referenceRecord}[h]};var Iw=(h,w,f)=>{if(typeof h==="string")return Y5(h,f);else if(h.fn)return S5(h,f);else if(h.ref)return F7(h,f);throw new P0(`'${w}': ${String(h)} is not a string, function or reference.`)};var r$=L(()=>{N1();zF();LF()});var S5=({fn:h,argv:w},f)=>{let s=w.map((E)=>["boolean","number"].includes(typeof E)?E:Iw(E,"arg",f)),$=h.split(".");if($[0]in o1&&$[1]!=null)return o1[$[0]][$[1]](...s);return T7[h](...s)};var zF=L(()=>{A5();U7();r$()});var C7=({assign:h,...w},f)=>{if(h&&h in f.referenceRecord)throw new P0(`'${h}' is already defined in Reference Record.`);let s=S5(w,f);return f.logger?.debug?.(`${vh} evaluateCondition: ${H1(w)} = ${H1(s)}`),{result:s===""?!0:!!s,...h!=null&&{toAssign:{name:h,value:s}}}};var I7=L(()=>{S$();N1();zF()});var Nf=(h=[],w)=>{let f={};for(let s of h){let{result:$,toAssign:E}=C7(s,{...w,referenceRecord:{...w.referenceRecord,...f}});if(!$)return{result:$};if(E)f[E.name]=E.value,w.logger?.debug?.(`${vh} assign: ${E.name} := ${H1(E.value)}`)}return{result:!0,referenceRecord:f}};var r5=L(()=>{S$();I7()});var G7=(h,w)=>Object.entries(h).reduce((f,[s,$])=>({...f,[s]:$.map((E)=>{let T=Iw(E,"Header value entry",w);if(typeof T!=="string")throw new P0(`Header '${s}' value '${T}' is not a string`);return T})}),{});var B7=L(()=>{N1();r$()});var AF=(h,w)=>{if(Array.isArray(h))return h.map((f)=>AF(f,w));switch(typeof h){case"string":return Y5(h,w);case"object":if(h===null)throw new P0(`Unexpected endpoint property: ${h}`);return M5(h,w);case"boolean":return h;default:throw new P0(`Unexpected endpoint property type: ${typeof h}`)}};var W7=L(()=>{N1();LF();RF()});var M5=(h,w)=>Object.entries(h).reduce((f,[s,$])=>({...f,[s]:AF($,w)}),{});var RF=L(()=>{W7()});var L7=(h,w)=>{let f=Iw(h,"Endpoint URL",w);if(typeof f==="string")try{return new URL(f)}catch(s){throw console.error(`Failed to construct URL with ${f}`,s),s}throw new P0(`Endpoint URL must be a string, got ${typeof f}`)};var z7=L(()=>{N1();r$()});var A7=(h,w)=>{let{conditions:f,endpoint:s}=h,{result:$,referenceRecord:E}=Nf(f,w);if(!$)return;let T={...w,referenceRecord:{...w.referenceRecord,...E}},{url:U,properties:F,headers:C}=s;return w.logger?.debug?.(`${vh} Resolving endpoint from template: ${H1(s)}`),{...C!=null&&{headers:G7(C,T)},...F!=null&&{properties:M5(F,T)},url:L7(U,T)}};var R7=L(()=>{S$();r5();B7();RF();z7()});var X7=(h,w)=>{let{conditions:f,error:s}=h,{result:$,referenceRecord:E}=Nf(f,w);if(!$)return;throw new P0(Iw(s,"Error",{...w,referenceRecord:{...w.referenceRecord,...E}}))};var Y7=L(()=>{N1();r5();r$()});var S7=(h,w)=>{let{conditions:f,rules:s}=h,{result:$,referenceRecord:E}=Nf(f,w);if(!$)return;return Q5(s,{...w,referenceRecord:{...w.referenceRecord,...E}})};var r7=L(()=>{r5();XF()});var Q5=(h,w)=>{for(let f of h)if(f.type==="endpoint"){let s=A7(f,w);if(s)return s}else if(f.type==="error")X7(f,w);else if(f.type==="tree"){let s=S7(f,w);if(s)return s}else throw new P0(`Unknown endpoint rule: ${f}`);throw new P0("Rules evaluation failed")};var XF=L(()=>{N1();R7();Y7();r7()});var M7=L(()=>{A5();XF()});var iw=(h,w)=>{let{endpointParams:f,logger:s}=w,{parameters:$,rules:E}=h;w.logger?.debug?.(`${vh} Initial EndpointParams: ${H1(f)}`);let T=Object.entries($).filter(([,C])=>C.default!=null).map(([C,I])=>[C,I.default]);if(T.length>0)for(let[C,I]of T)f[C]=f[C]??I;let U=Object.entries($).filter(([,C])=>C.required).map(([C])=>C);for(let C of U)if(f[C]==null)throw new P0(`Missing required parameter: '${C}'`);let F=Q5(E,{endpointParams:f,logger:s,referenceRecord:{}});return w.logger?.debug?.(`${vh} Resolved endpoint: ${H1(F)}`),F};var Q7=L(()=>{S$();N1();M7()});var bh=L(()=>{IF();GF();A5();Q7();N1()});var YF=L(()=>{bh()});var SF=(h,w=!1)=>{if(w){for(let f of h.split("."))if(!SF(f))return!1;return!0}if(!Y$(h))return!1;if(h.length<3||h.length>63)return!1;if(h!==h.toLowerCase())return!1;if(X$(h))return!1;return!0};var K7=L(()=>{bh();YF()});var Z7=(h)=>{let w=h.split(":");if(w.length<6)return null;let[f,s,$,E,T,...U]=w;if(f!=="arn"||s===""||$===""||U.join(":")==="")return null;let F=U.map((C)=>C.split("/")).flat();return{partition:s,service:$,region:E,accountId:T,resourceId:F}};var V7;var J7=L(()=>{V7={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 ib,cb="",P7=(h)=>{let{partitions:w}=ib;for(let s of w){let{regions:$,outputs:E}=s;for(let[T,U]of Object.entries($))if(T===h)return{...E,...U}}for(let s of w){let{regionRegex:$,outputs:E}=s;if(new RegExp($).test(h))return{...E}}let f=w.find((s)=>s.id==="aws");if(!f)throw new Error("Provided region was not found in the partition array or regex, and default partition with id 'aws' doesn't exist.");return{...f.outputs}},H7=()=>cb;var rF=L(()=>{J7();ib=V7});var cw;var N7=L(()=>{bh();K7();rF();cw={isVirtualHostableS3Bucket:SF,parseArn:Z7,partition:P7};o1.aws=cw});var D7=L(()=>{bh()});var q7=L(()=>{bh()});var k7=()=>{};var j7=()=>{};var y7=()=>{};var O7=()=>{};var l7=()=>{};var v7=L(()=>{q7();k7();j7();y7();O7();l7()});var M$=L(()=>{N7();rF();YF();D7();v7()});var V5=H((CF0,J5)=>{var b7,m7,d7,i7,c7,g7,x7,_7,n7,e7,a7,p7,o7,K5,MF,u7,t7,hA,Df,wA,fA,sA,$A,EA,TA,UA,FA,CA,Z5,IA,GA,BA;(function(h){var w=typeof global==="object"?global:typeof self==="object"?self:typeof this==="object"?this:{};if(typeof define==="function"&&define.amd)define("tslib",["exports"],function(s){h(f(w,f(s)))});else if(typeof J5==="object"&&typeof CF0==="object")h(f(w,f(CF0)));else h(f(w));function f(s,$){if(s!==w)if(typeof Object.create==="function")Object.defineProperty(s,"__esModule",{value:!0});else s.__esModule=!0;return function(E,T){return s[E]=$?$(E,T):T}}})(function(h){var w=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(E,T){E.__proto__=T}||function(E,T){for(var U in T)if(Object.prototype.hasOwnProperty.call(T,U))E[U]=T[U]};b7=function(E,T){if(typeof T!=="function"&&T!==null)throw new TypeError("Class extends value "+String(T)+" is not a constructor or null");w(E,T);function U(){this.constructor=E}E.prototype=T===null?Object.create(T):(U.prototype=T.prototype,new U)},m7=Object.assign||function(E){for(var T,U=1,F=arguments.length;U<F;U++){T=arguments[U];for(var C in T)if(Object.prototype.hasOwnProperty.call(T,C))E[C]=T[C]}return E},d7=function(E,T){var U={};for(var F in E)if(Object.prototype.hasOwnProperty.call(E,F)&&T.indexOf(F)<0)U[F]=E[F];if(E!=null&&typeof Object.getOwnPropertySymbols==="function"){for(var C=0,F=Object.getOwnPropertySymbols(E);C<F.length;C++)if(T.indexOf(F[C])<0&&Object.prototype.propertyIsEnumerable.call(E,F[C]))U[F[C]]=E[F[C]]}return U},i7=function(E,T,U,F){var C=arguments.length,I=C<3?T:F===null?F=Object.getOwnPropertyDescriptor(T,U):F,G;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")I=Reflect.decorate(E,T,U,F);else for(var B=E.length-1;B>=0;B--)if(G=E[B])I=(C<3?G(I):C>3?G(T,U,I):G(T,U))||I;return C>3&&I&&Object.defineProperty(T,U,I),I},c7=function(E,T){return function(U,F){T(U,F,E)}},g7=function(E,T,U,F,C,I){function G(v0){if(v0!==void 0&&typeof v0!=="function")throw new TypeError("Function expected");return v0}var B=F.kind,z=B==="getter"?"get":B==="setter"?"set":"value",Y=!T&&E?F.static?E:E.prototype:null,Q=T||(Y?Object.getOwnPropertyDescriptor(Y,F.name):{}),M,q=!1;for(var N=U.length-1;N>=0;N--){var j={};for(var e in F)j[e]=e==="access"?{}:F[e];for(var e in F.access)j.access[e]=F.access[e];j.addInitializer=function(v0){if(q)throw new TypeError("Cannot add initializers after decoration has completed");I.push(G(v0||null))};var B0=U[N](B==="accessor"?{get:Q.get,set:Q.set}:Q[z],j);if(B==="accessor"){if(B0===void 0)continue;if(B0===null||typeof B0!=="object")throw new TypeError("Object expected");if(M=G(B0.get))Q.get=M;if(M=G(B0.set))Q.set=M;if(M=G(B0.init))C.unshift(M)}else if(M=G(B0))if(B==="field")C.unshift(M);else Q[z]=M}if(Y)Object.defineProperty(Y,F.name,Q);q=!0},x7=function(E,T,U){var F=arguments.length>2;for(var C=0;C<T.length;C++)U=F?T[C].call(E,U):T[C].call(E);return F?U:void 0},_7=function(E){return typeof E==="symbol"?E:"".concat(E)},n7=function(E,T,U){if(typeof T==="symbol")T=T.description?"[".concat(T.description,"]"):"";return Object.defineProperty(E,"name",{configurable:!0,value:U?"".concat(U," ",T):T})},e7=function(E,T){if(typeof Reflect==="object"&&typeof Reflect.metadata==="function")return Reflect.metadata(E,T)},a7=function(E,T,U,F){function C(I){return I instanceof U?I:new U(function(G){G(I)})}return new(U||(U=Promise))(function(I,G){function B(Q){try{Y(F.next(Q))}catch(M){G(M)}}function z(Q){try{Y(F.throw(Q))}catch(M){G(M)}}function Y(Q){Q.done?I(Q.value):C(Q.value).then(B,z)}Y((F=F.apply(E,T||[])).next())})},p7=function(E,T){var U={label:0,sent:function(){if(I[0]&1)throw I[1];return I[1]},trys:[],ops:[]},F,C,I,G=Object.create((typeof Iterator==="function"?Iterator:Object).prototype);return G.next=B(0),G.throw=B(1),G.return=B(2),typeof Symbol==="function"&&(G[Symbol.iterator]=function(){return this}),G;function B(Y){return function(Q){return z([Y,Q])}}function z(Y){if(F)throw new TypeError("Generator is already executing.");while(G&&(G=0,Y[0]&&(U=0)),U)try{if(F=1,C&&(I=Y[0]&2?C.return:Y[0]?C.throw||((I=C.return)&&I.call(C),0):C.next)&&!(I=I.call(C,Y[1])).done)return I;if(C=0,I)Y=[Y[0]&2,I.value];switch(Y[0]){case 0:case 1:I=Y;break;case 4:return U.label++,{value:Y[1],done:!1};case 5:U.label++,C=Y[1],Y=[0];continue;case 7:Y=U.ops.pop(),U.trys.pop();continue;default:if((I=U.trys,!(I=I.length>0&&I[I.length-1]))&&(Y[0]===6||Y[0]===2)){U=0;continue}if(Y[0]===3&&(!I||Y[1]>I[0]&&Y[1]<I[3])){U.label=Y[1];break}if(Y[0]===6&&U.label<I[1]){U.label=I[1],I=Y;break}if(I&&U.label<I[2]){U.label=I[2],U.ops.push(Y);break}if(I[2])U.ops.pop();U.trys.pop();continue}Y=T.call(E,U)}catch(Q){Y=[6,Q],C=0}finally{F=I=0}if(Y[0]&5)throw Y[1];return{value:Y[0]?Y[1]:void 0,done:!0}}},o7=function(E,T){for(var U in E)if(U!=="default"&&!Object.prototype.hasOwnProperty.call(T,U))Z5(T,E,U)},Z5=Object.create?function(E,T,U,F){if(F===void 0)F=U;var C=Object.getOwnPropertyDescriptor(T,U);if(!C||("get"in C?!T.__esModule:C.writable||C.configurable))C={enumerable:!0,get:function(){return T[U]}};Object.defineProperty(E,F,C)}:function(E,T,U,F){if(F===void 0)F=U;E[F]=T[U]},K5=function(E){var T=typeof Symbol==="function"&&Symbol.iterator,U=T&&E[T],F=0;if(U)return U.call(E);if(E&&typeof E.length==="number")return{next:function(){if(E&&F>=E.length)E=void 0;return{value:E&&E[F++],done:!E}}};throw new TypeError(T?"Object is not iterable.":"Symbol.iterator is not defined.")},MF=function(E,T){var U=typeof Symbol==="function"&&E[Symbol.iterator];if(!U)return E;var F=U.call(E),C,I=[],G;try{while((T===void 0||T-- >0)&&!(C=F.next()).done)I.push(C.value)}catch(B){G={error:B}}finally{try{if(C&&!C.done&&(U=F.return))U.call(F)}finally{if(G)throw G.error}}return I},u7=function(){for(var E=[],T=0;T<arguments.length;T++)E=E.concat(MF(arguments[T]));return E},t7=function(){for(var E=0,T=0,U=arguments.length;T<U;T++)E+=arguments[T].length;for(var F=Array(E),C=0,T=0;T<U;T++)for(var I=arguments[T],G=0,B=I.length;G<B;G++,C++)F[C]=I[G];return F},hA=function(E,T,U){if(U||arguments.length===2){for(var F=0,C=T.length,I;F<C;F++)if(I||!(F in T)){if(!I)I=Array.prototype.slice.call(T,0,F);I[F]=T[F]}}return E.concat(I||Array.prototype.slice.call(T))},Df=function(E){return this instanceof Df?(this.v=E,this):new Df(E)},wA=function(E,T,U){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var F=U.apply(E,T||[]),C,I=[];return C=Object.create((typeof AsyncIterator==="function"?AsyncIterator:Object).prototype),B("next"),B("throw"),B("return",G),C[Symbol.asyncIterator]=function(){return this},C;function G(N){return function(j){return Promise.resolve(j).then(N,M)}}function B(N,j){if(F[N]){if(C[N]=function(e){return new Promise(function(B0,v0){I.push([N,e,B0,v0])>1||z(N,e)})},j)C[N]=j(C[N])}}function z(N,j){try{Y(F[N](j))}catch(e){q(I[0][3],e)}}function Y(N){N.value instanceof Df?Promise.resolve(N.value.v).then(Q,M):q(I[0][2],N)}function Q(N){z("next",N)}function M(N){z("throw",N)}function q(N,j){if(N(j),I.shift(),I.length)z(I[0][0],I[0][1])}},fA=function(E){var T,U;return T={},F("next"),F("throw",function(C){throw C}),F("return"),T[Symbol.iterator]=function(){return this},T;function F(C,I){T[C]=E[C]?function(G){return(U=!U)?{value:Df(E[C](G)),done:!1}:I?I(G):G}:I}},sA=function(E){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var T=E[Symbol.asyncIterator],U;return T?T.call(E):(E=typeof K5==="function"?K5(E):E[Symbol.iterator](),U={},F("next"),F("throw"),F("return"),U[Symbol.asyncIterator]=function(){return this},U);function F(I){U[I]=E[I]&&function(G){return new Promise(function(B,z){G=E[I](G),C(B,z,G.done,G.value)})}}function C(I,G,B,z){Promise.resolve(z).then(function(Y){I({value:Y,done:B})},G)}},$A=function(E,T){if(Object.defineProperty)Object.defineProperty(E,"raw",{value:T});else E.raw=T;return E};var f=Object.create?function(E,T){Object.defineProperty(E,"default",{enumerable:!0,value:T})}:function(E,T){E.default=T},s=function(E){return s=Object.getOwnPropertyNames||function(T){var U=[];for(var F in T)if(Object.prototype.hasOwnProperty.call(T,F))U[U.length]=F;return U},s(E)};EA=function(E){if(E&&E.__esModule)return E;var T={};if(E!=null){for(var U=s(E),F=0;F<U.length;F++)if(U[F]!=="default")Z5(T,E,U[F])}return f(T,E),T},TA=function(E){return E&&E.__esModule?E:{default:E}},UA=function(E,T,U,F){if(U==="a"&&!F)throw new TypeError("Private accessor was defined without a getter");if(typeof T==="function"?E!==T||!F:!T.has(E))throw new TypeError("Cannot read private member from an object whose class did not declare it");return U==="m"?F:U==="a"?F.call(E):F?F.value:T.get(E)},FA=function(E,T,U,F,C){if(F==="m")throw new TypeError("Private method is not writable");if(F==="a"&&!C)throw new TypeError("Private accessor was defined without a setter");if(typeof T==="function"?E!==T||!C:!T.has(E))throw new TypeError("Cannot write private member to an object whose class did not declare it");return F==="a"?C.call(E,U):C?C.value=U:T.set(E,U),U},CA=function(E,T){if(T===null||typeof T!=="object"&&typeof T!=="function")throw new TypeError("Cannot use 'in' operator on non-object");return typeof E==="function"?T===E:E.has(T)},IA=function(E,T,U){if(T!==null&&T!==void 0){if(typeof T!=="object"&&typeof T!=="function")throw new TypeError("Object expected.");var F,C;if(U){if(!Symbol.asyncDispose)throw new TypeError("Symbol.asyncDispose is not defined.");F=T[Symbol.asyncDispose]}if(F===void 0){if(!Symbol.dispose)throw new TypeError("Symbol.dispose is not defined.");if(F=T[Symbol.dispose],U)C=F}if(typeof F!=="function")throw new TypeError("Object not disposable.");if(C)F=function(){try{C.call(this)}catch(I){return Promise.reject(I)}};E.stack.push({value:T,dispose:F,async:U})}else if(U)E.stack.push({async:!0});return T};var $=typeof SuppressedError==="function"?SuppressedError:function(E,T,U){var F=new Error(U);return F.name="SuppressedError",F.error=E,F.suppressed=T,F};GA=function(E){function T(I){E.error=E.hasError?new $(I,E.error,"An error was suppressed during disposal."):I,E.hasError=!0}var U,F=0;function C(){while(U=E.stack.pop())try{if(!U.async&&F===1)return F=0,E.stack.push(U),Promise.resolve().then(C);if(U.dispose){var I=U.dispose.call(U.value);if(U.async)return F|=2,Promise.resolve(I).then(C,function(G){return T(G),C()})}else F|=1}catch(G){T(G)}if(F===1)return E.hasError?Promise.reject(E.error):Promise.resolve();if(E.hasError)throw E.error}return C()},BA=function(E,T){if(typeof E==="string"&&/^\.\.?\//.test(E))return E.replace(/\.(tsx)$|((?:\.d)?)((?:\.[^./]+?)?)\.([cm]?)ts$/i,function(U,F,C,I,G){return F?T?".jsx":".js":C&&(!I||!G)?U:C+I+"."+G.toLowerCase()+"js"});return E},h("__extends",b7),h("__assign",m7),h("__rest",d7),h("__decorate",i7),h("__param",c7),h("__esDecorate",g7),h("__runInitializers",x7),h("__propKey",_7),h("__setFunctionName",n7),h("__metadata",e7),h("__awaiter",a7),h("__generator",p7),h("__exportStar",o7),h("__createBinding",Z5),h("__values",K5),h("__read",MF),h("__spread",u7),h("__spreadArrays",t7),h("__spreadArray",hA),h("__await",Df),h("__asyncGenerator",wA),h("__asyncDelegator",fA),h("__asyncValues",sA),h("__makeTemplateObject",$A),h("__importStar",EA),h("__importDefault",TA),h("__classPrivateFieldGet",UA),h("__classPrivateFieldSet",FA),h("__classPrivateFieldIn",CA),h("__addDisposableResource",IA),h("__disposeResources",GA),h("__rewriteRelativeImportExtension",BA)})});var G1=H((IF0,AA)=>{var{defineProperty:P5,getOwnPropertyDescriptor:gb,getOwnPropertyNames:xb}=Object,_b=Object.prototype.hasOwnProperty,KF=(h,w)=>P5(h,"name",{value:w,configurable:!0}),nb=(h,w)=>{for(var f in w)P5(h,f,{get:w[f],enumerable:!0})},eb=(h,w,f,s)=>{if(w&&typeof w==="object"||typeof w==="function"){for(let $ of xb(w))if(!_b.call(h,$)&&$!==f)P5(h,$,{get:()=>w[$],enumerable:!(s=gb(w,$))||s.enumerable})}return h},ab=(h)=>eb(P5({},"__esModule",{value:!0}),h),WA={};nb(WA,{emitWarningIfUnsupportedVersion:()=>pb,setCredentialFeature:()=>LA,setFeature:()=>zA,state:()=>QF});AA.exports=ab(WA);var QF={warningEmitted:!1},pb=KF((h)=>{if(h&&!QF.warningEmitted&&parseInt(h.substring(1,h.indexOf(".")))<18)QF.warningEmitted=!0,process.emitWarning(`NodeDeprecationWarning: The AWS SDK for JavaScript (v3) will
|
|
13
|
-
no longer support Node.js 16.x on January 6, 2025.
|
|
14
|
-
|
|
15
|
-
To continue receiving updates to AWS services, bug fixes, and security
|
|
16
|
-
updates please upgrade to a supported Node.js LTS version.
|
|
17
|
-
|
|
18
|
-
More information can be found at: https://a.co/74kJMmI`)},"emitWarningIfUnsupportedVersion");function LA(h,w,f){if(!h.$source)h.$source={};return h.$source[w]=f,h}KF(LA,"setCredentialFeature");function zA(h,w,f){if(!h.__aws_sdk_context)h.__aws_sdk_context={features:{}};else if(!h.__aws_sdk_context.features)h.__aws_sdk_context.features={};h.__aws_sdk_context.features[w]=f}KF(zA,"setFeature")});var U0=H((GF0,XA)=>{var{defineProperty:H5,getOwnPropertyDescriptor:ob,getOwnPropertyNames:ub}=Object,tb=Object.prototype.hasOwnProperty,gw=(h,w)=>H5(h,"name",{value:w,configurable:!0}),hm=(h,w)=>{for(var f in w)H5(h,f,{get:w[f],enumerable:!0})},wm=(h,w,f,s)=>{if(w&&typeof w==="object"||typeof w==="function"){for(let $ of ub(w))if(!tb.call(h,$)&&$!==f)H5(h,$,{get:()=>w[$],enumerable:!(s=ob(w,$))||s.enumerable})}return h},fm=(h)=>wm(H5({},"__esModule",{value:!0}),h),RA={};hm(RA,{CredentialsProviderError:()=>sm,ProviderError:()=>N5,TokenProviderError:()=>$m,chain:()=>Em,fromStatic:()=>Tm,memoize:()=>Um});XA.exports=fm(RA);var N5=class h extends Error{constructor(w,f=!0){let s,$=!0;if(typeof f==="boolean")s=void 0,$=f;else if(f!=null&&typeof f==="object")s=f.logger,$=f.tryNextLink??!0;super(w);this.name="ProviderError",this.tryNextLink=$,Object.setPrototypeOf(this,h.prototype),s?.debug?.(`@smithy/property-provider ${$?"->":"(!)"} ${w}`)}static{gw(this,"ProviderError")}static from(w,f=!0){return Object.assign(new this(w.message,f),w)}},sm=class h extends N5{constructor(w,f=!0){super(w,f);this.name="CredentialsProviderError",Object.setPrototypeOf(this,h.prototype)}static{gw(this,"CredentialsProviderError")}},$m=class h extends N5{constructor(w,f=!0){super(w,f);this.name="TokenProviderError",Object.setPrototypeOf(this,h.prototype)}static{gw(this,"TokenProviderError")}},Em=gw((...h)=>async()=>{if(h.length===0)throw new N5("No providers in chain");let w;for(let f of h)try{return await f()}catch(s){if(w=s,s?.tryNextLink)continue;throw s}throw w},"chain"),Tm=gw((h)=>()=>Promise.resolve(h),"fromStatic"),Um=gw((h,w,f)=>{let s,$,E,T=!1,U=gw(async()=>{if(!$)$=h();try{s=await $,E=!0,T=!1}finally{$=void 0}return s},"coalesceProvider");if(w===void 0)return async(F)=>{if(!E||F?.forceRefresh)s=await U();return s};return async(F)=>{if(!E||F?.forceRefresh)s=await U();if(T)return s;if(f&&!f(s))return T=!0,s;if(w(s))return await U(),s;return s}},"memoize")});var yA=H((BF0,jA)=>{var{defineProperty:O5,getOwnPropertyDescriptor:Fm,getOwnPropertyNames:Cm}=Object,Im=Object.prototype.hasOwnProperty,a0=(h,w)=>O5(h,"name",{value:w,configurable:!0}),Gm=(h,w)=>{for(var f in w)O5(h,f,{get:w[f],enumerable:!0})},Bm=(h,w,f,s)=>{if(w&&typeof w==="object"||typeof w==="function"){for(let $ of Cm(w))if(!Im.call(h,$)&&$!==f)O5(h,$,{get:()=>w[$],enumerable:!(s=Fm(w,$))||s.enumerable})}return h},Wm=(h)=>Bm(O5({},"__esModule",{value:!0}),h),QA={};Gm(QA,{SignatureV4:()=>bm,clearCredentialCache:()=>Nm,createScope:()=>k5,getCanonicalHeaders:()=>PF,getCanonicalQuery:()=>DA,getPayloadHash:()=>y5,getSigningKey:()=>NA,moveHeadersToQuery:()=>kA,prepareRequest:()=>NF});jA.exports=Wm(QA);var YA=Tw(),ZF=I1(),Lm="X-Amz-Algorithm",zm="X-Amz-Credential",KA="X-Amz-Date",Am="X-Amz-SignedHeaders",Rm="X-Amz-Expires",ZA="X-Amz-Signature",JA="X-Amz-Security-Token",VA="authorization",PA=KA.toLowerCase(),Xm="date",Ym=[VA,PA,Xm],Sm=ZA.toLowerCase(),VF="x-amz-content-sha256",rm=JA.toLowerCase(),Mm={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},Qm=/^proxy-/,Km=/^sec-/,JF="AWS4-HMAC-SHA256",Zm="AWS4-HMAC-SHA256-PAYLOAD",Jm="UNSIGNED-PAYLOAD",Vm=50,HA="aws4_request",Pm=604800,Gw=uU(),Hm=I1(),qf={},q5=[],k5=a0((h,w,f)=>`${h}/${w}/${f}/${HA}`,"createScope"),NA=a0(async(h,w,f,s,$)=>{let E=await SA(h,w.secretAccessKey,w.accessKeyId),T=`${f}:${s}:${$}:${Gw.toHex(E)}:${w.sessionToken}`;if(T in qf)return qf[T];q5.push(T);while(q5.length>Vm)delete qf[q5.shift()];let U=`AWS4${w.secretAccessKey}`;for(let F of[f,s,$,HA])U=await SA(h,U,F);return qf[T]=U},"getSigningKey"),Nm=a0(()=>{q5.length=0,Object.keys(qf).forEach((h)=>{delete qf[h]})},"clearCredentialCache"),SA=a0((h,w,f)=>{let s=new h(w);return s.update(Hm.toUint8Array(f)),s.digest()},"hmac"),PF=a0(({headers:h},w,f)=>{let s={};for(let $ of Object.keys(h).sort()){if(h[$]==null)continue;let E=$.toLowerCase();if(E in Mm||w?.has(E)||Qm.test(E)||Km.test(E)){if(!f||f&&!f.has(E))continue}s[E]=h[$].trim().replace(/\s+/g," ")}return s},"getCanonicalHeaders"),j5=xU(),DA=a0(({query:h={}})=>{let w=[],f={};for(let s of Object.keys(h)){if(s.toLowerCase()===Sm)continue;let $=j5.escapeUri(s);w.push($);let E=h[s];if(typeof E==="string")f[$]=`${$}=${j5.escapeUri(E)}`;else if(Array.isArray(E))f[$]=E.slice(0).reduce((T,U)=>T.concat([`${$}=${j5.escapeUri(U)}`]),[]).sort().join("&")}return w.sort().map((s)=>f[s]).filter((s)=>s).join("&")},"getCanonicalQuery"),Dm=lU(),qm=I1(),y5=a0(async({headers:h,body:w},f)=>{for(let s of Object.keys(h))if(s.toLowerCase()===VF)return h[s];if(w==null)return"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855";else if(typeof w==="string"||ArrayBuffer.isView(w)||Dm.isArrayBuffer(w)){let s=new f;return s.update(qm.toUint8Array(w)),Gw.toHex(await s.digest())}return Jm},"getPayloadHash"),rA=I1(),km=class{static{a0(this,"HeaderFormatter")}format(h){let w=[];for(let $ of Object.keys(h)){let E=rA.fromUtf8($);w.push(Uint8Array.from([E.byteLength]),E,this.formatHeaderValue(h[$]))}let f=new Uint8Array(w.reduce(($,E)=>$+E.byteLength,0)),s=0;for(let $ of w)f.set($,s),s+=$.byteLength;return f}formatHeaderValue(h){switch(h.type){case"boolean":return Uint8Array.from([h.value?0:1]);case"byte":return Uint8Array.from([2,h.value]);case"short":let w=new DataView(new ArrayBuffer(3));return w.setUint8(0,3),w.setInt16(1,h.value,!1),new Uint8Array(w.buffer);case"integer":let f=new DataView(new ArrayBuffer(5));return f.setUint8(0,4),f.setInt32(1,h.value,!1),new Uint8Array(f.buffer);case"long":let s=new Uint8Array(9);return s[0]=5,s.set(h.value.bytes,1),s;case"binary":let $=new DataView(new ArrayBuffer(3+h.value.byteLength));$.setUint8(0,6),$.setUint16(1,h.value.byteLength,!1);let E=new Uint8Array($.buffer);return E.set(h.value,3),E;case"string":let T=rA.fromUtf8(h.value),U=new DataView(new ArrayBuffer(3+T.byteLength));U.setUint8(0,7),U.setUint16(1,T.byteLength,!1);let F=new Uint8Array(U.buffer);return F.set(T,3),F;case"timestamp":let C=new Uint8Array(9);return C[0]=8,C.set(ym.fromNumber(h.value.valueOf()).bytes,1),C;case"uuid":if(!jm.test(h.value))throw new Error(`Invalid UUID received: ${h.value}`);let I=new Uint8Array(17);return I[0]=9,I.set(Gw.fromHex(h.value.replace(/\-/g,"")),1),I}}},jm=/^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$/,ym=class h{constructor(w){if(this.bytes=w,w.byteLength!==8)throw new Error("Int64 buffers must be exactly 8 bytes")}static{a0(this,"Int64")}static fromNumber(w){if(w>9223372036854776000||w<-9223372036854776000)throw new Error(`${w} is too large (or, if negative, too small) to represent as an Int64`);let f=new Uint8Array(8);for(let s=7,$=Math.abs(Math.round(w));s>-1&&$>0;s--,$/=256)f[s]=$;if(w<0)HF(f);return new h(f)}valueOf(){let w=this.bytes.slice(0),f=w[0]&128;if(f)HF(w);return parseInt(Gw.toHex(w),16)*(f?-1:1)}toString(){return String(this.valueOf())}};function HF(h){for(let w=0;w<8;w++)h[w]^=255;for(let w=7;w>-1;w--)if(h[w]++,h[w]!==0)break}a0(HF,"negate");var Om=a0((h,w)=>{h=h.toLowerCase();for(let f of Object.keys(w))if(h===f.toLowerCase())return!0;return!1},"hasHeader"),qA=u0(),kA=a0((h,w={})=>{let{headers:f,query:s={}}=qA.HttpRequest.clone(h);for(let $ of Object.keys(f)){let E=$.toLowerCase();if(E.slice(0,6)==="x-amz-"&&!w.unhoistableHeaders?.has(E)||w.hoistableHeaders?.has(E))s[$]=f[$],delete f[$]}return{...h,headers:f,query:s}},"moveHeadersToQuery"),NF=a0((h)=>{h=qA.HttpRequest.clone(h);for(let w of Object.keys(h.headers))if(Ym.indexOf(w.toLowerCase())>-1)delete h.headers[w];return h},"prepareRequest"),lm=a0((h)=>vm(h).toISOString().replace(/\.\d{3}Z$/,"Z"),"iso8601"),vm=a0((h)=>{if(typeof h==="number")return new Date(h*1000);if(typeof h==="string"){if(Number(h))return new Date(Number(h)*1000);return new Date(h)}return h},"toDate"),bm=class{constructor({applyChecksum:h,credentials:w,region:f,service:s,sha256:$,uriEscapePath:E=!0}){this.headerFormatter=new km,this.service=s,this.sha256=$,this.uriEscapePath=E,this.applyChecksum=typeof h==="boolean"?h:!0,this.regionProvider=YA.normalizeProvider(f),this.credentialProvider=YA.normalizeProvider(w)}static{a0(this,"SignatureV4")}async presign(h,w={}){let{signingDate:f=new Date,expiresIn:s=3600,unsignableHeaders:$,unhoistableHeaders:E,signableHeaders:T,hoistableHeaders:U,signingRegion:F,signingService:C}=w,I=await this.credentialProvider();this.validateResolvedCredentials(I);let G=F??await this.regionProvider(),{longDate:B,shortDate:z}=D5(f);if(s>Pm)return Promise.reject("Signature version 4 presigned URLs must have an expiration date less than one week in the future");let Y=k5(z,G,C??this.service),Q=kA(NF(h),{unhoistableHeaders:E,hoistableHeaders:U});if(I.sessionToken)Q.query[JA]=I.sessionToken;Q.query[Lm]=JF,Q.query[zm]=`${I.accessKeyId}/${Y}`,Q.query[KA]=B,Q.query[Rm]=s.toString(10);let M=PF(Q,$,T);return Q.query[Am]=MA(M),Q.query[ZA]=await this.getSignature(B,Y,this.getSigningKey(I,G,z,C),this.createCanonicalRequest(Q,M,await y5(h,this.sha256))),Q}async sign(h,w){if(typeof h==="string")return this.signString(h,w);else if(h.headers&&h.payload)return this.signEvent(h,w);else if(h.message)return this.signMessage(h,w);else return this.signRequest(h,w)}async signEvent({headers:h,payload:w},{signingDate:f=new Date,priorSignature:s,signingRegion:$,signingService:E}){let T=$??await this.regionProvider(),{shortDate:U,longDate:F}=D5(f),C=k5(U,T,E??this.service),I=await y5({headers:{},body:w},this.sha256),G=new this.sha256;G.update(h);let B=Gw.toHex(await G.digest()),z=[Zm,F,C,s,B,I].join(`
|
|
19
|
-
`);return this.signString(z,{signingDate:f,signingRegion:T,signingService:E})}async signMessage(h,{signingDate:w=new Date,signingRegion:f,signingService:s}){return this.signEvent({headers:this.headerFormatter.format(h.message.headers),payload:h.message.body},{signingDate:w,signingRegion:f,signingService:s,priorSignature:h.priorSignature}).then((E)=>{return{message:h.message,signature:E}})}async signString(h,{signingDate:w=new Date,signingRegion:f,signingService:s}={}){let $=await this.credentialProvider();this.validateResolvedCredentials($);let E=f??await this.regionProvider(),{shortDate:T}=D5(w),U=new this.sha256(await this.getSigningKey($,E,T,s));return U.update(ZF.toUint8Array(h)),Gw.toHex(await U.digest())}async signRequest(h,{signingDate:w=new Date,signableHeaders:f,unsignableHeaders:s,signingRegion:$,signingService:E}={}){let T=await this.credentialProvider();this.validateResolvedCredentials(T);let U=$??await this.regionProvider(),F=NF(h),{longDate:C,shortDate:I}=D5(w),G=k5(I,U,E??this.service);if(F.headers[PA]=C,T.sessionToken)F.headers[rm]=T.sessionToken;let B=await y5(F,this.sha256);if(!Om(VF,F.headers)&&this.applyChecksum)F.headers[VF]=B;let z=PF(F,s,f),Y=await this.getSignature(C,G,this.getSigningKey(T,U,I,E),this.createCanonicalRequest(F,z,B));return F.headers[VA]=`${JF} Credential=${T.accessKeyId}/${G}, SignedHeaders=${MA(z)}, Signature=${Y}`,F}createCanonicalRequest(h,w,f){let s=Object.keys(w).sort();return`${h.method}
|
|
20
|
-
${this.getCanonicalPath(h)}
|
|
21
|
-
${DA(h)}
|
|
22
|
-
${s.map(($)=>`${$}:${w[$]}`).join(`
|
|
23
|
-
`)}
|
|
24
|
-
|
|
25
|
-
${s.join(";")}
|
|
26
|
-
${f}`}async createStringToSign(h,w,f){let s=new this.sha256;s.update(ZF.toUint8Array(f));let $=await s.digest();return`${JF}
|
|
27
|
-
${h}
|
|
28
|
-
${w}
|
|
29
|
-
${Gw.toHex($)}`}getCanonicalPath({path:h}){if(this.uriEscapePath){let w=[];for(let $ of h.split("/")){if($?.length===0)continue;if($===".")continue;if($==="..")w.pop();else w.push($)}let f=`${h?.startsWith("/")?"/":""}${w.join("/")}${w.length>0&&h?.endsWith("/")?"/":""}`;return j5.escapeUri(f).replace(/%2F/g,"/")}return h}async getSignature(h,w,f,s){let $=await this.createStringToSign(h,w,s),E=new this.sha256(await f);return E.update(ZF.toUint8Array($)),Gw.toHex(await E.digest())}getSigningKey(h,w,f,s){return NA(this.sha256,h,f,w,s||this.service)}validateResolvedCredentials(h){if(typeof h!=="object"||typeof h.accessKeyId!=="string"||typeof h.secretAccessKey!=="string")throw new Error("Resolved credential object is not valid")}},D5=a0((h)=>{let w=lm(h).replace(/[\-:]/g,"");return{longDate:w,shortDate:w.slice(0,8)}},"formatDate"),MA=a0((h)=>Object.keys(h).sort().join(";"),"getCanonicalHeaderList")});var xA=H((zF0,gA)=>{var{defineProperty:l5,getOwnPropertyDescriptor:mm,getOwnPropertyNames:dm}=Object,im=Object.prototype.hasOwnProperty,t0=(h,w)=>l5(h,"name",{value:w,configurable:!0}),cm=(h,w)=>{for(var f in w)l5(h,f,{get:w[f],enumerable:!0})},gm=(h,w,f,s)=>{if(w&&typeof w==="object"||typeof w==="function"){for(let $ of dm(w))if(!im.call(h,$)&&$!==f)l5(h,$,{get:()=>w[$],enumerable:!(s=mm(w,$))||s.enumerable})}return h},xm=(h)=>gm(l5({},"__esModule",{value:!0}),h),mA={};cm(mA,{AWSSDKSigV4Signer:()=>am,AwsSdkSigV4ASigner:()=>om,AwsSdkSigV4Signer:()=>kF,NODE_SIGV4A_CONFIG_OPTIONS:()=>hd,resolveAWSSDKSigV4Config:()=>fd,resolveAwsSdkSigV4AConfig:()=>tm,resolveAwsSdkSigV4Config:()=>dA,validateSigningProperties:()=>qF});gA.exports=xm(mA);var _m=u0(),nm=u0(),OA=t0((h)=>nm.HttpResponse.isInstance(h)?h.headers?.date??h.headers?.Date:void 0,"getDateHeader"),DF=t0((h)=>new Date(Date.now()+h),"getSkewCorrectedDate"),em=t0((h,w)=>Math.abs(DF(w).getTime()-h)>=300000,"isClockSkewed"),lA=t0((h,w)=>{let f=Date.parse(h);if(em(f,w))return f-Date.now();return w},"getUpdatedSystemClockOffset"),Q$=t0((h,w)=>{if(!w)throw new Error(`Property \`${h}\` is not resolved for AWS SDK SigV4Auth`);return w},"throwSigningPropertyError"),qF=t0(async(h)=>{let w=Q$("context",h.context),f=Q$("config",h.config),s=w.endpointV2?.properties?.authSchemes?.[0],E=await Q$("signer",f.signer)(s),T=h?.signingRegion,U=h?.signingRegionSet,F=h?.signingName;return{config:f,signer:E,signingRegion:T,signingRegionSet:U,signingName:F}},"validateSigningProperties"),kF=class{static{t0(this,"AwsSdkSigV4Signer")}async sign(h,w,f){if(!_m.HttpRequest.isInstance(h))throw new Error("The request is not an instance of `HttpRequest` and cannot be signed");let s=await qF(f),{config:$,signer:E}=s,{signingRegion:T,signingName:U}=s,F=f.context;if(F?.authSchemes?.length??0>1){let[I,G]=F.authSchemes;if(I?.name==="sigv4a"&&G?.name==="sigv4")T=G?.signingRegion??T,U=G?.signingName??U}return await E.sign(h,{signingDate:DF($.systemClockOffset),signingRegion:T,signingService:U})}errorHandler(h){return(w)=>{let f=w.ServerTime??OA(w.$response);if(f){let s=Q$("config",h.config),$=s.systemClockOffset;if(s.systemClockOffset=lA(f,s.systemClockOffset),s.systemClockOffset!==$&&w.$metadata)w.$metadata.clockSkewCorrected=!0}throw w}}successHandler(h,w){let f=OA(h);if(f){let s=Q$("config",w.config);s.systemClockOffset=lA(f,s.systemClockOffset)}}},am=kF,pm=u0(),om=class extends kF{static{t0(this,"AwsSdkSigV4ASigner")}async sign(h,w,f){if(!pm.HttpRequest.isInstance(h))throw new Error("The request is not an instance of `HttpRequest` and cannot be signed");let{config:s,signer:$,signingRegion:E,signingRegionSet:T,signingName:U}=await qF(f),C=(await s.sigv4aSigningRegionSet?.()??T??[E]).join(",");return await $.sign(h,{signingDate:DF(s.systemClockOffset),signingRegion:C,signingService:U})}},um=b0(),vA=U0(),tm=t0((h)=>{return h.sigv4aSigningRegionSet=um.normalizeProvider(h.sigv4aSigningRegionSet),h},"resolveAwsSdkSigV4AConfig"),hd={environmentVariableSelector(h){if(h.AWS_SIGV4A_SIGNING_REGION_SET)return h.AWS_SIGV4A_SIGNING_REGION_SET.split(",").map((w)=>w.trim());throw new vA.ProviderError("AWS_SIGV4A_SIGNING_REGION_SET not set in env.",{tryNextLink:!0})},configFileSelector(h){if(h.sigv4a_signing_region_set)return(h.sigv4a_signing_region_set??"").split(",").map((w)=>w.trim());throw new vA.ProviderError("sigv4a_signing_region_set not set in profile.",{tryNextLink:!0})},default:void 0},wd=G1(),xw=b0(),bA=yA(),dA=t0((h)=>{let w=h.credentials,f=!!h.credentials,s=void 0;Object.defineProperty(h,"credentials",{set(C){if(C&&C!==w&&C!==s)f=!0;w=C;let I=iA(h,{credentials:w,credentialDefaultProvider:h.credentialDefaultProvider}),G=cA(h,I);if(f&&!G.attributed)s=t0(async(B)=>G(B).then((z)=>wd.setCredentialFeature(z,"CREDENTIALS_CODE","e")),"resolvedCredentials"),s.memoized=G.memoized,s.configBound=G.configBound,s.attributed=!0;else s=G},get(){return s},enumerable:!0,configurable:!0}),h.credentials=w;let{signingEscapePath:$=!0,systemClockOffset:E=h.systemClockOffset||0,sha256:T}=h,U;if(h.signer)U=xw.normalizeProvider(h.signer);else if(h.regionInfoProvider)U=t0(()=>xw.normalizeProvider(h.region)().then(async(C)=>[await h.regionInfoProvider(C,{useFipsEndpoint:await h.useFipsEndpoint(),useDualstackEndpoint:await h.useDualstackEndpoint()})||{},C]).then(([C,I])=>{let{signingRegion:G,signingService:B}=C;h.signingRegion=h.signingRegion||G||I,h.signingName=h.signingName||B||h.serviceId;let z={...h,credentials:h.credentials,region:h.signingRegion,service:h.signingName,sha256:T,uriEscapePath:$};return new(h.signerConstructor||bA.SignatureV4)(z)}),"signer");else U=t0(async(C)=>{C=Object.assign({},{name:"sigv4",signingName:h.signingName||h.defaultSigningName,signingRegion:await xw.normalizeProvider(h.region)(),properties:{}},C);let{signingRegion:I,signingName:G}=C;h.signingRegion=h.signingRegion||I,h.signingName=h.signingName||G||h.serviceId;let B={...h,credentials:h.credentials,region:h.signingRegion,service:h.signingName,sha256:T,uriEscapePath:$};return new(h.signerConstructor||bA.SignatureV4)(B)},"signer");return Object.assign(h,{systemClockOffset:E,signingEscapePath:$,signer:U})},"resolveAwsSdkSigV4Config"),fd=dA;function iA(h,{credentials:w,credentialDefaultProvider:f}){let s;if(w)if(!w?.memoized)s=xw.memoizeIdentityProvider(w,xw.isIdentityExpired,xw.doesIdentityRequireRefresh);else s=w;else if(f)s=xw.normalizeProvider(f(Object.assign({},h,{parentClientConfig:h})));else s=t0(async()=>{throw new Error("@aws-sdk/core::resolveAwsSdkSigV4Config - `credentials` not provided and no credentialDefaultProvider was configured.")},"credentialsProvider");return s.memoized=!0,s}t0(iA,"normalizeCredentialProvider");function cA(h,w){if(w.configBound)return w;let f=t0(async(s)=>w({...s,callerClientConfig:h}),"fn");return f.memoized=w.memoized,f.configBound=!0,f}t0(cA,"bindCallerConfig")});var pA=H((XF0,aA)=>{var{defineProperty:v5,getOwnPropertyDescriptor:sd,getOwnPropertyNames:$d}=Object,Ed=Object.prototype.hasOwnProperty,D1=(h,w)=>v5(h,"name",{value:w,configurable:!0}),Td=(h,w)=>{for(var f in w)v5(h,f,{get:w[f],enumerable:!0})},Ud=(h,w,f,s)=>{if(w&&typeof w==="object"||typeof w==="function"){for(let $ of $d(w))if(!Ed.call(h,$)&&$!==f)v5(h,$,{get:()=>w[$],enumerable:!(s=sd(w,$))||s.enumerable})}return h},Fd=(h)=>Ud(v5({},"__esModule",{value:!0}),h),eA={};Td(eA,{constructStack:()=>jF});aA.exports=Fd(eA);var _w=D1((h,w)=>{let f=[];if(h)f.push(h);if(w)for(let s of w)f.push(s);return f},"getAllAliases"),Bw=D1((h,w)=>{return`${h||"anonymous"}${w&&w.length>0?` (a.k.a. ${w.join(",")})`:""}`},"getMiddlewareNameWithAliases"),jF=D1(()=>{let h=[],w=[],f=!1,s=new Set,$=D1((G)=>G.sort((B,z)=>_A[z.step]-_A[B.step]||nA[z.priority||"normal"]-nA[B.priority||"normal"]),"sort"),E=D1((G)=>{let B=!1,z=D1((Y)=>{let Q=_w(Y.name,Y.aliases);if(Q.includes(G)){B=!0;for(let M of Q)s.delete(M);return!1}return!0},"filterCb");return h=h.filter(z),w=w.filter(z),B},"removeByName"),T=D1((G)=>{let B=!1,z=D1((Y)=>{if(Y.middleware===G){B=!0;for(let Q of _w(Y.name,Y.aliases))s.delete(Q);return!1}return!0},"filterCb");return h=h.filter(z),w=w.filter(z),B},"removeByReference"),U=D1((G)=>{return h.forEach((B)=>{G.add(B.middleware,{...B})}),w.forEach((B)=>{G.addRelativeTo(B.middleware,{...B})}),G.identifyOnResolve?.(I.identifyOnResolve()),G},"cloneTo"),F=D1((G)=>{let B=[];return G.before.forEach((z)=>{if(z.before.length===0&&z.after.length===0)B.push(z);else B.push(...F(z))}),B.push(G),G.after.reverse().forEach((z)=>{if(z.before.length===0&&z.after.length===0)B.push(z);else B.push(...F(z))}),B},"expandRelativeMiddlewareList"),C=D1((G=!1)=>{let B=[],z=[],Y={};return h.forEach((M)=>{let q={...M,before:[],after:[]};for(let N of _w(q.name,q.aliases))Y[N]=q;B.push(q)}),w.forEach((M)=>{let q={...M,before:[],after:[]};for(let N of _w(q.name,q.aliases))Y[N]=q;z.push(q)}),z.forEach((M)=>{if(M.toMiddleware){let q=Y[M.toMiddleware];if(q===void 0){if(G)return;throw new Error(`${M.toMiddleware} is not found when adding ${Bw(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)}}),$(B).map(F).reduce((M,q)=>{return M.push(...q),M},[])},"getMiddlewareList"),I={add:(G,B={})=>{let{name:z,override:Y,aliases:Q}=B,M={step:"initialize",priority:"normal",middleware:G,...B},q=_w(z,Q);if(q.length>0){if(q.some((N)=>s.has(N))){if(!Y)throw new Error(`Duplicate middleware name '${Bw(z,Q)}'`);for(let N of q){let j=h.findIndex((B0)=>B0.name===N||B0.aliases?.some((v0)=>v0===N));if(j===-1)continue;let e=h[j];if(e.step!==M.step||M.priority!==e.priority)throw new Error(`"${Bw(e.name,e.aliases)}" middleware with ${e.priority} priority in ${e.step} step cannot be overridden by "${Bw(z,Q)}" middleware with ${M.priority} priority in ${M.step} step.`);h.splice(j,1)}}for(let N of q)s.add(N)}h.push(M)},addRelativeTo:(G,B)=>{let{name:z,override:Y,aliases:Q}=B,M={middleware:G,...B},q=_w(z,Q);if(q.length>0){if(q.some((N)=>s.has(N))){if(!Y)throw new Error(`Duplicate middleware name '${Bw(z,Q)}'`);for(let N of q){let j=w.findIndex((B0)=>B0.name===N||B0.aliases?.some((v0)=>v0===N));if(j===-1)continue;let e=w[j];if(e.toMiddleware!==M.toMiddleware||e.relation!==M.relation)throw new Error(`"${Bw(e.name,e.aliases)}" middleware ${e.relation} "${e.toMiddleware}" middleware cannot be overridden by "${Bw(z,Q)}" middleware ${M.relation} "${M.toMiddleware}" middleware.`);w.splice(j,1)}}for(let N of q)s.add(N)}w.push(M)},clone:()=>U(jF()),use:(G)=>{G.applyToStack(I)},remove:(G)=>{if(typeof G==="string")return E(G);else return T(G)},removeByTag:(G)=>{let B=!1,z=D1((Y)=>{let{tags:Q,name:M,aliases:q}=Y;if(Q&&Q.includes(G)){let N=_w(M,q);for(let j of N)s.delete(j);return B=!0,!1}return!0},"filterCb");return h=h.filter(z),w=w.filter(z),B},concat:(G)=>{let B=U(jF());return B.use(G),B.identifyOnResolve(f||B.identifyOnResolve()||(G.identifyOnResolve?.()??!1)),B},applyToStack:U,identify:()=>{return C(!0).map((G)=>{let B=G.step??G.relation+" "+G.toMiddleware;return Bw(G.name,G.aliases)+" - "+B})},identifyOnResolve(G){if(typeof G==="boolean")f=G;return f},resolve:(G,B)=>{for(let z of C().map((Y)=>Y.middleware).reverse())G=z(G,B);if(f)console.log(I.identify());return G}};return I},"constructStack"),_A={initialize:5,serialize:4,build:3,finalizeRequest:2,deserialize:1},nA={high:3,normal:2,low:1}});var Z0=H((YF0,LR)=>{var{defineProperty:d5,getOwnPropertyDescriptor:Cd,getOwnPropertyNames:Id}=Object,Gd=Object.prototype.hasOwnProperty,m=(h,w)=>d5(h,"name",{value:w,configurable:!0}),Bd=(h,w)=>{for(var f in w)d5(h,f,{get:w[f],enumerable:!0})},Wd=(h,w,f,s)=>{if(w&&typeof w==="object"||typeof w==="function"){for(let $ of Id(w))if(!Gd.call(h,$)&&$!==f)d5(h,$,{get:()=>w[$],enumerable:!(s=Cd(w,$))||s.enumerable})}return h},Ld=(h)=>Wd(d5({},"__esModule",{value:!0}),h),uA={};Bd(uA,{Client:()=>zd,Command:()=>hR,LazyJsonString:()=>nw,NoOpLogger:()=>Gi,SENSITIVE_STRING:()=>Rd,ServiceException:()=>ud,_json:()=>dF,collectBody:()=>yF.collectBody,convertMap:()=>Bi,createAggregatedClient:()=>Xd,dateToUtcString:()=>TR,decorateServiceException:()=>UR,emitWarningIfUnsupportedVersion:()=>fi,expectBoolean:()=>Sd,expectByte:()=>mF,expectFloat32:()=>b5,expectInt:()=>Md,expectInt32:()=>vF,expectLong:()=>J$,expectNonNull:()=>Kd,expectNumber:()=>Z$,expectObject:()=>wR,expectShort:()=>bF,expectString:()=>Zd,expectUnion:()=>Jd,extendedEncodeURIComponent:()=>yF.extendedEncodeURIComponent,getArrayIfSingleItem:()=>Ci,getDefaultClientConfiguration:()=>Ui,getDefaultExtensionConfiguration:()=>CR,getValueFromTextNode:()=>IR,handleFloat:()=>Hd,isSerializableHeaderValue:()=>Ii,limitedParseDouble:()=>gF,limitedParseFloat:()=>Nd,limitedParseFloat32:()=>Dd,loadConfigsForDefaultMode:()=>wi,logger:()=>V$,map:()=>_F,parseBoolean:()=>Yd,parseEpochTimestamp:()=>cd,parseRfc3339DateTime:()=>Od,parseRfc3339DateTimeWithOffset:()=>vd,parseRfc7231DateTime:()=>id,quoteHeader:()=>BR,resolveDefaultRuntimeConfig:()=>Fi,resolvedPath:()=>yF.resolvedPath,serializeDateTime:()=>Xi,serializeFloat:()=>Ri,splitEvery:()=>WR,splitHeader:()=>Yi,strictParseByte:()=>ER,strictParseDouble:()=>cF,strictParseFloat:()=>Vd,strictParseFloat32:()=>fR,strictParseInt:()=>qd,strictParseInt32:()=>kd,strictParseLong:()=>$R,strictParseShort:()=>kf,take:()=>Wi,throwDefaultError:()=>FR,withBaseException:()=>td});LR.exports=Ld(uA);var tA=pA(),zd=class{constructor(h){this.config=h,this.middlewareStack=tA.constructStack()}static{m(this,"Client")}send(h,w,f){let s=typeof w!=="function"?w:void 0,$=typeof w==="function"?w:f,E=s===void 0&&this.config.cacheMiddleware===!0,T;if(E){if(!this.handlers)this.handlers=new WeakMap;let U=this.handlers;if(U.has(h.constructor))T=U.get(h.constructor);else T=h.resolveMiddleware(this.middlewareStack,this.config,s),U.set(h.constructor,T)}else delete this.handlers,T=h.resolveMiddleware(this.middlewareStack,this.config,s);if($)T(h).then((U)=>$(null,U.output),(U)=>$(U)).catch(()=>{});else return T(h).then((U)=>U.output)}destroy(){this.config?.requestHandler?.destroy?.(),delete this.handlers}},yF=Pf(),lF=F1(),hR=class{constructor(){this.middlewareStack=tA.constructStack()}static{m(this,"Command")}static classBuilder(){return new Ad}resolveMiddlewareWithContext(h,w,f,{middlewareFn:s,clientName:$,commandName:E,inputFilterSensitiveLog:T,outputFilterSensitiveLog:U,smithyContext:F,additionalContext:C,CommandCtor:I}){for(let Q of s.bind(this)(I,h,w,f))this.middlewareStack.use(Q);let G=h.concat(this.middlewareStack),{logger:B}=w,z={logger:B,clientName:$,commandName:E,inputFilterSensitiveLog:T,outputFilterSensitiveLog:U,[lF.SMITHY_CONTEXT_KEY]:{commandInstance:this,...F},...C},{requestHandler:Y}=w;return G.resolve((Q)=>Y.handle(Q.request,f||{}),z)}},Ad=class{constructor(){this._init=()=>{},this._ep={},this._middlewareFn=()=>[],this._commandName="",this._clientName="",this._additionalContext={},this._smithyContext={},this._inputFilterSensitiveLog=(h)=>h,this._outputFilterSensitiveLog=(h)=>h,this._serializer=null,this._deserializer=null}static{m(this,"ClassBuilder")}init(h){this._init=h}ep(h){return this._ep=h,this}m(h){return this._middlewareFn=h,this}s(h,w,f={}){return this._smithyContext={service:h,operation:w,...f},this}c(h={}){return this._additionalContext=h,this}n(h,w){return this._clientName=h,this._commandName=w,this}f(h=(f)=>f,w=(f)=>f){return this._inputFilterSensitiveLog=h,this._outputFilterSensitiveLog=w,this}ser(h){return this._serializer=h,this}de(h){return this._deserializer=h,this}build(){let h=this,w;return w=class extends hR{constructor(...[f]){super();this.serialize=h._serializer,this.deserialize=h._deserializer,this.input=f??{},h._init(this)}static{m(this,"CommandRef")}static getEndpointParameterInstructions(){return h._ep}resolveMiddleware(f,s,$){return this.resolveMiddlewareWithContext(f,s,$,{CommandCtor:w,middlewareFn:h._middlewareFn,clientName:h._clientName,commandName:h._commandName,inputFilterSensitiveLog:h._inputFilterSensitiveLog,outputFilterSensitiveLog:h._outputFilterSensitiveLog,smithyContext:h._smithyContext,additionalContext:h._additionalContext})}}}},Rd="***SensitiveInformation***",Xd=m((h,w)=>{for(let f of Object.keys(h)){let s=h[f],$=m(async function(T,U,F){let C=new s(T);if(typeof U==="function")this.send(C,U);else if(typeof F==="function"){if(typeof U!=="object")throw new Error(`Expected http options but got ${typeof U}`);this.send(C,U||{},F)}else return this.send(C,U)},"methodImpl"),E=(f[0].toLowerCase()+f.slice(1)).replace(/Command$/,"");w.prototype[E]=$}},"createAggregatedClient"),Yd=m((h)=>{switch(h){case"true":return!0;case"false":return!1;default:throw new Error(`Unable to parse boolean value "${h}"`)}},"parseBoolean"),Sd=m((h)=>{if(h===null||h===void 0)return;if(typeof h==="number"){if(h===0||h===1)V$.warn(m5(`Expected boolean, got ${typeof h}: ${h}`));if(h===0)return!1;if(h===1)return!0}if(typeof h==="string"){let w=h.toLowerCase();if(w==="false"||w==="true")V$.warn(m5(`Expected boolean, got ${typeof h}: ${h}`));if(w==="false")return!1;if(w==="true")return!0}if(typeof h==="boolean")return h;throw new TypeError(`Expected boolean, got ${typeof h}: ${h}`)},"expectBoolean"),Z$=m((h)=>{if(h===null||h===void 0)return;if(typeof h==="string"){let w=parseFloat(h);if(!Number.isNaN(w)){if(String(w)!==String(h))V$.warn(m5(`Expected number but observed string: ${h}`));return w}}if(typeof h==="number")return h;throw new TypeError(`Expected number, got ${typeof h}: ${h}`)},"expectNumber"),rd=Math.ceil(340282346638528860000000000000000000000),b5=m((h)=>{let w=Z$(h);if(w!==void 0&&!Number.isNaN(w)&&w!==1/0&&w!==-1/0){if(Math.abs(w)>rd)throw new TypeError(`Expected 32-bit float, got ${h}`)}return w},"expectFloat32"),J$=m((h)=>{if(h===null||h===void 0)return;if(Number.isInteger(h)&&!Number.isNaN(h))return h;throw new TypeError(`Expected integer, got ${typeof h}: ${h}`)},"expectLong"),Md=J$,vF=m((h)=>iF(h,32),"expectInt32"),bF=m((h)=>iF(h,16),"expectShort"),mF=m((h)=>iF(h,8),"expectByte"),iF=m((h,w)=>{let f=J$(h);if(f!==void 0&&Qd(f,w)!==f)throw new TypeError(`Expected ${w}-bit integer, got ${h}`);return f},"expectSizedInt"),Qd=m((h,w)=>{switch(w){case 32:return Int32Array.of(h)[0];case 16:return Int16Array.of(h)[0];case 8:return Int8Array.of(h)[0]}},"castInt"),Kd=m((h,w)=>{if(h===null||h===void 0){if(w)throw new TypeError(`Expected a non-null value for ${w}`);throw new TypeError("Expected a non-null value")}return h},"expectNonNull"),wR=m((h)=>{if(h===null||h===void 0)return;if(typeof h==="object"&&!Array.isArray(h))return h;let w=Array.isArray(h)?"array":typeof h;throw new TypeError(`Expected object, got ${w}: ${h}`)},"expectObject"),Zd=m((h)=>{if(h===null||h===void 0)return;if(typeof h==="string")return h;if(["boolean","number","bigint"].includes(typeof h))return V$.warn(m5(`Expected string, got ${typeof h}: ${h}`)),String(h);throw new TypeError(`Expected string, got ${typeof h}: ${h}`)},"expectString"),Jd=m((h)=>{if(h===null||h===void 0)return;let w=wR(h),f=Object.entries(w).filter(([,s])=>s!=null).map(([s])=>s);if(f.length===0)throw new TypeError("Unions must have exactly one non-null member. None were found.");if(f.length>1)throw new TypeError(`Unions must have exactly one non-null member. Keys ${f} were not null.`);return w},"expectUnion"),cF=m((h)=>{if(typeof h=="string")return Z$(yf(h));return Z$(h)},"strictParseDouble"),Vd=cF,fR=m((h)=>{if(typeof h=="string")return b5(yf(h));return b5(h)},"strictParseFloat32"),Pd=/(-?(?:0|[1-9]\d*)(?:\.\d+)?(?:[eE][+-]?\d+)?)|(-?Infinity)|(NaN)/g,yf=m((h)=>{let w=h.match(Pd);if(w===null||w[0].length!==h.length)throw new TypeError("Expected real number, got implicit NaN");return parseFloat(h)},"parseNumber"),gF=m((h)=>{if(typeof h=="string")return sR(h);return Z$(h)},"limitedParseDouble"),Hd=gF,Nd=gF,Dd=m((h)=>{if(typeof h=="string")return sR(h);return b5(h)},"limitedParseFloat32"),sR=m((h)=>{switch(h){case"NaN":return NaN;case"Infinity":return 1/0;case"-Infinity":return-1/0;default:throw new Error(`Unable to parse float value: ${h}`)}},"parseFloatString"),$R=m((h)=>{if(typeof h==="string")return J$(yf(h));return J$(h)},"strictParseLong"),qd=$R,kd=m((h)=>{if(typeof h==="string")return vF(yf(h));return vF(h)},"strictParseInt32"),kf=m((h)=>{if(typeof h==="string")return bF(yf(h));return bF(h)},"strictParseShort"),ER=m((h)=>{if(typeof h==="string")return mF(yf(h));return mF(h)},"strictParseByte"),m5=m((h)=>{return String(new TypeError(h).stack||h).split(`
|
|
30
|
-
`).slice(0,5).filter((w)=>!w.includes("stackTraceWarning")).join(`
|
|
31
|
-
`)},"stackTraceWarning"),V$={warn:console.warn},jd=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],xF=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function TR(h){let w=h.getUTCFullYear(),f=h.getUTCMonth(),s=h.getUTCDay(),$=h.getUTCDate(),E=h.getUTCHours(),T=h.getUTCMinutes(),U=h.getUTCSeconds(),F=$<10?`0${$}`:`${$}`,C=E<10?`0${E}`:`${E}`,I=T<10?`0${T}`:`${T}`,G=U<10?`0${U}`:`${U}`;return`${jd[s]}, ${F} ${xF[f]} ${w} ${C}:${I}:${G} GMT`}m(TR,"dateToUtcString");var yd=new RegExp(/^(\d{4})-(\d{2})-(\d{2})[tT](\d{2}):(\d{2}):(\d{2})(?:\.(\d+))?[zZ]$/),Od=m((h)=>{if(h===null||h===void 0)return;if(typeof h!=="string")throw new TypeError("RFC-3339 date-times must be expressed as strings");let w=yd.exec(h);if(!w)throw new TypeError("Invalid RFC-3339 date-time value");let[f,s,$,E,T,U,F,C]=w,I=kf(jf(s)),G=Yh($,"month",1,12),B=Yh(E,"day",1,31);return K$(I,G,B,{hours:T,minutes:U,seconds:F,fractionalMilliseconds:C})},"parseRfc3339DateTime"),ld=new RegExp(/^(\d{4})-(\d{2})-(\d{2})[tT](\d{2}):(\d{2}):(\d{2})(?:\.(\d+))?(([-+]\d{2}\:\d{2})|[zZ])$/),vd=m((h)=>{if(h===null||h===void 0)return;if(typeof h!=="string")throw new TypeError("RFC-3339 date-times must be expressed as strings");let w=ld.exec(h);if(!w)throw new TypeError("Invalid RFC-3339 date-time value");let[f,s,$,E,T,U,F,C,I]=w,G=kf(jf(s)),B=Yh($,"month",1,12),z=Yh(E,"day",1,31),Y=K$(G,B,z,{hours:T,minutes:U,seconds:F,fractionalMilliseconds:C});if(I.toUpperCase()!="Z")Y.setTime(Y.getTime()-od(I));return Y},"parseRfc3339DateTimeWithOffset"),bd=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$/),md=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$/),dd=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})$/),id=m((h)=>{if(h===null||h===void 0)return;if(typeof h!=="string")throw new TypeError("RFC-7231 date-times must be expressed as strings");let w=bd.exec(h);if(w){let[f,s,$,E,T,U,F,C]=w;return K$(kf(jf(E)),OF($),Yh(s,"day",1,31),{hours:T,minutes:U,seconds:F,fractionalMilliseconds:C})}if(w=md.exec(h),w){let[f,s,$,E,T,U,F,C]=w;return _d(K$(gd(E),OF($),Yh(s,"day",1,31),{hours:T,minutes:U,seconds:F,fractionalMilliseconds:C}))}if(w=dd.exec(h),w){let[f,s,$,E,T,U,F,C]=w;return K$(kf(jf(C)),OF(s),Yh($.trimLeft(),"day",1,31),{hours:E,minutes:T,seconds:U,fractionalMilliseconds:F})}throw new TypeError("Invalid RFC-7231 date-time value")},"parseRfc7231DateTime"),cd=m((h)=>{if(h===null||h===void 0)return;let w;if(typeof h==="number")w=h;else if(typeof h==="string")w=cF(h);else if(typeof h==="object"&&h.tag===1)w=h.value;else throw new TypeError("Epoch timestamps must be expressed as floating point numbers or their string representation");if(Number.isNaN(w)||w===1/0||w===-1/0)throw new TypeError("Epoch timestamps must be valid, non-Infinite, non-NaN numerics");return new Date(Math.round(w*1000))},"parseEpochTimestamp"),K$=m((h,w,f,s)=>{let $=w-1;return ed(h,$,f),new Date(Date.UTC(h,$,f,Yh(s.hours,"hour",0,23),Yh(s.minutes,"minute",0,59),Yh(s.seconds,"seconds",0,60),pd(s.fractionalMilliseconds)))},"buildDate"),gd=m((h)=>{let w=new Date().getUTCFullYear(),f=Math.floor(w/100)*100+kf(jf(h));if(f<w)return f+100;return f},"parseTwoDigitYear"),xd=1576800000000,_d=m((h)=>{if(h.getTime()-new Date().getTime()>xd)return new Date(Date.UTC(h.getUTCFullYear()-100,h.getUTCMonth(),h.getUTCDate(),h.getUTCHours(),h.getUTCMinutes(),h.getUTCSeconds(),h.getUTCMilliseconds()));return h},"adjustRfc850Year"),OF=m((h)=>{let w=xF.indexOf(h);if(w<0)throw new TypeError(`Invalid month: ${h}`);return w+1},"parseMonthByShortName"),nd=[31,28,31,30,31,30,31,31,30,31,30,31],ed=m((h,w,f)=>{let s=nd[w];if(w===1&&ad(h))s=29;if(f>s)throw new TypeError(`Invalid day for ${xF[w]} in ${h}: ${f}`)},"validateDayOfMonth"),ad=m((h)=>{return h%4===0&&(h%100!==0||h%400===0)},"isLeapYear"),Yh=m((h,w,f,s)=>{let $=ER(jf(h));if($<f||$>s)throw new TypeError(`${w} must be between ${f} and ${s}, inclusive`);return $},"parseDateValue"),pd=m((h)=>{if(h===null||h===void 0)return 0;return fR("0."+h)*1000},"parseMilliseconds"),od=m((h)=>{let w=h[0],f=1;if(w=="+")f=1;else if(w=="-")f=-1;else throw new TypeError(`Offset direction, ${w}, must be "+" or "-"`);let s=Number(h.substring(1,3)),$=Number(h.substring(4,6));return f*(s*60+$)*60*1000},"parseOffsetToMilliseconds"),jf=m((h)=>{let w=0;while(w<h.length-1&&h.charAt(w)==="0")w++;if(w===0)return h;return h.slice(w)},"stripLeadingZeroes"),ud=class h extends Error{static{m(this,"ServiceException")}constructor(w){super(w.message);Object.setPrototypeOf(this,Object.getPrototypeOf(this).constructor.prototype),this.name=w.name,this.$fault=w.$fault,this.$metadata=w.$metadata}static isInstance(w){if(!w)return!1;let f=w;return h.prototype.isPrototypeOf(f)||Boolean(f.$fault)&&Boolean(f.$metadata)&&(f.$fault==="client"||f.$fault==="server")}static[Symbol.hasInstance](w){if(!w)return!1;let f=w;if(this===h)return h.isInstance(w);if(h.isInstance(w)){if(f.name&&this.name)return this.prototype.isPrototypeOf(w)||f.name===this.name;return this.prototype.isPrototypeOf(w)}return!1}},UR=m((h,w={})=>{Object.entries(w).filter(([,s])=>s!==void 0).forEach(([s,$])=>{if(h[s]==null||h[s]==="")h[s]=$});let f=h.message||h.Message||"UnknownError";return h.message=f,delete h.Message,h},"decorateServiceException"),FR=m(({output:h,parsedBody:w,exceptionCtor:f,errorCode:s})=>{let $=hi(h),E=$.httpStatusCode?$.httpStatusCode+"":void 0,T=new f({name:w?.code||w?.Code||s||E||"UnknownError",$fault:"client",$metadata:$});throw UR(T,w)},"throwDefaultError"),td=m((h)=>{return({output:w,parsedBody:f,errorCode:s})=>{FR({output:w,parsedBody:f,exceptionCtor:h,errorCode:s})}},"withBaseException"),hi=m((h)=>({httpStatusCode:h.statusCode,requestId:h.headers["x-amzn-requestid"]??h.headers["x-amzn-request-id"]??h.headers["x-amz-request-id"],extendedRequestId:h.headers["x-amz-id-2"],cfId:h.headers["x-amz-cf-id"]}),"deserializeMetadata"),wi=m((h)=>{switch(h){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"),oA=!1,fi=m((h)=>{if(h&&!oA&&parseInt(h.substring(1,h.indexOf(".")))<16)oA=!0},"emitWarningIfUnsupportedVersion"),si=m((h)=>{let w=[];for(let f in lF.AlgorithmId){let s=lF.AlgorithmId[f];if(h[s]===void 0)continue;w.push({algorithmId:()=>s,checksumConstructor:()=>h[s]})}return{addChecksumAlgorithm(f){w.push(f)},checksumAlgorithms(){return w}}},"getChecksumConfiguration"),$i=m((h)=>{let w={};return h.checksumAlgorithms().forEach((f)=>{w[f.algorithmId()]=f.checksumConstructor()}),w},"resolveChecksumRuntimeConfig"),Ei=m((h)=>{return{setRetryStrategy(w){h.retryStrategy=w},retryStrategy(){return h.retryStrategy}}},"getRetryConfiguration"),Ti=m((h)=>{let w={};return w.retryStrategy=h.retryStrategy(),w},"resolveRetryRuntimeConfig"),CR=m((h)=>{return Object.assign(si(h),Ei(h))},"getDefaultExtensionConfiguration"),Ui=CR,Fi=m((h)=>{return Object.assign($i(h),Ti(h))},"resolveDefaultRuntimeConfig"),Ci=m((h)=>Array.isArray(h)?h:[h],"getArrayIfSingleItem"),IR=m((h)=>{for(let f in h)if(h.hasOwnProperty(f)&&h[f]["#text"]!==void 0)h[f]=h[f]["#text"];else if(typeof h[f]==="object"&&h[f]!==null)h[f]=IR(h[f]);return h},"getValueFromTextNode"),Ii=m((h)=>{return h!=null},"isSerializableHeaderValue"),nw=m(function h(w){return Object.assign(new String(w),{deserializeJSON(){return JSON.parse(String(w))},toString(){return String(w)},toJSON(){return String(w)}})},"LazyJsonString");nw.from=(h)=>{if(h&&typeof h==="object"&&(h instanceof nw||("deserializeJSON"in h)))return h;else if(typeof h==="string"||Object.getPrototypeOf(h)===String.prototype)return nw(String(h));return nw(JSON.stringify(h))};nw.fromObject=nw.from;var Gi=class{static{m(this,"NoOpLogger")}trace(){}debug(){}info(){}warn(){}error(){}};function _F(h,w,f){let s,$,E;if(typeof w==="undefined"&&typeof f==="undefined")s={},E=h;else if(s=h,typeof w==="function")return $=w,E=f,Li(s,$,E);else E=w;for(let T of Object.keys(E)){if(!Array.isArray(E[T])){s[T]=E[T];continue}GR(s,null,E,T)}return s}m(_F,"map");var Bi=m((h)=>{let w={};for(let[f,s]of Object.entries(h||{}))w[f]=[,s];return w},"convertMap"),Wi=m((h,w)=>{let f={};for(let s in w)GR(f,h,w,s);return f},"take"),Li=m((h,w,f)=>{return _F(h,Object.entries(f).reduce((s,[$,E])=>{if(Array.isArray(E))s[$]=E;else if(typeof E==="function")s[$]=[w,E()];else s[$]=[w,E];return s},{}))},"mapWithFilter"),GR=m((h,w,f,s)=>{if(w!==null){let T=f[s];if(typeof T==="function")T=[,T];let[U=zi,F=Ai,C=s]=T;if(typeof U==="function"&&U(w[C])||typeof U!=="function"&&!!U)h[s]=F(w[C]);return}let[$,E]=f[s];if(typeof E==="function"){let T,U=$===void 0&&(T=E())!=null,F=typeof $==="function"&&!!$(void 0)||typeof $!=="function"&&!!$;if(U)h[s]=T;else if(F)h[s]=E()}else{let T=$===void 0&&E!=null,U=typeof $==="function"&&!!$(E)||typeof $!=="function"&&!!$;if(T||U)h[s]=E}},"applyInstruction"),zi=m((h)=>h!=null,"nonNullish"),Ai=m((h)=>h,"pass");function BR(h){if(h.includes(",")||h.includes('"'))h=`"${h.replace(/"/g,"\\\"")}"`;return h}m(BR,"quoteHeader");var Ri=m((h)=>{if(h!==h)return"NaN";switch(h){case 1/0:return"Infinity";case-1/0:return"-Infinity";default:return h}},"serializeFloat"),Xi=m((h)=>h.toISOString().replace(".000Z","Z"),"serializeDateTime"),dF=m((h)=>{if(h==null)return{};if(Array.isArray(h))return h.filter((w)=>w!=null).map(dF);if(typeof h==="object"){let w={};for(let f of Object.keys(h)){if(h[f]==null)continue;w[f]=dF(h[f])}return w}return h},"_json");function WR(h,w,f){if(f<=0||!Number.isInteger(f))throw new Error("Invalid number of delimiters ("+f+") for splitEvery.");let s=h.split(w);if(f===1)return s;let $=[],E="";for(let T=0;T<s.length;T++){if(E==="")E=s[T];else E+=w+s[T];if((T+1)%f===0)$.push(E),E=""}if(E!=="")$.push(E);return $}m(WR,"splitEvery");var Yi=m((h)=>{let w=h.length,f=[],s=!1,$=void 0,E=0;for(let T=0;T<w;++T){let U=h[T];switch(U){case'"':if($!=="\\")s=!s;break;case",":if(!s)f.push(h.slice(E,T)),E=T+1;break;default:}$=U}return f.push(h.slice(E)),f.map((T)=>{T=T.trim();let U=T.length;if(U<2)return T;if(T[0]==='"'&&T[U-1]==='"')T=T.slice(1,U-1);return T.replace(/\\"/g,'"')})},"splitHeader")});var i5=H((Ki)=>{var Si=":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",zR="[: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]["+Si+"]*",ri=new RegExp("^"+zR+"$"),Mi=function(h,w){let f=[],s=w.exec(h);while(s){let $=[];$.startIndex=w.lastIndex-s[0].length;let E=s.length;for(let T=0;T<E;T++)$.push(s[T]);f.push($),s=w.exec(h)}return f},Qi=function(h){let w=ri.exec(h);return!(w===null||typeof w==="undefined")};Ki.isExist=function(h){return typeof h!=="undefined"};Ki.isEmptyObject=function(h){return Object.keys(h).length===0};Ki.merge=function(h,w,f){if(w){let s=Object.keys(w),$=s.length;for(let E=0;E<$;E++)if(f==="strict")h[s[E]]=[w[s[E]]];else h[s[E]]=w[s[E]]}};Ki.getValue=function(h){if(Ki.isExist(h))return h;else return""};Ki.isName=Qi;Ki.getAllMatches=Mi;Ki.nameRegexp=zR});var eF=H((mi)=>{var nF=i5(),Di={allowBooleanAttributes:!1,unpairedTags:[]};mi.validate=function(h,w){w=Object.assign({},Di,w);let f=[],s=!1,$=!1;if(h[0]==="\uFEFF")h=h.substr(1);for(let E=0;E<h.length;E++)if(h[E]==="<"&&h[E+1]==="?"){if(E+=2,E=XR(h,E),E.err)return E}else if(h[E]==="<"){let T=E;if(E++,h[E]==="!"){E=YR(h,E);continue}else{let U=!1;if(h[E]==="/")U=!0,E++;let F="";for(;E<h.length&&h[E]!==">"&&h[E]!==" "&&h[E]!=="\t"&&h[E]!==`
|
|
32
|
-
`&&h[E]!=="\r";E++)F+=h[E];if(F=F.trim(),F[F.length-1]==="/")F=F.substring(0,F.length-1),E--;if(!bi(F)){let G;if(F.trim().length===0)G="Invalid space after '<'.";else G="Tag '"+F+"' is an invalid name.";return m0("InvalidTag",G,B1(h,E))}let C=ji(h,E);if(C===!1)return m0("InvalidAttr","Attributes for '"+F+"' have open quote.",B1(h,E));let I=C.value;if(E=C.index,I[I.length-1]==="/"){let G=E-I.length;I=I.substring(0,I.length-1);let B=SR(I,w);if(B===!0)s=!0;else return m0(B.err.code,B.err.msg,B1(h,G+B.err.line))}else if(U)if(!C.tagClosed)return m0("InvalidTag","Closing tag '"+F+"' doesn't have proper closing.",B1(h,E));else if(I.trim().length>0)return m0("InvalidTag","Closing tag '"+F+"' can't have attributes or invalid starting.",B1(h,T));else if(f.length===0)return m0("InvalidTag","Closing tag '"+F+"' has not been opened.",B1(h,T));else{let G=f.pop();if(F!==G.tagName){let B=B1(h,G.tagStartPos);return m0("InvalidTag","Expected closing tag '"+G.tagName+"' (opened in line "+B.line+", col "+B.col+") instead of closing tag '"+F+"'.",B1(h,T))}if(f.length==0)$=!0}else{let G=SR(I,w);if(G!==!0)return m0(G.err.code,G.err.msg,B1(h,E-I.length+G.err.line));if($===!0)return m0("InvalidXml","Multiple possible root nodes found.",B1(h,E));else if(w.unpairedTags.indexOf(F)!==-1);else f.push({tagName:F,tagStartPos:T});s=!0}for(E++;E<h.length;E++)if(h[E]==="<")if(h[E+1]==="!"){E++,E=YR(h,E);continue}else if(h[E+1]==="?"){if(E=XR(h,++E),E.err)return E}else break;else if(h[E]==="&"){let G=li(h,E);if(G==-1)return m0("InvalidChar","char '&' is not expected.",B1(h,E));E=G}else if($===!0&&!RR(h[E]))return m0("InvalidXml","Extra text at the end",B1(h,E));if(h[E]==="<")E--}}else{if(RR(h[E]))continue;return m0("InvalidChar","char '"+h[E]+"' is not expected.",B1(h,E))}if(!s)return m0("InvalidXml","Start tag expected.",1);else if(f.length==1)return m0("InvalidTag","Unclosed tag '"+f[0].tagName+"'.",B1(h,f[0].tagStartPos));else if(f.length>0)return m0("InvalidXml","Invalid '"+JSON.stringify(f.map((E)=>E.tagName),null,4).replace(/\r?\n/g,"")+"' found.",{line:1,col:1});return!0};function RR(h){return h===" "||h==="\t"||h===`
|
|
33
|
-
`||h==="\r"}function XR(h,w){let f=w;for(;w<h.length;w++)if(h[w]=="?"||h[w]==" "){let s=h.substr(f,w-f);if(w>5&&s==="xml")return m0("InvalidXml","XML declaration allowed only at the start of the document.",B1(h,w));else if(h[w]=="?"&&h[w+1]==">"){w++;break}else continue}return w}function YR(h,w){if(h.length>w+5&&h[w+1]==="-"&&h[w+2]==="-"){for(w+=3;w<h.length;w++)if(h[w]==="-"&&h[w+1]==="-"&&h[w+2]===">"){w+=2;break}}else if(h.length>w+8&&h[w+1]==="D"&&h[w+2]==="O"&&h[w+3]==="C"&&h[w+4]==="T"&&h[w+5]==="Y"&&h[w+6]==="P"&&h[w+7]==="E"){let f=1;for(w+=8;w<h.length;w++)if(h[w]==="<")f++;else if(h[w]===">"){if(f--,f===0)break}}else if(h.length>w+9&&h[w+1]==="["&&h[w+2]==="C"&&h[w+3]==="D"&&h[w+4]==="A"&&h[w+5]==="T"&&h[w+6]==="A"&&h[w+7]==="["){for(w+=8;w<h.length;w++)if(h[w]==="]"&&h[w+1]==="]"&&h[w+2]===">"){w+=2;break}}return w}var qi='"',ki="'";function ji(h,w){let f="",s="",$=!1;for(;w<h.length;w++){if(h[w]===qi||h[w]===ki)if(s==="")s=h[w];else if(s!==h[w]);else s="";else if(h[w]===">"){if(s===""){$=!0;break}}f+=h[w]}if(s!=="")return!1;return{value:f,index:w,tagClosed:$}}var yi=new RegExp(`(\\s*)([^\\s=]+)(\\s*=)?(\\s*(['"])(([\\s\\S])*?)\\5)?`,"g");function SR(h,w){let f=nF.getAllMatches(h,yi),s={};for(let $=0;$<f.length;$++){if(f[$][1].length===0)return m0("InvalidAttr","Attribute '"+f[$][2]+"' has no space in starting.",P$(f[$]));else if(f[$][3]!==void 0&&f[$][4]===void 0)return m0("InvalidAttr","Attribute '"+f[$][2]+"' is without value.",P$(f[$]));else if(f[$][3]===void 0&&!w.allowBooleanAttributes)return m0("InvalidAttr","boolean attribute '"+f[$][2]+"' is not allowed.",P$(f[$]));let E=f[$][2];if(!vi(E))return m0("InvalidAttr","Attribute '"+E+"' is an invalid name.",P$(f[$]));if(!s.hasOwnProperty(E))s[E]=1;else return m0("InvalidAttr","Attribute '"+E+"' is repeated.",P$(f[$]))}return!0}function Oi(h,w){let f=/\d/;if(h[w]==="x")w++,f=/[\da-fA-F]/;for(;w<h.length;w++){if(h[w]===";")return w;if(!h[w].match(f))break}return-1}function li(h,w){if(w++,h[w]===";")return-1;if(h[w]==="#")return w++,Oi(h,w);let f=0;for(;w<h.length;w++,f++){if(h[w].match(/\w/)&&f<20)continue;if(h[w]===";")break;return-1}return w}function m0(h,w,f){return{err:{code:h,msg:w,line:f.line||f,col:f.col}}}function vi(h){return nF.isName(h)}function bi(h){return nF.isName(h)}function B1(h,w){let f=h.substring(0,w).split(/\r?\n/);return{line:f.length,col:f[f.length-1].length+1}}function P$(h){return h.startIndex+h[1].length}});var MR=H((ci)=>{var rR={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(h,w){return w},attributeValueProcessor:function(h,w){return w},stopNodes:[],alwaysCreateTextNode:!1,isArray:()=>!1,commentPropName:!1,unpairedTags:[],processEntities:!0,htmlEntities:!1,ignoreDeclaration:!1,ignorePiTags:!1,transformTagName:!1,transformAttributeName:!1,updateTag:function(h,w,f){return h}},ii=function(h){return Object.assign({},rR,h)};ci.buildOptions=ii;ci.defaultOptions=rR});var ZR=H((PF0,KR)=>{class QR{constructor(h){this.tagname=h,this.child=[],this[":@"]={}}add(h,w){if(h==="__proto__")h="#__proto__";this.child.push({[h]:w})}addChild(h){if(h.tagname==="__proto__")h.tagname="#__proto__";if(h[":@"]&&Object.keys(h[":@"]).length>0)this.child.push({[h.tagname]:h.child,[":@"]:h[":@"]});else this.child.push({[h.tagname]:h.child})}}KR.exports=QR});var VR=H((HF0,JR)=>{var _i=i5();function ni(h,w){let f={};if(h[w+3]==="O"&&h[w+4]==="C"&&h[w+5]==="T"&&h[w+6]==="Y"&&h[w+7]==="P"&&h[w+8]==="E"){w=w+9;let s=1,$=!1,E=!1,T="";for(;w<h.length;w++)if(h[w]==="<"&&!E){if($&&pi(h,w)){if(w+=7,[entityName,val,w]=ei(h,w+1),val.indexOf("&")===-1)f[hc(entityName)]={regx:RegExp(`&${entityName};`,"g"),val}}else if($&&oi(h,w))w+=8;else if($&&ui(h,w))w+=8;else if($&&ti(h,w))w+=9;else if(ai)E=!0;else throw new Error("Invalid DOCTYPE");s++,T=""}else if(h[w]===">"){if(E){if(h[w-1]==="-"&&h[w-2]==="-")E=!1,s--}else s--;if(s===0)break}else if(h[w]==="[")$=!0;else T+=h[w];if(s!==0)throw new Error("Unclosed DOCTYPE")}else throw new Error("Invalid Tag instead of DOCTYPE");return{entities:f,i:w}}function ei(h,w){let f="";for(;w<h.length&&(h[w]!=="'"&&h[w]!=='"');w++)f+=h[w];if(f=f.trim(),f.indexOf(" ")!==-1)throw new Error("External entites are not supported");let s=h[w++],$="";for(;w<h.length&&h[w]!==s;w++)$+=h[w];return[f,$,w]}function ai(h,w){if(h[w+1]==="!"&&h[w+2]==="-"&&h[w+3]==="-")return!0;return!1}function pi(h,w){if(h[w+1]==="!"&&h[w+2]==="E"&&h[w+3]==="N"&&h[w+4]==="T"&&h[w+5]==="I"&&h[w+6]==="T"&&h[w+7]==="Y")return!0;return!1}function oi(h,w){if(h[w+1]==="!"&&h[w+2]==="E"&&h[w+3]==="L"&&h[w+4]==="E"&&h[w+5]==="M"&&h[w+6]==="E"&&h[w+7]==="N"&&h[w+8]==="T")return!0;return!1}function ui(h,w){if(h[w+1]==="!"&&h[w+2]==="A"&&h[w+3]==="T"&&h[w+4]==="T"&&h[w+5]==="L"&&h[w+6]==="I"&&h[w+7]==="S"&&h[w+8]==="T")return!0;return!1}function ti(h,w){if(h[w+1]==="!"&&h[w+2]==="N"&&h[w+3]==="O"&&h[w+4]==="T"&&h[w+5]==="A"&&h[w+6]==="T"&&h[w+7]==="I"&&h[w+8]==="O"&&h[w+9]==="N")return!0;return!1}function hc(h){if(_i.isName(h))return h;else throw new Error(`Invalid entity name ${h}`)}JR.exports=ni});var HR=H((NF0,PR)=>{var wc=/^[-+]?0x[a-fA-F0-9]+$/,fc=/^([\-\+])?(0*)([0-9]*(\.[0-9]*)?)$/,sc={hex:!0,leadingZeros:!0,decimalPoint:".",eNotation:!0};function $c(h,w={}){if(w=Object.assign({},sc,w),!h||typeof h!=="string")return h;let f=h.trim();if(w.skipLike!==void 0&&w.skipLike.test(f))return h;else if(h==="0")return 0;else if(w.hex&&wc.test(f))return Tc(f,16);else if(f.search(/[eE]/)!==-1){let s=f.match(/^([-\+])?(0*)([0-9]*(\.[0-9]*)?[eE][-\+]?[0-9]+)$/);if(s){if(w.leadingZeros)f=(s[1]||"")+s[3];else if(s[2]==="0"&&s[3][0]===".");else return h;return w.eNotation?Number(f):h}else return h}else{let s=fc.exec(f);if(s){let $=s[1],E=s[2],T=Ec(s[3]);if(!w.leadingZeros&&E.length>0&&$&&f[2]!==".")return h;else if(!w.leadingZeros&&E.length>0&&!$&&f[1]!==".")return h;else if(w.leadingZeros&&E===h)return 0;else{let U=Number(f),F=""+U;if(F.search(/[eE]/)!==-1)if(w.eNotation)return U;else return h;else if(f.indexOf(".")!==-1)if(F==="0"&&T==="")return U;else if(F===T)return U;else if($&&F==="-"+T)return U;else return h;if(E)return T===F||$+T===F?U:h;else return f===F||f===$+F?U:h}}else return h}}function Ec(h){if(h&&h.indexOf(".")!==-1){if(h=h.replace(/0+$/,""),h===".")h="0";else if(h[0]===".")h="0"+h;else if(h[h.length-1]===".")h=h.substr(0,h.length-1);return h}return h}function Tc(h,w){if(parseInt)return parseInt(h,w);else if(Number.parseInt)return Number.parseInt(h,w);else if(window&&window.parseInt)return window.parseInt(h,w);else throw new Error("parseInt, Number.parseInt, window.parseInt are not supported")}PR.exports=$c});var kR=H((DF0,qR)=>{var NR=i5(),H$=ZR(),Uc=VR(),Fc=HR();class DR{constructor(h){this.options=h,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:(w,f)=>String.fromCharCode(Number.parseInt(f,10))},num_hex:{regex:/&#x([0-9a-fA-F]{1,6});/g,val:(w,f)=>String.fromCharCode(Number.parseInt(f,16))}},this.addExternalEntities=Cc,this.parseXml=Lc,this.parseTextData=Ic,this.resolveNameSpace=Gc,this.buildAttributesMap=Wc,this.isItStopNode=Xc,this.replaceEntitiesValue=Ac,this.readStopNodeData=Sc,this.saveTextToParentTag=Rc,this.addChild=zc}}function Cc(h){let w=Object.keys(h);for(let f=0;f<w.length;f++){let s=w[f];this.lastEntities[s]={regex:new RegExp("&"+s+";","g"),val:h[s]}}}function Ic(h,w,f,s,$,E,T){if(h!==void 0){if(this.options.trimValues&&!s)h=h.trim();if(h.length>0){if(!T)h=this.replaceEntitiesValue(h);let U=this.options.tagValueProcessor(w,h,f,$,E);if(U===null||U===void 0)return h;else if(typeof U!==typeof h||U!==h)return U;else if(this.options.trimValues)return pF(h,this.options.parseTagValue,this.options.numberParseOptions);else if(h.trim()===h)return pF(h,this.options.parseTagValue,this.options.numberParseOptions);else return h}}}function Gc(h){if(this.options.removeNSPrefix){let w=h.split(":"),f=h.charAt(0)==="/"?"/":"";if(w[0]==="xmlns")return"";if(w.length===2)h=f+w[1]}return h}var Bc=new RegExp(`([^\\s=]+)\\s*(=\\s*(['"])([\\s\\S]*?)\\3)?`,"gm");function Wc(h,w,f){if(!this.options.ignoreAttributes&&typeof h==="string"){let s=NR.getAllMatches(h,Bc),$=s.length,E={};for(let T=0;T<$;T++){let U=this.resolveNameSpace(s[T][1]),F=s[T][4],C=this.options.attributeNamePrefix+U;if(U.length){if(this.options.transformAttributeName)C=this.options.transformAttributeName(C);if(C==="__proto__")C="#__proto__";if(F!==void 0){if(this.options.trimValues)F=F.trim();F=this.replaceEntitiesValue(F);let I=this.options.attributeValueProcessor(U,F,w);if(I===null||I===void 0)E[C]=F;else if(typeof I!==typeof F||I!==F)E[C]=I;else E[C]=pF(F,this.options.parseAttributeValue,this.options.numberParseOptions)}else if(this.options.allowBooleanAttributes)E[C]=!0}}if(!Object.keys(E).length)return;if(this.options.attributesGroupName){let T={};return T[this.options.attributesGroupName]=E,T}return E}}var Lc=function(h){h=h.replace(/\r\n?/g,`
|
|
34
|
-
`);let w=new H$("!xml"),f=w,s="",$="";for(let E=0;E<h.length;E++)if(h[E]==="<")if(h[E+1]==="/"){let U=ew(h,">",E,"Closing Tag is not closed."),F=h.substring(E+2,U).trim();if(this.options.removeNSPrefix){let G=F.indexOf(":");if(G!==-1)F=F.substr(G+1)}if(this.options.transformTagName)F=this.options.transformTagName(F);if(f)s=this.saveTextToParentTag(s,f,$);let C=$.substring($.lastIndexOf(".")+1);if(F&&this.options.unpairedTags.indexOf(F)!==-1)throw new Error(`Unpaired tag can not be used as closing tag: </${F}>`);let I=0;if(C&&this.options.unpairedTags.indexOf(C)!==-1)I=$.lastIndexOf(".",$.lastIndexOf(".")-1),this.tagsNodeStack.pop();else I=$.lastIndexOf(".");$=$.substring(0,I),f=this.tagsNodeStack.pop(),s="",E=U}else if(h[E+1]==="?"){let U=aF(h,E,!1,"?>");if(!U)throw new Error("Pi Tag is not closed.");if(s=this.saveTextToParentTag(s,f,$),this.options.ignoreDeclaration&&U.tagName==="?xml"||this.options.ignorePiTags);else{let F=new H$(U.tagName);if(F.add(this.options.textNodeName,""),U.tagName!==U.tagExp&&U.attrExpPresent)F[":@"]=this.buildAttributesMap(U.tagExp,$,U.tagName);this.addChild(f,F,$)}E=U.closeIndex+1}else if(h.substr(E+1,3)==="!--"){let U=ew(h,"-->",E+4,"Comment is not closed.");if(this.options.commentPropName){let F=h.substring(E+4,U-2);s=this.saveTextToParentTag(s,f,$),f.add(this.options.commentPropName,[{[this.options.textNodeName]:F}])}E=U}else if(h.substr(E+1,2)==="!D"){let U=Uc(h,E);this.docTypeEntities=U.entities,E=U.i}else if(h.substr(E+1,2)==="!["){let U=ew(h,"]]>",E,"CDATA is not closed.")-2,F=h.substring(E+9,U);s=this.saveTextToParentTag(s,f,$);let C=this.parseTextData(F,f.tagname,$,!0,!1,!0,!0);if(C==null)C="";if(this.options.cdataPropName)f.add(this.options.cdataPropName,[{[this.options.textNodeName]:F}]);else f.add(this.options.textNodeName,C);E=U+2}else{let U=aF(h,E,this.options.removeNSPrefix),F=U.tagName,C=U.rawTagName,I=U.tagExp,G=U.attrExpPresent,B=U.closeIndex;if(this.options.transformTagName)F=this.options.transformTagName(F);if(f&&s){if(f.tagname!=="!xml")s=this.saveTextToParentTag(s,f,$,!1)}let z=f;if(z&&this.options.unpairedTags.indexOf(z.tagname)!==-1)f=this.tagsNodeStack.pop(),$=$.substring(0,$.lastIndexOf("."));if(F!==w.tagname)$+=$?"."+F:F;if(this.isItStopNode(this.options.stopNodes,$,F)){let Y="";if(I.length>0&&I.lastIndexOf("/")===I.length-1){if(F[F.length-1]==="/")F=F.substr(0,F.length-1),$=$.substr(0,$.length-1),I=F;else I=I.substr(0,I.length-1);E=U.closeIndex}else if(this.options.unpairedTags.indexOf(F)!==-1)E=U.closeIndex;else{let M=this.readStopNodeData(h,C,B+1);if(!M)throw new Error(`Unexpected end of ${C}`);E=M.i,Y=M.tagContent}let Q=new H$(F);if(F!==I&&G)Q[":@"]=this.buildAttributesMap(I,$,F);if(Y)Y=this.parseTextData(Y,F,$,!0,G,!0,!0);$=$.substr(0,$.lastIndexOf(".")),Q.add(this.options.textNodeName,Y),this.addChild(f,Q,$)}else{if(I.length>0&&I.lastIndexOf("/")===I.length-1){if(F[F.length-1]==="/")F=F.substr(0,F.length-1),$=$.substr(0,$.length-1),I=F;else I=I.substr(0,I.length-1);if(this.options.transformTagName)F=this.options.transformTagName(F);let Y=new H$(F);if(F!==I&&G)Y[":@"]=this.buildAttributesMap(I,$,F);this.addChild(f,Y,$),$=$.substr(0,$.lastIndexOf("."))}else{let Y=new H$(F);if(this.tagsNodeStack.push(f),F!==I&&G)Y[":@"]=this.buildAttributesMap(I,$,F);this.addChild(f,Y,$),f=Y}s="",E=B}}else s+=h[E];return w.child};function zc(h,w,f){let s=this.options.updateTag(w.tagname,f,w[":@"]);if(s===!1);else if(typeof s==="string")w.tagname=s,h.addChild(w);else h.addChild(w)}var Ac=function(h){if(this.options.processEntities){for(let w in this.docTypeEntities){let f=this.docTypeEntities[w];h=h.replace(f.regx,f.val)}for(let w in this.lastEntities){let f=this.lastEntities[w];h=h.replace(f.regex,f.val)}if(this.options.htmlEntities)for(let w in this.htmlEntities){let f=this.htmlEntities[w];h=h.replace(f.regex,f.val)}h=h.replace(this.ampEntity.regex,this.ampEntity.val)}return h};function Rc(h,w,f,s){if(h){if(s===void 0)s=Object.keys(w.child).length===0;if(h=this.parseTextData(h,w.tagname,f,!1,w[":@"]?Object.keys(w[":@"]).length!==0:!1,s),h!==void 0&&h!=="")w.add(this.options.textNodeName,h);h=""}return h}function Xc(h,w,f){let s="*."+f;for(let $ in h){let E=h[$];if(s===E||w===E)return!0}return!1}function Yc(h,w,f=">"){let s,$="";for(let E=w;E<h.length;E++){let T=h[E];if(s){if(T===s)s=""}else if(T==='"'||T==="'")s=T;else if(T===f[0])if(f[1]){if(h[E+1]===f[1])return{data:$,index:E}}else return{data:$,index:E};else if(T==="\t")T=" ";$+=T}}function ew(h,w,f,s){let $=h.indexOf(w,f);if($===-1)throw new Error(s);else return $+w.length-1}function aF(h,w,f,s=">"){let $=Yc(h,w+1,s);if(!$)return;let{data:E,index:T}=$,U=E.search(/\s/),F=E,C=!0;if(U!==-1)F=E.substring(0,U),E=E.substring(U+1).trimStart();let I=F;if(f){let G=F.indexOf(":");if(G!==-1)F=F.substr(G+1),C=F!==$.data.substr(G+1)}return{tagName:F,tagExp:E,closeIndex:T,attrExpPresent:C,rawTagName:I}}function Sc(h,w,f){let s=f,$=1;for(;f<h.length;f++)if(h[f]==="<")if(h[f+1]==="/"){let E=ew(h,">",f,`${w} is not closed`);if(h.substring(f+2,E).trim()===w){if($--,$===0)return{tagContent:h.substring(s,f),i:E}}f=E}else if(h[f+1]==="?")f=ew(h,"?>",f+1,"StopNode is not closed.");else if(h.substr(f+1,3)==="!--")f=ew(h,"-->",f+3,"StopNode is not closed.");else if(h.substr(f+1,2)==="![")f=ew(h,"]]>",f,"StopNode is not closed.")-2;else{let E=aF(h,f,">");if(E){if((E&&E.tagName)===w&&E.tagExp[E.tagExp.length-1]!=="/")$++;f=E.closeIndex}}}function pF(h,w,f){if(w&&typeof h==="string"){let s=h.trim();if(s==="true")return!0;else if(s==="false")return!1;else return Fc(h,f)}else if(NR.isExist(h))return h;else return""}qR.exports=DR});var yR=H((Zc)=>{function rc(h,w){return jR(h,w)}function jR(h,w,f){let s,$={};for(let E=0;E<h.length;E++){let T=h[E],U=Mc(T),F="";if(f===void 0)F=U;else F=f+"."+U;if(U===w.textNodeName)if(s===void 0)s=T[U];else s+=""+T[U];else if(U===void 0)continue;else if(T[U]){let C=jR(T[U],w,F),I=Kc(C,w);if(T[":@"])Qc(C,T[":@"],F,w);else if(Object.keys(C).length===1&&C[w.textNodeName]!==void 0&&!w.alwaysCreateTextNode)C=C[w.textNodeName];else if(Object.keys(C).length===0)if(w.alwaysCreateTextNode)C[w.textNodeName]="";else C="";if($[U]!==void 0&&$.hasOwnProperty(U)){if(!Array.isArray($[U]))$[U]=[$[U]];$[U].push(C)}else if(w.isArray(U,F,I))$[U]=[C];else $[U]=C}}if(typeof s==="string"){if(s.length>0)$[w.textNodeName]=s}else if(s!==void 0)$[w.textNodeName]=s;return $}function Mc(h){let w=Object.keys(h);for(let f=0;f<w.length;f++){let s=w[f];if(s!==":@")return s}}function Qc(h,w,f,s){if(w){let $=Object.keys(w),E=$.length;for(let T=0;T<E;T++){let U=$[T];if(s.isArray(U,f+"."+U,!0,!0))h[U]=[w[U]];else h[U]=w[U]}}}function Kc(h,w){let{textNodeName:f}=w,s=Object.keys(h).length;if(s===0)return!0;if(s===1&&(h[f]||typeof h[f]==="boolean"||h[f]===0))return!0;return!1}Zc.prettify=rc});var vR=H((kF0,lR)=>{var{buildOptions:Vc}=MR(),Pc=kR(),{prettify:Hc}=yR(),Nc=eF();class OR{constructor(h){this.externalEntities={},this.options=Vc(h)}parse(h,w){if(typeof h==="string");else if(h.toString)h=h.toString();else throw new Error("XML data is accepted in String or Bytes[] form.");if(w){if(w===!0)w={};let $=Nc.validate(h,w);if($!==!0)throw Error(`${$.err.msg}:${$.err.line}:${$.err.col}`)}let f=new Pc(this.options);f.addExternalEntities(this.externalEntities);let s=f.parseXml(h);if(this.options.preserveOrder||s===void 0)return s;else return Hc(s,this.options)}addEntity(h,w){if(w.indexOf("&")!==-1)throw new Error("Entity value can't have '&'");else if(h.indexOf("&")!==-1||h.indexOf(";")!==-1)throw new Error("An entity must be set without '&' and ';'. Eg. use '#xD' for '
'");else if(w==="&")throw new Error("An entity with value '&' is not permitted");else this.externalEntities[h]=w}}lR.exports=OR});var cR=H((jF0,iR)=>{function Dc(h,w){let f="";if(w.format&&w.indentBy.length>0)f=`
|
|
35
|
-
`;return mR(h,w,"",f)}function mR(h,w,f,s){let $="",E=!1;for(let T=0;T<h.length;T++){let U=h[T],F=qc(U);if(F===void 0)continue;let C="";if(f.length===0)C=F;else C=`${f}.${F}`;if(F===w.textNodeName){let Y=U[F];if(!kc(C,w))Y=w.tagValueProcessor(F,Y),Y=dR(Y,w);if(E)$+=s;$+=Y,E=!1;continue}else if(F===w.cdataPropName){if(E)$+=s;$+=`<![CDATA[${U[F][0][w.textNodeName]}]]>`,E=!1;continue}else if(F===w.commentPropName){$+=s+`<!--${U[F][0][w.textNodeName]}-->`,E=!0;continue}else if(F[0]==="?"){let Y=bR(U[":@"],w),Q=F==="?xml"?"":s,M=U[F][0][w.textNodeName];M=M.length!==0?" "+M:"",$+=Q+`<${F}${M}${Y}?>`,E=!0;continue}let I=s;if(I!=="")I+=w.indentBy;let G=bR(U[":@"],w),B=s+`<${F}${G}`,z=mR(U[F],w,C,I);if(w.unpairedTags.indexOf(F)!==-1)if(w.suppressUnpairedNode)$+=B+">";else $+=B+"/>";else if((!z||z.length===0)&&w.suppressEmptyNode)$+=B+"/>";else if(z&&z.endsWith(">"))$+=B+`>${z}${s}</${F}>`;else{if($+=B+">",z&&s!==""&&(z.includes("/>")||z.includes("</")))$+=s+w.indentBy+z+s;else $+=z;$+=`</${F}>`}E=!0}return $}function qc(h){let w=Object.keys(h);for(let f=0;f<w.length;f++){let s=w[f];if(!h.hasOwnProperty(s))continue;if(s!==":@")return s}}function bR(h,w){let f="";if(h&&!w.ignoreAttributes)for(let s in h){if(!h.hasOwnProperty(s))continue;let $=w.attributeValueProcessor(s,h[s]);if($=dR($,w),$===!0&&w.suppressBooleanAttributes)f+=` ${s.substr(w.attributeNamePrefix.length)}`;else f+=` ${s.substr(w.attributeNamePrefix.length)}="${$}"`}return f}function kc(h,w){h=h.substr(0,h.length-w.textNodeName.length-1);let f=h.substr(h.lastIndexOf(".")+1);for(let s in w.stopNodes)if(w.stopNodes[s]===h||w.stopNodes[s]==="*."+f)return!0;return!1}function dR(h,w){if(h&&h.length>0&&w.processEntities)for(let f=0;f<w.entities.length;f++){let s=w.entities[f];h=h.replace(s.regex,s.val)}return h}iR.exports=Dc});var xR=H((yF0,gR)=>{var jc=cR(),yc={attributeNamePrefix:"@_",attributesGroupName:!1,textNodeName:"#text",ignoreAttributes:!0,cdataPropName:!1,format:!1,indentBy:" ",suppressEmptyNode:!1,suppressUnpairedNode:!0,suppressBooleanAttributes:!0,tagValueProcessor:function(h,w){return w},attributeValueProcessor:function(h,w){return w},preserveOrder:!1,commentPropName:!1,unpairedTags:[],entities:[{regex:new RegExp("&","g"),val:"&"},{regex:new RegExp(">","g"),val:">"},{regex:new RegExp("<","g"),val:"<"},{regex:new RegExp("'","g"),val:"'"},{regex:new RegExp('"',"g"),val:"""}],processEntities:!0,stopNodes:[],oneListGroup:!1};function Ww(h){if(this.options=Object.assign({},yc,h),this.options.ignoreAttributes||this.options.attributesGroupName)this.isAttribute=function(){return!1};else this.attrPrefixLen=this.options.attributeNamePrefix.length,this.isAttribute=vc;if(this.processTextOrObjNode=Oc,this.options.format)this.indentate=lc,this.tagEndChar=`>
|
|
36
|
-
`,this.newLine=`
|
|
37
|
-
`;else this.indentate=function(){return""},this.tagEndChar=">",this.newLine=""}Ww.prototype.build=function(h){if(this.options.preserveOrder)return jc(h,this.options);else{if(Array.isArray(h)&&this.options.arrayNodeName&&this.options.arrayNodeName.length>1)h={[this.options.arrayNodeName]:h};return this.j2x(h,0).val}};Ww.prototype.j2x=function(h,w){let f="",s="";for(let $ in h){if(!Object.prototype.hasOwnProperty.call(h,$))continue;if(typeof h[$]==="undefined"){if(this.isAttribute($))s+=""}else if(h[$]===null)if(this.isAttribute($))s+="";else if($[0]==="?")s+=this.indentate(w)+"<"+$+"?"+this.tagEndChar;else s+=this.indentate(w)+"<"+$+"/"+this.tagEndChar;else if(h[$]instanceof Date)s+=this.buildTextValNode(h[$],$,"",w);else if(typeof h[$]!=="object"){let E=this.isAttribute($);if(E)f+=this.buildAttrPairStr(E,""+h[$]);else if($===this.options.textNodeName){let T=this.options.tagValueProcessor($,""+h[$]);s+=this.replaceEntitiesValue(T)}else s+=this.buildTextValNode(h[$],$,"",w)}else if(Array.isArray(h[$])){let E=h[$].length,T="",U="";for(let F=0;F<E;F++){let C=h[$][F];if(typeof C==="undefined");else if(C===null)if($[0]==="?")s+=this.indentate(w)+"<"+$+"?"+this.tagEndChar;else s+=this.indentate(w)+"<"+$+"/"+this.tagEndChar;else if(typeof C==="object")if(this.options.oneListGroup){let I=this.j2x(C,w+1);if(T+=I.val,this.options.attributesGroupName&&C.hasOwnProperty(this.options.attributesGroupName))U+=I.attrStr}else T+=this.processTextOrObjNode(C,$,w);else if(this.options.oneListGroup){let I=this.options.tagValueProcessor($,C);I=this.replaceEntitiesValue(I),T+=I}else T+=this.buildTextValNode(C,$,"",w)}if(this.options.oneListGroup)T=this.buildObjectNode(T,$,U,w);s+=T}else if(this.options.attributesGroupName&&$===this.options.attributesGroupName){let E=Object.keys(h[$]),T=E.length;for(let U=0;U<T;U++)f+=this.buildAttrPairStr(E[U],""+h[$][E[U]])}else s+=this.processTextOrObjNode(h[$],$,w)}return{attrStr:f,val:s}};Ww.prototype.buildAttrPairStr=function(h,w){if(w=this.options.attributeValueProcessor(h,""+w),w=this.replaceEntitiesValue(w),this.options.suppressBooleanAttributes&&w==="true")return" "+h;else return" "+h+'="'+w+'"'};function Oc(h,w,f){let s=this.j2x(h,f+1);if(h[this.options.textNodeName]!==void 0&&Object.keys(h).length===1)return this.buildTextValNode(h[this.options.textNodeName],w,s.attrStr,f);else return this.buildObjectNode(s.val,w,s.attrStr,f)}Ww.prototype.buildObjectNode=function(h,w,f,s){if(h==="")if(w[0]==="?")return this.indentate(s)+"<"+w+f+"?"+this.tagEndChar;else return this.indentate(s)+"<"+w+f+this.closeTag(w)+this.tagEndChar;else{let $="</"+w+this.tagEndChar,E="";if(w[0]==="?")E="?",$="";if((f||f==="")&&h.indexOf("<")===-1)return this.indentate(s)+"<"+w+f+E+">"+h+$;else if(this.options.commentPropName!==!1&&w===this.options.commentPropName&&E.length===0)return this.indentate(s)+`<!--${h}-->`+this.newLine;else return this.indentate(s)+"<"+w+f+E+this.tagEndChar+h+this.indentate(s)+$}};Ww.prototype.closeTag=function(h){let w="";if(this.options.unpairedTags.indexOf(h)!==-1){if(!this.options.suppressUnpairedNode)w="/"}else if(this.options.suppressEmptyNode)w="/";else w=`></${h}`;return w};Ww.prototype.buildTextValNode=function(h,w,f,s){if(this.options.cdataPropName!==!1&&w===this.options.cdataPropName)return this.indentate(s)+`<![CDATA[${h}]]>`+this.newLine;else if(this.options.commentPropName!==!1&&w===this.options.commentPropName)return this.indentate(s)+`<!--${h}-->`+this.newLine;else if(w[0]==="?")return this.indentate(s)+"<"+w+f+"?"+this.tagEndChar;else{let $=this.options.tagValueProcessor(w,h);if($=this.replaceEntitiesValue($),$==="")return this.indentate(s)+"<"+w+f+this.closeTag(w)+this.tagEndChar;else return this.indentate(s)+"<"+w+f+">"+$+"</"+w+this.tagEndChar}};Ww.prototype.replaceEntitiesValue=function(h){if(h&&h.length>0&&this.options.processEntities)for(let w=0;w<this.options.entities.length;w++){let f=this.options.entities[w];h=h.replace(f.regex,f.val)}return h};function lc(h){return this.options.indentBy.repeat(h)}function vc(h){if(h.startsWith(this.options.attributeNamePrefix)&&h!==this.options.textNodeName)return h.substr(this.attrPrefixLen);else return!1}gR.exports=Ww});var nR=H((OF0,_R)=>{var bc=eF(),mc=vR(),dc=xR();_R.exports={XMLParser:mc,XMLValidator:bc,XMLBuilder:dc}});var tR=H((lF0,uR)=>{var{defineProperty:c5,getOwnPropertyDescriptor:ic,getOwnPropertyNames:cc}=Object,gc=Object.prototype.hasOwnProperty,Y1=(h,w)=>c5(h,"name",{value:w,configurable:!0}),xc=(h,w)=>{for(var f in w)c5(h,f,{get:w[f],enumerable:!0})},_c=(h,w,f,s)=>{if(w&&typeof w==="object"||typeof w==="function"){for(let $ of cc(w))if(!gc.call(h,$)&&$!==f)c5(h,$,{get:()=>w[$],enumerable:!(s=ic(w,$))||s.enumerable})}return h},nc=(h)=>_c(c5({},"__esModule",{value:!0}),h),eR={};xc(eR,{_toBool:()=>ac,_toNum:()=>pc,_toStr:()=>ec,awsExpectUnion:()=>uc,loadRestJsonErrorCode:()=>wg,loadRestXmlErrorCode:()=>Eg,parseJsonBody:()=>pR,parseJsonErrorBody:()=>hg,parseXmlBody:()=>oR,parseXmlErrorBody:()=>$g});uR.exports=nc(eR);var ec=Y1((h)=>{if(h==null)return h;if(typeof h==="number"||typeof h==="bigint"){let w=new Error(`Received number ${h} where a string was expected.`);return w.name="Warning",console.warn(w),String(h)}if(typeof h==="boolean"){let w=new Error(`Received boolean ${h} where a string was expected.`);return w.name="Warning",console.warn(w),String(h)}return h},"_toStr"),ac=Y1((h)=>{if(h==null)return h;if(typeof h==="string"){let w=h.toLowerCase();if(h!==""&&w!=="false"&&w!=="true"){let f=new Error(`Received string "${h}" where a boolean was expected.`);f.name="Warning",console.warn(f)}return h!==""&&w!=="false"}return h},"_toBool"),pc=Y1((h)=>{if(h==null)return h;if(typeof h==="string"){let w=Number(h);if(w.toString()!==h){let f=new Error(`Received string "${h}" where a number was expected.`);return f.name="Warning",console.warn(f),h}return w}return h},"_toNum"),oc=Z0(),uc=Y1((h)=>{if(h==null)return;if(typeof h==="object"&&"__type"in h)delete h.__type;return oc.expectUnion(h)},"awsExpectUnion"),tc=Z0(),aR=Y1((h,w)=>tc.collectBody(h,w).then((f)=>w.utf8Encoder(f)),"collectBodyString"),pR=Y1((h,w)=>aR(h,w).then((f)=>{if(f.length)try{return JSON.parse(f)}catch(s){if(s?.name==="SyntaxError")Object.defineProperty(s,"$responseBodyText",{value:f});throw s}return{}}),"parseJsonBody"),hg=Y1(async(h,w)=>{let f=await pR(h,w);return f.message=f.message??f.Message,f},"parseJsonErrorBody"),wg=Y1((h,w)=>{let f=Y1((E,T)=>Object.keys(E).find((U)=>U.toLowerCase()===T.toLowerCase()),"findKey"),s=Y1((E)=>{let T=E;if(typeof T==="number")T=T.toString();if(T.indexOf(",")>=0)T=T.split(",")[0];if(T.indexOf(":")>=0)T=T.split(":")[0];if(T.indexOf("#")>=0)T=T.split("#")[1];return T},"sanitizeErrorCode"),$=f(h.headers,"x-amzn-errortype");if($!==void 0)return s(h.headers[$]);if(w.code!==void 0)return s(w.code);if(w.__type!==void 0)return s(w.__type)},"loadRestJsonErrorCode"),fg=Z0(),sg=nR(),oR=Y1((h,w)=>aR(h,w).then((f)=>{if(f.length){let s=new sg.XMLParser({attributeNamePrefix:"",htmlEntities:!0,ignoreAttributes:!1,ignoreDeclaration:!0,parseTagValue:!1,trimValues:!1,tagValueProcessor:Y1((F,C)=>C.trim()===""&&C.includes(`
|
|
38
|
-
`)?"":void 0,"tagValueProcessor")});s.addEntity("#xD","\r"),s.addEntity("#10",`
|
|
39
|
-
`);let $;try{$=s.parse(f,!0)}catch(F){if(F&&typeof F==="object")Object.defineProperty(F,"$responseBodyText",{value:f});throw F}let E="#text",T=Object.keys($)[0],U=$[T];if(U[E])U[T]=U[E],delete U[E];return fg.getValueFromTextNode(U)}return{}}),"parseXmlBody"),$g=Y1(async(h,w)=>{let f=await oR(h,w);if(f.Error)f.Error.message=f.Error.message??f.Error.Message;return f},"parseXmlErrorBody"),Eg=Y1((h,w)=>{if(w?.Error?.Code!==void 0)return w.Error.Code;if(w?.Code!==void 0)return w.Code;if(h.statusCode==404)return"NotFound"},"loadRestXmlErrorCode")});var y0=H((N$)=>{Object.defineProperty(N$,"__esModule",{value:!0});var oF=V5();oF.__exportStar(G1(),N$);oF.__exportStar(xA(),N$);oF.__exportStar(tR(),N$)});async function hX(h,w,f){if(f.request?.headers?.["smithy-protocol"]==="rpc-v2-cbor")u1.setFeature(h,"PROTOCOL_RPC_V2_CBOR","M");if(typeof w.retryStrategy==="function"){let E=await w.retryStrategy();if(typeof E.acquireInitialRetryToken==="function")if(E.constructor?.name?.includes("Adaptive"))u1.setFeature(h,"RETRY_MODE_ADAPTIVE","F");else u1.setFeature(h,"RETRY_MODE_STANDARD","E");else u1.setFeature(h,"RETRY_MODE_LEGACY","D")}if(typeof w.accountIdEndpointMode==="function"){let E=h.endpointV2;if(String(E?.url?.hostname).match(Tg))u1.setFeature(h,"ACCOUNT_ID_ENDPOINT","O");switch(await w.accountIdEndpointMode?.()){case"disabled":u1.setFeature(h,"ACCOUNT_ID_MODE_DISABLED","Q");break;case"preferred":u1.setFeature(h,"ACCOUNT_ID_MODE_PREFERRED","P");break;case"required":u1.setFeature(h,"ACCOUNT_ID_MODE_REQUIRED","R");break}}let $=h.__smithy_context?.selectedHttpAuthScheme?.identity;if($?.$source){let E=$;if(E.accountId)u1.setFeature(h,"RESOLVED_ACCOUNT_ID","T");for(let[T,U]of Object.entries(E.$source??{}))u1.setFeature(h,T,U)}}var u1,Tg;var wX=L(()=>{u1=O(y0(),1),Tg=/\d{12}\.ddb/});var uF="user-agent",g5="x-amz-user-agent",tF=" ",x5="/",fX,sX,h3="-";var $X=L(()=>{fX=/[^\!\$\%\&\'\*\+\-\.\^\_\`\|\~\d\w]/g,sX=/[^\!\$\%\&\'\*\+\-\.\^\_\`\|\~\d\w\#]/g});function EX(h){let w="";for(let f in h){let s=h[f];if(w.length+s.length+1<=1024){if(w.length)w+=","+s;else w+=s;continue}break}return w}var Ug=(h)=>(w,f)=>async(s)=>{let{request:$}=s;if(!_0.isInstance($))return w(s);let{headers:E}=$,T=f?.userAgent?.map(_5)||[],U=(await h.defaultUserAgentProvider()).map(_5);await hX(f,h,s);let F=f;U.push(`m/${EX(Object.assign({},f.__smithy_context?.features,F.__aws_sdk_context?.features))}`);let C=h?.customUserAgent?.map(_5)||[],I=await h.userAgentAppId();if(I)U.push(_5([`app/${I}`]));let G=H7(),B=(G?[G]:[]).concat([...U,...T,...C]).join(tF),z=[...U.filter((Y)=>Y.startsWith("aws-sdk-")),...C].join(tF);if(h.runtime!=="browser"){if(z)E[g5]=E[g5]?`${E[uF]} ${z}`:z;E[uF]=B}else E[g5]=B;return w({...s,request:$})},_5=(h)=>{let w=h[0].split(x5).map((T)=>T.replace(fX,h3)).join(x5),f=h[1]?.replace(sX,h3),s=w.indexOf(x5),$=w.substring(0,s),E=w.substring(s+1);if($==="api")E=E.toLowerCase();return[$,E,f].filter((T)=>T&&T.length>0).reduce((T,U,F)=>{switch(F){case 0:return U;case 1:return`${T}/${U}`;default:return`${T}#${U}`}},"")},Fg,Of=(h)=>({applyToStack:(w)=>{w.add(Ug(h),Fg)}});var TX=L(()=>{M$();C1();wX();$X();Fg={name:"getUserAgentMiddleware",step:"build",priority:"low",tags:["SET_USER_AGENT","USER_AGENT"],override:!0}});var D$=L(()=>{dz();TX()});var lf=(h,w,f)=>{if(!(w in h))return;if(h[w]==="true")return!0;if(h[w]==="false")return!1;throw new Error(`Cannot load ${f} "${w}". Expected "true" or "false", got ${h[w]}.`)};var Lw;var UX=L(()=>{(function(h){h.ENV="env",h.CONFIG="shared config entry"})(Lw||(Lw={}))});var w3=L(()=>{UX()});var Cg="AWS_USE_DUALSTACK_ENDPOINT",Ig="use_dualstack_endpoint",vf;var FX=L(()=>{w3();vf={environmentVariableSelector:(h)=>lf(h,Cg,Lw.ENV),configFileSelector:(h)=>lf(h,Ig,Lw.CONFIG),default:!1}});var Gg="AWS_USE_FIPS_ENDPOINT",Bg="use_fips_endpoint",bf;var CX=L(()=>{w3();bf={environmentVariableSelector:(h)=>lf(h,Gg,Lw.ENV),configFileSelector:(h)=>lf(h,Bg,Lw.CONFIG),default:!1}});var f3,zw=(h)=>h[f3.SMITHY_CONTEXT_KEY]||(h[f3.SMITHY_CONTEXT_KEY]={});var IX=L(()=>{f3=O(F1(),1)});var W1=(h)=>{if(typeof h==="function")return h;let w=Promise.resolve(h);return()=>w};var mh=L(()=>{IX()});var GX=L(()=>{mh()});var BX=L(()=>{mh()});var WX=L(()=>{FX();CX();GX();BX()});var Aw,mf;var LX=L(()=>{Aw={environmentVariableSelector:(h)=>h.AWS_REGION,configFileSelector:(h)=>h.region,default:()=>{throw new Error("Region is missing")}},mf={preferredFile:"credentials"}});var n5=(h)=>typeof h==="string"&&(h.startsWith("fips-")||h.endsWith("-fips"));var s3=(h)=>n5(h)?["fips-aws-global","aws-fips"].includes(h)?"us-east-1":h.replace(/fips-(dkr-|prod-)?|-fips/,""):h;var zX=()=>{};var df=(h)=>{let{region:w,useFipsEndpoint:f}=h;if(!w)throw new Error("Region is missing");return Object.assign(h,{region:async()=>{if(typeof w==="string")return s3(w);let s=await w();return s3(s)},useFipsEndpoint:async()=>{let s=typeof w==="string"?w:await w();if(n5(s))return!0;return typeof f!=="function"?Promise.resolve(!!f):f()}})};var AX=L(()=>{zX()});var RX=L(()=>{LX();AX()});var XX=()=>{};var YX=()=>{};var SX=()=>{};var rX=L(()=>{XX();YX();SX()});var Rw=L(()=>{WX();RX();rX()});function Wg(h){return(w)=>async(f)=>{let s=f.request;if(_0.isInstance(s)){let{body:$,headers:E}=s;if($&&Object.keys(E).map((T)=>T.toLowerCase()).indexOf(MX)===-1)try{let T=h($);s.headers={...s.headers,[MX]:String(T)}}catch(T){}}return w({...f,request:s})}}var MX="content-length",Lg,cf=(h)=>({applyToStack:(w)=>{w.add(Wg(h.bodyLengthChecker),Lg)}});var e5=L(()=>{C1();Lg={step:"build",tags:["SET_CONTENT_LENGTH","CONTENT_LENGTH"],name:"contentLengthMiddleware",override:!0}});var QX=async(h)=>{let w=h?.Bucket||"";if(typeof h.Bucket==="string")h.Bucket=w.replace(/#/g,encodeURIComponent("#")).replace(/\?/g,encodeURIComponent("?"));if(Yg(w)){if(h.ForcePathStyle===!0)throw new Error("Path-style addressing cannot be used with ARN buckets")}else if(!Xg(w)||w.indexOf(".")!==-1&&!String(h.Endpoint).startsWith("http:")||w.toLowerCase()!==w||w.length<3)h.ForcePathStyle=!0;if(h.DisableMultiRegionAccessPoints)h.disableMultiRegionAccessPoints=!0,h.DisableMRAP=!0;return h},zg,Ag,Rg,Xg=(h)=>zg.test(h)&&!Ag.test(h)&&!Rg.test(h),Yg=(h)=>{let[w,f,s,,,$]=h.split(":"),E=w==="arn"&&h.split(":").length>=6,T=Boolean(E&&f&&s&&$);if(E&&!T)throw new Error(`Invalid ARN: ${h} was an invalid ARN.`);return T};var KX=L(()=>{zg=/^[a-z0-9][a-z0-9\.\-]{1,61}[a-z0-9]$/,Ag=/(\d+\.){3}\d+/,Rg=/\.\./});var ZX=L(()=>{KX()});var JX=(h,w,f)=>{let s=async()=>{let $=f[h]??f[w];if(typeof $==="function")return $();return $};if(h==="credentialScope"||w==="CredentialScope")return async()=>{let $=typeof f.credentials==="function"?await f.credentials():f.credentials;return $?.credentialScope??$?.CredentialScope};if(h==="accountId"||w==="AccountId")return async()=>{let $=typeof f.credentials==="function"?await f.credentials():f.credentials;return $?.accountId??$?.AccountId};if(h==="endpoint"||w==="endpoint")return async()=>{let $=await s();if($&&typeof $==="object"){if("url"in $)return $.url.href;if("hostname"in $){let{protocol:E,hostname:T,port:U,path:F}=$;return`${E}//${T}${U?":"+U:""}${F}`}}return $};return s};function a5(h){try{let w=new Set(Array.from(h.match(/([A-Z_]){3,}/g)??[]));return w.delete("CONFIG"),w.delete("CONFIG_PREFIX_SEPARATOR"),w.delete("ENV"),[...w].join(", ")}catch(w){return h}}var VX,PX=(h,w)=>async()=>{try{let f=h(process.env);if(f===void 0)throw new Error;return f}catch(f){throw new VX.CredentialsProviderError(f.message||`Not found in ENV: ${a5(h.toString())}`,{logger:w})}};var HX=L(()=>{VX=O(U0(),1)});import{homedir as Sg}from"node:os";import{sep as rg}from"node:path";var $3,Mg=()=>{if(process&&process.geteuid)return`${process.geteuid()}`;return"DEFAULT"},Xw=()=>{let{HOME:h,USERPROFILE:w,HOMEPATH:f,HOMEDRIVE:s=`C:${rg}`}=process.env;if(h)return h;if(w)return w;if(f)return`${s}${f}`;let $=Mg();if(!$3[$])$3[$]=Sg();return $3[$]};var gf=L(()=>{$3={}});var NX="AWS_PROFILE",q1=(h)=>h.profile||process.env.AWS_PROFILE||"default";import{createHash as Qg}from"node:crypto";import{join as Kg}from"node:path";var p5=(h)=>{let f=Qg("sha1").update(h).digest("hex");return Kg(Xw(),".aws","sso","cache",`${f}.json`)};var E3=L(()=>{gf()});import{promises as Zg}from"node:fs";var Jg,o5=async(h)=>{let w=p5(h),f=await Jg(w,"utf8");return JSON.parse(f)};var DX=L(()=>{E3();({readFile:Jg}=Zg)});var T3,qX=(h)=>Object.entries(h).filter(([w])=>{let f=w.indexOf(k1);if(f===-1)return!1;return Object.values(T3.IniSectionType).includes(w.substring(0,f))}).reduce((w,[f,s])=>{let $=f.indexOf(k1),E=f.substring(0,$)===T3.IniSectionType.PROFILE?f.substring($+1):f;return w[E]=s,w},{...h.default&&{default:h.default}});var kX=L(()=>{T3=O(F1(),1);xf()});import{join as Vg}from"node:path";var Pg="AWS_CONFIG_FILE",u5=()=>process.env[Pg]||Vg(Xw(),".aws","config");var U3=L(()=>{gf()});import{join as Hg}from"node:path";var Ng="AWS_SHARED_CREDENTIALS_FILE",jX=()=>process.env[Ng]||Hg(Xw(),".aws","credentials");var yX=L(()=>{gf()});var OX,Dg,qg,q$=(h)=>{let w={},f,s;for(let $ of h.split(/\r?\n/)){let E=$.split(/(^|\s)[;#]/)[0].trim();if(E[0]==="["&&E[E.length-1]==="]"){f=void 0,s=void 0;let U=E.substring(1,E.length-1),F=Dg.exec(U);if(F){let[,C,,I]=F;if(Object.values(OX.IniSectionType).includes(C))f=[C,I].join(k1)}else f=U;if(qg.includes(U))throw new Error(`Found invalid profile name "${U}"`)}else if(f){let U=E.indexOf("=");if(![0,-1].includes(U)){let[F,C]=[E.substring(0,U).trim(),E.substring(U+1).trim()];if(C==="")s=F;else{if(s&&$.trimStart()===$)s=void 0;w[f]=w[f]||{};let I=s?[s,F].join(k1):F;w[f][I]=C}}}}return w};var F3=L(()=>{OX=O(F1(),1);xf();Dg=/^([\w-]+)\s(["'])?([\w-@\+\.%:/]+)\2$/,qg=["__proto__","profile __proto__"]});import{promises as kg}from"node:fs";var jg,C3,k$=(h,w)=>{if(!C3[h]||w?.ignoreCache)C3[h]=jg(h,"utf8");return C3[h]};var I3=L(()=>{({readFile:jg}=kg),C3={}});import{join as lX}from"node:path";var vX=()=>({}),k1=".",t5=async(h={})=>{let{filepath:w=jX(),configFilepath:f=u5()}=h,s=Xw(),$="~/",E=w;if(w.startsWith("~/"))E=lX(s,w.slice(2));let T=f;if(f.startsWith("~/"))T=lX(s,f.slice(2));let U=await Promise.all([k$(T,{ignoreCache:h.ignoreCache}).then(q$).then(qX).catch(vX),k$(E,{ignoreCache:h.ignoreCache}).then(q$).catch(vX)]);return{configFile:U[0],credentialsFile:U[1]}};var xf=L(()=>{kX();U3();yX();gf();F3();I3()});var bX,mX=(h)=>Object.entries(h).filter(([w])=>w.startsWith(bX.IniSectionType.SSO_SESSION+k1)).reduce((w,[f,s])=>({...w,[f.substring(f.indexOf(k1)+1)]:s}),{});var dX=L(()=>{bX=O(F1(),1);xf()});var yg=()=>({}),h2=async(h={})=>k$(h.configFilepath??u5()).then(q$).then(mX).catch(yg);var iX=L(()=>{U3();dX();F3();I3()});var cX=(...h)=>{let w={};for(let f of h)for(let[s,$]of Object.entries(f))if(w[s]!==void 0)Object.assign(w[s],$);else w[s]=$;return w};var Yw=async(h)=>{let w=await t5(h);return cX(w.configFile,w.credentialsFile)};var gX=L(()=>{xf()});var xX=()=>{};var t1=L(()=>{gf();E3();DX();xf();iX();gX();xX()});var _X,nX=(h,{preferredFile:w="config",...f}={})=>async()=>{let s=q1(f),{configFile:$,credentialsFile:E}=await t5(f),T=E[s]||{},U=$[s]||{},F=w==="config"?{...T,...U}:{...U,...T};try{let I=h(F,w==="config"?$:E);if(I===void 0)throw new Error;return I}catch(C){throw new _X.CredentialsProviderError(C.message||`Not found in config files w/ profile [${s}]: ${a5(h.toString())}`,{logger:f.logger})}};var eX=L(()=>{_X=O(U0(),1);t1()});var aX,Og=(h)=>typeof h==="function",pX=(h)=>Og(h)?async()=>await h():aX.fromStatic(h);var oX=L(()=>{aX=O(U0(),1)});var w2,R0=({environmentVariableSelector:h,configFileSelector:w,default:f},s={})=>w2.memoize(w2.chain(PX(h),nX(w,s),pX(f)));var uX=L(()=>{w2=O(U0(),1);HX();eX();oX()});var Sw=L(()=>{uX()});var tX="AWS_ENDPOINT_URL",h9="endpoint_url",w9=(h)=>({environmentVariableSelector:(w)=>{let f=h.split(" ").map((E)=>E.toUpperCase()),s=w[[tX,...f].join("_")];if(s)return s;let $=w[tX];if($)return $;return},configFileSelector:(w,f)=>{if(f&&w.services){let $=f[["services",w.services].join(k1)];if($){let E=h.split(" ").map((U)=>U.toLowerCase()),T=$[[E.join("_"),h9].join(k1)];if(T)return T}}let s=w[h9];if(s)return s;return},default:void 0});var f9=L(()=>{t1()});var f2=async(h)=>R0(w9(h??""))();var G3=L(()=>{Sw();f9()});function s9(h){let w={};if(h=h.replace(/^\?/,""),h)for(let f of h.split("&")){let[s,$=null]=f.split("=");if(s=decodeURIComponent(s),$)$=decodeURIComponent($);if(!(s in w))w[s]=$;else if(Array.isArray(w[s]))w[s].push($);else w[s]=[w[s],$]}return w}var j1=(h)=>{if(typeof h==="string")return j1(new URL(h));let{hostname:w,pathname:f,port:s,protocol:$,search:E}=h,T;if(E)T=s9(E);return{hostname:w,port:s?parseInt(s):void 0,protocol:$,path:f,query:T}};var _f=()=>{};var s2=(h)=>{if(typeof h==="object"){if("url"in h)return j1(h.url);return h}return j1(h)};var $2=L(()=>{_f()});var $9=async(h,w,f,s)=>{if(!f.endpoint){let T;if(f.serviceConfiguredEndpoint)T=await f.serviceConfiguredEndpoint();else T=await f2(f.serviceId);if(T)f.endpoint=()=>Promise.resolve(s2(T))}let $=await lg(h,w,f);if(typeof f.endpointProvider!=="function")throw new Error("config.endpointProvider is not set.");return f.endpointProvider($,s)},lg=async(h,w,f)=>{let s={},$=w?.getEndpointParameterInstructions?.()||{};for(let[E,T]of Object.entries($))switch(T.type){case"staticContextParams":s[E]=T.value;break;case"contextParams":s[E]=h[T.name];break;case"clientContextParams":case"builtInParams":s[E]=await JX(T.name,E,f)();break;case"operationContextParams":s[E]=T.get(h);break;default:throw new Error("Unrecognized endpoint parameter instruction: "+JSON.stringify(T))}if(Object.keys($).length===0)Object.assign(s,f);if(String(f.serviceId).toLowerCase()==="s3")await QX(s);return s};var B3=L(()=>{ZX();G3();$2()});var E9=L(()=>{B3();$2()});var T9,U9=({config:h,instructions:w})=>{return(f,s)=>async($)=>{if(h.endpoint)T9.setFeature(s,"ENDPOINT_OVERRIDE","N");let E=await $9($.input,{getEndpointParameterInstructions(){return w}},{...h},s);s.endpointV2=E,s.authSchemes=E.properties?.authSchemes;let T=s.authSchemes?.[0];if(T){s.signing_region=T.signingRegion,s.signing_service=T.signingName;let F=zw(s)?.selectedHttpAuthScheme?.httpAuthOption;if(F)F.signingProperties=Object.assign(F.signingProperties||{},{signing_region:T.signingRegion,signingRegion:T.signingRegion,signing_service:T.signingName,signingName:T.signingName,signingRegionSet:T.signingRegionSet},T.properties)}return f({...$})}};var W3=L(()=>{T9=O(b0(),1);mh();B3()});var F9=(h,w)=>(f,s)=>async($)=>{let{response:E}=await f($);try{let T=await w(E,h);return{response:E,output:T}}catch(T){if(Object.defineProperty(T,"$response",{value:E}),!("$metadata"in T)){try{T.message+=`
|
|
40
|
-
Deserialization error: to see the raw response, inspect the hidden field {error}.$response on this object.`}catch(F){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 T.$responseBodyText!=="undefined"){if(T.$response)T.$response.body=T.$responseBodyText}}throw T}};var C9=(h,w)=>(f,s)=>async($)=>{let E=s.endpointV2?.url&&h.urlParser?async()=>h.urlParser(s.endpointV2.url):h.endpoint;if(!E)throw new Error("No valid endpoint provider available.");let T=await w($.input,{...h,endpoint:E});return f({...$,request:T})};function R(h,w,f){return{applyToStack:(s)=>{s.add(F9(h,f),vg),s.add(C9(h,w),L3)}}}var vg,L3;var I9=L(()=>{vg={name:"deserializerMiddleware",step:"deserialize",tags:["DESERIALIZER"],override:!0},L3={name:"serializerMiddleware",step:"serialize",tags:["SERIALIZER"],override:!0}});var k=L(()=>{I9()});var bg,X=(h,w)=>({applyToStack:(f)=>{f.addRelativeTo(U9({config:h,instructions:w}),bg)}});var G9=L(()=>{k();W3();bg={step:"serialize",tags:["ENDPOINT_PARAMETERS","ENDPOINT_V2","ENDPOINT"],name:"endpointV2Middleware",override:!0,relation:"before",toMiddleware:L3.name}});var nf=(h)=>{let w=h.tls??!0,{endpoint:f,useDualstackEndpoint:s,useFipsEndpoint:$}=h,E=f!=null?async()=>s2(await W1(f)()):void 0,U=Object.assign(h,{endpoint:E,tls:w,isCustomEndpoint:!!f,useDualstackEndpoint:W1(s??!1),useFipsEndpoint:W1($??!1)}),F=void 0;return U.serviceConfiguredEndpoint=async()=>{if(h.serviceId&&!F)F=f2(h.serviceId);return F},U};var B9=L(()=>{mh();G3();$2()});var W9=()=>{};var D=L(()=>{E9();W3();G9();B9();W9()});var y1,aw=3,rw;var E2=L(()=>{(function(h){h.STANDARD="standard",h.ADAPTIVE="adaptive"})(y1||(y1={}));rw=y1.STANDARD});var L9,z9,A9,R9;var X9=L(()=>{L9=["BandwidthLimitExceeded","EC2ThrottledException","LimitExceededException","PriorRequestNotComplete","ProvisionedThroughputExceededException","RequestLimitExceeded","RequestThrottled","RequestThrottledException","SlowDown","ThrottledException","Throttling","ThrottlingException","TooManyRequestsException","TransactionInProgressException"],z9=["TimeoutError","RequestTimeout","RequestTimeoutException"],A9=[500,502,503,504],R9=["ECONNRESET","ECONNREFUSED","EPIPE","ETIMEDOUT"]});var mg=(h)=>h.$metadata?.clockSkewCorrected,ef=(h)=>h.$metadata?.httpStatusCode===429||L9.includes(h.name)||h.$retryable?.throttling==!0,j$=(h,w=0)=>mg(h)||z9.includes(h.name)||R9.includes(h?.code||"")||A9.includes(h.$metadata?.httpStatusCode||0)||h.cause!==void 0&&w<=10&&j$(h.cause,w+1),Y9=(h)=>{if(h.$metadata?.httpStatusCode!==void 0){let w=h.$metadata.httpStatusCode;if(500<=w&&w<=599&&!j$(h))return!0;return!1}return!1};var y$=L(()=>{X9()});class af{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}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((f)=>af.setTimeoutFn(f,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(),ef(h)){let s=!this.enabled?this.measuredTxRate:Math.min(this.measuredTxRate,this.fillRate);this.lastMaxRate=s,this.calculateTimeWindow(),this.lastThrottleTime=this.getCurrentTimeInSeconds(),w=this.cubicThrottle(s),this.enableTokenBucket()}else this.calculateTimeWindow(),w=this.cubicSuccess(this.getCurrentTimeInSeconds());let f=Math.min(w,2*this.measuredTxRate);this.updateTokenBucketRate(f)}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 f=this.requestCount/(w-this.lastTxRateBucket);this.measuredTxRate=this.getPrecise(f*this.smooth+this.measuredTxRate*(1-this.smooth)),this.requestCount=0,this.lastTxRateBucket=w}}getPrecise(h){return parseFloat(h.toFixed(8))}}var z3=L(()=>{y$();af.setTimeoutFn=setTimeout});var pw=100,O$=20000,A3=500,T2=500,R3=5,X3=10,Y3=1,U2="amz-sdk-invocation-id",F2="amz-sdk-request";var S9=()=>{let h=pw;return{computeNextBackoffDelay:(s)=>{return Math.floor(Math.min(O$,Math.random()*2**s*h))},setDelayBase:(s)=>{h=s}}};var r9=()=>{};var S3=({retryDelay:h,retryCount:w,retryCost:f})=>{return{getRetryCount:()=>w,getRetryDelay:()=>Math.min(O$,h),getRetryCost:()=>f}};var M9=()=>{};class pf{constructor(h){this.maxAttempts=h,this.mode=y1.STANDARD,this.capacity=T2,this.retryBackoffStrategy=S9(),this.maxAttemptsProvider=typeof h==="function"?h:async()=>h}async acquireInitialRetryToken(h){return S3({retryDelay:pw,retryCount:0})}async refreshRetryTokenForRetry(h,w){let f=await this.getMaxAttempts();if(this.shouldRetry(h,w,f)){let s=w.errorType;this.retryBackoffStrategy.setDelayBase(s==="THROTTLING"?A3:pw);let $=this.retryBackoffStrategy.computeNextBackoffDelay(h.getRetryCount()),E=w.retryAfterHint?Math.max(w.retryAfterHint.getTime()-Date.now()||0,$):$,T=this.getCapacityCost(s);return this.capacity-=T,S3({retryDelay:E,retryCount:h.getRetryCount()+1,retryCost:T})}throw new Error("No retry token available")}recordSuccess(h){this.capacity=Math.max(T2,this.capacity+(h.getRetryCost()??Y3))}getCapacity(){return this.capacity}async getMaxAttempts(){try{return await this.maxAttemptsProvider()}catch(h){return console.warn(`Max attempts provider could not resolve. Using default of ${aw}`),aw}}shouldRetry(h,w,f){return h.getRetryCount()+1<f&&this.capacity>=this.getCapacityCost(w.errorType)&&this.isRetryableError(w.errorType)}getCapacityCost(h){return h==="TRANSIENT"?X3:R3}isRetryableError(h){return h==="THROTTLING"||h==="TRANSIENT"}}var C2=L(()=>{E2();r9();M9()});class r3{constructor(h,w){this.maxAttemptsProvider=h,this.mode=y1.ADAPTIVE;let{rateLimiter:f}=w??{};this.rateLimiter=f??new af,this.standardRetryStrategy=new pf(h)}async acquireInitialRetryToken(h){return await this.rateLimiter.getSendToken(),this.standardRetryStrategy.acquireInitialRetryToken(h)}async refreshRetryTokenForRetry(h,w){return this.rateLimiter.updateClientSendingRate(w),this.standardRetryStrategy.refreshRetryTokenForRetry(h,w)}recordSuccess(h){this.rateLimiter.updateClientSendingRate({}),this.standardRetryStrategy.recordSuccess(h)}}var Q9=L(()=>{E2();z3();C2()});var K9=L(()=>{C2()});var Z9=()=>{};var hh=L(()=>{Q9();K9();z3();C2();E2();Z9()});var M3=H((J9)=>{Object.defineProperty(J9,"__esModule",{value:!0});J9.default=cg;var dg=ig(W0("node:crypto"));function ig(h){return h&&h.__esModule?h:{default:h}}var G2=new Uint8Array(256),I2=G2.length;function cg(){if(I2>G2.length-16)dg.default.randomFillSync(G2),I2=0;return G2.slice(I2,I2+=16)}});var H9=H((V9)=>{Object.defineProperty(V9,"__esModule",{value:!0});V9.default=void 0;var xg=/^(?:[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;V9.default=xg});var l$=H((N9)=>{Object.defineProperty(N9,"__esModule",{value:!0});N9.default=void 0;var _g=ng(H9());function ng(h){return h&&h.__esModule?h:{default:h}}function eg(h){return typeof h==="string"&&_g.default.test(h)}var ag=eg;N9.default=ag});var v$=H((k9)=>{Object.defineProperty(k9,"__esModule",{value:!0});k9.default=void 0;k9.unsafeStringify=q9;var pg=og(l$());function og(h){return h&&h.__esModule?h:{default:h}}var h1=[];for(let h=0;h<256;++h)h1.push((h+256).toString(16).slice(1));function q9(h,w=0){return h1[h[w+0]]+h1[h[w+1]]+h1[h[w+2]]+h1[h[w+3]]+"-"+h1[h[w+4]]+h1[h[w+5]]+"-"+h1[h[w+6]]+h1[h[w+7]]+"-"+h1[h[w+8]]+h1[h[w+9]]+"-"+h1[h[w+10]]+h1[h[w+11]]+h1[h[w+12]]+h1[h[w+13]]+h1[h[w+14]]+h1[h[w+15]]}function ug(h,w=0){let f=q9(h,w);if(!pg.default(f))throw TypeError("Stringified UUID is invalid");return f}var tg=ug;k9.default=tg});var v9=H((O9)=>{Object.defineProperty(O9,"__esModule",{value:!0});O9.default=void 0;var wx=sx(M3()),fx=v$();function sx(h){return h&&h.__esModule?h:{default:h}}var y9,Q3,K3=0,Z3=0;function $x(h,w,f){let s=w&&f||0,$=w||new Array(16);h=h||{};let E=h.node||y9,T=h.clockseq!==void 0?h.clockseq:Q3;if(E==null||T==null){let B=h.random||(h.rng||wx.default)();if(E==null)E=y9=[B[0]|1,B[1],B[2],B[3],B[4],B[5]];if(T==null)T=Q3=(B[6]<<8|B[7])&16383}let U=h.msecs!==void 0?h.msecs:Date.now(),F=h.nsecs!==void 0?h.nsecs:Z3+1,C=U-K3+(F-Z3)/1e4;if(C<0&&h.clockseq===void 0)T=T+1&16383;if((C<0||U>K3)&&h.nsecs===void 0)F=0;if(F>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");K3=U,Z3=F,Q3=T,U+=12219292800000;let I=((U&268435455)*1e4+F)%4294967296;$[s++]=I>>>24&255,$[s++]=I>>>16&255,$[s++]=I>>>8&255,$[s++]=I&255;let G=U/4294967296*1e4&268435455;$[s++]=G>>>8&255,$[s++]=G&255,$[s++]=G>>>24&15|16,$[s++]=G>>>16&255,$[s++]=T>>>8|128,$[s++]=T&255;for(let B=0;B<6;++B)$[s+B]=E[B];return w||fx.unsafeStringify($)}var Ex=$x;O9.default=Ex});var J3=H((b9)=>{Object.defineProperty(b9,"__esModule",{value:!0});b9.default=void 0;var Tx=Ux(l$());function Ux(h){return h&&h.__esModule?h:{default:h}}function Fx(h){if(!Tx.default(h))throw TypeError("Invalid UUID");let w,f=new Uint8Array(16);return f[0]=(w=parseInt(h.slice(0,8),16))>>>24,f[1]=w>>>16&255,f[2]=w>>>8&255,f[3]=w&255,f[4]=(w=parseInt(h.slice(9,13),16))>>>8,f[5]=w&255,f[6]=(w=parseInt(h.slice(14,18),16))>>>8,f[7]=w&255,f[8]=(w=parseInt(h.slice(19,23),16))>>>8,f[9]=w&255,f[10]=(w=parseInt(h.slice(24,36),16))/1099511627776&255,f[11]=w/4294967296&255,f[12]=w>>>24&255,f[13]=w>>>16&255,f[14]=w>>>8&255,f[15]=w&255,f}var Cx=Fx;b9.default=Cx});var V3=H((c9)=>{Object.defineProperty(c9,"__esModule",{value:!0});c9.URL=c9.DNS=void 0;c9.default=Lx;var Ix=v$(),Gx=Bx(J3());function Bx(h){return h&&h.__esModule?h:{default:h}}function Wx(h){h=unescape(encodeURIComponent(h));let w=[];for(let f=0;f<h.length;++f)w.push(h.charCodeAt(f));return w}var d9="6ba7b810-9dad-11d1-80b4-00c04fd430c8";c9.DNS=d9;var i9="6ba7b811-9dad-11d1-80b4-00c04fd430c8";c9.URL=i9;function Lx(h,w,f){function s($,E,T,U){var F;if(typeof $==="string")$=Wx($);if(typeof E==="string")E=Gx.default(E);if(((F=E)===null||F===void 0?void 0:F.length)!==16)throw TypeError("Namespace must be array-like (16 iterable integer values, 0-255)");let C=new Uint8Array(16+$.length);if(C.set(E),C.set($,E.length),C=f(C),C[6]=C[6]&15|w,C[8]=C[8]&63|128,T){U=U||0;for(let I=0;I<16;++I)T[U+I]=C[I];return T}return Ix.unsafeStringify(C)}try{s.name=h}catch($){}return s.DNS=d9,s.URL=i9,s}});var n9=H((x9)=>{Object.defineProperty(x9,"__esModule",{value:!0});x9.default=void 0;var Rx=Xx(W0("node:crypto"));function Xx(h){return h&&h.__esModule?h:{default:h}}function Yx(h){if(Array.isArray(h))h=Buffer.from(h);else if(typeof h==="string")h=Buffer.from(h,"utf8");return Rx.default.createHash("md5").update(h).digest()}var Sx=Yx;x9.default=Sx});var o9=H((a9)=>{Object.defineProperty(a9,"__esModule",{value:!0});a9.default=void 0;var rx=e9(V3()),Mx=e9(n9());function e9(h){return h&&h.__esModule?h:{default:h}}var Qx=rx.default("v3",48,Mx.default),Kx=Qx;a9.default=Kx});var hY=H((u9)=>{Object.defineProperty(u9,"__esModule",{value:!0});u9.default=void 0;var Zx=Jx(W0("node:crypto"));function Jx(h){return h&&h.__esModule?h:{default:h}}var Vx={randomUUID:Zx.default.randomUUID};u9.default=Vx});var EY=H((sY)=>{Object.defineProperty(sY,"__esModule",{value:!0});sY.default=void 0;var wY=fY(hY()),Px=fY(M3()),Hx=v$();function fY(h){return h&&h.__esModule?h:{default:h}}function Nx(h,w,f){if(wY.default.randomUUID&&!w&&!h)return wY.default.randomUUID();h=h||{};let s=h.random||(h.rng||Px.default)();if(s[6]=s[6]&15|64,s[8]=s[8]&63|128,w){f=f||0;for(let $=0;$<16;++$)w[f+$]=s[$];return w}return Hx.unsafeStringify(s)}var Dx=Nx;sY.default=Dx});var FY=H((TY)=>{Object.defineProperty(TY,"__esModule",{value:!0});TY.default=void 0;var qx=kx(W0("node:crypto"));function kx(h){return h&&h.__esModule?h:{default:h}}function jx(h){if(Array.isArray(h))h=Buffer.from(h);else if(typeof h==="string")h=Buffer.from(h,"utf8");return qx.default.createHash("sha1").update(h).digest()}var yx=jx;TY.default=yx});var BY=H((IY)=>{Object.defineProperty(IY,"__esModule",{value:!0});IY.default=void 0;var Ox=CY(V3()),lx=CY(FY());function CY(h){return h&&h.__esModule?h:{default:h}}var vx=Ox.default("v5",80,lx.default),bx=vx;IY.default=bx});var zY=H((WY)=>{Object.defineProperty(WY,"__esModule",{value:!0});WY.default=void 0;var mx="00000000-0000-0000-0000-000000000000";WY.default=mx});var XY=H((AY)=>{Object.defineProperty(AY,"__esModule",{value:!0});AY.default=void 0;var dx=ix(l$());function ix(h){return h&&h.__esModule?h:{default:h}}function cx(h){if(!dx.default(h))throw TypeError("Invalid UUID");return parseInt(h.slice(14,15),16)}var gx=cx;AY.default=gx});var P3=H((wh)=>{Object.defineProperty(wh,"__esModule",{value:!0});Object.defineProperty(wh,"NIL",{enumerable:!0,get:function(){return ax.default}});Object.defineProperty(wh,"parse",{enumerable:!0,get:function(){return tx.default}});Object.defineProperty(wh,"stringify",{enumerable:!0,get:function(){return ux.default}});Object.defineProperty(wh,"v1",{enumerable:!0,get:function(){return xx.default}});Object.defineProperty(wh,"v3",{enumerable:!0,get:function(){return _x.default}});Object.defineProperty(wh,"v4",{enumerable:!0,get:function(){return nx.default}});Object.defineProperty(wh,"v5",{enumerable:!0,get:function(){return ex.default}});Object.defineProperty(wh,"validate",{enumerable:!0,get:function(){return ox.default}});Object.defineProperty(wh,"version",{enumerable:!0,get:function(){return px.default}});var xx=dh(v9()),_x=dh(o9()),nx=dh(EY()),ex=dh(BY()),ax=dh(zY()),px=dh(XY()),ox=dh(l$()),ux=dh(v$()),tx=dh(J3());function dh(h){return h&&h.__esModule?h:{default:h}}});var Sh,w80,f80,YY,s80,$80,E80,T80,U80,F80;var SY=L(()=>{Sh=O(P3(),1),w80=Sh.default.v1,f80=Sh.default.v3,YY=Sh.default.v4,s80=Sh.default.v5,$80=Sh.default.NIL,E80=Sh.default.version,T80=Sh.default.validate,U80=Sh.default.stringify,F80=Sh.default.parse});var rY=L(()=>{hh()});var H3=L(()=>{hh()});var N3=L(()=>{y$()});var D3=(h)=>{if(h instanceof Error)return h;if(h instanceof Object)return Object.assign(new Error,h);if(typeof h==="string")return new Error(h);return new Error(`AWS SDK error wrapper for ${h}`)};var q3=L(()=>{C1();y$();hh();rY();H3();N3()});var MY=L(()=>{hh();q3()});var QY="AWS_MAX_ATTEMPTS",KY="max_attempts",of,uf=(h)=>{let{retryStrategy:w,retryMode:f,maxAttempts:s}=h,$=W1(s??aw);return Object.assign(h,{maxAttempts:$,retryStrategy:async()=>{if(w)return w;if(await W1(f)()===y1.ADAPTIVE)return new r3($);return new pf($)}})},h_="AWS_RETRY_MODE",w_="retry_mode",tf;var ZY=L(()=>{mh();hh();of={environmentVariableSelector:(h)=>{let w=h[QY];if(!w)return;let f=parseInt(w);if(Number.isNaN(f))throw new Error(`Environment variable ${QY} mast be a number, got "${w}"`);return f},configFileSelector:(h)=>{let w=h[KY];if(!w)return;let f=parseInt(w);if(Number.isNaN(f))throw new Error(`Shared config file entry ${KY} mast be a number, got "${w}"`);return f},default:aw},tf={environmentVariableSelector:(h)=>h[h_],configFileSelector:(h)=>h[w_],default:rw}});var JY=L(()=>{C1();hh()});var ow=(h,w)=>{let f=[];if(h)f.push(h);if(w)for(let s of w)f.push(s);return f},Mw=(h,w)=>{return`${h||"anonymous"}${w&&w.length>0?` (a.k.a. ${w.join(",")})`:""}`},hs=()=>{let h=[],w=[],f=!1,s=new Set,$=(G)=>G.sort((B,z)=>VY[z.step]-VY[B.step]||PY[z.priority||"normal"]-PY[B.priority||"normal"]),E=(G)=>{let B=!1,z=(Y)=>{let Q=ow(Y.name,Y.aliases);if(Q.includes(G)){B=!0;for(let M of Q)s.delete(M);return!1}return!0};return h=h.filter(z),w=w.filter(z),B},T=(G)=>{let B=!1,z=(Y)=>{if(Y.middleware===G){B=!0;for(let Q of ow(Y.name,Y.aliases))s.delete(Q);return!1}return!0};return h=h.filter(z),w=w.filter(z),B},U=(G)=>{return h.forEach((B)=>{G.add(B.middleware,{...B})}),w.forEach((B)=>{G.addRelativeTo(B.middleware,{...B})}),G.identifyOnResolve?.(I.identifyOnResolve()),G},F=(G)=>{let B=[];return G.before.forEach((z)=>{if(z.before.length===0&&z.after.length===0)B.push(z);else B.push(...F(z))}),B.push(G),G.after.reverse().forEach((z)=>{if(z.before.length===0&&z.after.length===0)B.push(z);else B.push(...F(z))}),B},C=(G=!1)=>{let B=[],z=[],Y={};return h.forEach((M)=>{let q={...M,before:[],after:[]};for(let N of ow(q.name,q.aliases))Y[N]=q;B.push(q)}),w.forEach((M)=>{let q={...M,before:[],after:[]};for(let N of ow(q.name,q.aliases))Y[N]=q;z.push(q)}),z.forEach((M)=>{if(M.toMiddleware){let q=Y[M.toMiddleware];if(q===void 0){if(G)return;throw new Error(`${M.toMiddleware} is not found when adding ${Mw(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)}}),$(B).map(F).reduce((M,q)=>{return M.push(...q),M},[])},I={add:(G,B={})=>{let{name:z,override:Y,aliases:Q}=B,M={step:"initialize",priority:"normal",middleware:G,...B},q=ow(z,Q);if(q.length>0){if(q.some((N)=>s.has(N))){if(!Y)throw new Error(`Duplicate middleware name '${Mw(z,Q)}'`);for(let N of q){let j=h.findIndex((B0)=>B0.name===N||B0.aliases?.some((v0)=>v0===N));if(j===-1)continue;let e=h[j];if(e.step!==M.step||M.priority!==e.priority)throw new Error(`"${Mw(e.name,e.aliases)}" middleware with ${e.priority} priority in ${e.step} step cannot be overridden by "${Mw(z,Q)}" middleware with ${M.priority} priority in ${M.step} step.`);h.splice(j,1)}}for(let N of q)s.add(N)}h.push(M)},addRelativeTo:(G,B)=>{let{name:z,override:Y,aliases:Q}=B,M={middleware:G,...B},q=ow(z,Q);if(q.length>0){if(q.some((N)=>s.has(N))){if(!Y)throw new Error(`Duplicate middleware name '${Mw(z,Q)}'`);for(let N of q){let j=w.findIndex((B0)=>B0.name===N||B0.aliases?.some((v0)=>v0===N));if(j===-1)continue;let e=w[j];if(e.toMiddleware!==M.toMiddleware||e.relation!==M.relation)throw new Error(`"${Mw(e.name,e.aliases)}" middleware ${e.relation} "${e.toMiddleware}" middleware cannot be overridden by "${Mw(z,Q)}" middleware ${M.relation} "${M.toMiddleware}" middleware.`);w.splice(j,1)}}for(let N of q)s.add(N)}w.push(M)},clone:()=>U(hs()),use:(G)=>{G.applyToStack(I)},remove:(G)=>{if(typeof G==="string")return E(G);else return T(G)},removeByTag:(G)=>{let B=!1,z=(Y)=>{let{tags:Q,name:M,aliases:q}=Y;if(Q&&Q.includes(G)){let N=ow(M,q);for(let j of N)s.delete(j);return B=!0,!1}return!0};return h=h.filter(z),w=w.filter(z),B},concat:(G)=>{let B=U(hs());return B.use(G),B.identifyOnResolve(f||B.identifyOnResolve()||(G.identifyOnResolve?.()??!1)),B},applyToStack:U,identify:()=>{return C(!0).map((G)=>{let B=G.step??G.relation+" "+G.toMiddleware;return Mw(G.name,G.aliases)+" - "+B})},identifyOnResolve(G){if(typeof G==="boolean")f=G;return f},resolve:(G,B)=>{for(let z of C().map((Y)=>Y.middleware).reverse())G=z(G,B);if(f)console.log(I.identify());return G}};return I},VY,PY;var HY=L(()=>{VY={initialize:5,serialize:4,build:3,finalizeRequest:2,deserialize:1},PY={high:3,normal:2,low:1}});var k3=L(()=>{HY()});class uw{constructor(h){this.config=h,this.middlewareStack=hs()}send(h,w,f){let s=typeof w!=="function"?w:void 0,$=typeof w==="function"?w:f,E=s===void 0&&this.config.cacheMiddleware===!0,T;if(E){if(!this.handlers)this.handlers=new WeakMap;let U=this.handlers;if(U.has(h.constructor))T=U.get(h.constructor);else T=h.resolveMiddleware(this.middlewareStack,this.config,s),U.set(h.constructor,T)}else delete this.handlers,T=h.resolveMiddleware(this.middlewareStack,this.config,s);if($)T(h).then((U)=>$(null,U.output),(U)=>$(U)).catch(()=>{});else return T(h).then((U)=>U.output)}destroy(){this.config?.requestHandler?.destroy?.(),delete this.handlers}}var NY=L(()=>{k3()});var L1;var DY=L(()=>{L1=O(Pf(),1)});class A{constructor(){this.middlewareStack=hs()}static classBuilder(){return new kY}resolveMiddlewareWithContext(h,w,f,{middlewareFn:s,clientName:$,commandName:E,inputFilterSensitiveLog:T,outputFilterSensitiveLog:U,smithyContext:F,additionalContext:C,CommandCtor:I}){for(let Q of s.bind(this)(I,h,w,f))this.middlewareStack.use(Q);let G=h.concat(this.middlewareStack),{logger:B}=w,z={logger:B,clientName:$,commandName:E,inputFilterSensitiveLog:T,outputFilterSensitiveLog:U,[qY.SMITHY_CONTEXT_KEY]:{commandInstance:this,...F},...C},{requestHandler:Y}=w;return G.resolve((Q)=>Y.handle(Q.request,f||{}),z)}}class kY{constructor(){this._init=()=>{},this._ep={},this._middlewareFn=()=>[],this._commandName="",this._clientName="",this._additionalContext={},this._smithyContext={},this._inputFilterSensitiveLog=(h)=>h,this._outputFilterSensitiveLog=(h)=>h,this._serializer=null,this._deserializer=null}init(h){this._init=h}ep(h){return this._ep=h,this}m(h){return this._middlewareFn=h,this}s(h,w,f={}){return this._smithyContext={service:h,operation:w,...f},this}c(h={}){return this._additionalContext=h,this}n(h,w){return this._clientName=h,this._commandName=w,this}f(h=(f)=>f,w=(f)=>f){return this._inputFilterSensitiveLog=h,this._outputFilterSensitiveLog=w,this}ser(h){return this._serializer=h,this}de(h){return this._deserializer=h,this}build(){let h=this,w;return w=class extends A{static getEndpointParameterInstructions(){return h._ep}constructor(...[f]){super();this.serialize=h._serializer,this.deserialize=h._deserializer,this.input=f??{},h._init(this)}resolveMiddleware(f,s,$){return this.resolveMiddlewareWithContext(f,s,$,{CommandCtor:w,middlewareFn:h._middlewareFn,clientName:h._clientName,commandName:h._commandName,inputFilterSensitiveLog:h._inputFilterSensitiveLog,outputFilterSensitiveLog:h._outputFilterSensitiveLog,smithyContext:h._smithyContext,additionalContext:h._additionalContext})}}}}var qY;var jY=L(()=>{k3();qY=O(F1(),1)});var F0="***SensitiveInformation***";var ws=(h,w)=>{for(let f of Object.keys(h)){let s=h[f],$=async function(T,U,F){let C=new s(T);if(typeof U==="function")this.send(C,U);else if(typeof F==="function"){if(typeof U!=="object")throw new Error(`Expected http options but got ${typeof U}`);this.send(C,U||{},F)}else return this.send(C,U)},E=(f[0].toLowerCase()+f.slice(1)).replace(/Command$/,"");w.prototype[E]=$}};var n0=(h)=>{switch(h){case"true":return!0;case"false":return!1;default:throw new Error(`Unable to parse boolean value "${h}"`)}},Qw=(h)=>{if(h===null||h===void 0)return;if(typeof h==="number"){if(h===0||h===1)W2.warn(B2(`Expected boolean, got ${typeof h}: ${h}`));if(h===0)return!1;if(h===1)return!0}if(typeof h==="string"){let w=h.toLowerCase();if(w==="false"||w==="true")W2.warn(B2(`Expected boolean, got ${typeof h}: ${h}`));if(w==="false")return!1;if(w==="true")return!0}if(typeof h==="boolean")return h;throw new TypeError(`Expected boolean, got ${typeof h}: ${h}`)},S1=(h)=>{if(h===null||h===void 0)return;if(typeof h==="string"){let w=parseFloat(h);if(!Number.isNaN(w)){if(String(w)!==String(h))W2.warn(B2(`Expected number but observed string: ${h}`));return w}}if(typeof h==="number")return h;throw new TypeError(`Expected number, got ${typeof h}: ${h}`)},f_,yY=(h)=>{let w=S1(h);if(w!==void 0&&!Number.isNaN(w)&&w!==1/0&&w!==-1/0){if(Math.abs(w)>f_)throw new TypeError(`Expected 32-bit float, got ${h}`)}return w},j3=(h)=>{if(h===null||h===void 0)return;if(Number.isInteger(h)&&!Number.isNaN(h))return h;throw new TypeError(`Expected integer, got ${typeof h}: ${h}`)},OY=(h)=>y3(h,32),lY=(h)=>y3(h,16),vY=(h)=>y3(h,8),y3=(h,w)=>{let f=j3(h);if(f!==void 0&&s_(f,w)!==f)throw new TypeError(`Expected ${w}-bit integer, got ${h}`);return f},s_=(h,w)=>{switch(w){case 32:return Int32Array.of(h)[0];case 16:return Int16Array.of(h)[0];case 8:return Int8Array.of(h)[0]}},y=(h,w)=>{if(h===null||h===void 0){if(w)throw new TypeError(`Expected a non-null value for ${w}`);throw new TypeError("Expected a non-null value")}return h},x=(h)=>{if(h===null||h===void 0)return;if(typeof h==="object"&&!Array.isArray(h))return h;let w=Array.isArray(h)?"array":typeof h;throw new TypeError(`Expected object, got ${w}: ${h}`)},W=(h)=>{if(h===null||h===void 0)return;if(typeof h==="string")return h;if(["boolean","number","bigint"].includes(typeof h))return W2.warn(B2(`Expected string, got ${typeof h}: ${h}`)),String(h);throw new TypeError(`Expected string, got ${typeof h}: ${h}`)},O3=(h)=>{if(typeof h=="string")return S1(fs(h));return S1(h)},bY,mY=(h)=>{if(typeof h=="string")return yY(fs(h));return yY(h)},$_,fs=(h)=>{let w=h.match($_);if(w===null||w[0].length!==h.length)throw new TypeError("Expected real number, got implicit NaN");return parseFloat(h)},l3=(h)=>{if(typeof h=="string")return E_(h);return S1(h)},E_=(h)=>{switch(h){case"NaN":return NaN;case"Infinity":return 1/0;case"-Infinity":return-1/0;default:throw new Error(`Unable to parse float value: ${h}`)}},E1=(h)=>{if(typeof h==="string")return j3(fs(h));return j3(h)},r0=(h)=>{if(typeof h==="string")return OY(fs(h));return OY(h)},v3=(h)=>{if(typeof h==="string")return lY(fs(h));return lY(h)},dY=(h)=>{if(typeof h==="string")return vY(fs(h));return vY(h)},B2=(h)=>{return String(new TypeError(h).stack||h).split(`
|
|
41
|
-
`).slice(0,5).filter((w)=>!w.includes("stackTraceWarning")).join(`
|
|
42
|
-
`)},W2;var b3=L(()=>{f_=Math.ceil(340282346638528860000000000000000000000),bY=O3,$_=/(-?(?:0|[1-9]\d*)(?:\.\d+)?(?:[eE][+-]?\d+)?)|(-?Infinity)|(NaN)/g,W2={warn:console.warn}});var T_,U_,iY=(h)=>{if(h===null||h===void 0)return;if(typeof h!=="string")throw new TypeError("RFC-3339 date-times must be expressed as strings");let w=U_.exec(h);if(!w)throw new TypeError("Invalid RFC-3339 date-time value");let[f,s,$,E,T,U,F,C]=w,I=v3(m3(s)),G=tw($,"month",1,12),B=tw(E,"day",1,31);return cY(I,G,B,{hours:T,minutes:U,seconds:F,fractionalMilliseconds:C})},F_,b$=(h)=>{if(h===null||h===void 0)return;if(typeof h!=="string")throw new TypeError("RFC-3339 date-times must be expressed as strings");let w=F_.exec(h);if(!w)throw new TypeError("Invalid RFC-3339 date-time value");let[f,s,$,E,T,U,F,C,I]=w,G=v3(m3(s)),B=tw($,"month",1,12),z=tw(E,"day",1,31),Y=cY(G,B,z,{hours:T,minutes:U,seconds:F,fractionalMilliseconds:C});if(I.toUpperCase()!="Z")Y.setTime(Y.getTime()-W_(I));return Y},t80,hG0,wG0,rh=(h)=>{if(h===null||h===void 0)return;let w;if(typeof h==="number")w=h;else if(typeof h==="string")w=O3(h);else if(typeof h==="object"&&h.tag===1)w=h.value;else throw new TypeError("Epoch timestamps must be expressed as floating point numbers or their string representation");if(Number.isNaN(w)||w===1/0||w===-1/0)throw new TypeError("Epoch timestamps must be valid, non-Infinite, non-NaN numerics");return new Date(Math.round(w*1000))},cY=(h,w,f,s)=>{let $=w-1;return I_(h,$,f),new Date(Date.UTC(h,$,f,tw(s.hours,"hour",0,23),tw(s.minutes,"minute",0,59),tw(s.seconds,"seconds",0,60),B_(s.fractionalMilliseconds)))},C_,I_=(h,w,f)=>{let s=C_[w];if(w===1&&G_(h))s=29;if(f>s)throw new TypeError(`Invalid day for ${T_[w]} in ${h}: ${f}`)},G_=(h)=>{return h%4===0&&(h%100!==0||h%400===0)},tw=(h,w,f,s)=>{let $=dY(m3(h));if($<f||$>s)throw new TypeError(`${w} must be between ${f} and ${s}, inclusive`);return $},B_=(h)=>{if(h===null||h===void 0)return 0;return mY("0."+h)*1000},W_=(h)=>{let w=h[0],f=1;if(w=="+")f=1;else if(w=="-")f=-1;else throw new TypeError(`Offset direction, ${w}, must be "+" or "-"`);let s=Number(h.substring(1,3)),$=Number(h.substring(4,6));return f*(s*60+$)*60*1000},m3=(h)=>{let w=0;while(w<h.length-1&&h.charAt(w)==="0")w++;if(w===0)return h;return h.slice(w)};var gY=L(()=>{b3();T_=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],U_=new RegExp(/^(\d{4})-(\d{2})-(\d{2})[tT](\d{2}):(\d{2}):(\d{2})(?:\.(\d+))?[zZ]$/),F_=new RegExp(/^(\d{4})-(\d{2})-(\d{2})[tT](\d{2}):(\d{2}):(\d{2})(?:\.(\d+))?(([-+]\d{2}\:\d{2})|[zZ])$/),t80=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$/),hG0=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$/),wG0=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})$/),C_=[31,28,31,30,31,30,31,31,30,31,30,31]});var fh,v=(h,w={})=>{Object.entries(w).filter(([,s])=>s!==void 0).forEach(([s,$])=>{if(h[s]==null||h[s]==="")h[s]=$});let f=h.message||h.Message||"UnknownError";return h.message=f,delete h.Message,h};var d3=L(()=>{fh=class fh extends Error{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 fh.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===fh)return fh.isInstance(h);if(fh.isInstance(h)){if(w.name&&this.name)return this.prototype.isPrototypeOf(h)||w.name===this.name;return this.prototype.isPrototypeOf(h)}return!1}}});var L_=({output:h,parsedBody:w,exceptionCtor:f,errorCode:s})=>{let $=z_(h),E=$.httpStatusCode?$.httpStatusCode+"":void 0,T=new f({name:w?.code||w?.Code||s||E||"UnknownError",$fault:"client",$metadata:$});throw v(T,w)},ss=(h)=>{return({output:w,parsedBody:f,errorCode:s})=>{L_({output:w,parsedBody:f,exceptionCtor:h,errorCode:s})}},z_=(h)=>({httpStatusCode:h.statusCode,requestId:h.headers["x-amzn-requestid"]??h.headers["x-amzn-request-id"]??h.headers["x-amz-request-id"],extendedRequestId:h.headers["x-amz-id-2"],cfId:h.headers["x-amz-cf-id"]});var xY=L(()=>{d3()});var $s=(h)=>{switch(h){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 _Y=!1,Es=(h)=>{if(h&&!_Y&&parseInt(h.substring(1,h.indexOf(".")))<16)_Y=!0};var A_;var nY=L(()=>{A_=O(Pf(),1)});var i3,eY=(h)=>{let w=[];for(let f in i3.AlgorithmId){let s=i3.AlgorithmId[f];if(h[s]===void 0)continue;w.push({algorithmId:()=>s,checksumConstructor:()=>h[s]})}return{addChecksumAlgorithm(f){w.push(f)},checksumAlgorithms(){return w}}},aY=(h)=>{let w={};return h.checksumAlgorithms().forEach((f)=>{w[f.algorithmId()]=f.checksumConstructor()}),w};var pY=L(()=>{i3=O(F1(),1)});var oY=(h)=>{return{setRetryStrategy(w){h.retryStrategy=w},retryStrategy(){return h.retryStrategy}}},uY=(h)=>{let w={};return w.retryStrategy=h.retryStrategy(),w};var Ts=(h)=>{return Object.assign(eY(h),oY(h))},Us=(h)=>{return Object.assign(aY(h),uY(h))};var tY=L(()=>{pY()});var hS=L(()=>{tY()});var L0=(h)=>Array.isArray(h)?h:[h];var m$=(h)=>{return h!=null};var Fs=function h(w){return Object.assign(new String(w),{deserializeJSON(){return JSON.parse(String(w))},toString(){return String(w)},toJSON(){return String(w)}})};var wS=L(()=>{Fs.from=(h)=>{if(h&&typeof h==="object"&&(h instanceof Fs||("deserializeJSON"in h)))return h;else if(typeof h==="string"||Object.getPrototypeOf(h)===String.prototype)return Fs(String(h));return Fs(JSON.stringify(h))};Fs.fromObject=Fs.from});class ih{trace(){}debug(){}info(){}warn(){}error(){}}function r(h,w,f){let s,$,E;if(typeof w==="undefined"&&typeof f==="undefined")s={},E=h;else if(s=h,typeof w==="function")return $=w,E=f,R_(s,$,E);else E=w;for(let T of Object.keys(E)){if(!Array.isArray(E[T])){s[T]=E[T];continue}fS(s,null,E,T)}return s}var H0=(h,w)=>{let f={};for(let s in w)fS(f,h,w,s);return f},R_=(h,w,f)=>{return r(h,Object.entries(f).reduce((s,[$,E])=>{if(Array.isArray(E))s[$]=E;else if(typeof E==="function")s[$]=[w,E()];else s[$]=[w,E];return s},{}))},fS=(h,w,f,s)=>{if(w!==null){let T=f[s];if(typeof T==="function")T=[,T];let[U=X_,F=Y_,C=s]=T;if(typeof U==="function"&&U(w[C])||typeof U!=="function"&&!!U)h[s]=F(w[C]);return}let[$,E]=f[s];if(typeof E==="function"){let T,U=$===void 0&&(T=E())!=null,F=typeof $==="function"&&!!$(void 0)||typeof $!=="function"&&!!$;if(U)h[s]=T;else if(F)h[s]=E()}else{let T=$===void 0&&E!=null,U=typeof $==="function"&&!!$(E)||typeof $!=="function"&&!!$;if(T||U)h[s]=E}},X_=(h)=>h!=null,Y_=(h)=>h;var S_;var sS=L(()=>{S_=O(Pf(),1)});var $S=(h)=>{if(h!==h)return"NaN";switch(h){case 1/0:return"Infinity";case-1/0:return"-Infinity";default:return h}};var b=(h)=>{if(h==null)return{};if(Array.isArray(h))return h.filter((w)=>w!=null).map(b);if(typeof h==="object"){let w={};for(let f of Object.keys(h)){if(h[f]==null)continue;w[f]=b(h[f])}return w}return h};var J=L(()=>{NY();DY();jY();gY();xY();d3();nY();hS();wS();b3();sS()});import{Readable as r_}from"node:stream";var ES=(h)=>h?.body instanceof r_||typeof ReadableStream!=="undefined"&&h?.body instanceof ReadableStream;var TS=()=>{};var M_=(h)=>(w,f)=>async(s)=>{let $=await h.retryStrategy(),E=await h.maxAttempts();if(Q_($)){$=$;let T=await $.acquireInitialRetryToken(f.partition_id),U=new Error,F=0,C=0,{request:I}=s,G=_0.isInstance(I);if(G)I.headers[U2]=YY();while(!0)try{if(G)I.headers[F2]=`attempt=${F+1}; max=${E}`;let{response:B,output:z}=await w(s);return $.recordSuccess(T),z.$metadata.attempts=F+1,z.$metadata.totalRetryDelay=C,{response:B,output:z}}catch(B){let z=K_(B);if(U=D3(B),G&&ES(I))throw(f.logger instanceof ih?console:f.logger)?.warn("An error was encountered in a non-retryable streaming request."),U;try{T=await $.refreshRetryTokenForRetry(T,z)}catch(Q){if(!U.$metadata)U.$metadata={};throw U.$metadata.attempts=F+1,U.$metadata.totalRetryDelay=C,U}F=T.getRetryCount();let Y=T.getRetryDelay();C+=Y,await new Promise((Q)=>setTimeout(Q,Y))}}else{if($=$,$?.mode)f.userAgent=[...f.userAgent||[],["cfg/retry-mode",$.mode]];return $.retry(w,s)}},Q_=(h)=>typeof h.acquireInitialRetryToken!=="undefined"&&typeof h.refreshRetryTokenForRetry!=="undefined"&&typeof h.recordSuccess!=="undefined",K_=(h)=>{let w={error:h,errorType:Z_(h)},f=V_(h.$response);if(f)w.retryAfterHint=f;return w},Z_=(h)=>{if(ef(h))return"THROTTLING";if(j$(h))return"TRANSIENT";if(Y9(h))return"SERVER_ERROR";return"CLIENT_ERROR"},J_,Cs=(h)=>({applyToStack:(w)=>{w.add(M_(h),J_)}}),V_=(h)=>{if(!mw.isInstance(h))return;let w=Object.keys(h.headers).find((E)=>E.toLowerCase()==="retry-after");if(!w)return;let f=h.headers[w],s=Number(f);if(!Number.isNaN(s))return new Date(s*1000);return new Date(f)};var US=L(()=>{C1();y$();J();hh();SY();TS();J_={name:"retryMiddleware",tags:["RETRY"],step:"finalizeRequest",priority:"high",override:!0}});var hf=L(()=>{MY();q3();ZY();H3();JY();N3();US()});var LS,zS,L2="AWS_ACCESS_KEY_ID",z2="AWS_SECRET_ACCESS_KEY",AS="AWS_SESSION_TOKEN",RS="AWS_CREDENTIAL_EXPIRATION",XS="AWS_CREDENTIAL_SCOPE",YS="AWS_ACCOUNT_ID",c3=(h)=>async()=>{h?.logger?.debug("@aws-sdk/credential-provider-env - fromEnv");let w=process.env[L2],f=process.env[z2],s=process.env[AS],$=process.env[RS],E=process.env[XS],T=process.env[YS];if(w&&f){let U={accessKeyId:w,secretAccessKey:f,...s&&{sessionToken:s},...$&&{expiration:new Date($)},...E&&{credentialScope:E},...T&&{accountId:T}};return LS.setCredentialFeature(U,"CREDENTIALS_ENV_VARS","g"),U}throw new zS.CredentialsProviderError("Unable to find environment variable credentials.",{logger:h?.logger})};var SS=L(()=>{LS=O(G1(),1),zS=O(U0(),1)});var rS={};Ew(rS,{fromEnv:()=>c3,ENV_SESSION:()=>AS,ENV_SECRET:()=>z2,ENV_KEY:()=>L2,ENV_EXPIRATION:()=>RS,ENV_CREDENTIAL_SCOPE:()=>XS,ENV_ACCOUNT_ID:()=>YS});var g3=L(()=>{SS()});import{Buffer as N_}from"node:buffer";import{request as D_}from"node:http";function Kw(h){return new Promise((w,f)=>{let s=D_({method:"GET",...h,hostname:h.hostname?.replace(/^\[(.+)\]$/,"$1")});s.on("error",($)=>{f(Object.assign(new A2.ProviderError("Unable to connect to instance metadata service"),$)),s.destroy()}),s.on("timeout",()=>{f(new A2.ProviderError("TimeoutError from instance metadata service")),s.destroy()}),s.on("response",($)=>{let{statusCode:E=400}=$;if(E<200||300<=E)f(Object.assign(new A2.ProviderError("Error response received from instance metadata service"),{statusCode:E})),s.destroy();let T=[];$.on("data",(U)=>{T.push(U)}),$.on("end",()=>{w(N_.concat(T)),s.destroy()})}),s.end()})}var A2;var R2=L(()=>{A2=O(U0(),1)});var X2=(h)=>Boolean(h)&&typeof h==="object"&&typeof h.AccessKeyId==="string"&&typeof h.SecretAccessKey==="string"&&typeof h.Token==="string"&&typeof h.Expiration==="string",Y2=(h)=>({accessKeyId:h.AccessKeyId,secretAccessKey:h.SecretAccessKey,sessionToken:h.Token,expiration:new Date(h.Expiration),...h.AccountId&&{accountId:h.AccountId}});var q_=1000,k_=0,d$=({maxRetries:h=0,timeout:w=1000})=>({maxRetries:h,timeout:w});var i$=(h,w)=>{let f=h();for(let s=0;s<w;s++)f=f.catch(h);return f};import{parse as j_}from"node:url";var c$,S2="AWS_CONTAINER_CREDENTIALS_FULL_URI",r2="AWS_CONTAINER_CREDENTIALS_RELATIVE_URI",x3="AWS_CONTAINER_AUTHORIZATION_TOKEN",y_=(h={})=>{let{timeout:w,maxRetries:f}=d$(h);return()=>i$(async()=>{let s=await m_({logger:h.logger}),$=JSON.parse(await O_(w,s));if(!X2($))throw new c$.CredentialsProviderError("Invalid response received from instance metadata service.",{logger:h.logger});return Y2($)},f)},O_=async(h,w)=>{if(process.env[x3])w.headers={...w.headers,Authorization:process.env[x3]};return(await Kw({...w,timeout:h})).toString()},l_="169.254.170.2",v_,b_,m_=async({logger:h})=>{if(process.env[r2])return{hostname:l_,path:process.env[r2]};if(process.env[S2]){let w=j_(process.env[S2]);if(!w.hostname||!(w.hostname in v_))throw new c$.CredentialsProviderError(`${w.hostname} is not a valid container metadata service hostname`,{tryNextLink:!1,logger:h});if(!w.protocol||!(w.protocol in b_))throw new c$.CredentialsProviderError(`${w.protocol} is not a valid container metadata service protocol`,{tryNextLink:!1,logger:h});return{...w,port:w.port?parseInt(w.port,10):void 0}}throw new c$.CredentialsProviderError(`The container metadata credential provider cannot be used unless the ${r2} or ${S2} environment variable is set`,{tryNextLink:!1,logger:h})};var MS=L(()=>{c$=O(U0(),1);R2();v_={localhost:!0,"127.0.0.1":!0},b_={"http:":!0,"https:":!0}});var QS,M2;var KS=L(()=>{QS=O(U0(),1);M2=class M2 extends QS.CredentialsProviderError{constructor(h,w=!0){super(h,w);this.tryNextLink=w,this.name="InstanceMetadataV1FallbackError",Object.setPrototypeOf(this,M2.prototype)}}});var wf;var _3=L(()=>{(function(h){h.IPv4="http://169.254.169.254",h.IPv6="http://[fd00:ec2::254]"})(wf||(wf={}))});var ZS;var JS=L(()=>{ZS={environmentVariableSelector:(h)=>h.AWS_EC2_METADATA_SERVICE_ENDPOINT,configFileSelector:(h)=>h.ec2_metadata_service_endpoint,default:void 0}});var Zw;var n3=L(()=>{(function(h){h.IPv4="IPv4",h.IPv6="IPv6"})(Zw||(Zw={}))});var d_="AWS_EC2_METADATA_SERVICE_ENDPOINT_MODE",i_="ec2_metadata_service_endpoint_mode",VS;var PS=L(()=>{n3();VS={environmentVariableSelector:(h)=>h[d_],configFileSelector:(h)=>h[i_],default:Zw.IPv4}});var Q2=async()=>j1(await c_()||await g_()),c_=async()=>R0(ZS)(),g_=async()=>{let h=await R0(VS)();switch(h){case Zw.IPv4:return wf.IPv4;case Zw.IPv6:return wf.IPv6;default:throw new Error(`Unsupported endpoint mode: ${h}. Select from ${Object.values(Zw)}`)}};var e3=L(()=>{Sw();_f();_3();JS();n3();PS()});var a3=(h,w)=>{let f=300+Math.floor(Math.random()*300),s=new Date(Date.now()+f*1000);w.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 $=h.originalExpiration??h.expiration;return{...h,...$?{originalExpiration:$}:{},expiration:s}};var HS=(h,w={})=>{let f=w?.logger||console,s;return async()=>{let $;try{if($=await h(),$.expiration&&$.expiration.getTime()<Date.now())$=a3($,f)}catch(E){if(s)f.warn("Credential renew failed: ",E),$=a3(s,f);else throw E}return s=$,$}};var NS=()=>{};var o3,kS="/latest/meta-data/iam/security-credentials/",x_="/latest/api/token",p3="AWS_EC2_METADATA_V1_DISABLED",DS="ec2_metadata_v1_disabled",qS="x-aws-ec2-metadata-token",__=(h={})=>HS(n_(h),{logger:h.logger}),n_=(h={})=>{let w=!1,{logger:f,profile:s}=h,{timeout:$,maxRetries:E}=d$(h),T=async(U,F)=>{if(w||F.headers?.[qS]==null){let G=!1,B=!1,z=await R0({environmentVariableSelector:(Y)=>{let Q=Y[p3];if(B=!!Q&&Q!=="false",Q===void 0)throw new o3.CredentialsProviderError(`${p3} not set in env, checking config file next.`,{logger:h.logger});return B},configFileSelector:(Y)=>{let Q=Y[DS];return G=!!Q&&Q!=="false",G},default:!1},{profile:s})();if(h.ec2MetadataV1Disabled||z){let Y=[];if(h.ec2MetadataV1Disabled)Y.push("credential provider initialization (runtime option ec2MetadataV1Disabled)");if(G)Y.push(`config file profile (${DS})`);if(B)Y.push(`process environment variable (${p3})`);throw new M2(`AWS EC2 Metadata v1 fallback has been blocked by AWS SDK configuration in the following: [${Y.join(", ")}].`)}}let I=(await i$(async()=>{let G;try{G=await a_(F)}catch(B){if(B.statusCode===401)w=!1;throw B}return G},U)).trim();return i$(async()=>{let G;try{G=await p_(I,F,h)}catch(B){if(B.statusCode===401)w=!1;throw B}return G},U)};return async()=>{let U=await Q2();if(w)return f?.debug("AWS SDK Instance Metadata","using v1 fallback (no token fetch)"),T(E,{...U,timeout:$});else{let F;try{F=(await e_({...U,timeout:$})).toString()}catch(C){if(C?.statusCode===400)throw Object.assign(C,{message:"EC2 Metadata token request returned error"});else if(C.message==="TimeoutError"||[403,404,405].includes(C.statusCode))w=!0;return f?.debug("AWS SDK Instance Metadata","using v1 fallback (initial)"),T(E,{...U,timeout:$})}return T(E,{...U,headers:{[qS]:F},timeout:$})}}},e_=async(h)=>Kw({...h,path:x_,method:"PUT",headers:{"x-aws-ec2-metadata-token-ttl-seconds":"21600"}}),a_=async(h)=>(await Kw({...h,path:kS})).toString(),p_=async(h,w,f)=>{let s=JSON.parse((await Kw({...w,path:kS+h})).toString());if(!X2(s))throw new o3.CredentialsProviderError("Invalid response received from instance metadata service.",{logger:f.logger});return Y2(s)};var jS=L(()=>{Sw();o3=O(U0(),1);KS();R2();e3();NS()});var yS=()=>{};var g$={};Ew(g$,{providerConfigFromInit:()=>d$,httpRequest:()=>Kw,getInstanceMetadataEndpoint:()=>Q2,fromInstanceMetadata:()=>__,fromContainerMetadata:()=>y_,Endpoint:()=>wf,ENV_CMDS_RELATIVE_URI:()=>r2,ENV_CMDS_FULL_URI:()=>S2,ENV_CMDS_AUTH_TOKEN:()=>x3,DEFAULT_TIMEOUT:()=>q_,DEFAULT_MAX_RETRIES:()=>k_});var x$=L(()=>{MS();jS();yS();R2();e3();_3()});var OS;var lS=L(()=>{OS=["ECONNRESET","EPIPE","ETIMEDOUT"]});var u3=(h)=>{let w={};for(let f of Object.keys(h)){let s=h[f];w[f]=Array.isArray(s)?s.join(","):s}return w};var t3=()=>{};var e0;var Is=L(()=>{e0={setTimeout:(h,w)=>setTimeout(h,w),clearTimeout:(h)=>clearTimeout(h)}});var vS=1000,bS=(h,w,f=0)=>{if(!f)return-1;let s=($)=>{let E=e0.setTimeout(()=>{h.destroy(),w(Object.assign(new Error(`Socket timed out without establishing a connection within ${f} ms`),{name:"TimeoutError"}))},f-$),T=(U)=>{if(U?.connecting)U.on("connect",()=>{e0.clearTimeout(E)});else e0.clearTimeout(E)};if(h.socket)T(h.socket);else h.on("socket",T)};if(f<2000)return s(0),0;return e0.setTimeout(s.bind(null,vS),vS)};var mS=L(()=>{Is()});var o_=3000,dS=(h,{keepAlive:w,keepAliveMsecs:f},s=o_)=>{if(w!==!0)return-1;let $=()=>{if(h.socket)h.socket.setKeepAlive(w,f||0);else h.on("socket",(E)=>{E.setKeepAlive(w,f||0)})};if(s===0)return $(),0;return e0.setTimeout($,s)};var iS=L(()=>{Is()});var cS=3000,gS=(h,w,f=_S)=>{let s=($)=>{let E=f-$,T=()=>{h.destroy(),w(Object.assign(new Error(`Connection timed out after ${f} ms`),{name:"TimeoutError"}))};if(h.socket)h.socket.setTimeout(E,T),h.on("close",()=>h.socket?.removeListener("timeout",T));else h.setTimeout(E,T)};if(0<f&&f<6000)return s(0),0;return e0.setTimeout(s.bind(null,f===0?0:cS),cS)};var xS=L(()=>{h6();Is()});import{Readable as u_}from"node:stream";async function w6(h,w,f=nS){let s=w.headers??{},$=s.Expect||s.expect,E=-1,T=!0;if($==="100-continue")T=await Promise.race([new Promise((U)=>{E=Number(e0.setTimeout(()=>U(!0),Math.max(nS,f)))}),new Promise((U)=>{h.on("continue",()=>{e0.clearTimeout(E),U(!0)}),h.on("response",()=>{e0.clearTimeout(E),U(!1)}),h.on("error",()=>{e0.clearTimeout(E),U(!1)})})]);if(T)t_(h,w.body)}function t_(h,w){if(w instanceof u_){w.pipe(h);return}if(w){if(Buffer.isBuffer(w)||typeof w==="string"){h.end(w);return}let f=w;if(typeof f==="object"&&f.buffer&&typeof f.byteOffset==="number"&&typeof f.byteLength==="number"){h.end(Buffer.from(f.buffer,f.byteOffset,f.byteLength));return}h.end(Buffer.from(w));return}h.end()}var nS=6000;var f6=L(()=>{Is()});import{Agent as eS,request as hn}from"node:http";import{Agent as aS,request as wn}from"node:https";class sh{static create(h){if(typeof h?.handle==="function")return h;return new sh(h)}static checkSocketUsage(h,w,f=console){let{sockets:s,requests:$,maxSockets:E}=h;if(typeof E!=="number"||E===1/0)return w;let T=15000;if(Date.now()-T<w)return w;if(s&&$)for(let U in s){let F=s[U]?.length??0,C=$[U]?.length??0;if(F>=E&&C>=2*E)return f?.warn?.(`@smithy/node-http-handler:WARN - socket usage at capacity=${F} and ${C} additional requests are enqueued.
|
|
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 w}constructor(h){this.socketWarningTimestamp=0,this.metadata={handlerProtocol:"http/1.1"},this.configProvider=new Promise((w,f)=>{if(typeof h==="function")h().then((s)=>{w(this.resolveDefaultConfig(s))}).catch(f);else w(this.resolveDefaultConfig(h))})}resolveDefaultConfig(h){let{requestTimeout:w,connectionTimeout:f,socketTimeout:s,socketAcquisitionWarningTimeout:$,httpAgent:E,httpsAgent:T}=h||{},U=!0,F=50;return{connectionTimeout:f,requestTimeout:w??s,socketAcquisitionWarningTimeout:$,httpAgent:(()=>{if(E instanceof eS||typeof E?.destroy==="function")return E;return new eS({keepAlive:!0,maxSockets:50,...E})})(),httpsAgent:(()=>{if(T instanceof aS||typeof T?.destroy==="function")return T;return new aS({keepAlive:!0,maxSockets:50,...T})})(),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((f,s)=>{let $=void 0,E=[],T=async(N)=>{await $,E.forEach(e0.clearTimeout),f(N)},U=async(N)=>{await $,E.forEach(e0.clearTimeout),s(N)};if(!this.config)throw new Error("Node HTTP request handler config is not resolved");if(w?.aborted){let N=new Error("Request aborted");N.name="AbortError",U(N);return}let F=h.protocol==="https:",C=F?this.config.httpsAgent:this.config.httpAgent;E.push(e0.setTimeout(()=>{this.socketWarningTimestamp=sh.checkSocketUsage(C,this.socketWarningTimestamp,this.config.logger)},this.config.socketAcquisitionWarningTimeout??(this.config.requestTimeout??2000)+(this.config.connectionTimeout??1000)));let I=pS.buildQueryString(h.query||{}),G=void 0;if(h.username!=null||h.password!=null){let N=h.username??"",j=h.password??"";G=`${N}:${j}`}let B=h.path;if(I)B+=`?${I}`;if(h.fragment)B+=`#${h.fragment}`;let z=h.hostname??"";if(z[0]==="["&&z.endsWith("]"))z=h.hostname.slice(1,-1);else z=h.hostname;let Y={headers:h.headers,host:z,method:h.method,path:B,port:h.port,agent:C,auth:G},M=(F?wn:hn)(Y,(N)=>{let j=new mw({statusCode:N.statusCode||-1,reason:N.statusMessage,headers:u3(N.headers),body:N});T({response:j})});if(M.on("error",(N)=>{if(OS.includes(N.code))U(Object.assign(N,{name:"TimeoutError"}));else U(N)}),w){let N=()=>{M.destroy();let j=new Error("Request aborted");j.name="AbortError",U(j)};if(typeof w.addEventListener==="function"){let j=w;j.addEventListener("abort",N,{once:!0}),M.once("close",()=>j.removeEventListener("abort",N))}else w.onabort=N}E.push(bS(M,U,this.config.connectionTimeout)),E.push(gS(M,U,this.config.requestTimeout));let q=Y.agent;if(typeof q==="object"&&"keepAlive"in q)E.push(dS(M,{keepAlive:q.keepAlive,keepAliveMsecs:q.keepAliveMsecs}));$=w6(M,h,this.config.requestTimeout).catch((N)=>{return E.forEach(e0.clearTimeout),s(N)})})}updateHttpClientConfig(h,w){this.config=void 0,this.configProvider=this.configProvider.then((f)=>{return{...f,[h]:w}})}httpHandlerConfigs(){return this.config??{}}}var pS,_S=0;var h6=L(()=>{C1();pS=O(A$(),1);lS();t3();mS();iS();xS();Is();f6()});var oS=()=>{};var uS=L(()=>{oS()});var fn;var tS=L(()=>{C1();fn=O(A$(),1);t3();uS();f6()});import{Writable as sn}from"node:stream";var s6;var hr=L(()=>{s6=class s6 extends sn{constructor(){super(...arguments);this.bufferedBytes=[]}_write(h,w,f){this.bufferedBytes.push(h),f()}}});async function En(h){let w=[],f=h.getReader(),s=!1,$=0;while(!s){let{done:U,value:F}=await f.read();if(F)w.push(F),$+=F.length;s=U}let E=new Uint8Array($),T=0;for(let U of w)E.set(U,T),T+=U.length;return E}var Gs=(h)=>{if($n(h))return En(h);return new Promise((w,f)=>{let s=new s6;h.pipe(s),h.on("error",($)=>{s.end(),f($)}),s.on("error",f),s.on("finish",function(){let $=new Uint8Array(Buffer.concat(this.bufferedBytes));w($)})})},$n=(h)=>typeof ReadableStream==="function"&&h instanceof ReadableStream;var wr=L(()=>{hr()});var _$=L(()=>{h6();tS();wr()});var fr,Tn="169.254.170.2",Un="169.254.170.23",Fn="[fd00:ec2::23]",sr=(h,w)=>{if(h.protocol==="https:")return;if(h.hostname===Tn||h.hostname===Un||h.hostname===Fn)return;if(h.hostname.includes("[")){if(h.hostname==="[::1]"||h.hostname==="[0000:0000:0000:0000:0000:0000:0000:0001]")return}else{if(h.hostname==="localhost")return;let f=h.hostname.split("."),s=($)=>{let E=parseInt($,10);return 0<=E&&E<=255};if(f[0]==="127"&&s(f[1])&&s(f[2])&&s(f[3])&&f.length===4)return}throw new fr.CredentialsProviderError(`URL not accepted. It must either be HTTPS or match one of the following:
|
|
46
|
-
- loopback CIDR 127.0.0.0/8 or [::1/128]
|
|
47
|
-
- ECS container host 169.254.170.2
|
|
48
|
-
- EKS container host 169.254.170.23 or [fd00:ec2::23]`,{logger:w})};var $r=L(()=>{fr=O(U0(),1)});function Tr(h){return new _0({protocol:h.protocol,hostname:h.hostname,port:Number(h.port),path:h.pathname,query:Array.from(h.searchParams.entries()).reduce((w,[f,s])=>{return w[f]=s,w},{}),fragment:h.hash})}async function Ur(h,w){let s=await Er.sdkStreamMixin(h.body).transformToString();if(h.statusCode===200){let $=JSON.parse(s);if(typeof $.AccessKeyId!=="string"||typeof $.SecretAccessKey!=="string"||typeof $.Token!=="string"||typeof $.Expiration!=="string")throw new K2.CredentialsProviderError("HTTP credential provider response not of the required format, an object matching: { AccessKeyId: string, SecretAccessKey: string, Token: string, Expiration: string(rfc3339) }",{logger:w});return{accessKeyId:$.AccessKeyId,secretAccessKey:$.SecretAccessKey,sessionToken:$.Token,expiration:iY($.Expiration)}}if(h.statusCode>=400&&h.statusCode<500){let $={};try{$=JSON.parse(s)}catch(E){}throw Object.assign(new K2.CredentialsProviderError(`Server responded with status: ${h.statusCode}`,{logger:w}),{Code:$.Code,Message:$.Message})}throw new K2.CredentialsProviderError(`Server responded with status: ${h.statusCode}`,{logger:w})}var K2,Er;var Fr=L(()=>{K2=O(U0(),1);C1();J();Er=O(sF(),1)});var Cr=(h,w,f)=>{return async()=>{for(let s=0;s<w;++s)try{return await h()}catch($){await new Promise((E)=>setTimeout(E,f))}return await h()}};import Cn from"node:fs/promises";var Ir,$6,In="AWS_CONTAINER_CREDENTIALS_RELATIVE_URI",Gn="http://169.254.170.2",Bn="AWS_CONTAINER_CREDENTIALS_FULL_URI",Wn="AWS_CONTAINER_AUTHORIZATION_TOKEN_FILE",Ln="AWS_CONTAINER_AUTHORIZATION_TOKEN",Gr=(h={})=>{h.logger?.debug("@aws-sdk/credential-provider-http - fromHttp");let w,f=h.awsContainerCredentialsRelativeUri??process.env[In],s=h.awsContainerCredentialsFullUri??process.env[Bn],$=h.awsContainerAuthorizationToken??process.env[Ln],E=h.awsContainerAuthorizationTokenFile??process.env[Wn],T=h.logger?.constructor?.name==="NoOpLogger"||!h.logger?console.warn:h.logger.warn;if(f&&s)T("@aws-sdk/credential-provider-http: you have set both awsContainerCredentialsRelativeUri and awsContainerCredentialsFullUri."),T("awsContainerCredentialsFullUri will take precedence.");if($&&E)T("@aws-sdk/credential-provider-http: you have set both awsContainerAuthorizationToken and awsContainerAuthorizationTokenFile."),T("awsContainerAuthorizationToken will take precedence.");if(s)w=s;else if(f)w=`${Gn}${f}`;else throw new $6.CredentialsProviderError(`No HTTP credential provider host provided.
|
|
49
|
-
Set AWS_CONTAINER_CREDENTIALS_FULL_URI or AWS_CONTAINER_CREDENTIALS_RELATIVE_URI.`,{logger:h.logger});let U=new URL(w);sr(U,h.logger);let F=new sh({requestTimeout:h.timeout??1000,connectionTimeout:h.timeout??1000});return Cr(async()=>{let C=Tr(U);if($)C.headers.Authorization=$;else if(E)C.headers.Authorization=(await Cn.readFile(E)).toString();try{let I=await F.handle(C);return Ur(I.response).then((G)=>Ir.setCredentialFeature(G,"CREDENTIALS_HTTP","z"))}catch(I){throw new $6.CredentialsProviderError(String(I),{logger:h.logger})}},h.maxRetries??3,h.timeout??1000)};var Br=L(()=>{Ir=O(G1(),1);_$();$6=O(U0(),1);$r();Fr()});var E6={};Ew(E6,{fromHttp:()=>Gr});var T6=L(()=>{Br()});var U6=(h)=>h&&(typeof h.sso_start_url==="string"||typeof h.sso_account_id==="string"||typeof h.sso_session==="string"||typeof h.sso_region==="string"||typeof h.sso_role_name==="string");var zr=300000,Bs="To refresh this SSO session run 'aws sso login' with the corresponding profile.";var F6=H((RL0,Sr)=>{var{defineProperty:V2,getOwnPropertyDescriptor:zn,getOwnPropertyNames:An}=Object,Rn=Object.prototype.hasOwnProperty,J2=(h,w)=>V2(h,"name",{value:w,configurable:!0}),Xn=(h,w)=>{for(var f in w)V2(h,f,{get:w[f],enumerable:!0})},Yn=(h,w,f,s)=>{if(w&&typeof w==="object"||typeof w==="function"){for(let $ of An(w))if(!Rn.call(h,$)&&$!==f)V2(h,$,{get:()=>w[$],enumerable:!(s=zn(w,$))||s.enumerable})}return h},Sn=(h)=>Yn(V2({},"__esModule",{value:!0}),h),Ar={};Xn(Ar,{getHostHeaderPlugin:()=>Mn,hostHeaderMiddleware:()=>Xr,hostHeaderMiddlewareOptions:()=>Yr,resolveHostHeaderConfig:()=>Rr});Sr.exports=Sn(Ar);var rn=u0();function Rr(h){return h}J2(Rr,"resolveHostHeaderConfig");var Xr=J2((h)=>(w)=>async(f)=>{if(!rn.HttpRequest.isInstance(f.request))return w(f);let{request:s}=f,{handlerProtocol:$=""}=h.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 E=s.hostname;if(s.port!=null)E+=`:${s.port}`;s.headers.host=E}return w(f)},"hostHeaderMiddleware"),Yr={name:"hostHeaderMiddleware",step:"build",priority:"low",tags:["HOST"],override:!0},Mn=J2((h)=>({applyToStack:J2((w)=>{w.add(Xr(h),Yr)},"applyToStack")}),"getHostHeaderPlugin")});var I6=H((XL0,Kr)=>{var{defineProperty:P2,getOwnPropertyDescriptor:Qn,getOwnPropertyNames:Kn}=Object,Zn=Object.prototype.hasOwnProperty,C6=(h,w)=>P2(h,"name",{value:w,configurable:!0}),Jn=(h,w)=>{for(var f in w)P2(h,f,{get:w[f],enumerable:!0})},Vn=(h,w,f,s)=>{if(w&&typeof w==="object"||typeof w==="function"){for(let $ of Kn(w))if(!Zn.call(h,$)&&$!==f)P2(h,$,{get:()=>w[$],enumerable:!(s=Qn(w,$))||s.enumerable})}return h},Pn=(h)=>Vn(P2({},"__esModule",{value:!0}),h),rr={};Jn(rr,{getLoggerPlugin:()=>Hn,loggerMiddleware:()=>Mr,loggerMiddlewareOptions:()=>Qr});Kr.exports=Pn(rr);var Mr=C6(()=>(h,w)=>async(f)=>{try{let s=await h(f),{clientName:$,commandName:E,logger:T,dynamoDbDocumentClientOptions:U={}}=w,{overrideInputFilterSensitiveLog:F,overrideOutputFilterSensitiveLog:C}=U,I=F??w.inputFilterSensitiveLog,G=C??w.outputFilterSensitiveLog,{$metadata:B,...z}=s.output;return T?.info?.({clientName:$,commandName:E,input:I(f.input),output:G(z),metadata:B}),s}catch(s){let{clientName:$,commandName:E,logger:T,dynamoDbDocumentClientOptions:U={}}=w,{overrideInputFilterSensitiveLog:F}=U,C=F??w.inputFilterSensitiveLog;throw T?.error?.({clientName:$,commandName:E,input:C(f.input),error:s,metadata:s.$metadata}),s}},"loggerMiddleware"),Qr={name:"loggerMiddleware",tags:["LOGGER"],step:"initialize",override:!0},Hn=C6((h)=>({applyToStack:C6((w)=>{w.add(Mr(),Qr)},"applyToStack")}),"getLoggerPlugin")});var B6=H((YL0,Pr)=>{var{defineProperty:N2,getOwnPropertyDescriptor:Nn,getOwnPropertyNames:Dn}=Object,qn=Object.prototype.hasOwnProperty,H2=(h,w)=>N2(h,"name",{value:w,configurable:!0}),kn=(h,w)=>{for(var f in w)N2(h,f,{get:w[f],enumerable:!0})},jn=(h,w,f,s)=>{if(w&&typeof w==="object"||typeof w==="function"){for(let $ of Dn(w))if(!qn.call(h,$)&&$!==f)N2(h,$,{get:()=>w[$],enumerable:!(s=Nn(w,$))||s.enumerable})}return h},yn=(h)=>jn(N2({},"__esModule",{value:!0}),h),Zr={};kn(Zr,{addRecursionDetectionMiddlewareOptions:()=>Vr,getRecursionDetectionPlugin:()=>bn,recursionDetectionMiddleware:()=>Jr});Pr.exports=yn(Zr);var On=u0(),G6="X-Amzn-Trace-Id",ln="AWS_LAMBDA_FUNCTION_NAME",vn="_X_AMZN_TRACE_ID",Jr=H2((h)=>(w)=>async(f)=>{let{request:s}=f;if(!On.HttpRequest.isInstance(s)||h.runtime!=="node")return w(f);let $=Object.keys(s.headers??{}).find((F)=>F.toLowerCase()===G6.toLowerCase())??G6;if(s.headers.hasOwnProperty($))return w(f);let E=process.env[ln],T=process.env[vn],U=H2((F)=>typeof F==="string"&&F.length>0,"nonEmptyString");if(U(E)&&U(T))s.headers[G6]=T;return w({...f,request:s})},"recursionDetectionMiddleware"),Vr={step:"build",tags:["RECURSION_DETECTION"],name:"recursionDetectionMiddleware",override:!0,priority:"low"},bn=H2((h)=>({applyToStack:H2((w)=>{w.add(Jr(h),Vr)},"applyToStack")}),"getRecursionDetectionPlugin")});var k2=H((SL0,lr)=>{var{defineProperty:D2,getOwnPropertyDescriptor:mn,getOwnPropertyNames:dn}=Object,cn=Object.prototype.hasOwnProperty,M0=(h,w)=>D2(h,"name",{value:w,configurable:!0}),gn=(h,w)=>{for(var f in w)D2(h,f,{get:w[f],enumerable:!0})},xn=(h,w,f,s)=>{if(w&&typeof w==="object"||typeof w==="function"){for(let $ of dn(w))if(!cn.call(h,$)&&$!==f)D2(h,$,{get:()=>w[$],enumerable:!(s=mn(w,$))||s.enumerable})}return h},_n=(h)=>xn(D2({},"__esModule",{value:!0}),h),Hr={};gn(Hr,{EndpointCache:()=>nn,EndpointError:()=>r1,customEndpointFunctions:()=>L6,isIpAddress:()=>Nr,isValidHostLabel:()=>A6,resolveEndpoint:()=>Be});lr.exports=_n(Hr);var nn=class{constructor({size:h,params:w}){if(this.data=new Map,this.parameters=[],this.capacity=h??50,w)this.parameters=w}static{M0(this,"EndpointCache")}get(h,w){let f=this.hash(h);if(f===!1)return w();if(!this.data.has(f)){if(this.data.size>this.capacity+10){let s=this.data.keys(),$=0;while(!0){let{value:E,done:T}=s.next();if(this.data.delete(E),T||++$>10)break}}this.data.set(f,w())}return this.data.get(f)}size(){return this.data.size}hash(h){let w="",{parameters:f}=this;if(f.length===0)return!1;for(let s of f){let $=String(h[s]??"");if($.includes("|;"))return!1;w+=$+"|;"}return w}},en=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}$"),Nr=M0((h)=>en.test(h)||h.startsWith("[")&&h.endsWith("]"),"isIpAddress"),an=new RegExp("^(?!.*-$)(?!-)[a-zA-Z0-9-]{1,63}$"),A6=M0((h,w=!1)=>{if(!w)return an.test(h);let f=h.split(".");for(let s of f)if(!A6(s))return!1;return!0},"isValidHostLabel"),L6={},n$="endpoints";function ch(h){if(typeof h!=="object"||h==null)return h;if("ref"in h)return`$${ch(h.ref)}`;if("fn"in h)return`${h.fn}(${(h.argv||[]).map(ch).join(", ")})`;return JSON.stringify(h,null,2)}M0(ch,"toDebugString");var r1=class extends Error{static{M0(this,"EndpointError")}constructor(h){super(h);this.name="EndpointError"}},pn=M0((h,w)=>h===w,"booleanEquals"),on=M0((h)=>{let w=h.split("."),f=[];for(let s of w){let $=s.indexOf("[");if($!==-1){if(s.indexOf("]")!==s.length-1)throw new r1(`Path: '${h}' does not end with ']'`);let E=s.slice($+1,-1);if(Number.isNaN(parseInt(E)))throw new r1(`Invalid array index: '${E}' in path: '${h}'`);if($!==0)f.push(s.slice(0,$));f.push(E)}else f.push(s)}return f},"getAttrPathList"),Dr=M0((h,w)=>on(w).reduce((f,s)=>{if(typeof f!=="object")throw new r1(`Index '${s}' in '${w}' not found in '${JSON.stringify(h)}'`);else if(Array.isArray(f))return f[parseInt(s)];return f[s]},h),"getAttr"),un=M0((h)=>h!=null,"isSet"),tn=M0((h)=>!h,"not"),z6=F1(),W6={[z6.EndpointURLScheme.HTTP]:80,[z6.EndpointURLScheme.HTTPS]:443},he=M0((h)=>{let w=(()=>{try{if(h instanceof URL)return h;if(typeof h==="object"&&"hostname"in h){let{hostname:B,port:z,protocol:Y="",path:Q="",query:M={}}=h,q=new URL(`${Y}//${B}${z?`:${z}`:""}${Q}`);return q.search=Object.entries(M).map(([N,j])=>`${N}=${j}`).join("&"),q}return new URL(h)}catch(B){return null}})();if(!w)return console.error(`Unable to parse ${JSON.stringify(h)} as a whatwg URL.`),null;let f=w.href,{host:s,hostname:$,pathname:E,protocol:T,search:U}=w;if(U)return null;let F=T.slice(0,-1);if(!Object.values(z6.EndpointURLScheme).includes(F))return null;let C=Nr($),I=f.includes(`${s}:${W6[F]}`)||typeof h==="string"&&h.includes(`${s}:${W6[F]}`),G=`${s}${I?`:${W6[F]}`:""}`;return{scheme:F,authority:G,path:E,normalizedPath:E.endsWith("/")?E:`${E}/`,isIp:C}},"parseURL"),we=M0((h,w)=>h===w,"stringEquals"),fe=M0((h,w,f,s)=>{if(w>=f||h.length<f)return null;if(!s)return h.substring(w,f);return h.substring(h.length-f,h.length-w)},"substring"),se=M0((h)=>encodeURIComponent(h).replace(/[!*'()]/g,(w)=>`%${w.charCodeAt(0).toString(16).toUpperCase()}`),"uriEncode"),$e={booleanEquals:pn,getAttr:Dr,isSet:un,isValidHostLabel:A6,not:tn,parseURL:he,stringEquals:we,substring:fe,uriEncode:se},qr=M0((h,w)=>{let f=[],s={...w.endpointParams,...w.referenceRecord},$=0;while($<h.length){let E=h.indexOf("{",$);if(E===-1){f.push(h.slice($));break}f.push(h.slice($,E));let T=h.indexOf("}",E);if(T===-1){f.push(h.slice(E));break}if(h[E+1]==="{"&&h[T+1]==="}")f.push(h.slice(E+1,T)),$=T+2;let U=h.substring(E+1,T);if(U.includes("#")){let[F,C]=U.split("#");f.push(Dr(s[F],C))}else f.push(s[U]);$=T+1}return f.join("")},"evaluateTemplate"),Ee=M0(({ref:h},w)=>{return{...w.endpointParams,...w.referenceRecord}[h]},"getReferenceValue"),q2=M0((h,w,f)=>{if(typeof h==="string")return qr(h,f);else if(h.fn)return kr(h,f);else if(h.ref)return Ee(h,f);throw new r1(`'${w}': ${String(h)} is not a string, function or reference.`)},"evaluateExpression"),kr=M0(({fn:h,argv:w},f)=>{let s=w.map((E)=>["boolean","number"].includes(typeof E)?E:q2(E,"arg",f)),$=h.split(".");if($[0]in L6&&$[1]!=null)return L6[$[0]][$[1]](...s);return $e[h](...s)},"callFunction"),Te=M0(({assign:h,...w},f)=>{if(h&&h in f.referenceRecord)throw new r1(`'${h}' is already defined in Reference Record.`);let s=kr(w,f);return f.logger?.debug?.(`${n$} evaluateCondition: ${ch(w)} = ${ch(s)}`),{result:s===""?!0:!!s,...h!=null&&{toAssign:{name:h,value:s}}}},"evaluateCondition"),R6=M0((h=[],w)=>{let f={};for(let s of h){let{result:$,toAssign:E}=Te(s,{...w,referenceRecord:{...w.referenceRecord,...f}});if(!$)return{result:$};if(E)f[E.name]=E.value,w.logger?.debug?.(`${n$} assign: ${E.name} := ${ch(E.value)}`)}return{result:!0,referenceRecord:f}},"evaluateConditions"),Ue=M0((h,w)=>Object.entries(h).reduce((f,[s,$])=>({...f,[s]:$.map((E)=>{let T=q2(E,"Header value entry",w);if(typeof T!=="string")throw new r1(`Header '${s}' value '${T}' is not a string`);return T})}),{}),"getEndpointHeaders"),jr=M0((h,w)=>{if(Array.isArray(h))return h.map((f)=>jr(f,w));switch(typeof h){case"string":return qr(h,w);case"object":if(h===null)throw new r1(`Unexpected endpoint property: ${h}`);return yr(h,w);case"boolean":return h;default:throw new r1(`Unexpected endpoint property type: ${typeof h}`)}},"getEndpointProperty"),yr=M0((h,w)=>Object.entries(h).reduce((f,[s,$])=>({...f,[s]:jr($,w)}),{}),"getEndpointProperties"),Fe=M0((h,w)=>{let f=q2(h,"Endpoint URL",w);if(typeof f==="string")try{return new URL(f)}catch(s){throw console.error(`Failed to construct URL with ${f}`,s),s}throw new r1(`Endpoint URL must be a string, got ${typeof f}`)},"getEndpointUrl"),Ce=M0((h,w)=>{let{conditions:f,endpoint:s}=h,{result:$,referenceRecord:E}=R6(f,w);if(!$)return;let T={...w,referenceRecord:{...w.referenceRecord,...E}},{url:U,properties:F,headers:C}=s;return w.logger?.debug?.(`${n$} Resolving endpoint from template: ${ch(s)}`),{...C!=null&&{headers:Ue(C,T)},...F!=null&&{properties:yr(F,T)},url:Fe(U,T)}},"evaluateEndpointRule"),Ie=M0((h,w)=>{let{conditions:f,error:s}=h,{result:$,referenceRecord:E}=R6(f,w);if(!$)return;throw new r1(q2(s,"Error",{...w,referenceRecord:{...w.referenceRecord,...E}}))},"evaluateErrorRule"),Ge=M0((h,w)=>{let{conditions:f,rules:s}=h,{result:$,referenceRecord:E}=R6(f,w);if(!$)return;return Or(s,{...w,referenceRecord:{...w.referenceRecord,...E}})},"evaluateTreeRule"),Or=M0((h,w)=>{for(let f of h)if(f.type==="endpoint"){let s=Ce(f,w);if(s)return s}else if(f.type==="error")Ie(f,w);else if(f.type==="tree"){let s=Ge(f,w);if(s)return s}else throw new r1(`Unknown endpoint rule: ${f}`);throw new r1("Rules evaluation failed")},"evaluateRules"),Be=M0((h,w)=>{let{endpointParams:f,logger:s}=w,{parameters:$,rules:E}=h;w.logger?.debug?.(`${n$} Initial EndpointParams: ${ch(f)}`);let T=Object.entries($).filter(([,C])=>C.default!=null).map(([C,I])=>[C,I.default]);if(T.length>0)for(let[C,I]of T)f[C]=f[C]??I;let U=Object.entries($).filter(([,C])=>C.required).map(([C])=>C);for(let C of U)if(f[C]==null)throw new r1(`Missing required parameter: '${C}'`);let F=Or(E,{endpointParams:f,logger:s,referenceRecord:{}});return w.logger?.debug?.(`${n$} Resolved endpoint: ${ch(F)}`),F},"resolveEndpoint")});var y2=H((QL0,nr)=>{var{defineProperty:j2,getOwnPropertyDescriptor:We,getOwnPropertyNames:Le}=Object,ze=Object.prototype.hasOwnProperty,Ws=(h,w)=>j2(h,"name",{value:w,configurable:!0}),Ae=(h,w)=>{for(var f in w)j2(h,f,{get:w[f],enumerable:!0})},Re=(h,w,f,s)=>{if(w&&typeof w==="object"||typeof w==="function"){for(let $ of Le(w))if(!ze.call(h,$)&&$!==f)j2(h,$,{get:()=>w[$],enumerable:!(s=We(w,$))||s.enumerable})}return h},Xe=(h)=>Re(j2({},"__esModule",{value:!0}),h),br={};Ae(br,{ConditionObject:()=>J0.ConditionObject,DeprecatedObject:()=>J0.DeprecatedObject,EndpointError:()=>J0.EndpointError,EndpointObject:()=>J0.EndpointObject,EndpointObjectHeaders:()=>J0.EndpointObjectHeaders,EndpointObjectProperties:()=>J0.EndpointObjectProperties,EndpointParams:()=>J0.EndpointParams,EndpointResolverOptions:()=>J0.EndpointResolverOptions,EndpointRuleObject:()=>J0.EndpointRuleObject,ErrorRuleObject:()=>J0.ErrorRuleObject,EvaluateOptions:()=>J0.EvaluateOptions,Expression:()=>J0.Expression,FunctionArgv:()=>J0.FunctionArgv,FunctionObject:()=>J0.FunctionObject,FunctionReturn:()=>J0.FunctionReturn,ParameterObject:()=>J0.ParameterObject,ReferenceObject:()=>J0.ReferenceObject,ReferenceRecord:()=>J0.ReferenceRecord,RuleSetObject:()=>J0.RuleSetObject,RuleSetRules:()=>J0.RuleSetRules,TreeRuleObject:()=>J0.TreeRuleObject,awsEndpointFunctions:()=>_r,getUserAgentPrefix:()=>Me,isIpAddress:()=>J0.isIpAddress,partition:()=>gr,resolveEndpoint:()=>J0.resolveEndpoint,setPartitionInfo:()=>xr,useDefaultPartitionInfo:()=>re});nr.exports=Xe(br);var J0=k2(),mr=Ws((h,w=!1)=>{if(w){for(let f of h.split("."))if(!mr(f))return!1;return!0}if(!J0.isValidHostLabel(h))return!1;if(h.length<3||h.length>63)return!1;if(h!==h.toLowerCase())return!1;if(J0.isIpAddress(h))return!1;return!0},"isVirtualHostableS3Bucket"),vr=":",Ye="/",Se=Ws((h)=>{let w=h.split(vr);if(w.length<6)return null;let[f,s,$,E,T,...U]=w;if(f!=="arn"||s===""||$===""||U.join(vr)==="")return null;let F=U.map((C)=>C.split(Ye)).flat();return{partition:s,service:$,region:E,accountId:T,resourceId:F}},"parseArn"),dr={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"},ir=dr,cr="",gr=Ws((h)=>{let{partitions:w}=ir;for(let s of w){let{regions:$,outputs:E}=s;for(let[T,U]of Object.entries($))if(T===h)return{...E,...U}}for(let s of w){let{regionRegex:$,outputs:E}=s;if(new RegExp($).test(h))return{...E}}let f=w.find((s)=>s.id==="aws");if(!f)throw new Error("Provided region was not found in the partition array or regex, and default partition with id 'aws' doesn't exist.");return{...f.outputs}},"partition"),xr=Ws((h,w="")=>{ir=h,cr=w},"setPartitionInfo"),re=Ws(()=>{xr(dr,"")},"useDefaultPartitionInfo"),Me=Ws(()=>cr,"getUserAgentPrefix"),_r={isVirtualHostableS3Bucket:mr,parseArn:Se,partition:gr};J0.customEndpointFunctions.aws=_r});var v2=H((KL0,EM)=>{var{defineProperty:l2,getOwnPropertyDescriptor:Qe,getOwnPropertyNames:Ke}=Object,Ze=Object.prototype.hasOwnProperty,gh=(h,w)=>l2(h,"name",{value:w,configurable:!0}),Je=(h,w)=>{for(var f in w)l2(h,f,{get:w[f],enumerable:!0})},Ve=(h,w,f,s)=>{if(w&&typeof w==="object"||typeof w==="function"){for(let $ of Ke(w))if(!Ze.call(h,$)&&$!==f)l2(h,$,{get:()=>w[$],enumerable:!(s=Qe(w,$))||s.enumerable})}return h},Pe=(h)=>Ve(l2({},"__esModule",{value:!0}),h),or={};Je(or,{DEFAULT_UA_APP_ID:()=>ur,getUserAgentMiddlewareOptions:()=>$M,getUserAgentPlugin:()=>Oe,resolveUserAgentConfig:()=>hM,userAgentMiddleware:()=>sM});EM.exports=Pe(or);var He=b0(),ur=void 0;function tr(h){if(h===void 0)return!0;return typeof h==="string"&&h.length<=50}gh(tr,"isValidUserAgentAppId");function hM(h){let w=He.normalizeProvider(h.userAgentAppId??ur),{customUserAgent:f}=h;return Object.assign(h,{customUserAgent:typeof f==="string"?[[f]]:f,userAgentAppId:gh(async()=>{let s=await w();if(!tr(s)){let $=h.logger?.constructor?.name==="NoOpLogger"||!h.logger?console:h.logger;if(typeof s!=="string")$?.warn("userAgentAppId must be a string or undefined.");else if(s.length>50)$?.warn("The provided userAgentAppId exceeds the maximum length of 50 characters.")}return s},"userAgentAppId")})}gh(hM,"resolveUserAgentConfig");var Ne=y2(),De=u0(),Mh=y0(),qe=/\d{12}\.ddb/;async function wM(h,w,f){if(f.request?.headers?.["smithy-protocol"]==="rpc-v2-cbor")Mh.setFeature(h,"PROTOCOL_RPC_V2_CBOR","M");if(typeof w.retryStrategy==="function"){let E=await w.retryStrategy();if(typeof E.acquireInitialRetryToken==="function")if(E.constructor?.name?.includes("Adaptive"))Mh.setFeature(h,"RETRY_MODE_ADAPTIVE","F");else Mh.setFeature(h,"RETRY_MODE_STANDARD","E");else Mh.setFeature(h,"RETRY_MODE_LEGACY","D")}if(typeof w.accountIdEndpointMode==="function"){let E=h.endpointV2;if(String(E?.url?.hostname).match(qe))Mh.setFeature(h,"ACCOUNT_ID_ENDPOINT","O");switch(await w.accountIdEndpointMode?.()){case"disabled":Mh.setFeature(h,"ACCOUNT_ID_MODE_DISABLED","Q");break;case"preferred":Mh.setFeature(h,"ACCOUNT_ID_MODE_PREFERRED","P");break;case"required":Mh.setFeature(h,"ACCOUNT_ID_MODE_REQUIRED","R");break}}let $=h.__smithy_context?.selectedHttpAuthScheme?.identity;if($?.$source){let E=$;if(E.accountId)Mh.setFeature(h,"RESOLVED_ACCOUNT_ID","T");for(let[T,U]of Object.entries(E.$source??{}))Mh.setFeature(h,T,U)}}gh(wM,"checkFeatures");var er="user-agent",X6="x-amz-user-agent",ar=" ",Y6="/",ke=/[^\!\$\%\&\'\*\+\-\.\^\_\`\|\~\d\w]/g,je=/[^\!\$\%\&\'\*\+\-\.\^\_\`\|\~\d\w\#]/g,pr="-",ye=1024;function fM(h){let w="";for(let f in h){let s=h[f];if(w.length+s.length+1<=ye){if(w.length)w+=","+s;else w+=s;continue}break}return w}gh(fM,"encodeFeatures");var sM=gh((h)=>(w,f)=>async(s)=>{let{request:$}=s;if(!De.HttpRequest.isInstance($))return w(s);let{headers:E}=$,T=f?.userAgent?.map(O2)||[],U=(await h.defaultUserAgentProvider()).map(O2);await wM(f,h,s);let F=f;U.push(`m/${fM(Object.assign({},f.__smithy_context?.features,F.__aws_sdk_context?.features))}`);let C=h?.customUserAgent?.map(O2)||[],I=await h.userAgentAppId();if(I)U.push(O2([`app/${I}`]));let G=Ne.getUserAgentPrefix(),B=(G?[G]:[]).concat([...U,...T,...C]).join(ar),z=[...U.filter((Y)=>Y.startsWith("aws-sdk-")),...C].join(ar);if(h.runtime!=="browser"){if(z)E[X6]=E[X6]?`${E[er]} ${z}`:z;E[er]=B}else E[X6]=B;return w({...s,request:$})},"userAgentMiddleware"),O2=gh((h)=>{let w=h[0].split(Y6).map((T)=>T.replace(ke,pr)).join(Y6),f=h[1]?.replace(je,pr),s=w.indexOf(Y6),$=w.substring(0,s),E=w.substring(s+1);if($==="api")E=E.toLowerCase();return[$,E,f].filter((T)=>T&&T.length>0).reduce((T,U,F)=>{switch(F){case 0:return U;case 1:return`${T}/${U}`;default:return`${T}#${U}`}},"")},"escapeUserAgent"),$M={name:"getUserAgentMiddleware",step:"build",priority:"low",tags:["SET_USER_AGENT","USER_AGENT"],override:!0},Oe=gh((h)=>({applyToStack:gh((w)=>{w.add(sM(h),$M)},"applyToStack")}),"getUserAgentPlugin")});var IM=H((ZL0,CM)=>{var{defineProperty:b2,getOwnPropertyDescriptor:le,getOwnPropertyNames:ve}=Object,be=Object.prototype.hasOwnProperty,TM=(h,w)=>b2(h,"name",{value:w,configurable:!0}),me=(h,w)=>{for(var f in w)b2(h,f,{get:w[f],enumerable:!0})},de=(h,w,f,s)=>{if(w&&typeof w==="object"||typeof w==="function"){for(let $ of ve(w))if(!be.call(h,$)&&$!==f)b2(h,$,{get:()=>w[$],enumerable:!(s=le(w,$))||s.enumerable})}return h},ie=(h)=>de(b2({},"__esModule",{value:!0}),h),UM={};me(UM,{SelectorType:()=>FM,booleanSelector:()=>ce,numberSelector:()=>ge});CM.exports=ie(UM);var ce=TM((h,w,f)=>{if(!(w in h))return;if(h[w]==="true")return!0;if(h[w]==="false")return!1;throw new Error(`Cannot load ${f} "${w}". Expected "true" or "false", got ${h[w]}.`)},"booleanSelector"),ge=TM((h,w,f)=>{if(!(w in h))return;let s=parseInt(h[w],10);if(Number.isNaN(s))throw new TypeError(`Cannot load ${f} '${w}'. Expected number, got '${h[w]}'.`);return s},"numberSelector"),FM=((h)=>{return h.ENV="env",h.CONFIG="shared config entry",h})(FM||{})});var Ls=H((JL0,rM)=>{var{defineProperty:d2,getOwnPropertyDescriptor:xe,getOwnPropertyNames:_e}=Object,ne=Object.prototype.hasOwnProperty,$h=(h,w)=>d2(h,"name",{value:w,configurable:!0}),ee=(h,w)=>{for(var f in w)d2(h,f,{get:w[f],enumerable:!0})},ae=(h,w,f,s)=>{if(w&&typeof w==="object"||typeof w==="function"){for(let $ of _e(w))if(!ne.call(h,$)&&$!==f)d2(h,$,{get:()=>w[$],enumerable:!(s=xe(w,$))||s.enumerable})}return h},pe=(h)=>ae(d2({},"__esModule",{value:!0}),h),WM={};ee(WM,{CONFIG_USE_DUALSTACK_ENDPOINT:()=>zM,CONFIG_USE_FIPS_ENDPOINT:()=>RM,DEFAULT_USE_DUALSTACK_ENDPOINT:()=>oe,DEFAULT_USE_FIPS_ENDPOINT:()=>te,ENV_USE_DUALSTACK_ENDPOINT:()=>LM,ENV_USE_FIPS_ENDPOINT:()=>AM,NODE_REGION_CONFIG_FILE_OPTIONS:()=>Ea,NODE_REGION_CONFIG_OPTIONS:()=>$a,NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS:()=>ue,NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS:()=>ha,REGION_ENV_NAME:()=>XM,REGION_INI_NAME:()=>YM,getRegionInfo:()=>Ia,resolveCustomEndpointsConfig:()=>wa,resolveEndpointsConfig:()=>sa,resolveRegionConfig:()=>Ta});rM.exports=pe(WM);var Jw=IM(),LM="AWS_USE_DUALSTACK_ENDPOINT",zM="use_dualstack_endpoint",oe=!1,ue={environmentVariableSelector:(h)=>Jw.booleanSelector(h,LM,Jw.SelectorType.ENV),configFileSelector:(h)=>Jw.booleanSelector(h,zM,Jw.SelectorType.CONFIG),default:!1},AM="AWS_USE_FIPS_ENDPOINT",RM="use_fips_endpoint",te=!1,ha={environmentVariableSelector:(h)=>Jw.booleanSelector(h,AM,Jw.SelectorType.ENV),configFileSelector:(h)=>Jw.booleanSelector(h,RM,Jw.SelectorType.CONFIG),default:!1},m2=Tw(),wa=$h((h)=>{let{tls:w,endpoint:f,urlParser:s,useDualstackEndpoint:$}=h;return Object.assign(h,{tls:w??!0,endpoint:m2.normalizeProvider(typeof f==="string"?s(f):f),isCustomEndpoint:!0,useDualstackEndpoint:m2.normalizeProvider($??!1)})},"resolveCustomEndpointsConfig"),fa=$h(async(h)=>{let{tls:w=!0}=h,f=await h.region();if(!new RegExp(/^([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9-]{0,61}[a-zA-Z0-9])$/).test(f))throw new Error("Invalid region in client config");let $=await h.useDualstackEndpoint(),E=await h.useFipsEndpoint(),{hostname:T}=await h.regionInfoProvider(f,{useDualstackEndpoint:$,useFipsEndpoint:E})??{};if(!T)throw new Error("Cannot resolve hostname from client config");return h.urlParser(`${w?"https:":"http:"}//${T}`)},"getEndpointFromRegion"),sa=$h((h)=>{let w=m2.normalizeProvider(h.useDualstackEndpoint??!1),{endpoint:f,useFipsEndpoint:s,urlParser:$,tls:E}=h;return Object.assign(h,{tls:E??!0,endpoint:f?m2.normalizeProvider(typeof f==="string"?$(f):f):()=>fa({...h,useDualstackEndpoint:w,useFipsEndpoint:s}),isCustomEndpoint:!!f,useDualstackEndpoint:w})},"resolveEndpointsConfig"),XM="AWS_REGION",YM="region",$a={environmentVariableSelector:(h)=>h[XM],configFileSelector:(h)=>h[YM],default:()=>{throw new Error("Region is missing")}},Ea={preferredFile:"credentials"},SM=$h((h)=>typeof h==="string"&&(h.startsWith("fips-")||h.endsWith("-fips")),"isFipsRegion"),GM=$h((h)=>SM(h)?["fips-aws-global","aws-fips"].includes(h)?"us-east-1":h.replace(/fips-(dkr-|prod-)?|-fips/,""):h,"getRealRegion"),Ta=$h((h)=>{let{region:w,useFipsEndpoint:f}=h;if(!w)throw new Error("Region is missing");return Object.assign(h,{region:async()=>{if(typeof w==="string")return GM(w);let s=await w();return GM(s)},useFipsEndpoint:async()=>{let s=typeof w==="string"?w:await w();if(SM(s))return!0;return typeof f!=="function"?Promise.resolve(!!f):f()}})},"resolveRegionConfig"),BM=$h((h=[],{useFipsEndpoint:w,useDualstackEndpoint:f})=>h.find(({tags:s})=>w===s.includes("fips")&&f===s.includes("dualstack"))?.hostname,"getHostnameFromVariants"),Ua=$h((h,{regionHostname:w,partitionHostname:f})=>w?w:f?f.replace("{region}",h):void 0,"getResolvedHostname"),Fa=$h((h,{partitionHash:w})=>Object.keys(w||{}).find((f)=>w[f].regions.includes(h))??"aws","getResolvedPartition"),Ca=$h((h,{signingRegion:w,regionRegex:f,useFipsEndpoint:s})=>{if(w)return w;else if(s){let $=f.replace("\\\\","\\").replace(/^\^/g,"\\.").replace(/\$$/g,"\\."),E=h.match($);if(E)return E[0].slice(1,-1)}},"getResolvedSigningRegion"),Ia=$h((h,{useFipsEndpoint:w=!1,useDualstackEndpoint:f=!1,signingService:s,regionHash:$,partitionHash:E})=>{let T=Fa(h,{partitionHash:E}),U=h in $?h:E[T]?.endpoint??h,F={useFipsEndpoint:w,useDualstackEndpoint:f},C=BM($[U]?.variants,F),I=BM(E[T]?.variants,F),G=Ua(U,{regionHostname:C,partitionHostname:I});if(G===void 0)throw new Error(`Endpoint resolution failed for: ${{resolvedRegion:U,useFipsEndpoint:w,useDualstackEndpoint:f}}`);let B=Ca(G,{signingRegion:$[U]?.signingRegion,regionRegex:E[T].regionRegex,useFipsEndpoint:w});return{partition:T,signingService:s,hostname:G,...B&&{signingRegion:B},...$[U]?.signingService&&{signingService:$[U].signingService}}},"getRegionInfo")});var r6=H((VL0,JM)=>{var{defineProperty:i2,getOwnPropertyDescriptor:Ga,getOwnPropertyNames:Ba}=Object,Wa=Object.prototype.hasOwnProperty,QM=(h,w)=>i2(h,"name",{value:w,configurable:!0}),La=(h,w)=>{for(var f in w)i2(h,f,{get:w[f],enumerable:!0})},za=(h,w,f,s)=>{if(w&&typeof w==="object"||typeof w==="function"){for(let $ of Ba(w))if(!Wa.call(h,$)&&$!==f)i2(h,$,{get:()=>w[$],enumerable:!(s=Ga(w,$))||s.enumerable})}return h},Aa=(h)=>za(i2({},"__esModule",{value:!0}),h),KM={};La(KM,{contentLengthMiddleware:()=>S6,contentLengthMiddlewareOptions:()=>ZM,getContentLengthPlugin:()=>Xa});JM.exports=Aa(KM);var Ra=u0(),MM="content-length";function S6(h){return(w)=>async(f)=>{let s=f.request;if(Ra.HttpRequest.isInstance(s)){let{body:$,headers:E}=s;if($&&Object.keys(E).map((T)=>T.toLowerCase()).indexOf(MM)===-1)try{let T=h($);s.headers={...s.headers,[MM]:String(T)}}catch(T){}}return w({...f,request:s})}}QM(S6,"contentLengthMiddleware");var ZM={step:"build",tags:["SET_CONTENT_LENGTH","CONTENT_LENGTH"],name:"contentLengthMiddleware",override:!0},Xa=QM((h)=>({applyToStack:(w)=>{w.add(S6(h.bodyLengthChecker),ZM)}}),"getContentLengthPlugin")});var zs=H((VM)=>{Object.defineProperty(VM,"__esModule",{value:!0});VM.getHomeDir=void 0;var Ya=W0("node:os"),Sa=W0("node:path"),M6={},ra=()=>{if(process&&process.geteuid)return`${process.geteuid()}`;return"DEFAULT"},Ma=()=>{let{HOME:h,USERPROFILE:w,HOMEPATH:f,HOMEDRIVE:s=`C:${Sa.sep}`}=process.env;if(h)return h;if(w)return w;if(f)return`${s}${f}`;let $=ra();if(!M6[$])M6[$]=Ya.homedir();return M6[$]};VM.getHomeDir=Ma});var Q6=H((HM)=>{Object.defineProperty(HM,"__esModule",{value:!0});HM.getSSOTokenFilepath=void 0;var Qa=W0("node:crypto"),Ka=W0("node:path"),Za=zs(),Ja=(h)=>{let f=Qa.createHash("sha1").update(h).digest("hex");return Ka.join(Za.getHomeDir(),".aws","sso","cache",`${f}.json`)};HM.getSSOTokenFilepath=Ja});var kM=H((DM)=>{Object.defineProperty(DM,"__esModule",{value:!0});DM.getSSOTokenFromFile=void 0;var Va=W0("node:fs"),Pa=Q6(),{readFile:Ha}=Va.promises,Na=async(h)=>{let w=Pa.getSSOTokenFilepath(h),f=await Ha(w,"utf8");return JSON.parse(f)};DM.getSSOTokenFromFile=Na});var Z6=H((jM)=>{Object.defineProperty(jM,"__esModule",{value:!0});jM.slurpFile=void 0;var Da=W0("node:fs"),{readFile:qa}=Da.promises,K6={},ka=(h,w)=>{if(!K6[h]||(w===null||w===void 0?void 0:w.ignoreCache))K6[h]=qa(h,"utf8");return K6[h]};jM.slurpFile=ka});var H6=H((qL0,a$)=>{var{defineProperty:x2,getOwnPropertyDescriptor:ja,getOwnPropertyNames:ya}=Object,Oa=Object.prototype.hasOwnProperty,O1=(h,w)=>x2(h,"name",{value:w,configurable:!0}),la=(h,w)=>{for(var f in w)x2(h,f,{get:w[f],enumerable:!0})},J6=(h,w,f,s)=>{if(w&&typeof w==="object"||typeof w==="function"){for(let $ of ya(w))if(!Oa.call(h,$)&&$!==f)x2(h,$,{get:()=>w[$],enumerable:!(s=ja(w,$))||s.enumerable})}return h},P6=(h,w,f)=>(J6(h,w,"default"),f&&J6(f,w,"default")),va=(h)=>J6(x2({},"__esModule",{value:!0}),h),e$={};la(e$,{CONFIG_PREFIX_SEPARATOR:()=>ff,DEFAULT_PROFILE:()=>bM,ENV_PROFILE:()=>vM,getProfileName:()=>ba,loadSharedConfigFiles:()=>dM,loadSsoSessionData:()=>ua,parseKnownFiles:()=>hp});a$.exports=va(e$);P6(e$,zs(),a$.exports);var vM="AWS_PROFILE",bM="default",ba=O1((h)=>h.profile||process.env[vM]||bM,"getProfileName");P6(e$,Q6(),a$.exports);P6(e$,kM(),a$.exports);var c2=F1(),ma=O1((h)=>Object.entries(h).filter(([w])=>{let f=w.indexOf(ff);if(f===-1)return!1;return Object.values(c2.IniSectionType).includes(w.substring(0,f))}).reduce((w,[f,s])=>{let $=f.indexOf(ff),E=f.substring(0,$)===c2.IniSectionType.PROFILE?f.substring($+1):f;return w[E]=s,w},{...h.default&&{default:h.default}}),"getConfigData"),g2=W0("node:path"),da=zs(),ia="AWS_CONFIG_FILE",mM=O1(()=>process.env[ia]||g2.join(da.getHomeDir(),".aws","config"),"getConfigFilepath"),ca=zs(),ga="AWS_SHARED_CREDENTIALS_FILE",xa=O1(()=>process.env[ga]||g2.join(ca.getHomeDir(),".aws","credentials"),"getCredentialsFilepath"),_a=zs(),na=/^([\w-]+)\s(["'])?([\w-@\+\.%:/]+)\2$/,ea=["__proto__","profile __proto__"],V6=O1((h)=>{let w={},f,s;for(let $ of h.split(/\r?\n/)){let E=$.split(/(^|\s)[;#]/)[0].trim();if(E[0]==="["&&E[E.length-1]==="]"){f=void 0,s=void 0;let U=E.substring(1,E.length-1),F=na.exec(U);if(F){let[,C,,I]=F;if(Object.values(c2.IniSectionType).includes(C))f=[C,I].join(ff)}else f=U;if(ea.includes(U))throw new Error(`Found invalid profile name "${U}"`)}else if(f){let U=E.indexOf("=");if(![0,-1].includes(U)){let[F,C]=[E.substring(0,U).trim(),E.substring(U+1).trim()];if(C==="")s=F;else{if(s&&$.trimStart()===$)s=void 0;w[f]=w[f]||{};let I=s?[s,F].join(ff):F;w[f][I]=C}}}}return w},"parseIni"),OM=Z6(),lM=O1(()=>({}),"swallowError"),ff=".",dM=O1(async(h={})=>{let{filepath:w=xa(),configFilepath:f=mM()}=h,s=_a.getHomeDir(),$="~/",E=w;if(w.startsWith("~/"))E=g2.join(s,w.slice(2));let T=f;if(f.startsWith("~/"))T=g2.join(s,f.slice(2));let U=await Promise.all([OM.slurpFile(T,{ignoreCache:h.ignoreCache}).then(V6).then(ma).catch(lM),OM.slurpFile(E,{ignoreCache:h.ignoreCache}).then(V6).catch(lM)]);return{configFile:U[0],credentialsFile:U[1]}},"loadSharedConfigFiles"),aa=O1((h)=>Object.entries(h).filter(([w])=>w.startsWith(c2.IniSectionType.SSO_SESSION+ff)).reduce((w,[f,s])=>({...w,[f.substring(f.indexOf(ff)+1)]:s}),{}),"getSsoSessionData"),pa=Z6(),oa=O1(()=>({}),"swallowError"),ua=O1(async(h={})=>pa.slurpFile(h.configFilepath??mM()).then(V6).then(aa).catch(oa),"loadSsoSessionData"),ta=O1((...h)=>{let w={};for(let f of h)for(let[s,$]of Object.entries(f))if(w[s]!==void 0)Object.assign(w[s],$);else w[s]=$;return w},"mergeConfigFiles"),hp=O1(async(h)=>{let w=await dM(h);return ta(w.configFile,w.credentialsFile)},"parseKnownFiles")});var Rs=H((kL0,gM)=>{var{defineProperty:_2,getOwnPropertyDescriptor:wp,getOwnPropertyNames:fp}=Object,sp=Object.prototype.hasOwnProperty,As=(h,w)=>_2(h,"name",{value:w,configurable:!0}),$p=(h,w)=>{for(var f in w)_2(h,f,{get:w[f],enumerable:!0})},Ep=(h,w,f,s)=>{if(w&&typeof w==="object"||typeof w==="function"){for(let $ of fp(w))if(!sp.call(h,$)&&$!==f)_2(h,$,{get:()=>w[$],enumerable:!(s=wp(w,$))||s.enumerable})}return h},Tp=(h)=>Ep(_2({},"__esModule",{value:!0}),h),cM={};$p(cM,{loadConfig:()=>Gp});gM.exports=Tp(cM);var p$=U0();function N6(h){try{let w=new Set(Array.from(h.match(/([A-Z_]){3,}/g)??[]));return w.delete("CONFIG"),w.delete("CONFIG_PREFIX_SEPARATOR"),w.delete("ENV"),[...w].join(", ")}catch(w){return h}}As(N6,"getSelectorName");var Up=As((h,w)=>async()=>{try{let f=h(process.env);if(f===void 0)throw new Error;return f}catch(f){throw new p$.CredentialsProviderError(f.message||`Not found in ENV: ${N6(h.toString())}`,{logger:w})}},"fromEnv"),iM=H6(),Fp=As((h,{preferredFile:w="config",...f}={})=>async()=>{let s=iM.getProfileName(f),{configFile:$,credentialsFile:E}=await iM.loadSharedConfigFiles(f),T=E[s]||{},U=$[s]||{},F=w==="config"?{...T,...U}:{...U,...T};try{let I=h(F,w==="config"?$:E);if(I===void 0)throw new Error;return I}catch(C){throw new p$.CredentialsProviderError(C.message||`Not found in config files w/ profile [${s}]: ${N6(h.toString())}`,{logger:f.logger})}},"fromSharedConfigFiles"),Cp=As((h)=>typeof h==="function","isFunction"),Ip=As((h)=>Cp(h)?async()=>await h():p$.fromStatic(h),"fromStatic"),Gp=As(({environmentVariableSelector:h,configFileSelector:w,default:f},s={})=>p$.memoize(p$.chain(Up(h),Fp(w,s),Ip(f))),"loadConfig")});var pM=H((eM)=>{Object.defineProperty(eM,"__esModule",{value:!0});eM.getEndpointUrlConfig=void 0;var xM=H6(),_M="AWS_ENDPOINT_URL",nM="endpoint_url",Bp=(h)=>({environmentVariableSelector:(w)=>{let f=h.split(" ").map((E)=>E.toUpperCase()),s=w[[_M,...f].join("_")];if(s)return s;let $=w[_M];if($)return $;return},configFileSelector:(w,f)=>{if(f&&w.services){let $=f[["services",w.services].join(xM.CONFIG_PREFIX_SEPARATOR)];if($){let E=h.split(" ").map((U)=>U.toLowerCase()),T=$[[E.join("_"),nM].join(xM.CONFIG_PREFIX_SEPARATOR)];if(T)return T}}let s=w[nM];if(s)return s;return},default:void 0});eM.getEndpointUrlConfig=Bp});var D6=H((oM)=>{Object.defineProperty(oM,"__esModule",{value:!0});oM.getEndpointFromConfig=void 0;var Wp=Rs(),Lp=pM(),zp=async(h)=>Wp.loadConfig(Lp.getEndpointUrlConfig(h!==null&&h!==void 0?h:""))();oM.getEndpointFromConfig=zp});var fQ=H((OL0,wQ)=>{var{defineProperty:n2,getOwnPropertyDescriptor:Ap,getOwnPropertyNames:Rp}=Object,Xp=Object.prototype.hasOwnProperty,Yp=(h,w)=>n2(h,"name",{value:w,configurable:!0}),Sp=(h,w)=>{for(var f in w)n2(h,f,{get:w[f],enumerable:!0})},rp=(h,w,f,s)=>{if(w&&typeof w==="object"||typeof w==="function"){for(let $ of Rp(w))if(!Xp.call(h,$)&&$!==f)n2(h,$,{get:()=>w[$],enumerable:!(s=Ap(w,$))||s.enumerable})}return h},Mp=(h)=>rp(n2({},"__esModule",{value:!0}),h),tM={};Sp(tM,{parseQueryString:()=>hQ});wQ.exports=Mp(tM);function hQ(h){let w={};if(h=h.replace(/^\?/,""),h)for(let f of h.split("&")){let[s,$=null]=f.split("=");if(s=decodeURIComponent(s),$)$=decodeURIComponent($);if(!(s in w))w[s]=$;else if(Array.isArray(w[s]))w[s].push($);else w[s]=[w[s],$]}return w}Yp(hQ,"parseQueryString")});var o$=H((lL0,EQ)=>{var{defineProperty:e2,getOwnPropertyDescriptor:Qp,getOwnPropertyNames:Kp}=Object,Zp=Object.prototype.hasOwnProperty,Jp=(h,w)=>e2(h,"name",{value:w,configurable:!0}),Vp=(h,w)=>{for(var f in w)e2(h,f,{get:w[f],enumerable:!0})},Pp=(h,w,f,s)=>{if(w&&typeof w==="object"||typeof w==="function"){for(let $ of Kp(w))if(!Zp.call(h,$)&&$!==f)e2(h,$,{get:()=>w[$],enumerable:!(s=Qp(w,$))||s.enumerable})}return h},Hp=(h)=>Pp(e2({},"__esModule",{value:!0}),h),sQ={};Vp(sQ,{parseUrl:()=>$Q});EQ.exports=Hp(sQ);var Np=fQ(),$Q=Jp((h)=>{if(typeof h==="string")return $Q(new URL(h));let{hostname:w,pathname:f,port:s,protocol:$,search:E}=h,T;if(E)T=Np.parseQueryString(E);return{hostname:w,port:s?parseInt(s):void 0,protocol:$,path:f,query:T}},"parseUrl")});var Xs=H((vL0,BQ)=>{var{defineProperty:p2,getOwnPropertyDescriptor:Dp,getOwnPropertyNames:qp}=Object,kp=Object.prototype.hasOwnProperty,Eh=(h,w)=>p2(h,"name",{value:w,configurable:!0}),jp=(h,w)=>{for(var f in w)p2(h,f,{get:w[f],enumerable:!0})},yp=(h,w,f,s)=>{if(w&&typeof w==="object"||typeof w==="function"){for(let $ of qp(w))if(!kp.call(h,$)&&$!==f)p2(h,$,{get:()=>w[$],enumerable:!(s=Dp(w,$))||s.enumerable})}return h},Op=(h)=>yp(p2({},"__esModule",{value:!0}),h),UQ={};jp(UQ,{endpointMiddleware:()=>IQ,endpointMiddlewareOptions:()=>GQ,getEndpointFromInstructions:()=>FQ,getEndpointPlugin:()=>np,resolveEndpointConfig:()=>ap,resolveParams:()=>CQ,toEndpointV1:()=>q6});BQ.exports=Op(UQ);var lp=Eh(async(h)=>{let w=h?.Bucket||"";if(typeof h.Bucket==="string")h.Bucket=w.replace(/#/g,encodeURIComponent("#")).replace(/\?/g,encodeURIComponent("?"));if(ip(w)){if(h.ForcePathStyle===!0)throw new Error("Path-style addressing cannot be used with ARN buckets")}else if(!dp(w)||w.indexOf(".")!==-1&&!String(h.Endpoint).startsWith("http:")||w.toLowerCase()!==w||w.length<3)h.ForcePathStyle=!0;if(h.DisableMultiRegionAccessPoints)h.disableMultiRegionAccessPoints=!0,h.DisableMRAP=!0;return h},"resolveParamsForS3"),vp=/^[a-z0-9][a-z0-9\.\-]{1,61}[a-z0-9]$/,bp=/(\d+\.){3}\d+/,mp=/\.\./,dp=Eh((h)=>vp.test(h)&&!bp.test(h)&&!mp.test(h),"isDnsCompatibleBucketName"),ip=Eh((h)=>{let[w,f,s,,,$]=h.split(":"),E=w==="arn"&&h.split(":").length>=6,T=Boolean(E&&f&&s&&$);if(E&&!T)throw new Error(`Invalid ARN: ${h} was an invalid ARN.`);return T},"isArnBucketName"),cp=Eh((h,w,f)=>{let s=Eh(async()=>{let $=f[h]??f[w];if(typeof $==="function")return $();return $},"configProvider");if(h==="credentialScope"||w==="CredentialScope")return async()=>{let $=typeof f.credentials==="function"?await f.credentials():f.credentials;return $?.credentialScope??$?.CredentialScope};if(h==="accountId"||w==="AccountId")return async()=>{let $=typeof f.credentials==="function"?await f.credentials():f.credentials;return $?.accountId??$?.AccountId};if(h==="endpoint"||w==="endpoint")return async()=>{let $=await s();if($&&typeof $==="object"){if("url"in $)return $.url.href;if("hostname"in $){let{protocol:E,hostname:T,port:U,path:F}=$;return`${E}//${T}${U?":"+U:""}${F}`}}return $};return s},"createConfigValueProvider"),gp=D6(),TQ=o$(),q6=Eh((h)=>{if(typeof h==="object"){if("url"in h)return TQ.parseUrl(h.url);return h}return TQ.parseUrl(h)},"toEndpointV1"),FQ=Eh(async(h,w,f,s)=>{if(!f.endpoint){let T;if(f.serviceConfiguredEndpoint)T=await f.serviceConfiguredEndpoint();else T=await gp.getEndpointFromConfig(f.serviceId);if(T)f.endpoint=()=>Promise.resolve(q6(T))}let $=await CQ(h,w,f);if(typeof f.endpointProvider!=="function")throw new Error("config.endpointProvider is not set.");return f.endpointProvider($,s)},"getEndpointFromInstructions"),CQ=Eh(async(h,w,f)=>{let s={},$=w?.getEndpointParameterInstructions?.()||{};for(let[E,T]of Object.entries($))switch(T.type){case"staticContextParams":s[E]=T.value;break;case"contextParams":s[E]=h[T.name];break;case"clientContextParams":case"builtInParams":s[E]=await cp(T.name,E,f)();break;case"operationContextParams":s[E]=T.get(h);break;default:throw new Error("Unrecognized endpoint parameter instruction: "+JSON.stringify(T))}if(Object.keys($).length===0)Object.assign(s,f);if(String(f.serviceId).toLowerCase()==="s3")await lp(s);return s},"resolveParams"),xp=b0(),a2=Tw(),IQ=Eh(({config:h,instructions:w})=>{return(f,s)=>async($)=>{if(h.endpoint)xp.setFeature(s,"ENDPOINT_OVERRIDE","N");let E=await FQ($.input,{getEndpointParameterInstructions(){return w}},{...h},s);s.endpointV2=E,s.authSchemes=E.properties?.authSchemes;let T=s.authSchemes?.[0];if(T){s.signing_region=T.signingRegion,s.signing_service=T.signingName;let F=a2.getSmithyContext(s)?.selectedHttpAuthScheme?.httpAuthOption;if(F)F.signingProperties=Object.assign(F.signingProperties||{},{signing_region:T.signingRegion,signingRegion:T.signingRegion,signing_service:T.signingName,signingName:T.signingName,signingRegionSet:T.signingRegionSet},T.properties)}return f({...$})}},"endpointMiddleware"),_p=Zf(),GQ={step:"serialize",tags:["ENDPOINT_PARAMETERS","ENDPOINT_V2","ENDPOINT"],name:"endpointV2Middleware",override:!0,relation:"before",toMiddleware:_p.serializerMiddlewareOption.name},np=Eh((h,w)=>({applyToStack:(f)=>{f.addRelativeTo(IQ({config:h,instructions:w}),GQ)}}),"getEndpointPlugin"),ep=D6(),ap=Eh((h)=>{let w=h.tls??!0,{endpoint:f,useDualstackEndpoint:s,useFipsEndpoint:$}=h,E=f!=null?async()=>q6(await a2.normalizeProvider(f)()):void 0,U=Object.assign(h,{endpoint:E,tls:w,isCustomEndpoint:!!f,useDualstackEndpoint:a2.normalizeProvider(s??!1),useFipsEndpoint:a2.normalizeProvider($??!1)}),F=void 0;return U.serviceConfiguredEndpoint=async()=>{if(h.serviceId&&!F)F=ep.getEndpointFromConfig(h.serviceId);return F},U},"resolveEndpointConfig")});var j6=H((bL0,zQ)=>{var{defineProperty:o2,getOwnPropertyDescriptor:pp,getOwnPropertyNames:op}=Object,up=Object.prototype.hasOwnProperty,Ys=(h,w)=>o2(h,"name",{value:w,configurable:!0}),tp=(h,w)=>{for(var f in w)o2(h,f,{get:w[f],enumerable:!0})},ho=(h,w,f,s)=>{if(w&&typeof w==="object"||typeof w==="function"){for(let $ of op(w))if(!up.call(h,$)&&$!==f)o2(h,$,{get:()=>w[$],enumerable:!(s=pp(w,$))||s.enumerable})}return h},wo=(h)=>ho(o2({},"__esModule",{value:!0}),h),WQ={};tp(WQ,{isClockSkewCorrectedError:()=>LQ,isClockSkewError:()=>Fo,isRetryableByTrait:()=>Uo,isServerError:()=>Io,isThrottlingError:()=>Co,isTransientError:()=>k6});zQ.exports=wo(WQ);var fo=["AuthFailure","InvalidSignatureException","RequestExpired","RequestInTheFuture","RequestTimeTooSkewed","SignatureDoesNotMatch"],so=["BandwidthLimitExceeded","EC2ThrottledException","LimitExceededException","PriorRequestNotComplete","ProvisionedThroughputExceededException","RequestLimitExceeded","RequestThrottled","RequestThrottledException","SlowDown","ThrottledException","Throttling","ThrottlingException","TooManyRequestsException","TransactionInProgressException"],$o=["TimeoutError","RequestTimeout","RequestTimeoutException"],Eo=[500,502,503,504],To=["ECONNRESET","ECONNREFUSED","EPIPE","ETIMEDOUT"],Uo=Ys((h)=>h.$retryable!==void 0,"isRetryableByTrait"),Fo=Ys((h)=>fo.includes(h.name),"isClockSkewError"),LQ=Ys((h)=>h.$metadata?.clockSkewCorrected,"isClockSkewCorrectedError"),Co=Ys((h)=>h.$metadata?.httpStatusCode===429||so.includes(h.name)||h.$retryable?.throttling==!0,"isThrottlingError"),k6=Ys((h,w=0)=>LQ(h)||$o.includes(h.name)||To.includes(h?.code||"")||Eo.includes(h.$metadata?.httpStatusCode||0)||h.cause!==void 0&&w<=10&&k6(h.cause,w+1),"isTransientError"),Io=Ys((h)=>{if(h.$metadata?.httpStatusCode!==void 0){let w=h.$metadata.httpStatusCode;if(500<=w&&w<=599&&!k6(h))return!0;return!1}return!1},"isServerError")});var t2=H((mL0,KQ)=>{var{defineProperty:u2,getOwnPropertyDescriptor:Go,getOwnPropertyNames:Bo}=Object,Wo=Object.prototype.hasOwnProperty,Th=(h,w)=>u2(h,"name",{value:w,configurable:!0}),Lo=(h,w)=>{for(var f in w)u2(h,f,{get:w[f],enumerable:!0})},zo=(h,w,f,s)=>{if(w&&typeof w==="object"||typeof w==="function"){for(let $ of Bo(w))if(!Wo.call(h,$)&&$!==f)u2(h,$,{get:()=>w[$],enumerable:!(s=Go(w,$))||s.enumerable})}return h},Ao=(h)=>zo(u2({},"__esModule",{value:!0}),h),RQ={};Lo(RQ,{AdaptiveRetryStrategy:()=>Mo,ConfiguredRetryStrategy:()=>Qo,DEFAULT_MAX_ATTEMPTS:()=>y6,DEFAULT_RETRY_DELAY_BASE:()=>u$,DEFAULT_RETRY_MODE:()=>Ro,DefaultRateLimiter:()=>YQ,INITIAL_RETRY_TOKENS:()=>O6,INVOCATION_ID_HEADER:()=>Yo,MAXIMUM_RETRY_DELAY:()=>l6,NO_RETRY_INCREMENT:()=>QQ,REQUEST_HEADER:()=>So,RETRY_COST:()=>rQ,RETRY_MODES:()=>XQ,StandardRetryStrategy:()=>v6,THROTTLING_RETRY_DELAY_BASE:()=>SQ,TIMEOUT_RETRY_COST:()=>MQ});KQ.exports=Ao(RQ);var XQ=((h)=>{return h.STANDARD="standard",h.ADAPTIVE="adaptive",h})(XQ||{}),y6=3,Ro="standard",Xo=j6(),YQ=class h{constructor(w){this.currentCapacity=0,this.enabled=!1,this.lastMaxRate=0,this.measuredTxRate=0,this.requestCount=0,this.lastTimestamp=0,this.timeWindow=0,this.beta=w?.beta??0.7,this.minCapacity=w?.minCapacity??1,this.minFillRate=w?.minFillRate??0.5,this.scaleConstant=w?.scaleConstant??0.4,this.smooth=w?.smooth??0.8;let f=this.getCurrentTimeInSeconds();this.lastThrottleTime=f,this.lastTxRateBucket=Math.floor(this.getCurrentTimeInSeconds()),this.fillRate=this.minFillRate,this.maxCapacity=this.minCapacity}static{Th(this,"DefaultRateLimiter")}static{this.setTimeoutFn=setTimeout}getCurrentTimeInSeconds(){return Date.now()/1000}async getSendToken(){return this.acquireTokenBucket(1)}async acquireTokenBucket(w){if(!this.enabled)return;if(this.refillTokenBucket(),w>this.currentCapacity){let f=(w-this.currentCapacity)/this.fillRate*1000;await new Promise((s)=>h.setTimeoutFn(s,f))}this.currentCapacity=this.currentCapacity-w}refillTokenBucket(){let w=this.getCurrentTimeInSeconds();if(!this.lastTimestamp){this.lastTimestamp=w;return}let f=(w-this.lastTimestamp)*this.fillRate;this.currentCapacity=Math.min(this.maxCapacity,this.currentCapacity+f),this.lastTimestamp=w}updateClientSendingRate(w){let f;if(this.updateMeasuredRate(),Xo.isThrottlingError(w)){let $=!this.enabled?this.measuredTxRate:Math.min(this.measuredTxRate,this.fillRate);this.lastMaxRate=$,this.calculateTimeWindow(),this.lastThrottleTime=this.getCurrentTimeInSeconds(),f=this.cubicThrottle($),this.enableTokenBucket()}else this.calculateTimeWindow(),f=this.cubicSuccess(this.getCurrentTimeInSeconds());let s=Math.min(f,2*this.measuredTxRate);this.updateTokenBucketRate(s)}calculateTimeWindow(){this.timeWindow=this.getPrecise(Math.pow(this.lastMaxRate*(1-this.beta)/this.scaleConstant,0.3333333333333333))}cubicThrottle(w){return this.getPrecise(w*this.beta)}cubicSuccess(w){return this.getPrecise(this.scaleConstant*Math.pow(w-this.lastThrottleTime-this.timeWindow,3)+this.lastMaxRate)}enableTokenBucket(){this.enabled=!0}updateTokenBucketRate(w){this.refillTokenBucket(),this.fillRate=Math.max(w,this.minFillRate),this.maxCapacity=Math.max(w,this.minCapacity),this.currentCapacity=Math.min(this.currentCapacity,this.maxCapacity)}updateMeasuredRate(){let w=this.getCurrentTimeInSeconds(),f=Math.floor(w*2)/2;if(this.requestCount++,f>this.lastTxRateBucket){let s=this.requestCount/(f-this.lastTxRateBucket);this.measuredTxRate=this.getPrecise(s*this.smooth+this.measuredTxRate*(1-this.smooth)),this.requestCount=0,this.lastTxRateBucket=f}}getPrecise(w){return parseFloat(w.toFixed(8))}},u$=100,l6=20000,SQ=500,O6=500,rQ=5,MQ=10,QQ=1,Yo="amz-sdk-invocation-id",So="amz-sdk-request",ro=Th(()=>{let h=u$;return{computeNextBackoffDelay:Th((s)=>{return Math.floor(Math.min(l6,Math.random()*2**s*h))},"computeNextBackoffDelay"),setDelayBase:Th((s)=>{h=s},"setDelayBase")}},"getDefaultRetryBackoffStrategy"),AQ=Th(({retryDelay:h,retryCount:w,retryCost:f})=>{return{getRetryCount:Th(()=>w,"getRetryCount"),getRetryDelay:Th(()=>Math.min(l6,h),"getRetryDelay"),getRetryCost:Th(()=>f,"getRetryCost")}},"createDefaultRetryToken"),v6=class{constructor(h){this.maxAttempts=h,this.mode="standard",this.capacity=O6,this.retryBackoffStrategy=ro(),this.maxAttemptsProvider=typeof h==="function"?h:async()=>h}static{Th(this,"StandardRetryStrategy")}async acquireInitialRetryToken(h){return AQ({retryDelay:u$,retryCount:0})}async refreshRetryTokenForRetry(h,w){let f=await this.getMaxAttempts();if(this.shouldRetry(h,w,f)){let s=w.errorType;this.retryBackoffStrategy.setDelayBase(s==="THROTTLING"?SQ:u$);let $=this.retryBackoffStrategy.computeNextBackoffDelay(h.getRetryCount()),E=w.retryAfterHint?Math.max(w.retryAfterHint.getTime()-Date.now()||0,$):$,T=this.getCapacityCost(s);return this.capacity-=T,AQ({retryDelay:E,retryCount:h.getRetryCount()+1,retryCost:T})}throw new Error("No retry token available")}recordSuccess(h){this.capacity=Math.max(O6,this.capacity+(h.getRetryCost()??QQ))}getCapacity(){return this.capacity}async getMaxAttempts(){try{return await this.maxAttemptsProvider()}catch(h){return console.warn(`Max attempts provider could not resolve. Using default of ${y6}`),y6}}shouldRetry(h,w,f){return h.getRetryCount()+1<f&&this.capacity>=this.getCapacityCost(w.errorType)&&this.isRetryableError(w.errorType)}getCapacityCost(h){return h==="TRANSIENT"?MQ:rQ}isRetryableError(h){return h==="THROTTLING"||h==="TRANSIENT"}},Mo=class{constructor(h,w){this.maxAttemptsProvider=h,this.mode="adaptive";let{rateLimiter:f}=w??{};this.rateLimiter=f??new YQ,this.standardRetryStrategy=new v6(h)}static{Th(this,"AdaptiveRetryStrategy")}async acquireInitialRetryToken(h){return await this.rateLimiter.getSendToken(),this.standardRetryStrategy.acquireInitialRetryToken(h)}async refreshRetryTokenForRetry(h,w){return this.rateLimiter.updateClientSendingRate(w),this.standardRetryStrategy.refreshRetryTokenForRetry(h,w)}recordSuccess(h){this.rateLimiter.updateClientSendingRate({}),this.standardRetryStrategy.recordSuccess(h)}},Qo=class extends v6{static{Th(this,"ConfiguredRetryStrategy")}constructor(h,w=u$){super(typeof h==="function"?h:async()=>h);if(typeof w==="number")this.computeNextBackoffDelay=()=>w;else this.computeNextBackoffDelay=w}async refreshRetryTokenForRetry(h,w){let f=await super.refreshRetryTokenForRetry(h,w);return f.getRetryDelay=()=>this.computeNextBackoffDelay(f.getRetryCount()),f}}});var VQ=H((ZQ)=>{Object.defineProperty(ZQ,"__esModule",{value:!0});ZQ.isStreamingPayload=void 0;var Ko=W0("node:stream"),Zo=(h)=>(h===null||h===void 0?void 0:h.body)instanceof Ko.Readable||typeof ReadableStream!=="undefined"&&(h===null||h===void 0?void 0:h.body)instanceof ReadableStream;ZQ.isStreamingPayload=Zo});var t$=H((xL0,iQ)=>{var{defineProperty:hE,getOwnPropertyDescriptor:Jo,getOwnPropertyNames:Vo}=Object,Po=Object.prototype.hasOwnProperty,g0=(h,w)=>hE(h,"name",{value:w,configurable:!0}),Ho=(h,w)=>{for(var f in w)hE(h,f,{get:w[f],enumerable:!0})},No=(h,w,f,s)=>{if(w&&typeof w==="object"||typeof w==="function"){for(let $ of Vo(w))if(!Po.call(h,$)&&$!==f)hE(h,$,{get:()=>w[$],enumerable:!(s=Jo(w,$))||s.enumerable})}return h},Do=(h)=>No(hE({},"__esModule",{value:!0}),h),HQ={};Ho(HQ,{AdaptiveRetryStrategy:()=>jo,CONFIG_MAX_ATTEMPTS:()=>m6,CONFIG_RETRY_MODE:()=>OQ,ENV_MAX_ATTEMPTS:()=>b6,ENV_RETRY_MODE:()=>yQ,NODE_MAX_ATTEMPT_CONFIG_OPTIONS:()=>yo,NODE_RETRY_MODE_CONFIG_OPTIONS:()=>lo,StandardRetryStrategy:()=>jQ,defaultDelayDecider:()=>DQ,defaultRetryDecider:()=>qQ,getOmitRetryHeadersPlugin:()=>vo,getRetryAfterHint:()=>dQ,getRetryPlugin:()=>xo,omitRetryHeadersMiddleware:()=>lQ,omitRetryHeadersMiddlewareOptions:()=>vQ,resolveRetryConfig:()=>Oo,retryMiddleware:()=>bQ,retryMiddlewareOptions:()=>mQ});iQ.exports=Do(HQ);var Ss=u0(),NQ=P3(),O0=t2(),qo=g0((h,w)=>{let f=h,s=w?.noRetryIncrement??O0.NO_RETRY_INCREMENT,$=w?.retryCost??O0.RETRY_COST,E=w?.timeoutRetryCost??O0.TIMEOUT_RETRY_COST,T=h,U=g0((G)=>G.name==="TimeoutError"?E:$,"getCapacityAmount"),F=g0((G)=>U(G)<=T,"hasRetryTokens");return Object.freeze({hasRetryTokens:F,retrieveRetryTokens:g0((G)=>{if(!F(G))throw new Error("No retry token available");let B=U(G);return T-=B,B},"retrieveRetryTokens"),releaseRetryTokens:g0((G)=>{T+=G??s,T=Math.min(T,f)},"releaseRetryTokens")})},"getDefaultRetryQuota"),DQ=g0((h,w)=>Math.floor(Math.min(O0.MAXIMUM_RETRY_DELAY,Math.random()*2**w*h)),"defaultDelayDecider"),Vw=j6(),qQ=g0((h)=>{if(!h)return!1;return Vw.isRetryableByTrait(h)||Vw.isClockSkewError(h)||Vw.isThrottlingError(h)||Vw.isTransientError(h)},"defaultRetryDecider"),kQ=g0((h)=>{if(h instanceof Error)return h;if(h instanceof Object)return Object.assign(new Error,h);if(typeof h==="string")return new Error(h);return new Error(`AWS SDK error wrapper for ${h}`)},"asSdkError"),jQ=class{constructor(h,w){this.maxAttemptsProvider=h,this.mode=O0.RETRY_MODES.STANDARD,this.retryDecider=w?.retryDecider??qQ,this.delayDecider=w?.delayDecider??DQ,this.retryQuota=w?.retryQuota??qo(O0.INITIAL_RETRY_TOKENS)}static{g0(this,"StandardRetryStrategy")}shouldRetry(h,w,f){return w<f&&this.retryDecider(h)&&this.retryQuota.hasRetryTokens(h)}async getMaxAttempts(){let h;try{h=await this.maxAttemptsProvider()}catch(w){h=O0.DEFAULT_MAX_ATTEMPTS}return h}async retry(h,w,f){let s,$=0,E=0,T=await this.getMaxAttempts(),{request:U}=w;if(Ss.HttpRequest.isInstance(U))U.headers[O0.INVOCATION_ID_HEADER]=NQ.v4();while(!0)try{if(Ss.HttpRequest.isInstance(U))U.headers[O0.REQUEST_HEADER]=`attempt=${$+1}; max=${T}`;if(f?.beforeRequest)await f.beforeRequest();let{response:F,output:C}=await h(w);if(f?.afterRequest)f.afterRequest(F);return this.retryQuota.releaseRetryTokens(s),C.$metadata.attempts=$+1,C.$metadata.totalRetryDelay=E,{response:F,output:C}}catch(F){let C=kQ(F);if($++,this.shouldRetry(C,$,T)){s=this.retryQuota.retrieveRetryTokens(C);let I=this.delayDecider(Vw.isThrottlingError(C)?O0.THROTTLING_RETRY_DELAY_BASE:O0.DEFAULT_RETRY_DELAY_BASE,$),G=ko(C.$response),B=Math.max(G||0,I);E+=B,await new Promise((z)=>setTimeout(z,B));continue}if(!C.$metadata)C.$metadata={};throw C.$metadata.attempts=$,C.$metadata.totalRetryDelay=E,C}}},ko=g0((h)=>{if(!Ss.HttpResponse.isInstance(h))return;let w=Object.keys(h.headers).find((E)=>E.toLowerCase()==="retry-after");if(!w)return;let f=h.headers[w],s=Number(f);if(!Number.isNaN(s))return s*1000;return new Date(f).getTime()-Date.now()},"getDelayFromRetryAfterHeader"),jo=class extends jQ{static{g0(this,"AdaptiveRetryStrategy")}constructor(h,w){let{rateLimiter:f,...s}=w??{};super(h,s);this.rateLimiter=f??new O0.DefaultRateLimiter,this.mode=O0.RETRY_MODES.ADAPTIVE}async retry(h,w){return super.retry(h,w,{beforeRequest:async()=>{return this.rateLimiter.getSendToken()},afterRequest:(f)=>{this.rateLimiter.updateClientSendingRate(f)}})}},PQ=Tw(),b6="AWS_MAX_ATTEMPTS",m6="max_attempts",yo={environmentVariableSelector:(h)=>{let w=h[b6];if(!w)return;let f=parseInt(w);if(Number.isNaN(f))throw new Error(`Environment variable ${b6} mast be a number, got "${w}"`);return f},configFileSelector:(h)=>{let w=h[m6];if(!w)return;let f=parseInt(w);if(Number.isNaN(f))throw new Error(`Shared config file entry ${m6} mast be a number, got "${w}"`);return f},default:O0.DEFAULT_MAX_ATTEMPTS},Oo=g0((h)=>{let{retryStrategy:w,retryMode:f,maxAttempts:s}=h,$=PQ.normalizeProvider(s??O0.DEFAULT_MAX_ATTEMPTS);return Object.assign(h,{maxAttempts:$,retryStrategy:async()=>{if(w)return w;if(await PQ.normalizeProvider(f)()===O0.RETRY_MODES.ADAPTIVE)return new O0.AdaptiveRetryStrategy($);return new O0.StandardRetryStrategy($)}})},"resolveRetryConfig"),yQ="AWS_RETRY_MODE",OQ="retry_mode",lo={environmentVariableSelector:(h)=>h[yQ],configFileSelector:(h)=>h[OQ],default:O0.DEFAULT_RETRY_MODE},lQ=g0(()=>(h)=>async(w)=>{let{request:f}=w;if(Ss.HttpRequest.isInstance(f))delete f.headers[O0.INVOCATION_ID_HEADER],delete f.headers[O0.REQUEST_HEADER];return h(w)},"omitRetryHeadersMiddleware"),vQ={name:"omitRetryHeadersMiddleware",tags:["RETRY","HEADERS","OMIT_RETRY_HEADERS"],relation:"before",toMiddleware:"awsAuthMiddleware",override:!0},vo=g0((h)=>({applyToStack:(w)=>{w.addRelativeTo(lQ(),vQ)}}),"getOmitRetryHeadersPlugin"),bo=Z0(),mo=VQ(),bQ=g0((h)=>(w,f)=>async(s)=>{let $=await h.retryStrategy(),E=await h.maxAttempts();if(io($)){$=$;let T=await $.acquireInitialRetryToken(f.partition_id),U=new Error,F=0,C=0,{request:I}=s,G=Ss.HttpRequest.isInstance(I);if(G)I.headers[O0.INVOCATION_ID_HEADER]=NQ.v4();while(!0)try{if(G)I.headers[O0.REQUEST_HEADER]=`attempt=${F+1}; max=${E}`;let{response:B,output:z}=await w(s);return $.recordSuccess(T),z.$metadata.attempts=F+1,z.$metadata.totalRetryDelay=C,{response:B,output:z}}catch(B){let z=co(B);if(U=kQ(B),G&&mo.isStreamingPayload(I))throw(f.logger instanceof bo.NoOpLogger?console:f.logger)?.warn("An error was encountered in a non-retryable streaming request."),U;try{T=await $.refreshRetryTokenForRetry(T,z)}catch(Q){if(!U.$metadata)U.$metadata={};throw U.$metadata.attempts=F+1,U.$metadata.totalRetryDelay=C,U}F=T.getRetryCount();let Y=T.getRetryDelay();C+=Y,await new Promise((Q)=>setTimeout(Q,Y))}}else{if($=$,$?.mode)f.userAgent=[...f.userAgent||[],["cfg/retry-mode",$.mode]];return $.retry(w,s)}},"retryMiddleware"),io=g0((h)=>typeof h.acquireInitialRetryToken!=="undefined"&&typeof h.refreshRetryTokenForRetry!=="undefined"&&typeof h.recordSuccess!=="undefined","isRetryStrategyV2"),co=g0((h)=>{let w={error:h,errorType:go(h)},f=dQ(h.$response);if(f)w.retryAfterHint=f;return w},"getRetryErrorInfo"),go=g0((h)=>{if(Vw.isThrottlingError(h))return"THROTTLING";if(Vw.isTransientError(h))return"TRANSIENT";if(Vw.isServerError(h))return"SERVER_ERROR";return"CLIENT_ERROR"},"getRetryErrorType"),mQ={name:"retryMiddleware",tags:["RETRY"],step:"finalizeRequest",priority:"high",override:!0},xo=g0((h)=>({applyToStack:(w)=>{w.add(bQ(h),mQ)}}),"getRetryPlugin"),dQ=g0((h)=>{if(!Ss.HttpResponse.isInstance(h))return;let w=Object.keys(h.headers).find((E)=>E.toLowerCase()==="retry-after");if(!w)return;let f=h.headers[w],s=Number(f);if(!Number.isNaN(s))return new Date(s*1000);return new Date(f)},"getRetryAfterHint")});var d6=H((gQ)=>{Object.defineProperty(gQ,"__esModule",{value:!0});gQ.resolveHttpAuthSchemeConfig=gQ.defaultSSOOIDCHttpAuthSchemeProvider=gQ.defaultSSOOIDCHttpAuthSchemeParametersProvider=void 0;var _o=y0(),cQ=Tw(),no=async(h,w,f)=>{return{operation:cQ.getSmithyContext(w).operation,region:await cQ.normalizeProvider(h.region)()||(()=>{throw new Error("expected `region` to be configured for `aws.auth#sigv4`")})()}};gQ.defaultSSOOIDCHttpAuthSchemeParametersProvider=no;function eo(h){return{schemeId:"aws.auth#sigv4",signingProperties:{name:"sso-oauth",region:h.region},propertiesExtractor:(w,f)=>({signingProperties:{config:w,context:f}})}}function ao(h){return{schemeId:"smithy.api#noAuth"}}var po=(h)=>{let w=[];switch(h.operation){case"CreateToken":{w.push(ao(h));break}default:w.push(eo(h))}return w};gQ.defaultSSOOIDCHttpAuthSchemeProvider=po;var oo=(h)=>{let w=_o.resolveAwsSdkSigV4Config(h);return Object.assign(w,{})};gQ.resolveHttpAuthSchemeConfig=oo});var i6=H((aL0,hu)=>{hu.exports={name:"@aws-sdk/nested-clients",version:"3.777.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.775.0","@aws-sdk/middleware-host-header":"3.775.0","@aws-sdk/middleware-logger":"3.775.0","@aws-sdk/middleware-recursion-detection":"3.775.0","@aws-sdk/middleware-user-agent":"3.775.0","@aws-sdk/region-config-resolver":"3.775.0","@aws-sdk/types":"3.775.0","@aws-sdk/util-endpoints":"3.775.0","@aws-sdk/util-user-agent-browser":"3.775.0","@aws-sdk/util-user-agent-node":"3.775.0","@smithy/config-resolver":"^4.1.0","@smithy/core":"^3.2.0","@smithy/fetch-http-handler":"^5.0.2","@smithy/hash-node":"^4.0.2","@smithy/invalid-dependency":"^4.0.2","@smithy/middleware-content-length":"^4.0.2","@smithy/middleware-endpoint":"^4.1.0","@smithy/middleware-retry":"^4.1.0","@smithy/middleware-serde":"^4.0.3","@smithy/middleware-stack":"^4.0.2","@smithy/node-config-provider":"^4.0.2","@smithy/node-http-handler":"^4.0.4","@smithy/protocol-http":"^5.1.0","@smithy/smithy-client":"^4.2.0","@smithy/types":"^4.2.0","@smithy/url-parser":"^4.0.2","@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.8","@smithy/util-defaults-mode-node":"^4.0.8","@smithy/util-endpoints":"^3.0.2","@smithy/util-middleware":"^4.0.2","@smithy/util-retry":"^4.0.2","@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":{types:"./dist-types/submodules/sso-oidc/index.d.ts",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"},"./sts":{types:"./dist-types/submodules/sts/index.d.ts",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"}}}});var g6=H((pL0,uQ)=>{var{defineProperty:fE,getOwnPropertyDescriptor:wu,getOwnPropertyNames:fu}=Object,su=Object.prototype.hasOwnProperty,wE=(h,w)=>fE(h,"name",{value:w,configurable:!0}),$u=(h,w)=>{for(var f in w)fE(h,f,{get:w[f],enumerable:!0})},Eu=(h,w,f,s)=>{if(w&&typeof w==="object"||typeof w==="function"){for(let $ of fu(w))if(!su.call(h,$)&&$!==f)fE(h,$,{get:()=>w[$],enumerable:!(s=wu(w,$))||s.enumerable})}return h},Tu=(h)=>Eu(fE({},"__esModule",{value:!0}),h),nQ={};$u(nQ,{NODE_APP_ID_CONFIG_OPTIONS:()=>Gu,UA_APP_ID_ENV_NAME:()=>pQ,UA_APP_ID_INI_NAME:()=>oQ,createDefaultUserAgentProvider:()=>aQ,crtAvailability:()=>eQ,defaultUserAgent:()=>Fu});uQ.exports=Tu(nQ);var _Q=W0("node:os"),c6=W0("node:process"),eQ={isCrtAvailable:!1},Uu=wE(()=>{if(eQ.isCrtAvailable)return["md/crt-avail"];return null},"isCrtAvailable"),aQ=wE(({serviceId:h,clientVersion:w})=>{return async(f)=>{let s=[["aws-sdk-js",w],["ua","2.1"],[`os/${_Q.platform()}`,_Q.release()],["lang/js"],["md/nodejs",`${c6.versions.node}`]],$=Uu();if($)s.push($);if(h)s.push([`api/${h}`,w]);if(c6.env.AWS_EXECUTION_ENV)s.push([`exec-env/${c6.env.AWS_EXECUTION_ENV}`]);let E=await f?.userAgentAppId?.();return E?[...s,[`app/${E}`]]:[...s]}},"createDefaultUserAgentProvider"),Fu=aQ,Cu=v2(),pQ="AWS_SDK_UA_APP_ID",oQ="sdk_ua_app_id",Iu="sdk-ua-app-id",Gu={environmentVariableSelector:wE((h)=>h[pQ],"environmentVariableSelector"),configFileSelector:wE((h)=>h[oQ]??h[Iu],"configFileSelector"),default:Cu.DEFAULT_UA_APP_ID}});var n6=H((oL0,fK)=>{var{defineProperty:sE,getOwnPropertyDescriptor:Bu,getOwnPropertyNames:Wu}=Object,Lu=Object.prototype.hasOwnProperty,hK=(h,w)=>sE(h,"name",{value:w,configurable:!0}),zu=(h,w)=>{for(var f in w)sE(h,f,{get:w[f],enumerable:!0})},Au=(h,w,f,s)=>{if(w&&typeof w==="object"||typeof w==="function"){for(let $ of Wu(w))if(!Lu.call(h,$)&&$!==f)sE(h,$,{get:()=>w[$],enumerable:!(s=Bu(w,$))||s.enumerable})}return h},Ru=(h)=>Au(sE({},"__esModule",{value:!0}),h),wK={};zu(wK,{Hash:()=>Su});fK.exports=Ru(wK);var x6=Jf(),Xu=I1(),Yu=W0("node:buffer"),tQ=W0("node:crypto"),Su=class{static{hK(this,"Hash")}constructor(h,w){this.algorithmIdentifier=h,this.secret=w,this.reset()}update(h,w){this.hash.update(Xu.toUint8Array(_6(h,w)))}digest(){return Promise.resolve(this.hash.digest())}reset(){this.hash=this.secret?tQ.createHmac(this.algorithmIdentifier,_6(this.secret)):tQ.createHash(this.algorithmIdentifier)}};function _6(h,w){if(Yu.Buffer.isBuffer(h))return h;if(typeof h==="string")return x6.fromString(h,w);if(ArrayBuffer.isView(h))return x6.fromArrayBuffer(h.buffer,h.byteOffset,h.byteLength);return x6.fromArrayBuffer(h)}hK(_6,"castSourceData")});var e6=H((tL0,EK)=>{var{defineProperty:$E,getOwnPropertyDescriptor:ru,getOwnPropertyNames:Mu}=Object,Qu=Object.prototype.hasOwnProperty,Ku=(h,w)=>$E(h,"name",{value:w,configurable:!0}),Zu=(h,w)=>{for(var f in w)$E(h,f,{get:w[f],enumerable:!0})},Ju=(h,w,f,s)=>{if(w&&typeof w==="object"||typeof w==="function"){for(let $ of Mu(w))if(!Qu.call(h,$)&&$!==f)$E(h,$,{get:()=>w[$],enumerable:!(s=ru(w,$))||s.enumerable})}return h},Vu=(h)=>Ju($E({},"__esModule",{value:!0}),h),$K={};Zu($K,{calculateBodyLength:()=>Pu});EK.exports=Vu($K);var sK=W0("node:fs"),Pu=Ku((h)=>{if(!h)return 0;if(typeof h==="string")return Buffer.byteLength(h);else if(typeof h.byteLength==="number")return h.byteLength;else if(typeof h.size==="number")return h.size;else if(typeof h.start==="number"&&typeof h.end==="number")return h.end+1-h.start;else if(typeof h.path==="string"||Buffer.isBuffer(h.path))return sK.lstatSync(h.path).size;else if(typeof h.fd==="number")return sK.fstatSync(h.fd).size;throw new Error(`Body Length computation failed for ${h}`)},"calculateBodyLength")});var MK=H((SK)=>{Object.defineProperty(SK,"__esModule",{value:!0});SK.ruleSet=void 0;var AK="required",v1="fn",b1="argv",Qs="ref",TK=!0,UK="isSet",h4="booleanEquals",rs="error",Ms="endpoint",xh="tree",a6="PartitionResult",p6="getAttr",FK={[AK]:!1,type:"String"},CK={[AK]:!0,default:!1,type:"Boolean"},IK={[Qs]:"Endpoint"},RK={[v1]:h4,[b1]:[{[Qs]:"UseFIPS"},!0]},XK={[v1]:h4,[b1]:[{[Qs]:"UseDualStack"},!0]},l1={},GK={[v1]:p6,[b1]:[{[Qs]:a6},"supportsFIPS"]},YK={[Qs]:a6},BK={[v1]:h4,[b1]:[!0,{[v1]:p6,[b1]:[YK,"supportsDualStack"]}]},WK=[RK],LK=[XK],zK=[{[Qs]:"Region"}],Hu={version:"1.0",parameters:{Region:FK,UseDualStack:CK,UseFIPS:CK,Endpoint:FK},rules:[{conditions:[{[v1]:UK,[b1]:[IK]}],rules:[{conditions:WK,error:"Invalid Configuration: FIPS and custom endpoint are not supported",type:rs},{conditions:LK,error:"Invalid Configuration: Dualstack and custom endpoint are not supported",type:rs},{endpoint:{url:IK,properties:l1,headers:l1},type:Ms}],type:xh},{conditions:[{[v1]:UK,[b1]:zK}],rules:[{conditions:[{[v1]:"aws.partition",[b1]:zK,assign:a6}],rules:[{conditions:[RK,XK],rules:[{conditions:[{[v1]:h4,[b1]:[TK,GK]},BK],rules:[{endpoint:{url:"https://oidc-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:l1,headers:l1},type:Ms}],type:xh},{error:"FIPS and DualStack are enabled, but this partition does not support one or both",type:rs}],type:xh},{conditions:WK,rules:[{conditions:[{[v1]:h4,[b1]:[GK,TK]}],rules:[{conditions:[{[v1]:"stringEquals",[b1]:[{[v1]:p6,[b1]:[YK,"name"]},"aws-us-gov"]}],endpoint:{url:"https://oidc.{Region}.amazonaws.com",properties:l1,headers:l1},type:Ms},{endpoint:{url:"https://oidc-fips.{Region}.{PartitionResult#dnsSuffix}",properties:l1,headers:l1},type:Ms}],type:xh},{error:"FIPS is enabled but this partition does not support FIPS",type:rs}],type:xh},{conditions:LK,rules:[{conditions:[BK],rules:[{endpoint:{url:"https://oidc.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:l1,headers:l1},type:Ms}],type:xh},{error:"DualStack is enabled but this partition does not support DualStack",type:rs}],type:xh},{endpoint:{url:"https://oidc.{Region}.{PartitionResult#dnsSuffix}",properties:l1,headers:l1},type:Ms}],type:xh}],type:xh},{error:"Invalid Configuration: Missing Region",type:rs}]};SK.ruleSet=Hu});var ZK=H((QK)=>{Object.defineProperty(QK,"__esModule",{value:!0});QK.defaultEndpointResolver=void 0;var Nu=y2(),o6=k2(),Du=MK(),qu=new o6.EndpointCache({size:50,params:["Endpoint","Region","UseDualStack","UseFIPS"]}),ku=(h,w={})=>{return qu.get(h,()=>o6.resolveEndpoint(Du.ruleSet,{endpointParams:h,logger:w.logger}))};QK.defaultEndpointResolver=ku;o6.customEndpointFunctions.aws=Nu.awsEndpointFunctions});var NK=H((PK)=>{Object.defineProperty(PK,"__esModule",{value:!0});PK.getRuntimeConfig=void 0;var ju=y0(),yu=b0(),Ou=Z0(),lu=o$(),JK=p1(),VK=I1(),vu=d6(),bu=ZK(),mu=(h)=>{return{apiVersion:"2019-06-10",base64Decoder:h?.base64Decoder??JK.fromBase64,base64Encoder:h?.base64Encoder??JK.toBase64,disableHostPrefix:h?.disableHostPrefix??!1,endpointProvider:h?.endpointProvider??bu.defaultEndpointResolver,extensions:h?.extensions??[],httpAuthSchemeProvider:h?.httpAuthSchemeProvider??vu.defaultSSOOIDCHttpAuthSchemeProvider,httpAuthSchemes:h?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:(w)=>w.getIdentityProvider("aws.auth#sigv4"),signer:new ju.AwsSdkSigV4Signer},{schemeId:"smithy.api#noAuth",identityProvider:(w)=>w.getIdentityProvider("smithy.api#noAuth")||(async()=>({})),signer:new yu.NoAuthSigner}],logger:h?.logger??new Ou.NoOpLogger,serviceId:h?.serviceId??"SSO OIDC",urlParser:h?.urlParser??lu.parseUrl,utf8Decoder:h?.utf8Decoder??VK.fromUtf8,utf8Encoder:h?.utf8Encoder??VK.toUtf8}};PK.getRuntimeConfig=mu});var gK=H((sz0,cK)=>{var{defineProperty:UE,getOwnPropertyDescriptor:du,getOwnPropertyNames:iu}=Object,cu=Object.prototype.hasOwnProperty,x0=(h,w)=>UE(h,"name",{value:w,configurable:!0}),gu=(h,w)=>{for(var f in w)UE(h,f,{get:w[f],enumerable:!0})},xu=(h,w,f,s)=>{if(w&&typeof w==="object"||typeof w==="function"){for(let $ of iu(w))if(!cu.call(h,$)&&$!==f)UE(h,$,{get:()=>w[$],enumerable:!(s=du(w,$))||s.enumerable})}return h},_u=(h)=>xu(UE({},"__esModule",{value:!0}),h),jK={};gu(jK,{DEFAULT_MAX_RETRIES:()=>vK,DEFAULT_TIMEOUT:()=>lK,ENV_CMDS_AUTH_TOKEN:()=>hC,ENV_CMDS_FULL_URI:()=>EE,ENV_CMDS_RELATIVE_URI:()=>TE,Endpoint:()=>bK,fromContainerMetadata:()=>pu,fromInstanceMetadata:()=>Rt,getInstanceMetadataEndpoint:()=>dK,httpRequest:()=>Ks,providerConfigFromInit:()=>wC});cK.exports=_u(jK);var nu=W0("node:url"),Qh=U0(),eu=W0("node:buffer"),au=W0("node:http");function Ks(h){return new Promise((w,f)=>{let s=au.request({method:"GET",...h,hostname:h.hostname?.replace(/^\[(.+)\]$/,"$1")});s.on("error",($)=>{f(Object.assign(new Qh.ProviderError("Unable to connect to instance metadata service"),$)),s.destroy()}),s.on("timeout",()=>{f(new Qh.ProviderError("TimeoutError from instance metadata service")),s.destroy()}),s.on("response",($)=>{let{statusCode:E=400}=$;if(E<200||300<=E)f(Object.assign(new Qh.ProviderError("Error response received from instance metadata service"),{statusCode:E})),s.destroy();let T=[];$.on("data",(U)=>{T.push(U)}),$.on("end",()=>{w(eu.Buffer.concat(T)),s.destroy()})}),s.end()})}x0(Ks,"httpRequest");var yK=x0((h)=>Boolean(h)&&typeof h==="object"&&typeof h.AccessKeyId==="string"&&typeof h.SecretAccessKey==="string"&&typeof h.Token==="string"&&typeof h.Expiration==="string","isImdsCredentials"),OK=x0((h)=>({accessKeyId:h.AccessKeyId,secretAccessKey:h.SecretAccessKey,sessionToken:h.Token,expiration:new Date(h.Expiration),...h.AccountId&&{accountId:h.AccountId}}),"fromImdsCredentials"),lK=1000,vK=0,wC=x0(({maxRetries:h=vK,timeout:w=lK})=>({maxRetries:h,timeout:w}),"providerConfigFromInit"),t6=x0((h,w)=>{let f=h();for(let s=0;s<w;s++)f=f.catch(h);return f},"retry"),EE="AWS_CONTAINER_CREDENTIALS_FULL_URI",TE="AWS_CONTAINER_CREDENTIALS_RELATIVE_URI",hC="AWS_CONTAINER_AUTHORIZATION_TOKEN",pu=x0((h={})=>{let{timeout:w,maxRetries:f}=wC(h);return()=>t6(async()=>{let s=await wt({logger:h.logger}),$=JSON.parse(await ou(w,s));if(!yK($))throw new Qh.CredentialsProviderError("Invalid response received from instance metadata service.",{logger:h.logger});return OK($)},f)},"fromContainerMetadata"),ou=x0(async(h,w)=>{if(process.env[hC])w.headers={...w.headers,Authorization:process.env[hC]};return(await Ks({...w,timeout:h})).toString()},"requestFromEcsImds"),uu="169.254.170.2",tu={localhost:!0,"127.0.0.1":!0},ht={"http:":!0,"https:":!0},wt=x0(async({logger:h})=>{if(process.env[TE])return{hostname:uu,path:process.env[TE]};if(process.env[EE]){let w=nu.parse(process.env[EE]);if(!w.hostname||!(w.hostname in tu))throw new Qh.CredentialsProviderError(`${w.hostname} is not a valid container metadata service hostname`,{tryNextLink:!1,logger:h});if(!w.protocol||!(w.protocol in ht))throw new Qh.CredentialsProviderError(`${w.protocol} is not a valid container metadata service protocol`,{tryNextLink:!1,logger:h});return{...w,port:w.port?parseInt(w.port,10):void 0}}throw new Qh.CredentialsProviderError(`The container metadata credential provider cannot be used unless the ${TE} or ${EE} environment variable is set`,{tryNextLink:!1,logger:h})},"getCmdsUri"),ft=class h extends Qh.CredentialsProviderError{constructor(w,f=!0){super(w,f);this.tryNextLink=f,this.name="InstanceMetadataV1FallbackError",Object.setPrototypeOf(this,h.prototype)}static{x0(this,"InstanceMetadataV1FallbackError")}},fC=Rs(),st=o$(),bK=((h)=>{return h.IPv4="http://169.254.169.254",h.IPv6="http://[fd00:ec2::254]",h})(bK||{}),$t="AWS_EC2_METADATA_SERVICE_ENDPOINT",Et="ec2_metadata_service_endpoint",Tt={environmentVariableSelector:(h)=>h[$t],configFileSelector:(h)=>h[Et],default:void 0},mK=((h)=>{return h.IPv4="IPv4",h.IPv6="IPv6",h})(mK||{}),Ut="AWS_EC2_METADATA_SERVICE_ENDPOINT_MODE",Ft="ec2_metadata_service_endpoint_mode",Ct={environmentVariableSelector:(h)=>h[Ut],configFileSelector:(h)=>h[Ft],default:"IPv4"},dK=x0(async()=>st.parseUrl(await It()||await Gt()),"getInstanceMetadataEndpoint"),It=x0(async()=>fC.loadConfig(Tt)(),"getFromEndpointConfig"),Gt=x0(async()=>{let h=await fC.loadConfig(Ct)();switch(h){case"IPv4":return"http://169.254.169.254";case"IPv6":return"http://[fd00:ec2::254]";default:throw new Error(`Unsupported endpoint mode: ${h}. Select from ${Object.values(mK)}`)}},"getFromEndpointModeConfig"),Bt=300,Wt=300,Lt="https://docs.aws.amazon.com/sdkref/latest/guide/feature-static-credentials.html",DK=x0((h,w)=>{let f=Bt+Math.floor(Math.random()*Wt),s=new Date(Date.now()+f*1000);w.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: `+Lt);let $=h.originalExpiration??h.expiration;return{...h,...$?{originalExpiration:$}:{},expiration:s}},"getExtendedInstanceMetadataCredentials"),zt=x0((h,w={})=>{let f=w?.logger||console,s;return async()=>{let $;try{if($=await h(),$.expiration&&$.expiration.getTime()<Date.now())$=DK($,f)}catch(E){if(s)f.warn("Credential renew failed: ",E),$=DK(s,f);else throw E}return s=$,$}},"staticStabilityProvider"),iK="/latest/meta-data/iam/security-credentials/",At="/latest/api/token",u6="AWS_EC2_METADATA_V1_DISABLED",qK="ec2_metadata_v1_disabled",kK="x-aws-ec2-metadata-token",Rt=x0((h={})=>zt(Xt(h),{logger:h.logger}),"fromInstanceMetadata"),Xt=x0((h={})=>{let w=!1,{logger:f,profile:s}=h,{timeout:$,maxRetries:E}=wC(h),T=x0(async(U,F)=>{if(w||F.headers?.[kK]==null){let G=!1,B=!1,z=await fC.loadConfig({environmentVariableSelector:(Y)=>{let Q=Y[u6];if(B=!!Q&&Q!=="false",Q===void 0)throw new Qh.CredentialsProviderError(`${u6} not set in env, checking config file next.`,{logger:h.logger});return B},configFileSelector:(Y)=>{let Q=Y[qK];return G=!!Q&&Q!=="false",G},default:!1},{profile:s})();if(h.ec2MetadataV1Disabled||z){let Y=[];if(h.ec2MetadataV1Disabled)Y.push("credential provider initialization (runtime option ec2MetadataV1Disabled)");if(G)Y.push(`config file profile (${qK})`);if(B)Y.push(`process environment variable (${u6})`);throw new ft(`AWS EC2 Metadata v1 fallback has been blocked by AWS SDK configuration in the following: [${Y.join(", ")}].`)}}let I=(await t6(async()=>{let G;try{G=await St(F)}catch(B){if(B.statusCode===401)w=!1;throw B}return G},U)).trim();return t6(async()=>{let G;try{G=await rt(I,F,h)}catch(B){if(B.statusCode===401)w=!1;throw B}return G},U)},"getCredentials");return async()=>{let U=await dK();if(w)return f?.debug("AWS SDK Instance Metadata","using v1 fallback (no token fetch)"),T(E,{...U,timeout:$});else{let F;try{F=(await Yt({...U,timeout:$})).toString()}catch(C){if(C?.statusCode===400)throw Object.assign(C,{message:"EC2 Metadata token request returned error"});else if(C.message==="TimeoutError"||[403,404,405].includes(C.statusCode))w=!0;return f?.debug("AWS SDK Instance Metadata","using v1 fallback (initial)"),T(E,{...U,timeout:$})}return T(E,{...U,headers:{[kK]:F},timeout:$})}}},"getInstanceMetadataProvider"),Yt=x0(async(h)=>Ks({...h,path:At,method:"PUT",headers:{"x-aws-ec2-metadata-token-ttl-seconds":"21600"}}),"getMetadataToken"),St=x0(async(h)=>(await Ks({...h,path:iK})).toString(),"getProfile"),rt=x0(async(h,w,f)=>{let s=JSON.parse((await Ks({...w,path:iK+h})).toString());if(!yK(s))throw new Qh.CredentialsProviderError("Invalid response received from instance metadata service.",{logger:f.logger});return OK(s)},"getCredentialsFromProfile")});var $C=H(($z0,pK)=>{var{create:Mt,defineProperty:w4,getOwnPropertyDescriptor:Qt,getOwnPropertyNames:Kt,getPrototypeOf:Zt}=Object,Jt=Object.prototype.hasOwnProperty,sC=(h,w)=>w4(h,"name",{value:w,configurable:!0}),Vt=(h,w)=>{for(var f in w)w4(h,f,{get:w[f],enumerable:!0})},eK=(h,w,f,s)=>{if(w&&typeof w==="object"||typeof w==="function"){for(let $ of Kt(w))if(!Jt.call(h,$)&&$!==f)w4(h,$,{get:()=>w[$],enumerable:!(s=Qt(w,$))||s.enumerable})}return h},Pt=(h,w,f)=>(f=h!=null?Mt(Zt(h)):{},eK(w||!h||!h.__esModule?w4(f,"default",{value:h,enumerable:!0}):f,h)),Ht=(h)=>eK(w4({},"__esModule",{value:!0}),h),aK={};Vt(aK,{resolveDefaultsModeConfig:()=>bt});pK.exports=Ht(aK);var Nt=Ls(),xK=Rs(),Dt=U0(),qt="AWS_EXECUTION_ENV",_K="AWS_REGION",nK="AWS_DEFAULT_REGION",kt="AWS_EC2_METADATA_DISABLED",jt=["in-region","cross-region","mobile","standard","legacy"],yt="/latest/meta-data/placement/region",Ot="AWS_DEFAULTS_MODE",lt="defaults_mode",vt={environmentVariableSelector:(h)=>{return h[Ot]},configFileSelector:(h)=>{return h[lt]},default:"legacy"},bt=sC(({region:h=xK.loadConfig(Nt.NODE_REGION_CONFIG_OPTIONS),defaultsMode:w=xK.loadConfig(vt)}={})=>Dt.memoize(async()=>{let f=typeof w==="function"?await w():w;switch(f?.toLowerCase()){case"auto":return mt(h);case"in-region":case"cross-region":case"mobile":case"standard":case"legacy":return Promise.resolve(f?.toLocaleLowerCase());case void 0:return Promise.resolve("legacy");default:throw new Error(`Invalid parameter for "defaultsMode", expect ${jt.join(", ")}, got ${f}`)}}),"resolveDefaultsModeConfig"),mt=sC(async(h)=>{if(h){let w=typeof h==="function"?await h():h,f=await dt();if(!f)return"standard";if(w===f)return"in-region";else return"cross-region"}return"standard"},"resolveNodeDefaultsModeAuto"),dt=sC(async()=>{if(process.env[qt]&&(process.env[_K]||process.env[nK]))return process.env[_K]??process.env[nK];if(!process.env[kt])try{let{getInstanceMetadataEndpoint:h,httpRequest:w}=await Promise.resolve().then(()=>Pt(gK())),f=await h();return(await w({...f,path:yt})).toString()}catch(h){}},"inferPhysicalRegion")});var fZ=H((hZ)=>{Object.defineProperty(hZ,"__esModule",{value:!0});hZ.getRuntimeConfig=void 0;var it=V5(),ct=it.__importDefault(i6()),gt=y0(),oK=g6(),FE=Ls(),xt=n6(),uK=t$(),Zs=Rs(),tK=C5(),_t=e6(),nt=t2(),et=NK(),at=Z0(),pt=$C(),ot=Z0(),ut=(h)=>{ot.emitWarningIfUnsupportedVersion(process.version);let w=pt.resolveDefaultsModeConfig(h),f=()=>w().then(at.loadConfigsForDefaultMode),s=et.getRuntimeConfig(h);gt.emitWarningIfUnsupportedVersion(process.version);let $={profile:h?.profile};return{...s,...h,runtime:"node",defaultsMode:w,bodyLengthChecker:h?.bodyLengthChecker??_t.calculateBodyLength,defaultUserAgentProvider:h?.defaultUserAgentProvider??oK.createDefaultUserAgentProvider({serviceId:s.serviceId,clientVersion:ct.default.version}),maxAttempts:h?.maxAttempts??Zs.loadConfig(uK.NODE_MAX_ATTEMPT_CONFIG_OPTIONS,h),region:h?.region??Zs.loadConfig(FE.NODE_REGION_CONFIG_OPTIONS,{...FE.NODE_REGION_CONFIG_FILE_OPTIONS,...$}),requestHandler:tK.NodeHttpHandler.create(h?.requestHandler??f),retryMode:h?.retryMode??Zs.loadConfig({...uK.NODE_RETRY_MODE_CONFIG_OPTIONS,default:async()=>(await f()).retryMode||nt.DEFAULT_RETRY_MODE},h),sha256:h?.sha256??xt.Hash.bind(null,"sha256"),streamCollector:h?.streamCollector??tK.streamCollector,useDualstackEndpoint:h?.useDualstackEndpoint??Zs.loadConfig(FE.NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS,$),useFipsEndpoint:h?.useFipsEndpoint??Zs.loadConfig(FE.NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS,$),userAgentAppId:h?.userAgentAppId??Zs.loadConfig(oK.NODE_APP_ID_CONFIG_OPTIONS,$)}};hZ.getRuntimeConfig=ut});var EC=H((Tz0,FZ)=>{var{defineProperty:CE,getOwnPropertyDescriptor:tt,getOwnPropertyNames:h00}=Object,w00=Object.prototype.hasOwnProperty,Kh=(h,w)=>CE(h,"name",{value:w,configurable:!0}),f00=(h,w)=>{for(var f in w)CE(h,f,{get:w[f],enumerable:!0})},s00=(h,w,f,s)=>{if(w&&typeof w==="object"||typeof w==="function"){for(let $ of h00(w))if(!w00.call(h,$)&&$!==f)CE(h,$,{get:()=>w[$],enumerable:!(s=tt(w,$))||s.enumerable})}return h},$00=(h)=>s00(CE({},"__esModule",{value:!0}),h),$Z={};f00($Z,{NODE_REGION_CONFIG_FILE_OPTIONS:()=>F00,NODE_REGION_CONFIG_OPTIONS:()=>U00,REGION_ENV_NAME:()=>EZ,REGION_INI_NAME:()=>TZ,getAwsRegionExtensionConfiguration:()=>E00,resolveAwsRegionExtensionConfiguration:()=>T00,resolveRegionConfig:()=>C00});FZ.exports=$00($Z);var E00=Kh((h)=>{return{setRegion(w){h.region=w},region(){return h.region}}},"getAwsRegionExtensionConfiguration"),T00=Kh((h)=>{return{region:h.region()}},"resolveAwsRegionExtensionConfiguration"),EZ="AWS_REGION",TZ="region",U00={environmentVariableSelector:Kh((h)=>h[EZ],"environmentVariableSelector"),configFileSelector:Kh((h)=>h[TZ],"configFileSelector"),default:Kh(()=>{throw new Error("Region is missing")},"default")},F00={preferredFile:"credentials"},UZ=Kh((h)=>typeof h==="string"&&(h.startsWith("fips-")||h.endsWith("-fips")),"isFipsRegion"),sZ=Kh((h)=>UZ(h)?["fips-aws-global","aws-fips"].includes(h)?"us-east-1":h.replace(/fips-(dkr-|prod-)?|-fips/,""):h,"getRealRegion"),C00=Kh((h)=>{let{region:w,useFipsEndpoint:f}=h;if(!w)throw new Error("Region is missing");return Object.assign(h,{region:Kh(async()=>{if(typeof w==="string")return sZ(w);let s=await w();return sZ(s)},"region"),useFipsEndpoint:Kh(async()=>{let s=typeof w==="string"?w:await w();if(UZ(s))return!0;return typeof f!=="function"?Promise.resolve(!!f):f()},"useFipsEndpoint")})},"resolveRegionConfig")});var FC=H((Uz0,yZ)=>{var{defineProperty:IE,getOwnPropertyDescriptor:I00,getOwnPropertyNames:G00}=Object,B00=Object.prototype.hasOwnProperty,w0=(h,w)=>IE(h,"name",{value:w,configurable:!0}),W00=(h,w)=>{for(var f in w)IE(h,f,{get:w[f],enumerable:!0})},L00=(h,w,f,s)=>{if(w&&typeof w==="object"||typeof w==="function"){for(let $ of G00(w))if(!B00.call(h,$)&&$!==f)IE(h,$,{get:()=>w[$],enumerable:!(s=I00(w,$))||s.enumerable})}return h},z00=(h)=>L00(IE({},"__esModule",{value:!0}),h),AZ={};W00(AZ,{$Command:()=>YZ.Command,AccessDeniedException:()=>SZ,AuthorizationPendingException:()=>rZ,CreateTokenCommand:()=>kZ,CreateTokenRequestFilterSensitiveLog:()=>MZ,CreateTokenResponseFilterSensitiveLog:()=>QZ,ExpiredTokenException:()=>KZ,InternalServerException:()=>ZZ,InvalidClientException:()=>JZ,InvalidGrantException:()=>VZ,InvalidRequestException:()=>PZ,InvalidScopeException:()=>HZ,SSOOIDC:()=>jZ,SSOOIDCClient:()=>XZ,SSOOIDCServiceException:()=>K1,SlowDownException:()=>NZ,UnauthorizedClientException:()=>DZ,UnsupportedGrantTypeException:()=>qZ,__Client:()=>RZ.Client});yZ.exports=z00(AZ);var CZ=F6(),A00=I6(),R00=B6(),IZ=v2(),X00=Ls(),TC=b0(),Y00=r6(),S00=Xs(),GZ=t$(),RZ=Z0(),BZ=d6(),r00=w0((h)=>{return Object.assign(h,{useDualstackEndpoint:h.useDualstackEndpoint??!1,useFipsEndpoint:h.useFipsEndpoint??!1,defaultSigningName:"sso-oauth"})},"resolveClientEndpointParameters"),M00={UseFIPS:{type:"builtInParams",name:"useFipsEndpoint"},Endpoint:{type:"builtInParams",name:"endpoint"},Region:{type:"builtInParams",name:"region"},UseDualStack:{type:"builtInParams",name:"useDualstackEndpoint"}},Q00=fZ(),WZ=EC(),LZ=u0(),zZ=Z0(),K00=w0((h)=>{let{httpAuthSchemes:w,httpAuthSchemeProvider:f,credentials:s}=h;return{setHttpAuthScheme($){let E=w.findIndex((T)=>T.schemeId===$.schemeId);if(E===-1)w.push($);else w.splice(E,1,$)},httpAuthSchemes(){return w},setHttpAuthSchemeProvider($){f=$},httpAuthSchemeProvider(){return f},setCredentials($){s=$},credentials(){return s}}},"getHttpAuthExtensionConfiguration"),Z00=w0((h)=>{return{httpAuthSchemes:h.httpAuthSchemes(),httpAuthSchemeProvider:h.httpAuthSchemeProvider(),credentials:h.credentials()}},"resolveHttpAuthRuntimeConfig"),J00=w0((h,w)=>{let f=Object.assign(WZ.getAwsRegionExtensionConfiguration(h),zZ.getDefaultExtensionConfiguration(h),LZ.getHttpHandlerExtensionConfiguration(h),K00(h));return w.forEach((s)=>s.configure(f)),Object.assign(h,WZ.resolveAwsRegionExtensionConfiguration(f),zZ.resolveDefaultRuntimeConfig(f),LZ.resolveHttpHandlerRuntimeConfig(f),Z00(f))},"resolveRuntimeExtensions"),XZ=class extends RZ.Client{static{w0(this,"SSOOIDCClient")}config;constructor(...[h]){let w=Q00.getRuntimeConfig(h||{});super(w);this.initConfig=w;let f=r00(w),s=IZ.resolveUserAgentConfig(f),$=GZ.resolveRetryConfig(s),E=X00.resolveRegionConfig($),T=CZ.resolveHostHeaderConfig(E),U=S00.resolveEndpointConfig(T),F=BZ.resolveHttpAuthSchemeConfig(U),C=J00(F,h?.extensions||[]);this.config=C,this.middlewareStack.use(IZ.getUserAgentPlugin(this.config)),this.middlewareStack.use(GZ.getRetryPlugin(this.config)),this.middlewareStack.use(Y00.getContentLengthPlugin(this.config)),this.middlewareStack.use(CZ.getHostHeaderPlugin(this.config)),this.middlewareStack.use(A00.getLoggerPlugin(this.config)),this.middlewareStack.use(R00.getRecursionDetectionPlugin(this.config)),this.middlewareStack.use(TC.getHttpAuthSchemeEndpointRuleSetPlugin(this.config,{httpAuthSchemeParametersProvider:BZ.defaultSSOOIDCHttpAuthSchemeParametersProvider,identityProviderConfigProvider:w0(async(I)=>new TC.DefaultIdentityProviderConfig({"aws.auth#sigv4":I.credentials}),"identityProviderConfigProvider")})),this.middlewareStack.use(TC.getHttpSigningPlugin(this.config))}destroy(){super.destroy()}},V00=Z0(),P00=Xs(),H00=Zf(),YZ=Z0(),Js=Z0(),N00=Z0(),K1=class h extends N00.ServiceException{static{w0(this,"SSOOIDCServiceException")}constructor(w){super(w);Object.setPrototypeOf(this,h.prototype)}},SZ=class h extends K1{static{w0(this,"AccessDeniedException")}name="AccessDeniedException";$fault="client";error;error_description;constructor(w){super({name:"AccessDeniedException",$fault:"client",...w});Object.setPrototypeOf(this,h.prototype),this.error=w.error,this.error_description=w.error_description}},rZ=class h extends K1{static{w0(this,"AuthorizationPendingException")}name="AuthorizationPendingException";$fault="client";error;error_description;constructor(w){super({name:"AuthorizationPendingException",$fault:"client",...w});Object.setPrototypeOf(this,h.prototype),this.error=w.error,this.error_description=w.error_description}},MZ=w0((h)=>({...h,...h.clientSecret&&{clientSecret:Js.SENSITIVE_STRING},...h.refreshToken&&{refreshToken:Js.SENSITIVE_STRING},...h.codeVerifier&&{codeVerifier:Js.SENSITIVE_STRING}}),"CreateTokenRequestFilterSensitiveLog"),QZ=w0((h)=>({...h,...h.accessToken&&{accessToken:Js.SENSITIVE_STRING},...h.refreshToken&&{refreshToken:Js.SENSITIVE_STRING},...h.idToken&&{idToken:Js.SENSITIVE_STRING}}),"CreateTokenResponseFilterSensitiveLog"),KZ=class h extends K1{static{w0(this,"ExpiredTokenException")}name="ExpiredTokenException";$fault="client";error;error_description;constructor(w){super({name:"ExpiredTokenException",$fault:"client",...w});Object.setPrototypeOf(this,h.prototype),this.error=w.error,this.error_description=w.error_description}},ZZ=class h extends K1{static{w0(this,"InternalServerException")}name="InternalServerException";$fault="server";error;error_description;constructor(w){super({name:"InternalServerException",$fault:"server",...w});Object.setPrototypeOf(this,h.prototype),this.error=w.error,this.error_description=w.error_description}},JZ=class h extends K1{static{w0(this,"InvalidClientException")}name="InvalidClientException";$fault="client";error;error_description;constructor(w){super({name:"InvalidClientException",$fault:"client",...w});Object.setPrototypeOf(this,h.prototype),this.error=w.error,this.error_description=w.error_description}},VZ=class h extends K1{static{w0(this,"InvalidGrantException")}name="InvalidGrantException";$fault="client";error;error_description;constructor(w){super({name:"InvalidGrantException",$fault:"client",...w});Object.setPrototypeOf(this,h.prototype),this.error=w.error,this.error_description=w.error_description}},PZ=class h extends K1{static{w0(this,"InvalidRequestException")}name="InvalidRequestException";$fault="client";error;error_description;constructor(w){super({name:"InvalidRequestException",$fault:"client",...w});Object.setPrototypeOf(this,h.prototype),this.error=w.error,this.error_description=w.error_description}},HZ=class h extends K1{static{w0(this,"InvalidScopeException")}name="InvalidScopeException";$fault="client";error;error_description;constructor(w){super({name:"InvalidScopeException",$fault:"client",...w});Object.setPrototypeOf(this,h.prototype),this.error=w.error,this.error_description=w.error_description}},NZ=class h extends K1{static{w0(this,"SlowDownException")}name="SlowDownException";$fault="client";error;error_description;constructor(w){super({name:"SlowDownException",$fault:"client",...w});Object.setPrototypeOf(this,h.prototype),this.error=w.error,this.error_description=w.error_description}},DZ=class h extends K1{static{w0(this,"UnauthorizedClientException")}name="UnauthorizedClientException";$fault="client";error;error_description;constructor(w){super({name:"UnauthorizedClientException",$fault:"client",...w});Object.setPrototypeOf(this,h.prototype),this.error=w.error,this.error_description=w.error_description}},qZ=class h extends K1{static{w0(this,"UnsupportedGrantTypeException")}name="UnsupportedGrantTypeException";$fault="client";error;error_description;constructor(w){super({name:"UnsupportedGrantTypeException",$fault:"client",...w});Object.setPrototypeOf(this,h.prototype),this.error=w.error,this.error_description=w.error_description}},UC=y0(),D00=b0(),_=Z0(),q00=w0(async(h,w)=>{let f=D00.requestBuilder(h,w),s={"content-type":"application/json"};f.bp("/token");let $;return $=JSON.stringify(_.take(h,{clientId:[],clientSecret:[],code:[],codeVerifier:[],deviceCode:[],grantType:[],redirectUri:[],refreshToken:[],scope:w0((E)=>_._json(E),"scope")})),f.m("POST").h(s).b($),f.build()},"se_CreateTokenCommand"),k00=w0(async(h,w)=>{if(h.statusCode!==200&&h.statusCode>=300)return j00(h,w);let f=_.map({$metadata:m1(h)}),s=_.expectNonNull(_.expectObject(await UC.parseJsonBody(h.body,w)),"body"),$=_.take(s,{accessToken:_.expectString,expiresIn:_.expectInt32,idToken:_.expectString,refreshToken:_.expectString,tokenType:_.expectString});return Object.assign(f,$),f},"de_CreateTokenCommand"),j00=w0(async(h,w)=>{let f={...h,body:await UC.parseJsonErrorBody(h.body,w)},s=UC.loadRestJsonErrorCode(h,f.body);switch(s){case"AccessDeniedException":case"com.amazonaws.ssooidc#AccessDeniedException":throw await O00(f,w);case"AuthorizationPendingException":case"com.amazonaws.ssooidc#AuthorizationPendingException":throw await l00(f,w);case"ExpiredTokenException":case"com.amazonaws.ssooidc#ExpiredTokenException":throw await v00(f,w);case"InternalServerException":case"com.amazonaws.ssooidc#InternalServerException":throw await b00(f,w);case"InvalidClientException":case"com.amazonaws.ssooidc#InvalidClientException":throw await m00(f,w);case"InvalidGrantException":case"com.amazonaws.ssooidc#InvalidGrantException":throw await d00(f,w);case"InvalidRequestException":case"com.amazonaws.ssooidc#InvalidRequestException":throw await i00(f,w);case"InvalidScopeException":case"com.amazonaws.ssooidc#InvalidScopeException":throw await c00(f,w);case"SlowDownException":case"com.amazonaws.ssooidc#SlowDownException":throw await g00(f,w);case"UnauthorizedClientException":case"com.amazonaws.ssooidc#UnauthorizedClientException":throw await x00(f,w);case"UnsupportedGrantTypeException":case"com.amazonaws.ssooidc#UnsupportedGrantTypeException":throw await _00(f,w);default:let $=f.body;return y00({output:h,parsedBody:$,errorCode:s})}},"de_CommandError"),y00=_.withBaseException(K1),O00=w0(async(h,w)=>{let f=_.map({}),s=h.body,$=_.take(s,{error:_.expectString,error_description:_.expectString});Object.assign(f,$);let E=new SZ({$metadata:m1(h),...f});return _.decorateServiceException(E,h.body)},"de_AccessDeniedExceptionRes"),l00=w0(async(h,w)=>{let f=_.map({}),s=h.body,$=_.take(s,{error:_.expectString,error_description:_.expectString});Object.assign(f,$);let E=new rZ({$metadata:m1(h),...f});return _.decorateServiceException(E,h.body)},"de_AuthorizationPendingExceptionRes"),v00=w0(async(h,w)=>{let f=_.map({}),s=h.body,$=_.take(s,{error:_.expectString,error_description:_.expectString});Object.assign(f,$);let E=new KZ({$metadata:m1(h),...f});return _.decorateServiceException(E,h.body)},"de_ExpiredTokenExceptionRes"),b00=w0(async(h,w)=>{let f=_.map({}),s=h.body,$=_.take(s,{error:_.expectString,error_description:_.expectString});Object.assign(f,$);let E=new ZZ({$metadata:m1(h),...f});return _.decorateServiceException(E,h.body)},"de_InternalServerExceptionRes"),m00=w0(async(h,w)=>{let f=_.map({}),s=h.body,$=_.take(s,{error:_.expectString,error_description:_.expectString});Object.assign(f,$);let E=new JZ({$metadata:m1(h),...f});return _.decorateServiceException(E,h.body)},"de_InvalidClientExceptionRes"),d00=w0(async(h,w)=>{let f=_.map({}),s=h.body,$=_.take(s,{error:_.expectString,error_description:_.expectString});Object.assign(f,$);let E=new VZ({$metadata:m1(h),...f});return _.decorateServiceException(E,h.body)},"de_InvalidGrantExceptionRes"),i00=w0(async(h,w)=>{let f=_.map({}),s=h.body,$=_.take(s,{error:_.expectString,error_description:_.expectString});Object.assign(f,$);let E=new PZ({$metadata:m1(h),...f});return _.decorateServiceException(E,h.body)},"de_InvalidRequestExceptionRes"),c00=w0(async(h,w)=>{let f=_.map({}),s=h.body,$=_.take(s,{error:_.expectString,error_description:_.expectString});Object.assign(f,$);let E=new HZ({$metadata:m1(h),...f});return _.decorateServiceException(E,h.body)},"de_InvalidScopeExceptionRes"),g00=w0(async(h,w)=>{let f=_.map({}),s=h.body,$=_.take(s,{error:_.expectString,error_description:_.expectString});Object.assign(f,$);let E=new NZ({$metadata:m1(h),...f});return _.decorateServiceException(E,h.body)},"de_SlowDownExceptionRes"),x00=w0(async(h,w)=>{let f=_.map({}),s=h.body,$=_.take(s,{error:_.expectString,error_description:_.expectString});Object.assign(f,$);let E=new DZ({$metadata:m1(h),...f});return _.decorateServiceException(E,h.body)},"de_UnauthorizedClientExceptionRes"),_00=w0(async(h,w)=>{let f=_.map({}),s=h.body,$=_.take(s,{error:_.expectString,error_description:_.expectString});Object.assign(f,$);let E=new qZ({$metadata:m1(h),...f});return _.decorateServiceException(E,h.body)},"de_UnsupportedGrantTypeExceptionRes"),m1=w0((h)=>({httpStatusCode:h.statusCode,requestId:h.headers["x-amzn-requestid"]??h.headers["x-amzn-request-id"]??h.headers["x-amz-request-id"],extendedRequestId:h.headers["x-amz-id-2"],cfId:h.headers["x-amz-cf-id"]}),"deserializeMetadata"),kZ=class extends YZ.Command.classBuilder().ep(M00).m(function(h,w,f,s){return[H00.getSerdePlugin(f,this.serialize,this.deserialize),P00.getEndpointPlugin(f,h.getEndpointParameterInstructions())]}).s("AWSSSOOIDCService","CreateToken",{}).n("SSOOIDCClient","CreateTokenCommand").f(MZ,QZ).ser(q00).de(k00).build(){static{w0(this,"CreateTokenCommand")}},n00={CreateTokenCommand:kZ},jZ=class extends XZ{static{w0(this,"SSOOIDC")}};V00.createAggregatedClient(n00,jZ)});var OZ=async(h,w={})=>{let{SSOOIDCClient:f}=await Promise.resolve().then(() => O(FC(),1));return new f(Object.assign({},w.clientConfig??{},{region:h??w.clientConfig?.region,logger:w.clientConfig?.logger??w.parentClientConfig?.logger}))};var lZ=async(h,w,f={})=>{let{CreateTokenCommand:s}=await Promise.resolve().then(() => O(FC(),1));return(await OZ(w,f)).send(new s({clientId:h.clientId,clientSecret:h.clientSecret,refreshToken:h.refreshToken,grantType:"refresh_token"}))};var vZ=()=>{};var bZ,CC=(h)=>{if(h.expiration&&h.expiration.getTime()<Date.now())throw new bZ.TokenProviderError(`Token is expired. ${Bs}`,!1)};var mZ=L(()=>{bZ=O(U0(),1)});var dZ,Pw=(h,w,f=!1)=>{if(typeof w==="undefined")throw new dZ.TokenProviderError(`Value not present for '${h}' in SSO Token${f?". Cannot refresh":""}. ${Bs}`,!1)};var iZ=L(()=>{dZ=O(U0(),1)});import{promises as e00}from"node:fs";var a00,cZ=(h,w)=>{let f=p5(h),s=JSON.stringify(w,null,2);return a00(f,s)};var gZ=L(()=>{t1();({writeFile:a00}=e00)});var Vs,xZ,_Z=(h={})=>async({callerClientConfig:w}={})=>{let f={...h,parentClientConfig:{...w,...h.parentClientConfig}};f.logger?.debug("@aws-sdk/token-providers - fromSso");let s=await Yw(f),$=q1({profile:f.profile??w?.profile}),E=s[$];if(!E)throw new Vs.TokenProviderError(`Profile '${$}' could not be found in shared credentials file.`,!1);else if(!E.sso_session)throw new Vs.TokenProviderError(`Profile '${$}' is missing required property 'sso_session'.`);let T=E.sso_session,F=(await h2(f))[T];if(!F)throw new Vs.TokenProviderError(`Sso session '${T}' could not be found in shared credentials file.`,!1);for(let Q of["sso_start_url","sso_region"])if(!F[Q])throw new Vs.TokenProviderError(`Sso session '${T}' is missing required property '${Q}'.`,!1);let{sso_start_url:C,sso_region:I}=F,G;try{G=await o5(T)}catch(Q){throw new Vs.TokenProviderError(`The SSO session token associated with profile=${$} was not found or is invalid. ${Bs}`,!1)}Pw("accessToken",G.accessToken),Pw("expiresAt",G.expiresAt);let{accessToken:B,expiresAt:z}=G,Y={token:B,expiration:new Date(z)};if(Y.expiration.getTime()-Date.now()>zr)return Y;if(Date.now()-xZ.getTime()<30000)return CC(Y),Y;Pw("clientId",G.clientId,!0),Pw("clientSecret",G.clientSecret,!0),Pw("refreshToken",G.refreshToken,!0);try{xZ.setTime(Date.now());let Q=await lZ(G,I,f);Pw("accessToken",Q.accessToken),Pw("expiresIn",Q.expiresIn);let M=new Date(Date.now()+Q.expiresIn*1000);try{await cZ(T,{...G,accessToken:Q.accessToken,expiresAt:M.toISOString(),refreshToken:Q.refreshToken})}catch(q){}return{token:Q.accessToken,expiration:M}}catch(Q){return CC(Y),Y}};var nZ=L(()=>{Vs=O(U0(),1);t1();vZ();mZ();iZ();gZ();xZ=new Date(0)});var p00;var eZ=L(()=>{p00=O(U0(),1)});var IC;var aZ=L(()=>{IC=O(U0(),1)});var pZ=L(()=>{nZ();eZ();aZ()});function o00(h){return{schemeId:"aws.auth#sigv4",signingProperties:{name:"awsssoportal",region:h.region},propertiesExtractor:(w,f)=>({signingProperties:{config:w,context:f}})}}function GE(h){return{schemeId:"smithy.api#noAuth"}}var oZ,uZ=async(h,w,f)=>{return{operation:zw(w).operation,region:await W1(h.region)()||(()=>{throw new Error("expected `region` to be configured for `aws.auth#sigv4`")})()}},tZ=(h)=>{let w=[];switch(h.operation){case"GetRoleCredentials":{w.push(GE(h));break}case"ListAccountRoles":{w.push(GE(h));break}case"ListAccounts":{w.push(GE(h));break}case"Logout":{w.push(GE(h));break}default:w.push(o00(h))}return w},hJ=(h)=>{let w=oZ.resolveAwsSdkSigV4Config(h);return Object.assign(w,{})};var GC=L(()=>{oZ=O(y0(),1);mh()});var wJ=(h)=>{return Object.assign(h,{useDualstackEndpoint:h.useDualstackEndpoint??!1,useFipsEndpoint:h.useFipsEndpoint??!1,defaultSigningName:"awsssoportal"})},Hw;var Ps=L(()=>{Hw={UseFIPS:{type:"builtInParams",name:"useFipsEndpoint"},Endpoint:{type:"builtInParams",name:"endpoint"},Region:{type:"builtInParams",name:"region"},UseDualStack:{type:"builtInParams",name:"useDualstackEndpoint"}}});var sJ;var fJ=L(()=>{sJ={name:"@aws-sdk/client-sso",description:"AWS SDK for JavaScript Sso Client for Node.js, Browser and React Native",version:"3.777.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.775.0","@aws-sdk/middleware-host-header":"3.775.0","@aws-sdk/middleware-logger":"3.775.0","@aws-sdk/middleware-recursion-detection":"3.775.0","@aws-sdk/middleware-user-agent":"3.775.0","@aws-sdk/region-config-resolver":"3.775.0","@aws-sdk/types":"3.775.0","@aws-sdk/util-endpoints":"3.775.0","@aws-sdk/util-user-agent-browser":"3.775.0","@aws-sdk/util-user-agent-node":"3.775.0","@smithy/config-resolver":"^4.1.0","@smithy/core":"^3.2.0","@smithy/fetch-http-handler":"^5.0.2","@smithy/hash-node":"^4.0.2","@smithy/invalid-dependency":"^4.0.2","@smithy/middleware-content-length":"^4.0.2","@smithy/middleware-endpoint":"^4.1.0","@smithy/middleware-retry":"^4.1.0","@smithy/middleware-serde":"^4.0.3","@smithy/middleware-stack":"^4.0.2","@smithy/node-config-provider":"^4.0.2","@smithy/node-http-handler":"^4.0.4","@smithy/protocol-http":"^5.1.0","@smithy/smithy-client":"^4.2.0","@smithy/types":"^4.2.0","@smithy/url-parser":"^4.0.2","@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.8","@smithy/util-defaults-mode-node":"^4.0.8","@smithy/util-endpoints":"^3.0.2","@smithy/util-middleware":"^4.0.2","@smithy/util-retry":"^4.0.2","@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 BC;var WC=L(()=>{BC={isCrtAvailable:!1}});var $J=()=>{if(BC.isCrtAvailable)return["md/crt-avail"];return null};var EJ=L(()=>{WC()});import{platform as t00,release as h10}from"node:os";import{env as TJ,versions as w10}from"node:process";var Hs=({serviceId:h,clientVersion:w})=>{return async(f)=>{let s=[["aws-sdk-js",w],["ua","2.1"],[`os/${t00()}`,h10()],["lang/js"],["md/nodejs",`${w10.node}`]],$=$J();if($)s.push($);if(h)s.push([`api/${h}`,w]);if(TJ.AWS_EXECUTION_ENV)s.push([`exec-env/${TJ.AWS_EXECUTION_ENV}`]);let E=await f?.userAgentAppId?.();return E?[...s,[`app/${E}`]]:[...s]}};var UJ=L(()=>{EJ();WC()});var f10="AWS_SDK_UA_APP_ID",s10="sdk_ua_app_id",$10="sdk-ua-app-id",Ns;var FJ=L(()=>{D$();Ns={environmentVariableSelector:(h)=>h[f10],configFileSelector:(h)=>h[s10]??h[$10],default:CF}});var BE=L(()=>{UJ();FJ()});var CJ=(h)=>typeof ArrayBuffer==="function"&&h instanceof ArrayBuffer||Object.prototype.toString.call(h)==="[object ArrayBuffer]";import{Buffer as LC}from"node:buffer";var zC=(h,w=0,f=h.byteLength-w)=>{if(!CJ(h))throw new TypeError(`The "input" argument must be ArrayBuffer. Received type ${typeof h} (${h})`);return LC.from(h,w,f)},IJ=(h,w)=>{if(typeof h!=="string")throw new TypeError(`The "input" argument must be of type string. Received type ${typeof h} (${h})`);return w?LC.from(h,w):LC.from(h)};var GJ=()=>{};import{Buffer as E10}from"node:buffer";import{createHash as T10,createHmac as U10}from"node:crypto";class sf{constructor(h,w){this.algorithmIdentifier=h,this.secret=w,this.reset()}update(h,w){this.hash.update(WJ.toUint8Array(BJ(h,w)))}digest(){return Promise.resolve(this.hash.digest())}reset(){this.hash=this.secret?U10(this.algorithmIdentifier,BJ(this.secret)):T10(this.algorithmIdentifier)}}function BJ(h,w){if(E10.isBuffer(h))return h;if(typeof h==="string")return IJ(h,w);if(ArrayBuffer.isView(h))return zC(h.buffer,h.byteOffset,h.byteLength);return zC(h)}var WJ;var WE=L(()=>{GJ();WJ=O(I1(),1)});import{fstatSync as F10,lstatSync as C10}from"node:fs";var Ds=(h)=>{if(!h)return 0;if(typeof h==="string")return Buffer.byteLength(h);else if(typeof h.byteLength==="number")return h.byteLength;else if(typeof h.size==="number")return h.size;else if(typeof h.start==="number"&&typeof h.end==="number")return h.end+1-h.start;else if(typeof h.path==="string"||Buffer.isBuffer(h.path))return C10(h.path).size;else if(typeof h.fd==="number")return F10(h.fd).size;throw new Error(`Body Length computation failed for ${h}`)};var LJ=()=>{};var LE=L(()=>{LJ()});var zJ,AJ,RJ,QJ,KJ,d1,XJ,ZJ,YJ,SJ,rJ,MJ,I10,JJ;var VJ=L(()=>{zJ={["required"]:!1,type:"String"},AJ={["required"]:!0,default:!1,type:"Boolean"},RJ={["ref"]:"Endpoint"},QJ={["fn"]:"booleanEquals",["argv"]:[{["ref"]:"UseFIPS"},!0]},KJ={["fn"]:"booleanEquals",["argv"]:[{["ref"]:"UseDualStack"},!0]},d1={},XJ={["fn"]:"getAttr",["argv"]:[{["ref"]:"PartitionResult"},"supportsFIPS"]},ZJ={["ref"]:"PartitionResult"},YJ={["fn"]:"booleanEquals",["argv"]:[!0,{["fn"]:"getAttr",["argv"]:[ZJ,"supportsDualStack"]}]},SJ=[QJ],rJ=[KJ],MJ=[{["ref"]:"Region"}],I10={version:"1.0",parameters:{Region:zJ,UseDualStack:AJ,UseFIPS:AJ,Endpoint:zJ},rules:[{conditions:[{["fn"]:"isSet",["argv"]:[RJ]}],rules:[{conditions:SJ,error:"Invalid Configuration: FIPS and custom endpoint are not supported",type:"error"},{conditions:rJ,error:"Invalid Configuration: Dualstack and custom endpoint are not supported",type:"error"},{endpoint:{url:RJ,properties:d1,headers:d1},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,XJ]},YJ],rules:[{endpoint:{url:"https://portal.sso-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:d1,headers:d1},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"]:[XJ,!0]}],rules:[{conditions:[{["fn"]:"stringEquals",["argv"]:[{["fn"]:"getAttr",["argv"]:[ZJ,"name"]},"aws-us-gov"]}],endpoint:{url:"https://portal.sso.{Region}.amazonaws.com",properties:d1,headers:d1},type:"endpoint"},{endpoint:{url:"https://portal.sso-fips.{Region}.{PartitionResult#dnsSuffix}",properties:d1,headers:d1},type:"endpoint"}],type:"tree"},{error:"FIPS is enabled but this partition does not support FIPS",type:"error"}],type:"tree"},{conditions:rJ,rules:[{conditions:[YJ],rules:[{endpoint:{url:"https://portal.sso.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:d1,headers:d1},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:d1,headers:d1},type:"endpoint"}],type:"tree"}],type:"tree"},{error:"Invalid Configuration: Missing Region",type:"error"}]},JJ=I10});var G10,PJ=(h,w={})=>{return G10.get(h,()=>iw(JJ,{endpointParams:h,logger:w.logger}))};var HJ=L(()=>{M$();bh();VJ();G10=new dw({size:50,params:["Endpoint","Region","UseDualStack","UseFIPS"]});o1.aws=cw});var NJ,DJ,zE,AE,qJ=(h)=>{return{apiVersion:"2019-06-10",base64Decoder:h?.base64Decoder??zE.fromBase64,base64Encoder:h?.base64Encoder??zE.toBase64,disableHostPrefix:h?.disableHostPrefix??!1,endpointProvider:h?.endpointProvider??PJ,extensions:h?.extensions??[],httpAuthSchemeProvider:h?.httpAuthSchemeProvider??tZ,httpAuthSchemes:h?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:(w)=>w.getIdentityProvider("aws.auth#sigv4"),signer:new NJ.AwsSdkSigV4Signer},{schemeId:"smithy.api#noAuth",identityProvider:(w)=>w.getIdentityProvider("smithy.api#noAuth")||(async()=>({})),signer:new DJ.NoAuthSigner}],logger:h?.logger??new ih,serviceId:h?.serviceId??"SSO",urlParser:h?.urlParser??j1,utf8Decoder:h?.utf8Decoder??AE.fromUtf8,utf8Encoder:h?.utf8Encoder??AE.toUtf8}};var kJ=L(()=>{NJ=O(y0(),1),DJ=O(b0(),1);J();_f();zE=O(p1(),1),AE=O(I1(),1);GC();HJ()});var jJ="AWS_EXECUTION_ENV",AC="AWS_REGION",RC="AWS_DEFAULT_REGION",yJ="AWS_EC2_METADATA_DISABLED",OJ,lJ="/latest/meta-data/placement/region";var vJ=L(()=>{OJ=["in-region","cross-region","mobile","standard","legacy"]});var bJ;var mJ=L(()=>{bJ={environmentVariableSelector:(h)=>{return h.AWS_DEFAULTS_MODE},configFileSelector:(h)=>{return h.defaults_mode},default:"legacy"}});var dJ,qs=({region:h=R0(Aw),defaultsMode:w=R0(bJ)}={})=>dJ.memoize(async()=>{let f=typeof w==="function"?await w():w;switch(f?.toLowerCase()){case"auto":return B10(h);case"in-region":case"cross-region":case"mobile":case"standard":case"legacy":return Promise.resolve(f?.toLocaleLowerCase());case void 0:return Promise.resolve("legacy");default:throw new Error(`Invalid parameter for "defaultsMode", expect ${OJ.join(", ")}, got ${f}`)}}),B10=async(h)=>{if(h){let w=typeof h==="function"?await h():h,f=await W10();if(!f)return"standard";if(w===f)return"in-region";else return"cross-region"}return"standard"},W10=async()=>{if(process.env[jJ]&&(process.env[AC]||process.env[RC]))return process.env[AC]??process.env[RC];if(!process.env[yJ])try{let{getInstanceMetadataEndpoint:h,httpRequest:w}=await Promise.resolve().then(() => (x$(),g$)),f=await h();return(await w({...f,path:lJ})).toString()}catch(h){}};var iJ=L(()=>{Rw();Sw();dJ=O(U0(),1);vJ();mJ()});var RE=L(()=>{iJ()});var cJ,gJ=(h)=>{Es(process.version);let w=qs(h),f=()=>w().then($s),s=qJ(h);cJ.emitWarningIfUnsupportedVersion(process.version);let $={profile:h?.profile};return{...s,...h,runtime:"node",defaultsMode:w,bodyLengthChecker:h?.bodyLengthChecker??Ds,defaultUserAgentProvider:h?.defaultUserAgentProvider??Hs({serviceId:s.serviceId,clientVersion:sJ.version}),maxAttempts:h?.maxAttempts??R0(of,h),region:h?.region??R0(Aw,{...mf,...$}),requestHandler:sh.create(h?.requestHandler??f),retryMode:h?.retryMode??R0({...tf,default:async()=>(await f()).retryMode||rw},h),sha256:h?.sha256??sf.bind(null,"sha256"),streamCollector:h?.streamCollector??Gs,useDualstackEndpoint:h?.useDualstackEndpoint??R0(vf,$),useFipsEndpoint:h?.useFipsEndpoint??R0(bf,$),userAgentAppId:h?.userAgentAppId??R0(Ns,$)}};var xJ=L(()=>{fJ();cJ=O(y0(),1);BE();Rw();WE();hf();Sw();_$();LE();hh();kJ();J();RE();J()});var ks=(h)=>{return{setRegion(w){h.region=w},region(){return h.region}}},js=(h)=>{return{region:h.region()}};var _J=()=>{};var nJ=()=>{};var eJ=L(()=>{nJ()});var aJ=L(()=>{_J();eJ()});var XE=L(()=>{aJ()});var pJ=(h)=>{let{httpAuthSchemes:w,httpAuthSchemeProvider:f,credentials:s}=h;return{setHttpAuthScheme($){let E=w.findIndex((T)=>T.schemeId===$.schemeId);if(E===-1)w.push($);else w.splice(E,1,$)},httpAuthSchemes(){return w},setHttpAuthSchemeProvider($){f=$},httpAuthSchemeProvider(){return f},setCredentials($){s=$},credentials(){return s}}},oJ=(h)=>{return{httpAuthSchemes:h.httpAuthSchemes(),httpAuthSchemeProvider:h.httpAuthSchemeProvider(),credentials:h.credentials()}};var uJ=(h,w)=>{let f=Object.assign(ks(h),Ts(h),Yf(h),pJ(h));return w.forEach((s)=>s.configure(f)),Object.assign(h,js(f),Us(f),Sf(f),oJ(f))};var tJ=L(()=>{XE();C1();J()});var ys,_h;var f4=L(()=>{p4();o4();u4();D$();Rw();ys=O(b0(),1);e5();D();hf();J();GC();Ps();xJ();tJ();_h=class _h extends uw{config;constructor(...[h]){let w=gJ(h||{});super(w);this.initConfig=w;let f=wJ(w),s=Hf(f),$=uf(s),E=df($),T=rf(E),U=nf(T),F=hJ(U),C=uJ(F,h?.extensions||[]);this.config=C,this.middlewareStack.use(Of(this.config)),this.middlewareStack.use(Cs(this.config)),this.middlewareStack.use(cf(this.config)),this.middlewareStack.use(Mf(this.config)),this.middlewareStack.use(Qf(this.config)),this.middlewareStack.use(Kf(this.config)),this.middlewareStack.use(ys.getHttpAuthSchemeEndpointRuleSetPlugin(this.config,{httpAuthSchemeParametersProvider:uZ,identityProviderConfigProvider:async(I)=>new ys.DefaultIdentityProviderConfig({"aws.auth#sigv4":I.credentials})})),this.middlewareStack.use(ys.getHttpSigningPlugin(this.config))}destroy(){super.destroy()}}});var nh;var XC=L(()=>{J();nh=class nh extends fh{constructor(h){super(h);Object.setPrototypeOf(this,nh.prototype)}}});var YE,SE,rE,ME,hV=(h)=>({...h,...h.accessToken&&{accessToken:F0}}),z10=(h)=>({...h,...h.secretAccessKey&&{secretAccessKey:F0},...h.sessionToken&&{sessionToken:F0}}),wV=(h)=>({...h,...h.roleCredentials&&{roleCredentials:z10(h.roleCredentials)}}),fV=(h)=>({...h,...h.accessToken&&{accessToken:F0}}),sV=(h)=>({...h,...h.accessToken&&{accessToken:F0}}),$V=(h)=>({...h,...h.accessToken&&{accessToken:F0}});var $f=L(()=>{J();XC();YE=class YE extends nh{name="InvalidRequestException";$fault="client";constructor(h){super({name:"InvalidRequestException",$fault:"client",...h});Object.setPrototypeOf(this,YE.prototype)}};SE=class SE extends nh{name="ResourceNotFoundException";$fault="client";constructor(h){super({name:"ResourceNotFoundException",$fault:"client",...h});Object.setPrototypeOf(this,SE.prototype)}};rE=class rE extends nh{name="TooManyRequestsException";$fault="client";constructor(h){super({name:"TooManyRequestsException",$fault:"client",...h});Object.setPrototypeOf(this,rE.prototype)}};ME=class ME extends nh{name="UnauthorizedException";$fault="client";constructor(h){super({name:"UnauthorizedException",$fault:"client",...h});Object.setPrototypeOf(this,ME.prototype)}}});var Nw,s4,EV=async(h,w)=>{let f=s4.requestBuilder(h,w),s=r({},m$,{[ZE]:h[KE]});f.bp("/federation/credentials");let $=r({[M10]:[,y(h[r10],"roleName")],[LV]:[,y(h[WV],"accountId")]}),E;return f.m("GET").h(s).q($).b(E),f.build()},TV=async(h,w)=>{let f=s4.requestBuilder(h,w),s=r({},m$,{[ZE]:h[KE]});f.bp("/assignment/roles");let $=r({[XV]:[,h[RV]],[AV]:[()=>h.maxResults!==void 0,()=>h[zV].toString()],[LV]:[,y(h[WV],"accountId")]}),E;return f.m("GET").h(s).q($).b(E),f.build()},UV=async(h,w)=>{let f=s4.requestBuilder(h,w),s=r({},m$,{[ZE]:h[KE]});f.bp("/assignment/accounts");let $=r({[XV]:[,h[RV]],[AV]:[()=>h.maxResults!==void 0,()=>h[zV].toString()]}),E;return f.m("GET").h(s).q($).b(E),f.build()},FV=async(h,w)=>{let f=s4.requestBuilder(h,w),s=r({},m$,{[ZE]:h[KE]});f.bp("/logout");let $;return f.m("POST").h(s).b($),f.build()},CV=async(h,w)=>{if(h.statusCode!==200&&h.statusCode>=300)return QE(h,w);let f=r({$metadata:Dw(h)}),s=y(x(await Nw.parseJsonBody(h.body,w)),"body"),$=H0(s,{roleCredentials:b});return Object.assign(f,$),f},IV=async(h,w)=>{if(h.statusCode!==200&&h.statusCode>=300)return QE(h,w);let f=r({$metadata:Dw(h)}),s=y(x(await Nw.parseJsonBody(h.body,w)),"body"),$=H0(s,{nextToken:W,roleList:b});return Object.assign(f,$),f},GV=async(h,w)=>{if(h.statusCode!==200&&h.statusCode>=300)return QE(h,w);let f=r({$metadata:Dw(h)}),s=y(x(await Nw.parseJsonBody(h.body,w)),"body"),$=H0(s,{accountList:b,nextToken:W});return Object.assign(f,$),f},BV=async(h,w)=>{if(h.statusCode!==200&&h.statusCode>=300)return QE(h,w);let f=r({$metadata:Dw(h)});return await L1.collectBody(h.body,w),f},QE=async(h,w)=>{let f={...h,body:await Nw.parseJsonErrorBody(h.body,w)},s=Nw.loadRestJsonErrorCode(h,f.body);switch(s){case"InvalidRequestException":case"com.amazonaws.sso#InvalidRequestException":throw await R10(f,w);case"ResourceNotFoundException":case"com.amazonaws.sso#ResourceNotFoundException":throw await X10(f,w);case"TooManyRequestsException":case"com.amazonaws.sso#TooManyRequestsException":throw await Y10(f,w);case"UnauthorizedException":case"com.amazonaws.sso#UnauthorizedException":throw await S10(f,w);default:let $=f.body;return A10({output:h,parsedBody:$,errorCode:s})}},A10,R10=async(h,w)=>{let f=r({}),s=h.body,$=H0(s,{message:W});Object.assign(f,$);let E=new YE({$metadata:Dw(h),...f});return v(E,h.body)},X10=async(h,w)=>{let f=r({}),s=h.body,$=H0(s,{message:W});Object.assign(f,$);let E=new SE({$metadata:Dw(h),...f});return v(E,h.body)},Y10=async(h,w)=>{let f=r({}),s=h.body,$=H0(s,{message:W});Object.assign(f,$);let E=new rE({$metadata:Dw(h),...f});return v(E,h.body)},S10=async(h,w)=>{let f=r({}),s=h.body,$=H0(s,{message:W});Object.assign(f,$);let E=new ME({$metadata:Dw(h),...f});return v(E,h.body)},Dw=(h)=>({httpStatusCode:h.statusCode,requestId:h.headers["x-amzn-requestid"]??h.headers["x-amzn-request-id"]??h.headers["x-amz-request-id"],extendedRequestId:h.headers["x-amz-id-2"],cfId:h.headers["x-amz-cf-id"]}),WV="accountId",KE="accessToken",LV="account_id",zV="maxResults",AV="max_result",RV="nextToken",XV="next_token",r10="roleName",M10="role_name",ZE="x-amz-sso_bearer_token";var $4=L(()=>{Nw=O(y0(),1),s4=O(b0(),1);J();$f();XC();A10=ss(nh)});var E4;var YC=L(()=>{D();k();J();Ps();$f();$4();E4=class E4 extends A.classBuilder().ep(Hw).m(function(h,w,f,s){return[R(f,this.serialize,this.deserialize),X(f,h.getEndpointParameterInstructions())]}).s("SWBPortalService","GetRoleCredentials",{}).n("SSOClient","GetRoleCredentialsCommand").f(hV,wV).ser(EV).de(CV).build(){}});var T4;var JE=L(()=>{D();k();J();Ps();$f();$4();T4=class T4 extends A.classBuilder().ep(Hw).m(function(h,w,f,s){return[R(f,this.serialize,this.deserialize),X(f,h.getEndpointParameterInstructions())]}).s("SWBPortalService","ListAccountRoles",{}).n("SSOClient","ListAccountRolesCommand").f(fV,void 0).ser(TV).de(IV).build(){}});var U4;var VE=L(()=>{D();k();J();Ps();$f();$4();U4=class U4 extends A.classBuilder().ep(Hw).m(function(h,w,f,s){return[R(f,this.serialize,this.deserialize),X(f,h.getEndpointParameterInstructions())]}).s("SWBPortalService","ListAccounts",{}).n("SSOClient","ListAccountsCommand").f(sV,void 0).ser(UV).de(GV).build(){}});var SC;var rC=L(()=>{D();k();J();Ps();$f();$4();SC=class SC extends A.classBuilder().ep(Hw).m(function(h,w,f,s){return[R(f,this.serialize,this.deserialize),X(f,h.getEndpointParameterInstructions())]}).s("SWBPortalService","Logout",{}).n("SSOClient","LogoutCommand").f($V,void 0).ser(FV).de(BV).build(){}});var Q10,YV;var SV=L(()=>{J();YC();JE();VE();rC();f4();Q10={GetRoleCredentialsCommand:E4,ListAccountRolesCommand:T4,ListAccountsCommand:U4,LogoutCommand:SC};YV=class YV extends _h{};ws(Q10,YV)});var rV=L(()=>{YC();JE();VE();rC()});var MV=()=>{};var QV,SR0;var KV=L(()=>{QV=O(b0(),1);JE();f4();SR0=QV.createPaginator(_h,T4,"nextToken","nextToken","maxResults")});var ZV,KR0;var JV=L(()=>{ZV=O(b0(),1);VE();f4();KR0=ZV.createPaginator(_h,U4,"nextToken","nextToken","maxResults")});var VV=L(()=>{MV();KV();JV()});var PV=L(()=>{$f()});var HV=L(()=>{f4();SV();rV();VV();PV()});var NV={};Ew(NV,{SSOClient:()=>_h,GetRoleCredentialsCommand:()=>E4});var DV=L(()=>{HV()});var MC,Os,F4=!1,QC=async({ssoStartUrl:h,ssoSession:w,ssoAccountId:f,ssoRegion:s,ssoRoleName:$,ssoClient:E,clientConfig:T,parentClientConfig:U,profile:F,logger:C})=>{let I,G="To refresh this SSO session run aws sso login with the corresponding profile.";if(w)try{let Y0=await _Z({profile:F})();I={accessToken:Y0.token,expiresAt:new Date(Y0.expiration).toISOString()}}catch(Y0){throw new Os.CredentialsProviderError(Y0.message,{tryNextLink:F4,logger:C})}else try{I=await o5(h)}catch(Y0){throw new Os.CredentialsProviderError("The SSO session associated with this profile is invalid. To refresh this SSO session run aws sso login with the corresponding profile.",{tryNextLink:F4,logger:C})}if(new Date(I.expiresAt).getTime()-Date.now()<=0)throw new Os.CredentialsProviderError("The SSO session associated with this profile has expired. To refresh this SSO session run aws sso login with the corresponding profile.",{tryNextLink:F4,logger:C});let{accessToken:B}=I,{SSOClient:z,GetRoleCredentialsCommand:Y}=await Promise.resolve().then(() => (DV(),NV)),Q=E||new z(Object.assign({},T??{},{logger:T?.logger??U?.logger,region:T?.region??s})),M;try{M=await Q.send(new Y({accountId:f,roleName:$,accessToken:B}))}catch(Y0){throw new Os.CredentialsProviderError(Y0,{tryNextLink:F4,logger:C})}let{roleCredentials:{accessKeyId:q,secretAccessKey:N,sessionToken:j,expiration:e,credentialScope:B0,accountId:v0}={}}=M;if(!q||!N||!j||!e)throw new Os.CredentialsProviderError("SSO returns an invalid temporary credential.",{tryNextLink:F4,logger:C});let $1={accessKeyId:q,secretAccessKey:N,sessionToken:j,expiration:new Date(e),...B0&&{credentialScope:B0},...v0&&{accountId:v0}};if(w)MC.setCredentialFeature($1,"CREDENTIALS_SSO","s");else MC.setCredentialFeature($1,"CREDENTIALS_SSO_LEGACY","u");return $1};var qV=L(()=>{MC=O(G1(),1);pZ();Os=O(U0(),1);t1()});var kV,KC=(h,w)=>{let{sso_start_url:f,sso_account_id:s,sso_region:$,sso_role_name:E}=h;if(!f||!s||!$||!E)throw new kV.CredentialsProviderError(`Profile is configured with invalid SSO credentials. Required parameters "sso_account_id", "sso_region", "sso_role_name", "sso_start_url". Got ${Object.keys(h).join(", ")}
|
|
51
|
-
Reference: https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-sso.html`,{tryNextLink:!1,logger:w});return h};var ZC=L(()=>{kV=O(U0(),1)});var ls,K10=(h={})=>async({callerClientConfig:w}={})=>{h.logger?.debug("@aws-sdk/credential-provider-sso - fromSSO");let{ssoStartUrl:f,ssoAccountId:s,ssoRegion:$,ssoRoleName:E,ssoSession:T}=h,{ssoClient:U}=h,F=q1({profile:h.profile??w?.profile});if(!f&&!s&&!$&&!E&&!T){let I=(await Yw(h))[F];if(!I)throw new ls.CredentialsProviderError(`Profile ${F} was not found.`,{logger:h.logger});if(!U6(I))throw new ls.CredentialsProviderError(`Profile ${F} is not configured with SSO credentials.`,{logger:h.logger});if(I?.sso_session){let q=(await h2(h))[I.sso_session],N=` configurations in profile ${F} and sso-session ${I.sso_session}`;if($&&$!==q.sso_region)throw new ls.CredentialsProviderError("Conflicting SSO region"+N,{tryNextLink:!1,logger:h.logger});if(f&&f!==q.sso_start_url)throw new ls.CredentialsProviderError("Conflicting SSO start_url"+N,{tryNextLink:!1,logger:h.logger});I.sso_region=q.sso_region,I.sso_start_url=q.sso_start_url}let{sso_start_url:G,sso_account_id:B,sso_region:z,sso_role_name:Y,sso_session:Q}=KC(I,h.logger);return QC({ssoStartUrl:G,ssoSession:Q,ssoAccountId:B,ssoRegion:z,ssoRoleName:Y,ssoClient:U,clientConfig:h.clientConfig,parentClientConfig:h.parentClientConfig,profile:F})}else if(!f||!s||!$||!E)throw new ls.CredentialsProviderError('Incomplete configuration. The fromSSO() argument hash must include "ssoStartUrl", "ssoAccountId", "ssoRegion", "ssoRoleName"',{tryNextLink:!1,logger:h.logger});else return QC({ssoStartUrl:f,ssoSession:T,ssoAccountId:s,ssoRegion:$,ssoRoleName:E,ssoClient:U,clientConfig:h.clientConfig,parentClientConfig:h.parentClientConfig,profile:F})};var jV=L(()=>{ls=O(U0(),1);t1();qV();ZC()});var yV=()=>{};var JC={};Ew(JC,{validateSsoProfile:()=>KC,isSsoProfile:()=>U6,fromSSO:()=>K10});var VC=L(()=>{jV();yV();ZC()});var OV,PE,lV=(h,w,f)=>{let s={EcsContainer:async($)=>{let{fromHttp:E}=await Promise.resolve().then(() => (T6(),E6)),{fromContainerMetadata:T}=await Promise.resolve().then(() => (x$(),g$));return f?.debug("@aws-sdk/credential-provider-ini - credential_source is EcsContainer"),async()=>PE.chain(E($??{}),T($))().then(PC)},Ec2InstanceMetadata:async($)=>{f?.debug("@aws-sdk/credential-provider-ini - credential_source is Ec2InstanceMetadata");let{fromInstanceMetadata:E}=await Promise.resolve().then(() => (x$(),g$));return async()=>E($)().then(PC)},Environment:async($)=>{f?.debug("@aws-sdk/credential-provider-ini - credential_source is Environment");let{fromEnv:E}=await Promise.resolve().then(() => (g3(),rS));return async()=>E($)().then(PC)}};if(h in s)return s[h];else throw new PE.CredentialsProviderError(`Unsupported credential source in profile ${w}. Got ${h}, expected EcsContainer or Ec2InstanceMetadata or Environment.`,{logger:f})},PC=(h)=>OV.setCredentialFeature(h,"CREDENTIALS_PROFILE_NAMED_PROVIDER","p");var vV=L(()=>{OV=O(G1(),1),PE=O(U0(),1)});var HC=H((mV)=>{Object.defineProperty(mV,"__esModule",{value:!0});mV.resolveHttpAuthSchemeConfig=mV.resolveStsAuthConfig=mV.defaultSTSHttpAuthSchemeProvider=mV.defaultSTSHttpAuthSchemeParametersProvider=void 0;var Z10=y0(),bV=Tw(),J10=C4(),V10=async(h,w,f)=>{return{operation:bV.getSmithyContext(w).operation,region:await bV.normalizeProvider(h.region)()||(()=>{throw new Error("expected `region` to be configured for `aws.auth#sigv4`")})()}};mV.defaultSTSHttpAuthSchemeParametersProvider=V10;function P10(h){return{schemeId:"aws.auth#sigv4",signingProperties:{name:"sts",region:h.region},propertiesExtractor:(w,f)=>({signingProperties:{config:w,context:f}})}}function H10(h){return{schemeId:"smithy.api#noAuth"}}var N10=(h)=>{let w=[];switch(h.operation){case"AssumeRoleWithWebIdentity":{w.push(H10(h));break}default:w.push(P10(h))}return w};mV.defaultSTSHttpAuthSchemeProvider=N10;var D10=(h)=>Object.assign(h,{stsClientCtor:J10.STSClient});mV.resolveStsAuthConfig=D10;var q10=(h)=>{let w=mV.resolveStsAuthConfig(h),f=Z10.resolveAwsSdkSigV4Config(w);return Object.assign(f,{})};mV.resolveHttpAuthSchemeConfig=q10});var I4=H((cV)=>{Object.defineProperty(cV,"__esModule",{value:!0});cV.commonParams=cV.resolveClientEndpointParameters=void 0;var y10=(h)=>{return Object.assign(h,{useDualstackEndpoint:h.useDualstackEndpoint??!1,useFipsEndpoint:h.useFipsEndpoint??!1,useGlobalEndpoint:h.useGlobalEndpoint??!1,defaultSigningName:"sts"})};cV.resolveClientEndpointParameters=y10;cV.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((BP)=>{Object.defineProperty(BP,"__esModule",{value:!0});BP.ruleSet=void 0;var fP="required",u="type",z0="fn",A0="argv",kw="ref",xV=!1,NC=!0,qw="booleanEquals",w1="stringEquals",sP="sigv4",$P="sts",EP="us-east-1",N0="endpoint",_V="https://sts.{Region}.{PartitionResult#dnsSuffix}",Zh="tree",vs="error",qC="getAttr",nV={[fP]:!1,[u]:"String"},DC={[fP]:!0,default:!1,[u]:"Boolean"},TP={[kw]:"Endpoint"},eV={[z0]:"isSet",[A0]:[{[kw]:"Region"}]},f1={[kw]:"Region"},aV={[z0]:"aws.partition",[A0]:[f1],assign:"PartitionResult"},UP={[kw]:"UseFIPS"},FP={[kw]:"UseDualStack"},T1={url:"https://sts.amazonaws.com",properties:{authSchemes:[{name:sP,signingName:$P,signingRegion:EP}]},headers:{}},Z1={},pV={conditions:[{[z0]:w1,[A0]:[f1,"aws-global"]}],[N0]:T1,[u]:N0},CP={[z0]:qw,[A0]:[UP,!0]},IP={[z0]:qw,[A0]:[FP,!0]},oV={[z0]:qC,[A0]:[{[kw]:"PartitionResult"},"supportsFIPS"]},GP={[kw]:"PartitionResult"},uV={[z0]:qw,[A0]:[!0,{[z0]:qC,[A0]:[GP,"supportsDualStack"]}]},tV=[{[z0]:"isSet",[A0]:[TP]}],hP=[CP],wP=[IP],l10={version:"1.0",parameters:{Region:nV,UseDualStack:DC,UseFIPS:DC,Endpoint:nV,UseGlobalEndpoint:DC},rules:[{conditions:[{[z0]:qw,[A0]:[{[kw]:"UseGlobalEndpoint"},NC]},{[z0]:"not",[A0]:tV},eV,aV,{[z0]:qw,[A0]:[UP,xV]},{[z0]:qw,[A0]:[FP,xV]}],rules:[{conditions:[{[z0]:w1,[A0]:[f1,"ap-northeast-1"]}],endpoint:T1,[u]:N0},{conditions:[{[z0]:w1,[A0]:[f1,"ap-south-1"]}],endpoint:T1,[u]:N0},{conditions:[{[z0]:w1,[A0]:[f1,"ap-southeast-1"]}],endpoint:T1,[u]:N0},{conditions:[{[z0]:w1,[A0]:[f1,"ap-southeast-2"]}],endpoint:T1,[u]:N0},pV,{conditions:[{[z0]:w1,[A0]:[f1,"ca-central-1"]}],endpoint:T1,[u]:N0},{conditions:[{[z0]:w1,[A0]:[f1,"eu-central-1"]}],endpoint:T1,[u]:N0},{conditions:[{[z0]:w1,[A0]:[f1,"eu-north-1"]}],endpoint:T1,[u]:N0},{conditions:[{[z0]:w1,[A0]:[f1,"eu-west-1"]}],endpoint:T1,[u]:N0},{conditions:[{[z0]:w1,[A0]:[f1,"eu-west-2"]}],endpoint:T1,[u]:N0},{conditions:[{[z0]:w1,[A0]:[f1,"eu-west-3"]}],endpoint:T1,[u]:N0},{conditions:[{[z0]:w1,[A0]:[f1,"sa-east-1"]}],endpoint:T1,[u]:N0},{conditions:[{[z0]:w1,[A0]:[f1,EP]}],endpoint:T1,[u]:N0},{conditions:[{[z0]:w1,[A0]:[f1,"us-east-2"]}],endpoint:T1,[u]:N0},{conditions:[{[z0]:w1,[A0]:[f1,"us-west-1"]}],endpoint:T1,[u]:N0},{conditions:[{[z0]:w1,[A0]:[f1,"us-west-2"]}],endpoint:T1,[u]:N0},{endpoint:{url:_V,properties:{authSchemes:[{name:sP,signingName:$P,signingRegion:"{Region}"}]},headers:Z1},[u]:N0}],[u]:Zh},{conditions:tV,rules:[{conditions:hP,error:"Invalid Configuration: FIPS and custom endpoint are not supported",[u]:vs},{conditions:wP,error:"Invalid Configuration: Dualstack and custom endpoint are not supported",[u]:vs},{endpoint:{url:TP,properties:Z1,headers:Z1},[u]:N0}],[u]:Zh},{conditions:[eV],rules:[{conditions:[aV],rules:[{conditions:[CP,IP],rules:[{conditions:[{[z0]:qw,[A0]:[NC,oV]},uV],rules:[{endpoint:{url:"https://sts-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:Z1,headers:Z1},[u]:N0}],[u]:Zh},{error:"FIPS and DualStack are enabled, but this partition does not support one or both",[u]:vs}],[u]:Zh},{conditions:hP,rules:[{conditions:[{[z0]:qw,[A0]:[oV,NC]}],rules:[{conditions:[{[z0]:w1,[A0]:[{[z0]:qC,[A0]:[GP,"name"]},"aws-us-gov"]}],endpoint:{url:"https://sts.{Region}.amazonaws.com",properties:Z1,headers:Z1},[u]:N0},{endpoint:{url:"https://sts-fips.{Region}.{PartitionResult#dnsSuffix}",properties:Z1,headers:Z1},[u]:N0}],[u]:Zh},{error:"FIPS is enabled but this partition does not support FIPS",[u]:vs}],[u]:Zh},{conditions:wP,rules:[{conditions:[uV],rules:[{endpoint:{url:"https://sts.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:Z1,headers:Z1},[u]:N0}],[u]:Zh},{error:"DualStack is enabled but this partition does not support DualStack",[u]:vs}],[u]:Zh},pV,{endpoint:{url:_V,properties:Z1,headers:Z1},[u]:N0}],[u]:Zh}],[u]:Zh},{error:"Invalid Configuration: Missing Region",[u]:vs}]};BP.ruleSet=l10});var RP=H((zP)=>{Object.defineProperty(zP,"__esModule",{value:!0});zP.defaultEndpointResolver=void 0;var v10=y2(),kC=k2(),b10=LP(),m10=new kC.EndpointCache({size:50,params:["Endpoint","Region","UseDualStack","UseFIPS","UseGlobalEndpoint"]}),d10=(h,w={})=>{return m10.get(h,()=>kC.resolveEndpoint(b10.ruleSet,{endpointParams:h,logger:w.logger}))};zP.defaultEndpointResolver=d10;kC.customEndpointFunctions.aws=v10.awsEndpointFunctions});var MP=H((SP)=>{Object.defineProperty(SP,"__esModule",{value:!0});SP.getRuntimeConfig=void 0;var i10=y0(),c10=b0(),g10=Z0(),x10=o$(),XP=p1(),YP=I1(),_10=HC(),n10=RP(),e10=(h)=>{return{apiVersion:"2011-06-15",base64Decoder:h?.base64Decoder??XP.fromBase64,base64Encoder:h?.base64Encoder??XP.toBase64,disableHostPrefix:h?.disableHostPrefix??!1,endpointProvider:h?.endpointProvider??n10.defaultEndpointResolver,extensions:h?.extensions??[],httpAuthSchemeProvider:h?.httpAuthSchemeProvider??_10.defaultSTSHttpAuthSchemeProvider,httpAuthSchemes:h?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:(w)=>w.getIdentityProvider("aws.auth#sigv4"),signer:new i10.AwsSdkSigV4Signer},{schemeId:"smithy.api#noAuth",identityProvider:(w)=>w.getIdentityProvider("smithy.api#noAuth")||(async()=>({})),signer:new c10.NoAuthSigner}],logger:h?.logger??new g10.NoOpLogger,serviceId:h?.serviceId??"STS",urlParser:h?.urlParser??x10.parseUrl,utf8Decoder:h?.utf8Decoder??YP.fromUtf8,utf8Encoder:h?.utf8Encoder??YP.toUtf8}};SP.getRuntimeConfig=e10});var HP=H((VP)=>{Object.defineProperty(VP,"__esModule",{value:!0});VP.getRuntimeConfig=void 0;var a10=V5(),p10=a10.__importDefault(i6()),QP=y0(),KP=g6(),HE=Ls(),o10=b0(),u10=n6(),ZP=t$(),bs=Rs(),JP=C5(),t10=e6(),hh0=t2(),wh0=MP(),fh0=Z0(),sh0=$C(),$h0=Z0(),Eh0=(h)=>{$h0.emitWarningIfUnsupportedVersion(process.version);let w=sh0.resolveDefaultsModeConfig(h),f=()=>w().then(fh0.loadConfigsForDefaultMode),s=wh0.getRuntimeConfig(h);QP.emitWarningIfUnsupportedVersion(process.version);let $={profile:h?.profile};return{...s,...h,runtime:"node",defaultsMode:w,bodyLengthChecker:h?.bodyLengthChecker??t10.calculateBodyLength,defaultUserAgentProvider:h?.defaultUserAgentProvider??KP.createDefaultUserAgentProvider({serviceId:s.serviceId,clientVersion:p10.default.version}),httpAuthSchemes:h?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:(E)=>E.getIdentityProvider("aws.auth#sigv4")||(async(T)=>await h.credentialDefaultProvider(T?.__config||{})()),signer:new QP.AwsSdkSigV4Signer},{schemeId:"smithy.api#noAuth",identityProvider:(E)=>E.getIdentityProvider("smithy.api#noAuth")||(async()=>({})),signer:new o10.NoAuthSigner}],maxAttempts:h?.maxAttempts??bs.loadConfig(ZP.NODE_MAX_ATTEMPT_CONFIG_OPTIONS,h),region:h?.region??bs.loadConfig(HE.NODE_REGION_CONFIG_OPTIONS,{...HE.NODE_REGION_CONFIG_FILE_OPTIONS,...$}),requestHandler:JP.NodeHttpHandler.create(h?.requestHandler??f),retryMode:h?.retryMode??bs.loadConfig({...ZP.NODE_RETRY_MODE_CONFIG_OPTIONS,default:async()=>(await f()).retryMode||hh0.DEFAULT_RETRY_MODE},h),sha256:h?.sha256??u10.Hash.bind(null,"sha256"),streamCollector:h?.streamCollector??JP.streamCollector,useDualstackEndpoint:h?.useDualstackEndpoint??bs.loadConfig(HE.NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS,$),useFipsEndpoint:h?.useFipsEndpoint??bs.loadConfig(HE.NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS,$),userAgentAppId:h?.userAgentAppId??bs.loadConfig(KP.NODE_APP_ID_CONFIG_OPTIONS,$)}};VP.getRuntimeConfig=Eh0});var qP=H((NP)=>{Object.defineProperty(NP,"__esModule",{value:!0});NP.resolveHttpAuthRuntimeConfig=NP.getHttpAuthExtensionConfiguration=void 0;var Th0=(h)=>{let{httpAuthSchemes:w,httpAuthSchemeProvider:f,credentials:s}=h;return{setHttpAuthScheme($){let E=w.findIndex((T)=>T.schemeId===$.schemeId);if(E===-1)w.push($);else w.splice(E,1,$)},httpAuthSchemes(){return w},setHttpAuthSchemeProvider($){f=$},httpAuthSchemeProvider(){return f},setCredentials($){s=$},credentials(){return s}}};NP.getHttpAuthExtensionConfiguration=Th0;var Uh0=(h)=>{return{httpAuthSchemes:h.httpAuthSchemes(),httpAuthSchemeProvider:h.httpAuthSchemeProvider(),credentials:h.credentials()}};NP.resolveHttpAuthRuntimeConfig=Uh0});var bP=H((lP)=>{Object.defineProperty(lP,"__esModule",{value:!0});lP.resolveRuntimeExtensions=void 0;var kP=EC(),jP=u0(),yP=Z0(),OP=qP(),Ch0=(h,w)=>{let f=Object.assign(kP.getAwsRegionExtensionConfiguration(h),yP.getDefaultExtensionConfiguration(h),jP.getHttpHandlerExtensionConfiguration(h),OP.getHttpAuthExtensionConfiguration(h));return w.forEach((s)=>s.configure(f)),Object.assign(h,kP.resolveAwsRegionExtensionConfiguration(f),yP.resolveDefaultRuntimeConfig(f),jP.resolveHttpHandlerRuntimeConfig(f),OP.resolveHttpAuthRuntimeConfig(f))};lP.resolveRuntimeExtensions=Ch0});var C4=H((yC)=>{Object.defineProperty(yC,"__esModule",{value:!0});yC.STSClient=yC.__Client=void 0;var mP=F6(),Ih0=I6(),Gh0=B6(),dP=v2(),Bh0=Ls(),jC=b0(),Wh0=r6(),Lh0=Xs(),iP=t$(),gP=Z0();Object.defineProperty(yC,"__Client",{enumerable:!0,get:function(){return gP.Client}});var cP=HC(),zh0=I4(),Ah0=HP(),Rh0=bP();class xP extends gP.Client{config;constructor(...[h]){let w=Ah0.getRuntimeConfig(h||{});super(w);this.initConfig=w;let f=zh0.resolveClientEndpointParameters(w),s=dP.resolveUserAgentConfig(f),$=iP.resolveRetryConfig(s),E=Bh0.resolveRegionConfig($),T=mP.resolveHostHeaderConfig(E),U=Lh0.resolveEndpointConfig(T),F=cP.resolveHttpAuthSchemeConfig(U),C=Rh0.resolveRuntimeExtensions(F,h?.extensions||[]);this.config=C,this.middlewareStack.use(dP.getUserAgentPlugin(this.config)),this.middlewareStack.use(iP.getRetryPlugin(this.config)),this.middlewareStack.use(Wh0.getContentLengthPlugin(this.config)),this.middlewareStack.use(mP.getHostHeaderPlugin(this.config)),this.middlewareStack.use(Ih0.getLoggerPlugin(this.config)),this.middlewareStack.use(Gh0.getRecursionDetectionPlugin(this.config)),this.middlewareStack.use(jC.getHttpAuthSchemeEndpointRuleSetPlugin(this.config,{httpAuthSchemeParametersProvider:cP.defaultSTSHttpAuthSchemeParametersProvider,identityProviderConfigProvider:async(I)=>new jC.DefaultIdentityProviderConfig({"aws.auth#sigv4":I.credentials})})),this.middlewareStack.use(jC.getHttpSigningPlugin(this.config))}destroy(){super.destroy()}}yC.STSClient=xP});var BI=H((CX0,GI)=>{var{defineProperty:NE,getOwnPropertyDescriptor:Xh0,getOwnPropertyNames:Yh0}=Object,Sh0=Object.prototype.hasOwnProperty,a=(h,w)=>NE(h,"name",{value:w,configurable:!0}),rh0=(h,w)=>{for(var f in w)NE(h,f,{get:w[f],enumerable:!0})},$I=(h,w,f,s)=>{if(w&&typeof w==="object"||typeof w==="function"){for(let $ of Yh0(w))if(!Sh0.call(h,$)&&$!==f)NE(h,$,{get:()=>w[$],enumerable:!(s=Xh0(w,$))||s.enumerable})}return h},Mh0=(h,w,f)=>($I(h,w,"default"),f&&$I(f,w,"default")),Qh0=(h)=>$I(NE({},"__esModule",{value:!0}),h),TI={};rh0(TI,{AssumeRoleCommand:()=>CI,AssumeRoleResponseFilterSensitiveLog:()=>aP,AssumeRoleWithWebIdentityCommand:()=>II,AssumeRoleWithWebIdentityRequestFilterSensitiveLog:()=>fH,AssumeRoleWithWebIdentityResponseFilterSensitiveLog:()=>sH,ClientInputEndpointParameters:()=>zw0.ClientInputEndpointParameters,CredentialsFilterSensitiveLog:()=>UI,ExpiredTokenException:()=>pP,IDPCommunicationErrorException:()=>$H,IDPRejectedClaimException:()=>hH,InvalidIdentityTokenException:()=>wH,MalformedPolicyDocumentException:()=>oP,PackedPolicyTooLargeException:()=>uP,RegionDisabledException:()=>tP,STS:()=>zH,STSServiceException:()=>ah,decorateDefaultCredentialProvider:()=>Xw0,getDefaultRoleAssumer:()=>rH,getDefaultRoleAssumerWithWebIdentity:()=>MH});GI.exports=Qh0(TI);Mh0(TI,C4(),GI.exports);var Kh0=Z0(),Zh0=Xs(),Jh0=Zf(),Vh0=Z0(),Ph0=I4(),eP=Z0(),Hh0=Z0(),ah=class h extends Hh0.ServiceException{static{a(this,"STSServiceException")}constructor(w){super(w);Object.setPrototypeOf(this,h.prototype)}},UI=a((h)=>({...h,...h.SecretAccessKey&&{SecretAccessKey:eP.SENSITIVE_STRING}}),"CredentialsFilterSensitiveLog"),aP=a((h)=>({...h,...h.Credentials&&{Credentials:UI(h.Credentials)}}),"AssumeRoleResponseFilterSensitiveLog"),pP=class h extends ah{static{a(this,"ExpiredTokenException")}name="ExpiredTokenException";$fault="client";constructor(w){super({name:"ExpiredTokenException",$fault:"client",...w});Object.setPrototypeOf(this,h.prototype)}},oP=class h extends ah{static{a(this,"MalformedPolicyDocumentException")}name="MalformedPolicyDocumentException";$fault="client";constructor(w){super({name:"MalformedPolicyDocumentException",$fault:"client",...w});Object.setPrototypeOf(this,h.prototype)}},uP=class h extends ah{static{a(this,"PackedPolicyTooLargeException")}name="PackedPolicyTooLargeException";$fault="client";constructor(w){super({name:"PackedPolicyTooLargeException",$fault:"client",...w});Object.setPrototypeOf(this,h.prototype)}},tP=class h extends ah{static{a(this,"RegionDisabledException")}name="RegionDisabledException";$fault="client";constructor(w){super({name:"RegionDisabledException",$fault:"client",...w});Object.setPrototypeOf(this,h.prototype)}},hH=class h extends ah{static{a(this,"IDPRejectedClaimException")}name="IDPRejectedClaimException";$fault="client";constructor(w){super({name:"IDPRejectedClaimException",$fault:"client",...w});Object.setPrototypeOf(this,h.prototype)}},wH=class h extends ah{static{a(this,"InvalidIdentityTokenException")}name="InvalidIdentityTokenException";$fault="client";constructor(w){super({name:"InvalidIdentityTokenException",$fault:"client",...w});Object.setPrototypeOf(this,h.prototype)}},fH=a((h)=>({...h,...h.WebIdentityToken&&{WebIdentityToken:eP.SENSITIVE_STRING}}),"AssumeRoleWithWebIdentityRequestFilterSensitiveLog"),sH=a((h)=>({...h,...h.Credentials&&{Credentials:UI(h.Credentials)}}),"AssumeRoleWithWebIdentityResponseFilterSensitiveLog"),$H=class h extends ah{static{a(this,"IDPCommunicationErrorException")}name="IDPCommunicationErrorException";$fault="client";constructor(w){super({name:"IDPCommunicationErrorException",$fault:"client",...w});Object.setPrototypeOf(this,h.prototype)}},FI=y0(),Nh0=u0(),X0=Z0(),Dh0=a(async(h,w)=>{let f=IH,s;return s=LH({...ih0(h,w),[BH]:Tw0,[WH]:GH}),CH(w,f,"/",void 0,s)},"se_AssumeRoleCommand"),qh0=a(async(h,w)=>{let f=IH,s;return s=LH({...ch0(h,w),[BH]:Uw0,[WH]:GH}),CH(w,f,"/",void 0,s)},"se_AssumeRoleWithWebIdentityCommand"),kh0=a(async(h,w)=>{if(h.statusCode>=300)return EH(h,w);let f=await FI.parseXmlBody(h.body,w),s={};return s=ph0(f.AssumeRoleResult,w),{$metadata:ph(h),...s}},"de_AssumeRoleCommand"),jh0=a(async(h,w)=>{if(h.statusCode>=300)return EH(h,w);let f=await FI.parseXmlBody(h.body,w),s={};return s=oh0(f.AssumeRoleWithWebIdentityResult,w),{$metadata:ph(h),...s}},"de_AssumeRoleWithWebIdentityCommand"),EH=a(async(h,w)=>{let f={...h,body:await FI.parseXmlErrorBody(h.body,w)},s=Fw0(h,f.body);switch(s){case"ExpiredTokenException":case"com.amazonaws.sts#ExpiredTokenException":throw await yh0(f,w);case"MalformedPolicyDocument":case"com.amazonaws.sts#MalformedPolicyDocumentException":throw await bh0(f,w);case"PackedPolicyTooLarge":case"com.amazonaws.sts#PackedPolicyTooLargeException":throw await mh0(f,w);case"RegionDisabledException":case"com.amazonaws.sts#RegionDisabledException":throw await dh0(f,w);case"IDPCommunicationError":case"com.amazonaws.sts#IDPCommunicationErrorException":throw await Oh0(f,w);case"IDPRejectedClaim":case"com.amazonaws.sts#IDPRejectedClaimException":throw await lh0(f,w);case"InvalidIdentityToken":case"com.amazonaws.sts#InvalidIdentityTokenException":throw await vh0(f,w);default:let $=f.body;return Ew0({output:h,parsedBody:$.Error,errorCode:s})}},"de_CommandError"),yh0=a(async(h,w)=>{let f=h.body,s=uh0(f.Error,w),$=new pP({$metadata:ph(h),...s});return X0.decorateServiceException($,f)},"de_ExpiredTokenExceptionRes"),Oh0=a(async(h,w)=>{let f=h.body,s=th0(f.Error,w),$=new $H({$metadata:ph(h),...s});return X0.decorateServiceException($,f)},"de_IDPCommunicationErrorExceptionRes"),lh0=a(async(h,w)=>{let f=h.body,s=hw0(f.Error,w),$=new hH({$metadata:ph(h),...s});return X0.decorateServiceException($,f)},"de_IDPRejectedClaimExceptionRes"),vh0=a(async(h,w)=>{let f=h.body,s=ww0(f.Error,w),$=new wH({$metadata:ph(h),...s});return X0.decorateServiceException($,f)},"de_InvalidIdentityTokenExceptionRes"),bh0=a(async(h,w)=>{let f=h.body,s=fw0(f.Error,w),$=new oP({$metadata:ph(h),...s});return X0.decorateServiceException($,f)},"de_MalformedPolicyDocumentExceptionRes"),mh0=a(async(h,w)=>{let f=h.body,s=sw0(f.Error,w),$=new uP({$metadata:ph(h),...s});return X0.decorateServiceException($,f)},"de_PackedPolicyTooLargeExceptionRes"),dh0=a(async(h,w)=>{let f=h.body,s=$w0(f.Error,w),$=new tP({$metadata:ph(h),...s});return X0.decorateServiceException($,f)},"de_RegionDisabledExceptionRes"),ih0=a((h,w)=>{let f={};if(h[_s]!=null)f[_s]=h[_s];if(h[ns]!=null)f[ns]=h[ns];if(h[gs]!=null){let s=TH(h[gs],w);if(h[gs]?.length===0)f.PolicyArns=[];Object.entries(s).forEach(([$,E])=>{let T=`PolicyArns.${$}`;f[T]=E})}if(h[cs]!=null)f[cs]=h[cs];if(h[is]!=null)f[is]=h[is];if(h[uC]!=null){let s=ah0(h[uC],w);if(h[uC]?.length===0)f.Tags=[];Object.entries(s).forEach(([$,E])=>{let T=`Tags.${$}`;f[T]=E})}if(h[hI]!=null){let s=eh0(h[hI],w);if(h[hI]?.length===0)f.TransitiveTagKeys=[];Object.entries(s).forEach(([$,E])=>{let T=`TransitiveTagKeys.${$}`;f[T]=E})}if(h[iC]!=null)f[iC]=h[iC];if(h[pC]!=null)f[pC]=h[pC];if(h[tC]!=null)f[tC]=h[tC];if(h[eh]!=null)f[eh]=h[eh];if(h[xC]!=null){let s=_h0(h[xC],w);if(h[xC]?.length===0)f.ProvidedContexts=[];Object.entries(s).forEach(([$,E])=>{let T=`ProvidedContexts.${$}`;f[T]=E})}return f},"se_AssumeRoleRequest"),ch0=a((h,w)=>{let f={};if(h[_s]!=null)f[_s]=h[_s];if(h[ns]!=null)f[ns]=h[ns];if(h[fI]!=null)f[fI]=h[fI];if(h[_C]!=null)f[_C]=h[_C];if(h[gs]!=null){let s=TH(h[gs],w);if(h[gs]?.length===0)f.PolicyArns=[];Object.entries(s).forEach(([$,E])=>{let T=`PolicyArns.${$}`;f[T]=E})}if(h[cs]!=null)f[cs]=h[cs];if(h[is]!=null)f[is]=h[is];return f},"se_AssumeRoleWithWebIdentityRequest"),TH=a((h,w)=>{let f={},s=1;for(let $ of h){if($===null)continue;let E=gh0($,w);Object.entries(E).forEach(([T,U])=>{f[`member.${s}.${T}`]=U}),s++}return f},"se_policyDescriptorListType"),gh0=a((h,w)=>{let f={};if(h[sI]!=null)f[sI]=h[sI];return f},"se_PolicyDescriptorType"),xh0=a((h,w)=>{let f={};if(h[gC]!=null)f[gC]=h[gC];if(h[mC]!=null)f[mC]=h[mC];return f},"se_ProvidedContext"),_h0=a((h,w)=>{let f={},s=1;for(let $ of h){if($===null)continue;let E=xh0($,w);Object.entries(E).forEach(([T,U])=>{f[`member.${s}.${T}`]=U}),s++}return f},"se_ProvidedContextsListType"),nh0=a((h,w)=>{let f={};if(h[cC]!=null)f[cC]=h[cC];if(h[wI]!=null)f[wI]=h[wI];return f},"se_Tag"),eh0=a((h,w)=>{let f={},s=1;for(let $ of h){if($===null)continue;f[`member.${s}`]=$,s++}return f},"se_tagKeyListType"),ah0=a((h,w)=>{let f={},s=1;for(let $ of h){if($===null)continue;let E=nh0($,w);Object.entries(E).forEach(([T,U])=>{f[`member.${s}.${T}`]=U}),s++}return f},"se_tagListType"),UH=a((h,w)=>{let f={};if(h[lC]!=null)f[lC]=X0.expectString(h[lC]);if(h[vC]!=null)f[vC]=X0.expectString(h[vC]);return f},"de_AssumedRoleUser"),ph0=a((h,w)=>{let f={};if(h[ds]!=null)f[ds]=FH(h[ds],w);if(h[ms]!=null)f[ms]=UH(h[ms],w);if(h[xs]!=null)f[xs]=X0.strictParseInt32(h[xs]);if(h[eh]!=null)f[eh]=X0.expectString(h[eh]);return f},"de_AssumeRoleResponse"),oh0=a((h,w)=>{let f={};if(h[ds]!=null)f[ds]=FH(h[ds],w);if(h[aC]!=null)f[aC]=X0.expectString(h[aC]);if(h[ms]!=null)f[ms]=UH(h[ms],w);if(h[xs]!=null)f[xs]=X0.strictParseInt32(h[xs]);if(h[nC]!=null)f[nC]=X0.expectString(h[nC]);if(h[bC]!=null)f[bC]=X0.expectString(h[bC]);if(h[eh]!=null)f[eh]=X0.expectString(h[eh]);return f},"de_AssumeRoleWithWebIdentityResponse"),FH=a((h,w)=>{let f={};if(h[OC]!=null)f[OC]=X0.expectString(h[OC]);if(h[eC]!=null)f[eC]=X0.expectString(h[eC]);if(h[oC]!=null)f[oC]=X0.expectString(h[oC]);if(h[dC]!=null)f[dC]=X0.expectNonNull(X0.parseRfc3339DateTimeWithOffset(h[dC]));return f},"de_Credentials"),uh0=a((h,w)=>{let f={};if(h[d0]!=null)f[d0]=X0.expectString(h[d0]);return f},"de_ExpiredTokenException"),th0=a((h,w)=>{let f={};if(h[d0]!=null)f[d0]=X0.expectString(h[d0]);return f},"de_IDPCommunicationErrorException"),hw0=a((h,w)=>{let f={};if(h[d0]!=null)f[d0]=X0.expectString(h[d0]);return f},"de_IDPRejectedClaimException"),ww0=a((h,w)=>{let f={};if(h[d0]!=null)f[d0]=X0.expectString(h[d0]);return f},"de_InvalidIdentityTokenException"),fw0=a((h,w)=>{let f={};if(h[d0]!=null)f[d0]=X0.expectString(h[d0]);return f},"de_MalformedPolicyDocumentException"),sw0=a((h,w)=>{let f={};if(h[d0]!=null)f[d0]=X0.expectString(h[d0]);return f},"de_PackedPolicyTooLargeException"),$w0=a((h,w)=>{let f={};if(h[d0]!=null)f[d0]=X0.expectString(h[d0]);return f},"de_RegionDisabledException"),ph=a((h)=>({httpStatusCode:h.statusCode,requestId:h.headers["x-amzn-requestid"]??h.headers["x-amzn-request-id"]??h.headers["x-amz-request-id"],extendedRequestId:h.headers["x-amz-id-2"],cfId:h.headers["x-amz-cf-id"]}),"deserializeMetadata"),Ew0=X0.withBaseException(ah),CH=a(async(h,w,f,s,$)=>{let{hostname:E,protocol:T="https",port:U,path:F}=await h.endpoint(),C={protocol:T,hostname:E,port:U,method:"POST",path:F.endsWith("/")?F.slice(0,-1)+f:F+f,headers:w};if(s!==void 0)C.hostname=s;if($!==void 0)C.body=$;return new Nh0.HttpRequest(C)},"buildHttpRpcRequest"),IH={"content-type":"application/x-www-form-urlencoded"},GH="2011-06-15",BH="Action",OC="AccessKeyId",Tw0="AssumeRole",lC="AssumedRoleId",ms="AssumedRoleUser",Uw0="AssumeRoleWithWebIdentity",vC="Arn",bC="Audience",ds="Credentials",mC="ContextAssertion",is="DurationSeconds",dC="Expiration",iC="ExternalId",cC="Key",cs="Policy",gs="PolicyArns",gC="ProviderArn",xC="ProvidedContexts",_C="ProviderId",xs="PackedPolicySize",nC="Provider",_s="RoleArn",ns="RoleSessionName",eC="SecretAccessKey",aC="SubjectFromWebIdentityToken",eh="SourceIdentity",pC="SerialNumber",oC="SessionToken",uC="Tags",tC="TokenCode",hI="TransitiveTagKeys",WH="Version",wI="Value",fI="WebIdentityToken",sI="arn",d0="message",LH=a((h)=>Object.entries(h).map(([w,f])=>X0.extendedEncodeURIComponent(w)+"="+X0.extendedEncodeURIComponent(f)).join("&"),"buildFormUrlencodedString"),Fw0=a((h,w)=>{if(w.Error?.Code!==void 0)return w.Error.Code;if(h.statusCode==404)return"NotFound"},"loadQueryErrorCode"),CI=class extends Vh0.Command.classBuilder().ep(Ph0.commonParams).m(function(h,w,f,s){return[Jh0.getSerdePlugin(f,this.serialize,this.deserialize),Zh0.getEndpointPlugin(f,h.getEndpointParameterInstructions())]}).s("AWSSecurityTokenServiceV20110615","AssumeRole",{}).n("STSClient","AssumeRoleCommand").f(void 0,aP).ser(Dh0).de(kh0).build(){static{a(this,"AssumeRoleCommand")}},Cw0=Xs(),Iw0=Zf(),Gw0=Z0(),Bw0=I4(),II=class extends Gw0.Command.classBuilder().ep(Bw0.commonParams).m(function(h,w,f,s){return[Iw0.getSerdePlugin(f,this.serialize,this.deserialize),Cw0.getEndpointPlugin(f,h.getEndpointParameterInstructions())]}).s("AWSSecurityTokenServiceV20110615","AssumeRoleWithWebIdentity",{}).n("STSClient","AssumeRoleWithWebIdentityCommand").f(fH,sH).ser(qh0).de(jh0).build(){static{a(this,"AssumeRoleWithWebIdentityCommand")}},Ww0=C4(),Lw0={AssumeRoleCommand:CI,AssumeRoleWithWebIdentityCommand:II},zH=class extends Ww0.STSClient{static{a(this,"STS")}};Kh0.createAggregatedClient(Lw0,zH);var zw0=I4(),EI=G1(),nP="us-east-1",AH=a((h)=>{if(typeof h?.Arn==="string"){let w=h.Arn.split(":");if(w.length>4&&w[4]!=="")return w[4]}return},"getAccountIdFromAssumedRoleUser"),RH=a(async(h,w,f)=>{let s=typeof h==="function"?await h():h,$=typeof w==="function"?await w():w;return f?.debug?.("@aws-sdk/client-sts::resolveRegion","accepting first of:",`${s} (provider)`,`${$} (parent client)`,`${nP} (STS default)`),s??$??nP},"resolveRegion"),Aw0=a((h,w)=>{let f,s;return async($,E)=>{if(s=$,!f){let{logger:I=h?.parentClientConfig?.logger,region:G,requestHandler:B=h?.parentClientConfig?.requestHandler,credentialProviderLogger:z}=h,Y=await RH(G,h?.parentClientConfig?.region,z),Q=!XH(B);f=new w({profile:h?.parentClientConfig?.profile,credentialDefaultProvider:a(()=>async()=>s,"credentialDefaultProvider"),region:Y,requestHandler:Q?B:void 0,logger:I})}let{Credentials:T,AssumedRoleUser:U}=await f.send(new CI(E));if(!T||!T.AccessKeyId||!T.SecretAccessKey)throw new Error(`Invalid response from STS.assumeRole call with role ${E.RoleArn}`);let F=AH(U),C={accessKeyId:T.AccessKeyId,secretAccessKey:T.SecretAccessKey,sessionToken:T.SessionToken,expiration:T.Expiration,...T.CredentialScope&&{credentialScope:T.CredentialScope},...F&&{accountId:F}};return EI.setCredentialFeature(C,"CREDENTIALS_STS_ASSUME_ROLE","i"),C}},"getDefaultRoleAssumer"),Rw0=a((h,w)=>{let f;return async(s)=>{if(!f){let{logger:F=h?.parentClientConfig?.logger,region:C,requestHandler:I=h?.parentClientConfig?.requestHandler,credentialProviderLogger:G}=h,B=await RH(C,h?.parentClientConfig?.region,G),z=!XH(I);f=new w({profile:h?.parentClientConfig?.profile,region:B,requestHandler:z?I:void 0,logger:F})}let{Credentials:$,AssumedRoleUser:E}=await f.send(new II(s));if(!$||!$.AccessKeyId||!$.SecretAccessKey)throw new Error(`Invalid response from STS.assumeRoleWithWebIdentity call with role ${s.RoleArn}`);let T=AH(E),U={accessKeyId:$.AccessKeyId,secretAccessKey:$.SecretAccessKey,sessionToken:$.SessionToken,expiration:$.Expiration,...$.CredentialScope&&{credentialScope:$.CredentialScope},...T&&{accountId:T}};if(T)EI.setCredentialFeature(U,"RESOLVED_ACCOUNT_ID","T");return EI.setCredentialFeature(U,"CREDENTIALS_STS_ASSUME_ROLE_WEB_ID","k"),U}},"getDefaultRoleAssumerWithWebIdentity"),XH=a((h)=>{return h?.metadata?.handlerProtocol==="h2"},"isH2"),YH=C4(),SH=a((h,w)=>{if(!w)return h;else return class f extends h{static{a(this,"CustomizableSTSClient")}constructor(s){super(s);for(let $ of w)this.middlewareStack.use($)}}},"getCustomizableStsClientCtor"),rH=a((h={},w)=>Aw0(h,SH(YH.STSClient,w)),"getDefaultRoleAssumer"),MH=a((h={},w)=>Rw0(h,SH(YH.STSClient,w)),"getDefaultRoleAssumerWithWebIdentity"),Xw0=a((h)=>(w)=>h({roleAssumer:rH(w),roleAssumerWithWebIdentity:MH(w),...w}),"decorateDefaultCredentialProvider")});var WI,LI,KH=(h,{profile:w="default",logger:f}={})=>{return Boolean(h)&&typeof h==="object"&&typeof h.role_arn==="string"&&["undefined","string"].indexOf(typeof h.role_session_name)>-1&&["undefined","string"].indexOf(typeof h.external_id)>-1&&["undefined","string"].indexOf(typeof h.mfa_serial)>-1&&(Yw0(h,{profile:w,logger:f})||Sw0(h,{profile:w,logger:f}))},Yw0=(h,{profile:w,logger:f})=>{let s=typeof h.source_profile==="string"&&typeof h.credential_source==="undefined";if(s)f?.debug?.(` ${w} isAssumeRoleWithSourceProfile source_profile=${h.source_profile}`);return s},Sw0=(h,{profile:w,logger:f})=>{let s=typeof h.credential_source==="string"&&typeof h.source_profile==="undefined";if(s)f?.debug?.(` ${w} isCredentialSourceProfile credential_source=${h.credential_source}`);return s},ZH=async(h,w,f,s={})=>{f.logger?.debug("@aws-sdk/credential-provider-ini - resolveAssumeRoleCredentials (STS)");let $=w[h],{source_profile:E,region:T}=$;if(!f.roleAssumer){let{getDefaultRoleAssumer:F}=await Promise.resolve().then(() => O(BI(),1));f.roleAssumer=F({...f.clientConfig,credentialProviderLogger:f.logger,parentClientConfig:{...f?.parentClientConfig,region:T??f?.parentClientConfig?.region}},f.clientPlugins)}if(E&&E in s)throw new LI.CredentialsProviderError(`Detected a cycle attempting to resolve credentials for profile ${q1(f)}. Profiles visited: `+Object.keys(s).join(", "),{logger:f.logger});f.logger?.debug(`@aws-sdk/credential-provider-ini - finding credential resolver using ${E?`source_profile=[${E}]`:`profile=[${h}]`}`);let U=E?DE(E,w,f,{...s,[E]:!0},QH(w[E]??{})):(await lV($.credential_source,h,f.logger)(f))();if(QH($))return U.then((F)=>WI.setCredentialFeature(F,"CREDENTIALS_PROFILE_SOURCE_PROFILE","o"));else{let F={RoleArn:$.role_arn,RoleSessionName:$.role_session_name||`aws-sdk-js-${Date.now()}`,ExternalId:$.external_id,DurationSeconds:parseInt($.duration_seconds||"3600",10)},{mfa_serial:C}=$;if(C){if(!f.mfaCodeProvider)throw new LI.CredentialsProviderError(`Profile ${h} requires multi-factor authentication, but no MFA code callback was provided.`,{logger:f.logger,tryNextLink:!1});F.SerialNumber=C,F.TokenCode=await f.mfaCodeProvider(C)}let I=await U;return f.roleAssumer(I,F).then((G)=>WI.setCredentialFeature(G,"CREDENTIALS_PROFILE_SOURCE_PROFILE","o"))}},QH=(h)=>{return!h.role_arn&&!!h.credential_source};var JH=L(()=>{WI=O(G1(),1),LI=O(U0(),1);t1();vV();zI()});var VH,PH=(h,w,f)=>{if(w.Version!==1)throw Error(`Profile ${h} credential_process did not return Version 1.`);if(w.AccessKeyId===void 0||w.SecretAccessKey===void 0)throw Error(`Profile ${h} credential_process returned invalid credentials.`);if(w.Expiration){let E=new Date;if(new Date(w.Expiration)<E)throw Error(`Profile ${h} credential_process returned expired credentials.`)}let s=w.AccountId;if(!s&&f?.[h]?.aws_account_id)s=f[h].aws_account_id;let $={accessKeyId:w.AccessKeyId,secretAccessKey:w.SecretAccessKey,...w.SessionToken&&{sessionToken:w.SessionToken},...w.Expiration&&{expiration:new Date(w.Expiration)},...w.CredentialScope&&{credentialScope:w.CredentialScope},...s&&{accountId:s}};return VH.setCredentialFeature($,"CREDENTIALS_PROCESS","w"),$};var HH=L(()=>{VH=O(G1(),1)});import{exec as rw0}from"node:child_process";import{promisify as Mw0}from"node:util";var qE,NH=async(h,w,f)=>{let s=w[h];if(w[h]){let $=s.credential_process;if($!==void 0){let E=Mw0(rw0);try{let{stdout:T}=await E($),U;try{U=JSON.parse(T.trim())}catch{throw Error(`Profile ${h} credential_process returned invalid JSON.`)}return PH(h,U,w)}catch(T){throw new qE.CredentialsProviderError(T.message,{logger:f})}}else throw new qE.CredentialsProviderError(`Profile ${h} did not contain credential_process.`,{logger:f})}else throw new qE.CredentialsProviderError(`Profile ${h} could not be found in shared credentials file.`,{logger:f})};var DH=L(()=>{qE=O(U0(),1);HH()});var Qw0=(h={})=>async({callerClientConfig:w}={})=>{h.logger?.debug("@aws-sdk/credential-provider-process - fromProcess");let f=await Yw(h);return NH(q1({profile:h.profile??w?.profile}),f,h.logger)};var qH=L(()=>{t1();DH()});var AI={};Ew(AI,{fromProcess:()=>Qw0});var RI=L(()=>{qH()});var kH,jH=(h)=>Boolean(h)&&typeof h==="object"&&typeof h.credential_process==="string",yH=async(h,w)=>Promise.resolve().then(() => (RI(),AI)).then(({fromProcess:f})=>f({...h,profile:w})().then((s)=>kH.setCredentialFeature(s,"CREDENTIALS_PROFILE_PROCESS","v")));var OH=L(()=>{kH=O(G1(),1)});var XI,lH=async(h,w,f={})=>{let{fromSSO:s}=await Promise.resolve().then(() => (VC(),JC));return s({profile:h,logger:f.logger,parentClientConfig:f.parentClientConfig,clientConfig:f.clientConfig})().then(($)=>{if(w.sso_session)return XI.setCredentialFeature($,"CREDENTIALS_PROFILE_SSO","r");else return XI.setCredentialFeature($,"CREDENTIALS_PROFILE_SSO_LEGACY","t")})},vH=(h)=>h&&(typeof h.sso_start_url==="string"||typeof h.sso_account_id==="string"||typeof h.sso_session==="string"||typeof h.sso_region==="string"||typeof h.sso_role_name==="string");var bH=L(()=>{XI=O(G1(),1)});var mH,YI=(h)=>Boolean(h)&&typeof h==="object"&&typeof h.aws_access_key_id==="string"&&typeof h.aws_secret_access_key==="string"&&["undefined","string"].indexOf(typeof h.aws_session_token)>-1&&["undefined","string"].indexOf(typeof h.aws_account_id)>-1,SI=async(h,w)=>{w?.logger?.debug("@aws-sdk/credential-provider-ini - resolveStaticCredentials");let f={accessKeyId:h.aws_access_key_id,secretAccessKey:h.aws_secret_access_key,sessionToken:h.aws_session_token,...h.aws_credential_scope&&{credentialScope:h.aws_credential_scope},...h.aws_account_id&&{accountId:h.aws_account_id}};return mH.setCredentialFeature(f,"CREDENTIALS_PROFILE","n")};var dH=L(()=>{mH=O(G1(),1)});var rI=(h)=>async(w)=>{h.logger?.debug("@aws-sdk/credential-provider-web-identity - fromWebToken");let{roleArn:f,roleSessionName:s,webIdentityToken:$,providerId:E,policyArns:T,policy:U,durationSeconds:F}=h,{roleAssumerWithWebIdentity:C}=h;if(!C){let{getDefaultRoleAssumerWithWebIdentity:I}=await Promise.resolve().then(() => O(BI(),1));C=I({...h.clientConfig,credentialProviderLogger:h.logger,parentClientConfig:{...w?.callerClientConfig,...h.parentClientConfig}},h.clientPlugins)}return C({RoleArn:f,RoleSessionName:s??`aws-sdk-js-session-${Date.now()}`,WebIdentityToken:$,ProviderId:E,PolicyArns:T,Policy:U,DurationSeconds:F})};import{readFileSync as Kw0}from"node:fs";var cH,gH,iH="AWS_WEB_IDENTITY_TOKEN_FILE",Zw0="AWS_ROLE_ARN",Jw0="AWS_ROLE_SESSION_NAME",Vw0=(h={})=>async()=>{h.logger?.debug("@aws-sdk/credential-provider-web-identity - fromTokenFile");let w=h?.webIdentityTokenFile??process.env[iH],f=h?.roleArn??process.env[Zw0],s=h?.roleSessionName??process.env[Jw0];if(!w||!f)throw new gH.CredentialsProviderError("Web identity configuration not specified",{logger:h.logger});let $=await rI({...h,webIdentityToken:Kw0(w,{encoding:"ascii"}),roleArn:f,roleSessionName:s})();if(w===process.env[iH])cH.setCredentialFeature($,"CREDENTIALS_ENV_VARS_STS_WEB_ID_TOKEN","h");return $};var xH=L(()=>{cH=O(G1(),1),gH=O(U0(),1)});var MI={};Ew(MI,{fromWebToken:()=>rI,fromTokenFile:()=>Vw0});var QI=L(()=>{xH()});var _H,nH=(h)=>Boolean(h)&&typeof h==="object"&&typeof h.web_identity_token_file==="string"&&typeof h.role_arn==="string"&&["undefined","string"].indexOf(typeof h.role_session_name)>-1,eH=async(h,w)=>Promise.resolve().then(() => (QI(),MI)).then(({fromTokenFile:f})=>f({webIdentityTokenFile:h.web_identity_token_file,roleArn:h.role_arn,roleSessionName:h.role_session_name,roleAssumerWithWebIdentity:w.roleAssumerWithWebIdentity,logger:w.logger,parentClientConfig:w.parentClientConfig})().then((s)=>_H.setCredentialFeature(s,"CREDENTIALS_PROFILE_STS_WEB_ID_TOKEN","q")));var aH=L(()=>{_H=O(G1(),1)});var pH,DE=async(h,w,f,s={},$=!1)=>{let E=w[h];if(Object.keys(s).length>0&&YI(E))return SI(E,f);if($||KH(E,{profile:h,logger:f.logger}))return ZH(h,w,f,s);if(YI(E))return SI(E,f);if(nH(E))return eH(E,f);if(jH(E))return yH(f,h);if(vH(E))return await lH(h,E,f);throw new pH.CredentialsProviderError(`Could not resolve credentials using profile: [${h}] in configuration/credentials file(s).`,{logger:f.logger})};var zI=L(()=>{pH=O(U0(),1);JH();OH();bH();dH();aH()});var Pw0=(h={})=>async({callerClientConfig:w}={})=>{let f={...h,parentClientConfig:{...w,...h.parentClientConfig}};f.logger?.debug("@aws-sdk/credential-provider-ini - fromIni");let s=await Yw(f);return DE(q1({profile:h.profile??w?.profile}),s,f)};var oH=L(()=>{t1();zI()});var uH={};Ew(uH,{fromIni:()=>Pw0});var tH=L(()=>{oH()});p4();o4();u4();D$();Rw();var as=O(b0(),1);e5();D();hf();J();var FS=O(y0(),1);mh();var CS=async(h,w,f)=>{return{operation:zw(w).operation,region:await W1(h.region)()||(()=>{throw new Error("expected `region` to be configured for `aws.auth#sigv4`")})()}};function P_(h){return{schemeId:"aws.auth#sigv4",signingProperties:{name:"route53",region:h.region},propertiesExtractor:(w,f)=>({signingProperties:{config:w,context:f}})}}var IS=(h)=>{let w=[];switch(h.operation){default:w.push(P_(h))}return w},GS=(h)=>{let w=FS.resolveAwsSdkSigV4Config(h);return Object.assign(w,{})};var BS=(h)=>{return Object.assign(h,{useDualstackEndpoint:h.useDualstackEndpoint??!1,useFipsEndpoint:h.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 WS={name:"@aws-sdk/client-route-53",description:"AWS SDK for JavaScript Route 53 Client for Node.js, Browser and React Native",version:"3.777.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.775.0","@aws-sdk/credential-provider-node":"3.777.0","@aws-sdk/middleware-host-header":"3.775.0","@aws-sdk/middleware-logger":"3.775.0","@aws-sdk/middleware-recursion-detection":"3.775.0","@aws-sdk/middleware-sdk-route53":"3.775.0","@aws-sdk/middleware-user-agent":"3.775.0","@aws-sdk/region-config-resolver":"3.775.0","@aws-sdk/types":"3.775.0","@aws-sdk/util-endpoints":"3.775.0","@aws-sdk/util-user-agent-browser":"3.775.0","@aws-sdk/util-user-agent-node":"3.775.0","@aws-sdk/xml-builder":"3.775.0","@smithy/config-resolver":"^4.1.0","@smithy/core":"^3.2.0","@smithy/fetch-http-handler":"^5.0.2","@smithy/hash-node":"^4.0.2","@smithy/invalid-dependency":"^4.0.2","@smithy/middleware-content-length":"^4.0.2","@smithy/middleware-endpoint":"^4.1.0","@smithy/middleware-retry":"^4.1.0","@smithy/middleware-serde":"^4.0.3","@smithy/middleware-stack":"^4.0.2","@smithy/node-config-provider":"^4.0.2","@smithy/node-http-handler":"^4.0.4","@smithy/protocol-http":"^5.1.0","@smithy/smithy-client":"^4.2.0","@smithy/types":"^4.2.0","@smithy/url-parser":"^4.0.2","@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.8","@smithy/util-defaults-mode-node":"^4.0.8","@smithy/util-endpoints":"^3.0.2","@smithy/util-middleware":"^4.0.2","@smithy/util-retry":"^4.0.2","@smithy/util-utf8":"^4.0.0","@smithy/util-waiter":"^4.0.3",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 XN=O(y0(),1);g3();var jw=O(U0(),1);t1();var Z2=O(U0(),1),Wr="AWS_EC2_METADATA_DISABLED",Lr=async(h)=>{let{ENV_CMDS_FULL_URI:w,ENV_CMDS_RELATIVE_URI:f,fromContainerMetadata:s,fromInstanceMetadata:$}=await Promise.resolve().then(() => (x$(),g$));if(process.env[f]||process.env[w]){h.logger?.debug("@aws-sdk/credential-provider-node - remoteProvider::fromHttp/fromContainerMetadata");let{fromHttp:E}=await Promise.resolve().then(() => (T6(),E6));return Z2.chain(E(h),s(h))}if(process.env[Wr]&&process.env[Wr]!=="false")return async()=>{throw new Z2.CredentialsProviderError("EC2 Instance Metadata Service access disabled",{logger:h.logger})};return h.logger?.debug("@aws-sdk/credential-provider-node - remoteProvider::fromInstanceMetadata"),$(h)};var hN=!1,kE=(h={})=>jw.memoize(jw.chain(async()=>{if(h.profile??process.env[NX]){if(process.env[L2]&&process.env[z2]){if(!hN)(h.logger?.warn&&h.logger?.constructor?.name!=="NoOpLogger"?h.logger.warn:console.warn)(`@aws-sdk/credential-provider-node - defaultProvider::fromEnv WARNING:
|
|
52
|
-
Multiple credential sources detected:
|
|
53
|
-
Both AWS_PROFILE and the pair AWS_ACCESS_KEY_ID/AWS_SECRET_ACCESS_KEY static credentials are set.
|
|
54
|
-
This SDK will proceed with the AWS_PROFILE value.
|
|
55
|
-
|
|
56
|
-
However, a future version may change this behavior to prefer the ENV static credentials.
|
|
57
|
-
Please ensure that your environment only sets either the AWS_PROFILE or the
|
|
58
|
-
AWS_ACCESS_KEY_ID/AWS_SECRET_ACCESS_KEY pair.
|
|
59
|
-
`),hN=!0}throw new jw.CredentialsProviderError("AWS_PROFILE is set, skipping fromEnv provider.",{logger:h.logger,tryNextLink:!0})}return h.logger?.debug("@aws-sdk/credential-provider-node - defaultProvider::fromEnv"),c3(h)()},async()=>{h.logger?.debug("@aws-sdk/credential-provider-node - defaultProvider::fromSSO");let{ssoStartUrl:w,ssoAccountId:f,ssoRegion:s,ssoRoleName:$,ssoSession:E}=h;if(!w&&!f&&!s&&!$&&!E)throw new jw.CredentialsProviderError("Skipping SSO provider in default chain (inputs do not include SSO fields).",{logger:h.logger});let{fromSSO:T}=await Promise.resolve().then(() => (VC(),JC));return T(h)()},async()=>{h.logger?.debug("@aws-sdk/credential-provider-node - defaultProvider::fromIni");let{fromIni:w}=await Promise.resolve().then(() => (tH(),uH));return w(h)()},async()=>{h.logger?.debug("@aws-sdk/credential-provider-node - defaultProvider::fromProcess");let{fromProcess:w}=await Promise.resolve().then(() => (RI(),AI));return w(h)()},async()=>{h.logger?.debug("@aws-sdk/credential-provider-node - defaultProvider::fromTokenFile");let{fromTokenFile:w}=await Promise.resolve().then(() => (QI(),MI));return w(h)()},async()=>{return h.logger?.debug("@aws-sdk/credential-provider-node - defaultProvider::remoteProvider"),(await Lr(h))()},async()=>{throw new jw.CredentialsProviderError("Could not load credentials from any providers",{tryNextLink:!1,logger:h.logger})}),Nw0,Hw0),Hw0=(h)=>h?.expiration!==void 0,Nw0=(h)=>h?.expiration!==void 0&&h.expiration.getTime()-Date.now()<300000;BE();Rw();WE();hf();Sw();_$();LE();hh();var AN=O(y0(),1);J();_f();var yE=O(p1(),1),OE=O(I1(),1);M$();bh();var wN={["required"]:!1,type:"String"},fN={["required"]:!0,default:!1,type:"Boolean"},sN={["ref"]:"Endpoint"},jE={["fn"]:"booleanEquals",["argv"]:[{["ref"]:"UseFIPS"},!0]},WN={["fn"]:"booleanEquals",["argv"]:[{["ref"]:"UseDualStack"},!0]},s1={},$N={["fn"]:"stringEquals",["argv"]:[{["fn"]:"getAttr",["argv"]:[{["ref"]:"PartitionResult"},"name"]},"aws"]},es={["fn"]:"getAttr",["argv"]:[{["ref"]:"PartitionResult"},"name"]},Ef={["fn"]:"booleanEquals",["argv"]:[{["ref"]:"UseFIPS"},!1]},oh={["fn"]:"booleanEquals",["argv"]:[{["ref"]:"UseDualStack"},!1]},EN={["authSchemes"]:[{name:"sigv4",["signingName"]:"route53",["signingRegion"]:"us-east-1"}]},TN={["fn"]:"stringEquals",["argv"]:[es,"aws-us-gov"]},UN={url:"https://route53.us-gov.amazonaws.com",properties:{["authSchemes"]:[{name:"sigv4",["signingName"]:"route53",["signingRegion"]:"us-gov-west-1"}]},headers:{}},FN={["fn"]:"getAttr",["argv"]:[{["ref"]:"PartitionResult"},"supportsFIPS"]},CN={["fn"]:"booleanEquals",["argv"]:[!0,{["fn"]:"getAttr",["argv"]:[{["ref"]:"PartitionResult"},"supportsDualStack"]}]},IN=[jE],GN=[WN],BN=[{["ref"]:"Region"}],Dw0={version:"1.0",parameters:{Region:wN,UseDualStack:fN,UseFIPS:fN,Endpoint:wN},rules:[{conditions:[{["fn"]:"isSet",["argv"]:[sN]}],rules:[{conditions:IN,error:"Invalid Configuration: FIPS and custom endpoint are not supported",type:"error"},{conditions:GN,error:"Invalid Configuration: Dualstack and custom endpoint are not supported",type:"error"},{endpoint:{url:sN,properties:s1,headers:s1},type:"endpoint"}],type:"tree"},{conditions:[{["fn"]:"isSet",["argv"]:BN}],rules:[{conditions:[{["fn"]:"aws.partition",["argv"]:BN,assign:"PartitionResult"}],rules:[{conditions:[$N,Ef,oh],endpoint:{url:"https://route53.amazonaws.com",properties:EN,headers:s1},type:"endpoint"},{conditions:[$N,jE,oh],endpoint:{url:"https://route53-fips.amazonaws.com",properties:EN,headers:s1},type:"endpoint"},{conditions:[{["fn"]:"stringEquals",["argv"]:[es,"aws-cn"]},Ef,oh],endpoint:{url:"https://route53.amazonaws.com.cn",properties:{["authSchemes"]:[{name:"sigv4",["signingName"]:"route53",["signingRegion"]:"cn-northwest-1"}]},headers:s1},type:"endpoint"},{conditions:[TN,Ef,oh],endpoint:UN,type:"endpoint"},{conditions:[TN,jE,oh],endpoint:UN,type:"endpoint"},{conditions:[{["fn"]:"stringEquals",["argv"]:[es,"aws-iso"]},Ef,oh],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"]:[es,"aws-iso-b"]},Ef,oh],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"]:[es,"aws-iso-e"]},Ef,oh],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"]:[es,"aws-iso-f"]},Ef,oh],endpoint:{url:"https://route53.csp.hci.ic.gov",properties:{["authSchemes"]:[{name:"sigv4",["signingName"]:"route53",["signingRegion"]:"us-isof-south-1"}]},headers:s1},type:"endpoint"},{conditions:[jE,WN],rules:[{conditions:[{["fn"]:"booleanEquals",["argv"]:[!0,FN]},CN],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:IN,rules:[{conditions:[{["fn"]:"booleanEquals",["argv"]:[FN,!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:GN,rules:[{conditions:[CN],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"}]},LN=Dw0;var qw0=new dw({size:50,params:["Endpoint","Region","UseDualStack","UseFIPS"]}),zN=(h,w={})=>{return qw0.get(h,()=>iw(LN,{endpointParams:h,logger:w.logger}))};o1.aws=cw;var RN=(h)=>{return{apiVersion:"2013-04-01",base64Decoder:h?.base64Decoder??yE.fromBase64,base64Encoder:h?.base64Encoder??yE.toBase64,disableHostPrefix:h?.disableHostPrefix??!1,endpointProvider:h?.endpointProvider??zN,extensions:h?.extensions??[],httpAuthSchemeProvider:h?.httpAuthSchemeProvider??IS,httpAuthSchemes:h?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:(w)=>w.getIdentityProvider("aws.auth#sigv4"),signer:new AN.AwsSdkSigV4Signer}],logger:h?.logger??new ih,serviceId:h?.serviceId??"Route 53",urlParser:h?.urlParser??j1,utf8Decoder:h?.utf8Decoder??OE.fromUtf8,utf8Encoder:h?.utf8Encoder??OE.toUtf8}};J();RE();J();var YN=(h)=>{Es(process.version);let w=qs(h),f=()=>w().then($s),s=RN(h);XN.emitWarningIfUnsupportedVersion(process.version);let $={profile:h?.profile};return{...s,...h,runtime:"node",defaultsMode:w,bodyLengthChecker:h?.bodyLengthChecker??Ds,credentialDefaultProvider:h?.credentialDefaultProvider??kE,defaultUserAgentProvider:h?.defaultUserAgentProvider??Hs({serviceId:s.serviceId,clientVersion:WS.version}),maxAttempts:h?.maxAttempts??R0(of,h),region:h?.region??R0(Aw,{...mf,...$}),requestHandler:sh.create(h?.requestHandler??f),retryMode:h?.retryMode??R0({...tf,default:async()=>(await f()).retryMode||rw},h),sha256:h?.sha256??sf.bind(null,"sha256"),streamCollector:h?.streamCollector??Gs,useDualstackEndpoint:h?.useDualstackEndpoint??R0(vf,$),useFipsEndpoint:h?.useFipsEndpoint??R0(bf,$),userAgentAppId:h?.userAgentAppId??R0(Ns,$)}};XE();C1();J();var SN=(h)=>{let{httpAuthSchemes:w,httpAuthSchemeProvider:f,credentials:s}=h;return{setHttpAuthScheme($){let E=w.findIndex((T)=>T.schemeId===$.schemeId);if(E===-1)w.push($);else w.splice(E,1,$)},httpAuthSchemes(){return w},setHttpAuthSchemeProvider($){f=$},httpAuthSchemeProvider(){return f},setCredentials($){s=$},credentials(){return s}}},rN=(h)=>{return{httpAuthSchemes:h.httpAuthSchemes(),httpAuthSchemeProvider:h.httpAuthSchemeProvider(),credentials:h.credentials()}};var MN=(h,w)=>{let f=Object.assign(ks(h),Ts(h),Yf(h),SN(h));return w.forEach((s)=>s.configure(f)),Object.assign(h,js(f),Us(f),Sf(f),rN(f))};class KI extends uw{config;constructor(...[h]){let w=YN(h||{});super(w);this.initConfig=w;let f=BS(w),s=Hf(f),$=uf(s),E=df($),T=rf(E),U=nf(T),F=GS(U),C=MN(F,h?.extensions||[]);this.config=C,this.middlewareStack.use(Of(this.config)),this.middlewareStack.use(Cs(this.config)),this.middlewareStack.use(cf(this.config)),this.middlewareStack.use(Mf(this.config)),this.middlewareStack.use(Qf(this.config)),this.middlewareStack.use(Kf(this.config)),this.middlewareStack.use(as.getHttpAuthSchemeEndpointRuleSetPlugin(this.config,{httpAuthSchemeParametersProvider:CS,identityProviderConfigProvider:async(I)=>new as.DefaultIdentityProviderConfig({"aws.auth#sigv4":I.credentials})})),this.middlewareStack.use(as.getHttpSigningPlugin(this.config))}destroy(){super.destroy()}}J();var lE=/^\/(hostedzone|change|delegationset)\//;function kw0(){return(h)=>async(w)=>{let{ChangeBatch:f}=w.input,s=[];for(let $ of f.Changes){let{AliasTarget:E}=$.ResourceRecordSet;if(E)s.push({...$,ResourceRecordSet:{...$.ResourceRecordSet,AliasTarget:{...E,HostedZoneId:E.HostedZoneId.replace(lE,"")}}});else s.push($)}return h({...w,input:{...w.input,ChangeBatch:{...f,Changes:s}}})}}var jw0={step:"initialize",tags:["ROUTE53_IDS","CHANGE_RESOURCE_RECORD_SETS"],name:"changeResourceRecordSetsMiddleware",override:!0},QN=(h)=>({applyToStack:(w)=>{w.add(kw0(),jw0)}});var yw0=["DelegationSetId","HostedZoneId","Id"];function Ow0(){return(h)=>async(w)=>{let f={...w.input};for(let s of yw0){let $=f[s];if($)f[s]=$.replace(lE,"")}return h({...w,input:f})}}var lw0={step:"initialize",tags:["ROUTE53_IDS"],name:"idNormalizerMiddleware",override:!0},l=(h)=>({applyToStack:(w)=>{w.add(Ow0(),lw0)}});D();k();J();var n=O(y0(),1);function KN(h){return h.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""")}function ZN(h){return h.replace(/&/g,"&").replace(/"/g,""").replace(/'/g,"'").replace(/</g,"<").replace(/>/g,">").replace(/\r/g,"
").replace(/\n/g,"
").replace(/\u0085/g,"…").replace(/\u2028/,"
")}class ZI{value;constructor(h){this.value=h}toString(){return ZN(""+this.value)}}class P{name;children;attributes={};static of(h,w,f){let s=new P(h);if(w!==void 0)s.addChildNode(new ZI(w));if(f!==void 0)s.withName(f);return s}constructor(h,w=[]){this.name=h,this.children=w}withName(h){return this.name=h,this}addAttribute(h,w){return this.attributes[h]=w,this}addChildNode(h){return this.children.push(h),this}removeAttribute(h){return delete this.attributes[h],this}n(h){return this.name=h,this}c(h){return this.children.push(h),this}a(h,w){if(w!=null)this.attributes[h]=w;return this}cc(h,w,f=w){if(h[w]!=null){let s=P.of(w,h[w]).withName(f);this.c(s)}}l(h,w,f,s){if(h[w]!=null)s().map((E)=>{E.withName(f),this.c(E)})}lc(h,w,f,s){if(h[w]!=null){let $=s(),E=new P(f);$.map((T)=>{E.c(T)}),this.c(E)}}toString(){let h=Boolean(this.children.length),w=`<${this.name}`,f=this.attributes;for(let s of Object.keys(f)){let $=f[s];if($!=null)w+=` ${s}="${KN(""+$)}"`}return w+=!h?"/>":`>${this.children.map((s)=>s.toString()).join("")}</${this.name}>`}}var i=O(b0(),1);J();J();class d extends fh{constructor(h){super(h);Object.setPrototypeOf(this,d.prototype)}}class vE extends d{name="ConcurrentModification";$fault="client";constructor(h){super({name:"ConcurrentModification",$fault:"client",...h});Object.setPrototypeOf(this,vE.prototype)}}class bE extends d{name="InvalidInput";$fault="client";constructor(h){super({name:"InvalidInput",$fault:"client",...h});Object.setPrototypeOf(this,bE.prototype)}}class mE extends d{name="InvalidKeySigningKeyStatus";$fault="client";constructor(h){super({name:"InvalidKeySigningKeyStatus",$fault:"client",...h});Object.setPrototypeOf(this,mE.prototype)}}class dE extends d{name="InvalidKMSArn";$fault="client";constructor(h){super({name:"InvalidKMSArn",$fault:"client",...h});Object.setPrototypeOf(this,dE.prototype)}}class iE extends d{name="InvalidSigningStatus";$fault="client";constructor(h){super({name:"InvalidSigningStatus",$fault:"client",...h});Object.setPrototypeOf(this,iE.prototype)}}class cE extends d{name="NoSuchKeySigningKey";$fault="client";constructor(h){super({name:"NoSuchKeySigningKey",$fault:"client",...h});Object.setPrototypeOf(this,cE.prototype)}}class gE extends d{name="ConflictingDomainExists";$fault="client";constructor(h){super({name:"ConflictingDomainExists",$fault:"client",...h});Object.setPrototypeOf(this,gE.prototype)}}class xE extends d{name="InvalidVPCId";$fault="client";constructor(h){super({name:"InvalidVPCId",$fault:"client",...h});Object.setPrototypeOf(this,xE.prototype)}}class _E extends d{name="LimitsExceeded";$fault="client";constructor(h){super({name:"LimitsExceeded",$fault:"client",...h});Object.setPrototypeOf(this,_E.prototype)}}class nE extends d{name="NoSuchHostedZone";$fault="client";constructor(h){super({name:"NoSuchHostedZone",$fault:"client",...h});Object.setPrototypeOf(this,nE.prototype)}}class eE extends d{name="NotAuthorizedException";$fault="client";constructor(h){super({name:"NotAuthorizedException",$fault:"client",...h});Object.setPrototypeOf(this,eE.prototype)}}class aE extends d{name="PriorRequestNotComplete";$fault="client";constructor(h){super({name:"PriorRequestNotComplete",$fault:"client",...h});Object.setPrototypeOf(this,aE.prototype)}}class pE extends d{name="PublicZoneVPCAssociation";$fault="client";constructor(h){super({name:"PublicZoneVPCAssociation",$fault:"client",...h});Object.setPrototypeOf(this,pE.prototype)}}class oE extends d{name="CidrBlockInUseException";$fault="client";Message;constructor(h){super({name:"CidrBlockInUseException",$fault:"client",...h});Object.setPrototypeOf(this,oE.prototype),this.Message=h.Message}}class uE extends d{name="CidrCollectionVersionMismatchException";$fault="client";Message;constructor(h){super({name:"CidrCollectionVersionMismatchException",$fault:"client",...h});Object.setPrototypeOf(this,uE.prototype),this.Message=h.Message}}class tE extends d{name="NoSuchCidrCollectionException";$fault="client";Message;constructor(h){super({name:"NoSuchCidrCollectionException",$fault:"client",...h});Object.setPrototypeOf(this,tE.prototype),this.Message=h.Message}}class hT extends d{name="InvalidChangeBatch";$fault="client";messages;constructor(h){super({name:"InvalidChangeBatch",$fault:"client",...h});Object.setPrototypeOf(this,hT.prototype),this.messages=h.messages}}class wT extends d{name="NoSuchHealthCheck";$fault="client";constructor(h){super({name:"NoSuchHealthCheck",$fault:"client",...h});Object.setPrototypeOf(this,wT.prototype)}}class fT extends d{name="ThrottlingException";$fault="client";constructor(h){super({name:"ThrottlingException",$fault:"client",...h});Object.setPrototypeOf(this,fT.prototype)}}class sT extends d{name="CidrCollectionAlreadyExistsException";$fault="client";Message;constructor(h){super({name:"CidrCollectionAlreadyExistsException",$fault:"client",...h});Object.setPrototypeOf(this,sT.prototype),this.Message=h.Message}}class $T extends d{name="HealthCheckAlreadyExists";$fault="client";constructor(h){super({name:"HealthCheckAlreadyExists",$fault:"client",...h});Object.setPrototypeOf(this,$T.prototype)}}class ET extends d{name="TooManyHealthChecks";$fault="client";constructor(h){super({name:"TooManyHealthChecks",$fault:"client",...h});Object.setPrototypeOf(this,ET.prototype)}}class TT extends d{name="DelegationSetNotAvailable";$fault="client";constructor(h){super({name:"DelegationSetNotAvailable",$fault:"client",...h});Object.setPrototypeOf(this,TT.prototype)}}class UT extends d{name="DelegationSetNotReusable";$fault="client";constructor(h){super({name:"DelegationSetNotReusable",$fault:"client",...h});Object.setPrototypeOf(this,UT.prototype)}}class FT extends d{name="HostedZoneAlreadyExists";$fault="client";constructor(h){super({name:"HostedZoneAlreadyExists",$fault:"client",...h});Object.setPrototypeOf(this,FT.prototype)}}class CT extends d{name="InvalidDomainName";$fault="client";constructor(h){super({name:"InvalidDomainName",$fault:"client",...h});Object.setPrototypeOf(this,CT.prototype)}}class IT extends d{name="NoSuchDelegationSet";$fault="client";constructor(h){super({name:"NoSuchDelegationSet",$fault:"client",...h});Object.setPrototypeOf(this,IT.prototype)}}class GT extends d{name="TooManyHostedZones";$fault="client";constructor(h){super({name:"TooManyHostedZones",$fault:"client",...h});Object.setPrototypeOf(this,GT.prototype)}}class BT extends d{name="InvalidArgument";$fault="client";constructor(h){super({name:"InvalidArgument",$fault:"client",...h});Object.setPrototypeOf(this,BT.prototype)}}class WT extends d{name="InvalidKeySigningKeyName";$fault="client";constructor(h){super({name:"InvalidKeySigningKeyName",$fault:"client",...h});Object.setPrototypeOf(this,WT.prototype)}}class LT extends d{name="KeySigningKeyAlreadyExists";$fault="client";constructor(h){super({name:"KeySigningKeyAlreadyExists",$fault:"client",...h});Object.setPrototypeOf(this,LT.prototype)}}class zT extends d{name="TooManyKeySigningKeys";$fault="client";constructor(h){super({name:"TooManyKeySigningKeys",$fault:"client",...h});Object.setPrototypeOf(this,zT.prototype)}}class AT extends d{name="InsufficientCloudWatchLogsResourcePolicy";$fault="client";constructor(h){super({name:"InsufficientCloudWatchLogsResourcePolicy",$fault:"client",...h});Object.setPrototypeOf(this,AT.prototype)}}class RT extends d{name="NoSuchCloudWatchLogsLogGroup";$fault="client";constructor(h){super({name:"NoSuchCloudWatchLogsLogGroup",$fault:"client",...h});Object.setPrototypeOf(this,RT.prototype)}}class XT extends d{name="QueryLoggingConfigAlreadyExists";$fault="client";constructor(h){super({name:"QueryLoggingConfigAlreadyExists",$fault:"client",...h});Object.setPrototypeOf(this,XT.prototype)}}class YT extends d{name="DelegationSetAlreadyCreated";$fault="client";constructor(h){super({name:"DelegationSetAlreadyCreated",$fault:"client",...h});Object.setPrototypeOf(this,YT.prototype)}}class ST extends d{name="DelegationSetAlreadyReusable";$fault="client";constructor(h){super({name:"DelegationSetAlreadyReusable",$fault:"client",...h});Object.setPrototypeOf(this,ST.prototype)}}class rT extends d{name="HostedZoneNotFound";$fault="client";constructor(h){super({name:"HostedZoneNotFound",$fault:"client",...h});Object.setPrototypeOf(this,rT.prototype)}}class MT extends d{name="InvalidTrafficPolicyDocument";$fault="client";constructor(h){super({name:"InvalidTrafficPolicyDocument",$fault:"client",...h});Object.setPrototypeOf(this,MT.prototype)}}class QT extends d{name="TooManyTrafficPolicies";$fault="client";constructor(h){super({name:"TooManyTrafficPolicies",$fault:"client",...h});Object.setPrototypeOf(this,QT.prototype)}}class KT extends d{name="TrafficPolicyAlreadyExists";$fault="client";constructor(h){super({name:"TrafficPolicyAlreadyExists",$fault:"client",...h});Object.setPrototypeOf(this,KT.prototype)}}class ZT extends d{name="NoSuchTrafficPolicy";$fault="client";constructor(h){super({name:"NoSuchTrafficPolicy",$fault:"client",...h});Object.setPrototypeOf(this,ZT.prototype)}}class JT extends d{name="TooManyTrafficPolicyInstances";$fault="client";constructor(h){super({name:"TooManyTrafficPolicyInstances",$fault:"client",...h});Object.setPrototypeOf(this,JT.prototype)}}class VT extends d{name="TrafficPolicyInstanceAlreadyExists";$fault="client";constructor(h){super({name:"TrafficPolicyInstanceAlreadyExists",$fault:"client",...h});Object.setPrototypeOf(this,VT.prototype)}}class PT extends d{name="TooManyTrafficPolicyVersionsForCurrentPolicy";$fault="client";constructor(h){super({name:"TooManyTrafficPolicyVersionsForCurrentPolicy",$fault:"client",...h});Object.setPrototypeOf(this,PT.prototype)}}class HT extends d{name="TooManyVPCAssociationAuthorizations";$fault="client";constructor(h){super({name:"TooManyVPCAssociationAuthorizations",$fault:"client",...h});Object.setPrototypeOf(this,HT.prototype)}}class NT extends d{name="KeySigningKeyInParentDSRecord";$fault="client";constructor(h){super({name:"KeySigningKeyInParentDSRecord",$fault:"client",...h});Object.setPrototypeOf(this,NT.prototype)}}class DT extends d{name="KeySigningKeyInUse";$fault="client";constructor(h){super({name:"KeySigningKeyInUse",$fault:"client",...h});Object.setPrototypeOf(this,DT.prototype)}}class qT extends d{name="CidrCollectionInUseException";$fault="client";Message;constructor(h){super({name:"CidrCollectionInUseException",$fault:"client",...h});Object.setPrototypeOf(this,qT.prototype),this.Message=h.Message}}class kT extends d{name="HealthCheckInUse";$fault="client";constructor(h){super({name:"HealthCheckInUse",$fault:"client",...h});Object.setPrototypeOf(this,kT.prototype)}}class jT extends d{name="HostedZoneNotEmpty";$fault="client";constructor(h){super({name:"HostedZoneNotEmpty",$fault:"client",...h});Object.setPrototypeOf(this,jT.prototype)}}class yT extends d{name="NoSuchQueryLoggingConfig";$fault="client";constructor(h){super({name:"NoSuchQueryLoggingConfig",$fault:"client",...h});Object.setPrototypeOf(this,yT.prototype)}}class OT extends d{name="DelegationSetInUse";$fault="client";constructor(h){super({name:"DelegationSetInUse",$fault:"client",...h});Object.setPrototypeOf(this,OT.prototype)}}class lT extends d{name="TrafficPolicyInUse";$fault="client";constructor(h){super({name:"TrafficPolicyInUse",$fault:"client",...h});Object.setPrototypeOf(this,lT.prototype)}}class vT extends d{name="NoSuchTrafficPolicyInstance";$fault="client";constructor(h){super({name:"NoSuchTrafficPolicyInstance",$fault:"client",...h});Object.setPrototypeOf(this,vT.prototype)}}class bT extends d{name="VPCAssociationAuthorizationNotFound";$fault="client";constructor(h){super({name:"VPCAssociationAuthorizationNotFound",$fault:"client",...h});Object.setPrototypeOf(this,bT.prototype)}}class mT extends d{name="DNSSECNotFound";$fault="client";constructor(h){super({name:"DNSSECNotFound",$fault:"client",...h});Object.setPrototypeOf(this,mT.prototype)}}class dT extends d{name="LastVPCAssociation";$fault="client";constructor(h){super({name:"LastVPCAssociation",$fault:"client",...h});Object.setPrototypeOf(this,dT.prototype)}}class iT extends d{name="VPCAssociationNotFound";$fault="client";constructor(h){super({name:"VPCAssociationNotFound",$fault:"client",...h});Object.setPrototypeOf(this,iT.prototype)}}class cT extends d{name="HostedZonePartiallyDelegated";$fault="client";constructor(h){super({name:"HostedZonePartiallyDelegated",$fault:"client",...h});Object.setPrototypeOf(this,cT.prototype)}}class gT extends d{name="KeySigningKeyWithActiveStatusNotFound";$fault="client";constructor(h){super({name:"KeySigningKeyWithActiveStatusNotFound",$fault:"client",...h});Object.setPrototypeOf(this,gT.prototype)}}class xT extends d{name="NoSuchChange";$fault="client";constructor(h){super({name:"NoSuchChange",$fault:"client",...h});Object.setPrototypeOf(this,xT.prototype)}}class _T extends d{name="NoSuchGeoLocation";$fault="client";constructor(h){super({name:"NoSuchGeoLocation",$fault:"client",...h});Object.setPrototypeOf(this,_T.prototype)}}class nT extends d{name="IncompatibleVersion";$fault="client";constructor(h){super({name:"IncompatibleVersion",$fault:"client",...h});Object.setPrototypeOf(this,nT.prototype)}}class eT extends d{name="HostedZoneNotPrivate";$fault="client";constructor(h){super({name:"HostedZoneNotPrivate",$fault:"client",...h});Object.setPrototypeOf(this,eT.prototype)}}class aT extends d{name="NoSuchCidrLocationException";$fault="client";Message;constructor(h){super({name:"NoSuchCidrLocationException",$fault:"client",...h});Object.setPrototypeOf(this,aT.prototype),this.Message=h.Message}}class pT extends d{name="InvalidPaginationToken";$fault="client";constructor(h){super({name:"InvalidPaginationToken",$fault:"client",...h});Object.setPrototypeOf(this,pT.prototype)}}class oT extends d{name="HealthCheckVersionMismatch";$fault="client";constructor(h){super({name:"HealthCheckVersionMismatch",$fault:"client",...h});Object.setPrototypeOf(this,oT.prototype)}}class uT extends d{name="ConflictingTypes";$fault="client";constructor(h){super({name:"ConflictingTypes",$fault:"client",...h});Object.setPrototypeOf(this,uT.prototype)}}var kN=async(h,w)=>{let f=i.requestBuilder(h,w),s={};f.bp("/2013-04-01/keysigningkey/{HostedZoneId}/{Name}/activate"),f.p("HostedZoneId",()=>h.HostedZoneId,"{HostedZoneId}",!1),f.p("Name",()=>h.Name,"{Name}",!1);let $;return f.m("POST").h(s).b($),f.build()},jN=async(h,w)=>{let f=i.requestBuilder(h,w),s={"content-type":"application/xml"};f.bp("/2013-04-01/hostedzone/{HostedZoneId}/associatevpc"),f.p("HostedZoneId",()=>h.HostedZoneId,"{HostedZoneId}",!1);let $;$=i0;let E=new P(Y$0);if(E.a("xmlns","https://route53.amazonaws.com/doc/2013-04-01/"),h[C0]!=null)E.c(P.of(X$0,h[C0]).n(C0));if(h[V0]!=null)E.c(b4(h[V0],w).n(V0));return $+=E.toString(),f.m("POST").h(s).b($),f.build()},yN=async(h,w)=>{let f=i.requestBuilder(h,w),s={"content-type":"application/xml"};f.bp("/2013-04-01/cidrcollection/{Id}"),f.p("Id",()=>h.Id,"{Id}",!1);let $;$=i0;let E=new P(Q$0);if(E.a("xmlns","https://route53.amazonaws.com/doc/2013-04-01/"),E.lc(h,"Changes","Changes",()=>Es0(h[rk],w)),h[tT]!=null)E.c(P.of(tT,String(h[tT])).n(tT));return $+=E.toString(),f.m("POST").h(s).b($),f.build()},ON=async(h,w)=>{let f=i.requestBuilder(h,w),s={"content-type":"application/xml"};f.bp("/2013-04-01/hostedzone/{HostedZoneId}/rrset"),f.p("HostedZoneId",()=>h.HostedZoneId,"{HostedZoneId}",!1);let $;$=i0;let E=new P(y$0);if(E.a("xmlns","https://route53.amazonaws.com/doc/2013-04-01/"),h[wU]!=null)E.c(fs0(h[wU],w).n(wU));return $+=E.toString(),f.m("POST").h(s).b($),f.build()},lN=async(h,w)=>{let f=i.requestBuilder(h,w),s={"content-type":"application/xml"};f.bp("/2013-04-01/tags/{ResourceType}/{ResourceId}"),f.p("ResourceType",()=>h.ResourceType,"{ResourceType}",!1),f.p("ResourceId",()=>h.ResourceId,"{ResourceId}",!1);let $;$=i0;let E=new P(O$0);return E.a("xmlns","https://route53.amazonaws.com/doc/2013-04-01/"),E.lc(h,"AddTags","AddTags",()=>Ys0(h[R$0],w)),E.lc(h,"RemoveTagKeys","RemoveTagKeys",()=>Xs0(h[B40],w)),$+=E.toString(),f.m("POST").h(s).b($),f.build()},vN=async(h,w)=>{let f=i.requestBuilder(h,w),s={"content-type":"application/xml"};f.bp("/2013-04-01/cidrcollection");let $;$=i0;let E=new P(K$0);if(E.a("xmlns","https://route53.amazonaws.com/doc/2013-04-01/"),h[D0]!=null)E.c(P.of(D$0,h[D0]).n(D0));if(h[p]!=null)E.c(P.of(q$0,h[p]).n(p));return $+=E.toString(),f.m("POST").h(s).b($),f.build()},bN=async(h,w)=>{let f=i.requestBuilder(h,w),s={"content-type":"application/xml"};f.bp("/2013-04-01/healthcheck");let $;$=i0;let E=new P(Z$0);if(E.a("xmlns","https://route53.amazonaws.com/doc/2013-04-01/"),h[D0]!=null)E.c(P.of(p$0,h[D0]).n(D0));if(h[Rf]!=null)E.c(Gs0(h[Rf],w).n(Rf));return $+=E.toString(),f.m("POST").h(s).b($),f.build()},mN=async(h,w)=>{let f=i.requestBuilder(h,w),s={"content-type":"application/xml"};f.bp("/2013-04-01/hostedzone");let $;$=i0;let E=new P(J$0);if(E.a("xmlns","https://route53.amazonaws.com/doc/2013-04-01/"),h[D0]!=null)E.c(P.of(j8,h[D0]).n(D0));if(h[sU]!=null)E.c(P.of(qh,h[sU]).n(sU));if(h[$U]!=null)E.c(Bs0(h[$U],w).n($U));if(h[p]!=null)E.c(P.of(Wh,h[p]).n(p));if(h[V0]!=null)E.c(b4(h[V0],w).n(V0));return $+=E.toString(),f.m("POST").h(s).b($),f.build()},dN=async(h,w)=>{let f=i.requestBuilder(h,w),s={"content-type":"application/xml"};f.bp("/2013-04-01/keysigningkey");let $;$=i0;let E=new P(V$0);if(E.a("xmlns","https://route53.amazonaws.com/doc/2013-04-01/"),h[D0]!=null)E.c(P.of(j8,h[D0]).n(D0));if(h[h0]!=null)E.c(P.of(qh,h[h0]).n(h0));if(h[_I]!=null)E.c(P.of(A40,h[_I]).n(_I));if(h[p]!=null)E.c(P.of(z40,h[p]).n(p));if(h[A1]!=null)E.c(P.of(R40,h[A1]).n(A1));return $+=E.toString(),f.m("POST").h(s).b($),f.build()},iN=async(h,w)=>{let f=i.requestBuilder(h,w),s={"content-type":"application/xml"};f.bp("/2013-04-01/queryloggingconfig");let $;$=i0;let E=new P(k$0);if(E.a("xmlns","https://route53.amazonaws.com/doc/2013-04-01/"),E.cc(h,fU),h[h0]!=null)E.c(P.of(qh,h[h0]).n(h0));return $+=E.toString(),f.m("POST").h(s).b($),f.build()},cN=async(h,w)=>{let f=i.requestBuilder(h,w),s={"content-type":"application/xml"};f.bp("/2013-04-01/delegationset");let $;$=i0;let E=new P(j$0);if(E.a("xmlns","https://route53.amazonaws.com/doc/2013-04-01/"),h[D0]!=null)E.c(P.of(j8,h[D0]).n(D0));if(h[h0]!=null)E.c(P.of(qh,h[h0]).n(h0));return $+=E.toString(),f.m("POST").h(s).b($),f.build()},gN=async(h,w)=>{let f=i.requestBuilder(h,w),s={"content-type":"application/xml"};f.bp("/2013-04-01/trafficpolicy");let $;$=i0;let E=new P(v$0);if(E.a("xmlns","https://route53.amazonaws.com/doc/2013-04-01/"),h[C0]!=null)E.c(P.of(O8,h[C0]).n(C0));if(h[th]!=null)E.c(P.of(Kk,h[th]).n(th));if(h[p]!=null)E.c(P.of(M40,h[p]).n(p));return $+=E.toString(),f.m("POST").h(s).b($),f.build()},xN=async(h,w)=>{let f=i.requestBuilder(h,w),s={"content-type":"application/xml"};f.bp("/2013-04-01/trafficpolicyinstance");let $;$=i0;let E=new P(l$0);if(E.a("xmlns","https://route53.amazonaws.com/doc/2013-04-01/"),h[h0]!=null)E.c(P.of(qh,h[h0]).n(h0));if(h[p]!=null)E.c(P.of(Wh,h[p]).n(p));if(h[p0]!=null)E.c(P.of(p0,String(h[p0])).n(p0));if(E.cc(h,F$),h[i1]!=null)E.c(P.of(i1,String(h[i1])).n(i1));return $+=E.toString(),f.m("POST").h(s).b($),f.build()},_N=async(h,w)=>{let f=i.requestBuilder(h,w),s={"content-type":"application/xml"};f.bp("/2013-04-01/trafficpolicy/{Id}"),f.p("Id",()=>h.Id,"{Id}",!1);let $;$=i0;let E=new P(b$0);if(E.a("xmlns","https://route53.amazonaws.com/doc/2013-04-01/"),h[C0]!=null)E.c(P.of(O8,h[C0]).n(C0));if(h[th]!=null)E.c(P.of(Kk,h[th]).n(th));return $+=E.toString(),f.m("POST").h(s).b($),f.build()},nN=async(h,w)=>{let f=i.requestBuilder(h,w),s={"content-type":"application/xml"};f.bp("/2013-04-01/hostedzone/{HostedZoneId}/authorizevpcassociation"),f.p("HostedZoneId",()=>h.HostedZoneId,"{HostedZoneId}",!1);let $;$=i0;let E=new P(m$0);if(E.a("xmlns","https://route53.amazonaws.com/doc/2013-04-01/"),h[V0]!=null)E.c(b4(h[V0],w).n(V0));return $+=E.toString(),f.m("POST").h(s).b($),f.build()},eN=async(h,w)=>{let f=i.requestBuilder(h,w),s={};f.bp("/2013-04-01/keysigningkey/{HostedZoneId}/{Name}/deactivate"),f.p("HostedZoneId",()=>h.HostedZoneId,"{HostedZoneId}",!1),f.p("Name",()=>h.Name,"{Name}",!1);let $;return f.m("POST").h(s).b($),f.build()},aN=async(h,w)=>{let f=i.requestBuilder(h,w),s={};f.bp("/2013-04-01/cidrcollection/{Id}"),f.p("Id",()=>h.Id,"{Id}",!1);let $;return f.m("DELETE").h(s).b($),f.build()},pN=async(h,w)=>{let f=i.requestBuilder(h,w),s={};f.bp("/2013-04-01/healthcheck/{HealthCheckId}"),f.p("HealthCheckId",()=>h.HealthCheckId,"{HealthCheckId}",!1);let $;return f.m("DELETE").h(s).b($),f.build()},oN=async(h,w)=>{let f=i.requestBuilder(h,w),s={};f.bp("/2013-04-01/hostedzone/{Id}"),f.p("Id",()=>h.Id,"{Id}",!1);let $;return f.m("DELETE").h(s).b($),f.build()},uN=async(h,w)=>{let f=i.requestBuilder(h,w),s={};f.bp("/2013-04-01/keysigningkey/{HostedZoneId}/{Name}"),f.p("HostedZoneId",()=>h.HostedZoneId,"{HostedZoneId}",!1),f.p("Name",()=>h.Name,"{Name}",!1);let $;return f.m("DELETE").h(s).b($),f.build()},tN=async(h,w)=>{let f=i.requestBuilder(h,w),s={};f.bp("/2013-04-01/queryloggingconfig/{Id}"),f.p("Id",()=>h.Id,"{Id}",!1);let $;return f.m("DELETE").h(s).b($),f.build()},hD=async(h,w)=>{let f=i.requestBuilder(h,w),s={};f.bp("/2013-04-01/delegationset/{Id}"),f.p("Id",()=>h.Id,"{Id}",!1);let $;return f.m("DELETE").h(s).b($),f.build()},wD=async(h,w)=>{let f=i.requestBuilder(h,w),s={};f.bp("/2013-04-01/trafficpolicy/{Id}/{Version}"),f.p("Id",()=>h.Id,"{Id}",!1),f.p("Version",()=>h.Version.toString(),"{Version}",!1);let $;return f.m("DELETE").h(s).b($),f.build()},fD=async(h,w)=>{let f=i.requestBuilder(h,w),s={};f.bp("/2013-04-01/trafficpolicyinstance/{Id}"),f.p("Id",()=>h.Id,"{Id}",!1);let $;return f.m("DELETE").h(s).b($),f.build()},sD=async(h,w)=>{let f=i.requestBuilder(h,w),s={"content-type":"application/xml"};f.bp("/2013-04-01/hostedzone/{HostedZoneId}/deauthorizevpcassociation"),f.p("HostedZoneId",()=>h.HostedZoneId,"{HostedZoneId}",!1);let $;$=i0;let E=new P(i$0);if(E.a("xmlns","https://route53.amazonaws.com/doc/2013-04-01/"),h[V0]!=null)E.c(b4(h[V0],w).n(V0));return $+=E.toString(),f.m("POST").h(s).b($),f.build()},$D=async(h,w)=>{let f=i.requestBuilder(h,w),s={};f.bp("/2013-04-01/hostedzone/{HostedZoneId}/disable-dnssec"),f.p("HostedZoneId",()=>h.HostedZoneId,"{HostedZoneId}",!1);let $;return f.m("POST").h(s).b($),f.build()},ED=async(h,w)=>{let f=i.requestBuilder(h,w),s={"content-type":"application/xml"};f.bp("/2013-04-01/hostedzone/{HostedZoneId}/disassociatevpc"),f.p("HostedZoneId",()=>h.HostedZoneId,"{HostedZoneId}",!1);let $;$=i0;let E=new P(g$0);if(E.a("xmlns","https://route53.amazonaws.com/doc/2013-04-01/"),h[C0]!=null)E.c(P.of(c$0,h[C0]).n(C0));if(h[V0]!=null)E.c(b4(h[V0],w).n(V0));return $+=E.toString(),f.m("POST").h(s).b($),f.build()},TD=async(h,w)=>{let f=i.requestBuilder(h,w),s={};f.bp("/2013-04-01/hostedzone/{HostedZoneId}/enable-dnssec"),f.p("HostedZoneId",()=>h.HostedZoneId,"{HostedZoneId}",!1);let $;return f.m("POST").h(s).b($),f.build()},UD=async(h,w)=>{let f=i.requestBuilder(h,w),s={};f.bp("/2013-04-01/accountlimit/{Type}"),f.p("Type",()=>h.Type,"{Type}",!1);let $;return f.m("GET").h(s).b($),f.build()},FD=async(h,w)=>{let f=i.requestBuilder(h,w),s={};f.bp("/2013-04-01/change/{Id}"),f.p("Id",()=>h.Id,"{Id}",!1);let $;return f.m("GET").h(s).b($),f.build()},CD=async(h,w)=>{let f=i.requestBuilder(h,w),s={};f.bp("/2013-04-01/checkeripranges");let $;return f.m("GET").h(s).b($),f.build()},ID=async(h,w)=>{let f=i.requestBuilder(h,w),s={};f.bp("/2013-04-01/hostedzone/{HostedZoneId}/dnssec"),f.p("HostedZoneId",()=>h.HostedZoneId,"{HostedZoneId}",!1);let $;return f.m("GET").h(s).b($),f.build()},GD=async(h,w)=>{let f=i.requestBuilder(h,w),s={};f.bp("/2013-04-01/geolocation");let $=r({[N40]:[,h[Nh]],[D40]:[,h[Dh]],[i40]:[,h[kh]]}),E;return f.m("GET").h(s).q($).b(E),f.build()},BD=async(h,w)=>{let f=i.requestBuilder(h,w),s={};f.bp("/2013-04-01/healthcheck/{HealthCheckId}"),f.p("HealthCheckId",()=>h.HealthCheckId,"{HealthCheckId}",!1);let $;return f.m("GET").h(s).b($),f.build()},WD=async(h,w)=>{let f=i.requestBuilder(h,w),s={};f.bp("/2013-04-01/healthcheckcount");let $;return f.m("GET").h(s).b($),f.build()},LD=async(h,w)=>{let f=i.requestBuilder(h,w),s={};f.bp("/2013-04-01/healthcheck/{HealthCheckId}/lastfailurereason"),f.p("HealthCheckId",()=>h.HealthCheckId,"{HealthCheckId}",!1);let $;return f.m("GET").h(s).b($),f.build()},zD=async(h,w)=>{let f=i.requestBuilder(h,w),s={};f.bp("/2013-04-01/healthcheck/{HealthCheckId}/status"),f.p("HealthCheckId",()=>h.HealthCheckId,"{HealthCheckId}",!1);let $;return f.m("GET").h(s).b($),f.build()},AD=async(h,w)=>{let f=i.requestBuilder(h,w),s={};f.bp("/2013-04-01/hostedzone/{Id}"),f.p("Id",()=>h.Id,"{Id}",!1);let $;return f.m("GET").h(s).b($),f.build()},RD=async(h,w)=>{let f=i.requestBuilder(h,w),s={};f.bp("/2013-04-01/hostedzonecount");let $;return f.m("GET").h(s).b($),f.build()},XD=async(h,w)=>{let f=i.requestBuilder(h,w),s={};f.bp("/2013-04-01/hostedzonelimit/{HostedZoneId}/{Type}"),f.p("Type",()=>h.Type,"{Type}",!1),f.p("HostedZoneId",()=>h.HostedZoneId,"{HostedZoneId}",!1);let $;return f.m("GET").h(s).b($),f.build()},YD=async(h,w)=>{let f=i.requestBuilder(h,w),s={};f.bp("/2013-04-01/queryloggingconfig/{Id}"),f.p("Id",()=>h.Id,"{Id}",!1);let $;return f.m("GET").h(s).b($),f.build()},SD=async(h,w)=>{let f=i.requestBuilder(h,w),s={};f.bp("/2013-04-01/delegationset/{Id}"),f.p("Id",()=>h.Id,"{Id}",!1);let $;return f.m("GET").h(s).b($),f.build()},rD=async(h,w)=>{let f=i.requestBuilder(h,w),s={};f.bp("/2013-04-01/reusabledelegationsetlimit/{DelegationSetId}/{Type}"),f.p("Type",()=>h.Type,"{Type}",!1),f.p("DelegationSetId",()=>h.DelegationSetId,"{DelegationSetId}",!1);let $;return f.m("GET").h(s).b($),f.build()},MD=async(h,w)=>{let f=i.requestBuilder(h,w),s={};f.bp("/2013-04-01/trafficpolicy/{Id}/{Version}"),f.p("Id",()=>h.Id,"{Id}",!1),f.p("Version",()=>h.Version.toString(),"{Version}",!1);let $;return f.m("GET").h(s).b($),f.build()},QD=async(h,w)=>{let f=i.requestBuilder(h,w),s={};f.bp("/2013-04-01/trafficpolicyinstance/{Id}"),f.p("Id",()=>h.Id,"{Id}",!1);let $;return f.m("GET").h(s).b($),f.build()},KD=async(h,w)=>{let f=i.requestBuilder(h,w),s={};f.bp("/2013-04-01/trafficpolicyinstancecount");let $;return f.m("GET").h(s).b($),f.build()},ZD=async(h,w)=>{let f=i.requestBuilder(h,w),s={};f.bp("/2013-04-01/cidrcollection/{CollectionId}/cidrblocks"),f.p("CollectionId",()=>h.CollectionId,"{CollectionId}",!1);let $=r({[jh]:[,h[U1]],[I$]:[,h[q0]],[g4]:[()=>h.MaxResults!==void 0,()=>h[i4].toString()]}),E;return f.m("GET").h(s).q($).b(E),f.build()},JD=async(h,w)=>{let f=i.requestBuilder(h,w),s={};f.bp("/2013-04-01/cidrcollection");let $=r({[I$]:[,h[q0]],[g4]:[()=>h.MaxResults!==void 0,()=>h[i4].toString()]}),E;return f.m("GET").h(s).q($).b(E),f.build()},VD=async(h,w)=>{let f=i.requestBuilder(h,w),s={};f.bp("/2013-04-01/cidrcollection/{CollectionId}"),f.p("CollectionId",()=>h.CollectionId,"{CollectionId}",!1);let $=r({[I$]:[,h[q0]],[g4]:[()=>h.MaxResults!==void 0,()=>h[i4].toString()]}),E;return f.m("GET").h(s).q($).b(E),f.build()},PD=async(h,w)=>{let f=i.requestBuilder(h,w),s={};f.bp("/2013-04-01/geolocations");let $=r({[c40]:[,h[W40]],[g40]:[,h[L40]],[x40]:[,h[r40]],[n1]:[()=>h.MaxItems!==void 0,()=>h[o].toString()]}),E;return f.m("GET").h(s).q($).b(E),f.build()},HD=async(h,w)=>{let f=i.requestBuilder(h,w),s={};f.bp("/2013-04-01/healthcheck");let $=r({[l8]:[,h[c1]],[n1]:[()=>h.MaxItems!==void 0,()=>h[o].toString()]}),E;return f.m("GET").h(s).q($).b(E),f.build()},ND=async(h,w)=>{let f=i.requestBuilder(h,w),s={};f.bp("/2013-04-01/hostedzone");let $=r({[l8]:[,h[c1]],[n1]:[()=>h.MaxItems!==void 0,()=>h[o].toString()],[q40]:[,h[sU]],[O40]:[,h[t$0]]}),E;return f.m("GET").h(s).q($).b(E),f.build()},DD=async(h,w)=>{let f=i.requestBuilder(h,w),s={};f.bp("/2013-04-01/hostedzonesbyname");let $=r({[k40]:[,h[Wh]],[c4]:[,h[h0]],[n1]:[()=>h.MaxItems!==void 0,()=>h[o].toString()]}),E;return f.m("GET").h(s).q($).b(E),f.build()},qD=async(h,w)=>{let f=i.requestBuilder(h,w),s={};f.bp("/2013-04-01/hostedzonesbyvpc");let $=r({[a40]:[,y(h[l4],"VPCId")],[o40]:[,y(h[v4],"VPCRegion")],[n1]:[()=>h.MaxItems!==void 0,()=>h[o].toString()],[I$]:[,h[q0]]}),E;return f.m("GET").h(s).q($).b(E),f.build()},kD=async(h,w)=>{let f=i.requestBuilder(h,w),s={};f.bp("/2013-04-01/queryloggingconfig");let $=r({[c4]:[,h[h0]],[I$]:[,h[q0]],[g4]:[()=>h.MaxResults!==void 0,()=>h[i4].toString()]}),E;return f.m("GET").h(s).q($).b(E),f.build()},jD=async(h,w)=>{let f=i.requestBuilder(h,w),s={};f.bp("/2013-04-01/hostedzone/{HostedZoneId}/rrset"),f.p("HostedZoneId",()=>h.HostedZoneId,"{HostedZoneId}",!1);let $=r({[v40]:[,h[Y40]],[_40]:[,h[S40]],[l40]:[,h[X40]],[n1]:[()=>h.MaxItems!==void 0,()=>h[o].toString()]}),E;return f.m("GET").h(s).q($).b(E),f.build()},yD=async(h,w)=>{let f=i.requestBuilder(h,w),s={};f.bp("/2013-04-01/delegationset");let $=r({[l8]:[,h[c1]],[n1]:[()=>h.MaxItems!==void 0,()=>h[o].toString()]}),E;return f.m("GET").h(s).q($).b(E),f.build()},OD=async(h,w)=>{let f=i.requestBuilder(h,w),s={};f.bp("/2013-04-01/tags/{ResourceType}/{ResourceId}"),f.p("ResourceType",()=>h.ResourceType,"{ResourceType}",!1),f.p("ResourceId",()=>h.ResourceId,"{ResourceId}",!1);let $;return f.m("GET").h(s).b($),f.build()},lD=async(h,w)=>{let f=i.requestBuilder(h,w),s={"content-type":"application/xml"};f.bp("/2013-04-01/tags/{ResourceType}"),f.p("ResourceType",()=>h.ResourceType,"{ResourceType}",!1);let $;$=i0;let E=new P(w40);return E.a("xmlns","https://route53.amazonaws.com/doc/2013-04-01/"),E.lc(h,"ResourceIds","ResourceIds",()=>Ss0(h[E40],w)),$+=E.toString(),f.m("POST").h(s).b($),f.build()},vD=async(h,w)=>{let f=i.requestBuilder(h,w),s={};f.bp("/2013-04-01/trafficpolicies");let $=r({[n40]:[,h[BU]],[n1]:[()=>h.MaxItems!==void 0,()=>h[o].toString()]}),E;return f.m("GET").h(s).q($).b(E),f.build()},bD=async(h,w)=>{let f=i.requestBuilder(h,w),s={};f.bp("/2013-04-01/trafficpolicyinstances");let $=r({[c4]:[,h[yw]],[v8]:[,h[g1]],[b8]:[,h[x1]],[n1]:[()=>h.MaxItems!==void 0,()=>h[o].toString()]}),E;return f.m("GET").h(s).q($).b(E),f.build()},mD=async(h,w)=>{let f=i.requestBuilder(h,w),s={};f.bp("/2013-04-01/trafficpolicyinstances/hostedzone");let $=r({[Zk]:[,y(h[h0],"HostedZoneId")],[v8]:[,h[g1]],[b8]:[,h[x1]],[n1]:[()=>h.MaxItems!==void 0,()=>h[o].toString()]}),E;return f.m("GET").h(s).q($).b(E),f.build()},dD=async(h,w)=>{let f=i.requestBuilder(h,w),s={};f.bp("/2013-04-01/trafficpolicyinstances/trafficpolicy");let $=r({[Zk]:[,y(h[F$],"TrafficPolicyId")],[p40]:[y(h.TrafficPolicyVersion,"TrafficPolicyVersion")!=null,()=>h[i1].toString()],[c4]:[,h[yw]],[v8]:[,h[g1]],[b8]:[,h[x1]],[n1]:[()=>h.MaxItems!==void 0,()=>h[o].toString()]}),E;return f.m("GET").h(s).q($).b(E),f.build()},iD=async(h,w)=>{let f=i.requestBuilder(h,w),s={};f.bp("/2013-04-01/trafficpolicies/{Id}/versions"),f.p("Id",()=>h.Id,"{Id}",!1);let $=r({[e40]:[,h[WU]],[n1]:[()=>h.MaxItems!==void 0,()=>h[o].toString()]}),E;return f.m("GET").h(s).q($).b(E),f.build()},cD=async(h,w)=>{let f=i.requestBuilder(h,w),s={};f.bp("/2013-04-01/hostedzone/{HostedZoneId}/authorizevpcassociation"),f.p("HostedZoneId",()=>h.HostedZoneId,"{HostedZoneId}",!1);let $=r({[I$]:[,h[q0]],[g4]:[()=>h.MaxResults!==void 0,()=>h[i4].toString()]}),E;return f.m("GET").h(s).q($).b(E),f.build()},gD=async(h,w)=>{let f=i.requestBuilder(h,w),s={};f.bp("/2013-04-01/testdnsanswer");let $=r({[c4]:[,y(h[h0],"HostedZoneId")],[b40]:[,y(h[CU],"RecordName")],[m40]:[,y(h[IU],"RecordType")],[d40]:[,h[$40]],[j40]:[,h[x$0]],[y40]:[,h[_$0]]}),E;return f.m("GET").h(s).q($).b(E),f.build()},xD=async(h,w)=>{let f=i.requestBuilder(h,w),s={"content-type":"application/xml"};f.bp("/2013-04-01/healthcheck/{HealthCheckId}"),f.p("HealthCheckId",()=>h.HealthCheckId,"{HealthCheckId}",!1);let $;$=i0;let E=new P(Z40);if(E.a("xmlns","https://route53.amazonaws.com/doc/2013-04-01/"),h[Hh]!=null)E.c(Gk(h[Hh],w).n(Hh));if(E.lc(h,"ChildHealthChecks","ChildHealthChecks",()=>Bk(h[Tf],w)),h[Uh]!=null)E.c(P.of(Uh,String(h[Uh])).n(Uh));if(h[Fh]!=null)E.c(P.of(Fh,String(h[Fh])).n(Fh));if(h[Ch]!=null)E.c(P.of(Ch,String(h[Ch])).n(Ch));if(E.cc(h,N4),h[Cf]!=null)E.c(P.of(Cf,String(h[Cf])).n(Cf));if(h[Ih]!=null)E.c(P.of(Ih,String(h[Ih])).n(Ih));if(E.cc(h,Ow),E.cc(h,k4),h[Gh]!=null)E.c(P.of(Gh,String(h[Gh])).n(Gh));if(h[Bh]!=null)E.c(P.of(Bh,String(h[Bh])).n(Bh));return E.lc(h,"Regions","Regions",()=>Wk(h[Uf],w)),E.lc(h,"ResetElements","ResetElements",()=>Ws0(h[s40],w)),E.cc(h,j4),E.cc(h,O4),$+=E.toString(),f.m("POST").h(s).b($),f.build()},_D=async(h,w)=>{let f=i.requestBuilder(h,w),s={"content-type":"application/xml"};f.bp("/2013-04-01/hostedzone/{Id}"),f.p("Id",()=>h.Id,"{Id}",!1);let $;$=i0;let E=new P(J40);if(E.a("xmlns","https://route53.amazonaws.com/doc/2013-04-01/"),h[C0]!=null)E.c(P.of(y8,h[C0]).n(C0));return $+=E.toString(),f.m("POST").h(s).b($),f.build()},nD=async(h,w)=>{let f=i.requestBuilder(h,w),s={"content-type":"application/xml"};f.bp("/2013-04-01/trafficpolicy/{Id}/{Version}"),f.p("Id",()=>h.Id,"{Id}",!1),f.p("Version",()=>h.Version.toString(),"{Version}",!1);let $;$=i0;let E=new P(V40);if(E.a("xmlns","https://route53.amazonaws.com/doc/2013-04-01/"),h[C0]!=null)E.c(P.of(O8,h[C0]).n(C0));return $+=E.toString(),f.m("POST").h(s).b($),f.build()},eD=async(h,w)=>{let f=i.requestBuilder(h,w),s={"content-type":"application/xml"};f.bp("/2013-04-01/trafficpolicyinstance/{Id}"),f.p("Id",()=>h.Id,"{Id}",!1);let $;$=i0;let E=new P(P40);if(E.a("xmlns","https://route53.amazonaws.com/doc/2013-04-01/"),h[p0]!=null)E.c(P.of(p0,String(h[p0])).n(p0));if(E.cc(h,F$),h[i1]!=null)E.c(P.of(i1,String(h[i1])).n(i1));return $+=E.toString(),f.m("POST").h(s).b($),f.build()},aD=async(h,w)=>{if(h.statusCode!==200&&h.statusCode>=300)return c(h,w);let f=r({$metadata:Z(h)}),s=y(x(await n.parseXmlBody(h.body,w)),"body");if(s[s0]!=null)f[s0]=_1(s[s0],w);return f},pD=async(h,w)=>{if(h.statusCode!==200&&h.statusCode>=300)return c(h,w);let f=r({$metadata:Z(h)}),s=y(x(await n.parseXmlBody(h.body,w)),"body");if(s[s0]!=null)f[s0]=_1(s[s0],w);return f},oD=async(h,w)=>{if(h.statusCode!==200&&h.statusCode>=300)return c(h,w);let f=r({$metadata:Z(h)}),s=y(x(await n.parseXmlBody(h.body,w)),"body");if(s[G0]!=null)f[G0]=W(s[G0]);return f},uD=async(h,w)=>{if(h.statusCode!==200&&h.statusCode>=300)return c(h,w);let f=r({$metadata:Z(h)}),s=y(x(await n.parseXmlBody(h.body,w)),"body");if(s[s0]!=null)f[s0]=_1(s[s0],w);return f},tD=async(h,w)=>{if(h.statusCode!==200&&h.statusCode>=300)return c(h,w);let f=r({$metadata:Z(h)});return await L1.collectBody(h.body,w),f},hq=async(h,w)=>{if(h.statusCode!==201&&h.statusCode>=300)return c(h,w);let f=r({$metadata:Z(h),[sw]:[,h.headers[jh]]}),s=y(x(await n.parseXmlBody(h.body,w)),"body");if(s[kI]!=null)f[kI]=Ps0(s[kI],w);return f},wq=async(h,w)=>{if(h.statusCode!==201&&h.statusCode>=300)return c(h,w);let f=r({$metadata:Z(h),[sw]:[,h.headers[jh]]}),s=y(x(await n.parseXmlBody(h.body,w)),"body");if(s[Lh]!=null)f[Lh]=RU(s[Lh],w);return f},fq=async(h,w)=>{if(h.statusCode!==201&&h.statusCode>=300)return c(h,w);let f=r({$metadata:Z(h),[sw]:[,h.headers[jh]]}),s=y(x(await n.parseXmlBody(h.body,w)),"body");if(s[s0]!=null)f[s0]=_1(s[s0],w);if(s[M1]!=null)f[M1]=m4(s[M1],w);if(s[J1]!=null)f[J1]=XU(s[J1],w);if(s[V0]!=null)f[V0]=k8(s[V0],w);return f},sq=async(h,w)=>{if(h.statusCode!==201&&h.statusCode>=300)return c(h,w);let f=r({$metadata:Z(h),[sw]:[,h.headers[jh]]}),s=y(x(await n.parseXmlBody(h.body,w)),"body");if(s[s0]!=null)f[s0]=_1(s[s0],w);if(s[nI]!=null)f[nI]=Rk(s[nI],w);return f},$q=async(h,w)=>{if(h.statusCode!==201&&h.statusCode>=300)return c(h,w);let f=r({$metadata:Z(h),[sw]:[,h.headers[jh]]}),s=y(x(await n.parseXmlBody(h.body,w)),"body");if(s[lw]!=null)f[lw]=D8(s[lw],w);return f},Eq=async(h,w)=>{if(h.statusCode!==201&&h.statusCode>=300)return c(h,w);let f=r({$metadata:Z(h),[sw]:[,h.headers[jh]]}),s=y(x(await n.parseXmlBody(h.body,w)),"body");if(s[M1]!=null)f[M1]=m4(s[M1],w);return f},Tq=async(h,w)=>{if(h.statusCode!==201&&h.statusCode>=300)return c(h,w);let f=r({$metadata:Z(h),[sw]:[,h.headers[jh]]}),s=y(x(await n.parseXmlBody(h.body,w)),"body");if(s[Q1]!=null)f[Q1]=d4(s[Q1],w);return f},Uq=async(h,w)=>{if(h.statusCode!==201&&h.statusCode>=300)return c(h,w);let f=r({$metadata:Z(h),[sw]:[,h.headers[jh]]}),s=y(x(await n.parseXmlBody(h.body,w)),"body");if(s[R1]!=null)f[R1]=YU(s[R1],w);return f},Fq=async(h,w)=>{if(h.statusCode!==201&&h.statusCode>=300)return c(h,w);let f=r({$metadata:Z(h),[sw]:[,h.headers[jh]]}),s=y(x(await n.parseXmlBody(h.body,w)),"body");if(s[Q1]!=null)f[Q1]=d4(s[Q1],w);return f},Cq=async(h,w)=>{if(h.statusCode!==200&&h.statusCode>=300)return c(h,w);let f=r({$metadata:Z(h)}),s=y(x(await n.parseXmlBody(h.body,w)),"body");if(s[h0]!=null)f[h0]=W(s[h0]);if(s[V0]!=null)f[V0]=k8(s[V0],w);return f},Iq=async(h,w)=>{if(h.statusCode!==200&&h.statusCode>=300)return c(h,w);let f=r({$metadata:Z(h)}),s=y(x(await n.parseXmlBody(h.body,w)),"body");if(s[s0]!=null)f[s0]=_1(s[s0],w);return f},Gq=async(h,w)=>{if(h.statusCode!==200&&h.statusCode>=300)return c(h,w);let f=r({$metadata:Z(h)});return await L1.collectBody(h.body,w),f},Bq=async(h,w)=>{if(h.statusCode!==200&&h.statusCode>=300)return c(h,w);let f=r({$metadata:Z(h)});return await L1.collectBody(h.body,w),f},Wq=async(h,w)=>{if(h.statusCode!==200&&h.statusCode>=300)return c(h,w);let f=r({$metadata:Z(h)}),s=y(x(await n.parseXmlBody(h.body,w)),"body");if(s[s0]!=null)f[s0]=_1(s[s0],w);return f},Lq=async(h,w)=>{if(h.statusCode!==200&&h.statusCode>=300)return c(h,w);let f=r({$metadata:Z(h)}),s=y(x(await n.parseXmlBody(h.body,w)),"body");if(s[s0]!=null)f[s0]=_1(s[s0],w);return f},zq=async(h,w)=>{if(h.statusCode!==200&&h.statusCode>=300)return c(h,w);let f=r({$metadata:Z(h)});return await L1.collectBody(h.body,w),f},Aq=async(h,w)=>{if(h.statusCode!==200&&h.statusCode>=300)return c(h,w);let f=r({$metadata:Z(h)});return await L1.collectBody(h.body,w),f},Rq=async(h,w)=>{if(h.statusCode!==200&&h.statusCode>=300)return c(h,w);let f=r({$metadata:Z(h)});return await L1.collectBody(h.body,w),f},Xq=async(h,w)=>{if(h.statusCode!==200&&h.statusCode>=300)return c(h,w);let f=r({$metadata:Z(h)});return await L1.collectBody(h.body,w),f},Yq=async(h,w)=>{if(h.statusCode!==200&&h.statusCode>=300)return c(h,w);let f=r({$metadata:Z(h)});return await L1.collectBody(h.body,w),f},Sq=async(h,w)=>{if(h.statusCode!==200&&h.statusCode>=300)return c(h,w);let f=r({$metadata:Z(h)}),s=y(x(await n.parseXmlBody(h.body,w)),"body");if(s[s0]!=null)f[s0]=_1(s[s0],w);return f},rq=async(h,w)=>{if(h.statusCode!==200&&h.statusCode>=300)return c(h,w);let f=r({$metadata:Z(h)}),s=y(x(await n.parseXmlBody(h.body,w)),"body");if(s[s0]!=null)f[s0]=_1(s[s0],w);return f},Mq=async(h,w)=>{if(h.statusCode!==200&&h.statusCode>=300)return c(h,w);let f=r({$metadata:Z(h)}),s=y(x(await n.parseXmlBody(h.body,w)),"body");if(s[s0]!=null)f[s0]=_1(s[s0],w);return f},Qq=async(h,w)=>{if(h.statusCode!==200&&h.statusCode>=300)return c(h,w);let f=r({$metadata:Z(h)}),s=y(x(await n.parseXmlBody(h.body,w)),"body");if(s[uh]!=null)f[uh]=E1(s[uh]);if(s[hw]!=null)f[hw]=rs0(s[hw],w);return f},Kq=async(h,w)=>{if(h.statusCode!==200&&h.statusCode>=300)return c(h,w);let f=r({$metadata:Z(h)}),s=y(x(await n.parseXmlBody(h.body,w)),"body");if(s[s0]!=null)f[s0]=_1(s[s0],w);return f},Zq=async(h,w)=>{if(h.statusCode!==200&&h.statusCode>=300)return c(h,w);let f=r({$metadata:Z(h)}),s=y(x(await n.parseXmlBody(h.body,w)),"body");if(s.CheckerIpRanges==="")f[W4]=[];else if(s[W4]!=null&&s[W4][zh]!=null)f[W4]=Ks0(L0(s[W4][zh]),w);return f},Jq=async(h,w)=>{if(h.statusCode!==200&&h.statusCode>=300)return c(h,w);let f=r({$metadata:Z(h)}),s=y(x(await n.parseXmlBody(h.body,w)),"body");if(s.KeySigningKeys==="")f[S4]=[];else if(s[S4]!=null&&s[S4][zh]!=null)f[S4]=us0(L0(s[S4][zh]),w);if(s[A1]!=null)f[A1]=vs0(s[A1],w);return f},Vq=async(h,w)=>{if(h.statusCode!==200&&h.statusCode>=300)return c(h,w);let f=r({$metadata:Z(h)}),s=y(x(await n.parseXmlBody(h.body,w)),"body");if(s[D4]!=null)f[D4]=Lk(s[D4],w);return f},Pq=async(h,w)=>{if(h.statusCode!==200&&h.statusCode>=300)return c(h,w);let f=r({$metadata:Z(h)}),s=y(x(await n.parseXmlBody(h.body,w)),"body");if(s[Lh]!=null)f[Lh]=RU(s[Lh],w);return f},Hq=async(h,w)=>{if(h.statusCode!==200&&h.statusCode>=300)return c(h,w);let f=r({$metadata:Z(h)}),s=y(x(await n.parseXmlBody(h.body,w)),"body");if(s[cI]!=null)f[cI]=E1(s[cI]);return f},Nq=async(h,w)=>{if(h.statusCode!==200&&h.statusCode>=300)return c(h,w);let f=r({$metadata:Z(h)}),s=y(x(await n.parseXmlBody(h.body,w)),"body");if(s.HealthCheckObservations==="")f[Jh]=[];else if(s[Jh]!=null&&s[Jh][LU]!=null)f[Jh]=zk(L0(s[Jh][LU]),w);return f},Dq=async(h,w)=>{if(h.statusCode!==200&&h.statusCode>=300)return c(h,w);let f=r({$metadata:Z(h)}),s=y(x(await n.parseXmlBody(h.body,w)),"body");if(s.HealthCheckObservations==="")f[Jh]=[];else if(s[Jh]!=null&&s[Jh][LU]!=null)f[Jh]=zk(L0(s[Jh][LU]),w);return f},qq=async(h,w)=>{if(h.statusCode!==200&&h.statusCode>=300)return c(h,w);let f=r({$metadata:Z(h)}),s=y(x(await n.parseXmlBody(h.body,w)),"body");if(s[M1]!=null)f[M1]=m4(s[M1],w);if(s[J1]!=null)f[J1]=XU(s[J1],w);if(s.VPCs==="")f[Ph]=[];else if(s[Ph]!=null&&s[Ph][V0]!=null)f[Ph]=Sk(L0(s[Ph][V0]),w);return f},kq=async(h,w)=>{if(h.statusCode!==200&&h.statusCode>=300)return c(h,w);let f=r({$metadata:Z(h)}),s=y(x(await n.parseXmlBody(h.body,w)),"body");if(s[gI]!=null)f[gI]=E1(s[gI]);return f},jq=async(h,w)=>{if(h.statusCode!==200&&h.statusCode>=300)return c(h,w);let f=r({$metadata:Z(h)}),s=y(x(await n.parseXmlBody(h.body,w)),"body");if(s[uh]!=null)f[uh]=E1(s[uh]);if(s[hw]!=null)f[hw]=es0(s[hw],w);return f},yq=async(h,w)=>{if(h.statusCode!==200&&h.statusCode>=300)return c(h,w);let f=r({$metadata:Z(h)}),s=y(x(await n.parseXmlBody(h.body,w)),"body");if(s[lw]!=null)f[lw]=D8(s[lw],w);return f},Oq=async(h,w)=>{if(h.statusCode!==200&&h.statusCode>=300)return c(h,w);let f=r({$metadata:Z(h)}),s=y(x(await n.parseXmlBody(h.body,w)),"body");if(s[M1]!=null)f[M1]=m4(s[M1],w);return f},lq=async(h,w)=>{if(h.statusCode!==200&&h.statusCode>=300)return c(h,w);let f=r({$metadata:Z(h)}),s=y(x(await n.parseXmlBody(h.body,w)),"body");if(s[uh]!=null)f[uh]=E1(s[uh]);if(s[hw]!=null)f[hw]=F$0(s[hw],w);return f},vq=async(h,w)=>{if(h.statusCode!==200&&h.statusCode>=300)return c(h,w);let f=r({$metadata:Z(h)}),s=y(x(await n.parseXmlBody(h.body,w)),"body");if(s[Q1]!=null)f[Q1]=d4(s[Q1],w);return f},bq=async(h,w)=>{if(h.statusCode!==200&&h.statusCode>=300)return c(h,w);let f=r({$metadata:Z(h)}),s=y(x(await n.parseXmlBody(h.body,w)),"body");if(s[R1]!=null)f[R1]=YU(s[R1],w);return f},mq=async(h,w)=>{if(h.statusCode!==200&&h.statusCode>=300)return c(h,w);let f=r({$metadata:Z(h)}),s=y(x(await n.parseXmlBody(h.body,w)),"body");if(s[V8]!=null)f[V8]=r0(s[V8]);return f},dq=async(h,w)=>{if(h.statusCode!==200&&h.statusCode>=300)return c(h,w);let f=r({$metadata:Z(h)}),s=y(x(await n.parseXmlBody(h.body,w)),"body");if(s.CidrBlocks==="")f[G4]=[];else if(s[G4]!=null&&s[G4][zh]!=null)f[G4]=Js0(L0(s[G4][zh]),w);if(s[q0]!=null)f[q0]=W(s[q0]);return f},iq=async(h,w)=>{if(h.statusCode!==200&&h.statusCode>=300)return c(h,w);let f=r({$metadata:Z(h)}),s=y(x(await n.parseXmlBody(h.body,w)),"body");if(s.CidrCollections==="")f[B4]=[];else if(s[B4]!=null&&s[B4][zh]!=null)f[B4]=Ds0(L0(s[B4][zh]),w);if(s[q0]!=null)f[q0]=W(s[q0]);return f},cq=async(h,w)=>{if(h.statusCode!==200&&h.statusCode>=300)return c(h,w);let f=r({$metadata:Z(h)}),s=y(x(await n.parseXmlBody(h.body,w)),"body");if(s.CidrLocations==="")f[L4]=[];else if(s[L4]!=null&&s[L4][zh]!=null)f[L4]=ts0(L0(s[L4][zh]),w);if(s[q0]!=null)f[q0]=W(s[q0]);return f},gq=async(h,w)=>{if(h.statusCode!==200&&h.statusCode>=300)return c(h,w);let f=r({$metadata:Z(h)}),s=y(x(await n.parseXmlBody(h.body,w)),"body");if(s.GeoLocationDetailsList==="")f[R4]=[];else if(s[R4]!=null&&s[R4][D4]!=null)f[R4]=ds0(L0(s[R4][D4]),w);if(s[I0]!=null)f[I0]=n0(s[I0]);if(s[o]!=null)f[o]=r0(s[o]);if(s[uI]!=null)f[uI]=W(s[uI]);if(s[tI]!=null)f[tI]=W(s[tI]);if(s[E8]!=null)f[E8]=W(s[E8]);return f},xq=async(h,w)=>{if(h.statusCode!==200&&h.statusCode>=300)return c(h,w);let f=r({$metadata:Z(h)}),s=y(x(await n.parseXmlBody(h.body,w)),"body");if(s.HealthChecks==="")f[X4]=[];else if(s[X4]!=null&&s[X4][Lh]!=null)f[X4]=_s0(L0(s[X4][Lh]),w);if(s[I0]!=null)f[I0]=n0(s[I0]);if(s[c1]!=null)f[c1]=W(s[c1]);if(s[o]!=null)f[o]=r0(s[o]);if(s[ww]!=null)f[ww]=W(s[ww]);return f},_q=async(h,w)=>{if(h.statusCode!==200&&h.statusCode>=300)return c(h,w);let f=r({$metadata:Z(h)}),s=y(x(await n.parseXmlBody(h.body,w)),"body");if(s.HostedZones==="")f[Vh]=[];else if(s[Vh]!=null&&s[Vh][J1]!=null)f[Vh]=Ak(L0(s[Vh][J1]),w);if(s[I0]!=null)f[I0]=n0(s[I0]);if(s[c1]!=null)f[c1]=W(s[c1]);if(s[o]!=null)f[o]=r0(s[o]);if(s[ww]!=null)f[ww]=W(s[ww]);return f},nq=async(h,w)=>{if(h.statusCode!==200&&h.statusCode>=300)return c(h,w);let f=r({$metadata:Z(h)}),s=y(x(await n.parseXmlBody(h.body,w)),"body");if(s[Wh]!=null)f[Wh]=W(s[Wh]);if(s[h0]!=null)f[h0]=W(s[h0]);if(s.HostedZones==="")f[Vh]=[];else if(s[Vh]!=null&&s[Vh][J1]!=null)f[Vh]=Ak(L0(s[Vh][J1]),w);if(s[I0]!=null)f[I0]=n0(s[I0]);if(s[o]!=null)f[o]=r0(s[o]);if(s[h8]!=null)f[h8]=W(s[h8]);if(s[w8]!=null)f[w8]=W(s[w8]);return f},eq=async(h,w)=>{if(h.statusCode!==200&&h.statusCode>=300)return c(h,w);let f=r({$metadata:Z(h)}),s=y(x(await n.parseXmlBody(h.body,w)),"body");if(s.HostedZoneSummaries==="")f[Y4]=[];else if(s[Y4]!=null&&s[Y4][PN]!=null)f[Y4]=ps0(L0(s[Y4][PN]),w);if(s[o]!=null)f[o]=r0(s[o]);if(s[q0]!=null)f[q0]=W(s[q0]);return f},aq=async(h,w)=>{if(h.statusCode!==200&&h.statusCode>=300)return c(h,w);let f=r({$metadata:Z(h)}),s=y(x(await n.parseXmlBody(h.body,w)),"body");if(s[q0]!=null)f[q0]=W(s[q0]);if(s.QueryLoggingConfigs==="")f[M4]=[];else if(s[M4]!=null&&s[M4][lw]!=null)f[M4]=w$0(L0(s[M4][lw]),w);return f},pq=async(h,w)=>{if(h.statusCode!==200&&h.statusCode>=300)return c(h,w);let f=r({$metadata:Z(h)}),s=y(x(await n.parseXmlBody(h.body,w)),"body");if(s[I0]!=null)f[I0]=n0(s[I0]);if(s[o]!=null)f[o]=r0(s[o]);if(s[f8]!=null)f[f8]=W(s[f8]);if(s[s8]!=null)f[s8]=W(s[s8]);if(s[$8]!=null)f[$8]=W(s[$8]);if(s.ResourceRecordSets==="")f[K4]=[];else if(s[K4]!=null&&s[K4][E$]!=null)f[K4]=T$0(L0(s[K4][E$]),w);return f},oq=async(h,w)=>{if(h.statusCode!==200&&h.statusCode>=300)return c(h,w);let f=r({$metadata:Z(h)}),s=y(x(await n.parseXmlBody(h.body,w)),"body");if(s.DelegationSets==="")f[z4]=[];else if(s[z4]!=null&&s[z4][M1]!=null)f[z4]=ys0(L0(s[z4][M1]),w);if(s[I0]!=null)f[I0]=n0(s[I0]);if(s[c1]!=null)f[c1]=W(s[c1]);if(s[o]!=null)f[o]=r0(s[o]);if(s[ww]!=null)f[ww]=W(s[ww]);return f},uq=async(h,w)=>{if(h.statusCode!==200&&h.statusCode>=300)return c(h,w);let f=r({$metadata:Z(h)}),s=y(x(await n.parseXmlBody(h.body,w)),"body");if(s[y4]!=null)f[y4]=Yk(s[y4],w);return f},tq=async(h,w)=>{if(h.statusCode!==200&&h.statusCode>=300)return c(h,w);let f=r({$metadata:Z(h)}),s=y(x(await n.parseXmlBody(h.body,w)),"body");if(s.ResourceTagSets==="")f[Z4]=[];else if(s[Z4]!=null&&s[Z4][y4]!=null)f[Z4]=U$0(L0(s[Z4][y4]),w);return f},hk=async(h,w)=>{if(h.statusCode!==200&&h.statusCode>=300)return c(h,w);let f=r({$metadata:Z(h)}),s=y(x(await n.parseXmlBody(h.body,w)),"body");if(s[I0]!=null)f[I0]=n0(s[I0]);if(s[o]!=null)f[o]=r0(s[o]);if(s[BU]!=null)f[BU]=W(s[BU]);if(s.TrafficPolicySummaries==="")f[J4]=[];else if(s[J4]!=null&&s[J4][qN]!=null)f[J4]=W$0(L0(s[J4][qN]),w);return f},wk=async(h,w)=>{if(h.statusCode!==200&&h.statusCode>=300)return c(h,w);let f=r({$metadata:Z(h)}),s=y(x(await n.parseXmlBody(h.body,w)),"body");if(s[yw]!=null)f[yw]=W(s[yw]);if(s[I0]!=null)f[I0]=n0(s[I0]);if(s[o]!=null)f[o]=r0(s[o]);if(s[g1]!=null)f[g1]=W(s[g1]);if(s[x1]!=null)f[x1]=W(s[x1]);if(s.TrafficPolicyInstances==="")f[z1]=[];else if(s[z1]!=null&&s[z1][R1]!=null)f[z1]=q8(L0(s[z1][R1]),w);return f},fk=async(h,w)=>{if(h.statusCode!==200&&h.statusCode>=300)return c(h,w);let f=r({$metadata:Z(h)}),s=y(x(await n.parseXmlBody(h.body,w)),"body");if(s[I0]!=null)f[I0]=n0(s[I0]);if(s[o]!=null)f[o]=r0(s[o]);if(s[g1]!=null)f[g1]=W(s[g1]);if(s[x1]!=null)f[x1]=W(s[x1]);if(s.TrafficPolicyInstances==="")f[z1]=[];else if(s[z1]!=null&&s[z1][R1]!=null)f[z1]=q8(L0(s[z1][R1]),w);return f},sk=async(h,w)=>{if(h.statusCode!==200&&h.statusCode>=300)return c(h,w);let f=r({$metadata:Z(h)}),s=y(x(await n.parseXmlBody(h.body,w)),"body");if(s[yw]!=null)f[yw]=W(s[yw]);if(s[I0]!=null)f[I0]=n0(s[I0]);if(s[o]!=null)f[o]=r0(s[o]);if(s[g1]!=null)f[g1]=W(s[g1]);if(s[x1]!=null)f[x1]=W(s[x1]);if(s.TrafficPolicyInstances==="")f[z1]=[];else if(s[z1]!=null&&s[z1][R1]!=null)f[z1]=q8(L0(s[z1][R1]),w);return f},$k=async(h,w)=>{if(h.statusCode!==200&&h.statusCode>=300)return c(h,w);let f=r({$metadata:Z(h)}),s=y(x(await n.parseXmlBody(h.body,w)),"body");if(s[I0]!=null)f[I0]=n0(s[I0]);if(s[o]!=null)f[o]=r0(s[o]);if(s.TrafficPolicies==="")f[V4]=[];else if(s[V4]!=null&&s[V4][Q1]!=null)f[V4]=B$0(L0(s[V4][Q1]),w);if(s[WU]!=null)f[WU]=W(s[WU]);return f},Ek=async(h,w)=>{if(h.statusCode!==200&&h.statusCode>=300)return c(h,w);let f=r({$metadata:Z(h)}),s=y(x(await n.parseXmlBody(h.body,w)),"body");if(s[h0]!=null)f[h0]=W(s[h0]);if(s[q0]!=null)f[q0]=W(s[q0]);if(s.VPCs==="")f[Ph]=[];else if(s[Ph]!=null&&s[Ph][V0]!=null)f[Ph]=Sk(L0(s[Ph][V0]),w);return f},Tk=async(h,w)=>{if(h.statusCode!==200&&h.statusCode>=300)return c(h,w);let f=r({$metadata:Z(h)}),s=y(x(await n.parseXmlBody(h.body,w)),"body");if(s[T8]!=null)f[T8]=W(s[T8]);if(s[W8]!=null)f[W8]=W(s[W8]);if(s.RecordData==="")f[Q4]=[];else if(s[Q4]!=null&&s[Q4][NN]!=null)f[Q4]=f$0(L0(s[Q4][NN]),w);if(s[CU]!=null)f[CU]=W(s[CU]);if(s[IU]!=null)f[IU]=W(s[IU]);if(s[L8]!=null)f[L8]=W(s[L8]);return f},Uk=async(h,w)=>{if(h.statusCode!==200&&h.statusCode>=300)return c(h,w);let f=r({$metadata:Z(h)}),s=y(x(await n.parseXmlBody(h.body,w)),"body");if(s[Lh]!=null)f[Lh]=RU(s[Lh],w);return f},Fk=async(h,w)=>{if(h.statusCode!==200&&h.statusCode>=300)return c(h,w);let f=r({$metadata:Z(h)}),s=y(x(await n.parseXmlBody(h.body,w)),"body");if(s[J1]!=null)f[J1]=XU(s[J1],w);return f},Ck=async(h,w)=>{if(h.statusCode!==200&&h.statusCode>=300)return c(h,w);let f=r({$metadata:Z(h)}),s=y(x(await n.parseXmlBody(h.body,w)),"body");if(s[Q1]!=null)f[Q1]=d4(s[Q1],w);return f},Ik=async(h,w)=>{if(h.statusCode!==200&&h.statusCode>=300)return c(h,w);let f=r({$metadata:Z(h)}),s=y(x(await n.parseXmlBody(h.body,w)),"body");if(s[R1]!=null)f[R1]=YU(s[R1],w);return f},c=async(h,w)=>{let f={...h,body:await n.parseXmlErrorBody(h.body,w)},s=n.loadRestXmlErrorCode(h,f.body);switch(s){case"ConcurrentModification":case"com.amazonaws.route53#ConcurrentModification":throw await cw0(f,w);case"InvalidInput":case"com.amazonaws.route53#InvalidInput":throw await Gf0(f,w);case"InvalidKMSArn":case"com.amazonaws.route53#InvalidKMSArn":throw await Lf0(f,w);case"InvalidKeySigningKeyStatus":case"com.amazonaws.route53#InvalidKeySigningKeyStatus":throw await Wf0(f,w);case"InvalidSigningStatus":case"com.amazonaws.route53#InvalidSigningStatus":throw await Af0(f,w);case"NoSuchKeySigningKey":case"com.amazonaws.route53#NoSuchKeySigningKey":throw await kf0(f,w);case"ConflictingDomainExists":case"com.amazonaws.route53#ConflictingDomainExists":throw await gw0(f,w);case"InvalidVPCId":case"com.amazonaws.route53#InvalidVPCId":throw await Xf0(f,w);case"LimitsExceeded":case"com.amazonaws.route53#LimitsExceeded":throw await Kf0(f,w);case"NoSuchHostedZone":case"com.amazonaws.route53#NoSuchHostedZone":throw await qf0(f,w);case"NotAuthorizedException":case"com.amazonaws.route53#NotAuthorizedException":throw await lf0(f,w);case"PriorRequestNotComplete":case"com.amazonaws.route53#PriorRequestNotComplete":throw await vf0(f,w);case"PublicZoneVPCAssociation":case"com.amazonaws.route53#PublicZoneVPCAssociation":throw await bf0(f,w);case"CidrBlockInUseException":case"com.amazonaws.route53#CidrBlockInUseException":throw await bw0(f,w);case"CidrCollectionVersionMismatchException":case"com.amazonaws.route53#CidrCollectionVersionMismatchException":throw await iw0(f,w);case"NoSuchCidrCollectionException":case"com.amazonaws.route53#NoSuchCidrCollectionException":throw await Jf0(f,w);case"InvalidChangeBatch":case"com.amazonaws.route53#InvalidChangeBatch":throw await Cf0(f,w);case"NoSuchHealthCheck":case"com.amazonaws.route53#NoSuchHealthCheck":throw await Df0(f,w);case"ThrottlingException":case"com.amazonaws.route53#ThrottlingException":throw await df0(f,w);case"CidrCollectionAlreadyExistsException":case"com.amazonaws.route53#CidrCollectionAlreadyExistsException":throw await mw0(f,w);case"HealthCheckAlreadyExists":case"com.amazonaws.route53#HealthCheckAlreadyExists":throw await uw0(f,w);case"TooManyHealthChecks":case"com.amazonaws.route53#TooManyHealthChecks":throw await if0(f,w);case"DelegationSetNotAvailable":case"com.amazonaws.route53#DelegationSetNotAvailable":throw await aw0(f,w);case"DelegationSetNotReusable":case"com.amazonaws.route53#DelegationSetNotReusable":throw await pw0(f,w);case"HostedZoneAlreadyExists":case"com.amazonaws.route53#HostedZoneAlreadyExists":throw await wf0(f,w);case"InvalidDomainName":case"com.amazonaws.route53#InvalidDomainName":throw await If0(f,w);case"NoSuchDelegationSet":case"com.amazonaws.route53#NoSuchDelegationSet":throw await Hf0(f,w);case"TooManyHostedZones":case"com.amazonaws.route53#TooManyHostedZones":throw await cf0(f,w);case"InvalidArgument":case"com.amazonaws.route53#InvalidArgument":throw await Ff0(f,w);case"InvalidKeySigningKeyName":case"com.amazonaws.route53#InvalidKeySigningKeyName":throw await Bf0(f,w);case"KeySigningKeyAlreadyExists":case"com.amazonaws.route53#KeySigningKeyAlreadyExists":throw await Yf0(f,w);case"TooManyKeySigningKeys":case"com.amazonaws.route53#TooManyKeySigningKeys":throw await gf0(f,w);case"InsufficientCloudWatchLogsResourcePolicy":case"com.amazonaws.route53#InsufficientCloudWatchLogsResourcePolicy":throw await Uf0(f,w);case"NoSuchCloudWatchLogsLogGroup":case"com.amazonaws.route53#NoSuchCloudWatchLogsLogGroup":throw await Pf0(f,w);case"QueryLoggingConfigAlreadyExists":case"com.amazonaws.route53#QueryLoggingConfigAlreadyExists":throw await mf0(f,w);case"DelegationSetAlreadyCreated":case"com.amazonaws.route53#DelegationSetAlreadyCreated":throw await _w0(f,w);case"DelegationSetAlreadyReusable":case"com.amazonaws.route53#DelegationSetAlreadyReusable":throw await nw0(f,w);case"HostedZoneNotFound":case"com.amazonaws.route53#HostedZoneNotFound":throw await sf0(f,w);case"InvalidTrafficPolicyDocument":case"com.amazonaws.route53#InvalidTrafficPolicyDocument":throw await Rf0(f,w);case"TooManyTrafficPolicies":case"com.amazonaws.route53#TooManyTrafficPolicies":throw await xf0(f,w);case"TrafficPolicyAlreadyExists":case"com.amazonaws.route53#TrafficPolicyAlreadyExists":throw await af0(f,w);case"NoSuchTrafficPolicy":case"com.amazonaws.route53#NoSuchTrafficPolicy":throw await yf0(f,w);case"TooManyTrafficPolicyInstances":case"com.amazonaws.route53#TooManyTrafficPolicyInstances":throw await _f0(f,w);case"TrafficPolicyInstanceAlreadyExists":case"com.amazonaws.route53#TrafficPolicyInstanceAlreadyExists":throw await pf0(f,w);case"TooManyTrafficPolicyVersionsForCurrentPolicy":case"com.amazonaws.route53#TooManyTrafficPolicyVersionsForCurrentPolicy":throw await nf0(f,w);case"TooManyVPCAssociationAuthorizations":case"com.amazonaws.route53#TooManyVPCAssociationAuthorizations":throw await ef0(f,w);case"KeySigningKeyInParentDSRecord":case"com.amazonaws.route53#KeySigningKeyInParentDSRecord":throw await Sf0(f,w);case"KeySigningKeyInUse":case"com.amazonaws.route53#KeySigningKeyInUse":throw await rf0(f,w);case"CidrCollectionInUseException":case"com.amazonaws.route53#CidrCollectionInUseException":throw await dw0(f,w);case"HealthCheckInUse":case"com.amazonaws.route53#HealthCheckInUse":throw await tw0(f,w);case"HostedZoneNotEmpty":case"com.amazonaws.route53#HostedZoneNotEmpty":throw await ff0(f,w);case"NoSuchQueryLoggingConfig":case"com.amazonaws.route53#NoSuchQueryLoggingConfig":throw await jf0(f,w);case"DelegationSetInUse":case"com.amazonaws.route53#DelegationSetInUse":throw await ew0(f,w);case"TrafficPolicyInUse":case"com.amazonaws.route53#TrafficPolicyInUse":throw await of0(f,w);case"NoSuchTrafficPolicyInstance":case"com.amazonaws.route53#NoSuchTrafficPolicyInstance":throw await Of0(f,w);case"VPCAssociationAuthorizationNotFound":case"com.amazonaws.route53#VPCAssociationAuthorizationNotFound":throw await uf0(f,w);case"DNSSECNotFound":case"com.amazonaws.route53#DNSSECNotFound":throw await ow0(f,w);case"LastVPCAssociation":case"com.amazonaws.route53#LastVPCAssociation":throw await Qf0(f,w);case"VPCAssociationNotFound":case"com.amazonaws.route53#VPCAssociationNotFound":throw await tf0(f,w);case"HostedZonePartiallyDelegated":case"com.amazonaws.route53#HostedZonePartiallyDelegated":throw await Ef0(f,w);case"KeySigningKeyWithActiveStatusNotFound":case"com.amazonaws.route53#KeySigningKeyWithActiveStatusNotFound":throw await Mf0(f,w);case"NoSuchChange":case"com.amazonaws.route53#NoSuchChange":throw await Zf0(f,w);case"NoSuchGeoLocation":case"com.amazonaws.route53#NoSuchGeoLocation":throw await Nf0(f,w);case"IncompatibleVersion":case"com.amazonaws.route53#IncompatibleVersion":throw await Tf0(f,w);case"HostedZoneNotPrivate":case"com.amazonaws.route53#HostedZoneNotPrivate":throw await $f0(f,w);case"NoSuchCidrLocationException":case"com.amazonaws.route53#NoSuchCidrLocationException":throw await Vf0(f,w);case"InvalidPaginationToken":case"com.amazonaws.route53#InvalidPaginationToken":throw await zf0(f,w);case"HealthCheckVersionMismatch":case"com.amazonaws.route53#HealthCheckVersionMismatch":throw await hf0(f,w);case"ConflictingTypes":case"com.amazonaws.route53#ConflictingTypes":throw await xw0(f,w);default:let $=f.body;return vw0({output:h,parsedBody:$.Error,errorCode:s})}},vw0=ss(d),bw0=async(h,w)=>{let f=r({}),s=h.body.Error;if(s[l0]!=null)f[l0]=W(s[l0]);let $=new oE({$metadata:Z(h),...f});return v($,h.body.Error)},mw0=async(h,w)=>{let f=r({}),s=h.body.Error;if(s[l0]!=null)f[l0]=W(s[l0]);let $=new sT({$metadata:Z(h),...f});return v($,h.body.Error)},dw0=async(h,w)=>{let f=r({}),s=h.body.Error;if(s[l0]!=null)f[l0]=W(s[l0]);let $=new qT({$metadata:Z(h),...f});return v($,h.body.Error)},iw0=async(h,w)=>{let f=r({}),s=h.body.Error;if(s[l0]!=null)f[l0]=W(s[l0]);let $=new uE({$metadata:Z(h),...f});return v($,h.body.Error)},cw0=async(h,w)=>{let f=r({}),s=h.body.Error;if(s[S]!=null)f[S]=W(s[S]);let $=new vE({$metadata:Z(h),...f});return v($,h.body.Error)},gw0=async(h,w)=>{let f=r({}),s=h.body.Error;if(s[S]!=null)f[S]=W(s[S]);let $=new gE({$metadata:Z(h),...f});return v($,h.body.Error)},xw0=async(h,w)=>{let f=r({}),s=h.body.Error;if(s[S]!=null)f[S]=W(s[S]);let $=new uT({$metadata:Z(h),...f});return v($,h.body.Error)},_w0=async(h,w)=>{let f=r({}),s=h.body.Error;if(s[S]!=null)f[S]=W(s[S]);let $=new YT({$metadata:Z(h),...f});return v($,h.body.Error)},nw0=async(h,w)=>{let f=r({}),s=h.body.Error;if(s[S]!=null)f[S]=W(s[S]);let $=new ST({$metadata:Z(h),...f});return v($,h.body.Error)},ew0=async(h,w)=>{let f=r({}),s=h.body.Error;if(s[S]!=null)f[S]=W(s[S]);let $=new OT({$metadata:Z(h),...f});return v($,h.body.Error)},aw0=async(h,w)=>{let f=r({}),s=h.body.Error;if(s[S]!=null)f[S]=W(s[S]);let $=new TT({$metadata:Z(h),...f});return v($,h.body.Error)},pw0=async(h,w)=>{let f=r({}),s=h.body.Error;if(s[S]!=null)f[S]=W(s[S]);let $=new UT({$metadata:Z(h),...f});return v($,h.body.Error)},ow0=async(h,w)=>{let f=r({}),s=h.body.Error;if(s[S]!=null)f[S]=W(s[S]);let $=new mT({$metadata:Z(h),...f});return v($,h.body.Error)},uw0=async(h,w)=>{let f=r({}),s=h.body.Error;if(s[S]!=null)f[S]=W(s[S]);let $=new $T({$metadata:Z(h),...f});return v($,h.body.Error)},tw0=async(h,w)=>{let f=r({}),s=h.body.Error;if(s[S]!=null)f[S]=W(s[S]);let $=new kT({$metadata:Z(h),...f});return v($,h.body.Error)},hf0=async(h,w)=>{let f=r({}),s=h.body.Error;if(s[S]!=null)f[S]=W(s[S]);let $=new oT({$metadata:Z(h),...f});return v($,h.body.Error)},wf0=async(h,w)=>{let f=r({}),s=h.body.Error;if(s[S]!=null)f[S]=W(s[S]);let $=new FT({$metadata:Z(h),...f});return v($,h.body.Error)},ff0=async(h,w)=>{let f=r({}),s=h.body.Error;if(s[S]!=null)f[S]=W(s[S]);let $=new jT({$metadata:Z(h),...f});return v($,h.body.Error)},sf0=async(h,w)=>{let f=r({}),s=h.body.Error;if(s[S]!=null)f[S]=W(s[S]);let $=new rT({$metadata:Z(h),...f});return v($,h.body.Error)},$f0=async(h,w)=>{let f=r({}),s=h.body.Error;if(s[S]!=null)f[S]=W(s[S]);let $=new eT({$metadata:Z(h),...f});return v($,h.body.Error)},Ef0=async(h,w)=>{let f=r({}),s=h.body.Error;if(s[S]!=null)f[S]=W(s[S]);let $=new cT({$metadata:Z(h),...f});return v($,h.body.Error)},Tf0=async(h,w)=>{let f=r({}),s=h.body.Error;if(s[S]!=null)f[S]=W(s[S]);let $=new nT({$metadata:Z(h),...f});return v($,h.body.Error)},Uf0=async(h,w)=>{let f=r({}),s=h.body.Error;if(s[S]!=null)f[S]=W(s[S]);let $=new AT({$metadata:Z(h),...f});return v($,h.body.Error)},Ff0=async(h,w)=>{let f=r({}),s=h.body.Error;if(s[S]!=null)f[S]=W(s[S]);let $=new BT({$metadata:Z(h),...f});return v($,h.body.Error)},Cf0=async(h,w)=>{let f=r({}),s=h.body.Error;if(s[S]!=null)f[S]=W(s[S]);if(s.messages==="")f[H4]=[];else if(s[H4]!=null&&s[H4][l0]!=null)f[H4]=bs0(L0(s[H4][l0]),w);let $=new hT({$metadata:Z(h),...f});return v($,h.body.Error)},If0=async(h,w)=>{let f=r({}),s=h.body.Error;if(s[S]!=null)f[S]=W(s[S]);let $=new CT({$metadata:Z(h),...f});return v($,h.body.Error)},Gf0=async(h,w)=>{let f=r({}),s=h.body.Error;if(s[S]!=null)f[S]=W(s[S]);let $=new bE({$metadata:Z(h),...f});return v($,h.body.Error)},Bf0=async(h,w)=>{let f=r({}),s=h.body.Error;if(s[S]!=null)f[S]=W(s[S]);let $=new WT({$metadata:Z(h),...f});return v($,h.body.Error)},Wf0=async(h,w)=>{let f=r({}),s=h.body.Error;if(s[S]!=null)f[S]=W(s[S]);let $=new mE({$metadata:Z(h),...f});return v($,h.body.Error)},Lf0=async(h,w)=>{let f=r({}),s=h.body.Error;if(s[S]!=null)f[S]=W(s[S]);let $=new dE({$metadata:Z(h),...f});return v($,h.body.Error)},zf0=async(h,w)=>{let f=r({}),s=h.body.Error;if(s[S]!=null)f[S]=W(s[S]);let $=new pT({$metadata:Z(h),...f});return v($,h.body.Error)},Af0=async(h,w)=>{let f=r({}),s=h.body.Error;if(s[S]!=null)f[S]=W(s[S]);let $=new iE({$metadata:Z(h),...f});return v($,h.body.Error)},Rf0=async(h,w)=>{let f=r({}),s=h.body.Error;if(s[S]!=null)f[S]=W(s[S]);let $=new MT({$metadata:Z(h),...f});return v($,h.body.Error)},Xf0=async(h,w)=>{let f=r({}),s=h.body.Error;if(s[S]!=null)f[S]=W(s[S]);let $=new xE({$metadata:Z(h),...f});return v($,h.body.Error)},Yf0=async(h,w)=>{let f=r({}),s=h.body.Error;if(s[S]!=null)f[S]=W(s[S]);let $=new LT({$metadata:Z(h),...f});return v($,h.body.Error)},Sf0=async(h,w)=>{let f=r({}),s=h.body.Error;if(s[S]!=null)f[S]=W(s[S]);let $=new NT({$metadata:Z(h),...f});return v($,h.body.Error)},rf0=async(h,w)=>{let f=r({}),s=h.body.Error;if(s[S]!=null)f[S]=W(s[S]);let $=new DT({$metadata:Z(h),...f});return v($,h.body.Error)},Mf0=async(h,w)=>{let f=r({}),s=h.body.Error;if(s[S]!=null)f[S]=W(s[S]);let $=new gT({$metadata:Z(h),...f});return v($,h.body.Error)},Qf0=async(h,w)=>{let f=r({}),s=h.body.Error;if(s[S]!=null)f[S]=W(s[S]);let $=new dT({$metadata:Z(h),...f});return v($,h.body.Error)},Kf0=async(h,w)=>{let f=r({}),s=h.body.Error;if(s[S]!=null)f[S]=W(s[S]);let $=new _E({$metadata:Z(h),...f});return v($,h.body.Error)},Zf0=async(h,w)=>{let f=r({}),s=h.body.Error;if(s[S]!=null)f[S]=W(s[S]);let $=new xT({$metadata:Z(h),...f});return v($,h.body.Error)},Jf0=async(h,w)=>{let f=r({}),s=h.body.Error;if(s[l0]!=null)f[l0]=W(s[l0]);let $=new tE({$metadata:Z(h),...f});return v($,h.body.Error)},Vf0=async(h,w)=>{let f=r({}),s=h.body.Error;if(s[l0]!=null)f[l0]=W(s[l0]);let $=new aT({$metadata:Z(h),...f});return v($,h.body.Error)},Pf0=async(h,w)=>{let f=r({}),s=h.body.Error;if(s[S]!=null)f[S]=W(s[S]);let $=new RT({$metadata:Z(h),...f});return v($,h.body.Error)},Hf0=async(h,w)=>{let f=r({}),s=h.body.Error;if(s[S]!=null)f[S]=W(s[S]);let $=new IT({$metadata:Z(h),...f});return v($,h.body.Error)},Nf0=async(h,w)=>{let f=r({}),s=h.body.Error;if(s[S]!=null)f[S]=W(s[S]);let $=new _T({$metadata:Z(h),...f});return v($,h.body.Error)},Df0=async(h,w)=>{let f=r({}),s=h.body.Error;if(s[S]!=null)f[S]=W(s[S]);let $=new wT({$metadata:Z(h),...f});return v($,h.body.Error)},qf0=async(h,w)=>{let f=r({}),s=h.body.Error;if(s[S]!=null)f[S]=W(s[S]);let $=new nE({$metadata:Z(h),...f});return v($,h.body.Error)},kf0=async(h,w)=>{let f=r({}),s=h.body.Error;if(s[S]!=null)f[S]=W(s[S]);let $=new cE({$metadata:Z(h),...f});return v($,h.body.Error)},jf0=async(h,w)=>{let f=r({}),s=h.body.Error;if(s[S]!=null)f[S]=W(s[S]);let $=new yT({$metadata:Z(h),...f});return v($,h.body.Error)},yf0=async(h,w)=>{let f=r({}),s=h.body.Error;if(s[S]!=null)f[S]=W(s[S]);let $=new ZT({$metadata:Z(h),...f});return v($,h.body.Error)},Of0=async(h,w)=>{let f=r({}),s=h.body.Error;if(s[S]!=null)f[S]=W(s[S]);let $=new vT({$metadata:Z(h),...f});return v($,h.body.Error)},lf0=async(h,w)=>{let f=r({}),s=h.body.Error;if(s[S]!=null)f[S]=W(s[S]);let $=new eE({$metadata:Z(h),...f});return v($,h.body.Error)},vf0=async(h,w)=>{let f=r({}),s=h.body.Error;if(s[S]!=null)f[S]=W(s[S]);let $=new aE({$metadata:Z(h),...f});return v($,h.body.Error)},bf0=async(h,w)=>{let f=r({}),s=h.body.Error;if(s[S]!=null)f[S]=W(s[S]);let $=new pE({$metadata:Z(h),...f});return v($,h.body.Error)},mf0=async(h,w)=>{let f=r({}),s=h.body.Error;if(s[S]!=null)f[S]=W(s[S]);let $=new XT({$metadata:Z(h),...f});return v($,h.body.Error)},df0=async(h,w)=>{let f=r({}),s=h.body.Error;if(s[S]!=null)f[S]=W(s[S]);let $=new fT({$metadata:Z(h),...f});return v($,h.body.Error)},if0=async(h,w)=>{let f=r({}),s=h.body.Error;if(s[S]!=null)f[S]=W(s[S]);let $=new ET({$metadata:Z(h),...f});return v($,h.body.Error)},cf0=async(h,w)=>{let f=r({}),s=h.body.Error;if(s[S]!=null)f[S]=W(s[S]);let $=new GT({$metadata:Z(h),...f});return v($,h.body.Error)},gf0=async(h,w)=>{let f=r({}),s=h.body.Error;if(s[S]!=null)f[S]=W(s[S]);let $=new zT({$metadata:Z(h),...f});return v($,h.body.Error)},xf0=async(h,w)=>{let f=r({}),s=h.body.Error;if(s[S]!=null)f[S]=W(s[S]);let $=new QT({$metadata:Z(h),...f});return v($,h.body.Error)},_f0=async(h,w)=>{let f=r({}),s=h.body.Error;if(s[S]!=null)f[S]=W(s[S]);let $=new JT({$metadata:Z(h),...f});return v($,h.body.Error)},nf0=async(h,w)=>{let f=r({}),s=h.body.Error;if(s[S]!=null)f[S]=W(s[S]);let $=new PT({$metadata:Z(h),...f});return v($,h.body.Error)},ef0=async(h,w)=>{let f=r({}),s=h.body.Error;if(s[S]!=null)f[S]=W(s[S]);let $=new HT({$metadata:Z(h),...f});return v($,h.body.Error)},af0=async(h,w)=>{let f=r({}),s=h.body.Error;if(s[S]!=null)f[S]=W(s[S]);let $=new KT({$metadata:Z(h),...f});return v($,h.body.Error)},pf0=async(h,w)=>{let f=r({}),s=h.body.Error;if(s[S]!=null)f[S]=W(s[S]);let $=new VT({$metadata:Z(h),...f});return v($,h.body.Error)},of0=async(h,w)=>{let f=r({}),s=h.body.Error;if(s[S]!=null)f[S]=W(s[S]);let $=new lT({$metadata:Z(h),...f});return v($,h.body.Error)},uf0=async(h,w)=>{let f=r({}),s=h.body.Error;if(s[S]!=null)f[S]=W(s[S]);let $=new bT({$metadata:Z(h),...f});return v($,h.body.Error)},tf0=async(h,w)=>{let f=r({}),s=h.body.Error;if(s[S]!=null)f[S]=W(s[S]);let $=new iT({$metadata:Z(h),...f});return v($,h.body.Error)},Gk=(h,w)=>{let f=new P(Hh);if(h[o0]!=null)f.c(P.of(d$0,h[o0]).n(o0));if(h[p]!=null)f.c(P.of(A$0,h[p]).n(p));return f},hs0=(h,w)=>{let f=new P(Bf);if(h[h0]!=null)f.c(P.of(qh,h[h0]).n(h0));if(f.cc(h,Wh),h[h$]!=null)f.c(P.of(z$0,String(h[h$])).n(h$));return f},ws0=(h,w)=>{let f=new P(Mk);if(h[os]!=null)f.c(P.of(S$0,h[os]).n(os));if(h[E$]!=null)f.c(As0(h[E$],w).n(E$));return f},fs0=(h,w)=>{let f=new P(wU);if(h[C0]!=null)f.c(P.of(y8,h[C0]).n(C0));return f.lc(h,"Changes","Changes",()=>ss0(h[rk],w)),f},ss0=(h,w)=>{return h.filter((f)=>f!=null).map((f)=>{return ws0(f,w).n(Mk)})},Bk=(h,w)=>{return h.filter((f)=>f!=null).map((f)=>{return P.of(q4,f).n(N8)})},$s0=(h,w)=>{let f=new P(r$0);if(h[U1]!=null)f.c(P.of(H$0,h[U1]).n(U1));if(h[os]!=null)f.c(P.of(M$0,h[os]).n(os));return f.lc(h,"CidrList","CidrList",()=>Ts0(h[N$0],w)),f},Es0=(h,w)=>{return h.filter((f)=>f!=null).map((f)=>{return $s0(f,w).n(zh)})},Ts0=(h,w)=>{return h.filter((f)=>f!=null).map((f)=>{return P.of(JN,f).n(JN)})},Us0=(h,w)=>{let f=new P(Wf);if(h[ts]!=null)f.c(P.of(H40,h[ts]).n(ts));if(h[U1]!=null)f.c(P.of(P$0,h[U1]).n(U1));return f},Fs0=(h,w)=>{let f=new P(Lf);return f.cc(h,TU),f.cc(h,UU),f},Cs0=(h,w)=>{let f=new P(zf);if(h[Nh]!=null)f.c(P.of(n$0,h[Nh]).n(Nh));if(h[Dh]!=null)f.c(P.of(e$0,h[Dh]).n(Dh));if(h[kh]!=null)f.c(P.of(a$0,h[kh]).n(kh));return f},Is0=(h,w)=>{let f=new P(Af);if(f.cc(h,hU),f.cc(h,EU),h[Lf]!=null)f.c(Fs0(h[Lf],w).n(Lf));if(h[Ff]!=null)f.c(P.of(Ff,String(h[Ff])).n(Ff));return f},Gs0=(h,w)=>{let f=new P(Rf);if(f.cc(h,Ow),h[Bh]!=null)f.c(P.of(Bh,String(h[Bh])).n(Bh));if(h[K0]!=null)f.c(P.of(u$0,h[K0]).n(K0));if(f.cc(h,j4),f.cc(h,N4),f.cc(h,O4),h[Gf]!=null)f.c(P.of(Gf,String(h[Gf])).n(Gf));if(h[Ch]!=null)f.c(P.of(Ch,String(h[Ch])).n(Ch));if(h[If]!=null)f.c(P.of(If,String(h[If])).n(If));if(h[Gh]!=null)f.c(P.of(Gh,String(h[Gh])).n(Gh));if(h[Uh]!=null)f.c(P.of(Uh,String(h[Uh])).n(Uh));if(h[Ih]!=null)f.c(P.of(Ih,String(h[Ih])).n(Ih));if(f.lc(h,"ChildHealthChecks","ChildHealthChecks",()=>Bk(h[Tf],w)),h[Fh]!=null)f.c(P.of(Fh,String(h[Fh])).n(Fh));if(f.lc(h,"Regions","Regions",()=>Wk(h[Uf],w)),h[Hh]!=null)f.c(Gk(h[Hh],w).n(Hh));return f.cc(h,k4),f.cc(h,FU),f},Wk=(h,w)=>{return h.filter((f)=>f!=null).map((f)=>{return P.of(o$0,f).n(o0)})},Bs0=(h,w)=>{let f=new P($U);if(h[C0]!=null)f.c(P.of(y8,h[C0]).n(C0));if(h[$$]!=null)f.c(P.of(h40,String(h[$$])).n($$));return f},Ws0=(h,w)=>{return h.filter((f)=>f!=null).map((f)=>{return P.of(DN,f).n(DN)})},Ls0=(h,w)=>{let f=new P(zU);if(h[k0]!=null)f.c(P.of(f40,h[k0]).n(k0));return f},zs0=(h,w)=>{return h.filter((f)=>f!=null).map((f)=>{return Ls0(f,w).n(zU)})},As0=(h,w)=>{let f=new P(E$);if(h[p]!=null)f.c(P.of(Wh,h[p]).n(p));if(h[K0]!=null)f.c(P.of(G40,h[K0]).n(K0));if(h[T$]!=null)f.c(P.of(U40,h[T$]).n(T$));if(h[C$]!=null)f.c(P.of(I40,String(h[C$])).n(C$));if(h[o0]!=null)f.c(P.of(C40,h[o0]).n(o0));if(h[zf]!=null)f.c(Cs0(h[zf],w).n(zf));if(h[w$]!=null)f.c(P.of(T40,h[w$]).n(w$));if(h[s$]!=null)f.c(P.of(F40,String(h[s$])).n(s$));if(h[p0]!=null)f.c(P.of(p0,String(h[p0])).n(p0));if(f.lc(h,"ResourceRecords","ResourceRecords",()=>zs0(h[ps],w)),h[Bf]!=null)f.c(hs0(h[Bf],w).n(Bf));if(f.cc(h,q4),f.cc(h,GU),h[Wf]!=null)f.c(Us0(h[Wf],w).n(Wf));if(h[Af]!=null)f.c(Is0(h[Af],w).n(Af));return f},Rs0=(h,w)=>{let f=new P(AU);if(h[Xf]!=null)f.c(P.of(Qk,h[Xf]).n(Xf));if(h[k0]!=null)f.c(P.of(K40,h[k0]).n(k0));return f},Xs0=(h,w)=>{return h.filter((f)=>f!=null).map((f)=>{return P.of(Qk,f).n(Xf)})},Ys0=(h,w)=>{return h.filter((f)=>f!=null).map((f)=>{return Rs0(f,w).n(AU)})},Ss0=(h,w)=>{return h.filter((f)=>f!=null).map((f)=>{return P.of(Q40,f).n(qh)})},b4=(h,w)=>{let f=new P(V0);return f.cc(h,v4),f.cc(h,l4),f},rs0=(h,w)=>{let f={};if(h[K0]!=null)f[K0]=W(h[K0]);if(h[k0]!=null)f[k0]=E1(h[k0]);return f},Ms0=(h,w)=>{let f={};if(h[o0]!=null)f[o0]=W(h[o0]);if(h[p]!=null)f[p]=W(h[p]);return f},Qs0=(h,w)=>{let f={};if(h[h0]!=null)f[h0]=W(h[h0]);if(h[Wh]!=null)f[Wh]=W(h[Wh]);if(h[h$]!=null)f[h$]=n0(h[h$]);return f},_1=(h,w)=>{let f={};if(h[G0]!=null)f[G0]=W(h[G0]);if(h[A1]!=null)f[A1]=W(h[A1]);if(h[R8]!=null)f[R8]=y(b$(h[R8]));if(h[C0]!=null)f[C0]=W(h[C0]);return f},Ks0=(h,w)=>{return(h||[]).filter((f)=>f!=null).map((f)=>{return W(f)})},Zs0=(h,w)=>{return(h||[]).filter((f)=>f!=null).map((f)=>{return W(f)})},Js0=(h,w)=>{return(h||[]).filter((f)=>f!=null).map((f)=>{return Vs0(f,w)})},Vs0=(h,w)=>{let f={};if(h[JI]!=null)f[JI]=W(h[JI]);if(h[U1]!=null)f[U1]=W(h[U1]);return f},Ps0=(h,w)=>{let f={};if(h[us]!=null)f[us]=W(h[us]);if(h[G0]!=null)f[G0]=W(h[G0]);if(h[p]!=null)f[p]=W(h[p]);if(h[fw]!=null)f[fw]=E1(h[fw]);return f},Hs0=(h,w)=>{let f={};if(h[ts]!=null)f[ts]=W(h[ts]);if(h[U1]!=null)f[U1]=W(h[U1]);return f},Ns0=(h,w)=>{let f={};if(h[dI]!=null)f[dI]=r0(h[dI]);if(h[H8]!=null)f[H8]=bY(h[H8]);if(h[NI]!=null)f[NI]=W(h[NI]);if(h[B8]!=null)f[B8]=r0(h[B8]);if(h[oI]!=null)f[oI]=W(h[oI]);if(h[U8]!=null)f[U8]=W(h[U8]);if(h[K8]!=null)f[K8]=W(h[K8]);if(h.Dimensions==="")f[A4]=[];else if(h[A4]!=null&&h[A4][VN]!=null)f[A4]=ls0(L0(h[A4][VN]),w);return f},Ds0=(h,w)=>{return(h||[]).filter((f)=>f!=null).map((f)=>{return qs0(f,w)})},qs0=(h,w)=>{let f={};if(h[us]!=null)f[us]=W(h[us]);if(h[G0]!=null)f[G0]=W(h[G0]);if(h[p]!=null)f[p]=W(h[p]);if(h[fw]!=null)f[fw]=E1(h[fw]);return f},ks0=(h,w)=>{let f={};if(h[TU]!=null)f[TU]=W(h[TU]);if(h[UU]!=null)f[UU]=W(h[UU]);return f},m4=(h,w)=>{let f={};if(h[G0]!=null)f[G0]=W(h[G0]);if(h[D0]!=null)f[D0]=W(h[D0]);if(h.NameServers==="")f[r4]=[];else if(h[r4]!=null&&h[r4][HN]!=null)f[r4]=js0(L0(h[r4][HN]),w);return f},js0=(h,w)=>{return(h||[]).filter((f)=>f!=null).map((f)=>{return W(f)})},ys0=(h,w)=>{return(h||[]).filter((f)=>f!=null).map((f)=>{return m4(f,w)})},Os0=(h,w)=>{let f={};if(h[p]!=null)f[p]=W(h[p]);if(h[k0]!=null)f[k0]=W(h[k0]);return f},ls0=(h,w)=>{return(h||[]).filter((f)=>f!=null).map((f)=>{return Os0(f,w)})},vs0=(h,w)=>{let f={};if(h[Q8]!=null)f[Q8]=W(h[Q8]);if(h[U$]!=null)f[U$]=W(h[U$]);return f},bs0=(h,w)=>{return(h||[]).filter((f)=>f!=null).map((f)=>{return W(f)})},ms0=(h,w)=>{let f={};if(h[Nh]!=null)f[Nh]=W(h[Nh]);if(h[Dh]!=null)f[Dh]=W(h[Dh]);if(h[kh]!=null)f[kh]=W(h[kh]);return f},Lk=(h,w)=>{let f={};if(h[Nh]!=null)f[Nh]=W(h[Nh]);if(h[PI]!=null)f[PI]=W(h[PI]);if(h[Dh]!=null)f[Dh]=W(h[Dh]);if(h[HI]!=null)f[HI]=W(h[HI]);if(h[kh]!=null)f[kh]=W(h[kh]);if(h[S8]!=null)f[S8]=W(h[S8]);return f},ds0=(h,w)=>{return(h||[]).filter((f)=>f!=null).map((f)=>{return Lk(f,w)})},is0=(h,w)=>{let f={};if(h[hU]!=null)f[hU]=W(h[hU]);if(h[EU]!=null)f[EU]=W(h[EU]);if(h[Lf]!=null)f[Lf]=ks0(h[Lf],w);if(h[Ff]!=null)f[Ff]=r0(h[Ff]);return f},RU=(h,w)=>{let f={};if(h[G0]!=null)f[G0]=W(h[G0]);if(h[D0]!=null)f[D0]=W(h[D0]);if(h[f$]!=null)f[f$]=Xk(h[f$],w);if(h[Rf]!=null)f[Rf]=cs0(h[Rf],w);if(h[Cf]!=null)f[Cf]=E1(h[Cf]);if(h[qI]!=null)f[qI]=Ns0(h[qI],w);return f},cs0=(h,w)=>{let f={};if(h[Ow]!=null)f[Ow]=W(h[Ow]);if(h[Bh]!=null)f[Bh]=r0(h[Bh]);if(h[K0]!=null)f[K0]=W(h[K0]);if(h[j4]!=null)f[j4]=W(h[j4]);if(h[N4]!=null)f[N4]=W(h[N4]);if(h[O4]!=null)f[O4]=W(h[O4]);if(h[Gf]!=null)f[Gf]=r0(h[Gf]);if(h[Ch]!=null)f[Ch]=r0(h[Ch]);if(h[If]!=null)f[If]=n0(h[If]);if(h[Gh]!=null)f[Gh]=n0(h[Gh]);if(h[Uh]!=null)f[Uh]=n0(h[Uh]);if(h[Ih]!=null)f[Ih]=r0(h[Ih]);if(h.ChildHealthChecks==="")f[Tf]=[];else if(h[Tf]!=null&&h[Tf][N8]!=null)f[Tf]=Zs0(L0(h[Tf][N8]),w);if(h[Fh]!=null)f[Fh]=n0(h[Fh]);if(h.Regions==="")f[Uf]=[];else if(h[Uf]!=null&&h[Uf][o0]!=null)f[Uf]=xs0(L0(h[Uf][o0]),w);if(h[Hh]!=null)f[Hh]=Ms0(h[Hh],w);if(h[k4]!=null)f[k4]=W(h[k4]);if(h[FU]!=null)f[FU]=W(h[FU]);return f},gs0=(h,w)=>{let f={};if(h[o0]!=null)f[o0]=W(h[o0]);if(h[Ow]!=null)f[Ow]=W(h[Ow]);if(h[M8]!=null)f[M8]=C$0(h[M8],w);return f},zk=(h,w)=>{return(h||[]).filter((f)=>f!=null).map((f)=>{return gs0(f,w)})},xs0=(h,w)=>{return(h||[]).filter((f)=>f!=null).map((f)=>{return W(f)})},_s0=(h,w)=>{return(h||[]).filter((f)=>f!=null).map((f)=>{return RU(f,w)})},XU=(h,w)=>{let f={};if(h[G0]!=null)f[G0]=W(h[G0]);if(h[p]!=null)f[p]=W(h[p]);if(h[D0]!=null)f[D0]=W(h[D0]);if(h[jI]!=null)f[jI]=ns0(h[jI],w);if(h[z8]!=null)f[z8]=E1(h[z8]);if(h[f$]!=null)f[f$]=Xk(h[f$],w);return f},ns0=(h,w)=>{let f={};if(h[C0]!=null)f[C0]=W(h[C0]);if(h[$$]!=null)f[$$]=n0(h[$$]);return f},es0=(h,w)=>{let f={};if(h[K0]!=null)f[K0]=W(h[K0]);if(h[k0]!=null)f[k0]=E1(h[k0]);return f},as0=(h,w)=>{let f={};if(h[C8]!=null)f[C8]=W(h[C8]);if(h[I8]!=null)f[I8]=W(h[I8]);return f},Ak=(h,w)=>{return(h||[]).filter((f)=>f!=null).map((f)=>{return XU(f,w)})},ps0=(h,w)=>{return(h||[]).filter((f)=>f!=null).map((f)=>{return os0(f,w)})},os0=(h,w)=>{let f={};if(h[h0]!=null)f[h0]=W(h[h0]);if(h[p]!=null)f[p]=W(h[p]);if(h[F8]!=null)f[F8]=as0(h[F8],w);return f},Rk=(h,w)=>{let f={};if(h[p]!=null)f[p]=W(h[p]);if(h[xI]!=null)f[xI]=W(h[xI]);if(h[iI]!=null)f[iI]=r0(h[iI]);if(h[X8]!=null)f[X8]=W(h[X8]);if(h[Y8]!=null)f[Y8]=r0(h[Y8]);if(h[yI]!=null)f[yI]=W(h[yI]);if(h[OI]!=null)f[OI]=r0(h[OI]);if(h[eI]!=null)f[eI]=r0(h[eI]);if(h[bI]!=null)f[bI]=W(h[bI]);if(h[G8]!=null)f[G8]=W(h[G8]);if(h[vI]!=null)f[vI]=W(h[vI]);if(h[lI]!=null)f[lI]=W(h[lI]);if(h[A1]!=null)f[A1]=W(h[A1]);if(h[U$]!=null)f[U$]=W(h[U$]);if(h[VI]!=null)f[VI]=y(b$(h[VI]));if(h[aI]!=null)f[aI]=y(b$(h[aI]));return f},us0=(h,w)=>{return(h||[]).filter((f)=>f!=null).map((f)=>{return Rk(f,w)})},Xk=(h,w)=>{let f={};if(h[r8]!=null)f[r8]=W(h[r8]);if(h[mI]!=null)f[mI]=W(h[mI]);return f},ts0=(h,w)=>{return(h||[]).filter((f)=>f!=null).map((f)=>{return h$0(f,w)})},h$0=(h,w)=>{let f={};if(h[U1]!=null)f[U1]=W(h[U1]);return f},D8=(h,w)=>{let f={};if(h[G0]!=null)f[G0]=W(h[G0]);if(h[h0]!=null)f[h0]=W(h[h0]);if(h[fU]!=null)f[fU]=W(h[fU]);return f},w$0=(h,w)=>{return(h||[]).filter((f)=>f!=null).map((f)=>{return D8(f,w)})},f$0=(h,w)=>{return(h||[]).filter((f)=>f!=null).map((f)=>{return W(f)})},s$0=(h,w)=>{let f={};if(h[k0]!=null)f[k0]=W(h[k0]);return f},$$0=(h,w)=>{return(h||[]).filter((f)=>f!=null).map((f)=>{return s$0(f,w)})},E$0=(h,w)=>{let f={};if(h[p]!=null)f[p]=W(h[p]);if(h[K0]!=null)f[K0]=W(h[K0]);if(h[T$]!=null)f[T$]=W(h[T$]);if(h[C$]!=null)f[C$]=E1(h[C$]);if(h[o0]!=null)f[o0]=W(h[o0]);if(h[zf]!=null)f[zf]=ms0(h[zf],w);if(h[w$]!=null)f[w$]=W(h[w$]);if(h[s$]!=null)f[s$]=n0(h[s$]);if(h[p0]!=null)f[p0]=E1(h[p0]);if(h.ResourceRecords==="")f[ps]=[];else if(h[ps]!=null&&h[ps][zU]!=null)f[ps]=$$0(L0(h[ps][zU]),w);if(h[Bf]!=null)f[Bf]=Qs0(h[Bf],w);if(h[q4]!=null)f[q4]=W(h[q4]);if(h[GU]!=null)f[GU]=W(h[GU]);if(h[Wf]!=null)f[Wf]=Hs0(h[Wf],w);if(h[Af]!=null)f[Af]=is0(h[Af],w);return f},T$0=(h,w)=>{return(h||[]).filter((f)=>f!=null).map((f)=>{return E$0(f,w)})},Yk=(h,w)=>{let f={};if(h[A8]!=null)f[A8]=W(h[A8]);if(h[qh]!=null)f[qh]=W(h[qh]);if(h.Tags==="")f[P4]=[];else if(h[P4]!=null&&h[P4][AU]!=null)f[P4]=G$0(L0(h[P4][AU]),w);return f},U$0=(h,w)=>{return(h||[]).filter((f)=>f!=null).map((f)=>{return Yk(f,w)})},F$0=(h,w)=>{let f={};if(h[K0]!=null)f[K0]=W(h[K0]);if(h[k0]!=null)f[k0]=E1(h[k0]);return f},C$0=(h,w)=>{let f={};if(h[A1]!=null)f[A1]=W(h[A1]);if(h[DI]!=null)f[DI]=y(b$(h[DI]));return f},I$0=(h,w)=>{let f={};if(h[Xf]!=null)f[Xf]=W(h[Xf]);if(h[k0]!=null)f[k0]=W(h[k0]);return f},G$0=(h,w)=>{return(h||[]).filter((f)=>f!=null).map((f)=>{return I$0(f,w)})},B$0=(h,w)=>{return(h||[]).filter((f)=>f!=null).map((f)=>{return d4(f,w)})},d4=(h,w)=>{let f={};if(h[G0]!=null)f[G0]=W(h[G0]);if(h[fw]!=null)f[fw]=r0(h[fw]);if(h[p]!=null)f[p]=W(h[p]);if(h[K0]!=null)f[K0]=W(h[K0]);if(h[th]!=null)f[th]=W(h[th]);if(h[C0]!=null)f[C0]=W(h[C0]);return f},YU=(h,w)=>{let f={};if(h[G0]!=null)f[G0]=W(h[G0]);if(h[h0]!=null)f[h0]=W(h[h0]);if(h[p]!=null)f[p]=W(h[p]);if(h[p0]!=null)f[p0]=E1(h[p0]);if(h[Z8]!=null)f[Z8]=W(h[Z8]);if(h[l0]!=null)f[l0]=W(h[l0]);if(h[F$]!=null)f[F$]=W(h[F$]);if(h[i1]!=null)f[i1]=r0(h[i1]);if(h[P8]!=null)f[P8]=W(h[P8]);return f},q8=(h,w)=>{return(h||[]).filter((f)=>f!=null).map((f)=>{return YU(f,w)})},W$0=(h,w)=>{return(h||[]).filter((f)=>f!=null).map((f)=>{return L$0(f,w)})},L$0=(h,w)=>{let f={};if(h[G0]!=null)f[G0]=W(h[G0]);if(h[p]!=null)f[p]=W(h[p]);if(h[K0]!=null)f[K0]=W(h[K0]);if(h[pI]!=null)f[pI]=r0(h[pI]);if(h[J8]!=null)f[J8]=r0(h[J8]);return f},k8=(h,w)=>{let f={};if(h[v4]!=null)f[v4]=W(h[v4]);if(h[l4]!=null)f[l4]=W(h[l4]);return f},Sk=(h,w)=>{return(h||[]).filter((f)=>f!=null).map((f)=>{return k8(f,w)})},Z=(h)=>({httpStatusCode:h.statusCode,requestId:h.headers["x-amzn-requestid"]??h.headers["x-amzn-request-id"]??h.headers["x-amz-request-id"],extendedRequestId:h.headers["x-amz-id-2"],cfId:h.headers["x-amz-cf-id"]});var os="Action",z$0="AliasHealthEnabled",Hh="AlarmIdentifier",A$0="AlarmName",R$0="AddTags",Bf="AliasTarget",X$0="AssociateVPCComment",Y$0="AssociateVPCWithHostedZoneRequest",hU="AWSRegion",us="Arn",Ff="Bias",C0="Comment",S$0="ChangeAction",wU="ChangeBatch",G4="CidrBlocks",JI="CidrBlock",Nh="ContinentCode",r$0="CidrCollectionChange",M$0="CidrCollectionChangeAction",Q$0="ChangeCidrCollectionRequest",K$0="CreateCidrCollectionRequest",B4="CidrCollections",Dh="CountryCode",VI="CreatedDate",Tf="ChildHealthChecks",Z$0="CreateHealthCheckRequest",N8="ChildHealthCheck",J$0="CreateHostedZoneRequest",s0="ChangeInfo",W4="CheckerIpRanges",ts="CollectionId",V$0="CreateKeySigningKeyRequest",L4="CidrLocations",P$0="CidrLocationNameDefaultAllowed",H$0="CidrLocationNameDefaultNotAllowed",N$0="CidrList",D$0="CidrNonce",q$0="CollectionName",PI="ContinentName",HI="CountryName",NI="ComparisonOperator",k$0="CreateQueryLoggingConfigRequest",D0="CallerReference",Wf="CidrRoutingConfig",j$0="CreateReusableDelegationSetRequest",y$0="ChangeResourceRecordSetsRequest",DI="CheckedTime",O$0="ChangeTagsForResourceRequest",l$0="CreateTrafficPolicyInstanceRequest",v$0="CreateTrafficPolicyRequest",b$0="CreateTrafficPolicyVersionRequest",tT="CollectionVersion",m$0="CreateVPCAssociationAuthorizationRequest",qI="CloudWatchAlarmConfiguration",fU="CloudWatchLogsLogGroupArn",d$0="CloudWatchRegion",rk="Changes",Mk="Change",JN="Cidr",kI="Collection",jI="Config",Lf="Coordinates",uh="Count",th="Document",yI="DigestAlgorithmMnemonic",OI="DigestAlgorithmType",lI="DNSKEYRecord",Wh="DNSName",M1="DelegationSet",sU="DelegationSetId",vI="DSRecord",z4="DelegationSets",bI="DigestValue",i$0="DeleteVPCAssociationAuthorizationRequest",c$0="DisassociateVPCComment",g$0="DisassociateVPCFromHostedZoneRequest",mI="Description",Uh="Disabled",A4="Dimensions",VN="Dimension",x$0="EDNS0ClientSubnetIP",_$0="EDNS0ClientSubnetMask",dI="EvaluationPeriods",Fh="EnableSNI",h$="EvaluateTargetHealth",w$="Failover",N4="FullyQualifiedDomainName",Ch="FailureThreshold",iI="Flag",zf="GeoLocation",n$0="GeoLocationContinentCode",e$0="GeoLocationCountryCode",D4="GeoLocationDetails",R4="GeoLocationDetailsList",a$0="GeoLocationSubdivisionCode",Af="GeoProximityLocation",Lh="HealthCheck",Rf="HealthCheckConfig",cI="HealthCheckCount",q4="HealthCheckId",p$0="HealthCheckNonce",Jh="HealthCheckObservations",LU="HealthCheckObservation",o$0="HealthCheckRegion",u$0="HealthCheckType",Cf="HealthCheckVersion",X4="HealthChecks",Ih="HealthThreshold",J1="HostedZone",$U="HostedZoneConfig",gI="HostedZoneCount",h0="HostedZoneId",yw="HostedZoneIdMarker",Y4="HostedZoneSummaries",PN="HostedZoneSummary",t$0="HostedZoneType",Vh="HostedZones",Gh="Inverted",k4="InsufficientDataHealthStatus",Ow="IPAddress",h40="IsPrivateZone",I0="IsTruncated",G0="Id",Xf="Key",xI="KmsArn",_I="KeyManagementServiceArn",nI="KeySigningKey",S4="KeySigningKeys",eI="KeyTag",sw="Location",aI="LastModifiedDate",U1="LocationName",f$="LinkedService",w40="ListTagsForResourcesRequest",pI="LatestVersion",EU="LocalZoneGroup",TU="Latitude",hw="Limit",UU="Longitude",c1="Marker",o="MaxItems",If="MeasureLatency",oI="MetricName",i4="MaxResults",s$="MultiValueAnswer",l0="Message",p="Name",uI="NextContinentCode",tI="NextCountryCode",h8="NextDNSName",w8="NextHostedZoneId",ww="NextMarker",f8="NextRecordIdentifier",s8="NextRecordName",$8="NextRecordType",r4="NameServers",E8="NextSubdivisionCode",HN="NameServer",q0="NextToken",T8="Nameserver",U8="Namespace",j8="Nonce",F8="Owner",C8="OwningAccount",I8="OwningService",Bh="Port",G8="PublicKey",$$="PrivateZone",B8="Period",W8="Protocol",lw="QueryLoggingConfig",M4="QueryLoggingConfigs",Uf="Regions",L8="ResponseCode",FU="RoutingControlArn",y8="ResourceDescription",NN="RecordDataEntry",f40="RData",Q4="RecordData",s40="ResetElements",DN="ResettableElementName",qh="ResourceId",$40="ResolverIP",E40="ResourceIds",Gf="RequestInterval",CU="RecordName",j4="ResourcePath",zU="ResourceRecord",K4="ResourceRecordSets",z8="ResourceRecordSetCount",T40="ResourceRecordSetFailover",U40="ResourceRecordSetIdentifier",F40="ResourceRecordSetMultiValueAnswer",C40="ResourceRecordSetRegion",I40="ResourceRecordSetWeight",E$="ResourceRecordSet",G40="RRType",ps="ResourceRecords",IU="RecordType",B40="RemoveTagKeys",y4="ResourceTagSet",Z4="ResourceTagSets",A8="ResourceType",o0="Region",A1="Status",R8="SubmittedAt",X8="SigningAlgorithmMnemonic",Y8="SigningAlgorithmType",kh="SubdivisionCode",W40="StartContinentCode",L40="StartCountryCode",T$="SetIdentifier",z40="SigningKeyName",A40="SigningKeyString",R40="SigningKeyStatus",U$="StatusMessage",S8="SubdivisionName",r8="ServicePrincipal",M8="StatusReport",X40="StartRecordIdentifier",Y40="StartRecordName",S40="StartRecordType",O4="SearchString",r40="StartSubdivisionCode",Q8="ServeSignature",K8="Statistic",Z8="State",K0="Type",Qk="TagKey",Q1="TrafficPolicy",O8="TrafficPolicyComment",J8="TrafficPolicyCount",Kk="TrafficPolicyDocument",F$="TrafficPolicyId",V8="TrafficPolicyInstanceCount",GU="TrafficPolicyInstanceId",BU="TrafficPolicyIdMarker",g1="TrafficPolicyInstanceNameMarker",x1="TrafficPolicyInstanceTypeMarker",R1="TrafficPolicyInstance",z1="TrafficPolicyInstances",M40="TrafficPolicyName",J4="TrafficPolicySummaries",qN="TrafficPolicySummary",P8="TrafficPolicyType",i1="TrafficPolicyVersion",WU="TrafficPolicyVersionMarker",V4="TrafficPolicies",Q40="TagResourceId",p0="TTL",K40="TagValue",AU="Tag",P4="Tags",H8="Threshold",Z40="UpdateHealthCheckRequest",J40="UpdateHostedZoneCommentRequest",V40="UpdateTrafficPolicyCommentRequest",P40="UpdateTrafficPolicyInstanceRequest",H40="UUID",k0="Value",V0="VPC",l4="VPCId",v4="VPCRegion",Ph="VPCs",fw="Version",C$="Weight",N40="continentcode",D40="countrycode",q40="delegationsetid",k40="dnsname",j40="edns0clientsubnetip",y40="edns0clientsubnetmask",O40="hostedzonetype",c4="hostedzoneid",l40="identifier",Zk="id",jh="location",g4="maxresults",n1="maxitems",l8="marker",zh="member",S="message",H4="messages",I$="nexttoken",v40="name",b40="recordname",m40="recordtype",d40="resolverip",i40="subdivisioncode",c40="startcontinentcode",g40="startcountrycode",x40="startsubdivisioncode",_40="type",n40="trafficpolicyid",v8="trafficpolicyinstancename",b8="trafficpolicyinstancetype",e40="trafficpolicyversion",a40="vpcid",i0='<?xml version="1.0" encoding="UTF-8"?>',p40="version",o40="vpcregion";class m8 extends A.classBuilder().ep(K).m(function(h,w,f,s){return[R(f,this.serialize,this.deserialize),X(f,h.getEndpointParameterInstructions()),l(f)]}).s("AWSDnsV20130401","ActivateKeySigningKey",{}).n("Route53Client","ActivateKeySigningKeyCommand").f(void 0,void 0).ser(kN).de(aD).build(){}D();k();J();class d8 extends A.classBuilder().ep(K).m(function(h,w,f,s){return[R(f,this.serialize,this.deserialize),X(f,h.getEndpointParameterInstructions()),l(f)]}).s("AWSDnsV20130401","AssociateVPCWithHostedZone",{}).n("Route53Client","AssociateVPCWithHostedZoneCommand").f(void 0,void 0).ser(jN).de(pD).build(){}D();k();J();class i8 extends A.classBuilder().ep(K).m(function(h,w,f,s){return[R(f,this.serialize,this.deserialize),X(f,h.getEndpointParameterInstructions()),l(f)]}).s("AWSDnsV20130401","ChangeCidrCollection",{}).n("Route53Client","ChangeCidrCollectionCommand").f(void 0,void 0).ser(yN).de(oD).build(){}D();k();J();class c8 extends A.classBuilder().ep(K).m(function(h,w,f,s){return[R(f,this.serialize,this.deserialize),X(f,h.getEndpointParameterInstructions()),QN(f),l(f)]}).s("AWSDnsV20130401","ChangeResourceRecordSets",{}).n("Route53Client","ChangeResourceRecordSetsCommand").f(void 0,void 0).ser(ON).de(uD).build(){}D();k();J();class g8 extends A.classBuilder().ep(K).m(function(h,w,f,s){return[R(f,this.serialize,this.deserialize),X(f,h.getEndpointParameterInstructions())]}).s("AWSDnsV20130401","ChangeTagsForResource",{}).n("Route53Client","ChangeTagsForResourceCommand").f(void 0,void 0).ser(lN).de(tD).build(){}D();k();J();class x8 extends A.classBuilder().ep(K).m(function(h,w,f,s){return[R(f,this.serialize,this.deserialize),X(f,h.getEndpointParameterInstructions())]}).s("AWSDnsV20130401","CreateCidrCollection",{}).n("Route53Client","CreateCidrCollectionCommand").f(void 0,void 0).ser(vN).de(hq).build(){}D();k();J();class _8 extends A.classBuilder().ep(K).m(function(h,w,f,s){return[R(f,this.serialize,this.deserialize),X(f,h.getEndpointParameterInstructions())]}).s("AWSDnsV20130401","CreateHealthCheck",{}).n("Route53Client","CreateHealthCheckCommand").f(void 0,void 0).ser(bN).de(wq).build(){}D();k();J();class n8 extends A.classBuilder().ep(K).m(function(h,w,f,s){return[R(f,this.serialize,this.deserialize),X(f,h.getEndpointParameterInstructions()),l(f)]}).s("AWSDnsV20130401","CreateHostedZone",{}).n("Route53Client","CreateHostedZoneCommand").f(void 0,void 0).ser(mN).de(fq).build(){}D();k();J();class e8 extends A.classBuilder().ep(K).m(function(h,w,f,s){return[R(f,this.serialize,this.deserialize),X(f,h.getEndpointParameterInstructions()),l(f)]}).s("AWSDnsV20130401","CreateKeySigningKey",{}).n("Route53Client","CreateKeySigningKeyCommand").f(void 0,void 0).ser(dN).de(sq).build(){}D();k();J();class a8 extends A.classBuilder().ep(K).m(function(h,w,f,s){return[R(f,this.serialize,this.deserialize),X(f,h.getEndpointParameterInstructions()),l(f)]}).s("AWSDnsV20130401","CreateQueryLoggingConfig",{}).n("Route53Client","CreateQueryLoggingConfigCommand").f(void 0,void 0).ser(iN).de($q).build(){}D();k();J();class p8 extends A.classBuilder().ep(K).m(function(h,w,f,s){return[R(f,this.serialize,this.deserialize),X(f,h.getEndpointParameterInstructions()),l(f)]}).s("AWSDnsV20130401","CreateReusableDelegationSet",{}).n("Route53Client","CreateReusableDelegationSetCommand").f(void 0,void 0).ser(cN).de(Eq).build(){}D();k();J();class o8 extends A.classBuilder().ep(K).m(function(h,w,f,s){return[R(f,this.serialize,this.deserialize),X(f,h.getEndpointParameterInstructions())]}).s("AWSDnsV20130401","CreateTrafficPolicy",{}).n("Route53Client","CreateTrafficPolicyCommand").f(void 0,void 0).ser(gN).de(Tq).build(){}D();k();J();class u8 extends A.classBuilder().ep(K).m(function(h,w,f,s){return[R(f,this.serialize,this.deserialize),X(f,h.getEndpointParameterInstructions()),l(f)]}).s("AWSDnsV20130401","CreateTrafficPolicyInstance",{}).n("Route53Client","CreateTrafficPolicyInstanceCommand").f(void 0,void 0).ser(xN).de(Uq).build(){}D();k();J();class t8 extends A.classBuilder().ep(K).m(function(h,w,f,s){return[R(f,this.serialize,this.deserialize),X(f,h.getEndpointParameterInstructions()),l(f)]}).s("AWSDnsV20130401","CreateTrafficPolicyVersion",{}).n("Route53Client","CreateTrafficPolicyVersionCommand").f(void 0,void 0).ser(_N).de(Fq).build(){}D();k();J();class hG extends A.classBuilder().ep(K).m(function(h,w,f,s){return[R(f,this.serialize,this.deserialize),X(f,h.getEndpointParameterInstructions()),l(f)]}).s("AWSDnsV20130401","CreateVPCAssociationAuthorization",{}).n("Route53Client","CreateVPCAssociationAuthorizationCommand").f(void 0,void 0).ser(nN).de(Cq).build(){}D();k();J();class wG extends A.classBuilder().ep(K).m(function(h,w,f,s){return[R(f,this.serialize,this.deserialize),X(f,h.getEndpointParameterInstructions()),l(f)]}).s("AWSDnsV20130401","DeactivateKeySigningKey",{}).n("Route53Client","DeactivateKeySigningKeyCommand").f(void 0,void 0).ser(eN).de(Iq).build(){}D();k();J();class fG extends A.classBuilder().ep(K).m(function(h,w,f,s){return[R(f,this.serialize,this.deserialize),X(f,h.getEndpointParameterInstructions()),l(f)]}).s("AWSDnsV20130401","DeleteCidrCollection",{}).n("Route53Client","DeleteCidrCollectionCommand").f(void 0,void 0).ser(aN).de(Gq).build(){}D();k();J();class sG extends A.classBuilder().ep(K).m(function(h,w,f,s){return[R(f,this.serialize,this.deserialize),X(f,h.getEndpointParameterInstructions())]}).s("AWSDnsV20130401","DeleteHealthCheck",{}).n("Route53Client","DeleteHealthCheckCommand").f(void 0,void 0).ser(pN).de(Bq).build(){}D();k();J();class $G extends A.classBuilder().ep(K).m(function(h,w,f,s){return[R(f,this.serialize,this.deserialize),X(f,h.getEndpointParameterInstructions()),l(f)]}).s("AWSDnsV20130401","DeleteHostedZone",{}).n("Route53Client","DeleteHostedZoneCommand").f(void 0,void 0).ser(oN).de(Wq).build(){}D();k();J();class EG extends A.classBuilder().ep(K).m(function(h,w,f,s){return[R(f,this.serialize,this.deserialize),X(f,h.getEndpointParameterInstructions()),l(f)]}).s("AWSDnsV20130401","DeleteKeySigningKey",{}).n("Route53Client","DeleteKeySigningKeyCommand").f(void 0,void 0).ser(uN).de(Lq).build(){}D();k();J();class TG extends A.classBuilder().ep(K).m(function(h,w,f,s){return[R(f,this.serialize,this.deserialize),X(f,h.getEndpointParameterInstructions()),l(f)]}).s("AWSDnsV20130401","DeleteQueryLoggingConfig",{}).n("Route53Client","DeleteQueryLoggingConfigCommand").f(void 0,void 0).ser(tN).de(zq).build(){}D();k();J();class UG extends A.classBuilder().ep(K).m(function(h,w,f,s){return[R(f,this.serialize,this.deserialize),X(f,h.getEndpointParameterInstructions()),l(f)]}).s("AWSDnsV20130401","DeleteReusableDelegationSet",{}).n("Route53Client","DeleteReusableDelegationSetCommand").f(void 0,void 0).ser(hD).de(Aq).build(){}D();k();J();class FG extends A.classBuilder().ep(K).m(function(h,w,f,s){return[R(f,this.serialize,this.deserialize),X(f,h.getEndpointParameterInstructions()),l(f)]}).s("AWSDnsV20130401","DeleteTrafficPolicy",{}).n("Route53Client","DeleteTrafficPolicyCommand").f(void 0,void 0).ser(wD).de(Rq).build(){}D();k();J();class CG extends A.classBuilder().ep(K).m(function(h,w,f,s){return[R(f,this.serialize,this.deserialize),X(f,h.getEndpointParameterInstructions()),l(f)]}).s("AWSDnsV20130401","DeleteTrafficPolicyInstance",{}).n("Route53Client","DeleteTrafficPolicyInstanceCommand").f(void 0,void 0).ser(fD).de(Xq).build(){}D();k();J();class IG extends A.classBuilder().ep(K).m(function(h,w,f,s){return[R(f,this.serialize,this.deserialize),X(f,h.getEndpointParameterInstructions()),l(f)]}).s("AWSDnsV20130401","DeleteVPCAssociationAuthorization",{}).n("Route53Client","DeleteVPCAssociationAuthorizationCommand").f(void 0,void 0).ser(sD).de(Yq).build(){}D();k();J();class GG extends A.classBuilder().ep(K).m(function(h,w,f,s){return[R(f,this.serialize,this.deserialize),X(f,h.getEndpointParameterInstructions()),l(f)]}).s("AWSDnsV20130401","DisableHostedZoneDNSSEC",{}).n("Route53Client","DisableHostedZoneDNSSECCommand").f(void 0,void 0).ser($D).de(Sq).build(){}D();k();J();class BG extends A.classBuilder().ep(K).m(function(h,w,f,s){return[R(f,this.serialize,this.deserialize),X(f,h.getEndpointParameterInstructions()),l(f)]}).s("AWSDnsV20130401","DisassociateVPCFromHostedZone",{}).n("Route53Client","DisassociateVPCFromHostedZoneCommand").f(void 0,void 0).ser(ED).de(rq).build(){}D();k();J();class WG extends A.classBuilder().ep(K).m(function(h,w,f,s){return[R(f,this.serialize,this.deserialize),X(f,h.getEndpointParameterInstructions()),l(f)]}).s("AWSDnsV20130401","EnableHostedZoneDNSSEC",{}).n("Route53Client","EnableHostedZoneDNSSECCommand").f(void 0,void 0).ser(TD).de(Mq).build(){}D();k();J();class LG extends A.classBuilder().ep(K).m(function(h,w,f,s){return[R(f,this.serialize,this.deserialize),X(f,h.getEndpointParameterInstructions())]}).s("AWSDnsV20130401","GetAccountLimit",{}).n("Route53Client","GetAccountLimitCommand").f(void 0,void 0).ser(UD).de(Qq).build(){}D();k();J();class zG extends A.classBuilder().ep(K).m(function(h,w,f,s){return[R(f,this.serialize,this.deserialize),X(f,h.getEndpointParameterInstructions()),l(f)]}).s("AWSDnsV20130401","GetChange",{}).n("Route53Client","GetChangeCommand").f(void 0,void 0).ser(FD).de(Kq).build(){}D();k();J();class AG extends A.classBuilder().ep(K).m(function(h,w,f,s){return[R(f,this.serialize,this.deserialize),X(f,h.getEndpointParameterInstructions())]}).s("AWSDnsV20130401","GetCheckerIpRanges",{}).n("Route53Client","GetCheckerIpRangesCommand").f(void 0,void 0).ser(CD).de(Zq).build(){}D();k();J();class RG extends A.classBuilder().ep(K).m(function(h,w,f,s){return[R(f,this.serialize,this.deserialize),X(f,h.getEndpointParameterInstructions()),l(f)]}).s("AWSDnsV20130401","GetDNSSEC",{}).n("Route53Client","GetDNSSECCommand").f(void 0,void 0).ser(ID).de(Jq).build(){}D();k();J();class XG extends A.classBuilder().ep(K).m(function(h,w,f,s){return[R(f,this.serialize,this.deserialize),X(f,h.getEndpointParameterInstructions())]}).s("AWSDnsV20130401","GetGeoLocation",{}).n("Route53Client","GetGeoLocationCommand").f(void 0,void 0).ser(GD).de(Vq).build(){}D();k();J();class YG extends A.classBuilder().ep(K).m(function(h,w,f,s){return[R(f,this.serialize,this.deserialize),X(f,h.getEndpointParameterInstructions())]}).s("AWSDnsV20130401","GetHealthCheck",{}).n("Route53Client","GetHealthCheckCommand").f(void 0,void 0).ser(BD).de(Pq).build(){}D();k();J();class SG extends A.classBuilder().ep(K).m(function(h,w,f,s){return[R(f,this.serialize,this.deserialize),X(f,h.getEndpointParameterInstructions())]}).s("AWSDnsV20130401","GetHealthCheckCount",{}).n("Route53Client","GetHealthCheckCountCommand").f(void 0,void 0).ser(WD).de(Hq).build(){}D();k();J();class rG extends A.classBuilder().ep(K).m(function(h,w,f,s){return[R(f,this.serialize,this.deserialize),X(f,h.getEndpointParameterInstructions())]}).s("AWSDnsV20130401","GetHealthCheckLastFailureReason",{}).n("Route53Client","GetHealthCheckLastFailureReasonCommand").f(void 0,void 0).ser(LD).de(Nq).build(){}D();k();J();class MG extends A.classBuilder().ep(K).m(function(h,w,f,s){return[R(f,this.serialize,this.deserialize),X(f,h.getEndpointParameterInstructions())]}).s("AWSDnsV20130401","GetHealthCheckStatus",{}).n("Route53Client","GetHealthCheckStatusCommand").f(void 0,void 0).ser(zD).de(Dq).build(){}D();k();J();class QG extends A.classBuilder().ep(K).m(function(h,w,f,s){return[R(f,this.serialize,this.deserialize),X(f,h.getEndpointParameterInstructions()),l(f)]}).s("AWSDnsV20130401","GetHostedZone",{}).n("Route53Client","GetHostedZoneCommand").f(void 0,void 0).ser(AD).de(qq).build(){}D();k();J();class KG extends A.classBuilder().ep(K).m(function(h,w,f,s){return[R(f,this.serialize,this.deserialize),X(f,h.getEndpointParameterInstructions())]}).s("AWSDnsV20130401","GetHostedZoneCount",{}).n("Route53Client","GetHostedZoneCountCommand").f(void 0,void 0).ser(RD).de(kq).build(){}D();k();J();class ZG extends A.classBuilder().ep(K).m(function(h,w,f,s){return[R(f,this.serialize,this.deserialize),X(f,h.getEndpointParameterInstructions()),l(f)]}).s("AWSDnsV20130401","GetHostedZoneLimit",{}).n("Route53Client","GetHostedZoneLimitCommand").f(void 0,void 0).ser(XD).de(jq).build(){}D();k();J();class JG extends A.classBuilder().ep(K).m(function(h,w,f,s){return[R(f,this.serialize,this.deserialize),X(f,h.getEndpointParameterInstructions()),l(f)]}).s("AWSDnsV20130401","GetQueryLoggingConfig",{}).n("Route53Client","GetQueryLoggingConfigCommand").f(void 0,void 0).ser(YD).de(yq).build(){}D();k();J();class VG extends A.classBuilder().ep(K).m(function(h,w,f,s){return[R(f,this.serialize,this.deserialize),X(f,h.getEndpointParameterInstructions()),l(f)]}).s("AWSDnsV20130401","GetReusableDelegationSet",{}).n("Route53Client","GetReusableDelegationSetCommand").f(void 0,void 0).ser(SD).de(Oq).build(){}D();k();J();class PG extends A.classBuilder().ep(K).m(function(h,w,f,s){return[R(f,this.serialize,this.deserialize),X(f,h.getEndpointParameterInstructions()),l(f)]}).s("AWSDnsV20130401","GetReusableDelegationSetLimit",{}).n("Route53Client","GetReusableDelegationSetLimitCommand").f(void 0,void 0).ser(rD).de(lq).build(){}D();k();J();class HG extends A.classBuilder().ep(K).m(function(h,w,f,s){return[R(f,this.serialize,this.deserialize),X(f,h.getEndpointParameterInstructions()),l(f)]}).s("AWSDnsV20130401","GetTrafficPolicy",{}).n("Route53Client","GetTrafficPolicyCommand").f(void 0,void 0).ser(MD).de(vq).build(){}D();k();J();class NG extends A.classBuilder().ep(K).m(function(h,w,f,s){return[R(f,this.serialize,this.deserialize),X(f,h.getEndpointParameterInstructions()),l(f)]}).s("AWSDnsV20130401","GetTrafficPolicyInstance",{}).n("Route53Client","GetTrafficPolicyInstanceCommand").f(void 0,void 0).ser(QD).de(bq).build(){}D();k();J();class DG extends A.classBuilder().ep(K).m(function(h,w,f,s){return[R(f,this.serialize,this.deserialize),X(f,h.getEndpointParameterInstructions())]}).s("AWSDnsV20130401","GetTrafficPolicyInstanceCount",{}).n("Route53Client","GetTrafficPolicyInstanceCountCommand").f(void 0,void 0).ser(KD).de(mq).build(){}D();k();J();class qG extends A.classBuilder().ep(K).m(function(h,w,f,s){return[R(f,this.serialize,this.deserialize),X(f,h.getEndpointParameterInstructions())]}).s("AWSDnsV20130401","ListCidrBlocks",{}).n("Route53Client","ListCidrBlocksCommand").f(void 0,void 0).ser(ZD).de(dq).build(){}D();k();J();class kG extends A.classBuilder().ep(K).m(function(h,w,f,s){return[R(f,this.serialize,this.deserialize),X(f,h.getEndpointParameterInstructions())]}).s("AWSDnsV20130401","ListCidrCollections",{}).n("Route53Client","ListCidrCollectionsCommand").f(void 0,void 0).ser(JD).de(iq).build(){}D();k();J();class jG extends A.classBuilder().ep(K).m(function(h,w,f,s){return[R(f,this.serialize,this.deserialize),X(f,h.getEndpointParameterInstructions())]}).s("AWSDnsV20130401","ListCidrLocations",{}).n("Route53Client","ListCidrLocationsCommand").f(void 0,void 0).ser(VD).de(cq).build(){}D();k();J();class yG extends A.classBuilder().ep(K).m(function(h,w,f,s){return[R(f,this.serialize,this.deserialize),X(f,h.getEndpointParameterInstructions())]}).s("AWSDnsV20130401","ListGeoLocations",{}).n("Route53Client","ListGeoLocationsCommand").f(void 0,void 0).ser(PD).de(gq).build(){}D();k();J();class OG extends A.classBuilder().ep(K).m(function(h,w,f,s){return[R(f,this.serialize,this.deserialize),X(f,h.getEndpointParameterInstructions())]}).s("AWSDnsV20130401","ListHealthChecks",{}).n("Route53Client","ListHealthChecksCommand").f(void 0,void 0).ser(HD).de(xq).build(){}D();k();J();class lG extends A.classBuilder().ep(K).m(function(h,w,f,s){return[R(f,this.serialize,this.deserialize),X(f,h.getEndpointParameterInstructions()),l(f)]}).s("AWSDnsV20130401","ListHostedZonesByName",{}).n("Route53Client","ListHostedZonesByNameCommand").f(void 0,void 0).ser(DD).de(nq).build(){}D();k();J();class vG extends A.classBuilder().ep(K).m(function(h,w,f,s){return[R(f,this.serialize,this.deserialize),X(f,h.getEndpointParameterInstructions())]}).s("AWSDnsV20130401","ListHostedZonesByVPC",{}).n("Route53Client","ListHostedZonesByVPCCommand").f(void 0,void 0).ser(qD).de(eq).build(){}D();k();J();class bG extends A.classBuilder().ep(K).m(function(h,w,f,s){return[R(f,this.serialize,this.deserialize),X(f,h.getEndpointParameterInstructions()),l(f)]}).s("AWSDnsV20130401","ListHostedZones",{}).n("Route53Client","ListHostedZonesCommand").f(void 0,void 0).ser(ND).de(_q).build(){}D();k();J();class mG extends A.classBuilder().ep(K).m(function(h,w,f,s){return[R(f,this.serialize,this.deserialize),X(f,h.getEndpointParameterInstructions()),l(f)]}).s("AWSDnsV20130401","ListQueryLoggingConfigs",{}).n("Route53Client","ListQueryLoggingConfigsCommand").f(void 0,void 0).ser(kD).de(aq).build(){}D();k();J();class dG extends A.classBuilder().ep(K).m(function(h,w,f,s){return[R(f,this.serialize,this.deserialize),X(f,h.getEndpointParameterInstructions()),l(f)]}).s("AWSDnsV20130401","ListResourceRecordSets",{}).n("Route53Client","ListResourceRecordSetsCommand").f(void 0,void 0).ser(jD).de(pq).build(){}D();k();J();class iG extends A.classBuilder().ep(K).m(function(h,w,f,s){return[R(f,this.serialize,this.deserialize),X(f,h.getEndpointParameterInstructions())]}).s("AWSDnsV20130401","ListReusableDelegationSets",{}).n("Route53Client","ListReusableDelegationSetsCommand").f(void 0,void 0).ser(yD).de(oq).build(){}D();k();J();class cG extends A.classBuilder().ep(K).m(function(h,w,f,s){return[R(f,this.serialize,this.deserialize),X(f,h.getEndpointParameterInstructions())]}).s("AWSDnsV20130401","ListTagsForResource",{}).n("Route53Client","ListTagsForResourceCommand").f(void 0,void 0).ser(OD).de(uq).build(){}D();k();J();class gG extends A.classBuilder().ep(K).m(function(h,w,f,s){return[R(f,this.serialize,this.deserialize),X(f,h.getEndpointParameterInstructions())]}).s("AWSDnsV20130401","ListTagsForResources",{}).n("Route53Client","ListTagsForResourcesCommand").f(void 0,void 0).ser(lD).de(tq).build(){}D();k();J();class xG extends A.classBuilder().ep(K).m(function(h,w,f,s){return[R(f,this.serialize,this.deserialize),X(f,h.getEndpointParameterInstructions())]}).s("AWSDnsV20130401","ListTrafficPolicies",{}).n("Route53Client","ListTrafficPoliciesCommand").f(void 0,void 0).ser(vD).de(hk).build(){}D();k();J();class _G extends A.classBuilder().ep(K).m(function(h,w,f,s){return[R(f,this.serialize,this.deserialize),X(f,h.getEndpointParameterInstructions()),l(f)]}).s("AWSDnsV20130401","ListTrafficPolicyInstancesByHostedZone",{}).n("Route53Client","ListTrafficPolicyInstancesByHostedZoneCommand").f(void 0,void 0).ser(mD).de(fk).build(){}D();k();J();class nG extends A.classBuilder().ep(K).m(function(h,w,f,s){return[R(f,this.serialize,this.deserialize),X(f,h.getEndpointParameterInstructions())]}).s("AWSDnsV20130401","ListTrafficPolicyInstancesByPolicy",{}).n("Route53Client","ListTrafficPolicyInstancesByPolicyCommand").f(void 0,void 0).ser(dD).de(sk).build(){}D();k();J();class eG extends A.classBuilder().ep(K).m(function(h,w,f,s){return[R(f,this.serialize,this.deserialize),X(f,h.getEndpointParameterInstructions())]}).s("AWSDnsV20130401","ListTrafficPolicyInstances",{}).n("Route53Client","ListTrafficPolicyInstancesCommand").f(void 0,void 0).ser(bD).de(wk).build(){}D();k();J();class aG extends A.classBuilder().ep(K).m(function(h,w,f,s){return[R(f,this.serialize,this.deserialize),X(f,h.getEndpointParameterInstructions()),l(f)]}).s("AWSDnsV20130401","ListTrafficPolicyVersions",{}).n("Route53Client","ListTrafficPolicyVersionsCommand").f(void 0,void 0).ser(iD).de($k).build(){}D();k();J();class pG extends A.classBuilder().ep(K).m(function(h,w,f,s){return[R(f,this.serialize,this.deserialize),X(f,h.getEndpointParameterInstructions()),l(f)]}).s("AWSDnsV20130401","ListVPCAssociationAuthorizations",{}).n("Route53Client","ListVPCAssociationAuthorizationsCommand").f(void 0,void 0).ser(cD).de(Ek).build(){}D();k();J();class oG extends A.classBuilder().ep(K).m(function(h,w,f,s){return[R(f,this.serialize,this.deserialize),X(f,h.getEndpointParameterInstructions()),l(f)]}).s("AWSDnsV20130401","TestDNSAnswer",{}).n("Route53Client","TestDNSAnswerCommand").f(void 0,void 0).ser(gD).de(Tk).build(){}D();k();J();class uG extends A.classBuilder().ep(K).m(function(h,w,f,s){return[R(f,this.serialize,this.deserialize),X(f,h.getEndpointParameterInstructions())]}).s("AWSDnsV20130401","UpdateHealthCheck",{}).n("Route53Client","UpdateHealthCheckCommand").f(void 0,void 0).ser(xD).de(Uk).build(){}D();k();J();class tG extends A.classBuilder().ep(K).m(function(h,w,f,s){return[R(f,this.serialize,this.deserialize),X(f,h.getEndpointParameterInstructions()),l(f)]}).s("AWSDnsV20130401","UpdateHostedZoneComment",{}).n("Route53Client","UpdateHostedZoneCommentCommand").f(void 0,void 0).ser(_D).de(Fk).build(){}D();k();J();class hB extends A.classBuilder().ep(K).m(function(h,w,f,s){return[R(f,this.serialize,this.deserialize),X(f,h.getEndpointParameterInstructions()),l(f)]}).s("AWSDnsV20130401","UpdateTrafficPolicyComment",{}).n("Route53Client","UpdateTrafficPolicyCommentCommand").f(void 0,void 0).ser(nD).de(Ck).build(){}D();k();J();class wB extends A.classBuilder().ep(K).m(function(h,w,f,s){return[R(f,this.serialize,this.deserialize),X(f,h.getEndpointParameterInstructions()),l(f)]}).s("AWSDnsV20130401","UpdateTrafficPolicyInstance",{}).n("Route53Client","UpdateTrafficPolicyInstanceCommand").f(void 0,void 0).ser(eD).de(Ik).build(){}var u40={ActivateKeySigningKeyCommand:m8,AssociateVPCWithHostedZoneCommand:d8,ChangeCidrCollectionCommand:i8,ChangeResourceRecordSetsCommand:c8,ChangeTagsForResourceCommand:g8,CreateCidrCollectionCommand:x8,CreateHealthCheckCommand:_8,CreateHostedZoneCommand:n8,CreateKeySigningKeyCommand:e8,CreateQueryLoggingConfigCommand:a8,CreateReusableDelegationSetCommand:p8,CreateTrafficPolicyCommand:o8,CreateTrafficPolicyInstanceCommand:u8,CreateTrafficPolicyVersionCommand:t8,CreateVPCAssociationAuthorizationCommand:hG,DeactivateKeySigningKeyCommand:wG,DeleteCidrCollectionCommand:fG,DeleteHealthCheckCommand:sG,DeleteHostedZoneCommand:$G,DeleteKeySigningKeyCommand:EG,DeleteQueryLoggingConfigCommand:TG,DeleteReusableDelegationSetCommand:UG,DeleteTrafficPolicyCommand:FG,DeleteTrafficPolicyInstanceCommand:CG,DeleteVPCAssociationAuthorizationCommand:IG,DisableHostedZoneDNSSECCommand:GG,DisassociateVPCFromHostedZoneCommand:BG,EnableHostedZoneDNSSECCommand:WG,GetAccountLimitCommand:LG,GetChangeCommand:zG,GetCheckerIpRangesCommand:AG,GetDNSSECCommand:RG,GetGeoLocationCommand:XG,GetHealthCheckCommand:YG,GetHealthCheckCountCommand:SG,GetHealthCheckLastFailureReasonCommand:rG,GetHealthCheckStatusCommand:MG,GetHostedZoneCommand:QG,GetHostedZoneCountCommand:KG,GetHostedZoneLimitCommand:ZG,GetQueryLoggingConfigCommand:JG,GetReusableDelegationSetCommand:VG,GetReusableDelegationSetLimitCommand:PG,GetTrafficPolicyCommand:HG,GetTrafficPolicyInstanceCommand:NG,GetTrafficPolicyInstanceCountCommand:DG,ListCidrBlocksCommand:qG,ListCidrCollectionsCommand:kG,ListCidrLocationsCommand:jG,ListGeoLocationsCommand:yG,ListHealthChecksCommand:OG,ListHostedZonesCommand:bG,ListHostedZonesByNameCommand:lG,ListHostedZonesByVPCCommand:vG,ListQueryLoggingConfigsCommand:mG,ListResourceRecordSetsCommand:dG,ListReusableDelegationSetsCommand:iG,ListTagsForResourceCommand:cG,ListTagsForResourcesCommand:gG,ListTrafficPoliciesCommand:xG,ListTrafficPolicyInstancesCommand:eG,ListTrafficPolicyInstancesByHostedZoneCommand:_G,ListTrafficPolicyInstancesByPolicyCommand:nG,ListTrafficPolicyVersionsCommand:aG,ListVPCAssociationAuthorizationsCommand:pG,TestDNSAnswerCommand:oG,UpdateHealthCheckCommand:uG,UpdateHostedZoneCommentCommand:tG,UpdateTrafficPolicyCommentCommand:hB,UpdateTrafficPolicyInstanceCommand:wB};class vw extends KI{}ws(u40,vw);p4();o4();u4();D$();Rw();var G$=O(b0(),1);e5();D();hf();J();var Jk=O(y0(),1);mh();var Vk=async(h,w,f)=>{return{operation:zw(w).operation,region:await W1(h.region)()||(()=>{throw new Error("expected `region` to be configured for `aws.auth#sigv4`")})()}};function t40(h){return{schemeId:"aws.auth#sigv4",signingProperties:{name:"route53domains",region:h.region},propertiesExtractor:(w,f)=>({signingProperties:{config:w,context:f}})}}var Pk=(h)=>{let w=[];switch(h.operation){default:w.push(t40(h))}return w},Hk=(h)=>{let w=Jk.resolveAwsSdkSigV4Config(h);return Object.assign(w,{})};var Nk=(h)=>{return Object.assign(h,{useDualstackEndpoint:h.useDualstackEndpoint??!1,useFipsEndpoint:h.useFipsEndpoint??!1,defaultSigningName:"route53domains"})},g={UseFIPS:{type:"builtInParams",name:"useFipsEndpoint"},Endpoint:{type:"builtInParams",name:"endpoint"},Region:{type:"builtInParams",name:"region"},UseDualStack:{type:"builtInParams",name:"useDualstackEndpoint"}};var Dk={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.777.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.775.0","@aws-sdk/credential-provider-node":"3.777.0","@aws-sdk/middleware-host-header":"3.775.0","@aws-sdk/middleware-logger":"3.775.0","@aws-sdk/middleware-recursion-detection":"3.775.0","@aws-sdk/middleware-user-agent":"3.775.0","@aws-sdk/region-config-resolver":"3.775.0","@aws-sdk/types":"3.775.0","@aws-sdk/util-endpoints":"3.775.0","@aws-sdk/util-user-agent-browser":"3.775.0","@aws-sdk/util-user-agent-node":"3.775.0","@smithy/config-resolver":"^4.1.0","@smithy/core":"^3.2.0","@smithy/fetch-http-handler":"^5.0.2","@smithy/hash-node":"^4.0.2","@smithy/invalid-dependency":"^4.0.2","@smithy/middleware-content-length":"^4.0.2","@smithy/middleware-endpoint":"^4.1.0","@smithy/middleware-retry":"^4.1.0","@smithy/middleware-serde":"^4.0.3","@smithy/middleware-stack":"^4.0.2","@smithy/node-config-provider":"^4.0.2","@smithy/node-http-handler":"^4.0.4","@smithy/protocol-http":"^5.1.0","@smithy/smithy-client":"^4.2.0","@smithy/types":"^4.2.0","@smithy/url-parser":"^4.0.2","@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.8","@smithy/util-defaults-mode-node":"^4.0.8","@smithy/util-endpoints":"^3.0.2","@smithy/util-middleware":"^4.0.2","@smithy/util-retry":"^4.0.2","@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 _k=O(y0(),1);BE();Rw();WE();hf();Sw();_$();LE();hh();var gk=O(y0(),1);J();_f();var SU=O(p1(),1),rU=O(I1(),1);M$();bh();var qk={["required"]:!1,type:"String"},kk={["required"]:!0,default:!1,type:"Boolean"},jk={["ref"]:"Endpoint"},mk={["fn"]:"booleanEquals",["argv"]:[{["ref"]:"UseFIPS"},!0]},dk={["fn"]:"booleanEquals",["argv"]:[{["ref"]:"UseDualStack"},!0]},yh={},yk={["fn"]:"getAttr",["argv"]:[{["ref"]:"PartitionResult"},"supportsFIPS"]},Ok={["fn"]:"booleanEquals",["argv"]:[!0,{["fn"]:"getAttr",["argv"]:[{["ref"]:"PartitionResult"},"supportsDualStack"]}]},lk=[mk],vk=[dk],bk=[{["ref"]:"Region"}],w50={version:"1.0",parameters:{Region:qk,UseDualStack:kk,UseFIPS:kk,Endpoint:qk},rules:[{conditions:[{["fn"]:"isSet",["argv"]:[jk]}],rules:[{conditions:lk,error:"Invalid Configuration: FIPS and custom endpoint are not supported",type:"error"},{conditions:vk,error:"Invalid Configuration: Dualstack and custom endpoint are not supported",type:"error"},{endpoint:{url:jk,properties:yh,headers:yh},type:"endpoint"}],type:"tree"},{conditions:[{["fn"]:"isSet",["argv"]:bk}],rules:[{conditions:[{["fn"]:"aws.partition",["argv"]:bk,assign:"PartitionResult"}],rules:[{conditions:[mk,dk],rules:[{conditions:[{["fn"]:"booleanEquals",["argv"]:[!0,yk]},Ok],rules:[{endpoint:{url:"https://route53domains-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:yh,headers:yh},type:"endpoint"}],type:"tree"},{error:"FIPS and DualStack are enabled, but this partition does not support one or both",type:"error"}],type:"tree"},{conditions:lk,rules:[{conditions:[{["fn"]:"booleanEquals",["argv"]:[yk,!0]}],rules:[{endpoint:{url:"https://route53domains-fips.{Region}.{PartitionResult#dnsSuffix}",properties:yh,headers:yh},type:"endpoint"}],type:"tree"},{error:"FIPS is enabled but this partition does not support FIPS",type:"error"}],type:"tree"},{conditions:vk,rules:[{conditions:[Ok],rules:[{endpoint:{url:"https://route53domains.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:yh,headers:yh},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:yh,headers:yh},type:"endpoint"}],type:"tree"}],type:"tree"},{error:"Invalid Configuration: Missing Region",type:"error"}]},ik=w50;var f50=new dw({size:50,params:["Endpoint","Region","UseDualStack","UseFIPS"]}),ck=(h,w={})=>{return f50.get(h,()=>iw(ik,{endpointParams:h,logger:w.logger}))};o1.aws=cw;var xk=(h)=>{return{apiVersion:"2014-05-15",base64Decoder:h?.base64Decoder??SU.fromBase64,base64Encoder:h?.base64Encoder??SU.toBase64,disableHostPrefix:h?.disableHostPrefix??!1,endpointProvider:h?.endpointProvider??ck,extensions:h?.extensions??[],httpAuthSchemeProvider:h?.httpAuthSchemeProvider??Pk,httpAuthSchemes:h?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:(w)=>w.getIdentityProvider("aws.auth#sigv4"),signer:new gk.AwsSdkSigV4Signer}],logger:h?.logger??new ih,serviceId:h?.serviceId??"Route 53 Domains",urlParser:h?.urlParser??j1,utf8Decoder:h?.utf8Decoder??rU.fromUtf8,utf8Encoder:h?.utf8Encoder??rU.toUtf8}};J();RE();J();var nk=(h)=>{Es(process.version);let w=qs(h),f=()=>w().then($s),s=xk(h);_k.emitWarningIfUnsupportedVersion(process.version);let $={profile:h?.profile};return{...s,...h,runtime:"node",defaultsMode:w,bodyLengthChecker:h?.bodyLengthChecker??Ds,credentialDefaultProvider:h?.credentialDefaultProvider??kE,defaultUserAgentProvider:h?.defaultUserAgentProvider??Hs({serviceId:s.serviceId,clientVersion:Dk.version}),maxAttempts:h?.maxAttempts??R0(of,h),region:h?.region??R0(Aw,{...mf,...$}),requestHandler:sh.create(h?.requestHandler??f),retryMode:h?.retryMode??R0({...tf,default:async()=>(await f()).retryMode||rw},h),sha256:h?.sha256??sf.bind(null,"sha256"),streamCollector:h?.streamCollector??Gs,useDualstackEndpoint:h?.useDualstackEndpoint??R0(vf,$),useFipsEndpoint:h?.useFipsEndpoint??R0(bf,$),userAgentAppId:h?.userAgentAppId??R0(Ns,$)}};XE();C1();J();var ek=(h)=>{let{httpAuthSchemes:w,httpAuthSchemeProvider:f,credentials:s}=h;return{setHttpAuthScheme($){let E=w.findIndex((T)=>T.schemeId===$.schemeId);if(E===-1)w.push($);else w.splice(E,1,$)},httpAuthSchemes(){return w},setHttpAuthSchemeProvider($){f=$},httpAuthSchemeProvider(){return f},setCredentials($){s=$},credentials(){return s}}},ak=(h)=>{return{httpAuthSchemes:h.httpAuthSchemes(),httpAuthSchemeProvider:h.httpAuthSchemeProvider(),credentials:h.credentials()}};var pk=(h,w)=>{let f=Object.assign(ks(h),Ts(h),Yf(h),ek(h));return w.forEach((s)=>s.configure(f)),Object.assign(h,js(f),Us(f),Sf(f),ak(f))};class fB extends uw{config;constructor(...[h]){let w=nk(h||{});super(w);this.initConfig=w;let f=Nk(w),s=Hf(f),$=uf(s),E=df($),T=rf(E),U=nf(T),F=Hk(U),C=pk(F,h?.extensions||[]);this.config=C,this.middlewareStack.use(Of(this.config)),this.middlewareStack.use(Cs(this.config)),this.middlewareStack.use(cf(this.config)),this.middlewareStack.use(Mf(this.config)),this.middlewareStack.use(Qf(this.config)),this.middlewareStack.use(Kf(this.config)),this.middlewareStack.use(G$.getHttpAuthSchemeEndpointRuleSetPlugin(this.config,{httpAuthSchemeParametersProvider:Vk,identityProviderConfigProvider:async(I)=>new G$.DefaultIdentityProviderConfig({"aws.auth#sigv4":I.credentials})})),this.middlewareStack.use(G$.getHttpSigningPlugin(this.config))}destroy(){super.destroy()}}J();D();k();J();J();J();class e1 extends fh{constructor(h){super(h);Object.setPrototypeOf(this,e1.prototype)}}class MU extends e1{name="DomainLimitExceeded";$fault="client";constructor(h){super({name:"DomainLimitExceeded",$fault:"client",...h});Object.setPrototypeOf(this,MU.prototype)}}class QU extends e1{name="InvalidInput";$fault="client";constructor(h){super({name:"InvalidInput",$fault:"client",...h});Object.setPrototypeOf(this,QU.prototype)}}class KU extends e1{name="OperationLimitExceeded";$fault="client";constructor(h){super({name:"OperationLimitExceeded",$fault:"client",...h});Object.setPrototypeOf(this,KU.prototype)}}class ZU extends e1{name="UnsupportedTLD";$fault="client";constructor(h){super({name:"UnsupportedTLD",$fault:"client",...h});Object.setPrototypeOf(this,ZU.prototype)}}class JU extends e1{name="DnssecLimitExceeded";$fault="client";constructor(h){super({name:"DnssecLimitExceeded",$fault:"client",...h});Object.setPrototypeOf(this,JU.prototype)}}class VU extends e1{name="DuplicateRequest";$fault="client";requestId;constructor(h){super({name:"DuplicateRequest",$fault:"client",...h});Object.setPrototypeOf(this,VU.prototype),this.requestId=h.requestId}}class PU extends e1{name="TLDRulesViolation";$fault="client";constructor(h){super({name:"TLDRulesViolation",$fault:"client",...h});Object.setPrototypeOf(this,PU.prototype)}}var ok=(h)=>({...h,...h.Password&&{Password:F0}}),uk=(h)=>({...h,...h.AuthCode&&{AuthCode:F0}});var tk=(h)=>({...h,...h.AdminContact&&{AdminContact:F0},...h.RegistrantContact&&{RegistrantContact:F0},...h.TechContact&&{TechContact:F0},...h.AbuseContactEmail&&{AbuseContactEmail:F0},...h.AbuseContactPhone&&{AbuseContactPhone:F0},...h.BillingContact&&{BillingContact:F0}}),hj=(h)=>({...h,...h.AdminContact&&{AdminContact:F0},...h.RegistrantContact&&{RegistrantContact:F0},...h.TechContact&&{TechContact:F0},...h.BillingContact&&{BillingContact:F0}}),wj=(h)=>({...h,...h.emailAddress&&{emailAddress:F0}}),fj=(h)=>({...h,...h.AuthCode&&{AuthCode:F0}}),sj=(h)=>({...h,...h.AuthCode&&{AuthCode:F0},...h.AdminContact&&{AdminContact:F0},...h.RegistrantContact&&{RegistrantContact:F0},...h.TechContact&&{TechContact:F0},...h.BillingContact&&{BillingContact:F0}}),$j=(h)=>({...h,...h.Password&&{Password:F0}}),Ej=(h)=>({...h,...h.AdminContact&&{AdminContact:F0},...h.RegistrantContact&&{RegistrantContact:F0},...h.TechContact&&{TechContact:F0},...h.BillingContact&&{BillingContact:F0}}),Tj=(h)=>({...h,...h.FIAuthKey&&{FIAuthKey:F0}});var f0=O(y0(),1);C1();J();var Uj=async(h,w)=>{let f=T0("AcceptDomainTransferFromAnotherAwsAccount"),s;return s=JSON.stringify(b(h)),E0(w,f,"/",void 0,s)},Fj=async(h,w)=>{let f=T0("AssociateDelegationSignerToDomain"),s;return s=JSON.stringify(b(h)),E0(w,f,"/",void 0,s)},Cj=async(h,w)=>{let f=T0("CancelDomainTransferToAnotherAwsAccount"),s;return s=JSON.stringify(b(h)),E0(w,f,"/",void 0,s)},Ij=async(h,w)=>{let f=T0("CheckDomainAvailability"),s;return s=JSON.stringify(b(h)),E0(w,f,"/",void 0,s)},Gj=async(h,w)=>{let f=T0("CheckDomainTransferability"),s;return s=JSON.stringify(b(h)),E0(w,f,"/",void 0,s)},Bj=async(h,w)=>{let f=T0("DeleteDomain"),s;return s=JSON.stringify(b(h)),E0(w,f,"/",void 0,s)},Wj=async(h,w)=>{let f=T0("DeleteTagsForDomain"),s;return s=JSON.stringify(b(h)),E0(w,f,"/",void 0,s)},Lj=async(h,w)=>{let f=T0("DisableDomainAutoRenew"),s;return s=JSON.stringify(b(h)),E0(w,f,"/",void 0,s)},zj=async(h,w)=>{let f=T0("DisableDomainTransferLock"),s;return s=JSON.stringify(b(h)),E0(w,f,"/",void 0,s)},Aj=async(h,w)=>{let f=T0("DisassociateDelegationSignerFromDomain"),s;return s=JSON.stringify(b(h)),E0(w,f,"/",void 0,s)},Rj=async(h,w)=>{let f=T0("EnableDomainAutoRenew"),s;return s=JSON.stringify(b(h)),E0(w,f,"/",void 0,s)},Xj=async(h,w)=>{let f=T0("EnableDomainTransferLock"),s;return s=JSON.stringify(b(h)),E0(w,f,"/",void 0,s)},Yj=async(h,w)=>{let f=T0("GetContactReachabilityStatus"),s;return s=JSON.stringify(b(h)),E0(w,f,"/",void 0,s)},Sj=async(h,w)=>{let f=T0("GetDomainDetail"),s;return s=JSON.stringify(b(h)),E0(w,f,"/",void 0,s)},rj=async(h,w)=>{let f=T0("GetDomainSuggestions"),s;return s=JSON.stringify(b(h)),E0(w,f,"/",void 0,s)},Mj=async(h,w)=>{let f=T0("GetOperationDetail"),s;return s=JSON.stringify(b(h)),E0(w,f,"/",void 0,s)},Qj=async(h,w)=>{let f=T0("ListDomains"),s;return s=JSON.stringify(b(h)),E0(w,f,"/",void 0,s)},Kj=async(h,w)=>{let f=T0("ListOperations"),s;return s=JSON.stringify(G50(h,w)),E0(w,f,"/",void 0,s)},Zj=async(h,w)=>{let f=T0("ListPrices"),s;return s=JSON.stringify(b(h)),E0(w,f,"/",void 0,s)},Jj=async(h,w)=>{let f=T0("ListTagsForDomain"),s;return s=JSON.stringify(b(h)),E0(w,f,"/",void 0,s)},Vj=async(h,w)=>{let f=T0("PushDomain"),s;return s=JSON.stringify(b(h)),E0(w,f,"/",void 0,s)},Pj=async(h,w)=>{let f=T0("RegisterDomain"),s;return s=JSON.stringify(b(h)),E0(w,f,"/",void 0,s)},Hj=async(h,w)=>{let f=T0("RejectDomainTransferFromAnotherAwsAccount"),s;return s=JSON.stringify(b(h)),E0(w,f,"/",void 0,s)},Nj=async(h,w)=>{let f=T0("RenewDomain"),s;return s=JSON.stringify(b(h)),E0(w,f,"/",void 0,s)},Dj=async(h,w)=>{let f=T0("ResendContactReachabilityEmail"),s;return s=JSON.stringify(b(h)),E0(w,f,"/",void 0,s)},qj=async(h,w)=>{let f=T0("ResendOperationAuthorization"),s;return s=JSON.stringify(b(h)),E0(w,f,"/",void 0,s)},kj=async(h,w)=>{let f=T0("RetrieveDomainAuthCode"),s;return s=JSON.stringify(b(h)),E0(w,f,"/",void 0,s)},jj=async(h,w)=>{let f=T0("TransferDomain"),s;return s=JSON.stringify(b(h)),E0(w,f,"/",void 0,s)},yj=async(h,w)=>{let f=T0("TransferDomainToAnotherAwsAccount"),s;return s=JSON.stringify(b(h)),E0(w,f,"/",void 0,s)},Oj=async(h,w)=>{let f=T0("UpdateDomainContact"),s;return s=JSON.stringify(B50(h,w)),E0(w,f,"/",void 0,s)},lj=async(h,w)=>{let f=T0("UpdateDomainContactPrivacy"),s;return s=JSON.stringify(b(h)),E0(w,f,"/",void 0,s)},vj=async(h,w)=>{let f=T0("UpdateDomainNameservers"),s;return s=JSON.stringify(b(h)),E0(w,f,"/",void 0,s)},bj=async(h,w)=>{let f=T0("UpdateTagsForDomain"),s;return s=JSON.stringify(b(h)),E0(w,f,"/",void 0,s)},mj=async(h,w)=>{let f=T0("ViewBilling"),s;return s=JSON.stringify(W50(h,w)),E0(w,f,"/",void 0,s)},dj=async(h,w)=>{if(h.statusCode>=300)return $0(h,w);let f=await f0.parseJsonBody(h.body,w),s={};return s=b(f),{$metadata:t(h),...s}},ij=async(h,w)=>{if(h.statusCode>=300)return $0(h,w);let f=await f0.parseJsonBody(h.body,w),s={};return s=b(f),{$metadata:t(h),...s}},cj=async(h,w)=>{if(h.statusCode>=300)return $0(h,w);let f=await f0.parseJsonBody(h.body,w),s={};return s=b(f),{$metadata:t(h),...s}},gj=async(h,w)=>{if(h.statusCode>=300)return $0(h,w);let f=await f0.parseJsonBody(h.body,w),s={};return s=b(f),{$metadata:t(h),...s}},xj=async(h,w)=>{if(h.statusCode>=300)return $0(h,w);let f=await f0.parseJsonBody(h.body,w),s={};return s=b(f),{$metadata:t(h),...s}},_j=async(h,w)=>{if(h.statusCode>=300)return $0(h,w);let f=await f0.parseJsonBody(h.body,w),s={};return s=b(f),{$metadata:t(h),...s}},nj=async(h,w)=>{if(h.statusCode>=300)return $0(h,w);let f=await f0.parseJsonBody(h.body,w),s={};return s=b(f),{$metadata:t(h),...s}},ej=async(h,w)=>{if(h.statusCode>=300)return $0(h,w);let f=await f0.parseJsonBody(h.body,w),s={};return s=b(f),{$metadata:t(h),...s}},aj=async(h,w)=>{if(h.statusCode>=300)return $0(h,w);let f=await f0.parseJsonBody(h.body,w),s={};return s=b(f),{$metadata:t(h),...s}},pj=async(h,w)=>{if(h.statusCode>=300)return $0(h,w);let f=await f0.parseJsonBody(h.body,w),s={};return s=b(f),{$metadata:t(h),...s}},oj=async(h,w)=>{if(h.statusCode>=300)return $0(h,w);let f=await f0.parseJsonBody(h.body,w),s={};return s=b(f),{$metadata:t(h),...s}},uj=async(h,w)=>{if(h.statusCode>=300)return $0(h,w);let f=await f0.parseJsonBody(h.body,w),s={};return s=b(f),{$metadata:t(h),...s}},tj=async(h,w)=>{if(h.statusCode>=300)return $0(h,w);let f=await f0.parseJsonBody(h.body,w),s={};return s=b(f),{$metadata:t(h),...s}},hy=async(h,w)=>{if(h.statusCode>=300)return $0(h,w);let f=await f0.parseJsonBody(h.body,w),s={};return s=S50(f,w),{$metadata:t(h),...s}},wy=async(h,w)=>{if(h.statusCode>=300)return $0(h,w);let f=await f0.parseJsonBody(h.body,w),s={};return s=b(f),{$metadata:t(h),...s}},fy=async(h,w)=>{if(h.statusCode>=300)return $0(h,w);let f=await f0.parseJsonBody(h.body,w),s={};return s=r50(f,w),{$metadata:t(h),...s}},sy=async(h,w)=>{if(h.statusCode>=300)return $0(h,w);let f=await f0.parseJsonBody(h.body,w),s={};return s=M50(f,w),{$metadata:t(h),...s}},$y=async(h,w)=>{if(h.statusCode>=300)return $0(h,w);let f=await f0.parseJsonBody(h.body,w),s={};return s=Q50(f,w),{$metadata:t(h),...s}},Ey=async(h,w)=>{if(h.statusCode>=300)return $0(h,w);let f=await f0.parseJsonBody(h.body,w),s={};return s=K50(f,w),{$metadata:t(h),...s}},Ty=async(h,w)=>{if(h.statusCode>=300)return $0(h,w);let f=await f0.parseJsonBody(h.body,w),s={};return s=b(f),{$metadata:t(h),...s}},Uy=async(h,w)=>{if(h.statusCode>=300)return $0(h,w);return await L1.collectBody(h.body,w),{$metadata:t(h)}},Fy=async(h,w)=>{if(h.statusCode>=300)return $0(h,w);let f=await f0.parseJsonBody(h.body,w),s={};return s=b(f),{$metadata:t(h),...s}},Cy=async(h,w)=>{if(h.statusCode>=300)return $0(h,w);let f=await f0.parseJsonBody(h.body,w),s={};return s=b(f),{$metadata:t(h),...s}},Iy=async(h,w)=>{if(h.statusCode>=300)return $0(h,w);let f=await f0.parseJsonBody(h.body,w),s={};return s=b(f),{$metadata:t(h),...s}},Gy=async(h,w)=>{if(h.statusCode>=300)return $0(h,w);let f=await f0.parseJsonBody(h.body,w),s={};return s=b(f),{$metadata:t(h),...s}},By=async(h,w)=>{if(h.statusCode>=300)return $0(h,w);return await L1.collectBody(h.body,w),{$metadata:t(h)}},Wy=async(h,w)=>{if(h.statusCode>=300)return $0(h,w);let f=await f0.parseJsonBody(h.body,w),s={};return s=b(f),{$metadata:t(h),...s}},Ly=async(h,w)=>{if(h.statusCode>=300)return $0(h,w);let f=await f0.parseJsonBody(h.body,w),s={};return s=b(f),{$metadata:t(h),...s}},zy=async(h,w)=>{if(h.statusCode>=300)return $0(h,w);let f=await f0.parseJsonBody(h.body,w),s={};return s=b(f),{$metadata:t(h),...s}},Ay=async(h,w)=>{if(h.statusCode>=300)return $0(h,w);let f=await f0.parseJsonBody(h.body,w),s={};return s=b(f),{$metadata:t(h),...s}},Ry=async(h,w)=>{if(h.statusCode>=300)return $0(h,w);let f=await f0.parseJsonBody(h.body,w),s={};return s=b(f),{$metadata:t(h),...s}},Xy=async(h,w)=>{if(h.statusCode>=300)return $0(h,w);let f=await f0.parseJsonBody(h.body,w),s={};return s=b(f),{$metadata:t(h),...s}},Yy=async(h,w)=>{if(h.statusCode>=300)return $0(h,w);let f=await f0.parseJsonBody(h.body,w),s={};return s=b(f),{$metadata:t(h),...s}},Sy=async(h,w)=>{if(h.statusCode>=300)return $0(h,w);let f=await f0.parseJsonBody(h.body,w),s={};return s=V50(f,w),{$metadata:t(h),...s}},$0=async(h,w)=>{let f={...h,body:await f0.parseJsonErrorBody(h.body,w)},s=f0.loadRestJsonErrorCode(h,f.body);switch(s){case"DomainLimitExceeded":case"com.amazonaws.route53domains#DomainLimitExceeded":throw await $50(f,w);case"InvalidInput":case"com.amazonaws.route53domains#InvalidInput":throw await T50(f,w);case"OperationLimitExceeded":case"com.amazonaws.route53domains#OperationLimitExceeded":throw await U50(f,w);case"UnsupportedTLD":case"com.amazonaws.route53domains#UnsupportedTLD":throw await C50(f,w);case"DnssecLimitExceeded":case"com.amazonaws.route53domains#DnssecLimitExceeded":throw await s50(f,w);case"DuplicateRequest":case"com.amazonaws.route53domains#DuplicateRequest":throw await E50(f,w);case"TLDRulesViolation":case"com.amazonaws.route53domains#TLDRulesViolation":throw await F50(f,w);default:let $=f.body;return P50({output:h,parsedBody:$,errorCode:s})}},s50=async(h,w)=>{let f=h.body,s=b(f),$=new JU({$metadata:t(h),...s});return v($,f)},$50=async(h,w)=>{let f=h.body,s=b(f),$=new MU({$metadata:t(h),...s});return v($,f)},E50=async(h,w)=>{let f=h.body,s=b(f),$=new VU({$metadata:t(h),...s});return v($,f)},T50=async(h,w)=>{let f=h.body,s=b(f),$=new QU({$metadata:t(h),...s});return v($,f)},U50=async(h,w)=>{let f=h.body,s=b(f),$=new KU({$metadata:t(h),...s});return v($,f)},F50=async(h,w)=>{let f=h.body,s=b(f),$=new PU({$metadata:t(h),...s});return v($,f)},C50=async(h,w)=>{let f=h.body,s=b(f),$=new ZU({$metadata:t(h),...s});return v($,f)},I50=(h,w)=>{return H0(h,{Currency:[],MaxPrice:$S})},G50=(h,w)=>{return H0(h,{Marker:[],MaxItems:[],SortBy:[],SortOrder:[],Status:b,SubmittedSince:(f)=>f.getTime()/1000,Type:b})},B50=(h,w)=>{return H0(h,{AdminContact:b,BillingContact:b,Consent:(f)=>I50(f,w),DomainName:[],RegistrantContact:b,TechContact:b})},W50=(h,w)=>{return H0(h,{End:(f)=>f.getTime()/1000,Marker:[],MaxItems:[],Start:(f)=>f.getTime()/1000})},L50=(h,w)=>{return H0(h,{BillDate:(f)=>y(rh(S1(f))),DomainName:W,InvoiceId:W,Operation:W,Price:l3})},z50=(h,w)=>{return(h||[]).filter((s)=>s!=null).map((s)=>{return L50(s,w)})},A50=(h,w)=>{return H0(h,{ChangeOwnershipPrice:(f)=>x4(f,w),Name:W,RegistrationPrice:(f)=>x4(f,w),RenewalPrice:(f)=>x4(f,w),RestorationPrice:(f)=>x4(f,w),TransferPrice:(f)=>x4(f,w)})},R50=(h,w)=>{return(h||[]).filter((s)=>s!=null).map((s)=>{return A50(s,w)})},X50=(h,w)=>{return H0(h,{AutoRenew:Qw,DomainName:W,Expiry:(f)=>y(rh(S1(f))),TransferLock:Qw})},Y50=(h,w)=>{return(h||[]).filter((s)=>s!=null).map((s)=>{return X50(s,w)})},S50=(h,w)=>{return H0(h,{AbuseContactEmail:W,AbuseContactPhone:W,AdminContact:b,AdminPrivacy:Qw,AutoRenew:Qw,BillingContact:b,BillingPrivacy:Qw,CreationDate:(f)=>y(rh(S1(f))),DnsSec:W,DnssecKeys:b,DomainName:W,ExpirationDate:(f)=>y(rh(S1(f))),Nameservers:b,RegistrantContact:b,RegistrantPrivacy:Qw,RegistrarName:W,RegistrarUrl:W,RegistryDomainId:W,Reseller:W,StatusList:b,TechContact:b,TechPrivacy:Qw,UpdatedDate:(f)=>y(rh(S1(f))),WhoIsServer:W})},r50=(h,w)=>{return H0(h,{DomainName:W,LastUpdatedDate:(f)=>y(rh(S1(f))),Message:W,OperationId:W,Status:W,StatusFlag:W,SubmittedDate:(f)=>y(rh(S1(f))),Type:W})},M50=(h,w)=>{return H0(h,{Domains:(f)=>Y50(f,w),NextPageMarker:W})},Q50=(h,w)=>{return H0(h,{NextPageMarker:W,Operations:(f)=>J50(f,w)})},K50=(h,w)=>{return H0(h,{NextPageMarker:W,Prices:(f)=>R50(f,w)})},Z50=(h,w)=>{return H0(h,{DomainName:W,LastUpdatedDate:(f)=>y(rh(S1(f))),Message:W,OperationId:W,Status:W,StatusFlag:W,SubmittedDate:(f)=>y(rh(S1(f))),Type:W})},J50=(h,w)=>{return(h||[]).filter((s)=>s!=null).map((s)=>{return Z50(s,w)})},x4=(h,w)=>{return H0(h,{Currency:W,Price:l3})},V50=(h,w)=>{return H0(h,{BillingRecords:(f)=>z50(f,w),NextPageMarker:W})},t=(h)=>({httpStatusCode:h.statusCode,requestId:h.headers["x-amzn-requestid"]??h.headers["x-amzn-request-id"]??h.headers["x-amz-request-id"],extendedRequestId:h.headers["x-amz-id-2"],cfId:h.headers["x-amz-cf-id"]});var P50=ss(e1),E0=async(h,w,f,s,$)=>{let{hostname:E,protocol:T="https",port:U,path:F}=await h.endpoint(),C={protocol:T,hostname:E,port:U,method:"POST",path:F.endsWith("/")?F.slice(0,-1)+f:F+f,headers:w};if(s!==void 0)C.hostname=s;if($!==void 0)C.body=$;return new _0(C)};function T0(h){return{"content-type":"application/x-amz-json-1.1","x-amz-target":`Route53Domains_v20140515.${h}`}}class sB extends A.classBuilder().ep(g).m(function(h,w,f,s){return[R(f,this.serialize,this.deserialize),X(f,h.getEndpointParameterInstructions())]}).s("Route53Domains_v20140515","AcceptDomainTransferFromAnotherAwsAccount",{}).n("Route53DomainsClient","AcceptDomainTransferFromAnotherAwsAccountCommand").f(ok,void 0).ser(Uj).de(dj).build(){}D();k();J();class $B extends A.classBuilder().ep(g).m(function(h,w,f,s){return[R(f,this.serialize,this.deserialize),X(f,h.getEndpointParameterInstructions())]}).s("Route53Domains_v20140515","AssociateDelegationSignerToDomain",{}).n("Route53DomainsClient","AssociateDelegationSignerToDomainCommand").f(void 0,void 0).ser(Fj).de(ij).build(){}D();k();J();class EB extends A.classBuilder().ep(g).m(function(h,w,f,s){return[R(f,this.serialize,this.deserialize),X(f,h.getEndpointParameterInstructions())]}).s("Route53Domains_v20140515","CancelDomainTransferToAnotherAwsAccount",{}).n("Route53DomainsClient","CancelDomainTransferToAnotherAwsAccountCommand").f(void 0,void 0).ser(Cj).de(cj).build(){}D();k();J();class TB extends A.classBuilder().ep(g).m(function(h,w,f,s){return[R(f,this.serialize,this.deserialize),X(f,h.getEndpointParameterInstructions())]}).s("Route53Domains_v20140515","CheckDomainAvailability",{}).n("Route53DomainsClient","CheckDomainAvailabilityCommand").f(void 0,void 0).ser(Ij).de(gj).build(){}D();k();J();class UB extends A.classBuilder().ep(g).m(function(h,w,f,s){return[R(f,this.serialize,this.deserialize),X(f,h.getEndpointParameterInstructions())]}).s("Route53Domains_v20140515","CheckDomainTransferability",{}).n("Route53DomainsClient","CheckDomainTransferabilityCommand").f(uk,void 0).ser(Gj).de(xj).build(){}D();k();J();class FB extends A.classBuilder().ep(g).m(function(h,w,f,s){return[R(f,this.serialize,this.deserialize),X(f,h.getEndpointParameterInstructions())]}).s("Route53Domains_v20140515","DeleteDomain",{}).n("Route53DomainsClient","DeleteDomainCommand").f(void 0,void 0).ser(Bj).de(_j).build(){}D();k();J();class CB extends A.classBuilder().ep(g).m(function(h,w,f,s){return[R(f,this.serialize,this.deserialize),X(f,h.getEndpointParameterInstructions())]}).s("Route53Domains_v20140515","DeleteTagsForDomain",{}).n("Route53DomainsClient","DeleteTagsForDomainCommand").f(void 0,void 0).ser(Wj).de(nj).build(){}D();k();J();class IB extends A.classBuilder().ep(g).m(function(h,w,f,s){return[R(f,this.serialize,this.deserialize),X(f,h.getEndpointParameterInstructions())]}).s("Route53Domains_v20140515","DisableDomainAutoRenew",{}).n("Route53DomainsClient","DisableDomainAutoRenewCommand").f(void 0,void 0).ser(Lj).de(ej).build(){}D();k();J();class GB extends A.classBuilder().ep(g).m(function(h,w,f,s){return[R(f,this.serialize,this.deserialize),X(f,h.getEndpointParameterInstructions())]}).s("Route53Domains_v20140515","DisableDomainTransferLock",{}).n("Route53DomainsClient","DisableDomainTransferLockCommand").f(void 0,void 0).ser(zj).de(aj).build(){}D();k();J();class BB extends A.classBuilder().ep(g).m(function(h,w,f,s){return[R(f,this.serialize,this.deserialize),X(f,h.getEndpointParameterInstructions())]}).s("Route53Domains_v20140515","DisassociateDelegationSignerFromDomain",{}).n("Route53DomainsClient","DisassociateDelegationSignerFromDomainCommand").f(void 0,void 0).ser(Aj).de(pj).build(){}D();k();J();class WB extends A.classBuilder().ep(g).m(function(h,w,f,s){return[R(f,this.serialize,this.deserialize),X(f,h.getEndpointParameterInstructions())]}).s("Route53Domains_v20140515","EnableDomainAutoRenew",{}).n("Route53DomainsClient","EnableDomainAutoRenewCommand").f(void 0,void 0).ser(Rj).de(oj).build(){}D();k();J();class LB extends A.classBuilder().ep(g).m(function(h,w,f,s){return[R(f,this.serialize,this.deserialize),X(f,h.getEndpointParameterInstructions())]}).s("Route53Domains_v20140515","EnableDomainTransferLock",{}).n("Route53DomainsClient","EnableDomainTransferLockCommand").f(void 0,void 0).ser(Xj).de(uj).build(){}D();k();J();class zB extends A.classBuilder().ep(g).m(function(h,w,f,s){return[R(f,this.serialize,this.deserialize),X(f,h.getEndpointParameterInstructions())]}).s("Route53Domains_v20140515","GetContactReachabilityStatus",{}).n("Route53DomainsClient","GetContactReachabilityStatusCommand").f(void 0,void 0).ser(Yj).de(tj).build(){}D();k();J();class AB extends A.classBuilder().ep(g).m(function(h,w,f,s){return[R(f,this.serialize,this.deserialize),X(f,h.getEndpointParameterInstructions())]}).s("Route53Domains_v20140515","GetDomainDetail",{}).n("Route53DomainsClient","GetDomainDetailCommand").f(void 0,tk).ser(Sj).de(hy).build(){}D();k();J();class RB extends A.classBuilder().ep(g).m(function(h,w,f,s){return[R(f,this.serialize,this.deserialize),X(f,h.getEndpointParameterInstructions())]}).s("Route53Domains_v20140515","GetDomainSuggestions",{}).n("Route53DomainsClient","GetDomainSuggestionsCommand").f(void 0,void 0).ser(rj).de(wy).build(){}D();k();J();class XB extends A.classBuilder().ep(g).m(function(h,w,f,s){return[R(f,this.serialize,this.deserialize),X(f,h.getEndpointParameterInstructions())]}).s("Route53Domains_v20140515","GetOperationDetail",{}).n("Route53DomainsClient","GetOperationDetailCommand").f(void 0,void 0).ser(Mj).de(fy).build(){}D();k();J();class YB extends A.classBuilder().ep(g).m(function(h,w,f,s){return[R(f,this.serialize,this.deserialize),X(f,h.getEndpointParameterInstructions())]}).s("Route53Domains_v20140515","ListDomains",{}).n("Route53DomainsClient","ListDomainsCommand").f(void 0,void 0).ser(Qj).de(sy).build(){}D();k();J();class SB extends A.classBuilder().ep(g).m(function(h,w,f,s){return[R(f,this.serialize,this.deserialize),X(f,h.getEndpointParameterInstructions())]}).s("Route53Domains_v20140515","ListOperations",{}).n("Route53DomainsClient","ListOperationsCommand").f(void 0,void 0).ser(Kj).de($y).build(){}D();k();J();class rB extends A.classBuilder().ep(g).m(function(h,w,f,s){return[R(f,this.serialize,this.deserialize),X(f,h.getEndpointParameterInstructions())]}).s("Route53Domains_v20140515","ListPrices",{}).n("Route53DomainsClient","ListPricesCommand").f(void 0,void 0).ser(Zj).de(Ey).build(){}D();k();J();class MB extends A.classBuilder().ep(g).m(function(h,w,f,s){return[R(f,this.serialize,this.deserialize),X(f,h.getEndpointParameterInstructions())]}).s("Route53Domains_v20140515","ListTagsForDomain",{}).n("Route53DomainsClient","ListTagsForDomainCommand").f(void 0,void 0).ser(Jj).de(Ty).build(){}D();k();J();class QB extends A.classBuilder().ep(g).m(function(h,w,f,s){return[R(f,this.serialize,this.deserialize),X(f,h.getEndpointParameterInstructions())]}).s("Route53Domains_v20140515","PushDomain",{}).n("Route53DomainsClient","PushDomainCommand").f(void 0,void 0).ser(Vj).de(Uy).build(){}D();k();J();class KB extends A.classBuilder().ep(g).m(function(h,w,f,s){return[R(f,this.serialize,this.deserialize),X(f,h.getEndpointParameterInstructions())]}).s("Route53Domains_v20140515","RegisterDomain",{}).n("Route53DomainsClient","RegisterDomainCommand").f(hj,void 0).ser(Pj).de(Fy).build(){}D();k();J();class ZB extends A.classBuilder().ep(g).m(function(h,w,f,s){return[R(f,this.serialize,this.deserialize),X(f,h.getEndpointParameterInstructions())]}).s("Route53Domains_v20140515","RejectDomainTransferFromAnotherAwsAccount",{}).n("Route53DomainsClient","RejectDomainTransferFromAnotherAwsAccountCommand").f(void 0,void 0).ser(Hj).de(Cy).build(){}D();k();J();class JB extends A.classBuilder().ep(g).m(function(h,w,f,s){return[R(f,this.serialize,this.deserialize),X(f,h.getEndpointParameterInstructions())]}).s("Route53Domains_v20140515","RenewDomain",{}).n("Route53DomainsClient","RenewDomainCommand").f(void 0,void 0).ser(Nj).de(Iy).build(){}D();k();J();class VB extends A.classBuilder().ep(g).m(function(h,w,f,s){return[R(f,this.serialize,this.deserialize),X(f,h.getEndpointParameterInstructions())]}).s("Route53Domains_v20140515","ResendContactReachabilityEmail",{}).n("Route53DomainsClient","ResendContactReachabilityEmailCommand").f(void 0,wj).ser(Dj).de(Gy).build(){}D();k();J();class PB extends A.classBuilder().ep(g).m(function(h,w,f,s){return[R(f,this.serialize,this.deserialize),X(f,h.getEndpointParameterInstructions())]}).s("Route53Domains_v20140515","ResendOperationAuthorization",{}).n("Route53DomainsClient","ResendOperationAuthorizationCommand").f(void 0,void 0).ser(qj).de(By).build(){}D();k();J();class HB extends A.classBuilder().ep(g).m(function(h,w,f,s){return[R(f,this.serialize,this.deserialize),X(f,h.getEndpointParameterInstructions())]}).s("Route53Domains_v20140515","RetrieveDomainAuthCode",{}).n("Route53DomainsClient","RetrieveDomainAuthCodeCommand").f(void 0,fj).ser(kj).de(Wy).build(){}D();k();J();class NB extends A.classBuilder().ep(g).m(function(h,w,f,s){return[R(f,this.serialize,this.deserialize),X(f,h.getEndpointParameterInstructions())]}).s("Route53Domains_v20140515","TransferDomain",{}).n("Route53DomainsClient","TransferDomainCommand").f(sj,void 0).ser(jj).de(Ly).build(){}D();k();J();class DB extends A.classBuilder().ep(g).m(function(h,w,f,s){return[R(f,this.serialize,this.deserialize),X(f,h.getEndpointParameterInstructions())]}).s("Route53Domains_v20140515","TransferDomainToAnotherAwsAccount",{}).n("Route53DomainsClient","TransferDomainToAnotherAwsAccountCommand").f(void 0,$j).ser(yj).de(zy).build(){}D();k();J();class qB extends A.classBuilder().ep(g).m(function(h,w,f,s){return[R(f,this.serialize,this.deserialize),X(f,h.getEndpointParameterInstructions())]}).s("Route53Domains_v20140515","UpdateDomainContact",{}).n("Route53DomainsClient","UpdateDomainContactCommand").f(Ej,void 0).ser(Oj).de(Ay).build(){}D();k();J();class kB extends A.classBuilder().ep(g).m(function(h,w,f,s){return[R(f,this.serialize,this.deserialize),X(f,h.getEndpointParameterInstructions())]}).s("Route53Domains_v20140515","UpdateDomainContactPrivacy",{}).n("Route53DomainsClient","UpdateDomainContactPrivacyCommand").f(void 0,void 0).ser(lj).de(Ry).build(){}D();k();J();class jB extends A.classBuilder().ep(g).m(function(h,w,f,s){return[R(f,this.serialize,this.deserialize),X(f,h.getEndpointParameterInstructions())]}).s("Route53Domains_v20140515","UpdateDomainNameservers",{}).n("Route53DomainsClient","UpdateDomainNameserversCommand").f(Tj,void 0).ser(vj).de(Xy).build(){}D();k();J();class yB extends A.classBuilder().ep(g).m(function(h,w,f,s){return[R(f,this.serialize,this.deserialize),X(f,h.getEndpointParameterInstructions())]}).s("Route53Domains_v20140515","UpdateTagsForDomain",{}).n("Route53DomainsClient","UpdateTagsForDomainCommand").f(void 0,void 0).ser(bj).de(Yy).build(){}D();k();J();class OB extends A.classBuilder().ep(g).m(function(h,w,f,s){return[R(f,this.serialize,this.deserialize),X(f,h.getEndpointParameterInstructions())]}).s("Route53Domains_v20140515","ViewBilling",{}).n("Route53DomainsClient","ViewBillingCommand").f(void 0,void 0).ser(mj).de(Sy).build(){}var H50={AcceptDomainTransferFromAnotherAwsAccountCommand:sB,AssociateDelegationSignerToDomainCommand:$B,CancelDomainTransferToAnotherAwsAccountCommand:EB,CheckDomainAvailabilityCommand:TB,CheckDomainTransferabilityCommand:UB,DeleteDomainCommand:FB,DeleteTagsForDomainCommand:CB,DisableDomainAutoRenewCommand:IB,DisableDomainTransferLockCommand:GB,DisassociateDelegationSignerFromDomainCommand:BB,EnableDomainAutoRenewCommand:WB,EnableDomainTransferLockCommand:LB,GetContactReachabilityStatusCommand:zB,GetDomainDetailCommand:AB,GetDomainSuggestionsCommand:RB,GetOperationDetailCommand:XB,ListDomainsCommand:YB,ListOperationsCommand:SB,ListPricesCommand:rB,ListTagsForDomainCommand:MB,PushDomainCommand:QB,RegisterDomainCommand:KB,RejectDomainTransferFromAnotherAwsAccountCommand:ZB,RenewDomainCommand:JB,ResendContactReachabilityEmailCommand:VB,ResendOperationAuthorizationCommand:PB,RetrieveDomainAuthCodeCommand:HB,TransferDomainCommand:NB,TransferDomainToAnotherAwsAccountCommand:DB,UpdateDomainContactCommand:qB,UpdateDomainContactPrivacyCommand:kB,UpdateDomainNameserversCommand:jB,UpdateTagsForDomainCommand:yB,ViewBillingCommand:OB};class _4 extends fB{}ws(H50,_4);import{runAction as N50}from"@stacksjs/actions";import{config as My}from"@stacksjs/config";import{Action as D50}from"@stacksjs/enums";import{err as $w,handleError as Oh,ok as B$}from"@stacksjs/error-handling";import{log as V1}from"@stacksjs/logging";import{path as q50}from"@stacksjs/path";import{fs as ry}from"@stacksjs/storage";async function Uy0(h){let w=new vw,f=await w.listHostedZonesByName({DNSName:h});if(!f||!f.HostedZones)return $w(Oh(`No hosted zones found for domain: ${h}`));let s=f.HostedZones.find((E)=>E.Name===`${h}.`);if(!s)return $w(Oh(`Hosted Zone not found for domain: ${h}`));let $=await w.listResourceRecordSets({HostedZoneId:s.Id});if(!$||!$.ResourceRecordSets)return $w(Oh(`No DNS records found for domain: ${h}`));for(let E of $.ResourceRecordSets)if(E.Type!=="NS"&&E.Type!=="SOA")await w.changeResourceRecordSets({HostedZoneId:s.Id,ChangeBatch:{Changes:[{Action:"DELETE",ResourceRecordSet:E}]}});return await w.deleteHostedZone({Id:s.Id}),V1.info(`Deleted Hosted Zone for domain: ${h}`),B$("success")}async function Fy0(h){let w=new vw,f=await w.listHostedZonesByName({DNSName:h});if(!f||!f.HostedZones)return $w(Oh(`No hosted zones found for domain: ${h}`));let s=f.HostedZones.find((E)=>E.Name===`${h}.`);if(!s)return $w(Oh(`Hosted Zone not found for domain: ${h}`));let $=await w.listResourceRecordSets({HostedZoneId:s.Id});if(!$||!$.ResourceRecordSets)return $w(Oh(`No DNS records found for domain: ${h}`));for(let E of $.ResourceRecordSets)if(E.Type!=="NS"&&E.Type!=="SOA")await w.changeResourceRecordSets({HostedZoneId:s.Id,ChangeBatch:{Changes:[{Action:"DELETE",ResourceRecordSet:E}]}});return V1.info(`Deleted DNS records for domain: ${h}`),B$("success")}async function Cy0(h){let w=new vw,s=(await w.listHostedZonesByName({DNSName:h})).HostedZones?.find((E)=>E.Name===`${h}.`);if(s)return B$(s);let $=await w.createHostedZone({Name:h,CallerReference:`${Date.now()}`});if(!$.HostedZone)return $w(Oh("Failed to create hosted zone"));return B$($)}function k50(h){try{let w=q50.projectConfigPath("dns.ts"),s=ry.readFileSync(w,"utf-8").replace(/nameservers: \[.*?\]/s,`nameservers: [${h.map(($)=>`'${$}'`).join(", ")}]`);ry.writeFileSync(w,s,"utf-8"),V1.info("Nameservers have been set.")}catch(w){console.error("Error updating nameservers:",w)}}async function Iy0(h){try{let w=new vw,{HostedZones:f}=await w.listHostedZonesByName({DNSName:h});if(!f)return $w(Oh(`No hosted zones found for domain ${h}`));let s=f[0];if(s&&s.Name===`${h}.`)return B$(s.Id);return B$(null)}catch(w){return $w(Oh(`Failed to find hosted zone for domain ${h}`,w))}}async function j50(h){if(V1.debug("Getting nameservers for domain:",h),!h)return[];try{return(await new _4().getDomainDetail({DomainName:h}))?.Nameservers?.map((s)=>s.Name)||[]}catch(w){Oh("Error getting domain detail",w)}}async function y50(h,w){if(!w)w=My.app.url;let f=await j50(w);if(f&&h&&JSON.stringify(f.sort())!==JSON.stringify(h.sort()))return V1.info("Updating your domain nameservers to match the ones in your hosted zone..."),V1.debug("Hosted zone nameservers:",h),V1.debug("Domain nameservers:",f),await new _4().updateDomainNameservers({DomainName:w,Nameservers:h.map(($)=>({Name:$}))}),k50(h),V1.info("Nameservers updated."),!0;V1.success("Your nameservers are up to date.")}async function Gy0(h){if(V1.debug("Checking if domain has been added to cloud..."),!h)h=My.app.url;V1.debug("domainName:",h);let w=new vw,f=await w.listHostedZonesByName({DNSName:h});if(V1.debug("Existing hosted zones:",f),!f||!f.HostedZones)return!1;let s=f.HostedZones.find(($)=>$.Name===`${h}.`);if(s){V1.debug("Hosted zone found:",s);let E=(await w.getHostedZone({Id:s.Id})).DelegationSet?.NameServers||[];return await y50(E,h),!0}return!1}async function By0(h){return await N50(D50.DomainsAdd,h)}import{Buffer as Py}from"node:buffer";import{Buffer as cB}from"node:buffer";import _50 from"node:dgram";import n50 from"node:https";import e50 from"node:net";import a50 from"node:tls";import{URL as Ky}from"node:url";import{promises as p50}from"node:fs";import{platform as o50}from"node:os";var O50=Object.create,{getPrototypeOf:l50,defineProperty:Qy,getOwnPropertyNames:v50}=Object,b50=Object.prototype.hasOwnProperty,m50=(h,w,f)=>{f=h!=null?O50(l50(h)):{};let s=w||!h||!h.__esModule?Qy(f,"default",{value:h,enumerable:!0}):f;for(let $ of v50(h))if(!b50.call(s,$))Qy(s,$,{get:()=>h[$],enumerable:!0});return s},d50=(h,w)=>()=>(w||h((w={exports:{}}).exports,w),w.exports),i50=d50((h,w)=>{var f=process||{},s=f.argv||[],$=f.env||{},E=!(!!$.NO_COLOR||s.includes("--no-color"))&&(!!$.FORCE_COLOR||s.includes("--color")||f.platform==="win32"||(f.stdout||{}).isTTY&&$.TERM!=="dumb"||!!$.CI),T=(C,I,G=C)=>(B)=>{let z=""+B,Y=z.indexOf(I,C.length);return~Y?C+U(z,I,G,Y)+I:C+z+I},U=(C,I,G,B)=>{let z="",Y=0;do z+=C.substring(Y,B)+G,Y=B+I.length,B=C.indexOf(I,Y);while(~B);return z+C.substring(Y)},F=(C=E)=>{let I=C?T:()=>String;return{isColorSupported:C,reset:I("\x1B[0m","\x1B[0m"),bold:I("\x1B[1m","\x1B[22m","\x1B[22m\x1B[1m"),dim:I("\x1B[2m","\x1B[22m","\x1B[22m\x1B[2m"),italic:I("\x1B[3m","\x1B[23m"),underline:I("\x1B[4m","\x1B[24m"),inverse:I("\x1B[7m","\x1B[27m"),hidden:I("\x1B[8m","\x1B[28m"),strikethrough:I("\x1B[9m","\x1B[29m"),black:I("\x1B[30m","\x1B[39m"),red:I("\x1B[31m","\x1B[39m"),green:I("\x1B[32m","\x1B[39m"),yellow:I("\x1B[33m","\x1B[39m"),blue:I("\x1B[34m","\x1B[39m"),magenta:I("\x1B[35m","\x1B[39m"),cyan:I("\x1B[36m","\x1B[39m"),white:I("\x1B[37m","\x1B[39m"),gray:I("\x1B[90m","\x1B[39m"),bgBlack:I("\x1B[40m","\x1B[49m"),bgRed:I("\x1B[41m","\x1B[49m"),bgGreen:I("\x1B[42m","\x1B[49m"),bgYellow:I("\x1B[43m","\x1B[49m"),bgBlue:I("\x1B[44m","\x1B[49m"),bgMagenta:I("\x1B[45m","\x1B[49m"),bgCyan:I("\x1B[46m","\x1B[49m"),bgWhite:I("\x1B[47m","\x1B[49m"),blackBright:I("\x1B[90m","\x1B[39m"),redBright:I("\x1B[91m","\x1B[39m"),greenBright:I("\x1B[92m","\x1B[39m"),yellowBright:I("\x1B[93m","\x1B[39m"),blueBright:I("\x1B[94m","\x1B[39m"),magentaBright:I("\x1B[95m","\x1B[39m"),cyanBright:I("\x1B[96m","\x1B[39m"),whiteBright:I("\x1B[97m","\x1B[39m"),bgBlackBright:I("\x1B[100m","\x1B[49m"),bgRedBright:I("\x1B[101m","\x1B[49m"),bgGreenBright:I("\x1B[102m","\x1B[49m"),bgYellowBright:I("\x1B[103m","\x1B[49m"),bgBlueBright:I("\x1B[104m","\x1B[49m"),bgMagentaBright:I("\x1B[105m","\x1B[49m"),bgCyanBright:I("\x1B[106m","\x1B[49m"),bgWhiteBright:I("\x1B[107m","\x1B[49m")}};w.exports=F(),w.exports.createColors=F}),bw;((h)=>{h[h.A=1]="A",h[h.NS=2]="NS",h[h.CNAME=5]="CNAME",h[h.SOA=6]="SOA",h[h.PTR=12]="PTR",h[h.MX=15]="MX",h[h.TXT=16]="TXT",h[h.AAAA=28]="AAAA",h[h.SRV=33]="SRV",h[h.NAPTR=35]="NAPTR",h[h.OPT=41]="OPT",h[h.SSHFP=44]="SSHFP",h[h.TLSA=52]="TLSA",h[h.DNSKEY=48]="DNSKEY",h[h.CAA=257]="CAA"})(bw||={});var mB;((h)=>{h[h.IN=1]="IN",h[h.CH=3]="CH",h[h.HS=4]="HS"})(mB||={});var Zy;((h)=>{h.Disable="disable",h.Hide="hide",h.Show="show"})(Zy||={});var Jy;((h)=>{h[h.NoError=0]="NoError",h[h.FormErr=1]="FormErr",h[h.ServFail=2]="ServFail",h[h.NXDomain=3]="NXDomain",h[h.NotImp=4]="NotImp",h[h.Refused=5]="Refused",h[h.YXDomain=6]="YXDomain",h[h.YXRRSet=7]="YXRRSet",h[h.NXRRSet=8]="NXRRSet",h[h.NotAuth=9]="NotAuth",h[h.NotZone=10]="NotZone"})(Jy||={});var Vy;((h)=>{h.TruncatedPacket="TRUNCATED_PACKET",h.InvalidLength="INVALID_LENGTH",h.InvalidFormat="INVALID_FORMAT",h.InvalidName="INVALID_NAME",h.InvalidLabel="INVALID_LABEL",h.InvalidPointer="INVALID_POINTER",h.InvalidType="INVALID_TYPE",h.InvalidClass="INVALID_CLASS",h.NetworkError="NETWORK_ERROR"})(Vy||={});function c50(h){if(!h)return;let w=Array.isArray(h)?h:[h],f={};for(let s of w)if(s==="aa"||s==="authoritative")f.authoritative=!0;else if(s==="ad"||s==="authentic")f.authenticData=!0;else if(s==="cd"||s==="checking-disabled")f.checkingDisabled=!0;else if(s.startsWith("bufsize="))f.udpPayloadSize=Number.parseInt(s.split("=")[1]);return f}function S0(h,w,f){if(f)console.debug(`[dnsx:${h}] ${w}`)}var g50=12,x50=63;class n4{response=!1;opcode=0;authoritative=!1;truncated=!1;recursionDesired=!1;recursionAvailable=!1;authenticData=!1;checkingDisabled=!1;responseCode=0;static fromBuffer(h){let w=new n4,f=h.readUInt16BE(0);return w.response=(f&32768)!==0,w.opcode=(f&30720)>>>11,w.authoritative=(f&1024)!==0,w.truncated=(f&512)!==0,w.recursionDesired=(f&256)!==0,w.recursionAvailable=(f&128)!==0,w.authenticData=(f&32)!==0,w.checkingDisabled=(f&16)!==0,w.responseCode=f&15,w}toBuffer(){let h=Py.alloc(2),w=0;if(this.response)w|=32768;if(w|=(this.opcode&15)<<11,this.authoritative)w|=1024;if(this.truncated)w|=512;if(this.recursionDesired)w|=256;if(this.recursionAvailable)w|=128;if(this.authenticData)w|=32;if(this.checkingDisabled)w|=16;return w|=this.responseCode&15,h.writeUInt16BE(w,0),h}}class dB{buffer;offset;nameOffsets;verbose;constructor(h=512,w){this.buffer=Py.alloc(h),this.offset=0,this.nameOffsets=new Map,this.verbose=w}writeHeader(h,w,f){S0("encoder",`Writing DNS header: ${JSON.stringify({id:h,flags:{response:w.response,opcode:w.opcode,recursionDesired:w.recursionDesired},counts:f})}`,this.verbose),this.writeUint16(h);let s=w.toBuffer();this.buffer.set(s,this.offset),this.offset+=2,this.writeUint16(f.qdcount),this.writeUint16(f.ancount),this.writeUint16(f.nscount),this.writeUint16(f.arcount)}writeName(h){S0("encoder",`Writing DNS name: ${h}`,this.verbose);let w=h.split(".");for(let f of w){if(f.length>x50)throw new Error(`Label too long: ${f}`);this.buffer[this.offset++]=f.length,this.buffer.write(f,this.offset),this.offset+=f.length}this.buffer[this.offset++]=0}writeQuestion(h){this.writeName(h.name),this.writeUint16(h.type),this.writeUint16(h.class)}writeUint16(h){this.buffer.writeUInt16BE(h,this.offset),this.offset+=2}writeUint32(h){this.buffer.writeUInt32BE(h,this.offset),this.offset+=4}getBuffer(){return this.buffer.slice(0,this.offset)}}class iB{buffer;offset;constructor(h){this.buffer=h,this.offset=0}canRead(h){return this.offset+h<=this.buffer.length}readName(){let h=[],w=!1,f=this.offset;for(let s=0;s<5;s++){if(f>=this.buffer.length)throw new Error("Out of bounds access");let $=this.buffer[f];if($===0){if(!w)this.offset=f+1;break}if(($&192)===192){if(!this.canRead(2))throw new Error("Out of bounds access");if(!w)this.offset=f+2,w=!0;f=($&63)<<8|this.buffer[f+1];continue}if(f++,f+$>this.buffer.length)throw new Error("Out of bounds access");let E=this.buffer.slice(f,f+$).toString("ascii");h.push(E),f+=$}return h.join(".")}readHeader(){if(!this.canRead(g50))throw new Error(`Invalid DNS header size: ${this.buffer.length} bytes`);let h=this.readUint16(),w=n4.fromBuffer(this.buffer.slice(this.offset,this.offset+2));this.offset+=2;let f={qdcount:this.readUint16(),ancount:this.readUint16(),nscount:this.readUint16(),arcount:this.readUint16()};return{id:h,flags:w,counts:f}}readQuestion(){let h=this.readName();if(!this.canRead(4))throw new Error("Out of bounds access");let w=this.readUint16(),f=this.readUint16();return{name:h,type:w,class:f}}readAnswer(){let h=this.readName();if(!this.canRead(10))throw new Error("Out of bounds access");let w=this.readUint16(),f=this.readUint16(),s=this.readUint32(),$=this.readUint16();if(!this.canRead($))throw new Error("Out of bounds access");let E=this.readRData(w,$);return{name:h,type:w,class:f,ttl:s,data:E}}readRData(h,w){let f=this.offset,s;switch(h){case 1:if(w!==4)throw new Error("Invalid IPv4 length");s=this.readIPv4();break;case 28:if(w!==16)throw new Error("Invalid IPv6 length");s=this.readIPv6();break;case 15:if(w<3)throw new Error("Invalid MX record length");s={preference:this.readUint16(),exchange:this.readName()};break;case 16:s=this.readString(w);break;case 5:case 2:case 12:s=this.readName();break;default:s=this.buffer.slice(this.offset,this.offset+w).toString("hex"),this.offset+=w}if(this.offset-f!==w)this.offset=f+w;return s}readUint16(){if(!this.canRead(2))throw new Error("Out of bounds access");let h=this.buffer.readUInt16BE(this.offset);return this.offset+=2,h}readUint32(){if(!this.canRead(4))throw new Error("Out of bounds access");let h=this.buffer.readUInt32BE(this.offset);return this.offset+=4,h}readIPv4(){if(!this.canRead(4))throw new Error("Out of bounds access");let h=[];for(let w=0;w<4;w++)h.push(this.buffer[this.offset++]);return h.join(".")}readIPv6(){if(!this.canRead(16))throw new Error("Out of bounds access");let h=[];for(let w=0;w<8;w++)h.push(this.buffer.readUInt16BE(this.offset).toString(16)),this.offset+=2;return h.join(":")}readString(h){if(!this.canRead(h))throw new Error("Out of bounds access");let w=this.buffer.slice(this.offset,this.offset+h).toString();return this.offset+=h,w}}function Hy(h,w={}){let f=new dB(512,w.verbose),s=new n4;s.recursionDesired=!0,s.response=!1;let $=w.txid??w.id??Math.floor(Math.random()*65536);return f.writeHeader($,s,{qdcount:1,ancount:0,nscount:0,arcount:0}),f.writeQuestion({name:h.name,type:typeof h.type==="string"?bw[h.type]:h.type,class:h.class}),f.getBuffer()}function vB(h){let w=new iB(h);if((h.readUInt16BE(2)&32768)===0)throw new Error("Not a DNS response");let{id:f,flags:s,counts:$}=w.readHeader();for(let F=0;F<$.qdcount;F++)w.readQuestion();let E=[];for(let F=0;F<$.ancount;F++)E.push(w.readAnswer());let T=[];for(let F=0;F<$.nscount;F++)T.push(w.readAnswer());let U=[];for(let F=0;F<$.arcount;F++)U.push(w.readAnswer());return{id:f,flags:s,answers:E,authorities:T,additionals:U}}var Ny;((h)=>{h.UDP="udp",h.TCP="tcp",h.TLS="tls",h.HTTPS="https"})(Ny||={});class NU{static DEFAULT_PORT=53;static TIMEOUT=5000;async query(h,w){return new Promise((f,s)=>{let $=_50.createSocket("udp4"),E,T,U=NU.DEFAULT_PORT;if(h.includes(":")){let[C,I]=h.split(":");T=C;let G=Number.parseInt(I,10);if(G>0&&G<65536)U=G}else T=h;$.on("error",(C)=>{clearTimeout(E),$.close(),s(C)}),$.on("message",(C)=>{clearTimeout(E),$.close(),f(C)}),E=setTimeout(()=>{$.close(),s(new Error("UDP query timed out"))},NU.TIMEOUT);let F=new Uint8Array(w.buffer,w.byteOffset,w.length);$.send(F,U,T,(C)=>{if(C)clearTimeout(E),$.close(),s(C)})})}}class DU{static DEFAULT_PORT=53;static TIMEOUT=5000;async query(h,w){return new Promise((f,s)=>{let $=new e50.Socket,E,T=new Uint8Array(0),U=-1;$.on("error",(I)=>{clearTimeout(E),$.destroy(),s(I)}),$.on("data",(I)=>{let G=new Uint8Array(T.length+I.length);if(G.set(T),G.set(new Uint8Array(I.buffer,I.byteOffset,I.length),T.length),T=G,U===-1&&T.length>=2)U=new DataView(T.buffer,T.byteOffset).getUint16(0)+2;if(U!==-1&&T.length>=U)clearTimeout(E),$.destroy(),f(cB.from(T.slice(2,U)))}),E=setTimeout(()=>{$.destroy(),s(new Error("TCP query timed out"))},DU.TIMEOUT);let[F,C=DU.DEFAULT_PORT]=h.split(":");$.connect(Number(C),F,()=>{let I=new Uint8Array(2);new DataView(I.buffer).setUint16(0,w.length);let G=new Uint8Array(w.buffer,w.byteOffset,w.length),B=new Uint8Array(I.length+G.length);B.set(I),B.set(G,I.length),$.write(B,(z)=>{if(z)clearTimeout(E),$.destroy(),s(z)})})})}}class qU{static DEFAULT_PORT=853;static TIMEOUT=5000;async query(h,w){return new Promise((f,s)=>{let $={host:h.split(":")[0],port:Number(h.split(":")[1])||qU.DEFAULT_PORT,servername:h.split(":")[0]},E,T=a50.connect($,()=>{if(!T.authorized){T.destroy(),s(new Error("TLS authorization failed"));return}let C=new Uint8Array(2);new DataView(C.buffer).setUint16(0,w.length);let I=new Uint8Array(w.buffer,w.byteOffset,w.length),G=new Uint8Array(C.length+I.length);G.set(C),G.set(I,C.length),T.write(G,(B)=>{if(B)clearTimeout(E),T.destroy(),s(B)})}),U=new Uint8Array(0),F=-1;T.on("error",(C)=>{clearTimeout(E),T.destroy(),s(C)}),T.on("data",(C)=>{let I=new Uint8Array(U.length+C.length);if(I.set(U),I.set(new Uint8Array(C.buffer,C.byteOffset,C.length),U.length),U=I,F===-1&&U.length>=2)F=new DataView(U.buffer,U.byteOffset).getUint16(0)+2;if(F!==-1&&U.length>=F)clearTimeout(E),T.destroy(),f(cB.from(U.slice(2,F)))}),E=setTimeout(()=>{T.destroy(),s(new Error("TLS query timed out"))},qU.TIMEOUT)})}}class W${static TIMEOUT=5000;static CONTENT_TYPE="application/dns-message";async query(h,w){return new Promise((f,s)=>{let $;try{$=new Ky(h)}catch{$=new Ky(`https://${h}/dns-query`)}let E={method:"POST",headers:{"Content-Type":W$.CONTENT_TYPE,"Content-Length":w.length.toString(),Accept:W$.CONTENT_TYPE},timeout:W$.TIMEOUT},T=n50.request($,E,(U)=>{let F=[];U.on("data",(C)=>{F.push(new Uint8Array(C.buffer,C.byteOffset,C.length))}),U.on("end",()=>{if(U.statusCode!==200){s(new Error(`HTTPS query failed with status ${U.statusCode}`));return}let C=U.headers["content-type"];if(C!==W$.CONTENT_TYPE){s(new Error(`Invalid content type: ${C}`));return}let I=F.reduce((z,Y)=>z+Y.length,0),G=new Uint8Array(I),B=0;for(let z of F)G.set(z,B),B+=z.length;f(cB.from(G))})});T.on("error",s),T.on("timeout",()=>{T.destroy(),s(new Error("HTTPS query timed out"))}),T.write(new Uint8Array(w.buffer,w.byteOffset,w.length)),T.end()})}}function bB(h){switch(h){case"udp":return new NU;case"tcp":return new DU;case"tls":return new qU;case"https":return new W$}}class P1{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(h){if(h.includes(".."))throw new Error(`Invalid domain name: ${h} (consecutive dots)`);if(h.startsWith(".")||h.endsWith("."))throw new Error(`Invalid domain name: ${h} (starts or ends with dot)`);if(h.length>253)throw new Error(`Domain name too long: ${h}`);let w=h.split(".");for(let f of w){if(f.length>63)throw new Error(`Label too long in domain: ${h}`);if(!/^[a-z0-9-]+$/i.test(f))throw new Error(`Invalid characters in domain label: ${f}`)}}validateRecordType(h){if(typeof h==="string"){if(!(h.toUpperCase()in bw))throw new Error(`Invalid record type: ${h}`)}else if(typeof h==="number"){if(!Object.values(bw).filter((w)=>typeof w==="number").includes(h))throw new Error(`Invalid record type number: ${h}`)}else throw new TypeError("Record type must be string or number")}constructor(h){this.options={transport:{type:"udp"},verbose:!1,...h},this.validateOptions()}async query(){try{let h=this.determineTransportType();S0("client",`Selected transport type: ${h}`,this.options.verbose);let w=bB(h);if(!w)throw new Error(`Failed to create transport for type: ${h}`);let f=[],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 E of $){S0("client",`Processing query: ${JSON.stringify({query:E,nameserver:s,transportType:h})}`,this.options.verbose);let T=Hy(E,{txid:this.options.txid,edns:this.options.edns,tweaks:this.options.tweaks,verbose:this.options.verbose});S0("client",`Built DNS request: ${JSON.stringify({hexData:T.toString("hex"),length:T.length,txid:T.readUInt16BE(0),flags:T.readUInt16BE(2).toString(16)})}`,this.options.verbose);let U=this.options.retries||3;for(let F=0;F<U;F++)try{S0("client",`Attempt ${F+1}/${U}`,this.options.verbose);let C=await w.query(s,T);if(S0("client",`Received DNS response: ${JSON.stringify({hexData:C.toString("hex"),length:C.length,txid:C.readUInt16BE(0),flags:C.readUInt16BE(2).toString(16)})}`,this.options.verbose),C.length<12)throw new Error(`Response too short: ${C.length} bytes`);if(!(C.readUInt16BE(2)&32768))throw new Error("Response flag not set in DNS message");let I=vB(C);if(S0("client",`Parsed DNS response: ${JSON.stringify({id:I.id,answerCount:I.answers.length,authorityCount:I.authorities.length,additionalCount:I.additionals.length})}`,this.options.verbose),h==="udp"&&I.flags.truncated){S0("client","Response truncated, retrying with TCP",this.options.verbose);let G=await bB("tcp").query(s,T);f.push(vB(G))}else f.push(I);break}catch(C){if(S0("client",`Attempt ${F+1} failed: ${C.message}`,this.options.verbose),F===U-1)throw S0("client","All retry attempts failed",this.options.verbose),C;let I=2**F*1000;S0("client",`Waiting ${I}ms before retry`,this.options.verbose),await new Promise((G)=>setTimeout(G,I))}}if(f.length===0)throw new Error("No responses received");return f}catch(h){let w=h instanceof Error?h.message:"Unknown error occurred";throw S0("client",`Query failed with error: ${w}`,this.options.verbose),S0("client",`Full error: ${JSON.stringify(h)}`,this.options.verbose),new Error(`DNS query failed: ${w}`)}}buildQueries(){let h=[];if(!this.options.domains?.length)throw new Error("No domains specified");let w=Array.isArray(this.options.domains)?this.options.domains:[this.options.domains],f=this.resolveTypes(),s=this.resolveClasses();for(let $ of w)for(let E of f)for(let T of s)h.push({name:$,type:E,class:T});return S0("client",`Built queries: ${JSON.stringify(h)}`,this.options.verbose),h}resolveTypes(){if(!this.options.type)return[1];return(Array.isArray(this.options.type)?this.options.type:[this.options.type]).map((h)=>{if(this.validateRecordType(h),typeof h==="number")return h;let w=h.toUpperCase();return bw[w]})}resolveClasses(){if(!this.options.class)return[1];return(Array.isArray(this.options.class)?this.options.class:[this.options.class]).map((h)=>{if(typeof h==="number")return h;let w=h.toUpperCase(),f=mB[w];if(f===void 0)throw new Error(`Invalid query class: ${h}`);return f})}validateNameserver(h){if(h.startsWith("https://"))return!0;if(h.includes("%"))return!1;if(/^(?:\d{1,3}\.){3}\d{1,3}$/.test(h))return h.split(".").every((w)=>{let f=Number.parseInt(w,10);return f>=0&&f<=255});if(h.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 h=o50();S0("client",`Resolving nameserver for platform: ${h}`,this.options.verbose);let w;if(h==="win32")w=await this.resolveWindowsNameserver();else w=await this.resolveUnixNameserver();if(this.validateNameserver(w))return w;return S0("client",`Using default nameserver: ${P1.DEFAULT_NAMESERVER}`,this.options.verbose),P1.DEFAULT_NAMESERVER}catch(h){return S0("client",`Failed to resolve nameserver: ${h.message}`,this.options.verbose),S0("client",`Using default nameserver: ${P1.DEFAULT_NAMESERVER}`,this.options.verbose),P1.DEFAULT_NAMESERVER}}async resolveUnixNameserver(){try{let h=(await p50.readFile(P1.RESOLV_CONF_PATH,"utf-8")).split(`
|
|
60
|
-
`),w=[];for(let s of h){let $=s.trim();if($.startsWith("nameserver")){let[,E]=$.split(/\s+/);if(E&&!E.includes("%"))w.push(E)}}let f=w.find((s)=>!s.includes(":"));if(f)return S0("client",`Using IPv4 nameserver from resolv.conf: ${f}`,this.options.verbose),f;return S0("client",`No valid nameserver found in resolv.conf, using fallback: ${P1.DEFAULT_NAMESERVER}`,this.options.verbose),P1.DEFAULT_NAMESERVER}catch(h){return S0("client",`Failed to read resolv.conf: ${h.message}`,this.options.verbose),S0("client",`Using fallback nameserver: ${P1.DEFAULT_NAMESERVER}`,this.options.verbose),P1.DEFAULT_NAMESERVER}}async resolveWindowsNameserver(){try{return S0("client",`Using default nameserver for Windows: ${P1.DEFAULT_NAMESERVER}`,this.options.verbose),P1.DEFAULT_NAMESERVER}catch(h){throw S0("client",`Failed to get Windows nameserver: ${h.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 h of Array.isArray(this.options.domains)?this.options.domains:[this.options.domains])this.validateDomainName(h);if(this.options.type){let h=Array.isArray(this.options.type)?this.options.type:[this.options.type];for(let w of h)this.validateRecordType(w)}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 u50=m50(i50(),1),t50={A:"green",AAAA:"green",CNAME:"yellow",MX:"cyan",NS:"red",PTR:"red",SOA:"magenta",SRV:"cyan",TXT:"yellow",CAA:"red",TLSA:"yellow"};function h20(h,w){if(w.json)return w20(h,w.showDuration);return f20(h,w)}function w20(h,w){let f={responses:h.map((s)=>({id:s.id,answers:s.answers.map(lB),authorities:s.authorities.map(lB),additionals:s.additionals.map(lB)}))};if(w!==void 0)f.duration={ms:w};return JSON.stringify(f,null,2)}function lB(h){let w={name:h.name,type:bw[h.type]||h.type,ttl:h.ttl};switch(h.type){case 1:case 28:return{...w,address:h.data};case 5:case 12:case 2:return{...w,target:h.data};case 15:return{...w,preference:h.data.preference,exchange:h.data.exchange};case 16:return{...w,text:h.data};case 33:return{...w,priority:h.data.priority,weight:h.data.weight,port:h.data.port,target:h.data.target};case 257:return{...w,flags:h.data.flags,tag:h.data.tag,value:h.data.value};default:return{...w,data:h.data}}}function f20(h,w){let f=[];for(let s of h){if(w.short){if(s.answers.length>0)f.push(HU(s.answers[0],w));continue}if(s.answers.length>0)for(let $ of s.answers)f.push(HU($,w));if(s.authorities.length>0){f.push(`
|
|
61
|
-
Authority Records:`);for(let $ of s.authorities)f.push(HU($,w))}if(s.additionals.length>0){f.push(`
|
|
62
|
-
Additional Records:`);for(let $ of s.additionals)f.push(HU($,w))}}if(w.showDuration!==void 0)f.push(`
|
|
63
|
-
Query time: ${$20(w.showDuration,w.rawSeconds)}`);return f.join(`
|
|
64
|
-
`)}function HU(h,w){let f=bw[h.type]||h.type.toString(),s=t50[f]||"white",$=w.colors.enabled?u50.default[s](f.padEnd(6)):f.padEnd(6),E=s20(h.ttl,w.rawSeconds).padStart(8),T;switch(h.type){case 1:case 28:T=h.data;break;case 5:case 12:case 2:T=h.data;break;case 15:T=`${h.data.preference} ${h.data.exchange}`;break;case 16:T=`"${h.data}"`;break;case 33:T=`${h.data.priority} ${h.data.weight} ${h.data.port} ${h.data.target}`;break;case 257:T=`${h.data.flags} ${h.data.tag} "${h.data.value}"`;break;default:T=JSON.stringify(h.data)}return`${$} ${E} ${h.name.padEnd(30)} ${T}`}function s20(h,w){if(w)return h.toString();if(h<60)return`${h}s`;if(h<3600){let $=Math.floor(h/60),E=h%60;return`${$}m${E}s`}if(h<86400){let $=Math.floor(h/3600),E=Math.floor(h%3600/60);return`${$}h${E}m`}let f=Math.floor(h/86400),s=Math.floor(h%86400/3600);return`${f}d${s}h`}function $20(h,w){if(w)return`${h}ms`;if(h<1000)return`${h}ms`;return`${(h/1000).toFixed(2)}s`}var{create:E20,defineProperty:ky,getOwnPropertyDescriptor:T20,getOwnPropertyNames:U20,getPrototypeOf:F20}=Object,C20=Object.prototype.hasOwnProperty,I20=(h,w)=>()=>(w||h((w={exports:{}}).exports,w),w.exports),G20=(h,w,f,s)=>{if(w&&typeof w=="object"||typeof w=="function")for(let $ of U20(w))!C20.call(h,$)&&$!==f&&ky(h,$,{get:()=>w[$],enumerable:!(s=T20(w,$))||s.enumerable});return h},B20=(h,w,f)=>(f=h!=null?E20(F20(h)):{},G20(w||!h||!h.__esModule?ky(f,"default",{value:h,enumerable:!0}):f,h)),W20=I20((h,w)=>{function f(T){if(typeof T!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(T))}function s(T,U){for(var F="",C=0,I=-1,G=0,B,z=0;z<=T.length;++z){if(z<T.length)B=T.charCodeAt(z);else{if(B===47)break;B=47}if(B===47){if(!(I===z-1||G===1))if(I!==z-1&&G===2){if(F.length<2||C!==2||F.charCodeAt(F.length-1)!==46||F.charCodeAt(F.length-2)!==46){if(F.length>2){var Y=F.lastIndexOf("/");if(Y!==F.length-1){Y===-1?(F="",C=0):(F=F.slice(0,Y),C=F.length-1-F.lastIndexOf("/")),I=z,G=0;continue}}else if(F.length===2||F.length===1){F="",C=0,I=z,G=0;continue}}U&&(F.length>0?F+="/..":F="..",C=2)}else F.length>0?F+="/"+T.slice(I+1,z):F=T.slice(I+1,z),C=z-I-1;I=z,G=0}else B===46&&G!==-1?++G:G=-1}return F}function $(T,U){var F=U.dir||U.root,C=U.base||(U.name||"")+(U.ext||"");return F?F===U.root?F+C:F+T+C:C}var E={resolve:function(){for(var T="",U=!1,F,C=arguments.length-1;C>=-1&&!U;C--){var I;C>=0?I=arguments[C]:(F===void 0&&(F=process.cwd()),I=F),f(I),I.length!==0&&(T=I+"/"+T,U=I.charCodeAt(0)===47)}return T=s(T,!U),U?T.length>0?"/"+T:"/":T.length>0?T:"."},normalize:function(T){if(f(T),T.length===0)return".";var U=T.charCodeAt(0)===47,F=T.charCodeAt(T.length-1)===47;return T=s(T,!U),T.length===0&&!U&&(T="."),T.length>0&&F&&(T+="/"),U?"/"+T:T},isAbsolute:function(T){return f(T),T.length>0&&T.charCodeAt(0)===47},join:function(){if(arguments.length===0)return".";for(var T,U=0;U<arguments.length;++U){var F=arguments[U];f(F),F.length>0&&(T===void 0?T=F:T+="/"+F)}return T===void 0?".":E.normalize(T)},relative:function(T,U){if(f(T),f(U),T===U||(T=E.resolve(T),U=E.resolve(U),T===U))return"";for(var F=1;F<T.length&&T.charCodeAt(F)===47;++F);for(var C=T.length,I=C-F,G=1;G<U.length&&U.charCodeAt(G)===47;++G);for(var B=U.length,z=B-G,Y=I<z?I:z,Q=-1,M=0;M<=Y;++M){if(M===Y){if(z>Y){if(U.charCodeAt(G+M)===47)return U.slice(G+M+1);if(M===0)return U.slice(G+M)}else I>Y&&(T.charCodeAt(F+M)===47?Q=M:M===0&&(Q=0));break}var q=T.charCodeAt(F+M),N=U.charCodeAt(G+M);if(q!==N)break;q===47&&(Q=M)}var j="";for(M=F+Q+1;M<=C;++M)(M===C||T.charCodeAt(M)===47)&&(j.length===0?j+="..":j+="/..");return j.length>0?j+U.slice(G+Q):(G+=Q,U.charCodeAt(G)===47&&++G,U.slice(G))},_makeLong:function(T){return T},dirname:function(T){if(f(T),T.length===0)return".";for(var U=T.charCodeAt(0),F=U===47,C=-1,I=!0,G=T.length-1;G>=1;--G)if(U=T.charCodeAt(G),U===47){if(!I){C=G;break}}else I=!1;return C===-1?F?"/":".":F&&C===1?"//":T.slice(0,C)},basename:function(T,U){if(U!==void 0&&typeof U!="string")throw new TypeError('"ext" argument must be a string');f(T);var F=0,C=-1,I=!0,G;if(U!==void 0&&U.length>0&&U.length<=T.length){if(U.length===T.length&&U===T)return"";var B=U.length-1,z=-1;for(G=T.length-1;G>=0;--G){var Y=T.charCodeAt(G);if(Y===47){if(!I){F=G+1;break}}else z===-1&&(I=!1,z=G+1),B>=0&&(Y===U.charCodeAt(B)?--B===-1&&(C=G):(B=-1,C=z))}return F===C?C=z:C===-1&&(C=T.length),T.slice(F,C)}else{for(G=T.length-1;G>=0;--G)if(T.charCodeAt(G)===47){if(!I){F=G+1;break}}else C===-1&&(I=!1,C=G+1);return C===-1?"":T.slice(F,C)}},extname:function(T){f(T);for(var U=-1,F=0,C=-1,I=!0,G=0,B=T.length-1;B>=0;--B){var z=T.charCodeAt(B);if(z===47){if(!I){F=B+1;break}continue}C===-1&&(I=!1,C=B+1),z===46?U===-1?U=B:G!==1&&(G=1):U!==-1&&(G=-1)}return U===-1||C===-1||G===0||G===1&&U===C-1&&U===F+1?"":T.slice(U,C)},format:function(T){if(T===null||typeof T!="object")throw new TypeError('The "pathObject" argument must be of type Object. Received type '+typeof T);return $("/",T)},parse:function(T){f(T);var U={root:"",dir:"",base:"",ext:"",name:""};if(T.length===0)return U;var F=T.charCodeAt(0),C=F===47,I;C?(U.root="/",I=1):I=0;for(var G=-1,B=0,z=-1,Y=!0,Q=T.length-1,M=0;Q>=I;--Q){if(F=T.charCodeAt(Q),F===47){if(!Y){B=Q+1;break}continue}z===-1&&(Y=!1,z=Q+1),F===46?G===-1?G=Q:M!==1&&(M=1):G!==-1&&(M=-1)}return G===-1||z===-1||M===0||M===1&&G===z-1&&G===B+1?z!==-1&&(B===0&&C?U.base=U.name=T.slice(1,z):U.base=U.name=T.slice(B,z)):(B===0&&C?(U.name=T.slice(1,G),U.base=T.slice(1,z)):(U.name=T.slice(B,G),U.base=T.slice(B,z)),U.ext=T.slice(G,z)),B>0?U.dir=T.slice(0,B-1):C&&(U.dir="/"),U},sep:"/",delimiter:":",win32:null,posix:null};E.posix=E,w.exports=E}),jy=B20(W20()),c0=jy,L20=jy,Dy=function(h){return h},yy=function(){throw new Error("Not implemented")};c0.parse??=yy;L20.parse??=yy;var z$={resolve:c0.resolve.bind(c0),normalize:c0.normalize.bind(c0),isAbsolute:c0.isAbsolute.bind(c0),join:c0.join.bind(c0),relative:c0.relative.bind(c0),toNamespacedPath:Dy,dirname:c0.dirname.bind(c0),basename:c0.basename.bind(c0),extname:c0.extname.bind(c0),format:c0.format.bind(c0),parse:c0.parse.bind(c0),sep:"/",delimiter:":",win32:void 0,posix:void 0,_makeLong:Dy},qy={sep:"\\",delimiter:";",win32:void 0,...z$,posix:z$};z$.win32=qy.win32=qy;z$.posix=z$;var{resolve:z20,normalize:Zy0,isAbsolute:Jy0,join:Vy0,relative:Py0,toNamespacedPath:Hy0,dirname:Ny0,basename:Dy0,extname:qy0,format:ky0,parse:jy0,sep:yy0,delimiter:Oy0}=z$;function kU(h,w){if(Array.isArray(w)&&!Array.isArray(h))return w;if(Array.isArray(w)&&Array.isArray(h))return w.map((s,$)=>{let E=h[$];if(L$(s)&&L$(E))return kU(E,s);return s});if(!L$(w)||!L$(h))return w;let f={...h};for(let s in w)if(Object.prototype.hasOwnProperty.call(w,s)){let $=w[s],E=f[s];if($===null||$===void 0)f[s]=$;else if(L$($)&&L$(E))f[s]=kU(E,$);else f[s]=$}return f}function L$(h){return Boolean(h&&typeof h==="object"&&!Array.isArray(h))}async function A20({name:h,cwd:w,defaultConfig:f,endpoint:s,headers:$={Accept:"application/json","Content-Type":"application/json"}}){if(typeof window==="undefined"){let E=z20(w||"../../../",`${h}.config`);try{let T=await import(E),U=T.default||T;return kU(f,U)}catch(T){return f}}if(!s)return console.warn("An API endpoint is required to load the client config."),f;try{let E=await fetch(s,{method:"GET",headers:$});if(!E.ok)throw new Error(`HTTP error! status: ${E.status}`);let T=await E.json();return kU(f,T)}catch(E){return console.error("Failed to load client config:",E),f}}var R20={verbose:!0},ly0=await A20({name:"dnsx",defaultConfig:R20});export{k50 as writeNameserversToConfig,y50 as updateNameservers,vB as parseResponse,c50 as parseProtocolTweaks,Gy0 as hasUserDomainBeenAddedToCloud,j50 as getNameservers,h20 as formatOutput,Iy0 as findHostedZone,Fy0 as deleteHostedZoneRecords,Uy0 as deleteHostedZone,S0 as debugLog,bB as createTransport,Cy0 as createHostedZone,ly0 as config,Hy as buildQuery,By0 as addDomain,Vy as WireError,Ny as TransportType,bw as RecordType,mB as QClass,Zy as EDNSMode,Jy as DnsResponseCode,n4 as DnsFlags,dB as DnsEncoder,iB as DnsDecoder,P1 as DnsClient};
|
|
2
|
+
import{runAction as Y}from"@stacksjs/actions";import{config as U}from"@stacksjs/config";import{Action as $}from"@stacksjs/enums";import{err as G,handleError as B,ok as J}from"@stacksjs/error-handling";import{log as y}from"@stacksjs/logging";import{path as A}from"@stacksjs/path";import{fs as S}from"@stacksjs/storage";import{Route53Client as K,Route53DomainsClient as V}from"@stacksjs/ts-cloud";function D(p){if(!p)return;return p.replace(/^https?:\/\//,"").replace(/\/$/,"")}async function W(p,w){let b=await p.listHostedZonesByName({DNSName:w});if(!b||!b.HostedZones||b.HostedZones.length===0)return G(B(`No hosted zones found for domain: ${w}`));let P=b.HostedZones.find((I)=>I.Name===`${w}.`);if(!P)return G(B(`Hosted Zone not found for domain: ${w}`));let _=await p.listResourceRecordSets({HostedZoneId:P.Id});if(!_||!_.ResourceRecordSets)return G(B(`No DNS records found for domain: ${w}`));let q=_.ResourceRecordSets.filter((I)=>I.Type!=="NS"&&I.Type!=="SOA").map((I)=>({Action:"DELETE",ResourceRecordSet:I}));if(q.length>0)try{await p.changeResourceRecordSets({HostedZoneId:P.Id,ChangeBatch:{Changes:q}})}catch(I){y.warn(`Batch delete failed (${q.length} records), falling back to individual deletion`);let L=[];for(let M of q)try{await p.changeResourceRecordSets({HostedZoneId:P.Id,ChangeBatch:{Changes:[M]}})}catch(X){L.push(`${M.ResourceRecordSet.Name} (${M.ResourceRecordSet.Type}): ${X.message}`)}if(L.length>0)return G(B(`Failed to delete ${L.length} DNS record(s):
|
|
3
|
+
${L.join(`
|
|
4
|
+
`)}`))}return J(P)}async function c(p){let w=new K,b=await W(w,p);if(b.isErr)return G(B(`Failed to delete records for zone: ${p}`));let P=b.unwrap();return await w.deleteHostedZone({Id:P.Id}),y.info(`Deleted Hosted Zone for domain: ${p}`),J("success")}async function H(p){let w=new K;if((await W(w,p)).isErr)return G(B(`Failed to delete records for zone: ${p}`));return y.info(`Deleted DNS records for domain: ${p}`),J("success")}async function v(p){let w=new K,P=(await w.listHostedZonesByName({DNSName:p})).HostedZones?.find((q)=>q.Name===`${p}.`);if(P)return J(P);let _=await w.createHostedZone({Name:p,CallerReference:`${Date.now()}`});if(!_.HostedZone)return G(B("Failed to create hosted zone"));return J(_)}function F(p){if(!/^[a-zA-Z0-9.-]+$/.test(p))throw Error(`Invalid nameserver value: ${p}`);return p}function Q(p){try{let w=A.projectConfigPath("dns.ts"),P=S.readFileSync(w,"utf-8").replace(/nameservers: \[.*?\]/s,`nameservers: [${p.map((_)=>`'${F(_)}'`).join(", ")}]`);S.writeFileSync(w,P,"utf-8"),y.info("Nameservers have been set.")}catch(w){y.error("Error updating nameservers:",w)}}async function u(p){try{let w=new K,{HostedZones:b}=await w.listHostedZonesByName({DNSName:p});if(!b||b.length===0)return G(B(`No hosted zones found for domain ${p}`));let P=b[0];if(P&&P.Name===`${p}.`)return J(P.Id);return J(null)}catch(w){return G(B(`Failed to find hosted zone for domain ${p}`,w))}}async function O(p){if(y.debug("Getting nameservers for domain:",p),!p)return[];try{return(await new V().getDomainDetail({DomainName:p}))?.Nameservers?.map((P)=>P.Name)||[]}catch(w){return y.debug("Domain not registered via Route53 Domains:",w),[]}}async function Z(p){y.debug("Getting hosted zone nameservers for domain:",p);try{let w=new K,P=(await w.listHostedZonesByName({DNSName:p})).HostedZones?.find((q)=>q.Name===`${p}.`);if(!P)return y.debug("No hosted zone found for domain:",p),[];return(await w.getHostedZone({Id:P.Id})).DelegationSet?.NameServers||[]}catch(w){return B("Error getting hosted zone nameservers",w),[]}}async function T(p,w){if(!w)w=U.app.url;let b=await O(w);if(!b||b.length===0)return y.debug("Domain is not registered via Route53 Domains - skipping automatic nameserver update"),Q(p),!1;if(JSON.stringify(b.sort())!==JSON.stringify(p.sort())){y.info("Updating your domain nameservers to match the ones in your hosted zone..."),y.debug("Hosted zone nameservers:",p),y.debug("Domain nameservers:",b);try{return await new V().updateDomainNameservers({DomainName:w,Nameservers:p.map((_)=>({Name:_}))}),Q(p),y.info("Nameservers updated."),!0}catch(P){return y.debug("Failed to update nameservers via Route53 Domains:",P),Q(p),!1}}return y.success("Your nameservers are up to date."),!0}async function g(p){if(y.debug("Checking if domain has been added to cloud..."),!p)p=U.app.url;if(p=D(p),!p)return!1;y.debug("domainName:",p);let w=new K,b=await w.listHostedZonesByName({DNSName:p});if(y.debug("Existing hosted zones:",b),!b||!b.HostedZones||b.HostedZones.length===0)return!1;let P=b.HostedZones.find((_)=>_.Name===`${p}.`);if(P){y.debug("Hosted zone found:",P);let q=(await w.getHostedZone({Id:P.Id})).DelegationSet?.NameServers||[];return await T(q,p),!0}return!1}async function h(p){return await Y($.DomainsAdd,p)}export*from"@stacksjs/dnsx";export{Q as writeNameserversToConfig,T as updateNameservers,g as hasUserDomainBeenAddedToCloud,O as getNameservers,Z as getHostedZoneNameservers,u as findHostedZone,H as deleteHostedZoneRecords,c as deleteHostedZone,v as createHostedZone,h as addDomain};
|