@allthings/cloud-toolkit 1.2.0-dev.0 → 1.3.0-dev.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/lib.cjs.js +1 -1
- package/dist/lib.esm.js +1 -1
- package/dist/lib.umd.min.js +1 -1
- package/dist/src/logger/logger.d.ts +10 -0
- package/package.json +5 -3
package/dist/lib.umd.min.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("events"),require("url"),require("util"),require("fs"),require("http"),require("https"),require("zlib"),require("stream"),require("net"),require("dns"),require("os"),require("path"),require("crypto"),require("tls"),require("child_process")):"function"==typeof define&&define.amd?define(["exports","events","url","util","fs","http","https","zlib","stream","net","dns","os","path","crypto","tls","child_process"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).allthings={},e.require$$0$5,e.require$$0$1,e.require$$1$1,e.require$$2,e.require$$0$3,e.require$$1,e.require$$3,e.require$$0$2,e.require$$7,e.require$$4,e.require$$6,e.require$$0$4,e.require$$2$1,e.require$$1$2,e.require$$0$6)}(this,(function(e,t,i,n,s,a,o,r,c,l,p,d,u,m,h,f){"use strict";const g=e=>{let t=e.httpHandler;return{setHttpHandler(e){t=e},httpHandler:()=>t,updateHttpClientConfig(e,i){t.updateHttpClientConfig(e,i)},httpHandlerConfigs:()=>t.httpHandlerConfigs()}},y=e=>({httpHandler:e.httpHandler()});var x,v,w,b,E;!function(e){e.HEADER="header",e.QUERY="query"}(x||(x={})),function(e){e.HEADER="header",e.QUERY="query"}(v||(v={})),function(e){e.HTTP="http",e.HTTPS="https"}(w||(w={})),function(e){e.MD5="md5",e.CRC32="crc32",e.CRC32C="crc32c",e.SHA1="sha1",e.SHA256="sha256"}(b||(b={})),function(e){e[e.HEADER=0]="HEADER",e[e.TRAILER=1]="TRAILER"}(E||(E={}));const S="__smithy_context";var C,A;!function(e){e.PROFILE="profile",e.SSO_SESSION="sso-session",e.SERVICES="services"}(C||(C={})),function(e){e.HTTP_0_9="http/0.9",e.HTTP_1_0="http/1.0",e.TDS_8_0="tds/8.0"}(A||(A={}));class I{constructor(e){this.method=e.method||"GET",this.hostname=e.hostname||"localhost",this.port=e.port,this.query=e.query||{},this.headers=e.headers||{},this.body=e.body,this.protocol=e.protocol?":"!==e.protocol.slice(-1)?`${e.protocol}:`:e.protocol:"https:",this.path=e.path?"/"!==e.path.charAt(0)?`/${e.path}`:e.path:"/",this.username=e.username,this.password=e.password,this.fragment=e.fragment}static clone(e){const t=new I({...e,headers:{...e.headers}});var i;return t.query&&(t.query=(i=t.query,Object.keys(i).reduce(((e,t)=>{const n=i[t];return{...e,[t]:Array.isArray(n)?[...n]:n}}),{}))),t}static isInstance(e){if(!e)return!1;const t=e;return"method"in t&&"protocol"in t&&"hostname"in t&&"path"in t&&"object"==typeof t.query&&"object"==typeof t.headers}clone(){return I.clone(this)}}class T{constructor(e){this.statusCode=e.statusCode,this.reason=e.reason,this.headers=e.headers||{},this.body=e.body}static isInstance(e){if(!e)return!1;const t=e;return"number"==typeof t.statusCode&&"object"==typeof t.headers}}const k={name:"hostHeaderMiddleware",step:"build",priority:"low",tags:["HOST"],override:!0},O=e=>({applyToStack:t=>{t.add((e=>t=>async i=>{if(!I.isInstance(i.request))return t(i);const{request:n}=i,{handlerProtocol:s=""}=e.requestHandler.metadata||{};if(s.indexOf("h2")>=0&&!n.headers[":authority"])delete n.headers.host,n.headers[":authority"]=n.hostname+(n.port?":"+n.port:"");else if(!n.headers.host){let e=n.hostname;null!=n.port&&(e+=`:${n.port}`),n.headers.host=e}return t(i)})(e),k)}}),P={name:"loggerMiddleware",tags:["LOGGER"],step:"initialize",override:!0},_=e=>({applyToStack:e=>{e.add(((e,t)=>async i=>{try{const n=await e(i),{clientName:s,commandName:a,logger:o,dynamoDbDocumentClientOptions:r={}}=t,{overrideInputFilterSensitiveLog:c,overrideOutputFilterSensitiveLog:l}=r,p=c??t.inputFilterSensitiveLog,d=l??t.outputFilterSensitiveLog,{$metadata:u,...m}=n.output;return o?.info?.({clientName:s,commandName:a,input:p(i.input),output:d(m),metadata:u}),n}catch(e){const{clientName:n,commandName:s,logger:a,dynamoDbDocumentClientOptions:o={}}=t,{overrideInputFilterSensitiveLog:r}=o,c=r??t.inputFilterSensitiveLog;throw a?.error?.({clientName:n,commandName:s,input:c(i.input),error:e,metadata:e.$metadata}),e}}),P)}}),R="X-Amzn-Trace-Id",$={step:"build",tags:["RECURSION_DETECTION"],name:"recursionDetectionMiddleware",override:!0,priority:"low"},M=e=>({applyToStack:t=>{t.add((e=>t=>async i=>{const{request:n}=i;if(!I.isInstance(n)||"node"!==e.runtime||n.headers.hasOwnProperty(R))return t(i);const s=[]._X_AMZN_TRACE_ID,a=e=>"string"==typeof e&&e.length>0;return a([].AWS_LAMBDA_FUNCTION_NAME)&&a(s)&&(n.headers[R]=s),t({...i,request:n})})(e),$)}}),N=e=>e[S]||(e[S]={}),D=e=>{if("function"==typeof e)return e;const t=Promise.resolve(e);return()=>t};const j=(e,t)=>(i,n)=>async s=>{const a=e.httpAuthSchemeProvider(await t.httpAuthSchemeParametersProvider(e,n,s.input)),o=function(e){const t=new Map;for(const i of e)t.set(i.schemeId,i);return t}(e.httpAuthSchemes),r=N(n),c=[];for(const i of a){const s=o.get(i.schemeId);if(!s){c.push(`HttpAuthScheme \`${i.schemeId}\` was not enabled for this service.`);continue}const a=s.identityProvider(await t.identityProviderConfigProvider(e));if(!a){c.push(`HttpAuthScheme \`${i.schemeId}\` did not have an IdentityProvider configured.`);continue}const{identityProperties:l={},signingProperties:p={}}=i.propertiesExtractor?.(e,n)||{};i.identityProperties=Object.assign(i.identityProperties||{},l),i.signingProperties=Object.assign(i.signingProperties||{},p),r.selectedHttpAuthScheme={httpAuthOption:i,identity:await a(i.identityProperties),signer:s.signer};break}if(!r.selectedHttpAuthScheme)throw new Error(c.join("\n"));return i(s)},z={step:"serialize",tags:["HTTP_AUTH_SCHEME"],name:"httpAuthSchemeMiddleware",override:!0,relation:"before",toMiddleware:"endpointV2Middleware"},L=(e,{httpAuthSchemeParametersProvider:t,identityProviderConfigProvider:i})=>({applyToStack:n=>{n.addRelativeTo(j(e,{httpAuthSchemeParametersProvider:t,identityProviderConfigProvider:i}),z)}}),F={name:"deserializerMiddleware",step:"deserialize",tags:["DESERIALIZER"],override:!0},U={name:"serializerMiddleware",step:"serialize",tags:["SERIALIZER"],override:!0};function B(e,t,i){return{applyToStack:n=>{n.add(((e,t)=>i=>async n=>{const{response:s}=await i(n);try{return{response:s,output:await t(s,e)}}catch(e){if(Object.defineProperty(e,"$response",{value:s}),!("$metadata"in e)){const t="Deserialization error: to see the raw response, inspect the hidden field {error}.$response on this object.";e.message+="\n "+t,void 0!==e.$responseBodyText&&e.$response&&(e.$response.body=e.$responseBodyText)}throw e}})(e,i),F),n.add(((e,t)=>(i,n)=>async s=>{const a=n.endpointV2?.url&&e.urlParser?async()=>e.urlParser(n.endpointV2.url):e.endpoint;if(!a)throw new Error("No valid endpoint provider available.");const o=await t(s.input,{...e,endpoint:a});return i({...s,request:o})})(e,t),U)}}}const H=e=>e=>{throw e},q=(e,t)=>{},V={step:"finalizeRequest",tags:["HTTP_SIGNING"],name:"httpSigningMiddleware",aliases:["apiKeyMiddleware","tokenMiddleware","awsAuthMiddleware"],override:!0,relation:"after",toMiddleware:"retryMiddleware"},G=e=>({applyToStack:e=>{e.addRelativeTo(((e,t)=>async i=>{if(!I.isInstance(i.request))return e(i);const n=N(t).selectedHttpAuthScheme;if(!n)throw new Error("No HttpAuthScheme was selected: unable to sign request");const{httpAuthOption:{signingProperties:s={}},identity:a,signer:o}=n,r=await e({...i,request:await o.sign(i.request,a,s)}).catch((o.errorHandler||H)(s));return(o.successHandler||q)(r.response,s),r}),V)}}),W=e=>{if("function"==typeof e)return e;const t=Promise.resolve(e);return()=>t},K=async(e,t,i,...n)=>await t.send(new e(i),...n);function Q(e,t,i,n,s){return async function*(a,o,...r){let c,l=a.startingToken||void 0,p=!0;for(;p;){if(o[i]=l,s&&(o[s]=o[s]??a.pageSize),!(a.client instanceof e))throw new Error(`Invalid client, expected instance of ${e.name}`);c=await K(t,a.client,o,...r),yield c;const d=l;l=X(c,n),p=!(!l||a.stopOnSameToken&&l===d)}}}const X=(e,t)=>{let i=e;const n=t.split(".");for(const e of n){if(!i||"object"!=typeof i)return;i=i[e]}return i},J={},Y=new Array(64);for(let e=0,t="A".charCodeAt(0),i="Z".charCodeAt(0);e+t<=i;e++){const i=String.fromCharCode(e+t);J[i]=e,Y[e]=i}for(let e=0,t="a".charCodeAt(0),i="z".charCodeAt(0);e+t<=i;e++){const i=String.fromCharCode(e+t),n=e+26;J[i]=n,Y[n]=i}for(let e=0;e<10;e++){J[e.toString(10)]=e+52;const t=e.toString(10),i=e+52;J[t]=i,Y[i]=t}J["+"]=62,Y[62]="+",J["/"]=63,Y[63]="/";const Z=e=>{let t=e.length/4*3;"=="===e.slice(-2)?t-=2:"="===e.slice(-1)&&t--;const i=new ArrayBuffer(t),n=new DataView(i);for(let t=0;t<e.length;t+=4){let i=0,s=0;for(let n=t,a=t+3;n<=a;n++)if("="!==e[n]){if(!(e[n]in J))throw new TypeError(`Invalid character ${e[n]} in base64 string.`);i|=J[e[n]]<<6*(a-n),s+=6}else i>>=6;const a=t/4*3;i>>=s%8;const o=Math.floor(s/8);for(let e=0;e<o;e++){const t=8*(o-e-1);n.setUint8(a+e,(i&255<<t)>>t)}}return new Uint8Array(i)},ee=e=>(new TextEncoder).encode(e),te=e=>"string"==typeof e?ee(e):ArrayBuffer.isView(e)?new Uint8Array(e.buffer,e.byteOffset,e.byteLength/Uint8Array.BYTES_PER_ELEMENT):new Uint8Array(e),ie=e=>{if("string"==typeof e)return e;if("object"!=typeof e||"number"!=typeof e.byteOffset||"number"!=typeof e.byteLength)throw new Error("@smithy/util-utf8: toUtf8 encoder function only accepts string | Uint8Array.");return new TextDecoder("utf-8").decode(e)};function ne(e){let t;t="string"==typeof e?ee(e):e;const i="object"==typeof t&&"number"==typeof t.length,n="object"==typeof t&&"number"==typeof t.byteOffset&&"number"==typeof t.byteLength;if(!i&&!n)throw new Error("@smithy/util-base64: toBase64 encoder function only accepts string | Uint8Array.");let s="";for(let e=0;e<t.length;e+=3){let i=0,n=0;for(let s=e,a=Math.min(e+3,t.length);s<a;s++)i|=t[s]<<8*(a-s-1),n+=8;const a=Math.ceil(n/6);i<<=6*a-n;for(let e=1;e<=a;e++){const t=6*(a-e);s+=Y[(i&63<<t)>>t]}s+="==".slice(0,4-a)}return s}class se extends Uint8Array{static fromString(e,t="utf-8"){if("string"==typeof e)return function(e,t){return"base64"===t?se.mutate(Z(e)):se.mutate(ee(e))}(e,t);throw new Error(`Unsupported conversion from ${typeof e} to Uint8ArrayBlobAdapter.`)}static mutate(e){return Object.setPrototypeOf(e,se.prototype),e}transformToString(e="utf-8"){return function(e,t="utf-8"){return"base64"===t?ne(e):ie(e)}(this,e)}}const ae=e=>encodeURIComponent(e).replace(/[!'()*]/g,oe),oe=e=>`%${e.charCodeAt(0).toString(16).toUpperCase()}`;function re(e){const t=[];for(let i of Object.keys(e).sort()){const n=e[i];if(i=ae(i),Array.isArray(n))for(let e=0,s=n.length;e<s;e++)t.push(`${i}=${ae(n[e])}`);else{let e=i;(n||"string"==typeof n)&&(e+=`=${ae(n)}`),t.push(e)}}return t.join("&")}function ce(e=0){return new Promise(((t,i)=>{e&&setTimeout((()=>{const t=new Error(`Request did not complete within ${e} ms`);t.name="TimeoutError",i(t)}),e)}))}const le={supported:void 0};let pe=class e{static create(t){return"function"==typeof t?.handle?t:new e(t)}constructor(e){"function"==typeof e?this.configProvider=e().then((e=>e||{})):(this.config=e??{},this.configProvider=Promise.resolve(this.config)),void 0===le.supported&&(le.supported=Boolean("undefined"!=typeof Request&&"keepalive"in new Request("https://[::1]")))}destroy(){}async handle(e,{abortSignal:t}={}){this.config||(this.config=await this.configProvider);const i=this.config.requestTimeout,n=!0===this.config.keepAlive,s=this.config.credentials;if(t?.aborted){const e=new Error("Request aborted");return e.name="AbortError",Promise.reject(e)}let a=e.path;const o=re(e.query||{});o&&(a+=`?${o}`),e.fragment&&(a+=`#${e.fragment}`);let r="";if(null!=e.username||null!=e.password){r=`${e.username??""}:${e.password??""}@`}const{port:c,method:l}=e,p=`${e.protocol}//${r}${e.hostname}${c?`:${c}`:""}${a}`,d="GET"===l||"HEAD"===l?void 0:e.body,u={body:d,headers:new Headers(e.headers),method:l,credentials:s};this.config?.cache&&(u.cache=this.config.cache),d&&(u.duplex="half"),"undefined"!=typeof AbortController&&(u.signal=t),le.supported&&(u.keepalive=n),"function"==typeof this.config.requestInit&&Object.assign(u,this.config.requestInit(e));let m=()=>{};const h=new Request(p,u),f=[fetch(h).then((e=>{const t=e.headers,i={};for(const e of t.entries())i[e[0]]=e[1];return null!=e.body?{response:new T({headers:i,reason:e.statusText,statusCode:e.status,body:e.body})}:e.blob().then((t=>({response:new T({headers:i,reason:e.statusText,statusCode:e.status,body:t})})))})),ce(i)];return t&&f.push(new Promise(((e,i)=>{const n=()=>{const e=new Error("Request aborted");e.name="AbortError",i(e)};if("function"==typeof t.addEventListener){const e=t;e.addEventListener("abort",n,{once:!0}),m=()=>e.removeEventListener("abort",n)}else t.onabort=n}))),Promise.race(f).finally(m)}updateHttpClientConfig(e,t){this.config=void 0,this.configProvider=this.configProvider.then((i=>(i[e]=t,i)))}httpHandlerConfigs(){return this.config??{}}};const de=async e=>"function"==typeof Blob&&e instanceof Blob?new Uint8Array(await e.arrayBuffer()):async function(e){const t=[],i=e.getReader();let n=!1,s=0;for(;!n;){const{done:e,value:a}=await i.read();a&&(t.push(a),s+=a.length),n=e}const a=new Uint8Array(s);let o=0;for(const e of t)a.set(e,o),o+=e.length;return a}(e);const ue={},me={};for(let e=0;e<256;e++){let t=e.toString(16).toLowerCase();1===t.length&&(t=`0${t}`),ue[e]=t,me[t]=e}function he(e){if(e.length%2!=0)throw new Error("Hex encoded strings must have an even number length");const t=new Uint8Array(e.length/2);for(let i=0;i<e.length;i+=2){const n=e.slice(i,i+2).toLowerCase();if(!(n in me))throw new Error(`Cannot decode unrecognized sequence ${n} as hexadecimal`);t[i/2]=me[n]}return t}function fe(e){let t="";for(let i=0;i<e.byteLength;i++)t+=ue[e[i]];return t}const ge=async(e=new Uint8Array,t)=>{if(e instanceof Uint8Array)return se.mutate(e);if(!e)return se.mutate(new Uint8Array);const i=t.streamCollector(e);return se.mutate(await i)};function ye(e){return encodeURIComponent(e).replace(/[!'()*]/g,(function(e){return"%"+e.charCodeAt(0).toString(16).toUpperCase()}))}class xe{constructor(e,t){this.input=e,this.context=t,this.query={},this.method="",this.headers={},this.path="",this.body=null,this.hostname="",this.resolvePathStack=[]}async build(){const{hostname:e,protocol:t="https",port:i,path:n}=await this.context.endpoint();this.path=n;for(const e of this.resolvePathStack)e(this.path);return new I({protocol:t,hostname:this.hostname||e,port:i,method:this.method,path:this.path,query:this.query,body:this.body,headers:this.headers})}hn(e){return this.hostname=e,this}bp(e){return this.resolvePathStack.push((t=>{this.path=`${t?.endsWith("/")?t.slice(0,-1):t||""}`+e})),this}p(e,t,i,n){return this.resolvePathStack.push((s=>{this.path=ve(s,this.input,e,t,i,n)})),this}h(e){return this.headers=e,this}q(e){return this.query=e,this}b(e){return this.body=e,this}m(e){return this.method=e,this}}const ve=(e,t,i,n,s,a)=>{if(null==t||void 0===t[i])throw new Error("No value provided for input HTTP label: "+i+".");{const t=n();if(t.length<=0)throw new Error("Empty value provided for input HTTP label: "+i+".");e=e.replace(s,a?t.split("/").map((e=>ye(e))).join("/"):ye(t))}return e};class we{constructor(e){this.authSchemes=new Map;for(const[t,i]of Object.entries(e))void 0!==i&&this.authSchemes.set(t,i)}getIdentityProvider(e){return this.authSchemes.get(e)}}const be=(Ee=3e5,e=>Se(e)&&e.expiration.getTime()-Date.now()<Ee);var Ee;const Se=e=>void 0!==e.expiration,Ce=(e,t,i)=>{if(void 0===e)return;const n="function"!=typeof e?async()=>Promise.resolve(e):e;let s,a,o,r=!1;const c=async e=>{a||(a=n(e));try{s=await a,o=!0,r=!1}finally{a=void 0}return s};return void 0===t?async e=>(o&&!e?.forceRefresh||(s=await c(e)),s):async e=>(o&&!e?.forceRefresh||(s=await c(e)),r?s:i(s)?t(s)?(await c(e),s):s:(r=!0,s))};function Ae(e){const t=W(e.userAgentAppId??undefined);return{...e,customUserAgent:"string"==typeof e.customUserAgent?[[e.customUserAgent]]:e.customUserAgent,userAgentAppId:async()=>{const i=await t();if(!function(e){return void 0===e||"string"==typeof e&&e.length<=50}(i)){const t="NoOpLogger"!==e.logger?.constructor?.name&&e.logger?e.logger:console;"string"!=typeof i?t?.warn("userAgentAppId must be a string or undefined."):i.length>50&&t?.warn("The provided userAgentAppId exceeds the maximum length of 50 characters.")}return i}}}class Ie{constructor({size:e,params:t}){this.data=new Map,this.parameters=[],this.capacity=e??50,t&&(this.parameters=t)}get(e,t){const i=this.hash(e);if(!1===i)return t();if(!this.data.has(i)){if(this.data.size>this.capacity+10){const e=this.data.keys();let t=0;for(;;){const{value:i,done:n}=e.next();if(this.data.delete(i),n||++t>10)break}}this.data.set(i,t())}return this.data.get(i)}size(){return this.data.size}hash(e){let t="";const{parameters:i}=this;if(0===i.length)return!1;for(const n of i){const i=String(e[n]??"");if(i.includes("|;"))return!1;t+=i+"|;"}return t}}const Te=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}$"),ke=e=>Te.test(e)||e.startsWith("[")&&e.endsWith("]"),Oe=new RegExp("^(?!.*-$)(?!-)[a-zA-Z0-9-]{1,63}$"),Pe=(e,t=!1)=>{if(!t)return Oe.test(e);const i=e.split(".");for(const e of i)if(!Pe(e))return!1;return!0},_e={},Re="endpoints";function $e(e){return"object"!=typeof e||null==e?e:"ref"in e?`$${$e(e.ref)}`:"fn"in e?`${e.fn}(${(e.argv||[]).map($e).join(", ")})`:JSON.stringify(e,null,2)}class Me extends Error{constructor(e){super(e),this.name="EndpointError"}}const Ne=(e,t)=>(e=>{const t=e.split("."),i=[];for(const n of t){const t=n.indexOf("[");if(-1!==t){if(n.indexOf("]")!==n.length-1)throw new Me(`Path: '${e}' does not end with ']'`);const s=n.slice(t+1,-1);if(Number.isNaN(parseInt(s)))throw new Me(`Invalid array index: '${s}' in path: '${e}'`);0!==t&&i.push(n.slice(0,t)),i.push(s)}else i.push(n)}return i})(t).reduce(((i,n)=>{if("object"!=typeof i)throw new Me(`Index '${n}' in '${t}' not found in '${JSON.stringify(e)}'`);return Array.isArray(i)?i[parseInt(n)]:i[n]}),e),De={[w.HTTP]:80,[w.HTTPS]:443},je={booleanEquals:(e,t)=>e===t,getAttr:Ne,isSet:e=>null!=e,isValidHostLabel:Pe,not:e=>!e,parseURL:e=>{const t=(()=>{try{if(e instanceof URL)return e;if("object"==typeof e&&"hostname"in e){const{hostname:t,port:i,protocol:n="",path:s="",query:a={}}=e,o=new URL(`${n}//${t}${i?`:${i}`:""}${s}`);return o.search=Object.entries(a).map((([e,t])=>`${e}=${t}`)).join("&"),o}return new URL(e)}catch(e){return null}})();if(!t)return console.error(`Unable to parse ${JSON.stringify(e)} as a whatwg URL.`),null;const i=t.href,{host:n,hostname:s,pathname:a,protocol:o,search:r}=t;if(r)return null;const c=o.slice(0,-1);if(!Object.values(w).includes(c))return null;const l=ke(s);return{scheme:c,authority:`${n}${i.includes(`${n}:${De[c]}`)||"string"==typeof e&&e.includes(`${n}:${De[c]}`)?`:${De[c]}`:""}`,path:a,normalizedPath:a.endsWith("/")?a:`${a}/`,isIp:l}},stringEquals:(e,t)=>e===t,substring:(e,t,i,n)=>t>=i||e.length<i?null:n?e.substring(e.length-i,e.length-t):e.substring(t,i),uriEncode:e=>encodeURIComponent(e).replace(/[!*'()]/g,(e=>`%${e.charCodeAt(0).toString(16).toUpperCase()}`))},ze=(e,t)=>{const i=[],n={...t.endpointParams,...t.referenceRecord};let s=0;for(;s<e.length;){const t=e.indexOf("{",s);if(-1===t){i.push(e.slice(s));break}i.push(e.slice(s,t));const a=e.indexOf("}",t);if(-1===a){i.push(e.slice(t));break}"{"===e[t+1]&&"}"===e[a+1]&&(i.push(e.slice(t+1,a)),s=a+2);const o=e.substring(t+1,a);if(o.includes("#")){const[e,t]=o.split("#");i.push(Ne(n[e],t))}else i.push(n[o]);s=a+1}return i.join("")},Le=(e,t,i)=>{if("string"==typeof e)return ze(e,i);if(e.fn)return Fe(e,i);if(e.ref)return(({ref:e},t)=>({...t.endpointParams,...t.referenceRecord}[e]))(e,i);throw new Me(`'${t}': ${String(e)} is not a string, function or reference.`)},Fe=({fn:e,argv:t},i)=>{const n=t.map((e=>["boolean","number"].includes(typeof e)?e:Le(e,"arg",i))),s=e.split(".");return s[0]in _e&&null!=s[1]?_e[s[0]][s[1]](...n):je[e](...n)},Ue=({assign:e,...t},i)=>{if(e&&e in i.referenceRecord)throw new Me(`'${e}' is already defined in Reference Record.`);const n=Fe(t,i);return i.logger?.debug?.(`${Re} evaluateCondition: ${$e(t)} = ${$e(n)}`),{result:""===n||!!n,...null!=e&&{toAssign:{name:e,value:n}}}},Be=(e=[],t)=>{const i={};for(const n of e){const{result:e,toAssign:s}=Ue(n,{...t,referenceRecord:{...t.referenceRecord,...i}});if(!e)return{result:e};s&&(i[s.name]=s.value,t.logger?.debug?.(`${Re} assign: ${s.name} := ${$e(s.value)}`))}return{result:!0,referenceRecord:i}},He=(e,t)=>Object.entries(e).reduce(((e,[i,n])=>({...e,[i]:n.map((e=>{const n=Le(e,"Header value entry",t);if("string"!=typeof n)throw new Me(`Header '${i}' value '${n}' is not a string`);return n}))})),{}),qe=(e,t)=>{if(Array.isArray(e))return e.map((e=>qe(e,t)));switch(typeof e){case"string":return ze(e,t);case"object":if(null===e)throw new Me(`Unexpected endpoint property: ${e}`);return Ve(e,t);case"boolean":return e;default:throw new Me("Unexpected endpoint property type: "+typeof e)}},Ve=(e,t)=>Object.entries(e).reduce(((e,[i,n])=>({...e,[i]:qe(n,t)})),{}),Ge=(e,t)=>{const i=Le(e,"Endpoint URL",t);if("string"==typeof i)try{return new URL(i)}catch(e){throw console.error(`Failed to construct URL with ${i}`,e),e}throw new Me("Endpoint URL must be a string, got "+typeof i)},We=(e,t)=>{const{conditions:i,endpoint:n}=e,{result:s,referenceRecord:a}=Be(i,t);if(!s)return;const o={...t,referenceRecord:{...t.referenceRecord,...a}},{url:r,properties:c,headers:l}=n;return t.logger?.debug?.(`${Re} Resolving endpoint from template: ${$e(n)}`),{...null!=l&&{headers:He(l,o)},...null!=c&&{properties:Ve(c,o)},url:Ge(r,o)}},Ke=(e,t)=>{const{conditions:i,error:n}=e,{result:s,referenceRecord:a}=Be(i,t);if(s)throw new Me(Le(n,"Error",{...t,referenceRecord:{...t.referenceRecord,...a}}))},Qe=(e,t)=>{const{conditions:i,rules:n}=e,{result:s,referenceRecord:a}=Be(i,t);if(s)return Xe(n,{...t,referenceRecord:{...t.referenceRecord,...a}})},Xe=(e,t)=>{for(const i of e)if("endpoint"===i.type){const e=We(i,t);if(e)return e}else if("error"===i.type)Ke(i,t);else{if("tree"!==i.type)throw new Me(`Unknown endpoint rule: ${i}`);{const e=Qe(i,t);if(e)return e}}throw new Me("Rules evaluation failed")},Je=(e,t)=>{const{endpointParams:i,logger:n}=t,{parameters:s,rules:a}=e;t.logger?.debug?.(`${Re} Initial EndpointParams: ${$e(i)}`);const o=Object.entries(s).filter((([,e])=>null!=e.default)).map((([e,t])=>[e,t.default]));if(o.length>0)for(const[e,t]of o)i[e]=i[e]??t;const r=Object.entries(s).filter((([,e])=>e.required)).map((([e])=>e));for(const e of r)if(null==i[e])throw new Me(`Missing required parameter: '${e}'`);const c=Xe(a,{endpointParams:i,logger:n,referenceRecord:{}});return t.logger?.debug?.(`${Re} Resolved endpoint: ${$e(c)}`),c},Ye=(e,t=!1)=>{if(t){for(const t of e.split("."))if(!Ye(t))return!1;return!0}return!!Pe(e)&&(!(e.length<3||e.length>63)&&(e===e.toLowerCase()&&!ke(e)))};let Ze={partitions:[{id:"aws",outputs:{dnsSuffix:"amazonaws.com",dualStackDnsSuffix:"api.aws",implicitGlobalRegion:"us-east-1",name:"aws",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^(us|eu|ap|sa|ca|me|af|il|mx)\\-\\w+\\-\\d+$",regions:{"af-south-1":{description:"Africa (Cape Town)"},"ap-east-1":{description:"Asia Pacific (Hong Kong)"},"ap-northeast-1":{description:"Asia Pacific (Tokyo)"},"ap-northeast-2":{description:"Asia Pacific (Seoul)"},"ap-northeast-3":{description:"Asia Pacific (Osaka)"},"ap-south-1":{description:"Asia Pacific (Mumbai)"},"ap-south-2":{description:"Asia Pacific (Hyderabad)"},"ap-southeast-1":{description:"Asia Pacific (Singapore)"},"ap-southeast-2":{description:"Asia Pacific (Sydney)"},"ap-southeast-3":{description:"Asia Pacific (Jakarta)"},"ap-southeast-4":{description:"Asia Pacific (Melbourne)"},"ap-southeast-5":{description:"Asia Pacific (Malaysia)"},"aws-global":{description:"AWS Standard global region"},"ca-central-1":{description:"Canada (Central)"},"ca-west-1":{description:"Canada West (Calgary)"},"eu-central-1":{description:"Europe (Frankfurt)"},"eu-central-2":{description:"Europe (Zurich)"},"eu-north-1":{description:"Europe (Stockholm)"},"eu-south-1":{description:"Europe (Milan)"},"eu-south-2":{description:"Europe (Spain)"},"eu-west-1":{description:"Europe (Ireland)"},"eu-west-2":{description:"Europe (London)"},"eu-west-3":{description:"Europe (Paris)"},"il-central-1":{description:"Israel (Tel Aviv)"},"me-central-1":{description:"Middle East (UAE)"},"me-south-1":{description:"Middle East (Bahrain)"},"sa-east-1":{description:"South America (Sao Paulo)"},"us-east-1":{description:"US East (N. Virginia)"},"us-east-2":{description:"US East (Ohio)"},"us-west-1":{description:"US West (N. California)"},"us-west-2":{description:"US West (Oregon)"}}},{id:"aws-cn",outputs:{dnsSuffix:"amazonaws.com.cn",dualStackDnsSuffix:"api.amazonwebservices.com.cn",implicitGlobalRegion:"cn-northwest-1",name:"aws-cn",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^cn\\-\\w+\\-\\d+$",regions:{"aws-cn-global":{description:"AWS China global region"},"cn-north-1":{description:"China (Beijing)"},"cn-northwest-1":{description:"China (Ningxia)"}}},{id:"aws-us-gov",outputs:{dnsSuffix:"amazonaws.com",dualStackDnsSuffix:"api.aws",implicitGlobalRegion:"us-gov-west-1",name:"aws-us-gov",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^us\\-gov\\-\\w+\\-\\d+$",regions:{"aws-us-gov-global":{description:"AWS GovCloud (US) global region"},"us-gov-east-1":{description:"AWS GovCloud (US-East)"},"us-gov-west-1":{description:"AWS GovCloud (US-West)"}}},{id:"aws-iso",outputs:{dnsSuffix:"c2s.ic.gov",dualStackDnsSuffix:"c2s.ic.gov",implicitGlobalRegion:"us-iso-east-1",name:"aws-iso",supportsDualStack:!1,supportsFIPS:!0},regionRegex:"^us\\-iso\\-\\w+\\-\\d+$",regions:{"aws-iso-global":{description:"AWS ISO (US) global region"},"us-iso-east-1":{description:"US ISO East"},"us-iso-west-1":{description:"US ISO WEST"}}},{id:"aws-iso-b",outputs:{dnsSuffix:"sc2s.sgov.gov",dualStackDnsSuffix:"sc2s.sgov.gov",implicitGlobalRegion:"us-isob-east-1",name:"aws-iso-b",supportsDualStack:!1,supportsFIPS:!0},regionRegex:"^us\\-isob\\-\\w+\\-\\d+$",regions:{"aws-iso-b-global":{description:"AWS ISOB (US) global region"},"us-isob-east-1":{description:"US ISOB East (Ohio)"}}},{id:"aws-iso-e",outputs:{dnsSuffix:"cloud.adc-e.uk",dualStackDnsSuffix:"cloud.adc-e.uk",implicitGlobalRegion:"eu-isoe-west-1",name:"aws-iso-e",supportsDualStack:!1,supportsFIPS:!0},regionRegex:"^eu\\-isoe\\-\\w+\\-\\d+$",regions:{"eu-isoe-west-1":{description:"EU ISOE West"}}},{id:"aws-iso-f",outputs:{dnsSuffix:"csp.hci.ic.gov",dualStackDnsSuffix:"csp.hci.ic.gov",implicitGlobalRegion:"us-isof-south-1",name:"aws-iso-f",supportsDualStack:!1,supportsFIPS:!0},regionRegex:"^us\\-isof\\-\\w+\\-\\d+$",regions:{}}],version:"1.1"};const et={isVirtualHostableS3Bucket:Ye,parseArn:e=>{const t=e.split(":");if(t.length<6)return null;const[i,n,s,a,o,...r]=t;if("arn"!==i||""===n||""===s||""===r.join(":"))return null;return{partition:n,service:s,region:a,accountId:o,resourceId:r.map((e=>e.split("/"))).flat()}},partition:e=>{const{partitions:t}=Ze;for(const i of t){const{regions:t,outputs:n}=i;for(const[i,s]of Object.entries(t))if(i===e)return{...n,...s}}for(const i of t){const{regionRegex:t,outputs:n}=i;if(new RegExp(t).test(e))return{...n}}const i=t.find((e=>"aws"===e.id));if(!i)throw new Error("Provided region was not found in the partition array or regex, and default partition with id 'aws' doesn't exist.");return{...i.outputs}}};function tt(e,t,i){e.__aws_sdk_context?e.__aws_sdk_context.features||(e.__aws_sdk_context.features={}):e.__aws_sdk_context={features:{}},e.__aws_sdk_context.features[t]=i}_e.aws=et;const it=e=>T.isInstance(e)?e.headers?.date??e.headers?.Date:void 0,nt=e=>new Date(Date.now()+e),st=(e,t)=>{const i=Date.parse(e);return((e,t)=>Math.abs(nt(t).getTime()-e)>=3e5)(i,t)?i-Date.now():t},at=(e,t)=>{if(!t)throw new Error(`Property \`${e}\` is not resolved for AWS SDK SigV4Auth`);return t};let ot=class{async sign(e,t,i){if(!I.isInstance(e))throw new Error("The request is not an instance of `HttpRequest` and cannot be signed");const n=await(async e=>{const t=at("context",e.context),i=at("config",e.config),n=t.endpointV2?.properties?.authSchemes?.[0],s=at("signer",i.signer),a=await s(n),o=e?.signingRegion,r=e?.signingRegionSet,c=e?.signingName;return{config:i,signer:a,signingRegion:o,signingRegionSet:r,signingName:c}})(i),{config:s,signer:a}=n;let{signingRegion:o,signingName:r}=n;const c=i.context;if(c?.authSchemes?.length){const[e,t]=c.authSchemes;"sigv4a"===e?.name&&"sigv4"===t?.name&&(o=t?.signingRegion??o,r=t?.signingName??r)}return await a.sign(e,{signingDate:nt(s.systemClockOffset),signingRegion:o,signingService:r})}errorHandler(e){return t=>{const i=t.ServerTime??it(t.$response);if(i){const n=at("config",e.config),s=n.systemClockOffset;n.systemClockOffset=st(i,n.systemClockOffset);n.systemClockOffset!==s&&t.$metadata&&(t.$metadata.clockSkewCorrected=!0)}throw t}}successHandler(e,t){const i=it(e);if(i){const e=at("config",t.config);e.systemClockOffset=st(i,e.systemClockOffset)}}};const rt=(e,t,i)=>{let n,s,a,o=!1;return async t=>(a&&!t?.forceRefresh||(n=await(async()=>{s||(s=e());try{n=await s,a=!0,o=!1}finally{s=void 0}return n})()),n)},ct="X-Amz-Date",lt="X-Amz-Signature",pt="X-Amz-Security-Token",dt="authorization",ut=ct.toLowerCase(),mt=[dt,ut,"date"],ht=lt.toLowerCase(),ft="x-amz-content-sha256",gt=pt.toLowerCase(),yt={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},xt=/^proxy-/,vt=/^sec-/,wt="AWS4-HMAC-SHA256",bt="AWS4-HMAC-SHA256-PAYLOAD",Et="aws4_request",St={},Ct=[],At=(e,t,i)=>`${e}/${t}/${i}/${Et}`,It=(e,t,i)=>{const n=new e(t);return n.update(te(i)),n.digest()},Tt=({headers:e},t,i)=>{const n={};for(const s of Object.keys(e).sort()){if(null==e[s])continue;const a=s.toLowerCase();(a in yt||t?.has(a)||xt.test(a)||vt.test(a))&&(!i||i&&!i.has(a))||(n[a]=e[s].trim().replace(/\s+/g," "))}return n},kt=async({headers:e,body:t},i)=>{for(const t of Object.keys(e))if(t.toLowerCase()===ft)return e[t];if(null==t)return"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855";if("string"==typeof t||ArrayBuffer.isView(t)||(n=t,"function"==typeof ArrayBuffer&&n instanceof ArrayBuffer||"[object ArrayBuffer]"===Object.prototype.toString.call(n))){const e=new i;return e.update(te(t)),fe(await e.digest())}var n;return"UNSIGNED-PAYLOAD"};class Ot{format(e){const t=[];for(const i of Object.keys(e)){const n=ee(i);t.push(Uint8Array.from([n.byteLength]),n,this.formatHeaderValue(e[i]))}const i=new Uint8Array(t.reduce(((e,t)=>e+t.byteLength),0));let n=0;for(const e of t)i.set(e,n),n+=e.byteLength;return i}formatHeaderValue(e){switch(e.type){case"boolean":return Uint8Array.from([e.value?0:1]);case"byte":return Uint8Array.from([2,e.value]);case"short":const t=new DataView(new ArrayBuffer(3));return t.setUint8(0,3),t.setInt16(1,e.value,!1),new Uint8Array(t.buffer);case"integer":const i=new DataView(new ArrayBuffer(5));return i.setUint8(0,4),i.setInt32(1,e.value,!1),new Uint8Array(i.buffer);case"long":const n=new Uint8Array(9);return n[0]=5,n.set(e.value.bytes,1),n;case"binary":const s=new DataView(new ArrayBuffer(3+e.value.byteLength));s.setUint8(0,6),s.setUint16(1,e.value.byteLength,!1);const a=new Uint8Array(s.buffer);return a.set(e.value,3),a;case"string":const o=ee(e.value),r=new DataView(new ArrayBuffer(3+o.byteLength));r.setUint8(0,7),r.setUint16(1,o.byteLength,!1);const c=new Uint8Array(r.buffer);return c.set(o,3),c;case"timestamp":const l=new Uint8Array(9);return l[0]=8,l.set(Rt.fromNumber(e.value.valueOf()).bytes,1),l;case"uuid":if(!_t.test(e.value))throw new Error(`Invalid UUID received: ${e.value}`);const p=new Uint8Array(17);return p[0]=9,p.set(he(e.value.replace(/\-/g,"")),1),p}}}var Pt;!function(e){e[e.boolTrue=0]="boolTrue",e[e.boolFalse=1]="boolFalse",e[e.byte=2]="byte",e[e.short=3]="short",e[e.integer=4]="integer",e[e.long=5]="long",e[e.byteArray=6]="byteArray",e[e.string=7]="string",e[e.timestamp=8]="timestamp",e[e.uuid=9]="uuid"}(Pt||(Pt={}));const _t=/^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$/;let Rt=class e{constructor(e){if(this.bytes=e,8!==e.byteLength)throw new Error("Int64 buffers must be exactly 8 bytes")}static fromNumber(t){if(t>0x8000000000000000||t<-0x8000000000000000)throw new Error(`${t} is too large (or, if negative, too small) to represent as an Int64`);const i=new Uint8Array(8);for(let e=7,n=Math.abs(Math.round(t));e>-1&&n>0;e--,n/=256)i[e]=n;return t<0&&$t(i),new e(i)}valueOf(){const e=this.bytes.slice(0),t=128&e[0];return t&&$t(e),parseInt(fe(e),16)*(t?-1:1)}toString(){return String(this.valueOf())}};function $t(e){for(let t=0;t<8;t++)e[t]^=255;for(let t=7;t>-1&&(e[t]++,0===e[t]);t--);}const Mt=e=>{e=I.clone(e);for(const t of Object.keys(e.headers))mt.indexOf(t.toLowerCase())>-1&&delete e.headers[t];return e},Nt=e=>"number"==typeof e?new Date(1e3*e):"string"==typeof e?Number(e)?new Date(1e3*Number(e)):new Date(e):e;class Dt{constructor({applyChecksum:e,credentials:t,region:i,service:n,sha256:s,uriEscapePath:a=!0}){this.headerFormatter=new Ot,this.service=n,this.sha256=s,this.uriEscapePath=a,this.applyChecksum="boolean"!=typeof e||e,this.regionProvider=D(i),this.credentialProvider=D(t)}async presign(e,t={}){const{signingDate:i=new Date,expiresIn:n=3600,unsignableHeaders:s,unhoistableHeaders:a,signableHeaders:o,hoistableHeaders:r,signingRegion:c,signingService:l}=t,p=await this.credentialProvider();this.validateResolvedCredentials(p);const d=c??await this.regionProvider(),{longDate:u,shortDate:m}=jt(i);if(n>604800)return Promise.reject("Signature version 4 presigned URLs must have an expiration date less than one week in the future");const h=At(m,d,l??this.service),f=((e,t={})=>{const{headers:i,query:n={}}=I.clone(e);for(const e of Object.keys(i)){const s=e.toLowerCase();("x-amz-"===s.slice(0,6)&&!t.unhoistableHeaders?.has(s)||t.hoistableHeaders?.has(s))&&(n[e]=i[e],delete i[e])}return{...e,headers:i,query:n}})(Mt(e),{unhoistableHeaders:a,hoistableHeaders:r});p.sessionToken&&(f.query[pt]=p.sessionToken),f.query["X-Amz-Algorithm"]=wt,f.query["X-Amz-Credential"]=`${p.accessKeyId}/${h}`,f.query[ct]=u,f.query["X-Amz-Expires"]=n.toString(10);const g=Tt(f,s,o);return f.query["X-Amz-SignedHeaders"]=zt(g),f.query[lt]=await this.getSignature(u,h,this.getSigningKey(p,d,m,l),this.createCanonicalRequest(f,g,await kt(e,this.sha256))),f}async sign(e,t){return"string"==typeof e?this.signString(e,t):e.headers&&e.payload?this.signEvent(e,t):e.message?this.signMessage(e,t):this.signRequest(e,t)}async signEvent({headers:e,payload:t},{signingDate:i=new Date,priorSignature:n,signingRegion:s,signingService:a}){const o=s??await this.regionProvider(),{shortDate:r,longDate:c}=jt(i),l=At(r,o,a??this.service),p=await kt({headers:{},body:t},this.sha256),d=new this.sha256;d.update(e);const u=fe(await d.digest()),m=[bt,c,l,n,u,p].join("\n");return this.signString(m,{signingDate:i,signingRegion:o,signingService:a})}async signMessage(e,{signingDate:t=new Date,signingRegion:i,signingService:n}){return this.signEvent({headers:this.headerFormatter.format(e.message.headers),payload:e.message.body},{signingDate:t,signingRegion:i,signingService:n,priorSignature:e.priorSignature}).then((t=>({message:e.message,signature:t})))}async signString(e,{signingDate:t=new Date,signingRegion:i,signingService:n}={}){const s=await this.credentialProvider();this.validateResolvedCredentials(s);const a=i??await this.regionProvider(),{shortDate:o}=jt(t),r=new this.sha256(await this.getSigningKey(s,a,o,n));return r.update(te(e)),fe(await r.digest())}async signRequest(e,{signingDate:t=new Date,signableHeaders:i,unsignableHeaders:n,signingRegion:s,signingService:a}={}){const o=await this.credentialProvider();this.validateResolvedCredentials(o);const r=s??await this.regionProvider(),c=Mt(e),{longDate:l,shortDate:p}=jt(t),d=At(p,r,a??this.service);c.headers[ut]=l,o.sessionToken&&(c.headers[gt]=o.sessionToken);const u=await kt(c,this.sha256);!((e,t)=>{e=e.toLowerCase();for(const i of Object.keys(t))if(e===i.toLowerCase())return!0;return!1})(ft,c.headers)&&this.applyChecksum&&(c.headers[ft]=u);const m=Tt(c,n,i),h=await this.getSignature(l,d,this.getSigningKey(o,r,p,a),this.createCanonicalRequest(c,m,u));return c.headers[dt]=`${wt} Credential=${o.accessKeyId}/${d}, SignedHeaders=${zt(m)}, Signature=${h}`,c}createCanonicalRequest(e,t,i){const n=Object.keys(t).sort();return`${e.method}\n${this.getCanonicalPath(e)}\n${(({query:e={}})=>{const t=[],i={};for(const n of Object.keys(e)){if(n.toLowerCase()===ht)continue;const s=ae(n);t.push(s);const a=e[n];"string"==typeof a?i[s]=`${s}=${ae(a)}`:Array.isArray(a)&&(i[s]=a.slice(0).reduce(((e,t)=>e.concat([`${s}=${ae(t)}`])),[]).sort().join("&"))}return t.sort().map((e=>i[e])).filter((e=>e)).join("&")})(e)}\n${n.map((e=>`${e}:${t[e]}`)).join("\n")}\n\n${n.join(";")}\n${i}`}async createStringToSign(e,t,i){const n=new this.sha256;n.update(te(i));const s=await n.digest();return`${wt}\n${e}\n${t}\n${fe(s)}`}getCanonicalPath({path:e}){if(this.uriEscapePath){const t=[];for(const i of e.split("/"))0!==i?.length&&"."!==i&&(".."===i?t.pop():t.push(i));const i=`${e?.startsWith("/")?"/":""}${t.join("/")}${t.length>0&&e?.endsWith("/")?"/":""}`;return ae(i).replace(/%2F/g,"/")}return e}async getSignature(e,t,i,n){const s=await this.createStringToSign(e,t,n),a=new this.sha256(await i);return a.update(te(s)),fe(await a.digest())}getSigningKey(e,t,i,n){return(async(e,t,i,n,s)=>{const a=`${i}:${n}:${s}:${fe(await It(e,t.secretAccessKey,t.accessKeyId))}:${t.sessionToken}`;if(a in St)return St[a];for(Ct.push(a);Ct.length>50;)delete St[Ct.shift()];let o=`AWS4${t.secretAccessKey}`;for(const t of[i,n,s,Et])o=await It(e,o,t);return St[a]=o})(this.sha256,e,i,t,n||this.service)}validateResolvedCredentials(e){if("object"!=typeof e||"string"!=typeof e.accessKeyId||"string"!=typeof e.secretAccessKey)throw new Error("Resolved credential object is not valid")}}const jt=e=>{const t=(i=e,Nt(i).toISOString().replace(/\.\d{3}Z$/,"Z")).replace(/[\-:]/g,"");var i;return{longDate:t,shortDate:t.slice(0,8)}},zt=e=>Object.keys(e).sort().join(";"),Lt=e=>{let t,i=!1;e.credentials&&(i=!0,t=Ce(e.credentials,be,Se)),t||(t=e.credentialDefaultProvider?W(e.credentialDefaultProvider(Object.assign({},e,{parentClientConfig:e}))):async()=>{throw new Error("`credentials` is missing")});const{signingEscapePath:n=!0,systemClockOffset:s=e.systemClockOffset||0,sha256:a}=e;let o;return o=e.signer?W(e.signer):e.regionInfoProvider?()=>W(e.region)().then((async t=>[await e.regionInfoProvider(t,{useFipsEndpoint:await e.useFipsEndpoint(),useDualstackEndpoint:await e.useDualstackEndpoint()})||{},t])).then((([i,s])=>{const{signingRegion:o,signingService:r}=i;e.signingRegion=e.signingRegion||o||s,e.signingName=e.signingName||r||e.serviceId;const c={...e,credentials:t,region:e.signingRegion,service:e.signingName,sha256:a,uriEscapePath:n};return new(e.signerConstructor||Dt)(c)})):async i=>{const s=(i=Object.assign({},{name:"sigv4",signingName:e.signingName||e.defaultSigningName,signingRegion:await W(e.region)(),properties:{}},i)).signingRegion,o=i.signingName;e.signingRegion=e.signingRegion||s,e.signingName=e.signingName||o||e.serviceId;const r={...e,credentials:t,region:e.signingRegion,service:e.signingName,sha256:a,uriEscapePath:n};return new(e.signerConstructor||Dt)(r)},{...e,systemClockOffset:s,signingEscapePath:n,credentials:i?async()=>t().then((e=>{return i="CREDENTIALS_CODE",n="e",(t=e).$source||(t.$source={}),t.$source[i]=n,t;var t,i,n})):t,signer:o}},Ft=(e,t)=>{const i=[];if(e&&i.push(e),t)for(const e of t)i.push(e);return i},Ut=(e,t)=>`${e||"anonymous"}${t&&t.length>0?` (a.k.a. ${t.join(",")})`:""}`,Bt=()=>{let e=[],t=[],i=!1;const n=new Set,s=i=>(e.forEach((e=>{i.add(e.middleware,{...e})})),t.forEach((e=>{i.addRelativeTo(e.middleware,{...e})})),i.identifyOnResolve?.(r.identifyOnResolve()),i),a=e=>{const t=[];return e.before.forEach((e=>{0===e.before.length&&0===e.after.length?t.push(e):t.push(...a(e))})),t.push(e),e.after.reverse().forEach((e=>{0===e.before.length&&0===e.after.length?t.push(e):t.push(...a(e))})),t},o=(i=!1)=>{const n=[],s=[],o={};e.forEach((e=>{const t={...e,before:[],after:[]};for(const e of Ft(t.name,t.aliases))o[e]=t;n.push(t)})),t.forEach((e=>{const t={...e,before:[],after:[]};for(const e of Ft(t.name,t.aliases))o[e]=t;s.push(t)})),s.forEach((e=>{if(e.toMiddleware){const t=o[e.toMiddleware];if(void 0===t){if(i)return;throw new Error(`${e.toMiddleware} is not found when adding ${Ut(e.name,e.aliases)} middleware ${e.relation} ${e.toMiddleware}`)}"after"===e.relation&&t.after.push(e),"before"===e.relation&&t.before.push(e)}}));const r=(c=n,c.sort(((e,t)=>Ht[t.step]-Ht[e.step]||qt[t.priority||"normal"]-qt[e.priority||"normal"]))).map(a).reduce(((e,t)=>(e.push(...t),e)),[]);var c;return r},r={add:(t,i={})=>{const{name:s,override:a,aliases:o}=i,r={step:"initialize",priority:"normal",middleware:t,...i},c=Ft(s,o);if(c.length>0){if(c.some((e=>n.has(e)))){if(!a)throw new Error(`Duplicate middleware name '${Ut(s,o)}'`);for(const t of c){const i=e.findIndex((e=>e.name===t||e.aliases?.some((e=>e===t))));if(-1===i)continue;const n=e[i];if(n.step!==r.step||r.priority!==n.priority)throw new Error(`"${Ut(n.name,n.aliases)}" middleware with ${n.priority} priority in ${n.step} step cannot be overridden by "${Ut(s,o)}" middleware with ${r.priority} priority in ${r.step} step.`);e.splice(i,1)}}for(const e of c)n.add(e)}e.push(r)},addRelativeTo:(e,i)=>{const{name:s,override:a,aliases:o}=i,r={middleware:e,...i},c=Ft(s,o);if(c.length>0){if(c.some((e=>n.has(e)))){if(!a)throw new Error(`Duplicate middleware name '${Ut(s,o)}'`);for(const e of c){const i=t.findIndex((t=>t.name===e||t.aliases?.some((t=>t===e))));if(-1===i)continue;const n=t[i];if(n.toMiddleware!==r.toMiddleware||n.relation!==r.relation)throw new Error(`"${Ut(n.name,n.aliases)}" middleware ${n.relation} "${n.toMiddleware}" middleware cannot be overridden by "${Ut(s,o)}" middleware ${r.relation} "${r.toMiddleware}" middleware.`);t.splice(i,1)}}for(const e of c)n.add(e)}t.push(r)},clone:()=>s(Bt()),use:e=>{e.applyToStack(r)},remove:i=>"string"==typeof i?(i=>{let s=!1;const a=e=>{const t=Ft(e.name,e.aliases);if(t.includes(i)){s=!0;for(const e of t)n.delete(e);return!1}return!0};return e=e.filter(a),t=t.filter(a),s})(i):(i=>{let s=!1;const a=e=>{if(e.middleware===i){s=!0;for(const t of Ft(e.name,e.aliases))n.delete(t);return!1}return!0};return e=e.filter(a),t=t.filter(a),s})(i),removeByTag:i=>{let s=!1;const a=e=>{const{tags:t,name:a,aliases:o}=e;if(t&&t.includes(i)){const e=Ft(a,o);for(const t of e)n.delete(t);return s=!0,!1}return!0};return e=e.filter(a),t=t.filter(a),s},concat:e=>{const t=s(Bt());return t.use(e),t.identifyOnResolve(i||t.identifyOnResolve()||(e.identifyOnResolve?.()??!1)),t},applyToStack:s,identify:()=>o(!0).map((e=>{const t=e.step??e.relation+" "+e.toMiddleware;return Ut(e.name,e.aliases)+" - "+t})),identifyOnResolve:e=>("boolean"==typeof e&&(i=e),i),resolve:(e,t)=>{for(const i of o().map((e=>e.middleware)).reverse())e=i(e,t);return i&&console.log(r.identify()),e}};return r},Ht={initialize:5,serialize:4,build:3,finalizeRequest:2,deserialize:1},qt={high:3,normal:2,low:1};class Vt{constructor(e){this.config=e,this.middlewareStack=Bt()}send(e,t,i){const n="function"!=typeof t?t:void 0,s="function"==typeof t?t:i;let a;if(void 0===n&&!0===this.config.cacheMiddleware){this.handlers||(this.handlers=new WeakMap);const t=this.handlers;t.has(e.constructor)?a=t.get(e.constructor):(a=e.resolveMiddleware(this.middlewareStack,this.config,n),t.set(e.constructor,a))}else delete this.handlers,a=e.resolveMiddleware(this.middlewareStack,this.config,n);if(!s)return a(e).then((e=>e.output));a(e).then((e=>s(null,e.output)),(e=>s(e))).catch((()=>{}))}destroy(){this.config?.requestHandler?.destroy?.(),delete this.handlers}}class Gt{constructor(){this.middlewareStack=Bt()}static classBuilder(){return new Wt}resolveMiddlewareWithContext(e,t,i,{middlewareFn:n,clientName:s,commandName:a,inputFilterSensitiveLog:o,outputFilterSensitiveLog:r,smithyContext:c,additionalContext:l,CommandCtor:p}){for(const s of n.bind(this)(p,e,t,i))this.middlewareStack.use(s);const d=e.concat(this.middlewareStack),{logger:u}=t,m={logger:u,clientName:s,commandName:a,inputFilterSensitiveLog:o,outputFilterSensitiveLog:r,[S]:{commandInstance:this,...c},...l},{requestHandler:h}=t;return d.resolve((e=>h.handle(e.request,i||{})),m)}}class Wt{constructor(){this._init=()=>{},this._ep={},this._middlewareFn=()=>[],this._commandName="",this._clientName="",this._additionalContext={},this._smithyContext={},this._inputFilterSensitiveLog=e=>e,this._outputFilterSensitiveLog=e=>e,this._serializer=null,this._deserializer=null}init(e){this._init=e}ep(e){return this._ep=e,this}m(e){return this._middlewareFn=e,this}s(e,t,i={}){return this._smithyContext={service:e,operation:t,...i},this}c(e={}){return this._additionalContext=e,this}n(e,t){return this._clientName=e,this._commandName=t,this}f(e=e=>e,t=e=>e){return this._inputFilterSensitiveLog=e,this._outputFilterSensitiveLog=t,this}ser(e){return this._serializer=e,this}de(e){return this._deserializer=e,this}build(){const e=this;let t;return t=class extends Gt{static getEndpointParameterInstructions(){return e._ep}constructor(...[t]){super(),this.serialize=e._serializer,this.deserialize=e._deserializer,this.input=t??{},e._init(this)}resolveMiddleware(i,n,s){return this.resolveMiddlewareWithContext(i,n,s,{CommandCtor:t,middlewareFn:e._middlewareFn,clientName:e._clientName,commandName:e._commandName,inputFilterSensitiveLog:e._inputFilterSensitiveLog,outputFilterSensitiveLog:e._outputFilterSensitiveLog,smithyContext:e._smithyContext,additionalContext:e._additionalContext})}}}}const Kt="***SensitiveInformation***",Qt=e=>{switch(e){case"true":return!0;case"false":return!1;default:throw new Error(`Unable to parse boolean value "${e}"`)}},Xt=e=>{if(null!=e){if("string"==typeof e){const t=parseFloat(e);if(!Number.isNaN(t))return String(t)!==String(e)&&ui.warn(di(`Expected number but observed string: ${e}`)),t}if("number"==typeof e)return e;throw new TypeError(`Expected number, got ${typeof e}: ${e}`)}},Jt=Math.ceil(2**127*(2-2**-23)),Yt=e=>{const t=Xt(e);if(void 0!==t&&!Number.isNaN(t)&&t!==1/0&&t!==-1/0&&Math.abs(t)>Jt)throw new TypeError(`Expected 32-bit float, got ${e}`);return t},Zt=e=>{if(null!=e){if(Number.isInteger(e)&&!Number.isNaN(e))return e;throw new TypeError(`Expected integer, got ${typeof e}: ${e}`)}},ei=e=>ii(e,16),ti=e=>ii(e,8),ii=(e,t)=>{const i=Zt(e);if(void 0!==i&&ni(i,t)!==i)throw new TypeError(`Expected ${t}-bit integer, got ${e}`);return i},ni=(e,t)=>{switch(t){case 32:return Int32Array.of(e)[0];case 16:return Int16Array.of(e)[0];case 8:return Int8Array.of(e)[0]}},si=(e,t)=>{if(null==e)throw new TypeError("Expected a non-null value");return e},ai=e=>{if(null!=e){if("string"==typeof e)return e;if(["boolean","number","bigint"].includes(typeof e))return ui.warn(di(`Expected string, got ${typeof e}: ${e}`)),String(e);throw new TypeError(`Expected string, got ${typeof e}: ${e}`)}},oi=e=>Xt("string"==typeof e?li(e):e),ri=oi,ci=/(-?(?:0|[1-9]\d*)(?:\.\d+)?(?:[eE][+-]?\d+)?)|(-?Infinity)|(NaN)/g,li=e=>{const t=e.match(ci);if(null===t||t[0].length!==e.length)throw new TypeError("Expected real number, got implicit NaN");return parseFloat(e)},pi=e=>Zt("string"==typeof e?li(e):e),di=e=>String(new TypeError(e).stack||e).split("\n").slice(0,5).filter((e=>!e.includes("stackTraceWarning"))).join("\n"),ui={warn:console.warn},mi=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],hi=new RegExp(/^(\d{4})-(\d{2})-(\d{2})[tT](\d{2}):(\d{2}):(\d{2})(?:\.(\d+))?(([-+]\d{2}\:\d{2})|[zZ])$/),fi=e=>{if(null==e)return;if("string"!=typeof e)throw new TypeError("RFC-3339 date-times must be expressed as strings");const t=hi.exec(e);if(!t)throw new TypeError("Invalid RFC-3339 date-time value");const[i,n,s,a,o,r,c,l,p]=t,d=(e=>ei("string"==typeof e?li(e):e))(Si(n)),u=wi(s,"month",1,12),m=wi(a,"day",1,31),h=gi(d,u,m,{hours:o,minutes:r,seconds:c,fractionalMilliseconds:l});return"Z"!=p.toUpperCase()&&h.setTime(h.getTime()-Ei(p)),h},gi=(e,t,i,n)=>{const s=t-1;return xi(e,s,i),new Date(Date.UTC(e,s,i,wi(n.hours,"hour",0,23),wi(n.minutes,"minute",0,59),wi(n.seconds,"seconds",0,60),bi(n.fractionalMilliseconds)))},yi=[31,28,31,30,31,30,31,31,30,31,30,31],xi=(e,t,i)=>{let n=yi[t];if(1===t&&vi(e)&&(n=29),i>n)throw new TypeError(`Invalid day for ${mi[t]} in ${e}: ${i}`)},vi=e=>e%4==0&&(e%100!=0||e%400==0),wi=(e,t,i,n)=>{const s=(e=>ti("string"==typeof e?li(e):e))(Si(e));if(s<i||s>n)throw new TypeError(`${t} must be between ${i} and ${n}, inclusive`);return s},bi=e=>null==e?0:1e3*(e=>Yt("string"==typeof e?li(e):e))("0."+e),Ei=e=>{const t=e[0];let i=1;if("+"==t)i=1;else{if("-"!=t)throw new TypeError(`Offset direction, ${t}, must be "+" or "-"`);i=-1}return i*(60*Number(e.substring(1,3))+Number(e.substring(4,6)))*60*1e3},Si=e=>{let t=0;for(;t<e.length-1&&"0"===e.charAt(t);)t++;return 0===t?e:e.slice(t)};let Ci=class e extends Error{constructor(t){super(t.message),Object.setPrototypeOf(this,e.prototype),this.name=t.name,this.$fault=t.$fault,this.$metadata=t.$metadata}};const Ai=(e,t={})=>{Object.entries(t).filter((([,e])=>void 0!==e)).forEach((([t,i])=>{null!=e[t]&&""!==e[t]||(e[t]=i)}));const i=e.message||e.Message||"UnknownError";return e.message=i,delete e.Message,e},Ii=e=>({output:t,parsedBody:i,errorCode:n})=>{(({output:e,parsedBody:t,exceptionCtor:i,errorCode:n})=>{const s=Ti(e),a=s.httpStatusCode?s.httpStatusCode+"":void 0,o=new i({name:t?.code||t?.Code||n||a||"UnknownError",$fault:"client",$metadata:s});throw Ai(o,t)})({output:t,parsedBody:i,exceptionCtor:e,errorCode:n})},Ti=e=>({httpStatusCode:e.statusCode,requestId:e.headers["x-amzn-requestid"]??e.headers["x-amzn-request-id"]??e.headers["x-amz-request-id"],extendedRequestId:e.headers["x-amz-id-2"],cfId:e.headers["x-amz-cf-id"]}),ki=e=>{switch(e){case"standard":case"cross-region":return{retryMode:"standard",connectionTimeout:3100};case"in-region":return{retryMode:"standard",connectionTimeout:1100};case"mobile":return{retryMode:"standard",connectionTimeout:3e4};default:return{}}},Oi=e=>{const t=[];for(const i in b){const n=b[i];void 0!==e[n]&&t.push({algorithmId:()=>n,checksumConstructor:()=>e[n]})}return{_checksumAlgorithms:t,addChecksumAlgorithm(e){this._checksumAlgorithms.push(e)},checksumAlgorithms(){return this._checksumAlgorithms}}},Pi=e=>{const t={};return e.checksumAlgorithms().forEach((e=>{t[e.algorithmId()]=e.checksumConstructor()})),t},_i=e=>{let t=e.retryStrategy;return{setRetryStrategy(e){t=e},retryStrategy:()=>t}},Ri=e=>{const t={};return t.retryStrategy=e.retryStrategy(),t},$i=e=>({...Oi(e),..._i(e)}),Mi=e=>({...Pi(e),...Ri(e)}),Ni=e=>Array.isArray(e)?e:[e],Di=e=>{const t="#text";for(const i in e)e.hasOwnProperty(i)&&void 0!==e[i][t]?e[i]=e[i][t]:"object"==typeof e[i]&&null!==e[i]&&(e[i]=Di(e[i]));return e},ji=e=>null!=e,zi=function(){const e=Object.getPrototypeOf(this).constructor,t=new(Function.bind.apply(String,[null,...arguments]));return Object.setPrototypeOf(t,e.prototype),t};zi.prototype=Object.create(String.prototype,{constructor:{value:zi,enumerable:!1,writable:!0,configurable:!0}}),Object.setPrototypeOf(zi,String);class Li{trace(){}debug(){}info(){}warn(){}error(){}}function Fi(e,t,i){let n,s,a;if(void 0===t&&void 0===i)n={},a=e;else{if(n=e,"function"==typeof t)return s=t,a=i,Bi(n,s,a);a=t}for(const e of Object.keys(a))Array.isArray(a[e])?Hi(n,null,a,e):n[e]=a[e];return n}const Ui=(e,t)=>{const i={};for(const n in t)Hi(i,e,t,n);return i},Bi=(e,t,i)=>Fi(e,Object.entries(i).reduce(((e,[i,n])=>(Array.isArray(n)?e[i]=n:e[i]="function"==typeof n?[t,n()]:[t,n],e)),{})),Hi=(e,t,i,n)=>{if(null!==t){let s=i[n];"function"==typeof s&&(s=[,s]);const[a=qi,o=Vi,r=n]=s;return void(("function"==typeof a&&a(t[r])||"function"!=typeof a&&a)&&(e[n]=o(t[r])))}let[s,a]=i[n];if("function"==typeof a){let t;const i=void 0===s&&null!=(t=a()),o="function"==typeof s&&!!s(void 0)||"function"!=typeof s&&!!s;i?e[n]=t:o&&(e[n]=a())}else{const t=void 0===s&&null!=a,i="function"==typeof s&&!!s(a)||"function"!=typeof s&&!!s;(t||i)&&(e[n]=a)}},qi=e=>null!=e,Vi=e=>e,Gi=e=>e.toISOString().replace(".000Z","Z"),Wi=e=>{if(null==e)return{};if(Array.isArray(e))return e.filter((e=>null!=e)).map(Wi);if("object"==typeof e){const t={};for(const i of Object.keys(e))null!=e[i]&&(t[i]=Wi(e[i]));return t}return e},Ki=(e,t)=>ge(e,t).then((e=>t.utf8Encoder(e))),Qi=async(e,t)=>{const i=await((e,t)=>Ki(e,t).then((e=>{if(e.length)try{return JSON.parse(e)}catch(t){throw"SyntaxError"===t?.name&&Object.defineProperty(t,"$responseBodyText",{value:e}),t}return{}})))(e,t);return i.message=i.message??i.Message,i};function Xi(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Ji,Yi,Zi={},en={};function tn(){return Ji||(Ji=1,function(e){const t=":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",i="["+t+"]["+(t+"\\-.\\d\\u00B7\\u0300-\\u036F\\u203F-\\u2040")+"]*",n=new RegExp("^"+i+"$");e.isExist=function(e){return void 0!==e},e.isEmptyObject=function(e){return 0===Object.keys(e).length},e.merge=function(e,t,i){if(t){const n=Object.keys(t),s=n.length;for(let a=0;a<s;a++)e[n[a]]="strict"===i?[t[n[a]]]:t[n[a]]}},e.getValue=function(t){return e.isExist(t)?t:""},e.isName=function(e){const t=n.exec(e);return!(null==t)},e.getAllMatches=function(e,t){const i=[];let n=t.exec(e);for(;n;){const s=[];s.startIndex=t.lastIndex-n[0].length;const a=n.length;for(let e=0;e<a;e++)s.push(n[e]);i.push(s),n=t.exec(e)}return i},e.nameRegexp=i}(en)),en}function nn(){if(Yi)return Zi;Yi=1;const e=tn(),t={allowBooleanAttributes:!1,unpairedTags:[]};function i(e){return" "===e||"\t"===e||"\n"===e||"\r"===e}function n(e,t){const i=t;for(;t<e.length;t++)if("?"!=e[t]&&" "!=e[t]);else{const n=e.substr(i,t-i);if(t>5&&"xml"===n)return d("InvalidXml","XML declaration allowed only at the start of the document.",m(e,t));if("?"==e[t]&&">"==e[t+1]){t++;break}}return t}function s(e,t){if(e.length>t+5&&"-"===e[t+1]&&"-"===e[t+2]){for(t+=3;t<e.length;t++)if("-"===e[t]&&"-"===e[t+1]&&">"===e[t+2]){t+=2;break}}else if(e.length>t+8&&"D"===e[t+1]&&"O"===e[t+2]&&"C"===e[t+3]&&"T"===e[t+4]&&"Y"===e[t+5]&&"P"===e[t+6]&&"E"===e[t+7]){let i=1;for(t+=8;t<e.length;t++)if("<"===e[t])i++;else if(">"===e[t]&&(i--,0===i))break}else if(e.length>t+9&&"["===e[t+1]&&"C"===e[t+2]&&"D"===e[t+3]&&"A"===e[t+4]&&"T"===e[t+5]&&"A"===e[t+6]&&"["===e[t+7])for(t+=8;t<e.length;t++)if("]"===e[t]&&"]"===e[t+1]&&">"===e[t+2]){t+=2;break}return t}Zi.validate=function(a,o){o=Object.assign({},t,o);const c=[];let u=!1,h=!1;"\ufeff"===a[0]&&(a=a.substr(1));for(let t=0;t<a.length;t++)if("<"===a[t]&&"?"===a[t+1]){if(t+=2,t=n(a,t),t.err)return t}else{if("<"!==a[t]){if(i(a[t]))continue;return d("InvalidChar","char '"+a[t]+"' is not expected.",m(a,t))}{let g=t;if(t++,"!"===a[t]){t=s(a,t);continue}{let y=!1;"/"===a[t]&&(y=!0,t++);let x="";for(;t<a.length&&">"!==a[t]&&" "!==a[t]&&"\t"!==a[t]&&"\n"!==a[t]&&"\r"!==a[t];t++)x+=a[t];if(x=x.trim(),"/"===x[x.length-1]&&(x=x.substring(0,x.length-1),t--),f=x,!e.isName(f)){let e;return e=0===x.trim().length?"Invalid space after '<'.":"Tag '"+x+"' is an invalid name.",d("InvalidTag",e,m(a,t))}const v=r(a,t);if(!1===v)return d("InvalidAttr","Attributes for '"+x+"' have open quote.",m(a,t));let w=v.value;if(t=v.index,"/"===w[w.length-1]){const e=t-w.length;w=w.substring(0,w.length-1);const i=l(w,o);if(!0!==i)return d(i.err.code,i.err.msg,m(a,e+i.err.line));u=!0}else if(y){if(!v.tagClosed)return d("InvalidTag","Closing tag '"+x+"' doesn't have proper closing.",m(a,t));if(w.trim().length>0)return d("InvalidTag","Closing tag '"+x+"' can't have attributes or invalid starting.",m(a,g));if(0===c.length)return d("InvalidTag","Closing tag '"+x+"' has not been opened.",m(a,g));{const e=c.pop();if(x!==e.tagName){let t=m(a,e.tagStartPos);return d("InvalidTag","Expected closing tag '"+e.tagName+"' (opened in line "+t.line+", col "+t.col+") instead of closing tag '"+x+"'.",m(a,g))}0==c.length&&(h=!0)}}else{const e=l(w,o);if(!0!==e)return d(e.err.code,e.err.msg,m(a,t-w.length+e.err.line));if(!0===h)return d("InvalidXml","Multiple possible root nodes found.",m(a,t));-1!==o.unpairedTags.indexOf(x)||c.push({tagName:x,tagStartPos:g}),u=!0}for(t++;t<a.length;t++)if("<"===a[t]){if("!"===a[t+1]){t++,t=s(a,t);continue}if("?"!==a[t+1])break;if(t=n(a,++t),t.err)return t}else if("&"===a[t]){const e=p(a,t);if(-1==e)return d("InvalidChar","char '&' is not expected.",m(a,t));t=e}else if(!0===h&&!i(a[t]))return d("InvalidXml","Extra text at the end",m(a,t));"<"===a[t]&&t--}}}var f;return u?1==c.length?d("InvalidTag","Unclosed tag '"+c[0].tagName+"'.",m(a,c[0].tagStartPos)):!(c.length>0)||d("InvalidXml","Invalid '"+JSON.stringify(c.map((e=>e.tagName)),null,4).replace(/\r?\n/g,"")+"' found.",{line:1,col:1}):d("InvalidXml","Start tag expected.",1)};const a='"',o="'";function r(e,t){let i="",n="",s=!1;for(;t<e.length;t++){if(e[t]===a||e[t]===o)""===n?n=e[t]:n!==e[t]||(n="");else if(">"===e[t]&&""===n){s=!0;break}i+=e[t]}return""===n&&{value:i,index:t,tagClosed:s}}const c=new RegExp("(\\s*)([^\\s=]+)(\\s*=)?(\\s*(['\"])(([\\s\\S])*?)\\5)?","g");function l(t,i){const n=e.getAllMatches(t,c),s={};for(let e=0;e<n.length;e++){if(0===n[e][1].length)return d("InvalidAttr","Attribute '"+n[e][2]+"' has no space in starting.",h(n[e]));if(void 0!==n[e][3]&&void 0===n[e][4])return d("InvalidAttr","Attribute '"+n[e][2]+"' is without value.",h(n[e]));if(void 0===n[e][3]&&!i.allowBooleanAttributes)return d("InvalidAttr","boolean attribute '"+n[e][2]+"' is not allowed.",h(n[e]));const t=n[e][2];if(!u(t))return d("InvalidAttr","Attribute '"+t+"' is an invalid name.",h(n[e]));if(s.hasOwnProperty(t))return d("InvalidAttr","Attribute '"+t+"' is repeated.",h(n[e]));s[t]=1}return!0}function p(e,t){if(";"===e[++t])return-1;if("#"===e[t])return function(e,t){let i=/\d/;for("x"===e[t]&&(t++,i=/[\da-fA-F]/);t<e.length;t++){if(";"===e[t])return t;if(!e[t].match(i))break}return-1}(e,++t);let i=0;for(;t<e.length;t++,i++)if(!(e[t].match(/\w/)&&i<20)){if(";"===e[t])break;return-1}return t}function d(e,t,i){return{err:{code:e,msg:t,line:i.line||i,col:i.col}}}function u(t){return e.isName(t)}function m(e,t){const i=e.substring(0,t).split(/\r?\n/);return{line:i.length,col:i[i.length-1].length+1}}function h(e){return e.startIndex+e[1].length}return Zi}var sn,an,on,rn,cn,ln,pn,dn,un,mn={};function hn(){if(on)return an;on=1;return an=class{constructor(e){this.tagname=e,this.child=[],this[":@"]={}}add(e,t){"__proto__"===e&&(e="#__proto__"),this.child.push({[e]:t})}addChild(e){"__proto__"===e.tagname&&(e.tagname="#__proto__"),e[":@"]&&Object.keys(e[":@"]).length>0?this.child.push({[e.tagname]:e.child,":@":e[":@"]}):this.child.push({[e.tagname]:e.child})}}}function fn(){if(un)return dn;un=1;const e=tn(),t=hn(),i=function(){if(cn)return rn;cn=1;const e=tn();function t(e,t){let i="";for(;t<e.length&&"'"!==e[t]&&'"'!==e[t];t++)i+=e[t];if(i=i.trim(),-1!==i.indexOf(" "))throw new Error("External entites are not supported");const n=e[t++];let s="";for(;t<e.length&&e[t]!==n;t++)s+=e[t];return[i,s,t]}function i(e,t){return"!"===e[t+1]&&"-"===e[t+2]&&"-"===e[t+3]}function n(e,t){return"!"===e[t+1]&&"E"===e[t+2]&&"N"===e[t+3]&&"T"===e[t+4]&&"I"===e[t+5]&&"T"===e[t+6]&&"Y"===e[t+7]}function s(e,t){return"!"===e[t+1]&&"E"===e[t+2]&&"L"===e[t+3]&&"E"===e[t+4]&&"M"===e[t+5]&&"E"===e[t+6]&&"N"===e[t+7]&&"T"===e[t+8]}function a(e,t){return"!"===e[t+1]&&"A"===e[t+2]&&"T"===e[t+3]&&"T"===e[t+4]&&"L"===e[t+5]&&"I"===e[t+6]&&"S"===e[t+7]&&"T"===e[t+8]}function o(e,t){return"!"===e[t+1]&&"N"===e[t+2]&&"O"===e[t+3]&&"T"===e[t+4]&&"A"===e[t+5]&&"T"===e[t+6]&&"I"===e[t+7]&&"O"===e[t+8]&&"N"===e[t+9]}function r(t){if(e.isName(t))return t;throw new Error(`Invalid entity name ${t}`)}return rn=function(e,c){const l={};if("O"!==e[c+3]||"C"!==e[c+4]||"T"!==e[c+5]||"Y"!==e[c+6]||"P"!==e[c+7]||"E"!==e[c+8])throw new Error("Invalid Tag instead of DOCTYPE");{c+=9;let p=1,d=!1,u=!1,m="";for(;c<e.length;c++)if("<"!==e[c]||u)if(">"===e[c]){if(u?"-"===e[c-1]&&"-"===e[c-2]&&(u=!1,p--):p--,0===p)break}else"["===e[c]?d=!0:m+=e[c];else{if(d&&n(e,c))c+=7,[entityName,val,c]=t(e,c+1),-1===val.indexOf("&")&&(l[r(entityName)]={regx:RegExp(`&${entityName};`,"g"),val:val});else if(d&&s(e,c))c+=8;else if(d&&a(e,c))c+=8;else if(d&&o(e,c))c+=9;else{if(!i)throw new Error("Invalid DOCTYPE");u=!0}p++,m=""}if(0!==p)throw new Error("Unclosed DOCTYPE")}return{entities:l,i:c}},rn}(),n=function(){if(pn)return ln;pn=1;const e=/^[-+]?0x[a-fA-F0-9]+$/,t=/^([\-\+])?(0*)(\.[0-9]+([eE]\-?[0-9]+)?|[0-9]+(\.[0-9]+([eE]\-?[0-9]+)?)?)$/;!Number.parseInt&&window.parseInt&&(Number.parseInt=window.parseInt),!Number.parseFloat&&window.parseFloat&&(Number.parseFloat=window.parseFloat);const i={hex:!0,leadingZeros:!0,decimalPoint:".",eNotation:!0};return ln=function(n,s={}){if(s=Object.assign({},i,s),!n||"string"!=typeof n)return n;let a=n.trim();if(void 0!==s.skipLike&&s.skipLike.test(a))return n;if(s.hex&&e.test(a))return Number.parseInt(a,16);{const e=t.exec(a);if(e){const t=e[1],i=e[2];let r=(o=e[3])&&-1!==o.indexOf(".")?("."===(o=o.replace(/0+$/,""))?o="0":"."===o[0]?o="0"+o:"."===o[o.length-1]&&(o=o.substr(0,o.length-1)),o):o;const c=e[4]||e[6];if(!s.leadingZeros&&i.length>0&&t&&"."!==a[2])return n;if(!s.leadingZeros&&i.length>0&&!t&&"."!==a[1])return n;{const e=Number(a),o=""+e;return-1!==o.search(/[eE]/)||c?s.eNotation?e:n:-1!==a.indexOf(".")?"0"===o&&""===r||o===r||t&&o==="-"+r?e:n:i?r===o||t+r===o?e:n:a===o||a===t+o?e:n}}return n}var o},ln}();function s(e){const t=Object.keys(e);for(let i=0;i<t.length;i++){const n=t[i];this.lastEntities[n]={regex:new RegExp("&"+n+";","g"),val:e[n]}}}function a(e,t,i,n,s,a,o){if(void 0!==e&&(this.options.trimValues&&!n&&(e=e.trim()),e.length>0)){o||(e=this.replaceEntitiesValue(e));const n=this.options.tagValueProcessor(t,e,i,s,a);if(null==n)return e;if(typeof n!=typeof e||n!==e)return n;if(this.options.trimValues)return y(e,this.options.parseTagValue,this.options.numberParseOptions);return e.trim()===e?y(e,this.options.parseTagValue,this.options.numberParseOptions):e}}function o(e){if(this.options.removeNSPrefix){const t=e.split(":"),i="/"===e.charAt(0)?"/":"";if("xmlns"===t[0])return"";2===t.length&&(e=i+t[1])}return e}const r=new RegExp("([^\\s=]+)\\s*(=\\s*(['\"])([\\s\\S]*?)\\3)?","gm");function c(t,i,n){if(!this.options.ignoreAttributes&&"string"==typeof t){const n=e.getAllMatches(t,r),s=n.length,a={};for(let e=0;e<s;e++){const t=this.resolveNameSpace(n[e][1]);let s=n[e][4],o=this.options.attributeNamePrefix+t;if(t.length)if(this.options.transformAttributeName&&(o=this.options.transformAttributeName(o)),"__proto__"===o&&(o="#__proto__"),void 0!==s){this.options.trimValues&&(s=s.trim()),s=this.replaceEntitiesValue(s);const e=this.options.attributeValueProcessor(t,s,i);a[o]=null==e?s:typeof e!=typeof s||e!==s?e:y(s,this.options.parseAttributeValue,this.options.numberParseOptions)}else this.options.allowBooleanAttributes&&(a[o]=!0)}if(!Object.keys(a).length)return;if(this.options.attributesGroupName){const e={};return e[this.options.attributesGroupName]=a,e}return a}}const l=function(e){e=e.replace(/\r\n?/g,"\n");const n=new t("!xml");let s=n,a="",o="";for(let r=0;r<e.length;r++){if("<"===e[r])if("/"===e[r+1]){const t=h(e,">",r,"Closing Tag is not closed.");let i=e.substring(r+2,t).trim();if(this.options.removeNSPrefix){const e=i.indexOf(":");-1!==e&&(i=i.substr(e+1))}this.options.transformTagName&&(i=this.options.transformTagName(i)),s&&(a=this.saveTextToParentTag(a,s,o));const n=o.substring(o.lastIndexOf(".")+1);if(i&&-1!==this.options.unpairedTags.indexOf(i))throw new Error(`Unpaired tag can not be used as closing tag: </${i}>`);let c=0;n&&-1!==this.options.unpairedTags.indexOf(n)?(c=o.lastIndexOf(".",o.lastIndexOf(".")-1),this.tagsNodeStack.pop()):c=o.lastIndexOf("."),o=o.substring(0,c),s=this.tagsNodeStack.pop(),a="",r=t}else if("?"===e[r+1]){let i=f(e,r,!1,"?>");if(!i)throw new Error("Pi Tag is not closed.");if(a=this.saveTextToParentTag(a,s,o),this.options.ignoreDeclaration&&"?xml"===i.tagName||this.options.ignorePiTags);else{const e=new t(i.tagName);e.add(this.options.textNodeName,""),i.tagName!==i.tagExp&&i.attrExpPresent&&(e[":@"]=this.buildAttributesMap(i.tagExp,o,i.tagName)),this.addChild(s,e,o)}r=i.closeIndex+1}else if("!--"===e.substr(r+1,3)){const t=h(e,"--\x3e",r+4,"Comment is not closed.");if(this.options.commentPropName){const i=e.substring(r+4,t-2);a=this.saveTextToParentTag(a,s,o),s.add(this.options.commentPropName,[{[this.options.textNodeName]:i}])}r=t}else if("!D"===e.substr(r+1,2)){const t=i(e,r);this.docTypeEntities=t.entities,r=t.i}else if("!["===e.substr(r+1,2)){const t=h(e,"]]>",r,"CDATA is not closed.")-2,i=e.substring(r+9,t);a=this.saveTextToParentTag(a,s,o);let n=this.parseTextData(i,s.tagname,o,!0,!1,!0,!0);null==n&&(n=""),this.options.cdataPropName?s.add(this.options.cdataPropName,[{[this.options.textNodeName]:i}]):s.add(this.options.textNodeName,n),r=t+2}else{let i=f(e,r,this.options.removeNSPrefix),c=i.tagName;const l=i.rawTagName;let p=i.tagExp,d=i.attrExpPresent,u=i.closeIndex;this.options.transformTagName&&(c=this.options.transformTagName(c)),s&&a&&"!xml"!==s.tagname&&(a=this.saveTextToParentTag(a,s,o,!1));const m=s;if(m&&-1!==this.options.unpairedTags.indexOf(m.tagname)&&(s=this.tagsNodeStack.pop(),o=o.substring(0,o.lastIndexOf("."))),c!==n.tagname&&(o+=o?"."+c:c),this.isItStopNode(this.options.stopNodes,o,c)){let n="";if(p.length>0&&p.lastIndexOf("/")===p.length-1)"/"===c[c.length-1]?(c=c.substr(0,c.length-1),o=o.substr(0,o.length-1),p=c):p=p.substr(0,p.length-1),r=i.closeIndex;else if(-1!==this.options.unpairedTags.indexOf(c))r=i.closeIndex;else{const t=this.readStopNodeData(e,l,u+1);if(!t)throw new Error(`Unexpected end of ${l}`);r=t.i,n=t.tagContent}const a=new t(c);c!==p&&d&&(a[":@"]=this.buildAttributesMap(p,o,c)),n&&(n=this.parseTextData(n,c,o,!0,d,!0,!0)),o=o.substr(0,o.lastIndexOf(".")),a.add(this.options.textNodeName,n),this.addChild(s,a,o)}else{if(p.length>0&&p.lastIndexOf("/")===p.length-1){"/"===c[c.length-1]?(c=c.substr(0,c.length-1),o=o.substr(0,o.length-1),p=c):p=p.substr(0,p.length-1),this.options.transformTagName&&(c=this.options.transformTagName(c));const e=new t(c);c!==p&&d&&(e[":@"]=this.buildAttributesMap(p,o,c)),this.addChild(s,e,o),o=o.substr(0,o.lastIndexOf("."))}else{const e=new t(c);this.tagsNodeStack.push(s),c!==p&&d&&(e[":@"]=this.buildAttributesMap(p,o,c)),this.addChild(s,e,o),s=e}a="",r=u}}else a+=e[r]}return n.child};function p(e,t,i){const n=this.options.updateTag(t.tagname,i,t[":@"]);!1===n||("string"==typeof n?(t.tagname=n,e.addChild(t)):e.addChild(t))}const d=function(e){if(this.options.processEntities){for(let t in this.docTypeEntities){const i=this.docTypeEntities[t];e=e.replace(i.regx,i.val)}for(let t in this.lastEntities){const i=this.lastEntities[t];e=e.replace(i.regex,i.val)}if(this.options.htmlEntities)for(let t in this.htmlEntities){const i=this.htmlEntities[t];e=e.replace(i.regex,i.val)}e=e.replace(this.ampEntity.regex,this.ampEntity.val)}return e};function u(e,t,i,n){return e&&(void 0===n&&(n=0===Object.keys(t.child).length),void 0!==(e=this.parseTextData(e,t.tagname,i,!1,!!t[":@"]&&0!==Object.keys(t[":@"]).length,n))&&""!==e&&t.add(this.options.textNodeName,e),e=""),e}function m(e,t,i){const n="*."+i;for(const i in e){const s=e[i];if(n===s||t===s)return!0}return!1}function h(e,t,i,n){const s=e.indexOf(t,i);if(-1===s)throw new Error(n);return s+t.length-1}function f(e,t,i,n=">"){const s=function(e,t,i=">"){let n,s="";for(let a=t;a<e.length;a++){let t=e[a];if(n)t===n&&(n="");else if('"'===t||"'"===t)n=t;else if(t===i[0]){if(!i[1])return{data:s,index:a};if(e[a+1]===i[1])return{data:s,index:a}}else"\t"===t&&(t=" ");s+=t}}(e,t+1,n);if(!s)return;let a=s.data;const o=s.index,r=a.search(/\s/);let c=a,l=!0;-1!==r&&(c=a.substring(0,r),a=a.substring(r+1).trimStart());const p=c;if(i){const e=c.indexOf(":");-1!==e&&(c=c.substr(e+1),l=c!==s.data.substr(e+1))}return{tagName:c,tagExp:a,closeIndex:o,attrExpPresent:l,rawTagName:p}}function g(e,t,i){const n=i;let s=1;for(;i<e.length;i++)if("<"===e[i])if("/"===e[i+1]){const a=h(e,">",i,`${t} is not closed`);if(e.substring(i+2,a).trim()===t&&(s--,0===s))return{tagContent:e.substring(n,i),i:a};i=a}else if("?"===e[i+1]){i=h(e,"?>",i+1,"StopNode is not closed.")}else if("!--"===e.substr(i+1,3)){i=h(e,"--\x3e",i+3,"StopNode is not closed.")}else if("!["===e.substr(i+1,2)){i=h(e,"]]>",i,"StopNode is not closed.")-2}else{const n=f(e,i,">");if(n){(n&&n.tagName)===t&&"/"!==n.tagExp[n.tagExp.length-1]&&s++,i=n.closeIndex}}}function y(t,i,s){if(i&&"string"==typeof t){const e=t.trim();return"true"===e||"false"!==e&&n(t,s)}return e.isExist(t)?t:""}return dn=class{constructor(e){this.options=e,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:"¢"},pound:{regex:/&(pound|#163);/g,val:"£"},yen:{regex:/&(yen|#165);/g,val:"¥"},euro:{regex:/&(euro|#8364);/g,val:"€"},copyright:{regex:/&(copy|#169);/g,val:"©"},reg:{regex:/&(reg|#174);/g,val:"®"},inr:{regex:/&(inr|#8377);/g,val:"₹"},num_dec:{regex:/&#([0-9]{1,7});/g,val:(e,t)=>String.fromCharCode(Number.parseInt(t,10))},num_hex:{regex:/&#x([0-9a-fA-F]{1,6});/g,val:(e,t)=>String.fromCharCode(Number.parseInt(t,16))}},this.addExternalEntities=s,this.parseXml=l,this.parseTextData=a,this.resolveNameSpace=o,this.buildAttributesMap=c,this.isItStopNode=m,this.replaceEntitiesValue=d,this.readStopNodeData=g,this.saveTextToParentTag=u,this.addChild=p}}}var gn,yn,xn,vn,wn,bn,En,Sn,Cn,An={};function In(){if(gn)return An;function e(s,a,o){let r;const c={};for(let l=0;l<s.length;l++){const p=s[l],d=t(p);let u="";if(u=void 0===o?d:o+"."+d,d===a.textNodeName)void 0===r?r=p[d]:r+=""+p[d];else{if(void 0===d)continue;if(p[d]){let t=e(p[d],a,u);const s=n(t,a);p[":@"]?i(t,p[":@"],u,a):1!==Object.keys(t).length||void 0===t[a.textNodeName]||a.alwaysCreateTextNode?0===Object.keys(t).length&&(a.alwaysCreateTextNode?t[a.textNodeName]="":t=""):t=t[a.textNodeName],void 0!==c[d]&&c.hasOwnProperty(d)?(Array.isArray(c[d])||(c[d]=[c[d]]),c[d].push(t)):a.isArray(d,u,s)?c[d]=[t]:c[d]=t}}}return"string"==typeof r?r.length>0&&(c[a.textNodeName]=r):void 0!==r&&(c[a.textNodeName]=r),c}function t(e){const t=Object.keys(e);for(let e=0;e<t.length;e++){const i=t[e];if(":@"!==i)return i}}function i(e,t,i,n){if(t){const s=Object.keys(t),a=s.length;for(let o=0;o<a;o++){const a=s[o];n.isArray(a,i+"."+a,!0,!0)?e[a]=[t[a]]:e[a]=t[a]}}}function n(e,t){const{textNodeName:i}=t,n=Object.keys(e).length;return 0===n||!(1!==n||!e[i]&&"boolean"!=typeof e[i]&&0!==e[i])}return gn=1,An.prettify=function(t,i){return e(t,i)},An}function Tn(){if(xn)return yn;xn=1;const{buildOptions:e}=function(){if(sn)return mn;sn=1;const e={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(e,t){return t},attributeValueProcessor:function(e,t){return t},stopNodes:[],alwaysCreateTextNode:!1,isArray:()=>!1,commentPropName:!1,unpairedTags:[],processEntities:!0,htmlEntities:!1,ignoreDeclaration:!1,ignorePiTags:!1,transformTagName:!1,transformAttributeName:!1,updateTag:function(e,t,i){return e}};return mn.buildOptions=function(t){return Object.assign({},e,t)},mn.defaultOptions=e,mn}(),t=fn(),{prettify:i}=In(),n=nn();return yn=class{constructor(t){this.externalEntities={},this.options=e(t)}parse(e,s){if("string"==typeof e);else{if(!e.toString)throw new Error("XML data is accepted in String or Bytes[] form.");e=e.toString()}if(s){!0===s&&(s={});const t=n.validate(e,s);if(!0!==t)throw Error(`${t.err.msg}:${t.err.line}:${t.err.col}`)}const a=new t(this.options);a.addExternalEntities(this.externalEntities);const o=a.parseXml(e);return this.options.preserveOrder||void 0===o?o:i(o,this.options)}addEntity(e,t){if(-1!==t.indexOf("&"))throw new Error("Entity value can't have '&'");if(-1!==e.indexOf("&")||-1!==e.indexOf(";"))throw new Error("An entity must be set without '&' and ';'. Eg. use '#xD' for '
'");if("&"===t)throw new Error("An entity with value '&' is not permitted");this.externalEntities[e]=t}}}function kn(){if(wn)return vn;wn=1;function e(a,o,r,c){let l="",p=!1;for(let d=0;d<a.length;d++){const u=a[d],m=t(u);if(void 0===m)continue;let h="";if(h=0===r.length?m:`${r}.${m}`,m===o.textNodeName){let e=u[m];n(h,o)||(e=o.tagValueProcessor(m,e),e=s(e,o)),p&&(l+=c),l+=e,p=!1;continue}if(m===o.cdataPropName){p&&(l+=c),l+=`<![CDATA[${u[m][0][o.textNodeName]}]]>`,p=!1;continue}if(m===o.commentPropName){l+=c+`\x3c!--${u[m][0][o.textNodeName]}--\x3e`,p=!0;continue}if("?"===m[0]){const e=i(u[":@"],o),t="?xml"===m?"":c;let n=u[m][0][o.textNodeName];n=0!==n.length?" "+n:"",l+=t+`<${m}${n}${e}?>`,p=!0;continue}let f=c;""!==f&&(f+=o.indentBy);const g=c+`<${m}${i(u[":@"],o)}`,y=e(u[m],o,h,f);-1!==o.unpairedTags.indexOf(m)?o.suppressUnpairedNode?l+=g+">":l+=g+"/>":y&&0!==y.length||!o.suppressEmptyNode?y&&y.endsWith(">")?l+=g+`>${y}${c}</${m}>`:(l+=g+">",y&&""!==c&&(y.includes("/>")||y.includes("</"))?l+=c+o.indentBy+y+c:l+=y,l+=`</${m}>`):l+=g+"/>",p=!0}return l}function t(e){const t=Object.keys(e);for(let i=0;i<t.length;i++){const n=t[i];if(e.hasOwnProperty(n)&&":@"!==n)return n}}function i(e,t){let i="";if(e&&!t.ignoreAttributes)for(let n in e){if(!e.hasOwnProperty(n))continue;let a=t.attributeValueProcessor(n,e[n]);a=s(a,t),!0===a&&t.suppressBooleanAttributes?i+=` ${n.substr(t.attributeNamePrefix.length)}`:i+=` ${n.substr(t.attributeNamePrefix.length)}="${a}"`}return i}function n(e,t){let i=(e=e.substr(0,e.length-t.textNodeName.length-1)).substr(e.lastIndexOf(".")+1);for(let n in t.stopNodes)if(t.stopNodes[n]===e||t.stopNodes[n]==="*."+i)return!0;return!1}function s(e,t){if(e&&e.length>0&&t.processEntities)for(let i=0;i<t.entities.length;i++){const n=t.entities[i];e=e.replace(n.regex,n.val)}return e}return vn=function(t,i){let n="";return i.format&&i.indentBy.length>0&&(n="\n"),e(t,i,"",n)}}var On=function(){if(Cn)return Sn;Cn=1;const e=nn(),t=Tn(),i=function(){if(En)return bn;En=1;const e=kn(),t={attributeNamePrefix:"@_",attributesGroupName:!1,textNodeName:"#text",ignoreAttributes:!0,cdataPropName:!1,format:!1,indentBy:" ",suppressEmptyNode:!1,suppressUnpairedNode:!0,suppressBooleanAttributes:!0,tagValueProcessor:function(e,t){return t},attributeValueProcessor:function(e,t){return t},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 i(e){this.options=Object.assign({},t,e),this.options.ignoreAttributes||this.options.attributesGroupName?this.isAttribute=function(){return!1}:(this.attrPrefixLen=this.options.attributeNamePrefix.length,this.isAttribute=a),this.processTextOrObjNode=n,this.options.format?(this.indentate=s,this.tagEndChar=">\n",this.newLine="\n"):(this.indentate=function(){return""},this.tagEndChar=">",this.newLine="")}function n(e,t,i){const n=this.j2x(e,i+1);return void 0!==e[this.options.textNodeName]&&1===Object.keys(e).length?this.buildTextValNode(e[this.options.textNodeName],t,n.attrStr,i):this.buildObjectNode(n.val,t,n.attrStr,i)}function s(e){return this.options.indentBy.repeat(e)}function a(e){return!(!e.startsWith(this.options.attributeNamePrefix)||e===this.options.textNodeName)&&e.substr(this.attrPrefixLen)}return i.prototype.build=function(t){return this.options.preserveOrder?e(t,this.options):(Array.isArray(t)&&this.options.arrayNodeName&&this.options.arrayNodeName.length>1&&(t={[this.options.arrayNodeName]:t}),this.j2x(t,0).val)},i.prototype.j2x=function(e,t){let i="",n="";for(let s in e)if(Object.prototype.hasOwnProperty.call(e,s))if(void 0===e[s])this.isAttribute(s)&&(n+="");else if(null===e[s])this.isAttribute(s)?n+="":"?"===s[0]?n+=this.indentate(t)+"<"+s+"?"+this.tagEndChar:n+=this.indentate(t)+"<"+s+"/"+this.tagEndChar;else if(e[s]instanceof Date)n+=this.buildTextValNode(e[s],s,"",t);else if("object"!=typeof e[s]){const a=this.isAttribute(s);if(a)i+=this.buildAttrPairStr(a,""+e[s]);else if(s===this.options.textNodeName){let t=this.options.tagValueProcessor(s,""+e[s]);n+=this.replaceEntitiesValue(t)}else n+=this.buildTextValNode(e[s],s,"",t)}else if(Array.isArray(e[s])){const i=e[s].length;let a="",o="";for(let r=0;r<i;r++){const i=e[s][r];if(void 0===i);else if(null===i)"?"===s[0]?n+=this.indentate(t)+"<"+s+"?"+this.tagEndChar:n+=this.indentate(t)+"<"+s+"/"+this.tagEndChar;else if("object"==typeof i)if(this.options.oneListGroup){const e=this.j2x(i,t+1);a+=e.val,this.options.attributesGroupName&&i.hasOwnProperty(this.options.attributesGroupName)&&(o+=e.attrStr)}else a+=this.processTextOrObjNode(i,s,t);else if(this.options.oneListGroup){let e=this.options.tagValueProcessor(s,i);e=this.replaceEntitiesValue(e),a+=e}else a+=this.buildTextValNode(i,s,"",t)}this.options.oneListGroup&&(a=this.buildObjectNode(a,s,o,t)),n+=a}else if(this.options.attributesGroupName&&s===this.options.attributesGroupName){const t=Object.keys(e[s]),n=t.length;for(let a=0;a<n;a++)i+=this.buildAttrPairStr(t[a],""+e[s][t[a]])}else n+=this.processTextOrObjNode(e[s],s,t);return{attrStr:i,val:n}},i.prototype.buildAttrPairStr=function(e,t){return t=this.options.attributeValueProcessor(e,""+t),t=this.replaceEntitiesValue(t),this.options.suppressBooleanAttributes&&"true"===t?" "+e:" "+e+'="'+t+'"'},i.prototype.buildObjectNode=function(e,t,i,n){if(""===e)return"?"===t[0]?this.indentate(n)+"<"+t+i+"?"+this.tagEndChar:this.indentate(n)+"<"+t+i+this.closeTag(t)+this.tagEndChar;{let s="</"+t+this.tagEndChar,a="";return"?"===t[0]&&(a="?",s=""),!i&&""!==i||-1!==e.indexOf("<")?!1!==this.options.commentPropName&&t===this.options.commentPropName&&0===a.length?this.indentate(n)+`\x3c!--${e}--\x3e`+this.newLine:this.indentate(n)+"<"+t+i+a+this.tagEndChar+e+this.indentate(n)+s:this.indentate(n)+"<"+t+i+a+">"+e+s}},i.prototype.closeTag=function(e){let t="";return-1!==this.options.unpairedTags.indexOf(e)?this.options.suppressUnpairedNode||(t="/"):t=this.options.suppressEmptyNode?"/":`></${e}`,t},i.prototype.buildTextValNode=function(e,t,i,n){if(!1!==this.options.cdataPropName&&t===this.options.cdataPropName)return this.indentate(n)+`<![CDATA[${e}]]>`+this.newLine;if(!1!==this.options.commentPropName&&t===this.options.commentPropName)return this.indentate(n)+`\x3c!--${e}--\x3e`+this.newLine;if("?"===t[0])return this.indentate(n)+"<"+t+i+"?"+this.tagEndChar;{let s=this.options.tagValueProcessor(t,e);return s=this.replaceEntitiesValue(s),""===s?this.indentate(n)+"<"+t+i+this.closeTag(t)+this.tagEndChar:this.indentate(n)+"<"+t+i+">"+s+"</"+t+this.tagEndChar}},i.prototype.replaceEntitiesValue=function(e){if(e&&e.length>0&&this.options.processEntities)for(let t=0;t<this.options.entities.length;t++){const i=this.options.entities[t];e=e.replace(i.regex,i.val)}return e},bn=i}();return Sn={XMLParser:t,XMLValidator:e,XMLBuilder:i}}();const Pn=(e,t)=>Ki(e,t).then((e=>{if(e.length){const t=new On.XMLParser({attributeNamePrefix:"",htmlEntities:!0,ignoreAttributes:!1,ignoreDeclaration:!0,parseTagValue:!1,trimValues:!1,tagValueProcessor:(e,t)=>""===t.trim()&&t.includes("\n")?"":void 0});let i;t.addEntity("#xD","\r"),t.addEntity("#10","\n");try{i=t.parse(e,!0)}catch(t){throw t&&"object"==typeof t&&Object.defineProperty(t,"$responseBodyText",{value:e}),t}const n="#text",s=Object.keys(i)[0],a=i[s];return a[n]&&(a[s]=a[n],delete a[n]),Di(a)}return{}})),_n=async(e,t)=>{const i=await Pn(e,t);return i.Error&&(i.Error.message=i.Error.message??i.Error.Message),i},Rn=/\d{12}\.ddb/;const $n="user-agent",Mn="x-amz-user-agent",Nn=/[^\!\$\%\&\'\*\+\-\.\^\_\`\|\~\d\w]/g,Dn=/[^\!\$\%\&\'\*\+\-\.\^\_\`\|\~\d\w\#]/g;const jn=e=>(t,i)=>async n=>{const{request:s}=n;if(!I.isInstance(s))return t(n);const{headers:a}=s,o=i?.userAgent?.map(zn)||[],r=(await e.defaultUserAgentProvider()).map(zn);await async function(e,t,i){const n=i.request;if("rpc-v2-cbor"===n?.headers?.["smithy-protocol"]&&tt(e,"PROTOCOL_RPC_V2_CBOR","M"),"function"==typeof t.retryStrategy){const i=await t.retryStrategy();"function"==typeof i.acquireInitialRetryToken?i.constructor?.name?.includes("Adaptive")?tt(e,"RETRY_MODE_ADAPTIVE","F"):tt(e,"RETRY_MODE_STANDARD","E"):tt(e,"RETRY_MODE_LEGACY","D")}if("function"==typeof t.accountIdEndpointMode){const i=e.endpointV2;switch(String(i?.url?.hostname).match(Rn)&&tt(e,"ACCOUNT_ID_ENDPOINT","O"),await(t.accountIdEndpointMode?.())){case"disabled":tt(e,"ACCOUNT_ID_MODE_DISABLED","Q");break;case"preferred":tt(e,"ACCOUNT_ID_MODE_PREFERRED","P");break;case"required":tt(e,"ACCOUNT_ID_MODE_REQUIRED","R")}}const s=e.__smithy_context?.selectedHttpAuthScheme?.identity;if(s?.$source){const t=s;t.accountId&&tt(e,"RESOLVED_ACCOUNT_ID","T");for(const[i,n]of Object.entries(t.$source??{}))tt(e,i,n)}}(i,e,n);const c=i;r.push(`m/${function(e){let t="";for(const i in e){const n=e[i];if(!(t.length+n.length+1<=1024))break;t.length?t+=","+n:t+=n}return t}(Object.assign({},i.__smithy_context?.features,c.__aws_sdk_context?.features))}`);const l=e?.customUserAgent?.map(zn)||[],p=await e.userAgentAppId();p&&r.push(zn([`app/${p}`]));const d=[].concat([...r,...o,...l]).join(" "),u=[...r.filter((e=>e.startsWith("aws-sdk-"))),...l].join(" ");return"browser"!==e.runtime?(u&&(a[Mn]=a[Mn]?`${a[$n]} ${u}`:u),a[$n]=d):a[Mn]=d,t({...n,request:s})},zn=e=>{const t=e[0].split("/").map((e=>e.replace(Nn,"-"))).join("/"),i=e[1]?.replace(Dn,"-"),n=t.indexOf("/"),s=t.substring(0,n);let a=t.substring(n+1);return"api"===s&&(a=a.toLowerCase()),[s,a,i].filter((e=>e&&e.length>0)).reduce(((e,t,i)=>{switch(i){case 0:return t;case 1:return`${e}/${t}`;default:return`${e}#${t}`}}),"")},Ln={name:"getUserAgentMiddleware",step:"build",priority:"low",tags:["SET_USER_AGENT","USER_AGENT"],override:!0},Fn=e=>({applyToStack:t=>{t.add(jn(e),Ln)}});var Un;!function(e){e.ENV="env",e.CONFIG="shared config entry"}(Un||(Un={}));const Bn=!1,Hn=!1,qn=e=>"string"==typeof e&&(e.startsWith("fips-")||e.endsWith("-fips")),Vn=e=>qn(e)?["fips-aws-global","aws-fips"].includes(e)?"us-east-1":e.replace(/fips-(dkr-|prod-)?|-fips/,""):e,Gn=e=>{const{region:t,useFipsEndpoint:i}=e;if(!t)throw new Error("Region is missing");return{...e,region:async()=>{if("string"==typeof t)return Vn(t);const e=await t();return Vn(e)},useFipsEndpoint:async()=>{const e="string"==typeof t?t:await t();return!!qn(e)||("function"!=typeof i?Promise.resolve(!!i):i())}}},Wn="content-length";const Kn={step:"build",tags:["SET_CONTENT_LENGTH","CONTENT_LENGTH"],name:"contentLengthMiddleware",override:!0},Qn=e=>({applyToStack:t=>{var i;t.add((i=e.bodyLengthChecker,e=>async t=>{const n=t.request;if(I.isInstance(n)){const{body:e,headers:t}=n;if(e&&-1===Object.keys(t).map((e=>e.toLowerCase())).indexOf(Wn))try{const t=i(e);n.headers={...n.headers,[Wn]:String(t)}}catch(e){}}return e({...t,request:n})}),Kn)}}),Xn=/^[a-z0-9][a-z0-9\.\-]{1,61}[a-z0-9]$/,Jn=/(\d+\.){3}\d+/,Yn=/\.\./,Zn=e=>Xn.test(e)&&!Jn.test(e)&&!Yn.test(e),es=e=>{const[t,i,n,,,s]=e.split(":"),a="arn"===t&&e.split(":").length>=6,o=Boolean(a&&i&&n&&s);if(a&&!o)throw new Error(`Invalid ARN: ${e} was an invalid ARN.`);return o},ts=(e,t,i)=>{const n=async()=>{const n=i[e]??i[t];return"function"==typeof n?n():n};return"credentialScope"===e||"CredentialScope"===t?async()=>{const e="function"==typeof i.credentials?await i.credentials():i.credentials;return e?.credentialScope??e?.CredentialScope}:"accountId"===e||"AccountId"===t?async()=>{const e="function"==typeof i.credentials?await i.credentials():i.credentials;return e?.accountId??e?.AccountId}:"endpoint"===e||"endpoint"===t?async()=>{const e=await n();if(e&&"object"==typeof e){if("url"in e)return e.url.href;if("hostname"in e){const{protocol:t,hostname:i,port:n,path:s}=e;return`${t}//${i}${n?":"+n:""}${s}`}}return e}:n},is=async e=>{};const ns=e=>{if("string"==typeof e)return ns(new URL(e));const{hostname:t,pathname:i,port:n,protocol:s,search:a}=e;let o;return a&&(o=function(e){const t={};if(e=e.replace(/^\?/,""))for(const i of e.split("&")){let[e,n=null]=i.split("=");e=decodeURIComponent(e),n&&(n=decodeURIComponent(n)),e in t?Array.isArray(t[e])?t[e].push(n):t[e]=[t[e],n]:t[e]=n}return t}(a)),{hostname:t,port:n?parseInt(n):void 0,protocol:s,path:i,query:o}},ss=e=>"object"==typeof e?"url"in e?ns(e.url):e:ns(e),as=async(e,t,i)=>{const n={},s=t?.getEndpointParameterInstructions?.()||{};for(const[t,a]of Object.entries(s))switch(a.type){case"staticContextParams":n[t]=a.value;break;case"contextParams":n[t]=e[a.name];break;case"clientContextParams":case"builtInParams":n[t]=await ts(a.name,t,i)();break;default:throw new Error("Unrecognized endpoint parameter instruction: "+JSON.stringify(a))}return 0===Object.keys(s).length&&Object.assign(n,i),"s3"===String(i.serviceId).toLowerCase()&&await(async e=>{const t=e?.Bucket||"";if("string"==typeof e.Bucket&&(e.Bucket=t.replace(/#/g,encodeURIComponent("#")).replace(/\?/g,encodeURIComponent("?"))),es(t)){if(!0===e.ForcePathStyle)throw new Error("Path-style addressing cannot be used with ARN buckets")}else(!Zn(t)||-1!==t.indexOf(".")&&!String(e.Endpoint).startsWith("http:")||t.toLowerCase()!==t||t.length<3)&&(e.ForcePathStyle=!0);return e.DisableMultiRegionAccessPoints&&(e.disableMultiRegionAccessPoints=!0,e.DisableMRAP=!0),e})(n),n},os=({config:e,instructions:t})=>(i,n)=>async s=>{e.endpoint&&function(e,t,i){e.__smithy_context?e.__smithy_context.features||(e.__smithy_context.features={}):e.__smithy_context={features:{}},e.__smithy_context.features[t]=i}(n,"ENDPOINT_OVERRIDE","N");const a=await(async(e,t,i,n)=>{if(!i.endpoint){let e;e=i.serviceConfiguredEndpoint?await i.serviceConfiguredEndpoint():await is(i.serviceId),e&&(i.endpoint=()=>Promise.resolve(ss(e)))}const s=await as(e,t,i);if("function"!=typeof i.endpointProvider)throw new Error("config.endpointProvider is not set.");return i.endpointProvider(s,n)})(s.input,{getEndpointParameterInstructions:()=>t},{...e},n);n.endpointV2=a,n.authSchemes=a.properties?.authSchemes;const o=n.authSchemes?.[0];if(o){n.signing_region=o.signingRegion,n.signing_service=o.signingName;const e=N(n),t=e?.selectedHttpAuthScheme?.httpAuthOption;t&&(t.signingProperties=Object.assign(t.signingProperties||{},{signing_region:o.signingRegion,signingRegion:o.signingRegion,signing_service:o.signingName,signingName:o.signingName,signingRegionSet:o.signingRegionSet},o.properties))}return i({...s})},rs={step:"serialize",tags:["ENDPOINT_PARAMETERS","ENDPOINT_V2","ENDPOINT"],name:"endpointV2Middleware",override:!0,relation:"before",toMiddleware:U.name},cs=(e,t)=>({applyToStack:i=>{i.addRelativeTo(os({config:e,instructions:t}),rs)}}),ls=e=>{const t=e.tls??!0,{endpoint:i}=e,n=null!=i?async()=>ss(await D(i)()):void 0,s=!!i,a={...e,endpoint:n,tls:t,isCustomEndpoint:s,useDualstackEndpoint:D(e.useDualstackEndpoint??!1),useFipsEndpoint:D(e.useFipsEndpoint??!1)};let o;return a.serviceConfiguredEndpoint=async()=>(e.serviceId&&!o&&(o=is(e.serviceId)),o),a};var ps;!function(e){e.STANDARD="standard",e.ADAPTIVE="adaptive"}(ps||(ps={}));const ds=ps.STANDARD,us=["BandwidthLimitExceeded","EC2ThrottledException","LimitExceededException","PriorRequestNotComplete","ProvisionedThroughputExceededException","RequestLimitExceeded","RequestThrottled","RequestThrottledException","SlowDown","ThrottledException","Throttling","ThrottlingException","TooManyRequestsException","TransactionInProgressException"],ms=["TimeoutError","RequestTimeout","RequestTimeoutException"],hs=[500,502,503,504],fs=["ECONNRESET","ECONNREFUSED","EPIPE","ETIMEDOUT"],gs=e=>429===e.$metadata?.httpStatusCode||us.includes(e.name)||1==e.$retryable?.throttling,ys=e=>(e=>e.$metadata?.clockSkewCorrected)(e)||ms.includes(e.name)||fs.includes(e?.code||"")||hs.includes(e.$metadata?.httpStatusCode||0);class xs{constructor(e){this.currentCapacity=0,this.enabled=!1,this.lastMaxRate=0,this.measuredTxRate=0,this.requestCount=0,this.lastTimestamp=0,this.timeWindow=0,this.beta=e?.beta??.7,this.minCapacity=e?.minCapacity??1,this.minFillRate=e?.minFillRate??.5,this.scaleConstant=e?.scaleConstant??.4,this.smooth=e?.smooth??.8;const t=this.getCurrentTimeInSeconds();this.lastThrottleTime=t,this.lastTxRateBucket=Math.floor(this.getCurrentTimeInSeconds()),this.fillRate=this.minFillRate,this.maxCapacity=this.minCapacity}getCurrentTimeInSeconds(){return Date.now()/1e3}async getSendToken(){return this.acquireTokenBucket(1)}async acquireTokenBucket(e){if(this.enabled){if(this.refillTokenBucket(),e>this.currentCapacity){const t=(e-this.currentCapacity)/this.fillRate*1e3;await new Promise((e=>setTimeout(e,t)))}this.currentCapacity=this.currentCapacity-e}}refillTokenBucket(){const e=this.getCurrentTimeInSeconds();if(!this.lastTimestamp)return void(this.lastTimestamp=e);const t=(e-this.lastTimestamp)*this.fillRate;this.currentCapacity=Math.min(this.maxCapacity,this.currentCapacity+t),this.lastTimestamp=e}updateClientSendingRate(e){let t;if(this.updateMeasuredRate(),gs(e)){const e=this.enabled?Math.min(this.measuredTxRate,this.fillRate):this.measuredTxRate;this.lastMaxRate=e,this.calculateTimeWindow(),this.lastThrottleTime=this.getCurrentTimeInSeconds(),t=this.cubicThrottle(e),this.enableTokenBucket()}else this.calculateTimeWindow(),t=this.cubicSuccess(this.getCurrentTimeInSeconds());const i=Math.min(t,2*this.measuredTxRate);this.updateTokenBucketRate(i)}calculateTimeWindow(){this.timeWindow=this.getPrecise(Math.pow(this.lastMaxRate*(1-this.beta)/this.scaleConstant,1/3))}cubicThrottle(e){return this.getPrecise(e*this.beta)}cubicSuccess(e){return this.getPrecise(this.scaleConstant*Math.pow(e-this.lastThrottleTime-this.timeWindow,3)+this.lastMaxRate)}enableTokenBucket(){this.enabled=!0}updateTokenBucketRate(e){this.refillTokenBucket(),this.fillRate=Math.max(e,this.minFillRate),this.maxCapacity=Math.max(e,this.minCapacity),this.currentCapacity=Math.min(this.currentCapacity,this.maxCapacity)}updateMeasuredRate(){const e=this.getCurrentTimeInSeconds(),t=Math.floor(2*e)/2;if(this.requestCount++,t>this.lastTxRateBucket){const e=this.requestCount/(t-this.lastTxRateBucket);this.measuredTxRate=this.getPrecise(e*this.smooth+this.measuredTxRate*(1-this.smooth)),this.requestCount=0,this.lastTxRateBucket=t}}getPrecise(e){return parseFloat(e.toFixed(8))}}const vs=({retryDelay:e,retryCount:t,retryCost:i})=>({getRetryCount:()=>t,getRetryDelay:()=>Math.min(2e4,e),getRetryCost:()=>i});class ws{constructor(e){this.maxAttempts=e,this.mode=ps.STANDARD,this.capacity=500,this.retryBackoffStrategy=(()=>{let e=100;return{computeNextBackoffDelay:t=>Math.floor(Math.min(2e4,Math.random()*2**t*e)),setDelayBase:t=>{e=t}}})(),this.maxAttemptsProvider="function"==typeof e?e:async()=>e}async acquireInitialRetryToken(e){return vs({retryDelay:100,retryCount:0})}async refreshRetryTokenForRetry(e,t){const i=await this.getMaxAttempts();if(this.shouldRetry(e,t,i)){const i=t.errorType;this.retryBackoffStrategy.setDelayBase("THROTTLING"===i?500:100);const n=this.retryBackoffStrategy.computeNextBackoffDelay(e.getRetryCount()),s=t.retryAfterHint?Math.max(t.retryAfterHint.getTime()-Date.now()||0,n):n,a=this.getCapacityCost(i);return this.capacity-=a,vs({retryDelay:s,retryCount:e.getRetryCount()+1,retryCost:a})}throw new Error("No retry token available")}recordSuccess(e){this.capacity=Math.max(500,this.capacity+(e.getRetryCost()??1))}getCapacity(){return this.capacity}async getMaxAttempts(){try{return await this.maxAttemptsProvider()}catch(e){return console.warn("Max attempts provider could not resolve. Using default of 3"),3}}shouldRetry(e,t,i){return e.getRetryCount()+1<i&&this.capacity>=this.getCapacityCost(t.errorType)&&this.isRetryableError(t.errorType)}getCapacityCost(e){return"TRANSIENT"===e?10:5}isRetryableError(e){return"THROTTLING"===e||"TRANSIENT"===e}}class bs{constructor(e,t){this.maxAttemptsProvider=e,this.mode=ps.ADAPTIVE;const{rateLimiter:i}=t??{};this.rateLimiter=i??new xs,this.standardRetryStrategy=new ws(e)}async acquireInitialRetryToken(e){return await this.rateLimiter.getSendToken(),this.standardRetryStrategy.acquireInitialRetryToken(e)}async refreshRetryTokenForRetry(e,t){return this.rateLimiter.updateClientSendingRate(t),this.standardRetryStrategy.refreshRetryTokenForRetry(e,t)}recordSuccess(e){this.rateLimiter.updateClientSendingRate({}),this.standardRetryStrategy.recordSuccess(e)}}let Es;const Ss=new Uint8Array(16);function Cs(){if(!Es&&(Es="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!Es))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Es(Ss)}const As=[];for(let e=0;e<256;++e)As.push((e+256).toString(16).slice(1));var Is={randomUUID:"undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};function Ts(e,t,i){if(Is.randomUUID&&!t&&!e)return Is.randomUUID();const n=(e=e||{}).random||(e.rng||Cs)();return n[6]=15&n[6]|64,n[8]=63&n[8]|128,function(e,t=0){return As[e[t+0]]+As[e[t+1]]+As[e[t+2]]+As[e[t+3]]+"-"+As[e[t+4]]+As[e[t+5]]+"-"+As[e[t+6]]+As[e[t+7]]+"-"+As[e[t+8]]+As[e[t+9]]+"-"+As[e[t+10]]+As[e[t+11]]+As[e[t+12]]+As[e[t+13]]+As[e[t+14]]+As[e[t+15]]}(n)}const ks=e=>{const{retryStrategy:t}=e,i=D(e.maxAttempts??3);return{...e,maxAttempts:i,retryStrategy:async()=>{if(t)return t;return await D(e.retryMode)()===ps.ADAPTIVE?new bs(i):new ws(i)}}},Os=e=>e?.body instanceof ReadableStream,Ps=e=>void 0!==e.acquireInitialRetryToken&&void 0!==e.refreshRetryTokenForRetry&&void 0!==e.recordSuccess,_s=e=>{const t={error:e,errorType:Rs(e)},i=Ns(e.$response);return i&&(t.retryAfterHint=i),t},Rs=e=>gs(e)?"THROTTLING":ys(e)?"TRANSIENT":(e=>{if(void 0!==e.$metadata?.httpStatusCode){const t=e.$metadata.httpStatusCode;return 500<=t&&t<=599&&!ys(e)}return!1})(e)?"SERVER_ERROR":"CLIENT_ERROR",$s={name:"retryMiddleware",tags:["RETRY"],step:"finalizeRequest",priority:"high",override:!0},Ms=e=>({applyToStack:t=>{t.add((e=>(t,i)=>async n=>{let s=await e.retryStrategy();const a=await e.maxAttempts();if(!Ps(s))return s?.mode&&(i.userAgent=[...i.userAgent||[],["cfg/retry-mode",s.mode]]),s.retry(t,n);{let e=await s.acquireInitialRetryToken(i.partition_id),r=new Error,c=0,l=0;const{request:p}=n,d=I.isInstance(p);for(d&&(p.headers["amz-sdk-invocation-id"]=Ts());;)try{d&&(p.headers["amz-sdk-request"]=`attempt=${c+1}; max=${a}`);const{response:i,output:o}=await t(n);return s.recordSuccess(e),o.$metadata.attempts=c+1,o.$metadata.totalRetryDelay=l,{response:i,output:o}}catch(t){const n=_s(t);if(r=(o=t)instanceof Error?o:o instanceof Object?Object.assign(new Error,o):"string"==typeof o?new Error(o):new Error(`AWS SDK error wrapper for ${o}`),d&&Os(p))throw(i.logger instanceof Li?console:i.logger)?.warn("An error was encountered in a non-retryable streaming request."),r;try{e=await s.refreshRetryTokenForRetry(e,n)}catch(e){throw r.$metadata||(r.$metadata={}),r.$metadata.attempts=c+1,r.$metadata.totalRetryDelay=l,r}c=e.getRetryCount();const a=e.getRetryDelay();l+=a,await new Promise((e=>setTimeout(e,a)))}}var o})(e),$s)}}),Ns=e=>{if(!T.isInstance(e))return;const t=Object.keys(e.headers).find((e=>"retry-after"===e.toLowerCase()));if(!t)return;const i=e.headers[t],n=Number(i);if(!Number.isNaN(n))return new Date(1e3*n);return new Date(i)},Ds=async(e,t,i)=>({operation:N(t).operation,region:await D(e.region)()||(()=>{throw new Error("expected `region` to be configured for `aws.auth#sigv4`")})()});const js=e=>{const t=[];return e.operation,t.push(function(e){return{schemeId:"aws.auth#sigv4",signingProperties:{name:"lambda",region:e.region},propertiesExtractor:(e,t)=>({signingProperties:{config:e,context:t}})}}(e)),t},zs={UseFIPS:{type:"builtInParams",name:"useFipsEndpoint"},Endpoint:{type:"builtInParams",name:"endpoint"},Region:{type:"builtInParams",name:"region"},UseDualStack:{type:"builtInParams",name:"useDualstackEndpoint"}};var Ls="3.688.0";var Fs="undefined"!=typeof Buffer&&Buffer.from?function(e){return Buffer.from(e,"utf8")}:e=>(new TextEncoder).encode(e);function Us(e){return e instanceof Uint8Array?e:"string"==typeof e?Fs(e):ArrayBuffer.isView(e)?new Uint8Array(e.buffer,e.byteOffset,e.byteLength/Uint8Array.BYTES_PER_ELEMENT):new Uint8Array(e)}function Bs(e){return"string"==typeof e?0===e.length:0===e.byteLength}var Hs={name:"SHA-256"},qs={name:"HMAC",hash:Hs},Vs=new Uint8Array([227,176,196,66,152,252,28,20,154,251,244,200,153,111,185,36,39,174,65,228,100,155,147,76,164,149,153,27,120,82,184,85]);const Gs={};function Ws(){return"undefined"!=typeof window?window:"undefined"!=typeof self?self:Gs}var Ks=function(){function e(e){this.toHash=new Uint8Array(0),this.secret=e,this.reset()}return e.prototype.update=function(e){if(!Bs(e)){var t=Us(e),i=new Uint8Array(this.toHash.byteLength+t.byteLength);i.set(this.toHash,0),i.set(t,this.toHash.byteLength),this.toHash=i}},e.prototype.digest=function(){var e=this;return this.key?this.key.then((function(t){return Ws().crypto.subtle.sign(qs,t,e.toHash).then((function(e){return new Uint8Array(e)}))})):Bs(this.toHash)?Promise.resolve(Vs):Promise.resolve().then((function(){return Ws().crypto.subtle.digest(Hs,e.toHash)})).then((function(e){return Promise.resolve(new Uint8Array(e))}))},e.prototype.reset=function(){var e=this;this.toHash=new Uint8Array(0),this.secret&&void 0!==this.secret&&(this.key=new Promise((function(t,i){Ws().crypto.subtle.importKey("raw",Us(e.secret),qs,!1,["sign"]).then(t,i)})),this.key.catch((function(){})))},e}();function Qs(e,t,i,n){return new(i||(i=Promise))((function(s,a){function o(e){try{c(n.next(e))}catch(e){a(e)}}function r(e){try{c(n.throw(e))}catch(e){a(e)}}function c(e){var t;e.done?s(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(o,r)}c((n=n.apply(e,t||[])).next())}))}function Xs(e,t){var i,n,s,a={label:0,sent:function(){if(1&s[0])throw s[1];return s[1]},trys:[],ops:[]},o=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return o.next=r(0),o.throw=r(1),o.return=r(2),"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function r(r){return function(c){return function(r){if(i)throw new TypeError("Generator is already executing.");for(;o&&(o=0,r[0]&&(a=0)),a;)try{if(i=1,n&&(s=2&r[0]?n.return:r[0]?n.throw||((s=n.return)&&s.call(n),0):n.next)&&!(s=s.call(n,r[1])).done)return s;switch(n=0,s&&(r=[2&r[0],s.value]),r[0]){case 0:case 1:s=r;break;case 4:return a.label++,{value:r[1],done:!1};case 5:a.label++,n=r[1],r=[0];continue;case 7:r=a.ops.pop(),a.trys.pop();continue;default:if(!(s=a.trys,(s=s.length>0&&s[s.length-1])||6!==r[0]&&2!==r[0])){a=0;continue}if(3===r[0]&&(!s||r[1]>s[0]&&r[1]<s[3])){a.label=r[1];break}if(6===r[0]&&a.label<s[1]){a.label=s[1],s=r;break}if(s&&a.label<s[2]){a.label=s[2],a.ops.push(r);break}s[2]&&a.ops.pop(),a.trys.pop();continue}r=t.call(e,a)}catch(e){r=[6,e],n=0}finally{i=s=0}if(5&r[0])throw r[1];return{value:r[0]?r[1]:void 0,done:!0}}([r,c])}}}"function"==typeof SuppressedError&&SuppressedError;var Js=64,Ys=new Uint32Array([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]),Zs=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],ea=Math.pow(2,53)-1,ta=function(){function e(){this.state=Int32Array.from(Zs),this.temp=new Int32Array(64),this.buffer=new Uint8Array(64),this.bufferLength=0,this.bytesHashed=0,this.finished=!1}return e.prototype.update=function(e){if(this.finished)throw new Error("Attempted to update an already finished hash.");var t=0,i=e.byteLength;if(this.bytesHashed+=i,8*this.bytesHashed>ea)throw new Error("Cannot hash more than 2^53 - 1 bits");for(;i>0;)this.buffer[this.bufferLength++]=e[t++],i--,this.bufferLength===Js&&(this.hashBuffer(),this.bufferLength=0)},e.prototype.digest=function(){if(!this.finished){var e=8*this.bytesHashed,t=new DataView(this.buffer.buffer,this.buffer.byteOffset,this.buffer.byteLength),i=this.bufferLength;if(t.setUint8(this.bufferLength++,128),i%Js>=56){for(var n=this.bufferLength;n<Js;n++)t.setUint8(n,0);this.hashBuffer(),this.bufferLength=0}for(n=this.bufferLength;n<56;n++)t.setUint8(n,0);t.setUint32(56,Math.floor(e/4294967296),!0),t.setUint32(60,e),this.hashBuffer(),this.finished=!0}var s=new Uint8Array(32);for(n=0;n<8;n++)s[4*n]=this.state[n]>>>24&255,s[4*n+1]=this.state[n]>>>16&255,s[4*n+2]=this.state[n]>>>8&255,s[4*n+3]=this.state[n]>>>0&255;return s},e.prototype.hashBuffer=function(){for(var e=this.buffer,t=this.state,i=t[0],n=t[1],s=t[2],a=t[3],o=t[4],r=t[5],c=t[6],l=t[7],p=0;p<Js;p++){if(p<16)this.temp[p]=(255&e[4*p])<<24|(255&e[4*p+1])<<16|(255&e[4*p+2])<<8|255&e[4*p+3];else{var d=this.temp[p-2],u=(d>>>17|d<<15)^(d>>>19|d<<13)^d>>>10,m=((d=this.temp[p-15])>>>7|d<<25)^(d>>>18|d<<14)^d>>>3;this.temp[p]=(u+this.temp[p-7]|0)+(m+this.temp[p-16]|0)}var h=(((o>>>6|o<<26)^(o>>>11|o<<21)^(o>>>25|o<<7))+(o&r^~o&c)|0)+(l+(Ys[p]+this.temp[p]|0)|0)|0,f=((i>>>2|i<<30)^(i>>>13|i<<19)^(i>>>22|i<<10))+(i&n^i&s^n&s)|0;l=c,c=r,r=o,o=a+h|0,a=s,s=n,n=i,i=h+f|0}t[0]+=i,t[1]+=n,t[2]+=s,t[3]+=a,t[4]+=o,t[5]+=r,t[6]+=c,t[7]+=l},e}(),ia=function(){function e(e){this.secret=e,this.hash=new ta,this.reset()}return e.prototype.update=function(e){if(!Bs(e)&&!this.error)try{this.hash.update(Us(e))}catch(e){this.error=e}},e.prototype.digestSync=function(){if(this.error)throw this.error;return this.outer?(this.outer.finished||this.outer.update(this.hash.digest()),this.outer.digest()):this.hash.digest()},e.prototype.digest=function(){return Qs(this,void 0,void 0,(function(){return Xs(this,(function(e){return[2,this.digestSync()]}))}))},e.prototype.reset=function(){if(this.hash=new ta,this.secret){this.outer=new ta;var e=function(e){var t=Us(e);if(t.byteLength>Js){var i=new ta;i.update(t),t=i.digest()}var n=new Uint8Array(Js);return n.set(t),n}(this.secret),t=new Uint8Array(Js);t.set(e);for(var i=0;i<Js;i++)e[i]^=54,t[i]^=92;this.hash.update(e),this.outer.update(t);for(i=0;i<e.byteLength;i++)e[i]=0}},e}();var na=["decrypt","digest","encrypt","exportKey","generateKey","importKey","sign","verify"];function sa(e){return!(!function(e){if("object"==typeof e&&"object"==typeof e.crypto){return"function"==typeof e.crypto.getRandomValues}return!1}(e)||"object"!=typeof e.crypto.subtle)&&function(e){return e&&na.every((function(t){return"function"==typeof e[t]}))}(e.crypto.subtle)}var aa,oa=function(){function e(e){sa(Ws())?this.hash=new Ks(e):this.hash=new ia(e)}return e.prototype.update=function(e,t){this.hash.update(Us(e))},e.prototype.digest=function(){return this.hash.digest()},e.prototype.reset=function(){this.hash.reset()},e}(),ra={exports:{}};var ca=(aa||(aa=1,function(e){e.exports=function(e){var t={};function i(n){if(t[n])return t[n].exports;var s=t[n]={i:n,l:!1,exports:{}};return e[n].call(s.exports,s,s.exports,i),s.l=!0,s.exports}return i.m=e,i.c=t,i.d=function(e,t,n){i.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},i.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},i.t=function(e,t){if(1&t&&(e=i(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(i.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var s in e)i.d(n,s,function(t){return e[t]}.bind(null,s));return n},i.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return i.d(t,"a",t),t},i.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},i.p="",i(i.s=90)}({17:function(e,t,i){t.__esModule=!0,t.default=void 0;var n=i(18),s=function(){function e(){}return e.getFirstMatch=function(e,t){var i=t.match(e);return i&&i.length>0&&i[1]||""},e.getSecondMatch=function(e,t){var i=t.match(e);return i&&i.length>1&&i[2]||""},e.matchAndReturnConst=function(e,t,i){if(e.test(t))return i},e.getWindowsVersionName=function(e){switch(e){case"NT":return"NT";case"XP":case"NT 5.1":return"XP";case"NT 5.0":return"2000";case"NT 5.2":return"2003";case"NT 6.0":return"Vista";case"NT 6.1":return"7";case"NT 6.2":return"8";case"NT 6.3":return"8.1";case"NT 10.0":return"10";default:return}},e.getMacOSVersionName=function(e){var t=e.split(".").splice(0,2).map((function(e){return parseInt(e,10)||0}));if(t.push(0),10===t[0])switch(t[1]){case 5:return"Leopard";case 6:return"Snow Leopard";case 7:return"Lion";case 8:return"Mountain Lion";case 9:return"Mavericks";case 10:return"Yosemite";case 11:return"El Capitan";case 12:return"Sierra";case 13:return"High Sierra";case 14:return"Mojave";case 15:return"Catalina";default:return}},e.getAndroidVersionName=function(e){var t=e.split(".").splice(0,2).map((function(e){return parseInt(e,10)||0}));if(t.push(0),!(1===t[0]&&t[1]<5))return 1===t[0]&&t[1]<6?"Cupcake":1===t[0]&&t[1]>=6?"Donut":2===t[0]&&t[1]<2?"Eclair":2===t[0]&&2===t[1]?"Froyo":2===t[0]&&t[1]>2?"Gingerbread":3===t[0]?"Honeycomb":4===t[0]&&t[1]<1?"Ice Cream Sandwich":4===t[0]&&t[1]<4?"Jelly Bean":4===t[0]&&t[1]>=4?"KitKat":5===t[0]?"Lollipop":6===t[0]?"Marshmallow":7===t[0]?"Nougat":8===t[0]?"Oreo":9===t[0]?"Pie":void 0},e.getVersionPrecision=function(e){return e.split(".").length},e.compareVersions=function(t,i,n){void 0===n&&(n=!1);var s=e.getVersionPrecision(t),a=e.getVersionPrecision(i),o=Math.max(s,a),r=0,c=e.map([t,i],(function(t){var i=o-e.getVersionPrecision(t),n=t+new Array(i+1).join(".0");return e.map(n.split("."),(function(e){return new Array(20-e.length).join("0")+e})).reverse()}));for(n&&(r=o-Math.min(s,a)),o-=1;o>=r;){if(c[0][o]>c[1][o])return 1;if(c[0][o]===c[1][o]){if(o===r)return 0;o-=1}else if(c[0][o]<c[1][o])return-1}},e.map=function(e,t){var i,n=[];if(Array.prototype.map)return Array.prototype.map.call(e,t);for(i=0;i<e.length;i+=1)n.push(t(e[i]));return n},e.find=function(e,t){var i,n;if(Array.prototype.find)return Array.prototype.find.call(e,t);for(i=0,n=e.length;i<n;i+=1){var s=e[i];if(t(s,i))return s}},e.assign=function(e){for(var t,i,n=e,s=arguments.length,a=new Array(s>1?s-1:0),o=1;o<s;o++)a[o-1]=arguments[o];if(Object.assign)return Object.assign.apply(Object,[e].concat(a));var r=function(){var e=a[t];"object"==typeof e&&null!==e&&Object.keys(e).forEach((function(t){n[t]=e[t]}))};for(t=0,i=a.length;t<i;t+=1)r();return e},e.getBrowserAlias=function(e){return n.BROWSER_ALIASES_MAP[e]},e.getBrowserTypeByAlias=function(e){return n.BROWSER_MAP[e]||""},e}();t.default=s,e.exports=t.default},18:function(e,t,i){t.__esModule=!0,t.ENGINE_MAP=t.OS_MAP=t.PLATFORMS_MAP=t.BROWSER_MAP=t.BROWSER_ALIASES_MAP=void 0,t.BROWSER_ALIASES_MAP={"Amazon Silk":"amazon_silk","Android Browser":"android",Bada:"bada",BlackBerry:"blackberry",Chrome:"chrome",Chromium:"chromium",Electron:"electron",Epiphany:"epiphany",Firefox:"firefox",Focus:"focus",Generic:"generic","Google Search":"google_search",Googlebot:"googlebot","Internet Explorer":"ie","K-Meleon":"k_meleon",Maxthon:"maxthon","Microsoft Edge":"edge","MZ Browser":"mz","NAVER Whale Browser":"naver",Opera:"opera","Opera Coast":"opera_coast",PhantomJS:"phantomjs",Puffin:"puffin",QupZilla:"qupzilla",QQ:"qq",QQLite:"qqlite",Safari:"safari",Sailfish:"sailfish","Samsung Internet for Android":"samsung_internet",SeaMonkey:"seamonkey",Sleipnir:"sleipnir",Swing:"swing",Tizen:"tizen","UC Browser":"uc",Vivaldi:"vivaldi","WebOS Browser":"webos",WeChat:"wechat","Yandex Browser":"yandex",Roku:"roku"},t.BROWSER_MAP={amazon_silk:"Amazon Silk",android:"Android Browser",bada:"Bada",blackberry:"BlackBerry",chrome:"Chrome",chromium:"Chromium",electron:"Electron",epiphany:"Epiphany",firefox:"Firefox",focus:"Focus",generic:"Generic",googlebot:"Googlebot",google_search:"Google Search",ie:"Internet Explorer",k_meleon:"K-Meleon",maxthon:"Maxthon",edge:"Microsoft Edge",mz:"MZ Browser",naver:"NAVER Whale Browser",opera:"Opera",opera_coast:"Opera Coast",phantomjs:"PhantomJS",puffin:"Puffin",qupzilla:"QupZilla",qq:"QQ Browser",qqlite:"QQ Browser Lite",safari:"Safari",sailfish:"Sailfish",samsung_internet:"Samsung Internet for Android",seamonkey:"SeaMonkey",sleipnir:"Sleipnir",swing:"Swing",tizen:"Tizen",uc:"UC Browser",vivaldi:"Vivaldi",webos:"WebOS Browser",wechat:"WeChat",yandex:"Yandex Browser"},t.PLATFORMS_MAP={tablet:"tablet",mobile:"mobile",desktop:"desktop",tv:"tv"},t.OS_MAP={WindowsPhone:"Windows Phone",Windows:"Windows",MacOS:"macOS",iOS:"iOS",Android:"Android",WebOS:"WebOS",BlackBerry:"BlackBerry",Bada:"Bada",Tizen:"Tizen",Linux:"Linux",ChromeOS:"Chrome OS",PlayStation4:"PlayStation 4",Roku:"Roku"},t.ENGINE_MAP={EdgeHTML:"EdgeHTML",Blink:"Blink",Trident:"Trident",Presto:"Presto",Gecko:"Gecko",WebKit:"WebKit"}},90:function(e,t,i){t.__esModule=!0,t.default=void 0;var n,s=(n=i(91))&&n.__esModule?n:{default:n},a=i(18);function o(e,t){for(var i=0;i<t.length;i++){var n=t[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}var r=function(){function e(){}var t,i,n;return e.getParser=function(e,t){if(void 0===t&&(t=!1),"string"!=typeof e)throw new Error("UserAgent should be a string");return new s.default(e,t)},e.parse=function(e){return new s.default(e).getResult()},t=e,n=[{key:"BROWSER_MAP",get:function(){return a.BROWSER_MAP}},{key:"ENGINE_MAP",get:function(){return a.ENGINE_MAP}},{key:"OS_MAP",get:function(){return a.OS_MAP}},{key:"PLATFORMS_MAP",get:function(){return a.PLATFORMS_MAP}}],(i=null)&&o(t.prototype,i),n&&o(t,n),e}();t.default=r,e.exports=t.default},91:function(e,t,i){t.__esModule=!0,t.default=void 0;var n=c(i(92)),s=c(i(93)),a=c(i(94)),o=c(i(95)),r=c(i(17));function c(e){return e&&e.__esModule?e:{default:e}}var l=function(){function e(e,t){if(void 0===t&&(t=!1),null==e||""===e)throw new Error("UserAgent parameter can't be empty");this._ua=e,this.parsedResult={},!0!==t&&this.parse()}var t=e.prototype;return t.getUA=function(){return this._ua},t.test=function(e){return e.test(this._ua)},t.parseBrowser=function(){var e=this;this.parsedResult.browser={};var t=r.default.find(n.default,(function(t){if("function"==typeof t.test)return t.test(e);if(t.test instanceof Array)return t.test.some((function(t){return e.test(t)}));throw new Error("Browser's test function is not valid")}));return t&&(this.parsedResult.browser=t.describe(this.getUA())),this.parsedResult.browser},t.getBrowser=function(){return this.parsedResult.browser?this.parsedResult.browser:this.parseBrowser()},t.getBrowserName=function(e){return e?String(this.getBrowser().name).toLowerCase()||"":this.getBrowser().name||""},t.getBrowserVersion=function(){return this.getBrowser().version},t.getOS=function(){return this.parsedResult.os?this.parsedResult.os:this.parseOS()},t.parseOS=function(){var e=this;this.parsedResult.os={};var t=r.default.find(s.default,(function(t){if("function"==typeof t.test)return t.test(e);if(t.test instanceof Array)return t.test.some((function(t){return e.test(t)}));throw new Error("Browser's test function is not valid")}));return t&&(this.parsedResult.os=t.describe(this.getUA())),this.parsedResult.os},t.getOSName=function(e){var t=this.getOS().name;return e?String(t).toLowerCase()||"":t||""},t.getOSVersion=function(){return this.getOS().version},t.getPlatform=function(){return this.parsedResult.platform?this.parsedResult.platform:this.parsePlatform()},t.getPlatformType=function(e){void 0===e&&(e=!1);var t=this.getPlatform().type;return e?String(t).toLowerCase()||"":t||""},t.parsePlatform=function(){var e=this;this.parsedResult.platform={};var t=r.default.find(a.default,(function(t){if("function"==typeof t.test)return t.test(e);if(t.test instanceof Array)return t.test.some((function(t){return e.test(t)}));throw new Error("Browser's test function is not valid")}));return t&&(this.parsedResult.platform=t.describe(this.getUA())),this.parsedResult.platform},t.getEngine=function(){return this.parsedResult.engine?this.parsedResult.engine:this.parseEngine()},t.getEngineName=function(e){return e?String(this.getEngine().name).toLowerCase()||"":this.getEngine().name||""},t.parseEngine=function(){var e=this;this.parsedResult.engine={};var t=r.default.find(o.default,(function(t){if("function"==typeof t.test)return t.test(e);if(t.test instanceof Array)return t.test.some((function(t){return e.test(t)}));throw new Error("Browser's test function is not valid")}));return t&&(this.parsedResult.engine=t.describe(this.getUA())),this.parsedResult.engine},t.parse=function(){return this.parseBrowser(),this.parseOS(),this.parsePlatform(),this.parseEngine(),this},t.getResult=function(){return r.default.assign({},this.parsedResult)},t.satisfies=function(e){var t=this,i={},n=0,s={},a=0;if(Object.keys(e).forEach((function(t){var o=e[t];"string"==typeof o?(s[t]=o,a+=1):"object"==typeof o&&(i[t]=o,n+=1)})),n>0){var o=Object.keys(i),c=r.default.find(o,(function(e){return t.isOS(e)}));if(c){var l=this.satisfies(i[c]);if(void 0!==l)return l}var p=r.default.find(o,(function(e){return t.isPlatform(e)}));if(p){var d=this.satisfies(i[p]);if(void 0!==d)return d}}if(a>0){var u=Object.keys(s),m=r.default.find(u,(function(e){return t.isBrowser(e,!0)}));if(void 0!==m)return this.compareVersion(s[m])}},t.isBrowser=function(e,t){void 0===t&&(t=!1);var i=this.getBrowserName().toLowerCase(),n=e.toLowerCase(),s=r.default.getBrowserTypeByAlias(n);return t&&s&&(n=s.toLowerCase()),n===i},t.compareVersion=function(e){var t=[0],i=e,n=!1,s=this.getBrowserVersion();if("string"==typeof s)return">"===e[0]||"<"===e[0]?(i=e.substr(1),"="===e[1]?(n=!0,i=e.substr(2)):t=[],">"===e[0]?t.push(1):t.push(-1)):"="===e[0]?i=e.substr(1):"~"===e[0]&&(n=!0,i=e.substr(1)),t.indexOf(r.default.compareVersions(s,i,n))>-1},t.isOS=function(e){return this.getOSName(!0)===String(e).toLowerCase()},t.isPlatform=function(e){return this.getPlatformType(!0)===String(e).toLowerCase()},t.isEngine=function(e){return this.getEngineName(!0)===String(e).toLowerCase()},t.is=function(e,t){return void 0===t&&(t=!1),this.isBrowser(e,t)||this.isOS(e)||this.isPlatform(e)},t.some=function(e){var t=this;return void 0===e&&(e=[]),e.some((function(e){return t.is(e)}))},e}();t.default=l,e.exports=t.default},92:function(e,t,i){t.__esModule=!0,t.default=void 0;var n,s=(n=i(17))&&n.__esModule?n:{default:n},a=/version\/(\d+(\.?_?\d+)+)/i,o=[{test:[/googlebot/i],describe:function(e){var t={name:"Googlebot"},i=s.default.getFirstMatch(/googlebot\/(\d+(\.\d+))/i,e)||s.default.getFirstMatch(a,e);return i&&(t.version=i),t}},{test:[/opera/i],describe:function(e){var t={name:"Opera"},i=s.default.getFirstMatch(a,e)||s.default.getFirstMatch(/(?:opera)[\s/](\d+(\.?_?\d+)+)/i,e);return i&&(t.version=i),t}},{test:[/opr\/|opios/i],describe:function(e){var t={name:"Opera"},i=s.default.getFirstMatch(/(?:opr|opios)[\s/](\S+)/i,e)||s.default.getFirstMatch(a,e);return i&&(t.version=i),t}},{test:[/SamsungBrowser/i],describe:function(e){var t={name:"Samsung Internet for Android"},i=s.default.getFirstMatch(a,e)||s.default.getFirstMatch(/(?:SamsungBrowser)[\s/](\d+(\.?_?\d+)+)/i,e);return i&&(t.version=i),t}},{test:[/Whale/i],describe:function(e){var t={name:"NAVER Whale Browser"},i=s.default.getFirstMatch(a,e)||s.default.getFirstMatch(/(?:whale)[\s/](\d+(?:\.\d+)+)/i,e);return i&&(t.version=i),t}},{test:[/MZBrowser/i],describe:function(e){var t={name:"MZ Browser"},i=s.default.getFirstMatch(/(?:MZBrowser)[\s/](\d+(?:\.\d+)+)/i,e)||s.default.getFirstMatch(a,e);return i&&(t.version=i),t}},{test:[/focus/i],describe:function(e){var t={name:"Focus"},i=s.default.getFirstMatch(/(?:focus)[\s/](\d+(?:\.\d+)+)/i,e)||s.default.getFirstMatch(a,e);return i&&(t.version=i),t}},{test:[/swing/i],describe:function(e){var t={name:"Swing"},i=s.default.getFirstMatch(/(?:swing)[\s/](\d+(?:\.\d+)+)/i,e)||s.default.getFirstMatch(a,e);return i&&(t.version=i),t}},{test:[/coast/i],describe:function(e){var t={name:"Opera Coast"},i=s.default.getFirstMatch(a,e)||s.default.getFirstMatch(/(?:coast)[\s/](\d+(\.?_?\d+)+)/i,e);return i&&(t.version=i),t}},{test:[/opt\/\d+(?:.?_?\d+)+/i],describe:function(e){var t={name:"Opera Touch"},i=s.default.getFirstMatch(/(?:opt)[\s/](\d+(\.?_?\d+)+)/i,e)||s.default.getFirstMatch(a,e);return i&&(t.version=i),t}},{test:[/yabrowser/i],describe:function(e){var t={name:"Yandex Browser"},i=s.default.getFirstMatch(/(?:yabrowser)[\s/](\d+(\.?_?\d+)+)/i,e)||s.default.getFirstMatch(a,e);return i&&(t.version=i),t}},{test:[/ucbrowser/i],describe:function(e){var t={name:"UC Browser"},i=s.default.getFirstMatch(a,e)||s.default.getFirstMatch(/(?:ucbrowser)[\s/](\d+(\.?_?\d+)+)/i,e);return i&&(t.version=i),t}},{test:[/Maxthon|mxios/i],describe:function(e){var t={name:"Maxthon"},i=s.default.getFirstMatch(a,e)||s.default.getFirstMatch(/(?:Maxthon|mxios)[\s/](\d+(\.?_?\d+)+)/i,e);return i&&(t.version=i),t}},{test:[/epiphany/i],describe:function(e){var t={name:"Epiphany"},i=s.default.getFirstMatch(a,e)||s.default.getFirstMatch(/(?:epiphany)[\s/](\d+(\.?_?\d+)+)/i,e);return i&&(t.version=i),t}},{test:[/puffin/i],describe:function(e){var t={name:"Puffin"},i=s.default.getFirstMatch(a,e)||s.default.getFirstMatch(/(?:puffin)[\s/](\d+(\.?_?\d+)+)/i,e);return i&&(t.version=i),t}},{test:[/sleipnir/i],describe:function(e){var t={name:"Sleipnir"},i=s.default.getFirstMatch(a,e)||s.default.getFirstMatch(/(?:sleipnir)[\s/](\d+(\.?_?\d+)+)/i,e);return i&&(t.version=i),t}},{test:[/k-meleon/i],describe:function(e){var t={name:"K-Meleon"},i=s.default.getFirstMatch(a,e)||s.default.getFirstMatch(/(?:k-meleon)[\s/](\d+(\.?_?\d+)+)/i,e);return i&&(t.version=i),t}},{test:[/micromessenger/i],describe:function(e){var t={name:"WeChat"},i=s.default.getFirstMatch(/(?:micromessenger)[\s/](\d+(\.?_?\d+)+)/i,e)||s.default.getFirstMatch(a,e);return i&&(t.version=i),t}},{test:[/qqbrowser/i],describe:function(e){var t={name:/qqbrowserlite/i.test(e)?"QQ Browser Lite":"QQ Browser"},i=s.default.getFirstMatch(/(?:qqbrowserlite|qqbrowser)[/](\d+(\.?_?\d+)+)/i,e)||s.default.getFirstMatch(a,e);return i&&(t.version=i),t}},{test:[/msie|trident/i],describe:function(e){var t={name:"Internet Explorer"},i=s.default.getFirstMatch(/(?:msie |rv:)(\d+(\.?_?\d+)+)/i,e);return i&&(t.version=i),t}},{test:[/\sedg\//i],describe:function(e){var t={name:"Microsoft Edge"},i=s.default.getFirstMatch(/\sedg\/(\d+(\.?_?\d+)+)/i,e);return i&&(t.version=i),t}},{test:[/edg([ea]|ios)/i],describe:function(e){var t={name:"Microsoft Edge"},i=s.default.getSecondMatch(/edg([ea]|ios)\/(\d+(\.?_?\d+)+)/i,e);return i&&(t.version=i),t}},{test:[/vivaldi/i],describe:function(e){var t={name:"Vivaldi"},i=s.default.getFirstMatch(/vivaldi\/(\d+(\.?_?\d+)+)/i,e);return i&&(t.version=i),t}},{test:[/seamonkey/i],describe:function(e){var t={name:"SeaMonkey"},i=s.default.getFirstMatch(/seamonkey\/(\d+(\.?_?\d+)+)/i,e);return i&&(t.version=i),t}},{test:[/sailfish/i],describe:function(e){var t={name:"Sailfish"},i=s.default.getFirstMatch(/sailfish\s?browser\/(\d+(\.\d+)?)/i,e);return i&&(t.version=i),t}},{test:[/silk/i],describe:function(e){var t={name:"Amazon Silk"},i=s.default.getFirstMatch(/silk\/(\d+(\.?_?\d+)+)/i,e);return i&&(t.version=i),t}},{test:[/phantom/i],describe:function(e){var t={name:"PhantomJS"},i=s.default.getFirstMatch(/phantomjs\/(\d+(\.?_?\d+)+)/i,e);return i&&(t.version=i),t}},{test:[/slimerjs/i],describe:function(e){var t={name:"SlimerJS"},i=s.default.getFirstMatch(/slimerjs\/(\d+(\.?_?\d+)+)/i,e);return i&&(t.version=i),t}},{test:[/blackberry|\bbb\d+/i,/rim\stablet/i],describe:function(e){var t={name:"BlackBerry"},i=s.default.getFirstMatch(a,e)||s.default.getFirstMatch(/blackberry[\d]+\/(\d+(\.?_?\d+)+)/i,e);return i&&(t.version=i),t}},{test:[/(web|hpw)[o0]s/i],describe:function(e){var t={name:"WebOS Browser"},i=s.default.getFirstMatch(a,e)||s.default.getFirstMatch(/w(?:eb)?[o0]sbrowser\/(\d+(\.?_?\d+)+)/i,e);return i&&(t.version=i),t}},{test:[/bada/i],describe:function(e){var t={name:"Bada"},i=s.default.getFirstMatch(/dolfin\/(\d+(\.?_?\d+)+)/i,e);return i&&(t.version=i),t}},{test:[/tizen/i],describe:function(e){var t={name:"Tizen"},i=s.default.getFirstMatch(/(?:tizen\s?)?browser\/(\d+(\.?_?\d+)+)/i,e)||s.default.getFirstMatch(a,e);return i&&(t.version=i),t}},{test:[/qupzilla/i],describe:function(e){var t={name:"QupZilla"},i=s.default.getFirstMatch(/(?:qupzilla)[\s/](\d+(\.?_?\d+)+)/i,e)||s.default.getFirstMatch(a,e);return i&&(t.version=i),t}},{test:[/firefox|iceweasel|fxios/i],describe:function(e){var t={name:"Firefox"},i=s.default.getFirstMatch(/(?:firefox|iceweasel|fxios)[\s/](\d+(\.?_?\d+)+)/i,e);return i&&(t.version=i),t}},{test:[/electron/i],describe:function(e){var t={name:"Electron"},i=s.default.getFirstMatch(/(?:electron)\/(\d+(\.?_?\d+)+)/i,e);return i&&(t.version=i),t}},{test:[/MiuiBrowser/i],describe:function(e){var t={name:"Miui"},i=s.default.getFirstMatch(/(?:MiuiBrowser)[\s/](\d+(\.?_?\d+)+)/i,e);return i&&(t.version=i),t}},{test:[/chromium/i],describe:function(e){var t={name:"Chromium"},i=s.default.getFirstMatch(/(?:chromium)[\s/](\d+(\.?_?\d+)+)/i,e)||s.default.getFirstMatch(a,e);return i&&(t.version=i),t}},{test:[/chrome|crios|crmo/i],describe:function(e){var t={name:"Chrome"},i=s.default.getFirstMatch(/(?:chrome|crios|crmo)\/(\d+(\.?_?\d+)+)/i,e);return i&&(t.version=i),t}},{test:[/GSA/i],describe:function(e){var t={name:"Google Search"},i=s.default.getFirstMatch(/(?:GSA)\/(\d+(\.?_?\d+)+)/i,e);return i&&(t.version=i),t}},{test:function(e){var t=!e.test(/like android/i),i=e.test(/android/i);return t&&i},describe:function(e){var t={name:"Android Browser"},i=s.default.getFirstMatch(a,e);return i&&(t.version=i),t}},{test:[/playstation 4/i],describe:function(e){var t={name:"PlayStation 4"},i=s.default.getFirstMatch(a,e);return i&&(t.version=i),t}},{test:[/safari|applewebkit/i],describe:function(e){var t={name:"Safari"},i=s.default.getFirstMatch(a,e);return i&&(t.version=i),t}},{test:[/.*/i],describe:function(e){var t=-1!==e.search("\\(")?/^(.*)\/(.*)[ \t]\((.*)/:/^(.*)\/(.*) /;return{name:s.default.getFirstMatch(t,e),version:s.default.getSecondMatch(t,e)}}}];t.default=o,e.exports=t.default},93:function(e,t,i){t.__esModule=!0,t.default=void 0;var n,s=(n=i(17))&&n.__esModule?n:{default:n},a=i(18),o=[{test:[/Roku\/DVP/],describe:function(e){var t=s.default.getFirstMatch(/Roku\/DVP-(\d+\.\d+)/i,e);return{name:a.OS_MAP.Roku,version:t}}},{test:[/windows phone/i],describe:function(e){var t=s.default.getFirstMatch(/windows phone (?:os)?\s?(\d+(\.\d+)*)/i,e);return{name:a.OS_MAP.WindowsPhone,version:t}}},{test:[/windows /i],describe:function(e){var t=s.default.getFirstMatch(/Windows ((NT|XP)( \d\d?.\d)?)/i,e),i=s.default.getWindowsVersionName(t);return{name:a.OS_MAP.Windows,version:t,versionName:i}}},{test:[/Macintosh(.*?) FxiOS(.*?)\//],describe:function(e){var t={name:a.OS_MAP.iOS},i=s.default.getSecondMatch(/(Version\/)(\d[\d.]+)/,e);return i&&(t.version=i),t}},{test:[/macintosh/i],describe:function(e){var t=s.default.getFirstMatch(/mac os x (\d+(\.?_?\d+)+)/i,e).replace(/[_\s]/g,"."),i=s.default.getMacOSVersionName(t),n={name:a.OS_MAP.MacOS,version:t};return i&&(n.versionName=i),n}},{test:[/(ipod|iphone|ipad)/i],describe:function(e){var t=s.default.getFirstMatch(/os (\d+([_\s]\d+)*) like mac os x/i,e).replace(/[_\s]/g,".");return{name:a.OS_MAP.iOS,version:t}}},{test:function(e){var t=!e.test(/like android/i),i=e.test(/android/i);return t&&i},describe:function(e){var t=s.default.getFirstMatch(/android[\s/-](\d+(\.\d+)*)/i,e),i=s.default.getAndroidVersionName(t),n={name:a.OS_MAP.Android,version:t};return i&&(n.versionName=i),n}},{test:[/(web|hpw)[o0]s/i],describe:function(e){var t=s.default.getFirstMatch(/(?:web|hpw)[o0]s\/(\d+(\.\d+)*)/i,e),i={name:a.OS_MAP.WebOS};return t&&t.length&&(i.version=t),i}},{test:[/blackberry|\bbb\d+/i,/rim\stablet/i],describe:function(e){var t=s.default.getFirstMatch(/rim\stablet\sos\s(\d+(\.\d+)*)/i,e)||s.default.getFirstMatch(/blackberry\d+\/(\d+([_\s]\d+)*)/i,e)||s.default.getFirstMatch(/\bbb(\d+)/i,e);return{name:a.OS_MAP.BlackBerry,version:t}}},{test:[/bada/i],describe:function(e){var t=s.default.getFirstMatch(/bada\/(\d+(\.\d+)*)/i,e);return{name:a.OS_MAP.Bada,version:t}}},{test:[/tizen/i],describe:function(e){var t=s.default.getFirstMatch(/tizen[/\s](\d+(\.\d+)*)/i,e);return{name:a.OS_MAP.Tizen,version:t}}},{test:[/linux/i],describe:function(){return{name:a.OS_MAP.Linux}}},{test:[/CrOS/],describe:function(){return{name:a.OS_MAP.ChromeOS}}},{test:[/PlayStation 4/],describe:function(e){var t=s.default.getFirstMatch(/PlayStation 4[/\s](\d+(\.\d+)*)/i,e);return{name:a.OS_MAP.PlayStation4,version:t}}}];t.default=o,e.exports=t.default},94:function(e,t,i){t.__esModule=!0,t.default=void 0;var n,s=(n=i(17))&&n.__esModule?n:{default:n},a=i(18),o=[{test:[/googlebot/i],describe:function(){return{type:"bot",vendor:"Google"}}},{test:[/huawei/i],describe:function(e){var t=s.default.getFirstMatch(/(can-l01)/i,e)&&"Nova",i={type:a.PLATFORMS_MAP.mobile,vendor:"Huawei"};return t&&(i.model=t),i}},{test:[/nexus\s*(?:7|8|9|10).*/i],describe:function(){return{type:a.PLATFORMS_MAP.tablet,vendor:"Nexus"}}},{test:[/ipad/i],describe:function(){return{type:a.PLATFORMS_MAP.tablet,vendor:"Apple",model:"iPad"}}},{test:[/Macintosh(.*?) FxiOS(.*?)\//],describe:function(){return{type:a.PLATFORMS_MAP.tablet,vendor:"Apple",model:"iPad"}}},{test:[/kftt build/i],describe:function(){return{type:a.PLATFORMS_MAP.tablet,vendor:"Amazon",model:"Kindle Fire HD 7"}}},{test:[/silk/i],describe:function(){return{type:a.PLATFORMS_MAP.tablet,vendor:"Amazon"}}},{test:[/tablet(?! pc)/i],describe:function(){return{type:a.PLATFORMS_MAP.tablet}}},{test:function(e){var t=e.test(/ipod|iphone/i),i=e.test(/like (ipod|iphone)/i);return t&&!i},describe:function(e){var t=s.default.getFirstMatch(/(ipod|iphone)/i,e);return{type:a.PLATFORMS_MAP.mobile,vendor:"Apple",model:t}}},{test:[/nexus\s*[0-6].*/i,/galaxy nexus/i],describe:function(){return{type:a.PLATFORMS_MAP.mobile,vendor:"Nexus"}}},{test:[/[^-]mobi/i],describe:function(){return{type:a.PLATFORMS_MAP.mobile}}},{test:function(e){return"blackberry"===e.getBrowserName(!0)},describe:function(){return{type:a.PLATFORMS_MAP.mobile,vendor:"BlackBerry"}}},{test:function(e){return"bada"===e.getBrowserName(!0)},describe:function(){return{type:a.PLATFORMS_MAP.mobile}}},{test:function(e){return"windows phone"===e.getBrowserName()},describe:function(){return{type:a.PLATFORMS_MAP.mobile,vendor:"Microsoft"}}},{test:function(e){var t=Number(String(e.getOSVersion()).split(".")[0]);return"android"===e.getOSName(!0)&&t>=3},describe:function(){return{type:a.PLATFORMS_MAP.tablet}}},{test:function(e){return"android"===e.getOSName(!0)},describe:function(){return{type:a.PLATFORMS_MAP.mobile}}},{test:function(e){return"macos"===e.getOSName(!0)},describe:function(){return{type:a.PLATFORMS_MAP.desktop,vendor:"Apple"}}},{test:function(e){return"windows"===e.getOSName(!0)},describe:function(){return{type:a.PLATFORMS_MAP.desktop}}},{test:function(e){return"linux"===e.getOSName(!0)},describe:function(){return{type:a.PLATFORMS_MAP.desktop}}},{test:function(e){return"playstation 4"===e.getOSName(!0)},describe:function(){return{type:a.PLATFORMS_MAP.tv}}},{test:function(e){return"roku"===e.getOSName(!0)},describe:function(){return{type:a.PLATFORMS_MAP.tv}}}];t.default=o,e.exports=t.default},95:function(e,t,i){t.__esModule=!0,t.default=void 0;var n,s=(n=i(17))&&n.__esModule?n:{default:n},a=i(18),o=[{test:function(e){return"microsoft edge"===e.getBrowserName(!0)},describe:function(e){if(/\sedg\//i.test(e))return{name:a.ENGINE_MAP.Blink};var t=s.default.getFirstMatch(/edge\/(\d+(\.?_?\d+)+)/i,e);return{name:a.ENGINE_MAP.EdgeHTML,version:t}}},{test:[/trident/i],describe:function(e){var t={name:a.ENGINE_MAP.Trident},i=s.default.getFirstMatch(/trident\/(\d+(\.?_?\d+)+)/i,e);return i&&(t.version=i),t}},{test:function(e){return e.test(/presto/i)},describe:function(e){var t={name:a.ENGINE_MAP.Presto},i=s.default.getFirstMatch(/presto\/(\d+(\.?_?\d+)+)/i,e);return i&&(t.version=i),t}},{test:function(e){var t=e.test(/gecko/i),i=e.test(/like gecko/i);return t&&!i},describe:function(e){var t={name:a.ENGINE_MAP.Gecko},i=s.default.getFirstMatch(/gecko\/(\d+(\.?_?\d+)+)/i,e);return i&&(t.version=i),t}},{test:[/(apple)?webkit\/537\.36/i],describe:function(){return{name:a.ENGINE_MAP.Blink}}},{test:[/(apple)?webkit/i],describe:function(e){var t={name:a.ENGINE_MAP.WebKit},i=s.default.getFirstMatch(/webkit\/(\d+(\.?_?\d+)+)/i,e);return i&&(t.version=i),t}}];t.default=o,e.exports=t.default}})}(ra)),ra.exports),la=Xi(ca);const pa=({serviceId:e,clientVersion:t})=>async i=>{const n="undefined"!=typeof window&&window?.navigator?.userAgent?la.parse(window.navigator.userAgent):void 0,s=[["aws-sdk-js",t],["ua","2.1"],[`os/${n?.os?.name||"other"}`,n?.os?.version],["lang/js"],["md/browser",`${n?.browser?.name??"unknown"}_${n?.browser?.version??"unknown"}`]];e&&s.push([`api/${e}`,t]);const a=await(i?.userAgentAppId?.());return a&&s.push([`app/${a}`]),s};var da,ua=function(){function e(){this.checksum=4294967295}return e.prototype.update=function(e){var t,i;try{for(var n=function(e){var t="function"==typeof Symbol&&Symbol.iterator,i=t&&e[t],n=0;if(i)return i.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}(e),s=n.next();!s.done;s=n.next()){var a=s.value;this.checksum=this.checksum>>>8^ma[255&(this.checksum^a)]}}catch(e){t={error:e}}finally{try{s&&!s.done&&(i=n.return)&&i.call(n)}finally{if(t)throw t.error}}return this},e.prototype.digest=function(){return(4294967295^this.checksum)>>>0},e}(),ma=function(e){if(!Uint32Array.from){for(var t=new Uint32Array(e.length),i=0;i<e.length;)t[i]=e[i],i+=1;return t}return Uint32Array.from(e)}([0,1996959894,3993919788,2567524794,124634137,1886057615,3915621685,2657392035,249268274,2044508324,3772115230,2547177864,162941995,2125561021,3887607047,2428444049,498536548,1789927666,4089016648,2227061214,450548861,1843258603,4107580753,2211677639,325883990,1684777152,4251122042,2321926636,335633487,1661365465,4195302755,2366115317,997073096,1281953886,3579855332,2724688242,1006888145,1258607687,3524101629,2768942443,901097722,1119000684,3686517206,2898065728,853044451,1172266101,3705015759,2882616665,651767980,1373503546,3369554304,3218104598,565507253,1454621731,3485111705,3099436303,671266974,1594198024,3322730930,2970347812,795835527,1483230225,3244367275,3060149565,1994146192,31158534,2563907772,4023717930,1907459465,112637215,2680153253,3904427059,2013776290,251722036,2517215374,3775830040,2137656763,141376813,2439277719,3865271297,1802195444,476864866,2238001368,4066508878,1812370925,453092731,2181625025,4111451223,1706088902,314042704,2344532202,4240017532,1658658271,366619977,2362670323,4224994405,1303535960,984961486,2747007092,3569037538,1256170817,1037604311,2765210733,3554079995,1131014506,879679996,2909243462,3663771856,1141124467,855842277,2852801631,3708648649,1342533948,654459306,3188396048,3373015174,1466479909,544179635,3110523913,3462522015,1591671054,702138776,2966460450,3352799412,1504918807,783551873,3082640443,3233442989,3988292384,2596254646,62317068,1957810842,3939845945,2647816111,81470997,1943803523,3814918930,2489596804,225274430,2053790376,3826175755,2466906013,167816743,2097651377,4027552580,2265490386,503444072,1762050814,4150417245,2154129355,426522225,1852507879,4275313526,2312317920,282753626,1742555852,4189708143,2394877945,397917763,1622183637,3604390888,2714866558,953729732,1340076626,3518719985,2797360999,1068828381,1219638859,3624741850,2936675148,906185462,1090812512,3747672003,2825379669,829329135,1181335161,3412177804,3160834842,628085408,1382605366,3423369109,3138078467,570562233,1426400815,3317316542,2998733608,733239954,1555261956,3268935591,3050360625,752459403,1541320221,2607071920,3965973030,1969922972,40735498,2617837225,3943577151,1913087877,83908371,2512341634,3803740692,2075208622,213261112,2463272603,3855990285,2094854071,198958881,2262029012,4057260610,1759359992,534414190,2176718541,4139329115,1873836001,414664567,2282248934,4279200368,1711684554,285281116,2405801727,4167216745,1634467795,376229701,2685067896,3608007406,1308918612,956543938,2808555105,3495958263,1231636301,1047427035,2932959818,3654703836,1088359270,936918e3,2847714899,3736837829,1202900863,817233897,3183342108,3401237130,1404277552,615818150,3134207493,3453421203,1423857449,601450431,3009837614,3294710456,1567103746,711928724,3020668471,3272380065,1510334235,755167117]);class ha{constructor(e){if(this.bytes=e,8!==e.byteLength)throw new Error("Int64 buffers must be exactly 8 bytes")}static fromNumber(e){if(e>0x8000000000000000||e<-0x8000000000000000)throw new Error(`${e} is too large (or, if negative, too small) to represent as an Int64`);const t=new Uint8Array(8);for(let i=7,n=Math.abs(Math.round(e));i>-1&&n>0;i--,n/=256)t[i]=n;return e<0&&fa(t),new ha(t)}valueOf(){const e=this.bytes.slice(0),t=128&e[0];return t&&fa(e),parseInt(fe(e),16)*(t?-1:1)}toString(){return String(this.valueOf())}}function fa(e){for(let t=0;t<8;t++)e[t]^=255;for(let t=7;t>-1&&(e[t]++,0===e[t]);t--);}class ga{constructor(e,t){this.toUtf8=e,this.fromUtf8=t}format(e){const t=[];for(const i of Object.keys(e)){const n=this.fromUtf8(i);t.push(Uint8Array.from([n.byteLength]),n,this.formatHeaderValue(e[i]))}const i=new Uint8Array(t.reduce(((e,t)=>e+t.byteLength),0));let n=0;for(const e of t)i.set(e,n),n+=e.byteLength;return i}formatHeaderValue(e){switch(e.type){case"boolean":return Uint8Array.from([e.value?0:1]);case"byte":return Uint8Array.from([2,e.value]);case"short":const t=new DataView(new ArrayBuffer(3));return t.setUint8(0,3),t.setInt16(1,e.value,!1),new Uint8Array(t.buffer);case"integer":const i=new DataView(new ArrayBuffer(5));return i.setUint8(0,4),i.setInt32(1,e.value,!1),new Uint8Array(i.buffer);case"long":const n=new Uint8Array(9);return n[0]=5,n.set(e.value.bytes,1),n;case"binary":const s=new DataView(new ArrayBuffer(3+e.value.byteLength));s.setUint8(0,6),s.setUint16(1,e.value.byteLength,!1);const a=new Uint8Array(s.buffer);return a.set(e.value,3),a;case"string":const o=this.fromUtf8(e.value),r=new DataView(new ArrayBuffer(3+o.byteLength));r.setUint8(0,7),r.setUint16(1,o.byteLength,!1);const c=new Uint8Array(r.buffer);return c.set(o,3),c;case"timestamp":const l=new Uint8Array(9);return l[0]=8,l.set(ha.fromNumber(e.value.valueOf()).bytes,1),l;case"uuid":if(!Ia.test(e.value))throw new Error(`Invalid UUID received: ${e.value}`);const p=new Uint8Array(17);return p[0]=9,p.set(he(e.value.replace(/\-/g,"")),1),p}}parse(e){const t={};let i=0;for(;i<e.byteLength;){const n=e.getUint8(i++),s=this.toUtf8(new Uint8Array(e.buffer,e.byteOffset+i,n));switch(i+=n,e.getUint8(i++)){case 0:t[s]={type:ya,value:!0};break;case 1:t[s]={type:ya,value:!1};break;case 2:t[s]={type:xa,value:e.getInt8(i++)};break;case 3:t[s]={type:va,value:e.getInt16(i,!1)},i+=2;break;case 4:t[s]={type:wa,value:e.getInt32(i,!1)},i+=4;break;case 5:t[s]={type:ba,value:new ha(new Uint8Array(e.buffer,e.byteOffset+i,8))},i+=8;break;case 6:const n=e.getUint16(i,!1);i+=2,t[s]={type:Ea,value:new Uint8Array(e.buffer,e.byteOffset+i,n)},i+=n;break;case 7:const a=e.getUint16(i,!1);i+=2,t[s]={type:Sa,value:this.toUtf8(new Uint8Array(e.buffer,e.byteOffset+i,a))},i+=a;break;case 8:t[s]={type:Ca,value:new Date(new ha(new Uint8Array(e.buffer,e.byteOffset+i,8)).valueOf())},i+=8;break;case 9:const o=new Uint8Array(e.buffer,e.byteOffset+i,16);i+=16,t[s]={type:Aa,value:`${fe(o.subarray(0,4))}-${fe(o.subarray(4,6))}-${fe(o.subarray(6,8))}-${fe(o.subarray(8,10))}-${fe(o.subarray(10))}`};break;default:throw new Error("Unrecognized header type tag")}}return t}}!function(e){e[e.boolTrue=0]="boolTrue",e[e.boolFalse=1]="boolFalse",e[e.byte=2]="byte",e[e.short=3]="short",e[e.integer=4]="integer",e[e.long=5]="long",e[e.byteArray=6]="byteArray",e[e.string=7]="string",e[e.timestamp=8]="timestamp",e[e.uuid=9]="uuid"}(da||(da={}));const ya="boolean",xa="byte",va="short",wa="integer",ba="long",Ea="binary",Sa="string",Ca="timestamp",Aa="uuid",Ia=/^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$/;class Ta{constructor(e,t){this.headerMarshaller=new ga(e,t),this.messageBuffer=[],this.isEndOfStream=!1}feed(e){this.messageBuffer.push(this.decode(e))}endOfStream(){this.isEndOfStream=!0}getMessage(){const e=this.messageBuffer.pop(),t=this.isEndOfStream;return{getMessage:()=>e,isEndOfStream:()=>t}}getAvailableMessages(){const e=this.messageBuffer;this.messageBuffer=[];const t=this.isEndOfStream;return{getMessages:()=>e,isEndOfStream:()=>t}}encode({headers:e,body:t}){const i=this.headerMarshaller.format(e),n=i.byteLength+t.byteLength+16,s=new Uint8Array(n),a=new DataView(s.buffer,s.byteOffset,s.byteLength),o=new ua;return a.setUint32(0,n,!1),a.setUint32(4,i.byteLength,!1),a.setUint32(8,o.update(s.subarray(0,8)).digest(),!1),s.set(i,12),s.set(t,i.byteLength+12),a.setUint32(n-4,o.update(s.subarray(8,n-4)).digest(),!1),s}decode(e){const{headers:t,body:i}=function({byteLength:e,byteOffset:t,buffer:i}){if(e<16)throw new Error("Provided message too short to accommodate event stream message overhead");const n=new DataView(i,t,e),s=n.getUint32(0,!1);if(e!==s)throw new Error("Reported message length does not match received message length");const a=n.getUint32(4,!1),o=n.getUint32(8,!1),r=n.getUint32(e-4,!1),c=(new ua).update(new Uint8Array(i,t,8));if(o!==c.digest())throw new Error(`The prelude checksum specified in the message (${o}) does not match the calculated CRC32 checksum (${c.digest()})`);if(c.update(new Uint8Array(i,t+8,e-12)),r!==c.digest())throw new Error(`The message checksum (${c.digest()}) did not match the expected value of ${r}`);return{headers:new DataView(i,t+8+4,a),body:new Uint8Array(i,t+8+4+a,s-a-16)}}(e);return{headers:this.headerMarshaller.parse(t),body:i}}formatHeaders(e){return this.headerMarshaller.format(e)}}class ka{constructor(e){this.options=e}[Symbol.asyncIterator](){return this.asyncIterator()}async*asyncIterator(){for await(const e of this.options.inputStream){const t=this.options.decoder.decode(e);yield t}}}class Oa{constructor(e){this.options=e}[Symbol.asyncIterator](){return this.asyncIterator()}async*asyncIterator(){for await(const e of this.options.messageStream){const t=this.options.encoder.encode(e);yield t}this.options.includeEndFrame&&(yield new Uint8Array(0))}}class Pa{constructor(e){this.options=e}[Symbol.asyncIterator](){return this.asyncIterator()}async*asyncIterator(){for await(const e of this.options.messageStream){const t=await this.options.deserializer(e);void 0!==t&&(yield t)}}}class _a{constructor(e){this.options=e}[Symbol.asyncIterator](){return this.asyncIterator()}async*asyncIterator(){for await(const e of this.options.inputStream){const t=this.options.serializer(e);yield t}}}function Ra(e,t){return async function(i){const{value:n}=i.headers[":message-type"];if("error"===n){const e=new Error(i.headers[":error-message"].value||"UnknownError");throw e.name=i.headers[":error-code"].value,e}if("exception"===n){const n=i.headers[":exception-type"].value,s={[n]:i},a=await e(s);if(a.$unknown){const e=new Error(t(i.body));throw e.name=n,e}throw a[n]}if("event"===n){const t={[i.headers[":event-type"].value]:i},n=await e(t);if(n.$unknown)return;return n}throw Error(`Unrecognizable event type: ${i.headers[":event-type"].value}`)}}let $a=class{constructor({utf8Encoder:e,utf8Decoder:t}){this.eventStreamCodec=new Ta(e,t),this.utfEncoder=e}deserialize(e,t){const i=function(e){let t=0,i=0,n=null,s=null;const a=e=>{if("number"!=typeof e)throw new Error("Attempted to allocate an event message where size was not a number: "+e);t=e,i=4,n=new Uint8Array(e),new DataView(n.buffer).setUint32(0,e,!1)};return{[Symbol.asyncIterator]:async function*(){const o=e[Symbol.asyncIterator]();for(;;){const{value:e,done:r}=await o.next();if(r){if(!t)return;if(t!==i)throw new Error("Truncated event message received.");return void(yield n)}const c=e.length;let l=0;for(;l<c;){if(!n){const t=c-l;s||(s=new Uint8Array(4));const n=Math.min(4-i,t);if(s.set(e.slice(l,l+n),i),i+=n,l+=n,i<4)break;a(new DataView(s.buffer).getUint32(0,!1)),s=null}const o=Math.min(t-i,c-l);n.set(e.slice(l,l+o),i),i+=o,l+=o,t&&t===i&&(yield n,n=null,t=0,i=0)}}}}}(e);return new Pa({messageStream:new ka({inputStream:i,decoder:this.eventStreamCodec}),deserializer:Ra(t,this.utfEncoder)})}serialize(e,t){return new Oa({messageStream:new _a({inputStream:e,serializer:t}),encoder:this.eventStreamCodec,includeEndFrame:!0})}};class Ma{constructor({utf8Encoder:e,utf8Decoder:t}){this.universalMarshaller=new $a({utf8Decoder:t,utf8Encoder:e})}deserialize(e,t){const i=Na(e)?(n=e,{[Symbol.asyncIterator]:async function*(){const e=n.getReader();try{for(;;){const{done:t,value:i}=await e.read();if(t)return;yield i}}finally{e.releaseLock()}}}):e;var n;return this.universalMarshaller.deserialize(i,t)}serialize(e,t){const i=this.universalMarshaller.serialize(e,t);return"function"==typeof ReadableStream?(e=>{const t=e[Symbol.asyncIterator]();return new ReadableStream({async pull(e){const{done:i,value:n}=await t.next();if(i)return e.close();e.enqueue(n)}})})(i):i}}const Na=e=>"function"==typeof ReadableStream&&e instanceof ReadableStream,Da=e=>new Ma(e),ja=e=>()=>Promise.reject(e),za="function"==typeof TextEncoder?new TextEncoder:null,La=e=>{if("string"==typeof e){if(za)return za.encode(e).byteLength;let t=e.length;for(let i=t-1;i>=0;i--){const n=e.charCodeAt(i);n>127&&n<=2047?t++:n>2047&&n<=65535&&(t+=2),n>=56320&&n<=57343&&i--}return t}if("number"==typeof e.byteLength)return e.byteLength;if("number"==typeof e.size)return e.size;throw new Error(`Body Length computation failed for ${e}`)},Fa="required",Ua="fn",Ba="argv",Ha="ref",qa=!0,Va="isSet",Ga="booleanEquals",Wa="error",Ka="endpoint",Qa="tree",Xa="PartitionResult",Ja={[Fa]:!1,type:"String"},Ya={[Fa]:!0,default:!1,type:"Boolean"},Za={[Ha]:"Endpoint"},eo={[Ua]:Ga,[Ba]:[{[Ha]:"UseFIPS"},!0]},to={[Ua]:Ga,[Ba]:[{[Ha]:"UseDualStack"},!0]},io={},no={[Ua]:"getAttr",[Ba]:[{[Ha]:Xa},"supportsFIPS"]},so={[Ua]:Ga,[Ba]:[!0,{[Ua]:"getAttr",[Ba]:[{[Ha]:Xa},"supportsDualStack"]}]},ao=[eo],oo=[to],ro=[{[Ha]:"Region"}],co={version:"1.0",parameters:{Region:Ja,UseDualStack:Ya,UseFIPS:Ya,Endpoint:Ja},rules:[{conditions:[{[Ua]:Va,[Ba]:[Za]}],rules:[{conditions:ao,error:"Invalid Configuration: FIPS and custom endpoint are not supported",type:Wa},{conditions:oo,error:"Invalid Configuration: Dualstack and custom endpoint are not supported",type:Wa},{endpoint:{url:Za,properties:io,headers:io},type:Ka}],type:Qa},{conditions:[{[Ua]:Va,[Ba]:ro}],rules:[{conditions:[{[Ua]:"aws.partition",[Ba]:ro,assign:Xa}],rules:[{conditions:[eo,to],rules:[{conditions:[{[Ua]:Ga,[Ba]:[qa,no]},so],rules:[{endpoint:{url:"https://lambda-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:io,headers:io},type:Ka}],type:Qa},{error:"FIPS and DualStack are enabled, but this partition does not support one or both",type:Wa}],type:Qa},{conditions:ao,rules:[{conditions:[{[Ua]:Ga,[Ba]:[no,qa]}],rules:[{endpoint:{url:"https://lambda-fips.{Region}.{PartitionResult#dnsSuffix}",properties:io,headers:io},type:Ka}],type:Qa},{error:"FIPS is enabled but this partition does not support FIPS",type:Wa}],type:Qa},{conditions:oo,rules:[{conditions:[so],rules:[{endpoint:{url:"https://lambda.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:io,headers:io},type:Ka}],type:Qa},{error:"DualStack is enabled but this partition does not support DualStack",type:Wa}],type:Qa},{endpoint:{url:"https://lambda.{Region}.{PartitionResult#dnsSuffix}",properties:io,headers:io},type:Ka}],type:Qa}],type:Qa},{error:"Invalid Configuration: Missing Region",type:Wa}]},lo=new Ie({size:50,params:["Endpoint","Region","UseDualStack","UseFIPS"]}),po=(e,t={})=>lo.get(e,(()=>Je(co,{endpointParams:e,logger:t.logger})));_e.aws=et;const uo=["in-region","cross-region","mobile","standard","legacy"],mo=({defaultsMode:e}={})=>rt((async()=>{const t="function"==typeof e?await e():e;switch(t?.toLowerCase()){case"auto":return Promise.resolve(ho()?"mobile":"standard");case"mobile":case"in-region":case"cross-region":case"standard":case"legacy":return Promise.resolve(t?.toLocaleLowerCase());case void 0:return Promise.resolve("legacy");default:throw new Error(`Invalid parameter for "defaultsMode", expect ${uo.join(", ")}, got ${t}`)}})),ho=()=>{const e="undefined"!=typeof window&&window?.navigator?.userAgent?la.parse(window.navigator.userAgent):void 0,t=e?.platform?.type;return"tablet"===t||"mobile"===t},fo=e=>{const t=mo(e),i=()=>t().then(ki),n=(e=>({apiVersion:"2015-03-31",base64Decoder:e?.base64Decoder??Z,base64Encoder:e?.base64Encoder??ne,disableHostPrefix:e?.disableHostPrefix??!1,endpointProvider:e?.endpointProvider??po,extensions:e?.extensions??[],httpAuthSchemeProvider:e?.httpAuthSchemeProvider??js,httpAuthSchemes:e?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:e=>e.getIdentityProvider("aws.auth#sigv4"),signer:new ot}],logger:e?.logger??new Li,serviceId:e?.serviceId??"Lambda",urlParser:e?.urlParser??ns,utf8Decoder:e?.utf8Decoder??ee,utf8Encoder:e?.utf8Encoder??ie}))(e);return{...n,...e,runtime:"browser",defaultsMode:t,bodyLengthChecker:e?.bodyLengthChecker??La,credentialDefaultProvider:e?.credentialDefaultProvider??(e=>()=>Promise.reject(new Error("Credential is missing"))),defaultUserAgentProvider:e?.defaultUserAgentProvider??pa({serviceId:n.serviceId,clientVersion:Ls}),eventStreamSerdeProvider:e?.eventStreamSerdeProvider??Da,maxAttempts:e?.maxAttempts??3,region:e?.region??ja("Region is missing"),requestHandler:pe.create(e?.requestHandler??i),retryMode:e?.retryMode??(async()=>(await i()).retryMode||ds),sha256:e?.sha256??oa,streamCollector:e?.streamCollector??de,useDualstackEndpoint:e?.useDualstackEndpoint??(()=>Promise.resolve(Bn)),useFipsEndpoint:e?.useFipsEndpoint??(()=>Promise.resolve(Hn))}},go=e=>{let t=async()=>{if(void 0===e.region)throw new Error("Region is missing from runtimeConfig");const t=e.region;return"string"==typeof t?t:t()};return{setRegion(e){t=e},region:()=>t}},yo=e=>({region:e.region()}),xo=e=>{const t=e.httpAuthSchemes;let i=e.httpAuthSchemeProvider,n=e.credentials;return{setHttpAuthScheme(e){const i=t.findIndex((t=>t.schemeId===e.schemeId));-1===i?t.push(e):t.splice(i,1,e)},httpAuthSchemes:()=>t,setHttpAuthSchemeProvider(e){i=e},httpAuthSchemeProvider:()=>i,setCredentials(e){n=e},credentials:()=>n}};class vo extends Vt{constructor(...[e]){const t=fo(e||{});var i;const n=Ae((i=t,{...i,useDualstackEndpoint:i.useDualstackEndpoint??!1,useFipsEndpoint:i.useFipsEndpoint??!1,defaultSigningName:"lambda"})),s=ks(n),a=Gn(s),o=ls(a),r=(c=o,{...c,eventStreamMarshaller:c.eventStreamSerdeProvider(c)});var c;const l=((e,t)=>{const i={...go(e),...$i(e),...g(e),...xo(e)};return t.forEach((e=>e.configure(i))),{...e,...yo(i),...Mi(i),...y(i),...(n=i,{httpAuthSchemes:n.httpAuthSchemes(),httpAuthSchemeProvider:n.httpAuthSchemeProvider(),credentials:n.credentials()})};var n})({...Lt(r)},e?.extensions||[]);super(l),this.config=l,this.middlewareStack.use(Fn(this.config)),this.middlewareStack.use(Ms(this.config)),this.middlewareStack.use(Qn(this.config)),this.middlewareStack.use(O(this.config)),this.middlewareStack.use(_(this.config)),this.middlewareStack.use(M(this.config)),this.middlewareStack.use(L(this.config,{httpAuthSchemeParametersProvider:Ds,identityProviderConfigProvider:async e=>new we({"aws.auth#sigv4":e.credentials})})),this.middlewareStack.use(G(this.config))}destroy(){super.destroy()}}class wo extends Ci{constructor(e){super(e),Object.setPrototypeOf(this,wo.prototype)}}class bo extends wo{constructor(e){super({name:"InvalidParameterValueException",$fault:"client",...e}),this.name="InvalidParameterValueException",this.$fault="client",Object.setPrototypeOf(this,bo.prototype),this.Type=e.Type}}class Eo extends wo{constructor(e){super({name:"PolicyLengthExceededException",$fault:"client",...e}),this.name="PolicyLengthExceededException",this.$fault="client",Object.setPrototypeOf(this,Eo.prototype),this.Type=e.Type}}class So extends wo{constructor(e){super({name:"PreconditionFailedException",$fault:"client",...e}),this.name="PreconditionFailedException",this.$fault="client",Object.setPrototypeOf(this,So.prototype),this.Type=e.Type}}class Co extends wo{constructor(e){super({name:"ResourceConflictException",$fault:"client",...e}),this.name="ResourceConflictException",this.$fault="client",Object.setPrototypeOf(this,Co.prototype),this.Type=e.Type}}let Ao=class e extends wo{constructor(t){super({name:"ResourceNotFoundException",$fault:"client",...t}),this.name="ResourceNotFoundException",this.$fault="client",Object.setPrototypeOf(this,e.prototype),this.Type=t.Type,this.Message=t.Message}};class Io extends wo{constructor(e){super({name:"ServiceException",$fault:"server",...e}),this.name="ServiceException",this.$fault="server",Object.setPrototypeOf(this,Io.prototype),this.Type=e.Type,this.Message=e.Message}}class To extends wo{constructor(e){super({name:"TooManyRequestsException",$fault:"client",...e}),this.name="TooManyRequestsException",this.$fault="client",Object.setPrototypeOf(this,To.prototype),this.retryAfterSeconds=e.retryAfterSeconds,this.Type=e.Type,this.Reason=e.Reason}}class ko extends wo{constructor(e){super({name:"CodeSigningConfigNotFoundException",$fault:"client",...e}),this.name="CodeSigningConfigNotFoundException",this.$fault="client",Object.setPrototypeOf(this,ko.prototype),this.Type=e.Type,this.Message=e.Message}}class Oo extends wo{constructor(e){super({name:"CodeStorageExceededException",$fault:"client",...e}),this.name="CodeStorageExceededException",this.$fault="client",Object.setPrototypeOf(this,Oo.prototype),this.Type=e.Type}}class Po extends wo{constructor(e){super({name:"CodeVerificationFailedException",$fault:"client",...e}),this.name="CodeVerificationFailedException",this.$fault="client",Object.setPrototypeOf(this,Po.prototype),this.Type=e.Type,this.Message=e.Message}}class _o extends wo{constructor(e){super({name:"InvalidCodeSignatureException",$fault:"client",...e}),this.name="InvalidCodeSignatureException",this.$fault="client",Object.setPrototypeOf(this,_o.prototype),this.Type=e.Type,this.Message=e.Message}}let Ro=class e extends wo{constructor(t){super({name:"ResourceInUseException",$fault:"client",...t}),this.name="ResourceInUseException",this.$fault="client",Object.setPrototypeOf(this,e.prototype),this.Type=t.Type,this.Message=t.Message}};class $o extends wo{constructor(e){super({name:"ProvisionedConcurrencyConfigNotFoundException",$fault:"client",...e}),this.name="ProvisionedConcurrencyConfigNotFoundException",this.$fault="client",Object.setPrototypeOf(this,$o.prototype),this.Type=e.Type}}class Mo extends wo{constructor(e){super({name:"EC2AccessDeniedException",$fault:"server",...e}),this.name="EC2AccessDeniedException",this.$fault="server",Object.setPrototypeOf(this,Mo.prototype),this.Type=e.Type,this.Message=e.Message}}class No extends wo{constructor(e){super({name:"EC2ThrottledException",$fault:"server",...e}),this.name="EC2ThrottledException",this.$fault="server",Object.setPrototypeOf(this,No.prototype),this.Type=e.Type,this.Message=e.Message}}class Do extends wo{constructor(e){super({name:"EC2UnexpectedException",$fault:"server",...e}),this.name="EC2UnexpectedException",this.$fault="server",Object.setPrototypeOf(this,Do.prototype),this.Type=e.Type,this.Message=e.Message,this.EC2ErrorCode=e.EC2ErrorCode}}class jo extends wo{constructor(e){super({name:"EFSIOException",$fault:"client",...e}),this.name="EFSIOException",this.$fault="client",Object.setPrototypeOf(this,jo.prototype),this.Type=e.Type,this.Message=e.Message}}class zo extends wo{constructor(e){super({name:"EFSMountConnectivityException",$fault:"client",...e}),this.name="EFSMountConnectivityException",this.$fault="client",Object.setPrototypeOf(this,zo.prototype),this.Type=e.Type,this.Message=e.Message}}class Lo extends wo{constructor(e){super({name:"EFSMountFailureException",$fault:"client",...e}),this.name="EFSMountFailureException",this.$fault="client",Object.setPrototypeOf(this,Lo.prototype),this.Type=e.Type,this.Message=e.Message}}class Fo extends wo{constructor(e){super({name:"EFSMountTimeoutException",$fault:"client",...e}),this.name="EFSMountTimeoutException",this.$fault="client",Object.setPrototypeOf(this,Fo.prototype),this.Type=e.Type,this.Message=e.Message}}class Uo extends wo{constructor(e){super({name:"ENILimitReachedException",$fault:"server",...e}),this.name="ENILimitReachedException",this.$fault="server",Object.setPrototypeOf(this,Uo.prototype),this.Type=e.Type,this.Message=e.Message}}class Bo extends wo{constructor(e){super({name:"InvalidRequestContentException",$fault:"client",...e}),this.name="InvalidRequestContentException",this.$fault="client",Object.setPrototypeOf(this,Bo.prototype),this.Type=e.Type}}class Ho extends wo{constructor(e){super({name:"InvalidRuntimeException",$fault:"server",...e}),this.name="InvalidRuntimeException",this.$fault="server",Object.setPrototypeOf(this,Ho.prototype),this.Type=e.Type,this.Message=e.Message}}class qo extends wo{constructor(e){super({name:"InvalidSecurityGroupIDException",$fault:"server",...e}),this.name="InvalidSecurityGroupIDException",this.$fault="server",Object.setPrototypeOf(this,qo.prototype),this.Type=e.Type,this.Message=e.Message}}class Vo extends wo{constructor(e){super({name:"InvalidSubnetIDException",$fault:"server",...e}),this.name="InvalidSubnetIDException",this.$fault="server",Object.setPrototypeOf(this,Vo.prototype),this.Type=e.Type,this.Message=e.Message}}class Go extends wo{constructor(e){super({name:"InvalidZipFileException",$fault:"server",...e}),this.name="InvalidZipFileException",this.$fault="server",Object.setPrototypeOf(this,Go.prototype),this.Type=e.Type,this.Message=e.Message}}class Wo extends wo{constructor(e){super({name:"KMSAccessDeniedException",$fault:"server",...e}),this.name="KMSAccessDeniedException",this.$fault="server",Object.setPrototypeOf(this,Wo.prototype),this.Type=e.Type,this.Message=e.Message}}class Ko extends wo{constructor(e){super({name:"KMSDisabledException",$fault:"server",...e}),this.name="KMSDisabledException",this.$fault="server",Object.setPrototypeOf(this,Ko.prototype),this.Type=e.Type,this.Message=e.Message}}class Qo extends wo{constructor(e){super({name:"KMSInvalidStateException",$fault:"server",...e}),this.name="KMSInvalidStateException",this.$fault="server",Object.setPrototypeOf(this,Qo.prototype),this.Type=e.Type,this.Message=e.Message}}class Xo extends wo{constructor(e){super({name:"KMSNotFoundException",$fault:"server",...e}),this.name="KMSNotFoundException",this.$fault="server",Object.setPrototypeOf(this,Xo.prototype),this.Type=e.Type,this.Message=e.Message}}class Jo extends wo{constructor(e){super({name:"RecursiveInvocationException",$fault:"client",...e}),this.name="RecursiveInvocationException",this.$fault="client",Object.setPrototypeOf(this,Jo.prototype),this.Type=e.Type,this.Message=e.Message}}class Yo extends wo{constructor(e){super({name:"RequestTooLargeException",$fault:"client",...e}),this.name="RequestTooLargeException",this.$fault="client",Object.setPrototypeOf(this,Yo.prototype),this.Type=e.Type}}class Zo extends wo{constructor(e){super({name:"ResourceNotReadyException",$fault:"server",...e}),this.name="ResourceNotReadyException",this.$fault="server",Object.setPrototypeOf(this,Zo.prototype),this.Type=e.Type}}class er extends wo{constructor(e){super({name:"SnapStartException",$fault:"client",...e}),this.name="SnapStartException",this.$fault="client",Object.setPrototypeOf(this,er.prototype),this.Type=e.Type,this.Message=e.Message}}class tr extends wo{constructor(e){super({name:"SnapStartNotReadyException",$fault:"client",...e}),this.name="SnapStartNotReadyException",this.$fault="client",Object.setPrototypeOf(this,tr.prototype),this.Type=e.Type,this.Message=e.Message}}class ir extends wo{constructor(e){super({name:"SnapStartTimeoutException",$fault:"client",...e}),this.name="SnapStartTimeoutException",this.$fault="client",Object.setPrototypeOf(this,ir.prototype),this.Type=e.Type,this.Message=e.Message}}class nr extends wo{constructor(e){super({name:"SubnetIPAddressLimitReachedException",$fault:"server",...e}),this.name="SubnetIPAddressLimitReachedException",this.$fault="server",Object.setPrototypeOf(this,nr.prototype),this.Type=e.Type,this.Message=e.Message}}class sr extends wo{constructor(e){super({name:"UnsupportedMediaTypeException",$fault:"client",...e}),this.name="UnsupportedMediaTypeException",this.$fault="client",Object.setPrototypeOf(this,sr.prototype),this.Type=e.Type}}var ar;!function(e){e.visit=(e,t)=>void 0!==e.PayloadChunk?t.PayloadChunk(e.PayloadChunk):void 0!==e.InvokeComplete?t.InvokeComplete(e.InvokeComplete):t._(e.$unknown[0],e.$unknown[1])}(ar||(ar={}));const or=e=>({...e,...e.Payload&&{Payload:Kt}}),rr=e=>({...e,...e.Payload&&{Payload:Kt}}),cr=async(e,t)=>{const i=function(e,t){return new xe(e,t)}(e,t),n=Fi({},ji,{"content-type":"application/octet-stream",[lc]:e[ec],[dc]:e[ic],[oc]:e[Jr]});i.bp("/2015-03-31/functions/{FunctionName}/invocations"),i.p("FunctionName",(()=>e.FunctionName),"{FunctionName}",!1);const s=Fi({[nc]:[,e[nc]]});let a;return void 0!==e.Payload&&(a=e.Payload),i.m("POST").h(n).q(s).b(a),i.build()},lr=async(e,t)=>{if(200!==e.statusCode&&e.statusCode>=300)return pr(e,t);const i=Fi({$metadata:Xr(e),[Zr]:[,e.headers[cc]],[tc]:[,e.headers[pc]],[Yr]:[,e.headers[rc]]}),n=await ge(e.body,t);return i.Payload=n,Fi(i,{StatusCode:[,e.statusCode]}),i},pr=async(e,t)=>{const i={...e,body:await Qi(e.body,t)},n=((e,t)=>{const i=e=>{let t=e;return"number"==typeof t&&(t=t.toString()),t.indexOf(",")>=0&&(t=t.split(",")[0]),t.indexOf(":")>=0&&(t=t.split(":")[0]),t.indexOf("#")>=0&&(t=t.split("#")[1]),t},n=(s=e.headers,a="x-amzn-errortype",Object.keys(s).find((e=>e.toLowerCase()===a.toLowerCase())));var s,a;return void 0!==n?i(e.headers[n]):void 0!==t.code?i(t.code):void 0!==t.__type?i(t.__type):void 0})(e,i.body);switch(n){case"InvalidParameterValueException":case"com.amazonaws.lambda#InvalidParameterValueException":throw await Cr(i);case"PolicyLengthExceededException":case"com.amazonaws.lambda#PolicyLengthExceededException":throw await Mr(i);case"PreconditionFailedException":case"com.amazonaws.lambda#PreconditionFailedException":throw await Nr(i);case"ResourceConflictException":case"com.amazonaws.lambda#ResourceConflictException":throw await Lr(i);case"ResourceNotFoundException":case"com.amazonaws.lambda#ResourceNotFoundException":throw await Ur(i);case"ServiceException":case"com.amazonaws.lambda#ServiceException":throw await Hr(i);case"TooManyRequestsException":case"com.amazonaws.lambda#TooManyRequestsException":throw await Kr(i);case"CodeSigningConfigNotFoundException":case"com.amazonaws.lambda#CodeSigningConfigNotFoundException":throw await ur(i);case"CodeStorageExceededException":case"com.amazonaws.lambda#CodeStorageExceededException":throw await mr(i);case"CodeVerificationFailedException":case"com.amazonaws.lambda#CodeVerificationFailedException":throw await hr(i);case"InvalidCodeSignatureException":case"com.amazonaws.lambda#InvalidCodeSignatureException":throw await Sr(i);case"ResourceInUseException":case"com.amazonaws.lambda#ResourceInUseException":throw await Fr(i);case"ProvisionedConcurrencyConfigNotFoundException":case"com.amazonaws.lambda#ProvisionedConcurrencyConfigNotFoundException":throw await Dr(i);case"EC2AccessDeniedException":case"com.amazonaws.lambda#EC2AccessDeniedException":throw await fr(i);case"EC2ThrottledException":case"com.amazonaws.lambda#EC2ThrottledException":throw await gr(i);case"EC2UnexpectedException":case"com.amazonaws.lambda#EC2UnexpectedException":throw await yr(i);case"EFSIOException":case"com.amazonaws.lambda#EFSIOException":throw await xr(i);case"EFSMountConnectivityException":case"com.amazonaws.lambda#EFSMountConnectivityException":throw await vr(i);case"EFSMountFailureException":case"com.amazonaws.lambda#EFSMountFailureException":throw await wr(i);case"EFSMountTimeoutException":case"com.amazonaws.lambda#EFSMountTimeoutException":throw await br(i);case"ENILimitReachedException":case"com.amazonaws.lambda#ENILimitReachedException":throw await Er(i);case"InvalidRequestContentException":case"com.amazonaws.lambda#InvalidRequestContentException":throw await Ar(i);case"InvalidRuntimeException":case"com.amazonaws.lambda#InvalidRuntimeException":throw await Ir(i);case"InvalidSecurityGroupIDException":case"com.amazonaws.lambda#InvalidSecurityGroupIDException":throw await Tr(i);case"InvalidSubnetIDException":case"com.amazonaws.lambda#InvalidSubnetIDException":throw await kr(i);case"InvalidZipFileException":case"com.amazonaws.lambda#InvalidZipFileException":throw await Or(i);case"KMSAccessDeniedException":case"com.amazonaws.lambda#KMSAccessDeniedException":throw await Pr(i);case"KMSDisabledException":case"com.amazonaws.lambda#KMSDisabledException":throw await _r(i);case"KMSInvalidStateException":case"com.amazonaws.lambda#KMSInvalidStateException":throw await Rr(i);case"KMSNotFoundException":case"com.amazonaws.lambda#KMSNotFoundException":throw await $r(i);case"RecursiveInvocationException":case"com.amazonaws.lambda#RecursiveInvocationException":throw await jr(i);case"RequestTooLargeException":case"com.amazonaws.lambda#RequestTooLargeException":throw await zr(i);case"ResourceNotReadyException":case"com.amazonaws.lambda#ResourceNotReadyException":throw await Br(i);case"SnapStartException":case"com.amazonaws.lambda#SnapStartException":throw await qr(i);case"SnapStartNotReadyException":case"com.amazonaws.lambda#SnapStartNotReadyException":throw await Vr(i);case"SnapStartTimeoutException":case"com.amazonaws.lambda#SnapStartTimeoutException":throw await Gr(i);case"SubnetIPAddressLimitReachedException":case"com.amazonaws.lambda#SubnetIPAddressLimitReachedException":throw await Wr(i);case"UnsupportedMediaTypeException":case"com.amazonaws.lambda#UnsupportedMediaTypeException":throw await Qr(i);default:const t=i.body;return dr({output:e,parsedBody:t,errorCode:n})}},dr=Ii(wo),ur=async(e,t)=>{const i=Fi({}),n=e.body,s=Ui(n,{Message:ai,Type:ai});Object.assign(i,s);const a=new ko({$metadata:Xr(e),...i});return Ai(a,e.body)},mr=async(e,t)=>{const i=Fi({}),n=e.body,s=Ui(n,{Type:ai,message:ai});Object.assign(i,s);const a=new Oo({$metadata:Xr(e),...i});return Ai(a,e.body)},hr=async(e,t)=>{const i=Fi({}),n=e.body,s=Ui(n,{Message:ai,Type:ai});Object.assign(i,s);const a=new Po({$metadata:Xr(e),...i});return Ai(a,e.body)},fr=async(e,t)=>{const i=Fi({}),n=e.body,s=Ui(n,{Message:ai,Type:ai});Object.assign(i,s);const a=new Mo({$metadata:Xr(e),...i});return Ai(a,e.body)},gr=async(e,t)=>{const i=Fi({}),n=e.body,s=Ui(n,{Message:ai,Type:ai});Object.assign(i,s);const a=new No({$metadata:Xr(e),...i});return Ai(a,e.body)},yr=async(e,t)=>{const i=Fi({}),n=e.body,s=Ui(n,{EC2ErrorCode:ai,Message:ai,Type:ai});Object.assign(i,s);const a=new Do({$metadata:Xr(e),...i});return Ai(a,e.body)},xr=async(e,t)=>{const i=Fi({}),n=e.body,s=Ui(n,{Message:ai,Type:ai});Object.assign(i,s);const a=new jo({$metadata:Xr(e),...i});return Ai(a,e.body)},vr=async(e,t)=>{const i=Fi({}),n=e.body,s=Ui(n,{Message:ai,Type:ai});Object.assign(i,s);const a=new zo({$metadata:Xr(e),...i});return Ai(a,e.body)},wr=async(e,t)=>{const i=Fi({}),n=e.body,s=Ui(n,{Message:ai,Type:ai});Object.assign(i,s);const a=new Lo({$metadata:Xr(e),...i});return Ai(a,e.body)},br=async(e,t)=>{const i=Fi({}),n=e.body,s=Ui(n,{Message:ai,Type:ai});Object.assign(i,s);const a=new Fo({$metadata:Xr(e),...i});return Ai(a,e.body)},Er=async(e,t)=>{const i=Fi({}),n=e.body,s=Ui(n,{Message:ai,Type:ai});Object.assign(i,s);const a=new Uo({$metadata:Xr(e),...i});return Ai(a,e.body)},Sr=async(e,t)=>{const i=Fi({}),n=e.body,s=Ui(n,{Message:ai,Type:ai});Object.assign(i,s);const a=new _o({$metadata:Xr(e),...i});return Ai(a,e.body)},Cr=async(e,t)=>{const i=Fi({}),n=e.body,s=Ui(n,{Type:ai,message:ai});Object.assign(i,s);const a=new bo({$metadata:Xr(e),...i});return Ai(a,e.body)},Ar=async(e,t)=>{const i=Fi({}),n=e.body,s=Ui(n,{Type:ai,message:ai});Object.assign(i,s);const a=new Bo({$metadata:Xr(e),...i});return Ai(a,e.body)},Ir=async(e,t)=>{const i=Fi({}),n=e.body,s=Ui(n,{Message:ai,Type:ai});Object.assign(i,s);const a=new Ho({$metadata:Xr(e),...i});return Ai(a,e.body)},Tr=async(e,t)=>{const i=Fi({}),n=e.body,s=Ui(n,{Message:ai,Type:ai});Object.assign(i,s);const a=new qo({$metadata:Xr(e),...i});return Ai(a,e.body)},kr=async(e,t)=>{const i=Fi({}),n=e.body,s=Ui(n,{Message:ai,Type:ai});Object.assign(i,s);const a=new Vo({$metadata:Xr(e),...i});return Ai(a,e.body)},Or=async(e,t)=>{const i=Fi({}),n=e.body,s=Ui(n,{Message:ai,Type:ai});Object.assign(i,s);const a=new Go({$metadata:Xr(e),...i});return Ai(a,e.body)},Pr=async(e,t)=>{const i=Fi({}),n=e.body,s=Ui(n,{Message:ai,Type:ai});Object.assign(i,s);const a=new Wo({$metadata:Xr(e),...i});return Ai(a,e.body)},_r=async(e,t)=>{const i=Fi({}),n=e.body,s=Ui(n,{Message:ai,Type:ai});Object.assign(i,s);const a=new Ko({$metadata:Xr(e),...i});return Ai(a,e.body)},Rr=async(e,t)=>{const i=Fi({}),n=e.body,s=Ui(n,{Message:ai,Type:ai});Object.assign(i,s);const a=new Qo({$metadata:Xr(e),...i});return Ai(a,e.body)},$r=async(e,t)=>{const i=Fi({}),n=e.body,s=Ui(n,{Message:ai,Type:ai});Object.assign(i,s);const a=new Xo({$metadata:Xr(e),...i});return Ai(a,e.body)},Mr=async(e,t)=>{const i=Fi({}),n=e.body,s=Ui(n,{Type:ai,message:ai});Object.assign(i,s);const a=new Eo({$metadata:Xr(e),...i});return Ai(a,e.body)},Nr=async(e,t)=>{const i=Fi({}),n=e.body,s=Ui(n,{Type:ai,message:ai});Object.assign(i,s);const a=new So({$metadata:Xr(e),...i});return Ai(a,e.body)},Dr=async(e,t)=>{const i=Fi({}),n=e.body,s=Ui(n,{Type:ai,message:ai});Object.assign(i,s);const a=new $o({$metadata:Xr(e),...i});return Ai(a,e.body)},jr=async(e,t)=>{const i=Fi({}),n=e.body,s=Ui(n,{Message:ai,Type:ai});Object.assign(i,s);const a=new Jo({$metadata:Xr(e),...i});return Ai(a,e.body)},zr=async(e,t)=>{const i=Fi({}),n=e.body,s=Ui(n,{Type:ai,message:ai});Object.assign(i,s);const a=new Yo({$metadata:Xr(e),...i});return Ai(a,e.body)},Lr=async(e,t)=>{const i=Fi({}),n=e.body,s=Ui(n,{Type:ai,message:ai});Object.assign(i,s);const a=new Co({$metadata:Xr(e),...i});return Ai(a,e.body)},Fr=async(e,t)=>{const i=Fi({}),n=e.body,s=Ui(n,{Message:ai,Type:ai});Object.assign(i,s);const a=new Ro({$metadata:Xr(e),...i});return Ai(a,e.body)},Ur=async(e,t)=>{const i=Fi({}),n=e.body,s=Ui(n,{Message:ai,Type:ai});Object.assign(i,s);const a=new Ao({$metadata:Xr(e),...i});return Ai(a,e.body)},Br=async(e,t)=>{const i=Fi({}),n=e.body,s=Ui(n,{Type:ai,message:ai});Object.assign(i,s);const a=new Zo({$metadata:Xr(e),...i});return Ai(a,e.body)},Hr=async(e,t)=>{const i=Fi({}),n=e.body,s=Ui(n,{Message:ai,Type:ai});Object.assign(i,s);const a=new Io({$metadata:Xr(e),...i});return Ai(a,e.body)},qr=async(e,t)=>{const i=Fi({}),n=e.body,s=Ui(n,{Message:ai,Type:ai});Object.assign(i,s);const a=new er({$metadata:Xr(e),...i});return Ai(a,e.body)},Vr=async(e,t)=>{const i=Fi({}),n=e.body,s=Ui(n,{Message:ai,Type:ai});Object.assign(i,s);const a=new tr({$metadata:Xr(e),...i});return Ai(a,e.body)},Gr=async(e,t)=>{const i=Fi({}),n=e.body,s=Ui(n,{Message:ai,Type:ai});Object.assign(i,s);const a=new ir({$metadata:Xr(e),...i});return Ai(a,e.body)},Wr=async(e,t)=>{const i=Fi({}),n=e.body,s=Ui(n,{Message:ai,Type:ai});Object.assign(i,s);const a=new nr({$metadata:Xr(e),...i});return Ai(a,e.body)},Kr=async(e,t)=>{const i=Fi({[sc]:[,e.headers[ac]]}),n=e.body,s=Ui(n,{Reason:ai,Type:ai,message:ai});Object.assign(i,s);const a=new To({$metadata:Xr(e),...i});return Ai(a,e.body)},Qr=async(e,t)=>{const i=Fi({}),n=e.body,s=Ui(n,{Type:ai,message:ai});Object.assign(i,s);const a=new sr({$metadata:Xr(e),...i});return Ai(a,e.body)},Xr=e=>({httpStatusCode:e.statusCode,requestId:e.headers["x-amzn-requestid"]??e.headers["x-amzn-request-id"]??e.headers["x-amz-request-id"],extendedRequestId:e.headers["x-amz-id-2"],cfId:e.headers["x-amz-cf-id"]}),Jr="ClientContext",Yr="ExecutedVersion",Zr="FunctionError",ec="InvocationType",tc="LogResult",ic="LogType",nc="Qualifier",sc="retryAfterSeconds",ac="retry-after",oc="x-amz-client-context",rc="x-amz-executed-version",cc="x-amz-function-error",lc="x-amz-invocation-type",pc="x-amz-log-result",dc="x-amz-log-type";class uc extends(Gt.classBuilder().ep(zs).m((function(e,t,i,n){return[B(i,this.serialize,this.deserialize),cs(i,e.getEndpointParameterInstructions())]})).s("AWSGirApiService","Invoke",{}).n("LambdaClient","InvokeCommand").f(or,rr).ser(cr).de(lr).build()){}const mc=e=>new Promise((t=>setTimeout(t,1e3*e))),hc={minDelay:2,maxDelay:120};var fc;!function(e){e.ABORTED="ABORTED",e.FAILURE="FAILURE",e.SUCCESS="SUCCESS",e.RETRY="RETRY",e.TIMEOUT="TIMEOUT"}(fc||(fc={}));const gc=(e,t,i,n)=>{if(n>i)return t;return yc(e,e*2**(n-1))},yc=(e,t)=>e+Math.random()*(t-e),xc=async({minDelay:e,maxDelay:t,maxWaitTime:i,abortController:n,client:s,abortSignal:a},o,r)=>{const{state:c,reason:l}=await r(s,o);if(c!==fc.RETRY)return{state:c,reason:l};let p=1;const d=Date.now()+1e3*i,u=Math.log(t/e)/Math.log(2)+1;for(;;){if(n?.signal?.aborted||a?.aborted)return{state:fc.ABORTED};const i=gc(e,t,u,p);if(Date.now()+1e3*i>d)return{state:fc.TIMEOUT};await mc(i);const{state:c,reason:l}=await r(s,o);if(c!==fc.RETRY)return{state:c,reason:l};p+=1}},vc=async e=>new Promise((t=>{const i=()=>t({state:fc.ABORTED});"function"==typeof e.addEventListener?e.addEventListener("abort",i):e.onabort=i})),wc=async(e,t,i)=>{const n={...hc,...e};(e=>{if(e.maxWaitTime<1)throw new Error("WaiterConfiguration.maxWaitTime must be greater than 0");if(e.minDelay<1)throw new Error("WaiterConfiguration.minDelay must be greater than 0");if(e.maxDelay<1)throw new Error("WaiterConfiguration.maxDelay must be greater than 0");if(e.maxWaitTime<=e.minDelay)throw new Error(`WaiterConfiguration.maxWaitTime [${e.maxWaitTime}] must be greater than WaiterConfiguration.minDelay [${e.minDelay}] for this waiter`);if(e.maxDelay<e.minDelay)throw new Error(`WaiterConfiguration.maxDelay [${e.maxDelay}] must be greater than WaiterConfiguration.minDelay [${e.minDelay}] for this waiter`)})(n);const s=[xc(n,t,i)];return e.abortController&&s.push(vc(e.abortController.signal)),e.abortSignal&&s.push(vc(e.abortSignal)),Promise.race(s)},bc={region:"eu-central-2"};const Ec={name:"hostHeaderMiddleware",step:"build",priority:"low",tags:["HOST"],override:!0},Sc=e=>({applyToStack:t=>{t.add((e=>t=>async i=>{if(!I.isInstance(i.request))return t(i);const{request:n}=i,{handlerProtocol:s=""}=e.requestHandler.metadata||{};if(s.indexOf("h2")>=0&&!n.headers[":authority"])delete n.headers.host,n.headers[":authority"]=n.hostname+(n.port?":"+n.port:"");else if(!n.headers.host){let e=n.hostname;null!=n.port&&(e+=`:${n.port}`),n.headers.host=e}return t(i)})(e),Ec)}}),Cc={name:"loggerMiddleware",tags:["LOGGER"],step:"initialize",override:!0},Ac="X-Amzn-Trace-Id",Ic={step:"build",tags:["RECURSION_DETECTION"],name:"recursionDetectionMiddleware",override:!0,priority:"low"},Tc=e=>({applyToStack:t=>{t.add((e=>t=>async i=>{const{request:n}=i;if(!I.isInstance(n)||"node"!==e.runtime||n.headers.hasOwnProperty(Ac))return t(i);const s=[]._X_AMZN_TRACE_ID,a=e=>"string"==typeof e&&e.length>0;return a([].AWS_LAMBDA_FUNCTION_NAME)&&a(s)&&(n.headers[Ac]=s),t({...i,request:n})})(e),Ic)}});const kc=(e,t=!1)=>{if(t){for(const t of e.split("."))if(!kc(t))return!1;return!0}return!!Pe(e)&&(!(e.length<3||e.length>63)&&(e===e.toLowerCase()&&!ke(e)))};let Oc={partitions:[{id:"aws",outputs:{dnsSuffix:"amazonaws.com",dualStackDnsSuffix:"api.aws",implicitGlobalRegion:"us-east-1",name:"aws",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^(us|eu|ap|sa|ca|me|af|il|mx)\\-\\w+\\-\\d+$",regions:{"af-south-1":{description:"Africa (Cape Town)"},"ap-east-1":{description:"Asia Pacific (Hong Kong)"},"ap-northeast-1":{description:"Asia Pacific (Tokyo)"},"ap-northeast-2":{description:"Asia Pacific (Seoul)"},"ap-northeast-3":{description:"Asia Pacific (Osaka)"},"ap-south-1":{description:"Asia Pacific (Mumbai)"},"ap-south-2":{description:"Asia Pacific (Hyderabad)"},"ap-southeast-1":{description:"Asia Pacific (Singapore)"},"ap-southeast-2":{description:"Asia Pacific (Sydney)"},"ap-southeast-3":{description:"Asia Pacific (Jakarta)"},"ap-southeast-4":{description:"Asia Pacific (Melbourne)"},"ap-southeast-5":{description:"Asia Pacific (Malaysia)"},"aws-global":{description:"AWS Standard global region"},"ca-central-1":{description:"Canada (Central)"},"ca-west-1":{description:"Canada West (Calgary)"},"eu-central-1":{description:"Europe (Frankfurt)"},"eu-central-2":{description:"Europe (Zurich)"},"eu-north-1":{description:"Europe (Stockholm)"},"eu-south-1":{description:"Europe (Milan)"},"eu-south-2":{description:"Europe (Spain)"},"eu-west-1":{description:"Europe (Ireland)"},"eu-west-2":{description:"Europe (London)"},"eu-west-3":{description:"Europe (Paris)"},"il-central-1":{description:"Israel (Tel Aviv)"},"me-central-1":{description:"Middle East (UAE)"},"me-south-1":{description:"Middle East (Bahrain)"},"sa-east-1":{description:"South America (Sao Paulo)"},"us-east-1":{description:"US East (N. Virginia)"},"us-east-2":{description:"US East (Ohio)"},"us-west-1":{description:"US West (N. California)"},"us-west-2":{description:"US West (Oregon)"}}},{id:"aws-cn",outputs:{dnsSuffix:"amazonaws.com.cn",dualStackDnsSuffix:"api.amazonwebservices.com.cn",implicitGlobalRegion:"cn-northwest-1",name:"aws-cn",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^cn\\-\\w+\\-\\d+$",regions:{"aws-cn-global":{description:"AWS China global region"},"cn-north-1":{description:"China (Beijing)"},"cn-northwest-1":{description:"China (Ningxia)"}}},{id:"aws-us-gov",outputs:{dnsSuffix:"amazonaws.com",dualStackDnsSuffix:"api.aws",implicitGlobalRegion:"us-gov-west-1",name:"aws-us-gov",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^us\\-gov\\-\\w+\\-\\d+$",regions:{"aws-us-gov-global":{description:"AWS GovCloud (US) global region"},"us-gov-east-1":{description:"AWS GovCloud (US-East)"},"us-gov-west-1":{description:"AWS GovCloud (US-West)"}}},{id:"aws-iso",outputs:{dnsSuffix:"c2s.ic.gov",dualStackDnsSuffix:"c2s.ic.gov",implicitGlobalRegion:"us-iso-east-1",name:"aws-iso",supportsDualStack:!1,supportsFIPS:!0},regionRegex:"^us\\-iso\\-\\w+\\-\\d+$",regions:{"aws-iso-global":{description:"AWS ISO (US) global region"},"us-iso-east-1":{description:"US ISO East"},"us-iso-west-1":{description:"US ISO WEST"}}},{id:"aws-iso-b",outputs:{dnsSuffix:"sc2s.sgov.gov",dualStackDnsSuffix:"sc2s.sgov.gov",implicitGlobalRegion:"us-isob-east-1",name:"aws-iso-b",supportsDualStack:!1,supportsFIPS:!0},regionRegex:"^us\\-isob\\-\\w+\\-\\d+$",regions:{"aws-iso-b-global":{description:"AWS ISOB (US) global region"},"us-isob-east-1":{description:"US ISOB East (Ohio)"}}},{id:"aws-iso-e",outputs:{dnsSuffix:"cloud.adc-e.uk",dualStackDnsSuffix:"cloud.adc-e.uk",implicitGlobalRegion:"eu-isoe-west-1",name:"aws-iso-e",supportsDualStack:!1,supportsFIPS:!0},regionRegex:"^eu\\-isoe\\-\\w+\\-\\d+$",regions:{"eu-isoe-west-1":{description:"EU ISOE West"}}},{id:"aws-iso-f",outputs:{dnsSuffix:"csp.hci.ic.gov",dualStackDnsSuffix:"csp.hci.ic.gov",implicitGlobalRegion:"us-isof-south-1",name:"aws-iso-f",supportsDualStack:!1,supportsFIPS:!0},regionRegex:"^us\\-isof\\-\\w+\\-\\d+$",regions:{}}],version:"1.1"};const Pc={isVirtualHostableS3Bucket:kc,parseArn:e=>{const t=e.split(":");if(t.length<6)return null;const[i,n,s,a,o,...r]=t;if("arn"!==i||""===n||""===s||""===r.join(":"))return null;return{partition:n,service:s,region:a,accountId:o,resourceId:r.map((e=>e.split("/"))).flat()}},partition:e=>{const{partitions:t}=Oc;for(const i of t){const{regions:t,outputs:n}=i;for(const[i,s]of Object.entries(t))if(i===e)return{...n,...s}}for(const i of t){const{regionRegex:t,outputs:n}=i;if(new RegExp(t).test(e))return{...n}}const i=t.find((e=>"aws"===e.id));if(!i)throw new Error("Provided region was not found in the partition array or regex, and default partition with id 'aws' doesn't exist.");return{...i.outputs}}};function _c(e,t,i){e.__aws_sdk_context?e.__aws_sdk_context.features||(e.__aws_sdk_context.features={}):e.__aws_sdk_context={features:{}},e.__aws_sdk_context.features[t]=i}_e.aws=Pc;const Rc=e=>T.isInstance(e)?e.headers?.date??e.headers?.Date:void 0,$c=e=>new Date(Date.now()+e),Mc=(e,t)=>{const i=Date.parse(e);return((e,t)=>Math.abs($c(t).getTime()-e)>=3e5)(i,t)?i-Date.now():t},Nc=(e,t)=>{if(!t)throw new Error(`Property \`${e}\` is not resolved for AWS SDK SigV4Auth`);return t};class Dc{async sign(e,t,i){if(!I.isInstance(e))throw new Error("The request is not an instance of `HttpRequest` and cannot be signed");const n=await(async e=>{const t=Nc("context",e.context),i=Nc("config",e.config),n=t.endpointV2?.properties?.authSchemes?.[0],s=Nc("signer",i.signer),a=await s(n),o=e?.signingRegion,r=e?.signingRegionSet,c=e?.signingName;return{config:i,signer:a,signingRegion:o,signingRegionSet:r,signingName:c}})(i),{config:s,signer:a}=n;let{signingRegion:o,signingName:r}=n;const c=i.context;if(c?.authSchemes?.length){const[e,t]=c.authSchemes;"sigv4a"===e?.name&&"sigv4"===t?.name&&(o=t?.signingRegion??o,r=t?.signingName??r)}return await a.sign(e,{signingDate:$c(s.systemClockOffset),signingRegion:o,signingService:r})}errorHandler(e){return t=>{const i=t.ServerTime??Rc(t.$response);if(i){const n=Nc("config",e.config),s=n.systemClockOffset;n.systemClockOffset=Mc(i,n.systemClockOffset);n.systemClockOffset!==s&&t.$metadata&&(t.$metadata.clockSkewCorrected=!0)}throw t}}successHandler(e,t){const i=Rc(e);if(i){const e=Nc("config",t.config);e.systemClockOffset=Mc(i,e.systemClockOffset)}}}const jc=(e,t)=>((e,t)=>ge(e,t).then((e=>t.utf8Encoder(e))))(e,t).then((e=>{if(e.length)try{return JSON.parse(e)}catch(t){throw"SyntaxError"===t?.name&&Object.defineProperty(t,"$responseBodyText",{value:e}),t}return{}})),zc=async(e,t)=>{const i=await jc(e,t);return i.message=i.message??i.Message,i},Lc=/\d{12}\.ddb/;const Fc="user-agent",Uc="x-amz-user-agent",Bc=/[^\!\$\%\&\'\*\+\-\.\^\_\`\|\~\d\w]/g,Hc=/[^\!\$\%\&\'\*\+\-\.\^\_\`\|\~\d\w\#]/g;const qc=e=>(t,i)=>async n=>{const{request:s}=n;if(!I.isInstance(s))return t(n);const{headers:a}=s,o=i?.userAgent?.map(Vc)||[],r=(await e.defaultUserAgentProvider()).map(Vc);await async function(e,t,i){const n=i.request;if("rpc-v2-cbor"===n?.headers?.["smithy-protocol"]&&_c(e,"PROTOCOL_RPC_V2_CBOR","M"),"function"==typeof t.retryStrategy){const i=await t.retryStrategy();"function"==typeof i.acquireInitialRetryToken?i.constructor?.name?.includes("Adaptive")?_c(e,"RETRY_MODE_ADAPTIVE","F"):_c(e,"RETRY_MODE_STANDARD","E"):_c(e,"RETRY_MODE_LEGACY","D")}if("function"==typeof t.accountIdEndpointMode){const i=e.endpointV2;switch(String(i?.url?.hostname).match(Lc)&&_c(e,"ACCOUNT_ID_ENDPOINT","O"),await(t.accountIdEndpointMode?.())){case"disabled":_c(e,"ACCOUNT_ID_MODE_DISABLED","Q");break;case"preferred":_c(e,"ACCOUNT_ID_MODE_PREFERRED","P");break;case"required":_c(e,"ACCOUNT_ID_MODE_REQUIRED","R")}}const s=e.__smithy_context?.selectedHttpAuthScheme?.identity;if(s?.$source){const t=s;t.accountId&&_c(e,"RESOLVED_ACCOUNT_ID","T");for(const[i,n]of Object.entries(t.$source??{}))_c(e,i,n)}}(i,e,n);const c=i;r.push(`m/${function(e){let t="";for(const i in e){const n=e[i];if(!(t.length+n.length+1<=1024))break;t.length?t+=","+n:t+=n}return t}(Object.assign({},i.__smithy_context?.features,c.__aws_sdk_context?.features))}`);const l=e?.customUserAgent?.map(Vc)||[],p=await e.userAgentAppId();p&&r.push(Vc([`app/${p}`]));const d=[].concat([...r,...o,...l]).join(" "),u=[...r.filter((e=>e.startsWith("aws-sdk-"))),...l].join(" ");return"browser"!==e.runtime?(u&&(a[Uc]=a[Uc]?`${a[Fc]} ${u}`:u),a[Fc]=d):a[Uc]=d,t({...n,request:s})},Vc=e=>{const t=e[0].split("/").map((e=>e.replace(Bc,"-"))).join("/"),i=e[1]?.replace(Hc,"-"),n=t.indexOf("/"),s=t.substring(0,n);let a=t.substring(n+1);return"api"===s&&(a=a.toLowerCase()),[s,a,i].filter((e=>e&&e.length>0)).reduce(((e,t,i)=>{switch(i){case 0:return t;case 1:return`${e}/${t}`;default:return`${e}#${t}`}}),"")},Gc={name:"getUserAgentMiddleware",step:"build",priority:"low",tags:["SET_USER_AGENT","USER_AGENT"],override:!0},Wc=async(e,t,i)=>({operation:N(t).operation,region:await D(e.region)()||(()=>{throw new Error("expected `region` to be configured for `aws.auth#sigv4`")})()});const Kc=e=>{const t=[];return e.operation,t.push(function(e){return{schemeId:"aws.auth#sigv4",signingProperties:{name:"ssm",region:e.region},propertiesExtractor:(e,t)=>({signingProperties:{config:e,context:t}})}}(e)),t},Qc=e=>{const t=(e=>{let t,i=!1;e.credentials&&(i=!0,t=Ce(e.credentials,be,Se)),t||(t=e.credentialDefaultProvider?W(e.credentialDefaultProvider(Object.assign({},e,{parentClientConfig:e}))):async()=>{throw new Error("`credentials` is missing")});const{signingEscapePath:n=!0,systemClockOffset:s=e.systemClockOffset||0,sha256:a}=e;let o;return o=e.signer?W(e.signer):e.regionInfoProvider?()=>W(e.region)().then((async t=>[await e.regionInfoProvider(t,{useFipsEndpoint:await e.useFipsEndpoint(),useDualstackEndpoint:await e.useDualstackEndpoint()})||{},t])).then((([i,s])=>{const{signingRegion:o,signingService:r}=i;e.signingRegion=e.signingRegion||o||s,e.signingName=e.signingName||r||e.serviceId;const c={...e,credentials:t,region:e.signingRegion,service:e.signingName,sha256:a,uriEscapePath:n};return new(e.signerConstructor||Dt)(c)})):async i=>{const s=(i=Object.assign({},{name:"sigv4",signingName:e.signingName||e.defaultSigningName,signingRegion:await W(e.region)(),properties:{}},i)).signingRegion,o=i.signingName;e.signingRegion=e.signingRegion||s,e.signingName=e.signingName||o||e.serviceId;const r={...e,credentials:t,region:e.signingRegion,service:e.signingName,sha256:a,uriEscapePath:n};return new(e.signerConstructor||Dt)(r)},{...e,systemClockOffset:s,signingEscapePath:n,credentials:i?async()=>t().then((e=>{return i="CREDENTIALS_CODE",n="e",(t=e).$source||(t.$source={}),t.$source[i]=n,t;var t,i,n})):t,signer:o}})(e);return{...t}},Xc={UseFIPS:{type:"builtInParams",name:"useFipsEndpoint"},Endpoint:{type:"builtInParams",name:"endpoint"},Region:{type:"builtInParams",name:"region"},UseDualStack:{type:"builtInParams",name:"useDualstackEndpoint"}};var Jc="3.682.0";const Yc=({serviceId:e,clientVersion:t})=>async i=>{const n="undefined"!=typeof window&&window?.navigator?.userAgent?la.parse(window.navigator.userAgent):void 0,s=[["aws-sdk-js",t],["ua","2.1"],[`os/${n?.os?.name||"other"}`,n?.os?.version],["lang/js"],["md/browser",`${n?.browser?.name??"unknown"}_${n?.browser?.version??"unknown"}`]];e&&s.push([`api/${e}`,t]);const a=await(i?.userAgentAppId?.());return a&&s.push([`app/${a}`]),s};function Zc(e=0){return new Promise(((t,i)=>{e&&setTimeout((()=>{const t=new Error(`Request did not complete within ${e} ms`);t.name="TimeoutError",i(t)}),e)}))}const el={supported:void 0};class tl{static create(e){return"function"==typeof e?.handle?e:new tl(e)}constructor(e){"function"==typeof e?this.configProvider=e().then((e=>e||{})):(this.config=e??{},this.configProvider=Promise.resolve(this.config)),void 0===el.supported&&(el.supported=Boolean("undefined"!=typeof Request&&"keepalive"in new Request("https://[::1]")))}destroy(){}async handle(e,{abortSignal:t}={}){this.config||(this.config=await this.configProvider);const i=this.config.requestTimeout,n=!0===this.config.keepAlive,s=this.config.credentials;if(t?.aborted){const e=new Error("Request aborted");return e.name="AbortError",Promise.reject(e)}let a=e.path;const o=re(e.query||{});o&&(a+=`?${o}`),e.fragment&&(a+=`#${e.fragment}`);let r="";if(null!=e.username||null!=e.password){r=`${e.username??""}:${e.password??""}@`}const{port:c,method:l}=e,p=`${e.protocol}//${r}${e.hostname}${c?`:${c}`:""}${a}`,d="GET"===l||"HEAD"===l?void 0:e.body,u={body:d,headers:new Headers(e.headers),method:l,credentials:s};this.config?.cache&&(u.cache=this.config.cache),d&&(u.duplex="half"),"undefined"!=typeof AbortController&&(u.signal=t),el.supported&&(u.keepalive=n),"function"==typeof this.config.requestInit&&Object.assign(u,this.config.requestInit(e));let m=()=>{};const h=new Request(p,u),f=[fetch(h).then((e=>{const t=e.headers,i={};for(const e of t.entries())i[e[0]]=e[1];return null!=e.body?{response:new T({headers:i,reason:e.statusText,statusCode:e.status,body:e.body})}:e.blob().then((t=>({response:new T({headers:i,reason:e.statusText,statusCode:e.status,body:t})})))})),Zc(i)];return t&&f.push(new Promise(((e,i)=>{const n=()=>{const e=new Error("Request aborted");e.name="AbortError",i(e)};if("function"==typeof t.addEventListener){const e=t;e.addEventListener("abort",n,{once:!0}),m=()=>e.removeEventListener("abort",n)}else t.onabort=n}))),Promise.race(f).finally(m)}updateHttpClientConfig(e,t){this.config=void 0,this.configProvider=this.configProvider.then((i=>(i[e]=t,i)))}httpHandlerConfigs(){return this.config??{}}}const il=e=>"function"==typeof Blob&&e instanceof Blob?async function(e){const t=await function(e){return new Promise(((t,i)=>{const n=new FileReader;n.onloadend=()=>{if(2!==n.readyState)return i(new Error("Reader aborted too early"));const e=n.result??"",s=e.indexOf(","),a=s>-1?s+1:e.length;t(e.substring(a))},n.onabort=()=>i(new Error("Read aborted")),n.onerror=()=>i(n.error),n.readAsDataURL(e)}))}(e),i=Z(t);return new Uint8Array(i)}(e):async function(e){const t=[],i=e.getReader();let n=!1,s=0;for(;!n;){const{done:e,value:a}=await i.read();a&&(t.push(a),s+=a.length),n=e}const a=new Uint8Array(s);let o=0;for(const e of t)a.set(e,o),o+=e.length;return a}(e);const nl="required",sl="fn",al="argv",ol="ref",rl=!0,cl="isSet",ll="booleanEquals",pl="error",dl="endpoint",ul="tree",ml="PartitionResult",hl="getAttr",fl={[nl]:!1,type:"String"},gl={[nl]:!0,default:!1,type:"Boolean"},yl={[ol]:"Endpoint"},xl={[sl]:ll,[al]:[{[ol]:"UseFIPS"},!0]},vl={[sl]:ll,[al]:[{[ol]:"UseDualStack"},!0]},wl={},bl={[sl]:hl,[al]:[{[ol]:ml},"supportsFIPS"]},El={[ol]:ml},Sl={[sl]:ll,[al]:[!0,{[sl]:hl,[al]:[El,"supportsDualStack"]}]},Cl=[xl],Al=[vl],Il=[{[ol]:"Region"}],Tl={version:"1.0",parameters:{Region:fl,UseDualStack:gl,UseFIPS:gl,Endpoint:fl},rules:[{conditions:[{[sl]:cl,[al]:[yl]}],rules:[{conditions:Cl,error:"Invalid Configuration: FIPS and custom endpoint are not supported",type:pl},{conditions:Al,error:"Invalid Configuration: Dualstack and custom endpoint are not supported",type:pl},{endpoint:{url:yl,properties:wl,headers:wl},type:dl}],type:ul},{conditions:[{[sl]:cl,[al]:Il}],rules:[{conditions:[{[sl]:"aws.partition",[al]:Il,assign:ml}],rules:[{conditions:[xl,vl],rules:[{conditions:[{[sl]:ll,[al]:[rl,bl]},Sl],rules:[{endpoint:{url:"https://ssm-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:wl,headers:wl},type:dl}],type:ul},{error:"FIPS and DualStack are enabled, but this partition does not support one or both",type:pl}],type:ul},{conditions:Cl,rules:[{conditions:[{[sl]:ll,[al]:[bl,rl]}],rules:[{conditions:[{[sl]:"stringEquals",[al]:[{[sl]:hl,[al]:[El,"name"]},"aws-us-gov"]}],endpoint:{url:"https://ssm.{Region}.amazonaws.com",properties:wl,headers:wl},type:dl},{endpoint:{url:"https://ssm-fips.{Region}.{PartitionResult#dnsSuffix}",properties:wl,headers:wl},type:dl}],type:ul},{error:"FIPS is enabled but this partition does not support FIPS",type:pl}],type:ul},{conditions:Al,rules:[{conditions:[Sl],rules:[{endpoint:{url:"https://ssm.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:wl,headers:wl},type:dl}],type:ul},{error:"DualStack is enabled but this partition does not support DualStack",type:pl}],type:ul},{endpoint:{url:"https://ssm.{Region}.{PartitionResult#dnsSuffix}",properties:wl,headers:wl},type:dl}],type:ul}],type:ul},{error:"Invalid Configuration: Missing Region",type:pl}]},kl=new Ie({size:50,params:["Endpoint","Region","UseDualStack","UseFIPS"]}),Ol=(e,t={})=>kl.get(e,(()=>Je(Tl,{endpointParams:e,logger:t.logger})));_e.aws=Pc;const Pl=e=>{const t=mo(e),i=()=>t().then(ki),n=(e=>({apiVersion:"2014-11-06",base64Decoder:e?.base64Decoder??Z,base64Encoder:e?.base64Encoder??ne,disableHostPrefix:e?.disableHostPrefix??!1,endpointProvider:e?.endpointProvider??Ol,extensions:e?.extensions??[],httpAuthSchemeProvider:e?.httpAuthSchemeProvider??Kc,httpAuthSchemes:e?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:e=>e.getIdentityProvider("aws.auth#sigv4"),signer:new Dc}],logger:e?.logger??new Li,serviceId:e?.serviceId??"SSM",urlParser:e?.urlParser??ns,utf8Decoder:e?.utf8Decoder??ee,utf8Encoder:e?.utf8Encoder??ie}))(e);return{...n,...e,runtime:"browser",defaultsMode:t,bodyLengthChecker:e?.bodyLengthChecker??La,credentialDefaultProvider:e?.credentialDefaultProvider??(e=>()=>Promise.reject(new Error("Credential is missing"))),defaultUserAgentProvider:e?.defaultUserAgentProvider??Yc({serviceId:n.serviceId,clientVersion:Jc}),maxAttempts:e?.maxAttempts??3,region:e?.region??ja("Region is missing"),requestHandler:tl.create(e?.requestHandler??i),retryMode:e?.retryMode??(async()=>(await i()).retryMode||ds),sha256:e?.sha256??oa,streamCollector:e?.streamCollector??il,useDualstackEndpoint:e?.useDualstackEndpoint??(()=>Promise.resolve(Bn)),useFipsEndpoint:e?.useFipsEndpoint??(()=>Promise.resolve(Hn))}},_l=e=>{let t=async()=>{if(void 0===e.region)throw new Error("Region is missing from runtimeConfig");const t=e.region;return"string"==typeof t?t:t()};return{setRegion(e){t=e},region:()=>t}},Rl=e=>{const t=e.httpAuthSchemes;let i=e.httpAuthSchemeProvider,n=e.credentials;return{setHttpAuthScheme(e){const i=t.findIndex((t=>t.schemeId===e.schemeId));-1===i?t.push(e):t.splice(i,1,e)},httpAuthSchemes:()=>t,setHttpAuthSchemeProvider(e){i=e},httpAuthSchemeProvider:()=>i,setCredentials(e){n=e},credentials:()=>n}};class $l extends Vt{constructor(...[e]){const t=Pl(e||{});var i;const n=function(e){const t=W(e.userAgentAppId??void 0);return{...e,customUserAgent:"string"==typeof e.customUserAgent?[[e.customUserAgent]]:e.customUserAgent,userAgentAppId:async()=>{const i=await t();if(!function(e){return void 0===e||"string"==typeof e&&e.length<=50}(i)){const t="NoOpLogger"!==e.logger?.constructor?.name&&e.logger?e.logger:console;"string"!=typeof i?t?.warn("userAgentAppId must be a string or undefined."):i.length>50&&t?.warn("The provided userAgentAppId exceeds the maximum length of 50 characters.")}return i}}}((i=t,{...i,useDualstackEndpoint:i.useDualstackEndpoint??!1,useFipsEndpoint:i.useFipsEndpoint??!1,defaultSigningName:"ssm"})),s=ks(n),a=Gn(s),o=ls(a),r=((e,t)=>{const i={..._l(e),...$i(e),...g(e),...Rl(e)};return t.forEach((e=>e.configure(i))),{...e,...(s=i,{region:s.region()}),...Mi(i),...y(i),...(n=i,{httpAuthSchemes:n.httpAuthSchemes(),httpAuthSchemeProvider:n.httpAuthSchemeProvider(),credentials:n.credentials()})};var n,s})(Qc(o),e?.extensions||[]);var c;super(r),this.config=r,this.middlewareStack.use((c=this.config,{applyToStack:e=>{e.add(qc(c),Gc)}})),this.middlewareStack.use(Ms(this.config)),this.middlewareStack.use(Qn(this.config)),this.middlewareStack.use(Sc(this.config)),this.middlewareStack.use((this.config,{applyToStack:e=>{e.add(((e,t)=>async i=>{try{const n=await e(i),{clientName:s,commandName:a,logger:o,dynamoDbDocumentClientOptions:r={}}=t,{overrideInputFilterSensitiveLog:c,overrideOutputFilterSensitiveLog:l}=r,p=c??t.inputFilterSensitiveLog,d=l??t.outputFilterSensitiveLog,{$metadata:u,...m}=n.output;return o?.info?.({clientName:s,commandName:a,input:p(i.input),output:d(m),metadata:u}),n}catch(e){const{clientName:n,commandName:s,logger:a,dynamoDbDocumentClientOptions:o={}}=t,{overrideInputFilterSensitiveLog:r}=o,c=r??t.inputFilterSensitiveLog;throw a?.error?.({clientName:n,commandName:s,input:c(i.input),error:e,metadata:e.$metadata}),e}}),Cc)}})),this.middlewareStack.use(Tc(this.config)),this.middlewareStack.use(L(this.config,{httpAuthSchemeParametersProvider:Wc,identityProviderConfigProvider:async e=>new we({"aws.auth#sigv4":e.credentials})})),this.middlewareStack.use(G(this.config))}destroy(){super.destroy()}}class Ml extends Ci{constructor(e){super(e),Object.setPrototypeOf(this,Ml.prototype)}}class Nl extends Ml{constructor(e){super({name:"InternalServerError",$fault:"server",...e}),this.name="InternalServerError",this.$fault="server",Object.setPrototypeOf(this,Nl.prototype),this.Message=e.Message}}class Dl extends Ml{constructor(e){super({name:"InvalidResourceId",$fault:"client",...e}),this.name="InvalidResourceId",this.$fault="client",Object.setPrototypeOf(this,Dl.prototype)}}class jl extends Ml{constructor(e){super({name:"InvalidResourceType",$fault:"client",...e}),this.name="InvalidResourceType",this.$fault="client",Object.setPrototypeOf(this,jl.prototype)}}class zl extends Ml{constructor(e){super({name:"TooManyTagsError",$fault:"client",...e}),this.name="TooManyTagsError",this.$fault="client",Object.setPrototypeOf(this,zl.prototype)}}class Ll extends Ml{constructor(e){super({name:"TooManyUpdates",$fault:"client",...e}),this.name="TooManyUpdates",this.$fault="client",Object.setPrototypeOf(this,Ll.prototype),this.Message=e.Message}}let Fl=class e extends Ml{constructor(t){super({name:"AlreadyExistsException",$fault:"client",...t}),this.name="AlreadyExistsException",this.$fault="client",Object.setPrototypeOf(this,e.prototype),this.Message=t.Message}};class Ul extends Ml{constructor(e){super({name:"OpsItemConflictException",$fault:"client",...e}),this.name="OpsItemConflictException",this.$fault="client",Object.setPrototypeOf(this,Ul.prototype),this.Message=e.Message}}class Bl extends Ml{constructor(e){super({name:"OpsItemInvalidParameterException",$fault:"client",...e}),this.name="OpsItemInvalidParameterException",this.$fault="client",Object.setPrototypeOf(this,Bl.prototype),this.ParameterNames=e.ParameterNames,this.Message=e.Message}}class Hl extends Ml{constructor(e){super({name:"OpsItemLimitExceededException",$fault:"client",...e}),this.name="OpsItemLimitExceededException",this.$fault="client",Object.setPrototypeOf(this,Hl.prototype),this.ResourceTypes=e.ResourceTypes,this.Limit=e.Limit,this.LimitType=e.LimitType,this.Message=e.Message}}class ql extends Ml{constructor(e){super({name:"OpsItemNotFoundException",$fault:"client",...e}),this.name="OpsItemNotFoundException",this.$fault="client",Object.setPrototypeOf(this,ql.prototype),this.Message=e.Message}}class Vl extends Ml{constructor(e){super({name:"OpsItemRelatedItemAlreadyExistsException",$fault:"client",...e}),this.name="OpsItemRelatedItemAlreadyExistsException",this.$fault="client",Object.setPrototypeOf(this,Vl.prototype),this.Message=e.Message,this.ResourceUri=e.ResourceUri,this.OpsItemId=e.OpsItemId}}class Gl extends Ml{constructor(e){super({name:"DuplicateInstanceId",$fault:"client",...e}),this.name="DuplicateInstanceId",this.$fault="client",Object.setPrototypeOf(this,Gl.prototype)}}class Wl extends Ml{constructor(e){super({name:"InvalidCommandId",$fault:"client",...e}),this.name="InvalidCommandId",this.$fault="client",Object.setPrototypeOf(this,Wl.prototype)}}class Kl extends Ml{constructor(e){super({name:"InvalidInstanceId",$fault:"client",...e}),this.name="InvalidInstanceId",this.$fault="client",Object.setPrototypeOf(this,Kl.prototype),this.Message=e.Message}}class Ql extends Ml{constructor(e){super({name:"DoesNotExistException",$fault:"client",...e}),this.name="DoesNotExistException",this.$fault="client",Object.setPrototypeOf(this,Ql.prototype),this.Message=e.Message}}class Xl extends Ml{constructor(e){super({name:"InvalidParameters",$fault:"client",...e}),this.name="InvalidParameters",this.$fault="client",Object.setPrototypeOf(this,Xl.prototype),this.Message=e.Message}}class Jl extends Ml{constructor(e){super({name:"AssociationAlreadyExists",$fault:"client",...e}),this.name="AssociationAlreadyExists",this.$fault="client",Object.setPrototypeOf(this,Jl.prototype)}}class Yl extends Ml{constructor(e){super({name:"AssociationLimitExceeded",$fault:"client",...e}),this.name="AssociationLimitExceeded",this.$fault="client",Object.setPrototypeOf(this,Yl.prototype)}}class Zl extends Ml{constructor(e){super({name:"InvalidDocument",$fault:"client",...e}),this.name="InvalidDocument",this.$fault="client",Object.setPrototypeOf(this,Zl.prototype),this.Message=e.Message}}class ep extends Ml{constructor(e){super({name:"InvalidDocumentVersion",$fault:"client",...e}),this.name="InvalidDocumentVersion",this.$fault="client",Object.setPrototypeOf(this,ep.prototype),this.Message=e.Message}}class tp extends Ml{constructor(e){super({name:"InvalidOutputLocation",$fault:"client",...e}),this.name="InvalidOutputLocation",this.$fault="client",Object.setPrototypeOf(this,tp.prototype)}}class ip extends Ml{constructor(e){super({name:"InvalidSchedule",$fault:"client",...e}),this.name="InvalidSchedule",this.$fault="client",Object.setPrototypeOf(this,ip.prototype),this.Message=e.Message}}class np extends Ml{constructor(e){super({name:"InvalidTag",$fault:"client",...e}),this.name="InvalidTag",this.$fault="client",Object.setPrototypeOf(this,np.prototype),this.Message=e.Message}}class sp extends Ml{constructor(e){super({name:"InvalidTarget",$fault:"client",...e}),this.name="InvalidTarget",this.$fault="client",Object.setPrototypeOf(this,sp.prototype),this.Message=e.Message}}class ap extends Ml{constructor(e){super({name:"InvalidTargetMaps",$fault:"client",...e}),this.name="InvalidTargetMaps",this.$fault="client",Object.setPrototypeOf(this,ap.prototype),this.Message=e.Message}}class op extends Ml{constructor(e){super({name:"UnsupportedPlatformType",$fault:"client",...e}),this.name="UnsupportedPlatformType",this.$fault="client",Object.setPrototypeOf(this,op.prototype),this.Message=e.Message}}class rp extends Ml{constructor(e){super({name:"DocumentAlreadyExists",$fault:"client",...e}),this.name="DocumentAlreadyExists",this.$fault="client",Object.setPrototypeOf(this,rp.prototype),this.Message=e.Message}}class cp extends Ml{constructor(e){super({name:"DocumentLimitExceeded",$fault:"client",...e}),this.name="DocumentLimitExceeded",this.$fault="client",Object.setPrototypeOf(this,cp.prototype),this.Message=e.Message}}class lp extends Ml{constructor(e){super({name:"InvalidDocumentContent",$fault:"client",...e}),this.name="InvalidDocumentContent",this.$fault="client",Object.setPrototypeOf(this,lp.prototype),this.Message=e.Message}}class pp extends Ml{constructor(e){super({name:"InvalidDocumentSchemaVersion",$fault:"client",...e}),this.name="InvalidDocumentSchemaVersion",this.$fault="client",Object.setPrototypeOf(this,pp.prototype),this.Message=e.Message}}class dp extends Ml{constructor(e){super({name:"MaxDocumentSizeExceeded",$fault:"client",...e}),this.name="MaxDocumentSizeExceeded",this.$fault="client",Object.setPrototypeOf(this,dp.prototype),this.Message=e.Message}}class up extends Ml{constructor(e){super({name:"IdempotentParameterMismatch",$fault:"client",...e}),this.name="IdempotentParameterMismatch",this.$fault="client",Object.setPrototypeOf(this,up.prototype),this.Message=e.Message}}class mp extends Ml{constructor(e){super({name:"ResourceLimitExceededException",$fault:"client",...e}),this.name="ResourceLimitExceededException",this.$fault="client",Object.setPrototypeOf(this,mp.prototype),this.Message=e.Message}}class hp extends Ml{constructor(e){super({name:"OpsItemAccessDeniedException",$fault:"client",...e}),this.name="OpsItemAccessDeniedException",this.$fault="client",Object.setPrototypeOf(this,hp.prototype),this.Message=e.Message}}class fp extends Ml{constructor(e){super({name:"OpsItemAlreadyExistsException",$fault:"client",...e}),this.name="OpsItemAlreadyExistsException",this.$fault="client",Object.setPrototypeOf(this,fp.prototype),this.Message=e.Message,this.OpsItemId=e.OpsItemId}}class gp extends Ml{constructor(e){super({name:"OpsMetadataAlreadyExistsException",$fault:"client",...e}),this.name="OpsMetadataAlreadyExistsException",this.$fault="client",Object.setPrototypeOf(this,gp.prototype)}}class yp extends Ml{constructor(e){super({name:"OpsMetadataInvalidArgumentException",$fault:"client",...e}),this.name="OpsMetadataInvalidArgumentException",this.$fault="client",Object.setPrototypeOf(this,yp.prototype)}}class xp extends Ml{constructor(e){super({name:"OpsMetadataLimitExceededException",$fault:"client",...e}),this.name="OpsMetadataLimitExceededException",this.$fault="client",Object.setPrototypeOf(this,xp.prototype)}}class vp extends Ml{constructor(e){super({name:"OpsMetadataTooManyUpdatesException",$fault:"client",...e}),this.name="OpsMetadataTooManyUpdatesException",this.$fault="client",Object.setPrototypeOf(this,vp.prototype)}}class wp extends Ml{constructor(e){super({name:"ResourceDataSyncAlreadyExistsException",$fault:"client",...e}),this.name="ResourceDataSyncAlreadyExistsException",this.$fault="client",Object.setPrototypeOf(this,wp.prototype),this.SyncName=e.SyncName}}class bp extends Ml{constructor(e){super({name:"ResourceDataSyncCountExceededException",$fault:"client",...e}),this.name="ResourceDataSyncCountExceededException",this.$fault="client",Object.setPrototypeOf(this,bp.prototype),this.Message=e.Message}}class Ep extends Ml{constructor(e){super({name:"ResourceDataSyncInvalidConfigurationException",$fault:"client",...e}),this.name="ResourceDataSyncInvalidConfigurationException",this.$fault="client",Object.setPrototypeOf(this,Ep.prototype),this.Message=e.Message}}class Sp extends Ml{constructor(e){super({name:"InvalidActivation",$fault:"client",...e}),this.name="InvalidActivation",this.$fault="client",Object.setPrototypeOf(this,Sp.prototype),this.Message=e.Message}}class Cp extends Ml{constructor(e){super({name:"InvalidActivationId",$fault:"client",...e}),this.name="InvalidActivationId",this.$fault="client",Object.setPrototypeOf(this,Cp.prototype),this.Message=e.Message}}class Ap extends Ml{constructor(e){super({name:"AssociationDoesNotExist",$fault:"client",...e}),this.name="AssociationDoesNotExist",this.$fault="client",Object.setPrototypeOf(this,Ap.prototype),this.Message=e.Message}}class Ip extends Ml{constructor(e){super({name:"AssociatedInstances",$fault:"client",...e}),this.name="AssociatedInstances",this.$fault="client",Object.setPrototypeOf(this,Ip.prototype)}}class Tp extends Ml{constructor(e){super({name:"InvalidDocumentOperation",$fault:"client",...e}),this.name="InvalidDocumentOperation",this.$fault="client",Object.setPrototypeOf(this,Tp.prototype),this.Message=e.Message}}class kp extends Ml{constructor(e){super({name:"InvalidDeleteInventoryParametersException",$fault:"client",...e}),this.name="InvalidDeleteInventoryParametersException",this.$fault="client",Object.setPrototypeOf(this,kp.prototype),this.Message=e.Message}}class Op extends Ml{constructor(e){super({name:"InvalidInventoryRequestException",$fault:"client",...e}),this.name="InvalidInventoryRequestException",this.$fault="client",Object.setPrototypeOf(this,Op.prototype),this.Message=e.Message}}class Pp extends Ml{constructor(e){super({name:"InvalidOptionException",$fault:"client",...e}),this.name="InvalidOptionException",this.$fault="client",Object.setPrototypeOf(this,Pp.prototype),this.Message=e.Message}}class _p extends Ml{constructor(e){super({name:"InvalidTypeNameException",$fault:"client",...e}),this.name="InvalidTypeNameException",this.$fault="client",Object.setPrototypeOf(this,_p.prototype),this.Message=e.Message}}class Rp extends Ml{constructor(e){super({name:"OpsMetadataNotFoundException",$fault:"client",...e}),this.name="OpsMetadataNotFoundException",this.$fault="client",Object.setPrototypeOf(this,Rp.prototype)}}class $p extends Ml{constructor(e){super({name:"ParameterNotFound",$fault:"client",...e}),this.name="ParameterNotFound",this.$fault="client",Object.setPrototypeOf(this,$p.prototype)}}class Mp extends Ml{constructor(e){super({name:"ResourceInUseException",$fault:"client",...e}),this.name="ResourceInUseException",this.$fault="client",Object.setPrototypeOf(this,Mp.prototype),this.Message=e.Message}}class Np extends Ml{constructor(e){super({name:"ResourceDataSyncNotFoundException",$fault:"client",...e}),this.name="ResourceDataSyncNotFoundException",this.$fault="client",Object.setPrototypeOf(this,Np.prototype),this.SyncName=e.SyncName,this.SyncType=e.SyncType,this.Message=e.Message}}class Dp extends Ml{constructor(e){super({name:"MalformedResourcePolicyDocumentException",$fault:"client",...e}),this.name="MalformedResourcePolicyDocumentException",this.$fault="client",Object.setPrototypeOf(this,Dp.prototype),this.Message=e.Message}}class jp extends Ml{constructor(e){super({name:"ResourceNotFoundException",$fault:"client",...e}),this.name="ResourceNotFoundException",this.$fault="client",Object.setPrototypeOf(this,jp.prototype),this.Message=e.Message}}class zp extends Ml{constructor(e){super({name:"ResourcePolicyConflictException",$fault:"client",...e}),this.name="ResourcePolicyConflictException",this.$fault="client",Object.setPrototypeOf(this,zp.prototype),this.Message=e.Message}}class Lp extends Ml{constructor(e){super({name:"ResourcePolicyInvalidParameterException",$fault:"client",...e}),this.name="ResourcePolicyInvalidParameterException",this.$fault="client",Object.setPrototypeOf(this,Lp.prototype),this.ParameterNames=e.ParameterNames,this.Message=e.Message}}class Fp extends Ml{constructor(e){super({name:"ResourcePolicyNotFoundException",$fault:"client",...e}),this.name="ResourcePolicyNotFoundException",this.$fault="client",Object.setPrototypeOf(this,Fp.prototype),this.Message=e.Message}}class Up extends Ml{constructor(e){super({name:"TargetInUseException",$fault:"client",...e}),this.name="TargetInUseException",this.$fault="client",Object.setPrototypeOf(this,Up.prototype),this.Message=e.Message}}class Bp extends Ml{constructor(e){super({name:"InvalidFilter",$fault:"client",...e}),this.name="InvalidFilter",this.$fault="client",Object.setPrototypeOf(this,Bp.prototype),this.Message=e.Message}}class Hp extends Ml{constructor(e){super({name:"InvalidNextToken",$fault:"client",...e}),this.name="InvalidNextToken",this.$fault="client",Object.setPrototypeOf(this,Hp.prototype),this.Message=e.Message}}class qp extends Ml{constructor(e){super({name:"InvalidAssociationVersion",$fault:"client",...e}),this.name="InvalidAssociationVersion",this.$fault="client",Object.setPrototypeOf(this,qp.prototype),this.Message=e.Message}}class Vp extends Ml{constructor(e){super({name:"AssociationExecutionDoesNotExist",$fault:"client",...e}),this.name="AssociationExecutionDoesNotExist",this.$fault="client",Object.setPrototypeOf(this,Vp.prototype),this.Message=e.Message}}class Gp extends Ml{constructor(e){super({name:"InvalidFilterKey",$fault:"client",...e}),this.name="InvalidFilterKey",this.$fault="client",Object.setPrototypeOf(this,Gp.prototype)}}class Wp extends Ml{constructor(e){super({name:"InvalidFilterValue",$fault:"client",...e}),this.name="InvalidFilterValue",this.$fault="client",Object.setPrototypeOf(this,Wp.prototype),this.Message=e.Message}}class Kp extends Ml{constructor(e){super({name:"AutomationExecutionNotFoundException",$fault:"client",...e}),this.name="AutomationExecutionNotFoundException",this.$fault="client",Object.setPrototypeOf(this,Kp.prototype),this.Message=e.Message}}class Qp extends Ml{constructor(e){super({name:"InvalidPermissionType",$fault:"client",...e}),this.name="InvalidPermissionType",this.$fault="client",Object.setPrototypeOf(this,Qp.prototype),this.Message=e.Message}}class Xp extends Ml{constructor(e){super({name:"UnsupportedOperatingSystem",$fault:"client",...e}),this.name="UnsupportedOperatingSystem",this.$fault="client",Object.setPrototypeOf(this,Xp.prototype),this.Message=e.Message}}class Jp extends Ml{constructor(e){super({name:"InvalidInstanceInformationFilterValue",$fault:"client",...e}),this.name="InvalidInstanceInformationFilterValue",this.$fault="client",Object.setPrototypeOf(this,Jp.prototype)}}class Yp extends Ml{constructor(e){super({name:"InvalidInstancePropertyFilterValue",$fault:"client",...e}),this.name="InvalidInstancePropertyFilterValue",this.$fault="client",Object.setPrototypeOf(this,Yp.prototype)}}class Zp extends Ml{constructor(e){super({name:"InvalidDeletionIdException",$fault:"client",...e}),this.name="InvalidDeletionIdException",this.$fault="client",Object.setPrototypeOf(this,Zp.prototype),this.Message=e.Message}}class ed extends Ml{constructor(e){super({name:"InvalidFilterOption",$fault:"client",...e}),this.name="InvalidFilterOption",this.$fault="client",Object.setPrototypeOf(this,ed.prototype)}}class td extends Ml{constructor(e){super({name:"OpsItemRelatedItemAssociationNotFoundException",$fault:"client",...e}),this.name="OpsItemRelatedItemAssociationNotFoundException",this.$fault="client",Object.setPrototypeOf(this,td.prototype),this.Message=e.Message}}class id extends Ml{constructor(e){super({name:"InvalidDocumentType",$fault:"client",...e}),this.name="InvalidDocumentType",this.$fault="client",Object.setPrototypeOf(this,id.prototype),this.Message=e.Message}}class nd extends Ml{constructor(e){super({name:"UnsupportedCalendarException",$fault:"client",...e}),this.name="UnsupportedCalendarException",this.$fault="client",Object.setPrototypeOf(this,nd.prototype),this.Message=e.Message}}class sd extends Ml{constructor(e){super({name:"InvalidPluginName",$fault:"client",...e}),this.name="InvalidPluginName",this.$fault="client",Object.setPrototypeOf(this,sd.prototype)}}class ad extends Ml{constructor(e){super({name:"InvocationDoesNotExist",$fault:"client",...e}),this.name="InvocationDoesNotExist",this.$fault="client",Object.setPrototypeOf(this,ad.prototype)}}class od extends Ml{constructor(e){super({name:"UnsupportedFeatureRequiredException",$fault:"client",...e}),this.name="UnsupportedFeatureRequiredException",this.$fault="client",Object.setPrototypeOf(this,od.prototype),this.Message=e.Message}}class rd extends Ml{constructor(e){super({name:"InvalidAggregatorException",$fault:"client",...e}),this.name="InvalidAggregatorException",this.$fault="client",Object.setPrototypeOf(this,rd.prototype),this.Message=e.Message}}class cd extends Ml{constructor(e){super({name:"InvalidInventoryGroupException",$fault:"client",...e}),this.name="InvalidInventoryGroupException",this.$fault="client",Object.setPrototypeOf(this,cd.prototype),this.Message=e.Message}}class ld extends Ml{constructor(e){super({name:"InvalidResultAttributeException",$fault:"client",...e}),this.name="InvalidResultAttributeException",this.$fault="client",Object.setPrototypeOf(this,ld.prototype),this.Message=e.Message}}class pd extends Ml{constructor(e){super({name:"InvalidKeyId",$fault:"client",...e}),this.name="InvalidKeyId",this.$fault="client",Object.setPrototypeOf(this,pd.prototype)}}class dd extends Ml{constructor(e){super({name:"ParameterVersionNotFound",$fault:"client",...e}),this.name="ParameterVersionNotFound",this.$fault="client",Object.setPrototypeOf(this,dd.prototype)}}class ud extends Ml{constructor(e){super({name:"ServiceSettingNotFound",$fault:"client",...e}),this.name="ServiceSettingNotFound",this.$fault="client",Object.setPrototypeOf(this,ud.prototype),this.Message=e.Message}}class md extends Ml{constructor(e){super({name:"ParameterVersionLabelLimitExceeded",$fault:"client",...e}),this.name="ParameterVersionLabelLimitExceeded",this.$fault="client",Object.setPrototypeOf(this,md.prototype)}}class hd extends Ml{constructor(e){super({name:"DocumentPermissionLimit",$fault:"client",...e}),this.name="DocumentPermissionLimit",this.$fault="client",Object.setPrototypeOf(this,hd.prototype),this.Message=e.Message}}class fd extends Ml{constructor(e){super({name:"ComplianceTypeCountLimitExceededException",$fault:"client",...e}),this.name="ComplianceTypeCountLimitExceededException",this.$fault="client",Object.setPrototypeOf(this,fd.prototype),this.Message=e.Message}}class gd extends Ml{constructor(e){super({name:"InvalidItemContentException",$fault:"client",...e}),this.name="InvalidItemContentException",this.$fault="client",Object.setPrototypeOf(this,gd.prototype),this.TypeName=e.TypeName,this.Message=e.Message}}class yd extends Ml{constructor(e){super({name:"ItemSizeLimitExceededException",$fault:"client",...e}),this.name="ItemSizeLimitExceededException",this.$fault="client",Object.setPrototypeOf(this,yd.prototype),this.TypeName=e.TypeName,this.Message=e.Message}}class xd extends Ml{constructor(e){super({name:"TotalSizeLimitExceededException",$fault:"client",...e}),this.name="TotalSizeLimitExceededException",this.$fault="client",Object.setPrototypeOf(this,xd.prototype),this.Message=e.Message}}class vd extends Ml{constructor(e){super({name:"CustomSchemaCountLimitExceededException",$fault:"client",...e}),this.name="CustomSchemaCountLimitExceededException",this.$fault="client",Object.setPrototypeOf(this,vd.prototype),this.Message=e.Message}}class wd extends Ml{constructor(e){super({name:"InvalidInventoryItemContextException",$fault:"client",...e}),this.name="InvalidInventoryItemContextException",this.$fault="client",Object.setPrototypeOf(this,wd.prototype),this.Message=e.Message}}class bd extends Ml{constructor(e){super({name:"ItemContentMismatchException",$fault:"client",...e}),this.name="ItemContentMismatchException",this.$fault="client",Object.setPrototypeOf(this,bd.prototype),this.TypeName=e.TypeName,this.Message=e.Message}}class Ed extends Ml{constructor(e){super({name:"SubTypeCountLimitExceededException",$fault:"client",...e}),this.name="SubTypeCountLimitExceededException",this.$fault="client",Object.setPrototypeOf(this,Ed.prototype),this.Message=e.Message}}class Sd extends Ml{constructor(e){super({name:"UnsupportedInventoryItemContextException",$fault:"client",...e}),this.name="UnsupportedInventoryItemContextException",this.$fault="client",Object.setPrototypeOf(this,Sd.prototype),this.TypeName=e.TypeName,this.Message=e.Message}}class Cd extends Ml{constructor(e){super({name:"UnsupportedInventorySchemaVersionException",$fault:"client",...e}),this.name="UnsupportedInventorySchemaVersionException",this.$fault="client",Object.setPrototypeOf(this,Cd.prototype),this.Message=e.Message}}class Ad extends Ml{constructor(e){super({name:"HierarchyLevelLimitExceededException",$fault:"client",...e}),this.name="HierarchyLevelLimitExceededException",this.$fault="client",Object.setPrototypeOf(this,Ad.prototype)}}class Id extends Ml{constructor(e){super({name:"HierarchyTypeMismatchException",$fault:"client",...e}),this.name="HierarchyTypeMismatchException",this.$fault="client",Object.setPrototypeOf(this,Id.prototype)}}class Td extends Ml{constructor(e){super({name:"IncompatiblePolicyException",$fault:"client",...e}),this.name="IncompatiblePolicyException",this.$fault="client",Object.setPrototypeOf(this,Td.prototype)}}class kd extends Ml{constructor(e){super({name:"InvalidAllowedPatternException",$fault:"client",...e}),this.name="InvalidAllowedPatternException",this.$fault="client",Object.setPrototypeOf(this,kd.prototype)}}class Od extends Ml{constructor(e){super({name:"InvalidPolicyAttributeException",$fault:"client",...e}),this.name="InvalidPolicyAttributeException",this.$fault="client",Object.setPrototypeOf(this,Od.prototype)}}class Pd extends Ml{constructor(e){super({name:"InvalidPolicyTypeException",$fault:"client",...e}),this.name="InvalidPolicyTypeException",this.$fault="client",Object.setPrototypeOf(this,Pd.prototype)}}class _d extends Ml{constructor(e){super({name:"ParameterAlreadyExists",$fault:"client",...e}),this.name="ParameterAlreadyExists",this.$fault="client",Object.setPrototypeOf(this,_d.prototype)}}class Rd extends Ml{constructor(e){super({name:"ParameterLimitExceeded",$fault:"client",...e}),this.name="ParameterLimitExceeded",this.$fault="client",Object.setPrototypeOf(this,Rd.prototype)}}class $d extends Ml{constructor(e){super({name:"ParameterMaxVersionLimitExceeded",$fault:"client",...e}),this.name="ParameterMaxVersionLimitExceeded",this.$fault="client",Object.setPrototypeOf(this,$d.prototype)}}class Md extends Ml{constructor(e){super({name:"ParameterPatternMismatchException",$fault:"client",...e}),this.name="ParameterPatternMismatchException",this.$fault="client",Object.setPrototypeOf(this,Md.prototype)}}class Nd extends Ml{constructor(e){super({name:"PoliciesLimitExceededException",$fault:"client",...e}),this.name="PoliciesLimitExceededException",this.$fault="client",Object.setPrototypeOf(this,Nd.prototype)}}class Dd extends Ml{constructor(e){super({name:"UnsupportedParameterType",$fault:"client",...e}),this.name="UnsupportedParameterType",this.$fault="client",Object.setPrototypeOf(this,Dd.prototype)}}class jd extends Ml{constructor(e){super({name:"ResourcePolicyLimitExceededException",$fault:"client",...e}),this.name="ResourcePolicyLimitExceededException",this.$fault="client",Object.setPrototypeOf(this,jd.prototype),this.Limit=e.Limit,this.LimitType=e.LimitType,this.Message=e.Message}}class zd extends Ml{constructor(e){super({name:"FeatureNotAvailableException",$fault:"client",...e}),this.name="FeatureNotAvailableException",this.$fault="client",Object.setPrototypeOf(this,zd.prototype),this.Message=e.Message}}class Ld extends Ml{constructor(e){super({name:"AutomationStepNotFoundException",$fault:"client",...e}),this.name="AutomationStepNotFoundException",this.$fault="client",Object.setPrototypeOf(this,Ld.prototype),this.Message=e.Message}}class Fd extends Ml{constructor(e){super({name:"InvalidAutomationSignalException",$fault:"client",...e}),this.name="InvalidAutomationSignalException",this.$fault="client",Object.setPrototypeOf(this,Fd.prototype),this.Message=e.Message}}class Ud extends Ml{constructor(e){super({name:"InvalidNotificationConfig",$fault:"client",...e}),this.name="InvalidNotificationConfig",this.$fault="client",Object.setPrototypeOf(this,Ud.prototype),this.Message=e.Message}}class Bd extends Ml{constructor(e){super({name:"InvalidOutputFolder",$fault:"client",...e}),this.name="InvalidOutputFolder",this.$fault="client",Object.setPrototypeOf(this,Bd.prototype)}}class Hd extends Ml{constructor(e){super({name:"InvalidRole",$fault:"client",...e}),this.name="InvalidRole",this.$fault="client",Object.setPrototypeOf(this,Hd.prototype),this.Message=e.Message}}class qd extends Ml{constructor(e){super({name:"InvalidAssociation",$fault:"client",...e}),this.name="InvalidAssociation",this.$fault="client",Object.setPrototypeOf(this,qd.prototype),this.Message=e.Message}}class Vd extends Ml{constructor(e){super({name:"AutomationDefinitionNotFoundException",$fault:"client",...e}),this.name="AutomationDefinitionNotFoundException",this.$fault="client",Object.setPrototypeOf(this,Vd.prototype),this.Message=e.Message}}class Gd extends Ml{constructor(e){super({name:"AutomationDefinitionVersionNotFoundException",$fault:"client",...e}),this.name="AutomationDefinitionVersionNotFoundException",this.$fault="client",Object.setPrototypeOf(this,Gd.prototype),this.Message=e.Message}}class Wd extends Ml{constructor(e){super({name:"AutomationExecutionLimitExceededException",$fault:"client",...e}),this.name="AutomationExecutionLimitExceededException",this.$fault="client",Object.setPrototypeOf(this,Wd.prototype),this.Message=e.Message}}class Kd extends Ml{constructor(e){super({name:"InvalidAutomationExecutionParametersException",$fault:"client",...e}),this.name="InvalidAutomationExecutionParametersException",this.$fault="client",Object.setPrototypeOf(this,Kd.prototype),this.Message=e.Message}}const Qd=e=>({...e,...e.Value&&{Value:Kt}}),Xd=e=>({...e,...e.Parameter&&{Parameter:Qd(e.Parameter)}}),Jd=e=>({...e,...e.Parameters&&{Parameters:e.Parameters.map((e=>Qd(e)))}});class Yd extends Ml{constructor(e){super({name:"AutomationDefinitionNotApprovedException",$fault:"client",...e}),this.name="AutomationDefinitionNotApprovedException",this.$fault="client",Object.setPrototypeOf(this,Yd.prototype),this.Message=e.Message}}class Zd extends Ml{constructor(e){super({name:"TargetNotConnected",$fault:"client",...e}),this.name="TargetNotConnected",this.$fault="client",Object.setPrototypeOf(this,Zd.prototype),this.Message=e.Message}}class eu extends Ml{constructor(e){super({name:"InvalidAutomationStatusUpdateException",$fault:"client",...e}),this.name="InvalidAutomationStatusUpdateException",this.$fault="client",Object.setPrototypeOf(this,eu.prototype),this.Message=e.Message}}class tu extends Ml{constructor(e){super({name:"AssociationVersionLimitExceeded",$fault:"client",...e}),this.name="AssociationVersionLimitExceeded",this.$fault="client",Object.setPrototypeOf(this,tu.prototype),this.Message=e.Message}}class iu extends Ml{constructor(e){super({name:"InvalidUpdate",$fault:"client",...e}),this.name="InvalidUpdate",this.$fault="client",Object.setPrototypeOf(this,iu.prototype),this.Message=e.Message}}class nu extends Ml{constructor(e){super({name:"StatusUnchanged",$fault:"client",...e}),this.name="StatusUnchanged",this.$fault="client",Object.setPrototypeOf(this,nu.prototype)}}class su extends Ml{constructor(e){super({name:"DocumentVersionLimitExceeded",$fault:"client",...e}),this.name="DocumentVersionLimitExceeded",this.$fault="client",Object.setPrototypeOf(this,su.prototype),this.Message=e.Message}}class au extends Ml{constructor(e){super({name:"DuplicateDocumentContent",$fault:"client",...e}),this.name="DuplicateDocumentContent",this.$fault="client",Object.setPrototypeOf(this,au.prototype),this.Message=e.Message}}class ou extends Ml{constructor(e){super({name:"DuplicateDocumentVersionName",$fault:"client",...e}),this.name="DuplicateDocumentVersionName",this.$fault="client",Object.setPrototypeOf(this,ou.prototype),this.Message=e.Message}}class ru extends Ml{constructor(e){super({name:"OpsMetadataKeyLimitExceededException",$fault:"client",...e}),this.name="OpsMetadataKeyLimitExceededException",this.$fault="client",Object.setPrototypeOf(this,ru.prototype)}}class cu extends Ml{constructor(e){super({name:"ResourceDataSyncConflictException",$fault:"client",...e}),this.name="ResourceDataSyncConflictException",this.$fault="client",Object.setPrototypeOf(this,cu.prototype),this.Message=e.Message}}const lu=async(e,t)=>{const i=Gh("GetParameter");let n;return n=JSON.stringify(Wi(e)),Vh(t,i,"/",void 0,n)},pu=async(e,t)=>{const i=Gh("GetParameters");let n;return n=JSON.stringify(Wi(e)),Vh(t,i,"/",void 0,n)},du=async(e,t)=>{if(e.statusCode>=300)return mu(e,t);const i=await jc(e.body,t);let n={};n=Lh(i);return{$metadata:Hh(e),...n}},uu=async(e,t)=>{if(e.statusCode>=300)return mu(e,t);const i=await jc(e.body,t);let n={};n=Fh(i);return{$metadata:Hh(e),...n}},mu=async(e,t)=>{const i={...e,body:await zc(e.body,t)},n=((e,t)=>{const i=e=>{let t=e;return"number"==typeof t&&(t=t.toString()),t.indexOf(",")>=0&&(t=t.split(",")[0]),t.indexOf(":")>=0&&(t=t.split(":")[0]),t.indexOf("#")>=0&&(t=t.split("#")[1]),t},n=(s=e.headers,a="x-amzn-errortype",Object.keys(s).find((e=>e.toLowerCase()===a.toLowerCase())));var s,a;return void 0!==n?i(e.headers[n]):void 0!==t.code?i(t.code):void 0!==t.__type?i(t.__type):void 0})(e,i.body);switch(n){case"InternalServerError":case"com.amazonaws.ssm#InternalServerError":throw await Bu(i);case"InvalidResourceId":case"com.amazonaws.ssm#InvalidResourceId":throw await Om(i);case"InvalidResourceType":case"com.amazonaws.ssm#InvalidResourceType":throw await Pm(i);case"TooManyTagsError":case"com.amazonaws.ssm#TooManyTagsError":throw await Oh(i);case"TooManyUpdates":case"com.amazonaws.ssm#TooManyUpdates":throw await Ph(i);case"OpsItemConflictException":case"com.amazonaws.ssm#OpsItemConflictException":throw await Gm(i);case"OpsItemInvalidParameterException":case"com.amazonaws.ssm#OpsItemInvalidParameterException":throw await Wm(i);case"OpsItemLimitExceededException":case"com.amazonaws.ssm#OpsItemLimitExceededException":throw await Km(i);case"OpsItemNotFoundException":case"com.amazonaws.ssm#OpsItemNotFoundException":throw await Qm(i);case"OpsItemRelatedItemAlreadyExistsException":case"com.amazonaws.ssm#OpsItemRelatedItemAlreadyExistsException":throw await Xm(i);case"DuplicateInstanceId":case"com.amazonaws.ssm#DuplicateInstanceId":throw await Du(i);case"InvalidCommandId":case"com.amazonaws.ssm#InvalidCommandId":throw await Yu(i);case"InvalidInstanceId":case"com.amazonaws.ssm#InvalidInstanceId":throw await dm(i);case"DoesNotExistException":case"com.amazonaws.ssm#DoesNotExistException":throw await $u(i);case"InvalidParameters":case"com.amazonaws.ssm#InvalidParameters":throw await Cm(i);case"AssociationAlreadyExists":case"com.amazonaws.ssm#AssociationAlreadyExists":throw await gu(i);case"AssociationLimitExceeded":case"com.amazonaws.ssm#AssociationLimitExceeded":throw await vu(i);case"InvalidDocument":case"com.amazonaws.ssm#InvalidDocument":throw await tm(i);case"InvalidDocumentVersion":case"com.amazonaws.ssm#InvalidDocumentVersion":throw await om(i);case"InvalidOutputLocation":case"com.amazonaws.ssm#InvalidOutputLocation":throw await Sm(i);case"InvalidSchedule":case"com.amazonaws.ssm#InvalidSchedule":throw await $m(i);case"InvalidTag":case"com.amazonaws.ssm#InvalidTag":throw await Mm(i);case"InvalidTarget":case"com.amazonaws.ssm#InvalidTarget":throw await Nm(i);case"InvalidTargetMaps":case"com.amazonaws.ssm#InvalidTargetMaps":throw await Dm(i);case"UnsupportedPlatformType":case"com.amazonaws.ssm#UnsupportedPlatformType":throw await zh(i);case"DocumentAlreadyExists":case"com.amazonaws.ssm#DocumentAlreadyExists":throw await Ou(i);case"DocumentLimitExceeded":case"com.amazonaws.ssm#DocumentLimitExceeded":throw await Pu(i);case"InvalidDocumentContent":case"com.amazonaws.ssm#InvalidDocumentContent":throw await im(i);case"InvalidDocumentSchemaVersion":case"com.amazonaws.ssm#InvalidDocumentSchemaVersion":throw await sm(i);case"MaxDocumentSizeExceeded":case"com.amazonaws.ssm#MaxDocumentSizeExceeded":throw await Hm(i);case"IdempotentParameterMismatch":case"com.amazonaws.ssm#IdempotentParameterMismatch":throw await Fu(i);case"ResourceLimitExceededException":case"com.amazonaws.ssm#ResourceLimitExceededException":throw await xh(i);case"OpsItemAccessDeniedException":case"com.amazonaws.ssm#OpsItemAccessDeniedException":throw await qm(i);case"OpsItemAlreadyExistsException":case"com.amazonaws.ssm#OpsItemAlreadyExistsException":throw await Vm(i);case"OpsMetadataAlreadyExistsException":case"com.amazonaws.ssm#OpsMetadataAlreadyExistsException":throw await Ym(i);case"OpsMetadataInvalidArgumentException":case"com.amazonaws.ssm#OpsMetadataInvalidArgumentException":throw await Zm(i);case"OpsMetadataLimitExceededException":case"com.amazonaws.ssm#OpsMetadataLimitExceededException":throw await th(i);case"OpsMetadataTooManyUpdatesException":case"com.amazonaws.ssm#OpsMetadataTooManyUpdatesException":throw await nh(i);case"ResourceDataSyncAlreadyExistsException":case"com.amazonaws.ssm#ResourceDataSyncAlreadyExistsException":throw await uh(i);case"ResourceDataSyncCountExceededException":case"com.amazonaws.ssm#ResourceDataSyncCountExceededException":throw await hh(i);case"ResourceDataSyncInvalidConfigurationException":case"com.amazonaws.ssm#ResourceDataSyncInvalidConfigurationException":throw await fh(i);case"InvalidActivation":case"com.amazonaws.ssm#InvalidActivation":throw await Hu(i);case"InvalidActivationId":case"com.amazonaws.ssm#InvalidActivationId":throw await qu(i);case"AssociationDoesNotExist":case"com.amazonaws.ssm#AssociationDoesNotExist":throw await yu(i);case"AssociatedInstances":case"com.amazonaws.ssm#AssociatedInstances":throw await fu(i);case"InvalidDocumentOperation":case"com.amazonaws.ssm#InvalidDocumentOperation":throw await nm(i);case"InvalidDeleteInventoryParametersException":case"com.amazonaws.ssm#InvalidDeleteInventoryParametersException":throw await Zu(i);case"InvalidInventoryRequestException":case"com.amazonaws.ssm#InvalidInventoryRequestException":throw await gm(i);case"InvalidOptionException":case"com.amazonaws.ssm#InvalidOptionException":throw await bm(i);case"InvalidTypeNameException":case"com.amazonaws.ssm#InvalidTypeNameException":throw await jm(i);case"OpsMetadataNotFoundException":case"com.amazonaws.ssm#OpsMetadataNotFoundException":throw await ih(i);case"ParameterNotFound":case"com.amazonaws.ssm#ParameterNotFound":throw await rh(i);case"ResourceInUseException":case"com.amazonaws.ssm#ResourceInUseException":throw await yh(i);case"ResourceDataSyncNotFoundException":case"com.amazonaws.ssm#ResourceDataSyncNotFoundException":throw await gh(i);case"MalformedResourcePolicyDocumentException":case"com.amazonaws.ssm#MalformedResourcePolicyDocumentException":throw await Bm(i);case"ResourceNotFoundException":case"com.amazonaws.ssm#ResourceNotFoundException":throw await vh(i);case"ResourcePolicyConflictException":case"com.amazonaws.ssm#ResourcePolicyConflictException":throw await wh(i);case"ResourcePolicyInvalidParameterException":case"com.amazonaws.ssm#ResourcePolicyInvalidParameterException":throw await bh(i);case"ResourcePolicyNotFoundException":case"com.amazonaws.ssm#ResourcePolicyNotFoundException":throw await Sh(i);case"TargetInUseException":case"com.amazonaws.ssm#TargetInUseException":throw await Th(i);case"InvalidFilter":case"com.amazonaws.ssm#InvalidFilter":throw await rm(i);case"InvalidNextToken":case"com.amazonaws.ssm#InvalidNextToken":throw await vm(i);case"InvalidAssociationVersion":case"com.amazonaws.ssm#InvalidAssociationVersion":throw await Ku(i);case"AssociationExecutionDoesNotExist":case"com.amazonaws.ssm#AssociationExecutionDoesNotExist":throw await xu(i);case"InvalidFilterKey":case"com.amazonaws.ssm#InvalidFilterKey":throw await cm(i);case"InvalidFilterValue":case"com.amazonaws.ssm#InvalidFilterValue":throw await pm(i);case"AutomationExecutionNotFoundException":case"com.amazonaws.ssm#AutomationExecutionNotFoundException":throw await Au(i);case"InvalidPermissionType":case"com.amazonaws.ssm#InvalidPermissionType":throw await Am(i);case"UnsupportedOperatingSystem":case"com.amazonaws.ssm#UnsupportedOperatingSystem":throw await Dh(i);case"InvalidInstanceInformationFilterValue":case"com.amazonaws.ssm#InvalidInstanceInformationFilterValue":throw await um(i);case"InvalidInstancePropertyFilterValue":case"com.amazonaws.ssm#InvalidInstancePropertyFilterValue":throw await mm(i);case"InvalidDeletionIdException":case"com.amazonaws.ssm#InvalidDeletionIdException":throw await em(i);case"InvalidFilterOption":case"com.amazonaws.ssm#InvalidFilterOption":throw await lm(i);case"OpsItemRelatedItemAssociationNotFoundException":case"com.amazonaws.ssm#OpsItemRelatedItemAssociationNotFoundException":throw await Jm(i);case"InvalidDocumentType":case"com.amazonaws.ssm#InvalidDocumentType":throw await am(i);case"UnsupportedCalendarException":case"com.amazonaws.ssm#UnsupportedCalendarException":throw await Rh(i);case"InvalidPluginName":case"com.amazonaws.ssm#InvalidPluginName":throw await Im(i);case"InvocationDoesNotExist":case"com.amazonaws.ssm#InvocationDoesNotExist":throw await Lm(i);case"UnsupportedFeatureRequiredException":case"com.amazonaws.ssm#UnsupportedFeatureRequiredException":throw await $h(i);case"InvalidAggregatorException":case"com.amazonaws.ssm#InvalidAggregatorException":throw await Vu(i);case"InvalidInventoryGroupException":case"com.amazonaws.ssm#InvalidInventoryGroupException":throw await hm(i);case"InvalidResultAttributeException":case"com.amazonaws.ssm#InvalidResultAttributeException":throw await _m(i);case"InvalidKeyId":case"com.amazonaws.ssm#InvalidKeyId":throw await xm(i);case"ParameterVersionNotFound":case"com.amazonaws.ssm#ParameterVersionNotFound":throw await ph(i);case"ServiceSettingNotFound":case"com.amazonaws.ssm#ServiceSettingNotFound":throw await Ch(i);case"ParameterVersionLabelLimitExceeded":case"com.amazonaws.ssm#ParameterVersionLabelLimitExceeded":throw await lh(i);case"DocumentPermissionLimit":case"com.amazonaws.ssm#DocumentPermissionLimit":throw await _u(i);case"ComplianceTypeCountLimitExceededException":case"com.amazonaws.ssm#ComplianceTypeCountLimitExceededException":throw await Tu(i);case"InvalidItemContentException":case"com.amazonaws.ssm#InvalidItemContentException":throw await ym(i);case"ItemSizeLimitExceededException":case"com.amazonaws.ssm#ItemSizeLimitExceededException":throw await Um(i);case"TotalSizeLimitExceededException":case"com.amazonaws.ssm#TotalSizeLimitExceededException":throw await _h(i);case"CustomSchemaCountLimitExceededException":case"com.amazonaws.ssm#CustomSchemaCountLimitExceededException":throw await ku(i);case"InvalidInventoryItemContextException":case"com.amazonaws.ssm#InvalidInventoryItemContextException":throw await fm(i);case"ItemContentMismatchException":case"com.amazonaws.ssm#ItemContentMismatchException":throw await Fm(i);case"SubTypeCountLimitExceededException":case"com.amazonaws.ssm#SubTypeCountLimitExceededException":throw await Ih(i);case"UnsupportedInventoryItemContextException":case"com.amazonaws.ssm#UnsupportedInventoryItemContextException":throw await Mh(i);case"UnsupportedInventorySchemaVersionException":case"com.amazonaws.ssm#UnsupportedInventorySchemaVersionException":throw await Nh(i);case"HierarchyLevelLimitExceededException":case"com.amazonaws.ssm#HierarchyLevelLimitExceededException":throw await zu(i);case"HierarchyTypeMismatchException":case"com.amazonaws.ssm#HierarchyTypeMismatchException":throw await Lu(i);case"IncompatiblePolicyException":case"com.amazonaws.ssm#IncompatiblePolicyException":throw await Uu(i);case"InvalidAllowedPatternException":case"com.amazonaws.ssm#InvalidAllowedPatternException":throw await Gu(i);case"InvalidPolicyAttributeException":case"com.amazonaws.ssm#InvalidPolicyAttributeException":throw await Tm(i);case"InvalidPolicyTypeException":case"com.amazonaws.ssm#InvalidPolicyTypeException":throw await km(i);case"ParameterAlreadyExists":case"com.amazonaws.ssm#ParameterAlreadyExists":throw await sh(i);case"ParameterLimitExceeded":case"com.amazonaws.ssm#ParameterLimitExceeded":throw await ah(i);case"ParameterMaxVersionLimitExceeded":case"com.amazonaws.ssm#ParameterMaxVersionLimitExceeded":throw await oh(i);case"ParameterPatternMismatchException":case"com.amazonaws.ssm#ParameterPatternMismatchException":throw await ch(i);case"PoliciesLimitExceededException":case"com.amazonaws.ssm#PoliciesLimitExceededException":throw await dh(i);case"UnsupportedParameterType":case"com.amazonaws.ssm#UnsupportedParameterType":throw await jh(i);case"ResourcePolicyLimitExceededException":case"com.amazonaws.ssm#ResourcePolicyLimitExceededException":throw await Eh(i);case"AlreadyExistsException":case"com.amazonaws.ssm#AlreadyExistsException":throw await hu(i);case"FeatureNotAvailableException":case"com.amazonaws.ssm#FeatureNotAvailableException":throw await ju(i);case"AutomationStepNotFoundException":case"com.amazonaws.ssm#AutomationStepNotFoundException":throw await Iu(i);case"InvalidAutomationSignalException":case"com.amazonaws.ssm#InvalidAutomationSignalException":throw await Xu(i);case"InvalidNotificationConfig":case"com.amazonaws.ssm#InvalidNotificationConfig":throw await wm(i);case"InvalidOutputFolder":case"com.amazonaws.ssm#InvalidOutputFolder":throw await Em(i);case"InvalidRole":case"com.amazonaws.ssm#InvalidRole":throw await Rm(i);case"InvalidAssociation":case"com.amazonaws.ssm#InvalidAssociation":throw await Wu(i);case"AutomationDefinitionNotFoundException":case"com.amazonaws.ssm#AutomationDefinitionNotFoundException":throw await Eu(i);case"AutomationDefinitionVersionNotFoundException":case"com.amazonaws.ssm#AutomationDefinitionVersionNotFoundException":throw await Su(i);case"AutomationExecutionLimitExceededException":case"com.amazonaws.ssm#AutomationExecutionLimitExceededException":throw await Cu(i);case"InvalidAutomationExecutionParametersException":case"com.amazonaws.ssm#InvalidAutomationExecutionParametersException":throw await Qu(i);case"AutomationDefinitionNotApprovedException":case"com.amazonaws.ssm#AutomationDefinitionNotApprovedException":throw await bu(i);case"TargetNotConnected":case"com.amazonaws.ssm#TargetNotConnected":throw await kh(i);case"InvalidAutomationStatusUpdateException":case"com.amazonaws.ssm#InvalidAutomationStatusUpdateException":throw await Ju(i);case"AssociationVersionLimitExceeded":case"com.amazonaws.ssm#AssociationVersionLimitExceeded":throw await wu(i);case"InvalidUpdate":case"com.amazonaws.ssm#InvalidUpdate":throw await zm(i);case"StatusUnchanged":case"com.amazonaws.ssm#StatusUnchanged":throw await Ah(i);case"DocumentVersionLimitExceeded":case"com.amazonaws.ssm#DocumentVersionLimitExceeded":throw await Ru(i);case"DuplicateDocumentContent":case"com.amazonaws.ssm#DuplicateDocumentContent":throw await Mu(i);case"DuplicateDocumentVersionName":case"com.amazonaws.ssm#DuplicateDocumentVersionName":throw await Nu(i);case"OpsMetadataKeyLimitExceededException":case"com.amazonaws.ssm#OpsMetadataKeyLimitExceededException":throw await eh(i);case"ResourceDataSyncConflictException":case"com.amazonaws.ssm#ResourceDataSyncConflictException":throw await mh(i);default:const t=i.body;return qh({output:e,parsedBody:t,errorCode:n})}},hu=async(e,t)=>{const i=e.body,n=Wi(i),s=new Fl({$metadata:Hh(e),...n});return Ai(s,i)},fu=async(e,t)=>{const i=e.body,n=Wi(i),s=new Ip({$metadata:Hh(e),...n});return Ai(s,i)},gu=async(e,t)=>{const i=e.body,n=Wi(i),s=new Jl({$metadata:Hh(e),...n});return Ai(s,i)},yu=async(e,t)=>{const i=e.body,n=Wi(i),s=new Ap({$metadata:Hh(e),...n});return Ai(s,i)},xu=async(e,t)=>{const i=e.body,n=Wi(i),s=new Vp({$metadata:Hh(e),...n});return Ai(s,i)},vu=async(e,t)=>{const i=e.body,n=Wi(i),s=new Yl({$metadata:Hh(e),...n});return Ai(s,i)},wu=async(e,t)=>{const i=e.body,n=Wi(i),s=new tu({$metadata:Hh(e),...n});return Ai(s,i)},bu=async(e,t)=>{const i=e.body,n=Wi(i),s=new Yd({$metadata:Hh(e),...n});return Ai(s,i)},Eu=async(e,t)=>{const i=e.body,n=Wi(i),s=new Vd({$metadata:Hh(e),...n});return Ai(s,i)},Su=async(e,t)=>{const i=e.body,n=Wi(i),s=new Gd({$metadata:Hh(e),...n});return Ai(s,i)},Cu=async(e,t)=>{const i=e.body,n=Wi(i),s=new Wd({$metadata:Hh(e),...n});return Ai(s,i)},Au=async(e,t)=>{const i=e.body,n=Wi(i),s=new Kp({$metadata:Hh(e),...n});return Ai(s,i)},Iu=async(e,t)=>{const i=e.body,n=Wi(i),s=new Ld({$metadata:Hh(e),...n});return Ai(s,i)},Tu=async(e,t)=>{const i=e.body,n=Wi(i),s=new fd({$metadata:Hh(e),...n});return Ai(s,i)},ku=async(e,t)=>{const i=e.body,n=Wi(i),s=new vd({$metadata:Hh(e),...n});return Ai(s,i)},Ou=async(e,t)=>{const i=e.body,n=Wi(i),s=new rp({$metadata:Hh(e),...n});return Ai(s,i)},Pu=async(e,t)=>{const i=e.body,n=Wi(i),s=new cp({$metadata:Hh(e),...n});return Ai(s,i)},_u=async(e,t)=>{const i=e.body,n=Wi(i),s=new hd({$metadata:Hh(e),...n});return Ai(s,i)},Ru=async(e,t)=>{const i=e.body,n=Wi(i),s=new su({$metadata:Hh(e),...n});return Ai(s,i)},$u=async(e,t)=>{const i=e.body,n=Wi(i),s=new Ql({$metadata:Hh(e),...n});return Ai(s,i)},Mu=async(e,t)=>{const i=e.body,n=Wi(i),s=new au({$metadata:Hh(e),...n});return Ai(s,i)},Nu=async(e,t)=>{const i=e.body,n=Wi(i),s=new ou({$metadata:Hh(e),...n});return Ai(s,i)},Du=async(e,t)=>{const i=e.body,n=Wi(i),s=new Gl({$metadata:Hh(e),...n});return Ai(s,i)},ju=async(e,t)=>{const i=e.body,n=Wi(i),s=new zd({$metadata:Hh(e),...n});return Ai(s,i)},zu=async(e,t)=>{const i=e.body,n=Wi(i),s=new Ad({$metadata:Hh(e),...n});return Ai(s,i)},Lu=async(e,t)=>{const i=e.body,n=Wi(i),s=new Id({$metadata:Hh(e),...n});return Ai(s,i)},Fu=async(e,t)=>{const i=e.body,n=Wi(i),s=new up({$metadata:Hh(e),...n});return Ai(s,i)},Uu=async(e,t)=>{const i=e.body,n=Wi(i),s=new Td({$metadata:Hh(e),...n});return Ai(s,i)},Bu=async(e,t)=>{const i=e.body,n=Wi(i),s=new Nl({$metadata:Hh(e),...n});return Ai(s,i)},Hu=async(e,t)=>{const i=e.body,n=Wi(i),s=new Sp({$metadata:Hh(e),...n});return Ai(s,i)},qu=async(e,t)=>{const i=e.body,n=Wi(i),s=new Cp({$metadata:Hh(e),...n});return Ai(s,i)},Vu=async(e,t)=>{const i=e.body,n=Wi(i),s=new rd({$metadata:Hh(e),...n});return Ai(s,i)},Gu=async(e,t)=>{const i=e.body,n=Wi(i),s=new kd({$metadata:Hh(e),...n});return Ai(s,i)},Wu=async(e,t)=>{const i=e.body,n=Wi(i),s=new qd({$metadata:Hh(e),...n});return Ai(s,i)},Ku=async(e,t)=>{const i=e.body,n=Wi(i),s=new qp({$metadata:Hh(e),...n});return Ai(s,i)},Qu=async(e,t)=>{const i=e.body,n=Wi(i),s=new Kd({$metadata:Hh(e),...n});return Ai(s,i)},Xu=async(e,t)=>{const i=e.body,n=Wi(i),s=new Fd({$metadata:Hh(e),...n});return Ai(s,i)},Ju=async(e,t)=>{const i=e.body,n=Wi(i),s=new eu({$metadata:Hh(e),...n});return Ai(s,i)},Yu=async(e,t)=>{const i=e.body,n=Wi(i),s=new Wl({$metadata:Hh(e),...n});return Ai(s,i)},Zu=async(e,t)=>{const i=e.body,n=Wi(i),s=new kp({$metadata:Hh(e),...n});return Ai(s,i)},em=async(e,t)=>{const i=e.body,n=Wi(i),s=new Zp({$metadata:Hh(e),...n});return Ai(s,i)},tm=async(e,t)=>{const i=e.body,n=Wi(i),s=new Zl({$metadata:Hh(e),...n});return Ai(s,i)},im=async(e,t)=>{const i=e.body,n=Wi(i),s=new lp({$metadata:Hh(e),...n});return Ai(s,i)},nm=async(e,t)=>{const i=e.body,n=Wi(i),s=new Tp({$metadata:Hh(e),...n});return Ai(s,i)},sm=async(e,t)=>{const i=e.body,n=Wi(i),s=new pp({$metadata:Hh(e),...n});return Ai(s,i)},am=async(e,t)=>{const i=e.body,n=Wi(i),s=new id({$metadata:Hh(e),...n});return Ai(s,i)},om=async(e,t)=>{const i=e.body,n=Wi(i),s=new ep({$metadata:Hh(e),...n});return Ai(s,i)},rm=async(e,t)=>{const i=e.body,n=Wi(i),s=new Bp({$metadata:Hh(e),...n});return Ai(s,i)},cm=async(e,t)=>{const i=e.body,n=Wi(i),s=new Gp({$metadata:Hh(e),...n});return Ai(s,i)},lm=async(e,t)=>{const i=e.body,n=Wi(i),s=new ed({$metadata:Hh(e),...n});return Ai(s,i)},pm=async(e,t)=>{const i=e.body,n=Wi(i),s=new Wp({$metadata:Hh(e),...n});return Ai(s,i)},dm=async(e,t)=>{const i=e.body,n=Wi(i),s=new Kl({$metadata:Hh(e),...n});return Ai(s,i)},um=async(e,t)=>{const i=e.body,n=Wi(i),s=new Jp({$metadata:Hh(e),...n});return Ai(s,i)},mm=async(e,t)=>{const i=e.body,n=Wi(i),s=new Yp({$metadata:Hh(e),...n});return Ai(s,i)},hm=async(e,t)=>{const i=e.body,n=Wi(i),s=new cd({$metadata:Hh(e),...n});return Ai(s,i)},fm=async(e,t)=>{const i=e.body,n=Wi(i),s=new wd({$metadata:Hh(e),...n});return Ai(s,i)},gm=async(e,t)=>{const i=e.body,n=Wi(i),s=new Op({$metadata:Hh(e),...n});return Ai(s,i)},ym=async(e,t)=>{const i=e.body,n=Wi(i),s=new gd({$metadata:Hh(e),...n});return Ai(s,i)},xm=async(e,t)=>{const i=e.body,n=Wi(i),s=new pd({$metadata:Hh(e),...n});return Ai(s,i)},vm=async(e,t)=>{const i=e.body,n=Wi(i),s=new Hp({$metadata:Hh(e),...n});return Ai(s,i)},wm=async(e,t)=>{const i=e.body,n=Wi(i),s=new Ud({$metadata:Hh(e),...n});return Ai(s,i)},bm=async(e,t)=>{const i=e.body,n=Wi(i),s=new Pp({$metadata:Hh(e),...n});return Ai(s,i)},Em=async(e,t)=>{const i=e.body,n=Wi(i),s=new Bd({$metadata:Hh(e),...n});return Ai(s,i)},Sm=async(e,t)=>{const i=e.body,n=Wi(i),s=new tp({$metadata:Hh(e),...n});return Ai(s,i)},Cm=async(e,t)=>{const i=e.body,n=Wi(i),s=new Xl({$metadata:Hh(e),...n});return Ai(s,i)},Am=async(e,t)=>{const i=e.body,n=Wi(i),s=new Qp({$metadata:Hh(e),...n});return Ai(s,i)},Im=async(e,t)=>{const i=e.body,n=Wi(i),s=new sd({$metadata:Hh(e),...n});return Ai(s,i)},Tm=async(e,t)=>{const i=e.body,n=Wi(i),s=new Od({$metadata:Hh(e),...n});return Ai(s,i)},km=async(e,t)=>{const i=e.body,n=Wi(i),s=new Pd({$metadata:Hh(e),...n});return Ai(s,i)},Om=async(e,t)=>{const i=e.body,n=Wi(i),s=new Dl({$metadata:Hh(e),...n});return Ai(s,i)},Pm=async(e,t)=>{const i=e.body,n=Wi(i),s=new jl({$metadata:Hh(e),...n});return Ai(s,i)},_m=async(e,t)=>{const i=e.body,n=Wi(i),s=new ld({$metadata:Hh(e),...n});return Ai(s,i)},Rm=async(e,t)=>{const i=e.body,n=Wi(i),s=new Hd({$metadata:Hh(e),...n});return Ai(s,i)},$m=async(e,t)=>{const i=e.body,n=Wi(i),s=new ip({$metadata:Hh(e),...n});return Ai(s,i)},Mm=async(e,t)=>{const i=e.body,n=Wi(i),s=new np({$metadata:Hh(e),...n});return Ai(s,i)},Nm=async(e,t)=>{const i=e.body,n=Wi(i),s=new sp({$metadata:Hh(e),...n});return Ai(s,i)},Dm=async(e,t)=>{const i=e.body,n=Wi(i),s=new ap({$metadata:Hh(e),...n});return Ai(s,i)},jm=async(e,t)=>{const i=e.body,n=Wi(i),s=new _p({$metadata:Hh(e),...n});return Ai(s,i)},zm=async(e,t)=>{const i=e.body,n=Wi(i),s=new iu({$metadata:Hh(e),...n});return Ai(s,i)},Lm=async(e,t)=>{const i=e.body,n=Wi(i),s=new ad({$metadata:Hh(e),...n});return Ai(s,i)},Fm=async(e,t)=>{const i=e.body,n=Wi(i),s=new bd({$metadata:Hh(e),...n});return Ai(s,i)},Um=async(e,t)=>{const i=e.body,n=Wi(i),s=new yd({$metadata:Hh(e),...n});return Ai(s,i)},Bm=async(e,t)=>{const i=e.body,n=Wi(i),s=new Dp({$metadata:Hh(e),...n});return Ai(s,i)},Hm=async(e,t)=>{const i=e.body,n=Wi(i),s=new dp({$metadata:Hh(e),...n});return Ai(s,i)},qm=async(e,t)=>{const i=e.body,n=Wi(i),s=new hp({$metadata:Hh(e),...n});return Ai(s,i)},Vm=async(e,t)=>{const i=e.body,n=Wi(i),s=new fp({$metadata:Hh(e),...n});return Ai(s,i)},Gm=async(e,t)=>{const i=e.body,n=Wi(i),s=new Ul({$metadata:Hh(e),...n});return Ai(s,i)},Wm=async(e,t)=>{const i=e.body,n=Wi(i),s=new Bl({$metadata:Hh(e),...n});return Ai(s,i)},Km=async(e,t)=>{const i=e.body,n=Wi(i),s=new Hl({$metadata:Hh(e),...n});return Ai(s,i)},Qm=async(e,t)=>{const i=e.body,n=Wi(i),s=new ql({$metadata:Hh(e),...n});return Ai(s,i)},Xm=async(e,t)=>{const i=e.body,n=Wi(i),s=new Vl({$metadata:Hh(e),...n});return Ai(s,i)},Jm=async(e,t)=>{const i=e.body,n=Wi(i),s=new td({$metadata:Hh(e),...n});return Ai(s,i)},Ym=async(e,t)=>{const i=e.body,n=Wi(i),s=new gp({$metadata:Hh(e),...n});return Ai(s,i)},Zm=async(e,t)=>{const i=e.body,n=Wi(i),s=new yp({$metadata:Hh(e),...n});return Ai(s,i)},eh=async(e,t)=>{const i=e.body,n=Wi(i),s=new ru({$metadata:Hh(e),...n});return Ai(s,i)},th=async(e,t)=>{const i=e.body,n=Wi(i),s=new xp({$metadata:Hh(e),...n});return Ai(s,i)},ih=async(e,t)=>{const i=e.body,n=Wi(i),s=new Rp({$metadata:Hh(e),...n});return Ai(s,i)},nh=async(e,t)=>{const i=e.body,n=Wi(i),s=new vp({$metadata:Hh(e),...n});return Ai(s,i)},sh=async(e,t)=>{const i=e.body,n=Wi(i),s=new _d({$metadata:Hh(e),...n});return Ai(s,i)},ah=async(e,t)=>{const i=e.body,n=Wi(i),s=new Rd({$metadata:Hh(e),...n});return Ai(s,i)},oh=async(e,t)=>{const i=e.body,n=Wi(i),s=new $d({$metadata:Hh(e),...n});return Ai(s,i)},rh=async(e,t)=>{const i=e.body,n=Wi(i),s=new $p({$metadata:Hh(e),...n});return Ai(s,i)},ch=async(e,t)=>{const i=e.body,n=Wi(i),s=new Md({$metadata:Hh(e),...n});return Ai(s,i)},lh=async(e,t)=>{const i=e.body,n=Wi(i),s=new md({$metadata:Hh(e),...n});return Ai(s,i)},ph=async(e,t)=>{const i=e.body,n=Wi(i),s=new dd({$metadata:Hh(e),...n});return Ai(s,i)},dh=async(e,t)=>{const i=e.body,n=Wi(i),s=new Nd({$metadata:Hh(e),...n});return Ai(s,i)},uh=async(e,t)=>{const i=e.body,n=Wi(i),s=new wp({$metadata:Hh(e),...n});return Ai(s,i)},mh=async(e,t)=>{const i=e.body,n=Wi(i),s=new cu({$metadata:Hh(e),...n});return Ai(s,i)},hh=async(e,t)=>{const i=e.body,n=Wi(i),s=new bp({$metadata:Hh(e),...n});return Ai(s,i)},fh=async(e,t)=>{const i=e.body,n=Wi(i),s=new Ep({$metadata:Hh(e),...n});return Ai(s,i)},gh=async(e,t)=>{const i=e.body,n=Wi(i),s=new Np({$metadata:Hh(e),...n});return Ai(s,i)},yh=async(e,t)=>{const i=e.body,n=Wi(i),s=new Mp({$metadata:Hh(e),...n});return Ai(s,i)},xh=async(e,t)=>{const i=e.body,n=Wi(i),s=new mp({$metadata:Hh(e),...n});return Ai(s,i)},vh=async(e,t)=>{const i=e.body,n=Wi(i),s=new jp({$metadata:Hh(e),...n});return Ai(s,i)},wh=async(e,t)=>{const i=e.body,n=Wi(i),s=new zp({$metadata:Hh(e),...n});return Ai(s,i)},bh=async(e,t)=>{const i=e.body,n=Wi(i),s=new Lp({$metadata:Hh(e),...n});return Ai(s,i)},Eh=async(e,t)=>{const i=e.body,n=Wi(i),s=new jd({$metadata:Hh(e),...n});return Ai(s,i)},Sh=async(e,t)=>{const i=e.body,n=Wi(i),s=new Fp({$metadata:Hh(e),...n});return Ai(s,i)},Ch=async(e,t)=>{const i=e.body,n=Wi(i),s=new ud({$metadata:Hh(e),...n});return Ai(s,i)},Ah=async(e,t)=>{const i=e.body,n=Wi(i),s=new nu({$metadata:Hh(e),...n});return Ai(s,i)},Ih=async(e,t)=>{const i=e.body,n=Wi(i),s=new Ed({$metadata:Hh(e),...n});return Ai(s,i)},Th=async(e,t)=>{const i=e.body,n=Wi(i),s=new Up({$metadata:Hh(e),...n});return Ai(s,i)},kh=async(e,t)=>{const i=e.body,n=Wi(i),s=new Zd({$metadata:Hh(e),...n});return Ai(s,i)},Oh=async(e,t)=>{const i=e.body,n=Wi(i),s=new zl({$metadata:Hh(e),...n});return Ai(s,i)},Ph=async(e,t)=>{const i=e.body,n=Wi(i),s=new Ll({$metadata:Hh(e),...n});return Ai(s,i)},_h=async(e,t)=>{const i=e.body,n=Wi(i),s=new xd({$metadata:Hh(e),...n});return Ai(s,i)},Rh=async(e,t)=>{const i=e.body,n=Wi(i),s=new nd({$metadata:Hh(e),...n});return Ai(s,i)},$h=async(e,t)=>{const i=e.body,n=Wi(i),s=new od({$metadata:Hh(e),...n});return Ai(s,i)},Mh=async(e,t)=>{const i=e.body,n=Wi(i),s=new Sd({$metadata:Hh(e),...n});return Ai(s,i)},Nh=async(e,t)=>{const i=e.body,n=Wi(i),s=new Cd({$metadata:Hh(e),...n});return Ai(s,i)},Dh=async(e,t)=>{const i=e.body,n=Wi(i),s=new Xp({$metadata:Hh(e),...n});return Ai(s,i)},jh=async(e,t)=>{const i=e.body,n=Wi(i),s=new Dd({$metadata:Hh(e),...n});return Ai(s,i)},zh=async(e,t)=>{const i=e.body,n=Wi(i),s=new op({$metadata:Hh(e),...n});return Ai(s,i)},Lh=(e,t)=>Ui(e,{Parameter:e=>Uh(e)}),Fh=(e,t)=>Ui(e,{InvalidParameters:Wi,Parameters:e=>Bh(e)}),Uh=(e,t)=>Ui(e,{ARN:ai,DataType:ai,LastModifiedDate:e=>si((e=>{if(null==e)return;let t;if("number"==typeof e)t=e;else if("string"==typeof e)t=oi(e);else{if("object"!=typeof e||1!==e.tag)throw new TypeError("Epoch timestamps must be expressed as floating point numbers or their string representation");t=e.value}if(Number.isNaN(t)||t===1/0||t===-1/0)throw new TypeError("Epoch timestamps must be valid, non-Infinite, non-NaN numerics");return new Date(Math.round(1e3*t))})(Xt(e))),Name:ai,Selector:ai,SourceResult:ai,Type:ai,Value:ai,Version:Zt}),Bh=(e,t)=>{const i=(e||[]).filter((e=>null!=e)).map((e=>Uh(e)));return i},Hh=e=>({httpStatusCode:e.statusCode,requestId:e.headers["x-amzn-requestid"]??e.headers["x-amzn-request-id"]??e.headers["x-amz-request-id"],extendedRequestId:e.headers["x-amz-id-2"],cfId:e.headers["x-amz-cf-id"]}),qh=Ii(Ml),Vh=async(e,t,i,n,s)=>{const{hostname:a,protocol:o="https",port:r,path:c}=await e.endpoint(),l={protocol:o,hostname:a,port:r,method:"POST",path:c.endsWith("/")?c.slice(0,-1)+i:c+i,headers:t};return void 0!==s&&(l.body=s),new I(l)};function Gh(e){return{"content-type":"application/x-amz-json-1.1","x-amz-target":`AmazonSSM.${e}`}}class Wh extends(Gt.classBuilder().ep(Xc).m((function(e,t,i,n){return[B(i,this.serialize,this.deserialize),cs(i,e.getEndpointParameterInstructions())]})).s("AmazonSSM","GetParameter",{}).n("SSMClient","GetParameterCommand").f(void 0,Xd).ser(lu).de(du).build()){}class Kh extends(Gt.classBuilder().ep(Xc).m((function(e,t,i,n){return[B(i,this.serialize,this.deserialize),cs(i,e.getEndpointParameterInstructions())]})).s("AmazonSSM","GetParameters",{}).n("SSMClient","GetParametersCommand").f(void 0,Jd).ser(pu).de(uu).build()){}const Qh={clientConfig:bc,onlyDefault:!1,prefix:process.env.SSM_PARAM_PATH},Xh=async(e,t,i)=>({operation:N(t).operation,region:await D(e.region)()||(()=>{throw new Error("expected `region` to be configured for `aws.auth#sigv4`")})()});const Jh=e=>{const t=[];return e.operation,t.push(function(e){return{schemeId:"aws.auth#sigv4",signingProperties:{name:"ses",region:e.region},propertiesExtractor:(e,t)=>({signingProperties:{config:e,context:t}})}}(e)),t},Yh={UseFIPS:{type:"builtInParams",name:"useFipsEndpoint"},Endpoint:{type:"builtInParams",name:"endpoint"},Region:{type:"builtInParams",name:"region"},UseDualStack:{type:"builtInParams",name:"useDualstackEndpoint"}};var Zh="3.687.0";const ef="required",tf="fn",nf="argv",sf="ref",af=!0,of="isSet",rf="booleanEquals",cf="error",lf="endpoint",pf="tree",df="PartitionResult",uf={[ef]:!1,type:"String"},mf={[ef]:!0,default:!1,type:"Boolean"},hf={[sf]:"Endpoint"},ff={[tf]:rf,[nf]:[{[sf]:"UseFIPS"},!0]},gf={[tf]:rf,[nf]:[{[sf]:"UseDualStack"},!0]},yf={},xf={[tf]:"getAttr",[nf]:[{[sf]:df},"supportsFIPS"]},vf={[tf]:rf,[nf]:[!0,{[tf]:"getAttr",[nf]:[{[sf]:df},"supportsDualStack"]}]},wf=[ff],bf=[gf],Ef=[{[sf]:"Region"}],Sf={version:"1.0",parameters:{Region:uf,UseDualStack:mf,UseFIPS:mf,Endpoint:uf},rules:[{conditions:[{[tf]:of,[nf]:[hf]}],rules:[{conditions:wf,error:"Invalid Configuration: FIPS and custom endpoint are not supported",type:cf},{conditions:bf,error:"Invalid Configuration: Dualstack and custom endpoint are not supported",type:cf},{endpoint:{url:hf,properties:yf,headers:yf},type:lf}],type:pf},{conditions:[{[tf]:of,[nf]:Ef}],rules:[{conditions:[{[tf]:"aws.partition",[nf]:Ef,assign:df}],rules:[{conditions:[ff,gf],rules:[{conditions:[{[tf]:rf,[nf]:[af,xf]},vf],rules:[{endpoint:{url:"https://email-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:yf,headers:yf},type:lf}],type:pf},{error:"FIPS and DualStack are enabled, but this partition does not support one or both",type:cf}],type:pf},{conditions:wf,rules:[{conditions:[{[tf]:rf,[nf]:[xf,af]}],rules:[{endpoint:{url:"https://email-fips.{Region}.{PartitionResult#dnsSuffix}",properties:yf,headers:yf},type:lf}],type:pf},{error:"FIPS is enabled but this partition does not support FIPS",type:cf}],type:pf},{conditions:bf,rules:[{conditions:[vf],rules:[{endpoint:{url:"https://email.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:yf,headers:yf},type:lf}],type:pf},{error:"DualStack is enabled but this partition does not support DualStack",type:cf}],type:pf},{endpoint:{url:"https://email.{Region}.{PartitionResult#dnsSuffix}",properties:yf,headers:yf},type:lf}],type:pf}],type:pf},{error:"Invalid Configuration: Missing Region",type:cf}]},Cf=new Ie({size:50,params:["Endpoint","Region","UseDualStack","UseFIPS"]}),Af=(e,t={})=>Cf.get(e,(()=>Je(Sf,{endpointParams:e,logger:t.logger})));_e.aws=et;const If=e=>{const t=mo(e),i=()=>t().then(ki),n=(e=>({apiVersion:"2010-12-01",base64Decoder:e?.base64Decoder??Z,base64Encoder:e?.base64Encoder??ne,disableHostPrefix:e?.disableHostPrefix??!1,endpointProvider:e?.endpointProvider??Af,extensions:e?.extensions??[],httpAuthSchemeProvider:e?.httpAuthSchemeProvider??Jh,httpAuthSchemes:e?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:e=>e.getIdentityProvider("aws.auth#sigv4"),signer:new ot}],logger:e?.logger??new Li,serviceId:e?.serviceId??"SES",urlParser:e?.urlParser??ns,utf8Decoder:e?.utf8Decoder??ee,utf8Encoder:e?.utf8Encoder??ie}))(e);return{...n,...e,runtime:"browser",defaultsMode:t,bodyLengthChecker:e?.bodyLengthChecker??La,credentialDefaultProvider:e?.credentialDefaultProvider??(e=>()=>Promise.reject(new Error("Credential is missing"))),defaultUserAgentProvider:e?.defaultUserAgentProvider??pa({serviceId:n.serviceId,clientVersion:Zh}),maxAttempts:e?.maxAttempts??3,region:e?.region??ja("Region is missing"),requestHandler:pe.create(e?.requestHandler??i),retryMode:e?.retryMode??(async()=>(await i()).retryMode||ds),sha256:e?.sha256??oa,streamCollector:e?.streamCollector??de,useDualstackEndpoint:e?.useDualstackEndpoint??(()=>Promise.resolve(Bn)),useFipsEndpoint:e?.useFipsEndpoint??(()=>Promise.resolve(Hn))}},Tf=e=>{const t=e.httpAuthSchemes;let i=e.httpAuthSchemeProvider,n=e.credentials;return{setHttpAuthScheme(e){const i=t.findIndex((t=>t.schemeId===e.schemeId));-1===i?t.push(e):t.splice(i,1,e)},httpAuthSchemes:()=>t,setHttpAuthSchemeProvider(e){i=e},httpAuthSchemeProvider:()=>i,setCredentials(e){n=e},credentials:()=>n}};class kf extends Vt{constructor(...[e]){const t=If(e||{});var i;const n=Ae((i=t,{...i,useDualstackEndpoint:i.useDualstackEndpoint??!1,useFipsEndpoint:i.useFipsEndpoint??!1,defaultSigningName:"ses"})),s=ks(n),a=Gn(s),o=ls(a);const r=((e,t)=>{const i={...go(e),...$i(e),...g(e),...Tf(e)};return t.forEach((e=>e.configure(i))),{...e,...yo(i),...Mi(i),...y(i),...(n=i,{httpAuthSchemes:n.httpAuthSchemes(),httpAuthSchemeProvider:n.httpAuthSchemeProvider(),credentials:n.credentials()})};var n})({...Lt(o)},e?.extensions||[]);super(r),this.config=r,this.middlewareStack.use(Fn(this.config)),this.middlewareStack.use(Ms(this.config)),this.middlewareStack.use(Qn(this.config)),this.middlewareStack.use(O(this.config)),this.middlewareStack.use(_(this.config)),this.middlewareStack.use(M(this.config)),this.middlewareStack.use(L(this.config,{httpAuthSchemeParametersProvider:Xh,identityProviderConfigProvider:async e=>new we({"aws.auth#sigv4":e.credentials})})),this.middlewareStack.use(G(this.config))}destroy(){super.destroy()}}class Of extends Ci{constructor(e){super(e),Object.setPrototypeOf(this,Of.prototype)}}class Pf extends Of{constructor(e){super({name:"AccountSendingPausedException",$fault:"client",...e}),this.name="AccountSendingPausedException",this.$fault="client",Object.setPrototypeOf(this,Pf.prototype)}}class _f extends Of{constructor(e){super({name:"AlreadyExistsException",$fault:"client",...e}),this.name="AlreadyExistsException",this.$fault="client",Object.setPrototypeOf(this,_f.prototype),this.Name=e.Name}}class Rf extends Of{constructor(e){super({name:"CannotDeleteException",$fault:"client",...e}),this.name="CannotDeleteException",this.$fault="client",Object.setPrototypeOf(this,Rf.prototype),this.Name=e.Name}}class $f extends Of{constructor(e){super({name:"LimitExceededException",$fault:"client",...e}),this.name="LimitExceededException",this.$fault="client",Object.setPrototypeOf(this,$f.prototype)}}class Mf extends Of{constructor(e){super({name:"RuleSetDoesNotExistException",$fault:"client",...e}),this.name="RuleSetDoesNotExistException",this.$fault="client",Object.setPrototypeOf(this,Mf.prototype),this.Name=e.Name}}class Nf extends Of{constructor(e){super({name:"ConfigurationSetAlreadyExistsException",$fault:"client",...e}),this.name="ConfigurationSetAlreadyExistsException",this.$fault="client",Object.setPrototypeOf(this,Nf.prototype),this.ConfigurationSetName=e.ConfigurationSetName}}class Df extends Of{constructor(e){super({name:"ConfigurationSetDoesNotExistException",$fault:"client",...e}),this.name="ConfigurationSetDoesNotExistException",this.$fault="client",Object.setPrototypeOf(this,Df.prototype),this.ConfigurationSetName=e.ConfigurationSetName}}class jf extends Of{constructor(e){super({name:"ConfigurationSetSendingPausedException",$fault:"client",...e}),this.name="ConfigurationSetSendingPausedException",this.$fault="client",Object.setPrototypeOf(this,jf.prototype),this.ConfigurationSetName=e.ConfigurationSetName}}class zf extends Of{constructor(e){super({name:"InvalidConfigurationSetException",$fault:"client",...e}),this.name="InvalidConfigurationSetException",this.$fault="client",Object.setPrototypeOf(this,zf.prototype)}}class Lf extends Of{constructor(e){super({name:"EventDestinationAlreadyExistsException",$fault:"client",...e}),this.name="EventDestinationAlreadyExistsException",this.$fault="client",Object.setPrototypeOf(this,Lf.prototype),this.ConfigurationSetName=e.ConfigurationSetName,this.EventDestinationName=e.EventDestinationName}}class Ff extends Of{constructor(e){super({name:"InvalidCloudWatchDestinationException",$fault:"client",...e}),this.name="InvalidCloudWatchDestinationException",this.$fault="client",Object.setPrototypeOf(this,Ff.prototype),this.ConfigurationSetName=e.ConfigurationSetName,this.EventDestinationName=e.EventDestinationName}}class Uf extends Of{constructor(e){super({name:"InvalidFirehoseDestinationException",$fault:"client",...e}),this.name="InvalidFirehoseDestinationException",this.$fault="client",Object.setPrototypeOf(this,Uf.prototype),this.ConfigurationSetName=e.ConfigurationSetName,this.EventDestinationName=e.EventDestinationName}}class Bf extends Of{constructor(e){super({name:"InvalidSNSDestinationException",$fault:"client",...e}),this.name="InvalidSNSDestinationException",this.$fault="client",Object.setPrototypeOf(this,Bf.prototype),this.ConfigurationSetName=e.ConfigurationSetName,this.EventDestinationName=e.EventDestinationName}}class Hf extends Of{constructor(e){super({name:"InvalidTrackingOptionsException",$fault:"client",...e}),this.name="InvalidTrackingOptionsException",this.$fault="client",Object.setPrototypeOf(this,Hf.prototype)}}class qf extends Of{constructor(e){super({name:"TrackingOptionsAlreadyExistsException",$fault:"client",...e}),this.name="TrackingOptionsAlreadyExistsException",this.$fault="client",Object.setPrototypeOf(this,qf.prototype),this.ConfigurationSetName=e.ConfigurationSetName}}class Vf extends Of{constructor(e){super({name:"CustomVerificationEmailInvalidContentException",$fault:"client",...e}),this.name="CustomVerificationEmailInvalidContentException",this.$fault="client",Object.setPrototypeOf(this,Vf.prototype)}}class Gf extends Of{constructor(e){super({name:"CustomVerificationEmailTemplateAlreadyExistsException",$fault:"client",...e}),this.name="CustomVerificationEmailTemplateAlreadyExistsException",this.$fault="client",Object.setPrototypeOf(this,Gf.prototype),this.CustomVerificationEmailTemplateName=e.CustomVerificationEmailTemplateName}}class Wf extends Of{constructor(e){super({name:"FromEmailAddressNotVerifiedException",$fault:"client",...e}),this.name="FromEmailAddressNotVerifiedException",this.$fault="client",Object.setPrototypeOf(this,Wf.prototype),this.FromEmailAddress=e.FromEmailAddress}}class Kf extends Of{constructor(e){super({name:"InvalidLambdaFunctionException",$fault:"client",...e}),this.name="InvalidLambdaFunctionException",this.$fault="client",Object.setPrototypeOf(this,Kf.prototype),this.FunctionArn=e.FunctionArn}}class Qf extends Of{constructor(e){super({name:"InvalidS3ConfigurationException",$fault:"client",...e}),this.name="InvalidS3ConfigurationException",this.$fault="client",Object.setPrototypeOf(this,Qf.prototype),this.Bucket=e.Bucket}}class Xf extends Of{constructor(e){super({name:"InvalidSnsTopicException",$fault:"client",...e}),this.name="InvalidSnsTopicException",this.$fault="client",Object.setPrototypeOf(this,Xf.prototype),this.Topic=e.Topic}}class Jf extends Of{constructor(e){super({name:"RuleDoesNotExistException",$fault:"client",...e}),this.name="RuleDoesNotExistException",this.$fault="client",Object.setPrototypeOf(this,Jf.prototype),this.Name=e.Name}}class Yf extends Of{constructor(e){super({name:"InvalidTemplateException",$fault:"client",...e}),this.name="InvalidTemplateException",this.$fault="client",Object.setPrototypeOf(this,Yf.prototype),this.TemplateName=e.TemplateName}}class Zf extends Of{constructor(e){super({name:"CustomVerificationEmailTemplateDoesNotExistException",$fault:"client",...e}),this.name="CustomVerificationEmailTemplateDoesNotExistException",this.$fault="client",Object.setPrototypeOf(this,Zf.prototype),this.CustomVerificationEmailTemplateName=e.CustomVerificationEmailTemplateName}}class eg extends Of{constructor(e){super({name:"EventDestinationDoesNotExistException",$fault:"client",...e}),this.name="EventDestinationDoesNotExistException",this.$fault="client",Object.setPrototypeOf(this,eg.prototype),this.ConfigurationSetName=e.ConfigurationSetName,this.EventDestinationName=e.EventDestinationName}}class tg extends Of{constructor(e){super({name:"TrackingOptionsDoesNotExistException",$fault:"client",...e}),this.name="TrackingOptionsDoesNotExistException",this.$fault="client",Object.setPrototypeOf(this,tg.prototype),this.ConfigurationSetName=e.ConfigurationSetName}}class ig extends Of{constructor(e){super({name:"TemplateDoesNotExistException",$fault:"client",...e}),this.name="TemplateDoesNotExistException",this.$fault="client",Object.setPrototypeOf(this,ig.prototype),this.TemplateName=e.TemplateName}}class ng extends Of{constructor(e){super({name:"InvalidDeliveryOptionsException",$fault:"client",...e}),this.name="InvalidDeliveryOptionsException",this.$fault="client",Object.setPrototypeOf(this,ng.prototype)}}class sg extends Of{constructor(e){super({name:"InvalidPolicyException",$fault:"client",...e}),this.name="InvalidPolicyException",this.$fault="client",Object.setPrototypeOf(this,sg.prototype)}}class ag extends Of{constructor(e){super({name:"InvalidRenderingParameterException",$fault:"client",...e}),this.name="InvalidRenderingParameterException",this.$fault="client",Object.setPrototypeOf(this,ag.prototype),this.TemplateName=e.TemplateName}}class og extends Of{constructor(e){super({name:"MailFromDomainNotVerifiedException",$fault:"client",...e}),this.name="MailFromDomainNotVerifiedException",this.$fault="client",Object.setPrototypeOf(this,og.prototype)}}class rg extends Of{constructor(e){super({name:"MessageRejected",$fault:"client",...e}),this.name="MessageRejected",this.$fault="client",Object.setPrototypeOf(this,rg.prototype)}}class cg extends Of{constructor(e){super({name:"MissingRenderingAttributeException",$fault:"client",...e}),this.name="MissingRenderingAttributeException",this.$fault="client",Object.setPrototypeOf(this,cg.prototype),this.TemplateName=e.TemplateName}}class lg extends Of{constructor(e){super({name:"ProductionAccessNotGrantedException",$fault:"client",...e}),this.name="ProductionAccessNotGrantedException",this.$fault="client",Object.setPrototypeOf(this,lg.prototype)}}const pg=async(e,t)=>{const i=LS;let n;return n=bk({...kv(e),[US]:mC,[rk]:FS}),zS(t,i,"/",void 0,n)},dg=async(e,t)=>{const i=LS;let n;return n=bk({...$v(e),[US]:oC,[rk]:FS}),zS(t,i,"/",void 0,n)},ug=async(e,t)=>{const i=LS;let n;return n=bk({...Rv(e),[US]:rC,[rk]:FS}),zS(t,i,"/",void 0,n)},mg=async(e,t)=>{const i=LS;let n;return n=bk({...Mv(e),[US]:cC,[rk]:FS}),zS(t,i,"/",void 0,n)},hg=async(e,t)=>{const i=LS;let n;return n=bk({...Nv(e),[US]:lC,[rk]:FS}),zS(t,i,"/",void 0,n)},fg=async(e,t)=>{const i=LS;let n;return n=bk({...Dv(e),[US]:dC,[rk]:FS}),zS(t,i,"/",void 0,n)},gg=async(e,t)=>{const i=LS;let n;return n=bk({...jv(e),[US]:uC,[rk]:FS}),zS(t,i,"/",void 0,n)},yg=async(e,t)=>{const i=LS;let n;return n=bk({...zv(e),[US]:hC,[rk]:FS}),zS(t,i,"/",void 0,n)},xg=async(e,t)=>{const i=LS;let n;return n=bk({...Lv(e),[US]:vC,[rk]:FS}),zS(t,i,"/",void 0,n)},vg=async(e,t)=>{const i=LS;let n;return n=bk({...Uv(e),[US]:RC,[rk]:FS}),zS(t,i,"/",void 0,n)},wg=async(e,t)=>{const i=LS;let n;return n=bk({...Fv(e),[US]:$C,[rk]:FS}),zS(t,i,"/",void 0,n)},bg=async(e,t)=>{const i=LS;let n;return n=bk({...Bv(e),[US]:MC,[rk]:FS}),zS(t,i,"/",void 0,n)},Eg=async(e,t)=>{const i=LS;let n;return n=bk({...Hv(e),[US]:DC,[rk]:FS}),zS(t,i,"/",void 0,n)},Sg=async(e,t)=>{const i=LS;let n;return n=bk({...Vv(e),[US]:FC,[rk]:FS}),zS(t,i,"/",void 0,n)},Cg=async(e,t)=>{const i=LS;let n;return n=bk({...qv(e),[US]:UC,[rk]:FS}),zS(t,i,"/",void 0,n)},Ag=async(e,t)=>{const i=LS;let n;return n=bk({...Gv(e),[US]:qC,[rk]:FS}),zS(t,i,"/",void 0,n)},Ig=async(e,t)=>{const i=LS;let n;return n=bk({...Wv(e),[US]:VC,[rk]:FS}),zS(t,i,"/",void 0,n)},Tg=async(e,t)=>{const i=LS;let n;return n=bk({...Kv(e),[US]:GC,[rk]:FS}),zS(t,i,"/",void 0,n)},kg=async(e,t)=>{const i=LS;let n;return n=bk({...Qv(e),[US]:XC,[rk]:FS}),zS(t,i,"/",void 0,n)},Og=async(e,t)=>{const i=LS;let n;return n=bk({...Xv(e),[US]:tA,[rk]:FS}),zS(t,i,"/",void 0,n)},Pg=async(e,t)=>{const i=LS;let n;return n=bk({...Jv(),[US]:OC,[rk]:FS}),zS(t,i,"/",void 0,n)},_g=async(e,t)=>{const i=LS;let n;return n=bk({...Yv(e),[US]:NC,[rk]:FS}),zS(t,i,"/",void 0,n)},Rg=async(e,t)=>{const i=LS;let n;return n=bk({...Zv(e),[US]:KC,[rk]:FS}),zS(t,i,"/",void 0,n)},$g=async(e,t)=>{const i=LS;let n;return n=bk({...ew(e),[US]:WC,[rk]:FS}),zS(t,i,"/",void 0,n)},Mg=async(e,t)=>{const i=LS,n=bk({[US]:AA,[rk]:FS});return zS(t,i,"/",void 0,n)},Ng=async(e,t)=>{const i=LS;let n;return n=bk({...ow(e),[US]:IA,[rk]:FS}),zS(t,i,"/",void 0,n)},Dg=async(e,t)=>{const i=LS;let n;return n=bk({...rw(e),[US]:TA,[rk]:FS}),zS(t,i,"/",void 0,n)},jg=async(e,t)=>{const i=LS;let n;return n=bk({...cw(e),[US]:kA,[rk]:FS}),zS(t,i,"/",void 0,n)},zg=async(e,t)=>{const i=LS;let n;return n=bk({...lw(e),[US]:OA,[rk]:FS}),zS(t,i,"/",void 0,n)},Lg=async(e,t)=>{const i=LS;let n;return n=bk({...pw(e),[US]:PA,[rk]:FS}),zS(t,i,"/",void 0,n)},Fg=async(e,t)=>{const i=LS;let n;return n=bk({...dw(e),[US]:_A,[rk]:FS}),zS(t,i,"/",void 0,n)},Ug=async(e,t)=>{const i=LS,n=bk({[US]:RA,[rk]:FS});return zS(t,i,"/",void 0,n)},Bg=async(e,t)=>{const i=LS,n=bk({[US]:$A,[rk]:FS});return zS(t,i,"/",void 0,n)},Hg=async(e,t)=>{const i=LS;let n;return n=bk({...uw(e),[US]:MA,[rk]:FS}),zS(t,i,"/",void 0,n)},qg=async(e,t)=>{const i=LS;let n;return n=bk({...fw(e),[US]:ZA,[rk]:FS}),zS(t,i,"/",void 0,n)},Vg=async(e,t)=>{const i=LS;let n;return n=bk({...gw(e),[US]:eI,[rk]:FS}),zS(t,i,"/",void 0,n)},Gg=async(e,t)=>{const i=LS;let n;return n=bk({...yw(e),[US]:iI,[rk]:FS}),zS(t,i,"/",void 0,n)},Wg=async(e,t)=>{const i=LS;let n;return n=bk({...xw(e),[US]:nI,[rk]:FS}),zS(t,i,"/",void 0,n)},Kg=async(e,t)=>{const i=LS;let n;return n=bk({...vw(),[US]:sI,[rk]:FS}),zS(t,i,"/",void 0,n)},Qg=async(e,t)=>{const i=LS;let n;return n=bk({...ww(e),[US]:aI,[rk]:FS}),zS(t,i,"/",void 0,n)},Xg=async(e,t)=>{const i=LS;let n;return n=bk({...bw(e),[US]:oI,[rk]:FS}),zS(t,i,"/",void 0,n)},Jg=async(e,t)=>{const i=LS,n=bk({[US]:rI,[rk]:FS});return zS(t,i,"/",void 0,n)},Yg=async(e,t)=>{const i=LS;let n;return n=bk({...Iw(e),[US]:OI,[rk]:FS}),zS(t,i,"/",void 0,n)},Zg=async(e,t)=>{const i=LS;let n;return n=bk({...Tw(e),[US]:PI,[rk]:FS}),zS(t,i,"/",void 0,n)},ey=async(e,t)=>{const i=LS;let n;return n=bk({...Mw(e),[US]:GI,[rk]:FS}),zS(t,i,"/",void 0,n)},ty=async(e,t)=>{const i=LS;let n;return n=bk({...Dw(e),[US]:cT,[rk]:FS}),zS(t,i,"/",void 0,n)},iy=async(e,t)=>{const i=LS;let n;return n=bk({...jw(e),[US]:lT,[rk]:FS}),zS(t,i,"/",void 0,n)},ny=async(e,t)=>{const i=LS;let n;return n=bk({...zw(e),[US]:dT,[rk]:FS}),zS(t,i,"/",void 0,n)},sy=async(e,t)=>{const i=LS;let n;return n=bk({...Lw(e),[US]:mT,[rk]:FS}),zS(t,i,"/",void 0,n)},ay=async(e,t)=>{const i=LS;let n;return n=bk({...Fw(e,t),[US]:IT,[rk]:FS}),zS(t,i,"/",void 0,n)},oy=async(e,t)=>{const i=LS;let n;return n=bk({...Uw(e),[US]:PT,[rk]:FS}),zS(t,i,"/",void 0,n)},ry=async(e,t)=>{const i=LS;let n;return n=bk({...Bw(e),[US]:aT,[rk]:FS}),zS(t,i,"/",void 0,n)},cy=async(e,t)=>{const i=LS;let n;return n=bk({...Hw(e),[US]:gT,[rk]:FS}),zS(t,i,"/",void 0,n)},ly=async(e,t)=>{const i=LS;let n;return n=bk({...qw(e),[US]:yT,[rk]:FS}),zS(t,i,"/",void 0,n)},py=async(e,t)=>{const i=LS;let n;return n=bk({...Vw(e),[US]:xT,[rk]:FS}),zS(t,i,"/",void 0,n)},dy=async(e,t)=>{const i=LS;let n;return n=bk({...Gw(e),[US]:vT,[rk]:FS}),zS(t,i,"/",void 0,n)},uy=async(e,t)=>{const i=LS;let n;return n=bk({...Ww(e),[US]:wT,[rk]:FS}),zS(t,i,"/",void 0,n)},my=async(e,t)=>{const i=LS;let n;return n=bk({...Kw(e),[US]:TT,[rk]:FS}),zS(t,i,"/",void 0,n)},hy=async(e,t)=>{const i=LS;let n;return n=bk({...Zw(e),[US]:WT,[rk]:FS}),zS(t,i,"/",void 0,n)},fy=async(e,t)=>{const i=LS;let n;return n=bk({...tb(e),[US]:ZT,[rk]:FS}),zS(t,i,"/",void 0,n)},gy=async(e,t)=>{const i=LS;let n;return n=bk({...ib(e),[US]:ek,[rk]:FS}),zS(t,i,"/",void 0,n)},yy=async(e,t)=>{const i=LS;let n;return n=bk({...nb(e),[US]:tk,[rk]:FS}),zS(t,i,"/",void 0,n)},xy=async(e,t)=>{const i=LS;let n;return n=bk({...sb(e),[US]:ik,[rk]:FS}),zS(t,i,"/",void 0,n)},vy=async(e,t)=>{const i=LS;let n;return n=bk({...ab(e),[US]:nk,[rk]:FS}),zS(t,i,"/",void 0,n)},wy=async(e,t)=>{const i=LS;let n;return n=bk({...ob(e),[US]:sk,[rk]:FS}),zS(t,i,"/",void 0,n)},by=async(e,t)=>{const i=LS;let n;return n=bk({...rb(e),[US]:ak,[rk]:FS}),zS(t,i,"/",void 0,n)},Ey=async(e,t)=>{const i=LS;let n;return n=bk({...cb(e),[US]:ok,[rk]:FS}),zS(t,i,"/",void 0,n)},Sy=async(e,t)=>{const i=LS;let n;return n=bk({...lb(e),[US]:lk,[rk]:FS}),zS(t,i,"/",void 0,n)},Cy=async(e,t)=>{const i=LS;let n;return n=bk({...pb(e),[US]:pk,[rk]:FS}),zS(t,i,"/",void 0,n)},Ay=async(e,t)=>{const i=LS;let n;return n=bk({...db(e),[US]:dk,[rk]:FS}),zS(t,i,"/",void 0,n)},Iy=async(e,t)=>{const i=LS;let n;return n=bk({...ub(e),[US]:mk,[rk]:FS}),zS(t,i,"/",void 0,n)},Ty=async(e,t)=>{if(e.statusCode>=300)return qx(e,t);const i=await Pn(e.body,t);let n={};n=xb(i.CloneReceiptRuleSetResult);return{$metadata:DS(e),...n}},ky=async(e,t)=>{if(e.statusCode>=300)return qx(e,t);const i=await Pn(e.body,t);let n={};n=Ab(i.CreateConfigurationSetResult);return{$metadata:DS(e),...n}},Oy=async(e,t)=>{if(e.statusCode>=300)return qx(e,t);const i=await Pn(e.body,t);let n={};n=Cb(i.CreateConfigurationSetEventDestinationResult);return{$metadata:DS(e),...n}},Py=async(e,t)=>{if(e.statusCode>=300)return qx(e,t);const i=await Pn(e.body,t);let n={};n=Ib(i.CreateConfigurationSetTrackingOptionsResult);return{$metadata:DS(e),...n}},_y=async(e,t)=>{if(e.statusCode>=300)return qx(e,t);await ge(e.body,t);return{$metadata:DS(e)}},Ry=async(e,t)=>{if(e.statusCode>=300)return qx(e,t);const i=await Pn(e.body,t);let n={};n=Tb(i.CreateReceiptFilterResult);return{$metadata:DS(e),...n}},$y=async(e,t)=>{if(e.statusCode>=300)return qx(e,t);const i=await Pn(e.body,t);let n={};n=kb(i.CreateReceiptRuleResult);return{$metadata:DS(e),...n}},My=async(e,t)=>{if(e.statusCode>=300)return qx(e,t);const i=await Pn(e.body,t);let n={};n=Ob(i.CreateReceiptRuleSetResult);return{$metadata:DS(e),...n}},Ny=async(e,t)=>{if(e.statusCode>=300)return qx(e,t);const i=await Pn(e.body,t);let n={};n=Pb(i.CreateTemplateResult);return{$metadata:DS(e),...n}},Dy=async(e,t)=>{if(e.statusCode>=300)return qx(e,t);const i=await Pn(e.body,t);let n={};n=Db(i.DeleteConfigurationSetResult);return{$metadata:DS(e),...n}},jy=async(e,t)=>{if(e.statusCode>=300)return qx(e,t);const i=await Pn(e.body,t);let n={};n=Nb(i.DeleteConfigurationSetEventDestinationResult);return{$metadata:DS(e),...n}},zy=async(e,t)=>{if(e.statusCode>=300)return qx(e,t);const i=await Pn(e.body,t);let n={};n=jb(i.DeleteConfigurationSetTrackingOptionsResult);return{$metadata:DS(e),...n}},Ly=async(e,t)=>{if(e.statusCode>=300)return qx(e,t);await ge(e.body,t);return{$metadata:DS(e)}},Fy=async(e,t)=>{if(e.statusCode>=300)return qx(e,t);const i=await Pn(e.body,t);let n={};n=Lb(i.DeleteIdentityResult);return{$metadata:DS(e),...n}},Uy=async(e,t)=>{if(e.statusCode>=300)return qx(e,t);const i=await Pn(e.body,t);let n={};n=zb(i.DeleteIdentityPolicyResult);return{$metadata:DS(e),...n}},By=async(e,t)=>{if(e.statusCode>=300)return qx(e,t);const i=await Pn(e.body,t);let n={};n=Fb(i.DeleteReceiptFilterResult);return{$metadata:DS(e),...n}},Hy=async(e,t)=>{if(e.statusCode>=300)return qx(e,t);const i=await Pn(e.body,t);let n={};n=Ub(i.DeleteReceiptRuleResult);return{$metadata:DS(e),...n}},qy=async(e,t)=>{if(e.statusCode>=300)return qx(e,t);const i=await Pn(e.body,t);let n={};n=Bb(i.DeleteReceiptRuleSetResult);return{$metadata:DS(e),...n}},Vy=async(e,t)=>{if(e.statusCode>=300)return qx(e,t);const i=await Pn(e.body,t);let n={};n=Hb(i.DeleteTemplateResult);return{$metadata:DS(e),...n}},Gy=async(e,t)=>{if(e.statusCode>=300)return qx(e,t);await ge(e.body,t);return{$metadata:DS(e)}},Wy=async(e,t)=>{if(e.statusCode>=300)return qx(e,t);const i=await Pn(e.body,t);let n={};n=qb(i.DescribeActiveReceiptRuleSetResult);return{$metadata:DS(e),...n}},Ky=async(e,t)=>{if(e.statusCode>=300)return qx(e,t);const i=await Pn(e.body,t);let n={};n=Vb(i.DescribeConfigurationSetResult);return{$metadata:DS(e),...n}},Qy=async(e,t)=>{if(e.statusCode>=300)return qx(e,t);const i=await Pn(e.body,t);let n={};n=Gb(i.DescribeReceiptRuleResult);return{$metadata:DS(e),...n}},Xy=async(e,t)=>{if(e.statusCode>=300)return qx(e,t);const i=await Pn(e.body,t);let n={};n=Wb(i.DescribeReceiptRuleSetResult);return{$metadata:DS(e),...n}},Jy=async(e,t)=>{if(e.statusCode>=300)return qx(e,t);const i=await Pn(e.body,t);let n={};n=eE(i.GetAccountSendingEnabledResult);return{$metadata:DS(e),...n}},Yy=async(e,t)=>{if(e.statusCode>=300)return qx(e,t);const i=await Pn(e.body,t);let n={};n=tE(i.GetCustomVerificationEmailTemplateResult);return{$metadata:DS(e),...n}},Zy=async(e,t)=>{if(e.statusCode>=300)return qx(e,t);const i=await Pn(e.body,t);let n={};n=iE(i.GetIdentityDkimAttributesResult);return{$metadata:DS(e),...n}},ex=async(e,t)=>{if(e.statusCode>=300)return qx(e,t);const i=await Pn(e.body,t);let n={};n=nE(i.GetIdentityMailFromDomainAttributesResult);return{$metadata:DS(e),...n}},tx=async(e,t)=>{if(e.statusCode>=300)return qx(e,t);const i=await Pn(e.body,t);let n={};n=sE(i.GetIdentityNotificationAttributesResult);return{$metadata:DS(e),...n}},ix=async(e,t)=>{if(e.statusCode>=300)return qx(e,t);const i=await Pn(e.body,t);let n={};n=aE(i.GetIdentityPoliciesResult);return{$metadata:DS(e),...n}},nx=async(e,t)=>{if(e.statusCode>=300)return qx(e,t);const i=await Pn(e.body,t);let n={};n=oE(i.GetIdentityVerificationAttributesResult);return{$metadata:DS(e),...n}},sx=async(e,t)=>{if(e.statusCode>=300)return qx(e,t);const i=await Pn(e.body,t);let n={};n=rE(i.GetSendQuotaResult);return{$metadata:DS(e),...n}},ax=async(e,t)=>{if(e.statusCode>=300)return qx(e,t);const i=await Pn(e.body,t);let n={};n=cE(i.GetSendStatisticsResult);return{$metadata:DS(e),...n}},ox=async(e,t)=>{if(e.statusCode>=300)return qx(e,t);const i=await Pn(e.body,t);let n={};n=lE(i.GetTemplateResult);return{$metadata:DS(e),...n}},rx=async(e,t)=>{if(e.statusCode>=300)return qx(e,t);const i=await Pn(e.body,t);let n={};n=AE(i.ListConfigurationSetsResult);return{$metadata:DS(e),...n}},cx=async(e,t)=>{if(e.statusCode>=300)return qx(e,t);const i=await Pn(e.body,t);let n={};n=IE(i.ListCustomVerificationEmailTemplatesResult);return{$metadata:DS(e),...n}},lx=async(e,t)=>{if(e.statusCode>=300)return qx(e,t);const i=await Pn(e.body,t);let n={};n=TE(i.ListIdentitiesResult);return{$metadata:DS(e),...n}},px=async(e,t)=>{if(e.statusCode>=300)return qx(e,t);const i=await Pn(e.body,t);let n={};n=kE(i.ListIdentityPoliciesResult);return{$metadata:DS(e),...n}},dx=async(e,t)=>{if(e.statusCode>=300)return qx(e,t);const i=await Pn(e.body,t);let n={};n=OE(i.ListReceiptFiltersResult);return{$metadata:DS(e),...n}},ux=async(e,t)=>{if(e.statusCode>=300)return qx(e,t);const i=await Pn(e.body,t);let n={};n=PE(i.ListReceiptRuleSetsResult);return{$metadata:DS(e),...n}},mx=async(e,t)=>{if(e.statusCode>=300)return qx(e,t);const i=await Pn(e.body,t);let n={};n=_E(i.ListTemplatesResult);return{$metadata:DS(e),...n}},hx=async(e,t)=>{if(e.statusCode>=300)return qx(e,t);const i=await Pn(e.body,t);let n={};n=RE(i.ListVerifiedEmailAddressesResult);return{$metadata:DS(e),...n}},fx=async(e,t)=>{if(e.statusCode>=300)return qx(e,t);const i=await Pn(e.body,t);let n={};n=UE(i.PutConfigurationSetDeliveryOptionsResult);return{$metadata:DS(e),...n}},gx=async(e,t)=>{if(e.statusCode>=300)return qx(e,t);const i=await Pn(e.body,t);let n={};n=BE(i.PutIdentityPolicyResult);return{$metadata:DS(e),...n}},yx=async(e,t)=>{if(e.statusCode>=300)return qx(e,t);const i=await Pn(e.body,t);let n={};n=JE(i.ReorderReceiptRuleSetResult);return{$metadata:DS(e),...n}},xx=async(e,t)=>{if(e.statusCode>=300)return qx(e,t);const i=await Pn(e.body,t);let n={};n=iS(i.SendBounceResult);return{$metadata:DS(e),...n}},vx=async(e,t)=>{if(e.statusCode>=300)return qx(e,t);const i=await Pn(e.body,t);let n={};n=nS(i.SendBulkTemplatedEmailResult);return{$metadata:DS(e),...n}},wx=async(e,t)=>{if(e.statusCode>=300)return qx(e,t);const i=await Pn(e.body,t);let n={};n=sS(i.SendCustomVerificationEmailResult);return{$metadata:DS(e),...n}},bx=async(e,t)=>{if(e.statusCode>=300)return qx(e,t);const i=await Pn(e.body,t);let n={};n=oS(i.SendEmailResult);return{$metadata:DS(e),...n}},Ex=async(e,t)=>{if(e.statusCode>=300)return qx(e,t);const i=await Pn(e.body,t);let n={};n=rS(i.SendRawEmailResult);return{$metadata:DS(e),...n}},Sx=async(e,t)=>{if(e.statusCode>=300)return qx(e,t);const i=await Pn(e.body,t);let n={};n=cS(i.SendTemplatedEmailResult);return{$metadata:DS(e),...n}},Cx=async(e,t)=>{if(e.statusCode>=300)return qx(e,t);const i=await Pn(e.body,t);let n={};n=lS(i.SetActiveReceiptRuleSetResult);return{$metadata:DS(e),...n}},Ax=async(e,t)=>{if(e.statusCode>=300)return qx(e,t);const i=await Pn(e.body,t);let n={};n=pS(i.SetIdentityDkimEnabledResult);return{$metadata:DS(e),...n}},Ix=async(e,t)=>{if(e.statusCode>=300)return qx(e,t);const i=await Pn(e.body,t);let n={};n=dS(i.SetIdentityFeedbackForwardingEnabledResult);return{$metadata:DS(e),...n}},Tx=async(e,t)=>{if(e.statusCode>=300)return qx(e,t);const i=await Pn(e.body,t);let n={};n=uS(i.SetIdentityHeadersInNotificationsEnabledResult);return{$metadata:DS(e),...n}},kx=async(e,t)=>{if(e.statusCode>=300)return qx(e,t);const i=await Pn(e.body,t);let n={};n=mS(i.SetIdentityMailFromDomainResult);return{$metadata:DS(e),...n}},Ox=async(e,t)=>{if(e.statusCode>=300)return qx(e,t);const i=await Pn(e.body,t);let n={};n=hS(i.SetIdentityNotificationTopicResult);return{$metadata:DS(e),...n}},Px=async(e,t)=>{if(e.statusCode>=300)return qx(e,t);const i=await Pn(e.body,t);let n={};n=fS(i.SetReceiptRulePositionResult);return{$metadata:DS(e),...n}},_x=async(e,t)=>{if(e.statusCode>=300)return qx(e,t);const i=await Pn(e.body,t);let n={};n=ES(i.TestRenderTemplateResult);return{$metadata:DS(e),...n}},Rx=async(e,t)=>{if(e.statusCode>=300)return qx(e,t);await ge(e.body,t);return{$metadata:DS(e)}},$x=async(e,t)=>{if(e.statusCode>=300)return qx(e,t);const i=await Pn(e.body,t);let n={};n=IS(i.UpdateConfigurationSetEventDestinationResult);return{$metadata:DS(e),...n}},Mx=async(e,t)=>{if(e.statusCode>=300)return qx(e,t);await ge(e.body,t);return{$metadata:DS(e)}},Nx=async(e,t)=>{if(e.statusCode>=300)return qx(e,t);await ge(e.body,t);return{$metadata:DS(e)}},Dx=async(e,t)=>{if(e.statusCode>=300)return qx(e,t);const i=await Pn(e.body,t);let n={};n=TS(i.UpdateConfigurationSetTrackingOptionsResult);return{$metadata:DS(e),...n}},jx=async(e,t)=>{if(e.statusCode>=300)return qx(e,t);await ge(e.body,t);return{$metadata:DS(e)}},zx=async(e,t)=>{if(e.statusCode>=300)return qx(e,t);const i=await Pn(e.body,t);let n={};n=kS(i.UpdateReceiptRuleResult);return{$metadata:DS(e),...n}},Lx=async(e,t)=>{if(e.statusCode>=300)return qx(e,t);const i=await Pn(e.body,t);let n={};n=OS(i.UpdateTemplateResult);return{$metadata:DS(e),...n}},Fx=async(e,t)=>{if(e.statusCode>=300)return qx(e,t);const i=await Pn(e.body,t);let n={};n=RS(i.VerifyDomainDkimResult);return{$metadata:DS(e),...n}},Ux=async(e,t)=>{if(e.statusCode>=300)return qx(e,t);const i=await Pn(e.body,t);let n={};n=$S(i.VerifyDomainIdentityResult);return{$metadata:DS(e),...n}},Bx=async(e,t)=>{if(e.statusCode>=300)return qx(e,t);await ge(e.body,t);return{$metadata:DS(e)}},Hx=async(e,t)=>{if(e.statusCode>=300)return qx(e,t);const i=await Pn(e.body,t);let n={};n=MS(i.VerifyEmailIdentityResult);return{$metadata:DS(e),...n}},qx=async(e,t)=>{const i={...e,body:await _n(e.body,t)},n=Ek(e,i.body);switch(n){case"AlreadyExists":case"com.amazonaws.ses#AlreadyExistsException":throw await Gx(i);case"LimitExceeded":case"com.amazonaws.ses#LimitExceededException":throw await fv(i);case"RuleSetDoesNotExist":case"com.amazonaws.ses#RuleSetDoesNotExistException":throw await bv(i);case"ConfigurationSetAlreadyExists":case"com.amazonaws.ses#ConfigurationSetAlreadyExistsException":throw await Kx(i);case"InvalidConfigurationSet":case"com.amazonaws.ses#InvalidConfigurationSetException":throw await sv(i);case"ConfigurationSetDoesNotExist":case"com.amazonaws.ses#ConfigurationSetDoesNotExistException":throw await Qx(i);case"EventDestinationAlreadyExists":case"com.amazonaws.ses#EventDestinationAlreadyExistsException":throw await ev(i);case"InvalidCloudWatchDestination":case"com.amazonaws.ses#InvalidCloudWatchDestinationException":throw await nv(i);case"InvalidFirehoseDestination":case"com.amazonaws.ses#InvalidFirehoseDestinationException":throw await ov(i);case"InvalidSNSDestination":case"com.amazonaws.ses#InvalidSNSDestinationException":throw await dv(i);case"InvalidTrackingOptions":case"com.amazonaws.ses#InvalidTrackingOptionsException":throw await hv(i);case"TrackingOptionsAlreadyExistsException":case"com.amazonaws.ses#TrackingOptionsAlreadyExistsException":throw await Sv(i);case"CustomVerificationEmailInvalidContent":case"com.amazonaws.ses#CustomVerificationEmailInvalidContentException":throw await Jx(i);case"CustomVerificationEmailTemplateAlreadyExists":case"com.amazonaws.ses#CustomVerificationEmailTemplateAlreadyExistsException":throw await Yx(i);case"FromEmailAddressNotVerified":case"com.amazonaws.ses#FromEmailAddressNotVerifiedException":throw await iv(i);case"InvalidLambdaFunction":case"com.amazonaws.ses#InvalidLambdaFunctionException":throw await rv(i);case"InvalidS3Configuration":case"com.amazonaws.ses#InvalidS3ConfigurationException":throw await pv(i);case"InvalidSnsTopic":case"com.amazonaws.ses#InvalidSnsTopicException":throw await uv(i);case"RuleDoesNotExist":case"com.amazonaws.ses#RuleDoesNotExistException":throw await wv(i);case"InvalidTemplate":case"com.amazonaws.ses#InvalidTemplateException":throw await mv(i);case"EventDestinationDoesNotExist":case"com.amazonaws.ses#EventDestinationDoesNotExistException":throw await tv(i);case"TrackingOptionsDoesNotExistException":case"com.amazonaws.ses#TrackingOptionsDoesNotExistException":throw await Cv(i);case"CannotDelete":case"com.amazonaws.ses#CannotDeleteException":throw await Wx(i);case"CustomVerificationEmailTemplateDoesNotExist":case"com.amazonaws.ses#CustomVerificationEmailTemplateDoesNotExistException":throw await Zx(i);case"TemplateDoesNotExist":case"com.amazonaws.ses#TemplateDoesNotExistException":throw await Ev(i);case"InvalidDeliveryOptions":case"com.amazonaws.ses#InvalidDeliveryOptionsException":throw await av(i);case"InvalidPolicy":case"com.amazonaws.ses#InvalidPolicyException":throw await cv(i);case"MessageRejected":case"com.amazonaws.ses#MessageRejected":throw await yv(i);case"AccountSendingPausedException":case"com.amazonaws.ses#AccountSendingPausedException":throw await Vx(i);case"ConfigurationSetSendingPausedException":case"com.amazonaws.ses#ConfigurationSetSendingPausedException":throw await Xx(i);case"MailFromDomainNotVerifiedException":case"com.amazonaws.ses#MailFromDomainNotVerifiedException":throw await gv(i);case"ProductionAccessNotGranted":case"com.amazonaws.ses#ProductionAccessNotGrantedException":throw await vv(i);case"InvalidRenderingParameter":case"com.amazonaws.ses#InvalidRenderingParameterException":throw await lv(i);case"MissingRenderingAttribute":case"com.amazonaws.ses#MissingRenderingAttributeException":throw await xv(i);default:const t=i.body;return jS({output:e,parsedBody:t.Error,errorCode:n})}},Vx=async(e,t)=>{const i=e.body,n=hb(i.Error),s=new Pf({$metadata:DS(e),...n});return Ai(s,i)},Gx=async(e,t)=>{const i=e.body,n=fb(i.Error),s=new _f({$metadata:DS(e),...n});return Ai(s,i)},Wx=async(e,t)=>{const i=e.body,n=yb(i.Error),s=new Rf({$metadata:DS(e),...n});return Ai(s,i)},Kx=async(e,t)=>{const i=e.body,n=bb(i.Error),s=new Nf({$metadata:DS(e),...n});return Ai(s,i)},Qx=async(e,t)=>{const i=e.body,n=Eb(i.Error),s=new Df({$metadata:DS(e),...n});return Ai(s,i)},Xx=async(e,t)=>{const i=e.body,n=Sb(i.Error),s=new jf({$metadata:DS(e),...n});return Ai(s,i)},Jx=async(e,t)=>{const i=e.body,n=_b(i.Error),s=new Vf({$metadata:DS(e),...n});return Ai(s,i)},Yx=async(e,t)=>{const i=e.body,n=Rb(i.Error),s=new Gf({$metadata:DS(e),...n});return Ai(s,i)},Zx=async(e,t)=>{const i=e.body,n=$b(i.Error),s=new Zf({$metadata:DS(e),...n});return Ai(s,i)},ev=async(e,t)=>{const i=e.body,n=Qb(i.Error),s=new Lf({$metadata:DS(e),...n});return Ai(s,i)},tv=async(e,t)=>{const i=e.body,n=Xb(i.Error),s=new eg({$metadata:DS(e),...n});return Ai(s,i)},iv=async(e,t)=>{const i=e.body,n=Zb(i.Error),s=new Wf({$metadata:DS(e),...n});return Ai(s,i)},nv=async(e,t)=>{const i=e.body,n=dE(i.Error),s=new Ff({$metadata:DS(e),...n});return Ai(s,i)},sv=async(e,t)=>{const i=e.body,n=uE(i.Error),s=new zf({$metadata:DS(e),...n});return Ai(s,i)},av=async(e,t)=>{const i=e.body,n=mE(i.Error),s=new ng({$metadata:DS(e),...n});return Ai(s,i)},ov=async(e,t)=>{const i=e.body,n=hE(i.Error),s=new Uf({$metadata:DS(e),...n});return Ai(s,i)},rv=async(e,t)=>{const i=e.body,n=fE(i.Error),s=new Kf({$metadata:DS(e),...n});return Ai(s,i)},cv=async(e,t)=>{const i=e.body,n=gE(i.Error),s=new sg({$metadata:DS(e),...n});return Ai(s,i)},lv=async(e,t)=>{const i=e.body,n=yE(i.Error),s=new ag({$metadata:DS(e),...n});return Ai(s,i)},pv=async(e,t)=>{const i=e.body,n=xE(i.Error),s=new Qf({$metadata:DS(e),...n});return Ai(s,i)},dv=async(e,t)=>{const i=e.body,n=vE(i.Error),s=new Bf({$metadata:DS(e),...n});return Ai(s,i)},uv=async(e,t)=>{const i=e.body,n=wE(i.Error),s=new Xf({$metadata:DS(e),...n});return Ai(s,i)},mv=async(e,t)=>{const i=e.body,n=bE(i.Error),s=new Yf({$metadata:DS(e),...n});return Ai(s,i)},hv=async(e,t)=>{const i=e.body,n=EE(i.Error),s=new Hf({$metadata:DS(e),...n});return Ai(s,i)},fv=async(e,t)=>{const i=e.body,n=CE(i.Error),s=new $f({$metadata:DS(e),...n});return Ai(s,i)},gv=async(e,t)=>{const i=e.body,n=ME(i.Error),s=new og({$metadata:DS(e),...n});return Ai(s,i)},yv=async(e,t)=>{const i=e.body,n=NE(i.Error),s=new rg({$metadata:DS(e),...n});return Ai(s,i)},xv=async(e,t)=>{const i=e.body,n=DE(i.Error),s=new cg({$metadata:DS(e),...n});return Ai(s,i)},vv=async(e,t)=>{const i=e.body,n=FE(i.Error),s=new lg({$metadata:DS(e),...n});return Ai(s,i)},wv=async(e,t)=>{const i=e.body,n=ZE(i.Error),s=new Jf({$metadata:DS(e),...n});return Ai(s,i)},bv=async(e,t)=>{const i=e.body,n=eS(i.Error),s=new Mf({$metadata:DS(e),...n});return Ai(s,i)},Ev=async(e,t)=>{const i=e.body,n=wS(i.Error),s=new ig({$metadata:DS(e),...n});return Ai(s,i)},Sv=async(e,t)=>{const i=e.body,n=CS(i.Error),s=new qf({$metadata:DS(e),...n});return Ai(s,i)},Cv=async(e,t)=>{const i=e.body,n=AS(i.Error),s=new tg({$metadata:DS(e),...n});return Ai(s,i)},Av=(e,t)=>{const i={};let n=1;for(const t of e)null!==t&&(i[`member.${n}`]=t,n++);return i},Iv=(e,t)=>{const i={};if(null!=e[MI]&&(i[MI]=e[MI]),null!=e[NI]&&(i[NI]=e[NI]),null!=e[eC]&&(i[eC]=e[eC]),null!=e[DI]){const t=Rw(e[DI]);Object.entries(t).forEach((([e,t])=>{i[`RecipientDsnFields.${e}`]=t}))}return i},Tv=(e,t)=>{const i={};if(null!=e[TC]){const t=tw(e[TC]);Object.entries(t).forEach((([e,t])=>{i[`Destination.${e}`]=t}))}if(null!=e[QI]){const t=Cw(e[QI]);0===e[QI]?.length&&(i.ReplacementTags=[]),Object.entries(t).forEach((([e,t])=>{i[`ReplacementTags.${e}`]=t}))}return null!=e[JI]&&(i[JI]=e[JI]),i},kv=(e,t)=>{const i={};return null!=e[KI]&&(i[KI]=e[KI]),null!=e[TI]&&(i[TI]=e[TI]),i},Ov=(e,t)=>{const i={};return null!=e[BC]&&(i[BC]=e[BC]),null!=e[iA]&&(i[iA]=e[iA]),null!=e[zC]&&(i[zC]=e[zC]),i},Pv=(e,t)=>{const i={};let n=1;for(const t of e){if(null===t)continue;const e=Ov(t);Object.entries(e).forEach((([e,t])=>{i[`member.${n}.${e}`]=t})),n++}return i},_v=(e,t)=>{const i={};return null!=e[sA]&&(i[sA]=e[sA]),null!=e[sC]&&(i[sC]=e[sC]),i},Rv=(e,t)=>{const i={};if(null!=e[yC]&&(i[yC]=e[yC]),null!=e[lA]){const t=iw(e[lA]);Object.entries(t).forEach((([e,t])=>{i[`EventDestination.${e}`]=t}))}return i},$v=(e,t)=>{const i={};if(null!=e[fC]){const t=(e=>{const t={};return null!=e[wI]&&(t[wI]=e[wI]),t})(e[fC]);Object.entries(t).forEach((([e,t])=>{i[`ConfigurationSet.${e}`]=t}))}return i},Mv=(e,t)=>{const i={};if(null!=e[yC]&&(i[yC]=e[yC]),null!=e[qT]){const t=eb(e[qT]);Object.entries(t).forEach((([e,t])=>{i[`TrackingOptions.${e}`]=t}))}return i},Nv=(e,t)=>{const i={};return null!=e[HT]&&(i[HT]=e[HT]),null!=e[wA]&&(i[wA]=e[wA]),null!=e[KT]&&(i[KT]=e[KT]),null!=e[FT]&&(i[FT]=e[FT]),null!=e[kT]&&(i[kT]=e[kT]),null!=e[SA]&&(i[SA]=e[SA]),i},Dv=(e,t)=>{const i={};if(null!=e[gA]){const t=Ow(e[gA]);Object.entries(t).forEach((([e,t])=>{i[`Filter.${e}`]=t}))}return i},jv=(e,t)=>{const i={};if(null!=e[KI]&&(i[KI]=e[KI]),null!=e[VS]&&(i[VS]=e[VS]),null!=e[tT]){const t=_w(e[tT]);Object.entries(t).forEach((([e,t])=>{i[`Rule.${e}`]=t}))}return i},zv=(e,t)=>{const i={};return null!=e[KI]&&(i[KI]=e[KI]),i},Lv=(e,t)=>{const i={};if(null!=e[XT]){const t=Yw(e[XT]);Object.entries(t).forEach((([e,t])=>{i[`Template.${e}`]=t}))}return i},Fv=(e,t)=>{const i={};return null!=e[yC]&&(i[yC]=e[yC]),null!=e[pA]&&(i[pA]=e[pA]),i},Uv=(e,t)=>{const i={};return null!=e[yC]&&(i[yC]=e[yC]),i},Bv=(e,t)=>{const i={};return null!=e[yC]&&(i[yC]=e[yC]),i},Hv=(e,t)=>{const i={};return null!=e[HT]&&(i[HT]=e[HT]),i},qv=(e,t)=>{const i={};return null!=e[BA]&&(i[BA]=e[BA]),null!=e[_I]&&(i[_I]=e[_I]),i},Vv=(e,t)=>{const i={};return null!=e[BA]&&(i[BA]=e[BA]),i},Gv=(e,t)=>{const i={};return null!=e[bA]&&(i[bA]=e[bA]),i},Wv=(e,t)=>{const i={};return null!=e[KI]&&(i[KI]=e[KI]),null!=e[UI]&&(i[UI]=e[UI]),i},Kv=(e,t)=>{const i={};return null!=e[KI]&&(i[KI]=e[KI]),i},Qv=(e,t)=>{const i={};return null!=e[HT]&&(i[HT]=e[HT]),i},Xv=(e,t)=>{const i={};return null!=e[cA]&&(i[cA]=e[cA]),i},Jv=(e,t)=>({}),Yv=(e,t)=>{const i={};if(null!=e[yC]&&(i[yC]=e[yC]),null!=e[gC]){const t=(e=>{const t={};let i=1;for(const n of e)null!==n&&(t[`member.${i}`]=n,i++);return t})(e[gC]);0===e[gC]?.length&&(i.ConfigurationSetAttributeNames=[]),Object.entries(t).forEach((([e,t])=>{i[`ConfigurationSetAttributeNames.${e}`]=t}))}return i},Zv=(e,t)=>{const i={};return null!=e[KI]&&(i[KI]=e[KI]),null!=e[UI]&&(i[UI]=e[UI]),i},ew=(e,t)=>{const i={};return null!=e[KI]&&(i[KI]=e[KI]),i},tw=(e,t)=>{const i={};if(null!=e[LT]){const t=Av(e[LT]);0===e[LT]?.length&&(i.ToAddresses=[]),Object.entries(t).forEach((([e,t])=>{i[`ToAddresses.${e}`]=t}))}if(null!=e[aC]){const t=Av(e[aC]);0===e[aC]?.length&&(i.CcAddresses=[]),Object.entries(t).forEach((([e,t])=>{i[`CcAddresses.${e}`]=t}))}if(null!=e[WS]){const t=Av(e[WS]);0===e[WS]?.length&&(i.BccAddresses=[]),Object.entries(t).forEach((([e,t])=>{i[`BccAddresses.${e}`]=t}))}return i},iw=(e,t)=>{const i={};if(null!=e[wI]&&(i[wI]=e[wI]),null!=e[rA]&&(i[rA]=e[rA]),null!=e[pI]){const t=nw(e[pI]);0===e[pI]?.length&&(i.MatchingEventTypes=[]),Object.entries(t).forEach((([e,t])=>{i[`MatchingEventTypes.${e}`]=t}))}if(null!=e[QA]){const t=hw(e[QA]);Object.entries(t).forEach((([e,t])=>{i[`KinesisFirehoseDestination.${e}`]=t}))}if(null!=e[CC]){const t=(e=>{const t={};if(null!=e[_C]){const i=Pv(e[_C]);0===e[_C]?.length&&(t.DimensionConfigurations=[]),Object.entries(i).forEach((([e,i])=>{t[`DimensionConfigurations.${e}`]=i}))}return t})(e[CC]);Object.entries(t).forEach((([e,t])=>{i[`CloudWatchDestination.${e}`]=t}))}if(null!=e[ST]){const t=Xw(e[ST]);Object.entries(t).forEach((([e,t])=>{i[`SNSDestination.${e}`]=t}))}return i},nw=(e,t)=>{const i={};let n=1;for(const t of e)null!==t&&(i[`member.${n}`]=t,n++);return i},sw=(e,t)=>{const i={};return null!=e[wI]&&(i[wI]=e[wI]),null!=e[gk]&&(i[gk]=e[gk]),i},aw=(e,t)=>{const i={};let n=1;for(const t of e){if(null===t)continue;const e=sw(t);Object.entries(e).forEach((([e,t])=>{i[`member.${n}.${e}`]=t})),n++}return i},ow=(e,t)=>{const i={};return null!=e[HT]&&(i[HT]=e[HT]),i},rw=(e,t)=>{const i={};if(null!=e[KA]){const t=mw(e[KA]);0===e[KA]?.length&&(i.Identities=[]),Object.entries(t).forEach((([e,t])=>{i[`Identities.${e}`]=t}))}return i},cw=(e,t)=>{const i={};if(null!=e[KA]){const t=mw(e[KA]);0===e[KA]?.length&&(i.Identities=[]),Object.entries(t).forEach((([e,t])=>{i[`Identities.${e}`]=t}))}return i},lw=(e,t)=>{const i={};if(null!=e[KA]){const t=mw(e[KA]);0===e[KA]?.length&&(i.Identities=[]),Object.entries(t).forEach((([e,t])=>{i[`Identities.${e}`]=t}))}return i},pw=(e,t)=>{const i={};if(null!=e[BA]&&(i[BA]=e[BA]),null!=e[RI]){const t=Aw(e[RI]);0===e[RI]?.length&&(i.PolicyNames=[]),Object.entries(t).forEach((([e,t])=>{i[`PolicyNames.${e}`]=t}))}return i},dw=(e,t)=>{const i={};if(null!=e[KA]){const t=mw(e[KA]);0===e[KA]?.length&&(i.Identities=[]),Object.entries(t).forEach((([e,t])=>{i[`Identities.${e}`]=t}))}return i},uw=(e,t)=>{const i={};return null!=e[HT]&&(i[HT]=e[HT]),i},mw=(e,t)=>{const i={};let n=1;for(const t of e)null!==t&&(i[`member.${n}`]=t,n++);return i},hw=(e,t)=>{const i={};return null!=e[HA]&&(i[HA]=e[HA]),null!=e[QC]&&(i[QC]=e[QC]),i},fw=(e,t)=>{const i={};return null!=e[EI]&&(i[EI]=e[EI]),null!=e[fI]&&(i[fI]=e[fI]),i},gw=(e,t)=>{const i={};return null!=e[EI]&&(i[EI]=e[EI]),null!=e[yI]&&(i[yI]=e[yI]),i},yw=(e,t)=>{const i={};return null!=e[WA]&&(i[WA]=e[WA]),null!=e[EI]&&(i[EI]=e[EI]),null!=e[fI]&&(i[fI]=e[fI]),i},xw=(e,t)=>{const i={};return null!=e[BA]&&(i[BA]=e[BA]),i},vw=(e,t)=>({}),ww=(e,t)=>{const i={};return null!=e[EI]&&(i[EI]=e[EI]),i},bw=(e,t)=>{const i={};return null!=e[EI]&&(i[EI]=e[EI]),null!=e[fI]&&(i[fI]=e[fI]),i},Ew=(e,t)=>{const i={};if(null!=e[MT]){const t=_v(e[MT]);Object.entries(t).forEach((([e,t])=>{i[`Subject.${e}`]=t}))}if(null!=e[GS]){const t=(e=>{const t={};if(null!=e[NT]){const i=_v(e[NT]);Object.entries(i).forEach((([e,i])=>{t[`Text.${e}`]=i}))}if(null!=e[NA]){const i=_v(e[NA]);Object.entries(i).forEach((([e,i])=>{t[`Html.${e}`]=i}))}return t})(e[GS]);Object.entries(t).forEach((([e,t])=>{i[`Body.${e}`]=t}))}return i},Sw=(e,t)=>{const i={};return null!=e[wI]&&(i[wI]=e[wI]),null!=e[gk]&&(i[gk]=e[gk]),i},Cw=(e,t)=>{const i={};let n=1;for(const t of e){if(null===t)continue;const e=Sw(t);Object.entries(e).forEach((([e,t])=>{i[`member.${n}.${e}`]=t})),n++}return i},Aw=(e,t)=>{const i={};let n=1;for(const t of e)null!==t&&(i[`member.${n}`]=t,n++);return i},Iw=(e,t)=>{const i={};if(null!=e[yC]&&(i[yC]=e[yC]),null!=e[HC]){const t=(e=>{const t={};return null!=e[VT]&&(t[VT]=e[VT]),t})(e[HC]);Object.entries(t).forEach((([e,t])=>{i[`DeliveryOptions.${e}`]=t}))}return i},Tw=(e,t)=>{const i={};return null!=e[BA]&&(i[BA]=e[BA]),null!=e[_I]&&(i[_I]=e[_I]),null!=e[kI]&&(i[kI]=e[kI]),i},kw=(e,t)=>{const i={};if(null!=e[sT]){const t=Nw(e[sT]);Object.entries(t).forEach((([e,t])=>{i[`S3Action.${e}`]=t}))}if(null!=e[KS]){const t=(e=>{const t={};return null!=e[DT]&&(t[DT]=e[DT]),null!=e[AT]&&(t[AT]=e[AT]),null!=e[pT]&&(t[pT]=e[pT]),null!=e[cI]&&(t[cI]=e[cI]),null!=e[nT]&&(t[nT]=e[nT]),t})(e[KS]);Object.entries(t).forEach((([e,t])=>{i[`BounceAction.${e}`]=t}))}if(null!=e[yk]){const t=mb(e[yk]);Object.entries(t).forEach((([e,t])=>{i[`WorkmailAction.${e}`]=t}))}if(null!=e[JA]){const t=(e=>{const t={};return null!=e[DT]&&(t[DT]=e[DT]),null!=e[yA]&&(t[yA]=e[yA]),null!=e[GA]&&(t[GA]=e[GA]),t})(e[JA]);Object.entries(t).forEach((([e,t])=>{i[`LambdaAction.${e}`]=t}))}if(null!=e[rT]){const t=Jw(e[rT]);Object.entries(t).forEach((([e,t])=>{i[`StopAction.${e}`]=t}))}if(null!=e[HS]){const t=(e=>{const t={};return null!=e[LA]&&(t[LA]=e[LA]),null!=e[UA]&&(t[UA]=e[UA]),t})(e[HS]);Object.entries(t).forEach((([e,t])=>{i[`AddHeaderAction.${e}`]=t}))}if(null!=e[ET]){const t=Qw(e[ET]);Object.entries(t).forEach((([e,t])=>{i[`SNSAction.${e}`]=t}))}return i},Ow=(e,t)=>{const i={};if(null!=e[wI]&&(i[wI]=e[wI]),null!=e[qA]){const t=Pw(e[qA]);Object.entries(t).forEach((([e,t])=>{i[`IpFilter.${e}`]=t}))}return i},Pw=(e,t)=>{const i={};return null!=e[kI]&&(i[kI]=e[kI]),null!=e[AC]&&(i[AC]=e[AC]),i},_w=(e,t)=>{const i={};if(null!=e[wI]&&(i[wI]=e[wI]),null!=e[rA]&&(i[rA]=e[rA]),null!=e[VT]&&(i[VT]=e[VT]),null!=e[ZI]){const t=$w(e[ZI]);0===e[ZI]?.length&&(i.Recipients=[]),Object.entries(t).forEach((([e,t])=>{i[`Recipients.${e}`]=t}))}if(null!=e[qS]){const t=(e=>{const t={};let i=1;for(const n of e){if(null===n)continue;const e=kw(n);Object.entries(e).forEach((([e,n])=>{t[`member.${i}.${e}`]=n})),i++}return t})(e[qS]);0===e[qS]?.length&&(i.Actions=[]),Object.entries(t).forEach((([e,t])=>{i[`Actions.${e}`]=t}))}return null!=e[hT]&&(i[hT]=e[hT]),i},Rw=(e,t)=>{const i={};if(null!=e[EA]&&(i[EA]=e[EA]),null!=e[US]&&(i[US]=e[US]),null!=e[FI]&&(i[FI]=e[FI]),null!=e[$T]&&(i[$T]=e[$T]),null!=e[jC]&&(i[jC]=e[jC]),null!=e[YA]&&(i[YA]=Gi(e[YA])),null!=e[uA]){const t=aw(e[uA]);0===e[uA]?.length&&(i.ExtensionFields=[]),Object.entries(t).forEach((([e,t])=>{i[`ExtensionFields.${e}`]=t}))}return i},$w=(e,t)=>{const i={};let n=1;for(const t of e)null!==t&&(i[`member.${n}`]=t,n++);return i},Mw=(e,t)=>{const i={};if(null!=e[KI]&&(i[KI]=e[KI]),null!=e[BI]){const t=(e=>{const t={};let i=1;for(const n of e)null!==n&&(t[`member.${i}`]=n,i++);return t})(e[BI]);0===e[BI]?.length&&(i.RuleNames=[]),Object.entries(t).forEach((([e,t])=>{i[`RuleNames.${e}`]=t}))}return i},Nw=(e,t)=>{const i={};return null!=e[DT]&&(i[DT]=e[DT]),null!=e[QS]&&(i[QS]=e[QS]),null!=e[AI]&&(i[AI]=e[AI]),null!=e[XA]&&(i[XA]=e[XA]),null!=e[VA]&&(i[VA]=e[VA]),i},Dw=(e,t)=>{const i={};if(null!=e[II]&&(i[II]=e[II]),null!=e[YS]&&(i[YS]=e[YS]),null!=e[fA]&&(i[fA]=e[fA]),null!=e[lI]){const t=(e=>{const t={};if(null!=e[jI]&&(t[jI]=e[jI]),null!=e[BS]&&(t[BS]=Gi(e[BS])),null!=e[uA]){const i=aw(e[uA]);0===e[uA]?.length&&(t.ExtensionFields=[]),Object.entries(i).forEach((([e,i])=>{t[`ExtensionFields.${e}`]=i}))}return t})(e[lI]);Object.entries(t).forEach((([e,t])=>{i[`MessageDsn.${e}`]=t}))}if(null!=e[JS]){const t=(e=>{const t={};let i=1;for(const n of e){if(null===n)continue;const e=Iv(n);Object.entries(e).forEach((([e,n])=>{t[`member.${i}.${e}`]=n})),i++}return t})(e[JS]);0===e[JS]?.length&&(i.BouncedRecipientInfoList=[]),Object.entries(t).forEach((([e,t])=>{i[`BouncedRecipientInfoList.${e}`]=t}))}return null!=e[ZS]&&(i[ZS]=e[ZS]),i},jw=(e,t)=>{const i={};if(null!=e[RT]&&(i[RT]=e[RT]),null!=e[oT]&&(i[oT]=e[oT]),null!=e[XI]){const t=Av(e[XI]);0===e[XI]?.length&&(i.ReplyToAddresses=[]),Object.entries(t).forEach((([e,t])=>{i[`ReplyToAddresses.${e}`]=t}))}if(null!=e[qI]&&(i[qI]=e[qI]),null!=e[VI]&&(i[VI]=e[VI]),null!=e[yC]&&(i[yC]=e[yC]),null!=e[YC]){const t=Cw(e[YC]);0===e[YC]?.length&&(i.DefaultTags=[]),Object.entries(t).forEach((([e,t])=>{i[`DefaultTags.${e}`]=t}))}if(null!=e[XT]&&(i[XT]=e[XT]),null!=e[zT]&&(i[zT]=e[zT]),null!=e[JC]&&(i[JC]=e[JC]),null!=e[aA]){const t=(e=>{const t={};let i=1;for(const n of e){if(null===n)continue;const e=Tv(n);Object.entries(e).forEach((([e,n])=>{t[`member.${i}.${e}`]=n})),i++}return t})(e[aA]);0===e[aA]?.length&&(i.Destinations=[]),Object.entries(t).forEach((([e,t])=>{i[`Destinations.${e}`]=t}))}return i},zw=(e,t)=>{const i={};return null!=e[cA]&&(i[cA]=e[cA]),null!=e[HT]&&(i[HT]=e[HT]),null!=e[yC]&&(i[yC]=e[yC]),i},Lw=(e,t)=>{const i={};if(null!=e[RT]&&(i[RT]=e[RT]),null!=e[TC]){const t=tw(e[TC]);Object.entries(t).forEach((([e,t])=>{i[`Destination.${e}`]=t}))}if(null!=e[cI]){const t=Ew(e[cI]);Object.entries(t).forEach((([e,t])=>{i[`Message.${e}`]=t}))}if(null!=e[XI]){const t=Av(e[XI]);0===e[XI]?.length&&(i.ReplyToAddresses=[]),Object.entries(t).forEach((([e,t])=>{i[`ReplyToAddresses.${e}`]=t}))}if(null!=e[qI]&&(i[qI]=e[qI]),null!=e[oT]&&(i[oT]=e[oT]),null!=e[VI]&&(i[VI]=e[VI]),null!=e[QT]){const t=Cw(e[QT]);0===e[QT]?.length&&(i.Tags=[]),Object.entries(t).forEach((([e,t])=>{i[`Tags.${e}`]=t}))}return null!=e[yC]&&(i[yC]=e[yC]),i},Fw=(e,t)=>{const i={};if(null!=e[RT]&&(i[RT]=e[RT]),null!=e[aA]){const t=Av(e[aA]);0===e[aA]?.length&&(i.Destinations=[]),Object.entries(t).forEach((([e,t])=>{i[`Destinations.${e}`]=t}))}if(null!=e[LI]){const n=((e,t)=>{const i={};return null!=e[sA]&&(i[sA]=t.base64Encoder(e[sA])),i})(e[LI],t);Object.entries(n).forEach((([e,t])=>{i[`RawMessage.${e}`]=t}))}if(null!=e[xA]&&(i[xA]=e[xA]),null!=e[oT]&&(i[oT]=e[oT]),null!=e[VI]&&(i[VI]=e[VI]),null!=e[QT]){const t=Cw(e[QT]);0===e[QT]?.length&&(i.Tags=[]),Object.entries(t).forEach((([e,t])=>{i[`Tags.${e}`]=t}))}return null!=e[yC]&&(i[yC]=e[yC]),i},Uw=(e,t)=>{const i={};if(null!=e[RT]&&(i[RT]=e[RT]),null!=e[TC]){const t=tw(e[TC]);Object.entries(t).forEach((([e,t])=>{i[`Destination.${e}`]=t}))}if(null!=e[XI]){const t=Av(e[XI]);0===e[XI]?.length&&(i.ReplyToAddresses=[]),Object.entries(t).forEach((([e,t])=>{i[`ReplyToAddresses.${e}`]=t}))}if(null!=e[qI]&&(i[qI]=e[qI]),null!=e[oT]&&(i[oT]=e[oT]),null!=e[VI]&&(i[VI]=e[VI]),null!=e[QT]){const t=Cw(e[QT]);0===e[QT]?.length&&(i.Tags=[]),Object.entries(t).forEach((([e,t])=>{i[`Tags.${e}`]=t}))}return null!=e[yC]&&(i[yC]=e[yC]),null!=e[XT]&&(i[XT]=e[XT]),null!=e[zT]&&(i[zT]=e[zT]),null!=e[UT]&&(i[UT]=e[UT]),i},Bw=(e,t)=>{const i={};return null!=e[KI]&&(i[KI]=e[KI]),i},Hw=(e,t)=>{const i={};return null!=e[BA]&&(i[BA]=e[BA]),null!=e[LC]&&(i[LC]=e[LC]),i},qw=(e,t)=>{const i={};return null!=e[BA]&&(i[BA]=e[BA]),null!=e[vA]&&(i[vA]=e[vA]),i},Vw=(e,t)=>{const i={};return null!=e[BA]&&(i[BA]=e[BA]),null!=e[SI]&&(i[SI]=e[SI]),null!=e[rA]&&(i[rA]=e[rA]),i},Gw=(e,t)=>{const i={};return null!=e[BA]&&(i[BA]=e[BA]),null!=e[dI]&&(i[dI]=e[dI]),null!=e[XS]&&(i[XS]=e[XS]),i},Ww=(e,t)=>{const i={};return null!=e[BA]&&(i[BA]=e[BA]),null!=e[SI]&&(i[SI]=e[SI]),null!=e[OT]&&(i[OT]=e[OT]),i},Kw=(e,t)=>{const i={};return null!=e[KI]&&(i[KI]=e[KI]),null!=e[UI]&&(i[UI]=e[UI]),null!=e[VS]&&(i[VS]=e[VS]),i},Qw=(e,t)=>{const i={};return null!=e[DT]&&(i[DT]=e[DT]),null!=e[mA]&&(i[mA]=e[mA]),i},Xw=(e,t)=>{const i={};return null!=e[jT]&&(i[jT]=e[jT]),i},Jw=(e,t)=>{const i={};return null!=e[_T]&&(i[_T]=e[_T]),null!=e[DT]&&(i[DT]=e[DT]),i},Yw=(e,t)=>{const i={};return null!=e[HT]&&(i[HT]=e[HT]),null!=e[CT]&&(i[CT]=e[CT]),null!=e[GT]&&(i[GT]=e[GT]),null!=e[FA]&&(i[FA]=e[FA]),i},Zw=(e,t)=>{const i={};return null!=e[HT]&&(i[HT]=e[HT]),null!=e[UT]&&(i[UT]=e[UT]),i},eb=(e,t)=>{const i={};return null!=e[pC]&&(i[pC]=e[pC]),i},tb=(e,t)=>{const i={};return null!=e[rA]&&(i[rA]=e[rA]),i},ib=(e,t)=>{const i={};if(null!=e[yC]&&(i[yC]=e[yC]),null!=e[lA]){const t=iw(e[lA]);Object.entries(t).forEach((([e,t])=>{i[`EventDestination.${e}`]=t}))}return i},nb=(e,t)=>{const i={};return null!=e[yC]&&(i[yC]=e[yC]),null!=e[rA]&&(i[rA]=e[rA]),i},sb=(e,t)=>{const i={};return null!=e[yC]&&(i[yC]=e[yC]),null!=e[rA]&&(i[rA]=e[rA]),i},ab=(e,t)=>{const i={};if(null!=e[yC]&&(i[yC]=e[yC]),null!=e[qT]){const t=eb(e[qT]);Object.entries(t).forEach((([e,t])=>{i[`TrackingOptions.${e}`]=t}))}return i},ob=(e,t)=>{const i={};return null!=e[HT]&&(i[HT]=e[HT]),null!=e[wA]&&(i[wA]=e[wA]),null!=e[KT]&&(i[KT]=e[KT]),null!=e[FT]&&(i[FT]=e[FT]),null!=e[kT]&&(i[kT]=e[kT]),null!=e[SA]&&(i[SA]=e[SA]),i},rb=(e,t)=>{const i={};if(null!=e[KI]&&(i[KI]=e[KI]),null!=e[tT]){const t=_w(e[tT]);Object.entries(t).forEach((([e,t])=>{i[`Rule.${e}`]=t}))}return i},cb=(e,t)=>{const i={};if(null!=e[XT]){const t=Yw(e[XT]);Object.entries(t).forEach((([e,t])=>{i[`Template.${e}`]=t}))}return i},lb=(e,t)=>{const i={};return null!=e[oA]&&(i[oA]=e[oA]),i},pb=(e,t)=>{const i={};return null!=e[oA]&&(i[oA]=e[oA]),i},db=(e,t)=>{const i={};return null!=e[cA]&&(i[cA]=e[cA]),i},ub=(e,t)=>{const i={};return null!=e[cA]&&(i[cA]=e[cA]),i},mb=(e,t)=>{const i={};return null!=e[DT]&&(i[DT]=e[DT]),null!=e[CI]&&(i[CI]=e[CI]),i},hb=(e,t)=>{const i={};return null!=e[vk]&&(i[vk]=ai(e[vk])),i},fb=(e,t)=>{const i={};return null!=e[wI]&&(i[wI]=ai(e[wI])),null!=e[vk]&&(i[vk]=ai(e[vk])),i},gb=(e,t)=>(e||[]).filter((e=>null!=e)).map((e=>(e=>{const t={};return null!=e[$T]&&(t[$T]=ai(e[$T])),null!=e[hA]&&(t[hA]=ai(e[hA])),null!=e[gI]&&(t[gI]=ai(e[gI])),t})(e))),yb=(e,t)=>{const i={};return null!=e[wI]&&(i[wI]=ai(e[wI])),null!=e[vk]&&(i[vk]=ai(e[vk])),i},xb=(e,t)=>({}),vb=(e,t)=>(e||[]).filter((e=>null!=e)).map((e=>(e=>{const t={};return null!=e[BC]&&(t[BC]=ai(e[BC])),null!=e[iA]&&(t[iA]=ai(e[iA])),null!=e[zC]&&(t[zC]=ai(e[zC])),t})(e))),wb=(e,t)=>{const i={};return null!=e[wI]&&(i[wI]=ai(e[wI])),i},bb=(e,t)=>{const i={};return null!=e[yC]&&(i[yC]=ai(e[yC])),null!=e[vk]&&(i[vk]=ai(e[vk])),i},Eb=(e,t)=>{const i={};return null!=e[yC]&&(i[yC]=ai(e[yC])),null!=e[vk]&&(i[vk]=ai(e[vk])),i},Sb=(e,t)=>{const i={};return null!=e[yC]&&(i[yC]=ai(e[yC])),null!=e[vk]&&(i[vk]=ai(e[vk])),i},Cb=(e,t)=>({}),Ab=(e,t)=>({}),Ib=(e,t)=>({}),Tb=(e,t)=>({}),kb=(e,t)=>({}),Ob=(e,t)=>({}),Pb=(e,t)=>({}),_b=(e,t)=>{const i={};return null!=e[vk]&&(i[vk]=ai(e[vk])),i},Rb=(e,t)=>{const i={};return null!=e[SC]&&(i[SC]=ai(e[SC])),null!=e[vk]&&(i[vk]=ai(e[vk])),i},$b=(e,t)=>{const i={};return null!=e[SC]&&(i[SC]=ai(e[SC])),null!=e[vk]&&(i[vk]=ai(e[vk])),i},Mb=(e,t)=>(e||[]).filter((e=>null!=e)).map((e=>(e=>{const t={};return null!=e[HT]&&(t[HT]=ai(e[HT])),null!=e[wA]&&(t[wA]=ai(e[wA])),null!=e[KT]&&(t[KT]=ai(e[KT])),null!=e[kT]&&(t[kT]=ai(e[kT])),null!=e[SA]&&(t[SA]=ai(e[SA])),t})(e))),Nb=(e,t)=>({}),Db=(e,t)=>({}),jb=(e,t)=>({}),zb=(e,t)=>({}),Lb=(e,t)=>({}),Fb=(e,t)=>({}),Ub=(e,t)=>({}),Bb=(e,t)=>({}),Hb=(e,t)=>({}),qb=(e,t)=>{const i={};return null!=e[vI]&&(i[vI]=WE(e[vI])),""===e.Rules?i[iT]=[]:null!=e[iT]&&null!=e[iT][wk]&&(i[iT]=QE(Ni(e[iT][wk]))),i},Vb=(e,t)=>{const i={};return null!=e[fC]&&(i[fC]=wb(e[fC])),""===e.EventDestinations?i[dA]=[]:null!=e[dA]&&null!=e[dA][wk]&&(i[dA]=Jb(Ni(e[dA][wk]))),null!=e[qT]&&(i[qT]=SS(e[qT])),null!=e[HC]&&(i[HC]=(e=>{const t={};return null!=e[VT]&&(t[VT]=ai(e[VT])),t})(e[HC])),null!=e[HI]&&(i[HI]=YE(e[HI])),i},Gb=(e,t)=>{const i={};return null!=e[tT]&&(i[tT]=GE(e[tT])),i},Wb=(e,t)=>{const i={};return null!=e[vI]&&(i[vI]=WE(e[vI])),""===e.Rules?i[iT]=[]:null!=e[iT]&&null!=e[iT][wk]&&(i[iT]=QE(Ni(e[iT][wk]))),i},Kb=(e,t)=>{const i={};return null!=e[wI]&&(i[wI]=ai(e[wI])),null!=e[rA]&&(i[rA]=Qt(e[rA])),""===e.MatchingEventTypes?i[pI]=[]:null!=e[pI]&&null!=e[pI][wk]&&(i[pI]=Yb(Ni(e[pI][wk]))),null!=e[QA]&&(i[QA]=SE(e[QA])),null!=e[CC]&&(i[CC]=(e=>{const t={};return""===e.DimensionConfigurations?t[_C]=[]:null!=e[_C]&&null!=e[_C][wk]&&(t[_C]=vb(Ni(e[_C][wk]))),t})(e[CC])),null!=e[ST]&&(i[ST]=yS(e[ST])),i},Qb=(e,t)=>{const i={};return null!=e[yC]&&(i[yC]=ai(e[yC])),null!=e[pA]&&(i[pA]=ai(e[pA])),null!=e[vk]&&(i[vk]=ai(e[vk])),i},Xb=(e,t)=>{const i={};return null!=e[yC]&&(i[yC]=ai(e[yC])),null!=e[pA]&&(i[pA]=ai(e[pA])),null!=e[vk]&&(i[vk]=ai(e[vk])),i},Jb=(e,t)=>(e||[]).filter((e=>null!=e)).map((e=>Kb(e))),Yb=(e,t)=>(e||[]).filter((e=>null!=e)).map((e=>ai(e))),Zb=(e,t)=>{const i={};return null!=e[wA]&&(i[wA]=ai(e[wA])),null!=e[vk]&&(i[vk]=ai(e[vk])),i},eE=(e,t)=>{const i={};return null!=e[rA]&&(i[rA]=Qt(e[rA])),i},tE=(e,t)=>{const i={};return null!=e[HT]&&(i[HT]=ai(e[HT])),null!=e[wA]&&(i[wA]=ai(e[wA])),null!=e[KT]&&(i[KT]=ai(e[KT])),null!=e[FT]&&(i[FT]=ai(e[FT])),null!=e[kT]&&(i[kT]=ai(e[kT])),null!=e[SA]&&(i[SA]=ai(e[SA])),i},iE=(e,t)=>{const i={};return""===e.DkimAttributes?i[kC]={}:null!=e[kC]&&null!=e[kC][xk]&&(i[kC]=(e=>e.reduce(((e,t)=>(null===t.value||(e[t.key]=pE(t.value)),e)),{}))(Ni(e[kC][xk]))),i},nE=(e,t)=>{const i={};return""===e.MailFromDomainAttributes?i[uI]={}:null!=e[uI]&&null!=e[uI][xk]&&(i[uI]=$E(Ni(e[uI][xk]))),i},sE=(e,t)=>{const i={};return""===e.NotificationAttributes?i[bI]={}:null!=e[bI]&&null!=e[bI][xk]&&(i[bI]=jE(Ni(e[bI][xk]))),i},aE=(e,t)=>{const i={};return""===e.Policies?i[$I]={}:null!=e[$I]&&null!=e[$I][xk]&&(i[$I]=zE(Ni(e[$I][xk]))),i},oE=(e,t)=>{const i={};return""===e.VerificationAttributes?i[ck]={}:null!=e[ck]&&null!=e[ck][xk]&&(i[ck]=PS(Ni(e[ck][xk]))),i},rE=(e,t)=>{const i={};return null!=e[hI]&&(i[hI]=ri(e[hI])),null!=e[xI]&&(i[xI]=ri(e[xI])),null!=e[bT]&&(i[bT]=ri(e[bT])),i},cE=(e,t)=>{const i={};return""===e.SendDataPoints?i[uT]=[]:null!=e[uT]&&null!=e[uT][wk]&&(i[uT]=aS(Ni(e[uT][wk]))),i},lE=(e,t)=>{const i={};return null!=e[XT]&&(i[XT]=vS(e[XT])),i},pE=(e,t)=>{const i={};return null!=e[LC]&&(i[LC]=Qt(e[LC])),null!=e[nA]&&(i[nA]=ai(e[nA])),""===e.DkimTokens?i[eA]=[]:null!=e[eA]&&null!=e[eA][wk]&&(i[eA]=_S(Ni(e[eA][wk]))),i},dE=(e,t)=>{const i={};return null!=e[yC]&&(i[yC]=ai(e[yC])),null!=e[pA]&&(i[pA]=ai(e[pA])),null!=e[vk]&&(i[vk]=ai(e[vk])),i},uE=(e,t)=>{const i={};return null!=e[vk]&&(i[vk]=ai(e[vk])),i},mE=(e,t)=>{const i={};return null!=e[vk]&&(i[vk]=ai(e[vk])),i},hE=(e,t)=>{const i={};return null!=e[yC]&&(i[yC]=ai(e[yC])),null!=e[pA]&&(i[pA]=ai(e[pA])),null!=e[vk]&&(i[vk]=ai(e[vk])),i},fE=(e,t)=>{const i={};return null!=e[yA]&&(i[yA]=ai(e[yA])),null!=e[vk]&&(i[vk]=ai(e[vk])),i},gE=(e,t)=>{const i={};return null!=e[vk]&&(i[vk]=ai(e[vk])),i},yE=(e,t)=>{const i={};return null!=e[HT]&&(i[HT]=ai(e[HT])),null!=e[vk]&&(i[vk]=ai(e[vk])),i},xE=(e,t)=>{const i={};return null!=e[nC]&&(i[nC]=ai(e[nC])),null!=e[vk]&&(i[vk]=ai(e[vk])),i},vE=(e,t)=>{const i={};return null!=e[yC]&&(i[yC]=ai(e[yC])),null!=e[pA]&&(i[pA]=ai(e[pA])),null!=e[vk]&&(i[vk]=ai(e[vk])),i},wE=(e,t)=>{const i={};return null!=e[YT]&&(i[YT]=ai(e[YT])),null!=e[vk]&&(i[vk]=ai(e[vk])),i},bE=(e,t)=>{const i={};return null!=e[HT]&&(i[HT]=ai(e[HT])),null!=e[vk]&&(i[vk]=ai(e[vk])),i},EE=(e,t)=>{const i={};return null!=e[vk]&&(i[vk]=ai(e[vk])),i},SE=(e,t)=>{const i={};return null!=e[HA]&&(i[HA]=ai(e[HA])),null!=e[QC]&&(i[QC]=ai(e[QC])),i},CE=(e,t)=>{const i={};return null!=e[vk]&&(i[vk]=ai(e[vk])),i},AE=(e,t)=>{const i={};return""===e.ConfigurationSets?i[xC]=[]:null!=e[xC]&&null!=e[xC][wk]&&(i[xC]=(e=>(e||[]).filter((e=>null!=e)).map((e=>wb(e))))(Ni(e[xC][wk]))),null!=e[EI]&&(i[EI]=ai(e[EI])),i},IE=(e,t)=>{const i={};return""===e.CustomVerificationEmailTemplates?i[EC]=[]:null!=e[EC]&&null!=e[EC][wk]&&(i[EC]=Mb(Ni(e[EC][wk]))),null!=e[EI]&&(i[EI]=ai(e[EI])),i},TE=(e,t)=>{const i={};return""===e.Identities?i[KA]=[]:null!=e[KA]&&null!=e[KA][wk]&&(i[KA]=(e=>(e||[]).filter((e=>null!=e)).map((e=>ai(e))))(Ni(e[KA][wk]))),null!=e[EI]&&(i[EI]=ai(e[EI])),i},kE=(e,t)=>{const i={};return""===e.PolicyNames?i[RI]=[]:null!=e[RI]&&null!=e[RI][wk]&&(i[RI]=LE(Ni(e[RI][wk]))),i},OE=(e,t)=>{const i={};return""===e.Filters?i[CA]=[]:null!=e[CA]&&null!=e[CA][wk]&&(i[CA]=qE(Ni(e[CA][wk]))),i},PE=(e,t)=>{const i={};return""===e.RuleSets?i[WI]=[]:null!=e[WI]&&null!=e[WI][wk]&&(i[WI]=KE(Ni(e[WI][wk]))),null!=e[EI]&&(i[EI]=ai(e[EI])),i},_E=(e,t)=>{const i={};return""===e.TemplatesMetadata?i[BT]=[]:null!=e[BT]&&null!=e[BT][wk]&&(i[BT]=bS(Ni(e[BT][wk]))),null!=e[EI]&&(i[EI]=ai(e[EI])),i},RE=(e,t)=>{const i={};return""===e.VerifiedEmailAddresses?i[uk]=[]:null!=e[uk]&&null!=e[uk][wk]&&(i[uk]=(e=>(e||[]).filter((e=>null!=e)).map((e=>ai(e))))(Ni(e[uk][wk]))),i},$E=(e,t)=>e.reduce(((e,t)=>(null===t.value||(e[t.key]=(e=>{const t={};return null!=e[dI]&&(t[dI]=ai(e[dI])),null!=e[mI]&&(t[mI]=ai(e[mI])),null!=e[XS]&&(t[XS]=ai(e[XS])),t})(t.value)),e)),{}),ME=(e,t)=>{const i={};return null!=e[vk]&&(i[vk]=ai(e[vk])),i},NE=(e,t)=>{const i={};return null!=e[vk]&&(i[vk]=ai(e[vk])),i},DE=(e,t)=>{const i={};return null!=e[HT]&&(i[HT]=ai(e[HT])),null!=e[vk]&&(i[vk]=ai(e[vk])),i},jE=(e,t)=>e.reduce(((e,t)=>(null===t.value||(e[t.key]=(e=>{const t={};return null!=e[tC]&&(t[tC]=ai(e[tC])),null!=e[wC]&&(t[wC]=ai(e[wC])),null!=e[ZC]&&(t[ZC]=ai(e[ZC])),null!=e[vA]&&(t[vA]=Qt(e[vA])),null!=e[DA]&&(t[DA]=Qt(e[DA])),null!=e[jA]&&(t[jA]=Qt(e[jA])),null!=e[zA]&&(t[zA]=Qt(e[zA])),t})(t.value)),e)),{}),zE=(e,t)=>e.reduce(((e,t)=>(null===t.value||(e[t.key]=ai(t.value)),e)),{}),LE=(e,t)=>(e||[]).filter((e=>null!=e)).map((e=>ai(e))),FE=(e,t)=>{const i={};return null!=e[vk]&&(i[vk]=ai(e[vk])),i},UE=(e,t)=>({}),BE=(e,t)=>({}),HE=(e,t)=>{const i={};return null!=e[sT]&&(i[sT]=tS(e[sT])),null!=e[KS]&&(i[KS]=(e=>{const t={};return null!=e[DT]&&(t[DT]=ai(e[DT])),null!=e[AT]&&(t[AT]=ai(e[AT])),null!=e[pT]&&(t[pT]=ai(e[pT])),null!=e[cI]&&(t[cI]=ai(e[cI])),null!=e[nT]&&(t[nT]=ai(e[nT])),t})(e[KS])),null!=e[yk]&&(i[yk]=NS(e[yk])),null!=e[JA]&&(i[JA]=(e=>{const t={};return null!=e[DT]&&(t[DT]=ai(e[DT])),null!=e[yA]&&(t[yA]=ai(e[yA])),null!=e[GA]&&(t[GA]=ai(e[GA])),t})(e[JA])),null!=e[rT]&&(i[rT]=xS(e[rT])),null!=e[HS]&&(i[HS]=(e=>{const t={};return null!=e[LA]&&(t[LA]=ai(e[LA])),null!=e[UA]&&(t[UA]=ai(e[UA])),t})(e[HS])),null!=e[ET]&&(i[ET]=gS(e[ET])),i},qE=(e,t)=>(e||[]).filter((e=>null!=e)).map((e=>(e=>{const t={};return null!=e[wI]&&(t[wI]=ai(e[wI])),null!=e[qA]&&(t[qA]=VE(e[qA])),t})(e))),VE=(e,t)=>{const i={};return null!=e[kI]&&(i[kI]=ai(e[kI])),null!=e[AC]&&(i[AC]=ai(e[AC])),i},GE=(e,t)=>{const i={};return null!=e[wI]&&(i[wI]=ai(e[wI])),null!=e[rA]&&(i[rA]=Qt(e[rA])),null!=e[VT]&&(i[VT]=ai(e[VT])),""===e.Recipients?i[ZI]=[]:null!=e[ZI]&&null!=e[ZI][wk]&&(i[ZI]=XE(Ni(e[ZI][wk]))),""===e.Actions?i[qS]=[]:null!=e[qS]&&null!=e[qS][wk]&&(i[qS]=(e=>(e||[]).filter((e=>null!=e)).map((e=>HE(e))))(Ni(e[qS][wk]))),null!=e[hT]&&(i[hT]=Qt(e[hT])),i},WE=(e,t)=>{const i={};return null!=e[wI]&&(i[wI]=ai(e[wI])),null!=e[bC]&&(i[bC]=si(fi(e[bC]))),i},KE=(e,t)=>(e||[]).filter((e=>null!=e)).map((e=>WE(e))),QE=(e,t)=>(e||[]).filter((e=>null!=e)).map((e=>GE(e))),XE=(e,t)=>(e||[]).filter((e=>null!=e)).map((e=>ai(e))),JE=(e,t)=>({}),YE=(e,t)=>{const i={};return null!=e[fT]&&(i[fT]=Qt(e[fT])),null!=e[zI]&&(i[zI]=Qt(e[zI])),null!=e[tI]&&(i[tI]=si(fi(e[tI]))),i},ZE=(e,t)=>{const i={};return null!=e[wI]&&(i[wI]=ai(e[wI])),null!=e[vk]&&(i[vk]=ai(e[vk])),i},eS=(e,t)=>{const i={};return null!=e[wI]&&(i[wI]=ai(e[wI])),null!=e[vk]&&(i[vk]=ai(e[vk])),i},tS=(e,t)=>{const i={};return null!=e[DT]&&(i[DT]=ai(e[DT])),null!=e[QS]&&(i[QS]=ai(e[QS])),null!=e[AI]&&(i[AI]=ai(e[AI])),null!=e[XA]&&(i[XA]=ai(e[XA])),null!=e[VA]&&(i[VA]=ai(e[VA])),i},iS=(e,t)=>{const i={};return null!=e[gI]&&(i[gI]=ai(e[gI])),i},nS=(e,t)=>{const i={};return""===e.Status?i[$T]=[]:null!=e[$T]&&null!=e[$T][wk]&&(i[$T]=gb(Ni(e[$T][wk]))),i},sS=(e,t)=>{const i={};return null!=e[gI]&&(i[gI]=ai(e[gI])),i},aS=(e,t)=>(e||[]).filter((e=>null!=e)).map((e=>(e=>{const t={};return null!=e[JT]&&(t[JT]=si(fi(e[JT]))),null!=e[PC]&&(t[PC]=pi(e[PC])),null!=e[iC]&&(t[iC]=pi(e[iC])),null!=e[IC]&&(t[IC]=pi(e[IC])),null!=e[eT]&&(t[eT]=pi(e[eT])),t})(e))),oS=(e,t)=>{const i={};return null!=e[gI]&&(i[gI]=ai(e[gI])),i},rS=(e,t)=>{const i={};return null!=e[gI]&&(i[gI]=ai(e[gI])),i},cS=(e,t)=>{const i={};return null!=e[gI]&&(i[gI]=ai(e[gI])),i},lS=(e,t)=>({}),pS=(e,t)=>({}),dS=(e,t)=>({}),uS=(e,t)=>({}),mS=(e,t)=>({}),hS=(e,t)=>({}),fS=(e,t)=>({}),gS=(e,t)=>{const i={};return null!=e[DT]&&(i[DT]=ai(e[DT])),null!=e[mA]&&(i[mA]=ai(e[mA])),i},yS=(e,t)=>{const i={};return null!=e[jT]&&(i[jT]=ai(e[jT])),i},xS=(e,t)=>{const i={};return null!=e[_T]&&(i[_T]=ai(e[_T])),null!=e[DT]&&(i[DT]=ai(e[DT])),i},vS=(e,t)=>{const i={};return null!=e[HT]&&(i[HT]=ai(e[HT])),null!=e[CT]&&(i[CT]=ai(e[CT])),null!=e[GT]&&(i[GT]=ai(e[GT])),null!=e[FA]&&(i[FA]=ai(e[FA])),i},wS=(e,t)=>{const i={};return null!=e[HT]&&(i[HT]=ai(e[HT])),null!=e[vk]&&(i[vk]=ai(e[vk])),i},bS=(e,t)=>(e||[]).filter((e=>null!=e)).map((e=>(e=>{const t={};return null!=e[wI]&&(t[wI]=ai(e[wI])),null!=e[bC]&&(t[bC]=si(fi(e[bC]))),t})(e))),ES=(e,t)=>{const i={};return null!=e[YI]&&(i[YI]=ai(e[YI])),i},SS=(e,t)=>{const i={};return null!=e[pC]&&(i[pC]=ai(e[pC])),i},CS=(e,t)=>{const i={};return null!=e[yC]&&(i[yC]=ai(e[yC])),null!=e[vk]&&(i[vk]=ai(e[vk])),i},AS=(e,t)=>{const i={};return null!=e[yC]&&(i[yC]=ai(e[yC])),null!=e[vk]&&(i[vk]=ai(e[vk])),i},IS=(e,t)=>({}),TS=(e,t)=>({}),kS=(e,t)=>({}),OS=(e,t)=>({}),PS=(e,t)=>e.reduce(((e,t)=>(null===t.value||(e[t.key]=(e=>{const t={};return null!=e[hk]&&(t[hk]=ai(e[hk])),null!=e[fk]&&(t[fk]=ai(e[fk])),t})(t.value)),e)),{}),_S=(e,t)=>(e||[]).filter((e=>null!=e)).map((e=>ai(e))),RS=(e,t)=>{const i={};return""===e.DkimTokens?i[eA]=[]:null!=e[eA]&&null!=e[eA][wk]&&(i[eA]=_S(Ni(e[eA][wk]))),i},$S=(e,t)=>{const i={};return null!=e[fk]&&(i[fk]=ai(e[fk])),i},MS=(e,t)=>({}),NS=(e,t)=>{const i={};return null!=e[DT]&&(i[DT]=ai(e[DT])),null!=e[CI]&&(i[CI]=ai(e[CI])),i},DS=e=>({httpStatusCode:e.statusCode,requestId:e.headers["x-amzn-requestid"]??e.headers["x-amzn-request-id"]??e.headers["x-amz-request-id"],extendedRequestId:e.headers["x-amz-id-2"],cfId:e.headers["x-amz-cf-id"]}),jS=Ii(Of),zS=async(e,t,i,n,s)=>{const{hostname:a,protocol:o="https",port:r,path:c}=await e.endpoint(),l={protocol:o,hostname:a,port:r,method:"POST",path:c.endsWith("/")?c.slice(0,-1)+i:c+i,headers:t};return void 0!==s&&(l.body=s),new I(l)},LS={"content-type":"application/x-www-form-urlencoded"},FS="2010-12-01",US="Action",BS="ArrivalDate",HS="AddHeaderAction",qS="Actions",VS="After",GS="Body",WS="BccAddresses",KS="BounceAction",QS="BucketName",XS="BehaviorOnMXFailure",JS="BouncedRecipientInfoList",YS="BounceSender",ZS="BounceSenderArn",eC="BounceType",tC="BounceTopic",iC="Bounces",nC="Bucket",sC="Charset",aC="CcAddresses",oC="CreateConfigurationSet",rC="CreateConfigurationSetEventDestination",cC="CreateConfigurationSetTrackingOptions",lC="CreateCustomVerificationEmailTemplate",pC="CustomRedirectDomain",dC="CreateReceiptFilter",uC="CreateReceiptRule",mC="CloneReceiptRuleSet",hC="CreateReceiptRuleSet",fC="ConfigurationSet",gC="ConfigurationSetAttributeNames",yC="ConfigurationSetName",xC="ConfigurationSets",vC="CreateTemplate",wC="ComplaintTopic",bC="CreatedTimestamp",EC="CustomVerificationEmailTemplates",SC="CustomVerificationEmailTemplateName",CC="CloudWatchDestination",AC="Cidr",IC="Complaints",TC="Destination",kC="DkimAttributes",OC="DescribeActiveReceiptRuleSet",PC="DeliveryAttempts",_C="DimensionConfigurations",RC="DeleteConfigurationSet",$C="DeleteConfigurationSetEventDestination",MC="DeleteConfigurationSetTrackingOptions",NC="DescribeConfigurationSet",DC="DeleteCustomVerificationEmailTemplate",jC="DiagnosticCode",zC="DefaultDimensionValue",LC="DkimEnabled",FC="DeleteIdentity",UC="DeleteIdentityPolicy",BC="DimensionName",HC="DeliveryOptions",qC="DeleteReceiptFilter",VC="DeleteReceiptRule",GC="DeleteReceiptRuleSet",WC="DescribeReceiptRuleSet",KC="DescribeReceiptRule",QC="DeliveryStreamARN",XC="DeleteTemplate",JC="DefaultTemplateData",YC="DefaultTags",ZC="DeliveryTopic",eA="DkimTokens",tA="DeleteVerifiedEmailAddress",iA="DimensionValueSource",nA="DkimVerificationStatus",sA="Data",aA="Destinations",oA="Domain",rA="Enabled",cA="EmailAddress",lA="EventDestination",pA="EventDestinationName",dA="EventDestinations",uA="ExtensionFields",mA="Encoding",hA="Error",fA="Explanation",gA="Filter",yA="FunctionArn",xA="FromArn",vA="ForwardingEnabled",wA="FromEmailAddress",bA="FilterName",EA="FinalRecipient",SA="FailureRedirectionURL",CA="Filters",AA="GetAccountSendingEnabled",IA="GetCustomVerificationEmailTemplate",TA="GetIdentityDkimAttributes",kA="GetIdentityMailFromDomainAttributes",OA="GetIdentityNotificationAttributes",PA="GetIdentityPolicies",_A="GetIdentityVerificationAttributes",RA="GetSendQuota",$A="GetSendStatistics",MA="GetTemplate",NA="Html",DA="HeadersInBounceNotificationsEnabled",jA="HeadersInComplaintNotificationsEnabled",zA="HeadersInDeliveryNotificationsEnabled",LA="HeaderName",FA="HtmlPart",UA="HeaderValue",BA="Identity",HA="IAMRoleARN",qA="IpFilter",VA="IamRoleArn",GA="InvocationType",WA="IdentityType",KA="Identities",QA="KinesisFirehoseDestination",XA="KmsKeyArn",JA="LambdaAction",YA="LastAttemptDate",ZA="ListConfigurationSets",eI="ListCustomVerificationEmailTemplates",tI="LastFreshStart",iI="ListIdentities",nI="ListIdentityPolicies",sI="ListReceiptFilters",aI="ListReceiptRuleSets",oI="ListTemplates",rI="ListVerifiedEmailAddresses",cI="Message",lI="MessageDsn",pI="MatchingEventTypes",dI="MailFromDomain",uI="MailFromDomainAttributes",mI="MailFromDomainStatus",hI="Max24HourSend",fI="MaxItems",gI="MessageId",yI="MaxResults",xI="MaxSendRate",vI="Metadata",wI="Name",bI="NotificationAttributes",EI="NextToken",SI="NotificationType",CI="OrganizationArn",AI="ObjectKeyPrefix",II="OriginalMessageId",TI="OriginalRuleSetName",kI="Policy",OI="PutConfigurationSetDeliveryOptions",PI="PutIdentityPolicy",_I="PolicyName",RI="PolicyNames",$I="Policies",MI="Recipient",NI="RecipientArn",DI="RecipientDsnFields",jI="ReportingMta",zI="ReputationMetricsEnabled",LI="RawMessage",FI="RemoteMta",UI="RuleName",BI="RuleNames",HI="ReputationOptions",qI="ReturnPath",VI="ReturnPathArn",GI="ReorderReceiptRuleSet",WI="RuleSets",KI="RuleSetName",QI="ReplacementTags",XI="ReplyToAddresses",JI="ReplacementTemplateData",YI="RenderedTemplate",ZI="Recipients",eT="Rejects",tT="Rule",iT="Rules",nT="Sender",sT="S3Action",aT="SetActiveReceiptRuleSet",oT="SourceArn",rT="StopAction",cT="SendBounce",lT="SendBulkTemplatedEmail",pT="StatusCode",dT="SendCustomVerificationEmail",uT="SendDataPoints",mT="SendEmail",hT="ScanEnabled",fT="SendingEnabled",gT="SetIdentityDkimEnabled",yT="SetIdentityFeedbackForwardingEnabled",xT="SetIdentityHeadersInNotificationsEnabled",vT="SetIdentityMailFromDomain",wT="SetIdentityNotificationTopic",bT="SentLast24Hours",ET="SNSAction",ST="SNSDestination",CT="SubjectPart",AT="SmtpReplyCode",IT="SendRawEmail",TT="SetReceiptRulePosition",kT="SuccessRedirectionURL",OT="SnsTopic",PT="SendTemplatedEmail",_T="Scope",RT="Source",$T="Status",MT="Subject",NT="Text",DT="TopicArn",jT="TopicARN",zT="TemplateArn",LT="ToAddresses",FT="TemplateContent",UT="TemplateData",BT="TemplatesMetadata",HT="TemplateName",qT="TrackingOptions",VT="TlsPolicy",GT="TextPart",WT="TestRenderTemplate",KT="TemplateSubject",QT="Tags",XT="Template",JT="Timestamp",YT="Topic",ZT="UpdateAccountSendingEnabled",ek="UpdateConfigurationSetEventDestination",tk="UpdateConfigurationSetReputationMetricsEnabled",ik="UpdateConfigurationSetSendingEnabled",nk="UpdateConfigurationSetTrackingOptions",sk="UpdateCustomVerificationEmailTemplate",ak="UpdateReceiptRule",ok="UpdateTemplate",rk="Version",ck="VerificationAttributes",lk="VerifyDomainDkim",pk="VerifyDomainIdentity",dk="VerifyEmailAddress",uk="VerifiedEmailAddresses",mk="VerifyEmailIdentity",hk="VerificationStatus",fk="VerificationToken",gk="Value",yk="WorkmailAction",xk="entry",vk="message",wk="member",bk=e=>Object.entries(e).map((([e,t])=>ye(e)+"="+ye(t))).join("&"),Ek=(e,t)=>void 0!==t.Error?.Code?t.Error.Code:404==e.statusCode?"NotFound":void 0;class Sk extends(Gt.classBuilder().ep(Yh).m((function(e,t,i,n){return[B(i,this.serialize,this.deserialize),cs(i,e.getEndpointParameterInstructions())]})).s("SimpleEmailService","CloneReceiptRuleSet",{}).n("SESClient","CloneReceiptRuleSetCommand").f(void 0,void 0).ser(pg).de(Ty).build()){}class Ck extends(Gt.classBuilder().ep(Yh).m((function(e,t,i,n){return[B(i,this.serialize,this.deserialize),cs(i,e.getEndpointParameterInstructions())]})).s("SimpleEmailService","CreateConfigurationSet",{}).n("SESClient","CreateConfigurationSetCommand").f(void 0,void 0).ser(dg).de(ky).build()){}class Ak extends(Gt.classBuilder().ep(Yh).m((function(e,t,i,n){return[B(i,this.serialize,this.deserialize),cs(i,e.getEndpointParameterInstructions())]})).s("SimpleEmailService","CreateConfigurationSetEventDestination",{}).n("SESClient","CreateConfigurationSetEventDestinationCommand").f(void 0,void 0).ser(ug).de(Oy).build()){}class Ik extends(Gt.classBuilder().ep(Yh).m((function(e,t,i,n){return[B(i,this.serialize,this.deserialize),cs(i,e.getEndpointParameterInstructions())]})).s("SimpleEmailService","CreateConfigurationSetTrackingOptions",{}).n("SESClient","CreateConfigurationSetTrackingOptionsCommand").f(void 0,void 0).ser(mg).de(Py).build()){}class Tk extends(Gt.classBuilder().ep(Yh).m((function(e,t,i,n){return[B(i,this.serialize,this.deserialize),cs(i,e.getEndpointParameterInstructions())]})).s("SimpleEmailService","CreateCustomVerificationEmailTemplate",{}).n("SESClient","CreateCustomVerificationEmailTemplateCommand").f(void 0,void 0).ser(hg).de(_y).build()){}class kk extends(Gt.classBuilder().ep(Yh).m((function(e,t,i,n){return[B(i,this.serialize,this.deserialize),cs(i,e.getEndpointParameterInstructions())]})).s("SimpleEmailService","CreateReceiptFilter",{}).n("SESClient","CreateReceiptFilterCommand").f(void 0,void 0).ser(fg).de(Ry).build()){}class Ok extends(Gt.classBuilder().ep(Yh).m((function(e,t,i,n){return[B(i,this.serialize,this.deserialize),cs(i,e.getEndpointParameterInstructions())]})).s("SimpleEmailService","CreateReceiptRule",{}).n("SESClient","CreateReceiptRuleCommand").f(void 0,void 0).ser(gg).de($y).build()){}class Pk extends(Gt.classBuilder().ep(Yh).m((function(e,t,i,n){return[B(i,this.serialize,this.deserialize),cs(i,e.getEndpointParameterInstructions())]})).s("SimpleEmailService","CreateReceiptRuleSet",{}).n("SESClient","CreateReceiptRuleSetCommand").f(void 0,void 0).ser(yg).de(My).build()){}class _k extends(Gt.classBuilder().ep(Yh).m((function(e,t,i,n){return[B(i,this.serialize,this.deserialize),cs(i,e.getEndpointParameterInstructions())]})).s("SimpleEmailService","CreateTemplate",{}).n("SESClient","CreateTemplateCommand").f(void 0,void 0).ser(xg).de(Ny).build()){}class Rk extends(Gt.classBuilder().ep(Yh).m((function(e,t,i,n){return[B(i,this.serialize,this.deserialize),cs(i,e.getEndpointParameterInstructions())]})).s("SimpleEmailService","DeleteConfigurationSet",{}).n("SESClient","DeleteConfigurationSetCommand").f(void 0,void 0).ser(vg).de(Dy).build()){}class $k extends(Gt.classBuilder().ep(Yh).m((function(e,t,i,n){return[B(i,this.serialize,this.deserialize),cs(i,e.getEndpointParameterInstructions())]})).s("SimpleEmailService","DeleteConfigurationSetEventDestination",{}).n("SESClient","DeleteConfigurationSetEventDestinationCommand").f(void 0,void 0).ser(wg).de(jy).build()){}class Mk extends(Gt.classBuilder().ep(Yh).m((function(e,t,i,n){return[B(i,this.serialize,this.deserialize),cs(i,e.getEndpointParameterInstructions())]})).s("SimpleEmailService","DeleteConfigurationSetTrackingOptions",{}).n("SESClient","DeleteConfigurationSetTrackingOptionsCommand").f(void 0,void 0).ser(bg).de(zy).build()){}class Nk extends(Gt.classBuilder().ep(Yh).m((function(e,t,i,n){return[B(i,this.serialize,this.deserialize),cs(i,e.getEndpointParameterInstructions())]})).s("SimpleEmailService","DeleteCustomVerificationEmailTemplate",{}).n("SESClient","DeleteCustomVerificationEmailTemplateCommand").f(void 0,void 0).ser(Eg).de(Ly).build()){}class Dk extends(Gt.classBuilder().ep(Yh).m((function(e,t,i,n){return[B(i,this.serialize,this.deserialize),cs(i,e.getEndpointParameterInstructions())]})).s("SimpleEmailService","DeleteIdentity",{}).n("SESClient","DeleteIdentityCommand").f(void 0,void 0).ser(Sg).de(Fy).build()){}class jk extends(Gt.classBuilder().ep(Yh).m((function(e,t,i,n){return[B(i,this.serialize,this.deserialize),cs(i,e.getEndpointParameterInstructions())]})).s("SimpleEmailService","DeleteIdentityPolicy",{}).n("SESClient","DeleteIdentityPolicyCommand").f(void 0,void 0).ser(Cg).de(Uy).build()){}class zk extends(Gt.classBuilder().ep(Yh).m((function(e,t,i,n){return[B(i,this.serialize,this.deserialize),cs(i,e.getEndpointParameterInstructions())]})).s("SimpleEmailService","DeleteReceiptFilter",{}).n("SESClient","DeleteReceiptFilterCommand").f(void 0,void 0).ser(Ag).de(By).build()){}class Lk extends(Gt.classBuilder().ep(Yh).m((function(e,t,i,n){return[B(i,this.serialize,this.deserialize),cs(i,e.getEndpointParameterInstructions())]})).s("SimpleEmailService","DeleteReceiptRule",{}).n("SESClient","DeleteReceiptRuleCommand").f(void 0,void 0).ser(Ig).de(Hy).build()){}class Fk extends(Gt.classBuilder().ep(Yh).m((function(e,t,i,n){return[B(i,this.serialize,this.deserialize),cs(i,e.getEndpointParameterInstructions())]})).s("SimpleEmailService","DeleteReceiptRuleSet",{}).n("SESClient","DeleteReceiptRuleSetCommand").f(void 0,void 0).ser(Tg).de(qy).build()){}class Uk extends(Gt.classBuilder().ep(Yh).m((function(e,t,i,n){return[B(i,this.serialize,this.deserialize),cs(i,e.getEndpointParameterInstructions())]})).s("SimpleEmailService","DeleteTemplate",{}).n("SESClient","DeleteTemplateCommand").f(void 0,void 0).ser(kg).de(Vy).build()){}class Bk extends(Gt.classBuilder().ep(Yh).m((function(e,t,i,n){return[B(i,this.serialize,this.deserialize),cs(i,e.getEndpointParameterInstructions())]})).s("SimpleEmailService","DeleteVerifiedEmailAddress",{}).n("SESClient","DeleteVerifiedEmailAddressCommand").f(void 0,void 0).ser(Og).de(Gy).build()){}class Hk extends(Gt.classBuilder().ep(Yh).m((function(e,t,i,n){return[B(i,this.serialize,this.deserialize),cs(i,e.getEndpointParameterInstructions())]})).s("SimpleEmailService","DescribeActiveReceiptRuleSet",{}).n("SESClient","DescribeActiveReceiptRuleSetCommand").f(void 0,void 0).ser(Pg).de(Wy).build()){}class qk extends(Gt.classBuilder().ep(Yh).m((function(e,t,i,n){return[B(i,this.serialize,this.deserialize),cs(i,e.getEndpointParameterInstructions())]})).s("SimpleEmailService","DescribeConfigurationSet",{}).n("SESClient","DescribeConfigurationSetCommand").f(void 0,void 0).ser(_g).de(Ky).build()){}class Vk extends(Gt.classBuilder().ep(Yh).m((function(e,t,i,n){return[B(i,this.serialize,this.deserialize),cs(i,e.getEndpointParameterInstructions())]})).s("SimpleEmailService","DescribeReceiptRule",{}).n("SESClient","DescribeReceiptRuleCommand").f(void 0,void 0).ser(Rg).de(Qy).build()){}class Gk extends(Gt.classBuilder().ep(Yh).m((function(e,t,i,n){return[B(i,this.serialize,this.deserialize),cs(i,e.getEndpointParameterInstructions())]})).s("SimpleEmailService","DescribeReceiptRuleSet",{}).n("SESClient","DescribeReceiptRuleSetCommand").f(void 0,void 0).ser($g).de(Xy).build()){}class Wk extends(Gt.classBuilder().ep(Yh).m((function(e,t,i,n){return[B(i,this.serialize,this.deserialize),cs(i,e.getEndpointParameterInstructions())]})).s("SimpleEmailService","GetAccountSendingEnabled",{}).n("SESClient","GetAccountSendingEnabledCommand").f(void 0,void 0).ser(Mg).de(Jy).build()){}class Kk extends(Gt.classBuilder().ep(Yh).m((function(e,t,i,n){return[B(i,this.serialize,this.deserialize),cs(i,e.getEndpointParameterInstructions())]})).s("SimpleEmailService","GetCustomVerificationEmailTemplate",{}).n("SESClient","GetCustomVerificationEmailTemplateCommand").f(void 0,void 0).ser(Ng).de(Yy).build()){}class Qk extends(Gt.classBuilder().ep(Yh).m((function(e,t,i,n){return[B(i,this.serialize,this.deserialize),cs(i,e.getEndpointParameterInstructions())]})).s("SimpleEmailService","GetIdentityDkimAttributes",{}).n("SESClient","GetIdentityDkimAttributesCommand").f(void 0,void 0).ser(Dg).de(Zy).build()){}class Xk extends(Gt.classBuilder().ep(Yh).m((function(e,t,i,n){return[B(i,this.serialize,this.deserialize),cs(i,e.getEndpointParameterInstructions())]})).s("SimpleEmailService","GetIdentityMailFromDomainAttributes",{}).n("SESClient","GetIdentityMailFromDomainAttributesCommand").f(void 0,void 0).ser(jg).de(ex).build()){}class Jk extends(Gt.classBuilder().ep(Yh).m((function(e,t,i,n){return[B(i,this.serialize,this.deserialize),cs(i,e.getEndpointParameterInstructions())]})).s("SimpleEmailService","GetIdentityNotificationAttributes",{}).n("SESClient","GetIdentityNotificationAttributesCommand").f(void 0,void 0).ser(zg).de(tx).build()){}class Yk extends(Gt.classBuilder().ep(Yh).m((function(e,t,i,n){return[B(i,this.serialize,this.deserialize),cs(i,e.getEndpointParameterInstructions())]})).s("SimpleEmailService","GetIdentityPolicies",{}).n("SESClient","GetIdentityPoliciesCommand").f(void 0,void 0).ser(Lg).de(ix).build()){}class Zk extends(Gt.classBuilder().ep(Yh).m((function(e,t,i,n){return[B(i,this.serialize,this.deserialize),cs(i,e.getEndpointParameterInstructions())]})).s("SimpleEmailService","GetIdentityVerificationAttributes",{}).n("SESClient","GetIdentityVerificationAttributesCommand").f(void 0,void 0).ser(Fg).de(nx).build()){}class eO extends(Gt.classBuilder().ep(Yh).m((function(e,t,i,n){return[B(i,this.serialize,this.deserialize),cs(i,e.getEndpointParameterInstructions())]})).s("SimpleEmailService","GetSendQuota",{}).n("SESClient","GetSendQuotaCommand").f(void 0,void 0).ser(Ug).de(sx).build()){}class tO extends(Gt.classBuilder().ep(Yh).m((function(e,t,i,n){return[B(i,this.serialize,this.deserialize),cs(i,e.getEndpointParameterInstructions())]})).s("SimpleEmailService","GetSendStatistics",{}).n("SESClient","GetSendStatisticsCommand").f(void 0,void 0).ser(Bg).de(ax).build()){}class iO extends(Gt.classBuilder().ep(Yh).m((function(e,t,i,n){return[B(i,this.serialize,this.deserialize),cs(i,e.getEndpointParameterInstructions())]})).s("SimpleEmailService","GetTemplate",{}).n("SESClient","GetTemplateCommand").f(void 0,void 0).ser(Hg).de(ox).build()){}class nO extends(Gt.classBuilder().ep(Yh).m((function(e,t,i,n){return[B(i,this.serialize,this.deserialize),cs(i,e.getEndpointParameterInstructions())]})).s("SimpleEmailService","ListConfigurationSets",{}).n("SESClient","ListConfigurationSetsCommand").f(void 0,void 0).ser(qg).de(rx).build()){}class sO extends(Gt.classBuilder().ep(Yh).m((function(e,t,i,n){return[B(i,this.serialize,this.deserialize),cs(i,e.getEndpointParameterInstructions())]})).s("SimpleEmailService","ListCustomVerificationEmailTemplates",{}).n("SESClient","ListCustomVerificationEmailTemplatesCommand").f(void 0,void 0).ser(Vg).de(cx).build()){}class aO extends(Gt.classBuilder().ep(Yh).m((function(e,t,i,n){return[B(i,this.serialize,this.deserialize),cs(i,e.getEndpointParameterInstructions())]})).s("SimpleEmailService","ListIdentities",{}).n("SESClient","ListIdentitiesCommand").f(void 0,void 0).ser(Gg).de(lx).build()){}class oO extends(Gt.classBuilder().ep(Yh).m((function(e,t,i,n){return[B(i,this.serialize,this.deserialize),cs(i,e.getEndpointParameterInstructions())]})).s("SimpleEmailService","ListIdentityPolicies",{}).n("SESClient","ListIdentityPoliciesCommand").f(void 0,void 0).ser(Wg).de(px).build()){}class rO extends(Gt.classBuilder().ep(Yh).m((function(e,t,i,n){return[B(i,this.serialize,this.deserialize),cs(i,e.getEndpointParameterInstructions())]})).s("SimpleEmailService","ListReceiptFilters",{}).n("SESClient","ListReceiptFiltersCommand").f(void 0,void 0).ser(Kg).de(dx).build()){}class cO extends(Gt.classBuilder().ep(Yh).m((function(e,t,i,n){return[B(i,this.serialize,this.deserialize),cs(i,e.getEndpointParameterInstructions())]})).s("SimpleEmailService","ListReceiptRuleSets",{}).n("SESClient","ListReceiptRuleSetsCommand").f(void 0,void 0).ser(Qg).de(ux).build()){}class lO extends(Gt.classBuilder().ep(Yh).m((function(e,t,i,n){return[B(i,this.serialize,this.deserialize),cs(i,e.getEndpointParameterInstructions())]})).s("SimpleEmailService","ListTemplates",{}).n("SESClient","ListTemplatesCommand").f(void 0,void 0).ser(Xg).de(mx).build()){}class pO extends(Gt.classBuilder().ep(Yh).m((function(e,t,i,n){return[B(i,this.serialize,this.deserialize),cs(i,e.getEndpointParameterInstructions())]})).s("SimpleEmailService","ListVerifiedEmailAddresses",{}).n("SESClient","ListVerifiedEmailAddressesCommand").f(void 0,void 0).ser(Jg).de(hx).build()){}class dO extends(Gt.classBuilder().ep(Yh).m((function(e,t,i,n){return[B(i,this.serialize,this.deserialize),cs(i,e.getEndpointParameterInstructions())]})).s("SimpleEmailService","PutConfigurationSetDeliveryOptions",{}).n("SESClient","PutConfigurationSetDeliveryOptionsCommand").f(void 0,void 0).ser(Yg).de(fx).build()){}class uO extends(Gt.classBuilder().ep(Yh).m((function(e,t,i,n){return[B(i,this.serialize,this.deserialize),cs(i,e.getEndpointParameterInstructions())]})).s("SimpleEmailService","PutIdentityPolicy",{}).n("SESClient","PutIdentityPolicyCommand").f(void 0,void 0).ser(Zg).de(gx).build()){}class mO extends(Gt.classBuilder().ep(Yh).m((function(e,t,i,n){return[B(i,this.serialize,this.deserialize),cs(i,e.getEndpointParameterInstructions())]})).s("SimpleEmailService","ReorderReceiptRuleSet",{}).n("SESClient","ReorderReceiptRuleSetCommand").f(void 0,void 0).ser(ey).de(yx).build()){}class hO extends(Gt.classBuilder().ep(Yh).m((function(e,t,i,n){return[B(i,this.serialize,this.deserialize),cs(i,e.getEndpointParameterInstructions())]})).s("SimpleEmailService","SendBounce",{}).n("SESClient","SendBounceCommand").f(void 0,void 0).ser(ty).de(xx).build()){}class fO extends(Gt.classBuilder().ep(Yh).m((function(e,t,i,n){return[B(i,this.serialize,this.deserialize),cs(i,e.getEndpointParameterInstructions())]})).s("SimpleEmailService","SendBulkTemplatedEmail",{}).n("SESClient","SendBulkTemplatedEmailCommand").f(void 0,void 0).ser(iy).de(vx).build()){}class gO extends(Gt.classBuilder().ep(Yh).m((function(e,t,i,n){return[B(i,this.serialize,this.deserialize),cs(i,e.getEndpointParameterInstructions())]})).s("SimpleEmailService","SendCustomVerificationEmail",{}).n("SESClient","SendCustomVerificationEmailCommand").f(void 0,void 0).ser(ny).de(wx).build()){}class yO extends(Gt.classBuilder().ep(Yh).m((function(e,t,i,n){return[B(i,this.serialize,this.deserialize),cs(i,e.getEndpointParameterInstructions())]})).s("SimpleEmailService","SendEmail",{}).n("SESClient","SendEmailCommand").f(void 0,void 0).ser(sy).de(bx).build()){}class xO extends(Gt.classBuilder().ep(Yh).m((function(e,t,i,n){return[B(i,this.serialize,this.deserialize),cs(i,e.getEndpointParameterInstructions())]})).s("SimpleEmailService","SendRawEmail",{}).n("SESClient","SendRawEmailCommand").f(void 0,void 0).ser(ay).de(Ex).build()){}class vO extends(Gt.classBuilder().ep(Yh).m((function(e,t,i,n){return[B(i,this.serialize,this.deserialize),cs(i,e.getEndpointParameterInstructions())]})).s("SimpleEmailService","SendTemplatedEmail",{}).n("SESClient","SendTemplatedEmailCommand").f(void 0,void 0).ser(oy).de(Sx).build()){}class wO extends(Gt.classBuilder().ep(Yh).m((function(e,t,i,n){return[B(i,this.serialize,this.deserialize),cs(i,e.getEndpointParameterInstructions())]})).s("SimpleEmailService","SetActiveReceiptRuleSet",{}).n("SESClient","SetActiveReceiptRuleSetCommand").f(void 0,void 0).ser(ry).de(Cx).build()){}class bO extends(Gt.classBuilder().ep(Yh).m((function(e,t,i,n){return[B(i,this.serialize,this.deserialize),cs(i,e.getEndpointParameterInstructions())]})).s("SimpleEmailService","SetIdentityDkimEnabled",{}).n("SESClient","SetIdentityDkimEnabledCommand").f(void 0,void 0).ser(cy).de(Ax).build()){}class EO extends(Gt.classBuilder().ep(Yh).m((function(e,t,i,n){return[B(i,this.serialize,this.deserialize),cs(i,e.getEndpointParameterInstructions())]})).s("SimpleEmailService","SetIdentityFeedbackForwardingEnabled",{}).n("SESClient","SetIdentityFeedbackForwardingEnabledCommand").f(void 0,void 0).ser(ly).de(Ix).build()){}class SO extends(Gt.classBuilder().ep(Yh).m((function(e,t,i,n){return[B(i,this.serialize,this.deserialize),cs(i,e.getEndpointParameterInstructions())]})).s("SimpleEmailService","SetIdentityHeadersInNotificationsEnabled",{}).n("SESClient","SetIdentityHeadersInNotificationsEnabledCommand").f(void 0,void 0).ser(py).de(Tx).build()){}class CO extends(Gt.classBuilder().ep(Yh).m((function(e,t,i,n){return[B(i,this.serialize,this.deserialize),cs(i,e.getEndpointParameterInstructions())]})).s("SimpleEmailService","SetIdentityMailFromDomain",{}).n("SESClient","SetIdentityMailFromDomainCommand").f(void 0,void 0).ser(dy).de(kx).build()){}class AO extends(Gt.classBuilder().ep(Yh).m((function(e,t,i,n){return[B(i,this.serialize,this.deserialize),cs(i,e.getEndpointParameterInstructions())]})).s("SimpleEmailService","SetIdentityNotificationTopic",{}).n("SESClient","SetIdentityNotificationTopicCommand").f(void 0,void 0).ser(uy).de(Ox).build()){}class IO extends(Gt.classBuilder().ep(Yh).m((function(e,t,i,n){return[B(i,this.serialize,this.deserialize),cs(i,e.getEndpointParameterInstructions())]})).s("SimpleEmailService","SetReceiptRulePosition",{}).n("SESClient","SetReceiptRulePositionCommand").f(void 0,void 0).ser(my).de(Px).build()){}class TO extends(Gt.classBuilder().ep(Yh).m((function(e,t,i,n){return[B(i,this.serialize,this.deserialize),cs(i,e.getEndpointParameterInstructions())]})).s("SimpleEmailService","TestRenderTemplate",{}).n("SESClient","TestRenderTemplateCommand").f(void 0,void 0).ser(hy).de(_x).build()){}class kO extends(Gt.classBuilder().ep(Yh).m((function(e,t,i,n){return[B(i,this.serialize,this.deserialize),cs(i,e.getEndpointParameterInstructions())]})).s("SimpleEmailService","UpdateAccountSendingEnabled",{}).n("SESClient","UpdateAccountSendingEnabledCommand").f(void 0,void 0).ser(fy).de(Rx).build()){}class OO extends(Gt.classBuilder().ep(Yh).m((function(e,t,i,n){return[B(i,this.serialize,this.deserialize),cs(i,e.getEndpointParameterInstructions())]})).s("SimpleEmailService","UpdateConfigurationSetEventDestination",{}).n("SESClient","UpdateConfigurationSetEventDestinationCommand").f(void 0,void 0).ser(gy).de($x).build()){}class PO extends(Gt.classBuilder().ep(Yh).m((function(e,t,i,n){return[B(i,this.serialize,this.deserialize),cs(i,e.getEndpointParameterInstructions())]})).s("SimpleEmailService","UpdateConfigurationSetReputationMetricsEnabled",{}).n("SESClient","UpdateConfigurationSetReputationMetricsEnabledCommand").f(void 0,void 0).ser(yy).de(Mx).build()){}class _O extends(Gt.classBuilder().ep(Yh).m((function(e,t,i,n){return[B(i,this.serialize,this.deserialize),cs(i,e.getEndpointParameterInstructions())]})).s("SimpleEmailService","UpdateConfigurationSetSendingEnabled",{}).n("SESClient","UpdateConfigurationSetSendingEnabledCommand").f(void 0,void 0).ser(xy).de(Nx).build()){}class RO extends(Gt.classBuilder().ep(Yh).m((function(e,t,i,n){return[B(i,this.serialize,this.deserialize),cs(i,e.getEndpointParameterInstructions())]})).s("SimpleEmailService","UpdateConfigurationSetTrackingOptions",{}).n("SESClient","UpdateConfigurationSetTrackingOptionsCommand").f(void 0,void 0).ser(vy).de(Dx).build()){}class $O extends(Gt.classBuilder().ep(Yh).m((function(e,t,i,n){return[B(i,this.serialize,this.deserialize),cs(i,e.getEndpointParameterInstructions())]})).s("SimpleEmailService","UpdateCustomVerificationEmailTemplate",{}).n("SESClient","UpdateCustomVerificationEmailTemplateCommand").f(void 0,void 0).ser(wy).de(jx).build()){}class MO extends(Gt.classBuilder().ep(Yh).m((function(e,t,i,n){return[B(i,this.serialize,this.deserialize),cs(i,e.getEndpointParameterInstructions())]})).s("SimpleEmailService","UpdateReceiptRule",{}).n("SESClient","UpdateReceiptRuleCommand").f(void 0,void 0).ser(by).de(zx).build()){}class NO extends(Gt.classBuilder().ep(Yh).m((function(e,t,i,n){return[B(i,this.serialize,this.deserialize),cs(i,e.getEndpointParameterInstructions())]})).s("SimpleEmailService","UpdateTemplate",{}).n("SESClient","UpdateTemplateCommand").f(void 0,void 0).ser(Ey).de(Lx).build()){}class DO extends(Gt.classBuilder().ep(Yh).m((function(e,t,i,n){return[B(i,this.serialize,this.deserialize),cs(i,e.getEndpointParameterInstructions())]})).s("SimpleEmailService","VerifyDomainDkim",{}).n("SESClient","VerifyDomainDkimCommand").f(void 0,void 0).ser(Sy).de(Fx).build()){}class jO extends(Gt.classBuilder().ep(Yh).m((function(e,t,i,n){return[B(i,this.serialize,this.deserialize),cs(i,e.getEndpointParameterInstructions())]})).s("SimpleEmailService","VerifyDomainIdentity",{}).n("SESClient","VerifyDomainIdentityCommand").f(void 0,void 0).ser(Cy).de(Ux).build()){}class zO extends(Gt.classBuilder().ep(Yh).m((function(e,t,i,n){return[B(i,this.serialize,this.deserialize),cs(i,e.getEndpointParameterInstructions())]})).s("SimpleEmailService","VerifyEmailAddress",{}).n("SESClient","VerifyEmailAddressCommand").f(void 0,void 0).ser(Ay).de(Bx).build()){}class LO extends(Gt.classBuilder().ep(Yh).m((function(e,t,i,n){return[B(i,this.serialize,this.deserialize),cs(i,e.getEndpointParameterInstructions())]})).s("SimpleEmailService","VerifyEmailIdentity",{}).n("SESClient","VerifyEmailIdentityCommand").f(void 0,void 0).ser(Iy).de(Hx).build()){}const FO={CloneReceiptRuleSetCommand:Sk,CreateConfigurationSetCommand:Ck,CreateConfigurationSetEventDestinationCommand:Ak,CreateConfigurationSetTrackingOptionsCommand:Ik,CreateCustomVerificationEmailTemplateCommand:Tk,CreateReceiptFilterCommand:kk,CreateReceiptRuleCommand:Ok,CreateReceiptRuleSetCommand:Pk,CreateTemplateCommand:_k,DeleteConfigurationSetCommand:Rk,DeleteConfigurationSetEventDestinationCommand:$k,DeleteConfigurationSetTrackingOptionsCommand:Mk,DeleteCustomVerificationEmailTemplateCommand:Nk,DeleteIdentityCommand:Dk,DeleteIdentityPolicyCommand:jk,DeleteReceiptFilterCommand:zk,DeleteReceiptRuleCommand:Lk,DeleteReceiptRuleSetCommand:Fk,DeleteTemplateCommand:Uk,DeleteVerifiedEmailAddressCommand:Bk,DescribeActiveReceiptRuleSetCommand:Hk,DescribeConfigurationSetCommand:qk,DescribeReceiptRuleCommand:Vk,DescribeReceiptRuleSetCommand:Gk,GetAccountSendingEnabledCommand:Wk,GetCustomVerificationEmailTemplateCommand:Kk,GetIdentityDkimAttributesCommand:Qk,GetIdentityMailFromDomainAttributesCommand:Xk,GetIdentityNotificationAttributesCommand:Jk,GetIdentityPoliciesCommand:Yk,GetIdentityVerificationAttributesCommand:Zk,GetSendQuotaCommand:eO,GetSendStatisticsCommand:tO,GetTemplateCommand:iO,ListConfigurationSetsCommand:nO,ListCustomVerificationEmailTemplatesCommand:sO,ListIdentitiesCommand:aO,ListIdentityPoliciesCommand:oO,ListReceiptFiltersCommand:rO,ListReceiptRuleSetsCommand:cO,ListTemplatesCommand:lO,ListVerifiedEmailAddressesCommand:pO,PutConfigurationSetDeliveryOptionsCommand:dO,PutIdentityPolicyCommand:uO,ReorderReceiptRuleSetCommand:mO,SendBounceCommand:hO,SendBulkTemplatedEmailCommand:fO,SendCustomVerificationEmailCommand:gO,SendEmailCommand:yO,SendRawEmailCommand:xO,SendTemplatedEmailCommand:vO,SetActiveReceiptRuleSetCommand:wO,SetIdentityDkimEnabledCommand:bO,SetIdentityFeedbackForwardingEnabledCommand:EO,SetIdentityHeadersInNotificationsEnabledCommand:SO,SetIdentityMailFromDomainCommand:CO,SetIdentityNotificationTopicCommand:AO,SetReceiptRulePositionCommand:IO,TestRenderTemplateCommand:TO,UpdateAccountSendingEnabledCommand:kO,UpdateConfigurationSetEventDestinationCommand:OO,UpdateConfigurationSetReputationMetricsEnabledCommand:PO,UpdateConfigurationSetSendingEnabledCommand:_O,UpdateConfigurationSetTrackingOptionsCommand:RO,UpdateCustomVerificationEmailTemplateCommand:$O,UpdateReceiptRuleCommand:MO,UpdateTemplateCommand:NO,VerifyDomainDkimCommand:DO,VerifyDomainIdentityCommand:jO,VerifyEmailAddressCommand:zO,VerifyEmailIdentityCommand:LO};let UO=class extends kf{};((e,t)=>{for(const i of Object.keys(e)){const n=e[i],s=async function(e,t,i){const s=new n(e);if("function"==typeof t)this.send(s,t);else{if("function"!=typeof i)return this.send(s,t);if("object"!=typeof t)throw new Error("Expected http options but got "+typeof t);this.send(s,t||{},i)}},a=(i[0].toLowerCase()+i.slice(1)).replace(/Command$/,"");t.prototype[a]=s}})(FO,UO);const BO=Q(kf,sO,"NextToken","NextToken","MaxResults"),HO=Q(kf,aO,"NextToken","NextToken","MaxItems"),qO=async(e,t)=>{let i;try{const n=await e.send(new Zk(t));i=n;try{const e=()=>Object.values(n.VerificationAttributes).map((e=>e.VerificationStatus));let t=e().length>0;for(const i of e())t=t&&"Success"==i;if(t)return{state:fc.SUCCESS,reason:i}}catch(e){}}catch(e){i=e}return{state:fc.RETRY,reason:i}};var VO,GO,WO=Object.freeze({__proto__:null,$Command:Gt,AccountSendingPausedException:Pf,AlreadyExistsException:_f,BehaviorOnMXFailure:{RejectMessage:"RejectMessage",UseDefaultValue:"UseDefaultValue"},BounceType:{ContentRejected:"ContentRejected",DoesNotExist:"DoesNotExist",ExceededQuota:"ExceededQuota",MessageTooLarge:"MessageTooLarge",TemporaryFailure:"TemporaryFailure",Undefined:"Undefined"},BulkEmailStatus:{AccountDailyQuotaExceeded:"AccountDailyQuotaExceeded",AccountSendingPaused:"AccountSendingPaused",AccountSuspended:"AccountSuspended",AccountThrottled:"AccountThrottled",ConfigurationSetDoesNotExist:"ConfigurationSetDoesNotExist",ConfigurationSetSendingPaused:"ConfigurationSetSendingPaused",Failed:"Failed",InvalidParameterValue:"InvalidParameterValue",InvalidSendingPoolName:"InvalidSendingPoolName",MailFromDomainNotVerified:"MailFromDomainNotVerified",MessageRejected:"MessageRejected",Success:"Success",TemplateDoesNotExist:"TemplateDoesNotExist",TransientFailure:"TransientFailure"},CannotDeleteException:Rf,CloneReceiptRuleSetCommand:Sk,ConfigurationSetAlreadyExistsException:Nf,ConfigurationSetAttribute:{DELIVERY_OPTIONS:"deliveryOptions",EVENT_DESTINATIONS:"eventDestinations",REPUTATION_OPTIONS:"reputationOptions",TRACKING_OPTIONS:"trackingOptions"},ConfigurationSetDoesNotExistException:Df,ConfigurationSetSendingPausedException:jf,CreateConfigurationSetCommand:Ck,CreateConfigurationSetEventDestinationCommand:Ak,CreateConfigurationSetTrackingOptionsCommand:Ik,CreateCustomVerificationEmailTemplateCommand:Tk,CreateReceiptFilterCommand:kk,CreateReceiptRuleCommand:Ok,CreateReceiptRuleSetCommand:Pk,CreateTemplateCommand:_k,CustomMailFromStatus:{Failed:"Failed",Pending:"Pending",Success:"Success",TemporaryFailure:"TemporaryFailure"},CustomVerificationEmailInvalidContentException:Vf,CustomVerificationEmailTemplateAlreadyExistsException:Gf,CustomVerificationEmailTemplateDoesNotExistException:Zf,DeleteConfigurationSetCommand:Rk,DeleteConfigurationSetEventDestinationCommand:$k,DeleteConfigurationSetTrackingOptionsCommand:Mk,DeleteCustomVerificationEmailTemplateCommand:Nk,DeleteIdentityCommand:Dk,DeleteIdentityPolicyCommand:jk,DeleteReceiptFilterCommand:zk,DeleteReceiptRuleCommand:Lk,DeleteReceiptRuleSetCommand:Fk,DeleteTemplateCommand:Uk,DeleteVerifiedEmailAddressCommand:Bk,DescribeActiveReceiptRuleSetCommand:Hk,DescribeConfigurationSetCommand:qk,DescribeReceiptRuleCommand:Vk,DescribeReceiptRuleSetCommand:Gk,DimensionValueSource:{EMAIL_HEADER:"emailHeader",LINK_TAG:"linkTag",MESSAGE_TAG:"messageTag"},DsnAction:{DELAYED:"delayed",DELIVERED:"delivered",EXPANDED:"expanded",FAILED:"failed",RELAYED:"relayed"},EventDestinationAlreadyExistsException:Lf,EventDestinationDoesNotExistException:eg,EventType:{BOUNCE:"bounce",CLICK:"click",COMPLAINT:"complaint",DELIVERY:"delivery",OPEN:"open",REJECT:"reject",RENDERING_FAILURE:"renderingFailure",SEND:"send"},FromEmailAddressNotVerifiedException:Wf,GetAccountSendingEnabledCommand:Wk,GetCustomVerificationEmailTemplateCommand:Kk,GetIdentityDkimAttributesCommand:Qk,GetIdentityMailFromDomainAttributesCommand:Xk,GetIdentityNotificationAttributesCommand:Jk,GetIdentityPoliciesCommand:Yk,GetIdentityVerificationAttributesCommand:Zk,GetSendQuotaCommand:eO,GetSendStatisticsCommand:tO,GetTemplateCommand:iO,IdentityType:{Domain:"Domain",EmailAddress:"EmailAddress"},InvalidCloudWatchDestinationException:Ff,InvalidConfigurationSetException:zf,InvalidDeliveryOptionsException:ng,InvalidFirehoseDestinationException:Uf,InvalidLambdaFunctionException:Kf,InvalidPolicyException:sg,InvalidRenderingParameterException:ag,InvalidS3ConfigurationException:Qf,InvalidSNSDestinationException:Bf,InvalidSnsTopicException:Xf,InvalidTemplateException:Yf,InvalidTrackingOptionsException:Hf,InvocationType:{Event:"Event",RequestResponse:"RequestResponse"},LimitExceededException:$f,ListConfigurationSetsCommand:nO,ListCustomVerificationEmailTemplatesCommand:sO,ListIdentitiesCommand:aO,ListIdentityPoliciesCommand:oO,ListReceiptFiltersCommand:rO,ListReceiptRuleSetsCommand:cO,ListTemplatesCommand:lO,ListVerifiedEmailAddressesCommand:pO,MailFromDomainNotVerifiedException:og,MessageRejected:rg,MissingRenderingAttributeException:cg,NotificationType:{Bounce:"Bounce",Complaint:"Complaint",Delivery:"Delivery"},ProductionAccessNotGrantedException:lg,PutConfigurationSetDeliveryOptionsCommand:dO,PutIdentityPolicyCommand:uO,ReceiptFilterPolicy:{Allow:"Allow",Block:"Block"},ReorderReceiptRuleSetCommand:mO,RuleDoesNotExistException:Jf,RuleSetDoesNotExistException:Mf,SES:UO,SESClient:kf,SESServiceException:Of,SNSActionEncoding:{Base64:"Base64",UTF8:"UTF-8"},SendBounceCommand:hO,SendBulkTemplatedEmailCommand:fO,SendCustomVerificationEmailCommand:gO,SendEmailCommand:yO,SendRawEmailCommand:xO,SendTemplatedEmailCommand:vO,SetActiveReceiptRuleSetCommand:wO,SetIdentityDkimEnabledCommand:bO,SetIdentityFeedbackForwardingEnabledCommand:EO,SetIdentityHeadersInNotificationsEnabledCommand:SO,SetIdentityMailFromDomainCommand:CO,SetIdentityNotificationTopicCommand:AO,SetReceiptRulePositionCommand:IO,StopScope:{RULE_SET:"RuleSet"},TemplateDoesNotExistException:ig,TestRenderTemplateCommand:TO,TlsPolicy:{Optional:"Optional",Require:"Require"},TrackingOptionsAlreadyExistsException:qf,TrackingOptionsDoesNotExistException:tg,UpdateAccountSendingEnabledCommand:kO,UpdateConfigurationSetEventDestinationCommand:OO,UpdateConfigurationSetReputationMetricsEnabledCommand:PO,UpdateConfigurationSetSendingEnabledCommand:_O,UpdateConfigurationSetTrackingOptionsCommand:RO,UpdateCustomVerificationEmailTemplateCommand:$O,UpdateReceiptRuleCommand:MO,UpdateTemplateCommand:NO,VerificationStatus:{Failed:"Failed",NotStarted:"NotStarted",Pending:"Pending",Success:"Success",TemporaryFailure:"TemporaryFailure"},VerifyDomainDkimCommand:DO,VerifyDomainIdentityCommand:jO,VerifyEmailAddressCommand:zO,VerifyEmailIdentityCommand:LO,__Client:Vt,paginateListCustomVerificationEmailTemplates:BO,paginateListIdentities:HO,waitForIdentityExists:async(e,t)=>wc({minDelay:3,maxDelay:120,...e},t,qO),waitUntilIdentityExists:async(e,t)=>(e=>{if(e.state===fc.ABORTED){const t=new Error(`${JSON.stringify({...e,reason:"Request was aborted"})}`);throw t.name="AbortError",t}if(e.state===fc.TIMEOUT){const t=new Error(`${JSON.stringify({...e,reason:"Waiter has timed out"})}`);throw t.name="TimeoutError",t}if(e.state!==fc.SUCCESS)throw new Error(`${JSON.stringify(e)}`);return e})(await wc({minDelay:3,maxDelay:120,...e},t,qO))}),KO={},QO={exports:{}},XO={exports:{}};var JO,YO,ZO,eP,tP,iP,nP,sP,aP,oP,rP,cP,lP,pP,dP,uP,mP,hP,fP,gP,yP,xP,vP,wP,bP,EP,SP,CP,AP={name:"nodemailer",version:"6.9.16",description:"Easy as cake e-mail sending from your Node.js applications",main:"lib/nodemailer.js",scripts:{test:"node --test --test-concurrency=1 test/**/*.test.js test/**/*-test.js","test:coverage":"c8 node --test --test-concurrency=1 test/**/*.test.js test/**/*-test.js",lint:"eslint .",update:"rm -rf node_modules/ package-lock.json && ncu -u && npm install"},repository:{type:"git",url:"https://github.com/nodemailer/nodemailer.git"},keywords:["Nodemailer"],author:"Andris Reinman",license:"MIT-0",bugs:{url:"https://github.com/nodemailer/nodemailer/issues"},homepage:"https://nodemailer.com/",devDependencies:{"@aws-sdk/client-ses":"3.679.0",bunyan:"1.8.15",c8:"10.1.2",eslint:"8.57.0","eslint-config-nodemailer":"1.2.0","eslint-config-prettier":"9.1.0",libbase64:"1.3.0",libmime:"5.3.5",libqp:"2.1.0","nodemailer-ntlm-auth":"1.0.4",proxy:"1.0.2","proxy-test-server":"1.0.0","smtp-server":"3.13.6"},engines:{node:">=6.0.0"}};function IP(){if(JO)return XO.exports;JO=1;const e=a,t=o,n=i,s=r,p=c.PassThrough,d=function(){if(GO)return VO;GO=1;const e=i;return VO=class{constructor(e){this.options=e||{},this.cookies=[]}set(t,i){let n,s=e.parse(i||""),a=this.parse(t);return a.domain?(n=a.domain.replace(/^\./,""),(s.hostname.length<n.length||("."+s.hostname).substr(1-n.length)!=="."+n)&&(a.domain=s.hostname)):a.domain=s.hostname,a.path||(a.path=this.getPath(s.pathname)),a.expires||(a.expires=new Date(Date.now()+1e3*(Number(this.options.sessionTimeout||1800)||1800))),this.add(a)}get(e){return this.list(e).map((e=>e.name+"="+e.value)).join("; ")}list(e){let t,i,n=[];for(t=this.cookies.length-1;t>=0;t--)i=this.cookies[t],this.isExpired(i)?this.cookies.splice(t,t):this.match(i,e)&&n.unshift(i);return n}parse(e){let t={};return(e||"").toString().split(";").forEach((e=>{let i,n=e.split("="),s=n.shift().trim().toLowerCase(),a=n.join("=").trim();if(s)switch(s){case"expires":a=new Date(a),"Invalid Date"!==a.toString()&&(t.expires=a);break;case"path":t.path=a;break;case"domain":i=a.toLowerCase(),i.length&&"."!==i.charAt(0)&&(i="."+i),t.domain=i;break;case"max-age":t.expires=new Date(Date.now()+1e3*(Number(a)||0));break;case"secure":t.secure=!0;break;case"httponly":t.httponly=!0;break;default:t.name||(t.name=s,t.value=a)}})),t}match(t,i){let n=e.parse(i||"");return(n.hostname===t.domain||"."===t.domain.charAt(0)&&("."+n.hostname).substr(-t.domain.length)===t.domain)&&this.getPath(n.pathname).substr(0,t.path.length)===t.path&&(!t.secure||"https:"===n.protocol)}add(e){let t,i;if(!e||!e.name)return!1;for(t=0,i=this.cookies.length;t<i;t++)if(this.compare(this.cookies[t],e))return this.isExpired(e)?(this.cookies.splice(t,1),!1):(this.cookies[t]=e,!0);return this.isExpired(e)||this.cookies.push(e),!0}compare(e,t){return e.name===t.name&&e.path===t.path&&e.domain===t.domain&&e.secure===t.secure&&e.httponly==e.httponly}isExpired(e){return e.expires&&e.expires<new Date||!e.value}getPath(e){let t=(e||"/").split("/");return t.pop(),t=t.join("/").trim(),"/"!==t.charAt(0)&&(t="/"+t),"/"!==t.substr(-1)&&(t+="/"),t}},VO}(),u=AP,m=l;function h(i,a){(a=a||{}).fetchRes=a.fetchRes||new p,a.cookies=a.cookies||new d,a.redirects=a.redirects||0,a.maxRedirects=isNaN(a.maxRedirects)?5:a.maxRedirects,a.cookie&&([].concat(a.cookie||[]).forEach((e=>{a.cookies.set(e,i)})),a.cookie=!1);let o,r,c,l=a.fetchRes,f=n.parse(i),g=(a.method||"").toString().trim().toUpperCase()||"GET",y=!1,x="https:"===f.protocol?t:e,v={"accept-encoding":"gzip,deflate","user-agent":"nodemailer/"+u.version};if(Object.keys(a.headers||{}).forEach((e=>{v[e.toLowerCase().trim()]=a.headers[e]})),a.userAgent&&(v["user-agent"]=a.userAgent),f.auth&&(v.Authorization="Basic "+Buffer.from(f.auth).toString("base64")),(o=a.cookies.get(i))&&(v.cookie=o),a.body){if(!1!==a.contentType&&(v["Content-Type"]=a.contentType||"application/x-www-form-urlencoded"),"function"==typeof a.body.pipe)v["Transfer-Encoding"]="chunked",r=a.body,r.on("error",(e=>{y||(y=!0,e.type="FETCH",e.sourceUrl=i,l.emit("error",e))}));else{if(a.body instanceof Buffer)r=a.body;else if("object"==typeof a.body)try{r=Buffer.from(Object.keys(a.body).map((e=>{let t=a.body[e].toString().trim();return encodeURIComponent(e)+"="+encodeURIComponent(t)})).join("&"))}catch(e){if(y)return;return y=!0,e.type="FETCH",e.sourceUrl=i,void l.emit("error",e)}else r=Buffer.from(a.body.toString().trim());v["Content-Type"]=a.contentType||"application/x-www-form-urlencoded",v["Content-Length"]=r.length}g=(a.method||"").toString().trim().toUpperCase()||"POST"}let w={method:g,host:f.hostname,path:f.path,port:f.port?f.port:"https:"===f.protocol?443:80,headers:v,rejectUnauthorized:!1,agent:!1};a.tls&&Object.keys(a.tls).forEach((e=>{w[e]=a.tls[e]})),"https:"!==f.protocol||!f.hostname||f.hostname===w.host||m.isIP(f.hostname)||w.servername||(w.servername=f.hostname);try{c=x.request(w)}catch(e){return y=!0,setImmediate((()=>{e.type="FETCH",e.sourceUrl=i,l.emit("error",e)})),l}return a.timeout&&c.setTimeout(a.timeout,(()=>{if(y)return;y=!0,c.abort();let e=new Error("Request Timeout");e.type="FETCH",e.sourceUrl=i,l.emit("error",e)})),c.on("error",(e=>{y||(y=!0,e.type="FETCH",e.sourceUrl=i,l.emit("error",e))})),c.on("response",(e=>{let t;if(!y){switch(e.headers["content-encoding"]){case"gzip":case"deflate":t=s.createUnzip()}if(e.headers["set-cookie"]&&[].concat(e.headers["set-cookie"]||[]).forEach((e=>{a.cookies.set(e,i)})),[301,302,303,307,308].includes(e.statusCode)&&e.headers.location){if(a.redirects++,a.redirects>a.maxRedirects){y=!0;let e=new Error("Maximum redirect count exceeded");return e.type="FETCH",e.sourceUrl=i,l.emit("error",e),void c.abort()}return a.method="GET",a.body=!1,h(n.resolve(i,e.headers.location),a)}if(l.statusCode=e.statusCode,l.headers=e.headers,e.statusCode>=300&&!a.allowErrorResponse){y=!0;let t=new Error("Invalid status code "+e.statusCode);return t.type="FETCH",t.sourceUrl=i,l.emit("error",t),void c.abort()}e.on("error",(e=>{y||(y=!0,e.type="FETCH",e.sourceUrl=i,l.emit("error",e),c.abort())})),t?(e.pipe(t).pipe(l),t.on("error",(e=>{y||(y=!0,e.type="FETCH",e.sourceUrl=i,l.emit("error",e),c.abort())}))):e.pipe(l)}})),setImmediate((()=>{if(r)try{if("function"==typeof r.pipe)return r.pipe(c);c.write(r)}catch(e){return y=!0,e.type="FETCH",e.sourceUrl=i,void l.emit("error",e)}c.end()})),l}return XO.exports=function(e,t){return h(e,t)},XO.exports.Cookies=d,XO.exports}function TP(){return YO||(YO=1,function(e){const t=i,a=n,o=s,r=IP(),c=p,u=l,m=d,h=3e5;let f;try{f=m.networkInterfaces()}catch(e){}e.exports.networkInterfaces=f;const g=(t,i)=>{let n=e.exports.networkInterfaces;if(!n)return!0;const s=Object.keys(n).map((e=>n[e])).reduce(((e,t)=>e.concat(t)),[]).filter((e=>!e.internal||i)).filter((e=>e.family==="IPv"+t||e.family===t)).length>0;return s},y=(e,t,i,n)=>{if(!g(e,(i=i||{}).allowInternalNetworkInterfaces))return n(null,[]);(c.Resolver?new c.Resolver(i):c)["resolve"+e](t,((e,t)=>{if(e){switch(e.code){case c.NODATA:case c.NOTFOUND:case c.NOTIMP:case c.SERVFAIL:case c.CONNREFUSED:case c.REFUSED:case"EAI_AGAIN":return n(null,[])}return n(e)}return n(null,Array.isArray(t)?t:[].concat(t||[]))}))},x=e.exports.dnsCache=new Map,v=(e,t)=>e?Object.assign({servername:e.servername,host:e.addresses&&e.addresses.length?1===e.addresses.length?e.addresses[0]:e.addresses[Math.floor(Math.random()*e.addresses.length)]:null},t||{}):Object.assign({},t||{});function w(e,t){let i=!1,n=[],s=0;e.on("error",(e=>{i||(i=!0,t(e))})),e.on("readable",(()=>{let t;for(;null!==(t=e.read());)n.push(t),s+=t.length})),e.on("end",(()=>{if(i)return;let e;i=!0;try{e=Buffer.concat(n,s)}catch(e){return t(e)}t(null,e)}))}e.exports.resolveHostname=(e,t)=>{if(!(e=e||{}).host&&e.servername&&(e.host=e.servername),!e.host||u.isIP(e.host)){let i={addresses:[e.host],servername:e.servername||!1};return t(null,v(i,{cached:!1}))}let i;if(x.has(e.host)&&(i=x.get(e.host),!i.expires||i.expires>=Date.now()))return t(null,v(i.value,{cached:!0}));y(4,e.host,e,((n,s)=>{if(n)return i?t(null,v(i.value,{cached:!0,error:n})):t(n);if(s&&s.length){let i={addresses:s,servername:e.servername||e.host};return x.set(e.host,{value:i,expires:Date.now()+(e.dnsTtl||h)}),t(null,v(i,{cached:!1}))}y(6,e.host,e,((n,s)=>{if(n)return i?t(null,v(i.value,{cached:!0,error:n})):t(n);if(s&&s.length){let i={addresses:s,servername:e.servername||e.host};return x.set(e.host,{value:i,expires:Date.now()+(e.dnsTtl||h)}),t(null,v(i,{cached:!1}))}try{c.lookup(e.host,{all:!0},((n,s)=>{if(n)return i?t(null,v(i.value,{cached:!0,error:n})):t(n);let a=!!s&&s.filter((e=>g(e.family))).map((e=>e.address)).shift();if(s&&s.length&&!a&&console.warn(`Failed to resolve IPv${s[0].family} addresses with current network`),!a&&i)return t(null,v(i.value,{cached:!0}));let o={addresses:a?[a]:[e.host],servername:e.servername||e.host};return x.set(e.host,{value:o,expires:Date.now()+(e.dnsTtl||h)}),t(null,v(o,{cached:!1}))}))}catch(n){return i?t(null,v(i.value,{cached:!0,error:n})):t(n)}}))}))},e.exports.parseConnectionUrl=e=>{e=e||"";let i={};return[t.parse(e,!0)].forEach((e=>{let t;switch(e.protocol){case"smtp:":i.secure=!1;break;case"smtps:":i.secure=!0;break;case"direct:":i.direct=!0}!isNaN(e.port)&&Number(e.port)&&(i.port=Number(e.port)),e.hostname&&(i.host=e.hostname),e.auth&&(t=e.auth.split(":"),i.auth||(i.auth={}),i.auth.user=t.shift(),i.auth.pass=t.join(":")),Object.keys(e.query||{}).forEach((t=>{let n=i,s=t,a=e.query[t];switch(isNaN(a)||(a=Number(a)),a){case"true":a=!0;break;case"false":a=!1}if(0===t.indexOf("tls."))s=t.substr(4),i.tls||(i.tls={}),n=i.tls;else if(t.indexOf(".")>=0)return;s in n||(n[s]=a)}))})),i},e.exports._logFunc=(e,t,i,n,s,...a)=>{let o={};Object.keys(i||{}).forEach((e=>{"level"!==e&&(o[e]=i[e])})),Object.keys(n||{}).forEach((e=>{"level"!==e&&(o[e]=n[e])})),e[t](o,s,...a)},e.exports.getLogger=(t,i)=>{let n={},s=["trace","debug","info","warn","error","fatal"];if(!(t=t||{}).logger)return s.forEach((e=>{n[e]=()=>!1})),n;let o=t.logger;return!0===t.logger&&(o=function(e){let t=0,i=new Map;e.forEach((e=>{e.length>t&&(t=e.length)})),e.forEach((e=>{let n=e.toUpperCase();n.length<t&&(n+=" ".repeat(t-n.length)),i.set(e,n)}));let n=(e,t,n,...s)=>{let o="";t&&("server"===t.tnx?o="S: ":"client"===t.tnx&&(o="C: "),t.sid&&(o="["+t.sid+"] "+o),t.cid&&(o="[#"+t.cid+"] "+o)),(n=a.format(n,...s)).split(/\r?\n/).forEach((t=>{console.log("[%s] %s %s",(new Date).toISOString().substr(0,19).replace(/T/," "),i.get(e),o+t)}))},s={};return e.forEach((e=>{s[e]=n.bind(null,e)})),s}(s)),s.forEach((t=>{n[t]=(n,s,...a)=>{e.exports._logFunc(o,t,i,n,s,...a)}})),n},e.exports.callbackPromise=(e,t)=>function(){let i=Array.from(arguments),n=i.shift();n?t(n):e(...i)},e.exports.parseDataURI=e=>{let t=e,i=t.indexOf(",");if(!i)return e;let n,s=t.substring(i+1),a=t.substring(5,i).split(";"),o=a.length>1&&a[a.length-1];o&&o.indexOf("=")<0&&(n=o.toLowerCase(),a.pop());let r=a.shift()||"application/octet-stream",c={};for(let e of a){let t=e.indexOf("=");if(t>=0){let i=e.substring(0,t),n=e.substring(t+1);c[i]=n}}switch(n){case"base64":s=Buffer.from(s,"base64");break;case"utf8":s=Buffer.from(s);break;default:try{s=Buffer.from(decodeURIComponent(s))}catch(e){s=Buffer.from(s)}s=Buffer.from(s)}return{data:s,encoding:n,contentType:r,params:c}},e.exports.resolveContent=(t,i,n)=>{let s;n||(s=new Promise(((t,i)=>{n=e.exports.callbackPromise(t,i)})));let a,c=t&&t[i]&&t[i].content||t[i],l=("object"==typeof t[i]&&t[i].encoding||"utf8").toString().toLowerCase().replace(/[-_\s]/g,"");if(!c)return n(null,c);if("object"==typeof c){if("function"==typeof c.pipe)return w(c,((e,s)=>{if(e)return n(e);t[i].content?t[i].content=s:t[i]=s,n(null,s)}));if(/^https?:\/\//i.test(c.path||c.href))return a=r(c.path||c.href),w(a,n);if(/^data:/i.test(c.path||c.href)){let t=e.exports.parseDataURI(c.path||c.href);return t&&t.data?n(null,t.data):n(null,Buffer.from(0))}if(c.path)return w(o.createReadStream(c.path),n)}return"string"!=typeof t[i].content||["utf8","usascii","ascii"].includes(l)||(c=Buffer.from(t[i].content,l)),setImmediate((()=>n(null,c))),s},e.exports.assign=function(){let e=Array.from(arguments),t=e.shift()||{};return e.forEach((e=>{Object.keys(e||{}).forEach((i=>{["tls","auth"].includes(i)&&e[i]&&"object"==typeof e[i]?(t[i]||(t[i]={}),Object.keys(e[i]).forEach((n=>{t[i][n]=e[i][n]}))):t[i]=e[i]}))})),t},e.exports.encodeXText=e=>{if(!/[^\x21-\x2A\x2C-\x3C\x3E-\x7E]/.test(e))return e;let t=Buffer.from(e),i="";for(let e=0,n=t.length;e<n;e++){let n=t[e];i+=n<33||n>126||43===n||61===n?"+"+(n<16?"0":"")+n.toString(16).toUpperCase():String.fromCharCode(n)}return i}}(QO)),QO.exports}function kP(){if(eP)return ZO;eP=1;const e=u,t="application/octet-stream",i=new Map([["application/acad","dwg"],["application/applixware","aw"],["application/arj","arj"],["application/atom+xml","xml"],["application/atomcat+xml","atomcat"],["application/atomsvc+xml","atomsvc"],["application/base64",["mm","mme"]],["application/binhex","hqx"],["application/binhex4","hqx"],["application/book",["book","boo"]],["application/ccxml+xml,","ccxml"],["application/cdf","cdf"],["application/cdmi-capability","cdmia"],["application/cdmi-container","cdmic"],["application/cdmi-domain","cdmid"],["application/cdmi-object","cdmio"],["application/cdmi-queue","cdmiq"],["application/clariscad","ccad"],["application/commonground","dp"],["application/cu-seeme","cu"],["application/davmount+xml","davmount"],["application/drafting","drw"],["application/dsptype","tsp"],["application/dssc+der","dssc"],["application/dssc+xml","xdssc"],["application/dxf","dxf"],["application/ecmascript",["js","es"]],["application/emma+xml","emma"],["application/envoy","evy"],["application/epub+zip","epub"],["application/excel",["xls","xl","xla","xlb","xlc","xld","xlk","xll","xlm","xlt","xlv","xlw"]],["application/exi","exi"],["application/font-tdpfr","pfr"],["application/fractals","fif"],["application/freeloader","frl"],["application/futuresplash","spl"],["application/geo+json","geojson"],["application/gnutar","tgz"],["application/groupwise","vew"],["application/hlp","hlp"],["application/hta","hta"],["application/hyperstudio","stk"],["application/i-deas","unv"],["application/iges",["iges","igs"]],["application/inf","inf"],["application/internet-property-stream","acx"],["application/ipfix","ipfix"],["application/java","class"],["application/java-archive","jar"],["application/java-byte-code","class"],["application/java-serialized-object","ser"],["application/java-vm","class"],["application/javascript","js"],["application/json","json"],["application/lha","lha"],["application/lzx","lzx"],["application/mac-binary","bin"],["application/mac-binhex","hqx"],["application/mac-binhex40","hqx"],["application/mac-compactpro","cpt"],["application/macbinary","bin"],["application/mads+xml","mads"],["application/marc","mrc"],["application/marcxml+xml","mrcx"],["application/mathematica","ma"],["application/mathml+xml","mathml"],["application/mbedlet","mbd"],["application/mbox","mbox"],["application/mcad","mcd"],["application/mediaservercontrol+xml","mscml"],["application/metalink4+xml","meta4"],["application/mets+xml","mets"],["application/mime","aps"],["application/mods+xml","mods"],["application/mp21","m21"],["application/mp4","mp4"],["application/mspowerpoint",["ppt","pot","pps","ppz"]],["application/msword",["doc","dot","w6w","wiz","word"]],["application/mswrite","wri"],["application/mxf","mxf"],["application/netmc","mcp"],["application/octet-stream",["*"]],["application/oda","oda"],["application/oebps-package+xml","opf"],["application/ogg","ogx"],["application/olescript","axs"],["application/onenote","onetoc"],["application/patch-ops-error+xml","xer"],["application/pdf","pdf"],["application/pgp-encrypted","asc"],["application/pgp-signature","pgp"],["application/pics-rules","prf"],["application/pkcs-12","p12"],["application/pkcs-crl","crl"],["application/pkcs10","p10"],["application/pkcs7-mime",["p7c","p7m"]],["application/pkcs7-signature","p7s"],["application/pkcs8","p8"],["application/pkix-attr-cert","ac"],["application/pkix-cert",["cer","crt"]],["application/pkix-crl","crl"],["application/pkix-pkipath","pkipath"],["application/pkixcmp","pki"],["application/plain","text"],["application/pls+xml","pls"],["application/postscript",["ps","ai","eps"]],["application/powerpoint","ppt"],["application/pro_eng",["part","prt"]],["application/prs.cww","cww"],["application/pskc+xml","pskcxml"],["application/rdf+xml","rdf"],["application/reginfo+xml","rif"],["application/relax-ng-compact-syntax","rnc"],["application/resource-lists+xml","rl"],["application/resource-lists-diff+xml","rld"],["application/ringing-tones","rng"],["application/rls-services+xml","rs"],["application/rsd+xml","rsd"],["application/rss+xml","xml"],["application/rtf",["rtf","rtx"]],["application/sbml+xml","sbml"],["application/scvp-cv-request","scq"],["application/scvp-cv-response","scs"],["application/scvp-vp-request","spq"],["application/scvp-vp-response","spp"],["application/sdp","sdp"],["application/sea","sea"],["application/set","set"],["application/set-payment-initiation","setpay"],["application/set-registration-initiation","setreg"],["application/shf+xml","shf"],["application/sla","stl"],["application/smil",["smi","smil"]],["application/smil+xml","smi"],["application/solids","sol"],["application/sounder","sdr"],["application/sparql-query","rq"],["application/sparql-results+xml","srx"],["application/srgs","gram"],["application/srgs+xml","grxml"],["application/sru+xml","sru"],["application/ssml+xml","ssml"],["application/step",["step","stp"]],["application/streamingmedia","ssm"],["application/tei+xml","tei"],["application/thraud+xml","tfi"],["application/timestamped-data","tsd"],["application/toolbook","tbk"],["application/vda","vda"],["application/vnd.3gpp.pic-bw-large","plb"],["application/vnd.3gpp.pic-bw-small","psb"],["application/vnd.3gpp.pic-bw-var","pvb"],["application/vnd.3gpp2.tcap","tcap"],["application/vnd.3m.post-it-notes","pwn"],["application/vnd.accpac.simply.aso","aso"],["application/vnd.accpac.simply.imp","imp"],["application/vnd.acucobol","acu"],["application/vnd.acucorp","atc"],["application/vnd.adobe.air-application-installer-package+zip","air"],["application/vnd.adobe.fxp","fxp"],["application/vnd.adobe.xdp+xml","xdp"],["application/vnd.adobe.xfdf","xfdf"],["application/vnd.ahead.space","ahead"],["application/vnd.airzip.filesecure.azf","azf"],["application/vnd.airzip.filesecure.azs","azs"],["application/vnd.amazon.ebook","azw"],["application/vnd.americandynamics.acc","acc"],["application/vnd.amiga.ami","ami"],["application/vnd.android.package-archive","apk"],["application/vnd.anser-web-certificate-issue-initiation","cii"],["application/vnd.anser-web-funds-transfer-initiation","fti"],["application/vnd.antix.game-component","atx"],["application/vnd.apple.installer+xml","mpkg"],["application/vnd.apple.mpegurl","m3u8"],["application/vnd.aristanetworks.swi","swi"],["application/vnd.audiograph","aep"],["application/vnd.blueice.multipass","mpm"],["application/vnd.bmi","bmi"],["application/vnd.businessobjects","rep"],["application/vnd.chemdraw+xml","cdxml"],["application/vnd.chipnuts.karaoke-mmd","mmd"],["application/vnd.cinderella","cdy"],["application/vnd.claymore","cla"],["application/vnd.cloanto.rp9","rp9"],["application/vnd.clonk.c4group","c4g"],["application/vnd.cluetrust.cartomobile-config","c11amc"],["application/vnd.cluetrust.cartomobile-config-pkg","c11amz"],["application/vnd.commonspace","csp"],["application/vnd.contact.cmsg","cdbcmsg"],["application/vnd.cosmocaller","cmc"],["application/vnd.crick.clicker","clkx"],["application/vnd.crick.clicker.keyboard","clkk"],["application/vnd.crick.clicker.palette","clkp"],["application/vnd.crick.clicker.template","clkt"],["application/vnd.crick.clicker.wordbank","clkw"],["application/vnd.criticaltools.wbs+xml","wbs"],["application/vnd.ctc-posml","pml"],["application/vnd.cups-ppd","ppd"],["application/vnd.curl.car","car"],["application/vnd.curl.pcurl","pcurl"],["application/vnd.data-vision.rdz","rdz"],["application/vnd.denovo.fcselayout-link","fe_launch"],["application/vnd.dna","dna"],["application/vnd.dolby.mlp","mlp"],["application/vnd.dpgraph","dpg"],["application/vnd.dreamfactory","dfac"],["application/vnd.dvb.ait","ait"],["application/vnd.dvb.service","svc"],["application/vnd.dynageo","geo"],["application/vnd.ecowin.chart","mag"],["application/vnd.enliven","nml"],["application/vnd.epson.esf","esf"],["application/vnd.epson.msf","msf"],["application/vnd.epson.quickanime","qam"],["application/vnd.epson.salt","slt"],["application/vnd.epson.ssf","ssf"],["application/vnd.eszigno3+xml","es3"],["application/vnd.ezpix-album","ez2"],["application/vnd.ezpix-package","ez3"],["application/vnd.fdf","fdf"],["application/vnd.fdsn.seed","seed"],["application/vnd.flographit","gph"],["application/vnd.fluxtime.clip","ftc"],["application/vnd.framemaker","fm"],["application/vnd.frogans.fnc","fnc"],["application/vnd.frogans.ltf","ltf"],["application/vnd.fsc.weblaunch","fsc"],["application/vnd.fujitsu.oasys","oas"],["application/vnd.fujitsu.oasys2","oa2"],["application/vnd.fujitsu.oasys3","oa3"],["application/vnd.fujitsu.oasysgp","fg5"],["application/vnd.fujitsu.oasysprs","bh2"],["application/vnd.fujixerox.ddd","ddd"],["application/vnd.fujixerox.docuworks","xdw"],["application/vnd.fujixerox.docuworks.binder","xbd"],["application/vnd.fuzzysheet","fzs"],["application/vnd.genomatix.tuxedo","txd"],["application/vnd.geogebra.file","ggb"],["application/vnd.geogebra.tool","ggt"],["application/vnd.geometry-explorer","gex"],["application/vnd.geonext","gxt"],["application/vnd.geoplan","g2w"],["application/vnd.geospace","g3w"],["application/vnd.gmx","gmx"],["application/vnd.google-earth.kml+xml","kml"],["application/vnd.google-earth.kmz","kmz"],["application/vnd.grafeq","gqf"],["application/vnd.groove-account","gac"],["application/vnd.groove-help","ghf"],["application/vnd.groove-identity-message","gim"],["application/vnd.groove-injector","grv"],["application/vnd.groove-tool-message","gtm"],["application/vnd.groove-tool-template","tpl"],["application/vnd.groove-vcard","vcg"],["application/vnd.hal+xml","hal"],["application/vnd.handheld-entertainment+xml","zmm"],["application/vnd.hbci","hbci"],["application/vnd.hhe.lesson-player","les"],["application/vnd.hp-hpgl",["hgl","hpg","hpgl"]],["application/vnd.hp-hpid","hpid"],["application/vnd.hp-hps","hps"],["application/vnd.hp-jlyt","jlt"],["application/vnd.hp-pcl","pcl"],["application/vnd.hp-pclxl","pclxl"],["application/vnd.hydrostatix.sof-data","sfd-hdstx"],["application/vnd.hzn-3d-crossword","x3d"],["application/vnd.ibm.minipay","mpy"],["application/vnd.ibm.modcap","afp"],["application/vnd.ibm.rights-management","irm"],["application/vnd.ibm.secure-container","sc"],["application/vnd.iccprofile","icc"],["application/vnd.igloader","igl"],["application/vnd.immervision-ivp","ivp"],["application/vnd.immervision-ivu","ivu"],["application/vnd.insors.igm","igm"],["application/vnd.intercon.formnet","xpw"],["application/vnd.intergeo","i2g"],["application/vnd.intu.qbo","qbo"],["application/vnd.intu.qfx","qfx"],["application/vnd.ipunplugged.rcprofile","rcprofile"],["application/vnd.irepository.package+xml","irp"],["application/vnd.is-xpr","xpr"],["application/vnd.isac.fcs","fcs"],["application/vnd.jam","jam"],["application/vnd.jcp.javame.midlet-rms","rms"],["application/vnd.jisp","jisp"],["application/vnd.joost.joda-archive","joda"],["application/vnd.kahootz","ktz"],["application/vnd.kde.karbon","karbon"],["application/vnd.kde.kchart","chrt"],["application/vnd.kde.kformula","kfo"],["application/vnd.kde.kivio","flw"],["application/vnd.kde.kontour","kon"],["application/vnd.kde.kpresenter","kpr"],["application/vnd.kde.kspread","ksp"],["application/vnd.kde.kword","kwd"],["application/vnd.kenameaapp","htke"],["application/vnd.kidspiration","kia"],["application/vnd.kinar","kne"],["application/vnd.koan","skp"],["application/vnd.kodak-descriptor","sse"],["application/vnd.las.las+xml","lasxml"],["application/vnd.llamagraphics.life-balance.desktop","lbd"],["application/vnd.llamagraphics.life-balance.exchange+xml","lbe"],["application/vnd.lotus-1-2-3","123"],["application/vnd.lotus-approach","apr"],["application/vnd.lotus-freelance","pre"],["application/vnd.lotus-notes","nsf"],["application/vnd.lotus-organizer","org"],["application/vnd.lotus-screencam","scm"],["application/vnd.lotus-wordpro","lwp"],["application/vnd.macports.portpkg","portpkg"],["application/vnd.mcd","mcd"],["application/vnd.medcalcdata","mc1"],["application/vnd.mediastation.cdkey","cdkey"],["application/vnd.mfer","mwf"],["application/vnd.mfmp","mfm"],["application/vnd.micrografx.flo","flo"],["application/vnd.micrografx.igx","igx"],["application/vnd.mif","mif"],["application/vnd.mobius.daf","daf"],["application/vnd.mobius.dis","dis"],["application/vnd.mobius.mbk","mbk"],["application/vnd.mobius.mqy","mqy"],["application/vnd.mobius.msl","msl"],["application/vnd.mobius.plc","plc"],["application/vnd.mobius.txf","txf"],["application/vnd.mophun.application","mpn"],["application/vnd.mophun.certificate","mpc"],["application/vnd.mozilla.xul+xml","xul"],["application/vnd.ms-artgalry","cil"],["application/vnd.ms-cab-compressed","cab"],["application/vnd.ms-excel",["xls","xla","xlc","xlm","xlt","xlw","xlb","xll"]],["application/vnd.ms-excel.addin.macroenabled.12","xlam"],["application/vnd.ms-excel.sheet.binary.macroenabled.12","xlsb"],["application/vnd.ms-excel.sheet.macroenabled.12","xlsm"],["application/vnd.ms-excel.template.macroenabled.12","xltm"],["application/vnd.ms-fontobject","eot"],["application/vnd.ms-htmlhelp","chm"],["application/vnd.ms-ims","ims"],["application/vnd.ms-lrm","lrm"],["application/vnd.ms-officetheme","thmx"],["application/vnd.ms-outlook","msg"],["application/vnd.ms-pki.certstore","sst"],["application/vnd.ms-pki.pko","pko"],["application/vnd.ms-pki.seccat","cat"],["application/vnd.ms-pki.stl","stl"],["application/vnd.ms-pkicertstore","sst"],["application/vnd.ms-pkiseccat","cat"],["application/vnd.ms-pkistl","stl"],["application/vnd.ms-powerpoint",["ppt","pot","pps","ppa","pwz"]],["application/vnd.ms-powerpoint.addin.macroenabled.12","ppam"],["application/vnd.ms-powerpoint.presentation.macroenabled.12","pptm"],["application/vnd.ms-powerpoint.slide.macroenabled.12","sldm"],["application/vnd.ms-powerpoint.slideshow.macroenabled.12","ppsm"],["application/vnd.ms-powerpoint.template.macroenabled.12","potm"],["application/vnd.ms-project","mpp"],["application/vnd.ms-word.document.macroenabled.12","docm"],["application/vnd.ms-word.template.macroenabled.12","dotm"],["application/vnd.ms-works",["wks","wcm","wdb","wps"]],["application/vnd.ms-wpl","wpl"],["application/vnd.ms-xpsdocument","xps"],["application/vnd.mseq","mseq"],["application/vnd.musician","mus"],["application/vnd.muvee.style","msty"],["application/vnd.neurolanguage.nlu","nlu"],["application/vnd.noblenet-directory","nnd"],["application/vnd.noblenet-sealer","nns"],["application/vnd.noblenet-web","nnw"],["application/vnd.nokia.configuration-message","ncm"],["application/vnd.nokia.n-gage.data","ngdat"],["application/vnd.nokia.n-gage.symbian.install","n-gage"],["application/vnd.nokia.radio-preset","rpst"],["application/vnd.nokia.radio-presets","rpss"],["application/vnd.nokia.ringing-tone","rng"],["application/vnd.novadigm.edm","edm"],["application/vnd.novadigm.edx","edx"],["application/vnd.novadigm.ext","ext"],["application/vnd.oasis.opendocument.chart","odc"],["application/vnd.oasis.opendocument.chart-template","otc"],["application/vnd.oasis.opendocument.database","odb"],["application/vnd.oasis.opendocument.formula","odf"],["application/vnd.oasis.opendocument.formula-template","odft"],["application/vnd.oasis.opendocument.graphics","odg"],["application/vnd.oasis.opendocument.graphics-template","otg"],["application/vnd.oasis.opendocument.image","odi"],["application/vnd.oasis.opendocument.image-template","oti"],["application/vnd.oasis.opendocument.presentation","odp"],["application/vnd.oasis.opendocument.presentation-template","otp"],["application/vnd.oasis.opendocument.spreadsheet","ods"],["application/vnd.oasis.opendocument.spreadsheet-template","ots"],["application/vnd.oasis.opendocument.text","odt"],["application/vnd.oasis.opendocument.text-master","odm"],["application/vnd.oasis.opendocument.text-template","ott"],["application/vnd.oasis.opendocument.text-web","oth"],["application/vnd.olpc-sugar","xo"],["application/vnd.oma.dd2+xml","dd2"],["application/vnd.openofficeorg.extension","oxt"],["application/vnd.openxmlformats-officedocument.presentationml.presentation","pptx"],["application/vnd.openxmlformats-officedocument.presentationml.slide","sldx"],["application/vnd.openxmlformats-officedocument.presentationml.slideshow","ppsx"],["application/vnd.openxmlformats-officedocument.presentationml.template","potx"],["application/vnd.openxmlformats-officedocument.spreadsheetml.sheet","xlsx"],["application/vnd.openxmlformats-officedocument.spreadsheetml.template","xltx"],["application/vnd.openxmlformats-officedocument.wordprocessingml.document","docx"],["application/vnd.openxmlformats-officedocument.wordprocessingml.template","dotx"],["application/vnd.osgeo.mapguide.package","mgp"],["application/vnd.osgi.dp","dp"],["application/vnd.palm","pdb"],["application/vnd.pawaafile","paw"],["application/vnd.pg.format","str"],["application/vnd.pg.osasli","ei6"],["application/vnd.picsel","efif"],["application/vnd.pmi.widget","wg"],["application/vnd.pocketlearn","plf"],["application/vnd.powerbuilder6","pbd"],["application/vnd.previewsystems.box","box"],["application/vnd.proteus.magazine","mgz"],["application/vnd.publishare-delta-tree","qps"],["application/vnd.pvi.ptid1","ptid"],["application/vnd.quark.quarkxpress","qxd"],["application/vnd.realvnc.bed","bed"],["application/vnd.recordare.musicxml","mxl"],["application/vnd.recordare.musicxml+xml","musicxml"],["application/vnd.rig.cryptonote","cryptonote"],["application/vnd.rim.cod","cod"],["application/vnd.rn-realmedia","rm"],["application/vnd.rn-realplayer","rnx"],["application/vnd.route66.link66+xml","link66"],["application/vnd.sailingtracker.track","st"],["application/vnd.seemail","see"],["application/vnd.sema","sema"],["application/vnd.semd","semd"],["application/vnd.semf","semf"],["application/vnd.shana.informed.formdata","ifm"],["application/vnd.shana.informed.formtemplate","itp"],["application/vnd.shana.informed.interchange","iif"],["application/vnd.shana.informed.package","ipk"],["application/vnd.simtech-mindmapper","twd"],["application/vnd.smaf","mmf"],["application/vnd.smart.teacher","teacher"],["application/vnd.solent.sdkm+xml","sdkm"],["application/vnd.spotfire.dxp","dxp"],["application/vnd.spotfire.sfs","sfs"],["application/vnd.stardivision.calc","sdc"],["application/vnd.stardivision.draw","sda"],["application/vnd.stardivision.impress","sdd"],["application/vnd.stardivision.math","smf"],["application/vnd.stardivision.writer","sdw"],["application/vnd.stardivision.writer-global","sgl"],["application/vnd.stepmania.stepchart","sm"],["application/vnd.sun.xml.calc","sxc"],["application/vnd.sun.xml.calc.template","stc"],["application/vnd.sun.xml.draw","sxd"],["application/vnd.sun.xml.draw.template","std"],["application/vnd.sun.xml.impress","sxi"],["application/vnd.sun.xml.impress.template","sti"],["application/vnd.sun.xml.math","sxm"],["application/vnd.sun.xml.writer","sxw"],["application/vnd.sun.xml.writer.global","sxg"],["application/vnd.sun.xml.writer.template","stw"],["application/vnd.sus-calendar","sus"],["application/vnd.svd","svd"],["application/vnd.symbian.install","sis"],["application/vnd.syncml+xml","xsm"],["application/vnd.syncml.dm+wbxml","bdm"],["application/vnd.syncml.dm+xml","xdm"],["application/vnd.tao.intent-module-archive","tao"],["application/vnd.tmobile-livetv","tmo"],["application/vnd.trid.tpt","tpt"],["application/vnd.triscape.mxs","mxs"],["application/vnd.trueapp","tra"],["application/vnd.ufdl","ufd"],["application/vnd.uiq.theme","utz"],["application/vnd.umajin","umj"],["application/vnd.unity","unityweb"],["application/vnd.uoml+xml","uoml"],["application/vnd.vcx","vcx"],["application/vnd.visio","vsd"],["application/vnd.visionary","vis"],["application/vnd.vsf","vsf"],["application/vnd.wap.wbxml","wbxml"],["application/vnd.wap.wmlc","wmlc"],["application/vnd.wap.wmlscriptc","wmlsc"],["application/vnd.webturbo","wtb"],["application/vnd.wolfram.player","nbp"],["application/vnd.wordperfect","wpd"],["application/vnd.wqd","wqd"],["application/vnd.wt.stf","stf"],["application/vnd.xara",["web","xar"]],["application/vnd.xfdl","xfdl"],["application/vnd.yamaha.hv-dic","hvd"],["application/vnd.yamaha.hv-script","hvs"],["application/vnd.yamaha.hv-voice","hvp"],["application/vnd.yamaha.openscoreformat","osf"],["application/vnd.yamaha.openscoreformat.osfpvg+xml","osfpvg"],["application/vnd.yamaha.smaf-audio","saf"],["application/vnd.yamaha.smaf-phrase","spf"],["application/vnd.yellowriver-custom-menu","cmp"],["application/vnd.zul","zir"],["application/vnd.zzazz.deck+xml","zaz"],["application/vocaltec-media-desc","vmd"],["application/vocaltec-media-file","vmf"],["application/voicexml+xml","vxml"],["application/widget","wgt"],["application/winhlp","hlp"],["application/wordperfect",["wp","wp5","wp6","wpd"]],["application/wordperfect6.0",["w60","wp5"]],["application/wordperfect6.1","w61"],["application/wsdl+xml","wsdl"],["application/wspolicy+xml","wspolicy"],["application/x-123","wk1"],["application/x-7z-compressed","7z"],["application/x-abiword","abw"],["application/x-ace-compressed","ace"],["application/x-aim","aim"],["application/x-authorware-bin","aab"],["application/x-authorware-map","aam"],["application/x-authorware-seg","aas"],["application/x-bcpio","bcpio"],["application/x-binary","bin"],["application/x-binhex40","hqx"],["application/x-bittorrent","torrent"],["application/x-bsh",["bsh","sh","shar"]],["application/x-bytecode.elisp","elc"],["application/x-bytecode.python","pyc"],["application/x-bzip","bz"],["application/x-bzip2",["boz","bz2"]],["application/x-cdf","cdf"],["application/x-cdlink","vcd"],["application/x-chat",["cha","chat"]],["application/x-chess-pgn","pgn"],["application/x-cmu-raster","ras"],["application/x-cocoa","cco"],["application/x-compactpro","cpt"],["application/x-compress","z"],["application/x-compressed",["tgz","gz","z","zip"]],["application/x-conference","nsc"],["application/x-cpio","cpio"],["application/x-cpt","cpt"],["application/x-csh","csh"],["application/x-debian-package","deb"],["application/x-deepv","deepv"],["application/x-director",["dir","dcr","dxr"]],["application/x-doom","wad"],["application/x-dtbncx+xml","ncx"],["application/x-dtbook+xml","dtb"],["application/x-dtbresource+xml","res"],["application/x-dvi","dvi"],["application/x-elc","elc"],["application/x-envoy",["env","evy"]],["application/x-esrehber","es"],["application/x-excel",["xls","xla","xlb","xlc","xld","xlk","xll","xlm","xlt","xlv","xlw"]],["application/x-font-bdf","bdf"],["application/x-font-ghostscript","gsf"],["application/x-font-linux-psf","psf"],["application/x-font-otf","otf"],["application/x-font-pcf","pcf"],["application/x-font-snf","snf"],["application/x-font-ttf","ttf"],["application/x-font-type1","pfa"],["application/x-font-woff","woff"],["application/x-frame","mif"],["application/x-freelance","pre"],["application/x-futuresplash","spl"],["application/x-gnumeric","gnumeric"],["application/x-gsp","gsp"],["application/x-gss","gss"],["application/x-gtar","gtar"],["application/x-gzip",["gz","gzip"]],["application/x-hdf","hdf"],["application/x-helpfile",["help","hlp"]],["application/x-httpd-imap","imap"],["application/x-ima","ima"],["application/x-internet-signup",["ins","isp"]],["application/x-internett-signup","ins"],["application/x-inventor","iv"],["application/x-ip2","ip"],["application/x-iphone","iii"],["application/x-java-class","class"],["application/x-java-commerce","jcm"],["application/x-java-jnlp-file","jnlp"],["application/x-javascript","js"],["application/x-koan",["skd","skm","skp","skt"]],["application/x-ksh","ksh"],["application/x-latex",["latex","ltx"]],["application/x-lha","lha"],["application/x-lisp","lsp"],["application/x-livescreen","ivy"],["application/x-lotus","wq1"],["application/x-lotusscreencam","scm"],["application/x-lzh","lzh"],["application/x-lzx","lzx"],["application/x-mac-binhex40","hqx"],["application/x-macbinary","bin"],["application/x-magic-cap-package-1.0","mc$"],["application/x-mathcad","mcd"],["application/x-meme","mm"],["application/x-midi",["mid","midi"]],["application/x-mif","mif"],["application/x-mix-transfer","nix"],["application/x-mobipocket-ebook","prc"],["application/x-mplayer2","asx"],["application/x-ms-application","application"],["application/x-ms-wmd","wmd"],["application/x-ms-wmz","wmz"],["application/x-ms-xbap","xbap"],["application/x-msaccess","mdb"],["application/x-msbinder","obd"],["application/x-mscardfile","crd"],["application/x-msclip","clp"],["application/x-msdownload",["exe","dll"]],["application/x-msexcel",["xls","xla","xlw"]],["application/x-msmediaview",["mvb","m13","m14"]],["application/x-msmetafile","wmf"],["application/x-msmoney","mny"],["application/x-mspowerpoint","ppt"],["application/x-mspublisher","pub"],["application/x-msschedule","scd"],["application/x-msterminal","trm"],["application/x-mswrite","wri"],["application/x-navi-animation","ani"],["application/x-navidoc","nvd"],["application/x-navimap","map"],["application/x-navistyle","stl"],["application/x-netcdf",["cdf","nc"]],["application/x-newton-compatible-pkg","pkg"],["application/x-nokia-9000-communicator-add-on-software","aos"],["application/x-omc","omc"],["application/x-omcdatamaker","omcd"],["application/x-omcregerator","omcr"],["application/x-pagemaker",["pm4","pm5"]],["application/x-pcl","pcl"],["application/x-perfmon",["pma","pmc","pml","pmr","pmw"]],["application/x-pixclscript","plx"],["application/x-pkcs10","p10"],["application/x-pkcs12",["p12","pfx"]],["application/x-pkcs7-certificates",["p7b","spc"]],["application/x-pkcs7-certreqresp","p7r"],["application/x-pkcs7-mime",["p7m","p7c"]],["application/x-pkcs7-signature",["p7s","p7a"]],["application/x-pointplus","css"],["application/x-portable-anymap","pnm"],["application/x-project",["mpc","mpt","mpv","mpx"]],["application/x-qpro","wb1"],["application/x-rar-compressed","rar"],["application/x-rtf","rtf"],["application/x-sdp","sdp"],["application/x-sea","sea"],["application/x-seelogo","sl"],["application/x-sh","sh"],["application/x-shar",["shar","sh"]],["application/x-shockwave-flash","swf"],["application/x-silverlight-app","xap"],["application/x-sit","sit"],["application/x-sprite",["spr","sprite"]],["application/x-stuffit","sit"],["application/x-stuffitx","sitx"],["application/x-sv4cpio","sv4cpio"],["application/x-sv4crc","sv4crc"],["application/x-tar","tar"],["application/x-tbook",["sbk","tbk"]],["application/x-tcl","tcl"],["application/x-tex","tex"],["application/x-tex-tfm","tfm"],["application/x-texinfo",["texi","texinfo"]],["application/x-troff",["roff","t","tr"]],["application/x-troff-man","man"],["application/x-troff-me","me"],["application/x-troff-ms","ms"],["application/x-troff-msvideo","avi"],["application/x-ustar","ustar"],["application/x-visio",["vsd","vst","vsw"]],["application/x-vnd.audioexplosion.mzz","mzz"],["application/x-vnd.ls-xpix","xpix"],["application/x-vrml","vrml"],["application/x-wais-source",["src","wsrc"]],["application/x-winhelp","hlp"],["application/x-wintalk","wtk"],["application/x-world",["wrl","svr"]],["application/x-wpwin","wpd"],["application/x-wri","wri"],["application/x-x509-ca-cert",["cer","crt","der"]],["application/x-x509-user-cert","crt"],["application/x-xfig","fig"],["application/x-xpinstall","xpi"],["application/x-zip-compressed","zip"],["application/xcap-diff+xml","xdf"],["application/xenc+xml","xenc"],["application/xhtml+xml","xhtml"],["application/xml","xml"],["application/xml-dtd","dtd"],["application/xop+xml","xop"],["application/xslt+xml","xslt"],["application/xspf+xml","xspf"],["application/xv+xml","mxml"],["application/yang","yang"],["application/yin+xml","yin"],["application/ynd.ms-pkipko","pko"],["application/zip","zip"],["audio/adpcm","adp"],["audio/aiff",["aiff","aif","aifc"]],["audio/basic",["snd","au"]],["audio/it","it"],["audio/make",["funk","my","pfunk"]],["audio/make.my.funk","pfunk"],["audio/mid",["mid","rmi"]],["audio/midi",["midi","kar","mid"]],["audio/mod","mod"],["audio/mp4","mp4a"],["audio/mpeg",["mpga","mp3","m2a","mp2","mpa","mpg"]],["audio/mpeg3","mp3"],["audio/nspaudio",["la","lma"]],["audio/ogg","oga"],["audio/s3m","s3m"],["audio/tsp-audio","tsi"],["audio/tsplayer","tsp"],["audio/vnd.dece.audio","uva"],["audio/vnd.digital-winds","eol"],["audio/vnd.dra","dra"],["audio/vnd.dts","dts"],["audio/vnd.dts.hd","dtshd"],["audio/vnd.lucent.voice","lvp"],["audio/vnd.ms-playready.media.pya","pya"],["audio/vnd.nuera.ecelp4800","ecelp4800"],["audio/vnd.nuera.ecelp7470","ecelp7470"],["audio/vnd.nuera.ecelp9600","ecelp9600"],["audio/vnd.qcelp","qcp"],["audio/vnd.rip","rip"],["audio/voc","voc"],["audio/voxware","vox"],["audio/wav","wav"],["audio/webm","weba"],["audio/x-aac","aac"],["audio/x-adpcm","snd"],["audio/x-aiff",["aiff","aif","aifc"]],["audio/x-au","au"],["audio/x-gsm",["gsd","gsm"]],["audio/x-jam","jam"],["audio/x-liveaudio","lam"],["audio/x-mid",["mid","midi"]],["audio/x-midi",["midi","mid"]],["audio/x-mod","mod"],["audio/x-mpeg","mp2"],["audio/x-mpeg-3","mp3"],["audio/x-mpegurl","m3u"],["audio/x-mpequrl","m3u"],["audio/x-ms-wax","wax"],["audio/x-ms-wma","wma"],["audio/x-nspaudio",["la","lma"]],["audio/x-pn-realaudio",["ra","ram","rm","rmm","rmp"]],["audio/x-pn-realaudio-plugin",["ra","rmp","rpm"]],["audio/x-psid","sid"],["audio/x-realaudio","ra"],["audio/x-twinvq","vqf"],["audio/x-twinvq-plugin",["vqe","vql"]],["audio/x-vnd.audioexplosion.mjuicemediafile","mjf"],["audio/x-voc","voc"],["audio/x-wav","wav"],["audio/xm","xm"],["chemical/x-cdx","cdx"],["chemical/x-cif","cif"],["chemical/x-cmdf","cmdf"],["chemical/x-cml","cml"],["chemical/x-csml","csml"],["chemical/x-pdb",["pdb","xyz"]],["chemical/x-xyz","xyz"],["drawing/x-dwf","dwf"],["i-world/i-vrml","ivr"],["image/bmp",["bmp","bm"]],["image/cgm","cgm"],["image/cis-cod","cod"],["image/cmu-raster",["ras","rast"]],["image/fif","fif"],["image/florian",["flo","turbot"]],["image/g3fax","g3"],["image/gif","gif"],["image/ief",["ief","iefs"]],["image/jpeg",["jpeg","jpe","jpg","jfif","jfif-tbnl"]],["image/jutvision","jut"],["image/ktx","ktx"],["image/naplps",["nap","naplps"]],["image/pict",["pic","pict"]],["image/pipeg","jfif"],["image/pjpeg",["jfif","jpe","jpeg","jpg"]],["image/png",["png","x-png"]],["image/prs.btif","btif"],["image/svg+xml","svg"],["image/tiff",["tif","tiff"]],["image/vasa","mcf"],["image/vnd.adobe.photoshop","psd"],["image/vnd.dece.graphic","uvi"],["image/vnd.djvu","djvu"],["image/vnd.dvb.subtitle","sub"],["image/vnd.dwg",["dwg","dxf","svf"]],["image/vnd.dxf","dxf"],["image/vnd.fastbidsheet","fbs"],["image/vnd.fpx","fpx"],["image/vnd.fst","fst"],["image/vnd.fujixerox.edmics-mmr","mmr"],["image/vnd.fujixerox.edmics-rlc","rlc"],["image/vnd.ms-modi","mdi"],["image/vnd.net-fpx",["fpx","npx"]],["image/vnd.rn-realflash","rf"],["image/vnd.rn-realpix","rp"],["image/vnd.wap.wbmp","wbmp"],["image/vnd.xiff","xif"],["image/webp","webp"],["image/x-cmu-raster","ras"],["image/x-cmx","cmx"],["image/x-dwg",["dwg","dxf","svf"]],["image/x-freehand","fh"],["image/x-icon","ico"],["image/x-jg","art"],["image/x-jps","jps"],["image/x-niff",["niff","nif"]],["image/x-pcx","pcx"],["image/x-pict",["pct","pic"]],["image/x-portable-anymap","pnm"],["image/x-portable-bitmap","pbm"],["image/x-portable-graymap","pgm"],["image/x-portable-greymap","pgm"],["image/x-portable-pixmap","ppm"],["image/x-quicktime",["qif","qti","qtif"]],["image/x-rgb","rgb"],["image/x-tiff",["tif","tiff"]],["image/x-windows-bmp","bmp"],["image/x-xbitmap","xbm"],["image/x-xbm","xbm"],["image/x-xpixmap",["xpm","pm"]],["image/x-xwd","xwd"],["image/x-xwindowdump","xwd"],["image/xbm","xbm"],["image/xpm","xpm"],["message/rfc822",["eml","mht","mhtml","nws","mime"]],["model/iges",["iges","igs"]],["model/mesh","msh"],["model/vnd.collada+xml","dae"],["model/vnd.dwf","dwf"],["model/vnd.gdl","gdl"],["model/vnd.gtw","gtw"],["model/vnd.mts","mts"],["model/vnd.vtu","vtu"],["model/vrml",["vrml","wrl","wrz"]],["model/x-pov","pov"],["multipart/x-gzip","gzip"],["multipart/x-ustar","ustar"],["multipart/x-zip","zip"],["music/crescendo",["mid","midi"]],["music/x-karaoke","kar"],["paleovu/x-pv","pvu"],["text/asp","asp"],["text/calendar","ics"],["text/css","css"],["text/csv","csv"],["text/ecmascript","js"],["text/h323","323"],["text/html",["html","htm","stm","acgi","htmls","htx","shtml"]],["text/iuls","uls"],["text/javascript","js"],["text/mcf","mcf"],["text/n3","n3"],["text/pascal","pas"],["text/plain",["txt","bas","c","h","c++","cc","com","conf","cxx","def","f","f90","for","g","hh","idc","jav","java","list","log","lst","m","mar","pl","sdml","text"]],["text/plain-bas","par"],["text/prs.lines.tag","dsc"],["text/richtext",["rtx","rt","rtf"]],["text/scriplet","wsc"],["text/scriptlet","sct"],["text/sgml",["sgm","sgml"]],["text/tab-separated-values","tsv"],["text/troff","t"],["text/turtle","ttl"],["text/uri-list",["uni","unis","uri","uris"]],["text/vnd.abc","abc"],["text/vnd.curl","curl"],["text/vnd.curl.dcurl","dcurl"],["text/vnd.curl.mcurl","mcurl"],["text/vnd.curl.scurl","scurl"],["text/vnd.fly","fly"],["text/vnd.fmi.flexstor","flx"],["text/vnd.graphviz","gv"],["text/vnd.in3d.3dml","3dml"],["text/vnd.in3d.spot","spot"],["text/vnd.rn-realtext","rt"],["text/vnd.sun.j2me.app-descriptor","jad"],["text/vnd.wap.wml","wml"],["text/vnd.wap.wmlscript","wmls"],["text/webviewhtml","htt"],["text/x-asm",["asm","s"]],["text/x-audiosoft-intra","aip"],["text/x-c",["c","cc","cpp"]],["text/x-component","htc"],["text/x-fortran",["for","f","f77","f90"]],["text/x-h",["h","hh"]],["text/x-java-source",["java","jav"]],["text/x-java-source,java","java"],["text/x-la-asf","lsx"],["text/x-m","m"],["text/x-pascal","p"],["text/x-script","hlb"],["text/x-script.csh","csh"],["text/x-script.elisp","el"],["text/x-script.guile","scm"],["text/x-script.ksh","ksh"],["text/x-script.lisp","lsp"],["text/x-script.perl","pl"],["text/x-script.perl-module","pm"],["text/x-script.phyton","py"],["text/x-script.rexx","rexx"],["text/x-script.scheme","scm"],["text/x-script.sh","sh"],["text/x-script.tcl","tcl"],["text/x-script.tcsh","tcsh"],["text/x-script.zsh","zsh"],["text/x-server-parsed-html",["shtml","ssi"]],["text/x-setext","etx"],["text/x-sgml",["sgm","sgml"]],["text/x-speech",["spc","talk"]],["text/x-uil","uil"],["text/x-uuencode",["uu","uue"]],["text/x-vcalendar","vcs"],["text/x-vcard","vcf"],["text/xml","xml"],["video/3gpp","3gp"],["video/3gpp2","3g2"],["video/animaflex","afl"],["video/avi","avi"],["video/avs-video","avs"],["video/dl","dl"],["video/fli","fli"],["video/gl","gl"],["video/h261","h261"],["video/h263","h263"],["video/h264","h264"],["video/jpeg","jpgv"],["video/jpm","jpm"],["video/mj2","mj2"],["video/mp4","mp4"],["video/mpeg",["mpeg","mp2","mpa","mpe","mpg","mpv2","m1v","m2v","mp3"]],["video/msvideo","avi"],["video/ogg","ogv"],["video/quicktime",["mov","qt","moov"]],["video/vdo","vdo"],["video/vivo",["viv","vivo"]],["video/vnd.dece.hd","uvh"],["video/vnd.dece.mobile","uvm"],["video/vnd.dece.pd","uvp"],["video/vnd.dece.sd","uvs"],["video/vnd.dece.video","uvv"],["video/vnd.fvt","fvt"],["video/vnd.mpegurl","mxu"],["video/vnd.ms-playready.media.pyv","pyv"],["video/vnd.rn-realvideo","rv"],["video/vnd.uvvu.mp4","uvu"],["video/vnd.vivo",["viv","vivo"]],["video/vosaic","vos"],["video/webm","webm"],["video/x-amt-demorun","xdr"],["video/x-amt-showrun","xsr"],["video/x-atomic3d-feature","fmf"],["video/x-dl","dl"],["video/x-dv",["dif","dv"]],["video/x-f4v","f4v"],["video/x-fli","fli"],["video/x-flv","flv"],["video/x-gl","gl"],["video/x-isvideo","isu"],["video/x-la-asf",["lsf","lsx"]],["video/x-m4v","m4v"],["video/x-motion-jpeg","mjpg"],["video/x-mpeg",["mp3","mp2"]],["video/x-mpeq2a","mp2"],["video/x-ms-asf",["asf","asr","asx"]],["video/x-ms-asf-plugin","asx"],["video/x-ms-wm","wm"],["video/x-ms-wmv","wmv"],["video/x-ms-wmx","wmx"],["video/x-ms-wvx","wvx"],["video/x-msvideo","avi"],["video/x-qtc","qtc"],["video/x-scm","scm"],["video/x-sgi-movie",["movie","mv"]],["windows/metafile","wmf"],["www/mime","mime"],["x-conference/x-cooltalk","ice"],["x-music/x-midi",["mid","midi"]],["x-world/x-3dmf",["3dm","3dmf","qd3","qd3d"]],["x-world/x-svr","svr"],["x-world/x-vrml",["flr","vrml","wrl","wrz","xaf","xof"]],["x-world/x-vrt","vrt"],["xgl/drawing","xgz"],["xgl/movie","xmz"]]),n=new Map([["123","application/vnd.lotus-1-2-3"],["323","text/h323"],["*","application/octet-stream"],["3dm","x-world/x-3dmf"],["3dmf","x-world/x-3dmf"],["3dml","text/vnd.in3d.3dml"],["3g2","video/3gpp2"],["3gp","video/3gpp"],["7z","application/x-7z-compressed"],["a","application/octet-stream"],["aab","application/x-authorware-bin"],["aac","audio/x-aac"],["aam","application/x-authorware-map"],["aas","application/x-authorware-seg"],["abc","text/vnd.abc"],["abw","application/x-abiword"],["ac","application/pkix-attr-cert"],["acc","application/vnd.americandynamics.acc"],["ace","application/x-ace-compressed"],["acgi","text/html"],["acu","application/vnd.acucobol"],["acx","application/internet-property-stream"],["adp","audio/adpcm"],["aep","application/vnd.audiograph"],["afl","video/animaflex"],["afp","application/vnd.ibm.modcap"],["ahead","application/vnd.ahead.space"],["ai","application/postscript"],["aif",["audio/aiff","audio/x-aiff"]],["aifc",["audio/aiff","audio/x-aiff"]],["aiff",["audio/aiff","audio/x-aiff"]],["aim","application/x-aim"],["aip","text/x-audiosoft-intra"],["air","application/vnd.adobe.air-application-installer-package+zip"],["ait","application/vnd.dvb.ait"],["ami","application/vnd.amiga.ami"],["ani","application/x-navi-animation"],["aos","application/x-nokia-9000-communicator-add-on-software"],["apk","application/vnd.android.package-archive"],["application","application/x-ms-application"],["apr","application/vnd.lotus-approach"],["aps","application/mime"],["arc","application/octet-stream"],["arj",["application/arj","application/octet-stream"]],["art","image/x-jg"],["asf","video/x-ms-asf"],["asm","text/x-asm"],["aso","application/vnd.accpac.simply.aso"],["asp","text/asp"],["asr","video/x-ms-asf"],["asx",["video/x-ms-asf","application/x-mplayer2","video/x-ms-asf-plugin"]],["atc","application/vnd.acucorp"],["atomcat","application/atomcat+xml"],["atomsvc","application/atomsvc+xml"],["atx","application/vnd.antix.game-component"],["au",["audio/basic","audio/x-au"]],["avi",["video/avi","video/msvideo","application/x-troff-msvideo","video/x-msvideo"]],["avs","video/avs-video"],["aw","application/applixware"],["axs","application/olescript"],["azf","application/vnd.airzip.filesecure.azf"],["azs","application/vnd.airzip.filesecure.azs"],["azw","application/vnd.amazon.ebook"],["bas","text/plain"],["bcpio","application/x-bcpio"],["bdf","application/x-font-bdf"],["bdm","application/vnd.syncml.dm+wbxml"],["bed","application/vnd.realvnc.bed"],["bh2","application/vnd.fujitsu.oasysprs"],["bin",["application/octet-stream","application/mac-binary","application/macbinary","application/x-macbinary","application/x-binary"]],["bm","image/bmp"],["bmi","application/vnd.bmi"],["bmp",["image/bmp","image/x-windows-bmp"]],["boo","application/book"],["book","application/book"],["box","application/vnd.previewsystems.box"],["boz","application/x-bzip2"],["bsh","application/x-bsh"],["btif","image/prs.btif"],["bz","application/x-bzip"],["bz2","application/x-bzip2"],["c",["text/plain","text/x-c"]],["c++","text/plain"],["c11amc","application/vnd.cluetrust.cartomobile-config"],["c11amz","application/vnd.cluetrust.cartomobile-config-pkg"],["c4g","application/vnd.clonk.c4group"],["cab","application/vnd.ms-cab-compressed"],["car","application/vnd.curl.car"],["cat",["application/vnd.ms-pkiseccat","application/vnd.ms-pki.seccat"]],["cc",["text/plain","text/x-c"]],["ccad","application/clariscad"],["cco","application/x-cocoa"],["ccxml","application/ccxml+xml,"],["cdbcmsg","application/vnd.contact.cmsg"],["cdf",["application/cdf","application/x-cdf","application/x-netcdf"]],["cdkey","application/vnd.mediastation.cdkey"],["cdmia","application/cdmi-capability"],["cdmic","application/cdmi-container"],["cdmid","application/cdmi-domain"],["cdmio","application/cdmi-object"],["cdmiq","application/cdmi-queue"],["cdx","chemical/x-cdx"],["cdxml","application/vnd.chemdraw+xml"],["cdy","application/vnd.cinderella"],["cer",["application/pkix-cert","application/x-x509-ca-cert"]],["cgm","image/cgm"],["cha","application/x-chat"],["chat","application/x-chat"],["chm","application/vnd.ms-htmlhelp"],["chrt","application/vnd.kde.kchart"],["cif","chemical/x-cif"],["cii","application/vnd.anser-web-certificate-issue-initiation"],["cil","application/vnd.ms-artgalry"],["cla","application/vnd.claymore"],["class",["application/octet-stream","application/java","application/java-byte-code","application/java-vm","application/x-java-class"]],["clkk","application/vnd.crick.clicker.keyboard"],["clkp","application/vnd.crick.clicker.palette"],["clkt","application/vnd.crick.clicker.template"],["clkw","application/vnd.crick.clicker.wordbank"],["clkx","application/vnd.crick.clicker"],["clp","application/x-msclip"],["cmc","application/vnd.cosmocaller"],["cmdf","chemical/x-cmdf"],["cml","chemical/x-cml"],["cmp","application/vnd.yellowriver-custom-menu"],["cmx","image/x-cmx"],["cod",["image/cis-cod","application/vnd.rim.cod"]],["com",["application/octet-stream","text/plain"]],["conf","text/plain"],["cpio","application/x-cpio"],["cpp","text/x-c"],["cpt",["application/mac-compactpro","application/x-compactpro","application/x-cpt"]],["crd","application/x-mscardfile"],["crl",["application/pkix-crl","application/pkcs-crl"]],["crt",["application/pkix-cert","application/x-x509-user-cert","application/x-x509-ca-cert"]],["cryptonote","application/vnd.rig.cryptonote"],["csh",["text/x-script.csh","application/x-csh"]],["csml","chemical/x-csml"],["csp","application/vnd.commonspace"],["css",["text/css","application/x-pointplus"]],["csv","text/csv"],["cu","application/cu-seeme"],["curl","text/vnd.curl"],["cww","application/prs.cww"],["cxx","text/plain"],["dae","model/vnd.collada+xml"],["daf","application/vnd.mobius.daf"],["davmount","application/davmount+xml"],["dcr","application/x-director"],["dcurl","text/vnd.curl.dcurl"],["dd2","application/vnd.oma.dd2+xml"],["ddd","application/vnd.fujixerox.ddd"],["deb","application/x-debian-package"],["deepv","application/x-deepv"],["def","text/plain"],["der","application/x-x509-ca-cert"],["dfac","application/vnd.dreamfactory"],["dif","video/x-dv"],["dir","application/x-director"],["dis","application/vnd.mobius.dis"],["djvu","image/vnd.djvu"],["dl",["video/dl","video/x-dl"]],["dll","application/x-msdownload"],["dms","application/octet-stream"],["dna","application/vnd.dna"],["doc","application/msword"],["docm","application/vnd.ms-word.document.macroenabled.12"],["docx","application/vnd.openxmlformats-officedocument.wordprocessingml.document"],["dot","application/msword"],["dotm","application/vnd.ms-word.template.macroenabled.12"],["dotx","application/vnd.openxmlformats-officedocument.wordprocessingml.template"],["dp",["application/commonground","application/vnd.osgi.dp"]],["dpg","application/vnd.dpgraph"],["dra","audio/vnd.dra"],["drw","application/drafting"],["dsc","text/prs.lines.tag"],["dssc","application/dssc+der"],["dtb","application/x-dtbook+xml"],["dtd","application/xml-dtd"],["dts","audio/vnd.dts"],["dtshd","audio/vnd.dts.hd"],["dump","application/octet-stream"],["dv","video/x-dv"],["dvi","application/x-dvi"],["dwf",["model/vnd.dwf","drawing/x-dwf"]],["dwg",["application/acad","image/vnd.dwg","image/x-dwg"]],["dxf",["application/dxf","image/vnd.dwg","image/vnd.dxf","image/x-dwg"]],["dxp","application/vnd.spotfire.dxp"],["dxr","application/x-director"],["ecelp4800","audio/vnd.nuera.ecelp4800"],["ecelp7470","audio/vnd.nuera.ecelp7470"],["ecelp9600","audio/vnd.nuera.ecelp9600"],["edm","application/vnd.novadigm.edm"],["edx","application/vnd.novadigm.edx"],["efif","application/vnd.picsel"],["ei6","application/vnd.pg.osasli"],["el","text/x-script.elisp"],["elc",["application/x-elc","application/x-bytecode.elisp"]],["eml","message/rfc822"],["emma","application/emma+xml"],["env","application/x-envoy"],["eol","audio/vnd.digital-winds"],["eot","application/vnd.ms-fontobject"],["eps","application/postscript"],["epub","application/epub+zip"],["es",["application/ecmascript","application/x-esrehber"]],["es3","application/vnd.eszigno3+xml"],["esf","application/vnd.epson.esf"],["etx","text/x-setext"],["evy",["application/envoy","application/x-envoy"]],["exe",["application/octet-stream","application/x-msdownload"]],["exi","application/exi"],["ext","application/vnd.novadigm.ext"],["ez2","application/vnd.ezpix-album"],["ez3","application/vnd.ezpix-package"],["f",["text/plain","text/x-fortran"]],["f4v","video/x-f4v"],["f77","text/x-fortran"],["f90",["text/plain","text/x-fortran"]],["fbs","image/vnd.fastbidsheet"],["fcs","application/vnd.isac.fcs"],["fdf","application/vnd.fdf"],["fe_launch","application/vnd.denovo.fcselayout-link"],["fg5","application/vnd.fujitsu.oasysgp"],["fh","image/x-freehand"],["fif",["application/fractals","image/fif"]],["fig","application/x-xfig"],["fli",["video/fli","video/x-fli"]],["flo",["image/florian","application/vnd.micrografx.flo"]],["flr","x-world/x-vrml"],["flv","video/x-flv"],["flw","application/vnd.kde.kivio"],["flx","text/vnd.fmi.flexstor"],["fly","text/vnd.fly"],["fm","application/vnd.framemaker"],["fmf","video/x-atomic3d-feature"],["fnc","application/vnd.frogans.fnc"],["for",["text/plain","text/x-fortran"]],["fpx",["image/vnd.fpx","image/vnd.net-fpx"]],["frl","application/freeloader"],["fsc","application/vnd.fsc.weblaunch"],["fst","image/vnd.fst"],["ftc","application/vnd.fluxtime.clip"],["fti","application/vnd.anser-web-funds-transfer-initiation"],["funk","audio/make"],["fvt","video/vnd.fvt"],["fxp","application/vnd.adobe.fxp"],["fzs","application/vnd.fuzzysheet"],["g","text/plain"],["g2w","application/vnd.geoplan"],["g3","image/g3fax"],["g3w","application/vnd.geospace"],["gac","application/vnd.groove-account"],["gdl","model/vnd.gdl"],["geo","application/vnd.dynageo"],["geojson","application/geo+json"],["gex","application/vnd.geometry-explorer"],["ggb","application/vnd.geogebra.file"],["ggt","application/vnd.geogebra.tool"],["ghf","application/vnd.groove-help"],["gif","image/gif"],["gim","application/vnd.groove-identity-message"],["gl",["video/gl","video/x-gl"]],["gmx","application/vnd.gmx"],["gnumeric","application/x-gnumeric"],["gph","application/vnd.flographit"],["gqf","application/vnd.grafeq"],["gram","application/srgs"],["grv","application/vnd.groove-injector"],["grxml","application/srgs+xml"],["gsd","audio/x-gsm"],["gsf","application/x-font-ghostscript"],["gsm","audio/x-gsm"],["gsp","application/x-gsp"],["gss","application/x-gss"],["gtar","application/x-gtar"],["gtm","application/vnd.groove-tool-message"],["gtw","model/vnd.gtw"],["gv","text/vnd.graphviz"],["gxt","application/vnd.geonext"],["gz",["application/x-gzip","application/x-compressed"]],["gzip",["multipart/x-gzip","application/x-gzip"]],["h",["text/plain","text/x-h"]],["h261","video/h261"],["h263","video/h263"],["h264","video/h264"],["hal","application/vnd.hal+xml"],["hbci","application/vnd.hbci"],["hdf","application/x-hdf"],["help","application/x-helpfile"],["hgl","application/vnd.hp-hpgl"],["hh",["text/plain","text/x-h"]],["hlb","text/x-script"],["hlp",["application/winhlp","application/hlp","application/x-helpfile","application/x-winhelp"]],["hpg","application/vnd.hp-hpgl"],["hpgl","application/vnd.hp-hpgl"],["hpid","application/vnd.hp-hpid"],["hps","application/vnd.hp-hps"],["hqx",["application/mac-binhex40","application/binhex","application/binhex4","application/mac-binhex","application/x-binhex40","application/x-mac-binhex40"]],["hta","application/hta"],["htc","text/x-component"],["htke","application/vnd.kenameaapp"],["htm","text/html"],["html","text/html"],["htmls","text/html"],["htt","text/webviewhtml"],["htx","text/html"],["hvd","application/vnd.yamaha.hv-dic"],["hvp","application/vnd.yamaha.hv-voice"],["hvs","application/vnd.yamaha.hv-script"],["i2g","application/vnd.intergeo"],["icc","application/vnd.iccprofile"],["ice","x-conference/x-cooltalk"],["ico","image/x-icon"],["ics","text/calendar"],["idc","text/plain"],["ief","image/ief"],["iefs","image/ief"],["ifm","application/vnd.shana.informed.formdata"],["iges",["application/iges","model/iges"]],["igl","application/vnd.igloader"],["igm","application/vnd.insors.igm"],["igs",["application/iges","model/iges"]],["igx","application/vnd.micrografx.igx"],["iif","application/vnd.shana.informed.interchange"],["iii","application/x-iphone"],["ima","application/x-ima"],["imap","application/x-httpd-imap"],["imp","application/vnd.accpac.simply.imp"],["ims","application/vnd.ms-ims"],["inf","application/inf"],["ins",["application/x-internet-signup","application/x-internett-signup"]],["ip","application/x-ip2"],["ipfix","application/ipfix"],["ipk","application/vnd.shana.informed.package"],["irm","application/vnd.ibm.rights-management"],["irp","application/vnd.irepository.package+xml"],["isp","application/x-internet-signup"],["isu","video/x-isvideo"],["it","audio/it"],["itp","application/vnd.shana.informed.formtemplate"],["iv","application/x-inventor"],["ivp","application/vnd.immervision-ivp"],["ivr","i-world/i-vrml"],["ivu","application/vnd.immervision-ivu"],["ivy","application/x-livescreen"],["jad","text/vnd.sun.j2me.app-descriptor"],["jam",["application/vnd.jam","audio/x-jam"]],["jar","application/java-archive"],["jav",["text/plain","text/x-java-source"]],["java",["text/plain","text/x-java-source,java","text/x-java-source"]],["jcm","application/x-java-commerce"],["jfif",["image/pipeg","image/jpeg","image/pjpeg"]],["jfif-tbnl","image/jpeg"],["jisp","application/vnd.jisp"],["jlt","application/vnd.hp-jlyt"],["jnlp","application/x-java-jnlp-file"],["joda","application/vnd.joost.joda-archive"],["jpe",["image/jpeg","image/pjpeg"]],["jpeg",["image/jpeg","image/pjpeg"]],["jpg",["image/jpeg","image/pjpeg"]],["jpgv","video/jpeg"],["jpm","video/jpm"],["jps","image/x-jps"],["js",["application/javascript","application/ecmascript","text/javascript","text/ecmascript","application/x-javascript"]],["json","application/json"],["jut","image/jutvision"],["kar",["audio/midi","music/x-karaoke"]],["karbon","application/vnd.kde.karbon"],["kfo","application/vnd.kde.kformula"],["kia","application/vnd.kidspiration"],["kml","application/vnd.google-earth.kml+xml"],["kmz","application/vnd.google-earth.kmz"],["kne","application/vnd.kinar"],["kon","application/vnd.kde.kontour"],["kpr","application/vnd.kde.kpresenter"],["ksh",["application/x-ksh","text/x-script.ksh"]],["ksp","application/vnd.kde.kspread"],["ktx","image/ktx"],["ktz","application/vnd.kahootz"],["kwd","application/vnd.kde.kword"],["la",["audio/nspaudio","audio/x-nspaudio"]],["lam","audio/x-liveaudio"],["lasxml","application/vnd.las.las+xml"],["latex","application/x-latex"],["lbd","application/vnd.llamagraphics.life-balance.desktop"],["lbe","application/vnd.llamagraphics.life-balance.exchange+xml"],["les","application/vnd.hhe.lesson-player"],["lha",["application/octet-stream","application/lha","application/x-lha"]],["lhx","application/octet-stream"],["link66","application/vnd.route66.link66+xml"],["list","text/plain"],["lma",["audio/nspaudio","audio/x-nspaudio"]],["log","text/plain"],["lrm","application/vnd.ms-lrm"],["lsf","video/x-la-asf"],["lsp",["application/x-lisp","text/x-script.lisp"]],["lst","text/plain"],["lsx",["video/x-la-asf","text/x-la-asf"]],["ltf","application/vnd.frogans.ltf"],["ltx","application/x-latex"],["lvp","audio/vnd.lucent.voice"],["lwp","application/vnd.lotus-wordpro"],["lzh",["application/octet-stream","application/x-lzh"]],["lzx",["application/lzx","application/octet-stream","application/x-lzx"]],["m",["text/plain","text/x-m"]],["m13","application/x-msmediaview"],["m14","application/x-msmediaview"],["m1v","video/mpeg"],["m21","application/mp21"],["m2a","audio/mpeg"],["m2v","video/mpeg"],["m3u",["audio/x-mpegurl","audio/x-mpequrl"]],["m3u8","application/vnd.apple.mpegurl"],["m4v","video/x-m4v"],["ma","application/mathematica"],["mads","application/mads+xml"],["mag","application/vnd.ecowin.chart"],["man","application/x-troff-man"],["map","application/x-navimap"],["mar","text/plain"],["mathml","application/mathml+xml"],["mbd","application/mbedlet"],["mbk","application/vnd.mobius.mbk"],["mbox","application/mbox"],["mc$","application/x-magic-cap-package-1.0"],["mc1","application/vnd.medcalcdata"],["mcd",["application/mcad","application/vnd.mcd","application/x-mathcad"]],["mcf",["image/vasa","text/mcf"]],["mcp","application/netmc"],["mcurl","text/vnd.curl.mcurl"],["mdb","application/x-msaccess"],["mdi","image/vnd.ms-modi"],["me","application/x-troff-me"],["meta4","application/metalink4+xml"],["mets","application/mets+xml"],["mfm","application/vnd.mfmp"],["mgp","application/vnd.osgeo.mapguide.package"],["mgz","application/vnd.proteus.magazine"],["mht","message/rfc822"],["mhtml","message/rfc822"],["mid",["audio/mid","audio/midi","music/crescendo","x-music/x-midi","audio/x-midi","application/x-midi","audio/x-mid"]],["midi",["audio/midi","music/crescendo","x-music/x-midi","audio/x-midi","application/x-midi","audio/x-mid"]],["mif",["application/vnd.mif","application/x-mif","application/x-frame"]],["mime",["message/rfc822","www/mime"]],["mj2","video/mj2"],["mjf","audio/x-vnd.audioexplosion.mjuicemediafile"],["mjpg","video/x-motion-jpeg"],["mlp","application/vnd.dolby.mlp"],["mm",["application/base64","application/x-meme"]],["mmd","application/vnd.chipnuts.karaoke-mmd"],["mme","application/base64"],["mmf","application/vnd.smaf"],["mmr","image/vnd.fujixerox.edmics-mmr"],["mny","application/x-msmoney"],["mod",["audio/mod","audio/x-mod"]],["mods","application/mods+xml"],["moov","video/quicktime"],["mov","video/quicktime"],["movie","video/x-sgi-movie"],["mp2",["video/mpeg","audio/mpeg","video/x-mpeg","audio/x-mpeg","video/x-mpeq2a"]],["mp3",["audio/mpeg","audio/mpeg3","video/mpeg","audio/x-mpeg-3","video/x-mpeg"]],["mp4",["video/mp4","application/mp4"]],["mp4a","audio/mp4"],["mpa",["video/mpeg","audio/mpeg"]],["mpc",["application/vnd.mophun.certificate","application/x-project"]],["mpe","video/mpeg"],["mpeg","video/mpeg"],["mpg",["video/mpeg","audio/mpeg"]],["mpga","audio/mpeg"],["mpkg","application/vnd.apple.installer+xml"],["mpm","application/vnd.blueice.multipass"],["mpn","application/vnd.mophun.application"],["mpp","application/vnd.ms-project"],["mpt","application/x-project"],["mpv","application/x-project"],["mpv2","video/mpeg"],["mpx","application/x-project"],["mpy","application/vnd.ibm.minipay"],["mqy","application/vnd.mobius.mqy"],["mrc","application/marc"],["mrcx","application/marcxml+xml"],["ms","application/x-troff-ms"],["mscml","application/mediaservercontrol+xml"],["mseq","application/vnd.mseq"],["msf","application/vnd.epson.msf"],["msg","application/vnd.ms-outlook"],["msh","model/mesh"],["msl","application/vnd.mobius.msl"],["msty","application/vnd.muvee.style"],["mts","model/vnd.mts"],["mus","application/vnd.musician"],["musicxml","application/vnd.recordare.musicxml+xml"],["mv","video/x-sgi-movie"],["mvb","application/x-msmediaview"],["mwf","application/vnd.mfer"],["mxf","application/mxf"],["mxl","application/vnd.recordare.musicxml"],["mxml","application/xv+xml"],["mxs","application/vnd.triscape.mxs"],["mxu","video/vnd.mpegurl"],["my","audio/make"],["mzz","application/x-vnd.audioexplosion.mzz"],["n-gage","application/vnd.nokia.n-gage.symbian.install"],["n3","text/n3"],["nap","image/naplps"],["naplps","image/naplps"],["nbp","application/vnd.wolfram.player"],["nc","application/x-netcdf"],["ncm","application/vnd.nokia.configuration-message"],["ncx","application/x-dtbncx+xml"],["ngdat","application/vnd.nokia.n-gage.data"],["nif","image/x-niff"],["niff","image/x-niff"],["nix","application/x-mix-transfer"],["nlu","application/vnd.neurolanguage.nlu"],["nml","application/vnd.enliven"],["nnd","application/vnd.noblenet-directory"],["nns","application/vnd.noblenet-sealer"],["nnw","application/vnd.noblenet-web"],["npx","image/vnd.net-fpx"],["nsc","application/x-conference"],["nsf","application/vnd.lotus-notes"],["nvd","application/x-navidoc"],["nws","message/rfc822"],["o","application/octet-stream"],["oa2","application/vnd.fujitsu.oasys2"],["oa3","application/vnd.fujitsu.oasys3"],["oas","application/vnd.fujitsu.oasys"],["obd","application/x-msbinder"],["oda","application/oda"],["odb","application/vnd.oasis.opendocument.database"],["odc","application/vnd.oasis.opendocument.chart"],["odf","application/vnd.oasis.opendocument.formula"],["odft","application/vnd.oasis.opendocument.formula-template"],["odg","application/vnd.oasis.opendocument.graphics"],["odi","application/vnd.oasis.opendocument.image"],["odm","application/vnd.oasis.opendocument.text-master"],["odp","application/vnd.oasis.opendocument.presentation"],["ods","application/vnd.oasis.opendocument.spreadsheet"],["odt","application/vnd.oasis.opendocument.text"],["oga","audio/ogg"],["ogv","video/ogg"],["ogx","application/ogg"],["omc","application/x-omc"],["omcd","application/x-omcdatamaker"],["omcr","application/x-omcregerator"],["onetoc","application/onenote"],["opf","application/oebps-package+xml"],["org","application/vnd.lotus-organizer"],["osf","application/vnd.yamaha.openscoreformat"],["osfpvg","application/vnd.yamaha.openscoreformat.osfpvg+xml"],["otc","application/vnd.oasis.opendocument.chart-template"],["otf","application/x-font-otf"],["otg","application/vnd.oasis.opendocument.graphics-template"],["oth","application/vnd.oasis.opendocument.text-web"],["oti","application/vnd.oasis.opendocument.image-template"],["otp","application/vnd.oasis.opendocument.presentation-template"],["ots","application/vnd.oasis.opendocument.spreadsheet-template"],["ott","application/vnd.oasis.opendocument.text-template"],["oxt","application/vnd.openofficeorg.extension"],["p","text/x-pascal"],["p10",["application/pkcs10","application/x-pkcs10"]],["p12",["application/pkcs-12","application/x-pkcs12"]],["p7a","application/x-pkcs7-signature"],["p7b","application/x-pkcs7-certificates"],["p7c",["application/pkcs7-mime","application/x-pkcs7-mime"]],["p7m",["application/pkcs7-mime","application/x-pkcs7-mime"]],["p7r","application/x-pkcs7-certreqresp"],["p7s",["application/pkcs7-signature","application/x-pkcs7-signature"]],["p8","application/pkcs8"],["par","text/plain-bas"],["part","application/pro_eng"],["pas","text/pascal"],["paw","application/vnd.pawaafile"],["pbd","application/vnd.powerbuilder6"],["pbm","image/x-portable-bitmap"],["pcf","application/x-font-pcf"],["pcl",["application/vnd.hp-pcl","application/x-pcl"]],["pclxl","application/vnd.hp-pclxl"],["pct","image/x-pict"],["pcurl","application/vnd.curl.pcurl"],["pcx","image/x-pcx"],["pdb",["application/vnd.palm","chemical/x-pdb"]],["pdf","application/pdf"],["pfa","application/x-font-type1"],["pfr","application/font-tdpfr"],["pfunk",["audio/make","audio/make.my.funk"]],["pfx","application/x-pkcs12"],["pgm",["image/x-portable-graymap","image/x-portable-greymap"]],["pgn","application/x-chess-pgn"],["pgp","application/pgp-signature"],["pic",["image/pict","image/x-pict"]],["pict","image/pict"],["pkg","application/x-newton-compatible-pkg"],["pki","application/pkixcmp"],["pkipath","application/pkix-pkipath"],["pko",["application/ynd.ms-pkipko","application/vnd.ms-pki.pko"]],["pl",["text/plain","text/x-script.perl"]],["plb","application/vnd.3gpp.pic-bw-large"],["plc","application/vnd.mobius.plc"],["plf","application/vnd.pocketlearn"],["pls","application/pls+xml"],["plx","application/x-pixclscript"],["pm",["text/x-script.perl-module","image/x-xpixmap"]],["pm4","application/x-pagemaker"],["pm5","application/x-pagemaker"],["pma","application/x-perfmon"],["pmc","application/x-perfmon"],["pml",["application/vnd.ctc-posml","application/x-perfmon"]],["pmr","application/x-perfmon"],["pmw","application/x-perfmon"],["png","image/png"],["pnm",["application/x-portable-anymap","image/x-portable-anymap"]],["portpkg","application/vnd.macports.portpkg"],["pot",["application/vnd.ms-powerpoint","application/mspowerpoint"]],["potm","application/vnd.ms-powerpoint.template.macroenabled.12"],["potx","application/vnd.openxmlformats-officedocument.presentationml.template"],["pov","model/x-pov"],["ppa","application/vnd.ms-powerpoint"],["ppam","application/vnd.ms-powerpoint.addin.macroenabled.12"],["ppd","application/vnd.cups-ppd"],["ppm","image/x-portable-pixmap"],["pps",["application/vnd.ms-powerpoint","application/mspowerpoint"]],["ppsm","application/vnd.ms-powerpoint.slideshow.macroenabled.12"],["ppsx","application/vnd.openxmlformats-officedocument.presentationml.slideshow"],["ppt",["application/vnd.ms-powerpoint","application/mspowerpoint","application/powerpoint","application/x-mspowerpoint"]],["pptm","application/vnd.ms-powerpoint.presentation.macroenabled.12"],["pptx","application/vnd.openxmlformats-officedocument.presentationml.presentation"],["ppz","application/mspowerpoint"],["prc","application/x-mobipocket-ebook"],["pre",["application/vnd.lotus-freelance","application/x-freelance"]],["prf","application/pics-rules"],["prt","application/pro_eng"],["ps","application/postscript"],["psb","application/vnd.3gpp.pic-bw-small"],["psd",["application/octet-stream","image/vnd.adobe.photoshop"]],["psf","application/x-font-linux-psf"],["pskcxml","application/pskc+xml"],["ptid","application/vnd.pvi.ptid1"],["pub","application/x-mspublisher"],["pvb","application/vnd.3gpp.pic-bw-var"],["pvu","paleovu/x-pv"],["pwn","application/vnd.3m.post-it-notes"],["pwz","application/vnd.ms-powerpoint"],["py","text/x-script.phyton"],["pya","audio/vnd.ms-playready.media.pya"],["pyc","application/x-bytecode.python"],["pyv","video/vnd.ms-playready.media.pyv"],["qam","application/vnd.epson.quickanime"],["qbo","application/vnd.intu.qbo"],["qcp","audio/vnd.qcelp"],["qd3","x-world/x-3dmf"],["qd3d","x-world/x-3dmf"],["qfx","application/vnd.intu.qfx"],["qif","image/x-quicktime"],["qps","application/vnd.publishare-delta-tree"],["qt","video/quicktime"],["qtc","video/x-qtc"],["qti","image/x-quicktime"],["qtif","image/x-quicktime"],["qxd","application/vnd.quark.quarkxpress"],["ra",["audio/x-realaudio","audio/x-pn-realaudio","audio/x-pn-realaudio-plugin"]],["ram","audio/x-pn-realaudio"],["rar","application/x-rar-compressed"],["ras",["image/cmu-raster","application/x-cmu-raster","image/x-cmu-raster"]],["rast","image/cmu-raster"],["rcprofile","application/vnd.ipunplugged.rcprofile"],["rdf","application/rdf+xml"],["rdz","application/vnd.data-vision.rdz"],["rep","application/vnd.businessobjects"],["res","application/x-dtbresource+xml"],["rexx","text/x-script.rexx"],["rf","image/vnd.rn-realflash"],["rgb","image/x-rgb"],["rif","application/reginfo+xml"],["rip","audio/vnd.rip"],["rl","application/resource-lists+xml"],["rlc","image/vnd.fujixerox.edmics-rlc"],["rld","application/resource-lists-diff+xml"],["rm",["application/vnd.rn-realmedia","audio/x-pn-realaudio"]],["rmi","audio/mid"],["rmm","audio/x-pn-realaudio"],["rmp",["audio/x-pn-realaudio-plugin","audio/x-pn-realaudio"]],["rms","application/vnd.jcp.javame.midlet-rms"],["rnc","application/relax-ng-compact-syntax"],["rng",["application/ringing-tones","application/vnd.nokia.ringing-tone"]],["rnx","application/vnd.rn-realplayer"],["roff","application/x-troff"],["rp","image/vnd.rn-realpix"],["rp9","application/vnd.cloanto.rp9"],["rpm","audio/x-pn-realaudio-plugin"],["rpss","application/vnd.nokia.radio-presets"],["rpst","application/vnd.nokia.radio-preset"],["rq","application/sparql-query"],["rs","application/rls-services+xml"],["rsd","application/rsd+xml"],["rt",["text/richtext","text/vnd.rn-realtext"]],["rtf",["application/rtf","text/richtext","application/x-rtf"]],["rtx",["text/richtext","application/rtf"]],["rv","video/vnd.rn-realvideo"],["s","text/x-asm"],["s3m","audio/s3m"],["saf","application/vnd.yamaha.smaf-audio"],["saveme","application/octet-stream"],["sbk","application/x-tbook"],["sbml","application/sbml+xml"],["sc","application/vnd.ibm.secure-container"],["scd","application/x-msschedule"],["scm",["application/vnd.lotus-screencam","video/x-scm","text/x-script.guile","application/x-lotusscreencam","text/x-script.scheme"]],["scq","application/scvp-cv-request"],["scs","application/scvp-cv-response"],["sct","text/scriptlet"],["scurl","text/vnd.curl.scurl"],["sda","application/vnd.stardivision.draw"],["sdc","application/vnd.stardivision.calc"],["sdd","application/vnd.stardivision.impress"],["sdkm","application/vnd.solent.sdkm+xml"],["sdml","text/plain"],["sdp",["application/sdp","application/x-sdp"]],["sdr","application/sounder"],["sdw","application/vnd.stardivision.writer"],["sea",["application/sea","application/x-sea"]],["see","application/vnd.seemail"],["seed","application/vnd.fdsn.seed"],["sema","application/vnd.sema"],["semd","application/vnd.semd"],["semf","application/vnd.semf"],["ser","application/java-serialized-object"],["set","application/set"],["setpay","application/set-payment-initiation"],["setreg","application/set-registration-initiation"],["sfd-hdstx","application/vnd.hydrostatix.sof-data"],["sfs","application/vnd.spotfire.sfs"],["sgl","application/vnd.stardivision.writer-global"],["sgm",["text/sgml","text/x-sgml"]],["sgml",["text/sgml","text/x-sgml"]],["sh",["application/x-shar","application/x-bsh","application/x-sh","text/x-script.sh"]],["shar",["application/x-bsh","application/x-shar"]],["shf","application/shf+xml"],["shtml",["text/html","text/x-server-parsed-html"]],["sid","audio/x-psid"],["sis","application/vnd.symbian.install"],["sit",["application/x-stuffit","application/x-sit"]],["sitx","application/x-stuffitx"],["skd","application/x-koan"],["skm","application/x-koan"],["skp",["application/vnd.koan","application/x-koan"]],["skt","application/x-koan"],["sl","application/x-seelogo"],["sldm","application/vnd.ms-powerpoint.slide.macroenabled.12"],["sldx","application/vnd.openxmlformats-officedocument.presentationml.slide"],["slt","application/vnd.epson.salt"],["sm","application/vnd.stepmania.stepchart"],["smf","application/vnd.stardivision.math"],["smi",["application/smil","application/smil+xml"]],["smil","application/smil"],["snd",["audio/basic","audio/x-adpcm"]],["snf","application/x-font-snf"],["sol","application/solids"],["spc",["text/x-speech","application/x-pkcs7-certificates"]],["spf","application/vnd.yamaha.smaf-phrase"],["spl",["application/futuresplash","application/x-futuresplash"]],["spot","text/vnd.in3d.spot"],["spp","application/scvp-vp-response"],["spq","application/scvp-vp-request"],["spr","application/x-sprite"],["sprite","application/x-sprite"],["src","application/x-wais-source"],["sru","application/sru+xml"],["srx","application/sparql-results+xml"],["sse","application/vnd.kodak-descriptor"],["ssf","application/vnd.epson.ssf"],["ssi","text/x-server-parsed-html"],["ssm","application/streamingmedia"],["ssml","application/ssml+xml"],["sst",["application/vnd.ms-pkicertstore","application/vnd.ms-pki.certstore"]],["st","application/vnd.sailingtracker.track"],["stc","application/vnd.sun.xml.calc.template"],["std","application/vnd.sun.xml.draw.template"],["step","application/step"],["stf","application/vnd.wt.stf"],["sti","application/vnd.sun.xml.impress.template"],["stk","application/hyperstudio"],["stl",["application/vnd.ms-pkistl","application/sla","application/vnd.ms-pki.stl","application/x-navistyle"]],["stm","text/html"],["stp","application/step"],["str","application/vnd.pg.format"],["stw","application/vnd.sun.xml.writer.template"],["sub","image/vnd.dvb.subtitle"],["sus","application/vnd.sus-calendar"],["sv4cpio","application/x-sv4cpio"],["sv4crc","application/x-sv4crc"],["svc","application/vnd.dvb.service"],["svd","application/vnd.svd"],["svf",["image/vnd.dwg","image/x-dwg"]],["svg","image/svg+xml"],["svr",["x-world/x-svr","application/x-world"]],["swf","application/x-shockwave-flash"],["swi","application/vnd.aristanetworks.swi"],["sxc","application/vnd.sun.xml.calc"],["sxd","application/vnd.sun.xml.draw"],["sxg","application/vnd.sun.xml.writer.global"],["sxi","application/vnd.sun.xml.impress"],["sxm","application/vnd.sun.xml.math"],["sxw","application/vnd.sun.xml.writer"],["t",["text/troff","application/x-troff"]],["talk","text/x-speech"],["tao","application/vnd.tao.intent-module-archive"],["tar","application/x-tar"],["tbk",["application/toolbook","application/x-tbook"]],["tcap","application/vnd.3gpp2.tcap"],["tcl",["text/x-script.tcl","application/x-tcl"]],["tcsh","text/x-script.tcsh"],["teacher","application/vnd.smart.teacher"],["tei","application/tei+xml"],["tex","application/x-tex"],["texi","application/x-texinfo"],["texinfo","application/x-texinfo"],["text",["application/plain","text/plain"]],["tfi","application/thraud+xml"],["tfm","application/x-tex-tfm"],["tgz",["application/gnutar","application/x-compressed"]],["thmx","application/vnd.ms-officetheme"],["tif",["image/tiff","image/x-tiff"]],["tiff",["image/tiff","image/x-tiff"]],["tmo","application/vnd.tmobile-livetv"],["torrent","application/x-bittorrent"],["tpl","application/vnd.groove-tool-template"],["tpt","application/vnd.trid.tpt"],["tr","application/x-troff"],["tra","application/vnd.trueapp"],["trm","application/x-msterminal"],["tsd","application/timestamped-data"],["tsi","audio/tsp-audio"],["tsp",["application/dsptype","audio/tsplayer"]],["tsv","text/tab-separated-values"],["ttf","application/x-font-ttf"],["ttl","text/turtle"],["turbot","image/florian"],["twd","application/vnd.simtech-mindmapper"],["txd","application/vnd.genomatix.tuxedo"],["txf","application/vnd.mobius.txf"],["txt","text/plain"],["ufd","application/vnd.ufdl"],["uil","text/x-uil"],["uls","text/iuls"],["umj","application/vnd.umajin"],["uni","text/uri-list"],["unis","text/uri-list"],["unityweb","application/vnd.unity"],["unv","application/i-deas"],["uoml","application/vnd.uoml+xml"],["uri","text/uri-list"],["uris","text/uri-list"],["ustar",["application/x-ustar","multipart/x-ustar"]],["utz","application/vnd.uiq.theme"],["uu",["application/octet-stream","text/x-uuencode"]],["uue","text/x-uuencode"],["uva","audio/vnd.dece.audio"],["uvh","video/vnd.dece.hd"],["uvi","image/vnd.dece.graphic"],["uvm","video/vnd.dece.mobile"],["uvp","video/vnd.dece.pd"],["uvs","video/vnd.dece.sd"],["uvu","video/vnd.uvvu.mp4"],["uvv","video/vnd.dece.video"],["vcd","application/x-cdlink"],["vcf","text/x-vcard"],["vcg","application/vnd.groove-vcard"],["vcs","text/x-vcalendar"],["vcx","application/vnd.vcx"],["vda","application/vda"],["vdo","video/vdo"],["vew","application/groupwise"],["vis","application/vnd.visionary"],["viv",["video/vivo","video/vnd.vivo"]],["vivo",["video/vivo","video/vnd.vivo"]],["vmd","application/vocaltec-media-desc"],["vmf","application/vocaltec-media-file"],["voc",["audio/voc","audio/x-voc"]],["vos","video/vosaic"],["vox","audio/voxware"],["vqe","audio/x-twinvq-plugin"],["vqf","audio/x-twinvq"],["vql","audio/x-twinvq-plugin"],["vrml",["model/vrml","x-world/x-vrml","application/x-vrml"]],["vrt","x-world/x-vrt"],["vsd",["application/vnd.visio","application/x-visio"]],["vsf","application/vnd.vsf"],["vst","application/x-visio"],["vsw","application/x-visio"],["vtu","model/vnd.vtu"],["vxml","application/voicexml+xml"],["w60","application/wordperfect6.0"],["w61","application/wordperfect6.1"],["w6w","application/msword"],["wad","application/x-doom"],["wav",["audio/wav","audio/x-wav"]],["wax","audio/x-ms-wax"],["wb1","application/x-qpro"],["wbmp","image/vnd.wap.wbmp"],["wbs","application/vnd.criticaltools.wbs+xml"],["wbxml","application/vnd.wap.wbxml"],["wcm","application/vnd.ms-works"],["wdb","application/vnd.ms-works"],["web","application/vnd.xara"],["weba","audio/webm"],["webm","video/webm"],["webp","image/webp"],["wg","application/vnd.pmi.widget"],["wgt","application/widget"],["wiz","application/msword"],["wk1","application/x-123"],["wks","application/vnd.ms-works"],["wm","video/x-ms-wm"],["wma","audio/x-ms-wma"],["wmd","application/x-ms-wmd"],["wmf",["windows/metafile","application/x-msmetafile"]],["wml","text/vnd.wap.wml"],["wmlc","application/vnd.wap.wmlc"],["wmls","text/vnd.wap.wmlscript"],["wmlsc","application/vnd.wap.wmlscriptc"],["wmv","video/x-ms-wmv"],["wmx","video/x-ms-wmx"],["wmz","application/x-ms-wmz"],["woff","application/x-font-woff"],["word","application/msword"],["wp","application/wordperfect"],["wp5",["application/wordperfect","application/wordperfect6.0"]],["wp6","application/wordperfect"],["wpd",["application/wordperfect","application/vnd.wordperfect","application/x-wpwin"]],["wpl","application/vnd.ms-wpl"],["wps","application/vnd.ms-works"],["wq1","application/x-lotus"],["wqd","application/vnd.wqd"],["wri",["application/mswrite","application/x-wri","application/x-mswrite"]],["wrl",["model/vrml","x-world/x-vrml","application/x-world"]],["wrz",["model/vrml","x-world/x-vrml"]],["wsc","text/scriplet"],["wsdl","application/wsdl+xml"],["wspolicy","application/wspolicy+xml"],["wsrc","application/x-wais-source"],["wtb","application/vnd.webturbo"],["wtk","application/x-wintalk"],["wvx","video/x-ms-wvx"],["x-png","image/png"],["x3d","application/vnd.hzn-3d-crossword"],["xaf","x-world/x-vrml"],["xap","application/x-silverlight-app"],["xar","application/vnd.xara"],["xbap","application/x-ms-xbap"],["xbd","application/vnd.fujixerox.docuworks.binder"],["xbm",["image/xbm","image/x-xbm","image/x-xbitmap"]],["xdf","application/xcap-diff+xml"],["xdm","application/vnd.syncml.dm+xml"],["xdp","application/vnd.adobe.xdp+xml"],["xdr","video/x-amt-demorun"],["xdssc","application/dssc+xml"],["xdw","application/vnd.fujixerox.docuworks"],["xenc","application/xenc+xml"],["xer","application/patch-ops-error+xml"],["xfdf","application/vnd.adobe.xfdf"],["xfdl","application/vnd.xfdl"],["xgz","xgl/drawing"],["xhtml","application/xhtml+xml"],["xif","image/vnd.xiff"],["xl","application/excel"],["xla",["application/vnd.ms-excel","application/excel","application/x-msexcel","application/x-excel"]],["xlam","application/vnd.ms-excel.addin.macroenabled.12"],["xlb",["application/excel","application/vnd.ms-excel","application/x-excel"]],["xlc",["application/vnd.ms-excel","application/excel","application/x-excel"]],["xld",["application/excel","application/x-excel"]],["xlk",["application/excel","application/x-excel"]],["xll",["application/excel","application/vnd.ms-excel","application/x-excel"]],["xlm",["application/vnd.ms-excel","application/excel","application/x-excel"]],["xls",["application/vnd.ms-excel","application/excel","application/x-msexcel","application/x-excel"]],["xlsb","application/vnd.ms-excel.sheet.binary.macroenabled.12"],["xlsm","application/vnd.ms-excel.sheet.macroenabled.12"],["xlsx","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"],["xlt",["application/vnd.ms-excel","application/excel","application/x-excel"]],["xltm","application/vnd.ms-excel.template.macroenabled.12"],["xltx","application/vnd.openxmlformats-officedocument.spreadsheetml.template"],["xlv",["application/excel","application/x-excel"]],["xlw",["application/vnd.ms-excel","application/excel","application/x-msexcel","application/x-excel"]],["xm","audio/xm"],["xml",["application/xml","text/xml","application/atom+xml","application/rss+xml"]],["xmz","xgl/movie"],["xo","application/vnd.olpc-sugar"],["xof","x-world/x-vrml"],["xop","application/xop+xml"],["xpi","application/x-xpinstall"],["xpix","application/x-vnd.ls-xpix"],["xpm",["image/xpm","image/x-xpixmap"]],["xpr","application/vnd.is-xpr"],["xps","application/vnd.ms-xpsdocument"],["xpw","application/vnd.intercon.formnet"],["xslt","application/xslt+xml"],["xsm","application/vnd.syncml+xml"],["xspf","application/xspf+xml"],["xsr","video/x-amt-showrun"],["xul","application/vnd.mozilla.xul+xml"],["xwd",["image/x-xwd","image/x-xwindowdump"]],["xyz",["chemical/x-xyz","chemical/x-pdb"]],["yang","application/yang"],["yin","application/yin+xml"],["z",["application/x-compressed","application/x-compress"]],["zaz","application/vnd.zzazz.deck+xml"],["zip",["application/zip","multipart/x-zip","application/x-zip-compressed","application/x-compressed"]],["zir","application/vnd.zul"],["zmm","application/vnd.handheld-entertainment+xml"],["zoo","application/octet-stream"],["zsh","text/x-script.zsh"]]);return ZO={detectMimeType(i){if(!i)return t;let s=e.parse(i),a=(s.ext.substr(1)||s.name||"").split("?").shift().trim().toLowerCase(),o=t;return n.has(a)&&(o=n.get(a)),Array.isArray(o)?o[0]:o},detectExtension(e){if(!e)return"bin";let t=(e||"").toLowerCase().trim().split("/"),n=t.shift().trim(),s=t.join("/").trim();if(i.has(n+"/"+s)){let e=i.get(n+"/"+s);return Array.isArray(e)?e[0]:e}return"text"===n?"txt":"bin"}}}function OP(){if(iP)return tP;iP=1;const e=2147483647,t=36,i=/^xn--/,n=/[^\0-\x7F]/,s=/[\x2E\u3002\uFF0E\uFF61]/g,a={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},o=Math.floor,r=String.fromCharCode;function c(e){throw new RangeError(a[e])}function l(e,t){const i=e.split("@");let n="";i.length>1&&(n=i[0]+"@",e=i[1]);const a=function(e,t){const i=[];let n=e.length;for(;n--;)i[n]=t(e[n]);return i}((e=e.replace(s,".")).split("."),t).join(".");return n+a}function p(e){const t=[];let i=0;const n=e.length;for(;i<n;){const s=e.charCodeAt(i++);if(s>=55296&&s<=56319&&i<n){const n=e.charCodeAt(i++);56320==(64512&n)?t.push(((1023&s)<<10)+(1023&n)+65536):(t.push(s),i--)}else t.push(s)}return t}const d=function(e,t){return e+22+75*(e<26)-((0!=t)<<5)},u=function(e,i,n){let s=0;for(e=n?o(e/700):e>>1,e+=o(e/i);e>455;s+=t)e=o(e/35);return o(s+36*e/(e+38))},m=function(i){const n=[],s=i.length;let a=0,r=128,l=72,p=i.lastIndexOf("-");p<0&&(p=0);for(let e=0;e<p;++e)i.charCodeAt(e)>=128&&c("not-basic"),n.push(i.charCodeAt(e));for(let m=p>0?p+1:0;m<s;){const p=a;for(let n=1,r=t;;r+=t){m>=s&&c("invalid-input");const p=(d=i.charCodeAt(m++))>=48&&d<58?d-48+26:d>=65&&d<91?d-65:d>=97&&d<123?d-97:t;p>=t&&c("invalid-input"),p>o((e-a)/n)&&c("overflow"),a+=p*n;const u=r<=l?1:r>=l+26?26:r-l;if(p<u)break;const h=t-u;n>o(e/h)&&c("overflow"),n*=h}const h=n.length+1;l=u(a-p,h,0==p),o(a/h)>e-r&&c("overflow"),r+=o(a/h),a%=h,n.splice(a++,0,r)}var d;return String.fromCodePoint(...n)},h=function(i){const n=[],s=(i=p(i)).length;let a=128,l=0,m=72;for(const e of i)e<128&&n.push(r(e));const h=n.length;let f=h;for(h&&n.push("-");f<s;){let s=e;for(const e of i)e>=a&&e<s&&(s=e);const p=f+1;s-a>o((e-l)/p)&&c("overflow"),l+=(s-a)*p,a=s;for(const s of i)if(s<a&&++l>e&&c("overflow"),s===a){let e=l;for(let i=t;;i+=t){const s=i<=m?1:i>=m+26?26:i-m;if(e<s)break;const a=e-s,c=t-s;n.push(r(d(s+a%c,0))),e=o(a/c)}n.push(r(d(e,0))),m=u(l,p,f===h),l=0,++f}++l,++a}return n.join("")};return tP={version:"2.3.1",ucs2:{decode:p,encode:e=>String.fromCodePoint(...e)},decode:m,encode:h,toASCII:function(e){return l(e,(function(e){return n.test(e)?"xn--"+h(e):e}))},toUnicode:function(e){return l(e,(function(e){return i.test(e)?m(e.slice(4).toLowerCase()):e}))}}}function PP(){if(sP)return nP;sP=1;const e=c.Transform;function t(e){return"string"==typeof e&&(e=Buffer.from(e,"utf-8")),e.toString("base64")}function i(e,t){if(t=t||76,(e=(e||"").toString()).length<=t)return e;let i=[],n=0,s=1024*t;for(;n<e.length;){let a=e.substr(n,s).replace(new RegExp(".{"+t+"}","g"),"$&\r\n").trim();i.push(a),n+=s}return i.join("\r\n").trim()}return nP={encode:t,wrap:i,Encoder:class extends e{constructor(e){super(),this.options=e||{},!1!==this.options.lineLength&&(this.options.lineLength=this.options.lineLength||76),this._curLine="",this._remainingBytes=!1,this.inputBytes=0,this.outputBytes=0}_transform(e,n,s){if("buffer"!==n&&(e=Buffer.from(e,n)),!e||!e.length)return setImmediate(s);this.inputBytes+=e.length,this._remainingBytes&&this._remainingBytes.length&&(e=Buffer.concat([this._remainingBytes,e],this._remainingBytes.length+e.length),this._remainingBytes=!1),e.length%3?(this._remainingBytes=e.slice(e.length-e.length%3),e=e.slice(0,e.length-e.length%3)):this._remainingBytes=!1;let a=this._curLine+t(e);if(this.options.lineLength){a=i(a,this.options.lineLength);let e=a.lastIndexOf("\n");e<0?(this._curLine=a,a=""):e===a.length-1?this._curLine="":(this._curLine=a.substr(e+1),a=a.substr(0,e+1))}a&&(this.outputBytes+=a.length,this.push(Buffer.from(a,"ascii"))),setImmediate(s)}_flush(e){this._remainingBytes&&this._remainingBytes.length&&(this._curLine+=t(this._remainingBytes)),this._curLine&&(this._curLine=i(this._curLine,this.options.lineLength),this.outputBytes+=this._curLine.length,this.push(this._curLine,"ascii"),this._curLine=""),e()}}}}function _P(){if(oP)return aP;oP=1;const e=c.Transform;function t(e){"string"==typeof e&&(e=Buffer.from(e,"utf-8"));let t,i=[[9],[10],[13],[32,60],[62,126]],s="";for(let a=0,o=e.length;a<o;a++)t=e[a],n(t,i)&&(32!==t&&9!==t||a!==o-1&&10!==e[a+1]&&13!==e[a+1])?s+=String.fromCharCode(t):s+="="+(t<16?"0":"")+t.toString(16).toUpperCase();return s}function i(e,t){if(t=t||76,(e=(e||"").toString()).length<=t)return e;let i,n,s,a=0,o=e.length,r=Math.floor(t/3),c="";for(;a<o;)if(s=e.substr(a,t),i=s.match(/\r\n/))s=s.substr(0,i.index+i[0].length),c+=s,a+=s.length;else if("\n"!==s.substr(-1))if(i=s.substr(-r).match(/\n.*?$/))s=s.substr(0,s.length-(i[0].length-1)),c+=s,a+=s.length;else{if(s.length>t-r&&(i=s.substr(-r).match(/[ \t.,!?][^ \t.,!?]*$/)))s=s.substr(0,s.length-(i[0].length-1));else if(s.match(/[=][\da-f]{0,2}$/i))for((i=s.match(/[=][\da-f]{0,1}$/i))&&(s=s.substr(0,s.length-i[0].length));s.length>3&&s.length<o-a&&!s.match(/^(?:=[\da-f]{2}){1,4}$/i)&&(i=s.match(/[=][\da-f]{2}$/gi))&&(n=parseInt(i[0].substr(1,2),16),!(n<128))&&(s=s.substr(0,s.length-3),!(n>=192)););a+s.length<o&&"\n"!==s.substr(-1)?(s.length===t&&s.match(/[=][\da-f]{2}$/i)?s=s.substr(0,s.length-3):s.length===t&&(s=s.substr(0,s.length-1)),a+=s.length,s+="=\r\n"):a+=s.length,c+=s}else c+=s,a+=s.length;return c}function n(e,t){for(let i=t.length-1;i>=0;i--)if(t[i].length){if(1===t[i].length&&e===t[i][0])return!0;if(2===t[i].length&&e>=t[i][0]&&e<=t[i][1])return!0}return!1}return aP={encode:t,wrap:i,Encoder:class extends e{constructor(e){super(),this.options=e||{},!1!==this.options.lineLength&&(this.options.lineLength=this.options.lineLength||76),this._curLine="",this.inputBytes=0,this.outputBytes=0}_transform(e,n,s){let a;if("buffer"!==n&&(e=Buffer.from(e,n)),!e||!e.length)return s();this.inputBytes+=e.length,this.options.lineLength?(a=this._curLine+t(e),a=i(a,this.options.lineLength),a=a.replace(/(^|\n)([^\n]*)$/,((e,t,i)=>(this._curLine=i,t))),a&&(this.outputBytes+=a.length,this.push(a))):(a=t(e),this.outputBytes+=a.length,this.push(a,"ascii")),s()}_flush(e){this._curLine&&(this.outputBytes+=this._curLine.length,this.push(this._curLine,"ascii")),e()}}}}function RP(){if(cP)return rP;cP=1;const e=PP(),t=_P(),i=kP();return rP={isPlainText:(e,t)=>"string"==typeof e&&!(t?/[\x00-\x08\x0b\x0c\x0e-\x1f"\u0080-\uFFFF]/:/[\x00-\x08\x0b\x0c\x0e-\x1f\u0080-\uFFFF]/).test(e),hasLongerLines:(e,t)=>e.length>131072||new RegExp("^.{"+(t+1)+",}","m").test(e),encodeWord(i,n,s){let a;if((s=s||0)&&s>12&&(s-=12),"Q"===(n=(n||"Q").toString().toUpperCase().trim().charAt(0))?a=t.encode(i).replace(/[^a-z0-9!*+\-/=]/gi,(e=>{let t=e.charCodeAt(0).toString(16).toUpperCase();return" "===e?"_":"="+(1===t.length?"0"+t:t)})):"B"===n&&(a="string"==typeof i?i:e.encode(i),s=s?Math.max(3,(s-s%4)/4*3):0),s&&("B"!==n?a:e.encode(i)).length>s)if("Q"===n)a=this.splitMimeEncodedString(a,s).join("?= =?UTF-8?"+n+"?");else{let t=[],i="";for(let n=0,o=a.length;n<o;n++){let r=a.charAt(n);/[\ud83c\ud83d\ud83e]/.test(r)&&n<o-1&&(r+=a.charAt(++n)),Buffer.byteLength(i+r)<=s||0===n?i+=r:(t.push(e.encode(i)),i=r)}i&&t.push(e.encode(i)),a=t.length>1?t.join("?= =?UTF-8?"+n+"?"):t.join("")}else"B"===n&&(a=e.encode(i));return"=?UTF-8?"+n+"?"+a+("?="===a.substr(-2)?"":"?=")},encodeWords(e,t,i,n){let s;i=i||0;let a=e.match(/(?:^|\s)([^\s]*["\u0080-\uFFFF])/);if(!a)return e;if(n)return this.encodeWord(e,t,i);let o=e.match(/(["\u0080-\uFFFF][^\s]*)[^"\u0080-\uFFFF]*$/);if(!o)return e;let r=a.index+(a[0].match(/[^\s]/)||{index:0}).index,c=o.index+(o[1]||"").length;return s=(r?e.substr(0,r):"")+this.encodeWord(e.substring(r,c),t||"Q",i)+(c<e.length?e.substr(c):""),s},buildHeaderValue(e){let t=[];return Object.keys(e.params||{}).forEach((i=>{let n=e.params[i];!this.isPlainText(n,!0)||n.length>=75?this.buildHeaderParam(i,n,50).forEach((e=>{/[\s"\\;:/=(),<>@[\]?]|^[-']|'$/.test(e.value)&&"*"!==e.key.substr(-1)?t.push(e.key+"="+JSON.stringify(e.value)):t.push(e.key+"="+e.value)})):/[\s'"\\;:/=(),<>@[\]?]|^-/.test(n)?t.push(i+"="+JSON.stringify(n)):t.push(i+"="+n)})),e.value+(t.length?"; "+t.join("; "):"")},buildHeaderParam(e,t,i){let n,s,a,o,r,c,l=[],p="string"==typeof t?t:(t||"").toString(),d=0;if(i=i||50,this.isPlainText(t,!0)){if(p.length<=i)return[{key:e,value:p}];p=p.replace(new RegExp(".{"+i+"}","g"),(e=>(l.push({line:e}),""))),p&&l.push({line:p})}else{if(/[\uD800-\uDBFF]/.test(p)){for(n=[],r=0,c=p.length;r<c;r++)s=p.charAt(r),a=s.charCodeAt(0),a>=55296&&a<=56319&&r<c-1?(s+=p.charAt(r+1),n.push(s),r++):n.push(s);p=n}o="utf-8''";let e=!0;for(d=0,r=0,c=p.length;r<c;r++){if(s=p[r],e)s=this.safeEncodeURIComponent(s);else if(s=" "===s?s:this.safeEncodeURIComponent(s),s!==p[r]){if(!((this.safeEncodeURIComponent(o)+s).length>=i)){e=!0,r=d,o="";continue}l.push({line:o,encoded:e}),o="",d=r-1}(o+s).length>=i?(l.push({line:o,encoded:e}),o=s=" "===p[r]?" ":this.safeEncodeURIComponent(p[r]),s===p[r]?(e=!1,d=r-1):e=!0):o+=s}o&&l.push({line:o,encoded:e})}return l.map(((t,i)=>({key:e+"*"+i+(t.encoded?"*":""),value:t.line})))},parseHeaderValue(e){let t,i={value:!1,params:{}},n=!1,s="",a="value",o=!1,r=!1;for(let c=0,l=e.length;c<l;c++)if(t=e.charAt(c),"key"===a){if("="===t){n=s.trim().toLowerCase(),a="value",s="";continue}s+=t}else{if(r)s+=t;else{if("\\"===t){r=!0;continue}o&&t===o?o=!1:o||'"'!==t?o||";"!==t?s+=t:(!1===n?i.value=s.trim():i.params[n]=s.trim(),a="key",s=""):o=t}r=!1}return"value"===a?!1===n?i.value=s.trim():i.params[n]=s.trim():s.trim()&&(i.params[s.trim().toLowerCase()]=""),Object.keys(i.params).forEach((e=>{let t,n,s,a;(s=e.match(/(\*(\d+)|\*(\d+)\*|\*)$/))&&(t=e.substr(0,s.index),n=Number(s[2]||s[3])||0,i.params[t]&&"object"==typeof i.params[t]||(i.params[t]={charset:!1,values:[]}),a=i.params[e],0===n&&"*"===s[0].substr(-1)&&(s=a.match(/^([^']*)'[^']*'(.*)$/))&&(i.params[t].charset=s[1]||"iso-8859-1",a=s[2]),i.params[t].values[n]=a,delete i.params[e])})),Object.keys(i.params).forEach((e=>{let t;i.params[e]&&Array.isArray(i.params[e].values)&&(t=i.params[e].values.map((e=>e||"")).join(""),i.params[e].charset?i.params[e]="=?"+i.params[e].charset+"?Q?"+t.replace(/[=?_\s]/g,(e=>{let t=e.charCodeAt(0).toString(16);return" "===e?"_":"%"+(t.length<2?"0":"")+t})).replace(/%/g,"=")+"?=":i.params[e]=t)})),i},detectExtension:e=>i.detectExtension(e),detectMimeType:e=>i.detectMimeType(e),foldLines(e,t,i){t=t||76;let n,s,a=0,o=(e=(e||"").toString()).length,r="";for(;a<o;){if(n=e.substr(a,t),n.length<t){r+=n;break}(s=n.match(/^[^\n\r]*(\r?\n|\r)/))?(n=s[0],r+=n,a+=n.length):((s=n.match(/(\s+)[^\s]*$/))&&s[0].length-(i?(s[1]||"").length:0)<n.length?n=n.substr(0,n.length-(s[0].length-(i?(s[1]||"").length:0))):(s=e.substr(a+n.length).match(/^[^\s]+(\s*)/))&&(n+=s[0].substr(0,s[0].length-(i?0:(s[1]||"").length))),r+=n,a+=n.length,a<o&&(r+="\r\n"))}return r},splitMimeEncodedString:(e,t)=>{let i,n,s,a,o=[];for(t=Math.max(t||0,12);e.length;){for(i=e.substr(0,t),(n=i.match(/[=][0-9A-F]?$/i))&&(i=i.substr(0,n.index)),a=!1;!a;)a=!0,(n=e.substr(i.length).match(/^[=]([0-9A-F]{2})/i))&&(s=parseInt(n[1],16),s<194&&s>127&&(i=i.substr(0,i.length-3),a=!1));i.length&&o.push(i),e=e.substr(i.length)}return o},encodeURICharComponent:e=>{let t="",i=e.charCodeAt(0).toString(16).toUpperCase();if(i.length%2&&(i="0"+i),i.length>2)for(let e=0,n=i.length/2;e<n;e++)t+="%"+i.substr(e,2);else t+="%"+i;return t},safeEncodeURIComponent(e){e=(e||"").toString();try{e=encodeURIComponent(e)}catch(t){return e.replace(/[^\x00-\x1F *'()<>@,;:\\"[\]?=\u007F-\uFFFF]+/g,"")}return e.replace(/[\x00-\x1F *'()<>@,;:\\"[\]?=\u007F-\uFFFF]/g,(e=>this.encodeURICharComponent(e)))}},rP}function $P(){if(pP)return lP;pP=1;class e{constructor(e){this.str=(e||"").toString(),this.operatorCurrent="",this.operatorExpecting="",this.node=null,this.escaped=!1,this.list=[],this.operators={'"':'"',"(":")","<":">",",":"",":":";",";":""}}tokenize(){let e=[];for(let e=0,t=this.str.length;e<t;e++){let i=this.str.charAt(e),n=e<t-1?this.str.charAt(e+1):null;this.checkChar(i,n)}return this.list.forEach((t=>{t.value=(t.value||"").toString().trim(),t.value&&e.push(t)})),e}checkChar(e,t){if(this.escaped);else{if(e===this.operatorExpecting)return this.node={type:"operator",value:e},t&&![" ","\t","\r","\n",",",";"].includes(t)&&(this.node.noBreak=!0),this.list.push(this.node),this.node=null,this.operatorExpecting="",void(this.escaped=!1);if(!this.operatorExpecting&&e in this.operators)return this.node={type:"operator",value:e},this.list.push(this.node),this.node=null,this.operatorExpecting=this.operators[e],void(this.escaped=!1);if(['"',"'"].includes(this.operatorExpecting)&&"\\"===e)return void(this.escaped=!0)}this.node||(this.node={type:"text",value:""},this.list.push(this.node)),"\n"===e&&(e=" "),(e.charCodeAt(0)>=33||[" ","\t"].includes(e))&&(this.node.value+=e),this.escaped=!1}}function t(i,n){n=n||{};let s=new e(i).tokenize(),a=[],o=[],r=[];if(s.forEach((e=>{"operator"!==e.type||","!==e.value&&";"!==e.value?o.push(e):(o.length&&a.push(o),o=[])})),o.length&&a.push(o),a.forEach((e=>{e=function(e){let i,n,s,a=!1,o="text",r=[],c={address:[],comment:[],group:[],text:[]};for(n=0,s=e.length;n<s;n++){let t=e[n],i=n?e[n-1]:null;if("operator"===t.type)switch(t.value){case"<":o="address";break;case"(":o="comment";break;case":":o="group",a=!0;break;default:o="text"}else t.value&&("address"===o&&(t.value=t.value.replace(/^[^<]*<\s*/,"")),i&&i.noBreak&&c[o].length?c[o][c[o].length-1]+=t.value:c[o].push(t.value))}if(!c.text.length&&c.comment.length&&(c.text=c.comment,c.comment=[]),a)c.text=c.text.join(" "),r.push({name:c.text||i&&i.name,group:c.group.length?t(c.group.join(",")):[]});else{if(!c.address.length&&c.text.length){for(n=c.text.length-1;n>=0;n--)if(c.text[n].match(/^[^@\s]+@[^@\s]+$/)){c.address=c.text.splice(n,1);break}let e=function(e){return c.address.length?e:(c.address=[e.trim()]," ")};if(!c.address.length)for(n=c.text.length-1;n>=0&&(c.text[n]=c.text[n].replace(/\s*\b[^@\s]+@[^\s]+\b\s*/,e).trim(),!c.address.length);n--);}if(!c.text.length&&c.comment.length&&(c.text=c.comment,c.comment=[]),c.address.length>1&&(c.text=c.text.concat(c.address.splice(1))),c.text=c.text.join(" "),c.address=c.address.join(" "),!c.address&&a)return[];i={address:c.address||c.text||"",name:c.text||c.address||""},i.address===i.name&&((i.address||"").match(/@/)?i.name="":i.address=""),r.push(i)}return r}(e),e.length&&(r=r.concat(e))})),n.flatten){let e=[],t=i=>{i.forEach((i=>{if(i.group)return t(i.group);e.push(i)}))};return t(r),e}return r}return lP=t}function MP(){if(hP)return mP;hP=1;const e=c.Transform;return mP=class extends e{constructor(e){super(e),this.options=e||{},this.lastByte=!1}_transform(e,t,i){let n,s=0;for(let t=0,i=e.length;t<i;t++)10===e[t]&&(t&&13!==e[t-1]||!t&&13!==this.lastByte)&&(t>s&&(n=e.slice(s,t),this.push(n)),this.push(Buffer.from("\r\n")),s=t+1);s&&s<e.length?(n=e.slice(s),this.push(n)):s||this.push(e),this.lastByte=e[e.length-1],i()}},mP}function NP(){if(xP)return yP;xP=1;const e=m,t=s,i=OP(),n=c.PassThrough,a=TP(),o=RP(),r=_P(),l=PP(),p=$P(),d=IP(),u=function(){if(uP)return dP;uP=1;const e=c.Transform;return dP=class extends e{constructor(){super(),this.lastByte=!1}_transform(e,t,i){e.length&&(this.lastByte=e[e.length-1]),this.push(e),i()}_flush(e){return 10===this.lastByte?e():13===this.lastByte?(this.push(Buffer.from("\n")),e()):(this.push(Buffer.from("\r\n")),e())}}}(),h=MP(),f=function(){if(gP)return fP;gP=1;const e=c.Transform;return fP=class extends e{constructor(e){super(e),this.options=e||{}}_transform(e,t,i){let n,s=0;for(let t=0,i=e.length;t<i;t++)13===e[t]&&(n=e.slice(s,t),s=t+1,this.push(n));s&&s<e.length?(n=e.slice(s),this.push(n)):s||this.push(e),i()}},fP}();class g{constructor(t,i){this.nodeCounter=0,i=i||{},this.baseBoundary=i.baseBoundary||e.randomBytes(8).toString("hex"),this.boundaryPrefix=i.boundaryPrefix||"--_NmP",this.disableFileAccess=!!i.disableFileAccess,this.disableUrlAccess=!!i.disableUrlAccess,this.normalizeHeaderKey=i.normalizeHeaderKey,this.date=new Date,this.rootNode=i.rootNode||this,this.keepBcc=!!i.keepBcc,i.filename&&(this.filename=i.filename,t||(t=o.detectMimeType(this.filename.split(".").pop()))),this.textEncoding=(i.textEncoding||"").toString().trim().charAt(0).toUpperCase(),this.parentNode=i.parentNode,this.hostname=i.hostname,this.newline=i.newline,this.childNodes=[],this._nodeId=++this.rootNode.nodeCounter,this._headers=[],this._isPlainText=!1,this._hasLongLines=!1,this._envelope=!1,this._raw=!1,this._transforms=[],this._processFuncs=[],t&&this.setHeader("Content-Type",t)}createChild(e,t){t||"object"!=typeof e||(t=e,e=void 0);let i=new g(e,t);return this.appendChild(i),i}appendChild(e){return e.rootNode!==this.rootNode&&(e.rootNode=this.rootNode,e._nodeId=++this.rootNode.nodeCounter),e.parentNode=this,this.childNodes.push(e),e}replace(e){return e===this?this:(this.parentNode.childNodes.forEach(((t,i)=>{t===this&&(e.rootNode=this.rootNode,e.parentNode=this.parentNode,e._nodeId=this._nodeId,this.rootNode=this,this.parentNode=void 0,e.parentNode.childNodes[i]=e)})),e)}remove(){if(!this.parentNode)return this;for(let e=this.parentNode.childNodes.length-1;e>=0;e--)if(this.parentNode.childNodes[e]===this)return this.parentNode.childNodes.splice(e,1),this.parentNode=void 0,this.rootNode=this,this}setHeader(e,t){let i,n=!1;if(!t&&e&&"object"==typeof e)return e.key&&"value"in e?this.setHeader(e.key,e.value):Array.isArray(e)?e.forEach((e=>{this.setHeader(e.key,e.value)})):Object.keys(e).forEach((t=>{this.setHeader(t,e[t])})),this;i={key:e=this._normalizeHeaderKey(e),value:t};for(let t=0,s=this._headers.length;t<s;t++)this._headers[t].key===e&&(n?(this._headers.splice(t,1),t--,s--):(this._headers[t]=i,n=!0));return n||this._headers.push(i),this}addHeader(e,t){return!t&&e&&"object"==typeof e?(e.key&&e.value?this.addHeader(e.key,e.value):Array.isArray(e)?e.forEach((e=>{this.addHeader(e.key,e.value)})):Object.keys(e).forEach((t=>{this.addHeader(t,e[t])})),this):Array.isArray(t)?(t.forEach((t=>{this.addHeader(e,t)})),this):(this._headers.push({key:this._normalizeHeaderKey(e),value:t}),this)}getHeader(e){e=this._normalizeHeaderKey(e);for(let t=0,i=this._headers.length;t<i;t++)if(this._headers[t].key===e)return this._headers[t].value}setContent(e){return this.content=e,"function"==typeof this.content.pipe?(this._contentErrorHandler=e=>{this.content.removeListener("error",this._contentErrorHandler),this.content=e},this.content.once("error",this._contentErrorHandler)):"string"==typeof this.content&&(this._isPlainText=o.isPlainText(this.content),this._isPlainText&&o.hasLongerLines(this.content,76)&&(this._hasLongLines=!0)),this}build(e){let t;e||(t=new Promise(((t,i)=>{e=a.callbackPromise(t,i)})));let i=this.createReadStream(),n=[],s=0,o=!1;return i.on("readable",(()=>{let e;for(;null!==(e=i.read());)n.push(e),s+=e.length})),i.once("error",(t=>{if(!o)return o=!0,e(t)})),i.once("end",(t=>{if(!o)return o=!0,t&&t.length&&(n.push(t),s+=t.length),e(null,Buffer.concat(n,s))})),t}getTransferEncoding(){let e=!1,t=(this.getHeader("Content-Type")||"").toString().toLowerCase().trim();return this.content&&(e=(this.getHeader("Content-Transfer-Encoding")||"").toString().toLowerCase().trim(),e&&["base64","quoted-printable"].includes(e)||(/^text\//i.test(t)?e=this._isPlainText&&!this._hasLongLines?"7bit":"string"==typeof this.content||this.content instanceof Buffer?"Q"===this._getTextEncoding(this.content)?"quoted-printable":"base64":"B"===this.textEncoding?"base64":"quoted-printable":/^(multipart|message)\//i.test(t)||(e=e||"base64"))),e}buildHeaders(){let e=this.getTransferEncoding(),t=[];if(e&&this.setHeader("Content-Transfer-Encoding",e),this.filename&&!this.getHeader("Content-Disposition")&&this.setHeader("Content-Disposition","attachment"),this.rootNode===this){this.getHeader("Date")||this.setHeader("Date",this.date.toUTCString().replace(/GMT/,"+0000")),this.messageId(),this.getHeader("MIME-Version")||this.setHeader("MIME-Version","1.0");for(let e=this._headers.length-2;e>=0;e--){let t=this._headers[e];"Content-Type"===t.key&&(this._headers.splice(e,1),this._headers.push(t))}}return this._headers.forEach((e=>{let i,n,s=e.key,a=e.value,r={};if(!a||"object"!=typeof a||["From","Sender","To","Cc","Bcc","Reply-To","Date","References"].includes(s)||(Object.keys(a).forEach((e=>{"value"!==e&&(r[e]=a[e])})),a=(a.value||"").toString(),a.trim()))if(r.prepared)r.foldLines?t.push(o.foldLines(s+": "+a)):t.push(s+": "+a);else{switch(e.key){case"Content-Disposition":i=o.parseHeaderValue(a),this.filename&&(i.params.filename=this.filename),a=o.buildHeaderValue(i);break;case"Content-Type":i=o.parseHeaderValue(a),this._handleContentType(i),i.value.match(/^text\/plain\b/)&&"string"==typeof this.content&&/[\u0080-\uFFFF]/.test(this.content)&&(i.params.charset="utf-8"),a=o.buildHeaderValue(i),this.filename&&(n=this._encodeWords(this.filename),(n!==this.filename||/[\s'"\\;:/=(),<>@[\]?]|^-/.test(n))&&(n='"'+n+'"'),a+="; name="+n);break;case"Bcc":if(!this.keepBcc)return}if(a=this._encodeHeaderValue(s,a),(a||"").toString().trim()){if("function"==typeof this.normalizeHeaderKey){let e=this.normalizeHeaderKey(s,a);e&&"string"==typeof e&&e.length&&(s=e)}t.push(o.foldLines(s+": "+a,76))}}})),t.join("\r\n")}createReadStream(e){let t,i=new n(e=e||{}),s=i;this.stream(i,e,(e=>{e?s.emit("error",e):i.end()}));for(let e=0,i=this._transforms.length;e<i;e++)t="function"==typeof this._transforms[e]?this._transforms[e]():this._transforms[e],s.once("error",(e=>{t.emit("error",e)})),s=s.pipe(t);t=new u,s.once("error",(e=>{t.emit("error",e)})),s=s.pipe(t);for(let e=0,i=this._processFuncs.length;e<i;e++)t=this._processFuncs[e],s=t(s);if(this.newline){const e=["win","windows","dos","\r\n"].includes(this.newline.toString().toLowerCase())?new h:new f,t=s.pipe(e);return s.on("error",(e=>t.emit("error",e))),t}return s}transform(e){this._transforms.push(e)}processFunc(e){this._processFuncs.push(e)}stream(e,t,i){let n,s,a=this.getTransferEncoding(),o=!1,c=e=>{o||(o=!0,i(e))},p=()=>{let i=0,n=()=>{if(i>=this.childNodes.length)return e.write("\r\n--"+this.boundary+"--\r\n"),c();let s=this.childNodes[i++];e.write((i>1?"\r\n":"")+"--"+this.boundary+"\r\n"),s.stream(e,t,(e=>{if(e)return c(e);setImmediate(n)}))};if(!this.multipart)return c();setImmediate(n)},d=()=>{if(!this.content)return setImmediate(p);{if("[object Error]"===Object.prototype.toString.call(this.content))return c(this.content);"function"==typeof this.content.pipe&&(this.content.removeListener("error",this._contentErrorHandler),this._contentErrorHandler=e=>c(e),this.content.once("error",this._contentErrorHandler));let i=()=>{["quoted-printable","base64"].includes(a)?(n=new("base64"===a?l:r).Encoder(t),n.pipe(e,{end:!1}),n.once("end",p),n.once("error",(e=>c(e))),s=this._getStream(this.content),s.pipe(n)):(s=this._getStream(this.content),s.pipe(e,{end:!1}),s.once("end",p)),s.once("error",(e=>c(e)))};if(this.content._resolve){let e=[],t=0,n=!1,s=this._getStream(this.content);s.on("error",(e=>{n||(n=!0,c(e))})),s.on("readable",(()=>{let i;for(;null!==(i=s.read());)e.push(i),t+=i.length})),s.on("end",(()=>{n||(n=!0,this.content._resolve=!1,this.content._resolvedValue=Buffer.concat(e,t),setImmediate(i))}))}else setImmediate(i)}};this._raw?setImmediate((()=>{if("[object Error]"===Object.prototype.toString.call(this._raw))return c(this._raw);"function"==typeof this._raw.pipe&&this._raw.removeListener("error",this._contentErrorHandler);let t=this._getStream(this._raw);t.pipe(e,{end:!1}),t.on("error",(t=>e.emit("error",t))),t.on("end",p)})):(e.write(this.buildHeaders()+"\r\n\r\n"),setImmediate(d))}setEnvelope(e){let t;this._envelope={from:!1,to:[]},e.from&&(t=[],this._convertAddresses(this._parseAddresses(e.from),t),t=t.filter((e=>e&&e.address)),t.length&&t[0]&&(this._envelope.from=t[0].address)),["to","cc","bcc"].forEach((t=>{e[t]&&this._convertAddresses(this._parseAddresses(e[t]),this._envelope.to)})),this._envelope.to=this._envelope.to.map((e=>e.address)).filter((e=>e));let i=["to","cc","bcc","from"];return Object.keys(e).forEach((t=>{i.includes(t)||(this._envelope[t]=e[t])})),this}getAddresses(){let e={};return this._headers.forEach((t=>{let i=t.key.toLowerCase();["from","sender","reply-to","to","cc","bcc"].includes(i)&&(Array.isArray(e[i])||(e[i]=[]),this._convertAddresses(this._parseAddresses(t.value),e[i]))})),e}getEnvelope(){if(this._envelope)return this._envelope;let e={from:!1,to:[]};return this._headers.forEach((t=>{let i=[];"From"===t.key||!e.from&&["Reply-To","Sender"].includes(t.key)?(this._convertAddresses(this._parseAddresses(t.value),i),i.length&&i[0]&&(e.from=i[0].address)):["To","Cc","Bcc"].includes(t.key)&&this._convertAddresses(this._parseAddresses(t.value),e.to)})),e.to=e.to.map((e=>e.address)),e}messageId(){let e=this.getHeader("Message-ID");return e||(e=this._generateMessageId(),this.setHeader("Message-ID",e)),e}setRaw(e){return this._raw=e,this._raw&&"function"==typeof this._raw.pipe&&(this._contentErrorHandler=e=>{this._raw.removeListener("error",this._contentErrorHandler),this._raw=e},this._raw.once("error",this._contentErrorHandler)),this}_getStream(e){let i;return e._resolvedValue?(i=new n,setImmediate((()=>{try{i.end(e._resolvedValue)}catch(e){i.emit("error",e)}})),i):"function"==typeof e.pipe?e:e&&"string"==typeof e.path&&!e.href?this.disableFileAccess?(i=new n,setImmediate((()=>i.emit("error",new Error("File access rejected for "+e.path)))),i):t.createReadStream(e.path):e&&"string"==typeof e.href?this.disableUrlAccess?(i=new n,setImmediate((()=>i.emit("error",new Error("Url access rejected for "+e.href)))),i):d(e.href,{headers:e.httpHeaders}):(i=new n,setImmediate((()=>{try{i.end(e||"")}catch(e){i.emit("error",e)}})),i)}_parseAddresses(e){return[].concat.apply([],[].concat(e).map((e=>e&&e.address?(e.address=this._normalizeAddress(e.address),e.name=e.name||"",[e]):p(e))))}_normalizeHeaderKey(e){return e=(e||"").toString().replace(/\r?\n|\r/g," ").trim().toLowerCase().replace(/^X-SMTPAPI$|^(MIME|DKIM|ARC|BIMI)\b|^[a-z]|-(SPF|FBL|ID|MD5)$|-[a-z]/gi,(e=>e.toUpperCase())).replace(/^Content-Features$/i,"Content-features"),e}_handleContentType(e){this.contentType=e.value.trim().toLowerCase(),this.multipart=!!/^multipart\//i.test(this.contentType)&&this.contentType.substr(this.contentType.indexOf("/")+1),this.multipart?this.boundary=e.params.boundary=e.params.boundary||this.boundary||this._generateBoundary():this.boundary=!1}_generateBoundary(){return this.rootNode.boundaryPrefix+"-"+this.rootNode.baseBoundary+"-Part_"+this._nodeId}_encodeHeaderValue(e,t){switch(e=this._normalizeHeaderKey(e)){case"From":case"Sender":case"To":case"Cc":case"Bcc":case"Reply-To":return this._convertAddresses(this._parseAddresses(t));case"Message-ID":case"In-Reply-To":case"Content-Id":return"<"!==(t=(t||"").toString().replace(/\r?\n|\r/g," ")).charAt(0)&&(t="<"+t),">"!==t.charAt(t.length-1)&&(t+=">"),t;case"References":return(t=[].concat.apply([],[].concat(t||"").map((e=>(e=(e||"").toString().replace(/\r?\n|\r/g," ").trim()).replace(/<[^>]*>/g,(e=>e.replace(/\s/g,""))).split(/\s+/)))).map((e=>("<"!==e.charAt(0)&&(e="<"+e),">"!==e.charAt(e.length-1)&&(e+=">"),e)))).join(" ").trim();case"Date":return"[object Date]"===Object.prototype.toString.call(t)?t.toUTCString().replace(/GMT/,"+0000"):(t=(t||"").toString().replace(/\r?\n|\r/g," "),this._encodeWords(t));case"Content-Type":case"Content-Disposition":return(t||"").toString().replace(/\r?\n|\r/g," ");default:return t=(t||"").toString().replace(/\r?\n|\r/g," "),this._encodeWords(t)}}_convertAddresses(e,t){let i=[];return t=t||[],[].concat(e||[]).forEach((e=>{if(e.address)e.address=this._normalizeAddress(e.address),e.name?e.name&&i.push(`${this._encodeAddressName(e.name)} <${e.address}>`):i.push(e.address.indexOf(" ")>=0?`<${e.address}>`:`${e.address}`),e.address&&(t.filter((t=>t.address===e.address)).length||t.push(e));else if(e.group){let n=(e.group.length?this._convertAddresses(e.group,t):"").trim();i.push(`${this._encodeAddressName(e.name)}:${n};`)}})),i.join(", ")}_normalizeAddress(e){let t=(e=(e||"").toString().replace(/[\x00-\x1F<>]+/g," ").trim()).lastIndexOf("@");if(t<0)return e;let n,s=e.substr(0,t),a=e.substr(t+1);try{n=i.toASCII(a.toLowerCase())}catch(e){}return s.indexOf(" ")>=0&&('"'!==s.charAt(0)&&(s='"'+s),'"'!==s.substr(-1)&&(s+='"')),`${s}@${n}`}_encodeAddressName(e){return/^[\w ]*$/.test(e)?e:/^[\x20-\x7e]*$/.test(e)?'"'+e.replace(/([\\"])/g,"\\$1")+'"':o.encodeWord(e,this._getTextEncoding(e),52)}_encodeWords(e){return o.encodeWords(e,this._getTextEncoding(e),52,!0)}_getTextEncoding(e){e=(e||"").toString();let t,i,n=this.textEncoding;return n||(i=(e.match(/[\x00-\x08\x0B\x0C\x0E-\x1F\u0080-\uFFFF]/g)||[]).length,t=(e.match(/[a-z]/gi)||[]).length,n=i<t?"Q":"B"),n}_generateMessageId(){return"<"+[2,2,2,6].reduce(((t,i)=>t+"-"+e.randomBytes(i).toString("hex")),e.randomBytes(4).toString("hex"))+"@"+(this.getEnvelope().from||this.hostname||"localhost").split("@").pop()+">"}}return yP=g}var DP,jP,zP,LP,FP,UP,BP,HP,qP,VP,GP,WP,KP,QP,XP,JP,YP,ZP={exports:{}};function e_(){if(DP)return ZP.exports;DP=1;const e=OP(),t=RP(),i=m;function n(e,t,i){let n=new Set,a=new Set,o=new Map;(i||"").toLowerCase().split(":").forEach((e=>{a.add(e.trim())})),(t||"").toLowerCase().split(":").filter((e=>!a.has(e.trim()))).forEach((e=>{n.add(e.trim())}));for(let t=e.length-1;t>=0;t--){let i=e[t];n.has(i.key)&&!o.has(i.key)&&o.set(i.key,s(i.line))}let r=[],c=[];return n.forEach((e=>{o.has(e)&&(c.push(e),r.push(e+":"+o.get(e)))})),{headers:r.join("\r\n")+"\r\n",fieldNames:c.join(":")}}function s(e){return e.substr(e.indexOf(":")+1).replace(/\r?\n/g,"").replace(/\s+/g," ").trim()}return ZP.exports=(a,o,r,c)=>{let l,p,d=n(a,(c=c||{}).headerFieldNames||"From:Sender:Reply-To:Subject:Date:Message-ID:To:Cc:MIME-Version:Content-Type:Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive",c.skipFields),u=function(i,n,s,a,o){let r=["v=1","a=rsa-"+a,"c=relaxed/relaxed","d="+e.toASCII(i),"q=dns/txt","s="+n,"bh="+o,"h="+s].join("; ");return t.foldLines("DKIM-Signature: "+r,76)+";\r\n b="}(c.domainName,c.keySelector,d.fieldNames,o,r);d.headers+="dkim-signature:"+s(u),l=i.createSign(("rsa-"+o).toUpperCase()),l.update(d.headers);try{p=l.sign(c.privateKey,"base64")}catch(e){return!1}return u+p.replace(/(^.{73}|.{75}(?!\r?\n|\r))/g,"$&\r\n ").trim()},ZP.exports.relaxedHeaders=n,ZP.exports}function t_(){if(zP)return jP;zP=1;const e=function(){if(EP)return bP;EP=1;const e=c.Transform;return bP=class extends e{constructor(e){super(e),this.lastBytes=Buffer.alloc(4),this.headersParsed=!1,this.headerBytes=0,this.headerChunks=[],this.rawHeaders=!1,this.bodySize=0}updateLastBytes(e){let t=this.lastBytes.length,i=Math.min(e.length,t);for(let e=0,n=t-i;e<n;e++)this.lastBytes[e]=this.lastBytes[e+i];for(let n=1;n<=i;n++)this.lastBytes[t-n]=e[e.length-n]}checkHeaders(e){if(this.headersParsed)return!0;let t=this.lastBytes.length,i=0;this.curLinePos=0;for(let n=0,s=this.lastBytes.length+e.length;n<s;n++){let s;if(s=n<t?this.lastBytes[n]:e[n-t],10===s&&n){let s=n-1<t?this.lastBytes[n-1]:e[n-1-t],a=n>1&&(n-2<t?this.lastBytes[n-2]:e[n-2-t]);if(10===s){this.headersParsed=!0,i=n-t+1,this.headerBytes+=i;break}if(13===s&&10===a){this.headersParsed=!0,i=n-t+1,this.headerBytes+=i;break}}}if(this.headersParsed){if(this.headerChunks.push(e.slice(0,i)),this.rawHeaders=Buffer.concat(this.headerChunks,this.headerBytes),this.headerChunks=null,this.emit("headers",this.parseHeaders()),e.length-1>i){let t=e.slice(i);this.bodySize+=t.length,setImmediate((()=>this.push(t)))}return!1}return this.headerBytes+=e.length,this.headerChunks.push(e),this.updateLastBytes(e),!1}_transform(e,t,i){if(!e||!e.length)return i();let n;"string"==typeof e&&(e=Buffer.from(e,t));try{n=this.checkHeaders(e)}catch(e){return i(e)}n&&(this.bodySize+=e.length,this.push(e)),setImmediate(i)}_flush(e){if(this.headerChunks){let e=Buffer.concat(this.headerChunks,this.headerBytes);this.bodySize+=e.length,this.push(e),this.headerChunks=null}e()}parseHeaders(){let e=(this.rawHeaders||"").toString().split(/\r?\n/);for(let t=e.length-1;t>0;t--)/^\s/.test(e[t])&&(e[t-1]+="\n"+e[t],e.splice(t,1));return e.filter((e=>e.trim())).map((e=>({key:e.substr(0,e.indexOf(":")).trim().toLowerCase(),line:e})))}},bP}(),t=function(){if(CP)return SP;CP=1;const e=c.Transform,t=m;return SP=class extends e{constructor(e){super(),e=e||{},this.chunkBuffer=[],this.chunkBufferLen=0,this.bodyHash=t.createHash(e.hashAlgo||"sha1"),this.remainder="",this.byteLength=0,this.debug=e.debug,this._debugBody=!!e.debug&&[]}updateHash(e){let t,i="",n="file";for(let t=e.length-1;t>=0;t--){let s=e[t];if("file"!==n||10!==s&&13!==s)if("file"!==n||9!==s&&32!==s){if(("line"!==n||9!==s&&32!==s)&&("file"===n||"line"===n)&&(n="body",t===e.length-1))break}else n="line";if(0===t){if("file"===n&&(!this.remainder||/[\r\n]$/.test(this.remainder))||"line"===n&&(!this.remainder||/[ \t]$/.test(this.remainder)))return void(this.remainder+=e.toString("binary"));if("line"===n||"file"===n){i=e.toString("binary"),e=!1;break}}if("body"===n){i=e.slice(t+1).toString("binary"),e=e.slice(0,t+1);break}}let s=!!this.remainder;if(e&&!s)for(let t=0,i=e.length;t<i;t++){if(t&&10===e[t]&&13!==e[t-1]){s=!0;break}if(t&&13===e[t]&&32===e[t-1]){s=!0;break}if(t&&32===e[t]&&32===e[t-1]){s=!0;break}if(9===e[t]){s=!0;break}}s?(t=this.remainder+(e?e.toString("binary"):""),this.remainder=i,t=t.replace(/\r?\n/g,"\n").replace(/[ \t]*$/gm,"").replace(/[ \t]+/gm," ").replace(/\n/g,"\r\n"),e=Buffer.from(t,"binary")):i&&(this.remainder=i),this.debug&&this._debugBody.push(e),this.bodyHash.update(e)}_transform(e,t,i){if(!e||!e.length)return i();"string"==typeof e&&(e=Buffer.from(e,t)),this.updateHash(e),this.byteLength+=e.length,this.push(e),i()}_flush(e){/[\r\n]$/.test(this.remainder)&&this.byteLength>2&&this.bodyHash.update(Buffer.from("\r\n")),this.byteLength||this.push(Buffer.from("\r\n")),this.emit("hash",this.bodyHash.digest("base64"),!!this.debug&&Buffer.concat(this._debugBody)),e()}},SP}(),i=e_(),n=c.PassThrough,a=s,o=u,r=m;class l{constructor(e,t,i,n){this.options=e||{},this.keys=t,this.cacheTreshold=Number(this.options.cacheTreshold)||131072,this.hashAlgo=this.options.hashAlgo||"sha256",this.cacheDir=this.options.cacheDir||!1,this.chunks=[],this.chunklen=0,this.readPos=0,this.cachePath=!!this.cacheDir&&o.join(this.cacheDir,"message."+Date.now()+"-"+r.randomBytes(14).toString("hex")),this.cache=!1,this.headers=!1,this.bodyHash=!1,this.parser=!1,this.relaxedBody=!1,this.input=i,this.output=n,this.output.usingCache=!1,this.hasErrored=!1,this.input.on("error",(e=>{this.hasErrored=!0,this.cleanup(),n.emit("error",e)}))}cleanup(){this.cache&&this.cachePath&&a.unlink(this.cachePath,(()=>!1))}createReadCache(){this.cache=a.createReadStream(this.cachePath),this.cache.once("error",(e=>{this.cleanup(),this.output.emit("error",e)})),this.cache.once("close",(()=>{this.cleanup()})),this.cache.pipe(this.output)}sendNextChunk(){if(this.hasErrored)return;if(this.readPos>=this.chunks.length)return this.cache?this.createReadCache():this.output.end();let e=this.chunks[this.readPos++];if(!1===this.output.write(e))return this.output.once("drain",(()=>{this.sendNextChunk()}));setImmediate((()=>this.sendNextChunk()))}sendSignedOutput(){let e=0,t=()=>{if(e>=this.keys.length)return this.output.write(this.parser.rawHeaders),setImmediate((()=>this.sendNextChunk()));let n=this.keys[e++],s=i(this.headers,this.hashAlgo,this.bodyHash,{domainName:n.domainName,keySelector:n.keySelector,privateKey:n.privateKey,headerFieldNames:this.options.headerFieldNames,skipFields:this.options.skipFields});return s&&this.output.write(Buffer.from(s+"\r\n")),setImmediate(t)};if(this.bodyHash&&this.headers)return t();this.output.write(this.parser.rawHeaders),this.sendNextChunk()}createWriteCache(){this.output.usingCache=!0,this.cache=a.createWriteStream(this.cachePath),this.cache.once("error",(e=>{this.cleanup(),this.relaxedBody.unpipe(this.cache),this.relaxedBody.on("readable",(()=>{for(;null!==this.relaxedBody.read(););})),this.hasErrored=!0,this.output.emit("error",e)})),this.cache.once("close",(()=>{this.sendSignedOutput()})),this.relaxedBody.removeAllListeners("readable"),this.relaxedBody.pipe(this.cache)}signStream(){this.parser=new e,this.relaxedBody=new t({hashAlgo:this.hashAlgo}),this.parser.on("headers",(e=>{this.headers=e})),this.relaxedBody.on("hash",(e=>{this.bodyHash=e})),this.relaxedBody.on("readable",(()=>{let e;if(!this.cache)for(;null!==(e=this.relaxedBody.read());)if(this.chunks.push(e),this.chunklen+=e.length,this.chunklen>=this.cacheTreshold&&this.cachePath)return this.createWriteCache()})),this.relaxedBody.on("end",(()=>{this.cache||this.sendSignedOutput()})),this.parser.pipe(this.relaxedBody),setImmediate((()=>this.input.pipe(this.parser)))}}return jP=class{constructor(e){this.options=e||{},this.keys=[].concat(this.options.keys||{domainName:e.domainName,keySelector:e.keySelector,privateKey:e.privateKey})}sign(e,t){let i=new n,s=e,a=!1;Buffer.isBuffer(e)?(a=e,s=new n):"string"==typeof e&&(a=Buffer.from(e),s=new n);let o=this.options;t&&Object.keys(t).length&&(o={},Object.keys(this.options||{}).forEach((e=>{o[e]=this.options[e]})),Object.keys(t||{}).forEach((e=>{e in o||(o[e]=t[e])})));let r=new l(o,this.keys,s,i);return setImmediate((()=>{r.signStream(),a&&setImmediate((()=>{s.end(a)}))})),i}}}function i_(){if(qP)return HP;qP=1;const e=t,s=TP(),a=kP(),o=function(){if(wP)return vP;wP=1;const e=NP(),t=RP(),i=TP().parseDataURI;return vP=class{constructor(e){this.mail=e||{},this.message=!1}compile(){return this._alternatives=this.getAlternatives(),this._htmlNode=this._alternatives.filter((e=>/^text\/html\b/i.test(e.contentType))).pop(),this._attachments=this.getAttachments(!!this._htmlNode),this._useRelated=!(!this._htmlNode||!this._attachments.related.length),this._useAlternative=this._alternatives.length>1,this._useMixed=this._attachments.attached.length>1||this._alternatives.length&&1===this._attachments.attached.length,this.mail.raw?this.message=new e("message/rfc822",{newline:this.mail.newline}).setRaw(this.mail.raw):this._useMixed?this.message=this._createMixed():this._useAlternative?this.message=this._createAlternative():this._useRelated?this.message=this._createRelated():this.message=this._createContentNode(!1,[].concat(this._alternatives||[]).concat(this._attachments.attached||[]).shift()||{contentType:"text/plain",content:""}),this.mail.headers&&this.message.addHeader(this.mail.headers),["from","sender","to","cc","bcc","reply-to","in-reply-to","references","subject","message-id","date"].forEach((e=>{let t=e.replace(/-(\w)/g,((e,t)=>t.toUpperCase()));this.mail[t]&&this.message.setHeader(e,this.mail[t])})),this.mail.envelope&&this.message.setEnvelope(this.mail.envelope),this.message.messageId(),this.message}getAttachments(e){let i,n,s=[].concat(this.mail.attachments||[]).map(((e,i)=>{let n,s=/^message\//i.test(e.contentType);/^data:/i.test(e.path||e.href)&&(e=this._processDataUrl(e));let a=e.contentType||t.detectMimeType(e.filename||e.path||e.href||"bin"),o=/^image\//i.test(a);return n={contentType:a,contentDisposition:e.contentDisposition||(s||o&&e.cid?"inline":"attachment"),contentTransferEncoding:"contentTransferEncoding"in e?e.contentTransferEncoding:"base64"},e.filename?n.filename=e.filename:s||!1===e.filename||(n.filename=(e.path||e.href||"").split("/").pop().split("?").shift()||"attachment-"+(i+1),n.filename.indexOf(".")<0&&(n.filename+="."+t.detectExtension(n.contentType))),/^https?:\/\//i.test(e.path)&&(e.href=e.path,e.path=void 0),e.cid&&(n.cid=e.cid),e.raw?n.raw=e.raw:e.path?n.content={path:e.path}:e.href?n.content={href:e.href,httpHeaders:e.httpHeaders}:n.content=e.content||"",e.encoding&&(n.encoding=e.encoding),e.headers&&(n.headers=e.headers),n}));return this.mail.icalEvent&&(i="object"==typeof this.mail.icalEvent&&(this.mail.icalEvent.content||this.mail.icalEvent.path||this.mail.icalEvent.href||this.mail.icalEvent.raw)?this.mail.icalEvent:{content:this.mail.icalEvent},n={},Object.keys(i).forEach((e=>{n[e]=i[e]})),n.contentType="application/ics",n.headers||(n.headers={}),n.filename=n.filename||"invite.ics",n.headers["Content-Disposition"]="attachment",n.headers["Content-Transfer-Encoding"]="base64"),e?{attached:s.filter((e=>!e.cid)).concat(n||[]),related:s.filter((e=>!!e.cid))}:{attached:s.concat(n||[]),related:[]}}getAlternatives(){let e,i,n,s,a,o,r=[];return this.mail.text&&(e="object"==typeof this.mail.text&&(this.mail.text.content||this.mail.text.path||this.mail.text.href||this.mail.text.raw)?this.mail.text:{content:this.mail.text},e.contentType="text/plain; charset=utf-8"),this.mail.watchHtml&&(n="object"==typeof this.mail.watchHtml&&(this.mail.watchHtml.content||this.mail.watchHtml.path||this.mail.watchHtml.href||this.mail.watchHtml.raw)?this.mail.watchHtml:{content:this.mail.watchHtml},n.contentType="text/watch-html; charset=utf-8"),this.mail.amp&&(s="object"==typeof this.mail.amp&&(this.mail.amp.content||this.mail.amp.path||this.mail.amp.href||this.mail.amp.raw)?this.mail.amp:{content:this.mail.amp},s.contentType="text/x-amp-html; charset=utf-8"),this.mail.icalEvent&&(a="object"==typeof this.mail.icalEvent&&(this.mail.icalEvent.content||this.mail.icalEvent.path||this.mail.icalEvent.href||this.mail.icalEvent.raw)?this.mail.icalEvent:{content:this.mail.icalEvent},o={},Object.keys(a).forEach((e=>{o[e]=a[e]})),o.content&&"object"==typeof o.content&&(o.content._resolve=!0),o.filename=!1,o.contentType="text/calendar; charset=utf-8; method="+(o.method||"PUBLISH").toString().trim().toUpperCase(),o.headers||(o.headers={})),this.mail.html&&(i="object"==typeof this.mail.html&&(this.mail.html.content||this.mail.html.path||this.mail.html.href||this.mail.html.raw)?this.mail.html:{content:this.mail.html},i.contentType="text/html; charset=utf-8"),[].concat(e||[]).concat(n||[]).concat(s||[]).concat(i||[]).concat(o||[]).concat(this.mail.alternatives||[]).forEach((e=>{let i;/^data:/i.test(e.path||e.href)&&(e=this._processDataUrl(e)),i={contentType:e.contentType||t.detectMimeType(e.filename||e.path||e.href||"txt"),contentTransferEncoding:e.contentTransferEncoding},e.filename&&(i.filename=e.filename),/^https?:\/\//i.test(e.path)&&(e.href=e.path,e.path=void 0),e.raw?i.raw=e.raw:e.path?i.content={path:e.path}:e.href?i.content={href:e.href}:i.content=e.content||"",e.encoding&&(i.encoding=e.encoding),e.headers&&(i.headers=e.headers),r.push(i)})),r}_createMixed(t){let i;return i=t?t.createChild("multipart/mixed",{disableUrlAccess:this.mail.disableUrlAccess,disableFileAccess:this.mail.disableFileAccess,normalizeHeaderKey:this.mail.normalizeHeaderKey,newline:this.mail.newline}):new e("multipart/mixed",{baseBoundary:this.mail.baseBoundary,textEncoding:this.mail.textEncoding,boundaryPrefix:this.mail.boundaryPrefix,disableUrlAccess:this.mail.disableUrlAccess,disableFileAccess:this.mail.disableFileAccess,normalizeHeaderKey:this.mail.normalizeHeaderKey,newline:this.mail.newline}),this._useAlternative?this._createAlternative(i):this._useRelated&&this._createRelated(i),[].concat(!this._useAlternative&&this._alternatives||[]).concat(this._attachments.attached||[]).forEach((e=>{this._useRelated&&e===this._htmlNode||this._createContentNode(i,e)})),i}_createAlternative(t){let i;return i=t?t.createChild("multipart/alternative",{disableUrlAccess:this.mail.disableUrlAccess,disableFileAccess:this.mail.disableFileAccess,normalizeHeaderKey:this.mail.normalizeHeaderKey,newline:this.mail.newline}):new e("multipart/alternative",{baseBoundary:this.mail.baseBoundary,textEncoding:this.mail.textEncoding,boundaryPrefix:this.mail.boundaryPrefix,disableUrlAccess:this.mail.disableUrlAccess,disableFileAccess:this.mail.disableFileAccess,normalizeHeaderKey:this.mail.normalizeHeaderKey,newline:this.mail.newline}),this._alternatives.forEach((e=>{this._useRelated&&this._htmlNode===e?this._createRelated(i):this._createContentNode(i,e)})),i}_createRelated(t){let i;return i=t?t.createChild('multipart/related; type="text/html"',{disableUrlAccess:this.mail.disableUrlAccess,disableFileAccess:this.mail.disableFileAccess,normalizeHeaderKey:this.mail.normalizeHeaderKey,newline:this.mail.newline}):new e('multipart/related; type="text/html"',{baseBoundary:this.mail.baseBoundary,textEncoding:this.mail.textEncoding,boundaryPrefix:this.mail.boundaryPrefix,disableUrlAccess:this.mail.disableUrlAccess,disableFileAccess:this.mail.disableFileAccess,normalizeHeaderKey:this.mail.normalizeHeaderKey,newline:this.mail.newline}),this._createContentNode(i,this._htmlNode),this._attachments.related.forEach((e=>this._createContentNode(i,e))),i}_createContentNode(t,i){let n;(i=i||{}).content=i.content||"";let s=(i.encoding||"utf8").toString().toLowerCase().replace(/[-_\s]/g,"");return n=t?t.createChild(i.contentType,{filename:i.filename,textEncoding:this.mail.textEncoding,disableUrlAccess:this.mail.disableUrlAccess,disableFileAccess:this.mail.disableFileAccess,normalizeHeaderKey:this.mail.normalizeHeaderKey,newline:this.mail.newline}):new e(i.contentType,{filename:i.filename,baseBoundary:this.mail.baseBoundary,textEncoding:this.mail.textEncoding,boundaryPrefix:this.mail.boundaryPrefix,disableUrlAccess:this.mail.disableUrlAccess,disableFileAccess:this.mail.disableFileAccess,normalizeHeaderKey:this.mail.normalizeHeaderKey,newline:this.mail.newline}),i.headers&&n.addHeader(i.headers),i.cid&&n.setHeader("Content-Id","<"+i.cid.replace(/[<>]/g,"")+">"),i.contentTransferEncoding?n.setHeader("Content-Transfer-Encoding",i.contentTransferEncoding):this.mail.encoding&&/^text\//i.test(i.contentType)&&n.setHeader("Content-Transfer-Encoding",this.mail.encoding),/^text\//i.test(i.contentType)&&!i.contentDisposition||n.setHeader("Content-Disposition",i.contentDisposition||(i.cid&&/^image\//i.test(i.contentType)?"inline":"attachment")),"string"!=typeof i.content||["utf8","usascii","ascii"].includes(s)||(i.content=Buffer.from(i.content,s)),i.raw?n.setRaw(i.raw):n.setContent(i.content),n}_processDataUrl(e){let t;return(e.path||e.href).match(/^data:/)&&(t=i(e.path||e.href)),t?(e.content=t.data,e.contentType=e.contentType||t.contentType,"path"in e&&(e.path=!1),"href"in e&&(e.href=!1),e):e}},vP}(),r=t_(),c=function(){if(FP)return LP;FP=1;const e=l,t=h,n=i;return LP=function i(s,a,o,r){let c,l,p,d=n.parse(s);c={host:d.hostname,port:Number(d.port)?Number(d.port):"https:"===d.protocol?443:80},"https:"===d.protocol?(c.rejectUnauthorized=!1,l=t.connect.bind(t)):l=e.connect.bind(e);let u=!1,m=e=>{if(!u){u=!0;try{p.destroy()}catch(e){}r(e)}},h=()=>{let e=new Error("Proxy socket timed out");e.code="ETIMEDOUT",m(e)};p=l(c,(()=>{if(u)return;let e={Host:o+":"+a,Connection:"close"};d.auth&&(e["Proxy-Authorization"]="Basic "+Buffer.from(d.auth).toString("base64")),p.write("CONNECT "+o+":"+a+" HTTP/1.1\r\n"+Object.keys(e).map((t=>t+": "+e[t])).join("\r\n")+"\r\n\r\n");let t="",i=e=>{let n,s;if(!u&&(t+=e.toString("binary"),n=t.match(/\r\n\r\n/))){if(p.removeListener("data",i),s=t.substr(n.index+n[0].length),t=t.substr(0,n.index),s&&p.unshift(Buffer.from(s,"binary")),u=!0,n=t.match(/^HTTP\/\d+\.\d+ (\d+)/i),!n||"2"!==(n[1]||"").charAt(0)){try{p.destroy()}catch(e){}return r(new Error("Invalid response from proxy"+(n&&": "+n[1]||"")))}return p.removeListener("error",m),p.removeListener("timeout",h),p.setTimeout(0),r(null,p)}};p.on("data",i)})),p.setTimeout(i.timeout||3e4),p.on("timeout",h),p.once("error",m)},LP}(),d=n,u=i,f=AP,g=function(){if(BP)return UP;BP=1;const e=TP(),t=NP(),i=RP();return UP=class{constructor(e,t){this.mailer=e,this.data={},this.message=null,t=t||{};let i=e.options||{},n=e._defaults||{};Object.keys(t).forEach((e=>{this.data[e]=t[e]})),this.data.headers=this.data.headers||{},Object.keys(n).forEach((e=>{e in this.data?"headers"===e&&Object.keys(n.headers).forEach((e=>{e in this.data.headers||(this.data.headers[e]=n.headers[e])})):this.data[e]=n[e]})),["disableFileAccess","disableUrlAccess","normalizeHeaderKey"].forEach((e=>{e in i&&(this.data[e]=i[e])}))}resolveContent(...t){return e.resolveContent(...t)}resolveAll(n){let s=[[this.data,"html"],[this.data,"text"],[this.data,"watchHtml"],[this.data,"amp"],[this.data,"icalEvent"]];this.data.alternatives&&this.data.alternatives.length&&this.data.alternatives.forEach(((e,t)=>{s.push([this.data.alternatives,t])})),this.data.attachments&&this.data.attachments.length&&this.data.attachments.forEach(((e,t)=>{e.filename||(e.filename=(e.path||e.href||"").split("/").pop().split("?").shift()||"attachment-"+(t+1),e.filename.indexOf(".")<0&&(e.filename+="."+i.detectExtension(e.contentType))),e.contentType||(e.contentType=i.detectMimeType(e.filename||e.path||e.href||"bin")),s.push([this.data.attachments,t])}));let a=new t;["from","to","cc","bcc","sender","replyTo"].forEach((e=>{let t;this.message?t=[].concat(a._parseAddresses(this.message.getHeader("replyTo"===e?"reply-to":e))||[]):this.data[e]&&(t=[].concat(a._parseAddresses(this.data[e])||[])),t&&t.length?this.data[e]=t:e in this.data&&(this.data[e]=null)})),["from","sender"].forEach((e=>{this.data[e]&&(this.data[e]=this.data[e].shift())}));let o=0,r=()=>{if(o>=s.length)return n(null,this.data);let t=s[o++];if(!t[0]||!t[0][t[1]])return r();e.resolveContent(...t,((e,i)=>{if(e)return n(e);let s={content:i};t[0][t[1]]&&"object"==typeof t[0][t[1]]&&!Buffer.isBuffer(t[0][t[1]])&&Object.keys(t[0][t[1]]).forEach((e=>{e in s||["content","path","href","raw"].includes(e)||(s[e]=t[0][t[1]][e])})),t[0][t[1]]=s,r()}))};setImmediate((()=>r()))}normalize(e){let t=this.data.envelope||this.message.getEnvelope(),i=this.message.messageId();this.resolveAll(((n,s)=>n?e(n):(s.envelope=t,s.messageId=i,["html","text","watchHtml","amp"].forEach((e=>{s[e]&&s[e].content&&("string"==typeof s[e].content?s[e]=s[e].content:Buffer.isBuffer(s[e].content)&&(s[e]=s[e].content.toString()))})),s.icalEvent&&Buffer.isBuffer(s.icalEvent.content)&&(s.icalEvent.content=s.icalEvent.content.toString("base64"),s.icalEvent.encoding="base64"),s.alternatives&&s.alternatives.length&&s.alternatives.forEach((e=>{e&&e.content&&Buffer.isBuffer(e.content)&&(e.content=e.content.toString("base64"),e.encoding="base64")})),s.attachments&&s.attachments.length&&s.attachments.forEach((e=>{e&&e.content&&Buffer.isBuffer(e.content)&&(e.content=e.content.toString("base64"),e.encoding="base64")})),s.normalizedHeaders={},Object.keys(s.headers||{}).forEach((e=>{let t=[].concat(s.headers[e]||[]).shift();t=t&&t.value||t,t&&(["references","in-reply-to","message-id","content-id"].includes(e)&&(t=this.message._encodeHeaderValue(e,t)),s.normalizedHeaders[e]=t)})),s.list&&"object"==typeof s.list&&this._getListHeaders(s.list).forEach((e=>{s.normalizedHeaders[e.key]=e.value.map((e=>e&&e.value||e)).join(", ")})),s.references&&(s.normalizedHeaders.references=this.message._encodeHeaderValue("references",s.references)),s.inReplyTo&&(s.normalizedHeaders["in-reply-to"]=this.message._encodeHeaderValue("in-reply-to",s.inReplyTo)),e(null,s))))}setMailerHeader(){this.message&&this.data.xMailer&&this.message.setHeader("X-Mailer",this.data.xMailer)}setPriorityHeaders(){if(this.message&&this.data.priority)switch((this.data.priority||"").toString().toLowerCase()){case"high":this.message.setHeader("X-Priority","1 (Highest)"),this.message.setHeader("X-MSMail-Priority","High"),this.message.setHeader("Importance","High");break;case"low":this.message.setHeader("X-Priority","5 (Lowest)"),this.message.setHeader("X-MSMail-Priority","Low"),this.message.setHeader("Importance","Low")}}setListHeaders(){this.message&&this.data.list&&"object"==typeof this.data.list&&this.data.list&&"object"==typeof this.data.list&&this._getListHeaders(this.data.list).forEach((e=>{e.value.forEach((t=>{this.message.addHeader(e.key,t)}))}))}_getListHeaders(e){return Object.keys(e).map((t=>({key:"list-"+t.toLowerCase().trim(),value:[].concat(e[t]||[]).map((e=>({prepared:!0,foldLines:!0,value:[].concat(e||[]).map((e=>{if("string"==typeof e&&(e={url:e}),e&&e.url){if("id"===t.toLowerCase().trim()){let t=e.comment||"";return t=i.isPlainText(t)?'"'+t+'"':i.encodeWord(t),(e.comment?t+" ":"")+this._formatListUrl(e.url).replace(/^<[^:]+\/{,2}/,"")}let n=e.comment||"";return i.isPlainText(n)||(n=i.encodeWord(n)),this._formatListUrl(e.url)+(e.comment?" ("+n+")":"")}return""})).filter((e=>e)).join(", ")})))})))}_formatListUrl(e){return e=e.replace(/[\s<]+|[\s>]+/g,""),/^(https?|mailto|ftp):/.test(e)?"<"+e+">":/^[^@]+@[^@]+$/.test(e)?"<mailto:"+e+">":"<http://"+e+">"}},UP}(),y=l,x=p,v=m;return HP=class extends e{constructor(e,t,i){super(),this.options=t||{},this._defaults=i||{},this._defaultPlugins={compile:[(...e)=>this._convertDataImages(...e)],stream:[]},this._userPlugins={compile:[],stream:[]},this.meta=new Map,this.dkim=!!this.options.dkim&&new r(this.options.dkim),this.transporter=e,this.transporter.mailer=this,this.logger=s.getLogger(this.options,{component:this.options.component||"mail"}),this.logger.debug({tnx:"create"},"Creating transport: %s",this.getVersionString()),"function"==typeof this.transporter.on&&(this.transporter.on("log",(e=>{this.logger.debug({tnx:"transport"},"%s: %s",e.type,e.message)})),this.transporter.on("error",(e=>{this.logger.error({err:e,tnx:"transport"},"Transport Error: %s",e.message),this.emit("error",e)})),this.transporter.on("idle",((...e)=>{this.emit("idle",...e)}))),["close","isIdle","verify"].forEach((e=>{this[e]=(...t)=>"function"==typeof this.transporter[e]?("verify"===e&&"function"==typeof this.getSocket&&(this.transporter.getSocket=this.getSocket,this.getSocket=!1),this.transporter[e](...t)):(this.logger.warn({tnx:"transport",methodName:e},"Non existing method %s called for transport",e),!1)})),this.options.proxy&&"string"==typeof this.options.proxy&&this.setupProxy(this.options.proxy)}use(e,t){return e=(e||"").toString(),this._userPlugins.hasOwnProperty(e)?this._userPlugins[e].push(t):this._userPlugins[e]=[t],this}sendMail(e,t=null){let i;t||(i=new Promise(((e,i)=>{t=s.callbackPromise(e,i)}))),"function"==typeof this.getSocket&&(this.transporter.getSocket=this.getSocket,this.getSocket=!1);let n=new g(this,e);return this.logger.debug({tnx:"transport",name:this.transporter.name,version:this.transporter.version,action:"send"},"Sending mail using %s/%s",this.transporter.name,this.transporter.version),this._processPlugins("compile",n,(e=>{if(e)return this.logger.error({err:e,tnx:"plugin",action:"compile"},"PluginCompile Error: %s",e.message),t(e);n.message=new o(n.data).compile(),n.setMailerHeader(),n.setPriorityHeaders(),n.setListHeaders(),this._processPlugins("stream",n,(e=>{if(e)return this.logger.error({err:e,tnx:"plugin",action:"stream"},"PluginStream Error: %s",e.message),t(e);(n.data.dkim||this.dkim)&&n.message.processFunc((e=>{let t=n.data.dkim?new r(n.data.dkim):this.dkim;return this.logger.debug({tnx:"DKIM",messageId:n.message.messageId(),dkimDomains:t.keys.map((e=>e.keySelector+"."+e.domainName)).join(", ")},"Signing outgoing message with %s keys",t.keys.length),t.sign(e,n.data._dkim)})),this.transporter.send(n,((...e)=>{e[0]&&this.logger.error({err:e[0],tnx:"transport",action:"send"},"Send Error: %s",e[0].message),t(...e)}))}))})),i}getVersionString(){return d.format("%s (%s; +%s; %s/%s)",f.name,f.version,f.homepage,this.transporter.name,this.transporter.version)}_processPlugins(e,t,i){if(e=(e||"").toString(),!this._userPlugins.hasOwnProperty(e))return i();let n=this._userPlugins[e]||[],s=this._defaultPlugins[e]||[];if(n.length&&this.logger.debug({tnx:"transaction",pluginCount:n.length,step:e},"Using %s plugins for %s",n.length,e),n.length+s.length===0)return i();let a=0,o="default",r=()=>{let e="default"===o?s:n;if(a>=e.length){if("default"!==o||!n.length)return i();o="user",a=0,e=n}(0,e[a++])(t,(e=>{if(e)return i(e);r()}))};r()}setupProxy(e){let t=u.parse(e);this.getSocket=(e,i)=>{let n=t.protocol.replace(/:$/,"").toLowerCase();if(this.meta.has("proxy_handler_"+n))return this.meta.get("proxy_handler_"+n)(t,e,i);switch(n){case"http":case"https":return void c(t.href,e.port,e.host,((e,t)=>e?i(e):i(null,{connection:t})));case"socks":case"socks5":case"socks4":case"socks4a":{if(!this.meta.has("proxy_socks_module"))return i(new Error("Socks module not loaded"));let n=n=>{let s=!!this.meta.get("proxy_socks_module").SocksClient,a=s?this.meta.get("proxy_socks_module").SocksClient:this.meta.get("proxy_socks_module"),o=Number(t.protocol.replace(/\D/g,""))||5,r={proxy:{ipaddress:n,port:Number(t.port),type:o},[s?"destination":"target"]:{host:e.host,port:e.port},command:"connect"};if(t.auth){let e=decodeURIComponent(t.auth.split(":").shift()),i=decodeURIComponent(t.auth.split(":").pop());s?(r.proxy.userId=e,r.proxy.password=i):4===o?r.userid=e:r.authentication={username:e,password:i}}a.createConnection(r,((e,t)=>e?i(e):i(null,{connection:t.socket||t})))};return y.isIP(t.hostname)?n(t.hostname):x.resolve(t.hostname,((e,t)=>{if(e)return i(e);n(Array.isArray(t)?t[0]:t)}))}}i(new Error("Unknown proxy configuration"))}}_convertDataImages(e,t){if(!this.options.attachDataUrls&&!e.data.attachDataUrls||!e.data.html)return t();e.resolveContent(e.data,"html",((i,n)=>{if(i)return t(i);let s=0;n=(n||"").toString().replace(/(<img\b[^<>]{0,1024} src\s{0,20}=[\s"']{0,20})(data:([^;]+);[^"'>\s]+)/gi,((t,i,n,o)=>{let r=v.randomBytes(10).toString("hex")+"@localhost";return e.data.attachments||(e.data.attachments=[]),Array.isArray(e.data.attachments)||(e.data.attachments=[].concat(e.data.attachments||[])),e.data.attachments.push({path:n,cid:r,filename:"image-"+ ++s+"."+a.detectExtension(o)}),i+"cid:"+r})),e.data.html=n,t()}))}set(e,t){return this.meta.set(e,t)}get(e){return this.meta.get(e)}},HP}function n_(){if(KP)return WP;KP=1;const e=AP,i=t.EventEmitter,n=l,s=h,a=d,o=m,r=function(){if(GP)return VP;GP=1;const e=c.Transform;return VP=class extends e{constructor(e){super(e),this.options=e||{},this._curLine="",this.inByteCount=0,this.outByteCount=0,this.lastByte=!1}_transform(e,t,i){let n,s,a,o=[],r=0,c=0;if(!e||!e.length)return i();for("string"==typeof e&&(e=Buffer.from(e)),this.inByteCount+=e.length,n=0,s=e.length;n<s;n++)46===e[n]?(n&&10===e[n-1]||!n&&(!this.lastByte||10===this.lastByte))&&(a=e.slice(c,n+1),o.push(a),o.push(Buffer.from(".")),r+=a.length+1,c=n+1):10===e[n]&&(n&&13!==e[n-1]||!n&&13!==this.lastByte)&&(n>c?(a=e.slice(c,n),o.push(a),r+=a.length+2):r+=2,o.push(Buffer.from("\r\n")),c=n+1);r?(c<e.length&&(a=e.slice(c),o.push(a),r+=a.length),this.outByteCount+=r,this.push(Buffer.concat(o,r))):(this.outByteCount+=e.length,this.push(e)),this.lastByte=e[e.length-1],i()}_flush(e){let t;t=10===this.lastByte?Buffer.from(".\r\n"):13===this.lastByte?Buffer.from("\n.\r\n"):Buffer.from("\r\n.\r\n"),this.outByteCount+=t.length,this.push(t),e()}},VP}(),p=c.PassThrough,u=TP(),f=6e5;return WP=class extends i{constructor(t){super(t),this.id=o.randomBytes(8).toString("base64").replace(/\W/g,""),this.stage="init",this.options=t||{},this.secureConnection=!!this.options.secure,this.alreadySecured=!!this.options.secured,this.port=Number(this.options.port)||(this.secureConnection?465:587),this.host=this.options.host||"localhost",this.servername=this.options.servername?this.options.servername:!n.isIP(this.host)&&this.host,this.allowInternalNetworkInterfaces=this.options.allowInternalNetworkInterfaces||!1,void 0===this.options.secure&&465===this.port&&(this.secureConnection=!0),this.name=this.options.name||this._getHostname(),this.logger=u.getLogger(this.options,{component:this.options.component||"smtp-connection",sid:this.id}),this.customAuth=new Map,Object.keys(this.options.customAuth||{}).forEach((e=>{let t=(e||"").toString().trim().toUpperCase();t&&this.customAuth.set(t,this.options.customAuth[e])})),this.version=e.version,this.authenticated=!1,this.destroyed=!1,this.secure=!!this.secureConnection,this._remainder="",this._responseQueue=[],this.lastServerResponse=!1,this._socket=!1,this._supportedAuth=[],this.allowsAuth=!1,this._envelope=!1,this._supportedExtensions=[],this._maxAllowedSize=0,this._responseActions=[],this._recipientQueue=[],this._greetingTimeout=!1,this._connectionTimeout=!1,this._destroyed=!1,this._closing=!1,this._onSocketData=e=>this._onData(e),this._onSocketError=e=>this._onError(e,"ESOCKET",!1,"CONN"),this._onSocketClose=()=>this._onClose(),this._onSocketEnd=()=>this._onEnd(),this._onSocketTimeout=()=>this._onTimeout()}connect(e){if("function"==typeof e){this.once("connect",(()=>{this.logger.debug({tnx:"smtp"},"SMTP handshake finished"),e()}));const t=this._isDestroyedMessage("connect");if(t)return e(this._formatError(t,"ECONNECTION",!1,"CONN"))}let t={port:this.port,host:this.host,allowInternalNetworkInterfaces:this.allowInternalNetworkInterfaces,timeout:this.options.dnsTimeout||3e4};this.options.localAddress&&(t.localAddress=this.options.localAddress);let i=()=>{this._connectionTimeout=setTimeout((()=>{this._onError("Connection timeout","ETIMEDOUT",!1,"CONN")}),this.options.connectionTimeout||12e4),this._socket.on("error",this._onSocketError)};return this.options.connection?(this._socket=this.options.connection,void(this.secureConnection&&!this.alreadySecured?setImmediate((()=>this._upgradeConnection((e=>{e?this._onError(new Error("Error initiating TLS - "+(e.message||e)),"ETLS",!1,"CONN"):this._onConnect()})))):setImmediate((()=>this._onConnect())))):this.options.socket?(this._socket=this.options.socket,u.resolveHostname(t,((e,n)=>{if(e)return setImmediate((()=>this._onError(e,"EDNS",!1,"CONN")));this.logger.debug({tnx:"dns",source:t.host,resolved:n.host,cached:!!n.cached},"Resolved %s as %s [cache %s]",t.host,n.host,n.cached?"hit":"miss"),Object.keys(n).forEach((e=>{"_"!==e.charAt(0)&&n[e]&&(t[e]=n[e])}));try{this._socket.connect(this.port,this.host,(()=>{this._socket.setKeepAlive(!0),this._onConnect()})),i()}catch(e){return setImmediate((()=>this._onError(e,"ECONNECTION",!1,"CONN")))}}))):this.secureConnection?(this.options.tls&&Object.keys(this.options.tls).forEach((e=>{t[e]=this.options.tls[e]})),this.servername&&!t.servername&&(t.servername=this.servername),u.resolveHostname(t,((e,n)=>{if(e)return setImmediate((()=>this._onError(e,"EDNS",!1,"CONN")));this.logger.debug({tnx:"dns",source:t.host,resolved:n.host,cached:!!n.cached},"Resolved %s as %s [cache %s]",t.host,n.host,n.cached?"hit":"miss"),Object.keys(n).forEach((e=>{"_"!==e.charAt(0)&&n[e]&&(t[e]=n[e])}));try{this._socket=s.connect(t,(()=>{this._socket.setKeepAlive(!0),this._onConnect()})),i()}catch(e){return setImmediate((()=>this._onError(e,"ECONNECTION",!1,"CONN")))}}))):u.resolveHostname(t,((e,s)=>{if(e)return setImmediate((()=>this._onError(e,"EDNS",!1,"CONN")));this.logger.debug({tnx:"dns",source:t.host,resolved:s.host,cached:!!s.cached},"Resolved %s as %s [cache %s]",t.host,s.host,s.cached?"hit":"miss"),Object.keys(s).forEach((e=>{"_"!==e.charAt(0)&&s[e]&&(t[e]=s[e])}));try{this._socket=n.connect(t,(()=>{this._socket.setKeepAlive(!0),this._onConnect()})),i()}catch(e){return setImmediate((()=>this._onError(e,"ECONNECTION",!1,"CONN")))}}))}quit(){this._sendCommand("QUIT"),this._responseActions.push(this.close)}close(){if(clearTimeout(this._connectionTimeout),clearTimeout(this._greetingTimeout),this._responseActions=[],this._closing)return;this._closing=!0;let e="end";"init"===this.stage&&(e="destroy"),this.logger.debug({tnx:"smtp"},'Closing connection to the server using "%s"',e);let t=this._socket&&this._socket.socket||this._socket;if(t&&!t.destroyed)try{this._socket[e]()}catch(e){}this._destroy()}login(e,t){const i=this._isDestroyedMessage("login");if(i)return t(this._formatError(i,"ECONNECTION",!1,"API"));if(this._auth=e||{},this._authMethod=(this._auth.method||"").toString().trim().toUpperCase()||!1,this._authMethod||!this._auth.oauth2||this._auth.credentials?this._authMethod&&("XOAUTH2"!==this._authMethod||this._auth.oauth2)||(this._authMethod=(this._supportedAuth[0]||"PLAIN").toUpperCase().trim()):this._authMethod="XOAUTH2",!("XOAUTH2"===this._authMethod||this._auth.credentials&&this._auth.credentials.user&&this._auth.credentials.pass)){if(!(this._auth.user&&this._auth.pass||this.customAuth.has(this._authMethod)))return t(this._formatError('Missing credentials for "'+this._authMethod+'"',"EAUTH",!1,"API"));this._auth.credentials={user:this._auth.user,pass:this._auth.pass,options:this._auth.options}}if(!this.customAuth.has(this._authMethod)){switch(this._authMethod){case"XOAUTH2":return void this._handleXOauth2Token(!1,t);case"LOGIN":return this._responseActions.push((e=>{this._actionAUTH_LOGIN_USER(e,t)})),void this._sendCommand("AUTH LOGIN");case"PLAIN":return this._responseActions.push((e=>{this._actionAUTHComplete(e,t)})),void this._sendCommand("AUTH PLAIN "+Buffer.from("\0"+this._auth.credentials.user+"\0"+this._auth.credentials.pass,"utf-8").toString("base64"),"AUTH PLAIN "+Buffer.from("\0"+this._auth.credentials.user+"\0/* secret */","utf-8").toString("base64"));case"CRAM-MD5":return this._responseActions.push((e=>{this._actionAUTH_CRAM_MD5(e,t)})),void this._sendCommand("AUTH CRAM-MD5")}return t(this._formatError('Unknown authentication method "'+this._authMethod+'"',"EAUTH",!1,"API"))}{let e,i=this.customAuth.get(this._authMethod),n=!1,s=()=>{n||(n=!0,this.logger.info({tnx:"smtp",username:this._auth.user,action:"authenticated",method:this._authMethod},"User %s authenticated",JSON.stringify(this._auth.user)),this.authenticated=!0,t(null,!0))},a=i=>{n||(n=!0,t(this._formatError(i,"EAUTH",e,"AUTH "+this._authMethod)))},o=i({auth:this._auth,method:this._authMethod,extensions:[].concat(this._supportedExtensions),authMethods:[].concat(this._supportedAuth),maxAllowedSize:this._maxAllowedSize||!1,sendCommand:(t,i)=>{let n;return i||(n=new Promise(((e,t)=>{i=u.callbackPromise(e,t)}))),this._responseActions.push((n=>{e=n;let s=n.match(/^(\d+)(?:\s(\d+\.\d+\.\d+))?\s/),a={command:t,response:n};s?(a.status=Number(s[1])||0,s[2]&&(a.code=s[2]),a.text=n.substr(s[0].length)):(a.text=n,a.status=0),i(null,a)})),setImmediate((()=>this._sendCommand(t))),n},resolve:s,reject:a});o&&"function"==typeof o.catch&&o.then(s).catch(a)}}send(e,t,i){if(!t)return i(this._formatError("Empty message","EMESSAGE",!1,"API"));const n=this._isDestroyedMessage("send message");if(n)return i(this._formatError(n,"ECONNECTION",!1,"API"));if(this._maxAllowedSize&&e.size>this._maxAllowedSize)return setImmediate((()=>{i(this._formatError("Message size larger than allowed "+this._maxAllowedSize,"EMESSAGE",!1,"MAIL FROM"))}));let s=!1,a=function(){s||(s=!0,i(...arguments))};"function"==typeof t.on&&t.on("error",(e=>a(this._formatError(e,"ESTREAM",!1,"API"))));let o=Date.now();this._setEnvelope(e,((e,i)=>{if(e){let i=new p;return"function"==typeof t.pipe?t.pipe(i):(i.write(t),i.end()),a(e)}let n=Date.now(),s=this._createSendStream(((e,t)=>e?a(e):(i.envelopeTime=n-o,i.messageTime=Date.now()-n,i.messageSize=s.outByteCount,i.response=t,a(null,i))));"function"==typeof t.pipe?t.pipe(s):(s.write(t),s.end())}))}reset(e){this._sendCommand("RSET"),this._responseActions.push((t=>"2"!==t.charAt(0)?e(this._formatError("Could not reset session state. response="+t,"EPROTOCOL",t,"RSET")):(this._envelope=!1,e(null,!0))))}_onConnect(){clearTimeout(this._connectionTimeout),this.logger.info({tnx:"network",localAddress:this._socket.localAddress,localPort:this._socket.localPort,remoteAddress:this._socket.remoteAddress,remotePort:this._socket.remotePort},"%s established to %s:%s",this.secure?"Secure connection":"Connection",this._socket.remoteAddress,this._socket.remotePort),this._destroyed?this.close():(this.stage="connected",this._socket.removeListener("data",this._onSocketData),this._socket.removeListener("timeout",this._onSocketTimeout),this._socket.removeListener("close",this._onSocketClose),this._socket.removeListener("end",this._onSocketEnd),this._socket.on("data",this._onSocketData),this._socket.once("close",this._onSocketClose),this._socket.once("end",this._onSocketEnd),this._socket.setTimeout(this.options.socketTimeout||f),this._socket.on("timeout",this._onSocketTimeout),this._greetingTimeout=setTimeout((()=>{this._socket&&!this._destroyed&&this._responseActions[0]===this._actionGreeting&&this._onError("Greeting never received","ETIMEDOUT",!1,"CONN")}),this.options.greetingTimeout||3e4),this._responseActions.push(this._actionGreeting),this._socket.resume())}_onData(e){if(this._destroyed||!e||!e.length)return;let t,i=(e||"").toString("binary"),n=(this._remainder+i).split(/\r?\n/);this._remainder=n.pop();for(let e=0,i=n.length;e<i;e++)this._responseQueue.length&&(t=this._responseQueue[this._responseQueue.length-1],/^\d+-/.test(t.split("\n").pop()))?this._responseQueue[this._responseQueue.length-1]+="\n"+n[e]:this._responseQueue.push(n[e]);this._responseQueue.length&&(t=this._responseQueue[this._responseQueue.length-1],/^\d+-/.test(t.split("\n").pop()))||this._processResponse()}_onError(e,t,i,n){clearTimeout(this._connectionTimeout),clearTimeout(this._greetingTimeout),this._destroyed||(e=this._formatError(e,t,i,n),this.logger.error(i,e.message),this.emit("error",e),this.close())}_formatError(e,t,i,n){let s;s=/Error\]$/i.test(Object.prototype.toString.call(e))?e:new Error(e),t&&"Error"!==t&&(s.code=t),i&&(s.response=i,s.message+=": "+i);let a="string"==typeof i&&Number((i.match(/^\d+/)||[])[0])||!1;return a&&(s.responseCode=a),n&&(s.command=n),s}_onClose(){let e=!1;return this._remainder&&this._remainder.trim()&&((this.options.debug||this.options.transactionLog)&&this.logger.debug({tnx:"server"},this._remainder.replace(/\r?\n$/,"")),this.lastServerResponse=e=this._remainder.trim()),this.logger.info({tnx:"network"},"Connection closed"),this.upgrading&&!this._destroyed?this._onError(new Error("Connection closed unexpectedly"),"ETLS",e,"CONN"):[this._actionGreeting,this.close].includes(this._responseActions[0])||this._destroyed?/^[45]\d{2}\b/.test(e)?this._onError(new Error("Connection closed unexpectedly"),"ECONNECTION",e,"CONN"):void this._destroy():this._onError(new Error("Connection closed unexpectedly"),"ECONNECTION",e,"CONN")}_onEnd(){this._socket&&!this._socket.destroyed&&this._socket.destroy()}_onTimeout(){return this._onError(new Error("Timeout"),"ETIMEDOUT",!1,"CONN")}_destroy(){this._destroyed||(this._destroyed=!0,this.emit("end"))}_upgradeConnection(e){this._socket.removeListener("data",this._onSocketData),this._socket.removeListener("timeout",this._onSocketTimeout);let t=this._socket,i={socket:this._socket,host:this.host};Object.keys(this.options.tls||{}).forEach((e=>{i[e]=this.options.tls[e]})),this.servername&&!i.servername&&(i.servername=this.servername),this.upgrading=!0;try{this._socket=s.connect(i,(()=>(this.secure=!0,this.upgrading=!1,this._socket.on("data",this._onSocketData),t.removeListener("close",this._onSocketClose),t.removeListener("end",this._onSocketEnd),e(null,!0))))}catch(t){return e(t)}this._socket.on("error",this._onSocketError),this._socket.once("close",this._onSocketClose),this._socket.once("end",this._onSocketEnd),this._socket.setTimeout(this.options.socketTimeout||f),this._socket.on("timeout",this._onSocketTimeout),t.resume()}_processResponse(){if(!this._responseQueue.length)return!1;let e=this.lastServerResponse=(this._responseQueue.shift()||"").toString();if(/^\d+-/.test(e.split("\n").pop()))return;(this.options.debug||this.options.transactionLog)&&this.logger.debug({tnx:"server"},e.replace(/\r?\n$/,"")),e.trim()||setImmediate((()=>this._processResponse()));let t=this._responseActions.shift();if("function"!=typeof t)return this._onError(new Error("Unexpected Response"),"EPROTOCOL",e,"CONN");t.call(this,e),setImmediate((()=>this._processResponse()))}_sendCommand(e,t){if(!this._destroyed){if(this._socket.destroyed)return this.close();(this.options.debug||this.options.transactionLog)&&this.logger.debug({tnx:"client"},(t||e||"").toString().replace(/\r?\n$/,"")),this._socket.write(Buffer.from(e+"\r\n","utf-8"))}}_setEnvelope(e,t){let i=[],n=!1;if(this._envelope=e||{},this._envelope.from=(this._envelope.from&&this._envelope.from.address||this._envelope.from||"").toString().trim(),this._envelope.to=[].concat(this._envelope.to||[]).map((e=>(e&&e.address||e||"").toString().trim())),!this._envelope.to.length)return t(this._formatError("No recipients defined","EENVELOPE",!1,"API"));if(this._envelope.from&&/[\r\n<>]/.test(this._envelope.from))return t(this._formatError("Invalid sender "+JSON.stringify(this._envelope.from),"EENVELOPE",!1,"API"));/[\x80-\uFFFF]/.test(this._envelope.from)&&(n=!0);for(let e=0,i=this._envelope.to.length;e<i;e++){if(!this._envelope.to[e]||/[\r\n<>]/.test(this._envelope.to[e]))return t(this._formatError("Invalid recipient "+JSON.stringify(this._envelope.to[e]),"EENVELOPE",!1,"API"));/[\x80-\uFFFF]/.test(this._envelope.to[e])&&(n=!0)}if(this._envelope.rcptQueue=JSON.parse(JSON.stringify(this._envelope.to||[])),this._envelope.rejected=[],this._envelope.rejectedErrors=[],this._envelope.accepted=[],this._envelope.dsn)try{this._envelope.dsn=this._setDsnEnvelope(this._envelope.dsn)}catch(e){return t(this._formatError("Invalid DSN "+e.message,"EENVELOPE",!1,"API"))}this._responseActions.push((e=>{this._actionMAIL(e,t)})),n&&this._supportedExtensions.includes("SMTPUTF8")&&(i.push("SMTPUTF8"),this._usingSmtpUtf8=!0),this._envelope.use8BitMime&&this._supportedExtensions.includes("8BITMIME")&&(i.push("BODY=8BITMIME"),this._using8BitMime=!0),this._envelope.size&&this._supportedExtensions.includes("SIZE")&&i.push("SIZE="+this._envelope.size),this._envelope.dsn&&this._supportedExtensions.includes("DSN")&&(this._envelope.dsn.ret&&i.push("RET="+u.encodeXText(this._envelope.dsn.ret)),this._envelope.dsn.envid&&i.push("ENVID="+u.encodeXText(this._envelope.dsn.envid))),this._sendCommand("MAIL FROM:<"+this._envelope.from+">"+(i.length?" "+i.join(" "):""))}_setDsnEnvelope(e){let t=(e.ret||e.return||"").toString().toUpperCase()||null;if(t)switch(t){case"HDRS":case"HEADERS":t="HDRS";break;case"FULL":case"BODY":t="FULL"}if(t&&!["FULL","HDRS"].includes(t))throw new Error("ret: "+JSON.stringify(t));let i=(e.envid||e.id||"").toString()||null,n=e.notify||null;if(n){"string"==typeof n&&(n=n.split(",")),n=n.map((e=>e.trim().toUpperCase()));let e=["NEVER","SUCCESS","FAILURE","DELAY"],t=n.filter((t=>!e.includes(t)));if(t.length||n.length>1&&n.includes("NEVER"))throw new Error("notify: "+JSON.stringify(n.join(",")));n=n.join(",")}let s=(e.recipient||e.orcpt||"").toString()||null;return s&&s.indexOf(";")<0&&(s="rfc822;"+s),{ret:t,envid:i,notify:n,orcpt:s}}_getDsnRcptToArgs(){let e=[];return this._envelope.dsn&&this._supportedExtensions.includes("DSN")&&(this._envelope.dsn.notify&&e.push("NOTIFY="+u.encodeXText(this._envelope.dsn.notify)),this._envelope.dsn.orcpt&&e.push("ORCPT="+u.encodeXText(this._envelope.dsn.orcpt))),e.length?" "+e.join(" "):""}_createSendStream(e){let t,i=new r;return this.options.lmtp?this._envelope.accepted.forEach(((t,i)=>{let n=i===this._envelope.accepted.length-1;this._responseActions.push((i=>{this._actionLMTPStream(t,n,i,e)}))})):this._responseActions.push((t=>{this._actionSMTPStream(t,e)})),i.pipe(this._socket,{end:!1}),this.options.debug&&(t=new p,t.on("readable",(()=>{let e;for(;e=t.read();)this.logger.debug({tnx:"message"},e.toString("binary").replace(/\r?\n$/,""))})),i.pipe(t)),i.once("end",(()=>{this.logger.info({tnx:"message",inByteCount:i.inByteCount,outByteCount:i.outByteCount},"<%s bytes encoded mime message (source size %s bytes)>",i.outByteCount,i.inByteCount)})),i}_actionGreeting(e){clearTimeout(this._greetingTimeout),"220"===e.substr(0,3)?this.options.lmtp?(this._responseActions.push(this._actionLHLO),this._sendCommand("LHLO "+this.name)):(this._responseActions.push(this._actionEHLO),this._sendCommand("EHLO "+this.name)):this._onError(new Error("Invalid greeting. response="+e),"EPROTOCOL",e,"CONN")}_actionLHLO(e){"2"===e.charAt(0)?this._actionEHLO(e):this._onError(new Error("Invalid LHLO. response="+e),"EPROTOCOL",e,"LHLO")}_actionEHLO(e){let t;if("421"!==e.substr(0,3)){if("2"!==e.charAt(0))return this.options.requireTLS?void this._onError(new Error("EHLO failed but HELO does not support required STARTTLS. response="+e),"ECONNECTION",e,"EHLO"):(this._responseActions.push(this._actionHELO),void this._sendCommand("HELO "+this.name));if(this._ehloLines=e.split(/\r?\n/).map((e=>e.replace(/^\d+[ -]/,"").trim())).filter((e=>e)).slice(1),!this.secure&&!this.options.ignoreTLS&&(/[ -]STARTTLS\b/im.test(e)||this.options.requireTLS))return this._sendCommand("STARTTLS"),void this._responseActions.push(this._actionSTARTTLS);/[ -]SMTPUTF8\b/im.test(e)&&this._supportedExtensions.push("SMTPUTF8"),/[ -]DSN\b/im.test(e)&&this._supportedExtensions.push("DSN"),/[ -]8BITMIME\b/im.test(e)&&this._supportedExtensions.push("8BITMIME"),/[ -]PIPELINING\b/im.test(e)&&this._supportedExtensions.push("PIPELINING"),/[ -]AUTH\b/i.test(e)&&(this.allowsAuth=!0),/[ -]AUTH(?:(\s+|=)[^\n]*\s+|\s+|=)PLAIN/i.test(e)&&this._supportedAuth.push("PLAIN"),/[ -]AUTH(?:(\s+|=)[^\n]*\s+|\s+|=)LOGIN/i.test(e)&&this._supportedAuth.push("LOGIN"),/[ -]AUTH(?:(\s+|=)[^\n]*\s+|\s+|=)CRAM-MD5/i.test(e)&&this._supportedAuth.push("CRAM-MD5"),/[ -]AUTH(?:(\s+|=)[^\n]*\s+|\s+|=)XOAUTH2/i.test(e)&&this._supportedAuth.push("XOAUTH2"),(t=e.match(/[ -]SIZE(?:[ \t]+(\d+))?/im))&&(this._supportedExtensions.push("SIZE"),this._maxAllowedSize=Number(t[1])||0),this.emit("connect")}else this._onError(new Error("Server terminates connection. response="+e),"ECONNECTION",e,"EHLO")}_actionHELO(e){"2"===e.charAt(0)?(this.allowsAuth=!0,this.emit("connect")):this._onError(new Error("Invalid HELO. response="+e),"EPROTOCOL",e,"HELO")}_actionSTARTTLS(e){if("2"!==e.charAt(0))return this.options.opportunisticTLS?(this.logger.info({tnx:"smtp"},"Failed STARTTLS upgrade, continuing unencrypted"),this.emit("connect")):void this._onError(new Error("Error upgrading connection with STARTTLS"),"ETLS",e,"STARTTLS");this._upgradeConnection(((e,t)=>{e?this._onError(new Error("Error initiating TLS - "+(e.message||e)),"ETLS",!1,"STARTTLS"):(this.logger.info({tnx:"smtp"},"Connection upgraded with STARTTLS"),t?this.options.lmtp?(this._responseActions.push(this._actionLHLO),this._sendCommand("LHLO "+this.name)):(this._responseActions.push(this._actionEHLO),this._sendCommand("EHLO "+this.name)):this.emit("connect"))}))}_actionAUTH_LOGIN_USER(e,t){/^334[ -]/.test(e)?(this._responseActions.push((e=>{this._actionAUTH_LOGIN_PASS(e,t)})),this._sendCommand(Buffer.from(this._auth.credentials.user+"","utf-8").toString("base64"))):t(this._formatError('Invalid login sequence while waiting for "334 VXNlcm5hbWU6"',"EAUTH",e,"AUTH LOGIN"))}_actionAUTH_CRAM_MD5(e,t){let i=e.match(/^334\s+(.+)$/),n="";if(!i)return t(this._formatError("Invalid login sequence while waiting for server challenge string","EAUTH",e,"AUTH CRAM-MD5"));n=i[1];let s=Buffer.from(n,"base64").toString("ascii"),a=o.createHmac("md5",this._auth.credentials.pass);a.update(s);let r=this._auth.credentials.user+" "+a.digest("hex");this._responseActions.push((e=>{this._actionAUTH_CRAM_MD5_PASS(e,t)})),this._sendCommand(Buffer.from(r).toString("base64"),Buffer.from(this._auth.credentials.user+" /* secret */").toString("base64"))}_actionAUTH_CRAM_MD5_PASS(e,t){if(!e.match(/^235\s+/))return t(this._formatError('Invalid login sequence while waiting for "235"',"EAUTH",e,"AUTH CRAM-MD5"));this.logger.info({tnx:"smtp",username:this._auth.user,action:"authenticated",method:this._authMethod},"User %s authenticated",JSON.stringify(this._auth.user)),this.authenticated=!0,t(null,!0)}_actionAUTH_LOGIN_PASS(e,t){if(!/^334[ -]/.test(e))return t(this._formatError('Invalid login sequence while waiting for "334 UGFzc3dvcmQ6"',"EAUTH",e,"AUTH LOGIN"));this._responseActions.push((e=>{this._actionAUTHComplete(e,t)})),this._sendCommand(Buffer.from((this._auth.credentials.pass||"").toString(),"utf-8").toString("base64"),Buffer.from("/* secret */","utf-8").toString("base64"))}_actionAUTHComplete(e,t,i){return i||"function"!=typeof t||(i=t,t=!1),"334"===e.substr(0,3)?(this._responseActions.push((e=>{t||"XOAUTH2"!==this._authMethod?this._actionAUTHComplete(e,!0,i):setImmediate((()=>this._handleXOauth2Token(!0,i)))})),void this._sendCommand("")):"2"!==e.charAt(0)?(this.logger.info({tnx:"smtp",username:this._auth.user,action:"authfail",method:this._authMethod},"User %s failed to authenticate",JSON.stringify(this._auth.user)),i(this._formatError("Invalid login","EAUTH",e,"AUTH "+this._authMethod))):(this.logger.info({tnx:"smtp",username:this._auth.user,action:"authenticated",method:this._authMethod},"User %s authenticated",JSON.stringify(this._auth.user)),this.authenticated=!0,void i(null,!0))}_actionMAIL(e,t){let i,n;if(2!==Number(e.charAt(0)))return i=this._usingSmtpUtf8&&/^550 /.test(e)&&/[\x80-\uFFFF]/.test(this._envelope.from)?"Internationalized mailbox name not allowed":"Mail command failed",t(this._formatError(i,"EENVELOPE",e,"MAIL FROM"));if(!this._envelope.rcptQueue.length)return t(this._formatError("Can't send mail - no recipients defined","EENVELOPE",!1,"API"));if(this._recipientQueue=[],this._supportedExtensions.includes("PIPELINING"))for(;this._envelope.rcptQueue.length;)n=this._envelope.rcptQueue.shift(),this._recipientQueue.push(n),this._responseActions.push((e=>{this._actionRCPT(e,t)})),this._sendCommand("RCPT TO:<"+n+">"+this._getDsnRcptToArgs());else n=this._envelope.rcptQueue.shift(),this._recipientQueue.push(n),this._responseActions.push((e=>{this._actionRCPT(e,t)})),this._sendCommand("RCPT TO:<"+n+">"+this._getDsnRcptToArgs())}_actionRCPT(e,t){let i,n,s=this._recipientQueue.shift();if(2!==Number(e.charAt(0))?(i=this._usingSmtpUtf8&&/^553 /.test(e)&&/[\x80-\uFFFF]/.test(s)?"Internationalized mailbox name not allowed":"Recipient command failed",this._envelope.rejected.push(s),n=this._formatError(i,"EENVELOPE",e,"RCPT TO"),n.recipient=s,this._envelope.rejectedErrors.push(n)):this._envelope.accepted.push(s),this._envelope.rcptQueue.length||this._recipientQueue.length)this._envelope.rcptQueue.length&&(s=this._envelope.rcptQueue.shift(),this._recipientQueue.push(s),this._responseActions.push((e=>{this._actionRCPT(e,t)})),this._sendCommand("RCPT TO:<"+s+">"+this._getDsnRcptToArgs()));else{if(!(this._envelope.rejected.length<this._envelope.to.length))return n=this._formatError("Can't send mail - all recipients were rejected","EENVELOPE",e,"RCPT TO"),n.rejected=this._envelope.rejected,n.rejectedErrors=this._envelope.rejectedErrors,t(n);this._responseActions.push((e=>{this._actionDATA(e,t)})),this._sendCommand("DATA")}}_actionDATA(e,t){if(!/^[23]/.test(e))return t(this._formatError("Data command failed","EENVELOPE",e,"DATA"));let i={accepted:this._envelope.accepted,rejected:this._envelope.rejected};this._ehloLines&&this._ehloLines.length&&(i.ehlo=this._ehloLines),this._envelope.rejectedErrors.length&&(i.rejectedErrors=this._envelope.rejectedErrors),t(null,i)}_actionSMTPStream(e,t){return 2!==Number(e.charAt(0))?t(this._formatError("Message failed","EMESSAGE",e,"DATA")):t(null,e)}_actionLMTPStream(e,t,i,n){let s;if(2!==Number(i.charAt(0))){s=this._formatError("Message failed for recipient "+e,"EMESSAGE",i,"DATA"),s.recipient=e,this._envelope.rejected.push(e),this._envelope.rejectedErrors.push(s);for(let t=0,i=this._envelope.accepted.length;t<i;t++)this._envelope.accepted[t]===e&&this._envelope.accepted.splice(t,1)}if(t)return n(null,i)}_handleXOauth2Token(e,t){this._auth.oauth2.getToken(e,((i,n)=>{if(i)return this.logger.info({tnx:"smtp",username:this._auth.user,action:"authfail",method:this._authMethod},"User %s failed to authenticate",JSON.stringify(this._auth.user)),t(this._formatError(i,"EAUTH",!1,"AUTH XOAUTH2"));this._responseActions.push((i=>{this._actionAUTHComplete(i,e,t)})),this._sendCommand("AUTH XOAUTH2 "+this._auth.oauth2.buildXOAuth2Token(n),"AUTH XOAUTH2 "+this._auth.oauth2.buildXOAuth2Token("/* secret */"))}))}_isDestroyedMessage(e){if(this._destroyed)return"Cannot "+e+" - smtp connection is already destroyed.";if(this._socket){if(this._socket.destroyed)return"Cannot "+e+" - smtp connection socket is already destroyed.";if(!this._socket.writable)return"Cannot "+e+" - smtp connection socket is already half-closed."}}_getHostname(){let e;try{e=a.hostname()||""}catch(t){e="localhost"}return(!e||e.indexOf(".")<0)&&(e="[127.0.0.1]"),e.match(/^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$/)&&(e="["+e+"]"),e}},WP}function s_(){if(XP)return QP;XP=1;const e=c.Stream,t=IP(),i=m,n=TP();return QP=class extends e{constructor(e,t){if(super(),this.options=e||{},e&&e.serviceClient){if(!e.privateKey||!e.user)return void setImmediate((()=>this.emit("error",new Error('Options "privateKey" and "user" are required for service account!'))));let t=Math.min(Math.max(Number(this.options.serviceRequestTimeout)||0,0),3600);this.options.serviceRequestTimeout=t||300}if(this.logger=n.getLogger({logger:t},{component:this.options.component||"OAuth2"}),this.provisionCallback="function"==typeof this.options.provisionCallback&&this.options.provisionCallback,this.options.accessUrl=this.options.accessUrl||"https://accounts.google.com/o/oauth2/token",this.options.customHeaders=this.options.customHeaders||{},this.options.customParams=this.options.customParams||{},this.accessToken=this.options.accessToken||!1,this.options.expires&&Number(this.options.expires))this.expires=this.options.expires;else{let e=Math.max(Number(this.options.timeout)||0,0);this.expires=e&&Date.now()+1e3*e||0}}getToken(e,t){if(!e&&this.accessToken&&(!this.expires||this.expires>Date.now()))return t(null,this.accessToken);let i=(...e)=>{e[0]?this.logger.error({err:e[0],tnx:"OAUTH2",user:this.options.user,action:"renew"},"Failed generating new Access Token for %s",this.options.user):this.logger.info({tnx:"OAUTH2",user:this.options.user,action:"renew"},"Generated new Access Token for %s",this.options.user),t(...e)};this.provisionCallback?this.provisionCallback(this.options.user,!!e,((e,t,n)=>{!e&&t&&(this.accessToken=t,this.expires=n||0),i(e,t)})):this.generateToken(i)}updateToken(e,t){this.accessToken=e,t=Math.max(Number(t)||0,0),this.expires=t&&Date.now()+1e3*t||0,this.emit("token",{user:this.options.user,accessToken:e||"",expires:this.expires})}generateToken(e){let t,i;if(this.options.serviceClient){let n,s=Math.floor(Date.now()/1e3),a={iss:this.options.serviceClient,scope:this.options.scope||"https://mail.google.com/",sub:this.options.user,aud:this.options.accessUrl,iat:s,exp:s+this.options.serviceRequestTimeout};try{n=this.jwtSignRS256(a)}catch(t){return e(new Error("Can't generate token. Check your auth options"))}t={grant_type:"urn:ietf:params:oauth:grant-type:jwt-bearer",assertion:n},i={grant_type:"urn:ietf:params:oauth:grant-type:jwt-bearer",assertion:a}}else{if(!this.options.refreshToken)return e(new Error("Can't create new access token for user"));t={client_id:this.options.clientId||"",client_secret:this.options.clientSecret||"",refresh_token:this.options.refreshToken,grant_type:"refresh_token"},i={client_id:this.options.clientId||"",client_secret:(this.options.clientSecret||"").substr(0,6)+"...",refresh_token:(this.options.refreshToken||"").substr(0,6)+"...",grant_type:"refresh_token"}}Object.keys(this.options.customParams).forEach((e=>{t[e]=this.options.customParams[e],i[e]=this.options.customParams[e]})),this.logger.debug({tnx:"OAUTH2",user:this.options.user,action:"generate"},"Requesting token using: %s",JSON.stringify(i)),this.postRequest(this.options.accessUrl,t,this.options,((t,i)=>{let n;if(t)return e(t);try{n=JSON.parse(i.toString())}catch(t){return e(t)}if(!n||"object"!=typeof n)return this.logger.debug({tnx:"OAUTH2",user:this.options.user,action:"post"},"Response: %s",(i||"").toString()),e(new Error("Invalid authentication response"));let s={};if(Object.keys(n).forEach((e=>{s[e]="access_token"!==e?n[e]:(n[e]||"").toString().substr(0,6)+"..."})),this.logger.debug({tnx:"OAUTH2",user:this.options.user,action:"post"},"Response: %s",JSON.stringify(s)),n.error){let t=n.error;return n.error_description&&(t+=": "+n.error_description),n.error_uri&&(t+=" ("+n.error_uri+")"),e(new Error(t))}return n.access_token?(this.updateToken(n.access_token,n.expires_in),e(null,this.accessToken)):e(new Error("No access token"))}))}buildXOAuth2Token(e){let t=["user="+(this.options.user||""),"auth=Bearer "+(e||this.accessToken),"",""];return Buffer.from(t.join(""),"utf-8").toString("base64")}postRequest(e,i,n,s){let a=!1,o=[],r=0,c=t(e,{method:"post",headers:n.customHeaders,body:i,allowErrorResponse:!0});c.on("readable",(()=>{let e;for(;null!==(e=c.read());)o.push(e),r+=e.length})),c.once("error",(e=>{if(!a)return a=!0,s(e)})),c.once("end",(()=>{if(!a)return a=!0,s(null,Buffer.concat(o,r))}))}toBase64URL(e){return"string"==typeof e&&(e=Buffer.from(e)),e.toString("base64").replace(/[=]+/g,"").replace(/\+/g,"-").replace(/\//g,"_")}jwtSignRS256(e){e=['{"alg":"RS256","typ":"JWT"}',JSON.stringify(e)].map((e=>this.toBase64URL(e))).join(".");let t=i.createSign("RSA-SHA256").update(e).sign(this.options.privateKey);return e+"."+this.toBase64URL(t)}},QP}var a_,o_,r_,c_,l_,p_,d_,u_,m_,h_,f_,g_,y_,x_,v_,w_={126:{host:"smtp.126.com",port:465,secure:!0},163:{host:"smtp.163.com",port:465,secure:!0},"1und1":{host:"smtp.1und1.de",port:465,secure:!0,authMethod:"LOGIN"},Aliyun:{domains:["aliyun.com"],host:"smtp.aliyun.com",port:465,secure:!0},AOL:{domains:["aol.com"],host:"smtp.aol.com",port:587},Bluewin:{host:"smtpauths.bluewin.ch",domains:["bluewin.ch"],port:465},DebugMail:{host:"debugmail.io",port:25},DynectEmail:{aliases:["Dynect"],host:"smtp.dynect.net",port:25},Ethereal:{aliases:["ethereal.email"],host:"smtp.ethereal.email",port:587},FastMail:{domains:["fastmail.fm"],host:"smtp.fastmail.com",port:465,secure:!0},"Forward Email":{aliases:["FE","ForwardEmail"],domains:["forwardemail.net"],host:"smtp.forwardemail.net",port:465,secure:!0},"Feishu Mail":{aliases:["Feishu","FeishuMail"],domains:["www.feishu.cn"],host:"smtp.feishu.cn",port:465,secure:!0},GandiMail:{aliases:["Gandi","Gandi Mail"],host:"mail.gandi.net",port:587},Gmail:{aliases:["Google Mail"],domains:["gmail.com","googlemail.com"],host:"smtp.gmail.com",port:465,secure:!0},Godaddy:{host:"smtpout.secureserver.net",port:25},GodaddyAsia:{host:"smtp.asia.secureserver.net",port:25},GodaddyEurope:{host:"smtp.europe.secureserver.net",port:25},"hot.ee":{host:"mail.hot.ee"},Hotmail:{aliases:["Outlook","Outlook.com","Hotmail.com"],domains:["hotmail.com","outlook.com"],host:"smtp-mail.outlook.com",port:587},iCloud:{aliases:["Me","Mac"],domains:["me.com","mac.com"],host:"smtp.mail.me.com",port:587},Infomaniak:{host:"mail.infomaniak.com",domains:["ik.me","ikmail.com","etik.com"],port:587},Loopia:{host:"mailcluster.loopia.se",port:465},"mail.ee":{host:"smtp.mail.ee"},"Mail.ru":{host:"smtp.mail.ru",port:465,secure:!0},"Mailcatch.app":{host:"sandbox-smtp.mailcatch.app",port:2525},Maildev:{port:1025,ignoreTLS:!0},Mailgun:{host:"smtp.mailgun.org",port:465,secure:!0},Mailjet:{host:"in.mailjet.com",port:587},Mailosaur:{host:"mailosaur.io",port:25},Mailtrap:{host:"live.smtp.mailtrap.io",port:587},Mandrill:{host:"smtp.mandrillapp.com",port:587},Naver:{host:"smtp.naver.com",port:587},One:{host:"send.one.com",port:465,secure:!0},OpenMailBox:{aliases:["OMB","openmailbox.org"],host:"smtp.openmailbox.org",port:465,secure:!0},Outlook365:{host:"smtp.office365.com",port:587,secure:!1},OhMySMTP:{host:"smtp.ohmysmtp.com",port:587,secure:!1},Postmark:{aliases:["PostmarkApp"],host:"smtp.postmarkapp.com",port:2525},"qiye.aliyun":{host:"smtp.mxhichina.com",port:"465",secure:!0},QQ:{domains:["qq.com"],host:"smtp.qq.com",port:465,secure:!0},QQex:{aliases:["QQ Enterprise"],domains:["exmail.qq.com"],host:"smtp.exmail.qq.com",port:465,secure:!0},SendCloud:{host:"smtp.sendcloud.net",port:2525},SendGrid:{host:"smtp.sendgrid.net",port:587},SendinBlue:{aliases:["Brevo"],host:"smtp-relay.brevo.com",port:587},SendPulse:{host:"smtp-pulse.com",port:465,secure:!0},SES:{host:"email-smtp.us-east-1.amazonaws.com",port:465,secure:!0},"SES-US-EAST-1":{host:"email-smtp.us-east-1.amazonaws.com",port:465,secure:!0},"SES-US-WEST-2":{host:"email-smtp.us-west-2.amazonaws.com",port:465,secure:!0},"SES-EU-WEST-1":{host:"email-smtp.eu-west-1.amazonaws.com",port:465,secure:!0},"SES-AP-SOUTH-1":{host:"email-smtp.ap-south-1.amazonaws.com",port:465,secure:!0},"SES-AP-NORTHEAST-1":{host:"email-smtp.ap-northeast-1.amazonaws.com",port:465,secure:!0},"SES-AP-NORTHEAST-2":{host:"email-smtp.ap-northeast-2.amazonaws.com",port:465,secure:!0},"SES-AP-NORTHEAST-3":{host:"email-smtp.ap-northeast-3.amazonaws.com",port:465,secure:!0},"SES-AP-SOUTHEAST-1":{host:"email-smtp.ap-southeast-1.amazonaws.com",port:465,secure:!0},"SES-AP-SOUTHEAST-2":{host:"email-smtp.ap-southeast-2.amazonaws.com",port:465,secure:!0},Sparkpost:{aliases:["SparkPost","SparkPost Mail"],domains:["sparkpost.com"],host:"smtp.sparkpostmail.com",port:587,secure:!1},Tipimail:{host:"smtp.tipimail.com",port:587},Yahoo:{domains:["yahoo.com"],host:"smtp.mail.yahoo.com",port:465,secure:!0},Yandex:{domains:["yandex.ru"],host:"smtp.yandex.ru",port:465,secure:!0},Zoho:{host:"smtp.zoho.com",port:465,secure:!0,authMethod:"LOGIN"}};function b_(){if(o_)return a_;o_=1;const e=w_,t={};function i(e){return e.replace(/[^a-zA-Z0-9.-]/g,"").toLowerCase()}function n(e){let t=["domains","aliases"],i={};return Object.keys(e).forEach((n=>{t.indexOf(n)<0&&(i[n]=e[n])})),i}return Object.keys(e).forEach((s=>{let a=e[s];t[i(s)]=n(a),[].concat(a.aliases||[]).forEach((e=>{t[i(e)]=n(a)})),[].concat(a.domains||[]).forEach((e=>{t[i(e)]=n(a)}))})),a_=function(e){return e=i(e.split("@").pop()),t[e]||!1}}function E_(){if(c_)return r_;c_=1;const e=t,i=function(){if(YP)return JP;YP=1;const e=n_(),i=TP().assign,n=s_(),s=t;return JP=class extends s{constructor(e){if(super(),this.pool=e,this.options=e.options,this.logger=this.pool.logger,this.options.auth)switch((this.options.auth.type||"").toString().toUpperCase()){case"OAUTH2":{let e=new n(this.options.auth,this.logger);e.provisionCallback=this.pool.mailer&&this.pool.mailer.get("oauth2_provision_cb")||e.provisionCallback,this.auth={type:"OAUTH2",user:this.options.auth.user,oauth2:e,method:"XOAUTH2"},e.on("token",(e=>this.pool.mailer.emit("token",e))),e.on("error",(e=>this.emit("error",e)));break}default:if(!this.options.auth.user&&!this.options.auth.pass)break;this.auth={type:(this.options.auth.type||"").toString().toUpperCase()||"LOGIN",user:this.options.auth.user,credentials:{user:this.options.auth.user||"",pass:this.options.auth.pass,options:this.options.auth.options},method:(this.options.auth.method||"").trim().toUpperCase()||this.options.authMethod||!1}}this._connection=!1,this._connected=!1,this.messages=0,this.available=!0}connect(t){this.pool.getSocket(this.options,((n,s)=>{if(n)return t(n);let a=!1,o=this.options;s&&s.connection&&(this.logger.info({tnx:"proxy",remoteAddress:s.connection.remoteAddress,remotePort:s.connection.remotePort,destHost:o.host||"",destPort:o.port||"",action:"connected"},"Using proxied socket from %s:%s to %s:%s",s.connection.remoteAddress,s.connection.remotePort,o.host||"",o.port||""),o=i(!1,o),Object.keys(s).forEach((e=>{o[e]=s[e]}))),this.connection=new e(o),this.connection.once("error",(e=>{if(this.emit("error",e),!a)return a=!0,t(e)})),this.connection.once("end",(()=>{if(this.close(),a)return;a=!0;let e=setTimeout((()=>{if(a)return;let e=new Error("Unexpected socket close");this.connection&&this.connection._socket&&this.connection._socket.upgrading&&(e.code="ETLS"),t(e)}),1e3);try{e.unref()}catch(e){}})),this.connection.connect((()=>{if(!a)return this.auth&&(this.connection.allowsAuth||o.forceAuth)?void this.connection.login(this.auth,(e=>{if(!a){if(a=!0,e)return this.connection.close(),this.emit("error",e),t(e);this._connected=!0,t(null,!0)}})):(a=!0,this._connected=!0,t(null,!0))}))}))}send(e,t){if(!this._connected)return this.connect((i=>i?t(i):this.send(e,t)));let i=e.message.getEnvelope(),n=e.message.messageId(),s=[].concat(i.to||[]);s.length>3&&s.push("...and "+s.splice(2).length+" more"),this.logger.info({tnx:"send",messageId:n,cid:this.id},"Sending message %s using #%s to <%s>",n,this.id,s.join(", ")),e.data.dsn&&(i.dsn=e.data.dsn),this.connection.send(i,e.message.createReadStream(),((e,s)=>{if(this.messages++,e)return this.connection.close(),this.emit("error",e),t(e);s.envelope={from:i.from,to:i.to},s.messageId=n,setImmediate((()=>{let e;this.messages>=this.options.maxMessages?(e=new Error("Resource exhausted"),e.code="EMAXLIMIT",this.connection.close(),this.emit("error",e)):this.pool._checkRateLimit((()=>{this.available=!0,this.emit("available")}))})),t(null,s)}))}close(){this._connected=!1,this.auth&&this.auth.oauth2&&this.auth.oauth2.removeAllListeners(),this.connection&&this.connection.close(),this.emit("close")}}}(),n=n_(),s=b_(),a=TP(),o=AP;return r_=class extends e{constructor(e){let t;super(),"string"==typeof(e=e||{})&&(e={url:e});let i=e.service;"function"==typeof e.getSocket&&(this.getSocket=e.getSocket),e.url&&(t=a.parseConnectionUrl(e.url),i=i||t.service),this.options=a.assign(!1,e,t,i&&s(i)),this.options.maxConnections=this.options.maxConnections||5,this.options.maxMessages=this.options.maxMessages||100,this.logger=a.getLogger(this.options,{component:this.options.component||"smtp-pool"});let r=new n(this.options);this.name="SMTP (pool)",this.version=o.version+"[client:"+r.version+"]",this._rateLimit={counter:0,timeout:null,waiting:[],checkpoint:!1,delta:Number(this.options.rateDelta)||1e3,limit:Number(this.options.rateLimit)||0},this._closed=!1,this._queue=[],this._connections=[],this._connectionCounter=0,this.idling=!0,setImmediate((()=>{this.idling&&this.emit("idle")}))}getSocket(e,t){return setImmediate((()=>t(null,!1)))}send(e,t){return!this._closed&&(this._queue.push({mail:e,requeueAttempts:0,callback:t}),this.idling&&this._queue.length>=this.options.maxConnections&&(this.idling=!1),setImmediate((()=>this._processMessages())),!0)}close(){let e,t=this._connections.length;if(this._closed=!0,clearTimeout(this._rateLimit.timeout),!t&&!this._queue.length)return;for(let i=t-1;i>=0;i--)this._connections[i]&&this._connections[i].available&&(e=this._connections[i],e.close(),this.logger.info({tnx:"connection",cid:e.id,action:"removed"},"Connection #%s removed",e.id));if(t&&!this._connections.length&&this.logger.debug({tnx:"connection"},"All connections removed"),!this._queue.length)return;let i=()=>{if(!this._queue.length)return void this.logger.debug({tnx:"connection"},"Pending queue entries cleared");let t=this._queue.shift();if(t&&"function"==typeof t.callback)try{t.callback(new Error("Connection pool was closed"))}catch(t){this.logger.error({err:t,tnx:"callback",cid:e.id},"Callback error for #%s: %s",e.id,t.message)}setImmediate(i)};setImmediate(i)}_processMessages(){let e,t,i;if(this._closed)return;if(!this._queue.length)return void(this.idling||(this.idling=!0,this.emit("idle")));for(t=0,i=this._connections.length;t<i;t++)if(this._connections[t].available){e=this._connections[t];break}if(!e&&this._connections.length<this.options.maxConnections&&(e=this._createConnection()),!e)return void(this.idling=!1);!this.idling&&this._queue.length<this.options.maxConnections&&(this.idling=!0,this.emit("idle"));let n=e.queueEntry=this._queue.shift();n.messageId=(e.queueEntry.mail.message.getHeader("message-id")||"").replace(/[<>\s]/g,""),e.available=!1,this.logger.debug({tnx:"pool",cid:e.id,messageId:n.messageId,action:"assign"},"Assigned message <%s> to #%s (%s)",n.messageId,e.id,e.messages+1),this._rateLimit.limit&&(this._rateLimit.counter++,this._rateLimit.checkpoint||(this._rateLimit.checkpoint=Date.now())),e.send(n.mail,((t,i)=>{if(n===e.queueEntry){try{n.callback(t,i)}catch(t){this.logger.error({err:t,tnx:"callback",cid:e.id},"Callback error for #%s: %s",e.id,t.message)}e.queueEntry=!1}}))}_createConnection(){let e=new i(this);return e.id=++this._connectionCounter,this.logger.info({tnx:"pool",cid:e.id,action:"conection"},"Created new pool resource #%s",e.id),e.on("available",(()=>{this.logger.debug({tnx:"connection",cid:e.id,action:"available"},"Connection #%s became available",e.id),this._closed?this.close():this._processMessages()})),e.once("error",(t=>{if("EMAXLIMIT"!==t.code?this.logger.error({err:t,tnx:"pool",cid:e.id},"Pool Error for #%s: %s",e.id,t.message):this.logger.debug({tnx:"pool",cid:e.id,action:"maxlimit"},"Max messages limit exchausted for #%s",e.id),e.queueEntry){try{e.queueEntry.callback(t)}catch(t){this.logger.error({err:t,tnx:"callback",cid:e.id},"Callback error for #%s: %s",e.id,t.message)}e.queueEntry=!1}this._removeConnection(e),this._continueProcessing()})),e.once("close",(()=>{this.logger.info({tnx:"connection",cid:e.id,action:"closed"},"Connection #%s was closed",e.id),this._removeConnection(e),e.queueEntry?setTimeout((()=>{e.queueEntry&&(this._shouldRequeuOnConnectionClose(e.queueEntry)?this._requeueEntryOnConnectionClose(e):this._failDeliveryOnConnectionClose(e)),this._continueProcessing()}),50):this._continueProcessing()})),this._connections.push(e),e}_shouldRequeuOnConnectionClose(e){return void 0===this.options.maxRequeues||this.options.maxRequeues<0||e.requeueAttempts<this.options.maxRequeues}_failDeliveryOnConnectionClose(e){if(e.queueEntry&&e.queueEntry.callback){try{e.queueEntry.callback(new Error("Reached maximum number of retries after connection was closed"))}catch(t){this.logger.error({err:t,tnx:"callback",messageId:e.queueEntry.messageId,cid:e.id},"Callback error for #%s: %s",e.id,t.message)}e.queueEntry=!1}}_requeueEntryOnConnectionClose(e){e.queueEntry.requeueAttempts=e.queueEntry.requeueAttempts+1,this.logger.debug({tnx:"pool",cid:e.id,messageId:e.queueEntry.messageId,action:"requeue"},"Re-queued message <%s> for #%s. Attempt: #%s",e.queueEntry.messageId,e.id,e.queueEntry.requeueAttempts),this._queue.unshift(e.queueEntry),e.queueEntry=!1}_continueProcessing(){this._closed?this.close():setTimeout((()=>this._processMessages()),100)}_removeConnection(e){let t=this._connections.indexOf(e);-1!==t&&this._connections.splice(t,1)}_checkRateLimit(e){if(!this._rateLimit.limit)return e();let t=Date.now();return this._rateLimit.counter<this._rateLimit.limit?e():(this._rateLimit.waiting.push(e),this._rateLimit.checkpoint<=t-this._rateLimit.delta?this._clearRateLimit():void(this._rateLimit.timeout||(this._rateLimit.timeout=setTimeout((()=>this._clearRateLimit()),this._rateLimit.delta-(t-this._rateLimit.checkpoint)),this._rateLimit.checkpoint=t)))}_clearRateLimit(){for(clearTimeout(this._rateLimit.timeout),this._rateLimit.timeout=null,this._rateLimit.counter=0,this._rateLimit.checkpoint=!1;this._rateLimit.waiting.length;){let e=this._rateLimit.waiting.shift();setImmediate(e)}}isIdle(){return this.idling}verify(e){let t;e||(t=new Promise(((t,i)=>{e=a.callbackPromise(t,i)})));let s=new i(this).auth;return this.getSocket(this.options,((t,i)=>{if(t)return e(t);let o=this.options;i&&i.connection&&(this.logger.info({tnx:"proxy",remoteAddress:i.connection.remoteAddress,remotePort:i.connection.remotePort,destHost:o.host||"",destPort:o.port||"",action:"connected"},"Using proxied socket from %s:%s to %s:%s",i.connection.remoteAddress,i.connection.remotePort,o.host||"",o.port||""),o=a.assign(!1,o),Object.keys(i).forEach((e=>{o[e]=i[e]})));let r=new n(o),c=!1;r.once("error",(t=>{if(!c)return c=!0,r.close(),e(t)})),r.once("end",(()=>{if(!c)return c=!0,e(new Error("Connection closed"))}));let l=()=>{if(!c)return c=!0,r.quit(),e(null,!0)};r.connect((()=>{if(!c)if(s&&(r.allowsAuth||o.forceAuth))r.login(s,(t=>{if(!c)return t?(c=!0,r.close(),e(t)):void l()}));else{if(!s&&r.allowsAuth&&o.forceAuth){let t=new Error("Authentication info was not provided");return t.code="NoAuth",c=!0,r.close(),e(t)}l()}}))})),t}},r_}function S_(){if(x_)return y_;x_=1;const e=t,i=AP,n=TP(),s=MP();return y_=class extends e{constructor(e){super(),e=e||{},this.options=e||{},this.ses=this.options.SES,this.name="SESTransport",this.version=i.version,this.logger=n.getLogger(this.options,{component:this.options.component||"ses-transport"}),this.maxConnections=Number(this.options.maxConnections)||1/0,this.connections=0,this.sendingRate=Number(this.options.sendingRate)||1/0,this.sendingRateTTL=null,this.rateInterval=1e3,this.rateMessages=[],this.pending=[],this.idling=!0,setImmediate((()=>{this.idling&&this.emit("idle")}))}send(e,t){return this.connections>=this.maxConnections?(this.idling=!1,this.pending.push({mail:e,callback:t})):this._checkSendingRate()?void this._send(e,((...e)=>{setImmediate((()=>t(...e))),this._sent()})):(this.idling=!1,this.pending.push({mail:e,callback:t}))}_checkRatedQueue(){if(this.connections>=this.maxConnections||!this._checkSendingRate())return;if(!this.pending.length)return void(this.idling||(this.idling=!0,this.emit("idle")));let e=this.pending.shift();this._send(e.mail,((...t)=>{setImmediate((()=>e.callback(...t))),this._sent()}))}_checkSendingRate(){clearTimeout(this.sendingRateTTL);let e=Date.now(),t=!1;for(let i=this.rateMessages.length-1;i>=0;i--)this.rateMessages[i].ts>=e-this.rateInterval&&(!t||this.rateMessages[i].ts<t)&&(t=this.rateMessages[i].ts),this.rateMessages[i].ts<e-this.rateInterval&&!this.rateMessages[i].pending&&this.rateMessages.splice(i,1);if(this.rateMessages.length<this.sendingRate)return!0;let i=Math.max(t+1001,e+20);this.sendingRateTTL=setTimeout((()=>this._checkRatedQueue()),e-i);try{this.sendingRateTTL.unref()}catch(e){}return!1}_sent(){this.connections--,this._checkRatedQueue()}isIdle(){return this.idling}_send(e,t){let i={ts:Date.now(),pending:!0};this.connections++,this.rateMessages.push(i);let n=e.data.envelope||e.message.getEnvelope(),a=e.message.messageId(),o=[].concat(n.to||[]);o.length>3&&o.push("...and "+o.splice(2).length+" more"),this.logger.info({tnx:"send",messageId:a},"Sending message %s to <%s>",a,o.join(", "));setImmediate((()=>(t=>{e.data._dkim||(e.data._dkim={}),e.data._dkim.skipFields&&"string"==typeof e.data._dkim.skipFields?e.data._dkim.skipFields+=":date:message-id":e.data._dkim.skipFields="date:message-id";let i=e.message.createReadStream(),n=i.pipe(new s),a=[],o=0;n.on("readable",(()=>{let e;for(;null!==(e=n.read());)a.push(e),o+=e.length})),i.once("error",(e=>n.emit("error",e))),n.once("error",(e=>{t(e)})),n.once("end",(()=>t(null,Buffer.concat(a,o))))})(((s,o)=>{if(s)return this.logger.error({err:s,tnx:"send",messageId:a},"Failed creating message for %s. %s",a,s.message),i.pending=!1,t(s);let r={RawMessage:{Data:o},Source:n.from,Destinations:n.to};Object.keys(e.data.ses||{}).forEach((t=>{r[t]=e.data.ses[t]}));let c=(this.ses.aws?this.ses.ses:this.ses)||{},l=this.ses.aws||{};var p;p=(e,s)=>{let p;!e&&s||(s="us-east-1"),p="function"==typeof c.send&&l.SendRawEmailCommand?c.send(new l.SendRawEmailCommand(r)):c.sendRawEmail(r).promise(),p.then((e=>{"us-east-1"===s&&(s="email"),i.pending=!1,t(null,{envelope:{from:n.from,to:n.to},messageId:"<"+e.MessageId+(/@/.test(e.MessageId)?"":"@"+s+".amazonses.com")+">",response:e.MessageId,raw:o})})).catch((e=>{this.logger.error({err:e,tnx:"send"},"Send error for %s: %s",a,e.message),i.pending=!1,t(e)}))},c.config&&"function"==typeof c.config.region?c.config.region().then((e=>p(null,e))).catch((e=>p(e))):p(null,c.config&&c.config.region||"us-east-1")}))))}verify(e){let t,i=(this.ses.aws?this.ses.ses:this.ses)||{},s=this.ses.aws||{};const a={RawMessage:{Data:"From: invalid@invalid\r\nTo: invalid@invalid\r\n Subject: Invalid\r\n\r\nInvalid"},Source:"invalid@invalid",Destinations:["invalid@invalid"]};e||(t=new Promise(((t,i)=>{e=n.callbackPromise(t,i)})));const o=t=>t&&"InvalidParameterValue"!==(t.code||t.Code)?e(t):e(null,!0);return"function"==typeof i.send&&s.SendRawEmailCommand?(a.RawMessage.Data=Buffer.from(a.RawMessage.Data),i.send(new s.SendRawEmailCommand(a),o)):i.sendRawEmail(a,o),t}},y_}var C_=function(){if(v_)return KO;v_=1;const e=i_(),i=TP(),n=E_(),s=function(){if(p_)return l_;p_=1;const e=t,i=n_(),n=b_(),s=TP(),a=s_(),o=AP;return l_=class extends e{constructor(e){let t;super(),"string"==typeof(e=e||{})&&(e={url:e});let a=e.service;"function"==typeof e.getSocket&&(this.getSocket=e.getSocket),e.url&&(t=s.parseConnectionUrl(e.url),a=a||t.service),this.options=s.assign(!1,e,t,a&&n(a)),this.logger=s.getLogger(this.options,{component:this.options.component||"smtp-transport"});let r=new i(this.options);this.name="SMTP",this.version=o.version+"[client:"+r.version+"]",this.options.auth&&(this.auth=this.getAuth({}))}getSocket(e,t){return setImmediate((()=>t(null,!1)))}getAuth(e){if(!e)return this.auth;let t=!1,i={};if(this.options.auth&&"object"==typeof this.options.auth&&Object.keys(this.options.auth).forEach((e=>{t=!0,i[e]=this.options.auth[e]})),e&&"object"==typeof e&&Object.keys(e).forEach((n=>{t=!0,i[n]=e[n]})),!t)return!1;if("OAUTH2"===(i.type||"").toString().toUpperCase()){if(!i.service&&!i.user)return!1;let e=new a(i,this.logger);return e.provisionCallback=this.mailer&&this.mailer.get("oauth2_provision_cb")||e.provisionCallback,e.on("token",(e=>this.mailer.emit("token",e))),e.on("error",(e=>this.emit("error",e))),{type:"OAUTH2",user:i.user,oauth2:e,method:"XOAUTH2"}}return{type:(i.type||"").toString().toUpperCase()||"LOGIN",user:i.user,credentials:{user:i.user||"",pass:i.pass,options:i.options},method:(i.method||"").trim().toUpperCase()||this.options.authMethod||!1}}send(e,t){this.getSocket(this.options,((n,a)=>{if(n)return t(n);let o=!1,r=this.options;a&&a.connection&&(this.logger.info({tnx:"proxy",remoteAddress:a.connection.remoteAddress,remotePort:a.connection.remotePort,destHost:r.host||"",destPort:r.port||"",action:"connected"},"Using proxied socket from %s:%s to %s:%s",a.connection.remoteAddress,a.connection.remotePort,r.host||"",r.port||""),r=s.assign(!1,r),Object.keys(a).forEach((e=>{r[e]=a[e]})));let c=new i(r);c.once("error",(e=>{if(!o)return o=!0,c.close(),t(e)})),c.once("end",(()=>{if(o)return;let e=setTimeout((()=>{if(o)return;o=!0;let e=new Error("Unexpected socket close");c&&c._socket&&c._socket.upgrading&&(e.code="ETLS"),t(e)}),1e3);try{e.unref()}catch(e){}}));let l=()=>{let i=e.message.getEnvelope(),n=e.message.messageId(),s=[].concat(i.to||[]);s.length>3&&s.push("...and "+s.splice(2).length+" more"),e.data.dsn&&(i.dsn=e.data.dsn),this.logger.info({tnx:"send",messageId:n},"Sending message %s to <%s>",n,s.join(", ")),c.send(i,e.message.createReadStream(),((e,s)=>{if(o=!0,c.close(),e)return this.logger.error({err:e,tnx:"send"},"Send error for %s: %s",n,e.message),t(e);s.envelope={from:i.from,to:i.to},s.messageId=n;try{return t(null,s)}catch(e){this.logger.error({err:e,tnx:"callback"},"Callback error for %s: %s",n,e.message)}}))};c.connect((()=>{if(o)return;let i=this.getAuth(e.data.auth);i&&(c.allowsAuth||r.forceAuth)?c.login(i,(e=>{if(i&&i!==this.auth&&i.oauth2&&i.oauth2.removeAllListeners(),!o)return e?(o=!0,c.close(),t(e)):void l()})):l()}))}))}verify(e){let t;return e||(t=new Promise(((t,i)=>{e=s.callbackPromise(t,i)}))),this.getSocket(this.options,((t,n)=>{if(t)return e(t);let a=this.options;n&&n.connection&&(this.logger.info({tnx:"proxy",remoteAddress:n.connection.remoteAddress,remotePort:n.connection.remotePort,destHost:a.host||"",destPort:a.port||"",action:"connected"},"Using proxied socket from %s:%s to %s:%s",n.connection.remoteAddress,n.connection.remotePort,a.host||"",a.port||""),a=s.assign(!1,a),Object.keys(n).forEach((e=>{a[e]=n[e]})));let o=new i(a),r=!1;o.once("error",(t=>{if(!r)return r=!0,o.close(),e(t)})),o.once("end",(()=>{if(!r)return r=!0,e(new Error("Connection closed"))}));let c=()=>{if(!r)return r=!0,o.quit(),e(null,!0)};o.connect((()=>{if(r)return;let t=this.getAuth({});if(t&&(o.allowsAuth||a.forceAuth))o.login(t,(t=>{if(!r)return t?(r=!0,o.close(),e(t)):void c()}));else{if(!t&&o.allowsAuth&&a.forceAuth){let t=new Error("Authentication info was not provided");return t.code="NoAuth",r=!0,o.close(),e(t)}c()}}))})),t}close(){this.auth&&this.auth.oauth2&&this.auth.oauth2.removeAllListeners(),this.emit("close")}}}(),a=function(){if(u_)return d_;u_=1;const e=f.spawn,t=AP,i=TP();return d_=class{constructor(n){n=n||{},this._spawn=e,this.options=n||{},this.name="Sendmail",this.version=t.version,this.path="sendmail",this.args=!1,this.winbreak=!1,this.logger=i.getLogger(this.options,{component:this.options.component||"sendmail"}),n&&("string"==typeof n?this.path=n:"object"==typeof n&&(n.path&&(this.path=n.path),Array.isArray(n.args)&&(this.args=n.args),this.winbreak=["win","windows","dos","\r\n"].includes((n.newline||"").toString().toLowerCase())))}send(e,t){e.message.keepBcc=!0;let i,n,s,a=e.data.envelope||e.message.getEnvelope(),o=e.message.messageId();if([].concat(a.from||[]).concat(a.to||[]).some((e=>/^-/.test(e))))return t(new Error("Can not send mail. Invalid envelope addresses."));i=this.args?["-i"].concat(this.args).concat(a.to):["-i"].concat(a.from?["-f",a.from]:[]).concat(a.to);let r=i=>{if(!s)return s=!0,"function"==typeof t?i?t(i):t(null,{envelope:e.data.envelope||e.message.getEnvelope(),messageId:o,response:"Messages queued for delivery"}):void 0};try{n=this._spawn(this.path,i)}catch(e){return this.logger.error({err:e,tnx:"spawn",messageId:o},"Error occurred while spawning sendmail. %s",e.message),r(e)}if(!n)return r(new Error("sendmail was not found"));{n.on("error",(e=>{this.logger.error({err:e,tnx:"spawn",messageId:o},"Error occurred when sending message %s. %s",o,e.message),r(e)})),n.once("exit",(e=>{if(!e)return r();let t;t=127===e?new Error("Sendmail command not found, process exited with code "+e):new Error("Sendmail exited with code "+e),this.logger.error({err:t,tnx:"stdin",messageId:o},"Error sending message %s to sendmail. %s",o,t.message),r(t)})),n.once("close",r),n.stdin.on("error",(e=>{this.logger.error({err:e,tnx:"stdin",messageId:o},"Error occurred when piping message %s to sendmail. %s",o,e.message),r(e)}));let t=[].concat(a.to||[]);t.length>3&&t.push("...and "+t.splice(2).length+" more"),this.logger.info({tnx:"send",messageId:o},"Sending message %s to <%s>",o,t.join(", "));let i=e.message.createReadStream();i.once("error",(e=>{this.logger.error({err:e,tnx:"stdin",messageId:o},"Error occurred when generating message %s. %s",o,e.message),n.kill("SIGINT"),r(e)})),i.pipe(n.stdin)}}}}(),o=function(){if(h_)return m_;h_=1;const e=AP,t=TP();return m_=class{constructor(i){i=i||{},this.options=i||{},this.name="StreamTransport",this.version=e.version,this.logger=t.getLogger(this.options,{component:this.options.component||"stream-transport"}),this.winbreak=["win","windows","dos","\r\n"].includes((i.newline||"").toString().toLowerCase())}send(e,t){e.message.keepBcc=!0;let i=e.data.envelope||e.message.getEnvelope(),n=e.message.messageId(),s=[].concat(i.to||[]);s.length>3&&s.push("...and "+s.splice(2).length+" more"),this.logger.info({tnx:"send",messageId:n},"Sending message %s to <%s> using %s line breaks",n,s.join(", "),this.winbreak?"<CR><LF>":"<LF>"),setImmediate((()=>{let i;try{i=e.message.createReadStream()}catch(e){return this.logger.error({err:e,tnx:"send",messageId:n},"Creating send stream failed for %s. %s",n,e.message),t(e)}if(!this.options.buffer)return i.once("error",(e=>{this.logger.error({err:e,tnx:"send",messageId:n},"Failed creating message for %s. %s",n,e.message)})),t(null,{envelope:e.data.envelope||e.message.getEnvelope(),messageId:n,message:i});let s=[],a=0;i.on("readable",(()=>{let e;for(;null!==(e=i.read());)s.push(e),a+=e.length})),i.once("error",(e=>(this.logger.error({err:e,tnx:"send",messageId:n},"Failed creating message for %s. %s",n,e.message),t(e)))),i.on("end",(()=>t(null,{envelope:e.data.envelope||e.message.getEnvelope(),messageId:n,message:Buffer.concat(s,a)})))}))}}}(),r=function(){if(g_)return f_;g_=1;const e=AP,t=TP();return f_=class{constructor(i){i=i||{},this.options=i||{},this.name="JSONTransport",this.version=e.version,this.logger=t.getLogger(this.options,{component:this.options.component||"json-transport"})}send(e,t){e.message.keepBcc=!0;let i=e.data.envelope||e.message.getEnvelope(),n=e.message.messageId(),s=[].concat(i.to||[]);s.length>3&&s.push("...and "+s.splice(2).length+" more"),this.logger.info({tnx:"send",messageId:n},"Composing JSON structure of %s to <%s>",n,s.join(", ")),setImmediate((()=>{e.normalize(((e,s)=>e?(this.logger.error({err:e,tnx:"send",messageId:n},"Failed building JSON structure for %s. %s",n,e.message),t(e)):(delete s.envelope,delete s.normalizedHeaders,t(null,{envelope:i,messageId:n,message:this.options.skipEncoding?s:JSON.stringify(s)}))))}))}}}(),c=S_(),l=IP(),p=AP,d=(process.env.ETHEREAL_API||"https://api.nodemailer.com").replace(/\/+$/,""),u=(process.env.ETHEREAL_WEB||"https://ethereal.email").replace(/\/+$/,""),m=(process.env.ETHEREAL_API_KEY||"").replace(/\s*/g,"")||null,h=["true","yes","y","1"].includes((process.env.ETHEREAL_CACHE||"yes").toString().trim().toLowerCase());let g=!1;return KO.createTransport=function(t,l){let p,d,u;return("object"==typeof t&&"function"!=typeof t.send||"string"==typeof t&&/^(smtps?|direct):/i.test(t))&&(d=(p="string"==typeof t?t:t.url)?i.parseConnectionUrl(p):t,t=d.pool?new n(d):d.sendmail?new a(d):d.streamTransport?new o(d):d.jsonTransport?new r(d):d.SES?new c(d):new s(d)),u=new e(t,d,l),u},KO.createTestAccount=function(e,t){let n;if(t||"function"!=typeof e||(t=e,e=!1),t||(n=new Promise(((e,n)=>{t=i.callbackPromise(e,n)}))),h&&g)return setImmediate((()=>t(null,g))),n;e=e||d;let s=[],a=0,o={},r={requestor:p.name,version:p.version};m&&(o.Authorization="Bearer "+m);let c=l(e+"/user",{contentType:"application/json",method:"POST",headers:o,body:Buffer.from(JSON.stringify(r))});return c.on("readable",(()=>{let e;for(;null!==(e=c.read());)s.push(e),a+=e.length})),c.once("error",(e=>t(e))),c.once("end",(()=>{let e,i,n=Buffer.concat(s,a);try{e=JSON.parse(n.toString())}catch(e){i=e}return i?t(i):"success"!==e.status||e.error?t(new Error(e.error||"Request failed")):(delete e.status,g=e,void t(null,g))})),n},KO.getTestMessageUrl=function(e){if(!e||!e.response)return!1;let t=new Map;return e.response.replace(/\[([^\]]+)\]$/,((e,i)=>{i.replace(/\b([A-Z0-9]+)=([^\s]+)/g,((e,i,n)=>{t.set(i,n)}))})),!(!t.has("STATUS")||!t.has("MSGID"))&&(g.web||u)+"/message/"+t.get("MSGID")},KO}();const A_={clientConfig:{region:"eu-west-1"}};e.DEFAULT_PARAMETER_STORE_CLIENT_CONFIG=Qh,e.DEFAULT_SES_CLIENT_CONFIG=A_,e.lambda=e=>{const{clientConfig:t,...i}={...bc,...e},n=new vo(t);return{invokeLambda:(e,t)=>(async(e,t,i,n)=>{try{const s=new uc({FunctionName:t.functionName,InvocationType:i,Payload:Buffer.from(JSON.stringify(n))}),a=await e.send(s);return t.logger&&t.logger("info",JSON.stringify(a)),!0}catch(e){return t.logger&&t.logger("error",e),!1}})(n,i,e,t)}},e.parameterStore=e=>{const{clientConfig:t,...i}={...Qh,...e},n=new $l(t);return{getSecret:(e,t="")=>(async(e,t,i,n)=>{if(t.onlyDefault)return n;try{const s=await e.send(new Wh({Name:`${t.prefix??""}${i}`,WithDecryption:!0}));return s?.Parameter?.Value??n}catch(e){return t.logger&&t.logger("error",e),n}})(n,i,e,t),getSecrets:(e,t="")=>(async(e,t,i,n)=>{if(t.onlyDefault)return[n];try{const s=new Kh({Names:i.map((e=>`${t.prefix??""}${e}`)),WithDecryption:!0}),a=await e.send(s);return a?.Parameters?.map((e=>e.Value??n))??[n]}catch(e){return t.logger&&t.logger("error",e),[n]}})(n,i,e,t)}},e.ses=(e,t)=>{const{clientConfig:i,...n}={...A_,...t},s=new kf(i),a=C_.createTransport(t.customSMTPConfig??{SES:{aws:WO,ses:s}});return{sendMail:t=>(async(e,t,i,n)=>{if(!i.html&&!i.text)return e.logger&&e.logger("error","The option text or html needs to be set."),!1;if(!i.to||!i.subject)return e.logger&&e.logger("error","The fields to and subject have to be set."),!1;const s=await t.sendMail({from:n,...i});return e.logger&&e.logger("info",`Transporter response: ${s}`),!!s||(e.logger&&e.logger("error","Sending email failed!"),!1)})(n,a,t,e)}}}));
|
|
1
|
+
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("events"),require("url"),require("util"),require("fs"),require("http"),require("https"),require("zlib"),require("stream"),require("net"),require("dns"),require("os"),require("path"),require("crypto"),require("tls"),require("child_process")):"function"==typeof define&&define.amd?define(["exports","events","url","util","fs","http","https","zlib","stream","net","dns","os","path","crypto","tls","child_process"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).allthings={},e.require$$0$5,e.require$$0$1,e.require$$1$1,e.require$$2,e.require$$0$3,e.require$$1,e.require$$3,e.require$$0$2,e.require$$7,e.require$$4,e.require$$6,e.require$$0$4,e.require$$2$1,e.require$$1$2,e.require$$0$6)}(this,(function(e,t,i,n,s,a,o,r,c,l,p,d,u,m,h,f){"use strict";const g=e=>{let t=e.httpHandler;return{setHttpHandler(e){t=e},httpHandler:()=>t,updateHttpClientConfig(e,i){t.updateHttpClientConfig(e,i)},httpHandlerConfigs:()=>t.httpHandlerConfigs()}},y=e=>({httpHandler:e.httpHandler()});var x,v,w,b,E;!function(e){e.HEADER="header",e.QUERY="query"}(x||(x={})),function(e){e.HEADER="header",e.QUERY="query"}(v||(v={})),function(e){e.HTTP="http",e.HTTPS="https"}(w||(w={})),function(e){e.MD5="md5",e.CRC32="crc32",e.CRC32C="crc32c",e.SHA1="sha1",e.SHA256="sha256"}(b||(b={})),function(e){e[e.HEADER=0]="HEADER",e[e.TRAILER=1]="TRAILER"}(E||(E={}));const S="__smithy_context";var C,A;!function(e){e.PROFILE="profile",e.SSO_SESSION="sso-session",e.SERVICES="services"}(C||(C={})),function(e){e.HTTP_0_9="http/0.9",e.HTTP_1_0="http/1.0",e.TDS_8_0="tds/8.0"}(A||(A={}));class I{constructor(e){this.method=e.method||"GET",this.hostname=e.hostname||"localhost",this.port=e.port,this.query=e.query||{},this.headers=e.headers||{},this.body=e.body,this.protocol=e.protocol?":"!==e.protocol.slice(-1)?`${e.protocol}:`:e.protocol:"https:",this.path=e.path?"/"!==e.path.charAt(0)?`/${e.path}`:e.path:"/",this.username=e.username,this.password=e.password,this.fragment=e.fragment}static clone(e){const t=new I({...e,headers:{...e.headers}});var i;return t.query&&(t.query=(i=t.query,Object.keys(i).reduce(((e,t)=>{const n=i[t];return{...e,[t]:Array.isArray(n)?[...n]:n}}),{}))),t}static isInstance(e){if(!e)return!1;const t=e;return"method"in t&&"protocol"in t&&"hostname"in t&&"path"in t&&"object"==typeof t.query&&"object"==typeof t.headers}clone(){return I.clone(this)}}class T{constructor(e){this.statusCode=e.statusCode,this.reason=e.reason,this.headers=e.headers||{},this.body=e.body}static isInstance(e){if(!e)return!1;const t=e;return"number"==typeof t.statusCode&&"object"==typeof t.headers}}const k={name:"hostHeaderMiddleware",step:"build",priority:"low",tags:["HOST"],override:!0},O=e=>({applyToStack:t=>{t.add((e=>t=>async i=>{if(!I.isInstance(i.request))return t(i);const{request:n}=i,{handlerProtocol:s=""}=e.requestHandler.metadata||{};if(s.indexOf("h2")>=0&&!n.headers[":authority"])delete n.headers.host,n.headers[":authority"]=n.hostname+(n.port?":"+n.port:"");else if(!n.headers.host){let e=n.hostname;null!=n.port&&(e+=`:${n.port}`),n.headers.host=e}return t(i)})(e),k)}}),P={name:"loggerMiddleware",tags:["LOGGER"],step:"initialize",override:!0},_=e=>({applyToStack:e=>{e.add(((e,t)=>async i=>{try{const n=await e(i),{clientName:s,commandName:a,logger:o,dynamoDbDocumentClientOptions:r={}}=t,{overrideInputFilterSensitiveLog:c,overrideOutputFilterSensitiveLog:l}=r,p=c??t.inputFilterSensitiveLog,d=l??t.outputFilterSensitiveLog,{$metadata:u,...m}=n.output;return o?.info?.({clientName:s,commandName:a,input:p(i.input),output:d(m),metadata:u}),n}catch(e){const{clientName:n,commandName:s,logger:a,dynamoDbDocumentClientOptions:o={}}=t,{overrideInputFilterSensitiveLog:r}=o,c=r??t.inputFilterSensitiveLog;throw a?.error?.({clientName:n,commandName:s,input:c(i.input),error:e,metadata:e.$metadata}),e}}),P)}}),R="X-Amzn-Trace-Id",$={step:"build",tags:["RECURSION_DETECTION"],name:"recursionDetectionMiddleware",override:!0,priority:"low"},M=e=>({applyToStack:t=>{t.add((e=>t=>async i=>{const{request:n}=i;if(!I.isInstance(n)||"node"!==e.runtime||n.headers.hasOwnProperty(R))return t(i);const s=[]._X_AMZN_TRACE_ID,a=e=>"string"==typeof e&&e.length>0;return a([].AWS_LAMBDA_FUNCTION_NAME)&&a(s)&&(n.headers[R]=s),t({...i,request:n})})(e),$)}}),N=e=>e[S]||(e[S]={}),D=e=>{if("function"==typeof e)return e;const t=Promise.resolve(e);return()=>t};const j=(e,t)=>(i,n)=>async s=>{const a=e.httpAuthSchemeProvider(await t.httpAuthSchemeParametersProvider(e,n,s.input)),o=function(e){const t=new Map;for(const i of e)t.set(i.schemeId,i);return t}(e.httpAuthSchemes),r=N(n),c=[];for(const i of a){const s=o.get(i.schemeId);if(!s){c.push(`HttpAuthScheme \`${i.schemeId}\` was not enabled for this service.`);continue}const a=s.identityProvider(await t.identityProviderConfigProvider(e));if(!a){c.push(`HttpAuthScheme \`${i.schemeId}\` did not have an IdentityProvider configured.`);continue}const{identityProperties:l={},signingProperties:p={}}=i.propertiesExtractor?.(e,n)||{};i.identityProperties=Object.assign(i.identityProperties||{},l),i.signingProperties=Object.assign(i.signingProperties||{},p),r.selectedHttpAuthScheme={httpAuthOption:i,identity:await a(i.identityProperties),signer:s.signer};break}if(!r.selectedHttpAuthScheme)throw new Error(c.join("\n"));return i(s)},z={step:"serialize",tags:["HTTP_AUTH_SCHEME"],name:"httpAuthSchemeMiddleware",override:!0,relation:"before",toMiddleware:"endpointV2Middleware"},L=(e,{httpAuthSchemeParametersProvider:t,identityProviderConfigProvider:i})=>({applyToStack:n=>{n.addRelativeTo(j(e,{httpAuthSchemeParametersProvider:t,identityProviderConfigProvider:i}),z)}}),F={name:"deserializerMiddleware",step:"deserialize",tags:["DESERIALIZER"],override:!0},U={name:"serializerMiddleware",step:"serialize",tags:["SERIALIZER"],override:!0};function B(e,t,i){return{applyToStack:n=>{n.add(((e,t)=>i=>async n=>{const{response:s}=await i(n);try{return{response:s,output:await t(s,e)}}catch(e){if(Object.defineProperty(e,"$response",{value:s}),!("$metadata"in e)){const t="Deserialization error: to see the raw response, inspect the hidden field {error}.$response on this object.";e.message+="\n "+t,void 0!==e.$responseBodyText&&e.$response&&(e.$response.body=e.$responseBodyText)}throw e}})(e,i),F),n.add(((e,t)=>(i,n)=>async s=>{const a=n.endpointV2?.url&&e.urlParser?async()=>e.urlParser(n.endpointV2.url):e.endpoint;if(!a)throw new Error("No valid endpoint provider available.");const o=await t(s.input,{...e,endpoint:a});return i({...s,request:o})})(e,t),U)}}}const H=e=>e=>{throw e},q=(e,t)=>{},V={step:"finalizeRequest",tags:["HTTP_SIGNING"],name:"httpSigningMiddleware",aliases:["apiKeyMiddleware","tokenMiddleware","awsAuthMiddleware"],override:!0,relation:"after",toMiddleware:"retryMiddleware"},G=e=>({applyToStack:e=>{e.addRelativeTo(((e,t)=>async i=>{if(!I.isInstance(i.request))return e(i);const n=N(t).selectedHttpAuthScheme;if(!n)throw new Error("No HttpAuthScheme was selected: unable to sign request");const{httpAuthOption:{signingProperties:s={}},identity:a,signer:o}=n,r=await e({...i,request:await o.sign(i.request,a,s)}).catch((o.errorHandler||H)(s));return(o.successHandler||q)(r.response,s),r}),V)}}),W=e=>{if("function"==typeof e)return e;const t=Promise.resolve(e);return()=>t},K=async(e,t,i,...n)=>await t.send(new e(i),...n);function Q(e,t,i,n,s){return async function*(a,o,...r){let c,l=a.startingToken||void 0,p=!0;for(;p;){if(o[i]=l,s&&(o[s]=o[s]??a.pageSize),!(a.client instanceof e))throw new Error(`Invalid client, expected instance of ${e.name}`);c=await K(t,a.client,o,...r),yield c;const d=l;l=X(c,n),p=!(!l||a.stopOnSameToken&&l===d)}}}const X=(e,t)=>{let i=e;const n=t.split(".");for(const e of n){if(!i||"object"!=typeof i)return;i=i[e]}return i},J={},Y=new Array(64);for(let e=0,t="A".charCodeAt(0),i="Z".charCodeAt(0);e+t<=i;e++){const i=String.fromCharCode(e+t);J[i]=e,Y[e]=i}for(let e=0,t="a".charCodeAt(0),i="z".charCodeAt(0);e+t<=i;e++){const i=String.fromCharCode(e+t),n=e+26;J[i]=n,Y[n]=i}for(let e=0;e<10;e++){J[e.toString(10)]=e+52;const t=e.toString(10),i=e+52;J[t]=i,Y[i]=t}J["+"]=62,Y[62]="+",J["/"]=63,Y[63]="/";const Z=e=>{let t=e.length/4*3;"=="===e.slice(-2)?t-=2:"="===e.slice(-1)&&t--;const i=new ArrayBuffer(t),n=new DataView(i);for(let t=0;t<e.length;t+=4){let i=0,s=0;for(let n=t,a=t+3;n<=a;n++)if("="!==e[n]){if(!(e[n]in J))throw new TypeError(`Invalid character ${e[n]} in base64 string.`);i|=J[e[n]]<<6*(a-n),s+=6}else i>>=6;const a=t/4*3;i>>=s%8;const o=Math.floor(s/8);for(let e=0;e<o;e++){const t=8*(o-e-1);n.setUint8(a+e,(i&255<<t)>>t)}}return new Uint8Array(i)},ee=e=>(new TextEncoder).encode(e),te=e=>"string"==typeof e?ee(e):ArrayBuffer.isView(e)?new Uint8Array(e.buffer,e.byteOffset,e.byteLength/Uint8Array.BYTES_PER_ELEMENT):new Uint8Array(e),ie=e=>{if("string"==typeof e)return e;if("object"!=typeof e||"number"!=typeof e.byteOffset||"number"!=typeof e.byteLength)throw new Error("@smithy/util-utf8: toUtf8 encoder function only accepts string | Uint8Array.");return new TextDecoder("utf-8").decode(e)};function ne(e){let t;t="string"==typeof e?ee(e):e;const i="object"==typeof t&&"number"==typeof t.length,n="object"==typeof t&&"number"==typeof t.byteOffset&&"number"==typeof t.byteLength;if(!i&&!n)throw new Error("@smithy/util-base64: toBase64 encoder function only accepts string | Uint8Array.");let s="";for(let e=0;e<t.length;e+=3){let i=0,n=0;for(let s=e,a=Math.min(e+3,t.length);s<a;s++)i|=t[s]<<8*(a-s-1),n+=8;const a=Math.ceil(n/6);i<<=6*a-n;for(let e=1;e<=a;e++){const t=6*(a-e);s+=Y[(i&63<<t)>>t]}s+="==".slice(0,4-a)}return s}class se extends Uint8Array{static fromString(e,t="utf-8"){if("string"==typeof e)return function(e,t){return"base64"===t?se.mutate(Z(e)):se.mutate(ee(e))}(e,t);throw new Error(`Unsupported conversion from ${typeof e} to Uint8ArrayBlobAdapter.`)}static mutate(e){return Object.setPrototypeOf(e,se.prototype),e}transformToString(e="utf-8"){return function(e,t="utf-8"){return"base64"===t?ne(e):ie(e)}(this,e)}}const ae=e=>encodeURIComponent(e).replace(/[!'()*]/g,oe),oe=e=>`%${e.charCodeAt(0).toString(16).toUpperCase()}`;function re(e){const t=[];for(let i of Object.keys(e).sort()){const n=e[i];if(i=ae(i),Array.isArray(n))for(let e=0,s=n.length;e<s;e++)t.push(`${i}=${ae(n[e])}`);else{let e=i;(n||"string"==typeof n)&&(e+=`=${ae(n)}`),t.push(e)}}return t.join("&")}function ce(e=0){return new Promise(((t,i)=>{e&&setTimeout((()=>{const t=new Error(`Request did not complete within ${e} ms`);t.name="TimeoutError",i(t)}),e)}))}const le={supported:void 0};let pe=class e{static create(t){return"function"==typeof t?.handle?t:new e(t)}constructor(e){"function"==typeof e?this.configProvider=e().then((e=>e||{})):(this.config=e??{},this.configProvider=Promise.resolve(this.config)),void 0===le.supported&&(le.supported=Boolean("undefined"!=typeof Request&&"keepalive"in new Request("https://[::1]")))}destroy(){}async handle(e,{abortSignal:t}={}){this.config||(this.config=await this.configProvider);const i=this.config.requestTimeout,n=!0===this.config.keepAlive,s=this.config.credentials;if(t?.aborted){const e=new Error("Request aborted");return e.name="AbortError",Promise.reject(e)}let a=e.path;const o=re(e.query||{});o&&(a+=`?${o}`),e.fragment&&(a+=`#${e.fragment}`);let r="";if(null!=e.username||null!=e.password){r=`${e.username??""}:${e.password??""}@`}const{port:c,method:l}=e,p=`${e.protocol}//${r}${e.hostname}${c?`:${c}`:""}${a}`,d="GET"===l||"HEAD"===l?void 0:e.body,u={body:d,headers:new Headers(e.headers),method:l,credentials:s};this.config?.cache&&(u.cache=this.config.cache),d&&(u.duplex="half"),"undefined"!=typeof AbortController&&(u.signal=t),le.supported&&(u.keepalive=n),"function"==typeof this.config.requestInit&&Object.assign(u,this.config.requestInit(e));let m=()=>{};const h=new Request(p,u),f=[fetch(h).then((e=>{const t=e.headers,i={};for(const e of t.entries())i[e[0]]=e[1];return null!=e.body?{response:new T({headers:i,reason:e.statusText,statusCode:e.status,body:e.body})}:e.blob().then((t=>({response:new T({headers:i,reason:e.statusText,statusCode:e.status,body:t})})))})),ce(i)];return t&&f.push(new Promise(((e,i)=>{const n=()=>{const e=new Error("Request aborted");e.name="AbortError",i(e)};if("function"==typeof t.addEventListener){const e=t;e.addEventListener("abort",n,{once:!0}),m=()=>e.removeEventListener("abort",n)}else t.onabort=n}))),Promise.race(f).finally(m)}updateHttpClientConfig(e,t){this.config=void 0,this.configProvider=this.configProvider.then((i=>(i[e]=t,i)))}httpHandlerConfigs(){return this.config??{}}};const de=async e=>"function"==typeof Blob&&e instanceof Blob?new Uint8Array(await e.arrayBuffer()):async function(e){const t=[],i=e.getReader();let n=!1,s=0;for(;!n;){const{done:e,value:a}=await i.read();a&&(t.push(a),s+=a.length),n=e}const a=new Uint8Array(s);let o=0;for(const e of t)a.set(e,o),o+=e.length;return a}(e);const ue={},me={};for(let e=0;e<256;e++){let t=e.toString(16).toLowerCase();1===t.length&&(t=`0${t}`),ue[e]=t,me[t]=e}function he(e){if(e.length%2!=0)throw new Error("Hex encoded strings must have an even number length");const t=new Uint8Array(e.length/2);for(let i=0;i<e.length;i+=2){const n=e.slice(i,i+2).toLowerCase();if(!(n in me))throw new Error(`Cannot decode unrecognized sequence ${n} as hexadecimal`);t[i/2]=me[n]}return t}function fe(e){let t="";for(let i=0;i<e.byteLength;i++)t+=ue[e[i]];return t}const ge=async(e=new Uint8Array,t)=>{if(e instanceof Uint8Array)return se.mutate(e);if(!e)return se.mutate(new Uint8Array);const i=t.streamCollector(e);return se.mutate(await i)};function ye(e){return encodeURIComponent(e).replace(/[!'()*]/g,(function(e){return"%"+e.charCodeAt(0).toString(16).toUpperCase()}))}class xe{constructor(e,t){this.input=e,this.context=t,this.query={},this.method="",this.headers={},this.path="",this.body=null,this.hostname="",this.resolvePathStack=[]}async build(){const{hostname:e,protocol:t="https",port:i,path:n}=await this.context.endpoint();this.path=n;for(const e of this.resolvePathStack)e(this.path);return new I({protocol:t,hostname:this.hostname||e,port:i,method:this.method,path:this.path,query:this.query,body:this.body,headers:this.headers})}hn(e){return this.hostname=e,this}bp(e){return this.resolvePathStack.push((t=>{this.path=`${t?.endsWith("/")?t.slice(0,-1):t||""}`+e})),this}p(e,t,i,n){return this.resolvePathStack.push((s=>{this.path=ve(s,this.input,e,t,i,n)})),this}h(e){return this.headers=e,this}q(e){return this.query=e,this}b(e){return this.body=e,this}m(e){return this.method=e,this}}const ve=(e,t,i,n,s,a)=>{if(null==t||void 0===t[i])throw new Error("No value provided for input HTTP label: "+i+".");{const t=n();if(t.length<=0)throw new Error("Empty value provided for input HTTP label: "+i+".");e=e.replace(s,a?t.split("/").map((e=>ye(e))).join("/"):ye(t))}return e};class we{constructor(e){this.authSchemes=new Map;for(const[t,i]of Object.entries(e))void 0!==i&&this.authSchemes.set(t,i)}getIdentityProvider(e){return this.authSchemes.get(e)}}const be=(Ee=3e5,e=>Se(e)&&e.expiration.getTime()-Date.now()<Ee);var Ee;const Se=e=>void 0!==e.expiration,Ce=(e,t,i)=>{if(void 0===e)return;const n="function"!=typeof e?async()=>Promise.resolve(e):e;let s,a,o,r=!1;const c=async e=>{a||(a=n(e));try{s=await a,o=!0,r=!1}finally{a=void 0}return s};return void 0===t?async e=>(o&&!e?.forceRefresh||(s=await c(e)),s):async e=>(o&&!e?.forceRefresh||(s=await c(e)),r?s:i(s)?t(s)?(await c(e),s):s:(r=!0,s))};function Ae(e){const t=W(e.userAgentAppId??undefined);return{...e,customUserAgent:"string"==typeof e.customUserAgent?[[e.customUserAgent]]:e.customUserAgent,userAgentAppId:async()=>{const i=await t();if(!function(e){return void 0===e||"string"==typeof e&&e.length<=50}(i)){const t="NoOpLogger"!==e.logger?.constructor?.name&&e.logger?e.logger:console;"string"!=typeof i?t?.warn("userAgentAppId must be a string or undefined."):i.length>50&&t?.warn("The provided userAgentAppId exceeds the maximum length of 50 characters.")}return i}}}class Ie{constructor({size:e,params:t}){this.data=new Map,this.parameters=[],this.capacity=e??50,t&&(this.parameters=t)}get(e,t){const i=this.hash(e);if(!1===i)return t();if(!this.data.has(i)){if(this.data.size>this.capacity+10){const e=this.data.keys();let t=0;for(;;){const{value:i,done:n}=e.next();if(this.data.delete(i),n||++t>10)break}}this.data.set(i,t())}return this.data.get(i)}size(){return this.data.size}hash(e){let t="";const{parameters:i}=this;if(0===i.length)return!1;for(const n of i){const i=String(e[n]??"");if(i.includes("|;"))return!1;t+=i+"|;"}return t}}const Te=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}$"),ke=e=>Te.test(e)||e.startsWith("[")&&e.endsWith("]"),Oe=new RegExp("^(?!.*-$)(?!-)[a-zA-Z0-9-]{1,63}$"),Pe=(e,t=!1)=>{if(!t)return Oe.test(e);const i=e.split(".");for(const e of i)if(!Pe(e))return!1;return!0},_e={},Re="endpoints";function $e(e){return"object"!=typeof e||null==e?e:"ref"in e?`$${$e(e.ref)}`:"fn"in e?`${e.fn}(${(e.argv||[]).map($e).join(", ")})`:JSON.stringify(e,null,2)}class Me extends Error{constructor(e){super(e),this.name="EndpointError"}}const Ne=(e,t)=>(e=>{const t=e.split("."),i=[];for(const n of t){const t=n.indexOf("[");if(-1!==t){if(n.indexOf("]")!==n.length-1)throw new Me(`Path: '${e}' does not end with ']'`);const s=n.slice(t+1,-1);if(Number.isNaN(parseInt(s)))throw new Me(`Invalid array index: '${s}' in path: '${e}'`);0!==t&&i.push(n.slice(0,t)),i.push(s)}else i.push(n)}return i})(t).reduce(((i,n)=>{if("object"!=typeof i)throw new Me(`Index '${n}' in '${t}' not found in '${JSON.stringify(e)}'`);return Array.isArray(i)?i[parseInt(n)]:i[n]}),e),De={[w.HTTP]:80,[w.HTTPS]:443},je={booleanEquals:(e,t)=>e===t,getAttr:Ne,isSet:e=>null!=e,isValidHostLabel:Pe,not:e=>!e,parseURL:e=>{const t=(()=>{try{if(e instanceof URL)return e;if("object"==typeof e&&"hostname"in e){const{hostname:t,port:i,protocol:n="",path:s="",query:a={}}=e,o=new URL(`${n}//${t}${i?`:${i}`:""}${s}`);return o.search=Object.entries(a).map((([e,t])=>`${e}=${t}`)).join("&"),o}return new URL(e)}catch(e){return null}})();if(!t)return console.error(`Unable to parse ${JSON.stringify(e)} as a whatwg URL.`),null;const i=t.href,{host:n,hostname:s,pathname:a,protocol:o,search:r}=t;if(r)return null;const c=o.slice(0,-1);if(!Object.values(w).includes(c))return null;const l=ke(s);return{scheme:c,authority:`${n}${i.includes(`${n}:${De[c]}`)||"string"==typeof e&&e.includes(`${n}:${De[c]}`)?`:${De[c]}`:""}`,path:a,normalizedPath:a.endsWith("/")?a:`${a}/`,isIp:l}},stringEquals:(e,t)=>e===t,substring:(e,t,i,n)=>t>=i||e.length<i?null:n?e.substring(e.length-i,e.length-t):e.substring(t,i),uriEncode:e=>encodeURIComponent(e).replace(/[!*'()]/g,(e=>`%${e.charCodeAt(0).toString(16).toUpperCase()}`))},ze=(e,t)=>{const i=[],n={...t.endpointParams,...t.referenceRecord};let s=0;for(;s<e.length;){const t=e.indexOf("{",s);if(-1===t){i.push(e.slice(s));break}i.push(e.slice(s,t));const a=e.indexOf("}",t);if(-1===a){i.push(e.slice(t));break}"{"===e[t+1]&&"}"===e[a+1]&&(i.push(e.slice(t+1,a)),s=a+2);const o=e.substring(t+1,a);if(o.includes("#")){const[e,t]=o.split("#");i.push(Ne(n[e],t))}else i.push(n[o]);s=a+1}return i.join("")},Le=(e,t,i)=>{if("string"==typeof e)return ze(e,i);if(e.fn)return Fe(e,i);if(e.ref)return(({ref:e},t)=>({...t.endpointParams,...t.referenceRecord}[e]))(e,i);throw new Me(`'${t}': ${String(e)} is not a string, function or reference.`)},Fe=({fn:e,argv:t},i)=>{const n=t.map((e=>["boolean","number"].includes(typeof e)?e:Le(e,"arg",i))),s=e.split(".");return s[0]in _e&&null!=s[1]?_e[s[0]][s[1]](...n):je[e](...n)},Ue=({assign:e,...t},i)=>{if(e&&e in i.referenceRecord)throw new Me(`'${e}' is already defined in Reference Record.`);const n=Fe(t,i);return i.logger?.debug?.(`${Re} evaluateCondition: ${$e(t)} = ${$e(n)}`),{result:""===n||!!n,...null!=e&&{toAssign:{name:e,value:n}}}},Be=(e=[],t)=>{const i={};for(const n of e){const{result:e,toAssign:s}=Ue(n,{...t,referenceRecord:{...t.referenceRecord,...i}});if(!e)return{result:e};s&&(i[s.name]=s.value,t.logger?.debug?.(`${Re} assign: ${s.name} := ${$e(s.value)}`))}return{result:!0,referenceRecord:i}},He=(e,t)=>Object.entries(e).reduce(((e,[i,n])=>({...e,[i]:n.map((e=>{const n=Le(e,"Header value entry",t);if("string"!=typeof n)throw new Me(`Header '${i}' value '${n}' is not a string`);return n}))})),{}),qe=(e,t)=>{if(Array.isArray(e))return e.map((e=>qe(e,t)));switch(typeof e){case"string":return ze(e,t);case"object":if(null===e)throw new Me(`Unexpected endpoint property: ${e}`);return Ve(e,t);case"boolean":return e;default:throw new Me("Unexpected endpoint property type: "+typeof e)}},Ve=(e,t)=>Object.entries(e).reduce(((e,[i,n])=>({...e,[i]:qe(n,t)})),{}),Ge=(e,t)=>{const i=Le(e,"Endpoint URL",t);if("string"==typeof i)try{return new URL(i)}catch(e){throw console.error(`Failed to construct URL with ${i}`,e),e}throw new Me("Endpoint URL must be a string, got "+typeof i)},We=(e,t)=>{const{conditions:i,endpoint:n}=e,{result:s,referenceRecord:a}=Be(i,t);if(!s)return;const o={...t,referenceRecord:{...t.referenceRecord,...a}},{url:r,properties:c,headers:l}=n;return t.logger?.debug?.(`${Re} Resolving endpoint from template: ${$e(n)}`),{...null!=l&&{headers:He(l,o)},...null!=c&&{properties:Ve(c,o)},url:Ge(r,o)}},Ke=(e,t)=>{const{conditions:i,error:n}=e,{result:s,referenceRecord:a}=Be(i,t);if(s)throw new Me(Le(n,"Error",{...t,referenceRecord:{...t.referenceRecord,...a}}))},Qe=(e,t)=>{const{conditions:i,rules:n}=e,{result:s,referenceRecord:a}=Be(i,t);if(s)return Xe(n,{...t,referenceRecord:{...t.referenceRecord,...a}})},Xe=(e,t)=>{for(const i of e)if("endpoint"===i.type){const e=We(i,t);if(e)return e}else if("error"===i.type)Ke(i,t);else{if("tree"!==i.type)throw new Me(`Unknown endpoint rule: ${i}`);{const e=Qe(i,t);if(e)return e}}throw new Me("Rules evaluation failed")},Je=(e,t)=>{const{endpointParams:i,logger:n}=t,{parameters:s,rules:a}=e;t.logger?.debug?.(`${Re} Initial EndpointParams: ${$e(i)}`);const o=Object.entries(s).filter((([,e])=>null!=e.default)).map((([e,t])=>[e,t.default]));if(o.length>0)for(const[e,t]of o)i[e]=i[e]??t;const r=Object.entries(s).filter((([,e])=>e.required)).map((([e])=>e));for(const e of r)if(null==i[e])throw new Me(`Missing required parameter: '${e}'`);const c=Xe(a,{endpointParams:i,logger:n,referenceRecord:{}});return t.logger?.debug?.(`${Re} Resolved endpoint: ${$e(c)}`),c},Ye=(e,t=!1)=>{if(t){for(const t of e.split("."))if(!Ye(t))return!1;return!0}return!!Pe(e)&&(!(e.length<3||e.length>63)&&(e===e.toLowerCase()&&!ke(e)))};let Ze={partitions:[{id:"aws",outputs:{dnsSuffix:"amazonaws.com",dualStackDnsSuffix:"api.aws",implicitGlobalRegion:"us-east-1",name:"aws",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^(us|eu|ap|sa|ca|me|af|il|mx)\\-\\w+\\-\\d+$",regions:{"af-south-1":{description:"Africa (Cape Town)"},"ap-east-1":{description:"Asia Pacific (Hong Kong)"},"ap-northeast-1":{description:"Asia Pacific (Tokyo)"},"ap-northeast-2":{description:"Asia Pacific (Seoul)"},"ap-northeast-3":{description:"Asia Pacific (Osaka)"},"ap-south-1":{description:"Asia Pacific (Mumbai)"},"ap-south-2":{description:"Asia Pacific (Hyderabad)"},"ap-southeast-1":{description:"Asia Pacific (Singapore)"},"ap-southeast-2":{description:"Asia Pacific (Sydney)"},"ap-southeast-3":{description:"Asia Pacific (Jakarta)"},"ap-southeast-4":{description:"Asia Pacific (Melbourne)"},"ap-southeast-5":{description:"Asia Pacific (Malaysia)"},"aws-global":{description:"AWS Standard global region"},"ca-central-1":{description:"Canada (Central)"},"ca-west-1":{description:"Canada West (Calgary)"},"eu-central-1":{description:"Europe (Frankfurt)"},"eu-central-2":{description:"Europe (Zurich)"},"eu-north-1":{description:"Europe (Stockholm)"},"eu-south-1":{description:"Europe (Milan)"},"eu-south-2":{description:"Europe (Spain)"},"eu-west-1":{description:"Europe (Ireland)"},"eu-west-2":{description:"Europe (London)"},"eu-west-3":{description:"Europe (Paris)"},"il-central-1":{description:"Israel (Tel Aviv)"},"me-central-1":{description:"Middle East (UAE)"},"me-south-1":{description:"Middle East (Bahrain)"},"sa-east-1":{description:"South America (Sao Paulo)"},"us-east-1":{description:"US East (N. Virginia)"},"us-east-2":{description:"US East (Ohio)"},"us-west-1":{description:"US West (N. California)"},"us-west-2":{description:"US West (Oregon)"}}},{id:"aws-cn",outputs:{dnsSuffix:"amazonaws.com.cn",dualStackDnsSuffix:"api.amazonwebservices.com.cn",implicitGlobalRegion:"cn-northwest-1",name:"aws-cn",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^cn\\-\\w+\\-\\d+$",regions:{"aws-cn-global":{description:"AWS China global region"},"cn-north-1":{description:"China (Beijing)"},"cn-northwest-1":{description:"China (Ningxia)"}}},{id:"aws-us-gov",outputs:{dnsSuffix:"amazonaws.com",dualStackDnsSuffix:"api.aws",implicitGlobalRegion:"us-gov-west-1",name:"aws-us-gov",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^us\\-gov\\-\\w+\\-\\d+$",regions:{"aws-us-gov-global":{description:"AWS GovCloud (US) global region"},"us-gov-east-1":{description:"AWS GovCloud (US-East)"},"us-gov-west-1":{description:"AWS GovCloud (US-West)"}}},{id:"aws-iso",outputs:{dnsSuffix:"c2s.ic.gov",dualStackDnsSuffix:"c2s.ic.gov",implicitGlobalRegion:"us-iso-east-1",name:"aws-iso",supportsDualStack:!1,supportsFIPS:!0},regionRegex:"^us\\-iso\\-\\w+\\-\\d+$",regions:{"aws-iso-global":{description:"AWS ISO (US) global region"},"us-iso-east-1":{description:"US ISO East"},"us-iso-west-1":{description:"US ISO WEST"}}},{id:"aws-iso-b",outputs:{dnsSuffix:"sc2s.sgov.gov",dualStackDnsSuffix:"sc2s.sgov.gov",implicitGlobalRegion:"us-isob-east-1",name:"aws-iso-b",supportsDualStack:!1,supportsFIPS:!0},regionRegex:"^us\\-isob\\-\\w+\\-\\d+$",regions:{"aws-iso-b-global":{description:"AWS ISOB (US) global region"},"us-isob-east-1":{description:"US ISOB East (Ohio)"}}},{id:"aws-iso-e",outputs:{dnsSuffix:"cloud.adc-e.uk",dualStackDnsSuffix:"cloud.adc-e.uk",implicitGlobalRegion:"eu-isoe-west-1",name:"aws-iso-e",supportsDualStack:!1,supportsFIPS:!0},regionRegex:"^eu\\-isoe\\-\\w+\\-\\d+$",regions:{"eu-isoe-west-1":{description:"EU ISOE West"}}},{id:"aws-iso-f",outputs:{dnsSuffix:"csp.hci.ic.gov",dualStackDnsSuffix:"csp.hci.ic.gov",implicitGlobalRegion:"us-isof-south-1",name:"aws-iso-f",supportsDualStack:!1,supportsFIPS:!0},regionRegex:"^us\\-isof\\-\\w+\\-\\d+$",regions:{}}],version:"1.1"};const et={isVirtualHostableS3Bucket:Ye,parseArn:e=>{const t=e.split(":");if(t.length<6)return null;const[i,n,s,a,o,...r]=t;if("arn"!==i||""===n||""===s||""===r.join(":"))return null;return{partition:n,service:s,region:a,accountId:o,resourceId:r.map((e=>e.split("/"))).flat()}},partition:e=>{const{partitions:t}=Ze;for(const i of t){const{regions:t,outputs:n}=i;for(const[i,s]of Object.entries(t))if(i===e)return{...n,...s}}for(const i of t){const{regionRegex:t,outputs:n}=i;if(new RegExp(t).test(e))return{...n}}const i=t.find((e=>"aws"===e.id));if(!i)throw new Error("Provided region was not found in the partition array or regex, and default partition with id 'aws' doesn't exist.");return{...i.outputs}}};function tt(e,t,i){e.__aws_sdk_context?e.__aws_sdk_context.features||(e.__aws_sdk_context.features={}):e.__aws_sdk_context={features:{}},e.__aws_sdk_context.features[t]=i}_e.aws=et;const it=e=>T.isInstance(e)?e.headers?.date??e.headers?.Date:void 0,nt=e=>new Date(Date.now()+e),st=(e,t)=>{const i=Date.parse(e);return((e,t)=>Math.abs(nt(t).getTime()-e)>=3e5)(i,t)?i-Date.now():t},at=(e,t)=>{if(!t)throw new Error(`Property \`${e}\` is not resolved for AWS SDK SigV4Auth`);return t};let ot=class{async sign(e,t,i){if(!I.isInstance(e))throw new Error("The request is not an instance of `HttpRequest` and cannot be signed");const n=await(async e=>{const t=at("context",e.context),i=at("config",e.config),n=t.endpointV2?.properties?.authSchemes?.[0],s=at("signer",i.signer),a=await s(n),o=e?.signingRegion,r=e?.signingRegionSet,c=e?.signingName;return{config:i,signer:a,signingRegion:o,signingRegionSet:r,signingName:c}})(i),{config:s,signer:a}=n;let{signingRegion:o,signingName:r}=n;const c=i.context;if(c?.authSchemes?.length){const[e,t]=c.authSchemes;"sigv4a"===e?.name&&"sigv4"===t?.name&&(o=t?.signingRegion??o,r=t?.signingName??r)}return await a.sign(e,{signingDate:nt(s.systemClockOffset),signingRegion:o,signingService:r})}errorHandler(e){return t=>{const i=t.ServerTime??it(t.$response);if(i){const n=at("config",e.config),s=n.systemClockOffset;n.systemClockOffset=st(i,n.systemClockOffset);n.systemClockOffset!==s&&t.$metadata&&(t.$metadata.clockSkewCorrected=!0)}throw t}}successHandler(e,t){const i=it(e);if(i){const e=at("config",t.config);e.systemClockOffset=st(i,e.systemClockOffset)}}};const rt=(e,t,i)=>{let n,s,a,o=!1;return async t=>(a&&!t?.forceRefresh||(n=await(async()=>{s||(s=e());try{n=await s,a=!0,o=!1}finally{s=void 0}return n})()),n)},ct="X-Amz-Date",lt="X-Amz-Signature",pt="X-Amz-Security-Token",dt="authorization",ut=ct.toLowerCase(),mt=[dt,ut,"date"],ht=lt.toLowerCase(),ft="x-amz-content-sha256",gt=pt.toLowerCase(),yt={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},xt=/^proxy-/,vt=/^sec-/,wt="AWS4-HMAC-SHA256",bt="AWS4-HMAC-SHA256-PAYLOAD",Et="aws4_request",St={},Ct=[],At=(e,t,i)=>`${e}/${t}/${i}/${Et}`,It=(e,t,i)=>{const n=new e(t);return n.update(te(i)),n.digest()},Tt=({headers:e},t,i)=>{const n={};for(const s of Object.keys(e).sort()){if(null==e[s])continue;const a=s.toLowerCase();(a in yt||t?.has(a)||xt.test(a)||vt.test(a))&&(!i||i&&!i.has(a))||(n[a]=e[s].trim().replace(/\s+/g," "))}return n},kt=async({headers:e,body:t},i)=>{for(const t of Object.keys(e))if(t.toLowerCase()===ft)return e[t];if(null==t)return"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855";if("string"==typeof t||ArrayBuffer.isView(t)||(n=t,"function"==typeof ArrayBuffer&&n instanceof ArrayBuffer||"[object ArrayBuffer]"===Object.prototype.toString.call(n))){const e=new i;return e.update(te(t)),fe(await e.digest())}var n;return"UNSIGNED-PAYLOAD"};class Ot{format(e){const t=[];for(const i of Object.keys(e)){const n=ee(i);t.push(Uint8Array.from([n.byteLength]),n,this.formatHeaderValue(e[i]))}const i=new Uint8Array(t.reduce(((e,t)=>e+t.byteLength),0));let n=0;for(const e of t)i.set(e,n),n+=e.byteLength;return i}formatHeaderValue(e){switch(e.type){case"boolean":return Uint8Array.from([e.value?0:1]);case"byte":return Uint8Array.from([2,e.value]);case"short":const t=new DataView(new ArrayBuffer(3));return t.setUint8(0,3),t.setInt16(1,e.value,!1),new Uint8Array(t.buffer);case"integer":const i=new DataView(new ArrayBuffer(5));return i.setUint8(0,4),i.setInt32(1,e.value,!1),new Uint8Array(i.buffer);case"long":const n=new Uint8Array(9);return n[0]=5,n.set(e.value.bytes,1),n;case"binary":const s=new DataView(new ArrayBuffer(3+e.value.byteLength));s.setUint8(0,6),s.setUint16(1,e.value.byteLength,!1);const a=new Uint8Array(s.buffer);return a.set(e.value,3),a;case"string":const o=ee(e.value),r=new DataView(new ArrayBuffer(3+o.byteLength));r.setUint8(0,7),r.setUint16(1,o.byteLength,!1);const c=new Uint8Array(r.buffer);return c.set(o,3),c;case"timestamp":const l=new Uint8Array(9);return l[0]=8,l.set(Rt.fromNumber(e.value.valueOf()).bytes,1),l;case"uuid":if(!_t.test(e.value))throw new Error(`Invalid UUID received: ${e.value}`);const p=new Uint8Array(17);return p[0]=9,p.set(he(e.value.replace(/\-/g,"")),1),p}}}var Pt;!function(e){e[e.boolTrue=0]="boolTrue",e[e.boolFalse=1]="boolFalse",e[e.byte=2]="byte",e[e.short=3]="short",e[e.integer=4]="integer",e[e.long=5]="long",e[e.byteArray=6]="byteArray",e[e.string=7]="string",e[e.timestamp=8]="timestamp",e[e.uuid=9]="uuid"}(Pt||(Pt={}));const _t=/^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$/;let Rt=class e{constructor(e){if(this.bytes=e,8!==e.byteLength)throw new Error("Int64 buffers must be exactly 8 bytes")}static fromNumber(t){if(t>0x8000000000000000||t<-0x8000000000000000)throw new Error(`${t} is too large (or, if negative, too small) to represent as an Int64`);const i=new Uint8Array(8);for(let e=7,n=Math.abs(Math.round(t));e>-1&&n>0;e--,n/=256)i[e]=n;return t<0&&$t(i),new e(i)}valueOf(){const e=this.bytes.slice(0),t=128&e[0];return t&&$t(e),parseInt(fe(e),16)*(t?-1:1)}toString(){return String(this.valueOf())}};function $t(e){for(let t=0;t<8;t++)e[t]^=255;for(let t=7;t>-1&&(e[t]++,0===e[t]);t--);}const Mt=e=>{e=I.clone(e);for(const t of Object.keys(e.headers))mt.indexOf(t.toLowerCase())>-1&&delete e.headers[t];return e},Nt=e=>"number"==typeof e?new Date(1e3*e):"string"==typeof e?Number(e)?new Date(1e3*Number(e)):new Date(e):e;class Dt{constructor({applyChecksum:e,credentials:t,region:i,service:n,sha256:s,uriEscapePath:a=!0}){this.headerFormatter=new Ot,this.service=n,this.sha256=s,this.uriEscapePath=a,this.applyChecksum="boolean"!=typeof e||e,this.regionProvider=D(i),this.credentialProvider=D(t)}async presign(e,t={}){const{signingDate:i=new Date,expiresIn:n=3600,unsignableHeaders:s,unhoistableHeaders:a,signableHeaders:o,hoistableHeaders:r,signingRegion:c,signingService:l}=t,p=await this.credentialProvider();this.validateResolvedCredentials(p);const d=c??await this.regionProvider(),{longDate:u,shortDate:m}=jt(i);if(n>604800)return Promise.reject("Signature version 4 presigned URLs must have an expiration date less than one week in the future");const h=At(m,d,l??this.service),f=((e,t={})=>{const{headers:i,query:n={}}=I.clone(e);for(const e of Object.keys(i)){const s=e.toLowerCase();("x-amz-"===s.slice(0,6)&&!t.unhoistableHeaders?.has(s)||t.hoistableHeaders?.has(s))&&(n[e]=i[e],delete i[e])}return{...e,headers:i,query:n}})(Mt(e),{unhoistableHeaders:a,hoistableHeaders:r});p.sessionToken&&(f.query[pt]=p.sessionToken),f.query["X-Amz-Algorithm"]=wt,f.query["X-Amz-Credential"]=`${p.accessKeyId}/${h}`,f.query[ct]=u,f.query["X-Amz-Expires"]=n.toString(10);const g=Tt(f,s,o);return f.query["X-Amz-SignedHeaders"]=zt(g),f.query[lt]=await this.getSignature(u,h,this.getSigningKey(p,d,m,l),this.createCanonicalRequest(f,g,await kt(e,this.sha256))),f}async sign(e,t){return"string"==typeof e?this.signString(e,t):e.headers&&e.payload?this.signEvent(e,t):e.message?this.signMessage(e,t):this.signRequest(e,t)}async signEvent({headers:e,payload:t},{signingDate:i=new Date,priorSignature:n,signingRegion:s,signingService:a}){const o=s??await this.regionProvider(),{shortDate:r,longDate:c}=jt(i),l=At(r,o,a??this.service),p=await kt({headers:{},body:t},this.sha256),d=new this.sha256;d.update(e);const u=fe(await d.digest()),m=[bt,c,l,n,u,p].join("\n");return this.signString(m,{signingDate:i,signingRegion:o,signingService:a})}async signMessage(e,{signingDate:t=new Date,signingRegion:i,signingService:n}){return this.signEvent({headers:this.headerFormatter.format(e.message.headers),payload:e.message.body},{signingDate:t,signingRegion:i,signingService:n,priorSignature:e.priorSignature}).then((t=>({message:e.message,signature:t})))}async signString(e,{signingDate:t=new Date,signingRegion:i,signingService:n}={}){const s=await this.credentialProvider();this.validateResolvedCredentials(s);const a=i??await this.regionProvider(),{shortDate:o}=jt(t),r=new this.sha256(await this.getSigningKey(s,a,o,n));return r.update(te(e)),fe(await r.digest())}async signRequest(e,{signingDate:t=new Date,signableHeaders:i,unsignableHeaders:n,signingRegion:s,signingService:a}={}){const o=await this.credentialProvider();this.validateResolvedCredentials(o);const r=s??await this.regionProvider(),c=Mt(e),{longDate:l,shortDate:p}=jt(t),d=At(p,r,a??this.service);c.headers[ut]=l,o.sessionToken&&(c.headers[gt]=o.sessionToken);const u=await kt(c,this.sha256);!((e,t)=>{e=e.toLowerCase();for(const i of Object.keys(t))if(e===i.toLowerCase())return!0;return!1})(ft,c.headers)&&this.applyChecksum&&(c.headers[ft]=u);const m=Tt(c,n,i),h=await this.getSignature(l,d,this.getSigningKey(o,r,p,a),this.createCanonicalRequest(c,m,u));return c.headers[dt]=`${wt} Credential=${o.accessKeyId}/${d}, SignedHeaders=${zt(m)}, Signature=${h}`,c}createCanonicalRequest(e,t,i){const n=Object.keys(t).sort();return`${e.method}\n${this.getCanonicalPath(e)}\n${(({query:e={}})=>{const t=[],i={};for(const n of Object.keys(e)){if(n.toLowerCase()===ht)continue;const s=ae(n);t.push(s);const a=e[n];"string"==typeof a?i[s]=`${s}=${ae(a)}`:Array.isArray(a)&&(i[s]=a.slice(0).reduce(((e,t)=>e.concat([`${s}=${ae(t)}`])),[]).sort().join("&"))}return t.sort().map((e=>i[e])).filter((e=>e)).join("&")})(e)}\n${n.map((e=>`${e}:${t[e]}`)).join("\n")}\n\n${n.join(";")}\n${i}`}async createStringToSign(e,t,i){const n=new this.sha256;n.update(te(i));const s=await n.digest();return`${wt}\n${e}\n${t}\n${fe(s)}`}getCanonicalPath({path:e}){if(this.uriEscapePath){const t=[];for(const i of e.split("/"))0!==i?.length&&"."!==i&&(".."===i?t.pop():t.push(i));const i=`${e?.startsWith("/")?"/":""}${t.join("/")}${t.length>0&&e?.endsWith("/")?"/":""}`;return ae(i).replace(/%2F/g,"/")}return e}async getSignature(e,t,i,n){const s=await this.createStringToSign(e,t,n),a=new this.sha256(await i);return a.update(te(s)),fe(await a.digest())}getSigningKey(e,t,i,n){return(async(e,t,i,n,s)=>{const a=`${i}:${n}:${s}:${fe(await It(e,t.secretAccessKey,t.accessKeyId))}:${t.sessionToken}`;if(a in St)return St[a];for(Ct.push(a);Ct.length>50;)delete St[Ct.shift()];let o=`AWS4${t.secretAccessKey}`;for(const t of[i,n,s,Et])o=await It(e,o,t);return St[a]=o})(this.sha256,e,i,t,n||this.service)}validateResolvedCredentials(e){if("object"!=typeof e||"string"!=typeof e.accessKeyId||"string"!=typeof e.secretAccessKey)throw new Error("Resolved credential object is not valid")}}const jt=e=>{const t=(i=e,Nt(i).toISOString().replace(/\.\d{3}Z$/,"Z")).replace(/[\-:]/g,"");var i;return{longDate:t,shortDate:t.slice(0,8)}},zt=e=>Object.keys(e).sort().join(";"),Lt=e=>{let t,i=!1;e.credentials&&(i=!0,t=Ce(e.credentials,be,Se)),t||(t=e.credentialDefaultProvider?W(e.credentialDefaultProvider(Object.assign({},e,{parentClientConfig:e}))):async()=>{throw new Error("`credentials` is missing")});const{signingEscapePath:n=!0,systemClockOffset:s=e.systemClockOffset||0,sha256:a}=e;let o;return o=e.signer?W(e.signer):e.regionInfoProvider?()=>W(e.region)().then((async t=>[await e.regionInfoProvider(t,{useFipsEndpoint:await e.useFipsEndpoint(),useDualstackEndpoint:await e.useDualstackEndpoint()})||{},t])).then((([i,s])=>{const{signingRegion:o,signingService:r}=i;e.signingRegion=e.signingRegion||o||s,e.signingName=e.signingName||r||e.serviceId;const c={...e,credentials:t,region:e.signingRegion,service:e.signingName,sha256:a,uriEscapePath:n};return new(e.signerConstructor||Dt)(c)})):async i=>{const s=(i=Object.assign({},{name:"sigv4",signingName:e.signingName||e.defaultSigningName,signingRegion:await W(e.region)(),properties:{}},i)).signingRegion,o=i.signingName;e.signingRegion=e.signingRegion||s,e.signingName=e.signingName||o||e.serviceId;const r={...e,credentials:t,region:e.signingRegion,service:e.signingName,sha256:a,uriEscapePath:n};return new(e.signerConstructor||Dt)(r)},{...e,systemClockOffset:s,signingEscapePath:n,credentials:i?async()=>t().then((e=>{return i="CREDENTIALS_CODE",n="e",(t=e).$source||(t.$source={}),t.$source[i]=n,t;var t,i,n})):t,signer:o}},Ft=(e,t)=>{const i=[];if(e&&i.push(e),t)for(const e of t)i.push(e);return i},Ut=(e,t)=>`${e||"anonymous"}${t&&t.length>0?` (a.k.a. ${t.join(",")})`:""}`,Bt=()=>{let e=[],t=[],i=!1;const n=new Set,s=i=>(e.forEach((e=>{i.add(e.middleware,{...e})})),t.forEach((e=>{i.addRelativeTo(e.middleware,{...e})})),i.identifyOnResolve?.(r.identifyOnResolve()),i),a=e=>{const t=[];return e.before.forEach((e=>{0===e.before.length&&0===e.after.length?t.push(e):t.push(...a(e))})),t.push(e),e.after.reverse().forEach((e=>{0===e.before.length&&0===e.after.length?t.push(e):t.push(...a(e))})),t},o=(i=!1)=>{const n=[],s=[],o={};e.forEach((e=>{const t={...e,before:[],after:[]};for(const e of Ft(t.name,t.aliases))o[e]=t;n.push(t)})),t.forEach((e=>{const t={...e,before:[],after:[]};for(const e of Ft(t.name,t.aliases))o[e]=t;s.push(t)})),s.forEach((e=>{if(e.toMiddleware){const t=o[e.toMiddleware];if(void 0===t){if(i)return;throw new Error(`${e.toMiddleware} is not found when adding ${Ut(e.name,e.aliases)} middleware ${e.relation} ${e.toMiddleware}`)}"after"===e.relation&&t.after.push(e),"before"===e.relation&&t.before.push(e)}}));const r=(c=n,c.sort(((e,t)=>Ht[t.step]-Ht[e.step]||qt[t.priority||"normal"]-qt[e.priority||"normal"]))).map(a).reduce(((e,t)=>(e.push(...t),e)),[]);var c;return r},r={add:(t,i={})=>{const{name:s,override:a,aliases:o}=i,r={step:"initialize",priority:"normal",middleware:t,...i},c=Ft(s,o);if(c.length>0){if(c.some((e=>n.has(e)))){if(!a)throw new Error(`Duplicate middleware name '${Ut(s,o)}'`);for(const t of c){const i=e.findIndex((e=>e.name===t||e.aliases?.some((e=>e===t))));if(-1===i)continue;const n=e[i];if(n.step!==r.step||r.priority!==n.priority)throw new Error(`"${Ut(n.name,n.aliases)}" middleware with ${n.priority} priority in ${n.step} step cannot be overridden by "${Ut(s,o)}" middleware with ${r.priority} priority in ${r.step} step.`);e.splice(i,1)}}for(const e of c)n.add(e)}e.push(r)},addRelativeTo:(e,i)=>{const{name:s,override:a,aliases:o}=i,r={middleware:e,...i},c=Ft(s,o);if(c.length>0){if(c.some((e=>n.has(e)))){if(!a)throw new Error(`Duplicate middleware name '${Ut(s,o)}'`);for(const e of c){const i=t.findIndex((t=>t.name===e||t.aliases?.some((t=>t===e))));if(-1===i)continue;const n=t[i];if(n.toMiddleware!==r.toMiddleware||n.relation!==r.relation)throw new Error(`"${Ut(n.name,n.aliases)}" middleware ${n.relation} "${n.toMiddleware}" middleware cannot be overridden by "${Ut(s,o)}" middleware ${r.relation} "${r.toMiddleware}" middleware.`);t.splice(i,1)}}for(const e of c)n.add(e)}t.push(r)},clone:()=>s(Bt()),use:e=>{e.applyToStack(r)},remove:i=>"string"==typeof i?(i=>{let s=!1;const a=e=>{const t=Ft(e.name,e.aliases);if(t.includes(i)){s=!0;for(const e of t)n.delete(e);return!1}return!0};return e=e.filter(a),t=t.filter(a),s})(i):(i=>{let s=!1;const a=e=>{if(e.middleware===i){s=!0;for(const t of Ft(e.name,e.aliases))n.delete(t);return!1}return!0};return e=e.filter(a),t=t.filter(a),s})(i),removeByTag:i=>{let s=!1;const a=e=>{const{tags:t,name:a,aliases:o}=e;if(t&&t.includes(i)){const e=Ft(a,o);for(const t of e)n.delete(t);return s=!0,!1}return!0};return e=e.filter(a),t=t.filter(a),s},concat:e=>{const t=s(Bt());return t.use(e),t.identifyOnResolve(i||t.identifyOnResolve()||(e.identifyOnResolve?.()??!1)),t},applyToStack:s,identify:()=>o(!0).map((e=>{const t=e.step??e.relation+" "+e.toMiddleware;return Ut(e.name,e.aliases)+" - "+t})),identifyOnResolve:e=>("boolean"==typeof e&&(i=e),i),resolve:(e,t)=>{for(const i of o().map((e=>e.middleware)).reverse())e=i(e,t);return i&&console.log(r.identify()),e}};return r},Ht={initialize:5,serialize:4,build:3,finalizeRequest:2,deserialize:1},qt={high:3,normal:2,low:1};class Vt{constructor(e){this.config=e,this.middlewareStack=Bt()}send(e,t,i){const n="function"!=typeof t?t:void 0,s="function"==typeof t?t:i;let a;if(void 0===n&&!0===this.config.cacheMiddleware){this.handlers||(this.handlers=new WeakMap);const t=this.handlers;t.has(e.constructor)?a=t.get(e.constructor):(a=e.resolveMiddleware(this.middlewareStack,this.config,n),t.set(e.constructor,a))}else delete this.handlers,a=e.resolveMiddleware(this.middlewareStack,this.config,n);if(!s)return a(e).then((e=>e.output));a(e).then((e=>s(null,e.output)),(e=>s(e))).catch((()=>{}))}destroy(){this.config?.requestHandler?.destroy?.(),delete this.handlers}}class Gt{constructor(){this.middlewareStack=Bt()}static classBuilder(){return new Wt}resolveMiddlewareWithContext(e,t,i,{middlewareFn:n,clientName:s,commandName:a,inputFilterSensitiveLog:o,outputFilterSensitiveLog:r,smithyContext:c,additionalContext:l,CommandCtor:p}){for(const s of n.bind(this)(p,e,t,i))this.middlewareStack.use(s);const d=e.concat(this.middlewareStack),{logger:u}=t,m={logger:u,clientName:s,commandName:a,inputFilterSensitiveLog:o,outputFilterSensitiveLog:r,[S]:{commandInstance:this,...c},...l},{requestHandler:h}=t;return d.resolve((e=>h.handle(e.request,i||{})),m)}}class Wt{constructor(){this._init=()=>{},this._ep={},this._middlewareFn=()=>[],this._commandName="",this._clientName="",this._additionalContext={},this._smithyContext={},this._inputFilterSensitiveLog=e=>e,this._outputFilterSensitiveLog=e=>e,this._serializer=null,this._deserializer=null}init(e){this._init=e}ep(e){return this._ep=e,this}m(e){return this._middlewareFn=e,this}s(e,t,i={}){return this._smithyContext={service:e,operation:t,...i},this}c(e={}){return this._additionalContext=e,this}n(e,t){return this._clientName=e,this._commandName=t,this}f(e=e=>e,t=e=>e){return this._inputFilterSensitiveLog=e,this._outputFilterSensitiveLog=t,this}ser(e){return this._serializer=e,this}de(e){return this._deserializer=e,this}build(){const e=this;let t;return t=class extends Gt{static getEndpointParameterInstructions(){return e._ep}constructor(...[t]){super(),this.serialize=e._serializer,this.deserialize=e._deserializer,this.input=t??{},e._init(this)}resolveMiddleware(i,n,s){return this.resolveMiddlewareWithContext(i,n,s,{CommandCtor:t,middlewareFn:e._middlewareFn,clientName:e._clientName,commandName:e._commandName,inputFilterSensitiveLog:e._inputFilterSensitiveLog,outputFilterSensitiveLog:e._outputFilterSensitiveLog,smithyContext:e._smithyContext,additionalContext:e._additionalContext})}}}}const Kt="***SensitiveInformation***",Qt=e=>{switch(e){case"true":return!0;case"false":return!1;default:throw new Error(`Unable to parse boolean value "${e}"`)}},Xt=e=>{if(null!=e){if("string"==typeof e){const t=parseFloat(e);if(!Number.isNaN(t))return String(t)!==String(e)&&ui.warn(di(`Expected number but observed string: ${e}`)),t}if("number"==typeof e)return e;throw new TypeError(`Expected number, got ${typeof e}: ${e}`)}},Jt=Math.ceil(2**127*(2-2**-23)),Yt=e=>{const t=Xt(e);if(void 0!==t&&!Number.isNaN(t)&&t!==1/0&&t!==-1/0&&Math.abs(t)>Jt)throw new TypeError(`Expected 32-bit float, got ${e}`);return t},Zt=e=>{if(null!=e){if(Number.isInteger(e)&&!Number.isNaN(e))return e;throw new TypeError(`Expected integer, got ${typeof e}: ${e}`)}},ei=e=>ii(e,16),ti=e=>ii(e,8),ii=(e,t)=>{const i=Zt(e);if(void 0!==i&&ni(i,t)!==i)throw new TypeError(`Expected ${t}-bit integer, got ${e}`);return i},ni=(e,t)=>{switch(t){case 32:return Int32Array.of(e)[0];case 16:return Int16Array.of(e)[0];case 8:return Int8Array.of(e)[0]}},si=(e,t)=>{if(null==e)throw new TypeError("Expected a non-null value");return e},ai=e=>{if(null!=e){if("string"==typeof e)return e;if(["boolean","number","bigint"].includes(typeof e))return ui.warn(di(`Expected string, got ${typeof e}: ${e}`)),String(e);throw new TypeError(`Expected string, got ${typeof e}: ${e}`)}},oi=e=>Xt("string"==typeof e?li(e):e),ri=oi,ci=/(-?(?:0|[1-9]\d*)(?:\.\d+)?(?:[eE][+-]?\d+)?)|(-?Infinity)|(NaN)/g,li=e=>{const t=e.match(ci);if(null===t||t[0].length!==e.length)throw new TypeError("Expected real number, got implicit NaN");return parseFloat(e)},pi=e=>Zt("string"==typeof e?li(e):e),di=e=>String(new TypeError(e).stack||e).split("\n").slice(0,5).filter((e=>!e.includes("stackTraceWarning"))).join("\n"),ui={warn:console.warn},mi=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],hi=new RegExp(/^(\d{4})-(\d{2})-(\d{2})[tT](\d{2}):(\d{2}):(\d{2})(?:\.(\d+))?(([-+]\d{2}\:\d{2})|[zZ])$/),fi=e=>{if(null==e)return;if("string"!=typeof e)throw new TypeError("RFC-3339 date-times must be expressed as strings");const t=hi.exec(e);if(!t)throw new TypeError("Invalid RFC-3339 date-time value");const[i,n,s,a,o,r,c,l,p]=t,d=(e=>ei("string"==typeof e?li(e):e))(Si(n)),u=wi(s,"month",1,12),m=wi(a,"day",1,31),h=gi(d,u,m,{hours:o,minutes:r,seconds:c,fractionalMilliseconds:l});return"Z"!=p.toUpperCase()&&h.setTime(h.getTime()-Ei(p)),h},gi=(e,t,i,n)=>{const s=t-1;return xi(e,s,i),new Date(Date.UTC(e,s,i,wi(n.hours,"hour",0,23),wi(n.minutes,"minute",0,59),wi(n.seconds,"seconds",0,60),bi(n.fractionalMilliseconds)))},yi=[31,28,31,30,31,30,31,31,30,31,30,31],xi=(e,t,i)=>{let n=yi[t];if(1===t&&vi(e)&&(n=29),i>n)throw new TypeError(`Invalid day for ${mi[t]} in ${e}: ${i}`)},vi=e=>e%4==0&&(e%100!=0||e%400==0),wi=(e,t,i,n)=>{const s=(e=>ti("string"==typeof e?li(e):e))(Si(e));if(s<i||s>n)throw new TypeError(`${t} must be between ${i} and ${n}, inclusive`);return s},bi=e=>null==e?0:1e3*(e=>Yt("string"==typeof e?li(e):e))("0."+e),Ei=e=>{const t=e[0];let i=1;if("+"==t)i=1;else{if("-"!=t)throw new TypeError(`Offset direction, ${t}, must be "+" or "-"`);i=-1}return i*(60*Number(e.substring(1,3))+Number(e.substring(4,6)))*60*1e3},Si=e=>{let t=0;for(;t<e.length-1&&"0"===e.charAt(t);)t++;return 0===t?e:e.slice(t)};let Ci=class e extends Error{constructor(t){super(t.message),Object.setPrototypeOf(this,e.prototype),this.name=t.name,this.$fault=t.$fault,this.$metadata=t.$metadata}};const Ai=(e,t={})=>{Object.entries(t).filter((([,e])=>void 0!==e)).forEach((([t,i])=>{null!=e[t]&&""!==e[t]||(e[t]=i)}));const i=e.message||e.Message||"UnknownError";return e.message=i,delete e.Message,e},Ii=e=>({output:t,parsedBody:i,errorCode:n})=>{(({output:e,parsedBody:t,exceptionCtor:i,errorCode:n})=>{const s=Ti(e),a=s.httpStatusCode?s.httpStatusCode+"":void 0,o=new i({name:t?.code||t?.Code||n||a||"UnknownError",$fault:"client",$metadata:s});throw Ai(o,t)})({output:t,parsedBody:i,exceptionCtor:e,errorCode:n})},Ti=e=>({httpStatusCode:e.statusCode,requestId:e.headers["x-amzn-requestid"]??e.headers["x-amzn-request-id"]??e.headers["x-amz-request-id"],extendedRequestId:e.headers["x-amz-id-2"],cfId:e.headers["x-amz-cf-id"]}),ki=e=>{switch(e){case"standard":case"cross-region":return{retryMode:"standard",connectionTimeout:3100};case"in-region":return{retryMode:"standard",connectionTimeout:1100};case"mobile":return{retryMode:"standard",connectionTimeout:3e4};default:return{}}},Oi=e=>{const t=[];for(const i in b){const n=b[i];void 0!==e[n]&&t.push({algorithmId:()=>n,checksumConstructor:()=>e[n]})}return{_checksumAlgorithms:t,addChecksumAlgorithm(e){this._checksumAlgorithms.push(e)},checksumAlgorithms(){return this._checksumAlgorithms}}},Pi=e=>{const t={};return e.checksumAlgorithms().forEach((e=>{t[e.algorithmId()]=e.checksumConstructor()})),t},_i=e=>{let t=e.retryStrategy;return{setRetryStrategy(e){t=e},retryStrategy:()=>t}},Ri=e=>{const t={};return t.retryStrategy=e.retryStrategy(),t},$i=e=>({...Oi(e),..._i(e)}),Mi=e=>({...Pi(e),...Ri(e)}),Ni=e=>Array.isArray(e)?e:[e],Di=e=>{const t="#text";for(const i in e)e.hasOwnProperty(i)&&void 0!==e[i][t]?e[i]=e[i][t]:"object"==typeof e[i]&&null!==e[i]&&(e[i]=Di(e[i]));return e},ji=e=>null!=e,zi=function(){const e=Object.getPrototypeOf(this).constructor,t=new(Function.bind.apply(String,[null,...arguments]));return Object.setPrototypeOf(t,e.prototype),t};zi.prototype=Object.create(String.prototype,{constructor:{value:zi,enumerable:!1,writable:!0,configurable:!0}}),Object.setPrototypeOf(zi,String);class Li{trace(){}debug(){}info(){}warn(){}error(){}}function Fi(e,t,i){let n,s,a;if(void 0===t&&void 0===i)n={},a=e;else{if(n=e,"function"==typeof t)return s=t,a=i,Bi(n,s,a);a=t}for(const e of Object.keys(a))Array.isArray(a[e])?Hi(n,null,a,e):n[e]=a[e];return n}const Ui=(e,t)=>{const i={};for(const n in t)Hi(i,e,t,n);return i},Bi=(e,t,i)=>Fi(e,Object.entries(i).reduce(((e,[i,n])=>(Array.isArray(n)?e[i]=n:e[i]="function"==typeof n?[t,n()]:[t,n],e)),{})),Hi=(e,t,i,n)=>{if(null!==t){let s=i[n];"function"==typeof s&&(s=[,s]);const[a=qi,o=Vi,r=n]=s;return void(("function"==typeof a&&a(t[r])||"function"!=typeof a&&a)&&(e[n]=o(t[r])))}let[s,a]=i[n];if("function"==typeof a){let t;const i=void 0===s&&null!=(t=a()),o="function"==typeof s&&!!s(void 0)||"function"!=typeof s&&!!s;i?e[n]=t:o&&(e[n]=a())}else{const t=void 0===s&&null!=a,i="function"==typeof s&&!!s(a)||"function"!=typeof s&&!!s;(t||i)&&(e[n]=a)}},qi=e=>null!=e,Vi=e=>e,Gi=e=>e.toISOString().replace(".000Z","Z"),Wi=e=>{if(null==e)return{};if(Array.isArray(e))return e.filter((e=>null!=e)).map(Wi);if("object"==typeof e){const t={};for(const i of Object.keys(e))null!=e[i]&&(t[i]=Wi(e[i]));return t}return e},Ki=(e,t)=>ge(e,t).then((e=>t.utf8Encoder(e))),Qi=async(e,t)=>{const i=await((e,t)=>Ki(e,t).then((e=>{if(e.length)try{return JSON.parse(e)}catch(t){throw"SyntaxError"===t?.name&&Object.defineProperty(t,"$responseBodyText",{value:e}),t}return{}})))(e,t);return i.message=i.message??i.Message,i};function Xi(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Ji,Yi,Zi={},en={};function tn(){return Ji||(Ji=1,function(e){const t=":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",i="["+t+"]["+(t+"\\-.\\d\\u00B7\\u0300-\\u036F\\u203F-\\u2040")+"]*",n=new RegExp("^"+i+"$");e.isExist=function(e){return void 0!==e},e.isEmptyObject=function(e){return 0===Object.keys(e).length},e.merge=function(e,t,i){if(t){const n=Object.keys(t),s=n.length;for(let a=0;a<s;a++)e[n[a]]="strict"===i?[t[n[a]]]:t[n[a]]}},e.getValue=function(t){return e.isExist(t)?t:""},e.isName=function(e){const t=n.exec(e);return!(null==t)},e.getAllMatches=function(e,t){const i=[];let n=t.exec(e);for(;n;){const s=[];s.startIndex=t.lastIndex-n[0].length;const a=n.length;for(let e=0;e<a;e++)s.push(n[e]);i.push(s),n=t.exec(e)}return i},e.nameRegexp=i}(en)),en}function nn(){if(Yi)return Zi;Yi=1;const e=tn(),t={allowBooleanAttributes:!1,unpairedTags:[]};function i(e){return" "===e||"\t"===e||"\n"===e||"\r"===e}function n(e,t){const i=t;for(;t<e.length;t++)if("?"!=e[t]&&" "!=e[t]);else{const n=e.substr(i,t-i);if(t>5&&"xml"===n)return d("InvalidXml","XML declaration allowed only at the start of the document.",m(e,t));if("?"==e[t]&&">"==e[t+1]){t++;break}}return t}function s(e,t){if(e.length>t+5&&"-"===e[t+1]&&"-"===e[t+2]){for(t+=3;t<e.length;t++)if("-"===e[t]&&"-"===e[t+1]&&">"===e[t+2]){t+=2;break}}else if(e.length>t+8&&"D"===e[t+1]&&"O"===e[t+2]&&"C"===e[t+3]&&"T"===e[t+4]&&"Y"===e[t+5]&&"P"===e[t+6]&&"E"===e[t+7]){let i=1;for(t+=8;t<e.length;t++)if("<"===e[t])i++;else if(">"===e[t]&&(i--,0===i))break}else if(e.length>t+9&&"["===e[t+1]&&"C"===e[t+2]&&"D"===e[t+3]&&"A"===e[t+4]&&"T"===e[t+5]&&"A"===e[t+6]&&"["===e[t+7])for(t+=8;t<e.length;t++)if("]"===e[t]&&"]"===e[t+1]&&">"===e[t+2]){t+=2;break}return t}Zi.validate=function(a,o){o=Object.assign({},t,o);const c=[];let u=!1,h=!1;"\ufeff"===a[0]&&(a=a.substr(1));for(let t=0;t<a.length;t++)if("<"===a[t]&&"?"===a[t+1]){if(t+=2,t=n(a,t),t.err)return t}else{if("<"!==a[t]){if(i(a[t]))continue;return d("InvalidChar","char '"+a[t]+"' is not expected.",m(a,t))}{let g=t;if(t++,"!"===a[t]){t=s(a,t);continue}{let y=!1;"/"===a[t]&&(y=!0,t++);let x="";for(;t<a.length&&">"!==a[t]&&" "!==a[t]&&"\t"!==a[t]&&"\n"!==a[t]&&"\r"!==a[t];t++)x+=a[t];if(x=x.trim(),"/"===x[x.length-1]&&(x=x.substring(0,x.length-1),t--),f=x,!e.isName(f)){let e;return e=0===x.trim().length?"Invalid space after '<'.":"Tag '"+x+"' is an invalid name.",d("InvalidTag",e,m(a,t))}const v=r(a,t);if(!1===v)return d("InvalidAttr","Attributes for '"+x+"' have open quote.",m(a,t));let w=v.value;if(t=v.index,"/"===w[w.length-1]){const e=t-w.length;w=w.substring(0,w.length-1);const i=l(w,o);if(!0!==i)return d(i.err.code,i.err.msg,m(a,e+i.err.line));u=!0}else if(y){if(!v.tagClosed)return d("InvalidTag","Closing tag '"+x+"' doesn't have proper closing.",m(a,t));if(w.trim().length>0)return d("InvalidTag","Closing tag '"+x+"' can't have attributes or invalid starting.",m(a,g));if(0===c.length)return d("InvalidTag","Closing tag '"+x+"' has not been opened.",m(a,g));{const e=c.pop();if(x!==e.tagName){let t=m(a,e.tagStartPos);return d("InvalidTag","Expected closing tag '"+e.tagName+"' (opened in line "+t.line+", col "+t.col+") instead of closing tag '"+x+"'.",m(a,g))}0==c.length&&(h=!0)}}else{const e=l(w,o);if(!0!==e)return d(e.err.code,e.err.msg,m(a,t-w.length+e.err.line));if(!0===h)return d("InvalidXml","Multiple possible root nodes found.",m(a,t));-1!==o.unpairedTags.indexOf(x)||c.push({tagName:x,tagStartPos:g}),u=!0}for(t++;t<a.length;t++)if("<"===a[t]){if("!"===a[t+1]){t++,t=s(a,t);continue}if("?"!==a[t+1])break;if(t=n(a,++t),t.err)return t}else if("&"===a[t]){const e=p(a,t);if(-1==e)return d("InvalidChar","char '&' is not expected.",m(a,t));t=e}else if(!0===h&&!i(a[t]))return d("InvalidXml","Extra text at the end",m(a,t));"<"===a[t]&&t--}}}var f;return u?1==c.length?d("InvalidTag","Unclosed tag '"+c[0].tagName+"'.",m(a,c[0].tagStartPos)):!(c.length>0)||d("InvalidXml","Invalid '"+JSON.stringify(c.map((e=>e.tagName)),null,4).replace(/\r?\n/g,"")+"' found.",{line:1,col:1}):d("InvalidXml","Start tag expected.",1)};const a='"',o="'";function r(e,t){let i="",n="",s=!1;for(;t<e.length;t++){if(e[t]===a||e[t]===o)""===n?n=e[t]:n!==e[t]||(n="");else if(">"===e[t]&&""===n){s=!0;break}i+=e[t]}return""===n&&{value:i,index:t,tagClosed:s}}const c=new RegExp("(\\s*)([^\\s=]+)(\\s*=)?(\\s*(['\"])(([\\s\\S])*?)\\5)?","g");function l(t,i){const n=e.getAllMatches(t,c),s={};for(let e=0;e<n.length;e++){if(0===n[e][1].length)return d("InvalidAttr","Attribute '"+n[e][2]+"' has no space in starting.",h(n[e]));if(void 0!==n[e][3]&&void 0===n[e][4])return d("InvalidAttr","Attribute '"+n[e][2]+"' is without value.",h(n[e]));if(void 0===n[e][3]&&!i.allowBooleanAttributes)return d("InvalidAttr","boolean attribute '"+n[e][2]+"' is not allowed.",h(n[e]));const t=n[e][2];if(!u(t))return d("InvalidAttr","Attribute '"+t+"' is an invalid name.",h(n[e]));if(s.hasOwnProperty(t))return d("InvalidAttr","Attribute '"+t+"' is repeated.",h(n[e]));s[t]=1}return!0}function p(e,t){if(";"===e[++t])return-1;if("#"===e[t])return function(e,t){let i=/\d/;for("x"===e[t]&&(t++,i=/[\da-fA-F]/);t<e.length;t++){if(";"===e[t])return t;if(!e[t].match(i))break}return-1}(e,++t);let i=0;for(;t<e.length;t++,i++)if(!(e[t].match(/\w/)&&i<20)){if(";"===e[t])break;return-1}return t}function d(e,t,i){return{err:{code:e,msg:t,line:i.line||i,col:i.col}}}function u(t){return e.isName(t)}function m(e,t){const i=e.substring(0,t).split(/\r?\n/);return{line:i.length,col:i[i.length-1].length+1}}function h(e){return e.startIndex+e[1].length}return Zi}var sn,an,on,rn,cn,ln,pn,dn,un,mn={};function hn(){if(on)return an;on=1;return an=class{constructor(e){this.tagname=e,this.child=[],this[":@"]={}}add(e,t){"__proto__"===e&&(e="#__proto__"),this.child.push({[e]:t})}addChild(e){"__proto__"===e.tagname&&(e.tagname="#__proto__"),e[":@"]&&Object.keys(e[":@"]).length>0?this.child.push({[e.tagname]:e.child,":@":e[":@"]}):this.child.push({[e.tagname]:e.child})}}}function fn(){if(un)return dn;un=1;const e=tn(),t=hn(),i=function(){if(cn)return rn;cn=1;const e=tn();function t(e,t){let i="";for(;t<e.length&&"'"!==e[t]&&'"'!==e[t];t++)i+=e[t];if(i=i.trim(),-1!==i.indexOf(" "))throw new Error("External entites are not supported");const n=e[t++];let s="";for(;t<e.length&&e[t]!==n;t++)s+=e[t];return[i,s,t]}function i(e,t){return"!"===e[t+1]&&"-"===e[t+2]&&"-"===e[t+3]}function n(e,t){return"!"===e[t+1]&&"E"===e[t+2]&&"N"===e[t+3]&&"T"===e[t+4]&&"I"===e[t+5]&&"T"===e[t+6]&&"Y"===e[t+7]}function s(e,t){return"!"===e[t+1]&&"E"===e[t+2]&&"L"===e[t+3]&&"E"===e[t+4]&&"M"===e[t+5]&&"E"===e[t+6]&&"N"===e[t+7]&&"T"===e[t+8]}function a(e,t){return"!"===e[t+1]&&"A"===e[t+2]&&"T"===e[t+3]&&"T"===e[t+4]&&"L"===e[t+5]&&"I"===e[t+6]&&"S"===e[t+7]&&"T"===e[t+8]}function o(e,t){return"!"===e[t+1]&&"N"===e[t+2]&&"O"===e[t+3]&&"T"===e[t+4]&&"A"===e[t+5]&&"T"===e[t+6]&&"I"===e[t+7]&&"O"===e[t+8]&&"N"===e[t+9]}function r(t){if(e.isName(t))return t;throw new Error(`Invalid entity name ${t}`)}return rn=function(e,c){const l={};if("O"!==e[c+3]||"C"!==e[c+4]||"T"!==e[c+5]||"Y"!==e[c+6]||"P"!==e[c+7]||"E"!==e[c+8])throw new Error("Invalid Tag instead of DOCTYPE");{c+=9;let p=1,d=!1,u=!1,m="";for(;c<e.length;c++)if("<"!==e[c]||u)if(">"===e[c]){if(u?"-"===e[c-1]&&"-"===e[c-2]&&(u=!1,p--):p--,0===p)break}else"["===e[c]?d=!0:m+=e[c];else{if(d&&n(e,c))c+=7,[entityName,val,c]=t(e,c+1),-1===val.indexOf("&")&&(l[r(entityName)]={regx:RegExp(`&${entityName};`,"g"),val:val});else if(d&&s(e,c))c+=8;else if(d&&a(e,c))c+=8;else if(d&&o(e,c))c+=9;else{if(!i)throw new Error("Invalid DOCTYPE");u=!0}p++,m=""}if(0!==p)throw new Error("Unclosed DOCTYPE")}return{entities:l,i:c}},rn}(),n=function(){if(pn)return ln;pn=1;const e=/^[-+]?0x[a-fA-F0-9]+$/,t=/^([\-\+])?(0*)(\.[0-9]+([eE]\-?[0-9]+)?|[0-9]+(\.[0-9]+([eE]\-?[0-9]+)?)?)$/;!Number.parseInt&&window.parseInt&&(Number.parseInt=window.parseInt),!Number.parseFloat&&window.parseFloat&&(Number.parseFloat=window.parseFloat);const i={hex:!0,leadingZeros:!0,decimalPoint:".",eNotation:!0};return ln=function(n,s={}){if(s=Object.assign({},i,s),!n||"string"!=typeof n)return n;let a=n.trim();if(void 0!==s.skipLike&&s.skipLike.test(a))return n;if(s.hex&&e.test(a))return Number.parseInt(a,16);{const e=t.exec(a);if(e){const t=e[1],i=e[2];let r=(o=e[3])&&-1!==o.indexOf(".")?("."===(o=o.replace(/0+$/,""))?o="0":"."===o[0]?o="0"+o:"."===o[o.length-1]&&(o=o.substr(0,o.length-1)),o):o;const c=e[4]||e[6];if(!s.leadingZeros&&i.length>0&&t&&"."!==a[2])return n;if(!s.leadingZeros&&i.length>0&&!t&&"."!==a[1])return n;{const e=Number(a),o=""+e;return-1!==o.search(/[eE]/)||c?s.eNotation?e:n:-1!==a.indexOf(".")?"0"===o&&""===r||o===r||t&&o==="-"+r?e:n:i?r===o||t+r===o?e:n:a===o||a===t+o?e:n}}return n}var o},ln}();function s(e){const t=Object.keys(e);for(let i=0;i<t.length;i++){const n=t[i];this.lastEntities[n]={regex:new RegExp("&"+n+";","g"),val:e[n]}}}function a(e,t,i,n,s,a,o){if(void 0!==e&&(this.options.trimValues&&!n&&(e=e.trim()),e.length>0)){o||(e=this.replaceEntitiesValue(e));const n=this.options.tagValueProcessor(t,e,i,s,a);if(null==n)return e;if(typeof n!=typeof e||n!==e)return n;if(this.options.trimValues)return y(e,this.options.parseTagValue,this.options.numberParseOptions);return e.trim()===e?y(e,this.options.parseTagValue,this.options.numberParseOptions):e}}function o(e){if(this.options.removeNSPrefix){const t=e.split(":"),i="/"===e.charAt(0)?"/":"";if("xmlns"===t[0])return"";2===t.length&&(e=i+t[1])}return e}const r=new RegExp("([^\\s=]+)\\s*(=\\s*(['\"])([\\s\\S]*?)\\3)?","gm");function c(t,i,n){if(!this.options.ignoreAttributes&&"string"==typeof t){const n=e.getAllMatches(t,r),s=n.length,a={};for(let e=0;e<s;e++){const t=this.resolveNameSpace(n[e][1]);let s=n[e][4],o=this.options.attributeNamePrefix+t;if(t.length)if(this.options.transformAttributeName&&(o=this.options.transformAttributeName(o)),"__proto__"===o&&(o="#__proto__"),void 0!==s){this.options.trimValues&&(s=s.trim()),s=this.replaceEntitiesValue(s);const e=this.options.attributeValueProcessor(t,s,i);a[o]=null==e?s:typeof e!=typeof s||e!==s?e:y(s,this.options.parseAttributeValue,this.options.numberParseOptions)}else this.options.allowBooleanAttributes&&(a[o]=!0)}if(!Object.keys(a).length)return;if(this.options.attributesGroupName){const e={};return e[this.options.attributesGroupName]=a,e}return a}}const l=function(e){e=e.replace(/\r\n?/g,"\n");const n=new t("!xml");let s=n,a="",o="";for(let r=0;r<e.length;r++){if("<"===e[r])if("/"===e[r+1]){const t=h(e,">",r,"Closing Tag is not closed.");let i=e.substring(r+2,t).trim();if(this.options.removeNSPrefix){const e=i.indexOf(":");-1!==e&&(i=i.substr(e+1))}this.options.transformTagName&&(i=this.options.transformTagName(i)),s&&(a=this.saveTextToParentTag(a,s,o));const n=o.substring(o.lastIndexOf(".")+1);if(i&&-1!==this.options.unpairedTags.indexOf(i))throw new Error(`Unpaired tag can not be used as closing tag: </${i}>`);let c=0;n&&-1!==this.options.unpairedTags.indexOf(n)?(c=o.lastIndexOf(".",o.lastIndexOf(".")-1),this.tagsNodeStack.pop()):c=o.lastIndexOf("."),o=o.substring(0,c),s=this.tagsNodeStack.pop(),a="",r=t}else if("?"===e[r+1]){let i=f(e,r,!1,"?>");if(!i)throw new Error("Pi Tag is not closed.");if(a=this.saveTextToParentTag(a,s,o),this.options.ignoreDeclaration&&"?xml"===i.tagName||this.options.ignorePiTags);else{const e=new t(i.tagName);e.add(this.options.textNodeName,""),i.tagName!==i.tagExp&&i.attrExpPresent&&(e[":@"]=this.buildAttributesMap(i.tagExp,o,i.tagName)),this.addChild(s,e,o)}r=i.closeIndex+1}else if("!--"===e.substr(r+1,3)){const t=h(e,"--\x3e",r+4,"Comment is not closed.");if(this.options.commentPropName){const i=e.substring(r+4,t-2);a=this.saveTextToParentTag(a,s,o),s.add(this.options.commentPropName,[{[this.options.textNodeName]:i}])}r=t}else if("!D"===e.substr(r+1,2)){const t=i(e,r);this.docTypeEntities=t.entities,r=t.i}else if("!["===e.substr(r+1,2)){const t=h(e,"]]>",r,"CDATA is not closed.")-2,i=e.substring(r+9,t);a=this.saveTextToParentTag(a,s,o);let n=this.parseTextData(i,s.tagname,o,!0,!1,!0,!0);null==n&&(n=""),this.options.cdataPropName?s.add(this.options.cdataPropName,[{[this.options.textNodeName]:i}]):s.add(this.options.textNodeName,n),r=t+2}else{let i=f(e,r,this.options.removeNSPrefix),c=i.tagName;const l=i.rawTagName;let p=i.tagExp,d=i.attrExpPresent,u=i.closeIndex;this.options.transformTagName&&(c=this.options.transformTagName(c)),s&&a&&"!xml"!==s.tagname&&(a=this.saveTextToParentTag(a,s,o,!1));const m=s;if(m&&-1!==this.options.unpairedTags.indexOf(m.tagname)&&(s=this.tagsNodeStack.pop(),o=o.substring(0,o.lastIndexOf("."))),c!==n.tagname&&(o+=o?"."+c:c),this.isItStopNode(this.options.stopNodes,o,c)){let n="";if(p.length>0&&p.lastIndexOf("/")===p.length-1)"/"===c[c.length-1]?(c=c.substr(0,c.length-1),o=o.substr(0,o.length-1),p=c):p=p.substr(0,p.length-1),r=i.closeIndex;else if(-1!==this.options.unpairedTags.indexOf(c))r=i.closeIndex;else{const t=this.readStopNodeData(e,l,u+1);if(!t)throw new Error(`Unexpected end of ${l}`);r=t.i,n=t.tagContent}const a=new t(c);c!==p&&d&&(a[":@"]=this.buildAttributesMap(p,o,c)),n&&(n=this.parseTextData(n,c,o,!0,d,!0,!0)),o=o.substr(0,o.lastIndexOf(".")),a.add(this.options.textNodeName,n),this.addChild(s,a,o)}else{if(p.length>0&&p.lastIndexOf("/")===p.length-1){"/"===c[c.length-1]?(c=c.substr(0,c.length-1),o=o.substr(0,o.length-1),p=c):p=p.substr(0,p.length-1),this.options.transformTagName&&(c=this.options.transformTagName(c));const e=new t(c);c!==p&&d&&(e[":@"]=this.buildAttributesMap(p,o,c)),this.addChild(s,e,o),o=o.substr(0,o.lastIndexOf("."))}else{const e=new t(c);this.tagsNodeStack.push(s),c!==p&&d&&(e[":@"]=this.buildAttributesMap(p,o,c)),this.addChild(s,e,o),s=e}a="",r=u}}else a+=e[r]}return n.child};function p(e,t,i){const n=this.options.updateTag(t.tagname,i,t[":@"]);!1===n||("string"==typeof n?(t.tagname=n,e.addChild(t)):e.addChild(t))}const d=function(e){if(this.options.processEntities){for(let t in this.docTypeEntities){const i=this.docTypeEntities[t];e=e.replace(i.regx,i.val)}for(let t in this.lastEntities){const i=this.lastEntities[t];e=e.replace(i.regex,i.val)}if(this.options.htmlEntities)for(let t in this.htmlEntities){const i=this.htmlEntities[t];e=e.replace(i.regex,i.val)}e=e.replace(this.ampEntity.regex,this.ampEntity.val)}return e};function u(e,t,i,n){return e&&(void 0===n&&(n=0===Object.keys(t.child).length),void 0!==(e=this.parseTextData(e,t.tagname,i,!1,!!t[":@"]&&0!==Object.keys(t[":@"]).length,n))&&""!==e&&t.add(this.options.textNodeName,e),e=""),e}function m(e,t,i){const n="*."+i;for(const i in e){const s=e[i];if(n===s||t===s)return!0}return!1}function h(e,t,i,n){const s=e.indexOf(t,i);if(-1===s)throw new Error(n);return s+t.length-1}function f(e,t,i,n=">"){const s=function(e,t,i=">"){let n,s="";for(let a=t;a<e.length;a++){let t=e[a];if(n)t===n&&(n="");else if('"'===t||"'"===t)n=t;else if(t===i[0]){if(!i[1])return{data:s,index:a};if(e[a+1]===i[1])return{data:s,index:a}}else"\t"===t&&(t=" ");s+=t}}(e,t+1,n);if(!s)return;let a=s.data;const o=s.index,r=a.search(/\s/);let c=a,l=!0;-1!==r&&(c=a.substring(0,r),a=a.substring(r+1).trimStart());const p=c;if(i){const e=c.indexOf(":");-1!==e&&(c=c.substr(e+1),l=c!==s.data.substr(e+1))}return{tagName:c,tagExp:a,closeIndex:o,attrExpPresent:l,rawTagName:p}}function g(e,t,i){const n=i;let s=1;for(;i<e.length;i++)if("<"===e[i])if("/"===e[i+1]){const a=h(e,">",i,`${t} is not closed`);if(e.substring(i+2,a).trim()===t&&(s--,0===s))return{tagContent:e.substring(n,i),i:a};i=a}else if("?"===e[i+1]){i=h(e,"?>",i+1,"StopNode is not closed.")}else if("!--"===e.substr(i+1,3)){i=h(e,"--\x3e",i+3,"StopNode is not closed.")}else if("!["===e.substr(i+1,2)){i=h(e,"]]>",i,"StopNode is not closed.")-2}else{const n=f(e,i,">");if(n){(n&&n.tagName)===t&&"/"!==n.tagExp[n.tagExp.length-1]&&s++,i=n.closeIndex}}}function y(t,i,s){if(i&&"string"==typeof t){const e=t.trim();return"true"===e||"false"!==e&&n(t,s)}return e.isExist(t)?t:""}return dn=class{constructor(e){this.options=e,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:"¢"},pound:{regex:/&(pound|#163);/g,val:"£"},yen:{regex:/&(yen|#165);/g,val:"¥"},euro:{regex:/&(euro|#8364);/g,val:"€"},copyright:{regex:/&(copy|#169);/g,val:"©"},reg:{regex:/&(reg|#174);/g,val:"®"},inr:{regex:/&(inr|#8377);/g,val:"₹"},num_dec:{regex:/&#([0-9]{1,7});/g,val:(e,t)=>String.fromCharCode(Number.parseInt(t,10))},num_hex:{regex:/&#x([0-9a-fA-F]{1,6});/g,val:(e,t)=>String.fromCharCode(Number.parseInt(t,16))}},this.addExternalEntities=s,this.parseXml=l,this.parseTextData=a,this.resolveNameSpace=o,this.buildAttributesMap=c,this.isItStopNode=m,this.replaceEntitiesValue=d,this.readStopNodeData=g,this.saveTextToParentTag=u,this.addChild=p}}}var gn,yn,xn,vn,wn,bn,En,Sn,Cn,An={};function In(){if(gn)return An;function e(s,a,o){let r;const c={};for(let l=0;l<s.length;l++){const p=s[l],d=t(p);let u="";if(u=void 0===o?d:o+"."+d,d===a.textNodeName)void 0===r?r=p[d]:r+=""+p[d];else{if(void 0===d)continue;if(p[d]){let t=e(p[d],a,u);const s=n(t,a);p[":@"]?i(t,p[":@"],u,a):1!==Object.keys(t).length||void 0===t[a.textNodeName]||a.alwaysCreateTextNode?0===Object.keys(t).length&&(a.alwaysCreateTextNode?t[a.textNodeName]="":t=""):t=t[a.textNodeName],void 0!==c[d]&&c.hasOwnProperty(d)?(Array.isArray(c[d])||(c[d]=[c[d]]),c[d].push(t)):a.isArray(d,u,s)?c[d]=[t]:c[d]=t}}}return"string"==typeof r?r.length>0&&(c[a.textNodeName]=r):void 0!==r&&(c[a.textNodeName]=r),c}function t(e){const t=Object.keys(e);for(let e=0;e<t.length;e++){const i=t[e];if(":@"!==i)return i}}function i(e,t,i,n){if(t){const s=Object.keys(t),a=s.length;for(let o=0;o<a;o++){const a=s[o];n.isArray(a,i+"."+a,!0,!0)?e[a]=[t[a]]:e[a]=t[a]}}}function n(e,t){const{textNodeName:i}=t,n=Object.keys(e).length;return 0===n||!(1!==n||!e[i]&&"boolean"!=typeof e[i]&&0!==e[i])}return gn=1,An.prettify=function(t,i){return e(t,i)},An}function Tn(){if(xn)return yn;xn=1;const{buildOptions:e}=function(){if(sn)return mn;sn=1;const e={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(e,t){return t},attributeValueProcessor:function(e,t){return t},stopNodes:[],alwaysCreateTextNode:!1,isArray:()=>!1,commentPropName:!1,unpairedTags:[],processEntities:!0,htmlEntities:!1,ignoreDeclaration:!1,ignorePiTags:!1,transformTagName:!1,transformAttributeName:!1,updateTag:function(e,t,i){return e}};return mn.buildOptions=function(t){return Object.assign({},e,t)},mn.defaultOptions=e,mn}(),t=fn(),{prettify:i}=In(),n=nn();return yn=class{constructor(t){this.externalEntities={},this.options=e(t)}parse(e,s){if("string"==typeof e);else{if(!e.toString)throw new Error("XML data is accepted in String or Bytes[] form.");e=e.toString()}if(s){!0===s&&(s={});const t=n.validate(e,s);if(!0!==t)throw Error(`${t.err.msg}:${t.err.line}:${t.err.col}`)}const a=new t(this.options);a.addExternalEntities(this.externalEntities);const o=a.parseXml(e);return this.options.preserveOrder||void 0===o?o:i(o,this.options)}addEntity(e,t){if(-1!==t.indexOf("&"))throw new Error("Entity value can't have '&'");if(-1!==e.indexOf("&")||-1!==e.indexOf(";"))throw new Error("An entity must be set without '&' and ';'. Eg. use '#xD' for '
'");if("&"===t)throw new Error("An entity with value '&' is not permitted");this.externalEntities[e]=t}}}function kn(){if(wn)return vn;wn=1;function e(a,o,r,c){let l="",p=!1;for(let d=0;d<a.length;d++){const u=a[d],m=t(u);if(void 0===m)continue;let h="";if(h=0===r.length?m:`${r}.${m}`,m===o.textNodeName){let e=u[m];n(h,o)||(e=o.tagValueProcessor(m,e),e=s(e,o)),p&&(l+=c),l+=e,p=!1;continue}if(m===o.cdataPropName){p&&(l+=c),l+=`<![CDATA[${u[m][0][o.textNodeName]}]]>`,p=!1;continue}if(m===o.commentPropName){l+=c+`\x3c!--${u[m][0][o.textNodeName]}--\x3e`,p=!0;continue}if("?"===m[0]){const e=i(u[":@"],o),t="?xml"===m?"":c;let n=u[m][0][o.textNodeName];n=0!==n.length?" "+n:"",l+=t+`<${m}${n}${e}?>`,p=!0;continue}let f=c;""!==f&&(f+=o.indentBy);const g=c+`<${m}${i(u[":@"],o)}`,y=e(u[m],o,h,f);-1!==o.unpairedTags.indexOf(m)?o.suppressUnpairedNode?l+=g+">":l+=g+"/>":y&&0!==y.length||!o.suppressEmptyNode?y&&y.endsWith(">")?l+=g+`>${y}${c}</${m}>`:(l+=g+">",y&&""!==c&&(y.includes("/>")||y.includes("</"))?l+=c+o.indentBy+y+c:l+=y,l+=`</${m}>`):l+=g+"/>",p=!0}return l}function t(e){const t=Object.keys(e);for(let i=0;i<t.length;i++){const n=t[i];if(e.hasOwnProperty(n)&&":@"!==n)return n}}function i(e,t){let i="";if(e&&!t.ignoreAttributes)for(let n in e){if(!e.hasOwnProperty(n))continue;let a=t.attributeValueProcessor(n,e[n]);a=s(a,t),!0===a&&t.suppressBooleanAttributes?i+=` ${n.substr(t.attributeNamePrefix.length)}`:i+=` ${n.substr(t.attributeNamePrefix.length)}="${a}"`}return i}function n(e,t){let i=(e=e.substr(0,e.length-t.textNodeName.length-1)).substr(e.lastIndexOf(".")+1);for(let n in t.stopNodes)if(t.stopNodes[n]===e||t.stopNodes[n]==="*."+i)return!0;return!1}function s(e,t){if(e&&e.length>0&&t.processEntities)for(let i=0;i<t.entities.length;i++){const n=t.entities[i];e=e.replace(n.regex,n.val)}return e}return vn=function(t,i){let n="";return i.format&&i.indentBy.length>0&&(n="\n"),e(t,i,"",n)}}var On=function(){if(Cn)return Sn;Cn=1;const e=nn(),t=Tn(),i=function(){if(En)return bn;En=1;const e=kn(),t={attributeNamePrefix:"@_",attributesGroupName:!1,textNodeName:"#text",ignoreAttributes:!0,cdataPropName:!1,format:!1,indentBy:" ",suppressEmptyNode:!1,suppressUnpairedNode:!0,suppressBooleanAttributes:!0,tagValueProcessor:function(e,t){return t},attributeValueProcessor:function(e,t){return t},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 i(e){this.options=Object.assign({},t,e),this.options.ignoreAttributes||this.options.attributesGroupName?this.isAttribute=function(){return!1}:(this.attrPrefixLen=this.options.attributeNamePrefix.length,this.isAttribute=a),this.processTextOrObjNode=n,this.options.format?(this.indentate=s,this.tagEndChar=">\n",this.newLine="\n"):(this.indentate=function(){return""},this.tagEndChar=">",this.newLine="")}function n(e,t,i){const n=this.j2x(e,i+1);return void 0!==e[this.options.textNodeName]&&1===Object.keys(e).length?this.buildTextValNode(e[this.options.textNodeName],t,n.attrStr,i):this.buildObjectNode(n.val,t,n.attrStr,i)}function s(e){return this.options.indentBy.repeat(e)}function a(e){return!(!e.startsWith(this.options.attributeNamePrefix)||e===this.options.textNodeName)&&e.substr(this.attrPrefixLen)}return i.prototype.build=function(t){return this.options.preserveOrder?e(t,this.options):(Array.isArray(t)&&this.options.arrayNodeName&&this.options.arrayNodeName.length>1&&(t={[this.options.arrayNodeName]:t}),this.j2x(t,0).val)},i.prototype.j2x=function(e,t){let i="",n="";for(let s in e)if(Object.prototype.hasOwnProperty.call(e,s))if(void 0===e[s])this.isAttribute(s)&&(n+="");else if(null===e[s])this.isAttribute(s)?n+="":"?"===s[0]?n+=this.indentate(t)+"<"+s+"?"+this.tagEndChar:n+=this.indentate(t)+"<"+s+"/"+this.tagEndChar;else if(e[s]instanceof Date)n+=this.buildTextValNode(e[s],s,"",t);else if("object"!=typeof e[s]){const a=this.isAttribute(s);if(a)i+=this.buildAttrPairStr(a,""+e[s]);else if(s===this.options.textNodeName){let t=this.options.tagValueProcessor(s,""+e[s]);n+=this.replaceEntitiesValue(t)}else n+=this.buildTextValNode(e[s],s,"",t)}else if(Array.isArray(e[s])){const i=e[s].length;let a="",o="";for(let r=0;r<i;r++){const i=e[s][r];if(void 0===i);else if(null===i)"?"===s[0]?n+=this.indentate(t)+"<"+s+"?"+this.tagEndChar:n+=this.indentate(t)+"<"+s+"/"+this.tagEndChar;else if("object"==typeof i)if(this.options.oneListGroup){const e=this.j2x(i,t+1);a+=e.val,this.options.attributesGroupName&&i.hasOwnProperty(this.options.attributesGroupName)&&(o+=e.attrStr)}else a+=this.processTextOrObjNode(i,s,t);else if(this.options.oneListGroup){let e=this.options.tagValueProcessor(s,i);e=this.replaceEntitiesValue(e),a+=e}else a+=this.buildTextValNode(i,s,"",t)}this.options.oneListGroup&&(a=this.buildObjectNode(a,s,o,t)),n+=a}else if(this.options.attributesGroupName&&s===this.options.attributesGroupName){const t=Object.keys(e[s]),n=t.length;for(let a=0;a<n;a++)i+=this.buildAttrPairStr(t[a],""+e[s][t[a]])}else n+=this.processTextOrObjNode(e[s],s,t);return{attrStr:i,val:n}},i.prototype.buildAttrPairStr=function(e,t){return t=this.options.attributeValueProcessor(e,""+t),t=this.replaceEntitiesValue(t),this.options.suppressBooleanAttributes&&"true"===t?" "+e:" "+e+'="'+t+'"'},i.prototype.buildObjectNode=function(e,t,i,n){if(""===e)return"?"===t[0]?this.indentate(n)+"<"+t+i+"?"+this.tagEndChar:this.indentate(n)+"<"+t+i+this.closeTag(t)+this.tagEndChar;{let s="</"+t+this.tagEndChar,a="";return"?"===t[0]&&(a="?",s=""),!i&&""!==i||-1!==e.indexOf("<")?!1!==this.options.commentPropName&&t===this.options.commentPropName&&0===a.length?this.indentate(n)+`\x3c!--${e}--\x3e`+this.newLine:this.indentate(n)+"<"+t+i+a+this.tagEndChar+e+this.indentate(n)+s:this.indentate(n)+"<"+t+i+a+">"+e+s}},i.prototype.closeTag=function(e){let t="";return-1!==this.options.unpairedTags.indexOf(e)?this.options.suppressUnpairedNode||(t="/"):t=this.options.suppressEmptyNode?"/":`></${e}`,t},i.prototype.buildTextValNode=function(e,t,i,n){if(!1!==this.options.cdataPropName&&t===this.options.cdataPropName)return this.indentate(n)+`<![CDATA[${e}]]>`+this.newLine;if(!1!==this.options.commentPropName&&t===this.options.commentPropName)return this.indentate(n)+`\x3c!--${e}--\x3e`+this.newLine;if("?"===t[0])return this.indentate(n)+"<"+t+i+"?"+this.tagEndChar;{let s=this.options.tagValueProcessor(t,e);return s=this.replaceEntitiesValue(s),""===s?this.indentate(n)+"<"+t+i+this.closeTag(t)+this.tagEndChar:this.indentate(n)+"<"+t+i+">"+s+"</"+t+this.tagEndChar}},i.prototype.replaceEntitiesValue=function(e){if(e&&e.length>0&&this.options.processEntities)for(let t=0;t<this.options.entities.length;t++){const i=this.options.entities[t];e=e.replace(i.regex,i.val)}return e},bn=i}();return Sn={XMLParser:t,XMLValidator:e,XMLBuilder:i}}();const Pn=(e,t)=>Ki(e,t).then((e=>{if(e.length){const t=new On.XMLParser({attributeNamePrefix:"",htmlEntities:!0,ignoreAttributes:!1,ignoreDeclaration:!0,parseTagValue:!1,trimValues:!1,tagValueProcessor:(e,t)=>""===t.trim()&&t.includes("\n")?"":void 0});let i;t.addEntity("#xD","\r"),t.addEntity("#10","\n");try{i=t.parse(e,!0)}catch(t){throw t&&"object"==typeof t&&Object.defineProperty(t,"$responseBodyText",{value:e}),t}const n="#text",s=Object.keys(i)[0],a=i[s];return a[n]&&(a[s]=a[n],delete a[n]),Di(a)}return{}})),_n=async(e,t)=>{const i=await Pn(e,t);return i.Error&&(i.Error.message=i.Error.message??i.Error.Message),i},Rn=/\d{12}\.ddb/;const $n="user-agent",Mn="x-amz-user-agent",Nn=/[^\!\$\%\&\'\*\+\-\.\^\_\`\|\~\d\w]/g,Dn=/[^\!\$\%\&\'\*\+\-\.\^\_\`\|\~\d\w\#]/g;const jn=e=>(t,i)=>async n=>{const{request:s}=n;if(!I.isInstance(s))return t(n);const{headers:a}=s,o=i?.userAgent?.map(zn)||[],r=(await e.defaultUserAgentProvider()).map(zn);await async function(e,t,i){const n=i.request;if("rpc-v2-cbor"===n?.headers?.["smithy-protocol"]&&tt(e,"PROTOCOL_RPC_V2_CBOR","M"),"function"==typeof t.retryStrategy){const i=await t.retryStrategy();"function"==typeof i.acquireInitialRetryToken?i.constructor?.name?.includes("Adaptive")?tt(e,"RETRY_MODE_ADAPTIVE","F"):tt(e,"RETRY_MODE_STANDARD","E"):tt(e,"RETRY_MODE_LEGACY","D")}if("function"==typeof t.accountIdEndpointMode){const i=e.endpointV2;switch(String(i?.url?.hostname).match(Rn)&&tt(e,"ACCOUNT_ID_ENDPOINT","O"),await(t.accountIdEndpointMode?.())){case"disabled":tt(e,"ACCOUNT_ID_MODE_DISABLED","Q");break;case"preferred":tt(e,"ACCOUNT_ID_MODE_PREFERRED","P");break;case"required":tt(e,"ACCOUNT_ID_MODE_REQUIRED","R")}}const s=e.__smithy_context?.selectedHttpAuthScheme?.identity;if(s?.$source){const t=s;t.accountId&&tt(e,"RESOLVED_ACCOUNT_ID","T");for(const[i,n]of Object.entries(t.$source??{}))tt(e,i,n)}}(i,e,n);const c=i;r.push(`m/${function(e){let t="";for(const i in e){const n=e[i];if(!(t.length+n.length+1<=1024))break;t.length?t+=","+n:t+=n}return t}(Object.assign({},i.__smithy_context?.features,c.__aws_sdk_context?.features))}`);const l=e?.customUserAgent?.map(zn)||[],p=await e.userAgentAppId();p&&r.push(zn([`app/${p}`]));const d=[].concat([...r,...o,...l]).join(" "),u=[...r.filter((e=>e.startsWith("aws-sdk-"))),...l].join(" ");return"browser"!==e.runtime?(u&&(a[Mn]=a[Mn]?`${a[$n]} ${u}`:u),a[$n]=d):a[Mn]=d,t({...n,request:s})},zn=e=>{const t=e[0].split("/").map((e=>e.replace(Nn,"-"))).join("/"),i=e[1]?.replace(Dn,"-"),n=t.indexOf("/"),s=t.substring(0,n);let a=t.substring(n+1);return"api"===s&&(a=a.toLowerCase()),[s,a,i].filter((e=>e&&e.length>0)).reduce(((e,t,i)=>{switch(i){case 0:return t;case 1:return`${e}/${t}`;default:return`${e}#${t}`}}),"")},Ln={name:"getUserAgentMiddleware",step:"build",priority:"low",tags:["SET_USER_AGENT","USER_AGENT"],override:!0},Fn=e=>({applyToStack:t=>{t.add(jn(e),Ln)}});var Un;!function(e){e.ENV="env",e.CONFIG="shared config entry"}(Un||(Un={}));const Bn=!1,Hn=!1,qn=e=>"string"==typeof e&&(e.startsWith("fips-")||e.endsWith("-fips")),Vn=e=>qn(e)?["fips-aws-global","aws-fips"].includes(e)?"us-east-1":e.replace(/fips-(dkr-|prod-)?|-fips/,""):e,Gn=e=>{const{region:t,useFipsEndpoint:i}=e;if(!t)throw new Error("Region is missing");return{...e,region:async()=>{if("string"==typeof t)return Vn(t);const e=await t();return Vn(e)},useFipsEndpoint:async()=>{const e="string"==typeof t?t:await t();return!!qn(e)||("function"!=typeof i?Promise.resolve(!!i):i())}}},Wn="content-length";const Kn={step:"build",tags:["SET_CONTENT_LENGTH","CONTENT_LENGTH"],name:"contentLengthMiddleware",override:!0},Qn=e=>({applyToStack:t=>{var i;t.add((i=e.bodyLengthChecker,e=>async t=>{const n=t.request;if(I.isInstance(n)){const{body:e,headers:t}=n;if(e&&-1===Object.keys(t).map((e=>e.toLowerCase())).indexOf(Wn))try{const t=i(e);n.headers={...n.headers,[Wn]:String(t)}}catch(e){}}return e({...t,request:n})}),Kn)}}),Xn=/^[a-z0-9][a-z0-9\.\-]{1,61}[a-z0-9]$/,Jn=/(\d+\.){3}\d+/,Yn=/\.\./,Zn=e=>Xn.test(e)&&!Jn.test(e)&&!Yn.test(e),es=e=>{const[t,i,n,,,s]=e.split(":"),a="arn"===t&&e.split(":").length>=6,o=Boolean(a&&i&&n&&s);if(a&&!o)throw new Error(`Invalid ARN: ${e} was an invalid ARN.`);return o},ts=(e,t,i)=>{const n=async()=>{const n=i[e]??i[t];return"function"==typeof n?n():n};return"credentialScope"===e||"CredentialScope"===t?async()=>{const e="function"==typeof i.credentials?await i.credentials():i.credentials;return e?.credentialScope??e?.CredentialScope}:"accountId"===e||"AccountId"===t?async()=>{const e="function"==typeof i.credentials?await i.credentials():i.credentials;return e?.accountId??e?.AccountId}:"endpoint"===e||"endpoint"===t?async()=>{const e=await n();if(e&&"object"==typeof e){if("url"in e)return e.url.href;if("hostname"in e){const{protocol:t,hostname:i,port:n,path:s}=e;return`${t}//${i}${n?":"+n:""}${s}`}}return e}:n},is=async e=>{};const ns=e=>{if("string"==typeof e)return ns(new URL(e));const{hostname:t,pathname:i,port:n,protocol:s,search:a}=e;let o;return a&&(o=function(e){const t={};if(e=e.replace(/^\?/,""))for(const i of e.split("&")){let[e,n=null]=i.split("=");e=decodeURIComponent(e),n&&(n=decodeURIComponent(n)),e in t?Array.isArray(t[e])?t[e].push(n):t[e]=[t[e],n]:t[e]=n}return t}(a)),{hostname:t,port:n?parseInt(n):void 0,protocol:s,path:i,query:o}},ss=e=>"object"==typeof e?"url"in e?ns(e.url):e:ns(e),as=async(e,t,i)=>{const n={},s=t?.getEndpointParameterInstructions?.()||{};for(const[t,a]of Object.entries(s))switch(a.type){case"staticContextParams":n[t]=a.value;break;case"contextParams":n[t]=e[a.name];break;case"clientContextParams":case"builtInParams":n[t]=await ts(a.name,t,i)();break;default:throw new Error("Unrecognized endpoint parameter instruction: "+JSON.stringify(a))}return 0===Object.keys(s).length&&Object.assign(n,i),"s3"===String(i.serviceId).toLowerCase()&&await(async e=>{const t=e?.Bucket||"";if("string"==typeof e.Bucket&&(e.Bucket=t.replace(/#/g,encodeURIComponent("#")).replace(/\?/g,encodeURIComponent("?"))),es(t)){if(!0===e.ForcePathStyle)throw new Error("Path-style addressing cannot be used with ARN buckets")}else(!Zn(t)||-1!==t.indexOf(".")&&!String(e.Endpoint).startsWith("http:")||t.toLowerCase()!==t||t.length<3)&&(e.ForcePathStyle=!0);return e.DisableMultiRegionAccessPoints&&(e.disableMultiRegionAccessPoints=!0,e.DisableMRAP=!0),e})(n),n},os=({config:e,instructions:t})=>(i,n)=>async s=>{e.endpoint&&function(e,t,i){e.__smithy_context?e.__smithy_context.features||(e.__smithy_context.features={}):e.__smithy_context={features:{}},e.__smithy_context.features[t]=i}(n,"ENDPOINT_OVERRIDE","N");const a=await(async(e,t,i,n)=>{if(!i.endpoint){let e;e=i.serviceConfiguredEndpoint?await i.serviceConfiguredEndpoint():await is(i.serviceId),e&&(i.endpoint=()=>Promise.resolve(ss(e)))}const s=await as(e,t,i);if("function"!=typeof i.endpointProvider)throw new Error("config.endpointProvider is not set.");return i.endpointProvider(s,n)})(s.input,{getEndpointParameterInstructions:()=>t},{...e},n);n.endpointV2=a,n.authSchemes=a.properties?.authSchemes;const o=n.authSchemes?.[0];if(o){n.signing_region=o.signingRegion,n.signing_service=o.signingName;const e=N(n),t=e?.selectedHttpAuthScheme?.httpAuthOption;t&&(t.signingProperties=Object.assign(t.signingProperties||{},{signing_region:o.signingRegion,signingRegion:o.signingRegion,signing_service:o.signingName,signingName:o.signingName,signingRegionSet:o.signingRegionSet},o.properties))}return i({...s})},rs={step:"serialize",tags:["ENDPOINT_PARAMETERS","ENDPOINT_V2","ENDPOINT"],name:"endpointV2Middleware",override:!0,relation:"before",toMiddleware:U.name},cs=(e,t)=>({applyToStack:i=>{i.addRelativeTo(os({config:e,instructions:t}),rs)}}),ls=e=>{const t=e.tls??!0,{endpoint:i}=e,n=null!=i?async()=>ss(await D(i)()):void 0,s=!!i,a={...e,endpoint:n,tls:t,isCustomEndpoint:s,useDualstackEndpoint:D(e.useDualstackEndpoint??!1),useFipsEndpoint:D(e.useFipsEndpoint??!1)};let o;return a.serviceConfiguredEndpoint=async()=>(e.serviceId&&!o&&(o=is(e.serviceId)),o),a};var ps;!function(e){e.STANDARD="standard",e.ADAPTIVE="adaptive"}(ps||(ps={}));const ds=ps.STANDARD,us=["BandwidthLimitExceeded","EC2ThrottledException","LimitExceededException","PriorRequestNotComplete","ProvisionedThroughputExceededException","RequestLimitExceeded","RequestThrottled","RequestThrottledException","SlowDown","ThrottledException","Throttling","ThrottlingException","TooManyRequestsException","TransactionInProgressException"],ms=["TimeoutError","RequestTimeout","RequestTimeoutException"],hs=[500,502,503,504],fs=["ECONNRESET","ECONNREFUSED","EPIPE","ETIMEDOUT"],gs=e=>429===e.$metadata?.httpStatusCode||us.includes(e.name)||1==e.$retryable?.throttling,ys=e=>(e=>e.$metadata?.clockSkewCorrected)(e)||ms.includes(e.name)||fs.includes(e?.code||"")||hs.includes(e.$metadata?.httpStatusCode||0);class xs{constructor(e){this.currentCapacity=0,this.enabled=!1,this.lastMaxRate=0,this.measuredTxRate=0,this.requestCount=0,this.lastTimestamp=0,this.timeWindow=0,this.beta=e?.beta??.7,this.minCapacity=e?.minCapacity??1,this.minFillRate=e?.minFillRate??.5,this.scaleConstant=e?.scaleConstant??.4,this.smooth=e?.smooth??.8;const t=this.getCurrentTimeInSeconds();this.lastThrottleTime=t,this.lastTxRateBucket=Math.floor(this.getCurrentTimeInSeconds()),this.fillRate=this.minFillRate,this.maxCapacity=this.minCapacity}getCurrentTimeInSeconds(){return Date.now()/1e3}async getSendToken(){return this.acquireTokenBucket(1)}async acquireTokenBucket(e){if(this.enabled){if(this.refillTokenBucket(),e>this.currentCapacity){const t=(e-this.currentCapacity)/this.fillRate*1e3;await new Promise((e=>setTimeout(e,t)))}this.currentCapacity=this.currentCapacity-e}}refillTokenBucket(){const e=this.getCurrentTimeInSeconds();if(!this.lastTimestamp)return void(this.lastTimestamp=e);const t=(e-this.lastTimestamp)*this.fillRate;this.currentCapacity=Math.min(this.maxCapacity,this.currentCapacity+t),this.lastTimestamp=e}updateClientSendingRate(e){let t;if(this.updateMeasuredRate(),gs(e)){const e=this.enabled?Math.min(this.measuredTxRate,this.fillRate):this.measuredTxRate;this.lastMaxRate=e,this.calculateTimeWindow(),this.lastThrottleTime=this.getCurrentTimeInSeconds(),t=this.cubicThrottle(e),this.enableTokenBucket()}else this.calculateTimeWindow(),t=this.cubicSuccess(this.getCurrentTimeInSeconds());const i=Math.min(t,2*this.measuredTxRate);this.updateTokenBucketRate(i)}calculateTimeWindow(){this.timeWindow=this.getPrecise(Math.pow(this.lastMaxRate*(1-this.beta)/this.scaleConstant,1/3))}cubicThrottle(e){return this.getPrecise(e*this.beta)}cubicSuccess(e){return this.getPrecise(this.scaleConstant*Math.pow(e-this.lastThrottleTime-this.timeWindow,3)+this.lastMaxRate)}enableTokenBucket(){this.enabled=!0}updateTokenBucketRate(e){this.refillTokenBucket(),this.fillRate=Math.max(e,this.minFillRate),this.maxCapacity=Math.max(e,this.minCapacity),this.currentCapacity=Math.min(this.currentCapacity,this.maxCapacity)}updateMeasuredRate(){const e=this.getCurrentTimeInSeconds(),t=Math.floor(2*e)/2;if(this.requestCount++,t>this.lastTxRateBucket){const e=this.requestCount/(t-this.lastTxRateBucket);this.measuredTxRate=this.getPrecise(e*this.smooth+this.measuredTxRate*(1-this.smooth)),this.requestCount=0,this.lastTxRateBucket=t}}getPrecise(e){return parseFloat(e.toFixed(8))}}const vs=({retryDelay:e,retryCount:t,retryCost:i})=>({getRetryCount:()=>t,getRetryDelay:()=>Math.min(2e4,e),getRetryCost:()=>i});class ws{constructor(e){this.maxAttempts=e,this.mode=ps.STANDARD,this.capacity=500,this.retryBackoffStrategy=(()=>{let e=100;return{computeNextBackoffDelay:t=>Math.floor(Math.min(2e4,Math.random()*2**t*e)),setDelayBase:t=>{e=t}}})(),this.maxAttemptsProvider="function"==typeof e?e:async()=>e}async acquireInitialRetryToken(e){return vs({retryDelay:100,retryCount:0})}async refreshRetryTokenForRetry(e,t){const i=await this.getMaxAttempts();if(this.shouldRetry(e,t,i)){const i=t.errorType;this.retryBackoffStrategy.setDelayBase("THROTTLING"===i?500:100);const n=this.retryBackoffStrategy.computeNextBackoffDelay(e.getRetryCount()),s=t.retryAfterHint?Math.max(t.retryAfterHint.getTime()-Date.now()||0,n):n,a=this.getCapacityCost(i);return this.capacity-=a,vs({retryDelay:s,retryCount:e.getRetryCount()+1,retryCost:a})}throw new Error("No retry token available")}recordSuccess(e){this.capacity=Math.max(500,this.capacity+(e.getRetryCost()??1))}getCapacity(){return this.capacity}async getMaxAttempts(){try{return await this.maxAttemptsProvider()}catch(e){return console.warn("Max attempts provider could not resolve. Using default of 3"),3}}shouldRetry(e,t,i){return e.getRetryCount()+1<i&&this.capacity>=this.getCapacityCost(t.errorType)&&this.isRetryableError(t.errorType)}getCapacityCost(e){return"TRANSIENT"===e?10:5}isRetryableError(e){return"THROTTLING"===e||"TRANSIENT"===e}}class bs{constructor(e,t){this.maxAttemptsProvider=e,this.mode=ps.ADAPTIVE;const{rateLimiter:i}=t??{};this.rateLimiter=i??new xs,this.standardRetryStrategy=new ws(e)}async acquireInitialRetryToken(e){return await this.rateLimiter.getSendToken(),this.standardRetryStrategy.acquireInitialRetryToken(e)}async refreshRetryTokenForRetry(e,t){return this.rateLimiter.updateClientSendingRate(t),this.standardRetryStrategy.refreshRetryTokenForRetry(e,t)}recordSuccess(e){this.rateLimiter.updateClientSendingRate({}),this.standardRetryStrategy.recordSuccess(e)}}let Es;const Ss=new Uint8Array(16);function Cs(){if(!Es&&(Es="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!Es))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Es(Ss)}const As=[];for(let e=0;e<256;++e)As.push((e+256).toString(16).slice(1));var Is={randomUUID:"undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};function Ts(e,t,i){if(Is.randomUUID&&!t&&!e)return Is.randomUUID();const n=(e=e||{}).random||(e.rng||Cs)();return n[6]=15&n[6]|64,n[8]=63&n[8]|128,function(e,t=0){return As[e[t+0]]+As[e[t+1]]+As[e[t+2]]+As[e[t+3]]+"-"+As[e[t+4]]+As[e[t+5]]+"-"+As[e[t+6]]+As[e[t+7]]+"-"+As[e[t+8]]+As[e[t+9]]+"-"+As[e[t+10]]+As[e[t+11]]+As[e[t+12]]+As[e[t+13]]+As[e[t+14]]+As[e[t+15]]}(n)}const ks=e=>{const{retryStrategy:t}=e,i=D(e.maxAttempts??3);return{...e,maxAttempts:i,retryStrategy:async()=>{if(t)return t;return await D(e.retryMode)()===ps.ADAPTIVE?new bs(i):new ws(i)}}},Os=e=>e?.body instanceof ReadableStream,Ps=e=>void 0!==e.acquireInitialRetryToken&&void 0!==e.refreshRetryTokenForRetry&&void 0!==e.recordSuccess,_s=e=>{const t={error:e,errorType:Rs(e)},i=Ns(e.$response);return i&&(t.retryAfterHint=i),t},Rs=e=>gs(e)?"THROTTLING":ys(e)?"TRANSIENT":(e=>{if(void 0!==e.$metadata?.httpStatusCode){const t=e.$metadata.httpStatusCode;return 500<=t&&t<=599&&!ys(e)}return!1})(e)?"SERVER_ERROR":"CLIENT_ERROR",$s={name:"retryMiddleware",tags:["RETRY"],step:"finalizeRequest",priority:"high",override:!0},Ms=e=>({applyToStack:t=>{t.add((e=>(t,i)=>async n=>{let s=await e.retryStrategy();const a=await e.maxAttempts();if(!Ps(s))return s?.mode&&(i.userAgent=[...i.userAgent||[],["cfg/retry-mode",s.mode]]),s.retry(t,n);{let e=await s.acquireInitialRetryToken(i.partition_id),r=new Error,c=0,l=0;const{request:p}=n,d=I.isInstance(p);for(d&&(p.headers["amz-sdk-invocation-id"]=Ts());;)try{d&&(p.headers["amz-sdk-request"]=`attempt=${c+1}; max=${a}`);const{response:i,output:o}=await t(n);return s.recordSuccess(e),o.$metadata.attempts=c+1,o.$metadata.totalRetryDelay=l,{response:i,output:o}}catch(t){const n=_s(t);if(r=(o=t)instanceof Error?o:o instanceof Object?Object.assign(new Error,o):"string"==typeof o?new Error(o):new Error(`AWS SDK error wrapper for ${o}`),d&&Os(p))throw(i.logger instanceof Li?console:i.logger)?.warn("An error was encountered in a non-retryable streaming request."),r;try{e=await s.refreshRetryTokenForRetry(e,n)}catch(e){throw r.$metadata||(r.$metadata={}),r.$metadata.attempts=c+1,r.$metadata.totalRetryDelay=l,r}c=e.getRetryCount();const a=e.getRetryDelay();l+=a,await new Promise((e=>setTimeout(e,a)))}}var o})(e),$s)}}),Ns=e=>{if(!T.isInstance(e))return;const t=Object.keys(e.headers).find((e=>"retry-after"===e.toLowerCase()));if(!t)return;const i=e.headers[t],n=Number(i);if(!Number.isNaN(n))return new Date(1e3*n);return new Date(i)},Ds=async(e,t,i)=>({operation:N(t).operation,region:await D(e.region)()||(()=>{throw new Error("expected `region` to be configured for `aws.auth#sigv4`")})()});const js=e=>{const t=[];return e.operation,t.push(function(e){return{schemeId:"aws.auth#sigv4",signingProperties:{name:"lambda",region:e.region},propertiesExtractor:(e,t)=>({signingProperties:{config:e,context:t}})}}(e)),t},zs={UseFIPS:{type:"builtInParams",name:"useFipsEndpoint"},Endpoint:{type:"builtInParams",name:"endpoint"},Region:{type:"builtInParams",name:"region"},UseDualStack:{type:"builtInParams",name:"useDualstackEndpoint"}};var Ls="3.688.0";var Fs="undefined"!=typeof Buffer&&Buffer.from?function(e){return Buffer.from(e,"utf8")}:e=>(new TextEncoder).encode(e);function Us(e){return e instanceof Uint8Array?e:"string"==typeof e?Fs(e):ArrayBuffer.isView(e)?new Uint8Array(e.buffer,e.byteOffset,e.byteLength/Uint8Array.BYTES_PER_ELEMENT):new Uint8Array(e)}function Bs(e){return"string"==typeof e?0===e.length:0===e.byteLength}var Hs={name:"SHA-256"},qs={name:"HMAC",hash:Hs},Vs=new Uint8Array([227,176,196,66,152,252,28,20,154,251,244,200,153,111,185,36,39,174,65,228,100,155,147,76,164,149,153,27,120,82,184,85]);const Gs={};function Ws(){return"undefined"!=typeof window?window:"undefined"!=typeof self?self:Gs}var Ks=function(){function e(e){this.toHash=new Uint8Array(0),this.secret=e,this.reset()}return e.prototype.update=function(e){if(!Bs(e)){var t=Us(e),i=new Uint8Array(this.toHash.byteLength+t.byteLength);i.set(this.toHash,0),i.set(t,this.toHash.byteLength),this.toHash=i}},e.prototype.digest=function(){var e=this;return this.key?this.key.then((function(t){return Ws().crypto.subtle.sign(qs,t,e.toHash).then((function(e){return new Uint8Array(e)}))})):Bs(this.toHash)?Promise.resolve(Vs):Promise.resolve().then((function(){return Ws().crypto.subtle.digest(Hs,e.toHash)})).then((function(e){return Promise.resolve(new Uint8Array(e))}))},e.prototype.reset=function(){var e=this;this.toHash=new Uint8Array(0),this.secret&&void 0!==this.secret&&(this.key=new Promise((function(t,i){Ws().crypto.subtle.importKey("raw",Us(e.secret),qs,!1,["sign"]).then(t,i)})),this.key.catch((function(){})))},e}();function Qs(e,t,i,n){return new(i||(i=Promise))((function(s,a){function o(e){try{c(n.next(e))}catch(e){a(e)}}function r(e){try{c(n.throw(e))}catch(e){a(e)}}function c(e){var t;e.done?s(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(o,r)}c((n=n.apply(e,t||[])).next())}))}function Xs(e,t){var i,n,s,a={label:0,sent:function(){if(1&s[0])throw s[1];return s[1]},trys:[],ops:[]},o=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return o.next=r(0),o.throw=r(1),o.return=r(2),"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function r(r){return function(c){return function(r){if(i)throw new TypeError("Generator is already executing.");for(;o&&(o=0,r[0]&&(a=0)),a;)try{if(i=1,n&&(s=2&r[0]?n.return:r[0]?n.throw||((s=n.return)&&s.call(n),0):n.next)&&!(s=s.call(n,r[1])).done)return s;switch(n=0,s&&(r=[2&r[0],s.value]),r[0]){case 0:case 1:s=r;break;case 4:return a.label++,{value:r[1],done:!1};case 5:a.label++,n=r[1],r=[0];continue;case 7:r=a.ops.pop(),a.trys.pop();continue;default:if(!(s=a.trys,(s=s.length>0&&s[s.length-1])||6!==r[0]&&2!==r[0])){a=0;continue}if(3===r[0]&&(!s||r[1]>s[0]&&r[1]<s[3])){a.label=r[1];break}if(6===r[0]&&a.label<s[1]){a.label=s[1],s=r;break}if(s&&a.label<s[2]){a.label=s[2],a.ops.push(r);break}s[2]&&a.ops.pop(),a.trys.pop();continue}r=t.call(e,a)}catch(e){r=[6,e],n=0}finally{i=s=0}if(5&r[0])throw r[1];return{value:r[0]?r[1]:void 0,done:!0}}([r,c])}}}"function"==typeof SuppressedError&&SuppressedError;var Js=64,Ys=new Uint32Array([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]),Zs=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],ea=Math.pow(2,53)-1,ta=function(){function e(){this.state=Int32Array.from(Zs),this.temp=new Int32Array(64),this.buffer=new Uint8Array(64),this.bufferLength=0,this.bytesHashed=0,this.finished=!1}return e.prototype.update=function(e){if(this.finished)throw new Error("Attempted to update an already finished hash.");var t=0,i=e.byteLength;if(this.bytesHashed+=i,8*this.bytesHashed>ea)throw new Error("Cannot hash more than 2^53 - 1 bits");for(;i>0;)this.buffer[this.bufferLength++]=e[t++],i--,this.bufferLength===Js&&(this.hashBuffer(),this.bufferLength=0)},e.prototype.digest=function(){if(!this.finished){var e=8*this.bytesHashed,t=new DataView(this.buffer.buffer,this.buffer.byteOffset,this.buffer.byteLength),i=this.bufferLength;if(t.setUint8(this.bufferLength++,128),i%Js>=56){for(var n=this.bufferLength;n<Js;n++)t.setUint8(n,0);this.hashBuffer(),this.bufferLength=0}for(n=this.bufferLength;n<56;n++)t.setUint8(n,0);t.setUint32(56,Math.floor(e/4294967296),!0),t.setUint32(60,e),this.hashBuffer(),this.finished=!0}var s=new Uint8Array(32);for(n=0;n<8;n++)s[4*n]=this.state[n]>>>24&255,s[4*n+1]=this.state[n]>>>16&255,s[4*n+2]=this.state[n]>>>8&255,s[4*n+3]=this.state[n]>>>0&255;return s},e.prototype.hashBuffer=function(){for(var e=this.buffer,t=this.state,i=t[0],n=t[1],s=t[2],a=t[3],o=t[4],r=t[5],c=t[6],l=t[7],p=0;p<Js;p++){if(p<16)this.temp[p]=(255&e[4*p])<<24|(255&e[4*p+1])<<16|(255&e[4*p+2])<<8|255&e[4*p+3];else{var d=this.temp[p-2],u=(d>>>17|d<<15)^(d>>>19|d<<13)^d>>>10,m=((d=this.temp[p-15])>>>7|d<<25)^(d>>>18|d<<14)^d>>>3;this.temp[p]=(u+this.temp[p-7]|0)+(m+this.temp[p-16]|0)}var h=(((o>>>6|o<<26)^(o>>>11|o<<21)^(o>>>25|o<<7))+(o&r^~o&c)|0)+(l+(Ys[p]+this.temp[p]|0)|0)|0,f=((i>>>2|i<<30)^(i>>>13|i<<19)^(i>>>22|i<<10))+(i&n^i&s^n&s)|0;l=c,c=r,r=o,o=a+h|0,a=s,s=n,n=i,i=h+f|0}t[0]+=i,t[1]+=n,t[2]+=s,t[3]+=a,t[4]+=o,t[5]+=r,t[6]+=c,t[7]+=l},e}(),ia=function(){function e(e){this.secret=e,this.hash=new ta,this.reset()}return e.prototype.update=function(e){if(!Bs(e)&&!this.error)try{this.hash.update(Us(e))}catch(e){this.error=e}},e.prototype.digestSync=function(){if(this.error)throw this.error;return this.outer?(this.outer.finished||this.outer.update(this.hash.digest()),this.outer.digest()):this.hash.digest()},e.prototype.digest=function(){return Qs(this,void 0,void 0,(function(){return Xs(this,(function(e){return[2,this.digestSync()]}))}))},e.prototype.reset=function(){if(this.hash=new ta,this.secret){this.outer=new ta;var e=function(e){var t=Us(e);if(t.byteLength>Js){var i=new ta;i.update(t),t=i.digest()}var n=new Uint8Array(Js);return n.set(t),n}(this.secret),t=new Uint8Array(Js);t.set(e);for(var i=0;i<Js;i++)e[i]^=54,t[i]^=92;this.hash.update(e),this.outer.update(t);for(i=0;i<e.byteLength;i++)e[i]=0}},e}();var na=["decrypt","digest","encrypt","exportKey","generateKey","importKey","sign","verify"];function sa(e){return!(!function(e){if("object"==typeof e&&"object"==typeof e.crypto){return"function"==typeof e.crypto.getRandomValues}return!1}(e)||"object"!=typeof e.crypto.subtle)&&function(e){return e&&na.every((function(t){return"function"==typeof e[t]}))}(e.crypto.subtle)}var aa,oa=function(){function e(e){sa(Ws())?this.hash=new Ks(e):this.hash=new ia(e)}return e.prototype.update=function(e,t){this.hash.update(Us(e))},e.prototype.digest=function(){return this.hash.digest()},e.prototype.reset=function(){this.hash.reset()},e}(),ra={exports:{}};var ca=(aa||(aa=1,function(e){e.exports=function(e){var t={};function i(n){if(t[n])return t[n].exports;var s=t[n]={i:n,l:!1,exports:{}};return e[n].call(s.exports,s,s.exports,i),s.l=!0,s.exports}return i.m=e,i.c=t,i.d=function(e,t,n){i.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},i.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},i.t=function(e,t){if(1&t&&(e=i(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(i.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var s in e)i.d(n,s,function(t){return e[t]}.bind(null,s));return n},i.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return i.d(t,"a",t),t},i.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},i.p="",i(i.s=90)}({17:function(e,t,i){t.__esModule=!0,t.default=void 0;var n=i(18),s=function(){function e(){}return e.getFirstMatch=function(e,t){var i=t.match(e);return i&&i.length>0&&i[1]||""},e.getSecondMatch=function(e,t){var i=t.match(e);return i&&i.length>1&&i[2]||""},e.matchAndReturnConst=function(e,t,i){if(e.test(t))return i},e.getWindowsVersionName=function(e){switch(e){case"NT":return"NT";case"XP":case"NT 5.1":return"XP";case"NT 5.0":return"2000";case"NT 5.2":return"2003";case"NT 6.0":return"Vista";case"NT 6.1":return"7";case"NT 6.2":return"8";case"NT 6.3":return"8.1";case"NT 10.0":return"10";default:return}},e.getMacOSVersionName=function(e){var t=e.split(".").splice(0,2).map((function(e){return parseInt(e,10)||0}));if(t.push(0),10===t[0])switch(t[1]){case 5:return"Leopard";case 6:return"Snow Leopard";case 7:return"Lion";case 8:return"Mountain Lion";case 9:return"Mavericks";case 10:return"Yosemite";case 11:return"El Capitan";case 12:return"Sierra";case 13:return"High Sierra";case 14:return"Mojave";case 15:return"Catalina";default:return}},e.getAndroidVersionName=function(e){var t=e.split(".").splice(0,2).map((function(e){return parseInt(e,10)||0}));if(t.push(0),!(1===t[0]&&t[1]<5))return 1===t[0]&&t[1]<6?"Cupcake":1===t[0]&&t[1]>=6?"Donut":2===t[0]&&t[1]<2?"Eclair":2===t[0]&&2===t[1]?"Froyo":2===t[0]&&t[1]>2?"Gingerbread":3===t[0]?"Honeycomb":4===t[0]&&t[1]<1?"Ice Cream Sandwich":4===t[0]&&t[1]<4?"Jelly Bean":4===t[0]&&t[1]>=4?"KitKat":5===t[0]?"Lollipop":6===t[0]?"Marshmallow":7===t[0]?"Nougat":8===t[0]?"Oreo":9===t[0]?"Pie":void 0},e.getVersionPrecision=function(e){return e.split(".").length},e.compareVersions=function(t,i,n){void 0===n&&(n=!1);var s=e.getVersionPrecision(t),a=e.getVersionPrecision(i),o=Math.max(s,a),r=0,c=e.map([t,i],(function(t){var i=o-e.getVersionPrecision(t),n=t+new Array(i+1).join(".0");return e.map(n.split("."),(function(e){return new Array(20-e.length).join("0")+e})).reverse()}));for(n&&(r=o-Math.min(s,a)),o-=1;o>=r;){if(c[0][o]>c[1][o])return 1;if(c[0][o]===c[1][o]){if(o===r)return 0;o-=1}else if(c[0][o]<c[1][o])return-1}},e.map=function(e,t){var i,n=[];if(Array.prototype.map)return Array.prototype.map.call(e,t);for(i=0;i<e.length;i+=1)n.push(t(e[i]));return n},e.find=function(e,t){var i,n;if(Array.prototype.find)return Array.prototype.find.call(e,t);for(i=0,n=e.length;i<n;i+=1){var s=e[i];if(t(s,i))return s}},e.assign=function(e){for(var t,i,n=e,s=arguments.length,a=new Array(s>1?s-1:0),o=1;o<s;o++)a[o-1]=arguments[o];if(Object.assign)return Object.assign.apply(Object,[e].concat(a));var r=function(){var e=a[t];"object"==typeof e&&null!==e&&Object.keys(e).forEach((function(t){n[t]=e[t]}))};for(t=0,i=a.length;t<i;t+=1)r();return e},e.getBrowserAlias=function(e){return n.BROWSER_ALIASES_MAP[e]},e.getBrowserTypeByAlias=function(e){return n.BROWSER_MAP[e]||""},e}();t.default=s,e.exports=t.default},18:function(e,t,i){t.__esModule=!0,t.ENGINE_MAP=t.OS_MAP=t.PLATFORMS_MAP=t.BROWSER_MAP=t.BROWSER_ALIASES_MAP=void 0,t.BROWSER_ALIASES_MAP={"Amazon Silk":"amazon_silk","Android Browser":"android",Bada:"bada",BlackBerry:"blackberry",Chrome:"chrome",Chromium:"chromium",Electron:"electron",Epiphany:"epiphany",Firefox:"firefox",Focus:"focus",Generic:"generic","Google Search":"google_search",Googlebot:"googlebot","Internet Explorer":"ie","K-Meleon":"k_meleon",Maxthon:"maxthon","Microsoft Edge":"edge","MZ Browser":"mz","NAVER Whale Browser":"naver",Opera:"opera","Opera Coast":"opera_coast",PhantomJS:"phantomjs",Puffin:"puffin",QupZilla:"qupzilla",QQ:"qq",QQLite:"qqlite",Safari:"safari",Sailfish:"sailfish","Samsung Internet for Android":"samsung_internet",SeaMonkey:"seamonkey",Sleipnir:"sleipnir",Swing:"swing",Tizen:"tizen","UC Browser":"uc",Vivaldi:"vivaldi","WebOS Browser":"webos",WeChat:"wechat","Yandex Browser":"yandex",Roku:"roku"},t.BROWSER_MAP={amazon_silk:"Amazon Silk",android:"Android Browser",bada:"Bada",blackberry:"BlackBerry",chrome:"Chrome",chromium:"Chromium",electron:"Electron",epiphany:"Epiphany",firefox:"Firefox",focus:"Focus",generic:"Generic",googlebot:"Googlebot",google_search:"Google Search",ie:"Internet Explorer",k_meleon:"K-Meleon",maxthon:"Maxthon",edge:"Microsoft Edge",mz:"MZ Browser",naver:"NAVER Whale Browser",opera:"Opera",opera_coast:"Opera Coast",phantomjs:"PhantomJS",puffin:"Puffin",qupzilla:"QupZilla",qq:"QQ Browser",qqlite:"QQ Browser Lite",safari:"Safari",sailfish:"Sailfish",samsung_internet:"Samsung Internet for Android",seamonkey:"SeaMonkey",sleipnir:"Sleipnir",swing:"Swing",tizen:"Tizen",uc:"UC Browser",vivaldi:"Vivaldi",webos:"WebOS Browser",wechat:"WeChat",yandex:"Yandex Browser"},t.PLATFORMS_MAP={tablet:"tablet",mobile:"mobile",desktop:"desktop",tv:"tv"},t.OS_MAP={WindowsPhone:"Windows Phone",Windows:"Windows",MacOS:"macOS",iOS:"iOS",Android:"Android",WebOS:"WebOS",BlackBerry:"BlackBerry",Bada:"Bada",Tizen:"Tizen",Linux:"Linux",ChromeOS:"Chrome OS",PlayStation4:"PlayStation 4",Roku:"Roku"},t.ENGINE_MAP={EdgeHTML:"EdgeHTML",Blink:"Blink",Trident:"Trident",Presto:"Presto",Gecko:"Gecko",WebKit:"WebKit"}},90:function(e,t,i){t.__esModule=!0,t.default=void 0;var n,s=(n=i(91))&&n.__esModule?n:{default:n},a=i(18);function o(e,t){for(var i=0;i<t.length;i++){var n=t[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}var r=function(){function e(){}var t,i,n;return e.getParser=function(e,t){if(void 0===t&&(t=!1),"string"!=typeof e)throw new Error("UserAgent should be a string");return new s.default(e,t)},e.parse=function(e){return new s.default(e).getResult()},t=e,n=[{key:"BROWSER_MAP",get:function(){return a.BROWSER_MAP}},{key:"ENGINE_MAP",get:function(){return a.ENGINE_MAP}},{key:"OS_MAP",get:function(){return a.OS_MAP}},{key:"PLATFORMS_MAP",get:function(){return a.PLATFORMS_MAP}}],(i=null)&&o(t.prototype,i),n&&o(t,n),e}();t.default=r,e.exports=t.default},91:function(e,t,i){t.__esModule=!0,t.default=void 0;var n=c(i(92)),s=c(i(93)),a=c(i(94)),o=c(i(95)),r=c(i(17));function c(e){return e&&e.__esModule?e:{default:e}}var l=function(){function e(e,t){if(void 0===t&&(t=!1),null==e||""===e)throw new Error("UserAgent parameter can't be empty");this._ua=e,this.parsedResult={},!0!==t&&this.parse()}var t=e.prototype;return t.getUA=function(){return this._ua},t.test=function(e){return e.test(this._ua)},t.parseBrowser=function(){var e=this;this.parsedResult.browser={};var t=r.default.find(n.default,(function(t){if("function"==typeof t.test)return t.test(e);if(t.test instanceof Array)return t.test.some((function(t){return e.test(t)}));throw new Error("Browser's test function is not valid")}));return t&&(this.parsedResult.browser=t.describe(this.getUA())),this.parsedResult.browser},t.getBrowser=function(){return this.parsedResult.browser?this.parsedResult.browser:this.parseBrowser()},t.getBrowserName=function(e){return e?String(this.getBrowser().name).toLowerCase()||"":this.getBrowser().name||""},t.getBrowserVersion=function(){return this.getBrowser().version},t.getOS=function(){return this.parsedResult.os?this.parsedResult.os:this.parseOS()},t.parseOS=function(){var e=this;this.parsedResult.os={};var t=r.default.find(s.default,(function(t){if("function"==typeof t.test)return t.test(e);if(t.test instanceof Array)return t.test.some((function(t){return e.test(t)}));throw new Error("Browser's test function is not valid")}));return t&&(this.parsedResult.os=t.describe(this.getUA())),this.parsedResult.os},t.getOSName=function(e){var t=this.getOS().name;return e?String(t).toLowerCase()||"":t||""},t.getOSVersion=function(){return this.getOS().version},t.getPlatform=function(){return this.parsedResult.platform?this.parsedResult.platform:this.parsePlatform()},t.getPlatformType=function(e){void 0===e&&(e=!1);var t=this.getPlatform().type;return e?String(t).toLowerCase()||"":t||""},t.parsePlatform=function(){var e=this;this.parsedResult.platform={};var t=r.default.find(a.default,(function(t){if("function"==typeof t.test)return t.test(e);if(t.test instanceof Array)return t.test.some((function(t){return e.test(t)}));throw new Error("Browser's test function is not valid")}));return t&&(this.parsedResult.platform=t.describe(this.getUA())),this.parsedResult.platform},t.getEngine=function(){return this.parsedResult.engine?this.parsedResult.engine:this.parseEngine()},t.getEngineName=function(e){return e?String(this.getEngine().name).toLowerCase()||"":this.getEngine().name||""},t.parseEngine=function(){var e=this;this.parsedResult.engine={};var t=r.default.find(o.default,(function(t){if("function"==typeof t.test)return t.test(e);if(t.test instanceof Array)return t.test.some((function(t){return e.test(t)}));throw new Error("Browser's test function is not valid")}));return t&&(this.parsedResult.engine=t.describe(this.getUA())),this.parsedResult.engine},t.parse=function(){return this.parseBrowser(),this.parseOS(),this.parsePlatform(),this.parseEngine(),this},t.getResult=function(){return r.default.assign({},this.parsedResult)},t.satisfies=function(e){var t=this,i={},n=0,s={},a=0;if(Object.keys(e).forEach((function(t){var o=e[t];"string"==typeof o?(s[t]=o,a+=1):"object"==typeof o&&(i[t]=o,n+=1)})),n>0){var o=Object.keys(i),c=r.default.find(o,(function(e){return t.isOS(e)}));if(c){var l=this.satisfies(i[c]);if(void 0!==l)return l}var p=r.default.find(o,(function(e){return t.isPlatform(e)}));if(p){var d=this.satisfies(i[p]);if(void 0!==d)return d}}if(a>0){var u=Object.keys(s),m=r.default.find(u,(function(e){return t.isBrowser(e,!0)}));if(void 0!==m)return this.compareVersion(s[m])}},t.isBrowser=function(e,t){void 0===t&&(t=!1);var i=this.getBrowserName().toLowerCase(),n=e.toLowerCase(),s=r.default.getBrowserTypeByAlias(n);return t&&s&&(n=s.toLowerCase()),n===i},t.compareVersion=function(e){var t=[0],i=e,n=!1,s=this.getBrowserVersion();if("string"==typeof s)return">"===e[0]||"<"===e[0]?(i=e.substr(1),"="===e[1]?(n=!0,i=e.substr(2)):t=[],">"===e[0]?t.push(1):t.push(-1)):"="===e[0]?i=e.substr(1):"~"===e[0]&&(n=!0,i=e.substr(1)),t.indexOf(r.default.compareVersions(s,i,n))>-1},t.isOS=function(e){return this.getOSName(!0)===String(e).toLowerCase()},t.isPlatform=function(e){return this.getPlatformType(!0)===String(e).toLowerCase()},t.isEngine=function(e){return this.getEngineName(!0)===String(e).toLowerCase()},t.is=function(e,t){return void 0===t&&(t=!1),this.isBrowser(e,t)||this.isOS(e)||this.isPlatform(e)},t.some=function(e){var t=this;return void 0===e&&(e=[]),e.some((function(e){return t.is(e)}))},e}();t.default=l,e.exports=t.default},92:function(e,t,i){t.__esModule=!0,t.default=void 0;var n,s=(n=i(17))&&n.__esModule?n:{default:n},a=/version\/(\d+(\.?_?\d+)+)/i,o=[{test:[/googlebot/i],describe:function(e){var t={name:"Googlebot"},i=s.default.getFirstMatch(/googlebot\/(\d+(\.\d+))/i,e)||s.default.getFirstMatch(a,e);return i&&(t.version=i),t}},{test:[/opera/i],describe:function(e){var t={name:"Opera"},i=s.default.getFirstMatch(a,e)||s.default.getFirstMatch(/(?:opera)[\s/](\d+(\.?_?\d+)+)/i,e);return i&&(t.version=i),t}},{test:[/opr\/|opios/i],describe:function(e){var t={name:"Opera"},i=s.default.getFirstMatch(/(?:opr|opios)[\s/](\S+)/i,e)||s.default.getFirstMatch(a,e);return i&&(t.version=i),t}},{test:[/SamsungBrowser/i],describe:function(e){var t={name:"Samsung Internet for Android"},i=s.default.getFirstMatch(a,e)||s.default.getFirstMatch(/(?:SamsungBrowser)[\s/](\d+(\.?_?\d+)+)/i,e);return i&&(t.version=i),t}},{test:[/Whale/i],describe:function(e){var t={name:"NAVER Whale Browser"},i=s.default.getFirstMatch(a,e)||s.default.getFirstMatch(/(?:whale)[\s/](\d+(?:\.\d+)+)/i,e);return i&&(t.version=i),t}},{test:[/MZBrowser/i],describe:function(e){var t={name:"MZ Browser"},i=s.default.getFirstMatch(/(?:MZBrowser)[\s/](\d+(?:\.\d+)+)/i,e)||s.default.getFirstMatch(a,e);return i&&(t.version=i),t}},{test:[/focus/i],describe:function(e){var t={name:"Focus"},i=s.default.getFirstMatch(/(?:focus)[\s/](\d+(?:\.\d+)+)/i,e)||s.default.getFirstMatch(a,e);return i&&(t.version=i),t}},{test:[/swing/i],describe:function(e){var t={name:"Swing"},i=s.default.getFirstMatch(/(?:swing)[\s/](\d+(?:\.\d+)+)/i,e)||s.default.getFirstMatch(a,e);return i&&(t.version=i),t}},{test:[/coast/i],describe:function(e){var t={name:"Opera Coast"},i=s.default.getFirstMatch(a,e)||s.default.getFirstMatch(/(?:coast)[\s/](\d+(\.?_?\d+)+)/i,e);return i&&(t.version=i),t}},{test:[/opt\/\d+(?:.?_?\d+)+/i],describe:function(e){var t={name:"Opera Touch"},i=s.default.getFirstMatch(/(?:opt)[\s/](\d+(\.?_?\d+)+)/i,e)||s.default.getFirstMatch(a,e);return i&&(t.version=i),t}},{test:[/yabrowser/i],describe:function(e){var t={name:"Yandex Browser"},i=s.default.getFirstMatch(/(?:yabrowser)[\s/](\d+(\.?_?\d+)+)/i,e)||s.default.getFirstMatch(a,e);return i&&(t.version=i),t}},{test:[/ucbrowser/i],describe:function(e){var t={name:"UC Browser"},i=s.default.getFirstMatch(a,e)||s.default.getFirstMatch(/(?:ucbrowser)[\s/](\d+(\.?_?\d+)+)/i,e);return i&&(t.version=i),t}},{test:[/Maxthon|mxios/i],describe:function(e){var t={name:"Maxthon"},i=s.default.getFirstMatch(a,e)||s.default.getFirstMatch(/(?:Maxthon|mxios)[\s/](\d+(\.?_?\d+)+)/i,e);return i&&(t.version=i),t}},{test:[/epiphany/i],describe:function(e){var t={name:"Epiphany"},i=s.default.getFirstMatch(a,e)||s.default.getFirstMatch(/(?:epiphany)[\s/](\d+(\.?_?\d+)+)/i,e);return i&&(t.version=i),t}},{test:[/puffin/i],describe:function(e){var t={name:"Puffin"},i=s.default.getFirstMatch(a,e)||s.default.getFirstMatch(/(?:puffin)[\s/](\d+(\.?_?\d+)+)/i,e);return i&&(t.version=i),t}},{test:[/sleipnir/i],describe:function(e){var t={name:"Sleipnir"},i=s.default.getFirstMatch(a,e)||s.default.getFirstMatch(/(?:sleipnir)[\s/](\d+(\.?_?\d+)+)/i,e);return i&&(t.version=i),t}},{test:[/k-meleon/i],describe:function(e){var t={name:"K-Meleon"},i=s.default.getFirstMatch(a,e)||s.default.getFirstMatch(/(?:k-meleon)[\s/](\d+(\.?_?\d+)+)/i,e);return i&&(t.version=i),t}},{test:[/micromessenger/i],describe:function(e){var t={name:"WeChat"},i=s.default.getFirstMatch(/(?:micromessenger)[\s/](\d+(\.?_?\d+)+)/i,e)||s.default.getFirstMatch(a,e);return i&&(t.version=i),t}},{test:[/qqbrowser/i],describe:function(e){var t={name:/qqbrowserlite/i.test(e)?"QQ Browser Lite":"QQ Browser"},i=s.default.getFirstMatch(/(?:qqbrowserlite|qqbrowser)[/](\d+(\.?_?\d+)+)/i,e)||s.default.getFirstMatch(a,e);return i&&(t.version=i),t}},{test:[/msie|trident/i],describe:function(e){var t={name:"Internet Explorer"},i=s.default.getFirstMatch(/(?:msie |rv:)(\d+(\.?_?\d+)+)/i,e);return i&&(t.version=i),t}},{test:[/\sedg\//i],describe:function(e){var t={name:"Microsoft Edge"},i=s.default.getFirstMatch(/\sedg\/(\d+(\.?_?\d+)+)/i,e);return i&&(t.version=i),t}},{test:[/edg([ea]|ios)/i],describe:function(e){var t={name:"Microsoft Edge"},i=s.default.getSecondMatch(/edg([ea]|ios)\/(\d+(\.?_?\d+)+)/i,e);return i&&(t.version=i),t}},{test:[/vivaldi/i],describe:function(e){var t={name:"Vivaldi"},i=s.default.getFirstMatch(/vivaldi\/(\d+(\.?_?\d+)+)/i,e);return i&&(t.version=i),t}},{test:[/seamonkey/i],describe:function(e){var t={name:"SeaMonkey"},i=s.default.getFirstMatch(/seamonkey\/(\d+(\.?_?\d+)+)/i,e);return i&&(t.version=i),t}},{test:[/sailfish/i],describe:function(e){var t={name:"Sailfish"},i=s.default.getFirstMatch(/sailfish\s?browser\/(\d+(\.\d+)?)/i,e);return i&&(t.version=i),t}},{test:[/silk/i],describe:function(e){var t={name:"Amazon Silk"},i=s.default.getFirstMatch(/silk\/(\d+(\.?_?\d+)+)/i,e);return i&&(t.version=i),t}},{test:[/phantom/i],describe:function(e){var t={name:"PhantomJS"},i=s.default.getFirstMatch(/phantomjs\/(\d+(\.?_?\d+)+)/i,e);return i&&(t.version=i),t}},{test:[/slimerjs/i],describe:function(e){var t={name:"SlimerJS"},i=s.default.getFirstMatch(/slimerjs\/(\d+(\.?_?\d+)+)/i,e);return i&&(t.version=i),t}},{test:[/blackberry|\bbb\d+/i,/rim\stablet/i],describe:function(e){var t={name:"BlackBerry"},i=s.default.getFirstMatch(a,e)||s.default.getFirstMatch(/blackberry[\d]+\/(\d+(\.?_?\d+)+)/i,e);return i&&(t.version=i),t}},{test:[/(web|hpw)[o0]s/i],describe:function(e){var t={name:"WebOS Browser"},i=s.default.getFirstMatch(a,e)||s.default.getFirstMatch(/w(?:eb)?[o0]sbrowser\/(\d+(\.?_?\d+)+)/i,e);return i&&(t.version=i),t}},{test:[/bada/i],describe:function(e){var t={name:"Bada"},i=s.default.getFirstMatch(/dolfin\/(\d+(\.?_?\d+)+)/i,e);return i&&(t.version=i),t}},{test:[/tizen/i],describe:function(e){var t={name:"Tizen"},i=s.default.getFirstMatch(/(?:tizen\s?)?browser\/(\d+(\.?_?\d+)+)/i,e)||s.default.getFirstMatch(a,e);return i&&(t.version=i),t}},{test:[/qupzilla/i],describe:function(e){var t={name:"QupZilla"},i=s.default.getFirstMatch(/(?:qupzilla)[\s/](\d+(\.?_?\d+)+)/i,e)||s.default.getFirstMatch(a,e);return i&&(t.version=i),t}},{test:[/firefox|iceweasel|fxios/i],describe:function(e){var t={name:"Firefox"},i=s.default.getFirstMatch(/(?:firefox|iceweasel|fxios)[\s/](\d+(\.?_?\d+)+)/i,e);return i&&(t.version=i),t}},{test:[/electron/i],describe:function(e){var t={name:"Electron"},i=s.default.getFirstMatch(/(?:electron)\/(\d+(\.?_?\d+)+)/i,e);return i&&(t.version=i),t}},{test:[/MiuiBrowser/i],describe:function(e){var t={name:"Miui"},i=s.default.getFirstMatch(/(?:MiuiBrowser)[\s/](\d+(\.?_?\d+)+)/i,e);return i&&(t.version=i),t}},{test:[/chromium/i],describe:function(e){var t={name:"Chromium"},i=s.default.getFirstMatch(/(?:chromium)[\s/](\d+(\.?_?\d+)+)/i,e)||s.default.getFirstMatch(a,e);return i&&(t.version=i),t}},{test:[/chrome|crios|crmo/i],describe:function(e){var t={name:"Chrome"},i=s.default.getFirstMatch(/(?:chrome|crios|crmo)\/(\d+(\.?_?\d+)+)/i,e);return i&&(t.version=i),t}},{test:[/GSA/i],describe:function(e){var t={name:"Google Search"},i=s.default.getFirstMatch(/(?:GSA)\/(\d+(\.?_?\d+)+)/i,e);return i&&(t.version=i),t}},{test:function(e){var t=!e.test(/like android/i),i=e.test(/android/i);return t&&i},describe:function(e){var t={name:"Android Browser"},i=s.default.getFirstMatch(a,e);return i&&(t.version=i),t}},{test:[/playstation 4/i],describe:function(e){var t={name:"PlayStation 4"},i=s.default.getFirstMatch(a,e);return i&&(t.version=i),t}},{test:[/safari|applewebkit/i],describe:function(e){var t={name:"Safari"},i=s.default.getFirstMatch(a,e);return i&&(t.version=i),t}},{test:[/.*/i],describe:function(e){var t=-1!==e.search("\\(")?/^(.*)\/(.*)[ \t]\((.*)/:/^(.*)\/(.*) /;return{name:s.default.getFirstMatch(t,e),version:s.default.getSecondMatch(t,e)}}}];t.default=o,e.exports=t.default},93:function(e,t,i){t.__esModule=!0,t.default=void 0;var n,s=(n=i(17))&&n.__esModule?n:{default:n},a=i(18),o=[{test:[/Roku\/DVP/],describe:function(e){var t=s.default.getFirstMatch(/Roku\/DVP-(\d+\.\d+)/i,e);return{name:a.OS_MAP.Roku,version:t}}},{test:[/windows phone/i],describe:function(e){var t=s.default.getFirstMatch(/windows phone (?:os)?\s?(\d+(\.\d+)*)/i,e);return{name:a.OS_MAP.WindowsPhone,version:t}}},{test:[/windows /i],describe:function(e){var t=s.default.getFirstMatch(/Windows ((NT|XP)( \d\d?.\d)?)/i,e),i=s.default.getWindowsVersionName(t);return{name:a.OS_MAP.Windows,version:t,versionName:i}}},{test:[/Macintosh(.*?) FxiOS(.*?)\//],describe:function(e){var t={name:a.OS_MAP.iOS},i=s.default.getSecondMatch(/(Version\/)(\d[\d.]+)/,e);return i&&(t.version=i),t}},{test:[/macintosh/i],describe:function(e){var t=s.default.getFirstMatch(/mac os x (\d+(\.?_?\d+)+)/i,e).replace(/[_\s]/g,"."),i=s.default.getMacOSVersionName(t),n={name:a.OS_MAP.MacOS,version:t};return i&&(n.versionName=i),n}},{test:[/(ipod|iphone|ipad)/i],describe:function(e){var t=s.default.getFirstMatch(/os (\d+([_\s]\d+)*) like mac os x/i,e).replace(/[_\s]/g,".");return{name:a.OS_MAP.iOS,version:t}}},{test:function(e){var t=!e.test(/like android/i),i=e.test(/android/i);return t&&i},describe:function(e){var t=s.default.getFirstMatch(/android[\s/-](\d+(\.\d+)*)/i,e),i=s.default.getAndroidVersionName(t),n={name:a.OS_MAP.Android,version:t};return i&&(n.versionName=i),n}},{test:[/(web|hpw)[o0]s/i],describe:function(e){var t=s.default.getFirstMatch(/(?:web|hpw)[o0]s\/(\d+(\.\d+)*)/i,e),i={name:a.OS_MAP.WebOS};return t&&t.length&&(i.version=t),i}},{test:[/blackberry|\bbb\d+/i,/rim\stablet/i],describe:function(e){var t=s.default.getFirstMatch(/rim\stablet\sos\s(\d+(\.\d+)*)/i,e)||s.default.getFirstMatch(/blackberry\d+\/(\d+([_\s]\d+)*)/i,e)||s.default.getFirstMatch(/\bbb(\d+)/i,e);return{name:a.OS_MAP.BlackBerry,version:t}}},{test:[/bada/i],describe:function(e){var t=s.default.getFirstMatch(/bada\/(\d+(\.\d+)*)/i,e);return{name:a.OS_MAP.Bada,version:t}}},{test:[/tizen/i],describe:function(e){var t=s.default.getFirstMatch(/tizen[/\s](\d+(\.\d+)*)/i,e);return{name:a.OS_MAP.Tizen,version:t}}},{test:[/linux/i],describe:function(){return{name:a.OS_MAP.Linux}}},{test:[/CrOS/],describe:function(){return{name:a.OS_MAP.ChromeOS}}},{test:[/PlayStation 4/],describe:function(e){var t=s.default.getFirstMatch(/PlayStation 4[/\s](\d+(\.\d+)*)/i,e);return{name:a.OS_MAP.PlayStation4,version:t}}}];t.default=o,e.exports=t.default},94:function(e,t,i){t.__esModule=!0,t.default=void 0;var n,s=(n=i(17))&&n.__esModule?n:{default:n},a=i(18),o=[{test:[/googlebot/i],describe:function(){return{type:"bot",vendor:"Google"}}},{test:[/huawei/i],describe:function(e){var t=s.default.getFirstMatch(/(can-l01)/i,e)&&"Nova",i={type:a.PLATFORMS_MAP.mobile,vendor:"Huawei"};return t&&(i.model=t),i}},{test:[/nexus\s*(?:7|8|9|10).*/i],describe:function(){return{type:a.PLATFORMS_MAP.tablet,vendor:"Nexus"}}},{test:[/ipad/i],describe:function(){return{type:a.PLATFORMS_MAP.tablet,vendor:"Apple",model:"iPad"}}},{test:[/Macintosh(.*?) FxiOS(.*?)\//],describe:function(){return{type:a.PLATFORMS_MAP.tablet,vendor:"Apple",model:"iPad"}}},{test:[/kftt build/i],describe:function(){return{type:a.PLATFORMS_MAP.tablet,vendor:"Amazon",model:"Kindle Fire HD 7"}}},{test:[/silk/i],describe:function(){return{type:a.PLATFORMS_MAP.tablet,vendor:"Amazon"}}},{test:[/tablet(?! pc)/i],describe:function(){return{type:a.PLATFORMS_MAP.tablet}}},{test:function(e){var t=e.test(/ipod|iphone/i),i=e.test(/like (ipod|iphone)/i);return t&&!i},describe:function(e){var t=s.default.getFirstMatch(/(ipod|iphone)/i,e);return{type:a.PLATFORMS_MAP.mobile,vendor:"Apple",model:t}}},{test:[/nexus\s*[0-6].*/i,/galaxy nexus/i],describe:function(){return{type:a.PLATFORMS_MAP.mobile,vendor:"Nexus"}}},{test:[/[^-]mobi/i],describe:function(){return{type:a.PLATFORMS_MAP.mobile}}},{test:function(e){return"blackberry"===e.getBrowserName(!0)},describe:function(){return{type:a.PLATFORMS_MAP.mobile,vendor:"BlackBerry"}}},{test:function(e){return"bada"===e.getBrowserName(!0)},describe:function(){return{type:a.PLATFORMS_MAP.mobile}}},{test:function(e){return"windows phone"===e.getBrowserName()},describe:function(){return{type:a.PLATFORMS_MAP.mobile,vendor:"Microsoft"}}},{test:function(e){var t=Number(String(e.getOSVersion()).split(".")[0]);return"android"===e.getOSName(!0)&&t>=3},describe:function(){return{type:a.PLATFORMS_MAP.tablet}}},{test:function(e){return"android"===e.getOSName(!0)},describe:function(){return{type:a.PLATFORMS_MAP.mobile}}},{test:function(e){return"macos"===e.getOSName(!0)},describe:function(){return{type:a.PLATFORMS_MAP.desktop,vendor:"Apple"}}},{test:function(e){return"windows"===e.getOSName(!0)},describe:function(){return{type:a.PLATFORMS_MAP.desktop}}},{test:function(e){return"linux"===e.getOSName(!0)},describe:function(){return{type:a.PLATFORMS_MAP.desktop}}},{test:function(e){return"playstation 4"===e.getOSName(!0)},describe:function(){return{type:a.PLATFORMS_MAP.tv}}},{test:function(e){return"roku"===e.getOSName(!0)},describe:function(){return{type:a.PLATFORMS_MAP.tv}}}];t.default=o,e.exports=t.default},95:function(e,t,i){t.__esModule=!0,t.default=void 0;var n,s=(n=i(17))&&n.__esModule?n:{default:n},a=i(18),o=[{test:function(e){return"microsoft edge"===e.getBrowserName(!0)},describe:function(e){if(/\sedg\//i.test(e))return{name:a.ENGINE_MAP.Blink};var t=s.default.getFirstMatch(/edge\/(\d+(\.?_?\d+)+)/i,e);return{name:a.ENGINE_MAP.EdgeHTML,version:t}}},{test:[/trident/i],describe:function(e){var t={name:a.ENGINE_MAP.Trident},i=s.default.getFirstMatch(/trident\/(\d+(\.?_?\d+)+)/i,e);return i&&(t.version=i),t}},{test:function(e){return e.test(/presto/i)},describe:function(e){var t={name:a.ENGINE_MAP.Presto},i=s.default.getFirstMatch(/presto\/(\d+(\.?_?\d+)+)/i,e);return i&&(t.version=i),t}},{test:function(e){var t=e.test(/gecko/i),i=e.test(/like gecko/i);return t&&!i},describe:function(e){var t={name:a.ENGINE_MAP.Gecko},i=s.default.getFirstMatch(/gecko\/(\d+(\.?_?\d+)+)/i,e);return i&&(t.version=i),t}},{test:[/(apple)?webkit\/537\.36/i],describe:function(){return{name:a.ENGINE_MAP.Blink}}},{test:[/(apple)?webkit/i],describe:function(e){var t={name:a.ENGINE_MAP.WebKit},i=s.default.getFirstMatch(/webkit\/(\d+(\.?_?\d+)+)/i,e);return i&&(t.version=i),t}}];t.default=o,e.exports=t.default}})}(ra)),ra.exports),la=Xi(ca);const pa=({serviceId:e,clientVersion:t})=>async i=>{const n="undefined"!=typeof window&&window?.navigator?.userAgent?la.parse(window.navigator.userAgent):void 0,s=[["aws-sdk-js",t],["ua","2.1"],[`os/${n?.os?.name||"other"}`,n?.os?.version],["lang/js"],["md/browser",`${n?.browser?.name??"unknown"}_${n?.browser?.version??"unknown"}`]];e&&s.push([`api/${e}`,t]);const a=await(i?.userAgentAppId?.());return a&&s.push([`app/${a}`]),s};var da,ua=function(){function e(){this.checksum=4294967295}return e.prototype.update=function(e){var t,i;try{for(var n=function(e){var t="function"==typeof Symbol&&Symbol.iterator,i=t&&e[t],n=0;if(i)return i.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}(e),s=n.next();!s.done;s=n.next()){var a=s.value;this.checksum=this.checksum>>>8^ma[255&(this.checksum^a)]}}catch(e){t={error:e}}finally{try{s&&!s.done&&(i=n.return)&&i.call(n)}finally{if(t)throw t.error}}return this},e.prototype.digest=function(){return(4294967295^this.checksum)>>>0},e}(),ma=function(e){if(!Uint32Array.from){for(var t=new Uint32Array(e.length),i=0;i<e.length;)t[i]=e[i],i+=1;return t}return Uint32Array.from(e)}([0,1996959894,3993919788,2567524794,124634137,1886057615,3915621685,2657392035,249268274,2044508324,3772115230,2547177864,162941995,2125561021,3887607047,2428444049,498536548,1789927666,4089016648,2227061214,450548861,1843258603,4107580753,2211677639,325883990,1684777152,4251122042,2321926636,335633487,1661365465,4195302755,2366115317,997073096,1281953886,3579855332,2724688242,1006888145,1258607687,3524101629,2768942443,901097722,1119000684,3686517206,2898065728,853044451,1172266101,3705015759,2882616665,651767980,1373503546,3369554304,3218104598,565507253,1454621731,3485111705,3099436303,671266974,1594198024,3322730930,2970347812,795835527,1483230225,3244367275,3060149565,1994146192,31158534,2563907772,4023717930,1907459465,112637215,2680153253,3904427059,2013776290,251722036,2517215374,3775830040,2137656763,141376813,2439277719,3865271297,1802195444,476864866,2238001368,4066508878,1812370925,453092731,2181625025,4111451223,1706088902,314042704,2344532202,4240017532,1658658271,366619977,2362670323,4224994405,1303535960,984961486,2747007092,3569037538,1256170817,1037604311,2765210733,3554079995,1131014506,879679996,2909243462,3663771856,1141124467,855842277,2852801631,3708648649,1342533948,654459306,3188396048,3373015174,1466479909,544179635,3110523913,3462522015,1591671054,702138776,2966460450,3352799412,1504918807,783551873,3082640443,3233442989,3988292384,2596254646,62317068,1957810842,3939845945,2647816111,81470997,1943803523,3814918930,2489596804,225274430,2053790376,3826175755,2466906013,167816743,2097651377,4027552580,2265490386,503444072,1762050814,4150417245,2154129355,426522225,1852507879,4275313526,2312317920,282753626,1742555852,4189708143,2394877945,397917763,1622183637,3604390888,2714866558,953729732,1340076626,3518719985,2797360999,1068828381,1219638859,3624741850,2936675148,906185462,1090812512,3747672003,2825379669,829329135,1181335161,3412177804,3160834842,628085408,1382605366,3423369109,3138078467,570562233,1426400815,3317316542,2998733608,733239954,1555261956,3268935591,3050360625,752459403,1541320221,2607071920,3965973030,1969922972,40735498,2617837225,3943577151,1913087877,83908371,2512341634,3803740692,2075208622,213261112,2463272603,3855990285,2094854071,198958881,2262029012,4057260610,1759359992,534414190,2176718541,4139329115,1873836001,414664567,2282248934,4279200368,1711684554,285281116,2405801727,4167216745,1634467795,376229701,2685067896,3608007406,1308918612,956543938,2808555105,3495958263,1231636301,1047427035,2932959818,3654703836,1088359270,936918e3,2847714899,3736837829,1202900863,817233897,3183342108,3401237130,1404277552,615818150,3134207493,3453421203,1423857449,601450431,3009837614,3294710456,1567103746,711928724,3020668471,3272380065,1510334235,755167117]);class ha{constructor(e){if(this.bytes=e,8!==e.byteLength)throw new Error("Int64 buffers must be exactly 8 bytes")}static fromNumber(e){if(e>0x8000000000000000||e<-0x8000000000000000)throw new Error(`${e} is too large (or, if negative, too small) to represent as an Int64`);const t=new Uint8Array(8);for(let i=7,n=Math.abs(Math.round(e));i>-1&&n>0;i--,n/=256)t[i]=n;return e<0&&fa(t),new ha(t)}valueOf(){const e=this.bytes.slice(0),t=128&e[0];return t&&fa(e),parseInt(fe(e),16)*(t?-1:1)}toString(){return String(this.valueOf())}}function fa(e){for(let t=0;t<8;t++)e[t]^=255;for(let t=7;t>-1&&(e[t]++,0===e[t]);t--);}class ga{constructor(e,t){this.toUtf8=e,this.fromUtf8=t}format(e){const t=[];for(const i of Object.keys(e)){const n=this.fromUtf8(i);t.push(Uint8Array.from([n.byteLength]),n,this.formatHeaderValue(e[i]))}const i=new Uint8Array(t.reduce(((e,t)=>e+t.byteLength),0));let n=0;for(const e of t)i.set(e,n),n+=e.byteLength;return i}formatHeaderValue(e){switch(e.type){case"boolean":return Uint8Array.from([e.value?0:1]);case"byte":return Uint8Array.from([2,e.value]);case"short":const t=new DataView(new ArrayBuffer(3));return t.setUint8(0,3),t.setInt16(1,e.value,!1),new Uint8Array(t.buffer);case"integer":const i=new DataView(new ArrayBuffer(5));return i.setUint8(0,4),i.setInt32(1,e.value,!1),new Uint8Array(i.buffer);case"long":const n=new Uint8Array(9);return n[0]=5,n.set(e.value.bytes,1),n;case"binary":const s=new DataView(new ArrayBuffer(3+e.value.byteLength));s.setUint8(0,6),s.setUint16(1,e.value.byteLength,!1);const a=new Uint8Array(s.buffer);return a.set(e.value,3),a;case"string":const o=this.fromUtf8(e.value),r=new DataView(new ArrayBuffer(3+o.byteLength));r.setUint8(0,7),r.setUint16(1,o.byteLength,!1);const c=new Uint8Array(r.buffer);return c.set(o,3),c;case"timestamp":const l=new Uint8Array(9);return l[0]=8,l.set(ha.fromNumber(e.value.valueOf()).bytes,1),l;case"uuid":if(!Ia.test(e.value))throw new Error(`Invalid UUID received: ${e.value}`);const p=new Uint8Array(17);return p[0]=9,p.set(he(e.value.replace(/\-/g,"")),1),p}}parse(e){const t={};let i=0;for(;i<e.byteLength;){const n=e.getUint8(i++),s=this.toUtf8(new Uint8Array(e.buffer,e.byteOffset+i,n));switch(i+=n,e.getUint8(i++)){case 0:t[s]={type:ya,value:!0};break;case 1:t[s]={type:ya,value:!1};break;case 2:t[s]={type:xa,value:e.getInt8(i++)};break;case 3:t[s]={type:va,value:e.getInt16(i,!1)},i+=2;break;case 4:t[s]={type:wa,value:e.getInt32(i,!1)},i+=4;break;case 5:t[s]={type:ba,value:new ha(new Uint8Array(e.buffer,e.byteOffset+i,8))},i+=8;break;case 6:const n=e.getUint16(i,!1);i+=2,t[s]={type:Ea,value:new Uint8Array(e.buffer,e.byteOffset+i,n)},i+=n;break;case 7:const a=e.getUint16(i,!1);i+=2,t[s]={type:Sa,value:this.toUtf8(new Uint8Array(e.buffer,e.byteOffset+i,a))},i+=a;break;case 8:t[s]={type:Ca,value:new Date(new ha(new Uint8Array(e.buffer,e.byteOffset+i,8)).valueOf())},i+=8;break;case 9:const o=new Uint8Array(e.buffer,e.byteOffset+i,16);i+=16,t[s]={type:Aa,value:`${fe(o.subarray(0,4))}-${fe(o.subarray(4,6))}-${fe(o.subarray(6,8))}-${fe(o.subarray(8,10))}-${fe(o.subarray(10))}`};break;default:throw new Error("Unrecognized header type tag")}}return t}}!function(e){e[e.boolTrue=0]="boolTrue",e[e.boolFalse=1]="boolFalse",e[e.byte=2]="byte",e[e.short=3]="short",e[e.integer=4]="integer",e[e.long=5]="long",e[e.byteArray=6]="byteArray",e[e.string=7]="string",e[e.timestamp=8]="timestamp",e[e.uuid=9]="uuid"}(da||(da={}));const ya="boolean",xa="byte",va="short",wa="integer",ba="long",Ea="binary",Sa="string",Ca="timestamp",Aa="uuid",Ia=/^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$/;class Ta{constructor(e,t){this.headerMarshaller=new ga(e,t),this.messageBuffer=[],this.isEndOfStream=!1}feed(e){this.messageBuffer.push(this.decode(e))}endOfStream(){this.isEndOfStream=!0}getMessage(){const e=this.messageBuffer.pop(),t=this.isEndOfStream;return{getMessage:()=>e,isEndOfStream:()=>t}}getAvailableMessages(){const e=this.messageBuffer;this.messageBuffer=[];const t=this.isEndOfStream;return{getMessages:()=>e,isEndOfStream:()=>t}}encode({headers:e,body:t}){const i=this.headerMarshaller.format(e),n=i.byteLength+t.byteLength+16,s=new Uint8Array(n),a=new DataView(s.buffer,s.byteOffset,s.byteLength),o=new ua;return a.setUint32(0,n,!1),a.setUint32(4,i.byteLength,!1),a.setUint32(8,o.update(s.subarray(0,8)).digest(),!1),s.set(i,12),s.set(t,i.byteLength+12),a.setUint32(n-4,o.update(s.subarray(8,n-4)).digest(),!1),s}decode(e){const{headers:t,body:i}=function({byteLength:e,byteOffset:t,buffer:i}){if(e<16)throw new Error("Provided message too short to accommodate event stream message overhead");const n=new DataView(i,t,e),s=n.getUint32(0,!1);if(e!==s)throw new Error("Reported message length does not match received message length");const a=n.getUint32(4,!1),o=n.getUint32(8,!1),r=n.getUint32(e-4,!1),c=(new ua).update(new Uint8Array(i,t,8));if(o!==c.digest())throw new Error(`The prelude checksum specified in the message (${o}) does not match the calculated CRC32 checksum (${c.digest()})`);if(c.update(new Uint8Array(i,t+8,e-12)),r!==c.digest())throw new Error(`The message checksum (${c.digest()}) did not match the expected value of ${r}`);return{headers:new DataView(i,t+8+4,a),body:new Uint8Array(i,t+8+4+a,s-a-16)}}(e);return{headers:this.headerMarshaller.parse(t),body:i}}formatHeaders(e){return this.headerMarshaller.format(e)}}class ka{constructor(e){this.options=e}[Symbol.asyncIterator](){return this.asyncIterator()}async*asyncIterator(){for await(const e of this.options.inputStream){const t=this.options.decoder.decode(e);yield t}}}class Oa{constructor(e){this.options=e}[Symbol.asyncIterator](){return this.asyncIterator()}async*asyncIterator(){for await(const e of this.options.messageStream){const t=this.options.encoder.encode(e);yield t}this.options.includeEndFrame&&(yield new Uint8Array(0))}}class Pa{constructor(e){this.options=e}[Symbol.asyncIterator](){return this.asyncIterator()}async*asyncIterator(){for await(const e of this.options.messageStream){const t=await this.options.deserializer(e);void 0!==t&&(yield t)}}}class _a{constructor(e){this.options=e}[Symbol.asyncIterator](){return this.asyncIterator()}async*asyncIterator(){for await(const e of this.options.inputStream){const t=this.options.serializer(e);yield t}}}function Ra(e,t){return async function(i){const{value:n}=i.headers[":message-type"];if("error"===n){const e=new Error(i.headers[":error-message"].value||"UnknownError");throw e.name=i.headers[":error-code"].value,e}if("exception"===n){const n=i.headers[":exception-type"].value,s={[n]:i},a=await e(s);if(a.$unknown){const e=new Error(t(i.body));throw e.name=n,e}throw a[n]}if("event"===n){const t={[i.headers[":event-type"].value]:i},n=await e(t);if(n.$unknown)return;return n}throw Error(`Unrecognizable event type: ${i.headers[":event-type"].value}`)}}let $a=class{constructor({utf8Encoder:e,utf8Decoder:t}){this.eventStreamCodec=new Ta(e,t),this.utfEncoder=e}deserialize(e,t){const i=function(e){let t=0,i=0,n=null,s=null;const a=e=>{if("number"!=typeof e)throw new Error("Attempted to allocate an event message where size was not a number: "+e);t=e,i=4,n=new Uint8Array(e),new DataView(n.buffer).setUint32(0,e,!1)};return{[Symbol.asyncIterator]:async function*(){const o=e[Symbol.asyncIterator]();for(;;){const{value:e,done:r}=await o.next();if(r){if(!t)return;if(t!==i)throw new Error("Truncated event message received.");return void(yield n)}const c=e.length;let l=0;for(;l<c;){if(!n){const t=c-l;s||(s=new Uint8Array(4));const n=Math.min(4-i,t);if(s.set(e.slice(l,l+n),i),i+=n,l+=n,i<4)break;a(new DataView(s.buffer).getUint32(0,!1)),s=null}const o=Math.min(t-i,c-l);n.set(e.slice(l,l+o),i),i+=o,l+=o,t&&t===i&&(yield n,n=null,t=0,i=0)}}}}}(e);return new Pa({messageStream:new ka({inputStream:i,decoder:this.eventStreamCodec}),deserializer:Ra(t,this.utfEncoder)})}serialize(e,t){return new Oa({messageStream:new _a({inputStream:e,serializer:t}),encoder:this.eventStreamCodec,includeEndFrame:!0})}};class Ma{constructor({utf8Encoder:e,utf8Decoder:t}){this.universalMarshaller=new $a({utf8Decoder:t,utf8Encoder:e})}deserialize(e,t){const i=Na(e)?(n=e,{[Symbol.asyncIterator]:async function*(){const e=n.getReader();try{for(;;){const{done:t,value:i}=await e.read();if(t)return;yield i}}finally{e.releaseLock()}}}):e;var n;return this.universalMarshaller.deserialize(i,t)}serialize(e,t){const i=this.universalMarshaller.serialize(e,t);return"function"==typeof ReadableStream?(e=>{const t=e[Symbol.asyncIterator]();return new ReadableStream({async pull(e){const{done:i,value:n}=await t.next();if(i)return e.close();e.enqueue(n)}})})(i):i}}const Na=e=>"function"==typeof ReadableStream&&e instanceof ReadableStream,Da=e=>new Ma(e),ja=e=>()=>Promise.reject(e),za="function"==typeof TextEncoder?new TextEncoder:null,La=e=>{if("string"==typeof e){if(za)return za.encode(e).byteLength;let t=e.length;for(let i=t-1;i>=0;i--){const n=e.charCodeAt(i);n>127&&n<=2047?t++:n>2047&&n<=65535&&(t+=2),n>=56320&&n<=57343&&i--}return t}if("number"==typeof e.byteLength)return e.byteLength;if("number"==typeof e.size)return e.size;throw new Error(`Body Length computation failed for ${e}`)},Fa="required",Ua="fn",Ba="argv",Ha="ref",qa=!0,Va="isSet",Ga="booleanEquals",Wa="error",Ka="endpoint",Qa="tree",Xa="PartitionResult",Ja={[Fa]:!1,type:"String"},Ya={[Fa]:!0,default:!1,type:"Boolean"},Za={[Ha]:"Endpoint"},eo={[Ua]:Ga,[Ba]:[{[Ha]:"UseFIPS"},!0]},to={[Ua]:Ga,[Ba]:[{[Ha]:"UseDualStack"},!0]},io={},no={[Ua]:"getAttr",[Ba]:[{[Ha]:Xa},"supportsFIPS"]},so={[Ua]:Ga,[Ba]:[!0,{[Ua]:"getAttr",[Ba]:[{[Ha]:Xa},"supportsDualStack"]}]},ao=[eo],oo=[to],ro=[{[Ha]:"Region"}],co={version:"1.0",parameters:{Region:Ja,UseDualStack:Ya,UseFIPS:Ya,Endpoint:Ja},rules:[{conditions:[{[Ua]:Va,[Ba]:[Za]}],rules:[{conditions:ao,error:"Invalid Configuration: FIPS and custom endpoint are not supported",type:Wa},{conditions:oo,error:"Invalid Configuration: Dualstack and custom endpoint are not supported",type:Wa},{endpoint:{url:Za,properties:io,headers:io},type:Ka}],type:Qa},{conditions:[{[Ua]:Va,[Ba]:ro}],rules:[{conditions:[{[Ua]:"aws.partition",[Ba]:ro,assign:Xa}],rules:[{conditions:[eo,to],rules:[{conditions:[{[Ua]:Ga,[Ba]:[qa,no]},so],rules:[{endpoint:{url:"https://lambda-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:io,headers:io},type:Ka}],type:Qa},{error:"FIPS and DualStack are enabled, but this partition does not support one or both",type:Wa}],type:Qa},{conditions:ao,rules:[{conditions:[{[Ua]:Ga,[Ba]:[no,qa]}],rules:[{endpoint:{url:"https://lambda-fips.{Region}.{PartitionResult#dnsSuffix}",properties:io,headers:io},type:Ka}],type:Qa},{error:"FIPS is enabled but this partition does not support FIPS",type:Wa}],type:Qa},{conditions:oo,rules:[{conditions:[so],rules:[{endpoint:{url:"https://lambda.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:io,headers:io},type:Ka}],type:Qa},{error:"DualStack is enabled but this partition does not support DualStack",type:Wa}],type:Qa},{endpoint:{url:"https://lambda.{Region}.{PartitionResult#dnsSuffix}",properties:io,headers:io},type:Ka}],type:Qa}],type:Qa},{error:"Invalid Configuration: Missing Region",type:Wa}]},lo=new Ie({size:50,params:["Endpoint","Region","UseDualStack","UseFIPS"]}),po=(e,t={})=>lo.get(e,(()=>Je(co,{endpointParams:e,logger:t.logger})));_e.aws=et;const uo=["in-region","cross-region","mobile","standard","legacy"],mo=({defaultsMode:e}={})=>rt((async()=>{const t="function"==typeof e?await e():e;switch(t?.toLowerCase()){case"auto":return Promise.resolve(ho()?"mobile":"standard");case"mobile":case"in-region":case"cross-region":case"standard":case"legacy":return Promise.resolve(t?.toLocaleLowerCase());case void 0:return Promise.resolve("legacy");default:throw new Error(`Invalid parameter for "defaultsMode", expect ${uo.join(", ")}, got ${t}`)}})),ho=()=>{const e="undefined"!=typeof window&&window?.navigator?.userAgent?la.parse(window.navigator.userAgent):void 0,t=e?.platform?.type;return"tablet"===t||"mobile"===t},fo=e=>{const t=mo(e),i=()=>t().then(ki),n=(e=>({apiVersion:"2015-03-31",base64Decoder:e?.base64Decoder??Z,base64Encoder:e?.base64Encoder??ne,disableHostPrefix:e?.disableHostPrefix??!1,endpointProvider:e?.endpointProvider??po,extensions:e?.extensions??[],httpAuthSchemeProvider:e?.httpAuthSchemeProvider??js,httpAuthSchemes:e?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:e=>e.getIdentityProvider("aws.auth#sigv4"),signer:new ot}],logger:e?.logger??new Li,serviceId:e?.serviceId??"Lambda",urlParser:e?.urlParser??ns,utf8Decoder:e?.utf8Decoder??ee,utf8Encoder:e?.utf8Encoder??ie}))(e);return{...n,...e,runtime:"browser",defaultsMode:t,bodyLengthChecker:e?.bodyLengthChecker??La,credentialDefaultProvider:e?.credentialDefaultProvider??(e=>()=>Promise.reject(new Error("Credential is missing"))),defaultUserAgentProvider:e?.defaultUserAgentProvider??pa({serviceId:n.serviceId,clientVersion:Ls}),eventStreamSerdeProvider:e?.eventStreamSerdeProvider??Da,maxAttempts:e?.maxAttempts??3,region:e?.region??ja("Region is missing"),requestHandler:pe.create(e?.requestHandler??i),retryMode:e?.retryMode??(async()=>(await i()).retryMode||ds),sha256:e?.sha256??oa,streamCollector:e?.streamCollector??de,useDualstackEndpoint:e?.useDualstackEndpoint??(()=>Promise.resolve(Bn)),useFipsEndpoint:e?.useFipsEndpoint??(()=>Promise.resolve(Hn))}},go=e=>{let t=async()=>{if(void 0===e.region)throw new Error("Region is missing from runtimeConfig");const t=e.region;return"string"==typeof t?t:t()};return{setRegion(e){t=e},region:()=>t}},yo=e=>({region:e.region()}),xo=e=>{const t=e.httpAuthSchemes;let i=e.httpAuthSchemeProvider,n=e.credentials;return{setHttpAuthScheme(e){const i=t.findIndex((t=>t.schemeId===e.schemeId));-1===i?t.push(e):t.splice(i,1,e)},httpAuthSchemes:()=>t,setHttpAuthSchemeProvider(e){i=e},httpAuthSchemeProvider:()=>i,setCredentials(e){n=e},credentials:()=>n}};class vo extends Vt{constructor(...[e]){const t=fo(e||{});var i;const n=Ae((i=t,{...i,useDualstackEndpoint:i.useDualstackEndpoint??!1,useFipsEndpoint:i.useFipsEndpoint??!1,defaultSigningName:"lambda"})),s=ks(n),a=Gn(s),o=ls(a),r=(c=o,{...c,eventStreamMarshaller:c.eventStreamSerdeProvider(c)});var c;const l=((e,t)=>{const i={...go(e),...$i(e),...g(e),...xo(e)};return t.forEach((e=>e.configure(i))),{...e,...yo(i),...Mi(i),...y(i),...(n=i,{httpAuthSchemes:n.httpAuthSchemes(),httpAuthSchemeProvider:n.httpAuthSchemeProvider(),credentials:n.credentials()})};var n})({...Lt(r)},e?.extensions||[]);super(l),this.config=l,this.middlewareStack.use(Fn(this.config)),this.middlewareStack.use(Ms(this.config)),this.middlewareStack.use(Qn(this.config)),this.middlewareStack.use(O(this.config)),this.middlewareStack.use(_(this.config)),this.middlewareStack.use(M(this.config)),this.middlewareStack.use(L(this.config,{httpAuthSchemeParametersProvider:Ds,identityProviderConfigProvider:async e=>new we({"aws.auth#sigv4":e.credentials})})),this.middlewareStack.use(G(this.config))}destroy(){super.destroy()}}class wo extends Ci{constructor(e){super(e),Object.setPrototypeOf(this,wo.prototype)}}class bo extends wo{constructor(e){super({name:"InvalidParameterValueException",$fault:"client",...e}),this.name="InvalidParameterValueException",this.$fault="client",Object.setPrototypeOf(this,bo.prototype),this.Type=e.Type}}class Eo extends wo{constructor(e){super({name:"PolicyLengthExceededException",$fault:"client",...e}),this.name="PolicyLengthExceededException",this.$fault="client",Object.setPrototypeOf(this,Eo.prototype),this.Type=e.Type}}class So extends wo{constructor(e){super({name:"PreconditionFailedException",$fault:"client",...e}),this.name="PreconditionFailedException",this.$fault="client",Object.setPrototypeOf(this,So.prototype),this.Type=e.Type}}class Co extends wo{constructor(e){super({name:"ResourceConflictException",$fault:"client",...e}),this.name="ResourceConflictException",this.$fault="client",Object.setPrototypeOf(this,Co.prototype),this.Type=e.Type}}let Ao=class e extends wo{constructor(t){super({name:"ResourceNotFoundException",$fault:"client",...t}),this.name="ResourceNotFoundException",this.$fault="client",Object.setPrototypeOf(this,e.prototype),this.Type=t.Type,this.Message=t.Message}};class Io extends wo{constructor(e){super({name:"ServiceException",$fault:"server",...e}),this.name="ServiceException",this.$fault="server",Object.setPrototypeOf(this,Io.prototype),this.Type=e.Type,this.Message=e.Message}}class To extends wo{constructor(e){super({name:"TooManyRequestsException",$fault:"client",...e}),this.name="TooManyRequestsException",this.$fault="client",Object.setPrototypeOf(this,To.prototype),this.retryAfterSeconds=e.retryAfterSeconds,this.Type=e.Type,this.Reason=e.Reason}}class ko extends wo{constructor(e){super({name:"CodeSigningConfigNotFoundException",$fault:"client",...e}),this.name="CodeSigningConfigNotFoundException",this.$fault="client",Object.setPrototypeOf(this,ko.prototype),this.Type=e.Type,this.Message=e.Message}}class Oo extends wo{constructor(e){super({name:"CodeStorageExceededException",$fault:"client",...e}),this.name="CodeStorageExceededException",this.$fault="client",Object.setPrototypeOf(this,Oo.prototype),this.Type=e.Type}}class Po extends wo{constructor(e){super({name:"CodeVerificationFailedException",$fault:"client",...e}),this.name="CodeVerificationFailedException",this.$fault="client",Object.setPrototypeOf(this,Po.prototype),this.Type=e.Type,this.Message=e.Message}}class _o extends wo{constructor(e){super({name:"InvalidCodeSignatureException",$fault:"client",...e}),this.name="InvalidCodeSignatureException",this.$fault="client",Object.setPrototypeOf(this,_o.prototype),this.Type=e.Type,this.Message=e.Message}}let Ro=class e extends wo{constructor(t){super({name:"ResourceInUseException",$fault:"client",...t}),this.name="ResourceInUseException",this.$fault="client",Object.setPrototypeOf(this,e.prototype),this.Type=t.Type,this.Message=t.Message}};class $o extends wo{constructor(e){super({name:"ProvisionedConcurrencyConfigNotFoundException",$fault:"client",...e}),this.name="ProvisionedConcurrencyConfigNotFoundException",this.$fault="client",Object.setPrototypeOf(this,$o.prototype),this.Type=e.Type}}class Mo extends wo{constructor(e){super({name:"EC2AccessDeniedException",$fault:"server",...e}),this.name="EC2AccessDeniedException",this.$fault="server",Object.setPrototypeOf(this,Mo.prototype),this.Type=e.Type,this.Message=e.Message}}class No extends wo{constructor(e){super({name:"EC2ThrottledException",$fault:"server",...e}),this.name="EC2ThrottledException",this.$fault="server",Object.setPrototypeOf(this,No.prototype),this.Type=e.Type,this.Message=e.Message}}class Do extends wo{constructor(e){super({name:"EC2UnexpectedException",$fault:"server",...e}),this.name="EC2UnexpectedException",this.$fault="server",Object.setPrototypeOf(this,Do.prototype),this.Type=e.Type,this.Message=e.Message,this.EC2ErrorCode=e.EC2ErrorCode}}class jo extends wo{constructor(e){super({name:"EFSIOException",$fault:"client",...e}),this.name="EFSIOException",this.$fault="client",Object.setPrototypeOf(this,jo.prototype),this.Type=e.Type,this.Message=e.Message}}class zo extends wo{constructor(e){super({name:"EFSMountConnectivityException",$fault:"client",...e}),this.name="EFSMountConnectivityException",this.$fault="client",Object.setPrototypeOf(this,zo.prototype),this.Type=e.Type,this.Message=e.Message}}class Lo extends wo{constructor(e){super({name:"EFSMountFailureException",$fault:"client",...e}),this.name="EFSMountFailureException",this.$fault="client",Object.setPrototypeOf(this,Lo.prototype),this.Type=e.Type,this.Message=e.Message}}class Fo extends wo{constructor(e){super({name:"EFSMountTimeoutException",$fault:"client",...e}),this.name="EFSMountTimeoutException",this.$fault="client",Object.setPrototypeOf(this,Fo.prototype),this.Type=e.Type,this.Message=e.Message}}class Uo extends wo{constructor(e){super({name:"ENILimitReachedException",$fault:"server",...e}),this.name="ENILimitReachedException",this.$fault="server",Object.setPrototypeOf(this,Uo.prototype),this.Type=e.Type,this.Message=e.Message}}class Bo extends wo{constructor(e){super({name:"InvalidRequestContentException",$fault:"client",...e}),this.name="InvalidRequestContentException",this.$fault="client",Object.setPrototypeOf(this,Bo.prototype),this.Type=e.Type}}class Ho extends wo{constructor(e){super({name:"InvalidRuntimeException",$fault:"server",...e}),this.name="InvalidRuntimeException",this.$fault="server",Object.setPrototypeOf(this,Ho.prototype),this.Type=e.Type,this.Message=e.Message}}class qo extends wo{constructor(e){super({name:"InvalidSecurityGroupIDException",$fault:"server",...e}),this.name="InvalidSecurityGroupIDException",this.$fault="server",Object.setPrototypeOf(this,qo.prototype),this.Type=e.Type,this.Message=e.Message}}class Vo extends wo{constructor(e){super({name:"InvalidSubnetIDException",$fault:"server",...e}),this.name="InvalidSubnetIDException",this.$fault="server",Object.setPrototypeOf(this,Vo.prototype),this.Type=e.Type,this.Message=e.Message}}class Go extends wo{constructor(e){super({name:"InvalidZipFileException",$fault:"server",...e}),this.name="InvalidZipFileException",this.$fault="server",Object.setPrototypeOf(this,Go.prototype),this.Type=e.Type,this.Message=e.Message}}class Wo extends wo{constructor(e){super({name:"KMSAccessDeniedException",$fault:"server",...e}),this.name="KMSAccessDeniedException",this.$fault="server",Object.setPrototypeOf(this,Wo.prototype),this.Type=e.Type,this.Message=e.Message}}class Ko extends wo{constructor(e){super({name:"KMSDisabledException",$fault:"server",...e}),this.name="KMSDisabledException",this.$fault="server",Object.setPrototypeOf(this,Ko.prototype),this.Type=e.Type,this.Message=e.Message}}class Qo extends wo{constructor(e){super({name:"KMSInvalidStateException",$fault:"server",...e}),this.name="KMSInvalidStateException",this.$fault="server",Object.setPrototypeOf(this,Qo.prototype),this.Type=e.Type,this.Message=e.Message}}class Xo extends wo{constructor(e){super({name:"KMSNotFoundException",$fault:"server",...e}),this.name="KMSNotFoundException",this.$fault="server",Object.setPrototypeOf(this,Xo.prototype),this.Type=e.Type,this.Message=e.Message}}class Jo extends wo{constructor(e){super({name:"RecursiveInvocationException",$fault:"client",...e}),this.name="RecursiveInvocationException",this.$fault="client",Object.setPrototypeOf(this,Jo.prototype),this.Type=e.Type,this.Message=e.Message}}class Yo extends wo{constructor(e){super({name:"RequestTooLargeException",$fault:"client",...e}),this.name="RequestTooLargeException",this.$fault="client",Object.setPrototypeOf(this,Yo.prototype),this.Type=e.Type}}class Zo extends wo{constructor(e){super({name:"ResourceNotReadyException",$fault:"server",...e}),this.name="ResourceNotReadyException",this.$fault="server",Object.setPrototypeOf(this,Zo.prototype),this.Type=e.Type}}class er extends wo{constructor(e){super({name:"SnapStartException",$fault:"client",...e}),this.name="SnapStartException",this.$fault="client",Object.setPrototypeOf(this,er.prototype),this.Type=e.Type,this.Message=e.Message}}class tr extends wo{constructor(e){super({name:"SnapStartNotReadyException",$fault:"client",...e}),this.name="SnapStartNotReadyException",this.$fault="client",Object.setPrototypeOf(this,tr.prototype),this.Type=e.Type,this.Message=e.Message}}class ir extends wo{constructor(e){super({name:"SnapStartTimeoutException",$fault:"client",...e}),this.name="SnapStartTimeoutException",this.$fault="client",Object.setPrototypeOf(this,ir.prototype),this.Type=e.Type,this.Message=e.Message}}class nr extends wo{constructor(e){super({name:"SubnetIPAddressLimitReachedException",$fault:"server",...e}),this.name="SubnetIPAddressLimitReachedException",this.$fault="server",Object.setPrototypeOf(this,nr.prototype),this.Type=e.Type,this.Message=e.Message}}class sr extends wo{constructor(e){super({name:"UnsupportedMediaTypeException",$fault:"client",...e}),this.name="UnsupportedMediaTypeException",this.$fault="client",Object.setPrototypeOf(this,sr.prototype),this.Type=e.Type}}var ar;!function(e){e.visit=(e,t)=>void 0!==e.PayloadChunk?t.PayloadChunk(e.PayloadChunk):void 0!==e.InvokeComplete?t.InvokeComplete(e.InvokeComplete):t._(e.$unknown[0],e.$unknown[1])}(ar||(ar={}));const or=e=>({...e,...e.Payload&&{Payload:Kt}}),rr=e=>({...e,...e.Payload&&{Payload:Kt}}),cr=async(e,t)=>{const i=function(e,t){return new xe(e,t)}(e,t),n=Fi({},ji,{"content-type":"application/octet-stream",[lc]:e[ec],[dc]:e[ic],[oc]:e[Jr]});i.bp("/2015-03-31/functions/{FunctionName}/invocations"),i.p("FunctionName",(()=>e.FunctionName),"{FunctionName}",!1);const s=Fi({[nc]:[,e[nc]]});let a;return void 0!==e.Payload&&(a=e.Payload),i.m("POST").h(n).q(s).b(a),i.build()},lr=async(e,t)=>{if(200!==e.statusCode&&e.statusCode>=300)return pr(e,t);const i=Fi({$metadata:Xr(e),[Zr]:[,e.headers[cc]],[tc]:[,e.headers[pc]],[Yr]:[,e.headers[rc]]}),n=await ge(e.body,t);return i.Payload=n,Fi(i,{StatusCode:[,e.statusCode]}),i},pr=async(e,t)=>{const i={...e,body:await Qi(e.body,t)},n=((e,t)=>{const i=e=>{let t=e;return"number"==typeof t&&(t=t.toString()),t.indexOf(",")>=0&&(t=t.split(",")[0]),t.indexOf(":")>=0&&(t=t.split(":")[0]),t.indexOf("#")>=0&&(t=t.split("#")[1]),t},n=(s=e.headers,a="x-amzn-errortype",Object.keys(s).find((e=>e.toLowerCase()===a.toLowerCase())));var s,a;return void 0!==n?i(e.headers[n]):void 0!==t.code?i(t.code):void 0!==t.__type?i(t.__type):void 0})(e,i.body);switch(n){case"InvalidParameterValueException":case"com.amazonaws.lambda#InvalidParameterValueException":throw await Cr(i);case"PolicyLengthExceededException":case"com.amazonaws.lambda#PolicyLengthExceededException":throw await Mr(i);case"PreconditionFailedException":case"com.amazonaws.lambda#PreconditionFailedException":throw await Nr(i);case"ResourceConflictException":case"com.amazonaws.lambda#ResourceConflictException":throw await Lr(i);case"ResourceNotFoundException":case"com.amazonaws.lambda#ResourceNotFoundException":throw await Ur(i);case"ServiceException":case"com.amazonaws.lambda#ServiceException":throw await Hr(i);case"TooManyRequestsException":case"com.amazonaws.lambda#TooManyRequestsException":throw await Kr(i);case"CodeSigningConfigNotFoundException":case"com.amazonaws.lambda#CodeSigningConfigNotFoundException":throw await ur(i);case"CodeStorageExceededException":case"com.amazonaws.lambda#CodeStorageExceededException":throw await mr(i);case"CodeVerificationFailedException":case"com.amazonaws.lambda#CodeVerificationFailedException":throw await hr(i);case"InvalidCodeSignatureException":case"com.amazonaws.lambda#InvalidCodeSignatureException":throw await Sr(i);case"ResourceInUseException":case"com.amazonaws.lambda#ResourceInUseException":throw await Fr(i);case"ProvisionedConcurrencyConfigNotFoundException":case"com.amazonaws.lambda#ProvisionedConcurrencyConfigNotFoundException":throw await Dr(i);case"EC2AccessDeniedException":case"com.amazonaws.lambda#EC2AccessDeniedException":throw await fr(i);case"EC2ThrottledException":case"com.amazonaws.lambda#EC2ThrottledException":throw await gr(i);case"EC2UnexpectedException":case"com.amazonaws.lambda#EC2UnexpectedException":throw await yr(i);case"EFSIOException":case"com.amazonaws.lambda#EFSIOException":throw await xr(i);case"EFSMountConnectivityException":case"com.amazonaws.lambda#EFSMountConnectivityException":throw await vr(i);case"EFSMountFailureException":case"com.amazonaws.lambda#EFSMountFailureException":throw await wr(i);case"EFSMountTimeoutException":case"com.amazonaws.lambda#EFSMountTimeoutException":throw await br(i);case"ENILimitReachedException":case"com.amazonaws.lambda#ENILimitReachedException":throw await Er(i);case"InvalidRequestContentException":case"com.amazonaws.lambda#InvalidRequestContentException":throw await Ar(i);case"InvalidRuntimeException":case"com.amazonaws.lambda#InvalidRuntimeException":throw await Ir(i);case"InvalidSecurityGroupIDException":case"com.amazonaws.lambda#InvalidSecurityGroupIDException":throw await Tr(i);case"InvalidSubnetIDException":case"com.amazonaws.lambda#InvalidSubnetIDException":throw await kr(i);case"InvalidZipFileException":case"com.amazonaws.lambda#InvalidZipFileException":throw await Or(i);case"KMSAccessDeniedException":case"com.amazonaws.lambda#KMSAccessDeniedException":throw await Pr(i);case"KMSDisabledException":case"com.amazonaws.lambda#KMSDisabledException":throw await _r(i);case"KMSInvalidStateException":case"com.amazonaws.lambda#KMSInvalidStateException":throw await Rr(i);case"KMSNotFoundException":case"com.amazonaws.lambda#KMSNotFoundException":throw await $r(i);case"RecursiveInvocationException":case"com.amazonaws.lambda#RecursiveInvocationException":throw await jr(i);case"RequestTooLargeException":case"com.amazonaws.lambda#RequestTooLargeException":throw await zr(i);case"ResourceNotReadyException":case"com.amazonaws.lambda#ResourceNotReadyException":throw await Br(i);case"SnapStartException":case"com.amazonaws.lambda#SnapStartException":throw await qr(i);case"SnapStartNotReadyException":case"com.amazonaws.lambda#SnapStartNotReadyException":throw await Vr(i);case"SnapStartTimeoutException":case"com.amazonaws.lambda#SnapStartTimeoutException":throw await Gr(i);case"SubnetIPAddressLimitReachedException":case"com.amazonaws.lambda#SubnetIPAddressLimitReachedException":throw await Wr(i);case"UnsupportedMediaTypeException":case"com.amazonaws.lambda#UnsupportedMediaTypeException":throw await Qr(i);default:const t=i.body;return dr({output:e,parsedBody:t,errorCode:n})}},dr=Ii(wo),ur=async(e,t)=>{const i=Fi({}),n=e.body,s=Ui(n,{Message:ai,Type:ai});Object.assign(i,s);const a=new ko({$metadata:Xr(e),...i});return Ai(a,e.body)},mr=async(e,t)=>{const i=Fi({}),n=e.body,s=Ui(n,{Type:ai,message:ai});Object.assign(i,s);const a=new Oo({$metadata:Xr(e),...i});return Ai(a,e.body)},hr=async(e,t)=>{const i=Fi({}),n=e.body,s=Ui(n,{Message:ai,Type:ai});Object.assign(i,s);const a=new Po({$metadata:Xr(e),...i});return Ai(a,e.body)},fr=async(e,t)=>{const i=Fi({}),n=e.body,s=Ui(n,{Message:ai,Type:ai});Object.assign(i,s);const a=new Mo({$metadata:Xr(e),...i});return Ai(a,e.body)},gr=async(e,t)=>{const i=Fi({}),n=e.body,s=Ui(n,{Message:ai,Type:ai});Object.assign(i,s);const a=new No({$metadata:Xr(e),...i});return Ai(a,e.body)},yr=async(e,t)=>{const i=Fi({}),n=e.body,s=Ui(n,{EC2ErrorCode:ai,Message:ai,Type:ai});Object.assign(i,s);const a=new Do({$metadata:Xr(e),...i});return Ai(a,e.body)},xr=async(e,t)=>{const i=Fi({}),n=e.body,s=Ui(n,{Message:ai,Type:ai});Object.assign(i,s);const a=new jo({$metadata:Xr(e),...i});return Ai(a,e.body)},vr=async(e,t)=>{const i=Fi({}),n=e.body,s=Ui(n,{Message:ai,Type:ai});Object.assign(i,s);const a=new zo({$metadata:Xr(e),...i});return Ai(a,e.body)},wr=async(e,t)=>{const i=Fi({}),n=e.body,s=Ui(n,{Message:ai,Type:ai});Object.assign(i,s);const a=new Lo({$metadata:Xr(e),...i});return Ai(a,e.body)},br=async(e,t)=>{const i=Fi({}),n=e.body,s=Ui(n,{Message:ai,Type:ai});Object.assign(i,s);const a=new Fo({$metadata:Xr(e),...i});return Ai(a,e.body)},Er=async(e,t)=>{const i=Fi({}),n=e.body,s=Ui(n,{Message:ai,Type:ai});Object.assign(i,s);const a=new Uo({$metadata:Xr(e),...i});return Ai(a,e.body)},Sr=async(e,t)=>{const i=Fi({}),n=e.body,s=Ui(n,{Message:ai,Type:ai});Object.assign(i,s);const a=new _o({$metadata:Xr(e),...i});return Ai(a,e.body)},Cr=async(e,t)=>{const i=Fi({}),n=e.body,s=Ui(n,{Type:ai,message:ai});Object.assign(i,s);const a=new bo({$metadata:Xr(e),...i});return Ai(a,e.body)},Ar=async(e,t)=>{const i=Fi({}),n=e.body,s=Ui(n,{Type:ai,message:ai});Object.assign(i,s);const a=new Bo({$metadata:Xr(e),...i});return Ai(a,e.body)},Ir=async(e,t)=>{const i=Fi({}),n=e.body,s=Ui(n,{Message:ai,Type:ai});Object.assign(i,s);const a=new Ho({$metadata:Xr(e),...i});return Ai(a,e.body)},Tr=async(e,t)=>{const i=Fi({}),n=e.body,s=Ui(n,{Message:ai,Type:ai});Object.assign(i,s);const a=new qo({$metadata:Xr(e),...i});return Ai(a,e.body)},kr=async(e,t)=>{const i=Fi({}),n=e.body,s=Ui(n,{Message:ai,Type:ai});Object.assign(i,s);const a=new Vo({$metadata:Xr(e),...i});return Ai(a,e.body)},Or=async(e,t)=>{const i=Fi({}),n=e.body,s=Ui(n,{Message:ai,Type:ai});Object.assign(i,s);const a=new Go({$metadata:Xr(e),...i});return Ai(a,e.body)},Pr=async(e,t)=>{const i=Fi({}),n=e.body,s=Ui(n,{Message:ai,Type:ai});Object.assign(i,s);const a=new Wo({$metadata:Xr(e),...i});return Ai(a,e.body)},_r=async(e,t)=>{const i=Fi({}),n=e.body,s=Ui(n,{Message:ai,Type:ai});Object.assign(i,s);const a=new Ko({$metadata:Xr(e),...i});return Ai(a,e.body)},Rr=async(e,t)=>{const i=Fi({}),n=e.body,s=Ui(n,{Message:ai,Type:ai});Object.assign(i,s);const a=new Qo({$metadata:Xr(e),...i});return Ai(a,e.body)},$r=async(e,t)=>{const i=Fi({}),n=e.body,s=Ui(n,{Message:ai,Type:ai});Object.assign(i,s);const a=new Xo({$metadata:Xr(e),...i});return Ai(a,e.body)},Mr=async(e,t)=>{const i=Fi({}),n=e.body,s=Ui(n,{Type:ai,message:ai});Object.assign(i,s);const a=new Eo({$metadata:Xr(e),...i});return Ai(a,e.body)},Nr=async(e,t)=>{const i=Fi({}),n=e.body,s=Ui(n,{Type:ai,message:ai});Object.assign(i,s);const a=new So({$metadata:Xr(e),...i});return Ai(a,e.body)},Dr=async(e,t)=>{const i=Fi({}),n=e.body,s=Ui(n,{Type:ai,message:ai});Object.assign(i,s);const a=new $o({$metadata:Xr(e),...i});return Ai(a,e.body)},jr=async(e,t)=>{const i=Fi({}),n=e.body,s=Ui(n,{Message:ai,Type:ai});Object.assign(i,s);const a=new Jo({$metadata:Xr(e),...i});return Ai(a,e.body)},zr=async(e,t)=>{const i=Fi({}),n=e.body,s=Ui(n,{Type:ai,message:ai});Object.assign(i,s);const a=new Yo({$metadata:Xr(e),...i});return Ai(a,e.body)},Lr=async(e,t)=>{const i=Fi({}),n=e.body,s=Ui(n,{Type:ai,message:ai});Object.assign(i,s);const a=new Co({$metadata:Xr(e),...i});return Ai(a,e.body)},Fr=async(e,t)=>{const i=Fi({}),n=e.body,s=Ui(n,{Message:ai,Type:ai});Object.assign(i,s);const a=new Ro({$metadata:Xr(e),...i});return Ai(a,e.body)},Ur=async(e,t)=>{const i=Fi({}),n=e.body,s=Ui(n,{Message:ai,Type:ai});Object.assign(i,s);const a=new Ao({$metadata:Xr(e),...i});return Ai(a,e.body)},Br=async(e,t)=>{const i=Fi({}),n=e.body,s=Ui(n,{Type:ai,message:ai});Object.assign(i,s);const a=new Zo({$metadata:Xr(e),...i});return Ai(a,e.body)},Hr=async(e,t)=>{const i=Fi({}),n=e.body,s=Ui(n,{Message:ai,Type:ai});Object.assign(i,s);const a=new Io({$metadata:Xr(e),...i});return Ai(a,e.body)},qr=async(e,t)=>{const i=Fi({}),n=e.body,s=Ui(n,{Message:ai,Type:ai});Object.assign(i,s);const a=new er({$metadata:Xr(e),...i});return Ai(a,e.body)},Vr=async(e,t)=>{const i=Fi({}),n=e.body,s=Ui(n,{Message:ai,Type:ai});Object.assign(i,s);const a=new tr({$metadata:Xr(e),...i});return Ai(a,e.body)},Gr=async(e,t)=>{const i=Fi({}),n=e.body,s=Ui(n,{Message:ai,Type:ai});Object.assign(i,s);const a=new ir({$metadata:Xr(e),...i});return Ai(a,e.body)},Wr=async(e,t)=>{const i=Fi({}),n=e.body,s=Ui(n,{Message:ai,Type:ai});Object.assign(i,s);const a=new nr({$metadata:Xr(e),...i});return Ai(a,e.body)},Kr=async(e,t)=>{const i=Fi({[sc]:[,e.headers[ac]]}),n=e.body,s=Ui(n,{Reason:ai,Type:ai,message:ai});Object.assign(i,s);const a=new To({$metadata:Xr(e),...i});return Ai(a,e.body)},Qr=async(e,t)=>{const i=Fi({}),n=e.body,s=Ui(n,{Type:ai,message:ai});Object.assign(i,s);const a=new sr({$metadata:Xr(e),...i});return Ai(a,e.body)},Xr=e=>({httpStatusCode:e.statusCode,requestId:e.headers["x-amzn-requestid"]??e.headers["x-amzn-request-id"]??e.headers["x-amz-request-id"],extendedRequestId:e.headers["x-amz-id-2"],cfId:e.headers["x-amz-cf-id"]}),Jr="ClientContext",Yr="ExecutedVersion",Zr="FunctionError",ec="InvocationType",tc="LogResult",ic="LogType",nc="Qualifier",sc="retryAfterSeconds",ac="retry-after",oc="x-amz-client-context",rc="x-amz-executed-version",cc="x-amz-function-error",lc="x-amz-invocation-type",pc="x-amz-log-result",dc="x-amz-log-type";class uc extends(Gt.classBuilder().ep(zs).m((function(e,t,i,n){return[B(i,this.serialize,this.deserialize),cs(i,e.getEndpointParameterInstructions())]})).s("AWSGirApiService","Invoke",{}).n("LambdaClient","InvokeCommand").f(or,rr).ser(cr).de(lr).build()){}const mc=e=>new Promise((t=>setTimeout(t,1e3*e))),hc={minDelay:2,maxDelay:120};var fc;!function(e){e.ABORTED="ABORTED",e.FAILURE="FAILURE",e.SUCCESS="SUCCESS",e.RETRY="RETRY",e.TIMEOUT="TIMEOUT"}(fc||(fc={}));const gc=(e,t,i,n)=>{if(n>i)return t;return yc(e,e*2**(n-1))},yc=(e,t)=>e+Math.random()*(t-e),xc=async({minDelay:e,maxDelay:t,maxWaitTime:i,abortController:n,client:s,abortSignal:a},o,r)=>{const{state:c,reason:l}=await r(s,o);if(c!==fc.RETRY)return{state:c,reason:l};let p=1;const d=Date.now()+1e3*i,u=Math.log(t/e)/Math.log(2)+1;for(;;){if(n?.signal?.aborted||a?.aborted)return{state:fc.ABORTED};const i=gc(e,t,u,p);if(Date.now()+1e3*i>d)return{state:fc.TIMEOUT};await mc(i);const{state:c,reason:l}=await r(s,o);if(c!==fc.RETRY)return{state:c,reason:l};p+=1}},vc=async e=>new Promise((t=>{const i=()=>t({state:fc.ABORTED});"function"==typeof e.addEventListener?e.addEventListener("abort",i):e.onabort=i})),wc=async(e,t,i)=>{const n={...hc,...e};(e=>{if(e.maxWaitTime<1)throw new Error("WaiterConfiguration.maxWaitTime must be greater than 0");if(e.minDelay<1)throw new Error("WaiterConfiguration.minDelay must be greater than 0");if(e.maxDelay<1)throw new Error("WaiterConfiguration.maxDelay must be greater than 0");if(e.maxWaitTime<=e.minDelay)throw new Error(`WaiterConfiguration.maxWaitTime [${e.maxWaitTime}] must be greater than WaiterConfiguration.minDelay [${e.minDelay}] for this waiter`);if(e.maxDelay<e.minDelay)throw new Error(`WaiterConfiguration.maxDelay [${e.maxDelay}] must be greater than WaiterConfiguration.minDelay [${e.minDelay}] for this waiter`)})(n);const s=[xc(n,t,i)];return e.abortController&&s.push(vc(e.abortController.signal)),e.abortSignal&&s.push(vc(e.abortSignal)),Promise.race(s)},bc={region:"eu-central-2"};const Ec={name:"hostHeaderMiddleware",step:"build",priority:"low",tags:["HOST"],override:!0},Sc=e=>({applyToStack:t=>{t.add((e=>t=>async i=>{if(!I.isInstance(i.request))return t(i);const{request:n}=i,{handlerProtocol:s=""}=e.requestHandler.metadata||{};if(s.indexOf("h2")>=0&&!n.headers[":authority"])delete n.headers.host,n.headers[":authority"]=n.hostname+(n.port?":"+n.port:"");else if(!n.headers.host){let e=n.hostname;null!=n.port&&(e+=`:${n.port}`),n.headers.host=e}return t(i)})(e),Ec)}}),Cc={name:"loggerMiddleware",tags:["LOGGER"],step:"initialize",override:!0},Ac="X-Amzn-Trace-Id",Ic={step:"build",tags:["RECURSION_DETECTION"],name:"recursionDetectionMiddleware",override:!0,priority:"low"},Tc=e=>({applyToStack:t=>{t.add((e=>t=>async i=>{const{request:n}=i;if(!I.isInstance(n)||"node"!==e.runtime||n.headers.hasOwnProperty(Ac))return t(i);const s=[]._X_AMZN_TRACE_ID,a=e=>"string"==typeof e&&e.length>0;return a([].AWS_LAMBDA_FUNCTION_NAME)&&a(s)&&(n.headers[Ac]=s),t({...i,request:n})})(e),Ic)}});const kc=(e,t=!1)=>{if(t){for(const t of e.split("."))if(!kc(t))return!1;return!0}return!!Pe(e)&&(!(e.length<3||e.length>63)&&(e===e.toLowerCase()&&!ke(e)))};let Oc={partitions:[{id:"aws",outputs:{dnsSuffix:"amazonaws.com",dualStackDnsSuffix:"api.aws",implicitGlobalRegion:"us-east-1",name:"aws",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^(us|eu|ap|sa|ca|me|af|il|mx)\\-\\w+\\-\\d+$",regions:{"af-south-1":{description:"Africa (Cape Town)"},"ap-east-1":{description:"Asia Pacific (Hong Kong)"},"ap-northeast-1":{description:"Asia Pacific (Tokyo)"},"ap-northeast-2":{description:"Asia Pacific (Seoul)"},"ap-northeast-3":{description:"Asia Pacific (Osaka)"},"ap-south-1":{description:"Asia Pacific (Mumbai)"},"ap-south-2":{description:"Asia Pacific (Hyderabad)"},"ap-southeast-1":{description:"Asia Pacific (Singapore)"},"ap-southeast-2":{description:"Asia Pacific (Sydney)"},"ap-southeast-3":{description:"Asia Pacific (Jakarta)"},"ap-southeast-4":{description:"Asia Pacific (Melbourne)"},"ap-southeast-5":{description:"Asia Pacific (Malaysia)"},"aws-global":{description:"AWS Standard global region"},"ca-central-1":{description:"Canada (Central)"},"ca-west-1":{description:"Canada West (Calgary)"},"eu-central-1":{description:"Europe (Frankfurt)"},"eu-central-2":{description:"Europe (Zurich)"},"eu-north-1":{description:"Europe (Stockholm)"},"eu-south-1":{description:"Europe (Milan)"},"eu-south-2":{description:"Europe (Spain)"},"eu-west-1":{description:"Europe (Ireland)"},"eu-west-2":{description:"Europe (London)"},"eu-west-3":{description:"Europe (Paris)"},"il-central-1":{description:"Israel (Tel Aviv)"},"me-central-1":{description:"Middle East (UAE)"},"me-south-1":{description:"Middle East (Bahrain)"},"sa-east-1":{description:"South America (Sao Paulo)"},"us-east-1":{description:"US East (N. Virginia)"},"us-east-2":{description:"US East (Ohio)"},"us-west-1":{description:"US West (N. California)"},"us-west-2":{description:"US West (Oregon)"}}},{id:"aws-cn",outputs:{dnsSuffix:"amazonaws.com.cn",dualStackDnsSuffix:"api.amazonwebservices.com.cn",implicitGlobalRegion:"cn-northwest-1",name:"aws-cn",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^cn\\-\\w+\\-\\d+$",regions:{"aws-cn-global":{description:"AWS China global region"},"cn-north-1":{description:"China (Beijing)"},"cn-northwest-1":{description:"China (Ningxia)"}}},{id:"aws-us-gov",outputs:{dnsSuffix:"amazonaws.com",dualStackDnsSuffix:"api.aws",implicitGlobalRegion:"us-gov-west-1",name:"aws-us-gov",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^us\\-gov\\-\\w+\\-\\d+$",regions:{"aws-us-gov-global":{description:"AWS GovCloud (US) global region"},"us-gov-east-1":{description:"AWS GovCloud (US-East)"},"us-gov-west-1":{description:"AWS GovCloud (US-West)"}}},{id:"aws-iso",outputs:{dnsSuffix:"c2s.ic.gov",dualStackDnsSuffix:"c2s.ic.gov",implicitGlobalRegion:"us-iso-east-1",name:"aws-iso",supportsDualStack:!1,supportsFIPS:!0},regionRegex:"^us\\-iso\\-\\w+\\-\\d+$",regions:{"aws-iso-global":{description:"AWS ISO (US) global region"},"us-iso-east-1":{description:"US ISO East"},"us-iso-west-1":{description:"US ISO WEST"}}},{id:"aws-iso-b",outputs:{dnsSuffix:"sc2s.sgov.gov",dualStackDnsSuffix:"sc2s.sgov.gov",implicitGlobalRegion:"us-isob-east-1",name:"aws-iso-b",supportsDualStack:!1,supportsFIPS:!0},regionRegex:"^us\\-isob\\-\\w+\\-\\d+$",regions:{"aws-iso-b-global":{description:"AWS ISOB (US) global region"},"us-isob-east-1":{description:"US ISOB East (Ohio)"}}},{id:"aws-iso-e",outputs:{dnsSuffix:"cloud.adc-e.uk",dualStackDnsSuffix:"cloud.adc-e.uk",implicitGlobalRegion:"eu-isoe-west-1",name:"aws-iso-e",supportsDualStack:!1,supportsFIPS:!0},regionRegex:"^eu\\-isoe\\-\\w+\\-\\d+$",regions:{"eu-isoe-west-1":{description:"EU ISOE West"}}},{id:"aws-iso-f",outputs:{dnsSuffix:"csp.hci.ic.gov",dualStackDnsSuffix:"csp.hci.ic.gov",implicitGlobalRegion:"us-isof-south-1",name:"aws-iso-f",supportsDualStack:!1,supportsFIPS:!0},regionRegex:"^us\\-isof\\-\\w+\\-\\d+$",regions:{}}],version:"1.1"};const Pc={isVirtualHostableS3Bucket:kc,parseArn:e=>{const t=e.split(":");if(t.length<6)return null;const[i,n,s,a,o,...r]=t;if("arn"!==i||""===n||""===s||""===r.join(":"))return null;return{partition:n,service:s,region:a,accountId:o,resourceId:r.map((e=>e.split("/"))).flat()}},partition:e=>{const{partitions:t}=Oc;for(const i of t){const{regions:t,outputs:n}=i;for(const[i,s]of Object.entries(t))if(i===e)return{...n,...s}}for(const i of t){const{regionRegex:t,outputs:n}=i;if(new RegExp(t).test(e))return{...n}}const i=t.find((e=>"aws"===e.id));if(!i)throw new Error("Provided region was not found in the partition array or regex, and default partition with id 'aws' doesn't exist.");return{...i.outputs}}};function _c(e,t,i){e.__aws_sdk_context?e.__aws_sdk_context.features||(e.__aws_sdk_context.features={}):e.__aws_sdk_context={features:{}},e.__aws_sdk_context.features[t]=i}_e.aws=Pc;const Rc=e=>T.isInstance(e)?e.headers?.date??e.headers?.Date:void 0,$c=e=>new Date(Date.now()+e),Mc=(e,t)=>{const i=Date.parse(e);return((e,t)=>Math.abs($c(t).getTime()-e)>=3e5)(i,t)?i-Date.now():t},Nc=(e,t)=>{if(!t)throw new Error(`Property \`${e}\` is not resolved for AWS SDK SigV4Auth`);return t};class Dc{async sign(e,t,i){if(!I.isInstance(e))throw new Error("The request is not an instance of `HttpRequest` and cannot be signed");const n=await(async e=>{const t=Nc("context",e.context),i=Nc("config",e.config),n=t.endpointV2?.properties?.authSchemes?.[0],s=Nc("signer",i.signer),a=await s(n),o=e?.signingRegion,r=e?.signingRegionSet,c=e?.signingName;return{config:i,signer:a,signingRegion:o,signingRegionSet:r,signingName:c}})(i),{config:s,signer:a}=n;let{signingRegion:o,signingName:r}=n;const c=i.context;if(c?.authSchemes?.length){const[e,t]=c.authSchemes;"sigv4a"===e?.name&&"sigv4"===t?.name&&(o=t?.signingRegion??o,r=t?.signingName??r)}return await a.sign(e,{signingDate:$c(s.systemClockOffset),signingRegion:o,signingService:r})}errorHandler(e){return t=>{const i=t.ServerTime??Rc(t.$response);if(i){const n=Nc("config",e.config),s=n.systemClockOffset;n.systemClockOffset=Mc(i,n.systemClockOffset);n.systemClockOffset!==s&&t.$metadata&&(t.$metadata.clockSkewCorrected=!0)}throw t}}successHandler(e,t){const i=Rc(e);if(i){const e=Nc("config",t.config);e.systemClockOffset=Mc(i,e.systemClockOffset)}}}const jc=(e,t)=>((e,t)=>ge(e,t).then((e=>t.utf8Encoder(e))))(e,t).then((e=>{if(e.length)try{return JSON.parse(e)}catch(t){throw"SyntaxError"===t?.name&&Object.defineProperty(t,"$responseBodyText",{value:e}),t}return{}})),zc=async(e,t)=>{const i=await jc(e,t);return i.message=i.message??i.Message,i},Lc=/\d{12}\.ddb/;const Fc="user-agent",Uc="x-amz-user-agent",Bc=/[^\!\$\%\&\'\*\+\-\.\^\_\`\|\~\d\w]/g,Hc=/[^\!\$\%\&\'\*\+\-\.\^\_\`\|\~\d\w\#]/g;const qc=e=>(t,i)=>async n=>{const{request:s}=n;if(!I.isInstance(s))return t(n);const{headers:a}=s,o=i?.userAgent?.map(Vc)||[],r=(await e.defaultUserAgentProvider()).map(Vc);await async function(e,t,i){const n=i.request;if("rpc-v2-cbor"===n?.headers?.["smithy-protocol"]&&_c(e,"PROTOCOL_RPC_V2_CBOR","M"),"function"==typeof t.retryStrategy){const i=await t.retryStrategy();"function"==typeof i.acquireInitialRetryToken?i.constructor?.name?.includes("Adaptive")?_c(e,"RETRY_MODE_ADAPTIVE","F"):_c(e,"RETRY_MODE_STANDARD","E"):_c(e,"RETRY_MODE_LEGACY","D")}if("function"==typeof t.accountIdEndpointMode){const i=e.endpointV2;switch(String(i?.url?.hostname).match(Lc)&&_c(e,"ACCOUNT_ID_ENDPOINT","O"),await(t.accountIdEndpointMode?.())){case"disabled":_c(e,"ACCOUNT_ID_MODE_DISABLED","Q");break;case"preferred":_c(e,"ACCOUNT_ID_MODE_PREFERRED","P");break;case"required":_c(e,"ACCOUNT_ID_MODE_REQUIRED","R")}}const s=e.__smithy_context?.selectedHttpAuthScheme?.identity;if(s?.$source){const t=s;t.accountId&&_c(e,"RESOLVED_ACCOUNT_ID","T");for(const[i,n]of Object.entries(t.$source??{}))_c(e,i,n)}}(i,e,n);const c=i;r.push(`m/${function(e){let t="";for(const i in e){const n=e[i];if(!(t.length+n.length+1<=1024))break;t.length?t+=","+n:t+=n}return t}(Object.assign({},i.__smithy_context?.features,c.__aws_sdk_context?.features))}`);const l=e?.customUserAgent?.map(Vc)||[],p=await e.userAgentAppId();p&&r.push(Vc([`app/${p}`]));const d=[].concat([...r,...o,...l]).join(" "),u=[...r.filter((e=>e.startsWith("aws-sdk-"))),...l].join(" ");return"browser"!==e.runtime?(u&&(a[Uc]=a[Uc]?`${a[Fc]} ${u}`:u),a[Fc]=d):a[Uc]=d,t({...n,request:s})},Vc=e=>{const t=e[0].split("/").map((e=>e.replace(Bc,"-"))).join("/"),i=e[1]?.replace(Hc,"-"),n=t.indexOf("/"),s=t.substring(0,n);let a=t.substring(n+1);return"api"===s&&(a=a.toLowerCase()),[s,a,i].filter((e=>e&&e.length>0)).reduce(((e,t,i)=>{switch(i){case 0:return t;case 1:return`${e}/${t}`;default:return`${e}#${t}`}}),"")},Gc={name:"getUserAgentMiddleware",step:"build",priority:"low",tags:["SET_USER_AGENT","USER_AGENT"],override:!0},Wc=async(e,t,i)=>({operation:N(t).operation,region:await D(e.region)()||(()=>{throw new Error("expected `region` to be configured for `aws.auth#sigv4`")})()});const Kc=e=>{const t=[];return e.operation,t.push(function(e){return{schemeId:"aws.auth#sigv4",signingProperties:{name:"ssm",region:e.region},propertiesExtractor:(e,t)=>({signingProperties:{config:e,context:t}})}}(e)),t},Qc=e=>{const t=(e=>{let t,i=!1;e.credentials&&(i=!0,t=Ce(e.credentials,be,Se)),t||(t=e.credentialDefaultProvider?W(e.credentialDefaultProvider(Object.assign({},e,{parentClientConfig:e}))):async()=>{throw new Error("`credentials` is missing")});const{signingEscapePath:n=!0,systemClockOffset:s=e.systemClockOffset||0,sha256:a}=e;let o;return o=e.signer?W(e.signer):e.regionInfoProvider?()=>W(e.region)().then((async t=>[await e.regionInfoProvider(t,{useFipsEndpoint:await e.useFipsEndpoint(),useDualstackEndpoint:await e.useDualstackEndpoint()})||{},t])).then((([i,s])=>{const{signingRegion:o,signingService:r}=i;e.signingRegion=e.signingRegion||o||s,e.signingName=e.signingName||r||e.serviceId;const c={...e,credentials:t,region:e.signingRegion,service:e.signingName,sha256:a,uriEscapePath:n};return new(e.signerConstructor||Dt)(c)})):async i=>{const s=(i=Object.assign({},{name:"sigv4",signingName:e.signingName||e.defaultSigningName,signingRegion:await W(e.region)(),properties:{}},i)).signingRegion,o=i.signingName;e.signingRegion=e.signingRegion||s,e.signingName=e.signingName||o||e.serviceId;const r={...e,credentials:t,region:e.signingRegion,service:e.signingName,sha256:a,uriEscapePath:n};return new(e.signerConstructor||Dt)(r)},{...e,systemClockOffset:s,signingEscapePath:n,credentials:i?async()=>t().then((e=>{return i="CREDENTIALS_CODE",n="e",(t=e).$source||(t.$source={}),t.$source[i]=n,t;var t,i,n})):t,signer:o}})(e);return{...t}},Xc={UseFIPS:{type:"builtInParams",name:"useFipsEndpoint"},Endpoint:{type:"builtInParams",name:"endpoint"},Region:{type:"builtInParams",name:"region"},UseDualStack:{type:"builtInParams",name:"useDualstackEndpoint"}};var Jc="3.682.0";const Yc=({serviceId:e,clientVersion:t})=>async i=>{const n="undefined"!=typeof window&&window?.navigator?.userAgent?la.parse(window.navigator.userAgent):void 0,s=[["aws-sdk-js",t],["ua","2.1"],[`os/${n?.os?.name||"other"}`,n?.os?.version],["lang/js"],["md/browser",`${n?.browser?.name??"unknown"}_${n?.browser?.version??"unknown"}`]];e&&s.push([`api/${e}`,t]);const a=await(i?.userAgentAppId?.());return a&&s.push([`app/${a}`]),s};function Zc(e=0){return new Promise(((t,i)=>{e&&setTimeout((()=>{const t=new Error(`Request did not complete within ${e} ms`);t.name="TimeoutError",i(t)}),e)}))}const el={supported:void 0};class tl{static create(e){return"function"==typeof e?.handle?e:new tl(e)}constructor(e){"function"==typeof e?this.configProvider=e().then((e=>e||{})):(this.config=e??{},this.configProvider=Promise.resolve(this.config)),void 0===el.supported&&(el.supported=Boolean("undefined"!=typeof Request&&"keepalive"in new Request("https://[::1]")))}destroy(){}async handle(e,{abortSignal:t}={}){this.config||(this.config=await this.configProvider);const i=this.config.requestTimeout,n=!0===this.config.keepAlive,s=this.config.credentials;if(t?.aborted){const e=new Error("Request aborted");return e.name="AbortError",Promise.reject(e)}let a=e.path;const o=re(e.query||{});o&&(a+=`?${o}`),e.fragment&&(a+=`#${e.fragment}`);let r="";if(null!=e.username||null!=e.password){r=`${e.username??""}:${e.password??""}@`}const{port:c,method:l}=e,p=`${e.protocol}//${r}${e.hostname}${c?`:${c}`:""}${a}`,d="GET"===l||"HEAD"===l?void 0:e.body,u={body:d,headers:new Headers(e.headers),method:l,credentials:s};this.config?.cache&&(u.cache=this.config.cache),d&&(u.duplex="half"),"undefined"!=typeof AbortController&&(u.signal=t),el.supported&&(u.keepalive=n),"function"==typeof this.config.requestInit&&Object.assign(u,this.config.requestInit(e));let m=()=>{};const h=new Request(p,u),f=[fetch(h).then((e=>{const t=e.headers,i={};for(const e of t.entries())i[e[0]]=e[1];return null!=e.body?{response:new T({headers:i,reason:e.statusText,statusCode:e.status,body:e.body})}:e.blob().then((t=>({response:new T({headers:i,reason:e.statusText,statusCode:e.status,body:t})})))})),Zc(i)];return t&&f.push(new Promise(((e,i)=>{const n=()=>{const e=new Error("Request aborted");e.name="AbortError",i(e)};if("function"==typeof t.addEventListener){const e=t;e.addEventListener("abort",n,{once:!0}),m=()=>e.removeEventListener("abort",n)}else t.onabort=n}))),Promise.race(f).finally(m)}updateHttpClientConfig(e,t){this.config=void 0,this.configProvider=this.configProvider.then((i=>(i[e]=t,i)))}httpHandlerConfigs(){return this.config??{}}}const il=e=>"function"==typeof Blob&&e instanceof Blob?async function(e){const t=await function(e){return new Promise(((t,i)=>{const n=new FileReader;n.onloadend=()=>{if(2!==n.readyState)return i(new Error("Reader aborted too early"));const e=n.result??"",s=e.indexOf(","),a=s>-1?s+1:e.length;t(e.substring(a))},n.onabort=()=>i(new Error("Read aborted")),n.onerror=()=>i(n.error),n.readAsDataURL(e)}))}(e),i=Z(t);return new Uint8Array(i)}(e):async function(e){const t=[],i=e.getReader();let n=!1,s=0;for(;!n;){const{done:e,value:a}=await i.read();a&&(t.push(a),s+=a.length),n=e}const a=new Uint8Array(s);let o=0;for(const e of t)a.set(e,o),o+=e.length;return a}(e);const nl="required",sl="fn",al="argv",ol="ref",rl=!0,cl="isSet",ll="booleanEquals",pl="error",dl="endpoint",ul="tree",ml="PartitionResult",hl="getAttr",fl={[nl]:!1,type:"String"},gl={[nl]:!0,default:!1,type:"Boolean"},yl={[ol]:"Endpoint"},xl={[sl]:ll,[al]:[{[ol]:"UseFIPS"},!0]},vl={[sl]:ll,[al]:[{[ol]:"UseDualStack"},!0]},wl={},bl={[sl]:hl,[al]:[{[ol]:ml},"supportsFIPS"]},El={[ol]:ml},Sl={[sl]:ll,[al]:[!0,{[sl]:hl,[al]:[El,"supportsDualStack"]}]},Cl=[xl],Al=[vl],Il=[{[ol]:"Region"}],Tl={version:"1.0",parameters:{Region:fl,UseDualStack:gl,UseFIPS:gl,Endpoint:fl},rules:[{conditions:[{[sl]:cl,[al]:[yl]}],rules:[{conditions:Cl,error:"Invalid Configuration: FIPS and custom endpoint are not supported",type:pl},{conditions:Al,error:"Invalid Configuration: Dualstack and custom endpoint are not supported",type:pl},{endpoint:{url:yl,properties:wl,headers:wl},type:dl}],type:ul},{conditions:[{[sl]:cl,[al]:Il}],rules:[{conditions:[{[sl]:"aws.partition",[al]:Il,assign:ml}],rules:[{conditions:[xl,vl],rules:[{conditions:[{[sl]:ll,[al]:[rl,bl]},Sl],rules:[{endpoint:{url:"https://ssm-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:wl,headers:wl},type:dl}],type:ul},{error:"FIPS and DualStack are enabled, but this partition does not support one or both",type:pl}],type:ul},{conditions:Cl,rules:[{conditions:[{[sl]:ll,[al]:[bl,rl]}],rules:[{conditions:[{[sl]:"stringEquals",[al]:[{[sl]:hl,[al]:[El,"name"]},"aws-us-gov"]}],endpoint:{url:"https://ssm.{Region}.amazonaws.com",properties:wl,headers:wl},type:dl},{endpoint:{url:"https://ssm-fips.{Region}.{PartitionResult#dnsSuffix}",properties:wl,headers:wl},type:dl}],type:ul},{error:"FIPS is enabled but this partition does not support FIPS",type:pl}],type:ul},{conditions:Al,rules:[{conditions:[Sl],rules:[{endpoint:{url:"https://ssm.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:wl,headers:wl},type:dl}],type:ul},{error:"DualStack is enabled but this partition does not support DualStack",type:pl}],type:ul},{endpoint:{url:"https://ssm.{Region}.{PartitionResult#dnsSuffix}",properties:wl,headers:wl},type:dl}],type:ul}],type:ul},{error:"Invalid Configuration: Missing Region",type:pl}]},kl=new Ie({size:50,params:["Endpoint","Region","UseDualStack","UseFIPS"]}),Ol=(e,t={})=>kl.get(e,(()=>Je(Tl,{endpointParams:e,logger:t.logger})));_e.aws=Pc;const Pl=e=>{const t=mo(e),i=()=>t().then(ki),n=(e=>({apiVersion:"2014-11-06",base64Decoder:e?.base64Decoder??Z,base64Encoder:e?.base64Encoder??ne,disableHostPrefix:e?.disableHostPrefix??!1,endpointProvider:e?.endpointProvider??Ol,extensions:e?.extensions??[],httpAuthSchemeProvider:e?.httpAuthSchemeProvider??Kc,httpAuthSchemes:e?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:e=>e.getIdentityProvider("aws.auth#sigv4"),signer:new Dc}],logger:e?.logger??new Li,serviceId:e?.serviceId??"SSM",urlParser:e?.urlParser??ns,utf8Decoder:e?.utf8Decoder??ee,utf8Encoder:e?.utf8Encoder??ie}))(e);return{...n,...e,runtime:"browser",defaultsMode:t,bodyLengthChecker:e?.bodyLengthChecker??La,credentialDefaultProvider:e?.credentialDefaultProvider??(e=>()=>Promise.reject(new Error("Credential is missing"))),defaultUserAgentProvider:e?.defaultUserAgentProvider??Yc({serviceId:n.serviceId,clientVersion:Jc}),maxAttempts:e?.maxAttempts??3,region:e?.region??ja("Region is missing"),requestHandler:tl.create(e?.requestHandler??i),retryMode:e?.retryMode??(async()=>(await i()).retryMode||ds),sha256:e?.sha256??oa,streamCollector:e?.streamCollector??il,useDualstackEndpoint:e?.useDualstackEndpoint??(()=>Promise.resolve(Bn)),useFipsEndpoint:e?.useFipsEndpoint??(()=>Promise.resolve(Hn))}},_l=e=>{let t=async()=>{if(void 0===e.region)throw new Error("Region is missing from runtimeConfig");const t=e.region;return"string"==typeof t?t:t()};return{setRegion(e){t=e},region:()=>t}},Rl=e=>{const t=e.httpAuthSchemes;let i=e.httpAuthSchemeProvider,n=e.credentials;return{setHttpAuthScheme(e){const i=t.findIndex((t=>t.schemeId===e.schemeId));-1===i?t.push(e):t.splice(i,1,e)},httpAuthSchemes:()=>t,setHttpAuthSchemeProvider(e){i=e},httpAuthSchemeProvider:()=>i,setCredentials(e){n=e},credentials:()=>n}};class $l extends Vt{constructor(...[e]){const t=Pl(e||{});var i;const n=function(e){const t=W(e.userAgentAppId??void 0);return{...e,customUserAgent:"string"==typeof e.customUserAgent?[[e.customUserAgent]]:e.customUserAgent,userAgentAppId:async()=>{const i=await t();if(!function(e){return void 0===e||"string"==typeof e&&e.length<=50}(i)){const t="NoOpLogger"!==e.logger?.constructor?.name&&e.logger?e.logger:console;"string"!=typeof i?t?.warn("userAgentAppId must be a string or undefined."):i.length>50&&t?.warn("The provided userAgentAppId exceeds the maximum length of 50 characters.")}return i}}}((i=t,{...i,useDualstackEndpoint:i.useDualstackEndpoint??!1,useFipsEndpoint:i.useFipsEndpoint??!1,defaultSigningName:"ssm"})),s=ks(n),a=Gn(s),o=ls(a),r=((e,t)=>{const i={..._l(e),...$i(e),...g(e),...Rl(e)};return t.forEach((e=>e.configure(i))),{...e,...(s=i,{region:s.region()}),...Mi(i),...y(i),...(n=i,{httpAuthSchemes:n.httpAuthSchemes(),httpAuthSchemeProvider:n.httpAuthSchemeProvider(),credentials:n.credentials()})};var n,s})(Qc(o),e?.extensions||[]);var c;super(r),this.config=r,this.middlewareStack.use((c=this.config,{applyToStack:e=>{e.add(qc(c),Gc)}})),this.middlewareStack.use(Ms(this.config)),this.middlewareStack.use(Qn(this.config)),this.middlewareStack.use(Sc(this.config)),this.middlewareStack.use((this.config,{applyToStack:e=>{e.add(((e,t)=>async i=>{try{const n=await e(i),{clientName:s,commandName:a,logger:o,dynamoDbDocumentClientOptions:r={}}=t,{overrideInputFilterSensitiveLog:c,overrideOutputFilterSensitiveLog:l}=r,p=c??t.inputFilterSensitiveLog,d=l??t.outputFilterSensitiveLog,{$metadata:u,...m}=n.output;return o?.info?.({clientName:s,commandName:a,input:p(i.input),output:d(m),metadata:u}),n}catch(e){const{clientName:n,commandName:s,logger:a,dynamoDbDocumentClientOptions:o={}}=t,{overrideInputFilterSensitiveLog:r}=o,c=r??t.inputFilterSensitiveLog;throw a?.error?.({clientName:n,commandName:s,input:c(i.input),error:e,metadata:e.$metadata}),e}}),Cc)}})),this.middlewareStack.use(Tc(this.config)),this.middlewareStack.use(L(this.config,{httpAuthSchemeParametersProvider:Wc,identityProviderConfigProvider:async e=>new we({"aws.auth#sigv4":e.credentials})})),this.middlewareStack.use(G(this.config))}destroy(){super.destroy()}}class Ml extends Ci{constructor(e){super(e),Object.setPrototypeOf(this,Ml.prototype)}}class Nl extends Ml{constructor(e){super({name:"InternalServerError",$fault:"server",...e}),this.name="InternalServerError",this.$fault="server",Object.setPrototypeOf(this,Nl.prototype),this.Message=e.Message}}class Dl extends Ml{constructor(e){super({name:"InvalidResourceId",$fault:"client",...e}),this.name="InvalidResourceId",this.$fault="client",Object.setPrototypeOf(this,Dl.prototype)}}class jl extends Ml{constructor(e){super({name:"InvalidResourceType",$fault:"client",...e}),this.name="InvalidResourceType",this.$fault="client",Object.setPrototypeOf(this,jl.prototype)}}class zl extends Ml{constructor(e){super({name:"TooManyTagsError",$fault:"client",...e}),this.name="TooManyTagsError",this.$fault="client",Object.setPrototypeOf(this,zl.prototype)}}class Ll extends Ml{constructor(e){super({name:"TooManyUpdates",$fault:"client",...e}),this.name="TooManyUpdates",this.$fault="client",Object.setPrototypeOf(this,Ll.prototype),this.Message=e.Message}}let Fl=class e extends Ml{constructor(t){super({name:"AlreadyExistsException",$fault:"client",...t}),this.name="AlreadyExistsException",this.$fault="client",Object.setPrototypeOf(this,e.prototype),this.Message=t.Message}};class Ul extends Ml{constructor(e){super({name:"OpsItemConflictException",$fault:"client",...e}),this.name="OpsItemConflictException",this.$fault="client",Object.setPrototypeOf(this,Ul.prototype),this.Message=e.Message}}class Bl extends Ml{constructor(e){super({name:"OpsItemInvalidParameterException",$fault:"client",...e}),this.name="OpsItemInvalidParameterException",this.$fault="client",Object.setPrototypeOf(this,Bl.prototype),this.ParameterNames=e.ParameterNames,this.Message=e.Message}}class Hl extends Ml{constructor(e){super({name:"OpsItemLimitExceededException",$fault:"client",...e}),this.name="OpsItemLimitExceededException",this.$fault="client",Object.setPrototypeOf(this,Hl.prototype),this.ResourceTypes=e.ResourceTypes,this.Limit=e.Limit,this.LimitType=e.LimitType,this.Message=e.Message}}class ql extends Ml{constructor(e){super({name:"OpsItemNotFoundException",$fault:"client",...e}),this.name="OpsItemNotFoundException",this.$fault="client",Object.setPrototypeOf(this,ql.prototype),this.Message=e.Message}}class Vl extends Ml{constructor(e){super({name:"OpsItemRelatedItemAlreadyExistsException",$fault:"client",...e}),this.name="OpsItemRelatedItemAlreadyExistsException",this.$fault="client",Object.setPrototypeOf(this,Vl.prototype),this.Message=e.Message,this.ResourceUri=e.ResourceUri,this.OpsItemId=e.OpsItemId}}class Gl extends Ml{constructor(e){super({name:"DuplicateInstanceId",$fault:"client",...e}),this.name="DuplicateInstanceId",this.$fault="client",Object.setPrototypeOf(this,Gl.prototype)}}class Wl extends Ml{constructor(e){super({name:"InvalidCommandId",$fault:"client",...e}),this.name="InvalidCommandId",this.$fault="client",Object.setPrototypeOf(this,Wl.prototype)}}class Kl extends Ml{constructor(e){super({name:"InvalidInstanceId",$fault:"client",...e}),this.name="InvalidInstanceId",this.$fault="client",Object.setPrototypeOf(this,Kl.prototype),this.Message=e.Message}}class Ql extends Ml{constructor(e){super({name:"DoesNotExistException",$fault:"client",...e}),this.name="DoesNotExistException",this.$fault="client",Object.setPrototypeOf(this,Ql.prototype),this.Message=e.Message}}class Xl extends Ml{constructor(e){super({name:"InvalidParameters",$fault:"client",...e}),this.name="InvalidParameters",this.$fault="client",Object.setPrototypeOf(this,Xl.prototype),this.Message=e.Message}}class Jl extends Ml{constructor(e){super({name:"AssociationAlreadyExists",$fault:"client",...e}),this.name="AssociationAlreadyExists",this.$fault="client",Object.setPrototypeOf(this,Jl.prototype)}}class Yl extends Ml{constructor(e){super({name:"AssociationLimitExceeded",$fault:"client",...e}),this.name="AssociationLimitExceeded",this.$fault="client",Object.setPrototypeOf(this,Yl.prototype)}}class Zl extends Ml{constructor(e){super({name:"InvalidDocument",$fault:"client",...e}),this.name="InvalidDocument",this.$fault="client",Object.setPrototypeOf(this,Zl.prototype),this.Message=e.Message}}class ep extends Ml{constructor(e){super({name:"InvalidDocumentVersion",$fault:"client",...e}),this.name="InvalidDocumentVersion",this.$fault="client",Object.setPrototypeOf(this,ep.prototype),this.Message=e.Message}}class tp extends Ml{constructor(e){super({name:"InvalidOutputLocation",$fault:"client",...e}),this.name="InvalidOutputLocation",this.$fault="client",Object.setPrototypeOf(this,tp.prototype)}}class ip extends Ml{constructor(e){super({name:"InvalidSchedule",$fault:"client",...e}),this.name="InvalidSchedule",this.$fault="client",Object.setPrototypeOf(this,ip.prototype),this.Message=e.Message}}class np extends Ml{constructor(e){super({name:"InvalidTag",$fault:"client",...e}),this.name="InvalidTag",this.$fault="client",Object.setPrototypeOf(this,np.prototype),this.Message=e.Message}}class sp extends Ml{constructor(e){super({name:"InvalidTarget",$fault:"client",...e}),this.name="InvalidTarget",this.$fault="client",Object.setPrototypeOf(this,sp.prototype),this.Message=e.Message}}class ap extends Ml{constructor(e){super({name:"InvalidTargetMaps",$fault:"client",...e}),this.name="InvalidTargetMaps",this.$fault="client",Object.setPrototypeOf(this,ap.prototype),this.Message=e.Message}}class op extends Ml{constructor(e){super({name:"UnsupportedPlatformType",$fault:"client",...e}),this.name="UnsupportedPlatformType",this.$fault="client",Object.setPrototypeOf(this,op.prototype),this.Message=e.Message}}class rp extends Ml{constructor(e){super({name:"DocumentAlreadyExists",$fault:"client",...e}),this.name="DocumentAlreadyExists",this.$fault="client",Object.setPrototypeOf(this,rp.prototype),this.Message=e.Message}}class cp extends Ml{constructor(e){super({name:"DocumentLimitExceeded",$fault:"client",...e}),this.name="DocumentLimitExceeded",this.$fault="client",Object.setPrototypeOf(this,cp.prototype),this.Message=e.Message}}class lp extends Ml{constructor(e){super({name:"InvalidDocumentContent",$fault:"client",...e}),this.name="InvalidDocumentContent",this.$fault="client",Object.setPrototypeOf(this,lp.prototype),this.Message=e.Message}}class pp extends Ml{constructor(e){super({name:"InvalidDocumentSchemaVersion",$fault:"client",...e}),this.name="InvalidDocumentSchemaVersion",this.$fault="client",Object.setPrototypeOf(this,pp.prototype),this.Message=e.Message}}class dp extends Ml{constructor(e){super({name:"MaxDocumentSizeExceeded",$fault:"client",...e}),this.name="MaxDocumentSizeExceeded",this.$fault="client",Object.setPrototypeOf(this,dp.prototype),this.Message=e.Message}}class up extends Ml{constructor(e){super({name:"IdempotentParameterMismatch",$fault:"client",...e}),this.name="IdempotentParameterMismatch",this.$fault="client",Object.setPrototypeOf(this,up.prototype),this.Message=e.Message}}class mp extends Ml{constructor(e){super({name:"ResourceLimitExceededException",$fault:"client",...e}),this.name="ResourceLimitExceededException",this.$fault="client",Object.setPrototypeOf(this,mp.prototype),this.Message=e.Message}}class hp extends Ml{constructor(e){super({name:"OpsItemAccessDeniedException",$fault:"client",...e}),this.name="OpsItemAccessDeniedException",this.$fault="client",Object.setPrototypeOf(this,hp.prototype),this.Message=e.Message}}class fp extends Ml{constructor(e){super({name:"OpsItemAlreadyExistsException",$fault:"client",...e}),this.name="OpsItemAlreadyExistsException",this.$fault="client",Object.setPrototypeOf(this,fp.prototype),this.Message=e.Message,this.OpsItemId=e.OpsItemId}}class gp extends Ml{constructor(e){super({name:"OpsMetadataAlreadyExistsException",$fault:"client",...e}),this.name="OpsMetadataAlreadyExistsException",this.$fault="client",Object.setPrototypeOf(this,gp.prototype)}}class yp extends Ml{constructor(e){super({name:"OpsMetadataInvalidArgumentException",$fault:"client",...e}),this.name="OpsMetadataInvalidArgumentException",this.$fault="client",Object.setPrototypeOf(this,yp.prototype)}}class xp extends Ml{constructor(e){super({name:"OpsMetadataLimitExceededException",$fault:"client",...e}),this.name="OpsMetadataLimitExceededException",this.$fault="client",Object.setPrototypeOf(this,xp.prototype)}}class vp extends Ml{constructor(e){super({name:"OpsMetadataTooManyUpdatesException",$fault:"client",...e}),this.name="OpsMetadataTooManyUpdatesException",this.$fault="client",Object.setPrototypeOf(this,vp.prototype)}}class wp extends Ml{constructor(e){super({name:"ResourceDataSyncAlreadyExistsException",$fault:"client",...e}),this.name="ResourceDataSyncAlreadyExistsException",this.$fault="client",Object.setPrototypeOf(this,wp.prototype),this.SyncName=e.SyncName}}class bp extends Ml{constructor(e){super({name:"ResourceDataSyncCountExceededException",$fault:"client",...e}),this.name="ResourceDataSyncCountExceededException",this.$fault="client",Object.setPrototypeOf(this,bp.prototype),this.Message=e.Message}}class Ep extends Ml{constructor(e){super({name:"ResourceDataSyncInvalidConfigurationException",$fault:"client",...e}),this.name="ResourceDataSyncInvalidConfigurationException",this.$fault="client",Object.setPrototypeOf(this,Ep.prototype),this.Message=e.Message}}class Sp extends Ml{constructor(e){super({name:"InvalidActivation",$fault:"client",...e}),this.name="InvalidActivation",this.$fault="client",Object.setPrototypeOf(this,Sp.prototype),this.Message=e.Message}}class Cp extends Ml{constructor(e){super({name:"InvalidActivationId",$fault:"client",...e}),this.name="InvalidActivationId",this.$fault="client",Object.setPrototypeOf(this,Cp.prototype),this.Message=e.Message}}class Ap extends Ml{constructor(e){super({name:"AssociationDoesNotExist",$fault:"client",...e}),this.name="AssociationDoesNotExist",this.$fault="client",Object.setPrototypeOf(this,Ap.prototype),this.Message=e.Message}}class Ip extends Ml{constructor(e){super({name:"AssociatedInstances",$fault:"client",...e}),this.name="AssociatedInstances",this.$fault="client",Object.setPrototypeOf(this,Ip.prototype)}}class Tp extends Ml{constructor(e){super({name:"InvalidDocumentOperation",$fault:"client",...e}),this.name="InvalidDocumentOperation",this.$fault="client",Object.setPrototypeOf(this,Tp.prototype),this.Message=e.Message}}class kp extends Ml{constructor(e){super({name:"InvalidDeleteInventoryParametersException",$fault:"client",...e}),this.name="InvalidDeleteInventoryParametersException",this.$fault="client",Object.setPrototypeOf(this,kp.prototype),this.Message=e.Message}}class Op extends Ml{constructor(e){super({name:"InvalidInventoryRequestException",$fault:"client",...e}),this.name="InvalidInventoryRequestException",this.$fault="client",Object.setPrototypeOf(this,Op.prototype),this.Message=e.Message}}class Pp extends Ml{constructor(e){super({name:"InvalidOptionException",$fault:"client",...e}),this.name="InvalidOptionException",this.$fault="client",Object.setPrototypeOf(this,Pp.prototype),this.Message=e.Message}}class _p extends Ml{constructor(e){super({name:"InvalidTypeNameException",$fault:"client",...e}),this.name="InvalidTypeNameException",this.$fault="client",Object.setPrototypeOf(this,_p.prototype),this.Message=e.Message}}class Rp extends Ml{constructor(e){super({name:"OpsMetadataNotFoundException",$fault:"client",...e}),this.name="OpsMetadataNotFoundException",this.$fault="client",Object.setPrototypeOf(this,Rp.prototype)}}class $p extends Ml{constructor(e){super({name:"ParameterNotFound",$fault:"client",...e}),this.name="ParameterNotFound",this.$fault="client",Object.setPrototypeOf(this,$p.prototype)}}class Mp extends Ml{constructor(e){super({name:"ResourceInUseException",$fault:"client",...e}),this.name="ResourceInUseException",this.$fault="client",Object.setPrototypeOf(this,Mp.prototype),this.Message=e.Message}}class Np extends Ml{constructor(e){super({name:"ResourceDataSyncNotFoundException",$fault:"client",...e}),this.name="ResourceDataSyncNotFoundException",this.$fault="client",Object.setPrototypeOf(this,Np.prototype),this.SyncName=e.SyncName,this.SyncType=e.SyncType,this.Message=e.Message}}class Dp extends Ml{constructor(e){super({name:"MalformedResourcePolicyDocumentException",$fault:"client",...e}),this.name="MalformedResourcePolicyDocumentException",this.$fault="client",Object.setPrototypeOf(this,Dp.prototype),this.Message=e.Message}}class jp extends Ml{constructor(e){super({name:"ResourceNotFoundException",$fault:"client",...e}),this.name="ResourceNotFoundException",this.$fault="client",Object.setPrototypeOf(this,jp.prototype),this.Message=e.Message}}class zp extends Ml{constructor(e){super({name:"ResourcePolicyConflictException",$fault:"client",...e}),this.name="ResourcePolicyConflictException",this.$fault="client",Object.setPrototypeOf(this,zp.prototype),this.Message=e.Message}}class Lp extends Ml{constructor(e){super({name:"ResourcePolicyInvalidParameterException",$fault:"client",...e}),this.name="ResourcePolicyInvalidParameterException",this.$fault="client",Object.setPrototypeOf(this,Lp.prototype),this.ParameterNames=e.ParameterNames,this.Message=e.Message}}class Fp extends Ml{constructor(e){super({name:"ResourcePolicyNotFoundException",$fault:"client",...e}),this.name="ResourcePolicyNotFoundException",this.$fault="client",Object.setPrototypeOf(this,Fp.prototype),this.Message=e.Message}}class Up extends Ml{constructor(e){super({name:"TargetInUseException",$fault:"client",...e}),this.name="TargetInUseException",this.$fault="client",Object.setPrototypeOf(this,Up.prototype),this.Message=e.Message}}class Bp extends Ml{constructor(e){super({name:"InvalidFilter",$fault:"client",...e}),this.name="InvalidFilter",this.$fault="client",Object.setPrototypeOf(this,Bp.prototype),this.Message=e.Message}}class Hp extends Ml{constructor(e){super({name:"InvalidNextToken",$fault:"client",...e}),this.name="InvalidNextToken",this.$fault="client",Object.setPrototypeOf(this,Hp.prototype),this.Message=e.Message}}class qp extends Ml{constructor(e){super({name:"InvalidAssociationVersion",$fault:"client",...e}),this.name="InvalidAssociationVersion",this.$fault="client",Object.setPrototypeOf(this,qp.prototype),this.Message=e.Message}}class Vp extends Ml{constructor(e){super({name:"AssociationExecutionDoesNotExist",$fault:"client",...e}),this.name="AssociationExecutionDoesNotExist",this.$fault="client",Object.setPrototypeOf(this,Vp.prototype),this.Message=e.Message}}class Gp extends Ml{constructor(e){super({name:"InvalidFilterKey",$fault:"client",...e}),this.name="InvalidFilterKey",this.$fault="client",Object.setPrototypeOf(this,Gp.prototype)}}class Wp extends Ml{constructor(e){super({name:"InvalidFilterValue",$fault:"client",...e}),this.name="InvalidFilterValue",this.$fault="client",Object.setPrototypeOf(this,Wp.prototype),this.Message=e.Message}}class Kp extends Ml{constructor(e){super({name:"AutomationExecutionNotFoundException",$fault:"client",...e}),this.name="AutomationExecutionNotFoundException",this.$fault="client",Object.setPrototypeOf(this,Kp.prototype),this.Message=e.Message}}class Qp extends Ml{constructor(e){super({name:"InvalidPermissionType",$fault:"client",...e}),this.name="InvalidPermissionType",this.$fault="client",Object.setPrototypeOf(this,Qp.prototype),this.Message=e.Message}}class Xp extends Ml{constructor(e){super({name:"UnsupportedOperatingSystem",$fault:"client",...e}),this.name="UnsupportedOperatingSystem",this.$fault="client",Object.setPrototypeOf(this,Xp.prototype),this.Message=e.Message}}class Jp extends Ml{constructor(e){super({name:"InvalidInstanceInformationFilterValue",$fault:"client",...e}),this.name="InvalidInstanceInformationFilterValue",this.$fault="client",Object.setPrototypeOf(this,Jp.prototype)}}class Yp extends Ml{constructor(e){super({name:"InvalidInstancePropertyFilterValue",$fault:"client",...e}),this.name="InvalidInstancePropertyFilterValue",this.$fault="client",Object.setPrototypeOf(this,Yp.prototype)}}class Zp extends Ml{constructor(e){super({name:"InvalidDeletionIdException",$fault:"client",...e}),this.name="InvalidDeletionIdException",this.$fault="client",Object.setPrototypeOf(this,Zp.prototype),this.Message=e.Message}}class ed extends Ml{constructor(e){super({name:"InvalidFilterOption",$fault:"client",...e}),this.name="InvalidFilterOption",this.$fault="client",Object.setPrototypeOf(this,ed.prototype)}}class td extends Ml{constructor(e){super({name:"OpsItemRelatedItemAssociationNotFoundException",$fault:"client",...e}),this.name="OpsItemRelatedItemAssociationNotFoundException",this.$fault="client",Object.setPrototypeOf(this,td.prototype),this.Message=e.Message}}class id extends Ml{constructor(e){super({name:"InvalidDocumentType",$fault:"client",...e}),this.name="InvalidDocumentType",this.$fault="client",Object.setPrototypeOf(this,id.prototype),this.Message=e.Message}}class nd extends Ml{constructor(e){super({name:"UnsupportedCalendarException",$fault:"client",...e}),this.name="UnsupportedCalendarException",this.$fault="client",Object.setPrototypeOf(this,nd.prototype),this.Message=e.Message}}class sd extends Ml{constructor(e){super({name:"InvalidPluginName",$fault:"client",...e}),this.name="InvalidPluginName",this.$fault="client",Object.setPrototypeOf(this,sd.prototype)}}class ad extends Ml{constructor(e){super({name:"InvocationDoesNotExist",$fault:"client",...e}),this.name="InvocationDoesNotExist",this.$fault="client",Object.setPrototypeOf(this,ad.prototype)}}class od extends Ml{constructor(e){super({name:"UnsupportedFeatureRequiredException",$fault:"client",...e}),this.name="UnsupportedFeatureRequiredException",this.$fault="client",Object.setPrototypeOf(this,od.prototype),this.Message=e.Message}}class rd extends Ml{constructor(e){super({name:"InvalidAggregatorException",$fault:"client",...e}),this.name="InvalidAggregatorException",this.$fault="client",Object.setPrototypeOf(this,rd.prototype),this.Message=e.Message}}class cd extends Ml{constructor(e){super({name:"InvalidInventoryGroupException",$fault:"client",...e}),this.name="InvalidInventoryGroupException",this.$fault="client",Object.setPrototypeOf(this,cd.prototype),this.Message=e.Message}}class ld extends Ml{constructor(e){super({name:"InvalidResultAttributeException",$fault:"client",...e}),this.name="InvalidResultAttributeException",this.$fault="client",Object.setPrototypeOf(this,ld.prototype),this.Message=e.Message}}class pd extends Ml{constructor(e){super({name:"InvalidKeyId",$fault:"client",...e}),this.name="InvalidKeyId",this.$fault="client",Object.setPrototypeOf(this,pd.prototype)}}class dd extends Ml{constructor(e){super({name:"ParameterVersionNotFound",$fault:"client",...e}),this.name="ParameterVersionNotFound",this.$fault="client",Object.setPrototypeOf(this,dd.prototype)}}class ud extends Ml{constructor(e){super({name:"ServiceSettingNotFound",$fault:"client",...e}),this.name="ServiceSettingNotFound",this.$fault="client",Object.setPrototypeOf(this,ud.prototype),this.Message=e.Message}}class md extends Ml{constructor(e){super({name:"ParameterVersionLabelLimitExceeded",$fault:"client",...e}),this.name="ParameterVersionLabelLimitExceeded",this.$fault="client",Object.setPrototypeOf(this,md.prototype)}}class hd extends Ml{constructor(e){super({name:"DocumentPermissionLimit",$fault:"client",...e}),this.name="DocumentPermissionLimit",this.$fault="client",Object.setPrototypeOf(this,hd.prototype),this.Message=e.Message}}class fd extends Ml{constructor(e){super({name:"ComplianceTypeCountLimitExceededException",$fault:"client",...e}),this.name="ComplianceTypeCountLimitExceededException",this.$fault="client",Object.setPrototypeOf(this,fd.prototype),this.Message=e.Message}}class gd extends Ml{constructor(e){super({name:"InvalidItemContentException",$fault:"client",...e}),this.name="InvalidItemContentException",this.$fault="client",Object.setPrototypeOf(this,gd.prototype),this.TypeName=e.TypeName,this.Message=e.Message}}class yd extends Ml{constructor(e){super({name:"ItemSizeLimitExceededException",$fault:"client",...e}),this.name="ItemSizeLimitExceededException",this.$fault="client",Object.setPrototypeOf(this,yd.prototype),this.TypeName=e.TypeName,this.Message=e.Message}}class xd extends Ml{constructor(e){super({name:"TotalSizeLimitExceededException",$fault:"client",...e}),this.name="TotalSizeLimitExceededException",this.$fault="client",Object.setPrototypeOf(this,xd.prototype),this.Message=e.Message}}class vd extends Ml{constructor(e){super({name:"CustomSchemaCountLimitExceededException",$fault:"client",...e}),this.name="CustomSchemaCountLimitExceededException",this.$fault="client",Object.setPrototypeOf(this,vd.prototype),this.Message=e.Message}}class wd extends Ml{constructor(e){super({name:"InvalidInventoryItemContextException",$fault:"client",...e}),this.name="InvalidInventoryItemContextException",this.$fault="client",Object.setPrototypeOf(this,wd.prototype),this.Message=e.Message}}class bd extends Ml{constructor(e){super({name:"ItemContentMismatchException",$fault:"client",...e}),this.name="ItemContentMismatchException",this.$fault="client",Object.setPrototypeOf(this,bd.prototype),this.TypeName=e.TypeName,this.Message=e.Message}}class Ed extends Ml{constructor(e){super({name:"SubTypeCountLimitExceededException",$fault:"client",...e}),this.name="SubTypeCountLimitExceededException",this.$fault="client",Object.setPrototypeOf(this,Ed.prototype),this.Message=e.Message}}class Sd extends Ml{constructor(e){super({name:"UnsupportedInventoryItemContextException",$fault:"client",...e}),this.name="UnsupportedInventoryItemContextException",this.$fault="client",Object.setPrototypeOf(this,Sd.prototype),this.TypeName=e.TypeName,this.Message=e.Message}}class Cd extends Ml{constructor(e){super({name:"UnsupportedInventorySchemaVersionException",$fault:"client",...e}),this.name="UnsupportedInventorySchemaVersionException",this.$fault="client",Object.setPrototypeOf(this,Cd.prototype),this.Message=e.Message}}class Ad extends Ml{constructor(e){super({name:"HierarchyLevelLimitExceededException",$fault:"client",...e}),this.name="HierarchyLevelLimitExceededException",this.$fault="client",Object.setPrototypeOf(this,Ad.prototype)}}class Id extends Ml{constructor(e){super({name:"HierarchyTypeMismatchException",$fault:"client",...e}),this.name="HierarchyTypeMismatchException",this.$fault="client",Object.setPrototypeOf(this,Id.prototype)}}class Td extends Ml{constructor(e){super({name:"IncompatiblePolicyException",$fault:"client",...e}),this.name="IncompatiblePolicyException",this.$fault="client",Object.setPrototypeOf(this,Td.prototype)}}class kd extends Ml{constructor(e){super({name:"InvalidAllowedPatternException",$fault:"client",...e}),this.name="InvalidAllowedPatternException",this.$fault="client",Object.setPrototypeOf(this,kd.prototype)}}class Od extends Ml{constructor(e){super({name:"InvalidPolicyAttributeException",$fault:"client",...e}),this.name="InvalidPolicyAttributeException",this.$fault="client",Object.setPrototypeOf(this,Od.prototype)}}class Pd extends Ml{constructor(e){super({name:"InvalidPolicyTypeException",$fault:"client",...e}),this.name="InvalidPolicyTypeException",this.$fault="client",Object.setPrototypeOf(this,Pd.prototype)}}class _d extends Ml{constructor(e){super({name:"ParameterAlreadyExists",$fault:"client",...e}),this.name="ParameterAlreadyExists",this.$fault="client",Object.setPrototypeOf(this,_d.prototype)}}class Rd extends Ml{constructor(e){super({name:"ParameterLimitExceeded",$fault:"client",...e}),this.name="ParameterLimitExceeded",this.$fault="client",Object.setPrototypeOf(this,Rd.prototype)}}class $d extends Ml{constructor(e){super({name:"ParameterMaxVersionLimitExceeded",$fault:"client",...e}),this.name="ParameterMaxVersionLimitExceeded",this.$fault="client",Object.setPrototypeOf(this,$d.prototype)}}class Md extends Ml{constructor(e){super({name:"ParameterPatternMismatchException",$fault:"client",...e}),this.name="ParameterPatternMismatchException",this.$fault="client",Object.setPrototypeOf(this,Md.prototype)}}class Nd extends Ml{constructor(e){super({name:"PoliciesLimitExceededException",$fault:"client",...e}),this.name="PoliciesLimitExceededException",this.$fault="client",Object.setPrototypeOf(this,Nd.prototype)}}class Dd extends Ml{constructor(e){super({name:"UnsupportedParameterType",$fault:"client",...e}),this.name="UnsupportedParameterType",this.$fault="client",Object.setPrototypeOf(this,Dd.prototype)}}class jd extends Ml{constructor(e){super({name:"ResourcePolicyLimitExceededException",$fault:"client",...e}),this.name="ResourcePolicyLimitExceededException",this.$fault="client",Object.setPrototypeOf(this,jd.prototype),this.Limit=e.Limit,this.LimitType=e.LimitType,this.Message=e.Message}}class zd extends Ml{constructor(e){super({name:"FeatureNotAvailableException",$fault:"client",...e}),this.name="FeatureNotAvailableException",this.$fault="client",Object.setPrototypeOf(this,zd.prototype),this.Message=e.Message}}class Ld extends Ml{constructor(e){super({name:"AutomationStepNotFoundException",$fault:"client",...e}),this.name="AutomationStepNotFoundException",this.$fault="client",Object.setPrototypeOf(this,Ld.prototype),this.Message=e.Message}}class Fd extends Ml{constructor(e){super({name:"InvalidAutomationSignalException",$fault:"client",...e}),this.name="InvalidAutomationSignalException",this.$fault="client",Object.setPrototypeOf(this,Fd.prototype),this.Message=e.Message}}class Ud extends Ml{constructor(e){super({name:"InvalidNotificationConfig",$fault:"client",...e}),this.name="InvalidNotificationConfig",this.$fault="client",Object.setPrototypeOf(this,Ud.prototype),this.Message=e.Message}}class Bd extends Ml{constructor(e){super({name:"InvalidOutputFolder",$fault:"client",...e}),this.name="InvalidOutputFolder",this.$fault="client",Object.setPrototypeOf(this,Bd.prototype)}}class Hd extends Ml{constructor(e){super({name:"InvalidRole",$fault:"client",...e}),this.name="InvalidRole",this.$fault="client",Object.setPrototypeOf(this,Hd.prototype),this.Message=e.Message}}class qd extends Ml{constructor(e){super({name:"InvalidAssociation",$fault:"client",...e}),this.name="InvalidAssociation",this.$fault="client",Object.setPrototypeOf(this,qd.prototype),this.Message=e.Message}}class Vd extends Ml{constructor(e){super({name:"AutomationDefinitionNotFoundException",$fault:"client",...e}),this.name="AutomationDefinitionNotFoundException",this.$fault="client",Object.setPrototypeOf(this,Vd.prototype),this.Message=e.Message}}class Gd extends Ml{constructor(e){super({name:"AutomationDefinitionVersionNotFoundException",$fault:"client",...e}),this.name="AutomationDefinitionVersionNotFoundException",this.$fault="client",Object.setPrototypeOf(this,Gd.prototype),this.Message=e.Message}}class Wd extends Ml{constructor(e){super({name:"AutomationExecutionLimitExceededException",$fault:"client",...e}),this.name="AutomationExecutionLimitExceededException",this.$fault="client",Object.setPrototypeOf(this,Wd.prototype),this.Message=e.Message}}class Kd extends Ml{constructor(e){super({name:"InvalidAutomationExecutionParametersException",$fault:"client",...e}),this.name="InvalidAutomationExecutionParametersException",this.$fault="client",Object.setPrototypeOf(this,Kd.prototype),this.Message=e.Message}}const Qd=e=>({...e,...e.Value&&{Value:Kt}}),Xd=e=>({...e,...e.Parameter&&{Parameter:Qd(e.Parameter)}}),Jd=e=>({...e,...e.Parameters&&{Parameters:e.Parameters.map((e=>Qd(e)))}});class Yd extends Ml{constructor(e){super({name:"AutomationDefinitionNotApprovedException",$fault:"client",...e}),this.name="AutomationDefinitionNotApprovedException",this.$fault="client",Object.setPrototypeOf(this,Yd.prototype),this.Message=e.Message}}class Zd extends Ml{constructor(e){super({name:"TargetNotConnected",$fault:"client",...e}),this.name="TargetNotConnected",this.$fault="client",Object.setPrototypeOf(this,Zd.prototype),this.Message=e.Message}}class eu extends Ml{constructor(e){super({name:"InvalidAutomationStatusUpdateException",$fault:"client",...e}),this.name="InvalidAutomationStatusUpdateException",this.$fault="client",Object.setPrototypeOf(this,eu.prototype),this.Message=e.Message}}class tu extends Ml{constructor(e){super({name:"AssociationVersionLimitExceeded",$fault:"client",...e}),this.name="AssociationVersionLimitExceeded",this.$fault="client",Object.setPrototypeOf(this,tu.prototype),this.Message=e.Message}}class iu extends Ml{constructor(e){super({name:"InvalidUpdate",$fault:"client",...e}),this.name="InvalidUpdate",this.$fault="client",Object.setPrototypeOf(this,iu.prototype),this.Message=e.Message}}class nu extends Ml{constructor(e){super({name:"StatusUnchanged",$fault:"client",...e}),this.name="StatusUnchanged",this.$fault="client",Object.setPrototypeOf(this,nu.prototype)}}class su extends Ml{constructor(e){super({name:"DocumentVersionLimitExceeded",$fault:"client",...e}),this.name="DocumentVersionLimitExceeded",this.$fault="client",Object.setPrototypeOf(this,su.prototype),this.Message=e.Message}}class au extends Ml{constructor(e){super({name:"DuplicateDocumentContent",$fault:"client",...e}),this.name="DuplicateDocumentContent",this.$fault="client",Object.setPrototypeOf(this,au.prototype),this.Message=e.Message}}class ou extends Ml{constructor(e){super({name:"DuplicateDocumentVersionName",$fault:"client",...e}),this.name="DuplicateDocumentVersionName",this.$fault="client",Object.setPrototypeOf(this,ou.prototype),this.Message=e.Message}}class ru extends Ml{constructor(e){super({name:"OpsMetadataKeyLimitExceededException",$fault:"client",...e}),this.name="OpsMetadataKeyLimitExceededException",this.$fault="client",Object.setPrototypeOf(this,ru.prototype)}}class cu extends Ml{constructor(e){super({name:"ResourceDataSyncConflictException",$fault:"client",...e}),this.name="ResourceDataSyncConflictException",this.$fault="client",Object.setPrototypeOf(this,cu.prototype),this.Message=e.Message}}const lu=async(e,t)=>{const i=Gh("GetParameter");let n;return n=JSON.stringify(Wi(e)),Vh(t,i,"/",void 0,n)},pu=async(e,t)=>{const i=Gh("GetParameters");let n;return n=JSON.stringify(Wi(e)),Vh(t,i,"/",void 0,n)},du=async(e,t)=>{if(e.statusCode>=300)return mu(e,t);const i=await jc(e.body,t);let n={};n=Lh(i);return{$metadata:Hh(e),...n}},uu=async(e,t)=>{if(e.statusCode>=300)return mu(e,t);const i=await jc(e.body,t);let n={};n=Fh(i);return{$metadata:Hh(e),...n}},mu=async(e,t)=>{const i={...e,body:await zc(e.body,t)},n=((e,t)=>{const i=e=>{let t=e;return"number"==typeof t&&(t=t.toString()),t.indexOf(",")>=0&&(t=t.split(",")[0]),t.indexOf(":")>=0&&(t=t.split(":")[0]),t.indexOf("#")>=0&&(t=t.split("#")[1]),t},n=(s=e.headers,a="x-amzn-errortype",Object.keys(s).find((e=>e.toLowerCase()===a.toLowerCase())));var s,a;return void 0!==n?i(e.headers[n]):void 0!==t.code?i(t.code):void 0!==t.__type?i(t.__type):void 0})(e,i.body);switch(n){case"InternalServerError":case"com.amazonaws.ssm#InternalServerError":throw await Bu(i);case"InvalidResourceId":case"com.amazonaws.ssm#InvalidResourceId":throw await Om(i);case"InvalidResourceType":case"com.amazonaws.ssm#InvalidResourceType":throw await Pm(i);case"TooManyTagsError":case"com.amazonaws.ssm#TooManyTagsError":throw await Oh(i);case"TooManyUpdates":case"com.amazonaws.ssm#TooManyUpdates":throw await Ph(i);case"OpsItemConflictException":case"com.amazonaws.ssm#OpsItemConflictException":throw await Gm(i);case"OpsItemInvalidParameterException":case"com.amazonaws.ssm#OpsItemInvalidParameterException":throw await Wm(i);case"OpsItemLimitExceededException":case"com.amazonaws.ssm#OpsItemLimitExceededException":throw await Km(i);case"OpsItemNotFoundException":case"com.amazonaws.ssm#OpsItemNotFoundException":throw await Qm(i);case"OpsItemRelatedItemAlreadyExistsException":case"com.amazonaws.ssm#OpsItemRelatedItemAlreadyExistsException":throw await Xm(i);case"DuplicateInstanceId":case"com.amazonaws.ssm#DuplicateInstanceId":throw await Du(i);case"InvalidCommandId":case"com.amazonaws.ssm#InvalidCommandId":throw await Yu(i);case"InvalidInstanceId":case"com.amazonaws.ssm#InvalidInstanceId":throw await dm(i);case"DoesNotExistException":case"com.amazonaws.ssm#DoesNotExistException":throw await $u(i);case"InvalidParameters":case"com.amazonaws.ssm#InvalidParameters":throw await Cm(i);case"AssociationAlreadyExists":case"com.amazonaws.ssm#AssociationAlreadyExists":throw await gu(i);case"AssociationLimitExceeded":case"com.amazonaws.ssm#AssociationLimitExceeded":throw await vu(i);case"InvalidDocument":case"com.amazonaws.ssm#InvalidDocument":throw await tm(i);case"InvalidDocumentVersion":case"com.amazonaws.ssm#InvalidDocumentVersion":throw await om(i);case"InvalidOutputLocation":case"com.amazonaws.ssm#InvalidOutputLocation":throw await Sm(i);case"InvalidSchedule":case"com.amazonaws.ssm#InvalidSchedule":throw await $m(i);case"InvalidTag":case"com.amazonaws.ssm#InvalidTag":throw await Mm(i);case"InvalidTarget":case"com.amazonaws.ssm#InvalidTarget":throw await Nm(i);case"InvalidTargetMaps":case"com.amazonaws.ssm#InvalidTargetMaps":throw await Dm(i);case"UnsupportedPlatformType":case"com.amazonaws.ssm#UnsupportedPlatformType":throw await zh(i);case"DocumentAlreadyExists":case"com.amazonaws.ssm#DocumentAlreadyExists":throw await Ou(i);case"DocumentLimitExceeded":case"com.amazonaws.ssm#DocumentLimitExceeded":throw await Pu(i);case"InvalidDocumentContent":case"com.amazonaws.ssm#InvalidDocumentContent":throw await im(i);case"InvalidDocumentSchemaVersion":case"com.amazonaws.ssm#InvalidDocumentSchemaVersion":throw await sm(i);case"MaxDocumentSizeExceeded":case"com.amazonaws.ssm#MaxDocumentSizeExceeded":throw await Hm(i);case"IdempotentParameterMismatch":case"com.amazonaws.ssm#IdempotentParameterMismatch":throw await Fu(i);case"ResourceLimitExceededException":case"com.amazonaws.ssm#ResourceLimitExceededException":throw await xh(i);case"OpsItemAccessDeniedException":case"com.amazonaws.ssm#OpsItemAccessDeniedException":throw await qm(i);case"OpsItemAlreadyExistsException":case"com.amazonaws.ssm#OpsItemAlreadyExistsException":throw await Vm(i);case"OpsMetadataAlreadyExistsException":case"com.amazonaws.ssm#OpsMetadataAlreadyExistsException":throw await Ym(i);case"OpsMetadataInvalidArgumentException":case"com.amazonaws.ssm#OpsMetadataInvalidArgumentException":throw await Zm(i);case"OpsMetadataLimitExceededException":case"com.amazonaws.ssm#OpsMetadataLimitExceededException":throw await th(i);case"OpsMetadataTooManyUpdatesException":case"com.amazonaws.ssm#OpsMetadataTooManyUpdatesException":throw await nh(i);case"ResourceDataSyncAlreadyExistsException":case"com.amazonaws.ssm#ResourceDataSyncAlreadyExistsException":throw await uh(i);case"ResourceDataSyncCountExceededException":case"com.amazonaws.ssm#ResourceDataSyncCountExceededException":throw await hh(i);case"ResourceDataSyncInvalidConfigurationException":case"com.amazonaws.ssm#ResourceDataSyncInvalidConfigurationException":throw await fh(i);case"InvalidActivation":case"com.amazonaws.ssm#InvalidActivation":throw await Hu(i);case"InvalidActivationId":case"com.amazonaws.ssm#InvalidActivationId":throw await qu(i);case"AssociationDoesNotExist":case"com.amazonaws.ssm#AssociationDoesNotExist":throw await yu(i);case"AssociatedInstances":case"com.amazonaws.ssm#AssociatedInstances":throw await fu(i);case"InvalidDocumentOperation":case"com.amazonaws.ssm#InvalidDocumentOperation":throw await nm(i);case"InvalidDeleteInventoryParametersException":case"com.amazonaws.ssm#InvalidDeleteInventoryParametersException":throw await Zu(i);case"InvalidInventoryRequestException":case"com.amazonaws.ssm#InvalidInventoryRequestException":throw await gm(i);case"InvalidOptionException":case"com.amazonaws.ssm#InvalidOptionException":throw await bm(i);case"InvalidTypeNameException":case"com.amazonaws.ssm#InvalidTypeNameException":throw await jm(i);case"OpsMetadataNotFoundException":case"com.amazonaws.ssm#OpsMetadataNotFoundException":throw await ih(i);case"ParameterNotFound":case"com.amazonaws.ssm#ParameterNotFound":throw await rh(i);case"ResourceInUseException":case"com.amazonaws.ssm#ResourceInUseException":throw await yh(i);case"ResourceDataSyncNotFoundException":case"com.amazonaws.ssm#ResourceDataSyncNotFoundException":throw await gh(i);case"MalformedResourcePolicyDocumentException":case"com.amazonaws.ssm#MalformedResourcePolicyDocumentException":throw await Bm(i);case"ResourceNotFoundException":case"com.amazonaws.ssm#ResourceNotFoundException":throw await vh(i);case"ResourcePolicyConflictException":case"com.amazonaws.ssm#ResourcePolicyConflictException":throw await wh(i);case"ResourcePolicyInvalidParameterException":case"com.amazonaws.ssm#ResourcePolicyInvalidParameterException":throw await bh(i);case"ResourcePolicyNotFoundException":case"com.amazonaws.ssm#ResourcePolicyNotFoundException":throw await Sh(i);case"TargetInUseException":case"com.amazonaws.ssm#TargetInUseException":throw await Th(i);case"InvalidFilter":case"com.amazonaws.ssm#InvalidFilter":throw await rm(i);case"InvalidNextToken":case"com.amazonaws.ssm#InvalidNextToken":throw await vm(i);case"InvalidAssociationVersion":case"com.amazonaws.ssm#InvalidAssociationVersion":throw await Ku(i);case"AssociationExecutionDoesNotExist":case"com.amazonaws.ssm#AssociationExecutionDoesNotExist":throw await xu(i);case"InvalidFilterKey":case"com.amazonaws.ssm#InvalidFilterKey":throw await cm(i);case"InvalidFilterValue":case"com.amazonaws.ssm#InvalidFilterValue":throw await pm(i);case"AutomationExecutionNotFoundException":case"com.amazonaws.ssm#AutomationExecutionNotFoundException":throw await Au(i);case"InvalidPermissionType":case"com.amazonaws.ssm#InvalidPermissionType":throw await Am(i);case"UnsupportedOperatingSystem":case"com.amazonaws.ssm#UnsupportedOperatingSystem":throw await Dh(i);case"InvalidInstanceInformationFilterValue":case"com.amazonaws.ssm#InvalidInstanceInformationFilterValue":throw await um(i);case"InvalidInstancePropertyFilterValue":case"com.amazonaws.ssm#InvalidInstancePropertyFilterValue":throw await mm(i);case"InvalidDeletionIdException":case"com.amazonaws.ssm#InvalidDeletionIdException":throw await em(i);case"InvalidFilterOption":case"com.amazonaws.ssm#InvalidFilterOption":throw await lm(i);case"OpsItemRelatedItemAssociationNotFoundException":case"com.amazonaws.ssm#OpsItemRelatedItemAssociationNotFoundException":throw await Jm(i);case"InvalidDocumentType":case"com.amazonaws.ssm#InvalidDocumentType":throw await am(i);case"UnsupportedCalendarException":case"com.amazonaws.ssm#UnsupportedCalendarException":throw await Rh(i);case"InvalidPluginName":case"com.amazonaws.ssm#InvalidPluginName":throw await Im(i);case"InvocationDoesNotExist":case"com.amazonaws.ssm#InvocationDoesNotExist":throw await Lm(i);case"UnsupportedFeatureRequiredException":case"com.amazonaws.ssm#UnsupportedFeatureRequiredException":throw await $h(i);case"InvalidAggregatorException":case"com.amazonaws.ssm#InvalidAggregatorException":throw await Vu(i);case"InvalidInventoryGroupException":case"com.amazonaws.ssm#InvalidInventoryGroupException":throw await hm(i);case"InvalidResultAttributeException":case"com.amazonaws.ssm#InvalidResultAttributeException":throw await _m(i);case"InvalidKeyId":case"com.amazonaws.ssm#InvalidKeyId":throw await xm(i);case"ParameterVersionNotFound":case"com.amazonaws.ssm#ParameterVersionNotFound":throw await ph(i);case"ServiceSettingNotFound":case"com.amazonaws.ssm#ServiceSettingNotFound":throw await Ch(i);case"ParameterVersionLabelLimitExceeded":case"com.amazonaws.ssm#ParameterVersionLabelLimitExceeded":throw await lh(i);case"DocumentPermissionLimit":case"com.amazonaws.ssm#DocumentPermissionLimit":throw await _u(i);case"ComplianceTypeCountLimitExceededException":case"com.amazonaws.ssm#ComplianceTypeCountLimitExceededException":throw await Tu(i);case"InvalidItemContentException":case"com.amazonaws.ssm#InvalidItemContentException":throw await ym(i);case"ItemSizeLimitExceededException":case"com.amazonaws.ssm#ItemSizeLimitExceededException":throw await Um(i);case"TotalSizeLimitExceededException":case"com.amazonaws.ssm#TotalSizeLimitExceededException":throw await _h(i);case"CustomSchemaCountLimitExceededException":case"com.amazonaws.ssm#CustomSchemaCountLimitExceededException":throw await ku(i);case"InvalidInventoryItemContextException":case"com.amazonaws.ssm#InvalidInventoryItemContextException":throw await fm(i);case"ItemContentMismatchException":case"com.amazonaws.ssm#ItemContentMismatchException":throw await Fm(i);case"SubTypeCountLimitExceededException":case"com.amazonaws.ssm#SubTypeCountLimitExceededException":throw await Ih(i);case"UnsupportedInventoryItemContextException":case"com.amazonaws.ssm#UnsupportedInventoryItemContextException":throw await Mh(i);case"UnsupportedInventorySchemaVersionException":case"com.amazonaws.ssm#UnsupportedInventorySchemaVersionException":throw await Nh(i);case"HierarchyLevelLimitExceededException":case"com.amazonaws.ssm#HierarchyLevelLimitExceededException":throw await zu(i);case"HierarchyTypeMismatchException":case"com.amazonaws.ssm#HierarchyTypeMismatchException":throw await Lu(i);case"IncompatiblePolicyException":case"com.amazonaws.ssm#IncompatiblePolicyException":throw await Uu(i);case"InvalidAllowedPatternException":case"com.amazonaws.ssm#InvalidAllowedPatternException":throw await Gu(i);case"InvalidPolicyAttributeException":case"com.amazonaws.ssm#InvalidPolicyAttributeException":throw await Tm(i);case"InvalidPolicyTypeException":case"com.amazonaws.ssm#InvalidPolicyTypeException":throw await km(i);case"ParameterAlreadyExists":case"com.amazonaws.ssm#ParameterAlreadyExists":throw await sh(i);case"ParameterLimitExceeded":case"com.amazonaws.ssm#ParameterLimitExceeded":throw await ah(i);case"ParameterMaxVersionLimitExceeded":case"com.amazonaws.ssm#ParameterMaxVersionLimitExceeded":throw await oh(i);case"ParameterPatternMismatchException":case"com.amazonaws.ssm#ParameterPatternMismatchException":throw await ch(i);case"PoliciesLimitExceededException":case"com.amazonaws.ssm#PoliciesLimitExceededException":throw await dh(i);case"UnsupportedParameterType":case"com.amazonaws.ssm#UnsupportedParameterType":throw await jh(i);case"ResourcePolicyLimitExceededException":case"com.amazonaws.ssm#ResourcePolicyLimitExceededException":throw await Eh(i);case"AlreadyExistsException":case"com.amazonaws.ssm#AlreadyExistsException":throw await hu(i);case"FeatureNotAvailableException":case"com.amazonaws.ssm#FeatureNotAvailableException":throw await ju(i);case"AutomationStepNotFoundException":case"com.amazonaws.ssm#AutomationStepNotFoundException":throw await Iu(i);case"InvalidAutomationSignalException":case"com.amazonaws.ssm#InvalidAutomationSignalException":throw await Xu(i);case"InvalidNotificationConfig":case"com.amazonaws.ssm#InvalidNotificationConfig":throw await wm(i);case"InvalidOutputFolder":case"com.amazonaws.ssm#InvalidOutputFolder":throw await Em(i);case"InvalidRole":case"com.amazonaws.ssm#InvalidRole":throw await Rm(i);case"InvalidAssociation":case"com.amazonaws.ssm#InvalidAssociation":throw await Wu(i);case"AutomationDefinitionNotFoundException":case"com.amazonaws.ssm#AutomationDefinitionNotFoundException":throw await Eu(i);case"AutomationDefinitionVersionNotFoundException":case"com.amazonaws.ssm#AutomationDefinitionVersionNotFoundException":throw await Su(i);case"AutomationExecutionLimitExceededException":case"com.amazonaws.ssm#AutomationExecutionLimitExceededException":throw await Cu(i);case"InvalidAutomationExecutionParametersException":case"com.amazonaws.ssm#InvalidAutomationExecutionParametersException":throw await Qu(i);case"AutomationDefinitionNotApprovedException":case"com.amazonaws.ssm#AutomationDefinitionNotApprovedException":throw await bu(i);case"TargetNotConnected":case"com.amazonaws.ssm#TargetNotConnected":throw await kh(i);case"InvalidAutomationStatusUpdateException":case"com.amazonaws.ssm#InvalidAutomationStatusUpdateException":throw await Ju(i);case"AssociationVersionLimitExceeded":case"com.amazonaws.ssm#AssociationVersionLimitExceeded":throw await wu(i);case"InvalidUpdate":case"com.amazonaws.ssm#InvalidUpdate":throw await zm(i);case"StatusUnchanged":case"com.amazonaws.ssm#StatusUnchanged":throw await Ah(i);case"DocumentVersionLimitExceeded":case"com.amazonaws.ssm#DocumentVersionLimitExceeded":throw await Ru(i);case"DuplicateDocumentContent":case"com.amazonaws.ssm#DuplicateDocumentContent":throw await Mu(i);case"DuplicateDocumentVersionName":case"com.amazonaws.ssm#DuplicateDocumentVersionName":throw await Nu(i);case"OpsMetadataKeyLimitExceededException":case"com.amazonaws.ssm#OpsMetadataKeyLimitExceededException":throw await eh(i);case"ResourceDataSyncConflictException":case"com.amazonaws.ssm#ResourceDataSyncConflictException":throw await mh(i);default:const t=i.body;return qh({output:e,parsedBody:t,errorCode:n})}},hu=async(e,t)=>{const i=e.body,n=Wi(i),s=new Fl({$metadata:Hh(e),...n});return Ai(s,i)},fu=async(e,t)=>{const i=e.body,n=Wi(i),s=new Ip({$metadata:Hh(e),...n});return Ai(s,i)},gu=async(e,t)=>{const i=e.body,n=Wi(i),s=new Jl({$metadata:Hh(e),...n});return Ai(s,i)},yu=async(e,t)=>{const i=e.body,n=Wi(i),s=new Ap({$metadata:Hh(e),...n});return Ai(s,i)},xu=async(e,t)=>{const i=e.body,n=Wi(i),s=new Vp({$metadata:Hh(e),...n});return Ai(s,i)},vu=async(e,t)=>{const i=e.body,n=Wi(i),s=new Yl({$metadata:Hh(e),...n});return Ai(s,i)},wu=async(e,t)=>{const i=e.body,n=Wi(i),s=new tu({$metadata:Hh(e),...n});return Ai(s,i)},bu=async(e,t)=>{const i=e.body,n=Wi(i),s=new Yd({$metadata:Hh(e),...n});return Ai(s,i)},Eu=async(e,t)=>{const i=e.body,n=Wi(i),s=new Vd({$metadata:Hh(e),...n});return Ai(s,i)},Su=async(e,t)=>{const i=e.body,n=Wi(i),s=new Gd({$metadata:Hh(e),...n});return Ai(s,i)},Cu=async(e,t)=>{const i=e.body,n=Wi(i),s=new Wd({$metadata:Hh(e),...n});return Ai(s,i)},Au=async(e,t)=>{const i=e.body,n=Wi(i),s=new Kp({$metadata:Hh(e),...n});return Ai(s,i)},Iu=async(e,t)=>{const i=e.body,n=Wi(i),s=new Ld({$metadata:Hh(e),...n});return Ai(s,i)},Tu=async(e,t)=>{const i=e.body,n=Wi(i),s=new fd({$metadata:Hh(e),...n});return Ai(s,i)},ku=async(e,t)=>{const i=e.body,n=Wi(i),s=new vd({$metadata:Hh(e),...n});return Ai(s,i)},Ou=async(e,t)=>{const i=e.body,n=Wi(i),s=new rp({$metadata:Hh(e),...n});return Ai(s,i)},Pu=async(e,t)=>{const i=e.body,n=Wi(i),s=new cp({$metadata:Hh(e),...n});return Ai(s,i)},_u=async(e,t)=>{const i=e.body,n=Wi(i),s=new hd({$metadata:Hh(e),...n});return Ai(s,i)},Ru=async(e,t)=>{const i=e.body,n=Wi(i),s=new su({$metadata:Hh(e),...n});return Ai(s,i)},$u=async(e,t)=>{const i=e.body,n=Wi(i),s=new Ql({$metadata:Hh(e),...n});return Ai(s,i)},Mu=async(e,t)=>{const i=e.body,n=Wi(i),s=new au({$metadata:Hh(e),...n});return Ai(s,i)},Nu=async(e,t)=>{const i=e.body,n=Wi(i),s=new ou({$metadata:Hh(e),...n});return Ai(s,i)},Du=async(e,t)=>{const i=e.body,n=Wi(i),s=new Gl({$metadata:Hh(e),...n});return Ai(s,i)},ju=async(e,t)=>{const i=e.body,n=Wi(i),s=new zd({$metadata:Hh(e),...n});return Ai(s,i)},zu=async(e,t)=>{const i=e.body,n=Wi(i),s=new Ad({$metadata:Hh(e),...n});return Ai(s,i)},Lu=async(e,t)=>{const i=e.body,n=Wi(i),s=new Id({$metadata:Hh(e),...n});return Ai(s,i)},Fu=async(e,t)=>{const i=e.body,n=Wi(i),s=new up({$metadata:Hh(e),...n});return Ai(s,i)},Uu=async(e,t)=>{const i=e.body,n=Wi(i),s=new Td({$metadata:Hh(e),...n});return Ai(s,i)},Bu=async(e,t)=>{const i=e.body,n=Wi(i),s=new Nl({$metadata:Hh(e),...n});return Ai(s,i)},Hu=async(e,t)=>{const i=e.body,n=Wi(i),s=new Sp({$metadata:Hh(e),...n});return Ai(s,i)},qu=async(e,t)=>{const i=e.body,n=Wi(i),s=new Cp({$metadata:Hh(e),...n});return Ai(s,i)},Vu=async(e,t)=>{const i=e.body,n=Wi(i),s=new rd({$metadata:Hh(e),...n});return Ai(s,i)},Gu=async(e,t)=>{const i=e.body,n=Wi(i),s=new kd({$metadata:Hh(e),...n});return Ai(s,i)},Wu=async(e,t)=>{const i=e.body,n=Wi(i),s=new qd({$metadata:Hh(e),...n});return Ai(s,i)},Ku=async(e,t)=>{const i=e.body,n=Wi(i),s=new qp({$metadata:Hh(e),...n});return Ai(s,i)},Qu=async(e,t)=>{const i=e.body,n=Wi(i),s=new Kd({$metadata:Hh(e),...n});return Ai(s,i)},Xu=async(e,t)=>{const i=e.body,n=Wi(i),s=new Fd({$metadata:Hh(e),...n});return Ai(s,i)},Ju=async(e,t)=>{const i=e.body,n=Wi(i),s=new eu({$metadata:Hh(e),...n});return Ai(s,i)},Yu=async(e,t)=>{const i=e.body,n=Wi(i),s=new Wl({$metadata:Hh(e),...n});return Ai(s,i)},Zu=async(e,t)=>{const i=e.body,n=Wi(i),s=new kp({$metadata:Hh(e),...n});return Ai(s,i)},em=async(e,t)=>{const i=e.body,n=Wi(i),s=new Zp({$metadata:Hh(e),...n});return Ai(s,i)},tm=async(e,t)=>{const i=e.body,n=Wi(i),s=new Zl({$metadata:Hh(e),...n});return Ai(s,i)},im=async(e,t)=>{const i=e.body,n=Wi(i),s=new lp({$metadata:Hh(e),...n});return Ai(s,i)},nm=async(e,t)=>{const i=e.body,n=Wi(i),s=new Tp({$metadata:Hh(e),...n});return Ai(s,i)},sm=async(e,t)=>{const i=e.body,n=Wi(i),s=new pp({$metadata:Hh(e),...n});return Ai(s,i)},am=async(e,t)=>{const i=e.body,n=Wi(i),s=new id({$metadata:Hh(e),...n});return Ai(s,i)},om=async(e,t)=>{const i=e.body,n=Wi(i),s=new ep({$metadata:Hh(e),...n});return Ai(s,i)},rm=async(e,t)=>{const i=e.body,n=Wi(i),s=new Bp({$metadata:Hh(e),...n});return Ai(s,i)},cm=async(e,t)=>{const i=e.body,n=Wi(i),s=new Gp({$metadata:Hh(e),...n});return Ai(s,i)},lm=async(e,t)=>{const i=e.body,n=Wi(i),s=new ed({$metadata:Hh(e),...n});return Ai(s,i)},pm=async(e,t)=>{const i=e.body,n=Wi(i),s=new Wp({$metadata:Hh(e),...n});return Ai(s,i)},dm=async(e,t)=>{const i=e.body,n=Wi(i),s=new Kl({$metadata:Hh(e),...n});return Ai(s,i)},um=async(e,t)=>{const i=e.body,n=Wi(i),s=new Jp({$metadata:Hh(e),...n});return Ai(s,i)},mm=async(e,t)=>{const i=e.body,n=Wi(i),s=new Yp({$metadata:Hh(e),...n});return Ai(s,i)},hm=async(e,t)=>{const i=e.body,n=Wi(i),s=new cd({$metadata:Hh(e),...n});return Ai(s,i)},fm=async(e,t)=>{const i=e.body,n=Wi(i),s=new wd({$metadata:Hh(e),...n});return Ai(s,i)},gm=async(e,t)=>{const i=e.body,n=Wi(i),s=new Op({$metadata:Hh(e),...n});return Ai(s,i)},ym=async(e,t)=>{const i=e.body,n=Wi(i),s=new gd({$metadata:Hh(e),...n});return Ai(s,i)},xm=async(e,t)=>{const i=e.body,n=Wi(i),s=new pd({$metadata:Hh(e),...n});return Ai(s,i)},vm=async(e,t)=>{const i=e.body,n=Wi(i),s=new Hp({$metadata:Hh(e),...n});return Ai(s,i)},wm=async(e,t)=>{const i=e.body,n=Wi(i),s=new Ud({$metadata:Hh(e),...n});return Ai(s,i)},bm=async(e,t)=>{const i=e.body,n=Wi(i),s=new Pp({$metadata:Hh(e),...n});return Ai(s,i)},Em=async(e,t)=>{const i=e.body,n=Wi(i),s=new Bd({$metadata:Hh(e),...n});return Ai(s,i)},Sm=async(e,t)=>{const i=e.body,n=Wi(i),s=new tp({$metadata:Hh(e),...n});return Ai(s,i)},Cm=async(e,t)=>{const i=e.body,n=Wi(i),s=new Xl({$metadata:Hh(e),...n});return Ai(s,i)},Am=async(e,t)=>{const i=e.body,n=Wi(i),s=new Qp({$metadata:Hh(e),...n});return Ai(s,i)},Im=async(e,t)=>{const i=e.body,n=Wi(i),s=new sd({$metadata:Hh(e),...n});return Ai(s,i)},Tm=async(e,t)=>{const i=e.body,n=Wi(i),s=new Od({$metadata:Hh(e),...n});return Ai(s,i)},km=async(e,t)=>{const i=e.body,n=Wi(i),s=new Pd({$metadata:Hh(e),...n});return Ai(s,i)},Om=async(e,t)=>{const i=e.body,n=Wi(i),s=new Dl({$metadata:Hh(e),...n});return Ai(s,i)},Pm=async(e,t)=>{const i=e.body,n=Wi(i),s=new jl({$metadata:Hh(e),...n});return Ai(s,i)},_m=async(e,t)=>{const i=e.body,n=Wi(i),s=new ld({$metadata:Hh(e),...n});return Ai(s,i)},Rm=async(e,t)=>{const i=e.body,n=Wi(i),s=new Hd({$metadata:Hh(e),...n});return Ai(s,i)},$m=async(e,t)=>{const i=e.body,n=Wi(i),s=new ip({$metadata:Hh(e),...n});return Ai(s,i)},Mm=async(e,t)=>{const i=e.body,n=Wi(i),s=new np({$metadata:Hh(e),...n});return Ai(s,i)},Nm=async(e,t)=>{const i=e.body,n=Wi(i),s=new sp({$metadata:Hh(e),...n});return Ai(s,i)},Dm=async(e,t)=>{const i=e.body,n=Wi(i),s=new ap({$metadata:Hh(e),...n});return Ai(s,i)},jm=async(e,t)=>{const i=e.body,n=Wi(i),s=new _p({$metadata:Hh(e),...n});return Ai(s,i)},zm=async(e,t)=>{const i=e.body,n=Wi(i),s=new iu({$metadata:Hh(e),...n});return Ai(s,i)},Lm=async(e,t)=>{const i=e.body,n=Wi(i),s=new ad({$metadata:Hh(e),...n});return Ai(s,i)},Fm=async(e,t)=>{const i=e.body,n=Wi(i),s=new bd({$metadata:Hh(e),...n});return Ai(s,i)},Um=async(e,t)=>{const i=e.body,n=Wi(i),s=new yd({$metadata:Hh(e),...n});return Ai(s,i)},Bm=async(e,t)=>{const i=e.body,n=Wi(i),s=new Dp({$metadata:Hh(e),...n});return Ai(s,i)},Hm=async(e,t)=>{const i=e.body,n=Wi(i),s=new dp({$metadata:Hh(e),...n});return Ai(s,i)},qm=async(e,t)=>{const i=e.body,n=Wi(i),s=new hp({$metadata:Hh(e),...n});return Ai(s,i)},Vm=async(e,t)=>{const i=e.body,n=Wi(i),s=new fp({$metadata:Hh(e),...n});return Ai(s,i)},Gm=async(e,t)=>{const i=e.body,n=Wi(i),s=new Ul({$metadata:Hh(e),...n});return Ai(s,i)},Wm=async(e,t)=>{const i=e.body,n=Wi(i),s=new Bl({$metadata:Hh(e),...n});return Ai(s,i)},Km=async(e,t)=>{const i=e.body,n=Wi(i),s=new Hl({$metadata:Hh(e),...n});return Ai(s,i)},Qm=async(e,t)=>{const i=e.body,n=Wi(i),s=new ql({$metadata:Hh(e),...n});return Ai(s,i)},Xm=async(e,t)=>{const i=e.body,n=Wi(i),s=new Vl({$metadata:Hh(e),...n});return Ai(s,i)},Jm=async(e,t)=>{const i=e.body,n=Wi(i),s=new td({$metadata:Hh(e),...n});return Ai(s,i)},Ym=async(e,t)=>{const i=e.body,n=Wi(i),s=new gp({$metadata:Hh(e),...n});return Ai(s,i)},Zm=async(e,t)=>{const i=e.body,n=Wi(i),s=new yp({$metadata:Hh(e),...n});return Ai(s,i)},eh=async(e,t)=>{const i=e.body,n=Wi(i),s=new ru({$metadata:Hh(e),...n});return Ai(s,i)},th=async(e,t)=>{const i=e.body,n=Wi(i),s=new xp({$metadata:Hh(e),...n});return Ai(s,i)},ih=async(e,t)=>{const i=e.body,n=Wi(i),s=new Rp({$metadata:Hh(e),...n});return Ai(s,i)},nh=async(e,t)=>{const i=e.body,n=Wi(i),s=new vp({$metadata:Hh(e),...n});return Ai(s,i)},sh=async(e,t)=>{const i=e.body,n=Wi(i),s=new _d({$metadata:Hh(e),...n});return Ai(s,i)},ah=async(e,t)=>{const i=e.body,n=Wi(i),s=new Rd({$metadata:Hh(e),...n});return Ai(s,i)},oh=async(e,t)=>{const i=e.body,n=Wi(i),s=new $d({$metadata:Hh(e),...n});return Ai(s,i)},rh=async(e,t)=>{const i=e.body,n=Wi(i),s=new $p({$metadata:Hh(e),...n});return Ai(s,i)},ch=async(e,t)=>{const i=e.body,n=Wi(i),s=new Md({$metadata:Hh(e),...n});return Ai(s,i)},lh=async(e,t)=>{const i=e.body,n=Wi(i),s=new md({$metadata:Hh(e),...n});return Ai(s,i)},ph=async(e,t)=>{const i=e.body,n=Wi(i),s=new dd({$metadata:Hh(e),...n});return Ai(s,i)},dh=async(e,t)=>{const i=e.body,n=Wi(i),s=new Nd({$metadata:Hh(e),...n});return Ai(s,i)},uh=async(e,t)=>{const i=e.body,n=Wi(i),s=new wp({$metadata:Hh(e),...n});return Ai(s,i)},mh=async(e,t)=>{const i=e.body,n=Wi(i),s=new cu({$metadata:Hh(e),...n});return Ai(s,i)},hh=async(e,t)=>{const i=e.body,n=Wi(i),s=new bp({$metadata:Hh(e),...n});return Ai(s,i)},fh=async(e,t)=>{const i=e.body,n=Wi(i),s=new Ep({$metadata:Hh(e),...n});return Ai(s,i)},gh=async(e,t)=>{const i=e.body,n=Wi(i),s=new Np({$metadata:Hh(e),...n});return Ai(s,i)},yh=async(e,t)=>{const i=e.body,n=Wi(i),s=new Mp({$metadata:Hh(e),...n});return Ai(s,i)},xh=async(e,t)=>{const i=e.body,n=Wi(i),s=new mp({$metadata:Hh(e),...n});return Ai(s,i)},vh=async(e,t)=>{const i=e.body,n=Wi(i),s=new jp({$metadata:Hh(e),...n});return Ai(s,i)},wh=async(e,t)=>{const i=e.body,n=Wi(i),s=new zp({$metadata:Hh(e),...n});return Ai(s,i)},bh=async(e,t)=>{const i=e.body,n=Wi(i),s=new Lp({$metadata:Hh(e),...n});return Ai(s,i)},Eh=async(e,t)=>{const i=e.body,n=Wi(i),s=new jd({$metadata:Hh(e),...n});return Ai(s,i)},Sh=async(e,t)=>{const i=e.body,n=Wi(i),s=new Fp({$metadata:Hh(e),...n});return Ai(s,i)},Ch=async(e,t)=>{const i=e.body,n=Wi(i),s=new ud({$metadata:Hh(e),...n});return Ai(s,i)},Ah=async(e,t)=>{const i=e.body,n=Wi(i),s=new nu({$metadata:Hh(e),...n});return Ai(s,i)},Ih=async(e,t)=>{const i=e.body,n=Wi(i),s=new Ed({$metadata:Hh(e),...n});return Ai(s,i)},Th=async(e,t)=>{const i=e.body,n=Wi(i),s=new Up({$metadata:Hh(e),...n});return Ai(s,i)},kh=async(e,t)=>{const i=e.body,n=Wi(i),s=new Zd({$metadata:Hh(e),...n});return Ai(s,i)},Oh=async(e,t)=>{const i=e.body,n=Wi(i),s=new zl({$metadata:Hh(e),...n});return Ai(s,i)},Ph=async(e,t)=>{const i=e.body,n=Wi(i),s=new Ll({$metadata:Hh(e),...n});return Ai(s,i)},_h=async(e,t)=>{const i=e.body,n=Wi(i),s=new xd({$metadata:Hh(e),...n});return Ai(s,i)},Rh=async(e,t)=>{const i=e.body,n=Wi(i),s=new nd({$metadata:Hh(e),...n});return Ai(s,i)},$h=async(e,t)=>{const i=e.body,n=Wi(i),s=new od({$metadata:Hh(e),...n});return Ai(s,i)},Mh=async(e,t)=>{const i=e.body,n=Wi(i),s=new Sd({$metadata:Hh(e),...n});return Ai(s,i)},Nh=async(e,t)=>{const i=e.body,n=Wi(i),s=new Cd({$metadata:Hh(e),...n});return Ai(s,i)},Dh=async(e,t)=>{const i=e.body,n=Wi(i),s=new Xp({$metadata:Hh(e),...n});return Ai(s,i)},jh=async(e,t)=>{const i=e.body,n=Wi(i),s=new Dd({$metadata:Hh(e),...n});return Ai(s,i)},zh=async(e,t)=>{const i=e.body,n=Wi(i),s=new op({$metadata:Hh(e),...n});return Ai(s,i)},Lh=(e,t)=>Ui(e,{Parameter:e=>Uh(e)}),Fh=(e,t)=>Ui(e,{InvalidParameters:Wi,Parameters:e=>Bh(e)}),Uh=(e,t)=>Ui(e,{ARN:ai,DataType:ai,LastModifiedDate:e=>si((e=>{if(null==e)return;let t;if("number"==typeof e)t=e;else if("string"==typeof e)t=oi(e);else{if("object"!=typeof e||1!==e.tag)throw new TypeError("Epoch timestamps must be expressed as floating point numbers or their string representation");t=e.value}if(Number.isNaN(t)||t===1/0||t===-1/0)throw new TypeError("Epoch timestamps must be valid, non-Infinite, non-NaN numerics");return new Date(Math.round(1e3*t))})(Xt(e))),Name:ai,Selector:ai,SourceResult:ai,Type:ai,Value:ai,Version:Zt}),Bh=(e,t)=>{const i=(e||[]).filter((e=>null!=e)).map((e=>Uh(e)));return i},Hh=e=>({httpStatusCode:e.statusCode,requestId:e.headers["x-amzn-requestid"]??e.headers["x-amzn-request-id"]??e.headers["x-amz-request-id"],extendedRequestId:e.headers["x-amz-id-2"],cfId:e.headers["x-amz-cf-id"]}),qh=Ii(Ml),Vh=async(e,t,i,n,s)=>{const{hostname:a,protocol:o="https",port:r,path:c}=await e.endpoint(),l={protocol:o,hostname:a,port:r,method:"POST",path:c.endsWith("/")?c.slice(0,-1)+i:c+i,headers:t};return void 0!==s&&(l.body=s),new I(l)};function Gh(e){return{"content-type":"application/x-amz-json-1.1","x-amz-target":`AmazonSSM.${e}`}}class Wh extends(Gt.classBuilder().ep(Xc).m((function(e,t,i,n){return[B(i,this.serialize,this.deserialize),cs(i,e.getEndpointParameterInstructions())]})).s("AmazonSSM","GetParameter",{}).n("SSMClient","GetParameterCommand").f(void 0,Xd).ser(lu).de(du).build()){}class Kh extends(Gt.classBuilder().ep(Xc).m((function(e,t,i,n){return[B(i,this.serialize,this.deserialize),cs(i,e.getEndpointParameterInstructions())]})).s("AmazonSSM","GetParameters",{}).n("SSMClient","GetParametersCommand").f(void 0,Jd).ser(pu).de(uu).build()){}const Qh={clientConfig:bc,onlyDefault:!1,prefix:process.env.SSM_PARAM_PATH},Xh=async(e,t,i)=>({operation:N(t).operation,region:await D(e.region)()||(()=>{throw new Error("expected `region` to be configured for `aws.auth#sigv4`")})()});const Jh=e=>{const t=[];return e.operation,t.push(function(e){return{schemeId:"aws.auth#sigv4",signingProperties:{name:"ses",region:e.region},propertiesExtractor:(e,t)=>({signingProperties:{config:e,context:t}})}}(e)),t},Yh={UseFIPS:{type:"builtInParams",name:"useFipsEndpoint"},Endpoint:{type:"builtInParams",name:"endpoint"},Region:{type:"builtInParams",name:"region"},UseDualStack:{type:"builtInParams",name:"useDualstackEndpoint"}};var Zh="3.687.0";const ef="required",tf="fn",nf="argv",sf="ref",af=!0,of="isSet",rf="booleanEquals",cf="error",lf="endpoint",pf="tree",df="PartitionResult",uf={[ef]:!1,type:"String"},mf={[ef]:!0,default:!1,type:"Boolean"},hf={[sf]:"Endpoint"},ff={[tf]:rf,[nf]:[{[sf]:"UseFIPS"},!0]},gf={[tf]:rf,[nf]:[{[sf]:"UseDualStack"},!0]},yf={},xf={[tf]:"getAttr",[nf]:[{[sf]:df},"supportsFIPS"]},vf={[tf]:rf,[nf]:[!0,{[tf]:"getAttr",[nf]:[{[sf]:df},"supportsDualStack"]}]},wf=[ff],bf=[gf],Ef=[{[sf]:"Region"}],Sf={version:"1.0",parameters:{Region:uf,UseDualStack:mf,UseFIPS:mf,Endpoint:uf},rules:[{conditions:[{[tf]:of,[nf]:[hf]}],rules:[{conditions:wf,error:"Invalid Configuration: FIPS and custom endpoint are not supported",type:cf},{conditions:bf,error:"Invalid Configuration: Dualstack and custom endpoint are not supported",type:cf},{endpoint:{url:hf,properties:yf,headers:yf},type:lf}],type:pf},{conditions:[{[tf]:of,[nf]:Ef}],rules:[{conditions:[{[tf]:"aws.partition",[nf]:Ef,assign:df}],rules:[{conditions:[ff,gf],rules:[{conditions:[{[tf]:rf,[nf]:[af,xf]},vf],rules:[{endpoint:{url:"https://email-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:yf,headers:yf},type:lf}],type:pf},{error:"FIPS and DualStack are enabled, but this partition does not support one or both",type:cf}],type:pf},{conditions:wf,rules:[{conditions:[{[tf]:rf,[nf]:[xf,af]}],rules:[{endpoint:{url:"https://email-fips.{Region}.{PartitionResult#dnsSuffix}",properties:yf,headers:yf},type:lf}],type:pf},{error:"FIPS is enabled but this partition does not support FIPS",type:cf}],type:pf},{conditions:bf,rules:[{conditions:[vf],rules:[{endpoint:{url:"https://email.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:yf,headers:yf},type:lf}],type:pf},{error:"DualStack is enabled but this partition does not support DualStack",type:cf}],type:pf},{endpoint:{url:"https://email.{Region}.{PartitionResult#dnsSuffix}",properties:yf,headers:yf},type:lf}],type:pf}],type:pf},{error:"Invalid Configuration: Missing Region",type:cf}]},Cf=new Ie({size:50,params:["Endpoint","Region","UseDualStack","UseFIPS"]}),Af=(e,t={})=>Cf.get(e,(()=>Je(Sf,{endpointParams:e,logger:t.logger})));_e.aws=et;const If=e=>{const t=mo(e),i=()=>t().then(ki),n=(e=>({apiVersion:"2010-12-01",base64Decoder:e?.base64Decoder??Z,base64Encoder:e?.base64Encoder??ne,disableHostPrefix:e?.disableHostPrefix??!1,endpointProvider:e?.endpointProvider??Af,extensions:e?.extensions??[],httpAuthSchemeProvider:e?.httpAuthSchemeProvider??Jh,httpAuthSchemes:e?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:e=>e.getIdentityProvider("aws.auth#sigv4"),signer:new ot}],logger:e?.logger??new Li,serviceId:e?.serviceId??"SES",urlParser:e?.urlParser??ns,utf8Decoder:e?.utf8Decoder??ee,utf8Encoder:e?.utf8Encoder??ie}))(e);return{...n,...e,runtime:"browser",defaultsMode:t,bodyLengthChecker:e?.bodyLengthChecker??La,credentialDefaultProvider:e?.credentialDefaultProvider??(e=>()=>Promise.reject(new Error("Credential is missing"))),defaultUserAgentProvider:e?.defaultUserAgentProvider??pa({serviceId:n.serviceId,clientVersion:Zh}),maxAttempts:e?.maxAttempts??3,region:e?.region??ja("Region is missing"),requestHandler:pe.create(e?.requestHandler??i),retryMode:e?.retryMode??(async()=>(await i()).retryMode||ds),sha256:e?.sha256??oa,streamCollector:e?.streamCollector??de,useDualstackEndpoint:e?.useDualstackEndpoint??(()=>Promise.resolve(Bn)),useFipsEndpoint:e?.useFipsEndpoint??(()=>Promise.resolve(Hn))}},Tf=e=>{const t=e.httpAuthSchemes;let i=e.httpAuthSchemeProvider,n=e.credentials;return{setHttpAuthScheme(e){const i=t.findIndex((t=>t.schemeId===e.schemeId));-1===i?t.push(e):t.splice(i,1,e)},httpAuthSchemes:()=>t,setHttpAuthSchemeProvider(e){i=e},httpAuthSchemeProvider:()=>i,setCredentials(e){n=e},credentials:()=>n}};class kf extends Vt{constructor(...[e]){const t=If(e||{});var i;const n=Ae((i=t,{...i,useDualstackEndpoint:i.useDualstackEndpoint??!1,useFipsEndpoint:i.useFipsEndpoint??!1,defaultSigningName:"ses"})),s=ks(n),a=Gn(s),o=ls(a);const r=((e,t)=>{const i={...go(e),...$i(e),...g(e),...Tf(e)};return t.forEach((e=>e.configure(i))),{...e,...yo(i),...Mi(i),...y(i),...(n=i,{httpAuthSchemes:n.httpAuthSchemes(),httpAuthSchemeProvider:n.httpAuthSchemeProvider(),credentials:n.credentials()})};var n})({...Lt(o)},e?.extensions||[]);super(r),this.config=r,this.middlewareStack.use(Fn(this.config)),this.middlewareStack.use(Ms(this.config)),this.middlewareStack.use(Qn(this.config)),this.middlewareStack.use(O(this.config)),this.middlewareStack.use(_(this.config)),this.middlewareStack.use(M(this.config)),this.middlewareStack.use(L(this.config,{httpAuthSchemeParametersProvider:Xh,identityProviderConfigProvider:async e=>new we({"aws.auth#sigv4":e.credentials})})),this.middlewareStack.use(G(this.config))}destroy(){super.destroy()}}class Of extends Ci{constructor(e){super(e),Object.setPrototypeOf(this,Of.prototype)}}class Pf extends Of{constructor(e){super({name:"AccountSendingPausedException",$fault:"client",...e}),this.name="AccountSendingPausedException",this.$fault="client",Object.setPrototypeOf(this,Pf.prototype)}}class _f extends Of{constructor(e){super({name:"AlreadyExistsException",$fault:"client",...e}),this.name="AlreadyExistsException",this.$fault="client",Object.setPrototypeOf(this,_f.prototype),this.Name=e.Name}}class Rf extends Of{constructor(e){super({name:"CannotDeleteException",$fault:"client",...e}),this.name="CannotDeleteException",this.$fault="client",Object.setPrototypeOf(this,Rf.prototype),this.Name=e.Name}}class $f extends Of{constructor(e){super({name:"LimitExceededException",$fault:"client",...e}),this.name="LimitExceededException",this.$fault="client",Object.setPrototypeOf(this,$f.prototype)}}class Mf extends Of{constructor(e){super({name:"RuleSetDoesNotExistException",$fault:"client",...e}),this.name="RuleSetDoesNotExistException",this.$fault="client",Object.setPrototypeOf(this,Mf.prototype),this.Name=e.Name}}class Nf extends Of{constructor(e){super({name:"ConfigurationSetAlreadyExistsException",$fault:"client",...e}),this.name="ConfigurationSetAlreadyExistsException",this.$fault="client",Object.setPrototypeOf(this,Nf.prototype),this.ConfigurationSetName=e.ConfigurationSetName}}class Df extends Of{constructor(e){super({name:"ConfigurationSetDoesNotExistException",$fault:"client",...e}),this.name="ConfigurationSetDoesNotExistException",this.$fault="client",Object.setPrototypeOf(this,Df.prototype),this.ConfigurationSetName=e.ConfigurationSetName}}class jf extends Of{constructor(e){super({name:"ConfigurationSetSendingPausedException",$fault:"client",...e}),this.name="ConfigurationSetSendingPausedException",this.$fault="client",Object.setPrototypeOf(this,jf.prototype),this.ConfigurationSetName=e.ConfigurationSetName}}class zf extends Of{constructor(e){super({name:"InvalidConfigurationSetException",$fault:"client",...e}),this.name="InvalidConfigurationSetException",this.$fault="client",Object.setPrototypeOf(this,zf.prototype)}}class Lf extends Of{constructor(e){super({name:"EventDestinationAlreadyExistsException",$fault:"client",...e}),this.name="EventDestinationAlreadyExistsException",this.$fault="client",Object.setPrototypeOf(this,Lf.prototype),this.ConfigurationSetName=e.ConfigurationSetName,this.EventDestinationName=e.EventDestinationName}}class Ff extends Of{constructor(e){super({name:"InvalidCloudWatchDestinationException",$fault:"client",...e}),this.name="InvalidCloudWatchDestinationException",this.$fault="client",Object.setPrototypeOf(this,Ff.prototype),this.ConfigurationSetName=e.ConfigurationSetName,this.EventDestinationName=e.EventDestinationName}}class Uf extends Of{constructor(e){super({name:"InvalidFirehoseDestinationException",$fault:"client",...e}),this.name="InvalidFirehoseDestinationException",this.$fault="client",Object.setPrototypeOf(this,Uf.prototype),this.ConfigurationSetName=e.ConfigurationSetName,this.EventDestinationName=e.EventDestinationName}}class Bf extends Of{constructor(e){super({name:"InvalidSNSDestinationException",$fault:"client",...e}),this.name="InvalidSNSDestinationException",this.$fault="client",Object.setPrototypeOf(this,Bf.prototype),this.ConfigurationSetName=e.ConfigurationSetName,this.EventDestinationName=e.EventDestinationName}}class Hf extends Of{constructor(e){super({name:"InvalidTrackingOptionsException",$fault:"client",...e}),this.name="InvalidTrackingOptionsException",this.$fault="client",Object.setPrototypeOf(this,Hf.prototype)}}class qf extends Of{constructor(e){super({name:"TrackingOptionsAlreadyExistsException",$fault:"client",...e}),this.name="TrackingOptionsAlreadyExistsException",this.$fault="client",Object.setPrototypeOf(this,qf.prototype),this.ConfigurationSetName=e.ConfigurationSetName}}class Vf extends Of{constructor(e){super({name:"CustomVerificationEmailInvalidContentException",$fault:"client",...e}),this.name="CustomVerificationEmailInvalidContentException",this.$fault="client",Object.setPrototypeOf(this,Vf.prototype)}}class Gf extends Of{constructor(e){super({name:"CustomVerificationEmailTemplateAlreadyExistsException",$fault:"client",...e}),this.name="CustomVerificationEmailTemplateAlreadyExistsException",this.$fault="client",Object.setPrototypeOf(this,Gf.prototype),this.CustomVerificationEmailTemplateName=e.CustomVerificationEmailTemplateName}}class Wf extends Of{constructor(e){super({name:"FromEmailAddressNotVerifiedException",$fault:"client",...e}),this.name="FromEmailAddressNotVerifiedException",this.$fault="client",Object.setPrototypeOf(this,Wf.prototype),this.FromEmailAddress=e.FromEmailAddress}}class Kf extends Of{constructor(e){super({name:"InvalidLambdaFunctionException",$fault:"client",...e}),this.name="InvalidLambdaFunctionException",this.$fault="client",Object.setPrototypeOf(this,Kf.prototype),this.FunctionArn=e.FunctionArn}}class Qf extends Of{constructor(e){super({name:"InvalidS3ConfigurationException",$fault:"client",...e}),this.name="InvalidS3ConfigurationException",this.$fault="client",Object.setPrototypeOf(this,Qf.prototype),this.Bucket=e.Bucket}}class Xf extends Of{constructor(e){super({name:"InvalidSnsTopicException",$fault:"client",...e}),this.name="InvalidSnsTopicException",this.$fault="client",Object.setPrototypeOf(this,Xf.prototype),this.Topic=e.Topic}}class Jf extends Of{constructor(e){super({name:"RuleDoesNotExistException",$fault:"client",...e}),this.name="RuleDoesNotExistException",this.$fault="client",Object.setPrototypeOf(this,Jf.prototype),this.Name=e.Name}}class Yf extends Of{constructor(e){super({name:"InvalidTemplateException",$fault:"client",...e}),this.name="InvalidTemplateException",this.$fault="client",Object.setPrototypeOf(this,Yf.prototype),this.TemplateName=e.TemplateName}}class Zf extends Of{constructor(e){super({name:"CustomVerificationEmailTemplateDoesNotExistException",$fault:"client",...e}),this.name="CustomVerificationEmailTemplateDoesNotExistException",this.$fault="client",Object.setPrototypeOf(this,Zf.prototype),this.CustomVerificationEmailTemplateName=e.CustomVerificationEmailTemplateName}}class eg extends Of{constructor(e){super({name:"EventDestinationDoesNotExistException",$fault:"client",...e}),this.name="EventDestinationDoesNotExistException",this.$fault="client",Object.setPrototypeOf(this,eg.prototype),this.ConfigurationSetName=e.ConfigurationSetName,this.EventDestinationName=e.EventDestinationName}}class tg extends Of{constructor(e){super({name:"TrackingOptionsDoesNotExistException",$fault:"client",...e}),this.name="TrackingOptionsDoesNotExistException",this.$fault="client",Object.setPrototypeOf(this,tg.prototype),this.ConfigurationSetName=e.ConfigurationSetName}}class ig extends Of{constructor(e){super({name:"TemplateDoesNotExistException",$fault:"client",...e}),this.name="TemplateDoesNotExistException",this.$fault="client",Object.setPrototypeOf(this,ig.prototype),this.TemplateName=e.TemplateName}}class ng extends Of{constructor(e){super({name:"InvalidDeliveryOptionsException",$fault:"client",...e}),this.name="InvalidDeliveryOptionsException",this.$fault="client",Object.setPrototypeOf(this,ng.prototype)}}class sg extends Of{constructor(e){super({name:"InvalidPolicyException",$fault:"client",...e}),this.name="InvalidPolicyException",this.$fault="client",Object.setPrototypeOf(this,sg.prototype)}}class ag extends Of{constructor(e){super({name:"InvalidRenderingParameterException",$fault:"client",...e}),this.name="InvalidRenderingParameterException",this.$fault="client",Object.setPrototypeOf(this,ag.prototype),this.TemplateName=e.TemplateName}}class og extends Of{constructor(e){super({name:"MailFromDomainNotVerifiedException",$fault:"client",...e}),this.name="MailFromDomainNotVerifiedException",this.$fault="client",Object.setPrototypeOf(this,og.prototype)}}class rg extends Of{constructor(e){super({name:"MessageRejected",$fault:"client",...e}),this.name="MessageRejected",this.$fault="client",Object.setPrototypeOf(this,rg.prototype)}}class cg extends Of{constructor(e){super({name:"MissingRenderingAttributeException",$fault:"client",...e}),this.name="MissingRenderingAttributeException",this.$fault="client",Object.setPrototypeOf(this,cg.prototype),this.TemplateName=e.TemplateName}}class lg extends Of{constructor(e){super({name:"ProductionAccessNotGrantedException",$fault:"client",...e}),this.name="ProductionAccessNotGrantedException",this.$fault="client",Object.setPrototypeOf(this,lg.prototype)}}const pg=async(e,t)=>{const i=LS;let n;return n=bk({...kv(e),[US]:mC,[rk]:FS}),zS(t,i,"/",void 0,n)},dg=async(e,t)=>{const i=LS;let n;return n=bk({...$v(e),[US]:oC,[rk]:FS}),zS(t,i,"/",void 0,n)},ug=async(e,t)=>{const i=LS;let n;return n=bk({...Rv(e),[US]:rC,[rk]:FS}),zS(t,i,"/",void 0,n)},mg=async(e,t)=>{const i=LS;let n;return n=bk({...Mv(e),[US]:cC,[rk]:FS}),zS(t,i,"/",void 0,n)},hg=async(e,t)=>{const i=LS;let n;return n=bk({...Nv(e),[US]:lC,[rk]:FS}),zS(t,i,"/",void 0,n)},fg=async(e,t)=>{const i=LS;let n;return n=bk({...Dv(e),[US]:dC,[rk]:FS}),zS(t,i,"/",void 0,n)},gg=async(e,t)=>{const i=LS;let n;return n=bk({...jv(e),[US]:uC,[rk]:FS}),zS(t,i,"/",void 0,n)},yg=async(e,t)=>{const i=LS;let n;return n=bk({...zv(e),[US]:hC,[rk]:FS}),zS(t,i,"/",void 0,n)},xg=async(e,t)=>{const i=LS;let n;return n=bk({...Lv(e),[US]:vC,[rk]:FS}),zS(t,i,"/",void 0,n)},vg=async(e,t)=>{const i=LS;let n;return n=bk({...Uv(e),[US]:RC,[rk]:FS}),zS(t,i,"/",void 0,n)},wg=async(e,t)=>{const i=LS;let n;return n=bk({...Fv(e),[US]:$C,[rk]:FS}),zS(t,i,"/",void 0,n)},bg=async(e,t)=>{const i=LS;let n;return n=bk({...Bv(e),[US]:MC,[rk]:FS}),zS(t,i,"/",void 0,n)},Eg=async(e,t)=>{const i=LS;let n;return n=bk({...Hv(e),[US]:DC,[rk]:FS}),zS(t,i,"/",void 0,n)},Sg=async(e,t)=>{const i=LS;let n;return n=bk({...Vv(e),[US]:FC,[rk]:FS}),zS(t,i,"/",void 0,n)},Cg=async(e,t)=>{const i=LS;let n;return n=bk({...qv(e),[US]:UC,[rk]:FS}),zS(t,i,"/",void 0,n)},Ag=async(e,t)=>{const i=LS;let n;return n=bk({...Gv(e),[US]:qC,[rk]:FS}),zS(t,i,"/",void 0,n)},Ig=async(e,t)=>{const i=LS;let n;return n=bk({...Wv(e),[US]:VC,[rk]:FS}),zS(t,i,"/",void 0,n)},Tg=async(e,t)=>{const i=LS;let n;return n=bk({...Kv(e),[US]:GC,[rk]:FS}),zS(t,i,"/",void 0,n)},kg=async(e,t)=>{const i=LS;let n;return n=bk({...Qv(e),[US]:XC,[rk]:FS}),zS(t,i,"/",void 0,n)},Og=async(e,t)=>{const i=LS;let n;return n=bk({...Xv(e),[US]:tA,[rk]:FS}),zS(t,i,"/",void 0,n)},Pg=async(e,t)=>{const i=LS;let n;return n=bk({...Jv(),[US]:OC,[rk]:FS}),zS(t,i,"/",void 0,n)},_g=async(e,t)=>{const i=LS;let n;return n=bk({...Yv(e),[US]:NC,[rk]:FS}),zS(t,i,"/",void 0,n)},Rg=async(e,t)=>{const i=LS;let n;return n=bk({...Zv(e),[US]:KC,[rk]:FS}),zS(t,i,"/",void 0,n)},$g=async(e,t)=>{const i=LS;let n;return n=bk({...ew(e),[US]:WC,[rk]:FS}),zS(t,i,"/",void 0,n)},Mg=async(e,t)=>{const i=LS,n=bk({[US]:AA,[rk]:FS});return zS(t,i,"/",void 0,n)},Ng=async(e,t)=>{const i=LS;let n;return n=bk({...ow(e),[US]:IA,[rk]:FS}),zS(t,i,"/",void 0,n)},Dg=async(e,t)=>{const i=LS;let n;return n=bk({...rw(e),[US]:TA,[rk]:FS}),zS(t,i,"/",void 0,n)},jg=async(e,t)=>{const i=LS;let n;return n=bk({...cw(e),[US]:kA,[rk]:FS}),zS(t,i,"/",void 0,n)},zg=async(e,t)=>{const i=LS;let n;return n=bk({...lw(e),[US]:OA,[rk]:FS}),zS(t,i,"/",void 0,n)},Lg=async(e,t)=>{const i=LS;let n;return n=bk({...pw(e),[US]:PA,[rk]:FS}),zS(t,i,"/",void 0,n)},Fg=async(e,t)=>{const i=LS;let n;return n=bk({...dw(e),[US]:_A,[rk]:FS}),zS(t,i,"/",void 0,n)},Ug=async(e,t)=>{const i=LS,n=bk({[US]:RA,[rk]:FS});return zS(t,i,"/",void 0,n)},Bg=async(e,t)=>{const i=LS,n=bk({[US]:$A,[rk]:FS});return zS(t,i,"/",void 0,n)},Hg=async(e,t)=>{const i=LS;let n;return n=bk({...uw(e),[US]:MA,[rk]:FS}),zS(t,i,"/",void 0,n)},qg=async(e,t)=>{const i=LS;let n;return n=bk({...fw(e),[US]:ZA,[rk]:FS}),zS(t,i,"/",void 0,n)},Vg=async(e,t)=>{const i=LS;let n;return n=bk({...gw(e),[US]:eI,[rk]:FS}),zS(t,i,"/",void 0,n)},Gg=async(e,t)=>{const i=LS;let n;return n=bk({...yw(e),[US]:iI,[rk]:FS}),zS(t,i,"/",void 0,n)},Wg=async(e,t)=>{const i=LS;let n;return n=bk({...xw(e),[US]:nI,[rk]:FS}),zS(t,i,"/",void 0,n)},Kg=async(e,t)=>{const i=LS;let n;return n=bk({...vw(),[US]:sI,[rk]:FS}),zS(t,i,"/",void 0,n)},Qg=async(e,t)=>{const i=LS;let n;return n=bk({...ww(e),[US]:aI,[rk]:FS}),zS(t,i,"/",void 0,n)},Xg=async(e,t)=>{const i=LS;let n;return n=bk({...bw(e),[US]:oI,[rk]:FS}),zS(t,i,"/",void 0,n)},Jg=async(e,t)=>{const i=LS,n=bk({[US]:rI,[rk]:FS});return zS(t,i,"/",void 0,n)},Yg=async(e,t)=>{const i=LS;let n;return n=bk({...Iw(e),[US]:OI,[rk]:FS}),zS(t,i,"/",void 0,n)},Zg=async(e,t)=>{const i=LS;let n;return n=bk({...Tw(e),[US]:PI,[rk]:FS}),zS(t,i,"/",void 0,n)},ey=async(e,t)=>{const i=LS;let n;return n=bk({...Mw(e),[US]:GI,[rk]:FS}),zS(t,i,"/",void 0,n)},ty=async(e,t)=>{const i=LS;let n;return n=bk({...Dw(e),[US]:cT,[rk]:FS}),zS(t,i,"/",void 0,n)},iy=async(e,t)=>{const i=LS;let n;return n=bk({...jw(e),[US]:lT,[rk]:FS}),zS(t,i,"/",void 0,n)},ny=async(e,t)=>{const i=LS;let n;return n=bk({...zw(e),[US]:dT,[rk]:FS}),zS(t,i,"/",void 0,n)},sy=async(e,t)=>{const i=LS;let n;return n=bk({...Lw(e),[US]:mT,[rk]:FS}),zS(t,i,"/",void 0,n)},ay=async(e,t)=>{const i=LS;let n;return n=bk({...Fw(e,t),[US]:IT,[rk]:FS}),zS(t,i,"/",void 0,n)},oy=async(e,t)=>{const i=LS;let n;return n=bk({...Uw(e),[US]:PT,[rk]:FS}),zS(t,i,"/",void 0,n)},ry=async(e,t)=>{const i=LS;let n;return n=bk({...Bw(e),[US]:aT,[rk]:FS}),zS(t,i,"/",void 0,n)},cy=async(e,t)=>{const i=LS;let n;return n=bk({...Hw(e),[US]:gT,[rk]:FS}),zS(t,i,"/",void 0,n)},ly=async(e,t)=>{const i=LS;let n;return n=bk({...qw(e),[US]:yT,[rk]:FS}),zS(t,i,"/",void 0,n)},py=async(e,t)=>{const i=LS;let n;return n=bk({...Vw(e),[US]:xT,[rk]:FS}),zS(t,i,"/",void 0,n)},dy=async(e,t)=>{const i=LS;let n;return n=bk({...Gw(e),[US]:vT,[rk]:FS}),zS(t,i,"/",void 0,n)},uy=async(e,t)=>{const i=LS;let n;return n=bk({...Ww(e),[US]:wT,[rk]:FS}),zS(t,i,"/",void 0,n)},my=async(e,t)=>{const i=LS;let n;return n=bk({...Kw(e),[US]:TT,[rk]:FS}),zS(t,i,"/",void 0,n)},hy=async(e,t)=>{const i=LS;let n;return n=bk({...Zw(e),[US]:WT,[rk]:FS}),zS(t,i,"/",void 0,n)},fy=async(e,t)=>{const i=LS;let n;return n=bk({...tb(e),[US]:ZT,[rk]:FS}),zS(t,i,"/",void 0,n)},gy=async(e,t)=>{const i=LS;let n;return n=bk({...ib(e),[US]:ek,[rk]:FS}),zS(t,i,"/",void 0,n)},yy=async(e,t)=>{const i=LS;let n;return n=bk({...nb(e),[US]:tk,[rk]:FS}),zS(t,i,"/",void 0,n)},xy=async(e,t)=>{const i=LS;let n;return n=bk({...sb(e),[US]:ik,[rk]:FS}),zS(t,i,"/",void 0,n)},vy=async(e,t)=>{const i=LS;let n;return n=bk({...ab(e),[US]:nk,[rk]:FS}),zS(t,i,"/",void 0,n)},wy=async(e,t)=>{const i=LS;let n;return n=bk({...ob(e),[US]:sk,[rk]:FS}),zS(t,i,"/",void 0,n)},by=async(e,t)=>{const i=LS;let n;return n=bk({...rb(e),[US]:ak,[rk]:FS}),zS(t,i,"/",void 0,n)},Ey=async(e,t)=>{const i=LS;let n;return n=bk({...cb(e),[US]:ok,[rk]:FS}),zS(t,i,"/",void 0,n)},Sy=async(e,t)=>{const i=LS;let n;return n=bk({...lb(e),[US]:lk,[rk]:FS}),zS(t,i,"/",void 0,n)},Cy=async(e,t)=>{const i=LS;let n;return n=bk({...pb(e),[US]:pk,[rk]:FS}),zS(t,i,"/",void 0,n)},Ay=async(e,t)=>{const i=LS;let n;return n=bk({...db(e),[US]:dk,[rk]:FS}),zS(t,i,"/",void 0,n)},Iy=async(e,t)=>{const i=LS;let n;return n=bk({...ub(e),[US]:mk,[rk]:FS}),zS(t,i,"/",void 0,n)},Ty=async(e,t)=>{if(e.statusCode>=300)return qx(e,t);const i=await Pn(e.body,t);let n={};n=xb(i.CloneReceiptRuleSetResult);return{$metadata:DS(e),...n}},ky=async(e,t)=>{if(e.statusCode>=300)return qx(e,t);const i=await Pn(e.body,t);let n={};n=Ab(i.CreateConfigurationSetResult);return{$metadata:DS(e),...n}},Oy=async(e,t)=>{if(e.statusCode>=300)return qx(e,t);const i=await Pn(e.body,t);let n={};n=Cb(i.CreateConfigurationSetEventDestinationResult);return{$metadata:DS(e),...n}},Py=async(e,t)=>{if(e.statusCode>=300)return qx(e,t);const i=await Pn(e.body,t);let n={};n=Ib(i.CreateConfigurationSetTrackingOptionsResult);return{$metadata:DS(e),...n}},_y=async(e,t)=>{if(e.statusCode>=300)return qx(e,t);await ge(e.body,t);return{$metadata:DS(e)}},Ry=async(e,t)=>{if(e.statusCode>=300)return qx(e,t);const i=await Pn(e.body,t);let n={};n=Tb(i.CreateReceiptFilterResult);return{$metadata:DS(e),...n}},$y=async(e,t)=>{if(e.statusCode>=300)return qx(e,t);const i=await Pn(e.body,t);let n={};n=kb(i.CreateReceiptRuleResult);return{$metadata:DS(e),...n}},My=async(e,t)=>{if(e.statusCode>=300)return qx(e,t);const i=await Pn(e.body,t);let n={};n=Ob(i.CreateReceiptRuleSetResult);return{$metadata:DS(e),...n}},Ny=async(e,t)=>{if(e.statusCode>=300)return qx(e,t);const i=await Pn(e.body,t);let n={};n=Pb(i.CreateTemplateResult);return{$metadata:DS(e),...n}},Dy=async(e,t)=>{if(e.statusCode>=300)return qx(e,t);const i=await Pn(e.body,t);let n={};n=Db(i.DeleteConfigurationSetResult);return{$metadata:DS(e),...n}},jy=async(e,t)=>{if(e.statusCode>=300)return qx(e,t);const i=await Pn(e.body,t);let n={};n=Nb(i.DeleteConfigurationSetEventDestinationResult);return{$metadata:DS(e),...n}},zy=async(e,t)=>{if(e.statusCode>=300)return qx(e,t);const i=await Pn(e.body,t);let n={};n=jb(i.DeleteConfigurationSetTrackingOptionsResult);return{$metadata:DS(e),...n}},Ly=async(e,t)=>{if(e.statusCode>=300)return qx(e,t);await ge(e.body,t);return{$metadata:DS(e)}},Fy=async(e,t)=>{if(e.statusCode>=300)return qx(e,t);const i=await Pn(e.body,t);let n={};n=Lb(i.DeleteIdentityResult);return{$metadata:DS(e),...n}},Uy=async(e,t)=>{if(e.statusCode>=300)return qx(e,t);const i=await Pn(e.body,t);let n={};n=zb(i.DeleteIdentityPolicyResult);return{$metadata:DS(e),...n}},By=async(e,t)=>{if(e.statusCode>=300)return qx(e,t);const i=await Pn(e.body,t);let n={};n=Fb(i.DeleteReceiptFilterResult);return{$metadata:DS(e),...n}},Hy=async(e,t)=>{if(e.statusCode>=300)return qx(e,t);const i=await Pn(e.body,t);let n={};n=Ub(i.DeleteReceiptRuleResult);return{$metadata:DS(e),...n}},qy=async(e,t)=>{if(e.statusCode>=300)return qx(e,t);const i=await Pn(e.body,t);let n={};n=Bb(i.DeleteReceiptRuleSetResult);return{$metadata:DS(e),...n}},Vy=async(e,t)=>{if(e.statusCode>=300)return qx(e,t);const i=await Pn(e.body,t);let n={};n=Hb(i.DeleteTemplateResult);return{$metadata:DS(e),...n}},Gy=async(e,t)=>{if(e.statusCode>=300)return qx(e,t);await ge(e.body,t);return{$metadata:DS(e)}},Wy=async(e,t)=>{if(e.statusCode>=300)return qx(e,t);const i=await Pn(e.body,t);let n={};n=qb(i.DescribeActiveReceiptRuleSetResult);return{$metadata:DS(e),...n}},Ky=async(e,t)=>{if(e.statusCode>=300)return qx(e,t);const i=await Pn(e.body,t);let n={};n=Vb(i.DescribeConfigurationSetResult);return{$metadata:DS(e),...n}},Qy=async(e,t)=>{if(e.statusCode>=300)return qx(e,t);const i=await Pn(e.body,t);let n={};n=Gb(i.DescribeReceiptRuleResult);return{$metadata:DS(e),...n}},Xy=async(e,t)=>{if(e.statusCode>=300)return qx(e,t);const i=await Pn(e.body,t);let n={};n=Wb(i.DescribeReceiptRuleSetResult);return{$metadata:DS(e),...n}},Jy=async(e,t)=>{if(e.statusCode>=300)return qx(e,t);const i=await Pn(e.body,t);let n={};n=eE(i.GetAccountSendingEnabledResult);return{$metadata:DS(e),...n}},Yy=async(e,t)=>{if(e.statusCode>=300)return qx(e,t);const i=await Pn(e.body,t);let n={};n=tE(i.GetCustomVerificationEmailTemplateResult);return{$metadata:DS(e),...n}},Zy=async(e,t)=>{if(e.statusCode>=300)return qx(e,t);const i=await Pn(e.body,t);let n={};n=iE(i.GetIdentityDkimAttributesResult);return{$metadata:DS(e),...n}},ex=async(e,t)=>{if(e.statusCode>=300)return qx(e,t);const i=await Pn(e.body,t);let n={};n=nE(i.GetIdentityMailFromDomainAttributesResult);return{$metadata:DS(e),...n}},tx=async(e,t)=>{if(e.statusCode>=300)return qx(e,t);const i=await Pn(e.body,t);let n={};n=sE(i.GetIdentityNotificationAttributesResult);return{$metadata:DS(e),...n}},ix=async(e,t)=>{if(e.statusCode>=300)return qx(e,t);const i=await Pn(e.body,t);let n={};n=aE(i.GetIdentityPoliciesResult);return{$metadata:DS(e),...n}},nx=async(e,t)=>{if(e.statusCode>=300)return qx(e,t);const i=await Pn(e.body,t);let n={};n=oE(i.GetIdentityVerificationAttributesResult);return{$metadata:DS(e),...n}},sx=async(e,t)=>{if(e.statusCode>=300)return qx(e,t);const i=await Pn(e.body,t);let n={};n=rE(i.GetSendQuotaResult);return{$metadata:DS(e),...n}},ax=async(e,t)=>{if(e.statusCode>=300)return qx(e,t);const i=await Pn(e.body,t);let n={};n=cE(i.GetSendStatisticsResult);return{$metadata:DS(e),...n}},ox=async(e,t)=>{if(e.statusCode>=300)return qx(e,t);const i=await Pn(e.body,t);let n={};n=lE(i.GetTemplateResult);return{$metadata:DS(e),...n}},rx=async(e,t)=>{if(e.statusCode>=300)return qx(e,t);const i=await Pn(e.body,t);let n={};n=AE(i.ListConfigurationSetsResult);return{$metadata:DS(e),...n}},cx=async(e,t)=>{if(e.statusCode>=300)return qx(e,t);const i=await Pn(e.body,t);let n={};n=IE(i.ListCustomVerificationEmailTemplatesResult);return{$metadata:DS(e),...n}},lx=async(e,t)=>{if(e.statusCode>=300)return qx(e,t);const i=await Pn(e.body,t);let n={};n=TE(i.ListIdentitiesResult);return{$metadata:DS(e),...n}},px=async(e,t)=>{if(e.statusCode>=300)return qx(e,t);const i=await Pn(e.body,t);let n={};n=kE(i.ListIdentityPoliciesResult);return{$metadata:DS(e),...n}},dx=async(e,t)=>{if(e.statusCode>=300)return qx(e,t);const i=await Pn(e.body,t);let n={};n=OE(i.ListReceiptFiltersResult);return{$metadata:DS(e),...n}},ux=async(e,t)=>{if(e.statusCode>=300)return qx(e,t);const i=await Pn(e.body,t);let n={};n=PE(i.ListReceiptRuleSetsResult);return{$metadata:DS(e),...n}},mx=async(e,t)=>{if(e.statusCode>=300)return qx(e,t);const i=await Pn(e.body,t);let n={};n=_E(i.ListTemplatesResult);return{$metadata:DS(e),...n}},hx=async(e,t)=>{if(e.statusCode>=300)return qx(e,t);const i=await Pn(e.body,t);let n={};n=RE(i.ListVerifiedEmailAddressesResult);return{$metadata:DS(e),...n}},fx=async(e,t)=>{if(e.statusCode>=300)return qx(e,t);const i=await Pn(e.body,t);let n={};n=UE(i.PutConfigurationSetDeliveryOptionsResult);return{$metadata:DS(e),...n}},gx=async(e,t)=>{if(e.statusCode>=300)return qx(e,t);const i=await Pn(e.body,t);let n={};n=BE(i.PutIdentityPolicyResult);return{$metadata:DS(e),...n}},yx=async(e,t)=>{if(e.statusCode>=300)return qx(e,t);const i=await Pn(e.body,t);let n={};n=JE(i.ReorderReceiptRuleSetResult);return{$metadata:DS(e),...n}},xx=async(e,t)=>{if(e.statusCode>=300)return qx(e,t);const i=await Pn(e.body,t);let n={};n=iS(i.SendBounceResult);return{$metadata:DS(e),...n}},vx=async(e,t)=>{if(e.statusCode>=300)return qx(e,t);const i=await Pn(e.body,t);let n={};n=nS(i.SendBulkTemplatedEmailResult);return{$metadata:DS(e),...n}},wx=async(e,t)=>{if(e.statusCode>=300)return qx(e,t);const i=await Pn(e.body,t);let n={};n=sS(i.SendCustomVerificationEmailResult);return{$metadata:DS(e),...n}},bx=async(e,t)=>{if(e.statusCode>=300)return qx(e,t);const i=await Pn(e.body,t);let n={};n=oS(i.SendEmailResult);return{$metadata:DS(e),...n}},Ex=async(e,t)=>{if(e.statusCode>=300)return qx(e,t);const i=await Pn(e.body,t);let n={};n=rS(i.SendRawEmailResult);return{$metadata:DS(e),...n}},Sx=async(e,t)=>{if(e.statusCode>=300)return qx(e,t);const i=await Pn(e.body,t);let n={};n=cS(i.SendTemplatedEmailResult);return{$metadata:DS(e),...n}},Cx=async(e,t)=>{if(e.statusCode>=300)return qx(e,t);const i=await Pn(e.body,t);let n={};n=lS(i.SetActiveReceiptRuleSetResult);return{$metadata:DS(e),...n}},Ax=async(e,t)=>{if(e.statusCode>=300)return qx(e,t);const i=await Pn(e.body,t);let n={};n=pS(i.SetIdentityDkimEnabledResult);return{$metadata:DS(e),...n}},Ix=async(e,t)=>{if(e.statusCode>=300)return qx(e,t);const i=await Pn(e.body,t);let n={};n=dS(i.SetIdentityFeedbackForwardingEnabledResult);return{$metadata:DS(e),...n}},Tx=async(e,t)=>{if(e.statusCode>=300)return qx(e,t);const i=await Pn(e.body,t);let n={};n=uS(i.SetIdentityHeadersInNotificationsEnabledResult);return{$metadata:DS(e),...n}},kx=async(e,t)=>{if(e.statusCode>=300)return qx(e,t);const i=await Pn(e.body,t);let n={};n=mS(i.SetIdentityMailFromDomainResult);return{$metadata:DS(e),...n}},Ox=async(e,t)=>{if(e.statusCode>=300)return qx(e,t);const i=await Pn(e.body,t);let n={};n=hS(i.SetIdentityNotificationTopicResult);return{$metadata:DS(e),...n}},Px=async(e,t)=>{if(e.statusCode>=300)return qx(e,t);const i=await Pn(e.body,t);let n={};n=fS(i.SetReceiptRulePositionResult);return{$metadata:DS(e),...n}},_x=async(e,t)=>{if(e.statusCode>=300)return qx(e,t);const i=await Pn(e.body,t);let n={};n=ES(i.TestRenderTemplateResult);return{$metadata:DS(e),...n}},Rx=async(e,t)=>{if(e.statusCode>=300)return qx(e,t);await ge(e.body,t);return{$metadata:DS(e)}},$x=async(e,t)=>{if(e.statusCode>=300)return qx(e,t);const i=await Pn(e.body,t);let n={};n=IS(i.UpdateConfigurationSetEventDestinationResult);return{$metadata:DS(e),...n}},Mx=async(e,t)=>{if(e.statusCode>=300)return qx(e,t);await ge(e.body,t);return{$metadata:DS(e)}},Nx=async(e,t)=>{if(e.statusCode>=300)return qx(e,t);await ge(e.body,t);return{$metadata:DS(e)}},Dx=async(e,t)=>{if(e.statusCode>=300)return qx(e,t);const i=await Pn(e.body,t);let n={};n=TS(i.UpdateConfigurationSetTrackingOptionsResult);return{$metadata:DS(e),...n}},jx=async(e,t)=>{if(e.statusCode>=300)return qx(e,t);await ge(e.body,t);return{$metadata:DS(e)}},zx=async(e,t)=>{if(e.statusCode>=300)return qx(e,t);const i=await Pn(e.body,t);let n={};n=kS(i.UpdateReceiptRuleResult);return{$metadata:DS(e),...n}},Lx=async(e,t)=>{if(e.statusCode>=300)return qx(e,t);const i=await Pn(e.body,t);let n={};n=OS(i.UpdateTemplateResult);return{$metadata:DS(e),...n}},Fx=async(e,t)=>{if(e.statusCode>=300)return qx(e,t);const i=await Pn(e.body,t);let n={};n=RS(i.VerifyDomainDkimResult);return{$metadata:DS(e),...n}},Ux=async(e,t)=>{if(e.statusCode>=300)return qx(e,t);const i=await Pn(e.body,t);let n={};n=$S(i.VerifyDomainIdentityResult);return{$metadata:DS(e),...n}},Bx=async(e,t)=>{if(e.statusCode>=300)return qx(e,t);await ge(e.body,t);return{$metadata:DS(e)}},Hx=async(e,t)=>{if(e.statusCode>=300)return qx(e,t);const i=await Pn(e.body,t);let n={};n=MS(i.VerifyEmailIdentityResult);return{$metadata:DS(e),...n}},qx=async(e,t)=>{const i={...e,body:await _n(e.body,t)},n=Ek(e,i.body);switch(n){case"AlreadyExists":case"com.amazonaws.ses#AlreadyExistsException":throw await Gx(i);case"LimitExceeded":case"com.amazonaws.ses#LimitExceededException":throw await fv(i);case"RuleSetDoesNotExist":case"com.amazonaws.ses#RuleSetDoesNotExistException":throw await bv(i);case"ConfigurationSetAlreadyExists":case"com.amazonaws.ses#ConfigurationSetAlreadyExistsException":throw await Kx(i);case"InvalidConfigurationSet":case"com.amazonaws.ses#InvalidConfigurationSetException":throw await sv(i);case"ConfigurationSetDoesNotExist":case"com.amazonaws.ses#ConfigurationSetDoesNotExistException":throw await Qx(i);case"EventDestinationAlreadyExists":case"com.amazonaws.ses#EventDestinationAlreadyExistsException":throw await ev(i);case"InvalidCloudWatchDestination":case"com.amazonaws.ses#InvalidCloudWatchDestinationException":throw await nv(i);case"InvalidFirehoseDestination":case"com.amazonaws.ses#InvalidFirehoseDestinationException":throw await ov(i);case"InvalidSNSDestination":case"com.amazonaws.ses#InvalidSNSDestinationException":throw await dv(i);case"InvalidTrackingOptions":case"com.amazonaws.ses#InvalidTrackingOptionsException":throw await hv(i);case"TrackingOptionsAlreadyExistsException":case"com.amazonaws.ses#TrackingOptionsAlreadyExistsException":throw await Sv(i);case"CustomVerificationEmailInvalidContent":case"com.amazonaws.ses#CustomVerificationEmailInvalidContentException":throw await Jx(i);case"CustomVerificationEmailTemplateAlreadyExists":case"com.amazonaws.ses#CustomVerificationEmailTemplateAlreadyExistsException":throw await Yx(i);case"FromEmailAddressNotVerified":case"com.amazonaws.ses#FromEmailAddressNotVerifiedException":throw await iv(i);case"InvalidLambdaFunction":case"com.amazonaws.ses#InvalidLambdaFunctionException":throw await rv(i);case"InvalidS3Configuration":case"com.amazonaws.ses#InvalidS3ConfigurationException":throw await pv(i);case"InvalidSnsTopic":case"com.amazonaws.ses#InvalidSnsTopicException":throw await uv(i);case"RuleDoesNotExist":case"com.amazonaws.ses#RuleDoesNotExistException":throw await wv(i);case"InvalidTemplate":case"com.amazonaws.ses#InvalidTemplateException":throw await mv(i);case"EventDestinationDoesNotExist":case"com.amazonaws.ses#EventDestinationDoesNotExistException":throw await tv(i);case"TrackingOptionsDoesNotExistException":case"com.amazonaws.ses#TrackingOptionsDoesNotExistException":throw await Cv(i);case"CannotDelete":case"com.amazonaws.ses#CannotDeleteException":throw await Wx(i);case"CustomVerificationEmailTemplateDoesNotExist":case"com.amazonaws.ses#CustomVerificationEmailTemplateDoesNotExistException":throw await Zx(i);case"TemplateDoesNotExist":case"com.amazonaws.ses#TemplateDoesNotExistException":throw await Ev(i);case"InvalidDeliveryOptions":case"com.amazonaws.ses#InvalidDeliveryOptionsException":throw await av(i);case"InvalidPolicy":case"com.amazonaws.ses#InvalidPolicyException":throw await cv(i);case"MessageRejected":case"com.amazonaws.ses#MessageRejected":throw await yv(i);case"AccountSendingPausedException":case"com.amazonaws.ses#AccountSendingPausedException":throw await Vx(i);case"ConfigurationSetSendingPausedException":case"com.amazonaws.ses#ConfigurationSetSendingPausedException":throw await Xx(i);case"MailFromDomainNotVerifiedException":case"com.amazonaws.ses#MailFromDomainNotVerifiedException":throw await gv(i);case"ProductionAccessNotGranted":case"com.amazonaws.ses#ProductionAccessNotGrantedException":throw await vv(i);case"InvalidRenderingParameter":case"com.amazonaws.ses#InvalidRenderingParameterException":throw await lv(i);case"MissingRenderingAttribute":case"com.amazonaws.ses#MissingRenderingAttributeException":throw await xv(i);default:const t=i.body;return jS({output:e,parsedBody:t.Error,errorCode:n})}},Vx=async(e,t)=>{const i=e.body,n=hb(i.Error),s=new Pf({$metadata:DS(e),...n});return Ai(s,i)},Gx=async(e,t)=>{const i=e.body,n=fb(i.Error),s=new _f({$metadata:DS(e),...n});return Ai(s,i)},Wx=async(e,t)=>{const i=e.body,n=yb(i.Error),s=new Rf({$metadata:DS(e),...n});return Ai(s,i)},Kx=async(e,t)=>{const i=e.body,n=bb(i.Error),s=new Nf({$metadata:DS(e),...n});return Ai(s,i)},Qx=async(e,t)=>{const i=e.body,n=Eb(i.Error),s=new Df({$metadata:DS(e),...n});return Ai(s,i)},Xx=async(e,t)=>{const i=e.body,n=Sb(i.Error),s=new jf({$metadata:DS(e),...n});return Ai(s,i)},Jx=async(e,t)=>{const i=e.body,n=_b(i.Error),s=new Vf({$metadata:DS(e),...n});return Ai(s,i)},Yx=async(e,t)=>{const i=e.body,n=Rb(i.Error),s=new Gf({$metadata:DS(e),...n});return Ai(s,i)},Zx=async(e,t)=>{const i=e.body,n=$b(i.Error),s=new Zf({$metadata:DS(e),...n});return Ai(s,i)},ev=async(e,t)=>{const i=e.body,n=Qb(i.Error),s=new Lf({$metadata:DS(e),...n});return Ai(s,i)},tv=async(e,t)=>{const i=e.body,n=Xb(i.Error),s=new eg({$metadata:DS(e),...n});return Ai(s,i)},iv=async(e,t)=>{const i=e.body,n=Zb(i.Error),s=new Wf({$metadata:DS(e),...n});return Ai(s,i)},nv=async(e,t)=>{const i=e.body,n=dE(i.Error),s=new Ff({$metadata:DS(e),...n});return Ai(s,i)},sv=async(e,t)=>{const i=e.body,n=uE(i.Error),s=new zf({$metadata:DS(e),...n});return Ai(s,i)},av=async(e,t)=>{const i=e.body,n=mE(i.Error),s=new ng({$metadata:DS(e),...n});return Ai(s,i)},ov=async(e,t)=>{const i=e.body,n=hE(i.Error),s=new Uf({$metadata:DS(e),...n});return Ai(s,i)},rv=async(e,t)=>{const i=e.body,n=fE(i.Error),s=new Kf({$metadata:DS(e),...n});return Ai(s,i)},cv=async(e,t)=>{const i=e.body,n=gE(i.Error),s=new sg({$metadata:DS(e),...n});return Ai(s,i)},lv=async(e,t)=>{const i=e.body,n=yE(i.Error),s=new ag({$metadata:DS(e),...n});return Ai(s,i)},pv=async(e,t)=>{const i=e.body,n=xE(i.Error),s=new Qf({$metadata:DS(e),...n});return Ai(s,i)},dv=async(e,t)=>{const i=e.body,n=vE(i.Error),s=new Bf({$metadata:DS(e),...n});return Ai(s,i)},uv=async(e,t)=>{const i=e.body,n=wE(i.Error),s=new Xf({$metadata:DS(e),...n});return Ai(s,i)},mv=async(e,t)=>{const i=e.body,n=bE(i.Error),s=new Yf({$metadata:DS(e),...n});return Ai(s,i)},hv=async(e,t)=>{const i=e.body,n=EE(i.Error),s=new Hf({$metadata:DS(e),...n});return Ai(s,i)},fv=async(e,t)=>{const i=e.body,n=CE(i.Error),s=new $f({$metadata:DS(e),...n});return Ai(s,i)},gv=async(e,t)=>{const i=e.body,n=ME(i.Error),s=new og({$metadata:DS(e),...n});return Ai(s,i)},yv=async(e,t)=>{const i=e.body,n=NE(i.Error),s=new rg({$metadata:DS(e),...n});return Ai(s,i)},xv=async(e,t)=>{const i=e.body,n=DE(i.Error),s=new cg({$metadata:DS(e),...n});return Ai(s,i)},vv=async(e,t)=>{const i=e.body,n=FE(i.Error),s=new lg({$metadata:DS(e),...n});return Ai(s,i)},wv=async(e,t)=>{const i=e.body,n=ZE(i.Error),s=new Jf({$metadata:DS(e),...n});return Ai(s,i)},bv=async(e,t)=>{const i=e.body,n=eS(i.Error),s=new Mf({$metadata:DS(e),...n});return Ai(s,i)},Ev=async(e,t)=>{const i=e.body,n=wS(i.Error),s=new ig({$metadata:DS(e),...n});return Ai(s,i)},Sv=async(e,t)=>{const i=e.body,n=CS(i.Error),s=new qf({$metadata:DS(e),...n});return Ai(s,i)},Cv=async(e,t)=>{const i=e.body,n=AS(i.Error),s=new tg({$metadata:DS(e),...n});return Ai(s,i)},Av=(e,t)=>{const i={};let n=1;for(const t of e)null!==t&&(i[`member.${n}`]=t,n++);return i},Iv=(e,t)=>{const i={};if(null!=e[MI]&&(i[MI]=e[MI]),null!=e[NI]&&(i[NI]=e[NI]),null!=e[eC]&&(i[eC]=e[eC]),null!=e[DI]){const t=Rw(e[DI]);Object.entries(t).forEach((([e,t])=>{i[`RecipientDsnFields.${e}`]=t}))}return i},Tv=(e,t)=>{const i={};if(null!=e[TC]){const t=tw(e[TC]);Object.entries(t).forEach((([e,t])=>{i[`Destination.${e}`]=t}))}if(null!=e[QI]){const t=Cw(e[QI]);0===e[QI]?.length&&(i.ReplacementTags=[]),Object.entries(t).forEach((([e,t])=>{i[`ReplacementTags.${e}`]=t}))}return null!=e[JI]&&(i[JI]=e[JI]),i},kv=(e,t)=>{const i={};return null!=e[KI]&&(i[KI]=e[KI]),null!=e[TI]&&(i[TI]=e[TI]),i},Ov=(e,t)=>{const i={};return null!=e[BC]&&(i[BC]=e[BC]),null!=e[iA]&&(i[iA]=e[iA]),null!=e[zC]&&(i[zC]=e[zC]),i},Pv=(e,t)=>{const i={};let n=1;for(const t of e){if(null===t)continue;const e=Ov(t);Object.entries(e).forEach((([e,t])=>{i[`member.${n}.${e}`]=t})),n++}return i},_v=(e,t)=>{const i={};return null!=e[sA]&&(i[sA]=e[sA]),null!=e[sC]&&(i[sC]=e[sC]),i},Rv=(e,t)=>{const i={};if(null!=e[yC]&&(i[yC]=e[yC]),null!=e[lA]){const t=iw(e[lA]);Object.entries(t).forEach((([e,t])=>{i[`EventDestination.${e}`]=t}))}return i},$v=(e,t)=>{const i={};if(null!=e[fC]){const t=(e=>{const t={};return null!=e[wI]&&(t[wI]=e[wI]),t})(e[fC]);Object.entries(t).forEach((([e,t])=>{i[`ConfigurationSet.${e}`]=t}))}return i},Mv=(e,t)=>{const i={};if(null!=e[yC]&&(i[yC]=e[yC]),null!=e[qT]){const t=eb(e[qT]);Object.entries(t).forEach((([e,t])=>{i[`TrackingOptions.${e}`]=t}))}return i},Nv=(e,t)=>{const i={};return null!=e[HT]&&(i[HT]=e[HT]),null!=e[wA]&&(i[wA]=e[wA]),null!=e[KT]&&(i[KT]=e[KT]),null!=e[FT]&&(i[FT]=e[FT]),null!=e[kT]&&(i[kT]=e[kT]),null!=e[SA]&&(i[SA]=e[SA]),i},Dv=(e,t)=>{const i={};if(null!=e[gA]){const t=Ow(e[gA]);Object.entries(t).forEach((([e,t])=>{i[`Filter.${e}`]=t}))}return i},jv=(e,t)=>{const i={};if(null!=e[KI]&&(i[KI]=e[KI]),null!=e[VS]&&(i[VS]=e[VS]),null!=e[tT]){const t=_w(e[tT]);Object.entries(t).forEach((([e,t])=>{i[`Rule.${e}`]=t}))}return i},zv=(e,t)=>{const i={};return null!=e[KI]&&(i[KI]=e[KI]),i},Lv=(e,t)=>{const i={};if(null!=e[XT]){const t=Yw(e[XT]);Object.entries(t).forEach((([e,t])=>{i[`Template.${e}`]=t}))}return i},Fv=(e,t)=>{const i={};return null!=e[yC]&&(i[yC]=e[yC]),null!=e[pA]&&(i[pA]=e[pA]),i},Uv=(e,t)=>{const i={};return null!=e[yC]&&(i[yC]=e[yC]),i},Bv=(e,t)=>{const i={};return null!=e[yC]&&(i[yC]=e[yC]),i},Hv=(e,t)=>{const i={};return null!=e[HT]&&(i[HT]=e[HT]),i},qv=(e,t)=>{const i={};return null!=e[BA]&&(i[BA]=e[BA]),null!=e[_I]&&(i[_I]=e[_I]),i},Vv=(e,t)=>{const i={};return null!=e[BA]&&(i[BA]=e[BA]),i},Gv=(e,t)=>{const i={};return null!=e[bA]&&(i[bA]=e[bA]),i},Wv=(e,t)=>{const i={};return null!=e[KI]&&(i[KI]=e[KI]),null!=e[UI]&&(i[UI]=e[UI]),i},Kv=(e,t)=>{const i={};return null!=e[KI]&&(i[KI]=e[KI]),i},Qv=(e,t)=>{const i={};return null!=e[HT]&&(i[HT]=e[HT]),i},Xv=(e,t)=>{const i={};return null!=e[cA]&&(i[cA]=e[cA]),i},Jv=(e,t)=>({}),Yv=(e,t)=>{const i={};if(null!=e[yC]&&(i[yC]=e[yC]),null!=e[gC]){const t=(e=>{const t={};let i=1;for(const n of e)null!==n&&(t[`member.${i}`]=n,i++);return t})(e[gC]);0===e[gC]?.length&&(i.ConfigurationSetAttributeNames=[]),Object.entries(t).forEach((([e,t])=>{i[`ConfigurationSetAttributeNames.${e}`]=t}))}return i},Zv=(e,t)=>{const i={};return null!=e[KI]&&(i[KI]=e[KI]),null!=e[UI]&&(i[UI]=e[UI]),i},ew=(e,t)=>{const i={};return null!=e[KI]&&(i[KI]=e[KI]),i},tw=(e,t)=>{const i={};if(null!=e[LT]){const t=Av(e[LT]);0===e[LT]?.length&&(i.ToAddresses=[]),Object.entries(t).forEach((([e,t])=>{i[`ToAddresses.${e}`]=t}))}if(null!=e[aC]){const t=Av(e[aC]);0===e[aC]?.length&&(i.CcAddresses=[]),Object.entries(t).forEach((([e,t])=>{i[`CcAddresses.${e}`]=t}))}if(null!=e[WS]){const t=Av(e[WS]);0===e[WS]?.length&&(i.BccAddresses=[]),Object.entries(t).forEach((([e,t])=>{i[`BccAddresses.${e}`]=t}))}return i},iw=(e,t)=>{const i={};if(null!=e[wI]&&(i[wI]=e[wI]),null!=e[rA]&&(i[rA]=e[rA]),null!=e[pI]){const t=nw(e[pI]);0===e[pI]?.length&&(i.MatchingEventTypes=[]),Object.entries(t).forEach((([e,t])=>{i[`MatchingEventTypes.${e}`]=t}))}if(null!=e[QA]){const t=hw(e[QA]);Object.entries(t).forEach((([e,t])=>{i[`KinesisFirehoseDestination.${e}`]=t}))}if(null!=e[CC]){const t=(e=>{const t={};if(null!=e[_C]){const i=Pv(e[_C]);0===e[_C]?.length&&(t.DimensionConfigurations=[]),Object.entries(i).forEach((([e,i])=>{t[`DimensionConfigurations.${e}`]=i}))}return t})(e[CC]);Object.entries(t).forEach((([e,t])=>{i[`CloudWatchDestination.${e}`]=t}))}if(null!=e[ST]){const t=Xw(e[ST]);Object.entries(t).forEach((([e,t])=>{i[`SNSDestination.${e}`]=t}))}return i},nw=(e,t)=>{const i={};let n=1;for(const t of e)null!==t&&(i[`member.${n}`]=t,n++);return i},sw=(e,t)=>{const i={};return null!=e[wI]&&(i[wI]=e[wI]),null!=e[gk]&&(i[gk]=e[gk]),i},aw=(e,t)=>{const i={};let n=1;for(const t of e){if(null===t)continue;const e=sw(t);Object.entries(e).forEach((([e,t])=>{i[`member.${n}.${e}`]=t})),n++}return i},ow=(e,t)=>{const i={};return null!=e[HT]&&(i[HT]=e[HT]),i},rw=(e,t)=>{const i={};if(null!=e[KA]){const t=mw(e[KA]);0===e[KA]?.length&&(i.Identities=[]),Object.entries(t).forEach((([e,t])=>{i[`Identities.${e}`]=t}))}return i},cw=(e,t)=>{const i={};if(null!=e[KA]){const t=mw(e[KA]);0===e[KA]?.length&&(i.Identities=[]),Object.entries(t).forEach((([e,t])=>{i[`Identities.${e}`]=t}))}return i},lw=(e,t)=>{const i={};if(null!=e[KA]){const t=mw(e[KA]);0===e[KA]?.length&&(i.Identities=[]),Object.entries(t).forEach((([e,t])=>{i[`Identities.${e}`]=t}))}return i},pw=(e,t)=>{const i={};if(null!=e[BA]&&(i[BA]=e[BA]),null!=e[RI]){const t=Aw(e[RI]);0===e[RI]?.length&&(i.PolicyNames=[]),Object.entries(t).forEach((([e,t])=>{i[`PolicyNames.${e}`]=t}))}return i},dw=(e,t)=>{const i={};if(null!=e[KA]){const t=mw(e[KA]);0===e[KA]?.length&&(i.Identities=[]),Object.entries(t).forEach((([e,t])=>{i[`Identities.${e}`]=t}))}return i},uw=(e,t)=>{const i={};return null!=e[HT]&&(i[HT]=e[HT]),i},mw=(e,t)=>{const i={};let n=1;for(const t of e)null!==t&&(i[`member.${n}`]=t,n++);return i},hw=(e,t)=>{const i={};return null!=e[HA]&&(i[HA]=e[HA]),null!=e[QC]&&(i[QC]=e[QC]),i},fw=(e,t)=>{const i={};return null!=e[EI]&&(i[EI]=e[EI]),null!=e[fI]&&(i[fI]=e[fI]),i},gw=(e,t)=>{const i={};return null!=e[EI]&&(i[EI]=e[EI]),null!=e[yI]&&(i[yI]=e[yI]),i},yw=(e,t)=>{const i={};return null!=e[WA]&&(i[WA]=e[WA]),null!=e[EI]&&(i[EI]=e[EI]),null!=e[fI]&&(i[fI]=e[fI]),i},xw=(e,t)=>{const i={};return null!=e[BA]&&(i[BA]=e[BA]),i},vw=(e,t)=>({}),ww=(e,t)=>{const i={};return null!=e[EI]&&(i[EI]=e[EI]),i},bw=(e,t)=>{const i={};return null!=e[EI]&&(i[EI]=e[EI]),null!=e[fI]&&(i[fI]=e[fI]),i},Ew=(e,t)=>{const i={};if(null!=e[MT]){const t=_v(e[MT]);Object.entries(t).forEach((([e,t])=>{i[`Subject.${e}`]=t}))}if(null!=e[GS]){const t=(e=>{const t={};if(null!=e[NT]){const i=_v(e[NT]);Object.entries(i).forEach((([e,i])=>{t[`Text.${e}`]=i}))}if(null!=e[NA]){const i=_v(e[NA]);Object.entries(i).forEach((([e,i])=>{t[`Html.${e}`]=i}))}return t})(e[GS]);Object.entries(t).forEach((([e,t])=>{i[`Body.${e}`]=t}))}return i},Sw=(e,t)=>{const i={};return null!=e[wI]&&(i[wI]=e[wI]),null!=e[gk]&&(i[gk]=e[gk]),i},Cw=(e,t)=>{const i={};let n=1;for(const t of e){if(null===t)continue;const e=Sw(t);Object.entries(e).forEach((([e,t])=>{i[`member.${n}.${e}`]=t})),n++}return i},Aw=(e,t)=>{const i={};let n=1;for(const t of e)null!==t&&(i[`member.${n}`]=t,n++);return i},Iw=(e,t)=>{const i={};if(null!=e[yC]&&(i[yC]=e[yC]),null!=e[HC]){const t=(e=>{const t={};return null!=e[VT]&&(t[VT]=e[VT]),t})(e[HC]);Object.entries(t).forEach((([e,t])=>{i[`DeliveryOptions.${e}`]=t}))}return i},Tw=(e,t)=>{const i={};return null!=e[BA]&&(i[BA]=e[BA]),null!=e[_I]&&(i[_I]=e[_I]),null!=e[kI]&&(i[kI]=e[kI]),i},kw=(e,t)=>{const i={};if(null!=e[sT]){const t=Nw(e[sT]);Object.entries(t).forEach((([e,t])=>{i[`S3Action.${e}`]=t}))}if(null!=e[KS]){const t=(e=>{const t={};return null!=e[DT]&&(t[DT]=e[DT]),null!=e[AT]&&(t[AT]=e[AT]),null!=e[pT]&&(t[pT]=e[pT]),null!=e[cI]&&(t[cI]=e[cI]),null!=e[nT]&&(t[nT]=e[nT]),t})(e[KS]);Object.entries(t).forEach((([e,t])=>{i[`BounceAction.${e}`]=t}))}if(null!=e[yk]){const t=mb(e[yk]);Object.entries(t).forEach((([e,t])=>{i[`WorkmailAction.${e}`]=t}))}if(null!=e[JA]){const t=(e=>{const t={};return null!=e[DT]&&(t[DT]=e[DT]),null!=e[yA]&&(t[yA]=e[yA]),null!=e[GA]&&(t[GA]=e[GA]),t})(e[JA]);Object.entries(t).forEach((([e,t])=>{i[`LambdaAction.${e}`]=t}))}if(null!=e[rT]){const t=Jw(e[rT]);Object.entries(t).forEach((([e,t])=>{i[`StopAction.${e}`]=t}))}if(null!=e[HS]){const t=(e=>{const t={};return null!=e[LA]&&(t[LA]=e[LA]),null!=e[UA]&&(t[UA]=e[UA]),t})(e[HS]);Object.entries(t).forEach((([e,t])=>{i[`AddHeaderAction.${e}`]=t}))}if(null!=e[ET]){const t=Qw(e[ET]);Object.entries(t).forEach((([e,t])=>{i[`SNSAction.${e}`]=t}))}return i},Ow=(e,t)=>{const i={};if(null!=e[wI]&&(i[wI]=e[wI]),null!=e[qA]){const t=Pw(e[qA]);Object.entries(t).forEach((([e,t])=>{i[`IpFilter.${e}`]=t}))}return i},Pw=(e,t)=>{const i={};return null!=e[kI]&&(i[kI]=e[kI]),null!=e[AC]&&(i[AC]=e[AC]),i},_w=(e,t)=>{const i={};if(null!=e[wI]&&(i[wI]=e[wI]),null!=e[rA]&&(i[rA]=e[rA]),null!=e[VT]&&(i[VT]=e[VT]),null!=e[ZI]){const t=$w(e[ZI]);0===e[ZI]?.length&&(i.Recipients=[]),Object.entries(t).forEach((([e,t])=>{i[`Recipients.${e}`]=t}))}if(null!=e[qS]){const t=(e=>{const t={};let i=1;for(const n of e){if(null===n)continue;const e=kw(n);Object.entries(e).forEach((([e,n])=>{t[`member.${i}.${e}`]=n})),i++}return t})(e[qS]);0===e[qS]?.length&&(i.Actions=[]),Object.entries(t).forEach((([e,t])=>{i[`Actions.${e}`]=t}))}return null!=e[hT]&&(i[hT]=e[hT]),i},Rw=(e,t)=>{const i={};if(null!=e[EA]&&(i[EA]=e[EA]),null!=e[US]&&(i[US]=e[US]),null!=e[FI]&&(i[FI]=e[FI]),null!=e[$T]&&(i[$T]=e[$T]),null!=e[jC]&&(i[jC]=e[jC]),null!=e[YA]&&(i[YA]=Gi(e[YA])),null!=e[uA]){const t=aw(e[uA]);0===e[uA]?.length&&(i.ExtensionFields=[]),Object.entries(t).forEach((([e,t])=>{i[`ExtensionFields.${e}`]=t}))}return i},$w=(e,t)=>{const i={};let n=1;for(const t of e)null!==t&&(i[`member.${n}`]=t,n++);return i},Mw=(e,t)=>{const i={};if(null!=e[KI]&&(i[KI]=e[KI]),null!=e[BI]){const t=(e=>{const t={};let i=1;for(const n of e)null!==n&&(t[`member.${i}`]=n,i++);return t})(e[BI]);0===e[BI]?.length&&(i.RuleNames=[]),Object.entries(t).forEach((([e,t])=>{i[`RuleNames.${e}`]=t}))}return i},Nw=(e,t)=>{const i={};return null!=e[DT]&&(i[DT]=e[DT]),null!=e[QS]&&(i[QS]=e[QS]),null!=e[AI]&&(i[AI]=e[AI]),null!=e[XA]&&(i[XA]=e[XA]),null!=e[VA]&&(i[VA]=e[VA]),i},Dw=(e,t)=>{const i={};if(null!=e[II]&&(i[II]=e[II]),null!=e[YS]&&(i[YS]=e[YS]),null!=e[fA]&&(i[fA]=e[fA]),null!=e[lI]){const t=(e=>{const t={};if(null!=e[jI]&&(t[jI]=e[jI]),null!=e[BS]&&(t[BS]=Gi(e[BS])),null!=e[uA]){const i=aw(e[uA]);0===e[uA]?.length&&(t.ExtensionFields=[]),Object.entries(i).forEach((([e,i])=>{t[`ExtensionFields.${e}`]=i}))}return t})(e[lI]);Object.entries(t).forEach((([e,t])=>{i[`MessageDsn.${e}`]=t}))}if(null!=e[JS]){const t=(e=>{const t={};let i=1;for(const n of e){if(null===n)continue;const e=Iv(n);Object.entries(e).forEach((([e,n])=>{t[`member.${i}.${e}`]=n})),i++}return t})(e[JS]);0===e[JS]?.length&&(i.BouncedRecipientInfoList=[]),Object.entries(t).forEach((([e,t])=>{i[`BouncedRecipientInfoList.${e}`]=t}))}return null!=e[ZS]&&(i[ZS]=e[ZS]),i},jw=(e,t)=>{const i={};if(null!=e[RT]&&(i[RT]=e[RT]),null!=e[oT]&&(i[oT]=e[oT]),null!=e[XI]){const t=Av(e[XI]);0===e[XI]?.length&&(i.ReplyToAddresses=[]),Object.entries(t).forEach((([e,t])=>{i[`ReplyToAddresses.${e}`]=t}))}if(null!=e[qI]&&(i[qI]=e[qI]),null!=e[VI]&&(i[VI]=e[VI]),null!=e[yC]&&(i[yC]=e[yC]),null!=e[YC]){const t=Cw(e[YC]);0===e[YC]?.length&&(i.DefaultTags=[]),Object.entries(t).forEach((([e,t])=>{i[`DefaultTags.${e}`]=t}))}if(null!=e[XT]&&(i[XT]=e[XT]),null!=e[zT]&&(i[zT]=e[zT]),null!=e[JC]&&(i[JC]=e[JC]),null!=e[aA]){const t=(e=>{const t={};let i=1;for(const n of e){if(null===n)continue;const e=Tv(n);Object.entries(e).forEach((([e,n])=>{t[`member.${i}.${e}`]=n})),i++}return t})(e[aA]);0===e[aA]?.length&&(i.Destinations=[]),Object.entries(t).forEach((([e,t])=>{i[`Destinations.${e}`]=t}))}return i},zw=(e,t)=>{const i={};return null!=e[cA]&&(i[cA]=e[cA]),null!=e[HT]&&(i[HT]=e[HT]),null!=e[yC]&&(i[yC]=e[yC]),i},Lw=(e,t)=>{const i={};if(null!=e[RT]&&(i[RT]=e[RT]),null!=e[TC]){const t=tw(e[TC]);Object.entries(t).forEach((([e,t])=>{i[`Destination.${e}`]=t}))}if(null!=e[cI]){const t=Ew(e[cI]);Object.entries(t).forEach((([e,t])=>{i[`Message.${e}`]=t}))}if(null!=e[XI]){const t=Av(e[XI]);0===e[XI]?.length&&(i.ReplyToAddresses=[]),Object.entries(t).forEach((([e,t])=>{i[`ReplyToAddresses.${e}`]=t}))}if(null!=e[qI]&&(i[qI]=e[qI]),null!=e[oT]&&(i[oT]=e[oT]),null!=e[VI]&&(i[VI]=e[VI]),null!=e[QT]){const t=Cw(e[QT]);0===e[QT]?.length&&(i.Tags=[]),Object.entries(t).forEach((([e,t])=>{i[`Tags.${e}`]=t}))}return null!=e[yC]&&(i[yC]=e[yC]),i},Fw=(e,t)=>{const i={};if(null!=e[RT]&&(i[RT]=e[RT]),null!=e[aA]){const t=Av(e[aA]);0===e[aA]?.length&&(i.Destinations=[]),Object.entries(t).forEach((([e,t])=>{i[`Destinations.${e}`]=t}))}if(null!=e[LI]){const n=((e,t)=>{const i={};return null!=e[sA]&&(i[sA]=t.base64Encoder(e[sA])),i})(e[LI],t);Object.entries(n).forEach((([e,t])=>{i[`RawMessage.${e}`]=t}))}if(null!=e[xA]&&(i[xA]=e[xA]),null!=e[oT]&&(i[oT]=e[oT]),null!=e[VI]&&(i[VI]=e[VI]),null!=e[QT]){const t=Cw(e[QT]);0===e[QT]?.length&&(i.Tags=[]),Object.entries(t).forEach((([e,t])=>{i[`Tags.${e}`]=t}))}return null!=e[yC]&&(i[yC]=e[yC]),i},Uw=(e,t)=>{const i={};if(null!=e[RT]&&(i[RT]=e[RT]),null!=e[TC]){const t=tw(e[TC]);Object.entries(t).forEach((([e,t])=>{i[`Destination.${e}`]=t}))}if(null!=e[XI]){const t=Av(e[XI]);0===e[XI]?.length&&(i.ReplyToAddresses=[]),Object.entries(t).forEach((([e,t])=>{i[`ReplyToAddresses.${e}`]=t}))}if(null!=e[qI]&&(i[qI]=e[qI]),null!=e[oT]&&(i[oT]=e[oT]),null!=e[VI]&&(i[VI]=e[VI]),null!=e[QT]){const t=Cw(e[QT]);0===e[QT]?.length&&(i.Tags=[]),Object.entries(t).forEach((([e,t])=>{i[`Tags.${e}`]=t}))}return null!=e[yC]&&(i[yC]=e[yC]),null!=e[XT]&&(i[XT]=e[XT]),null!=e[zT]&&(i[zT]=e[zT]),null!=e[UT]&&(i[UT]=e[UT]),i},Bw=(e,t)=>{const i={};return null!=e[KI]&&(i[KI]=e[KI]),i},Hw=(e,t)=>{const i={};return null!=e[BA]&&(i[BA]=e[BA]),null!=e[LC]&&(i[LC]=e[LC]),i},qw=(e,t)=>{const i={};return null!=e[BA]&&(i[BA]=e[BA]),null!=e[vA]&&(i[vA]=e[vA]),i},Vw=(e,t)=>{const i={};return null!=e[BA]&&(i[BA]=e[BA]),null!=e[SI]&&(i[SI]=e[SI]),null!=e[rA]&&(i[rA]=e[rA]),i},Gw=(e,t)=>{const i={};return null!=e[BA]&&(i[BA]=e[BA]),null!=e[dI]&&(i[dI]=e[dI]),null!=e[XS]&&(i[XS]=e[XS]),i},Ww=(e,t)=>{const i={};return null!=e[BA]&&(i[BA]=e[BA]),null!=e[SI]&&(i[SI]=e[SI]),null!=e[OT]&&(i[OT]=e[OT]),i},Kw=(e,t)=>{const i={};return null!=e[KI]&&(i[KI]=e[KI]),null!=e[UI]&&(i[UI]=e[UI]),null!=e[VS]&&(i[VS]=e[VS]),i},Qw=(e,t)=>{const i={};return null!=e[DT]&&(i[DT]=e[DT]),null!=e[mA]&&(i[mA]=e[mA]),i},Xw=(e,t)=>{const i={};return null!=e[jT]&&(i[jT]=e[jT]),i},Jw=(e,t)=>{const i={};return null!=e[_T]&&(i[_T]=e[_T]),null!=e[DT]&&(i[DT]=e[DT]),i},Yw=(e,t)=>{const i={};return null!=e[HT]&&(i[HT]=e[HT]),null!=e[CT]&&(i[CT]=e[CT]),null!=e[GT]&&(i[GT]=e[GT]),null!=e[FA]&&(i[FA]=e[FA]),i},Zw=(e,t)=>{const i={};return null!=e[HT]&&(i[HT]=e[HT]),null!=e[UT]&&(i[UT]=e[UT]),i},eb=(e,t)=>{const i={};return null!=e[pC]&&(i[pC]=e[pC]),i},tb=(e,t)=>{const i={};return null!=e[rA]&&(i[rA]=e[rA]),i},ib=(e,t)=>{const i={};if(null!=e[yC]&&(i[yC]=e[yC]),null!=e[lA]){const t=iw(e[lA]);Object.entries(t).forEach((([e,t])=>{i[`EventDestination.${e}`]=t}))}return i},nb=(e,t)=>{const i={};return null!=e[yC]&&(i[yC]=e[yC]),null!=e[rA]&&(i[rA]=e[rA]),i},sb=(e,t)=>{const i={};return null!=e[yC]&&(i[yC]=e[yC]),null!=e[rA]&&(i[rA]=e[rA]),i},ab=(e,t)=>{const i={};if(null!=e[yC]&&(i[yC]=e[yC]),null!=e[qT]){const t=eb(e[qT]);Object.entries(t).forEach((([e,t])=>{i[`TrackingOptions.${e}`]=t}))}return i},ob=(e,t)=>{const i={};return null!=e[HT]&&(i[HT]=e[HT]),null!=e[wA]&&(i[wA]=e[wA]),null!=e[KT]&&(i[KT]=e[KT]),null!=e[FT]&&(i[FT]=e[FT]),null!=e[kT]&&(i[kT]=e[kT]),null!=e[SA]&&(i[SA]=e[SA]),i},rb=(e,t)=>{const i={};if(null!=e[KI]&&(i[KI]=e[KI]),null!=e[tT]){const t=_w(e[tT]);Object.entries(t).forEach((([e,t])=>{i[`Rule.${e}`]=t}))}return i},cb=(e,t)=>{const i={};if(null!=e[XT]){const t=Yw(e[XT]);Object.entries(t).forEach((([e,t])=>{i[`Template.${e}`]=t}))}return i},lb=(e,t)=>{const i={};return null!=e[oA]&&(i[oA]=e[oA]),i},pb=(e,t)=>{const i={};return null!=e[oA]&&(i[oA]=e[oA]),i},db=(e,t)=>{const i={};return null!=e[cA]&&(i[cA]=e[cA]),i},ub=(e,t)=>{const i={};return null!=e[cA]&&(i[cA]=e[cA]),i},mb=(e,t)=>{const i={};return null!=e[DT]&&(i[DT]=e[DT]),null!=e[CI]&&(i[CI]=e[CI]),i},hb=(e,t)=>{const i={};return null!=e[vk]&&(i[vk]=ai(e[vk])),i},fb=(e,t)=>{const i={};return null!=e[wI]&&(i[wI]=ai(e[wI])),null!=e[vk]&&(i[vk]=ai(e[vk])),i},gb=(e,t)=>(e||[]).filter((e=>null!=e)).map((e=>(e=>{const t={};return null!=e[$T]&&(t[$T]=ai(e[$T])),null!=e[hA]&&(t[hA]=ai(e[hA])),null!=e[gI]&&(t[gI]=ai(e[gI])),t})(e))),yb=(e,t)=>{const i={};return null!=e[wI]&&(i[wI]=ai(e[wI])),null!=e[vk]&&(i[vk]=ai(e[vk])),i},xb=(e,t)=>({}),vb=(e,t)=>(e||[]).filter((e=>null!=e)).map((e=>(e=>{const t={};return null!=e[BC]&&(t[BC]=ai(e[BC])),null!=e[iA]&&(t[iA]=ai(e[iA])),null!=e[zC]&&(t[zC]=ai(e[zC])),t})(e))),wb=(e,t)=>{const i={};return null!=e[wI]&&(i[wI]=ai(e[wI])),i},bb=(e,t)=>{const i={};return null!=e[yC]&&(i[yC]=ai(e[yC])),null!=e[vk]&&(i[vk]=ai(e[vk])),i},Eb=(e,t)=>{const i={};return null!=e[yC]&&(i[yC]=ai(e[yC])),null!=e[vk]&&(i[vk]=ai(e[vk])),i},Sb=(e,t)=>{const i={};return null!=e[yC]&&(i[yC]=ai(e[yC])),null!=e[vk]&&(i[vk]=ai(e[vk])),i},Cb=(e,t)=>({}),Ab=(e,t)=>({}),Ib=(e,t)=>({}),Tb=(e,t)=>({}),kb=(e,t)=>({}),Ob=(e,t)=>({}),Pb=(e,t)=>({}),_b=(e,t)=>{const i={};return null!=e[vk]&&(i[vk]=ai(e[vk])),i},Rb=(e,t)=>{const i={};return null!=e[SC]&&(i[SC]=ai(e[SC])),null!=e[vk]&&(i[vk]=ai(e[vk])),i},$b=(e,t)=>{const i={};return null!=e[SC]&&(i[SC]=ai(e[SC])),null!=e[vk]&&(i[vk]=ai(e[vk])),i},Mb=(e,t)=>(e||[]).filter((e=>null!=e)).map((e=>(e=>{const t={};return null!=e[HT]&&(t[HT]=ai(e[HT])),null!=e[wA]&&(t[wA]=ai(e[wA])),null!=e[KT]&&(t[KT]=ai(e[KT])),null!=e[kT]&&(t[kT]=ai(e[kT])),null!=e[SA]&&(t[SA]=ai(e[SA])),t})(e))),Nb=(e,t)=>({}),Db=(e,t)=>({}),jb=(e,t)=>({}),zb=(e,t)=>({}),Lb=(e,t)=>({}),Fb=(e,t)=>({}),Ub=(e,t)=>({}),Bb=(e,t)=>({}),Hb=(e,t)=>({}),qb=(e,t)=>{const i={};return null!=e[vI]&&(i[vI]=WE(e[vI])),""===e.Rules?i[iT]=[]:null!=e[iT]&&null!=e[iT][wk]&&(i[iT]=QE(Ni(e[iT][wk]))),i},Vb=(e,t)=>{const i={};return null!=e[fC]&&(i[fC]=wb(e[fC])),""===e.EventDestinations?i[dA]=[]:null!=e[dA]&&null!=e[dA][wk]&&(i[dA]=Jb(Ni(e[dA][wk]))),null!=e[qT]&&(i[qT]=SS(e[qT])),null!=e[HC]&&(i[HC]=(e=>{const t={};return null!=e[VT]&&(t[VT]=ai(e[VT])),t})(e[HC])),null!=e[HI]&&(i[HI]=YE(e[HI])),i},Gb=(e,t)=>{const i={};return null!=e[tT]&&(i[tT]=GE(e[tT])),i},Wb=(e,t)=>{const i={};return null!=e[vI]&&(i[vI]=WE(e[vI])),""===e.Rules?i[iT]=[]:null!=e[iT]&&null!=e[iT][wk]&&(i[iT]=QE(Ni(e[iT][wk]))),i},Kb=(e,t)=>{const i={};return null!=e[wI]&&(i[wI]=ai(e[wI])),null!=e[rA]&&(i[rA]=Qt(e[rA])),""===e.MatchingEventTypes?i[pI]=[]:null!=e[pI]&&null!=e[pI][wk]&&(i[pI]=Yb(Ni(e[pI][wk]))),null!=e[QA]&&(i[QA]=SE(e[QA])),null!=e[CC]&&(i[CC]=(e=>{const t={};return""===e.DimensionConfigurations?t[_C]=[]:null!=e[_C]&&null!=e[_C][wk]&&(t[_C]=vb(Ni(e[_C][wk]))),t})(e[CC])),null!=e[ST]&&(i[ST]=yS(e[ST])),i},Qb=(e,t)=>{const i={};return null!=e[yC]&&(i[yC]=ai(e[yC])),null!=e[pA]&&(i[pA]=ai(e[pA])),null!=e[vk]&&(i[vk]=ai(e[vk])),i},Xb=(e,t)=>{const i={};return null!=e[yC]&&(i[yC]=ai(e[yC])),null!=e[pA]&&(i[pA]=ai(e[pA])),null!=e[vk]&&(i[vk]=ai(e[vk])),i},Jb=(e,t)=>(e||[]).filter((e=>null!=e)).map((e=>Kb(e))),Yb=(e,t)=>(e||[]).filter((e=>null!=e)).map((e=>ai(e))),Zb=(e,t)=>{const i={};return null!=e[wA]&&(i[wA]=ai(e[wA])),null!=e[vk]&&(i[vk]=ai(e[vk])),i},eE=(e,t)=>{const i={};return null!=e[rA]&&(i[rA]=Qt(e[rA])),i},tE=(e,t)=>{const i={};return null!=e[HT]&&(i[HT]=ai(e[HT])),null!=e[wA]&&(i[wA]=ai(e[wA])),null!=e[KT]&&(i[KT]=ai(e[KT])),null!=e[FT]&&(i[FT]=ai(e[FT])),null!=e[kT]&&(i[kT]=ai(e[kT])),null!=e[SA]&&(i[SA]=ai(e[SA])),i},iE=(e,t)=>{const i={};return""===e.DkimAttributes?i[kC]={}:null!=e[kC]&&null!=e[kC][xk]&&(i[kC]=(e=>e.reduce(((e,t)=>(null===t.value||(e[t.key]=pE(t.value)),e)),{}))(Ni(e[kC][xk]))),i},nE=(e,t)=>{const i={};return""===e.MailFromDomainAttributes?i[uI]={}:null!=e[uI]&&null!=e[uI][xk]&&(i[uI]=$E(Ni(e[uI][xk]))),i},sE=(e,t)=>{const i={};return""===e.NotificationAttributes?i[bI]={}:null!=e[bI]&&null!=e[bI][xk]&&(i[bI]=jE(Ni(e[bI][xk]))),i},aE=(e,t)=>{const i={};return""===e.Policies?i[$I]={}:null!=e[$I]&&null!=e[$I][xk]&&(i[$I]=zE(Ni(e[$I][xk]))),i},oE=(e,t)=>{const i={};return""===e.VerificationAttributes?i[ck]={}:null!=e[ck]&&null!=e[ck][xk]&&(i[ck]=PS(Ni(e[ck][xk]))),i},rE=(e,t)=>{const i={};return null!=e[hI]&&(i[hI]=ri(e[hI])),null!=e[xI]&&(i[xI]=ri(e[xI])),null!=e[bT]&&(i[bT]=ri(e[bT])),i},cE=(e,t)=>{const i={};return""===e.SendDataPoints?i[uT]=[]:null!=e[uT]&&null!=e[uT][wk]&&(i[uT]=aS(Ni(e[uT][wk]))),i},lE=(e,t)=>{const i={};return null!=e[XT]&&(i[XT]=vS(e[XT])),i},pE=(e,t)=>{const i={};return null!=e[LC]&&(i[LC]=Qt(e[LC])),null!=e[nA]&&(i[nA]=ai(e[nA])),""===e.DkimTokens?i[eA]=[]:null!=e[eA]&&null!=e[eA][wk]&&(i[eA]=_S(Ni(e[eA][wk]))),i},dE=(e,t)=>{const i={};return null!=e[yC]&&(i[yC]=ai(e[yC])),null!=e[pA]&&(i[pA]=ai(e[pA])),null!=e[vk]&&(i[vk]=ai(e[vk])),i},uE=(e,t)=>{const i={};return null!=e[vk]&&(i[vk]=ai(e[vk])),i},mE=(e,t)=>{const i={};return null!=e[vk]&&(i[vk]=ai(e[vk])),i},hE=(e,t)=>{const i={};return null!=e[yC]&&(i[yC]=ai(e[yC])),null!=e[pA]&&(i[pA]=ai(e[pA])),null!=e[vk]&&(i[vk]=ai(e[vk])),i},fE=(e,t)=>{const i={};return null!=e[yA]&&(i[yA]=ai(e[yA])),null!=e[vk]&&(i[vk]=ai(e[vk])),i},gE=(e,t)=>{const i={};return null!=e[vk]&&(i[vk]=ai(e[vk])),i},yE=(e,t)=>{const i={};return null!=e[HT]&&(i[HT]=ai(e[HT])),null!=e[vk]&&(i[vk]=ai(e[vk])),i},xE=(e,t)=>{const i={};return null!=e[nC]&&(i[nC]=ai(e[nC])),null!=e[vk]&&(i[vk]=ai(e[vk])),i},vE=(e,t)=>{const i={};return null!=e[yC]&&(i[yC]=ai(e[yC])),null!=e[pA]&&(i[pA]=ai(e[pA])),null!=e[vk]&&(i[vk]=ai(e[vk])),i},wE=(e,t)=>{const i={};return null!=e[YT]&&(i[YT]=ai(e[YT])),null!=e[vk]&&(i[vk]=ai(e[vk])),i},bE=(e,t)=>{const i={};return null!=e[HT]&&(i[HT]=ai(e[HT])),null!=e[vk]&&(i[vk]=ai(e[vk])),i},EE=(e,t)=>{const i={};return null!=e[vk]&&(i[vk]=ai(e[vk])),i},SE=(e,t)=>{const i={};return null!=e[HA]&&(i[HA]=ai(e[HA])),null!=e[QC]&&(i[QC]=ai(e[QC])),i},CE=(e,t)=>{const i={};return null!=e[vk]&&(i[vk]=ai(e[vk])),i},AE=(e,t)=>{const i={};return""===e.ConfigurationSets?i[xC]=[]:null!=e[xC]&&null!=e[xC][wk]&&(i[xC]=(e=>(e||[]).filter((e=>null!=e)).map((e=>wb(e))))(Ni(e[xC][wk]))),null!=e[EI]&&(i[EI]=ai(e[EI])),i},IE=(e,t)=>{const i={};return""===e.CustomVerificationEmailTemplates?i[EC]=[]:null!=e[EC]&&null!=e[EC][wk]&&(i[EC]=Mb(Ni(e[EC][wk]))),null!=e[EI]&&(i[EI]=ai(e[EI])),i},TE=(e,t)=>{const i={};return""===e.Identities?i[KA]=[]:null!=e[KA]&&null!=e[KA][wk]&&(i[KA]=(e=>(e||[]).filter((e=>null!=e)).map((e=>ai(e))))(Ni(e[KA][wk]))),null!=e[EI]&&(i[EI]=ai(e[EI])),i},kE=(e,t)=>{const i={};return""===e.PolicyNames?i[RI]=[]:null!=e[RI]&&null!=e[RI][wk]&&(i[RI]=LE(Ni(e[RI][wk]))),i},OE=(e,t)=>{const i={};return""===e.Filters?i[CA]=[]:null!=e[CA]&&null!=e[CA][wk]&&(i[CA]=qE(Ni(e[CA][wk]))),i},PE=(e,t)=>{const i={};return""===e.RuleSets?i[WI]=[]:null!=e[WI]&&null!=e[WI][wk]&&(i[WI]=KE(Ni(e[WI][wk]))),null!=e[EI]&&(i[EI]=ai(e[EI])),i},_E=(e,t)=>{const i={};return""===e.TemplatesMetadata?i[BT]=[]:null!=e[BT]&&null!=e[BT][wk]&&(i[BT]=bS(Ni(e[BT][wk]))),null!=e[EI]&&(i[EI]=ai(e[EI])),i},RE=(e,t)=>{const i={};return""===e.VerifiedEmailAddresses?i[uk]=[]:null!=e[uk]&&null!=e[uk][wk]&&(i[uk]=(e=>(e||[]).filter((e=>null!=e)).map((e=>ai(e))))(Ni(e[uk][wk]))),i},$E=(e,t)=>e.reduce(((e,t)=>(null===t.value||(e[t.key]=(e=>{const t={};return null!=e[dI]&&(t[dI]=ai(e[dI])),null!=e[mI]&&(t[mI]=ai(e[mI])),null!=e[XS]&&(t[XS]=ai(e[XS])),t})(t.value)),e)),{}),ME=(e,t)=>{const i={};return null!=e[vk]&&(i[vk]=ai(e[vk])),i},NE=(e,t)=>{const i={};return null!=e[vk]&&(i[vk]=ai(e[vk])),i},DE=(e,t)=>{const i={};return null!=e[HT]&&(i[HT]=ai(e[HT])),null!=e[vk]&&(i[vk]=ai(e[vk])),i},jE=(e,t)=>e.reduce(((e,t)=>(null===t.value||(e[t.key]=(e=>{const t={};return null!=e[tC]&&(t[tC]=ai(e[tC])),null!=e[wC]&&(t[wC]=ai(e[wC])),null!=e[ZC]&&(t[ZC]=ai(e[ZC])),null!=e[vA]&&(t[vA]=Qt(e[vA])),null!=e[DA]&&(t[DA]=Qt(e[DA])),null!=e[jA]&&(t[jA]=Qt(e[jA])),null!=e[zA]&&(t[zA]=Qt(e[zA])),t})(t.value)),e)),{}),zE=(e,t)=>e.reduce(((e,t)=>(null===t.value||(e[t.key]=ai(t.value)),e)),{}),LE=(e,t)=>(e||[]).filter((e=>null!=e)).map((e=>ai(e))),FE=(e,t)=>{const i={};return null!=e[vk]&&(i[vk]=ai(e[vk])),i},UE=(e,t)=>({}),BE=(e,t)=>({}),HE=(e,t)=>{const i={};return null!=e[sT]&&(i[sT]=tS(e[sT])),null!=e[KS]&&(i[KS]=(e=>{const t={};return null!=e[DT]&&(t[DT]=ai(e[DT])),null!=e[AT]&&(t[AT]=ai(e[AT])),null!=e[pT]&&(t[pT]=ai(e[pT])),null!=e[cI]&&(t[cI]=ai(e[cI])),null!=e[nT]&&(t[nT]=ai(e[nT])),t})(e[KS])),null!=e[yk]&&(i[yk]=NS(e[yk])),null!=e[JA]&&(i[JA]=(e=>{const t={};return null!=e[DT]&&(t[DT]=ai(e[DT])),null!=e[yA]&&(t[yA]=ai(e[yA])),null!=e[GA]&&(t[GA]=ai(e[GA])),t})(e[JA])),null!=e[rT]&&(i[rT]=xS(e[rT])),null!=e[HS]&&(i[HS]=(e=>{const t={};return null!=e[LA]&&(t[LA]=ai(e[LA])),null!=e[UA]&&(t[UA]=ai(e[UA])),t})(e[HS])),null!=e[ET]&&(i[ET]=gS(e[ET])),i},qE=(e,t)=>(e||[]).filter((e=>null!=e)).map((e=>(e=>{const t={};return null!=e[wI]&&(t[wI]=ai(e[wI])),null!=e[qA]&&(t[qA]=VE(e[qA])),t})(e))),VE=(e,t)=>{const i={};return null!=e[kI]&&(i[kI]=ai(e[kI])),null!=e[AC]&&(i[AC]=ai(e[AC])),i},GE=(e,t)=>{const i={};return null!=e[wI]&&(i[wI]=ai(e[wI])),null!=e[rA]&&(i[rA]=Qt(e[rA])),null!=e[VT]&&(i[VT]=ai(e[VT])),""===e.Recipients?i[ZI]=[]:null!=e[ZI]&&null!=e[ZI][wk]&&(i[ZI]=XE(Ni(e[ZI][wk]))),""===e.Actions?i[qS]=[]:null!=e[qS]&&null!=e[qS][wk]&&(i[qS]=(e=>(e||[]).filter((e=>null!=e)).map((e=>HE(e))))(Ni(e[qS][wk]))),null!=e[hT]&&(i[hT]=Qt(e[hT])),i},WE=(e,t)=>{const i={};return null!=e[wI]&&(i[wI]=ai(e[wI])),null!=e[bC]&&(i[bC]=si(fi(e[bC]))),i},KE=(e,t)=>(e||[]).filter((e=>null!=e)).map((e=>WE(e))),QE=(e,t)=>(e||[]).filter((e=>null!=e)).map((e=>GE(e))),XE=(e,t)=>(e||[]).filter((e=>null!=e)).map((e=>ai(e))),JE=(e,t)=>({}),YE=(e,t)=>{const i={};return null!=e[fT]&&(i[fT]=Qt(e[fT])),null!=e[zI]&&(i[zI]=Qt(e[zI])),null!=e[tI]&&(i[tI]=si(fi(e[tI]))),i},ZE=(e,t)=>{const i={};return null!=e[wI]&&(i[wI]=ai(e[wI])),null!=e[vk]&&(i[vk]=ai(e[vk])),i},eS=(e,t)=>{const i={};return null!=e[wI]&&(i[wI]=ai(e[wI])),null!=e[vk]&&(i[vk]=ai(e[vk])),i},tS=(e,t)=>{const i={};return null!=e[DT]&&(i[DT]=ai(e[DT])),null!=e[QS]&&(i[QS]=ai(e[QS])),null!=e[AI]&&(i[AI]=ai(e[AI])),null!=e[XA]&&(i[XA]=ai(e[XA])),null!=e[VA]&&(i[VA]=ai(e[VA])),i},iS=(e,t)=>{const i={};return null!=e[gI]&&(i[gI]=ai(e[gI])),i},nS=(e,t)=>{const i={};return""===e.Status?i[$T]=[]:null!=e[$T]&&null!=e[$T][wk]&&(i[$T]=gb(Ni(e[$T][wk]))),i},sS=(e,t)=>{const i={};return null!=e[gI]&&(i[gI]=ai(e[gI])),i},aS=(e,t)=>(e||[]).filter((e=>null!=e)).map((e=>(e=>{const t={};return null!=e[JT]&&(t[JT]=si(fi(e[JT]))),null!=e[PC]&&(t[PC]=pi(e[PC])),null!=e[iC]&&(t[iC]=pi(e[iC])),null!=e[IC]&&(t[IC]=pi(e[IC])),null!=e[eT]&&(t[eT]=pi(e[eT])),t})(e))),oS=(e,t)=>{const i={};return null!=e[gI]&&(i[gI]=ai(e[gI])),i},rS=(e,t)=>{const i={};return null!=e[gI]&&(i[gI]=ai(e[gI])),i},cS=(e,t)=>{const i={};return null!=e[gI]&&(i[gI]=ai(e[gI])),i},lS=(e,t)=>({}),pS=(e,t)=>({}),dS=(e,t)=>({}),uS=(e,t)=>({}),mS=(e,t)=>({}),hS=(e,t)=>({}),fS=(e,t)=>({}),gS=(e,t)=>{const i={};return null!=e[DT]&&(i[DT]=ai(e[DT])),null!=e[mA]&&(i[mA]=ai(e[mA])),i},yS=(e,t)=>{const i={};return null!=e[jT]&&(i[jT]=ai(e[jT])),i},xS=(e,t)=>{const i={};return null!=e[_T]&&(i[_T]=ai(e[_T])),null!=e[DT]&&(i[DT]=ai(e[DT])),i},vS=(e,t)=>{const i={};return null!=e[HT]&&(i[HT]=ai(e[HT])),null!=e[CT]&&(i[CT]=ai(e[CT])),null!=e[GT]&&(i[GT]=ai(e[GT])),null!=e[FA]&&(i[FA]=ai(e[FA])),i},wS=(e,t)=>{const i={};return null!=e[HT]&&(i[HT]=ai(e[HT])),null!=e[vk]&&(i[vk]=ai(e[vk])),i},bS=(e,t)=>(e||[]).filter((e=>null!=e)).map((e=>(e=>{const t={};return null!=e[wI]&&(t[wI]=ai(e[wI])),null!=e[bC]&&(t[bC]=si(fi(e[bC]))),t})(e))),ES=(e,t)=>{const i={};return null!=e[YI]&&(i[YI]=ai(e[YI])),i},SS=(e,t)=>{const i={};return null!=e[pC]&&(i[pC]=ai(e[pC])),i},CS=(e,t)=>{const i={};return null!=e[yC]&&(i[yC]=ai(e[yC])),null!=e[vk]&&(i[vk]=ai(e[vk])),i},AS=(e,t)=>{const i={};return null!=e[yC]&&(i[yC]=ai(e[yC])),null!=e[vk]&&(i[vk]=ai(e[vk])),i},IS=(e,t)=>({}),TS=(e,t)=>({}),kS=(e,t)=>({}),OS=(e,t)=>({}),PS=(e,t)=>e.reduce(((e,t)=>(null===t.value||(e[t.key]=(e=>{const t={};return null!=e[hk]&&(t[hk]=ai(e[hk])),null!=e[fk]&&(t[fk]=ai(e[fk])),t})(t.value)),e)),{}),_S=(e,t)=>(e||[]).filter((e=>null!=e)).map((e=>ai(e))),RS=(e,t)=>{const i={};return""===e.DkimTokens?i[eA]=[]:null!=e[eA]&&null!=e[eA][wk]&&(i[eA]=_S(Ni(e[eA][wk]))),i},$S=(e,t)=>{const i={};return null!=e[fk]&&(i[fk]=ai(e[fk])),i},MS=(e,t)=>({}),NS=(e,t)=>{const i={};return null!=e[DT]&&(i[DT]=ai(e[DT])),null!=e[CI]&&(i[CI]=ai(e[CI])),i},DS=e=>({httpStatusCode:e.statusCode,requestId:e.headers["x-amzn-requestid"]??e.headers["x-amzn-request-id"]??e.headers["x-amz-request-id"],extendedRequestId:e.headers["x-amz-id-2"],cfId:e.headers["x-amz-cf-id"]}),jS=Ii(Of),zS=async(e,t,i,n,s)=>{const{hostname:a,protocol:o="https",port:r,path:c}=await e.endpoint(),l={protocol:o,hostname:a,port:r,method:"POST",path:c.endsWith("/")?c.slice(0,-1)+i:c+i,headers:t};return void 0!==s&&(l.body=s),new I(l)},LS={"content-type":"application/x-www-form-urlencoded"},FS="2010-12-01",US="Action",BS="ArrivalDate",HS="AddHeaderAction",qS="Actions",VS="After",GS="Body",WS="BccAddresses",KS="BounceAction",QS="BucketName",XS="BehaviorOnMXFailure",JS="BouncedRecipientInfoList",YS="BounceSender",ZS="BounceSenderArn",eC="BounceType",tC="BounceTopic",iC="Bounces",nC="Bucket",sC="Charset",aC="CcAddresses",oC="CreateConfigurationSet",rC="CreateConfigurationSetEventDestination",cC="CreateConfigurationSetTrackingOptions",lC="CreateCustomVerificationEmailTemplate",pC="CustomRedirectDomain",dC="CreateReceiptFilter",uC="CreateReceiptRule",mC="CloneReceiptRuleSet",hC="CreateReceiptRuleSet",fC="ConfigurationSet",gC="ConfigurationSetAttributeNames",yC="ConfigurationSetName",xC="ConfigurationSets",vC="CreateTemplate",wC="ComplaintTopic",bC="CreatedTimestamp",EC="CustomVerificationEmailTemplates",SC="CustomVerificationEmailTemplateName",CC="CloudWatchDestination",AC="Cidr",IC="Complaints",TC="Destination",kC="DkimAttributes",OC="DescribeActiveReceiptRuleSet",PC="DeliveryAttempts",_C="DimensionConfigurations",RC="DeleteConfigurationSet",$C="DeleteConfigurationSetEventDestination",MC="DeleteConfigurationSetTrackingOptions",NC="DescribeConfigurationSet",DC="DeleteCustomVerificationEmailTemplate",jC="DiagnosticCode",zC="DefaultDimensionValue",LC="DkimEnabled",FC="DeleteIdentity",UC="DeleteIdentityPolicy",BC="DimensionName",HC="DeliveryOptions",qC="DeleteReceiptFilter",VC="DeleteReceiptRule",GC="DeleteReceiptRuleSet",WC="DescribeReceiptRuleSet",KC="DescribeReceiptRule",QC="DeliveryStreamARN",XC="DeleteTemplate",JC="DefaultTemplateData",YC="DefaultTags",ZC="DeliveryTopic",eA="DkimTokens",tA="DeleteVerifiedEmailAddress",iA="DimensionValueSource",nA="DkimVerificationStatus",sA="Data",aA="Destinations",oA="Domain",rA="Enabled",cA="EmailAddress",lA="EventDestination",pA="EventDestinationName",dA="EventDestinations",uA="ExtensionFields",mA="Encoding",hA="Error",fA="Explanation",gA="Filter",yA="FunctionArn",xA="FromArn",vA="ForwardingEnabled",wA="FromEmailAddress",bA="FilterName",EA="FinalRecipient",SA="FailureRedirectionURL",CA="Filters",AA="GetAccountSendingEnabled",IA="GetCustomVerificationEmailTemplate",TA="GetIdentityDkimAttributes",kA="GetIdentityMailFromDomainAttributes",OA="GetIdentityNotificationAttributes",PA="GetIdentityPolicies",_A="GetIdentityVerificationAttributes",RA="GetSendQuota",$A="GetSendStatistics",MA="GetTemplate",NA="Html",DA="HeadersInBounceNotificationsEnabled",jA="HeadersInComplaintNotificationsEnabled",zA="HeadersInDeliveryNotificationsEnabled",LA="HeaderName",FA="HtmlPart",UA="HeaderValue",BA="Identity",HA="IAMRoleARN",qA="IpFilter",VA="IamRoleArn",GA="InvocationType",WA="IdentityType",KA="Identities",QA="KinesisFirehoseDestination",XA="KmsKeyArn",JA="LambdaAction",YA="LastAttemptDate",ZA="ListConfigurationSets",eI="ListCustomVerificationEmailTemplates",tI="LastFreshStart",iI="ListIdentities",nI="ListIdentityPolicies",sI="ListReceiptFilters",aI="ListReceiptRuleSets",oI="ListTemplates",rI="ListVerifiedEmailAddresses",cI="Message",lI="MessageDsn",pI="MatchingEventTypes",dI="MailFromDomain",uI="MailFromDomainAttributes",mI="MailFromDomainStatus",hI="Max24HourSend",fI="MaxItems",gI="MessageId",yI="MaxResults",xI="MaxSendRate",vI="Metadata",wI="Name",bI="NotificationAttributes",EI="NextToken",SI="NotificationType",CI="OrganizationArn",AI="ObjectKeyPrefix",II="OriginalMessageId",TI="OriginalRuleSetName",kI="Policy",OI="PutConfigurationSetDeliveryOptions",PI="PutIdentityPolicy",_I="PolicyName",RI="PolicyNames",$I="Policies",MI="Recipient",NI="RecipientArn",DI="RecipientDsnFields",jI="ReportingMta",zI="ReputationMetricsEnabled",LI="RawMessage",FI="RemoteMta",UI="RuleName",BI="RuleNames",HI="ReputationOptions",qI="ReturnPath",VI="ReturnPathArn",GI="ReorderReceiptRuleSet",WI="RuleSets",KI="RuleSetName",QI="ReplacementTags",XI="ReplyToAddresses",JI="ReplacementTemplateData",YI="RenderedTemplate",ZI="Recipients",eT="Rejects",tT="Rule",iT="Rules",nT="Sender",sT="S3Action",aT="SetActiveReceiptRuleSet",oT="SourceArn",rT="StopAction",cT="SendBounce",lT="SendBulkTemplatedEmail",pT="StatusCode",dT="SendCustomVerificationEmail",uT="SendDataPoints",mT="SendEmail",hT="ScanEnabled",fT="SendingEnabled",gT="SetIdentityDkimEnabled",yT="SetIdentityFeedbackForwardingEnabled",xT="SetIdentityHeadersInNotificationsEnabled",vT="SetIdentityMailFromDomain",wT="SetIdentityNotificationTopic",bT="SentLast24Hours",ET="SNSAction",ST="SNSDestination",CT="SubjectPart",AT="SmtpReplyCode",IT="SendRawEmail",TT="SetReceiptRulePosition",kT="SuccessRedirectionURL",OT="SnsTopic",PT="SendTemplatedEmail",_T="Scope",RT="Source",$T="Status",MT="Subject",NT="Text",DT="TopicArn",jT="TopicARN",zT="TemplateArn",LT="ToAddresses",FT="TemplateContent",UT="TemplateData",BT="TemplatesMetadata",HT="TemplateName",qT="TrackingOptions",VT="TlsPolicy",GT="TextPart",WT="TestRenderTemplate",KT="TemplateSubject",QT="Tags",XT="Template",JT="Timestamp",YT="Topic",ZT="UpdateAccountSendingEnabled",ek="UpdateConfigurationSetEventDestination",tk="UpdateConfigurationSetReputationMetricsEnabled",ik="UpdateConfigurationSetSendingEnabled",nk="UpdateConfigurationSetTrackingOptions",sk="UpdateCustomVerificationEmailTemplate",ak="UpdateReceiptRule",ok="UpdateTemplate",rk="Version",ck="VerificationAttributes",lk="VerifyDomainDkim",pk="VerifyDomainIdentity",dk="VerifyEmailAddress",uk="VerifiedEmailAddresses",mk="VerifyEmailIdentity",hk="VerificationStatus",fk="VerificationToken",gk="Value",yk="WorkmailAction",xk="entry",vk="message",wk="member",bk=e=>Object.entries(e).map((([e,t])=>ye(e)+"="+ye(t))).join("&"),Ek=(e,t)=>void 0!==t.Error?.Code?t.Error.Code:404==e.statusCode?"NotFound":void 0;class Sk extends(Gt.classBuilder().ep(Yh).m((function(e,t,i,n){return[B(i,this.serialize,this.deserialize),cs(i,e.getEndpointParameterInstructions())]})).s("SimpleEmailService","CloneReceiptRuleSet",{}).n("SESClient","CloneReceiptRuleSetCommand").f(void 0,void 0).ser(pg).de(Ty).build()){}class Ck extends(Gt.classBuilder().ep(Yh).m((function(e,t,i,n){return[B(i,this.serialize,this.deserialize),cs(i,e.getEndpointParameterInstructions())]})).s("SimpleEmailService","CreateConfigurationSet",{}).n("SESClient","CreateConfigurationSetCommand").f(void 0,void 0).ser(dg).de(ky).build()){}class Ak extends(Gt.classBuilder().ep(Yh).m((function(e,t,i,n){return[B(i,this.serialize,this.deserialize),cs(i,e.getEndpointParameterInstructions())]})).s("SimpleEmailService","CreateConfigurationSetEventDestination",{}).n("SESClient","CreateConfigurationSetEventDestinationCommand").f(void 0,void 0).ser(ug).de(Oy).build()){}class Ik extends(Gt.classBuilder().ep(Yh).m((function(e,t,i,n){return[B(i,this.serialize,this.deserialize),cs(i,e.getEndpointParameterInstructions())]})).s("SimpleEmailService","CreateConfigurationSetTrackingOptions",{}).n("SESClient","CreateConfigurationSetTrackingOptionsCommand").f(void 0,void 0).ser(mg).de(Py).build()){}class Tk extends(Gt.classBuilder().ep(Yh).m((function(e,t,i,n){return[B(i,this.serialize,this.deserialize),cs(i,e.getEndpointParameterInstructions())]})).s("SimpleEmailService","CreateCustomVerificationEmailTemplate",{}).n("SESClient","CreateCustomVerificationEmailTemplateCommand").f(void 0,void 0).ser(hg).de(_y).build()){}class kk extends(Gt.classBuilder().ep(Yh).m((function(e,t,i,n){return[B(i,this.serialize,this.deserialize),cs(i,e.getEndpointParameterInstructions())]})).s("SimpleEmailService","CreateReceiptFilter",{}).n("SESClient","CreateReceiptFilterCommand").f(void 0,void 0).ser(fg).de(Ry).build()){}class Ok extends(Gt.classBuilder().ep(Yh).m((function(e,t,i,n){return[B(i,this.serialize,this.deserialize),cs(i,e.getEndpointParameterInstructions())]})).s("SimpleEmailService","CreateReceiptRule",{}).n("SESClient","CreateReceiptRuleCommand").f(void 0,void 0).ser(gg).de($y).build()){}class Pk extends(Gt.classBuilder().ep(Yh).m((function(e,t,i,n){return[B(i,this.serialize,this.deserialize),cs(i,e.getEndpointParameterInstructions())]})).s("SimpleEmailService","CreateReceiptRuleSet",{}).n("SESClient","CreateReceiptRuleSetCommand").f(void 0,void 0).ser(yg).de(My).build()){}class _k extends(Gt.classBuilder().ep(Yh).m((function(e,t,i,n){return[B(i,this.serialize,this.deserialize),cs(i,e.getEndpointParameterInstructions())]})).s("SimpleEmailService","CreateTemplate",{}).n("SESClient","CreateTemplateCommand").f(void 0,void 0).ser(xg).de(Ny).build()){}class Rk extends(Gt.classBuilder().ep(Yh).m((function(e,t,i,n){return[B(i,this.serialize,this.deserialize),cs(i,e.getEndpointParameterInstructions())]})).s("SimpleEmailService","DeleteConfigurationSet",{}).n("SESClient","DeleteConfigurationSetCommand").f(void 0,void 0).ser(vg).de(Dy).build()){}class $k extends(Gt.classBuilder().ep(Yh).m((function(e,t,i,n){return[B(i,this.serialize,this.deserialize),cs(i,e.getEndpointParameterInstructions())]})).s("SimpleEmailService","DeleteConfigurationSetEventDestination",{}).n("SESClient","DeleteConfigurationSetEventDestinationCommand").f(void 0,void 0).ser(wg).de(jy).build()){}class Mk extends(Gt.classBuilder().ep(Yh).m((function(e,t,i,n){return[B(i,this.serialize,this.deserialize),cs(i,e.getEndpointParameterInstructions())]})).s("SimpleEmailService","DeleteConfigurationSetTrackingOptions",{}).n("SESClient","DeleteConfigurationSetTrackingOptionsCommand").f(void 0,void 0).ser(bg).de(zy).build()){}class Nk extends(Gt.classBuilder().ep(Yh).m((function(e,t,i,n){return[B(i,this.serialize,this.deserialize),cs(i,e.getEndpointParameterInstructions())]})).s("SimpleEmailService","DeleteCustomVerificationEmailTemplate",{}).n("SESClient","DeleteCustomVerificationEmailTemplateCommand").f(void 0,void 0).ser(Eg).de(Ly).build()){}class Dk extends(Gt.classBuilder().ep(Yh).m((function(e,t,i,n){return[B(i,this.serialize,this.deserialize),cs(i,e.getEndpointParameterInstructions())]})).s("SimpleEmailService","DeleteIdentity",{}).n("SESClient","DeleteIdentityCommand").f(void 0,void 0).ser(Sg).de(Fy).build()){}class jk extends(Gt.classBuilder().ep(Yh).m((function(e,t,i,n){return[B(i,this.serialize,this.deserialize),cs(i,e.getEndpointParameterInstructions())]})).s("SimpleEmailService","DeleteIdentityPolicy",{}).n("SESClient","DeleteIdentityPolicyCommand").f(void 0,void 0).ser(Cg).de(Uy).build()){}class zk extends(Gt.classBuilder().ep(Yh).m((function(e,t,i,n){return[B(i,this.serialize,this.deserialize),cs(i,e.getEndpointParameterInstructions())]})).s("SimpleEmailService","DeleteReceiptFilter",{}).n("SESClient","DeleteReceiptFilterCommand").f(void 0,void 0).ser(Ag).de(By).build()){}class Lk extends(Gt.classBuilder().ep(Yh).m((function(e,t,i,n){return[B(i,this.serialize,this.deserialize),cs(i,e.getEndpointParameterInstructions())]})).s("SimpleEmailService","DeleteReceiptRule",{}).n("SESClient","DeleteReceiptRuleCommand").f(void 0,void 0).ser(Ig).de(Hy).build()){}class Fk extends(Gt.classBuilder().ep(Yh).m((function(e,t,i,n){return[B(i,this.serialize,this.deserialize),cs(i,e.getEndpointParameterInstructions())]})).s("SimpleEmailService","DeleteReceiptRuleSet",{}).n("SESClient","DeleteReceiptRuleSetCommand").f(void 0,void 0).ser(Tg).de(qy).build()){}class Uk extends(Gt.classBuilder().ep(Yh).m((function(e,t,i,n){return[B(i,this.serialize,this.deserialize),cs(i,e.getEndpointParameterInstructions())]})).s("SimpleEmailService","DeleteTemplate",{}).n("SESClient","DeleteTemplateCommand").f(void 0,void 0).ser(kg).de(Vy).build()){}class Bk extends(Gt.classBuilder().ep(Yh).m((function(e,t,i,n){return[B(i,this.serialize,this.deserialize),cs(i,e.getEndpointParameterInstructions())]})).s("SimpleEmailService","DeleteVerifiedEmailAddress",{}).n("SESClient","DeleteVerifiedEmailAddressCommand").f(void 0,void 0).ser(Og).de(Gy).build()){}class Hk extends(Gt.classBuilder().ep(Yh).m((function(e,t,i,n){return[B(i,this.serialize,this.deserialize),cs(i,e.getEndpointParameterInstructions())]})).s("SimpleEmailService","DescribeActiveReceiptRuleSet",{}).n("SESClient","DescribeActiveReceiptRuleSetCommand").f(void 0,void 0).ser(Pg).de(Wy).build()){}class qk extends(Gt.classBuilder().ep(Yh).m((function(e,t,i,n){return[B(i,this.serialize,this.deserialize),cs(i,e.getEndpointParameterInstructions())]})).s("SimpleEmailService","DescribeConfigurationSet",{}).n("SESClient","DescribeConfigurationSetCommand").f(void 0,void 0).ser(_g).de(Ky).build()){}class Vk extends(Gt.classBuilder().ep(Yh).m((function(e,t,i,n){return[B(i,this.serialize,this.deserialize),cs(i,e.getEndpointParameterInstructions())]})).s("SimpleEmailService","DescribeReceiptRule",{}).n("SESClient","DescribeReceiptRuleCommand").f(void 0,void 0).ser(Rg).de(Qy).build()){}class Gk extends(Gt.classBuilder().ep(Yh).m((function(e,t,i,n){return[B(i,this.serialize,this.deserialize),cs(i,e.getEndpointParameterInstructions())]})).s("SimpleEmailService","DescribeReceiptRuleSet",{}).n("SESClient","DescribeReceiptRuleSetCommand").f(void 0,void 0).ser($g).de(Xy).build()){}class Wk extends(Gt.classBuilder().ep(Yh).m((function(e,t,i,n){return[B(i,this.serialize,this.deserialize),cs(i,e.getEndpointParameterInstructions())]})).s("SimpleEmailService","GetAccountSendingEnabled",{}).n("SESClient","GetAccountSendingEnabledCommand").f(void 0,void 0).ser(Mg).de(Jy).build()){}class Kk extends(Gt.classBuilder().ep(Yh).m((function(e,t,i,n){return[B(i,this.serialize,this.deserialize),cs(i,e.getEndpointParameterInstructions())]})).s("SimpleEmailService","GetCustomVerificationEmailTemplate",{}).n("SESClient","GetCustomVerificationEmailTemplateCommand").f(void 0,void 0).ser(Ng).de(Yy).build()){}class Qk extends(Gt.classBuilder().ep(Yh).m((function(e,t,i,n){return[B(i,this.serialize,this.deserialize),cs(i,e.getEndpointParameterInstructions())]})).s("SimpleEmailService","GetIdentityDkimAttributes",{}).n("SESClient","GetIdentityDkimAttributesCommand").f(void 0,void 0).ser(Dg).de(Zy).build()){}class Xk extends(Gt.classBuilder().ep(Yh).m((function(e,t,i,n){return[B(i,this.serialize,this.deserialize),cs(i,e.getEndpointParameterInstructions())]})).s("SimpleEmailService","GetIdentityMailFromDomainAttributes",{}).n("SESClient","GetIdentityMailFromDomainAttributesCommand").f(void 0,void 0).ser(jg).de(ex).build()){}class Jk extends(Gt.classBuilder().ep(Yh).m((function(e,t,i,n){return[B(i,this.serialize,this.deserialize),cs(i,e.getEndpointParameterInstructions())]})).s("SimpleEmailService","GetIdentityNotificationAttributes",{}).n("SESClient","GetIdentityNotificationAttributesCommand").f(void 0,void 0).ser(zg).de(tx).build()){}class Yk extends(Gt.classBuilder().ep(Yh).m((function(e,t,i,n){return[B(i,this.serialize,this.deserialize),cs(i,e.getEndpointParameterInstructions())]})).s("SimpleEmailService","GetIdentityPolicies",{}).n("SESClient","GetIdentityPoliciesCommand").f(void 0,void 0).ser(Lg).de(ix).build()){}class Zk extends(Gt.classBuilder().ep(Yh).m((function(e,t,i,n){return[B(i,this.serialize,this.deserialize),cs(i,e.getEndpointParameterInstructions())]})).s("SimpleEmailService","GetIdentityVerificationAttributes",{}).n("SESClient","GetIdentityVerificationAttributesCommand").f(void 0,void 0).ser(Fg).de(nx).build()){}class eO extends(Gt.classBuilder().ep(Yh).m((function(e,t,i,n){return[B(i,this.serialize,this.deserialize),cs(i,e.getEndpointParameterInstructions())]})).s("SimpleEmailService","GetSendQuota",{}).n("SESClient","GetSendQuotaCommand").f(void 0,void 0).ser(Ug).de(sx).build()){}class tO extends(Gt.classBuilder().ep(Yh).m((function(e,t,i,n){return[B(i,this.serialize,this.deserialize),cs(i,e.getEndpointParameterInstructions())]})).s("SimpleEmailService","GetSendStatistics",{}).n("SESClient","GetSendStatisticsCommand").f(void 0,void 0).ser(Bg).de(ax).build()){}class iO extends(Gt.classBuilder().ep(Yh).m((function(e,t,i,n){return[B(i,this.serialize,this.deserialize),cs(i,e.getEndpointParameterInstructions())]})).s("SimpleEmailService","GetTemplate",{}).n("SESClient","GetTemplateCommand").f(void 0,void 0).ser(Hg).de(ox).build()){}class nO extends(Gt.classBuilder().ep(Yh).m((function(e,t,i,n){return[B(i,this.serialize,this.deserialize),cs(i,e.getEndpointParameterInstructions())]})).s("SimpleEmailService","ListConfigurationSets",{}).n("SESClient","ListConfigurationSetsCommand").f(void 0,void 0).ser(qg).de(rx).build()){}class sO extends(Gt.classBuilder().ep(Yh).m((function(e,t,i,n){return[B(i,this.serialize,this.deserialize),cs(i,e.getEndpointParameterInstructions())]})).s("SimpleEmailService","ListCustomVerificationEmailTemplates",{}).n("SESClient","ListCustomVerificationEmailTemplatesCommand").f(void 0,void 0).ser(Vg).de(cx).build()){}class aO extends(Gt.classBuilder().ep(Yh).m((function(e,t,i,n){return[B(i,this.serialize,this.deserialize),cs(i,e.getEndpointParameterInstructions())]})).s("SimpleEmailService","ListIdentities",{}).n("SESClient","ListIdentitiesCommand").f(void 0,void 0).ser(Gg).de(lx).build()){}class oO extends(Gt.classBuilder().ep(Yh).m((function(e,t,i,n){return[B(i,this.serialize,this.deserialize),cs(i,e.getEndpointParameterInstructions())]})).s("SimpleEmailService","ListIdentityPolicies",{}).n("SESClient","ListIdentityPoliciesCommand").f(void 0,void 0).ser(Wg).de(px).build()){}class rO extends(Gt.classBuilder().ep(Yh).m((function(e,t,i,n){return[B(i,this.serialize,this.deserialize),cs(i,e.getEndpointParameterInstructions())]})).s("SimpleEmailService","ListReceiptFilters",{}).n("SESClient","ListReceiptFiltersCommand").f(void 0,void 0).ser(Kg).de(dx).build()){}class cO extends(Gt.classBuilder().ep(Yh).m((function(e,t,i,n){return[B(i,this.serialize,this.deserialize),cs(i,e.getEndpointParameterInstructions())]})).s("SimpleEmailService","ListReceiptRuleSets",{}).n("SESClient","ListReceiptRuleSetsCommand").f(void 0,void 0).ser(Qg).de(ux).build()){}class lO extends(Gt.classBuilder().ep(Yh).m((function(e,t,i,n){return[B(i,this.serialize,this.deserialize),cs(i,e.getEndpointParameterInstructions())]})).s("SimpleEmailService","ListTemplates",{}).n("SESClient","ListTemplatesCommand").f(void 0,void 0).ser(Xg).de(mx).build()){}class pO extends(Gt.classBuilder().ep(Yh).m((function(e,t,i,n){return[B(i,this.serialize,this.deserialize),cs(i,e.getEndpointParameterInstructions())]})).s("SimpleEmailService","ListVerifiedEmailAddresses",{}).n("SESClient","ListVerifiedEmailAddressesCommand").f(void 0,void 0).ser(Jg).de(hx).build()){}class dO extends(Gt.classBuilder().ep(Yh).m((function(e,t,i,n){return[B(i,this.serialize,this.deserialize),cs(i,e.getEndpointParameterInstructions())]})).s("SimpleEmailService","PutConfigurationSetDeliveryOptions",{}).n("SESClient","PutConfigurationSetDeliveryOptionsCommand").f(void 0,void 0).ser(Yg).de(fx).build()){}class uO extends(Gt.classBuilder().ep(Yh).m((function(e,t,i,n){return[B(i,this.serialize,this.deserialize),cs(i,e.getEndpointParameterInstructions())]})).s("SimpleEmailService","PutIdentityPolicy",{}).n("SESClient","PutIdentityPolicyCommand").f(void 0,void 0).ser(Zg).de(gx).build()){}class mO extends(Gt.classBuilder().ep(Yh).m((function(e,t,i,n){return[B(i,this.serialize,this.deserialize),cs(i,e.getEndpointParameterInstructions())]})).s("SimpleEmailService","ReorderReceiptRuleSet",{}).n("SESClient","ReorderReceiptRuleSetCommand").f(void 0,void 0).ser(ey).de(yx).build()){}class hO extends(Gt.classBuilder().ep(Yh).m((function(e,t,i,n){return[B(i,this.serialize,this.deserialize),cs(i,e.getEndpointParameterInstructions())]})).s("SimpleEmailService","SendBounce",{}).n("SESClient","SendBounceCommand").f(void 0,void 0).ser(ty).de(xx).build()){}class fO extends(Gt.classBuilder().ep(Yh).m((function(e,t,i,n){return[B(i,this.serialize,this.deserialize),cs(i,e.getEndpointParameterInstructions())]})).s("SimpleEmailService","SendBulkTemplatedEmail",{}).n("SESClient","SendBulkTemplatedEmailCommand").f(void 0,void 0).ser(iy).de(vx).build()){}class gO extends(Gt.classBuilder().ep(Yh).m((function(e,t,i,n){return[B(i,this.serialize,this.deserialize),cs(i,e.getEndpointParameterInstructions())]})).s("SimpleEmailService","SendCustomVerificationEmail",{}).n("SESClient","SendCustomVerificationEmailCommand").f(void 0,void 0).ser(ny).de(wx).build()){}class yO extends(Gt.classBuilder().ep(Yh).m((function(e,t,i,n){return[B(i,this.serialize,this.deserialize),cs(i,e.getEndpointParameterInstructions())]})).s("SimpleEmailService","SendEmail",{}).n("SESClient","SendEmailCommand").f(void 0,void 0).ser(sy).de(bx).build()){}class xO extends(Gt.classBuilder().ep(Yh).m((function(e,t,i,n){return[B(i,this.serialize,this.deserialize),cs(i,e.getEndpointParameterInstructions())]})).s("SimpleEmailService","SendRawEmail",{}).n("SESClient","SendRawEmailCommand").f(void 0,void 0).ser(ay).de(Ex).build()){}class vO extends(Gt.classBuilder().ep(Yh).m((function(e,t,i,n){return[B(i,this.serialize,this.deserialize),cs(i,e.getEndpointParameterInstructions())]})).s("SimpleEmailService","SendTemplatedEmail",{}).n("SESClient","SendTemplatedEmailCommand").f(void 0,void 0).ser(oy).de(Sx).build()){}class wO extends(Gt.classBuilder().ep(Yh).m((function(e,t,i,n){return[B(i,this.serialize,this.deserialize),cs(i,e.getEndpointParameterInstructions())]})).s("SimpleEmailService","SetActiveReceiptRuleSet",{}).n("SESClient","SetActiveReceiptRuleSetCommand").f(void 0,void 0).ser(ry).de(Cx).build()){}class bO extends(Gt.classBuilder().ep(Yh).m((function(e,t,i,n){return[B(i,this.serialize,this.deserialize),cs(i,e.getEndpointParameterInstructions())]})).s("SimpleEmailService","SetIdentityDkimEnabled",{}).n("SESClient","SetIdentityDkimEnabledCommand").f(void 0,void 0).ser(cy).de(Ax).build()){}class EO extends(Gt.classBuilder().ep(Yh).m((function(e,t,i,n){return[B(i,this.serialize,this.deserialize),cs(i,e.getEndpointParameterInstructions())]})).s("SimpleEmailService","SetIdentityFeedbackForwardingEnabled",{}).n("SESClient","SetIdentityFeedbackForwardingEnabledCommand").f(void 0,void 0).ser(ly).de(Ix).build()){}class SO extends(Gt.classBuilder().ep(Yh).m((function(e,t,i,n){return[B(i,this.serialize,this.deserialize),cs(i,e.getEndpointParameterInstructions())]})).s("SimpleEmailService","SetIdentityHeadersInNotificationsEnabled",{}).n("SESClient","SetIdentityHeadersInNotificationsEnabledCommand").f(void 0,void 0).ser(py).de(Tx).build()){}class CO extends(Gt.classBuilder().ep(Yh).m((function(e,t,i,n){return[B(i,this.serialize,this.deserialize),cs(i,e.getEndpointParameterInstructions())]})).s("SimpleEmailService","SetIdentityMailFromDomain",{}).n("SESClient","SetIdentityMailFromDomainCommand").f(void 0,void 0).ser(dy).de(kx).build()){}class AO extends(Gt.classBuilder().ep(Yh).m((function(e,t,i,n){return[B(i,this.serialize,this.deserialize),cs(i,e.getEndpointParameterInstructions())]})).s("SimpleEmailService","SetIdentityNotificationTopic",{}).n("SESClient","SetIdentityNotificationTopicCommand").f(void 0,void 0).ser(uy).de(Ox).build()){}class IO extends(Gt.classBuilder().ep(Yh).m((function(e,t,i,n){return[B(i,this.serialize,this.deserialize),cs(i,e.getEndpointParameterInstructions())]})).s("SimpleEmailService","SetReceiptRulePosition",{}).n("SESClient","SetReceiptRulePositionCommand").f(void 0,void 0).ser(my).de(Px).build()){}class TO extends(Gt.classBuilder().ep(Yh).m((function(e,t,i,n){return[B(i,this.serialize,this.deserialize),cs(i,e.getEndpointParameterInstructions())]})).s("SimpleEmailService","TestRenderTemplate",{}).n("SESClient","TestRenderTemplateCommand").f(void 0,void 0).ser(hy).de(_x).build()){}class kO extends(Gt.classBuilder().ep(Yh).m((function(e,t,i,n){return[B(i,this.serialize,this.deserialize),cs(i,e.getEndpointParameterInstructions())]})).s("SimpleEmailService","UpdateAccountSendingEnabled",{}).n("SESClient","UpdateAccountSendingEnabledCommand").f(void 0,void 0).ser(fy).de(Rx).build()){}class OO extends(Gt.classBuilder().ep(Yh).m((function(e,t,i,n){return[B(i,this.serialize,this.deserialize),cs(i,e.getEndpointParameterInstructions())]})).s("SimpleEmailService","UpdateConfigurationSetEventDestination",{}).n("SESClient","UpdateConfigurationSetEventDestinationCommand").f(void 0,void 0).ser(gy).de($x).build()){}class PO extends(Gt.classBuilder().ep(Yh).m((function(e,t,i,n){return[B(i,this.serialize,this.deserialize),cs(i,e.getEndpointParameterInstructions())]})).s("SimpleEmailService","UpdateConfigurationSetReputationMetricsEnabled",{}).n("SESClient","UpdateConfigurationSetReputationMetricsEnabledCommand").f(void 0,void 0).ser(yy).de(Mx).build()){}class _O extends(Gt.classBuilder().ep(Yh).m((function(e,t,i,n){return[B(i,this.serialize,this.deserialize),cs(i,e.getEndpointParameterInstructions())]})).s("SimpleEmailService","UpdateConfigurationSetSendingEnabled",{}).n("SESClient","UpdateConfigurationSetSendingEnabledCommand").f(void 0,void 0).ser(xy).de(Nx).build()){}class RO extends(Gt.classBuilder().ep(Yh).m((function(e,t,i,n){return[B(i,this.serialize,this.deserialize),cs(i,e.getEndpointParameterInstructions())]})).s("SimpleEmailService","UpdateConfigurationSetTrackingOptions",{}).n("SESClient","UpdateConfigurationSetTrackingOptionsCommand").f(void 0,void 0).ser(vy).de(Dx).build()){}class $O extends(Gt.classBuilder().ep(Yh).m((function(e,t,i,n){return[B(i,this.serialize,this.deserialize),cs(i,e.getEndpointParameterInstructions())]})).s("SimpleEmailService","UpdateCustomVerificationEmailTemplate",{}).n("SESClient","UpdateCustomVerificationEmailTemplateCommand").f(void 0,void 0).ser(wy).de(jx).build()){}class MO extends(Gt.classBuilder().ep(Yh).m((function(e,t,i,n){return[B(i,this.serialize,this.deserialize),cs(i,e.getEndpointParameterInstructions())]})).s("SimpleEmailService","UpdateReceiptRule",{}).n("SESClient","UpdateReceiptRuleCommand").f(void 0,void 0).ser(by).de(zx).build()){}class NO extends(Gt.classBuilder().ep(Yh).m((function(e,t,i,n){return[B(i,this.serialize,this.deserialize),cs(i,e.getEndpointParameterInstructions())]})).s("SimpleEmailService","UpdateTemplate",{}).n("SESClient","UpdateTemplateCommand").f(void 0,void 0).ser(Ey).de(Lx).build()){}class DO extends(Gt.classBuilder().ep(Yh).m((function(e,t,i,n){return[B(i,this.serialize,this.deserialize),cs(i,e.getEndpointParameterInstructions())]})).s("SimpleEmailService","VerifyDomainDkim",{}).n("SESClient","VerifyDomainDkimCommand").f(void 0,void 0).ser(Sy).de(Fx).build()){}class jO extends(Gt.classBuilder().ep(Yh).m((function(e,t,i,n){return[B(i,this.serialize,this.deserialize),cs(i,e.getEndpointParameterInstructions())]})).s("SimpleEmailService","VerifyDomainIdentity",{}).n("SESClient","VerifyDomainIdentityCommand").f(void 0,void 0).ser(Cy).de(Ux).build()){}class zO extends(Gt.classBuilder().ep(Yh).m((function(e,t,i,n){return[B(i,this.serialize,this.deserialize),cs(i,e.getEndpointParameterInstructions())]})).s("SimpleEmailService","VerifyEmailAddress",{}).n("SESClient","VerifyEmailAddressCommand").f(void 0,void 0).ser(Ay).de(Bx).build()){}class LO extends(Gt.classBuilder().ep(Yh).m((function(e,t,i,n){return[B(i,this.serialize,this.deserialize),cs(i,e.getEndpointParameterInstructions())]})).s("SimpleEmailService","VerifyEmailIdentity",{}).n("SESClient","VerifyEmailIdentityCommand").f(void 0,void 0).ser(Iy).de(Hx).build()){}const FO={CloneReceiptRuleSetCommand:Sk,CreateConfigurationSetCommand:Ck,CreateConfigurationSetEventDestinationCommand:Ak,CreateConfigurationSetTrackingOptionsCommand:Ik,CreateCustomVerificationEmailTemplateCommand:Tk,CreateReceiptFilterCommand:kk,CreateReceiptRuleCommand:Ok,CreateReceiptRuleSetCommand:Pk,CreateTemplateCommand:_k,DeleteConfigurationSetCommand:Rk,DeleteConfigurationSetEventDestinationCommand:$k,DeleteConfigurationSetTrackingOptionsCommand:Mk,DeleteCustomVerificationEmailTemplateCommand:Nk,DeleteIdentityCommand:Dk,DeleteIdentityPolicyCommand:jk,DeleteReceiptFilterCommand:zk,DeleteReceiptRuleCommand:Lk,DeleteReceiptRuleSetCommand:Fk,DeleteTemplateCommand:Uk,DeleteVerifiedEmailAddressCommand:Bk,DescribeActiveReceiptRuleSetCommand:Hk,DescribeConfigurationSetCommand:qk,DescribeReceiptRuleCommand:Vk,DescribeReceiptRuleSetCommand:Gk,GetAccountSendingEnabledCommand:Wk,GetCustomVerificationEmailTemplateCommand:Kk,GetIdentityDkimAttributesCommand:Qk,GetIdentityMailFromDomainAttributesCommand:Xk,GetIdentityNotificationAttributesCommand:Jk,GetIdentityPoliciesCommand:Yk,GetIdentityVerificationAttributesCommand:Zk,GetSendQuotaCommand:eO,GetSendStatisticsCommand:tO,GetTemplateCommand:iO,ListConfigurationSetsCommand:nO,ListCustomVerificationEmailTemplatesCommand:sO,ListIdentitiesCommand:aO,ListIdentityPoliciesCommand:oO,ListReceiptFiltersCommand:rO,ListReceiptRuleSetsCommand:cO,ListTemplatesCommand:lO,ListVerifiedEmailAddressesCommand:pO,PutConfigurationSetDeliveryOptionsCommand:dO,PutIdentityPolicyCommand:uO,ReorderReceiptRuleSetCommand:mO,SendBounceCommand:hO,SendBulkTemplatedEmailCommand:fO,SendCustomVerificationEmailCommand:gO,SendEmailCommand:yO,SendRawEmailCommand:xO,SendTemplatedEmailCommand:vO,SetActiveReceiptRuleSetCommand:wO,SetIdentityDkimEnabledCommand:bO,SetIdentityFeedbackForwardingEnabledCommand:EO,SetIdentityHeadersInNotificationsEnabledCommand:SO,SetIdentityMailFromDomainCommand:CO,SetIdentityNotificationTopicCommand:AO,SetReceiptRulePositionCommand:IO,TestRenderTemplateCommand:TO,UpdateAccountSendingEnabledCommand:kO,UpdateConfigurationSetEventDestinationCommand:OO,UpdateConfigurationSetReputationMetricsEnabledCommand:PO,UpdateConfigurationSetSendingEnabledCommand:_O,UpdateConfigurationSetTrackingOptionsCommand:RO,UpdateCustomVerificationEmailTemplateCommand:$O,UpdateReceiptRuleCommand:MO,UpdateTemplateCommand:NO,VerifyDomainDkimCommand:DO,VerifyDomainIdentityCommand:jO,VerifyEmailAddressCommand:zO,VerifyEmailIdentityCommand:LO};let UO=class extends kf{};((e,t)=>{for(const i of Object.keys(e)){const n=e[i],s=async function(e,t,i){const s=new n(e);if("function"==typeof t)this.send(s,t);else{if("function"!=typeof i)return this.send(s,t);if("object"!=typeof t)throw new Error("Expected http options but got "+typeof t);this.send(s,t||{},i)}},a=(i[0].toLowerCase()+i.slice(1)).replace(/Command$/,"");t.prototype[a]=s}})(FO,UO);const BO=Q(kf,sO,"NextToken","NextToken","MaxResults"),HO=Q(kf,aO,"NextToken","NextToken","MaxItems"),qO=async(e,t)=>{let i;try{const n=await e.send(new Zk(t));i=n;try{const e=()=>Object.values(n.VerificationAttributes).map((e=>e.VerificationStatus));let t=e().length>0;for(const i of e())t=t&&"Success"==i;if(t)return{state:fc.SUCCESS,reason:i}}catch(e){}}catch(e){i=e}return{state:fc.RETRY,reason:i}};var VO,GO,WO=Object.freeze({__proto__:null,$Command:Gt,AccountSendingPausedException:Pf,AlreadyExistsException:_f,BehaviorOnMXFailure:{RejectMessage:"RejectMessage",UseDefaultValue:"UseDefaultValue"},BounceType:{ContentRejected:"ContentRejected",DoesNotExist:"DoesNotExist",ExceededQuota:"ExceededQuota",MessageTooLarge:"MessageTooLarge",TemporaryFailure:"TemporaryFailure",Undefined:"Undefined"},BulkEmailStatus:{AccountDailyQuotaExceeded:"AccountDailyQuotaExceeded",AccountSendingPaused:"AccountSendingPaused",AccountSuspended:"AccountSuspended",AccountThrottled:"AccountThrottled",ConfigurationSetDoesNotExist:"ConfigurationSetDoesNotExist",ConfigurationSetSendingPaused:"ConfigurationSetSendingPaused",Failed:"Failed",InvalidParameterValue:"InvalidParameterValue",InvalidSendingPoolName:"InvalidSendingPoolName",MailFromDomainNotVerified:"MailFromDomainNotVerified",MessageRejected:"MessageRejected",Success:"Success",TemplateDoesNotExist:"TemplateDoesNotExist",TransientFailure:"TransientFailure"},CannotDeleteException:Rf,CloneReceiptRuleSetCommand:Sk,ConfigurationSetAlreadyExistsException:Nf,ConfigurationSetAttribute:{DELIVERY_OPTIONS:"deliveryOptions",EVENT_DESTINATIONS:"eventDestinations",REPUTATION_OPTIONS:"reputationOptions",TRACKING_OPTIONS:"trackingOptions"},ConfigurationSetDoesNotExistException:Df,ConfigurationSetSendingPausedException:jf,CreateConfigurationSetCommand:Ck,CreateConfigurationSetEventDestinationCommand:Ak,CreateConfigurationSetTrackingOptionsCommand:Ik,CreateCustomVerificationEmailTemplateCommand:Tk,CreateReceiptFilterCommand:kk,CreateReceiptRuleCommand:Ok,CreateReceiptRuleSetCommand:Pk,CreateTemplateCommand:_k,CustomMailFromStatus:{Failed:"Failed",Pending:"Pending",Success:"Success",TemporaryFailure:"TemporaryFailure"},CustomVerificationEmailInvalidContentException:Vf,CustomVerificationEmailTemplateAlreadyExistsException:Gf,CustomVerificationEmailTemplateDoesNotExistException:Zf,DeleteConfigurationSetCommand:Rk,DeleteConfigurationSetEventDestinationCommand:$k,DeleteConfigurationSetTrackingOptionsCommand:Mk,DeleteCustomVerificationEmailTemplateCommand:Nk,DeleteIdentityCommand:Dk,DeleteIdentityPolicyCommand:jk,DeleteReceiptFilterCommand:zk,DeleteReceiptRuleCommand:Lk,DeleteReceiptRuleSetCommand:Fk,DeleteTemplateCommand:Uk,DeleteVerifiedEmailAddressCommand:Bk,DescribeActiveReceiptRuleSetCommand:Hk,DescribeConfigurationSetCommand:qk,DescribeReceiptRuleCommand:Vk,DescribeReceiptRuleSetCommand:Gk,DimensionValueSource:{EMAIL_HEADER:"emailHeader",LINK_TAG:"linkTag",MESSAGE_TAG:"messageTag"},DsnAction:{DELAYED:"delayed",DELIVERED:"delivered",EXPANDED:"expanded",FAILED:"failed",RELAYED:"relayed"},EventDestinationAlreadyExistsException:Lf,EventDestinationDoesNotExistException:eg,EventType:{BOUNCE:"bounce",CLICK:"click",COMPLAINT:"complaint",DELIVERY:"delivery",OPEN:"open",REJECT:"reject",RENDERING_FAILURE:"renderingFailure",SEND:"send"},FromEmailAddressNotVerifiedException:Wf,GetAccountSendingEnabledCommand:Wk,GetCustomVerificationEmailTemplateCommand:Kk,GetIdentityDkimAttributesCommand:Qk,GetIdentityMailFromDomainAttributesCommand:Xk,GetIdentityNotificationAttributesCommand:Jk,GetIdentityPoliciesCommand:Yk,GetIdentityVerificationAttributesCommand:Zk,GetSendQuotaCommand:eO,GetSendStatisticsCommand:tO,GetTemplateCommand:iO,IdentityType:{Domain:"Domain",EmailAddress:"EmailAddress"},InvalidCloudWatchDestinationException:Ff,InvalidConfigurationSetException:zf,InvalidDeliveryOptionsException:ng,InvalidFirehoseDestinationException:Uf,InvalidLambdaFunctionException:Kf,InvalidPolicyException:sg,InvalidRenderingParameterException:ag,InvalidS3ConfigurationException:Qf,InvalidSNSDestinationException:Bf,InvalidSnsTopicException:Xf,InvalidTemplateException:Yf,InvalidTrackingOptionsException:Hf,InvocationType:{Event:"Event",RequestResponse:"RequestResponse"},LimitExceededException:$f,ListConfigurationSetsCommand:nO,ListCustomVerificationEmailTemplatesCommand:sO,ListIdentitiesCommand:aO,ListIdentityPoliciesCommand:oO,ListReceiptFiltersCommand:rO,ListReceiptRuleSetsCommand:cO,ListTemplatesCommand:lO,ListVerifiedEmailAddressesCommand:pO,MailFromDomainNotVerifiedException:og,MessageRejected:rg,MissingRenderingAttributeException:cg,NotificationType:{Bounce:"Bounce",Complaint:"Complaint",Delivery:"Delivery"},ProductionAccessNotGrantedException:lg,PutConfigurationSetDeliveryOptionsCommand:dO,PutIdentityPolicyCommand:uO,ReceiptFilterPolicy:{Allow:"Allow",Block:"Block"},ReorderReceiptRuleSetCommand:mO,RuleDoesNotExistException:Jf,RuleSetDoesNotExistException:Mf,SES:UO,SESClient:kf,SESServiceException:Of,SNSActionEncoding:{Base64:"Base64",UTF8:"UTF-8"},SendBounceCommand:hO,SendBulkTemplatedEmailCommand:fO,SendCustomVerificationEmailCommand:gO,SendEmailCommand:yO,SendRawEmailCommand:xO,SendTemplatedEmailCommand:vO,SetActiveReceiptRuleSetCommand:wO,SetIdentityDkimEnabledCommand:bO,SetIdentityFeedbackForwardingEnabledCommand:EO,SetIdentityHeadersInNotificationsEnabledCommand:SO,SetIdentityMailFromDomainCommand:CO,SetIdentityNotificationTopicCommand:AO,SetReceiptRulePositionCommand:IO,StopScope:{RULE_SET:"RuleSet"},TemplateDoesNotExistException:ig,TestRenderTemplateCommand:TO,TlsPolicy:{Optional:"Optional",Require:"Require"},TrackingOptionsAlreadyExistsException:qf,TrackingOptionsDoesNotExistException:tg,UpdateAccountSendingEnabledCommand:kO,UpdateConfigurationSetEventDestinationCommand:OO,UpdateConfigurationSetReputationMetricsEnabledCommand:PO,UpdateConfigurationSetSendingEnabledCommand:_O,UpdateConfigurationSetTrackingOptionsCommand:RO,UpdateCustomVerificationEmailTemplateCommand:$O,UpdateReceiptRuleCommand:MO,UpdateTemplateCommand:NO,VerificationStatus:{Failed:"Failed",NotStarted:"NotStarted",Pending:"Pending",Success:"Success",TemporaryFailure:"TemporaryFailure"},VerifyDomainDkimCommand:DO,VerifyDomainIdentityCommand:jO,VerifyEmailAddressCommand:zO,VerifyEmailIdentityCommand:LO,__Client:Vt,paginateListCustomVerificationEmailTemplates:BO,paginateListIdentities:HO,waitForIdentityExists:async(e,t)=>wc({minDelay:3,maxDelay:120,...e},t,qO),waitUntilIdentityExists:async(e,t)=>(e=>{if(e.state===fc.ABORTED){const t=new Error(`${JSON.stringify({...e,reason:"Request was aborted"})}`);throw t.name="AbortError",t}if(e.state===fc.TIMEOUT){const t=new Error(`${JSON.stringify({...e,reason:"Waiter has timed out"})}`);throw t.name="TimeoutError",t}if(e.state!==fc.SUCCESS)throw new Error(`${JSON.stringify(e)}`);return e})(await wc({minDelay:3,maxDelay:120,...e},t,qO))}),KO={},QO={exports:{}},XO={exports:{}};var JO,YO,ZO,eP,tP,iP,nP,sP,aP,oP,rP,cP,lP,pP,dP,uP,mP,hP,fP,gP,yP,xP,vP,wP,bP,EP,SP,CP,AP={name:"nodemailer",version:"6.9.16",description:"Easy as cake e-mail sending from your Node.js applications",main:"lib/nodemailer.js",scripts:{test:"node --test --test-concurrency=1 test/**/*.test.js test/**/*-test.js","test:coverage":"c8 node --test --test-concurrency=1 test/**/*.test.js test/**/*-test.js",lint:"eslint .",update:"rm -rf node_modules/ package-lock.json && ncu -u && npm install"},repository:{type:"git",url:"https://github.com/nodemailer/nodemailer.git"},keywords:["Nodemailer"],author:"Andris Reinman",license:"MIT-0",bugs:{url:"https://github.com/nodemailer/nodemailer/issues"},homepage:"https://nodemailer.com/",devDependencies:{"@aws-sdk/client-ses":"3.679.0",bunyan:"1.8.15",c8:"10.1.2",eslint:"8.57.0","eslint-config-nodemailer":"1.2.0","eslint-config-prettier":"9.1.0",libbase64:"1.3.0",libmime:"5.3.5",libqp:"2.1.0","nodemailer-ntlm-auth":"1.0.4",proxy:"1.0.2","proxy-test-server":"1.0.0","smtp-server":"3.13.6"},engines:{node:">=6.0.0"}};function IP(){if(JO)return XO.exports;JO=1;const e=a,t=o,n=i,s=r,p=c.PassThrough,d=function(){if(GO)return VO;GO=1;const e=i;return VO=class{constructor(e){this.options=e||{},this.cookies=[]}set(t,i){let n,s=e.parse(i||""),a=this.parse(t);return a.domain?(n=a.domain.replace(/^\./,""),(s.hostname.length<n.length||("."+s.hostname).substr(1-n.length)!=="."+n)&&(a.domain=s.hostname)):a.domain=s.hostname,a.path||(a.path=this.getPath(s.pathname)),a.expires||(a.expires=new Date(Date.now()+1e3*(Number(this.options.sessionTimeout||1800)||1800))),this.add(a)}get(e){return this.list(e).map((e=>e.name+"="+e.value)).join("; ")}list(e){let t,i,n=[];for(t=this.cookies.length-1;t>=0;t--)i=this.cookies[t],this.isExpired(i)?this.cookies.splice(t,t):this.match(i,e)&&n.unshift(i);return n}parse(e){let t={};return(e||"").toString().split(";").forEach((e=>{let i,n=e.split("="),s=n.shift().trim().toLowerCase(),a=n.join("=").trim();if(s)switch(s){case"expires":a=new Date(a),"Invalid Date"!==a.toString()&&(t.expires=a);break;case"path":t.path=a;break;case"domain":i=a.toLowerCase(),i.length&&"."!==i.charAt(0)&&(i="."+i),t.domain=i;break;case"max-age":t.expires=new Date(Date.now()+1e3*(Number(a)||0));break;case"secure":t.secure=!0;break;case"httponly":t.httponly=!0;break;default:t.name||(t.name=s,t.value=a)}})),t}match(t,i){let n=e.parse(i||"");return(n.hostname===t.domain||"."===t.domain.charAt(0)&&("."+n.hostname).substr(-t.domain.length)===t.domain)&&this.getPath(n.pathname).substr(0,t.path.length)===t.path&&(!t.secure||"https:"===n.protocol)}add(e){let t,i;if(!e||!e.name)return!1;for(t=0,i=this.cookies.length;t<i;t++)if(this.compare(this.cookies[t],e))return this.isExpired(e)?(this.cookies.splice(t,1),!1):(this.cookies[t]=e,!0);return this.isExpired(e)||this.cookies.push(e),!0}compare(e,t){return e.name===t.name&&e.path===t.path&&e.domain===t.domain&&e.secure===t.secure&&e.httponly==e.httponly}isExpired(e){return e.expires&&e.expires<new Date||!e.value}getPath(e){let t=(e||"/").split("/");return t.pop(),t=t.join("/").trim(),"/"!==t.charAt(0)&&(t="/"+t),"/"!==t.substr(-1)&&(t+="/"),t}},VO}(),u=AP,m=l;function h(i,a){(a=a||{}).fetchRes=a.fetchRes||new p,a.cookies=a.cookies||new d,a.redirects=a.redirects||0,a.maxRedirects=isNaN(a.maxRedirects)?5:a.maxRedirects,a.cookie&&([].concat(a.cookie||[]).forEach((e=>{a.cookies.set(e,i)})),a.cookie=!1);let o,r,c,l=a.fetchRes,f=n.parse(i),g=(a.method||"").toString().trim().toUpperCase()||"GET",y=!1,x="https:"===f.protocol?t:e,v={"accept-encoding":"gzip,deflate","user-agent":"nodemailer/"+u.version};if(Object.keys(a.headers||{}).forEach((e=>{v[e.toLowerCase().trim()]=a.headers[e]})),a.userAgent&&(v["user-agent"]=a.userAgent),f.auth&&(v.Authorization="Basic "+Buffer.from(f.auth).toString("base64")),(o=a.cookies.get(i))&&(v.cookie=o),a.body){if(!1!==a.contentType&&(v["Content-Type"]=a.contentType||"application/x-www-form-urlencoded"),"function"==typeof a.body.pipe)v["Transfer-Encoding"]="chunked",r=a.body,r.on("error",(e=>{y||(y=!0,e.type="FETCH",e.sourceUrl=i,l.emit("error",e))}));else{if(a.body instanceof Buffer)r=a.body;else if("object"==typeof a.body)try{r=Buffer.from(Object.keys(a.body).map((e=>{let t=a.body[e].toString().trim();return encodeURIComponent(e)+"="+encodeURIComponent(t)})).join("&"))}catch(e){if(y)return;return y=!0,e.type="FETCH",e.sourceUrl=i,void l.emit("error",e)}else r=Buffer.from(a.body.toString().trim());v["Content-Type"]=a.contentType||"application/x-www-form-urlencoded",v["Content-Length"]=r.length}g=(a.method||"").toString().trim().toUpperCase()||"POST"}let w={method:g,host:f.hostname,path:f.path,port:f.port?f.port:"https:"===f.protocol?443:80,headers:v,rejectUnauthorized:!1,agent:!1};a.tls&&Object.keys(a.tls).forEach((e=>{w[e]=a.tls[e]})),"https:"!==f.protocol||!f.hostname||f.hostname===w.host||m.isIP(f.hostname)||w.servername||(w.servername=f.hostname);try{c=x.request(w)}catch(e){return y=!0,setImmediate((()=>{e.type="FETCH",e.sourceUrl=i,l.emit("error",e)})),l}return a.timeout&&c.setTimeout(a.timeout,(()=>{if(y)return;y=!0,c.abort();let e=new Error("Request Timeout");e.type="FETCH",e.sourceUrl=i,l.emit("error",e)})),c.on("error",(e=>{y||(y=!0,e.type="FETCH",e.sourceUrl=i,l.emit("error",e))})),c.on("response",(e=>{let t;if(!y){switch(e.headers["content-encoding"]){case"gzip":case"deflate":t=s.createUnzip()}if(e.headers["set-cookie"]&&[].concat(e.headers["set-cookie"]||[]).forEach((e=>{a.cookies.set(e,i)})),[301,302,303,307,308].includes(e.statusCode)&&e.headers.location){if(a.redirects++,a.redirects>a.maxRedirects){y=!0;let e=new Error("Maximum redirect count exceeded");return e.type="FETCH",e.sourceUrl=i,l.emit("error",e),void c.abort()}return a.method="GET",a.body=!1,h(n.resolve(i,e.headers.location),a)}if(l.statusCode=e.statusCode,l.headers=e.headers,e.statusCode>=300&&!a.allowErrorResponse){y=!0;let t=new Error("Invalid status code "+e.statusCode);return t.type="FETCH",t.sourceUrl=i,l.emit("error",t),void c.abort()}e.on("error",(e=>{y||(y=!0,e.type="FETCH",e.sourceUrl=i,l.emit("error",e),c.abort())})),t?(e.pipe(t).pipe(l),t.on("error",(e=>{y||(y=!0,e.type="FETCH",e.sourceUrl=i,l.emit("error",e),c.abort())}))):e.pipe(l)}})),setImmediate((()=>{if(r)try{if("function"==typeof r.pipe)return r.pipe(c);c.write(r)}catch(e){return y=!0,e.type="FETCH",e.sourceUrl=i,void l.emit("error",e)}c.end()})),l}return XO.exports=function(e,t){return h(e,t)},XO.exports.Cookies=d,XO.exports}function TP(){return YO||(YO=1,function(e){const t=i,a=n,o=s,r=IP(),c=p,u=l,m=d,h=3e5;let f;try{f=m.networkInterfaces()}catch(e){}e.exports.networkInterfaces=f;const g=(t,i)=>{let n=e.exports.networkInterfaces;if(!n)return!0;const s=Object.keys(n).map((e=>n[e])).reduce(((e,t)=>e.concat(t)),[]).filter((e=>!e.internal||i)).filter((e=>e.family==="IPv"+t||e.family===t)).length>0;return s},y=(e,t,i,n)=>{if(!g(e,(i=i||{}).allowInternalNetworkInterfaces))return n(null,[]);(c.Resolver?new c.Resolver(i):c)["resolve"+e](t,((e,t)=>{if(e){switch(e.code){case c.NODATA:case c.NOTFOUND:case c.NOTIMP:case c.SERVFAIL:case c.CONNREFUSED:case c.REFUSED:case"EAI_AGAIN":return n(null,[])}return n(e)}return n(null,Array.isArray(t)?t:[].concat(t||[]))}))},x=e.exports.dnsCache=new Map,v=(e,t)=>e?Object.assign({servername:e.servername,host:e.addresses&&e.addresses.length?1===e.addresses.length?e.addresses[0]:e.addresses[Math.floor(Math.random()*e.addresses.length)]:null},t||{}):Object.assign({},t||{});function w(e,t){let i=!1,n=[],s=0;e.on("error",(e=>{i||(i=!0,t(e))})),e.on("readable",(()=>{let t;for(;null!==(t=e.read());)n.push(t),s+=t.length})),e.on("end",(()=>{if(i)return;let e;i=!0;try{e=Buffer.concat(n,s)}catch(e){return t(e)}t(null,e)}))}e.exports.resolveHostname=(e,t)=>{if(!(e=e||{}).host&&e.servername&&(e.host=e.servername),!e.host||u.isIP(e.host)){let i={addresses:[e.host],servername:e.servername||!1};return t(null,v(i,{cached:!1}))}let i;if(x.has(e.host)&&(i=x.get(e.host),!i.expires||i.expires>=Date.now()))return t(null,v(i.value,{cached:!0}));y(4,e.host,e,((n,s)=>{if(n)return i?t(null,v(i.value,{cached:!0,error:n})):t(n);if(s&&s.length){let i={addresses:s,servername:e.servername||e.host};return x.set(e.host,{value:i,expires:Date.now()+(e.dnsTtl||h)}),t(null,v(i,{cached:!1}))}y(6,e.host,e,((n,s)=>{if(n)return i?t(null,v(i.value,{cached:!0,error:n})):t(n);if(s&&s.length){let i={addresses:s,servername:e.servername||e.host};return x.set(e.host,{value:i,expires:Date.now()+(e.dnsTtl||h)}),t(null,v(i,{cached:!1}))}try{c.lookup(e.host,{all:!0},((n,s)=>{if(n)return i?t(null,v(i.value,{cached:!0,error:n})):t(n);let a=!!s&&s.filter((e=>g(e.family))).map((e=>e.address)).shift();if(s&&s.length&&!a&&console.warn(`Failed to resolve IPv${s[0].family} addresses with current network`),!a&&i)return t(null,v(i.value,{cached:!0}));let o={addresses:a?[a]:[e.host],servername:e.servername||e.host};return x.set(e.host,{value:o,expires:Date.now()+(e.dnsTtl||h)}),t(null,v(o,{cached:!1}))}))}catch(n){return i?t(null,v(i.value,{cached:!0,error:n})):t(n)}}))}))},e.exports.parseConnectionUrl=e=>{e=e||"";let i={};return[t.parse(e,!0)].forEach((e=>{let t;switch(e.protocol){case"smtp:":i.secure=!1;break;case"smtps:":i.secure=!0;break;case"direct:":i.direct=!0}!isNaN(e.port)&&Number(e.port)&&(i.port=Number(e.port)),e.hostname&&(i.host=e.hostname),e.auth&&(t=e.auth.split(":"),i.auth||(i.auth={}),i.auth.user=t.shift(),i.auth.pass=t.join(":")),Object.keys(e.query||{}).forEach((t=>{let n=i,s=t,a=e.query[t];switch(isNaN(a)||(a=Number(a)),a){case"true":a=!0;break;case"false":a=!1}if(0===t.indexOf("tls."))s=t.substr(4),i.tls||(i.tls={}),n=i.tls;else if(t.indexOf(".")>=0)return;s in n||(n[s]=a)}))})),i},e.exports._logFunc=(e,t,i,n,s,...a)=>{let o={};Object.keys(i||{}).forEach((e=>{"level"!==e&&(o[e]=i[e])})),Object.keys(n||{}).forEach((e=>{"level"!==e&&(o[e]=n[e])})),e[t](o,s,...a)},e.exports.getLogger=(t,i)=>{let n={},s=["trace","debug","info","warn","error","fatal"];if(!(t=t||{}).logger)return s.forEach((e=>{n[e]=()=>!1})),n;let o=t.logger;return!0===t.logger&&(o=function(e){let t=0,i=new Map;e.forEach((e=>{e.length>t&&(t=e.length)})),e.forEach((e=>{let n=e.toUpperCase();n.length<t&&(n+=" ".repeat(t-n.length)),i.set(e,n)}));let n=(e,t,n,...s)=>{let o="";t&&("server"===t.tnx?o="S: ":"client"===t.tnx&&(o="C: "),t.sid&&(o="["+t.sid+"] "+o),t.cid&&(o="[#"+t.cid+"] "+o)),(n=a.format(n,...s)).split(/\r?\n/).forEach((t=>{console.log("[%s] %s %s",(new Date).toISOString().substr(0,19).replace(/T/," "),i.get(e),o+t)}))},s={};return e.forEach((e=>{s[e]=n.bind(null,e)})),s}(s)),s.forEach((t=>{n[t]=(n,s,...a)=>{e.exports._logFunc(o,t,i,n,s,...a)}})),n},e.exports.callbackPromise=(e,t)=>function(){let i=Array.from(arguments),n=i.shift();n?t(n):e(...i)},e.exports.parseDataURI=e=>{let t=e,i=t.indexOf(",");if(!i)return e;let n,s=t.substring(i+1),a=t.substring(5,i).split(";"),o=a.length>1&&a[a.length-1];o&&o.indexOf("=")<0&&(n=o.toLowerCase(),a.pop());let r=a.shift()||"application/octet-stream",c={};for(let e of a){let t=e.indexOf("=");if(t>=0){let i=e.substring(0,t),n=e.substring(t+1);c[i]=n}}switch(n){case"base64":s=Buffer.from(s,"base64");break;case"utf8":s=Buffer.from(s);break;default:try{s=Buffer.from(decodeURIComponent(s))}catch(e){s=Buffer.from(s)}s=Buffer.from(s)}return{data:s,encoding:n,contentType:r,params:c}},e.exports.resolveContent=(t,i,n)=>{let s;n||(s=new Promise(((t,i)=>{n=e.exports.callbackPromise(t,i)})));let a,c=t&&t[i]&&t[i].content||t[i],l=("object"==typeof t[i]&&t[i].encoding||"utf8").toString().toLowerCase().replace(/[-_\s]/g,"");if(!c)return n(null,c);if("object"==typeof c){if("function"==typeof c.pipe)return w(c,((e,s)=>{if(e)return n(e);t[i].content?t[i].content=s:t[i]=s,n(null,s)}));if(/^https?:\/\//i.test(c.path||c.href))return a=r(c.path||c.href),w(a,n);if(/^data:/i.test(c.path||c.href)){let t=e.exports.parseDataURI(c.path||c.href);return t&&t.data?n(null,t.data):n(null,Buffer.from(0))}if(c.path)return w(o.createReadStream(c.path),n)}return"string"!=typeof t[i].content||["utf8","usascii","ascii"].includes(l)||(c=Buffer.from(t[i].content,l)),setImmediate((()=>n(null,c))),s},e.exports.assign=function(){let e=Array.from(arguments),t=e.shift()||{};return e.forEach((e=>{Object.keys(e||{}).forEach((i=>{["tls","auth"].includes(i)&&e[i]&&"object"==typeof e[i]?(t[i]||(t[i]={}),Object.keys(e[i]).forEach((n=>{t[i][n]=e[i][n]}))):t[i]=e[i]}))})),t},e.exports.encodeXText=e=>{if(!/[^\x21-\x2A\x2C-\x3C\x3E-\x7E]/.test(e))return e;let t=Buffer.from(e),i="";for(let e=0,n=t.length;e<n;e++){let n=t[e];i+=n<33||n>126||43===n||61===n?"+"+(n<16?"0":"")+n.toString(16).toUpperCase():String.fromCharCode(n)}return i}}(QO)),QO.exports}function kP(){if(eP)return ZO;eP=1;const e=u,t="application/octet-stream",i=new Map([["application/acad","dwg"],["application/applixware","aw"],["application/arj","arj"],["application/atom+xml","xml"],["application/atomcat+xml","atomcat"],["application/atomsvc+xml","atomsvc"],["application/base64",["mm","mme"]],["application/binhex","hqx"],["application/binhex4","hqx"],["application/book",["book","boo"]],["application/ccxml+xml,","ccxml"],["application/cdf","cdf"],["application/cdmi-capability","cdmia"],["application/cdmi-container","cdmic"],["application/cdmi-domain","cdmid"],["application/cdmi-object","cdmio"],["application/cdmi-queue","cdmiq"],["application/clariscad","ccad"],["application/commonground","dp"],["application/cu-seeme","cu"],["application/davmount+xml","davmount"],["application/drafting","drw"],["application/dsptype","tsp"],["application/dssc+der","dssc"],["application/dssc+xml","xdssc"],["application/dxf","dxf"],["application/ecmascript",["js","es"]],["application/emma+xml","emma"],["application/envoy","evy"],["application/epub+zip","epub"],["application/excel",["xls","xl","xla","xlb","xlc","xld","xlk","xll","xlm","xlt","xlv","xlw"]],["application/exi","exi"],["application/font-tdpfr","pfr"],["application/fractals","fif"],["application/freeloader","frl"],["application/futuresplash","spl"],["application/geo+json","geojson"],["application/gnutar","tgz"],["application/groupwise","vew"],["application/hlp","hlp"],["application/hta","hta"],["application/hyperstudio","stk"],["application/i-deas","unv"],["application/iges",["iges","igs"]],["application/inf","inf"],["application/internet-property-stream","acx"],["application/ipfix","ipfix"],["application/java","class"],["application/java-archive","jar"],["application/java-byte-code","class"],["application/java-serialized-object","ser"],["application/java-vm","class"],["application/javascript","js"],["application/json","json"],["application/lha","lha"],["application/lzx","lzx"],["application/mac-binary","bin"],["application/mac-binhex","hqx"],["application/mac-binhex40","hqx"],["application/mac-compactpro","cpt"],["application/macbinary","bin"],["application/mads+xml","mads"],["application/marc","mrc"],["application/marcxml+xml","mrcx"],["application/mathematica","ma"],["application/mathml+xml","mathml"],["application/mbedlet","mbd"],["application/mbox","mbox"],["application/mcad","mcd"],["application/mediaservercontrol+xml","mscml"],["application/metalink4+xml","meta4"],["application/mets+xml","mets"],["application/mime","aps"],["application/mods+xml","mods"],["application/mp21","m21"],["application/mp4","mp4"],["application/mspowerpoint",["ppt","pot","pps","ppz"]],["application/msword",["doc","dot","w6w","wiz","word"]],["application/mswrite","wri"],["application/mxf","mxf"],["application/netmc","mcp"],["application/octet-stream",["*"]],["application/oda","oda"],["application/oebps-package+xml","opf"],["application/ogg","ogx"],["application/olescript","axs"],["application/onenote","onetoc"],["application/patch-ops-error+xml","xer"],["application/pdf","pdf"],["application/pgp-encrypted","asc"],["application/pgp-signature","pgp"],["application/pics-rules","prf"],["application/pkcs-12","p12"],["application/pkcs-crl","crl"],["application/pkcs10","p10"],["application/pkcs7-mime",["p7c","p7m"]],["application/pkcs7-signature","p7s"],["application/pkcs8","p8"],["application/pkix-attr-cert","ac"],["application/pkix-cert",["cer","crt"]],["application/pkix-crl","crl"],["application/pkix-pkipath","pkipath"],["application/pkixcmp","pki"],["application/plain","text"],["application/pls+xml","pls"],["application/postscript",["ps","ai","eps"]],["application/powerpoint","ppt"],["application/pro_eng",["part","prt"]],["application/prs.cww","cww"],["application/pskc+xml","pskcxml"],["application/rdf+xml","rdf"],["application/reginfo+xml","rif"],["application/relax-ng-compact-syntax","rnc"],["application/resource-lists+xml","rl"],["application/resource-lists-diff+xml","rld"],["application/ringing-tones","rng"],["application/rls-services+xml","rs"],["application/rsd+xml","rsd"],["application/rss+xml","xml"],["application/rtf",["rtf","rtx"]],["application/sbml+xml","sbml"],["application/scvp-cv-request","scq"],["application/scvp-cv-response","scs"],["application/scvp-vp-request","spq"],["application/scvp-vp-response","spp"],["application/sdp","sdp"],["application/sea","sea"],["application/set","set"],["application/set-payment-initiation","setpay"],["application/set-registration-initiation","setreg"],["application/shf+xml","shf"],["application/sla","stl"],["application/smil",["smi","smil"]],["application/smil+xml","smi"],["application/solids","sol"],["application/sounder","sdr"],["application/sparql-query","rq"],["application/sparql-results+xml","srx"],["application/srgs","gram"],["application/srgs+xml","grxml"],["application/sru+xml","sru"],["application/ssml+xml","ssml"],["application/step",["step","stp"]],["application/streamingmedia","ssm"],["application/tei+xml","tei"],["application/thraud+xml","tfi"],["application/timestamped-data","tsd"],["application/toolbook","tbk"],["application/vda","vda"],["application/vnd.3gpp.pic-bw-large","plb"],["application/vnd.3gpp.pic-bw-small","psb"],["application/vnd.3gpp.pic-bw-var","pvb"],["application/vnd.3gpp2.tcap","tcap"],["application/vnd.3m.post-it-notes","pwn"],["application/vnd.accpac.simply.aso","aso"],["application/vnd.accpac.simply.imp","imp"],["application/vnd.acucobol","acu"],["application/vnd.acucorp","atc"],["application/vnd.adobe.air-application-installer-package+zip","air"],["application/vnd.adobe.fxp","fxp"],["application/vnd.adobe.xdp+xml","xdp"],["application/vnd.adobe.xfdf","xfdf"],["application/vnd.ahead.space","ahead"],["application/vnd.airzip.filesecure.azf","azf"],["application/vnd.airzip.filesecure.azs","azs"],["application/vnd.amazon.ebook","azw"],["application/vnd.americandynamics.acc","acc"],["application/vnd.amiga.ami","ami"],["application/vnd.android.package-archive","apk"],["application/vnd.anser-web-certificate-issue-initiation","cii"],["application/vnd.anser-web-funds-transfer-initiation","fti"],["application/vnd.antix.game-component","atx"],["application/vnd.apple.installer+xml","mpkg"],["application/vnd.apple.mpegurl","m3u8"],["application/vnd.aristanetworks.swi","swi"],["application/vnd.audiograph","aep"],["application/vnd.blueice.multipass","mpm"],["application/vnd.bmi","bmi"],["application/vnd.businessobjects","rep"],["application/vnd.chemdraw+xml","cdxml"],["application/vnd.chipnuts.karaoke-mmd","mmd"],["application/vnd.cinderella","cdy"],["application/vnd.claymore","cla"],["application/vnd.cloanto.rp9","rp9"],["application/vnd.clonk.c4group","c4g"],["application/vnd.cluetrust.cartomobile-config","c11amc"],["application/vnd.cluetrust.cartomobile-config-pkg","c11amz"],["application/vnd.commonspace","csp"],["application/vnd.contact.cmsg","cdbcmsg"],["application/vnd.cosmocaller","cmc"],["application/vnd.crick.clicker","clkx"],["application/vnd.crick.clicker.keyboard","clkk"],["application/vnd.crick.clicker.palette","clkp"],["application/vnd.crick.clicker.template","clkt"],["application/vnd.crick.clicker.wordbank","clkw"],["application/vnd.criticaltools.wbs+xml","wbs"],["application/vnd.ctc-posml","pml"],["application/vnd.cups-ppd","ppd"],["application/vnd.curl.car","car"],["application/vnd.curl.pcurl","pcurl"],["application/vnd.data-vision.rdz","rdz"],["application/vnd.denovo.fcselayout-link","fe_launch"],["application/vnd.dna","dna"],["application/vnd.dolby.mlp","mlp"],["application/vnd.dpgraph","dpg"],["application/vnd.dreamfactory","dfac"],["application/vnd.dvb.ait","ait"],["application/vnd.dvb.service","svc"],["application/vnd.dynageo","geo"],["application/vnd.ecowin.chart","mag"],["application/vnd.enliven","nml"],["application/vnd.epson.esf","esf"],["application/vnd.epson.msf","msf"],["application/vnd.epson.quickanime","qam"],["application/vnd.epson.salt","slt"],["application/vnd.epson.ssf","ssf"],["application/vnd.eszigno3+xml","es3"],["application/vnd.ezpix-album","ez2"],["application/vnd.ezpix-package","ez3"],["application/vnd.fdf","fdf"],["application/vnd.fdsn.seed","seed"],["application/vnd.flographit","gph"],["application/vnd.fluxtime.clip","ftc"],["application/vnd.framemaker","fm"],["application/vnd.frogans.fnc","fnc"],["application/vnd.frogans.ltf","ltf"],["application/vnd.fsc.weblaunch","fsc"],["application/vnd.fujitsu.oasys","oas"],["application/vnd.fujitsu.oasys2","oa2"],["application/vnd.fujitsu.oasys3","oa3"],["application/vnd.fujitsu.oasysgp","fg5"],["application/vnd.fujitsu.oasysprs","bh2"],["application/vnd.fujixerox.ddd","ddd"],["application/vnd.fujixerox.docuworks","xdw"],["application/vnd.fujixerox.docuworks.binder","xbd"],["application/vnd.fuzzysheet","fzs"],["application/vnd.genomatix.tuxedo","txd"],["application/vnd.geogebra.file","ggb"],["application/vnd.geogebra.tool","ggt"],["application/vnd.geometry-explorer","gex"],["application/vnd.geonext","gxt"],["application/vnd.geoplan","g2w"],["application/vnd.geospace","g3w"],["application/vnd.gmx","gmx"],["application/vnd.google-earth.kml+xml","kml"],["application/vnd.google-earth.kmz","kmz"],["application/vnd.grafeq","gqf"],["application/vnd.groove-account","gac"],["application/vnd.groove-help","ghf"],["application/vnd.groove-identity-message","gim"],["application/vnd.groove-injector","grv"],["application/vnd.groove-tool-message","gtm"],["application/vnd.groove-tool-template","tpl"],["application/vnd.groove-vcard","vcg"],["application/vnd.hal+xml","hal"],["application/vnd.handheld-entertainment+xml","zmm"],["application/vnd.hbci","hbci"],["application/vnd.hhe.lesson-player","les"],["application/vnd.hp-hpgl",["hgl","hpg","hpgl"]],["application/vnd.hp-hpid","hpid"],["application/vnd.hp-hps","hps"],["application/vnd.hp-jlyt","jlt"],["application/vnd.hp-pcl","pcl"],["application/vnd.hp-pclxl","pclxl"],["application/vnd.hydrostatix.sof-data","sfd-hdstx"],["application/vnd.hzn-3d-crossword","x3d"],["application/vnd.ibm.minipay","mpy"],["application/vnd.ibm.modcap","afp"],["application/vnd.ibm.rights-management","irm"],["application/vnd.ibm.secure-container","sc"],["application/vnd.iccprofile","icc"],["application/vnd.igloader","igl"],["application/vnd.immervision-ivp","ivp"],["application/vnd.immervision-ivu","ivu"],["application/vnd.insors.igm","igm"],["application/vnd.intercon.formnet","xpw"],["application/vnd.intergeo","i2g"],["application/vnd.intu.qbo","qbo"],["application/vnd.intu.qfx","qfx"],["application/vnd.ipunplugged.rcprofile","rcprofile"],["application/vnd.irepository.package+xml","irp"],["application/vnd.is-xpr","xpr"],["application/vnd.isac.fcs","fcs"],["application/vnd.jam","jam"],["application/vnd.jcp.javame.midlet-rms","rms"],["application/vnd.jisp","jisp"],["application/vnd.joost.joda-archive","joda"],["application/vnd.kahootz","ktz"],["application/vnd.kde.karbon","karbon"],["application/vnd.kde.kchart","chrt"],["application/vnd.kde.kformula","kfo"],["application/vnd.kde.kivio","flw"],["application/vnd.kde.kontour","kon"],["application/vnd.kde.kpresenter","kpr"],["application/vnd.kde.kspread","ksp"],["application/vnd.kde.kword","kwd"],["application/vnd.kenameaapp","htke"],["application/vnd.kidspiration","kia"],["application/vnd.kinar","kne"],["application/vnd.koan","skp"],["application/vnd.kodak-descriptor","sse"],["application/vnd.las.las+xml","lasxml"],["application/vnd.llamagraphics.life-balance.desktop","lbd"],["application/vnd.llamagraphics.life-balance.exchange+xml","lbe"],["application/vnd.lotus-1-2-3","123"],["application/vnd.lotus-approach","apr"],["application/vnd.lotus-freelance","pre"],["application/vnd.lotus-notes","nsf"],["application/vnd.lotus-organizer","org"],["application/vnd.lotus-screencam","scm"],["application/vnd.lotus-wordpro","lwp"],["application/vnd.macports.portpkg","portpkg"],["application/vnd.mcd","mcd"],["application/vnd.medcalcdata","mc1"],["application/vnd.mediastation.cdkey","cdkey"],["application/vnd.mfer","mwf"],["application/vnd.mfmp","mfm"],["application/vnd.micrografx.flo","flo"],["application/vnd.micrografx.igx","igx"],["application/vnd.mif","mif"],["application/vnd.mobius.daf","daf"],["application/vnd.mobius.dis","dis"],["application/vnd.mobius.mbk","mbk"],["application/vnd.mobius.mqy","mqy"],["application/vnd.mobius.msl","msl"],["application/vnd.mobius.plc","plc"],["application/vnd.mobius.txf","txf"],["application/vnd.mophun.application","mpn"],["application/vnd.mophun.certificate","mpc"],["application/vnd.mozilla.xul+xml","xul"],["application/vnd.ms-artgalry","cil"],["application/vnd.ms-cab-compressed","cab"],["application/vnd.ms-excel",["xls","xla","xlc","xlm","xlt","xlw","xlb","xll"]],["application/vnd.ms-excel.addin.macroenabled.12","xlam"],["application/vnd.ms-excel.sheet.binary.macroenabled.12","xlsb"],["application/vnd.ms-excel.sheet.macroenabled.12","xlsm"],["application/vnd.ms-excel.template.macroenabled.12","xltm"],["application/vnd.ms-fontobject","eot"],["application/vnd.ms-htmlhelp","chm"],["application/vnd.ms-ims","ims"],["application/vnd.ms-lrm","lrm"],["application/vnd.ms-officetheme","thmx"],["application/vnd.ms-outlook","msg"],["application/vnd.ms-pki.certstore","sst"],["application/vnd.ms-pki.pko","pko"],["application/vnd.ms-pki.seccat","cat"],["application/vnd.ms-pki.stl","stl"],["application/vnd.ms-pkicertstore","sst"],["application/vnd.ms-pkiseccat","cat"],["application/vnd.ms-pkistl","stl"],["application/vnd.ms-powerpoint",["ppt","pot","pps","ppa","pwz"]],["application/vnd.ms-powerpoint.addin.macroenabled.12","ppam"],["application/vnd.ms-powerpoint.presentation.macroenabled.12","pptm"],["application/vnd.ms-powerpoint.slide.macroenabled.12","sldm"],["application/vnd.ms-powerpoint.slideshow.macroenabled.12","ppsm"],["application/vnd.ms-powerpoint.template.macroenabled.12","potm"],["application/vnd.ms-project","mpp"],["application/vnd.ms-word.document.macroenabled.12","docm"],["application/vnd.ms-word.template.macroenabled.12","dotm"],["application/vnd.ms-works",["wks","wcm","wdb","wps"]],["application/vnd.ms-wpl","wpl"],["application/vnd.ms-xpsdocument","xps"],["application/vnd.mseq","mseq"],["application/vnd.musician","mus"],["application/vnd.muvee.style","msty"],["application/vnd.neurolanguage.nlu","nlu"],["application/vnd.noblenet-directory","nnd"],["application/vnd.noblenet-sealer","nns"],["application/vnd.noblenet-web","nnw"],["application/vnd.nokia.configuration-message","ncm"],["application/vnd.nokia.n-gage.data","ngdat"],["application/vnd.nokia.n-gage.symbian.install","n-gage"],["application/vnd.nokia.radio-preset","rpst"],["application/vnd.nokia.radio-presets","rpss"],["application/vnd.nokia.ringing-tone","rng"],["application/vnd.novadigm.edm","edm"],["application/vnd.novadigm.edx","edx"],["application/vnd.novadigm.ext","ext"],["application/vnd.oasis.opendocument.chart","odc"],["application/vnd.oasis.opendocument.chart-template","otc"],["application/vnd.oasis.opendocument.database","odb"],["application/vnd.oasis.opendocument.formula","odf"],["application/vnd.oasis.opendocument.formula-template","odft"],["application/vnd.oasis.opendocument.graphics","odg"],["application/vnd.oasis.opendocument.graphics-template","otg"],["application/vnd.oasis.opendocument.image","odi"],["application/vnd.oasis.opendocument.image-template","oti"],["application/vnd.oasis.opendocument.presentation","odp"],["application/vnd.oasis.opendocument.presentation-template","otp"],["application/vnd.oasis.opendocument.spreadsheet","ods"],["application/vnd.oasis.opendocument.spreadsheet-template","ots"],["application/vnd.oasis.opendocument.text","odt"],["application/vnd.oasis.opendocument.text-master","odm"],["application/vnd.oasis.opendocument.text-template","ott"],["application/vnd.oasis.opendocument.text-web","oth"],["application/vnd.olpc-sugar","xo"],["application/vnd.oma.dd2+xml","dd2"],["application/vnd.openofficeorg.extension","oxt"],["application/vnd.openxmlformats-officedocument.presentationml.presentation","pptx"],["application/vnd.openxmlformats-officedocument.presentationml.slide","sldx"],["application/vnd.openxmlformats-officedocument.presentationml.slideshow","ppsx"],["application/vnd.openxmlformats-officedocument.presentationml.template","potx"],["application/vnd.openxmlformats-officedocument.spreadsheetml.sheet","xlsx"],["application/vnd.openxmlformats-officedocument.spreadsheetml.template","xltx"],["application/vnd.openxmlformats-officedocument.wordprocessingml.document","docx"],["application/vnd.openxmlformats-officedocument.wordprocessingml.template","dotx"],["application/vnd.osgeo.mapguide.package","mgp"],["application/vnd.osgi.dp","dp"],["application/vnd.palm","pdb"],["application/vnd.pawaafile","paw"],["application/vnd.pg.format","str"],["application/vnd.pg.osasli","ei6"],["application/vnd.picsel","efif"],["application/vnd.pmi.widget","wg"],["application/vnd.pocketlearn","plf"],["application/vnd.powerbuilder6","pbd"],["application/vnd.previewsystems.box","box"],["application/vnd.proteus.magazine","mgz"],["application/vnd.publishare-delta-tree","qps"],["application/vnd.pvi.ptid1","ptid"],["application/vnd.quark.quarkxpress","qxd"],["application/vnd.realvnc.bed","bed"],["application/vnd.recordare.musicxml","mxl"],["application/vnd.recordare.musicxml+xml","musicxml"],["application/vnd.rig.cryptonote","cryptonote"],["application/vnd.rim.cod","cod"],["application/vnd.rn-realmedia","rm"],["application/vnd.rn-realplayer","rnx"],["application/vnd.route66.link66+xml","link66"],["application/vnd.sailingtracker.track","st"],["application/vnd.seemail","see"],["application/vnd.sema","sema"],["application/vnd.semd","semd"],["application/vnd.semf","semf"],["application/vnd.shana.informed.formdata","ifm"],["application/vnd.shana.informed.formtemplate","itp"],["application/vnd.shana.informed.interchange","iif"],["application/vnd.shana.informed.package","ipk"],["application/vnd.simtech-mindmapper","twd"],["application/vnd.smaf","mmf"],["application/vnd.smart.teacher","teacher"],["application/vnd.solent.sdkm+xml","sdkm"],["application/vnd.spotfire.dxp","dxp"],["application/vnd.spotfire.sfs","sfs"],["application/vnd.stardivision.calc","sdc"],["application/vnd.stardivision.draw","sda"],["application/vnd.stardivision.impress","sdd"],["application/vnd.stardivision.math","smf"],["application/vnd.stardivision.writer","sdw"],["application/vnd.stardivision.writer-global","sgl"],["application/vnd.stepmania.stepchart","sm"],["application/vnd.sun.xml.calc","sxc"],["application/vnd.sun.xml.calc.template","stc"],["application/vnd.sun.xml.draw","sxd"],["application/vnd.sun.xml.draw.template","std"],["application/vnd.sun.xml.impress","sxi"],["application/vnd.sun.xml.impress.template","sti"],["application/vnd.sun.xml.math","sxm"],["application/vnd.sun.xml.writer","sxw"],["application/vnd.sun.xml.writer.global","sxg"],["application/vnd.sun.xml.writer.template","stw"],["application/vnd.sus-calendar","sus"],["application/vnd.svd","svd"],["application/vnd.symbian.install","sis"],["application/vnd.syncml+xml","xsm"],["application/vnd.syncml.dm+wbxml","bdm"],["application/vnd.syncml.dm+xml","xdm"],["application/vnd.tao.intent-module-archive","tao"],["application/vnd.tmobile-livetv","tmo"],["application/vnd.trid.tpt","tpt"],["application/vnd.triscape.mxs","mxs"],["application/vnd.trueapp","tra"],["application/vnd.ufdl","ufd"],["application/vnd.uiq.theme","utz"],["application/vnd.umajin","umj"],["application/vnd.unity","unityweb"],["application/vnd.uoml+xml","uoml"],["application/vnd.vcx","vcx"],["application/vnd.visio","vsd"],["application/vnd.visionary","vis"],["application/vnd.vsf","vsf"],["application/vnd.wap.wbxml","wbxml"],["application/vnd.wap.wmlc","wmlc"],["application/vnd.wap.wmlscriptc","wmlsc"],["application/vnd.webturbo","wtb"],["application/vnd.wolfram.player","nbp"],["application/vnd.wordperfect","wpd"],["application/vnd.wqd","wqd"],["application/vnd.wt.stf","stf"],["application/vnd.xara",["web","xar"]],["application/vnd.xfdl","xfdl"],["application/vnd.yamaha.hv-dic","hvd"],["application/vnd.yamaha.hv-script","hvs"],["application/vnd.yamaha.hv-voice","hvp"],["application/vnd.yamaha.openscoreformat","osf"],["application/vnd.yamaha.openscoreformat.osfpvg+xml","osfpvg"],["application/vnd.yamaha.smaf-audio","saf"],["application/vnd.yamaha.smaf-phrase","spf"],["application/vnd.yellowriver-custom-menu","cmp"],["application/vnd.zul","zir"],["application/vnd.zzazz.deck+xml","zaz"],["application/vocaltec-media-desc","vmd"],["application/vocaltec-media-file","vmf"],["application/voicexml+xml","vxml"],["application/widget","wgt"],["application/winhlp","hlp"],["application/wordperfect",["wp","wp5","wp6","wpd"]],["application/wordperfect6.0",["w60","wp5"]],["application/wordperfect6.1","w61"],["application/wsdl+xml","wsdl"],["application/wspolicy+xml","wspolicy"],["application/x-123","wk1"],["application/x-7z-compressed","7z"],["application/x-abiword","abw"],["application/x-ace-compressed","ace"],["application/x-aim","aim"],["application/x-authorware-bin","aab"],["application/x-authorware-map","aam"],["application/x-authorware-seg","aas"],["application/x-bcpio","bcpio"],["application/x-binary","bin"],["application/x-binhex40","hqx"],["application/x-bittorrent","torrent"],["application/x-bsh",["bsh","sh","shar"]],["application/x-bytecode.elisp","elc"],["application/x-bytecode.python","pyc"],["application/x-bzip","bz"],["application/x-bzip2",["boz","bz2"]],["application/x-cdf","cdf"],["application/x-cdlink","vcd"],["application/x-chat",["cha","chat"]],["application/x-chess-pgn","pgn"],["application/x-cmu-raster","ras"],["application/x-cocoa","cco"],["application/x-compactpro","cpt"],["application/x-compress","z"],["application/x-compressed",["tgz","gz","z","zip"]],["application/x-conference","nsc"],["application/x-cpio","cpio"],["application/x-cpt","cpt"],["application/x-csh","csh"],["application/x-debian-package","deb"],["application/x-deepv","deepv"],["application/x-director",["dir","dcr","dxr"]],["application/x-doom","wad"],["application/x-dtbncx+xml","ncx"],["application/x-dtbook+xml","dtb"],["application/x-dtbresource+xml","res"],["application/x-dvi","dvi"],["application/x-elc","elc"],["application/x-envoy",["env","evy"]],["application/x-esrehber","es"],["application/x-excel",["xls","xla","xlb","xlc","xld","xlk","xll","xlm","xlt","xlv","xlw"]],["application/x-font-bdf","bdf"],["application/x-font-ghostscript","gsf"],["application/x-font-linux-psf","psf"],["application/x-font-otf","otf"],["application/x-font-pcf","pcf"],["application/x-font-snf","snf"],["application/x-font-ttf","ttf"],["application/x-font-type1","pfa"],["application/x-font-woff","woff"],["application/x-frame","mif"],["application/x-freelance","pre"],["application/x-futuresplash","spl"],["application/x-gnumeric","gnumeric"],["application/x-gsp","gsp"],["application/x-gss","gss"],["application/x-gtar","gtar"],["application/x-gzip",["gz","gzip"]],["application/x-hdf","hdf"],["application/x-helpfile",["help","hlp"]],["application/x-httpd-imap","imap"],["application/x-ima","ima"],["application/x-internet-signup",["ins","isp"]],["application/x-internett-signup","ins"],["application/x-inventor","iv"],["application/x-ip2","ip"],["application/x-iphone","iii"],["application/x-java-class","class"],["application/x-java-commerce","jcm"],["application/x-java-jnlp-file","jnlp"],["application/x-javascript","js"],["application/x-koan",["skd","skm","skp","skt"]],["application/x-ksh","ksh"],["application/x-latex",["latex","ltx"]],["application/x-lha","lha"],["application/x-lisp","lsp"],["application/x-livescreen","ivy"],["application/x-lotus","wq1"],["application/x-lotusscreencam","scm"],["application/x-lzh","lzh"],["application/x-lzx","lzx"],["application/x-mac-binhex40","hqx"],["application/x-macbinary","bin"],["application/x-magic-cap-package-1.0","mc$"],["application/x-mathcad","mcd"],["application/x-meme","mm"],["application/x-midi",["mid","midi"]],["application/x-mif","mif"],["application/x-mix-transfer","nix"],["application/x-mobipocket-ebook","prc"],["application/x-mplayer2","asx"],["application/x-ms-application","application"],["application/x-ms-wmd","wmd"],["application/x-ms-wmz","wmz"],["application/x-ms-xbap","xbap"],["application/x-msaccess","mdb"],["application/x-msbinder","obd"],["application/x-mscardfile","crd"],["application/x-msclip","clp"],["application/x-msdownload",["exe","dll"]],["application/x-msexcel",["xls","xla","xlw"]],["application/x-msmediaview",["mvb","m13","m14"]],["application/x-msmetafile","wmf"],["application/x-msmoney","mny"],["application/x-mspowerpoint","ppt"],["application/x-mspublisher","pub"],["application/x-msschedule","scd"],["application/x-msterminal","trm"],["application/x-mswrite","wri"],["application/x-navi-animation","ani"],["application/x-navidoc","nvd"],["application/x-navimap","map"],["application/x-navistyle","stl"],["application/x-netcdf",["cdf","nc"]],["application/x-newton-compatible-pkg","pkg"],["application/x-nokia-9000-communicator-add-on-software","aos"],["application/x-omc","omc"],["application/x-omcdatamaker","omcd"],["application/x-omcregerator","omcr"],["application/x-pagemaker",["pm4","pm5"]],["application/x-pcl","pcl"],["application/x-perfmon",["pma","pmc","pml","pmr","pmw"]],["application/x-pixclscript","plx"],["application/x-pkcs10","p10"],["application/x-pkcs12",["p12","pfx"]],["application/x-pkcs7-certificates",["p7b","spc"]],["application/x-pkcs7-certreqresp","p7r"],["application/x-pkcs7-mime",["p7m","p7c"]],["application/x-pkcs7-signature",["p7s","p7a"]],["application/x-pointplus","css"],["application/x-portable-anymap","pnm"],["application/x-project",["mpc","mpt","mpv","mpx"]],["application/x-qpro","wb1"],["application/x-rar-compressed","rar"],["application/x-rtf","rtf"],["application/x-sdp","sdp"],["application/x-sea","sea"],["application/x-seelogo","sl"],["application/x-sh","sh"],["application/x-shar",["shar","sh"]],["application/x-shockwave-flash","swf"],["application/x-silverlight-app","xap"],["application/x-sit","sit"],["application/x-sprite",["spr","sprite"]],["application/x-stuffit","sit"],["application/x-stuffitx","sitx"],["application/x-sv4cpio","sv4cpio"],["application/x-sv4crc","sv4crc"],["application/x-tar","tar"],["application/x-tbook",["sbk","tbk"]],["application/x-tcl","tcl"],["application/x-tex","tex"],["application/x-tex-tfm","tfm"],["application/x-texinfo",["texi","texinfo"]],["application/x-troff",["roff","t","tr"]],["application/x-troff-man","man"],["application/x-troff-me","me"],["application/x-troff-ms","ms"],["application/x-troff-msvideo","avi"],["application/x-ustar","ustar"],["application/x-visio",["vsd","vst","vsw"]],["application/x-vnd.audioexplosion.mzz","mzz"],["application/x-vnd.ls-xpix","xpix"],["application/x-vrml","vrml"],["application/x-wais-source",["src","wsrc"]],["application/x-winhelp","hlp"],["application/x-wintalk","wtk"],["application/x-world",["wrl","svr"]],["application/x-wpwin","wpd"],["application/x-wri","wri"],["application/x-x509-ca-cert",["cer","crt","der"]],["application/x-x509-user-cert","crt"],["application/x-xfig","fig"],["application/x-xpinstall","xpi"],["application/x-zip-compressed","zip"],["application/xcap-diff+xml","xdf"],["application/xenc+xml","xenc"],["application/xhtml+xml","xhtml"],["application/xml","xml"],["application/xml-dtd","dtd"],["application/xop+xml","xop"],["application/xslt+xml","xslt"],["application/xspf+xml","xspf"],["application/xv+xml","mxml"],["application/yang","yang"],["application/yin+xml","yin"],["application/ynd.ms-pkipko","pko"],["application/zip","zip"],["audio/adpcm","adp"],["audio/aiff",["aiff","aif","aifc"]],["audio/basic",["snd","au"]],["audio/it","it"],["audio/make",["funk","my","pfunk"]],["audio/make.my.funk","pfunk"],["audio/mid",["mid","rmi"]],["audio/midi",["midi","kar","mid"]],["audio/mod","mod"],["audio/mp4","mp4a"],["audio/mpeg",["mpga","mp3","m2a","mp2","mpa","mpg"]],["audio/mpeg3","mp3"],["audio/nspaudio",["la","lma"]],["audio/ogg","oga"],["audio/s3m","s3m"],["audio/tsp-audio","tsi"],["audio/tsplayer","tsp"],["audio/vnd.dece.audio","uva"],["audio/vnd.digital-winds","eol"],["audio/vnd.dra","dra"],["audio/vnd.dts","dts"],["audio/vnd.dts.hd","dtshd"],["audio/vnd.lucent.voice","lvp"],["audio/vnd.ms-playready.media.pya","pya"],["audio/vnd.nuera.ecelp4800","ecelp4800"],["audio/vnd.nuera.ecelp7470","ecelp7470"],["audio/vnd.nuera.ecelp9600","ecelp9600"],["audio/vnd.qcelp","qcp"],["audio/vnd.rip","rip"],["audio/voc","voc"],["audio/voxware","vox"],["audio/wav","wav"],["audio/webm","weba"],["audio/x-aac","aac"],["audio/x-adpcm","snd"],["audio/x-aiff",["aiff","aif","aifc"]],["audio/x-au","au"],["audio/x-gsm",["gsd","gsm"]],["audio/x-jam","jam"],["audio/x-liveaudio","lam"],["audio/x-mid",["mid","midi"]],["audio/x-midi",["midi","mid"]],["audio/x-mod","mod"],["audio/x-mpeg","mp2"],["audio/x-mpeg-3","mp3"],["audio/x-mpegurl","m3u"],["audio/x-mpequrl","m3u"],["audio/x-ms-wax","wax"],["audio/x-ms-wma","wma"],["audio/x-nspaudio",["la","lma"]],["audio/x-pn-realaudio",["ra","ram","rm","rmm","rmp"]],["audio/x-pn-realaudio-plugin",["ra","rmp","rpm"]],["audio/x-psid","sid"],["audio/x-realaudio","ra"],["audio/x-twinvq","vqf"],["audio/x-twinvq-plugin",["vqe","vql"]],["audio/x-vnd.audioexplosion.mjuicemediafile","mjf"],["audio/x-voc","voc"],["audio/x-wav","wav"],["audio/xm","xm"],["chemical/x-cdx","cdx"],["chemical/x-cif","cif"],["chemical/x-cmdf","cmdf"],["chemical/x-cml","cml"],["chemical/x-csml","csml"],["chemical/x-pdb",["pdb","xyz"]],["chemical/x-xyz","xyz"],["drawing/x-dwf","dwf"],["i-world/i-vrml","ivr"],["image/bmp",["bmp","bm"]],["image/cgm","cgm"],["image/cis-cod","cod"],["image/cmu-raster",["ras","rast"]],["image/fif","fif"],["image/florian",["flo","turbot"]],["image/g3fax","g3"],["image/gif","gif"],["image/ief",["ief","iefs"]],["image/jpeg",["jpeg","jpe","jpg","jfif","jfif-tbnl"]],["image/jutvision","jut"],["image/ktx","ktx"],["image/naplps",["nap","naplps"]],["image/pict",["pic","pict"]],["image/pipeg","jfif"],["image/pjpeg",["jfif","jpe","jpeg","jpg"]],["image/png",["png","x-png"]],["image/prs.btif","btif"],["image/svg+xml","svg"],["image/tiff",["tif","tiff"]],["image/vasa","mcf"],["image/vnd.adobe.photoshop","psd"],["image/vnd.dece.graphic","uvi"],["image/vnd.djvu","djvu"],["image/vnd.dvb.subtitle","sub"],["image/vnd.dwg",["dwg","dxf","svf"]],["image/vnd.dxf","dxf"],["image/vnd.fastbidsheet","fbs"],["image/vnd.fpx","fpx"],["image/vnd.fst","fst"],["image/vnd.fujixerox.edmics-mmr","mmr"],["image/vnd.fujixerox.edmics-rlc","rlc"],["image/vnd.ms-modi","mdi"],["image/vnd.net-fpx",["fpx","npx"]],["image/vnd.rn-realflash","rf"],["image/vnd.rn-realpix","rp"],["image/vnd.wap.wbmp","wbmp"],["image/vnd.xiff","xif"],["image/webp","webp"],["image/x-cmu-raster","ras"],["image/x-cmx","cmx"],["image/x-dwg",["dwg","dxf","svf"]],["image/x-freehand","fh"],["image/x-icon","ico"],["image/x-jg","art"],["image/x-jps","jps"],["image/x-niff",["niff","nif"]],["image/x-pcx","pcx"],["image/x-pict",["pct","pic"]],["image/x-portable-anymap","pnm"],["image/x-portable-bitmap","pbm"],["image/x-portable-graymap","pgm"],["image/x-portable-greymap","pgm"],["image/x-portable-pixmap","ppm"],["image/x-quicktime",["qif","qti","qtif"]],["image/x-rgb","rgb"],["image/x-tiff",["tif","tiff"]],["image/x-windows-bmp","bmp"],["image/x-xbitmap","xbm"],["image/x-xbm","xbm"],["image/x-xpixmap",["xpm","pm"]],["image/x-xwd","xwd"],["image/x-xwindowdump","xwd"],["image/xbm","xbm"],["image/xpm","xpm"],["message/rfc822",["eml","mht","mhtml","nws","mime"]],["model/iges",["iges","igs"]],["model/mesh","msh"],["model/vnd.collada+xml","dae"],["model/vnd.dwf","dwf"],["model/vnd.gdl","gdl"],["model/vnd.gtw","gtw"],["model/vnd.mts","mts"],["model/vnd.vtu","vtu"],["model/vrml",["vrml","wrl","wrz"]],["model/x-pov","pov"],["multipart/x-gzip","gzip"],["multipart/x-ustar","ustar"],["multipart/x-zip","zip"],["music/crescendo",["mid","midi"]],["music/x-karaoke","kar"],["paleovu/x-pv","pvu"],["text/asp","asp"],["text/calendar","ics"],["text/css","css"],["text/csv","csv"],["text/ecmascript","js"],["text/h323","323"],["text/html",["html","htm","stm","acgi","htmls","htx","shtml"]],["text/iuls","uls"],["text/javascript","js"],["text/mcf","mcf"],["text/n3","n3"],["text/pascal","pas"],["text/plain",["txt","bas","c","h","c++","cc","com","conf","cxx","def","f","f90","for","g","hh","idc","jav","java","list","log","lst","m","mar","pl","sdml","text"]],["text/plain-bas","par"],["text/prs.lines.tag","dsc"],["text/richtext",["rtx","rt","rtf"]],["text/scriplet","wsc"],["text/scriptlet","sct"],["text/sgml",["sgm","sgml"]],["text/tab-separated-values","tsv"],["text/troff","t"],["text/turtle","ttl"],["text/uri-list",["uni","unis","uri","uris"]],["text/vnd.abc","abc"],["text/vnd.curl","curl"],["text/vnd.curl.dcurl","dcurl"],["text/vnd.curl.mcurl","mcurl"],["text/vnd.curl.scurl","scurl"],["text/vnd.fly","fly"],["text/vnd.fmi.flexstor","flx"],["text/vnd.graphviz","gv"],["text/vnd.in3d.3dml","3dml"],["text/vnd.in3d.spot","spot"],["text/vnd.rn-realtext","rt"],["text/vnd.sun.j2me.app-descriptor","jad"],["text/vnd.wap.wml","wml"],["text/vnd.wap.wmlscript","wmls"],["text/webviewhtml","htt"],["text/x-asm",["asm","s"]],["text/x-audiosoft-intra","aip"],["text/x-c",["c","cc","cpp"]],["text/x-component","htc"],["text/x-fortran",["for","f","f77","f90"]],["text/x-h",["h","hh"]],["text/x-java-source",["java","jav"]],["text/x-java-source,java","java"],["text/x-la-asf","lsx"],["text/x-m","m"],["text/x-pascal","p"],["text/x-script","hlb"],["text/x-script.csh","csh"],["text/x-script.elisp","el"],["text/x-script.guile","scm"],["text/x-script.ksh","ksh"],["text/x-script.lisp","lsp"],["text/x-script.perl","pl"],["text/x-script.perl-module","pm"],["text/x-script.phyton","py"],["text/x-script.rexx","rexx"],["text/x-script.scheme","scm"],["text/x-script.sh","sh"],["text/x-script.tcl","tcl"],["text/x-script.tcsh","tcsh"],["text/x-script.zsh","zsh"],["text/x-server-parsed-html",["shtml","ssi"]],["text/x-setext","etx"],["text/x-sgml",["sgm","sgml"]],["text/x-speech",["spc","talk"]],["text/x-uil","uil"],["text/x-uuencode",["uu","uue"]],["text/x-vcalendar","vcs"],["text/x-vcard","vcf"],["text/xml","xml"],["video/3gpp","3gp"],["video/3gpp2","3g2"],["video/animaflex","afl"],["video/avi","avi"],["video/avs-video","avs"],["video/dl","dl"],["video/fli","fli"],["video/gl","gl"],["video/h261","h261"],["video/h263","h263"],["video/h264","h264"],["video/jpeg","jpgv"],["video/jpm","jpm"],["video/mj2","mj2"],["video/mp4","mp4"],["video/mpeg",["mpeg","mp2","mpa","mpe","mpg","mpv2","m1v","m2v","mp3"]],["video/msvideo","avi"],["video/ogg","ogv"],["video/quicktime",["mov","qt","moov"]],["video/vdo","vdo"],["video/vivo",["viv","vivo"]],["video/vnd.dece.hd","uvh"],["video/vnd.dece.mobile","uvm"],["video/vnd.dece.pd","uvp"],["video/vnd.dece.sd","uvs"],["video/vnd.dece.video","uvv"],["video/vnd.fvt","fvt"],["video/vnd.mpegurl","mxu"],["video/vnd.ms-playready.media.pyv","pyv"],["video/vnd.rn-realvideo","rv"],["video/vnd.uvvu.mp4","uvu"],["video/vnd.vivo",["viv","vivo"]],["video/vosaic","vos"],["video/webm","webm"],["video/x-amt-demorun","xdr"],["video/x-amt-showrun","xsr"],["video/x-atomic3d-feature","fmf"],["video/x-dl","dl"],["video/x-dv",["dif","dv"]],["video/x-f4v","f4v"],["video/x-fli","fli"],["video/x-flv","flv"],["video/x-gl","gl"],["video/x-isvideo","isu"],["video/x-la-asf",["lsf","lsx"]],["video/x-m4v","m4v"],["video/x-motion-jpeg","mjpg"],["video/x-mpeg",["mp3","mp2"]],["video/x-mpeq2a","mp2"],["video/x-ms-asf",["asf","asr","asx"]],["video/x-ms-asf-plugin","asx"],["video/x-ms-wm","wm"],["video/x-ms-wmv","wmv"],["video/x-ms-wmx","wmx"],["video/x-ms-wvx","wvx"],["video/x-msvideo","avi"],["video/x-qtc","qtc"],["video/x-scm","scm"],["video/x-sgi-movie",["movie","mv"]],["windows/metafile","wmf"],["www/mime","mime"],["x-conference/x-cooltalk","ice"],["x-music/x-midi",["mid","midi"]],["x-world/x-3dmf",["3dm","3dmf","qd3","qd3d"]],["x-world/x-svr","svr"],["x-world/x-vrml",["flr","vrml","wrl","wrz","xaf","xof"]],["x-world/x-vrt","vrt"],["xgl/drawing","xgz"],["xgl/movie","xmz"]]),n=new Map([["123","application/vnd.lotus-1-2-3"],["323","text/h323"],["*","application/octet-stream"],["3dm","x-world/x-3dmf"],["3dmf","x-world/x-3dmf"],["3dml","text/vnd.in3d.3dml"],["3g2","video/3gpp2"],["3gp","video/3gpp"],["7z","application/x-7z-compressed"],["a","application/octet-stream"],["aab","application/x-authorware-bin"],["aac","audio/x-aac"],["aam","application/x-authorware-map"],["aas","application/x-authorware-seg"],["abc","text/vnd.abc"],["abw","application/x-abiword"],["ac","application/pkix-attr-cert"],["acc","application/vnd.americandynamics.acc"],["ace","application/x-ace-compressed"],["acgi","text/html"],["acu","application/vnd.acucobol"],["acx","application/internet-property-stream"],["adp","audio/adpcm"],["aep","application/vnd.audiograph"],["afl","video/animaflex"],["afp","application/vnd.ibm.modcap"],["ahead","application/vnd.ahead.space"],["ai","application/postscript"],["aif",["audio/aiff","audio/x-aiff"]],["aifc",["audio/aiff","audio/x-aiff"]],["aiff",["audio/aiff","audio/x-aiff"]],["aim","application/x-aim"],["aip","text/x-audiosoft-intra"],["air","application/vnd.adobe.air-application-installer-package+zip"],["ait","application/vnd.dvb.ait"],["ami","application/vnd.amiga.ami"],["ani","application/x-navi-animation"],["aos","application/x-nokia-9000-communicator-add-on-software"],["apk","application/vnd.android.package-archive"],["application","application/x-ms-application"],["apr","application/vnd.lotus-approach"],["aps","application/mime"],["arc","application/octet-stream"],["arj",["application/arj","application/octet-stream"]],["art","image/x-jg"],["asf","video/x-ms-asf"],["asm","text/x-asm"],["aso","application/vnd.accpac.simply.aso"],["asp","text/asp"],["asr","video/x-ms-asf"],["asx",["video/x-ms-asf","application/x-mplayer2","video/x-ms-asf-plugin"]],["atc","application/vnd.acucorp"],["atomcat","application/atomcat+xml"],["atomsvc","application/atomsvc+xml"],["atx","application/vnd.antix.game-component"],["au",["audio/basic","audio/x-au"]],["avi",["video/avi","video/msvideo","application/x-troff-msvideo","video/x-msvideo"]],["avs","video/avs-video"],["aw","application/applixware"],["axs","application/olescript"],["azf","application/vnd.airzip.filesecure.azf"],["azs","application/vnd.airzip.filesecure.azs"],["azw","application/vnd.amazon.ebook"],["bas","text/plain"],["bcpio","application/x-bcpio"],["bdf","application/x-font-bdf"],["bdm","application/vnd.syncml.dm+wbxml"],["bed","application/vnd.realvnc.bed"],["bh2","application/vnd.fujitsu.oasysprs"],["bin",["application/octet-stream","application/mac-binary","application/macbinary","application/x-macbinary","application/x-binary"]],["bm","image/bmp"],["bmi","application/vnd.bmi"],["bmp",["image/bmp","image/x-windows-bmp"]],["boo","application/book"],["book","application/book"],["box","application/vnd.previewsystems.box"],["boz","application/x-bzip2"],["bsh","application/x-bsh"],["btif","image/prs.btif"],["bz","application/x-bzip"],["bz2","application/x-bzip2"],["c",["text/plain","text/x-c"]],["c++","text/plain"],["c11amc","application/vnd.cluetrust.cartomobile-config"],["c11amz","application/vnd.cluetrust.cartomobile-config-pkg"],["c4g","application/vnd.clonk.c4group"],["cab","application/vnd.ms-cab-compressed"],["car","application/vnd.curl.car"],["cat",["application/vnd.ms-pkiseccat","application/vnd.ms-pki.seccat"]],["cc",["text/plain","text/x-c"]],["ccad","application/clariscad"],["cco","application/x-cocoa"],["ccxml","application/ccxml+xml,"],["cdbcmsg","application/vnd.contact.cmsg"],["cdf",["application/cdf","application/x-cdf","application/x-netcdf"]],["cdkey","application/vnd.mediastation.cdkey"],["cdmia","application/cdmi-capability"],["cdmic","application/cdmi-container"],["cdmid","application/cdmi-domain"],["cdmio","application/cdmi-object"],["cdmiq","application/cdmi-queue"],["cdx","chemical/x-cdx"],["cdxml","application/vnd.chemdraw+xml"],["cdy","application/vnd.cinderella"],["cer",["application/pkix-cert","application/x-x509-ca-cert"]],["cgm","image/cgm"],["cha","application/x-chat"],["chat","application/x-chat"],["chm","application/vnd.ms-htmlhelp"],["chrt","application/vnd.kde.kchart"],["cif","chemical/x-cif"],["cii","application/vnd.anser-web-certificate-issue-initiation"],["cil","application/vnd.ms-artgalry"],["cla","application/vnd.claymore"],["class",["application/octet-stream","application/java","application/java-byte-code","application/java-vm","application/x-java-class"]],["clkk","application/vnd.crick.clicker.keyboard"],["clkp","application/vnd.crick.clicker.palette"],["clkt","application/vnd.crick.clicker.template"],["clkw","application/vnd.crick.clicker.wordbank"],["clkx","application/vnd.crick.clicker"],["clp","application/x-msclip"],["cmc","application/vnd.cosmocaller"],["cmdf","chemical/x-cmdf"],["cml","chemical/x-cml"],["cmp","application/vnd.yellowriver-custom-menu"],["cmx","image/x-cmx"],["cod",["image/cis-cod","application/vnd.rim.cod"]],["com",["application/octet-stream","text/plain"]],["conf","text/plain"],["cpio","application/x-cpio"],["cpp","text/x-c"],["cpt",["application/mac-compactpro","application/x-compactpro","application/x-cpt"]],["crd","application/x-mscardfile"],["crl",["application/pkix-crl","application/pkcs-crl"]],["crt",["application/pkix-cert","application/x-x509-user-cert","application/x-x509-ca-cert"]],["cryptonote","application/vnd.rig.cryptonote"],["csh",["text/x-script.csh","application/x-csh"]],["csml","chemical/x-csml"],["csp","application/vnd.commonspace"],["css",["text/css","application/x-pointplus"]],["csv","text/csv"],["cu","application/cu-seeme"],["curl","text/vnd.curl"],["cww","application/prs.cww"],["cxx","text/plain"],["dae","model/vnd.collada+xml"],["daf","application/vnd.mobius.daf"],["davmount","application/davmount+xml"],["dcr","application/x-director"],["dcurl","text/vnd.curl.dcurl"],["dd2","application/vnd.oma.dd2+xml"],["ddd","application/vnd.fujixerox.ddd"],["deb","application/x-debian-package"],["deepv","application/x-deepv"],["def","text/plain"],["der","application/x-x509-ca-cert"],["dfac","application/vnd.dreamfactory"],["dif","video/x-dv"],["dir","application/x-director"],["dis","application/vnd.mobius.dis"],["djvu","image/vnd.djvu"],["dl",["video/dl","video/x-dl"]],["dll","application/x-msdownload"],["dms","application/octet-stream"],["dna","application/vnd.dna"],["doc","application/msword"],["docm","application/vnd.ms-word.document.macroenabled.12"],["docx","application/vnd.openxmlformats-officedocument.wordprocessingml.document"],["dot","application/msword"],["dotm","application/vnd.ms-word.template.macroenabled.12"],["dotx","application/vnd.openxmlformats-officedocument.wordprocessingml.template"],["dp",["application/commonground","application/vnd.osgi.dp"]],["dpg","application/vnd.dpgraph"],["dra","audio/vnd.dra"],["drw","application/drafting"],["dsc","text/prs.lines.tag"],["dssc","application/dssc+der"],["dtb","application/x-dtbook+xml"],["dtd","application/xml-dtd"],["dts","audio/vnd.dts"],["dtshd","audio/vnd.dts.hd"],["dump","application/octet-stream"],["dv","video/x-dv"],["dvi","application/x-dvi"],["dwf",["model/vnd.dwf","drawing/x-dwf"]],["dwg",["application/acad","image/vnd.dwg","image/x-dwg"]],["dxf",["application/dxf","image/vnd.dwg","image/vnd.dxf","image/x-dwg"]],["dxp","application/vnd.spotfire.dxp"],["dxr","application/x-director"],["ecelp4800","audio/vnd.nuera.ecelp4800"],["ecelp7470","audio/vnd.nuera.ecelp7470"],["ecelp9600","audio/vnd.nuera.ecelp9600"],["edm","application/vnd.novadigm.edm"],["edx","application/vnd.novadigm.edx"],["efif","application/vnd.picsel"],["ei6","application/vnd.pg.osasli"],["el","text/x-script.elisp"],["elc",["application/x-elc","application/x-bytecode.elisp"]],["eml","message/rfc822"],["emma","application/emma+xml"],["env","application/x-envoy"],["eol","audio/vnd.digital-winds"],["eot","application/vnd.ms-fontobject"],["eps","application/postscript"],["epub","application/epub+zip"],["es",["application/ecmascript","application/x-esrehber"]],["es3","application/vnd.eszigno3+xml"],["esf","application/vnd.epson.esf"],["etx","text/x-setext"],["evy",["application/envoy","application/x-envoy"]],["exe",["application/octet-stream","application/x-msdownload"]],["exi","application/exi"],["ext","application/vnd.novadigm.ext"],["ez2","application/vnd.ezpix-album"],["ez3","application/vnd.ezpix-package"],["f",["text/plain","text/x-fortran"]],["f4v","video/x-f4v"],["f77","text/x-fortran"],["f90",["text/plain","text/x-fortran"]],["fbs","image/vnd.fastbidsheet"],["fcs","application/vnd.isac.fcs"],["fdf","application/vnd.fdf"],["fe_launch","application/vnd.denovo.fcselayout-link"],["fg5","application/vnd.fujitsu.oasysgp"],["fh","image/x-freehand"],["fif",["application/fractals","image/fif"]],["fig","application/x-xfig"],["fli",["video/fli","video/x-fli"]],["flo",["image/florian","application/vnd.micrografx.flo"]],["flr","x-world/x-vrml"],["flv","video/x-flv"],["flw","application/vnd.kde.kivio"],["flx","text/vnd.fmi.flexstor"],["fly","text/vnd.fly"],["fm","application/vnd.framemaker"],["fmf","video/x-atomic3d-feature"],["fnc","application/vnd.frogans.fnc"],["for",["text/plain","text/x-fortran"]],["fpx",["image/vnd.fpx","image/vnd.net-fpx"]],["frl","application/freeloader"],["fsc","application/vnd.fsc.weblaunch"],["fst","image/vnd.fst"],["ftc","application/vnd.fluxtime.clip"],["fti","application/vnd.anser-web-funds-transfer-initiation"],["funk","audio/make"],["fvt","video/vnd.fvt"],["fxp","application/vnd.adobe.fxp"],["fzs","application/vnd.fuzzysheet"],["g","text/plain"],["g2w","application/vnd.geoplan"],["g3","image/g3fax"],["g3w","application/vnd.geospace"],["gac","application/vnd.groove-account"],["gdl","model/vnd.gdl"],["geo","application/vnd.dynageo"],["geojson","application/geo+json"],["gex","application/vnd.geometry-explorer"],["ggb","application/vnd.geogebra.file"],["ggt","application/vnd.geogebra.tool"],["ghf","application/vnd.groove-help"],["gif","image/gif"],["gim","application/vnd.groove-identity-message"],["gl",["video/gl","video/x-gl"]],["gmx","application/vnd.gmx"],["gnumeric","application/x-gnumeric"],["gph","application/vnd.flographit"],["gqf","application/vnd.grafeq"],["gram","application/srgs"],["grv","application/vnd.groove-injector"],["grxml","application/srgs+xml"],["gsd","audio/x-gsm"],["gsf","application/x-font-ghostscript"],["gsm","audio/x-gsm"],["gsp","application/x-gsp"],["gss","application/x-gss"],["gtar","application/x-gtar"],["gtm","application/vnd.groove-tool-message"],["gtw","model/vnd.gtw"],["gv","text/vnd.graphviz"],["gxt","application/vnd.geonext"],["gz",["application/x-gzip","application/x-compressed"]],["gzip",["multipart/x-gzip","application/x-gzip"]],["h",["text/plain","text/x-h"]],["h261","video/h261"],["h263","video/h263"],["h264","video/h264"],["hal","application/vnd.hal+xml"],["hbci","application/vnd.hbci"],["hdf","application/x-hdf"],["help","application/x-helpfile"],["hgl","application/vnd.hp-hpgl"],["hh",["text/plain","text/x-h"]],["hlb","text/x-script"],["hlp",["application/winhlp","application/hlp","application/x-helpfile","application/x-winhelp"]],["hpg","application/vnd.hp-hpgl"],["hpgl","application/vnd.hp-hpgl"],["hpid","application/vnd.hp-hpid"],["hps","application/vnd.hp-hps"],["hqx",["application/mac-binhex40","application/binhex","application/binhex4","application/mac-binhex","application/x-binhex40","application/x-mac-binhex40"]],["hta","application/hta"],["htc","text/x-component"],["htke","application/vnd.kenameaapp"],["htm","text/html"],["html","text/html"],["htmls","text/html"],["htt","text/webviewhtml"],["htx","text/html"],["hvd","application/vnd.yamaha.hv-dic"],["hvp","application/vnd.yamaha.hv-voice"],["hvs","application/vnd.yamaha.hv-script"],["i2g","application/vnd.intergeo"],["icc","application/vnd.iccprofile"],["ice","x-conference/x-cooltalk"],["ico","image/x-icon"],["ics","text/calendar"],["idc","text/plain"],["ief","image/ief"],["iefs","image/ief"],["ifm","application/vnd.shana.informed.formdata"],["iges",["application/iges","model/iges"]],["igl","application/vnd.igloader"],["igm","application/vnd.insors.igm"],["igs",["application/iges","model/iges"]],["igx","application/vnd.micrografx.igx"],["iif","application/vnd.shana.informed.interchange"],["iii","application/x-iphone"],["ima","application/x-ima"],["imap","application/x-httpd-imap"],["imp","application/vnd.accpac.simply.imp"],["ims","application/vnd.ms-ims"],["inf","application/inf"],["ins",["application/x-internet-signup","application/x-internett-signup"]],["ip","application/x-ip2"],["ipfix","application/ipfix"],["ipk","application/vnd.shana.informed.package"],["irm","application/vnd.ibm.rights-management"],["irp","application/vnd.irepository.package+xml"],["isp","application/x-internet-signup"],["isu","video/x-isvideo"],["it","audio/it"],["itp","application/vnd.shana.informed.formtemplate"],["iv","application/x-inventor"],["ivp","application/vnd.immervision-ivp"],["ivr","i-world/i-vrml"],["ivu","application/vnd.immervision-ivu"],["ivy","application/x-livescreen"],["jad","text/vnd.sun.j2me.app-descriptor"],["jam",["application/vnd.jam","audio/x-jam"]],["jar","application/java-archive"],["jav",["text/plain","text/x-java-source"]],["java",["text/plain","text/x-java-source,java","text/x-java-source"]],["jcm","application/x-java-commerce"],["jfif",["image/pipeg","image/jpeg","image/pjpeg"]],["jfif-tbnl","image/jpeg"],["jisp","application/vnd.jisp"],["jlt","application/vnd.hp-jlyt"],["jnlp","application/x-java-jnlp-file"],["joda","application/vnd.joost.joda-archive"],["jpe",["image/jpeg","image/pjpeg"]],["jpeg",["image/jpeg","image/pjpeg"]],["jpg",["image/jpeg","image/pjpeg"]],["jpgv","video/jpeg"],["jpm","video/jpm"],["jps","image/x-jps"],["js",["application/javascript","application/ecmascript","text/javascript","text/ecmascript","application/x-javascript"]],["json","application/json"],["jut","image/jutvision"],["kar",["audio/midi","music/x-karaoke"]],["karbon","application/vnd.kde.karbon"],["kfo","application/vnd.kde.kformula"],["kia","application/vnd.kidspiration"],["kml","application/vnd.google-earth.kml+xml"],["kmz","application/vnd.google-earth.kmz"],["kne","application/vnd.kinar"],["kon","application/vnd.kde.kontour"],["kpr","application/vnd.kde.kpresenter"],["ksh",["application/x-ksh","text/x-script.ksh"]],["ksp","application/vnd.kde.kspread"],["ktx","image/ktx"],["ktz","application/vnd.kahootz"],["kwd","application/vnd.kde.kword"],["la",["audio/nspaudio","audio/x-nspaudio"]],["lam","audio/x-liveaudio"],["lasxml","application/vnd.las.las+xml"],["latex","application/x-latex"],["lbd","application/vnd.llamagraphics.life-balance.desktop"],["lbe","application/vnd.llamagraphics.life-balance.exchange+xml"],["les","application/vnd.hhe.lesson-player"],["lha",["application/octet-stream","application/lha","application/x-lha"]],["lhx","application/octet-stream"],["link66","application/vnd.route66.link66+xml"],["list","text/plain"],["lma",["audio/nspaudio","audio/x-nspaudio"]],["log","text/plain"],["lrm","application/vnd.ms-lrm"],["lsf","video/x-la-asf"],["lsp",["application/x-lisp","text/x-script.lisp"]],["lst","text/plain"],["lsx",["video/x-la-asf","text/x-la-asf"]],["ltf","application/vnd.frogans.ltf"],["ltx","application/x-latex"],["lvp","audio/vnd.lucent.voice"],["lwp","application/vnd.lotus-wordpro"],["lzh",["application/octet-stream","application/x-lzh"]],["lzx",["application/lzx","application/octet-stream","application/x-lzx"]],["m",["text/plain","text/x-m"]],["m13","application/x-msmediaview"],["m14","application/x-msmediaview"],["m1v","video/mpeg"],["m21","application/mp21"],["m2a","audio/mpeg"],["m2v","video/mpeg"],["m3u",["audio/x-mpegurl","audio/x-mpequrl"]],["m3u8","application/vnd.apple.mpegurl"],["m4v","video/x-m4v"],["ma","application/mathematica"],["mads","application/mads+xml"],["mag","application/vnd.ecowin.chart"],["man","application/x-troff-man"],["map","application/x-navimap"],["mar","text/plain"],["mathml","application/mathml+xml"],["mbd","application/mbedlet"],["mbk","application/vnd.mobius.mbk"],["mbox","application/mbox"],["mc$","application/x-magic-cap-package-1.0"],["mc1","application/vnd.medcalcdata"],["mcd",["application/mcad","application/vnd.mcd","application/x-mathcad"]],["mcf",["image/vasa","text/mcf"]],["mcp","application/netmc"],["mcurl","text/vnd.curl.mcurl"],["mdb","application/x-msaccess"],["mdi","image/vnd.ms-modi"],["me","application/x-troff-me"],["meta4","application/metalink4+xml"],["mets","application/mets+xml"],["mfm","application/vnd.mfmp"],["mgp","application/vnd.osgeo.mapguide.package"],["mgz","application/vnd.proteus.magazine"],["mht","message/rfc822"],["mhtml","message/rfc822"],["mid",["audio/mid","audio/midi","music/crescendo","x-music/x-midi","audio/x-midi","application/x-midi","audio/x-mid"]],["midi",["audio/midi","music/crescendo","x-music/x-midi","audio/x-midi","application/x-midi","audio/x-mid"]],["mif",["application/vnd.mif","application/x-mif","application/x-frame"]],["mime",["message/rfc822","www/mime"]],["mj2","video/mj2"],["mjf","audio/x-vnd.audioexplosion.mjuicemediafile"],["mjpg","video/x-motion-jpeg"],["mlp","application/vnd.dolby.mlp"],["mm",["application/base64","application/x-meme"]],["mmd","application/vnd.chipnuts.karaoke-mmd"],["mme","application/base64"],["mmf","application/vnd.smaf"],["mmr","image/vnd.fujixerox.edmics-mmr"],["mny","application/x-msmoney"],["mod",["audio/mod","audio/x-mod"]],["mods","application/mods+xml"],["moov","video/quicktime"],["mov","video/quicktime"],["movie","video/x-sgi-movie"],["mp2",["video/mpeg","audio/mpeg","video/x-mpeg","audio/x-mpeg","video/x-mpeq2a"]],["mp3",["audio/mpeg","audio/mpeg3","video/mpeg","audio/x-mpeg-3","video/x-mpeg"]],["mp4",["video/mp4","application/mp4"]],["mp4a","audio/mp4"],["mpa",["video/mpeg","audio/mpeg"]],["mpc",["application/vnd.mophun.certificate","application/x-project"]],["mpe","video/mpeg"],["mpeg","video/mpeg"],["mpg",["video/mpeg","audio/mpeg"]],["mpga","audio/mpeg"],["mpkg","application/vnd.apple.installer+xml"],["mpm","application/vnd.blueice.multipass"],["mpn","application/vnd.mophun.application"],["mpp","application/vnd.ms-project"],["mpt","application/x-project"],["mpv","application/x-project"],["mpv2","video/mpeg"],["mpx","application/x-project"],["mpy","application/vnd.ibm.minipay"],["mqy","application/vnd.mobius.mqy"],["mrc","application/marc"],["mrcx","application/marcxml+xml"],["ms","application/x-troff-ms"],["mscml","application/mediaservercontrol+xml"],["mseq","application/vnd.mseq"],["msf","application/vnd.epson.msf"],["msg","application/vnd.ms-outlook"],["msh","model/mesh"],["msl","application/vnd.mobius.msl"],["msty","application/vnd.muvee.style"],["mts","model/vnd.mts"],["mus","application/vnd.musician"],["musicxml","application/vnd.recordare.musicxml+xml"],["mv","video/x-sgi-movie"],["mvb","application/x-msmediaview"],["mwf","application/vnd.mfer"],["mxf","application/mxf"],["mxl","application/vnd.recordare.musicxml"],["mxml","application/xv+xml"],["mxs","application/vnd.triscape.mxs"],["mxu","video/vnd.mpegurl"],["my","audio/make"],["mzz","application/x-vnd.audioexplosion.mzz"],["n-gage","application/vnd.nokia.n-gage.symbian.install"],["n3","text/n3"],["nap","image/naplps"],["naplps","image/naplps"],["nbp","application/vnd.wolfram.player"],["nc","application/x-netcdf"],["ncm","application/vnd.nokia.configuration-message"],["ncx","application/x-dtbncx+xml"],["ngdat","application/vnd.nokia.n-gage.data"],["nif","image/x-niff"],["niff","image/x-niff"],["nix","application/x-mix-transfer"],["nlu","application/vnd.neurolanguage.nlu"],["nml","application/vnd.enliven"],["nnd","application/vnd.noblenet-directory"],["nns","application/vnd.noblenet-sealer"],["nnw","application/vnd.noblenet-web"],["npx","image/vnd.net-fpx"],["nsc","application/x-conference"],["nsf","application/vnd.lotus-notes"],["nvd","application/x-navidoc"],["nws","message/rfc822"],["o","application/octet-stream"],["oa2","application/vnd.fujitsu.oasys2"],["oa3","application/vnd.fujitsu.oasys3"],["oas","application/vnd.fujitsu.oasys"],["obd","application/x-msbinder"],["oda","application/oda"],["odb","application/vnd.oasis.opendocument.database"],["odc","application/vnd.oasis.opendocument.chart"],["odf","application/vnd.oasis.opendocument.formula"],["odft","application/vnd.oasis.opendocument.formula-template"],["odg","application/vnd.oasis.opendocument.graphics"],["odi","application/vnd.oasis.opendocument.image"],["odm","application/vnd.oasis.opendocument.text-master"],["odp","application/vnd.oasis.opendocument.presentation"],["ods","application/vnd.oasis.opendocument.spreadsheet"],["odt","application/vnd.oasis.opendocument.text"],["oga","audio/ogg"],["ogv","video/ogg"],["ogx","application/ogg"],["omc","application/x-omc"],["omcd","application/x-omcdatamaker"],["omcr","application/x-omcregerator"],["onetoc","application/onenote"],["opf","application/oebps-package+xml"],["org","application/vnd.lotus-organizer"],["osf","application/vnd.yamaha.openscoreformat"],["osfpvg","application/vnd.yamaha.openscoreformat.osfpvg+xml"],["otc","application/vnd.oasis.opendocument.chart-template"],["otf","application/x-font-otf"],["otg","application/vnd.oasis.opendocument.graphics-template"],["oth","application/vnd.oasis.opendocument.text-web"],["oti","application/vnd.oasis.opendocument.image-template"],["otp","application/vnd.oasis.opendocument.presentation-template"],["ots","application/vnd.oasis.opendocument.spreadsheet-template"],["ott","application/vnd.oasis.opendocument.text-template"],["oxt","application/vnd.openofficeorg.extension"],["p","text/x-pascal"],["p10",["application/pkcs10","application/x-pkcs10"]],["p12",["application/pkcs-12","application/x-pkcs12"]],["p7a","application/x-pkcs7-signature"],["p7b","application/x-pkcs7-certificates"],["p7c",["application/pkcs7-mime","application/x-pkcs7-mime"]],["p7m",["application/pkcs7-mime","application/x-pkcs7-mime"]],["p7r","application/x-pkcs7-certreqresp"],["p7s",["application/pkcs7-signature","application/x-pkcs7-signature"]],["p8","application/pkcs8"],["par","text/plain-bas"],["part","application/pro_eng"],["pas","text/pascal"],["paw","application/vnd.pawaafile"],["pbd","application/vnd.powerbuilder6"],["pbm","image/x-portable-bitmap"],["pcf","application/x-font-pcf"],["pcl",["application/vnd.hp-pcl","application/x-pcl"]],["pclxl","application/vnd.hp-pclxl"],["pct","image/x-pict"],["pcurl","application/vnd.curl.pcurl"],["pcx","image/x-pcx"],["pdb",["application/vnd.palm","chemical/x-pdb"]],["pdf","application/pdf"],["pfa","application/x-font-type1"],["pfr","application/font-tdpfr"],["pfunk",["audio/make","audio/make.my.funk"]],["pfx","application/x-pkcs12"],["pgm",["image/x-portable-graymap","image/x-portable-greymap"]],["pgn","application/x-chess-pgn"],["pgp","application/pgp-signature"],["pic",["image/pict","image/x-pict"]],["pict","image/pict"],["pkg","application/x-newton-compatible-pkg"],["pki","application/pkixcmp"],["pkipath","application/pkix-pkipath"],["pko",["application/ynd.ms-pkipko","application/vnd.ms-pki.pko"]],["pl",["text/plain","text/x-script.perl"]],["plb","application/vnd.3gpp.pic-bw-large"],["plc","application/vnd.mobius.plc"],["plf","application/vnd.pocketlearn"],["pls","application/pls+xml"],["plx","application/x-pixclscript"],["pm",["text/x-script.perl-module","image/x-xpixmap"]],["pm4","application/x-pagemaker"],["pm5","application/x-pagemaker"],["pma","application/x-perfmon"],["pmc","application/x-perfmon"],["pml",["application/vnd.ctc-posml","application/x-perfmon"]],["pmr","application/x-perfmon"],["pmw","application/x-perfmon"],["png","image/png"],["pnm",["application/x-portable-anymap","image/x-portable-anymap"]],["portpkg","application/vnd.macports.portpkg"],["pot",["application/vnd.ms-powerpoint","application/mspowerpoint"]],["potm","application/vnd.ms-powerpoint.template.macroenabled.12"],["potx","application/vnd.openxmlformats-officedocument.presentationml.template"],["pov","model/x-pov"],["ppa","application/vnd.ms-powerpoint"],["ppam","application/vnd.ms-powerpoint.addin.macroenabled.12"],["ppd","application/vnd.cups-ppd"],["ppm","image/x-portable-pixmap"],["pps",["application/vnd.ms-powerpoint","application/mspowerpoint"]],["ppsm","application/vnd.ms-powerpoint.slideshow.macroenabled.12"],["ppsx","application/vnd.openxmlformats-officedocument.presentationml.slideshow"],["ppt",["application/vnd.ms-powerpoint","application/mspowerpoint","application/powerpoint","application/x-mspowerpoint"]],["pptm","application/vnd.ms-powerpoint.presentation.macroenabled.12"],["pptx","application/vnd.openxmlformats-officedocument.presentationml.presentation"],["ppz","application/mspowerpoint"],["prc","application/x-mobipocket-ebook"],["pre",["application/vnd.lotus-freelance","application/x-freelance"]],["prf","application/pics-rules"],["prt","application/pro_eng"],["ps","application/postscript"],["psb","application/vnd.3gpp.pic-bw-small"],["psd",["application/octet-stream","image/vnd.adobe.photoshop"]],["psf","application/x-font-linux-psf"],["pskcxml","application/pskc+xml"],["ptid","application/vnd.pvi.ptid1"],["pub","application/x-mspublisher"],["pvb","application/vnd.3gpp.pic-bw-var"],["pvu","paleovu/x-pv"],["pwn","application/vnd.3m.post-it-notes"],["pwz","application/vnd.ms-powerpoint"],["py","text/x-script.phyton"],["pya","audio/vnd.ms-playready.media.pya"],["pyc","application/x-bytecode.python"],["pyv","video/vnd.ms-playready.media.pyv"],["qam","application/vnd.epson.quickanime"],["qbo","application/vnd.intu.qbo"],["qcp","audio/vnd.qcelp"],["qd3","x-world/x-3dmf"],["qd3d","x-world/x-3dmf"],["qfx","application/vnd.intu.qfx"],["qif","image/x-quicktime"],["qps","application/vnd.publishare-delta-tree"],["qt","video/quicktime"],["qtc","video/x-qtc"],["qti","image/x-quicktime"],["qtif","image/x-quicktime"],["qxd","application/vnd.quark.quarkxpress"],["ra",["audio/x-realaudio","audio/x-pn-realaudio","audio/x-pn-realaudio-plugin"]],["ram","audio/x-pn-realaudio"],["rar","application/x-rar-compressed"],["ras",["image/cmu-raster","application/x-cmu-raster","image/x-cmu-raster"]],["rast","image/cmu-raster"],["rcprofile","application/vnd.ipunplugged.rcprofile"],["rdf","application/rdf+xml"],["rdz","application/vnd.data-vision.rdz"],["rep","application/vnd.businessobjects"],["res","application/x-dtbresource+xml"],["rexx","text/x-script.rexx"],["rf","image/vnd.rn-realflash"],["rgb","image/x-rgb"],["rif","application/reginfo+xml"],["rip","audio/vnd.rip"],["rl","application/resource-lists+xml"],["rlc","image/vnd.fujixerox.edmics-rlc"],["rld","application/resource-lists-diff+xml"],["rm",["application/vnd.rn-realmedia","audio/x-pn-realaudio"]],["rmi","audio/mid"],["rmm","audio/x-pn-realaudio"],["rmp",["audio/x-pn-realaudio-plugin","audio/x-pn-realaudio"]],["rms","application/vnd.jcp.javame.midlet-rms"],["rnc","application/relax-ng-compact-syntax"],["rng",["application/ringing-tones","application/vnd.nokia.ringing-tone"]],["rnx","application/vnd.rn-realplayer"],["roff","application/x-troff"],["rp","image/vnd.rn-realpix"],["rp9","application/vnd.cloanto.rp9"],["rpm","audio/x-pn-realaudio-plugin"],["rpss","application/vnd.nokia.radio-presets"],["rpst","application/vnd.nokia.radio-preset"],["rq","application/sparql-query"],["rs","application/rls-services+xml"],["rsd","application/rsd+xml"],["rt",["text/richtext","text/vnd.rn-realtext"]],["rtf",["application/rtf","text/richtext","application/x-rtf"]],["rtx",["text/richtext","application/rtf"]],["rv","video/vnd.rn-realvideo"],["s","text/x-asm"],["s3m","audio/s3m"],["saf","application/vnd.yamaha.smaf-audio"],["saveme","application/octet-stream"],["sbk","application/x-tbook"],["sbml","application/sbml+xml"],["sc","application/vnd.ibm.secure-container"],["scd","application/x-msschedule"],["scm",["application/vnd.lotus-screencam","video/x-scm","text/x-script.guile","application/x-lotusscreencam","text/x-script.scheme"]],["scq","application/scvp-cv-request"],["scs","application/scvp-cv-response"],["sct","text/scriptlet"],["scurl","text/vnd.curl.scurl"],["sda","application/vnd.stardivision.draw"],["sdc","application/vnd.stardivision.calc"],["sdd","application/vnd.stardivision.impress"],["sdkm","application/vnd.solent.sdkm+xml"],["sdml","text/plain"],["sdp",["application/sdp","application/x-sdp"]],["sdr","application/sounder"],["sdw","application/vnd.stardivision.writer"],["sea",["application/sea","application/x-sea"]],["see","application/vnd.seemail"],["seed","application/vnd.fdsn.seed"],["sema","application/vnd.sema"],["semd","application/vnd.semd"],["semf","application/vnd.semf"],["ser","application/java-serialized-object"],["set","application/set"],["setpay","application/set-payment-initiation"],["setreg","application/set-registration-initiation"],["sfd-hdstx","application/vnd.hydrostatix.sof-data"],["sfs","application/vnd.spotfire.sfs"],["sgl","application/vnd.stardivision.writer-global"],["sgm",["text/sgml","text/x-sgml"]],["sgml",["text/sgml","text/x-sgml"]],["sh",["application/x-shar","application/x-bsh","application/x-sh","text/x-script.sh"]],["shar",["application/x-bsh","application/x-shar"]],["shf","application/shf+xml"],["shtml",["text/html","text/x-server-parsed-html"]],["sid","audio/x-psid"],["sis","application/vnd.symbian.install"],["sit",["application/x-stuffit","application/x-sit"]],["sitx","application/x-stuffitx"],["skd","application/x-koan"],["skm","application/x-koan"],["skp",["application/vnd.koan","application/x-koan"]],["skt","application/x-koan"],["sl","application/x-seelogo"],["sldm","application/vnd.ms-powerpoint.slide.macroenabled.12"],["sldx","application/vnd.openxmlformats-officedocument.presentationml.slide"],["slt","application/vnd.epson.salt"],["sm","application/vnd.stepmania.stepchart"],["smf","application/vnd.stardivision.math"],["smi",["application/smil","application/smil+xml"]],["smil","application/smil"],["snd",["audio/basic","audio/x-adpcm"]],["snf","application/x-font-snf"],["sol","application/solids"],["spc",["text/x-speech","application/x-pkcs7-certificates"]],["spf","application/vnd.yamaha.smaf-phrase"],["spl",["application/futuresplash","application/x-futuresplash"]],["spot","text/vnd.in3d.spot"],["spp","application/scvp-vp-response"],["spq","application/scvp-vp-request"],["spr","application/x-sprite"],["sprite","application/x-sprite"],["src","application/x-wais-source"],["sru","application/sru+xml"],["srx","application/sparql-results+xml"],["sse","application/vnd.kodak-descriptor"],["ssf","application/vnd.epson.ssf"],["ssi","text/x-server-parsed-html"],["ssm","application/streamingmedia"],["ssml","application/ssml+xml"],["sst",["application/vnd.ms-pkicertstore","application/vnd.ms-pki.certstore"]],["st","application/vnd.sailingtracker.track"],["stc","application/vnd.sun.xml.calc.template"],["std","application/vnd.sun.xml.draw.template"],["step","application/step"],["stf","application/vnd.wt.stf"],["sti","application/vnd.sun.xml.impress.template"],["stk","application/hyperstudio"],["stl",["application/vnd.ms-pkistl","application/sla","application/vnd.ms-pki.stl","application/x-navistyle"]],["stm","text/html"],["stp","application/step"],["str","application/vnd.pg.format"],["stw","application/vnd.sun.xml.writer.template"],["sub","image/vnd.dvb.subtitle"],["sus","application/vnd.sus-calendar"],["sv4cpio","application/x-sv4cpio"],["sv4crc","application/x-sv4crc"],["svc","application/vnd.dvb.service"],["svd","application/vnd.svd"],["svf",["image/vnd.dwg","image/x-dwg"]],["svg","image/svg+xml"],["svr",["x-world/x-svr","application/x-world"]],["swf","application/x-shockwave-flash"],["swi","application/vnd.aristanetworks.swi"],["sxc","application/vnd.sun.xml.calc"],["sxd","application/vnd.sun.xml.draw"],["sxg","application/vnd.sun.xml.writer.global"],["sxi","application/vnd.sun.xml.impress"],["sxm","application/vnd.sun.xml.math"],["sxw","application/vnd.sun.xml.writer"],["t",["text/troff","application/x-troff"]],["talk","text/x-speech"],["tao","application/vnd.tao.intent-module-archive"],["tar","application/x-tar"],["tbk",["application/toolbook","application/x-tbook"]],["tcap","application/vnd.3gpp2.tcap"],["tcl",["text/x-script.tcl","application/x-tcl"]],["tcsh","text/x-script.tcsh"],["teacher","application/vnd.smart.teacher"],["tei","application/tei+xml"],["tex","application/x-tex"],["texi","application/x-texinfo"],["texinfo","application/x-texinfo"],["text",["application/plain","text/plain"]],["tfi","application/thraud+xml"],["tfm","application/x-tex-tfm"],["tgz",["application/gnutar","application/x-compressed"]],["thmx","application/vnd.ms-officetheme"],["tif",["image/tiff","image/x-tiff"]],["tiff",["image/tiff","image/x-tiff"]],["tmo","application/vnd.tmobile-livetv"],["torrent","application/x-bittorrent"],["tpl","application/vnd.groove-tool-template"],["tpt","application/vnd.trid.tpt"],["tr","application/x-troff"],["tra","application/vnd.trueapp"],["trm","application/x-msterminal"],["tsd","application/timestamped-data"],["tsi","audio/tsp-audio"],["tsp",["application/dsptype","audio/tsplayer"]],["tsv","text/tab-separated-values"],["ttf","application/x-font-ttf"],["ttl","text/turtle"],["turbot","image/florian"],["twd","application/vnd.simtech-mindmapper"],["txd","application/vnd.genomatix.tuxedo"],["txf","application/vnd.mobius.txf"],["txt","text/plain"],["ufd","application/vnd.ufdl"],["uil","text/x-uil"],["uls","text/iuls"],["umj","application/vnd.umajin"],["uni","text/uri-list"],["unis","text/uri-list"],["unityweb","application/vnd.unity"],["unv","application/i-deas"],["uoml","application/vnd.uoml+xml"],["uri","text/uri-list"],["uris","text/uri-list"],["ustar",["application/x-ustar","multipart/x-ustar"]],["utz","application/vnd.uiq.theme"],["uu",["application/octet-stream","text/x-uuencode"]],["uue","text/x-uuencode"],["uva","audio/vnd.dece.audio"],["uvh","video/vnd.dece.hd"],["uvi","image/vnd.dece.graphic"],["uvm","video/vnd.dece.mobile"],["uvp","video/vnd.dece.pd"],["uvs","video/vnd.dece.sd"],["uvu","video/vnd.uvvu.mp4"],["uvv","video/vnd.dece.video"],["vcd","application/x-cdlink"],["vcf","text/x-vcard"],["vcg","application/vnd.groove-vcard"],["vcs","text/x-vcalendar"],["vcx","application/vnd.vcx"],["vda","application/vda"],["vdo","video/vdo"],["vew","application/groupwise"],["vis","application/vnd.visionary"],["viv",["video/vivo","video/vnd.vivo"]],["vivo",["video/vivo","video/vnd.vivo"]],["vmd","application/vocaltec-media-desc"],["vmf","application/vocaltec-media-file"],["voc",["audio/voc","audio/x-voc"]],["vos","video/vosaic"],["vox","audio/voxware"],["vqe","audio/x-twinvq-plugin"],["vqf","audio/x-twinvq"],["vql","audio/x-twinvq-plugin"],["vrml",["model/vrml","x-world/x-vrml","application/x-vrml"]],["vrt","x-world/x-vrt"],["vsd",["application/vnd.visio","application/x-visio"]],["vsf","application/vnd.vsf"],["vst","application/x-visio"],["vsw","application/x-visio"],["vtu","model/vnd.vtu"],["vxml","application/voicexml+xml"],["w60","application/wordperfect6.0"],["w61","application/wordperfect6.1"],["w6w","application/msword"],["wad","application/x-doom"],["wav",["audio/wav","audio/x-wav"]],["wax","audio/x-ms-wax"],["wb1","application/x-qpro"],["wbmp","image/vnd.wap.wbmp"],["wbs","application/vnd.criticaltools.wbs+xml"],["wbxml","application/vnd.wap.wbxml"],["wcm","application/vnd.ms-works"],["wdb","application/vnd.ms-works"],["web","application/vnd.xara"],["weba","audio/webm"],["webm","video/webm"],["webp","image/webp"],["wg","application/vnd.pmi.widget"],["wgt","application/widget"],["wiz","application/msword"],["wk1","application/x-123"],["wks","application/vnd.ms-works"],["wm","video/x-ms-wm"],["wma","audio/x-ms-wma"],["wmd","application/x-ms-wmd"],["wmf",["windows/metafile","application/x-msmetafile"]],["wml","text/vnd.wap.wml"],["wmlc","application/vnd.wap.wmlc"],["wmls","text/vnd.wap.wmlscript"],["wmlsc","application/vnd.wap.wmlscriptc"],["wmv","video/x-ms-wmv"],["wmx","video/x-ms-wmx"],["wmz","application/x-ms-wmz"],["woff","application/x-font-woff"],["word","application/msword"],["wp","application/wordperfect"],["wp5",["application/wordperfect","application/wordperfect6.0"]],["wp6","application/wordperfect"],["wpd",["application/wordperfect","application/vnd.wordperfect","application/x-wpwin"]],["wpl","application/vnd.ms-wpl"],["wps","application/vnd.ms-works"],["wq1","application/x-lotus"],["wqd","application/vnd.wqd"],["wri",["application/mswrite","application/x-wri","application/x-mswrite"]],["wrl",["model/vrml","x-world/x-vrml","application/x-world"]],["wrz",["model/vrml","x-world/x-vrml"]],["wsc","text/scriplet"],["wsdl","application/wsdl+xml"],["wspolicy","application/wspolicy+xml"],["wsrc","application/x-wais-source"],["wtb","application/vnd.webturbo"],["wtk","application/x-wintalk"],["wvx","video/x-ms-wvx"],["x-png","image/png"],["x3d","application/vnd.hzn-3d-crossword"],["xaf","x-world/x-vrml"],["xap","application/x-silverlight-app"],["xar","application/vnd.xara"],["xbap","application/x-ms-xbap"],["xbd","application/vnd.fujixerox.docuworks.binder"],["xbm",["image/xbm","image/x-xbm","image/x-xbitmap"]],["xdf","application/xcap-diff+xml"],["xdm","application/vnd.syncml.dm+xml"],["xdp","application/vnd.adobe.xdp+xml"],["xdr","video/x-amt-demorun"],["xdssc","application/dssc+xml"],["xdw","application/vnd.fujixerox.docuworks"],["xenc","application/xenc+xml"],["xer","application/patch-ops-error+xml"],["xfdf","application/vnd.adobe.xfdf"],["xfdl","application/vnd.xfdl"],["xgz","xgl/drawing"],["xhtml","application/xhtml+xml"],["xif","image/vnd.xiff"],["xl","application/excel"],["xla",["application/vnd.ms-excel","application/excel","application/x-msexcel","application/x-excel"]],["xlam","application/vnd.ms-excel.addin.macroenabled.12"],["xlb",["application/excel","application/vnd.ms-excel","application/x-excel"]],["xlc",["application/vnd.ms-excel","application/excel","application/x-excel"]],["xld",["application/excel","application/x-excel"]],["xlk",["application/excel","application/x-excel"]],["xll",["application/excel","application/vnd.ms-excel","application/x-excel"]],["xlm",["application/vnd.ms-excel","application/excel","application/x-excel"]],["xls",["application/vnd.ms-excel","application/excel","application/x-msexcel","application/x-excel"]],["xlsb","application/vnd.ms-excel.sheet.binary.macroenabled.12"],["xlsm","application/vnd.ms-excel.sheet.macroenabled.12"],["xlsx","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"],["xlt",["application/vnd.ms-excel","application/excel","application/x-excel"]],["xltm","application/vnd.ms-excel.template.macroenabled.12"],["xltx","application/vnd.openxmlformats-officedocument.spreadsheetml.template"],["xlv",["application/excel","application/x-excel"]],["xlw",["application/vnd.ms-excel","application/excel","application/x-msexcel","application/x-excel"]],["xm","audio/xm"],["xml",["application/xml","text/xml","application/atom+xml","application/rss+xml"]],["xmz","xgl/movie"],["xo","application/vnd.olpc-sugar"],["xof","x-world/x-vrml"],["xop","application/xop+xml"],["xpi","application/x-xpinstall"],["xpix","application/x-vnd.ls-xpix"],["xpm",["image/xpm","image/x-xpixmap"]],["xpr","application/vnd.is-xpr"],["xps","application/vnd.ms-xpsdocument"],["xpw","application/vnd.intercon.formnet"],["xslt","application/xslt+xml"],["xsm","application/vnd.syncml+xml"],["xspf","application/xspf+xml"],["xsr","video/x-amt-showrun"],["xul","application/vnd.mozilla.xul+xml"],["xwd",["image/x-xwd","image/x-xwindowdump"]],["xyz",["chemical/x-xyz","chemical/x-pdb"]],["yang","application/yang"],["yin","application/yin+xml"],["z",["application/x-compressed","application/x-compress"]],["zaz","application/vnd.zzazz.deck+xml"],["zip",["application/zip","multipart/x-zip","application/x-zip-compressed","application/x-compressed"]],["zir","application/vnd.zul"],["zmm","application/vnd.handheld-entertainment+xml"],["zoo","application/octet-stream"],["zsh","text/x-script.zsh"]]);return ZO={detectMimeType(i){if(!i)return t;let s=e.parse(i),a=(s.ext.substr(1)||s.name||"").split("?").shift().trim().toLowerCase(),o=t;return n.has(a)&&(o=n.get(a)),Array.isArray(o)?o[0]:o},detectExtension(e){if(!e)return"bin";let t=(e||"").toLowerCase().trim().split("/"),n=t.shift().trim(),s=t.join("/").trim();if(i.has(n+"/"+s)){let e=i.get(n+"/"+s);return Array.isArray(e)?e[0]:e}return"text"===n?"txt":"bin"}}}function OP(){if(iP)return tP;iP=1;const e=2147483647,t=36,i=/^xn--/,n=/[^\0-\x7F]/,s=/[\x2E\u3002\uFF0E\uFF61]/g,a={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},o=Math.floor,r=String.fromCharCode;function c(e){throw new RangeError(a[e])}function l(e,t){const i=e.split("@");let n="";i.length>1&&(n=i[0]+"@",e=i[1]);const a=function(e,t){const i=[];let n=e.length;for(;n--;)i[n]=t(e[n]);return i}((e=e.replace(s,".")).split("."),t).join(".");return n+a}function p(e){const t=[];let i=0;const n=e.length;for(;i<n;){const s=e.charCodeAt(i++);if(s>=55296&&s<=56319&&i<n){const n=e.charCodeAt(i++);56320==(64512&n)?t.push(((1023&s)<<10)+(1023&n)+65536):(t.push(s),i--)}else t.push(s)}return t}const d=function(e,t){return e+22+75*(e<26)-((0!=t)<<5)},u=function(e,i,n){let s=0;for(e=n?o(e/700):e>>1,e+=o(e/i);e>455;s+=t)e=o(e/35);return o(s+36*e/(e+38))},m=function(i){const n=[],s=i.length;let a=0,r=128,l=72,p=i.lastIndexOf("-");p<0&&(p=0);for(let e=0;e<p;++e)i.charCodeAt(e)>=128&&c("not-basic"),n.push(i.charCodeAt(e));for(let m=p>0?p+1:0;m<s;){const p=a;for(let n=1,r=t;;r+=t){m>=s&&c("invalid-input");const p=(d=i.charCodeAt(m++))>=48&&d<58?d-48+26:d>=65&&d<91?d-65:d>=97&&d<123?d-97:t;p>=t&&c("invalid-input"),p>o((e-a)/n)&&c("overflow"),a+=p*n;const u=r<=l?1:r>=l+26?26:r-l;if(p<u)break;const h=t-u;n>o(e/h)&&c("overflow"),n*=h}const h=n.length+1;l=u(a-p,h,0==p),o(a/h)>e-r&&c("overflow"),r+=o(a/h),a%=h,n.splice(a++,0,r)}var d;return String.fromCodePoint(...n)},h=function(i){const n=[],s=(i=p(i)).length;let a=128,l=0,m=72;for(const e of i)e<128&&n.push(r(e));const h=n.length;let f=h;for(h&&n.push("-");f<s;){let s=e;for(const e of i)e>=a&&e<s&&(s=e);const p=f+1;s-a>o((e-l)/p)&&c("overflow"),l+=(s-a)*p,a=s;for(const s of i)if(s<a&&++l>e&&c("overflow"),s===a){let e=l;for(let i=t;;i+=t){const s=i<=m?1:i>=m+26?26:i-m;if(e<s)break;const a=e-s,c=t-s;n.push(r(d(s+a%c,0))),e=o(a/c)}n.push(r(d(e,0))),m=u(l,p,f===h),l=0,++f}++l,++a}return n.join("")};return tP={version:"2.3.1",ucs2:{decode:p,encode:e=>String.fromCodePoint(...e)},decode:m,encode:h,toASCII:function(e){return l(e,(function(e){return n.test(e)?"xn--"+h(e):e}))},toUnicode:function(e){return l(e,(function(e){return i.test(e)?m(e.slice(4).toLowerCase()):e}))}}}function PP(){if(sP)return nP;sP=1;const e=c.Transform;function t(e){return"string"==typeof e&&(e=Buffer.from(e,"utf-8")),e.toString("base64")}function i(e,t){if(t=t||76,(e=(e||"").toString()).length<=t)return e;let i=[],n=0,s=1024*t;for(;n<e.length;){let a=e.substr(n,s).replace(new RegExp(".{"+t+"}","g"),"$&\r\n").trim();i.push(a),n+=s}return i.join("\r\n").trim()}return nP={encode:t,wrap:i,Encoder:class extends e{constructor(e){super(),this.options=e||{},!1!==this.options.lineLength&&(this.options.lineLength=this.options.lineLength||76),this._curLine="",this._remainingBytes=!1,this.inputBytes=0,this.outputBytes=0}_transform(e,n,s){if("buffer"!==n&&(e=Buffer.from(e,n)),!e||!e.length)return setImmediate(s);this.inputBytes+=e.length,this._remainingBytes&&this._remainingBytes.length&&(e=Buffer.concat([this._remainingBytes,e],this._remainingBytes.length+e.length),this._remainingBytes=!1),e.length%3?(this._remainingBytes=e.slice(e.length-e.length%3),e=e.slice(0,e.length-e.length%3)):this._remainingBytes=!1;let a=this._curLine+t(e);if(this.options.lineLength){a=i(a,this.options.lineLength);let e=a.lastIndexOf("\n");e<0?(this._curLine=a,a=""):e===a.length-1?this._curLine="":(this._curLine=a.substr(e+1),a=a.substr(0,e+1))}a&&(this.outputBytes+=a.length,this.push(Buffer.from(a,"ascii"))),setImmediate(s)}_flush(e){this._remainingBytes&&this._remainingBytes.length&&(this._curLine+=t(this._remainingBytes)),this._curLine&&(this._curLine=i(this._curLine,this.options.lineLength),this.outputBytes+=this._curLine.length,this.push(this._curLine,"ascii"),this._curLine=""),e()}}}}function _P(){if(oP)return aP;oP=1;const e=c.Transform;function t(e){"string"==typeof e&&(e=Buffer.from(e,"utf-8"));let t,i=[[9],[10],[13],[32,60],[62,126]],s="";for(let a=0,o=e.length;a<o;a++)t=e[a],n(t,i)&&(32!==t&&9!==t||a!==o-1&&10!==e[a+1]&&13!==e[a+1])?s+=String.fromCharCode(t):s+="="+(t<16?"0":"")+t.toString(16).toUpperCase();return s}function i(e,t){if(t=t||76,(e=(e||"").toString()).length<=t)return e;let i,n,s,a=0,o=e.length,r=Math.floor(t/3),c="";for(;a<o;)if(s=e.substr(a,t),i=s.match(/\r\n/))s=s.substr(0,i.index+i[0].length),c+=s,a+=s.length;else if("\n"!==s.substr(-1))if(i=s.substr(-r).match(/\n.*?$/))s=s.substr(0,s.length-(i[0].length-1)),c+=s,a+=s.length;else{if(s.length>t-r&&(i=s.substr(-r).match(/[ \t.,!?][^ \t.,!?]*$/)))s=s.substr(0,s.length-(i[0].length-1));else if(s.match(/[=][\da-f]{0,2}$/i))for((i=s.match(/[=][\da-f]{0,1}$/i))&&(s=s.substr(0,s.length-i[0].length));s.length>3&&s.length<o-a&&!s.match(/^(?:=[\da-f]{2}){1,4}$/i)&&(i=s.match(/[=][\da-f]{2}$/gi))&&(n=parseInt(i[0].substr(1,2),16),!(n<128))&&(s=s.substr(0,s.length-3),!(n>=192)););a+s.length<o&&"\n"!==s.substr(-1)?(s.length===t&&s.match(/[=][\da-f]{2}$/i)?s=s.substr(0,s.length-3):s.length===t&&(s=s.substr(0,s.length-1)),a+=s.length,s+="=\r\n"):a+=s.length,c+=s}else c+=s,a+=s.length;return c}function n(e,t){for(let i=t.length-1;i>=0;i--)if(t[i].length){if(1===t[i].length&&e===t[i][0])return!0;if(2===t[i].length&&e>=t[i][0]&&e<=t[i][1])return!0}return!1}return aP={encode:t,wrap:i,Encoder:class extends e{constructor(e){super(),this.options=e||{},!1!==this.options.lineLength&&(this.options.lineLength=this.options.lineLength||76),this._curLine="",this.inputBytes=0,this.outputBytes=0}_transform(e,n,s){let a;if("buffer"!==n&&(e=Buffer.from(e,n)),!e||!e.length)return s();this.inputBytes+=e.length,this.options.lineLength?(a=this._curLine+t(e),a=i(a,this.options.lineLength),a=a.replace(/(^|\n)([^\n]*)$/,((e,t,i)=>(this._curLine=i,t))),a&&(this.outputBytes+=a.length,this.push(a))):(a=t(e),this.outputBytes+=a.length,this.push(a,"ascii")),s()}_flush(e){this._curLine&&(this.outputBytes+=this._curLine.length,this.push(this._curLine,"ascii")),e()}}}}function RP(){if(cP)return rP;cP=1;const e=PP(),t=_P(),i=kP();return rP={isPlainText:(e,t)=>"string"==typeof e&&!(t?/[\x00-\x08\x0b\x0c\x0e-\x1f"\u0080-\uFFFF]/:/[\x00-\x08\x0b\x0c\x0e-\x1f\u0080-\uFFFF]/).test(e),hasLongerLines:(e,t)=>e.length>131072||new RegExp("^.{"+(t+1)+",}","m").test(e),encodeWord(i,n,s){let a;if((s=s||0)&&s>12&&(s-=12),"Q"===(n=(n||"Q").toString().toUpperCase().trim().charAt(0))?a=t.encode(i).replace(/[^a-z0-9!*+\-/=]/gi,(e=>{let t=e.charCodeAt(0).toString(16).toUpperCase();return" "===e?"_":"="+(1===t.length?"0"+t:t)})):"B"===n&&(a="string"==typeof i?i:e.encode(i),s=s?Math.max(3,(s-s%4)/4*3):0),s&&("B"!==n?a:e.encode(i)).length>s)if("Q"===n)a=this.splitMimeEncodedString(a,s).join("?= =?UTF-8?"+n+"?");else{let t=[],i="";for(let n=0,o=a.length;n<o;n++){let r=a.charAt(n);/[\ud83c\ud83d\ud83e]/.test(r)&&n<o-1&&(r+=a.charAt(++n)),Buffer.byteLength(i+r)<=s||0===n?i+=r:(t.push(e.encode(i)),i=r)}i&&t.push(e.encode(i)),a=t.length>1?t.join("?= =?UTF-8?"+n+"?"):t.join("")}else"B"===n&&(a=e.encode(i));return"=?UTF-8?"+n+"?"+a+("?="===a.substr(-2)?"":"?=")},encodeWords(e,t,i,n){let s;i=i||0;let a=e.match(/(?:^|\s)([^\s]*["\u0080-\uFFFF])/);if(!a)return e;if(n)return this.encodeWord(e,t,i);let o=e.match(/(["\u0080-\uFFFF][^\s]*)[^"\u0080-\uFFFF]*$/);if(!o)return e;let r=a.index+(a[0].match(/[^\s]/)||{index:0}).index,c=o.index+(o[1]||"").length;return s=(r?e.substr(0,r):"")+this.encodeWord(e.substring(r,c),t||"Q",i)+(c<e.length?e.substr(c):""),s},buildHeaderValue(e){let t=[];return Object.keys(e.params||{}).forEach((i=>{let n=e.params[i];!this.isPlainText(n,!0)||n.length>=75?this.buildHeaderParam(i,n,50).forEach((e=>{/[\s"\\;:/=(),<>@[\]?]|^[-']|'$/.test(e.value)&&"*"!==e.key.substr(-1)?t.push(e.key+"="+JSON.stringify(e.value)):t.push(e.key+"="+e.value)})):/[\s'"\\;:/=(),<>@[\]?]|^-/.test(n)?t.push(i+"="+JSON.stringify(n)):t.push(i+"="+n)})),e.value+(t.length?"; "+t.join("; "):"")},buildHeaderParam(e,t,i){let n,s,a,o,r,c,l=[],p="string"==typeof t?t:(t||"").toString(),d=0;if(i=i||50,this.isPlainText(t,!0)){if(p.length<=i)return[{key:e,value:p}];p=p.replace(new RegExp(".{"+i+"}","g"),(e=>(l.push({line:e}),""))),p&&l.push({line:p})}else{if(/[\uD800-\uDBFF]/.test(p)){for(n=[],r=0,c=p.length;r<c;r++)s=p.charAt(r),a=s.charCodeAt(0),a>=55296&&a<=56319&&r<c-1?(s+=p.charAt(r+1),n.push(s),r++):n.push(s);p=n}o="utf-8''";let e=!0;for(d=0,r=0,c=p.length;r<c;r++){if(s=p[r],e)s=this.safeEncodeURIComponent(s);else if(s=" "===s?s:this.safeEncodeURIComponent(s),s!==p[r]){if(!((this.safeEncodeURIComponent(o)+s).length>=i)){e=!0,r=d,o="";continue}l.push({line:o,encoded:e}),o="",d=r-1}(o+s).length>=i?(l.push({line:o,encoded:e}),o=s=" "===p[r]?" ":this.safeEncodeURIComponent(p[r]),s===p[r]?(e=!1,d=r-1):e=!0):o+=s}o&&l.push({line:o,encoded:e})}return l.map(((t,i)=>({key:e+"*"+i+(t.encoded?"*":""),value:t.line})))},parseHeaderValue(e){let t,i={value:!1,params:{}},n=!1,s="",a="value",o=!1,r=!1;for(let c=0,l=e.length;c<l;c++)if(t=e.charAt(c),"key"===a){if("="===t){n=s.trim().toLowerCase(),a="value",s="";continue}s+=t}else{if(r)s+=t;else{if("\\"===t){r=!0;continue}o&&t===o?o=!1:o||'"'!==t?o||";"!==t?s+=t:(!1===n?i.value=s.trim():i.params[n]=s.trim(),a="key",s=""):o=t}r=!1}return"value"===a?!1===n?i.value=s.trim():i.params[n]=s.trim():s.trim()&&(i.params[s.trim().toLowerCase()]=""),Object.keys(i.params).forEach((e=>{let t,n,s,a;(s=e.match(/(\*(\d+)|\*(\d+)\*|\*)$/))&&(t=e.substr(0,s.index),n=Number(s[2]||s[3])||0,i.params[t]&&"object"==typeof i.params[t]||(i.params[t]={charset:!1,values:[]}),a=i.params[e],0===n&&"*"===s[0].substr(-1)&&(s=a.match(/^([^']*)'[^']*'(.*)$/))&&(i.params[t].charset=s[1]||"iso-8859-1",a=s[2]),i.params[t].values[n]=a,delete i.params[e])})),Object.keys(i.params).forEach((e=>{let t;i.params[e]&&Array.isArray(i.params[e].values)&&(t=i.params[e].values.map((e=>e||"")).join(""),i.params[e].charset?i.params[e]="=?"+i.params[e].charset+"?Q?"+t.replace(/[=?_\s]/g,(e=>{let t=e.charCodeAt(0).toString(16);return" "===e?"_":"%"+(t.length<2?"0":"")+t})).replace(/%/g,"=")+"?=":i.params[e]=t)})),i},detectExtension:e=>i.detectExtension(e),detectMimeType:e=>i.detectMimeType(e),foldLines(e,t,i){t=t||76;let n,s,a=0,o=(e=(e||"").toString()).length,r="";for(;a<o;){if(n=e.substr(a,t),n.length<t){r+=n;break}(s=n.match(/^[^\n\r]*(\r?\n|\r)/))?(n=s[0],r+=n,a+=n.length):((s=n.match(/(\s+)[^\s]*$/))&&s[0].length-(i?(s[1]||"").length:0)<n.length?n=n.substr(0,n.length-(s[0].length-(i?(s[1]||"").length:0))):(s=e.substr(a+n.length).match(/^[^\s]+(\s*)/))&&(n+=s[0].substr(0,s[0].length-(i?0:(s[1]||"").length))),r+=n,a+=n.length,a<o&&(r+="\r\n"))}return r},splitMimeEncodedString:(e,t)=>{let i,n,s,a,o=[];for(t=Math.max(t||0,12);e.length;){for(i=e.substr(0,t),(n=i.match(/[=][0-9A-F]?$/i))&&(i=i.substr(0,n.index)),a=!1;!a;)a=!0,(n=e.substr(i.length).match(/^[=]([0-9A-F]{2})/i))&&(s=parseInt(n[1],16),s<194&&s>127&&(i=i.substr(0,i.length-3),a=!1));i.length&&o.push(i),e=e.substr(i.length)}return o},encodeURICharComponent:e=>{let t="",i=e.charCodeAt(0).toString(16).toUpperCase();if(i.length%2&&(i="0"+i),i.length>2)for(let e=0,n=i.length/2;e<n;e++)t+="%"+i.substr(e,2);else t+="%"+i;return t},safeEncodeURIComponent(e){e=(e||"").toString();try{e=encodeURIComponent(e)}catch(t){return e.replace(/[^\x00-\x1F *'()<>@,;:\\"[\]?=\u007F-\uFFFF]+/g,"")}return e.replace(/[\x00-\x1F *'()<>@,;:\\"[\]?=\u007F-\uFFFF]/g,(e=>this.encodeURICharComponent(e)))}},rP}function $P(){if(pP)return lP;pP=1;class e{constructor(e){this.str=(e||"").toString(),this.operatorCurrent="",this.operatorExpecting="",this.node=null,this.escaped=!1,this.list=[],this.operators={'"':'"',"(":")","<":">",",":"",":":";",";":""}}tokenize(){let e=[];for(let e=0,t=this.str.length;e<t;e++){let i=this.str.charAt(e),n=e<t-1?this.str.charAt(e+1):null;this.checkChar(i,n)}return this.list.forEach((t=>{t.value=(t.value||"").toString().trim(),t.value&&e.push(t)})),e}checkChar(e,t){if(this.escaped);else{if(e===this.operatorExpecting)return this.node={type:"operator",value:e},t&&![" ","\t","\r","\n",",",";"].includes(t)&&(this.node.noBreak=!0),this.list.push(this.node),this.node=null,this.operatorExpecting="",void(this.escaped=!1);if(!this.operatorExpecting&&e in this.operators)return this.node={type:"operator",value:e},this.list.push(this.node),this.node=null,this.operatorExpecting=this.operators[e],void(this.escaped=!1);if(['"',"'"].includes(this.operatorExpecting)&&"\\"===e)return void(this.escaped=!0)}this.node||(this.node={type:"text",value:""},this.list.push(this.node)),"\n"===e&&(e=" "),(e.charCodeAt(0)>=33||[" ","\t"].includes(e))&&(this.node.value+=e),this.escaped=!1}}function t(i,n){n=n||{};let s=new e(i).tokenize(),a=[],o=[],r=[];if(s.forEach((e=>{"operator"!==e.type||","!==e.value&&";"!==e.value?o.push(e):(o.length&&a.push(o),o=[])})),o.length&&a.push(o),a.forEach((e=>{e=function(e){let i,n,s,a=!1,o="text",r=[],c={address:[],comment:[],group:[],text:[]};for(n=0,s=e.length;n<s;n++){let t=e[n],i=n?e[n-1]:null;if("operator"===t.type)switch(t.value){case"<":o="address";break;case"(":o="comment";break;case":":o="group",a=!0;break;default:o="text"}else t.value&&("address"===o&&(t.value=t.value.replace(/^[^<]*<\s*/,"")),i&&i.noBreak&&c[o].length?c[o][c[o].length-1]+=t.value:c[o].push(t.value))}if(!c.text.length&&c.comment.length&&(c.text=c.comment,c.comment=[]),a)c.text=c.text.join(" "),r.push({name:c.text||i&&i.name,group:c.group.length?t(c.group.join(",")):[]});else{if(!c.address.length&&c.text.length){for(n=c.text.length-1;n>=0;n--)if(c.text[n].match(/^[^@\s]+@[^@\s]+$/)){c.address=c.text.splice(n,1);break}let e=function(e){return c.address.length?e:(c.address=[e.trim()]," ")};if(!c.address.length)for(n=c.text.length-1;n>=0&&(c.text[n]=c.text[n].replace(/\s*\b[^@\s]+@[^\s]+\b\s*/,e).trim(),!c.address.length);n--);}if(!c.text.length&&c.comment.length&&(c.text=c.comment,c.comment=[]),c.address.length>1&&(c.text=c.text.concat(c.address.splice(1))),c.text=c.text.join(" "),c.address=c.address.join(" "),!c.address&&a)return[];i={address:c.address||c.text||"",name:c.text||c.address||""},i.address===i.name&&((i.address||"").match(/@/)?i.name="":i.address=""),r.push(i)}return r}(e),e.length&&(r=r.concat(e))})),n.flatten){let e=[],t=i=>{i.forEach((i=>{if(i.group)return t(i.group);e.push(i)}))};return t(r),e}return r}return lP=t}function MP(){if(hP)return mP;hP=1;const e=c.Transform;return mP=class extends e{constructor(e){super(e),this.options=e||{},this.lastByte=!1}_transform(e,t,i){let n,s=0;for(let t=0,i=e.length;t<i;t++)10===e[t]&&(t&&13!==e[t-1]||!t&&13!==this.lastByte)&&(t>s&&(n=e.slice(s,t),this.push(n)),this.push(Buffer.from("\r\n")),s=t+1);s&&s<e.length?(n=e.slice(s),this.push(n)):s||this.push(e),this.lastByte=e[e.length-1],i()}},mP}function NP(){if(xP)return yP;xP=1;const e=m,t=s,i=OP(),n=c.PassThrough,a=TP(),o=RP(),r=_P(),l=PP(),p=$P(),d=IP(),u=function(){if(uP)return dP;uP=1;const e=c.Transform;return dP=class extends e{constructor(){super(),this.lastByte=!1}_transform(e,t,i){e.length&&(this.lastByte=e[e.length-1]),this.push(e),i()}_flush(e){return 10===this.lastByte?e():13===this.lastByte?(this.push(Buffer.from("\n")),e()):(this.push(Buffer.from("\r\n")),e())}}}(),h=MP(),f=function(){if(gP)return fP;gP=1;const e=c.Transform;return fP=class extends e{constructor(e){super(e),this.options=e||{}}_transform(e,t,i){let n,s=0;for(let t=0,i=e.length;t<i;t++)13===e[t]&&(n=e.slice(s,t),s=t+1,this.push(n));s&&s<e.length?(n=e.slice(s),this.push(n)):s||this.push(e),i()}},fP}();class g{constructor(t,i){this.nodeCounter=0,i=i||{},this.baseBoundary=i.baseBoundary||e.randomBytes(8).toString("hex"),this.boundaryPrefix=i.boundaryPrefix||"--_NmP",this.disableFileAccess=!!i.disableFileAccess,this.disableUrlAccess=!!i.disableUrlAccess,this.normalizeHeaderKey=i.normalizeHeaderKey,this.date=new Date,this.rootNode=i.rootNode||this,this.keepBcc=!!i.keepBcc,i.filename&&(this.filename=i.filename,t||(t=o.detectMimeType(this.filename.split(".").pop()))),this.textEncoding=(i.textEncoding||"").toString().trim().charAt(0).toUpperCase(),this.parentNode=i.parentNode,this.hostname=i.hostname,this.newline=i.newline,this.childNodes=[],this._nodeId=++this.rootNode.nodeCounter,this._headers=[],this._isPlainText=!1,this._hasLongLines=!1,this._envelope=!1,this._raw=!1,this._transforms=[],this._processFuncs=[],t&&this.setHeader("Content-Type",t)}createChild(e,t){t||"object"!=typeof e||(t=e,e=void 0);let i=new g(e,t);return this.appendChild(i),i}appendChild(e){return e.rootNode!==this.rootNode&&(e.rootNode=this.rootNode,e._nodeId=++this.rootNode.nodeCounter),e.parentNode=this,this.childNodes.push(e),e}replace(e){return e===this?this:(this.parentNode.childNodes.forEach(((t,i)=>{t===this&&(e.rootNode=this.rootNode,e.parentNode=this.parentNode,e._nodeId=this._nodeId,this.rootNode=this,this.parentNode=void 0,e.parentNode.childNodes[i]=e)})),e)}remove(){if(!this.parentNode)return this;for(let e=this.parentNode.childNodes.length-1;e>=0;e--)if(this.parentNode.childNodes[e]===this)return this.parentNode.childNodes.splice(e,1),this.parentNode=void 0,this.rootNode=this,this}setHeader(e,t){let i,n=!1;if(!t&&e&&"object"==typeof e)return e.key&&"value"in e?this.setHeader(e.key,e.value):Array.isArray(e)?e.forEach((e=>{this.setHeader(e.key,e.value)})):Object.keys(e).forEach((t=>{this.setHeader(t,e[t])})),this;i={key:e=this._normalizeHeaderKey(e),value:t};for(let t=0,s=this._headers.length;t<s;t++)this._headers[t].key===e&&(n?(this._headers.splice(t,1),t--,s--):(this._headers[t]=i,n=!0));return n||this._headers.push(i),this}addHeader(e,t){return!t&&e&&"object"==typeof e?(e.key&&e.value?this.addHeader(e.key,e.value):Array.isArray(e)?e.forEach((e=>{this.addHeader(e.key,e.value)})):Object.keys(e).forEach((t=>{this.addHeader(t,e[t])})),this):Array.isArray(t)?(t.forEach((t=>{this.addHeader(e,t)})),this):(this._headers.push({key:this._normalizeHeaderKey(e),value:t}),this)}getHeader(e){e=this._normalizeHeaderKey(e);for(let t=0,i=this._headers.length;t<i;t++)if(this._headers[t].key===e)return this._headers[t].value}setContent(e){return this.content=e,"function"==typeof this.content.pipe?(this._contentErrorHandler=e=>{this.content.removeListener("error",this._contentErrorHandler),this.content=e},this.content.once("error",this._contentErrorHandler)):"string"==typeof this.content&&(this._isPlainText=o.isPlainText(this.content),this._isPlainText&&o.hasLongerLines(this.content,76)&&(this._hasLongLines=!0)),this}build(e){let t;e||(t=new Promise(((t,i)=>{e=a.callbackPromise(t,i)})));let i=this.createReadStream(),n=[],s=0,o=!1;return i.on("readable",(()=>{let e;for(;null!==(e=i.read());)n.push(e),s+=e.length})),i.once("error",(t=>{if(!o)return o=!0,e(t)})),i.once("end",(t=>{if(!o)return o=!0,t&&t.length&&(n.push(t),s+=t.length),e(null,Buffer.concat(n,s))})),t}getTransferEncoding(){let e=!1,t=(this.getHeader("Content-Type")||"").toString().toLowerCase().trim();return this.content&&(e=(this.getHeader("Content-Transfer-Encoding")||"").toString().toLowerCase().trim(),e&&["base64","quoted-printable"].includes(e)||(/^text\//i.test(t)?e=this._isPlainText&&!this._hasLongLines?"7bit":"string"==typeof this.content||this.content instanceof Buffer?"Q"===this._getTextEncoding(this.content)?"quoted-printable":"base64":"B"===this.textEncoding?"base64":"quoted-printable":/^(multipart|message)\//i.test(t)||(e=e||"base64"))),e}buildHeaders(){let e=this.getTransferEncoding(),t=[];if(e&&this.setHeader("Content-Transfer-Encoding",e),this.filename&&!this.getHeader("Content-Disposition")&&this.setHeader("Content-Disposition","attachment"),this.rootNode===this){this.getHeader("Date")||this.setHeader("Date",this.date.toUTCString().replace(/GMT/,"+0000")),this.messageId(),this.getHeader("MIME-Version")||this.setHeader("MIME-Version","1.0");for(let e=this._headers.length-2;e>=0;e--){let t=this._headers[e];"Content-Type"===t.key&&(this._headers.splice(e,1),this._headers.push(t))}}return this._headers.forEach((e=>{let i,n,s=e.key,a=e.value,r={};if(!a||"object"!=typeof a||["From","Sender","To","Cc","Bcc","Reply-To","Date","References"].includes(s)||(Object.keys(a).forEach((e=>{"value"!==e&&(r[e]=a[e])})),a=(a.value||"").toString(),a.trim()))if(r.prepared)r.foldLines?t.push(o.foldLines(s+": "+a)):t.push(s+": "+a);else{switch(e.key){case"Content-Disposition":i=o.parseHeaderValue(a),this.filename&&(i.params.filename=this.filename),a=o.buildHeaderValue(i);break;case"Content-Type":i=o.parseHeaderValue(a),this._handleContentType(i),i.value.match(/^text\/plain\b/)&&"string"==typeof this.content&&/[\u0080-\uFFFF]/.test(this.content)&&(i.params.charset="utf-8"),a=o.buildHeaderValue(i),this.filename&&(n=this._encodeWords(this.filename),(n!==this.filename||/[\s'"\\;:/=(),<>@[\]?]|^-/.test(n))&&(n='"'+n+'"'),a+="; name="+n);break;case"Bcc":if(!this.keepBcc)return}if(a=this._encodeHeaderValue(s,a),(a||"").toString().trim()){if("function"==typeof this.normalizeHeaderKey){let e=this.normalizeHeaderKey(s,a);e&&"string"==typeof e&&e.length&&(s=e)}t.push(o.foldLines(s+": "+a,76))}}})),t.join("\r\n")}createReadStream(e){let t,i=new n(e=e||{}),s=i;this.stream(i,e,(e=>{e?s.emit("error",e):i.end()}));for(let e=0,i=this._transforms.length;e<i;e++)t="function"==typeof this._transforms[e]?this._transforms[e]():this._transforms[e],s.once("error",(e=>{t.emit("error",e)})),s=s.pipe(t);t=new u,s.once("error",(e=>{t.emit("error",e)})),s=s.pipe(t);for(let e=0,i=this._processFuncs.length;e<i;e++)t=this._processFuncs[e],s=t(s);if(this.newline){const e=["win","windows","dos","\r\n"].includes(this.newline.toString().toLowerCase())?new h:new f,t=s.pipe(e);return s.on("error",(e=>t.emit("error",e))),t}return s}transform(e){this._transforms.push(e)}processFunc(e){this._processFuncs.push(e)}stream(e,t,i){let n,s,a=this.getTransferEncoding(),o=!1,c=e=>{o||(o=!0,i(e))},p=()=>{let i=0,n=()=>{if(i>=this.childNodes.length)return e.write("\r\n--"+this.boundary+"--\r\n"),c();let s=this.childNodes[i++];e.write((i>1?"\r\n":"")+"--"+this.boundary+"\r\n"),s.stream(e,t,(e=>{if(e)return c(e);setImmediate(n)}))};if(!this.multipart)return c();setImmediate(n)},d=()=>{if(!this.content)return setImmediate(p);{if("[object Error]"===Object.prototype.toString.call(this.content))return c(this.content);"function"==typeof this.content.pipe&&(this.content.removeListener("error",this._contentErrorHandler),this._contentErrorHandler=e=>c(e),this.content.once("error",this._contentErrorHandler));let i=()=>{["quoted-printable","base64"].includes(a)?(n=new("base64"===a?l:r).Encoder(t),n.pipe(e,{end:!1}),n.once("end",p),n.once("error",(e=>c(e))),s=this._getStream(this.content),s.pipe(n)):(s=this._getStream(this.content),s.pipe(e,{end:!1}),s.once("end",p)),s.once("error",(e=>c(e)))};if(this.content._resolve){let e=[],t=0,n=!1,s=this._getStream(this.content);s.on("error",(e=>{n||(n=!0,c(e))})),s.on("readable",(()=>{let i;for(;null!==(i=s.read());)e.push(i),t+=i.length})),s.on("end",(()=>{n||(n=!0,this.content._resolve=!1,this.content._resolvedValue=Buffer.concat(e,t),setImmediate(i))}))}else setImmediate(i)}};this._raw?setImmediate((()=>{if("[object Error]"===Object.prototype.toString.call(this._raw))return c(this._raw);"function"==typeof this._raw.pipe&&this._raw.removeListener("error",this._contentErrorHandler);let t=this._getStream(this._raw);t.pipe(e,{end:!1}),t.on("error",(t=>e.emit("error",t))),t.on("end",p)})):(e.write(this.buildHeaders()+"\r\n\r\n"),setImmediate(d))}setEnvelope(e){let t;this._envelope={from:!1,to:[]},e.from&&(t=[],this._convertAddresses(this._parseAddresses(e.from),t),t=t.filter((e=>e&&e.address)),t.length&&t[0]&&(this._envelope.from=t[0].address)),["to","cc","bcc"].forEach((t=>{e[t]&&this._convertAddresses(this._parseAddresses(e[t]),this._envelope.to)})),this._envelope.to=this._envelope.to.map((e=>e.address)).filter((e=>e));let i=["to","cc","bcc","from"];return Object.keys(e).forEach((t=>{i.includes(t)||(this._envelope[t]=e[t])})),this}getAddresses(){let e={};return this._headers.forEach((t=>{let i=t.key.toLowerCase();["from","sender","reply-to","to","cc","bcc"].includes(i)&&(Array.isArray(e[i])||(e[i]=[]),this._convertAddresses(this._parseAddresses(t.value),e[i]))})),e}getEnvelope(){if(this._envelope)return this._envelope;let e={from:!1,to:[]};return this._headers.forEach((t=>{let i=[];"From"===t.key||!e.from&&["Reply-To","Sender"].includes(t.key)?(this._convertAddresses(this._parseAddresses(t.value),i),i.length&&i[0]&&(e.from=i[0].address)):["To","Cc","Bcc"].includes(t.key)&&this._convertAddresses(this._parseAddresses(t.value),e.to)})),e.to=e.to.map((e=>e.address)),e}messageId(){let e=this.getHeader("Message-ID");return e||(e=this._generateMessageId(),this.setHeader("Message-ID",e)),e}setRaw(e){return this._raw=e,this._raw&&"function"==typeof this._raw.pipe&&(this._contentErrorHandler=e=>{this._raw.removeListener("error",this._contentErrorHandler),this._raw=e},this._raw.once("error",this._contentErrorHandler)),this}_getStream(e){let i;return e._resolvedValue?(i=new n,setImmediate((()=>{try{i.end(e._resolvedValue)}catch(e){i.emit("error",e)}})),i):"function"==typeof e.pipe?e:e&&"string"==typeof e.path&&!e.href?this.disableFileAccess?(i=new n,setImmediate((()=>i.emit("error",new Error("File access rejected for "+e.path)))),i):t.createReadStream(e.path):e&&"string"==typeof e.href?this.disableUrlAccess?(i=new n,setImmediate((()=>i.emit("error",new Error("Url access rejected for "+e.href)))),i):d(e.href,{headers:e.httpHeaders}):(i=new n,setImmediate((()=>{try{i.end(e||"")}catch(e){i.emit("error",e)}})),i)}_parseAddresses(e){return[].concat.apply([],[].concat(e).map((e=>e&&e.address?(e.address=this._normalizeAddress(e.address),e.name=e.name||"",[e]):p(e))))}_normalizeHeaderKey(e){return e=(e||"").toString().replace(/\r?\n|\r/g," ").trim().toLowerCase().replace(/^X-SMTPAPI$|^(MIME|DKIM|ARC|BIMI)\b|^[a-z]|-(SPF|FBL|ID|MD5)$|-[a-z]/gi,(e=>e.toUpperCase())).replace(/^Content-Features$/i,"Content-features"),e}_handleContentType(e){this.contentType=e.value.trim().toLowerCase(),this.multipart=!!/^multipart\//i.test(this.contentType)&&this.contentType.substr(this.contentType.indexOf("/")+1),this.multipart?this.boundary=e.params.boundary=e.params.boundary||this.boundary||this._generateBoundary():this.boundary=!1}_generateBoundary(){return this.rootNode.boundaryPrefix+"-"+this.rootNode.baseBoundary+"-Part_"+this._nodeId}_encodeHeaderValue(e,t){switch(e=this._normalizeHeaderKey(e)){case"From":case"Sender":case"To":case"Cc":case"Bcc":case"Reply-To":return this._convertAddresses(this._parseAddresses(t));case"Message-ID":case"In-Reply-To":case"Content-Id":return"<"!==(t=(t||"").toString().replace(/\r?\n|\r/g," ")).charAt(0)&&(t="<"+t),">"!==t.charAt(t.length-1)&&(t+=">"),t;case"References":return(t=[].concat.apply([],[].concat(t||"").map((e=>(e=(e||"").toString().replace(/\r?\n|\r/g," ").trim()).replace(/<[^>]*>/g,(e=>e.replace(/\s/g,""))).split(/\s+/)))).map((e=>("<"!==e.charAt(0)&&(e="<"+e),">"!==e.charAt(e.length-1)&&(e+=">"),e)))).join(" ").trim();case"Date":return"[object Date]"===Object.prototype.toString.call(t)?t.toUTCString().replace(/GMT/,"+0000"):(t=(t||"").toString().replace(/\r?\n|\r/g," "),this._encodeWords(t));case"Content-Type":case"Content-Disposition":return(t||"").toString().replace(/\r?\n|\r/g," ");default:return t=(t||"").toString().replace(/\r?\n|\r/g," "),this._encodeWords(t)}}_convertAddresses(e,t){let i=[];return t=t||[],[].concat(e||[]).forEach((e=>{if(e.address)e.address=this._normalizeAddress(e.address),e.name?e.name&&i.push(`${this._encodeAddressName(e.name)} <${e.address}>`):i.push(e.address.indexOf(" ")>=0?`<${e.address}>`:`${e.address}`),e.address&&(t.filter((t=>t.address===e.address)).length||t.push(e));else if(e.group){let n=(e.group.length?this._convertAddresses(e.group,t):"").trim();i.push(`${this._encodeAddressName(e.name)}:${n};`)}})),i.join(", ")}_normalizeAddress(e){let t=(e=(e||"").toString().replace(/[\x00-\x1F<>]+/g," ").trim()).lastIndexOf("@");if(t<0)return e;let n,s=e.substr(0,t),a=e.substr(t+1);try{n=i.toASCII(a.toLowerCase())}catch(e){}return s.indexOf(" ")>=0&&('"'!==s.charAt(0)&&(s='"'+s),'"'!==s.substr(-1)&&(s+='"')),`${s}@${n}`}_encodeAddressName(e){return/^[\w ]*$/.test(e)?e:/^[\x20-\x7e]*$/.test(e)?'"'+e.replace(/([\\"])/g,"\\$1")+'"':o.encodeWord(e,this._getTextEncoding(e),52)}_encodeWords(e){return o.encodeWords(e,this._getTextEncoding(e),52,!0)}_getTextEncoding(e){e=(e||"").toString();let t,i,n=this.textEncoding;return n||(i=(e.match(/[\x00-\x08\x0B\x0C\x0E-\x1F\u0080-\uFFFF]/g)||[]).length,t=(e.match(/[a-z]/gi)||[]).length,n=i<t?"Q":"B"),n}_generateMessageId(){return"<"+[2,2,2,6].reduce(((t,i)=>t+"-"+e.randomBytes(i).toString("hex")),e.randomBytes(4).toString("hex"))+"@"+(this.getEnvelope().from||this.hostname||"localhost").split("@").pop()+">"}}return yP=g}var DP,jP,zP,LP,FP,UP,BP,HP,qP,VP,GP,WP,KP,QP,XP,JP,YP,ZP={exports:{}};function e_(){if(DP)return ZP.exports;DP=1;const e=OP(),t=RP(),i=m;function n(e,t,i){let n=new Set,a=new Set,o=new Map;(i||"").toLowerCase().split(":").forEach((e=>{a.add(e.trim())})),(t||"").toLowerCase().split(":").filter((e=>!a.has(e.trim()))).forEach((e=>{n.add(e.trim())}));for(let t=e.length-1;t>=0;t--){let i=e[t];n.has(i.key)&&!o.has(i.key)&&o.set(i.key,s(i.line))}let r=[],c=[];return n.forEach((e=>{o.has(e)&&(c.push(e),r.push(e+":"+o.get(e)))})),{headers:r.join("\r\n")+"\r\n",fieldNames:c.join(":")}}function s(e){return e.substr(e.indexOf(":")+1).replace(/\r?\n/g,"").replace(/\s+/g," ").trim()}return ZP.exports=(a,o,r,c)=>{let l,p,d=n(a,(c=c||{}).headerFieldNames||"From:Sender:Reply-To:Subject:Date:Message-ID:To:Cc:MIME-Version:Content-Type:Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive",c.skipFields),u=function(i,n,s,a,o){let r=["v=1","a=rsa-"+a,"c=relaxed/relaxed","d="+e.toASCII(i),"q=dns/txt","s="+n,"bh="+o,"h="+s].join("; ");return t.foldLines("DKIM-Signature: "+r,76)+";\r\n b="}(c.domainName,c.keySelector,d.fieldNames,o,r);d.headers+="dkim-signature:"+s(u),l=i.createSign(("rsa-"+o).toUpperCase()),l.update(d.headers);try{p=l.sign(c.privateKey,"base64")}catch(e){return!1}return u+p.replace(/(^.{73}|.{75}(?!\r?\n|\r))/g,"$&\r\n ").trim()},ZP.exports.relaxedHeaders=n,ZP.exports}function t_(){if(zP)return jP;zP=1;const e=function(){if(EP)return bP;EP=1;const e=c.Transform;return bP=class extends e{constructor(e){super(e),this.lastBytes=Buffer.alloc(4),this.headersParsed=!1,this.headerBytes=0,this.headerChunks=[],this.rawHeaders=!1,this.bodySize=0}updateLastBytes(e){let t=this.lastBytes.length,i=Math.min(e.length,t);for(let e=0,n=t-i;e<n;e++)this.lastBytes[e]=this.lastBytes[e+i];for(let n=1;n<=i;n++)this.lastBytes[t-n]=e[e.length-n]}checkHeaders(e){if(this.headersParsed)return!0;let t=this.lastBytes.length,i=0;this.curLinePos=0;for(let n=0,s=this.lastBytes.length+e.length;n<s;n++){let s;if(s=n<t?this.lastBytes[n]:e[n-t],10===s&&n){let s=n-1<t?this.lastBytes[n-1]:e[n-1-t],a=n>1&&(n-2<t?this.lastBytes[n-2]:e[n-2-t]);if(10===s){this.headersParsed=!0,i=n-t+1,this.headerBytes+=i;break}if(13===s&&10===a){this.headersParsed=!0,i=n-t+1,this.headerBytes+=i;break}}}if(this.headersParsed){if(this.headerChunks.push(e.slice(0,i)),this.rawHeaders=Buffer.concat(this.headerChunks,this.headerBytes),this.headerChunks=null,this.emit("headers",this.parseHeaders()),e.length-1>i){let t=e.slice(i);this.bodySize+=t.length,setImmediate((()=>this.push(t)))}return!1}return this.headerBytes+=e.length,this.headerChunks.push(e),this.updateLastBytes(e),!1}_transform(e,t,i){if(!e||!e.length)return i();let n;"string"==typeof e&&(e=Buffer.from(e,t));try{n=this.checkHeaders(e)}catch(e){return i(e)}n&&(this.bodySize+=e.length,this.push(e)),setImmediate(i)}_flush(e){if(this.headerChunks){let e=Buffer.concat(this.headerChunks,this.headerBytes);this.bodySize+=e.length,this.push(e),this.headerChunks=null}e()}parseHeaders(){let e=(this.rawHeaders||"").toString().split(/\r?\n/);for(let t=e.length-1;t>0;t--)/^\s/.test(e[t])&&(e[t-1]+="\n"+e[t],e.splice(t,1));return e.filter((e=>e.trim())).map((e=>({key:e.substr(0,e.indexOf(":")).trim().toLowerCase(),line:e})))}},bP}(),t=function(){if(CP)return SP;CP=1;const e=c.Transform,t=m;return SP=class extends e{constructor(e){super(),e=e||{},this.chunkBuffer=[],this.chunkBufferLen=0,this.bodyHash=t.createHash(e.hashAlgo||"sha1"),this.remainder="",this.byteLength=0,this.debug=e.debug,this._debugBody=!!e.debug&&[]}updateHash(e){let t,i="",n="file";for(let t=e.length-1;t>=0;t--){let s=e[t];if("file"!==n||10!==s&&13!==s)if("file"!==n||9!==s&&32!==s){if(("line"!==n||9!==s&&32!==s)&&("file"===n||"line"===n)&&(n="body",t===e.length-1))break}else n="line";if(0===t){if("file"===n&&(!this.remainder||/[\r\n]$/.test(this.remainder))||"line"===n&&(!this.remainder||/[ \t]$/.test(this.remainder)))return void(this.remainder+=e.toString("binary"));if("line"===n||"file"===n){i=e.toString("binary"),e=!1;break}}if("body"===n){i=e.slice(t+1).toString("binary"),e=e.slice(0,t+1);break}}let s=!!this.remainder;if(e&&!s)for(let t=0,i=e.length;t<i;t++){if(t&&10===e[t]&&13!==e[t-1]){s=!0;break}if(t&&13===e[t]&&32===e[t-1]){s=!0;break}if(t&&32===e[t]&&32===e[t-1]){s=!0;break}if(9===e[t]){s=!0;break}}s?(t=this.remainder+(e?e.toString("binary"):""),this.remainder=i,t=t.replace(/\r?\n/g,"\n").replace(/[ \t]*$/gm,"").replace(/[ \t]+/gm," ").replace(/\n/g,"\r\n"),e=Buffer.from(t,"binary")):i&&(this.remainder=i),this.debug&&this._debugBody.push(e),this.bodyHash.update(e)}_transform(e,t,i){if(!e||!e.length)return i();"string"==typeof e&&(e=Buffer.from(e,t)),this.updateHash(e),this.byteLength+=e.length,this.push(e),i()}_flush(e){/[\r\n]$/.test(this.remainder)&&this.byteLength>2&&this.bodyHash.update(Buffer.from("\r\n")),this.byteLength||this.push(Buffer.from("\r\n")),this.emit("hash",this.bodyHash.digest("base64"),!!this.debug&&Buffer.concat(this._debugBody)),e()}},SP}(),i=e_(),n=c.PassThrough,a=s,o=u,r=m;class l{constructor(e,t,i,n){this.options=e||{},this.keys=t,this.cacheTreshold=Number(this.options.cacheTreshold)||131072,this.hashAlgo=this.options.hashAlgo||"sha256",this.cacheDir=this.options.cacheDir||!1,this.chunks=[],this.chunklen=0,this.readPos=0,this.cachePath=!!this.cacheDir&&o.join(this.cacheDir,"message."+Date.now()+"-"+r.randomBytes(14).toString("hex")),this.cache=!1,this.headers=!1,this.bodyHash=!1,this.parser=!1,this.relaxedBody=!1,this.input=i,this.output=n,this.output.usingCache=!1,this.hasErrored=!1,this.input.on("error",(e=>{this.hasErrored=!0,this.cleanup(),n.emit("error",e)}))}cleanup(){this.cache&&this.cachePath&&a.unlink(this.cachePath,(()=>!1))}createReadCache(){this.cache=a.createReadStream(this.cachePath),this.cache.once("error",(e=>{this.cleanup(),this.output.emit("error",e)})),this.cache.once("close",(()=>{this.cleanup()})),this.cache.pipe(this.output)}sendNextChunk(){if(this.hasErrored)return;if(this.readPos>=this.chunks.length)return this.cache?this.createReadCache():this.output.end();let e=this.chunks[this.readPos++];if(!1===this.output.write(e))return this.output.once("drain",(()=>{this.sendNextChunk()}));setImmediate((()=>this.sendNextChunk()))}sendSignedOutput(){let e=0,t=()=>{if(e>=this.keys.length)return this.output.write(this.parser.rawHeaders),setImmediate((()=>this.sendNextChunk()));let n=this.keys[e++],s=i(this.headers,this.hashAlgo,this.bodyHash,{domainName:n.domainName,keySelector:n.keySelector,privateKey:n.privateKey,headerFieldNames:this.options.headerFieldNames,skipFields:this.options.skipFields});return s&&this.output.write(Buffer.from(s+"\r\n")),setImmediate(t)};if(this.bodyHash&&this.headers)return t();this.output.write(this.parser.rawHeaders),this.sendNextChunk()}createWriteCache(){this.output.usingCache=!0,this.cache=a.createWriteStream(this.cachePath),this.cache.once("error",(e=>{this.cleanup(),this.relaxedBody.unpipe(this.cache),this.relaxedBody.on("readable",(()=>{for(;null!==this.relaxedBody.read(););})),this.hasErrored=!0,this.output.emit("error",e)})),this.cache.once("close",(()=>{this.sendSignedOutput()})),this.relaxedBody.removeAllListeners("readable"),this.relaxedBody.pipe(this.cache)}signStream(){this.parser=new e,this.relaxedBody=new t({hashAlgo:this.hashAlgo}),this.parser.on("headers",(e=>{this.headers=e})),this.relaxedBody.on("hash",(e=>{this.bodyHash=e})),this.relaxedBody.on("readable",(()=>{let e;if(!this.cache)for(;null!==(e=this.relaxedBody.read());)if(this.chunks.push(e),this.chunklen+=e.length,this.chunklen>=this.cacheTreshold&&this.cachePath)return this.createWriteCache()})),this.relaxedBody.on("end",(()=>{this.cache||this.sendSignedOutput()})),this.parser.pipe(this.relaxedBody),setImmediate((()=>this.input.pipe(this.parser)))}}return jP=class{constructor(e){this.options=e||{},this.keys=[].concat(this.options.keys||{domainName:e.domainName,keySelector:e.keySelector,privateKey:e.privateKey})}sign(e,t){let i=new n,s=e,a=!1;Buffer.isBuffer(e)?(a=e,s=new n):"string"==typeof e&&(a=Buffer.from(e),s=new n);let o=this.options;t&&Object.keys(t).length&&(o={},Object.keys(this.options||{}).forEach((e=>{o[e]=this.options[e]})),Object.keys(t||{}).forEach((e=>{e in o||(o[e]=t[e])})));let r=new l(o,this.keys,s,i);return setImmediate((()=>{r.signStream(),a&&setImmediate((()=>{s.end(a)}))})),i}}}function i_(){if(qP)return HP;qP=1;const e=t,s=TP(),a=kP(),o=function(){if(wP)return vP;wP=1;const e=NP(),t=RP(),i=TP().parseDataURI;return vP=class{constructor(e){this.mail=e||{},this.message=!1}compile(){return this._alternatives=this.getAlternatives(),this._htmlNode=this._alternatives.filter((e=>/^text\/html\b/i.test(e.contentType))).pop(),this._attachments=this.getAttachments(!!this._htmlNode),this._useRelated=!(!this._htmlNode||!this._attachments.related.length),this._useAlternative=this._alternatives.length>1,this._useMixed=this._attachments.attached.length>1||this._alternatives.length&&1===this._attachments.attached.length,this.mail.raw?this.message=new e("message/rfc822",{newline:this.mail.newline}).setRaw(this.mail.raw):this._useMixed?this.message=this._createMixed():this._useAlternative?this.message=this._createAlternative():this._useRelated?this.message=this._createRelated():this.message=this._createContentNode(!1,[].concat(this._alternatives||[]).concat(this._attachments.attached||[]).shift()||{contentType:"text/plain",content:""}),this.mail.headers&&this.message.addHeader(this.mail.headers),["from","sender","to","cc","bcc","reply-to","in-reply-to","references","subject","message-id","date"].forEach((e=>{let t=e.replace(/-(\w)/g,((e,t)=>t.toUpperCase()));this.mail[t]&&this.message.setHeader(e,this.mail[t])})),this.mail.envelope&&this.message.setEnvelope(this.mail.envelope),this.message.messageId(),this.message}getAttachments(e){let i,n,s=[].concat(this.mail.attachments||[]).map(((e,i)=>{let n,s=/^message\//i.test(e.contentType);/^data:/i.test(e.path||e.href)&&(e=this._processDataUrl(e));let a=e.contentType||t.detectMimeType(e.filename||e.path||e.href||"bin"),o=/^image\//i.test(a);return n={contentType:a,contentDisposition:e.contentDisposition||(s||o&&e.cid?"inline":"attachment"),contentTransferEncoding:"contentTransferEncoding"in e?e.contentTransferEncoding:"base64"},e.filename?n.filename=e.filename:s||!1===e.filename||(n.filename=(e.path||e.href||"").split("/").pop().split("?").shift()||"attachment-"+(i+1),n.filename.indexOf(".")<0&&(n.filename+="."+t.detectExtension(n.contentType))),/^https?:\/\//i.test(e.path)&&(e.href=e.path,e.path=void 0),e.cid&&(n.cid=e.cid),e.raw?n.raw=e.raw:e.path?n.content={path:e.path}:e.href?n.content={href:e.href,httpHeaders:e.httpHeaders}:n.content=e.content||"",e.encoding&&(n.encoding=e.encoding),e.headers&&(n.headers=e.headers),n}));return this.mail.icalEvent&&(i="object"==typeof this.mail.icalEvent&&(this.mail.icalEvent.content||this.mail.icalEvent.path||this.mail.icalEvent.href||this.mail.icalEvent.raw)?this.mail.icalEvent:{content:this.mail.icalEvent},n={},Object.keys(i).forEach((e=>{n[e]=i[e]})),n.contentType="application/ics",n.headers||(n.headers={}),n.filename=n.filename||"invite.ics",n.headers["Content-Disposition"]="attachment",n.headers["Content-Transfer-Encoding"]="base64"),e?{attached:s.filter((e=>!e.cid)).concat(n||[]),related:s.filter((e=>!!e.cid))}:{attached:s.concat(n||[]),related:[]}}getAlternatives(){let e,i,n,s,a,o,r=[];return this.mail.text&&(e="object"==typeof this.mail.text&&(this.mail.text.content||this.mail.text.path||this.mail.text.href||this.mail.text.raw)?this.mail.text:{content:this.mail.text},e.contentType="text/plain; charset=utf-8"),this.mail.watchHtml&&(n="object"==typeof this.mail.watchHtml&&(this.mail.watchHtml.content||this.mail.watchHtml.path||this.mail.watchHtml.href||this.mail.watchHtml.raw)?this.mail.watchHtml:{content:this.mail.watchHtml},n.contentType="text/watch-html; charset=utf-8"),this.mail.amp&&(s="object"==typeof this.mail.amp&&(this.mail.amp.content||this.mail.amp.path||this.mail.amp.href||this.mail.amp.raw)?this.mail.amp:{content:this.mail.amp},s.contentType="text/x-amp-html; charset=utf-8"),this.mail.icalEvent&&(a="object"==typeof this.mail.icalEvent&&(this.mail.icalEvent.content||this.mail.icalEvent.path||this.mail.icalEvent.href||this.mail.icalEvent.raw)?this.mail.icalEvent:{content:this.mail.icalEvent},o={},Object.keys(a).forEach((e=>{o[e]=a[e]})),o.content&&"object"==typeof o.content&&(o.content._resolve=!0),o.filename=!1,o.contentType="text/calendar; charset=utf-8; method="+(o.method||"PUBLISH").toString().trim().toUpperCase(),o.headers||(o.headers={})),this.mail.html&&(i="object"==typeof this.mail.html&&(this.mail.html.content||this.mail.html.path||this.mail.html.href||this.mail.html.raw)?this.mail.html:{content:this.mail.html},i.contentType="text/html; charset=utf-8"),[].concat(e||[]).concat(n||[]).concat(s||[]).concat(i||[]).concat(o||[]).concat(this.mail.alternatives||[]).forEach((e=>{let i;/^data:/i.test(e.path||e.href)&&(e=this._processDataUrl(e)),i={contentType:e.contentType||t.detectMimeType(e.filename||e.path||e.href||"txt"),contentTransferEncoding:e.contentTransferEncoding},e.filename&&(i.filename=e.filename),/^https?:\/\//i.test(e.path)&&(e.href=e.path,e.path=void 0),e.raw?i.raw=e.raw:e.path?i.content={path:e.path}:e.href?i.content={href:e.href}:i.content=e.content||"",e.encoding&&(i.encoding=e.encoding),e.headers&&(i.headers=e.headers),r.push(i)})),r}_createMixed(t){let i;return i=t?t.createChild("multipart/mixed",{disableUrlAccess:this.mail.disableUrlAccess,disableFileAccess:this.mail.disableFileAccess,normalizeHeaderKey:this.mail.normalizeHeaderKey,newline:this.mail.newline}):new e("multipart/mixed",{baseBoundary:this.mail.baseBoundary,textEncoding:this.mail.textEncoding,boundaryPrefix:this.mail.boundaryPrefix,disableUrlAccess:this.mail.disableUrlAccess,disableFileAccess:this.mail.disableFileAccess,normalizeHeaderKey:this.mail.normalizeHeaderKey,newline:this.mail.newline}),this._useAlternative?this._createAlternative(i):this._useRelated&&this._createRelated(i),[].concat(!this._useAlternative&&this._alternatives||[]).concat(this._attachments.attached||[]).forEach((e=>{this._useRelated&&e===this._htmlNode||this._createContentNode(i,e)})),i}_createAlternative(t){let i;return i=t?t.createChild("multipart/alternative",{disableUrlAccess:this.mail.disableUrlAccess,disableFileAccess:this.mail.disableFileAccess,normalizeHeaderKey:this.mail.normalizeHeaderKey,newline:this.mail.newline}):new e("multipart/alternative",{baseBoundary:this.mail.baseBoundary,textEncoding:this.mail.textEncoding,boundaryPrefix:this.mail.boundaryPrefix,disableUrlAccess:this.mail.disableUrlAccess,disableFileAccess:this.mail.disableFileAccess,normalizeHeaderKey:this.mail.normalizeHeaderKey,newline:this.mail.newline}),this._alternatives.forEach((e=>{this._useRelated&&this._htmlNode===e?this._createRelated(i):this._createContentNode(i,e)})),i}_createRelated(t){let i;return i=t?t.createChild('multipart/related; type="text/html"',{disableUrlAccess:this.mail.disableUrlAccess,disableFileAccess:this.mail.disableFileAccess,normalizeHeaderKey:this.mail.normalizeHeaderKey,newline:this.mail.newline}):new e('multipart/related; type="text/html"',{baseBoundary:this.mail.baseBoundary,textEncoding:this.mail.textEncoding,boundaryPrefix:this.mail.boundaryPrefix,disableUrlAccess:this.mail.disableUrlAccess,disableFileAccess:this.mail.disableFileAccess,normalizeHeaderKey:this.mail.normalizeHeaderKey,newline:this.mail.newline}),this._createContentNode(i,this._htmlNode),this._attachments.related.forEach((e=>this._createContentNode(i,e))),i}_createContentNode(t,i){let n;(i=i||{}).content=i.content||"";let s=(i.encoding||"utf8").toString().toLowerCase().replace(/[-_\s]/g,"");return n=t?t.createChild(i.contentType,{filename:i.filename,textEncoding:this.mail.textEncoding,disableUrlAccess:this.mail.disableUrlAccess,disableFileAccess:this.mail.disableFileAccess,normalizeHeaderKey:this.mail.normalizeHeaderKey,newline:this.mail.newline}):new e(i.contentType,{filename:i.filename,baseBoundary:this.mail.baseBoundary,textEncoding:this.mail.textEncoding,boundaryPrefix:this.mail.boundaryPrefix,disableUrlAccess:this.mail.disableUrlAccess,disableFileAccess:this.mail.disableFileAccess,normalizeHeaderKey:this.mail.normalizeHeaderKey,newline:this.mail.newline}),i.headers&&n.addHeader(i.headers),i.cid&&n.setHeader("Content-Id","<"+i.cid.replace(/[<>]/g,"")+">"),i.contentTransferEncoding?n.setHeader("Content-Transfer-Encoding",i.contentTransferEncoding):this.mail.encoding&&/^text\//i.test(i.contentType)&&n.setHeader("Content-Transfer-Encoding",this.mail.encoding),/^text\//i.test(i.contentType)&&!i.contentDisposition||n.setHeader("Content-Disposition",i.contentDisposition||(i.cid&&/^image\//i.test(i.contentType)?"inline":"attachment")),"string"!=typeof i.content||["utf8","usascii","ascii"].includes(s)||(i.content=Buffer.from(i.content,s)),i.raw?n.setRaw(i.raw):n.setContent(i.content),n}_processDataUrl(e){let t;return(e.path||e.href).match(/^data:/)&&(t=i(e.path||e.href)),t?(e.content=t.data,e.contentType=e.contentType||t.contentType,"path"in e&&(e.path=!1),"href"in e&&(e.href=!1),e):e}},vP}(),r=t_(),c=function(){if(FP)return LP;FP=1;const e=l,t=h,n=i;return LP=function i(s,a,o,r){let c,l,p,d=n.parse(s);c={host:d.hostname,port:Number(d.port)?Number(d.port):"https:"===d.protocol?443:80},"https:"===d.protocol?(c.rejectUnauthorized=!1,l=t.connect.bind(t)):l=e.connect.bind(e);let u=!1,m=e=>{if(!u){u=!0;try{p.destroy()}catch(e){}r(e)}},h=()=>{let e=new Error("Proxy socket timed out");e.code="ETIMEDOUT",m(e)};p=l(c,(()=>{if(u)return;let e={Host:o+":"+a,Connection:"close"};d.auth&&(e["Proxy-Authorization"]="Basic "+Buffer.from(d.auth).toString("base64")),p.write("CONNECT "+o+":"+a+" HTTP/1.1\r\n"+Object.keys(e).map((t=>t+": "+e[t])).join("\r\n")+"\r\n\r\n");let t="",i=e=>{let n,s;if(!u&&(t+=e.toString("binary"),n=t.match(/\r\n\r\n/))){if(p.removeListener("data",i),s=t.substr(n.index+n[0].length),t=t.substr(0,n.index),s&&p.unshift(Buffer.from(s,"binary")),u=!0,n=t.match(/^HTTP\/\d+\.\d+ (\d+)/i),!n||"2"!==(n[1]||"").charAt(0)){try{p.destroy()}catch(e){}return r(new Error("Invalid response from proxy"+(n&&": "+n[1]||"")))}return p.removeListener("error",m),p.removeListener("timeout",h),p.setTimeout(0),r(null,p)}};p.on("data",i)})),p.setTimeout(i.timeout||3e4),p.on("timeout",h),p.once("error",m)},LP}(),d=n,u=i,f=AP,g=function(){if(BP)return UP;BP=1;const e=TP(),t=NP(),i=RP();return UP=class{constructor(e,t){this.mailer=e,this.data={},this.message=null,t=t||{};let i=e.options||{},n=e._defaults||{};Object.keys(t).forEach((e=>{this.data[e]=t[e]})),this.data.headers=this.data.headers||{},Object.keys(n).forEach((e=>{e in this.data?"headers"===e&&Object.keys(n.headers).forEach((e=>{e in this.data.headers||(this.data.headers[e]=n.headers[e])})):this.data[e]=n[e]})),["disableFileAccess","disableUrlAccess","normalizeHeaderKey"].forEach((e=>{e in i&&(this.data[e]=i[e])}))}resolveContent(...t){return e.resolveContent(...t)}resolveAll(n){let s=[[this.data,"html"],[this.data,"text"],[this.data,"watchHtml"],[this.data,"amp"],[this.data,"icalEvent"]];this.data.alternatives&&this.data.alternatives.length&&this.data.alternatives.forEach(((e,t)=>{s.push([this.data.alternatives,t])})),this.data.attachments&&this.data.attachments.length&&this.data.attachments.forEach(((e,t)=>{e.filename||(e.filename=(e.path||e.href||"").split("/").pop().split("?").shift()||"attachment-"+(t+1),e.filename.indexOf(".")<0&&(e.filename+="."+i.detectExtension(e.contentType))),e.contentType||(e.contentType=i.detectMimeType(e.filename||e.path||e.href||"bin")),s.push([this.data.attachments,t])}));let a=new t;["from","to","cc","bcc","sender","replyTo"].forEach((e=>{let t;this.message?t=[].concat(a._parseAddresses(this.message.getHeader("replyTo"===e?"reply-to":e))||[]):this.data[e]&&(t=[].concat(a._parseAddresses(this.data[e])||[])),t&&t.length?this.data[e]=t:e in this.data&&(this.data[e]=null)})),["from","sender"].forEach((e=>{this.data[e]&&(this.data[e]=this.data[e].shift())}));let o=0,r=()=>{if(o>=s.length)return n(null,this.data);let t=s[o++];if(!t[0]||!t[0][t[1]])return r();e.resolveContent(...t,((e,i)=>{if(e)return n(e);let s={content:i};t[0][t[1]]&&"object"==typeof t[0][t[1]]&&!Buffer.isBuffer(t[0][t[1]])&&Object.keys(t[0][t[1]]).forEach((e=>{e in s||["content","path","href","raw"].includes(e)||(s[e]=t[0][t[1]][e])})),t[0][t[1]]=s,r()}))};setImmediate((()=>r()))}normalize(e){let t=this.data.envelope||this.message.getEnvelope(),i=this.message.messageId();this.resolveAll(((n,s)=>n?e(n):(s.envelope=t,s.messageId=i,["html","text","watchHtml","amp"].forEach((e=>{s[e]&&s[e].content&&("string"==typeof s[e].content?s[e]=s[e].content:Buffer.isBuffer(s[e].content)&&(s[e]=s[e].content.toString()))})),s.icalEvent&&Buffer.isBuffer(s.icalEvent.content)&&(s.icalEvent.content=s.icalEvent.content.toString("base64"),s.icalEvent.encoding="base64"),s.alternatives&&s.alternatives.length&&s.alternatives.forEach((e=>{e&&e.content&&Buffer.isBuffer(e.content)&&(e.content=e.content.toString("base64"),e.encoding="base64")})),s.attachments&&s.attachments.length&&s.attachments.forEach((e=>{e&&e.content&&Buffer.isBuffer(e.content)&&(e.content=e.content.toString("base64"),e.encoding="base64")})),s.normalizedHeaders={},Object.keys(s.headers||{}).forEach((e=>{let t=[].concat(s.headers[e]||[]).shift();t=t&&t.value||t,t&&(["references","in-reply-to","message-id","content-id"].includes(e)&&(t=this.message._encodeHeaderValue(e,t)),s.normalizedHeaders[e]=t)})),s.list&&"object"==typeof s.list&&this._getListHeaders(s.list).forEach((e=>{s.normalizedHeaders[e.key]=e.value.map((e=>e&&e.value||e)).join(", ")})),s.references&&(s.normalizedHeaders.references=this.message._encodeHeaderValue("references",s.references)),s.inReplyTo&&(s.normalizedHeaders["in-reply-to"]=this.message._encodeHeaderValue("in-reply-to",s.inReplyTo)),e(null,s))))}setMailerHeader(){this.message&&this.data.xMailer&&this.message.setHeader("X-Mailer",this.data.xMailer)}setPriorityHeaders(){if(this.message&&this.data.priority)switch((this.data.priority||"").toString().toLowerCase()){case"high":this.message.setHeader("X-Priority","1 (Highest)"),this.message.setHeader("X-MSMail-Priority","High"),this.message.setHeader("Importance","High");break;case"low":this.message.setHeader("X-Priority","5 (Lowest)"),this.message.setHeader("X-MSMail-Priority","Low"),this.message.setHeader("Importance","Low")}}setListHeaders(){this.message&&this.data.list&&"object"==typeof this.data.list&&this.data.list&&"object"==typeof this.data.list&&this._getListHeaders(this.data.list).forEach((e=>{e.value.forEach((t=>{this.message.addHeader(e.key,t)}))}))}_getListHeaders(e){return Object.keys(e).map((t=>({key:"list-"+t.toLowerCase().trim(),value:[].concat(e[t]||[]).map((e=>({prepared:!0,foldLines:!0,value:[].concat(e||[]).map((e=>{if("string"==typeof e&&(e={url:e}),e&&e.url){if("id"===t.toLowerCase().trim()){let t=e.comment||"";return t=i.isPlainText(t)?'"'+t+'"':i.encodeWord(t),(e.comment?t+" ":"")+this._formatListUrl(e.url).replace(/^<[^:]+\/{,2}/,"")}let n=e.comment||"";return i.isPlainText(n)||(n=i.encodeWord(n)),this._formatListUrl(e.url)+(e.comment?" ("+n+")":"")}return""})).filter((e=>e)).join(", ")})))})))}_formatListUrl(e){return e=e.replace(/[\s<]+|[\s>]+/g,""),/^(https?|mailto|ftp):/.test(e)?"<"+e+">":/^[^@]+@[^@]+$/.test(e)?"<mailto:"+e+">":"<http://"+e+">"}},UP}(),y=l,x=p,v=m;return HP=class extends e{constructor(e,t,i){super(),this.options=t||{},this._defaults=i||{},this._defaultPlugins={compile:[(...e)=>this._convertDataImages(...e)],stream:[]},this._userPlugins={compile:[],stream:[]},this.meta=new Map,this.dkim=!!this.options.dkim&&new r(this.options.dkim),this.transporter=e,this.transporter.mailer=this,this.logger=s.getLogger(this.options,{component:this.options.component||"mail"}),this.logger.debug({tnx:"create"},"Creating transport: %s",this.getVersionString()),"function"==typeof this.transporter.on&&(this.transporter.on("log",(e=>{this.logger.debug({tnx:"transport"},"%s: %s",e.type,e.message)})),this.transporter.on("error",(e=>{this.logger.error({err:e,tnx:"transport"},"Transport Error: %s",e.message),this.emit("error",e)})),this.transporter.on("idle",((...e)=>{this.emit("idle",...e)}))),["close","isIdle","verify"].forEach((e=>{this[e]=(...t)=>"function"==typeof this.transporter[e]?("verify"===e&&"function"==typeof this.getSocket&&(this.transporter.getSocket=this.getSocket,this.getSocket=!1),this.transporter[e](...t)):(this.logger.warn({tnx:"transport",methodName:e},"Non existing method %s called for transport",e),!1)})),this.options.proxy&&"string"==typeof this.options.proxy&&this.setupProxy(this.options.proxy)}use(e,t){return e=(e||"").toString(),this._userPlugins.hasOwnProperty(e)?this._userPlugins[e].push(t):this._userPlugins[e]=[t],this}sendMail(e,t=null){let i;t||(i=new Promise(((e,i)=>{t=s.callbackPromise(e,i)}))),"function"==typeof this.getSocket&&(this.transporter.getSocket=this.getSocket,this.getSocket=!1);let n=new g(this,e);return this.logger.debug({tnx:"transport",name:this.transporter.name,version:this.transporter.version,action:"send"},"Sending mail using %s/%s",this.transporter.name,this.transporter.version),this._processPlugins("compile",n,(e=>{if(e)return this.logger.error({err:e,tnx:"plugin",action:"compile"},"PluginCompile Error: %s",e.message),t(e);n.message=new o(n.data).compile(),n.setMailerHeader(),n.setPriorityHeaders(),n.setListHeaders(),this._processPlugins("stream",n,(e=>{if(e)return this.logger.error({err:e,tnx:"plugin",action:"stream"},"PluginStream Error: %s",e.message),t(e);(n.data.dkim||this.dkim)&&n.message.processFunc((e=>{let t=n.data.dkim?new r(n.data.dkim):this.dkim;return this.logger.debug({tnx:"DKIM",messageId:n.message.messageId(),dkimDomains:t.keys.map((e=>e.keySelector+"."+e.domainName)).join(", ")},"Signing outgoing message with %s keys",t.keys.length),t.sign(e,n.data._dkim)})),this.transporter.send(n,((...e)=>{e[0]&&this.logger.error({err:e[0],tnx:"transport",action:"send"},"Send Error: %s",e[0].message),t(...e)}))}))})),i}getVersionString(){return d.format("%s (%s; +%s; %s/%s)",f.name,f.version,f.homepage,this.transporter.name,this.transporter.version)}_processPlugins(e,t,i){if(e=(e||"").toString(),!this._userPlugins.hasOwnProperty(e))return i();let n=this._userPlugins[e]||[],s=this._defaultPlugins[e]||[];if(n.length&&this.logger.debug({tnx:"transaction",pluginCount:n.length,step:e},"Using %s plugins for %s",n.length,e),n.length+s.length===0)return i();let a=0,o="default",r=()=>{let e="default"===o?s:n;if(a>=e.length){if("default"!==o||!n.length)return i();o="user",a=0,e=n}(0,e[a++])(t,(e=>{if(e)return i(e);r()}))};r()}setupProxy(e){let t=u.parse(e);this.getSocket=(e,i)=>{let n=t.protocol.replace(/:$/,"").toLowerCase();if(this.meta.has("proxy_handler_"+n))return this.meta.get("proxy_handler_"+n)(t,e,i);switch(n){case"http":case"https":return void c(t.href,e.port,e.host,((e,t)=>e?i(e):i(null,{connection:t})));case"socks":case"socks5":case"socks4":case"socks4a":{if(!this.meta.has("proxy_socks_module"))return i(new Error("Socks module not loaded"));let n=n=>{let s=!!this.meta.get("proxy_socks_module").SocksClient,a=s?this.meta.get("proxy_socks_module").SocksClient:this.meta.get("proxy_socks_module"),o=Number(t.protocol.replace(/\D/g,""))||5,r={proxy:{ipaddress:n,port:Number(t.port),type:o},[s?"destination":"target"]:{host:e.host,port:e.port},command:"connect"};if(t.auth){let e=decodeURIComponent(t.auth.split(":").shift()),i=decodeURIComponent(t.auth.split(":").pop());s?(r.proxy.userId=e,r.proxy.password=i):4===o?r.userid=e:r.authentication={username:e,password:i}}a.createConnection(r,((e,t)=>e?i(e):i(null,{connection:t.socket||t})))};return y.isIP(t.hostname)?n(t.hostname):x.resolve(t.hostname,((e,t)=>{if(e)return i(e);n(Array.isArray(t)?t[0]:t)}))}}i(new Error("Unknown proxy configuration"))}}_convertDataImages(e,t){if(!this.options.attachDataUrls&&!e.data.attachDataUrls||!e.data.html)return t();e.resolveContent(e.data,"html",((i,n)=>{if(i)return t(i);let s=0;n=(n||"").toString().replace(/(<img\b[^<>]{0,1024} src\s{0,20}=[\s"']{0,20})(data:([^;]+);[^"'>\s]+)/gi,((t,i,n,o)=>{let r=v.randomBytes(10).toString("hex")+"@localhost";return e.data.attachments||(e.data.attachments=[]),Array.isArray(e.data.attachments)||(e.data.attachments=[].concat(e.data.attachments||[])),e.data.attachments.push({path:n,cid:r,filename:"image-"+ ++s+"."+a.detectExtension(o)}),i+"cid:"+r})),e.data.html=n,t()}))}set(e,t){return this.meta.set(e,t)}get(e){return this.meta.get(e)}},HP}function n_(){if(KP)return WP;KP=1;const e=AP,i=t.EventEmitter,n=l,s=h,a=d,o=m,r=function(){if(GP)return VP;GP=1;const e=c.Transform;return VP=class extends e{constructor(e){super(e),this.options=e||{},this._curLine="",this.inByteCount=0,this.outByteCount=0,this.lastByte=!1}_transform(e,t,i){let n,s,a,o=[],r=0,c=0;if(!e||!e.length)return i();for("string"==typeof e&&(e=Buffer.from(e)),this.inByteCount+=e.length,n=0,s=e.length;n<s;n++)46===e[n]?(n&&10===e[n-1]||!n&&(!this.lastByte||10===this.lastByte))&&(a=e.slice(c,n+1),o.push(a),o.push(Buffer.from(".")),r+=a.length+1,c=n+1):10===e[n]&&(n&&13!==e[n-1]||!n&&13!==this.lastByte)&&(n>c?(a=e.slice(c,n),o.push(a),r+=a.length+2):r+=2,o.push(Buffer.from("\r\n")),c=n+1);r?(c<e.length&&(a=e.slice(c),o.push(a),r+=a.length),this.outByteCount+=r,this.push(Buffer.concat(o,r))):(this.outByteCount+=e.length,this.push(e)),this.lastByte=e[e.length-1],i()}_flush(e){let t;t=10===this.lastByte?Buffer.from(".\r\n"):13===this.lastByte?Buffer.from("\n.\r\n"):Buffer.from("\r\n.\r\n"),this.outByteCount+=t.length,this.push(t),e()}},VP}(),p=c.PassThrough,u=TP(),f=6e5;return WP=class extends i{constructor(t){super(t),this.id=o.randomBytes(8).toString("base64").replace(/\W/g,""),this.stage="init",this.options=t||{},this.secureConnection=!!this.options.secure,this.alreadySecured=!!this.options.secured,this.port=Number(this.options.port)||(this.secureConnection?465:587),this.host=this.options.host||"localhost",this.servername=this.options.servername?this.options.servername:!n.isIP(this.host)&&this.host,this.allowInternalNetworkInterfaces=this.options.allowInternalNetworkInterfaces||!1,void 0===this.options.secure&&465===this.port&&(this.secureConnection=!0),this.name=this.options.name||this._getHostname(),this.logger=u.getLogger(this.options,{component:this.options.component||"smtp-connection",sid:this.id}),this.customAuth=new Map,Object.keys(this.options.customAuth||{}).forEach((e=>{let t=(e||"").toString().trim().toUpperCase();t&&this.customAuth.set(t,this.options.customAuth[e])})),this.version=e.version,this.authenticated=!1,this.destroyed=!1,this.secure=!!this.secureConnection,this._remainder="",this._responseQueue=[],this.lastServerResponse=!1,this._socket=!1,this._supportedAuth=[],this.allowsAuth=!1,this._envelope=!1,this._supportedExtensions=[],this._maxAllowedSize=0,this._responseActions=[],this._recipientQueue=[],this._greetingTimeout=!1,this._connectionTimeout=!1,this._destroyed=!1,this._closing=!1,this._onSocketData=e=>this._onData(e),this._onSocketError=e=>this._onError(e,"ESOCKET",!1,"CONN"),this._onSocketClose=()=>this._onClose(),this._onSocketEnd=()=>this._onEnd(),this._onSocketTimeout=()=>this._onTimeout()}connect(e){if("function"==typeof e){this.once("connect",(()=>{this.logger.debug({tnx:"smtp"},"SMTP handshake finished"),e()}));const t=this._isDestroyedMessage("connect");if(t)return e(this._formatError(t,"ECONNECTION",!1,"CONN"))}let t={port:this.port,host:this.host,allowInternalNetworkInterfaces:this.allowInternalNetworkInterfaces,timeout:this.options.dnsTimeout||3e4};this.options.localAddress&&(t.localAddress=this.options.localAddress);let i=()=>{this._connectionTimeout=setTimeout((()=>{this._onError("Connection timeout","ETIMEDOUT",!1,"CONN")}),this.options.connectionTimeout||12e4),this._socket.on("error",this._onSocketError)};return this.options.connection?(this._socket=this.options.connection,void(this.secureConnection&&!this.alreadySecured?setImmediate((()=>this._upgradeConnection((e=>{e?this._onError(new Error("Error initiating TLS - "+(e.message||e)),"ETLS",!1,"CONN"):this._onConnect()})))):setImmediate((()=>this._onConnect())))):this.options.socket?(this._socket=this.options.socket,u.resolveHostname(t,((e,n)=>{if(e)return setImmediate((()=>this._onError(e,"EDNS",!1,"CONN")));this.logger.debug({tnx:"dns",source:t.host,resolved:n.host,cached:!!n.cached},"Resolved %s as %s [cache %s]",t.host,n.host,n.cached?"hit":"miss"),Object.keys(n).forEach((e=>{"_"!==e.charAt(0)&&n[e]&&(t[e]=n[e])}));try{this._socket.connect(this.port,this.host,(()=>{this._socket.setKeepAlive(!0),this._onConnect()})),i()}catch(e){return setImmediate((()=>this._onError(e,"ECONNECTION",!1,"CONN")))}}))):this.secureConnection?(this.options.tls&&Object.keys(this.options.tls).forEach((e=>{t[e]=this.options.tls[e]})),this.servername&&!t.servername&&(t.servername=this.servername),u.resolveHostname(t,((e,n)=>{if(e)return setImmediate((()=>this._onError(e,"EDNS",!1,"CONN")));this.logger.debug({tnx:"dns",source:t.host,resolved:n.host,cached:!!n.cached},"Resolved %s as %s [cache %s]",t.host,n.host,n.cached?"hit":"miss"),Object.keys(n).forEach((e=>{"_"!==e.charAt(0)&&n[e]&&(t[e]=n[e])}));try{this._socket=s.connect(t,(()=>{this._socket.setKeepAlive(!0),this._onConnect()})),i()}catch(e){return setImmediate((()=>this._onError(e,"ECONNECTION",!1,"CONN")))}}))):u.resolveHostname(t,((e,s)=>{if(e)return setImmediate((()=>this._onError(e,"EDNS",!1,"CONN")));this.logger.debug({tnx:"dns",source:t.host,resolved:s.host,cached:!!s.cached},"Resolved %s as %s [cache %s]",t.host,s.host,s.cached?"hit":"miss"),Object.keys(s).forEach((e=>{"_"!==e.charAt(0)&&s[e]&&(t[e]=s[e])}));try{this._socket=n.connect(t,(()=>{this._socket.setKeepAlive(!0),this._onConnect()})),i()}catch(e){return setImmediate((()=>this._onError(e,"ECONNECTION",!1,"CONN")))}}))}quit(){this._sendCommand("QUIT"),this._responseActions.push(this.close)}close(){if(clearTimeout(this._connectionTimeout),clearTimeout(this._greetingTimeout),this._responseActions=[],this._closing)return;this._closing=!0;let e="end";"init"===this.stage&&(e="destroy"),this.logger.debug({tnx:"smtp"},'Closing connection to the server using "%s"',e);let t=this._socket&&this._socket.socket||this._socket;if(t&&!t.destroyed)try{this._socket[e]()}catch(e){}this._destroy()}login(e,t){const i=this._isDestroyedMessage("login");if(i)return t(this._formatError(i,"ECONNECTION",!1,"API"));if(this._auth=e||{},this._authMethod=(this._auth.method||"").toString().trim().toUpperCase()||!1,this._authMethod||!this._auth.oauth2||this._auth.credentials?this._authMethod&&("XOAUTH2"!==this._authMethod||this._auth.oauth2)||(this._authMethod=(this._supportedAuth[0]||"PLAIN").toUpperCase().trim()):this._authMethod="XOAUTH2",!("XOAUTH2"===this._authMethod||this._auth.credentials&&this._auth.credentials.user&&this._auth.credentials.pass)){if(!(this._auth.user&&this._auth.pass||this.customAuth.has(this._authMethod)))return t(this._formatError('Missing credentials for "'+this._authMethod+'"',"EAUTH",!1,"API"));this._auth.credentials={user:this._auth.user,pass:this._auth.pass,options:this._auth.options}}if(!this.customAuth.has(this._authMethod)){switch(this._authMethod){case"XOAUTH2":return void this._handleXOauth2Token(!1,t);case"LOGIN":return this._responseActions.push((e=>{this._actionAUTH_LOGIN_USER(e,t)})),void this._sendCommand("AUTH LOGIN");case"PLAIN":return this._responseActions.push((e=>{this._actionAUTHComplete(e,t)})),void this._sendCommand("AUTH PLAIN "+Buffer.from("\0"+this._auth.credentials.user+"\0"+this._auth.credentials.pass,"utf-8").toString("base64"),"AUTH PLAIN "+Buffer.from("\0"+this._auth.credentials.user+"\0/* secret */","utf-8").toString("base64"));case"CRAM-MD5":return this._responseActions.push((e=>{this._actionAUTH_CRAM_MD5(e,t)})),void this._sendCommand("AUTH CRAM-MD5")}return t(this._formatError('Unknown authentication method "'+this._authMethod+'"',"EAUTH",!1,"API"))}{let e,i=this.customAuth.get(this._authMethod),n=!1,s=()=>{n||(n=!0,this.logger.info({tnx:"smtp",username:this._auth.user,action:"authenticated",method:this._authMethod},"User %s authenticated",JSON.stringify(this._auth.user)),this.authenticated=!0,t(null,!0))},a=i=>{n||(n=!0,t(this._formatError(i,"EAUTH",e,"AUTH "+this._authMethod)))},o=i({auth:this._auth,method:this._authMethod,extensions:[].concat(this._supportedExtensions),authMethods:[].concat(this._supportedAuth),maxAllowedSize:this._maxAllowedSize||!1,sendCommand:(t,i)=>{let n;return i||(n=new Promise(((e,t)=>{i=u.callbackPromise(e,t)}))),this._responseActions.push((n=>{e=n;let s=n.match(/^(\d+)(?:\s(\d+\.\d+\.\d+))?\s/),a={command:t,response:n};s?(a.status=Number(s[1])||0,s[2]&&(a.code=s[2]),a.text=n.substr(s[0].length)):(a.text=n,a.status=0),i(null,a)})),setImmediate((()=>this._sendCommand(t))),n},resolve:s,reject:a});o&&"function"==typeof o.catch&&o.then(s).catch(a)}}send(e,t,i){if(!t)return i(this._formatError("Empty message","EMESSAGE",!1,"API"));const n=this._isDestroyedMessage("send message");if(n)return i(this._formatError(n,"ECONNECTION",!1,"API"));if(this._maxAllowedSize&&e.size>this._maxAllowedSize)return setImmediate((()=>{i(this._formatError("Message size larger than allowed "+this._maxAllowedSize,"EMESSAGE",!1,"MAIL FROM"))}));let s=!1,a=function(){s||(s=!0,i(...arguments))};"function"==typeof t.on&&t.on("error",(e=>a(this._formatError(e,"ESTREAM",!1,"API"))));let o=Date.now();this._setEnvelope(e,((e,i)=>{if(e){let i=new p;return"function"==typeof t.pipe?t.pipe(i):(i.write(t),i.end()),a(e)}let n=Date.now(),s=this._createSendStream(((e,t)=>e?a(e):(i.envelopeTime=n-o,i.messageTime=Date.now()-n,i.messageSize=s.outByteCount,i.response=t,a(null,i))));"function"==typeof t.pipe?t.pipe(s):(s.write(t),s.end())}))}reset(e){this._sendCommand("RSET"),this._responseActions.push((t=>"2"!==t.charAt(0)?e(this._formatError("Could not reset session state. response="+t,"EPROTOCOL",t,"RSET")):(this._envelope=!1,e(null,!0))))}_onConnect(){clearTimeout(this._connectionTimeout),this.logger.info({tnx:"network",localAddress:this._socket.localAddress,localPort:this._socket.localPort,remoteAddress:this._socket.remoteAddress,remotePort:this._socket.remotePort},"%s established to %s:%s",this.secure?"Secure connection":"Connection",this._socket.remoteAddress,this._socket.remotePort),this._destroyed?this.close():(this.stage="connected",this._socket.removeListener("data",this._onSocketData),this._socket.removeListener("timeout",this._onSocketTimeout),this._socket.removeListener("close",this._onSocketClose),this._socket.removeListener("end",this._onSocketEnd),this._socket.on("data",this._onSocketData),this._socket.once("close",this._onSocketClose),this._socket.once("end",this._onSocketEnd),this._socket.setTimeout(this.options.socketTimeout||f),this._socket.on("timeout",this._onSocketTimeout),this._greetingTimeout=setTimeout((()=>{this._socket&&!this._destroyed&&this._responseActions[0]===this._actionGreeting&&this._onError("Greeting never received","ETIMEDOUT",!1,"CONN")}),this.options.greetingTimeout||3e4),this._responseActions.push(this._actionGreeting),this._socket.resume())}_onData(e){if(this._destroyed||!e||!e.length)return;let t,i=(e||"").toString("binary"),n=(this._remainder+i).split(/\r?\n/);this._remainder=n.pop();for(let e=0,i=n.length;e<i;e++)this._responseQueue.length&&(t=this._responseQueue[this._responseQueue.length-1],/^\d+-/.test(t.split("\n").pop()))?this._responseQueue[this._responseQueue.length-1]+="\n"+n[e]:this._responseQueue.push(n[e]);this._responseQueue.length&&(t=this._responseQueue[this._responseQueue.length-1],/^\d+-/.test(t.split("\n").pop()))||this._processResponse()}_onError(e,t,i,n){clearTimeout(this._connectionTimeout),clearTimeout(this._greetingTimeout),this._destroyed||(e=this._formatError(e,t,i,n),this.logger.error(i,e.message),this.emit("error",e),this.close())}_formatError(e,t,i,n){let s;s=/Error\]$/i.test(Object.prototype.toString.call(e))?e:new Error(e),t&&"Error"!==t&&(s.code=t),i&&(s.response=i,s.message+=": "+i);let a="string"==typeof i&&Number((i.match(/^\d+/)||[])[0])||!1;return a&&(s.responseCode=a),n&&(s.command=n),s}_onClose(){let e=!1;return this._remainder&&this._remainder.trim()&&((this.options.debug||this.options.transactionLog)&&this.logger.debug({tnx:"server"},this._remainder.replace(/\r?\n$/,"")),this.lastServerResponse=e=this._remainder.trim()),this.logger.info({tnx:"network"},"Connection closed"),this.upgrading&&!this._destroyed?this._onError(new Error("Connection closed unexpectedly"),"ETLS",e,"CONN"):[this._actionGreeting,this.close].includes(this._responseActions[0])||this._destroyed?/^[45]\d{2}\b/.test(e)?this._onError(new Error("Connection closed unexpectedly"),"ECONNECTION",e,"CONN"):void this._destroy():this._onError(new Error("Connection closed unexpectedly"),"ECONNECTION",e,"CONN")}_onEnd(){this._socket&&!this._socket.destroyed&&this._socket.destroy()}_onTimeout(){return this._onError(new Error("Timeout"),"ETIMEDOUT",!1,"CONN")}_destroy(){this._destroyed||(this._destroyed=!0,this.emit("end"))}_upgradeConnection(e){this._socket.removeListener("data",this._onSocketData),this._socket.removeListener("timeout",this._onSocketTimeout);let t=this._socket,i={socket:this._socket,host:this.host};Object.keys(this.options.tls||{}).forEach((e=>{i[e]=this.options.tls[e]})),this.servername&&!i.servername&&(i.servername=this.servername),this.upgrading=!0;try{this._socket=s.connect(i,(()=>(this.secure=!0,this.upgrading=!1,this._socket.on("data",this._onSocketData),t.removeListener("close",this._onSocketClose),t.removeListener("end",this._onSocketEnd),e(null,!0))))}catch(t){return e(t)}this._socket.on("error",this._onSocketError),this._socket.once("close",this._onSocketClose),this._socket.once("end",this._onSocketEnd),this._socket.setTimeout(this.options.socketTimeout||f),this._socket.on("timeout",this._onSocketTimeout),t.resume()}_processResponse(){if(!this._responseQueue.length)return!1;let e=this.lastServerResponse=(this._responseQueue.shift()||"").toString();if(/^\d+-/.test(e.split("\n").pop()))return;(this.options.debug||this.options.transactionLog)&&this.logger.debug({tnx:"server"},e.replace(/\r?\n$/,"")),e.trim()||setImmediate((()=>this._processResponse()));let t=this._responseActions.shift();if("function"!=typeof t)return this._onError(new Error("Unexpected Response"),"EPROTOCOL",e,"CONN");t.call(this,e),setImmediate((()=>this._processResponse()))}_sendCommand(e,t){if(!this._destroyed){if(this._socket.destroyed)return this.close();(this.options.debug||this.options.transactionLog)&&this.logger.debug({tnx:"client"},(t||e||"").toString().replace(/\r?\n$/,"")),this._socket.write(Buffer.from(e+"\r\n","utf-8"))}}_setEnvelope(e,t){let i=[],n=!1;if(this._envelope=e||{},this._envelope.from=(this._envelope.from&&this._envelope.from.address||this._envelope.from||"").toString().trim(),this._envelope.to=[].concat(this._envelope.to||[]).map((e=>(e&&e.address||e||"").toString().trim())),!this._envelope.to.length)return t(this._formatError("No recipients defined","EENVELOPE",!1,"API"));if(this._envelope.from&&/[\r\n<>]/.test(this._envelope.from))return t(this._formatError("Invalid sender "+JSON.stringify(this._envelope.from),"EENVELOPE",!1,"API"));/[\x80-\uFFFF]/.test(this._envelope.from)&&(n=!0);for(let e=0,i=this._envelope.to.length;e<i;e++){if(!this._envelope.to[e]||/[\r\n<>]/.test(this._envelope.to[e]))return t(this._formatError("Invalid recipient "+JSON.stringify(this._envelope.to[e]),"EENVELOPE",!1,"API"));/[\x80-\uFFFF]/.test(this._envelope.to[e])&&(n=!0)}if(this._envelope.rcptQueue=JSON.parse(JSON.stringify(this._envelope.to||[])),this._envelope.rejected=[],this._envelope.rejectedErrors=[],this._envelope.accepted=[],this._envelope.dsn)try{this._envelope.dsn=this._setDsnEnvelope(this._envelope.dsn)}catch(e){return t(this._formatError("Invalid DSN "+e.message,"EENVELOPE",!1,"API"))}this._responseActions.push((e=>{this._actionMAIL(e,t)})),n&&this._supportedExtensions.includes("SMTPUTF8")&&(i.push("SMTPUTF8"),this._usingSmtpUtf8=!0),this._envelope.use8BitMime&&this._supportedExtensions.includes("8BITMIME")&&(i.push("BODY=8BITMIME"),this._using8BitMime=!0),this._envelope.size&&this._supportedExtensions.includes("SIZE")&&i.push("SIZE="+this._envelope.size),this._envelope.dsn&&this._supportedExtensions.includes("DSN")&&(this._envelope.dsn.ret&&i.push("RET="+u.encodeXText(this._envelope.dsn.ret)),this._envelope.dsn.envid&&i.push("ENVID="+u.encodeXText(this._envelope.dsn.envid))),this._sendCommand("MAIL FROM:<"+this._envelope.from+">"+(i.length?" "+i.join(" "):""))}_setDsnEnvelope(e){let t=(e.ret||e.return||"").toString().toUpperCase()||null;if(t)switch(t){case"HDRS":case"HEADERS":t="HDRS";break;case"FULL":case"BODY":t="FULL"}if(t&&!["FULL","HDRS"].includes(t))throw new Error("ret: "+JSON.stringify(t));let i=(e.envid||e.id||"").toString()||null,n=e.notify||null;if(n){"string"==typeof n&&(n=n.split(",")),n=n.map((e=>e.trim().toUpperCase()));let e=["NEVER","SUCCESS","FAILURE","DELAY"],t=n.filter((t=>!e.includes(t)));if(t.length||n.length>1&&n.includes("NEVER"))throw new Error("notify: "+JSON.stringify(n.join(",")));n=n.join(",")}let s=(e.recipient||e.orcpt||"").toString()||null;return s&&s.indexOf(";")<0&&(s="rfc822;"+s),{ret:t,envid:i,notify:n,orcpt:s}}_getDsnRcptToArgs(){let e=[];return this._envelope.dsn&&this._supportedExtensions.includes("DSN")&&(this._envelope.dsn.notify&&e.push("NOTIFY="+u.encodeXText(this._envelope.dsn.notify)),this._envelope.dsn.orcpt&&e.push("ORCPT="+u.encodeXText(this._envelope.dsn.orcpt))),e.length?" "+e.join(" "):""}_createSendStream(e){let t,i=new r;return this.options.lmtp?this._envelope.accepted.forEach(((t,i)=>{let n=i===this._envelope.accepted.length-1;this._responseActions.push((i=>{this._actionLMTPStream(t,n,i,e)}))})):this._responseActions.push((t=>{this._actionSMTPStream(t,e)})),i.pipe(this._socket,{end:!1}),this.options.debug&&(t=new p,t.on("readable",(()=>{let e;for(;e=t.read();)this.logger.debug({tnx:"message"},e.toString("binary").replace(/\r?\n$/,""))})),i.pipe(t)),i.once("end",(()=>{this.logger.info({tnx:"message",inByteCount:i.inByteCount,outByteCount:i.outByteCount},"<%s bytes encoded mime message (source size %s bytes)>",i.outByteCount,i.inByteCount)})),i}_actionGreeting(e){clearTimeout(this._greetingTimeout),"220"===e.substr(0,3)?this.options.lmtp?(this._responseActions.push(this._actionLHLO),this._sendCommand("LHLO "+this.name)):(this._responseActions.push(this._actionEHLO),this._sendCommand("EHLO "+this.name)):this._onError(new Error("Invalid greeting. response="+e),"EPROTOCOL",e,"CONN")}_actionLHLO(e){"2"===e.charAt(0)?this._actionEHLO(e):this._onError(new Error("Invalid LHLO. response="+e),"EPROTOCOL",e,"LHLO")}_actionEHLO(e){let t;if("421"!==e.substr(0,3)){if("2"!==e.charAt(0))return this.options.requireTLS?void this._onError(new Error("EHLO failed but HELO does not support required STARTTLS. response="+e),"ECONNECTION",e,"EHLO"):(this._responseActions.push(this._actionHELO),void this._sendCommand("HELO "+this.name));if(this._ehloLines=e.split(/\r?\n/).map((e=>e.replace(/^\d+[ -]/,"").trim())).filter((e=>e)).slice(1),!this.secure&&!this.options.ignoreTLS&&(/[ -]STARTTLS\b/im.test(e)||this.options.requireTLS))return this._sendCommand("STARTTLS"),void this._responseActions.push(this._actionSTARTTLS);/[ -]SMTPUTF8\b/im.test(e)&&this._supportedExtensions.push("SMTPUTF8"),/[ -]DSN\b/im.test(e)&&this._supportedExtensions.push("DSN"),/[ -]8BITMIME\b/im.test(e)&&this._supportedExtensions.push("8BITMIME"),/[ -]PIPELINING\b/im.test(e)&&this._supportedExtensions.push("PIPELINING"),/[ -]AUTH\b/i.test(e)&&(this.allowsAuth=!0),/[ -]AUTH(?:(\s+|=)[^\n]*\s+|\s+|=)PLAIN/i.test(e)&&this._supportedAuth.push("PLAIN"),/[ -]AUTH(?:(\s+|=)[^\n]*\s+|\s+|=)LOGIN/i.test(e)&&this._supportedAuth.push("LOGIN"),/[ -]AUTH(?:(\s+|=)[^\n]*\s+|\s+|=)CRAM-MD5/i.test(e)&&this._supportedAuth.push("CRAM-MD5"),/[ -]AUTH(?:(\s+|=)[^\n]*\s+|\s+|=)XOAUTH2/i.test(e)&&this._supportedAuth.push("XOAUTH2"),(t=e.match(/[ -]SIZE(?:[ \t]+(\d+))?/im))&&(this._supportedExtensions.push("SIZE"),this._maxAllowedSize=Number(t[1])||0),this.emit("connect")}else this._onError(new Error("Server terminates connection. response="+e),"ECONNECTION",e,"EHLO")}_actionHELO(e){"2"===e.charAt(0)?(this.allowsAuth=!0,this.emit("connect")):this._onError(new Error("Invalid HELO. response="+e),"EPROTOCOL",e,"HELO")}_actionSTARTTLS(e){if("2"!==e.charAt(0))return this.options.opportunisticTLS?(this.logger.info({tnx:"smtp"},"Failed STARTTLS upgrade, continuing unencrypted"),this.emit("connect")):void this._onError(new Error("Error upgrading connection with STARTTLS"),"ETLS",e,"STARTTLS");this._upgradeConnection(((e,t)=>{e?this._onError(new Error("Error initiating TLS - "+(e.message||e)),"ETLS",!1,"STARTTLS"):(this.logger.info({tnx:"smtp"},"Connection upgraded with STARTTLS"),t?this.options.lmtp?(this._responseActions.push(this._actionLHLO),this._sendCommand("LHLO "+this.name)):(this._responseActions.push(this._actionEHLO),this._sendCommand("EHLO "+this.name)):this.emit("connect"))}))}_actionAUTH_LOGIN_USER(e,t){/^334[ -]/.test(e)?(this._responseActions.push((e=>{this._actionAUTH_LOGIN_PASS(e,t)})),this._sendCommand(Buffer.from(this._auth.credentials.user+"","utf-8").toString("base64"))):t(this._formatError('Invalid login sequence while waiting for "334 VXNlcm5hbWU6"',"EAUTH",e,"AUTH LOGIN"))}_actionAUTH_CRAM_MD5(e,t){let i=e.match(/^334\s+(.+)$/),n="";if(!i)return t(this._formatError("Invalid login sequence while waiting for server challenge string","EAUTH",e,"AUTH CRAM-MD5"));n=i[1];let s=Buffer.from(n,"base64").toString("ascii"),a=o.createHmac("md5",this._auth.credentials.pass);a.update(s);let r=this._auth.credentials.user+" "+a.digest("hex");this._responseActions.push((e=>{this._actionAUTH_CRAM_MD5_PASS(e,t)})),this._sendCommand(Buffer.from(r).toString("base64"),Buffer.from(this._auth.credentials.user+" /* secret */").toString("base64"))}_actionAUTH_CRAM_MD5_PASS(e,t){if(!e.match(/^235\s+/))return t(this._formatError('Invalid login sequence while waiting for "235"',"EAUTH",e,"AUTH CRAM-MD5"));this.logger.info({tnx:"smtp",username:this._auth.user,action:"authenticated",method:this._authMethod},"User %s authenticated",JSON.stringify(this._auth.user)),this.authenticated=!0,t(null,!0)}_actionAUTH_LOGIN_PASS(e,t){if(!/^334[ -]/.test(e))return t(this._formatError('Invalid login sequence while waiting for "334 UGFzc3dvcmQ6"',"EAUTH",e,"AUTH LOGIN"));this._responseActions.push((e=>{this._actionAUTHComplete(e,t)})),this._sendCommand(Buffer.from((this._auth.credentials.pass||"").toString(),"utf-8").toString("base64"),Buffer.from("/* secret */","utf-8").toString("base64"))}_actionAUTHComplete(e,t,i){return i||"function"!=typeof t||(i=t,t=!1),"334"===e.substr(0,3)?(this._responseActions.push((e=>{t||"XOAUTH2"!==this._authMethod?this._actionAUTHComplete(e,!0,i):setImmediate((()=>this._handleXOauth2Token(!0,i)))})),void this._sendCommand("")):"2"!==e.charAt(0)?(this.logger.info({tnx:"smtp",username:this._auth.user,action:"authfail",method:this._authMethod},"User %s failed to authenticate",JSON.stringify(this._auth.user)),i(this._formatError("Invalid login","EAUTH",e,"AUTH "+this._authMethod))):(this.logger.info({tnx:"smtp",username:this._auth.user,action:"authenticated",method:this._authMethod},"User %s authenticated",JSON.stringify(this._auth.user)),this.authenticated=!0,void i(null,!0))}_actionMAIL(e,t){let i,n;if(2!==Number(e.charAt(0)))return i=this._usingSmtpUtf8&&/^550 /.test(e)&&/[\x80-\uFFFF]/.test(this._envelope.from)?"Internationalized mailbox name not allowed":"Mail command failed",t(this._formatError(i,"EENVELOPE",e,"MAIL FROM"));if(!this._envelope.rcptQueue.length)return t(this._formatError("Can't send mail - no recipients defined","EENVELOPE",!1,"API"));if(this._recipientQueue=[],this._supportedExtensions.includes("PIPELINING"))for(;this._envelope.rcptQueue.length;)n=this._envelope.rcptQueue.shift(),this._recipientQueue.push(n),this._responseActions.push((e=>{this._actionRCPT(e,t)})),this._sendCommand("RCPT TO:<"+n+">"+this._getDsnRcptToArgs());else n=this._envelope.rcptQueue.shift(),this._recipientQueue.push(n),this._responseActions.push((e=>{this._actionRCPT(e,t)})),this._sendCommand("RCPT TO:<"+n+">"+this._getDsnRcptToArgs())}_actionRCPT(e,t){let i,n,s=this._recipientQueue.shift();if(2!==Number(e.charAt(0))?(i=this._usingSmtpUtf8&&/^553 /.test(e)&&/[\x80-\uFFFF]/.test(s)?"Internationalized mailbox name not allowed":"Recipient command failed",this._envelope.rejected.push(s),n=this._formatError(i,"EENVELOPE",e,"RCPT TO"),n.recipient=s,this._envelope.rejectedErrors.push(n)):this._envelope.accepted.push(s),this._envelope.rcptQueue.length||this._recipientQueue.length)this._envelope.rcptQueue.length&&(s=this._envelope.rcptQueue.shift(),this._recipientQueue.push(s),this._responseActions.push((e=>{this._actionRCPT(e,t)})),this._sendCommand("RCPT TO:<"+s+">"+this._getDsnRcptToArgs()));else{if(!(this._envelope.rejected.length<this._envelope.to.length))return n=this._formatError("Can't send mail - all recipients were rejected","EENVELOPE",e,"RCPT TO"),n.rejected=this._envelope.rejected,n.rejectedErrors=this._envelope.rejectedErrors,t(n);this._responseActions.push((e=>{this._actionDATA(e,t)})),this._sendCommand("DATA")}}_actionDATA(e,t){if(!/^[23]/.test(e))return t(this._formatError("Data command failed","EENVELOPE",e,"DATA"));let i={accepted:this._envelope.accepted,rejected:this._envelope.rejected};this._ehloLines&&this._ehloLines.length&&(i.ehlo=this._ehloLines),this._envelope.rejectedErrors.length&&(i.rejectedErrors=this._envelope.rejectedErrors),t(null,i)}_actionSMTPStream(e,t){return 2!==Number(e.charAt(0))?t(this._formatError("Message failed","EMESSAGE",e,"DATA")):t(null,e)}_actionLMTPStream(e,t,i,n){let s;if(2!==Number(i.charAt(0))){s=this._formatError("Message failed for recipient "+e,"EMESSAGE",i,"DATA"),s.recipient=e,this._envelope.rejected.push(e),this._envelope.rejectedErrors.push(s);for(let t=0,i=this._envelope.accepted.length;t<i;t++)this._envelope.accepted[t]===e&&this._envelope.accepted.splice(t,1)}if(t)return n(null,i)}_handleXOauth2Token(e,t){this._auth.oauth2.getToken(e,((i,n)=>{if(i)return this.logger.info({tnx:"smtp",username:this._auth.user,action:"authfail",method:this._authMethod},"User %s failed to authenticate",JSON.stringify(this._auth.user)),t(this._formatError(i,"EAUTH",!1,"AUTH XOAUTH2"));this._responseActions.push((i=>{this._actionAUTHComplete(i,e,t)})),this._sendCommand("AUTH XOAUTH2 "+this._auth.oauth2.buildXOAuth2Token(n),"AUTH XOAUTH2 "+this._auth.oauth2.buildXOAuth2Token("/* secret */"))}))}_isDestroyedMessage(e){if(this._destroyed)return"Cannot "+e+" - smtp connection is already destroyed.";if(this._socket){if(this._socket.destroyed)return"Cannot "+e+" - smtp connection socket is already destroyed.";if(!this._socket.writable)return"Cannot "+e+" - smtp connection socket is already half-closed."}}_getHostname(){let e;try{e=a.hostname()||""}catch(t){e="localhost"}return(!e||e.indexOf(".")<0)&&(e="[127.0.0.1]"),e.match(/^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$/)&&(e="["+e+"]"),e}},WP}function s_(){if(XP)return QP;XP=1;const e=c.Stream,t=IP(),i=m,n=TP();return QP=class extends e{constructor(e,t){if(super(),this.options=e||{},e&&e.serviceClient){if(!e.privateKey||!e.user)return void setImmediate((()=>this.emit("error",new Error('Options "privateKey" and "user" are required for service account!'))));let t=Math.min(Math.max(Number(this.options.serviceRequestTimeout)||0,0),3600);this.options.serviceRequestTimeout=t||300}if(this.logger=n.getLogger({logger:t},{component:this.options.component||"OAuth2"}),this.provisionCallback="function"==typeof this.options.provisionCallback&&this.options.provisionCallback,this.options.accessUrl=this.options.accessUrl||"https://accounts.google.com/o/oauth2/token",this.options.customHeaders=this.options.customHeaders||{},this.options.customParams=this.options.customParams||{},this.accessToken=this.options.accessToken||!1,this.options.expires&&Number(this.options.expires))this.expires=this.options.expires;else{let e=Math.max(Number(this.options.timeout)||0,0);this.expires=e&&Date.now()+1e3*e||0}}getToken(e,t){if(!e&&this.accessToken&&(!this.expires||this.expires>Date.now()))return t(null,this.accessToken);let i=(...e)=>{e[0]?this.logger.error({err:e[0],tnx:"OAUTH2",user:this.options.user,action:"renew"},"Failed generating new Access Token for %s",this.options.user):this.logger.info({tnx:"OAUTH2",user:this.options.user,action:"renew"},"Generated new Access Token for %s",this.options.user),t(...e)};this.provisionCallback?this.provisionCallback(this.options.user,!!e,((e,t,n)=>{!e&&t&&(this.accessToken=t,this.expires=n||0),i(e,t)})):this.generateToken(i)}updateToken(e,t){this.accessToken=e,t=Math.max(Number(t)||0,0),this.expires=t&&Date.now()+1e3*t||0,this.emit("token",{user:this.options.user,accessToken:e||"",expires:this.expires})}generateToken(e){let t,i;if(this.options.serviceClient){let n,s=Math.floor(Date.now()/1e3),a={iss:this.options.serviceClient,scope:this.options.scope||"https://mail.google.com/",sub:this.options.user,aud:this.options.accessUrl,iat:s,exp:s+this.options.serviceRequestTimeout};try{n=this.jwtSignRS256(a)}catch(t){return e(new Error("Can't generate token. Check your auth options"))}t={grant_type:"urn:ietf:params:oauth:grant-type:jwt-bearer",assertion:n},i={grant_type:"urn:ietf:params:oauth:grant-type:jwt-bearer",assertion:a}}else{if(!this.options.refreshToken)return e(new Error("Can't create new access token for user"));t={client_id:this.options.clientId||"",client_secret:this.options.clientSecret||"",refresh_token:this.options.refreshToken,grant_type:"refresh_token"},i={client_id:this.options.clientId||"",client_secret:(this.options.clientSecret||"").substr(0,6)+"...",refresh_token:(this.options.refreshToken||"").substr(0,6)+"...",grant_type:"refresh_token"}}Object.keys(this.options.customParams).forEach((e=>{t[e]=this.options.customParams[e],i[e]=this.options.customParams[e]})),this.logger.debug({tnx:"OAUTH2",user:this.options.user,action:"generate"},"Requesting token using: %s",JSON.stringify(i)),this.postRequest(this.options.accessUrl,t,this.options,((t,i)=>{let n;if(t)return e(t);try{n=JSON.parse(i.toString())}catch(t){return e(t)}if(!n||"object"!=typeof n)return this.logger.debug({tnx:"OAUTH2",user:this.options.user,action:"post"},"Response: %s",(i||"").toString()),e(new Error("Invalid authentication response"));let s={};if(Object.keys(n).forEach((e=>{s[e]="access_token"!==e?n[e]:(n[e]||"").toString().substr(0,6)+"..."})),this.logger.debug({tnx:"OAUTH2",user:this.options.user,action:"post"},"Response: %s",JSON.stringify(s)),n.error){let t=n.error;return n.error_description&&(t+=": "+n.error_description),n.error_uri&&(t+=" ("+n.error_uri+")"),e(new Error(t))}return n.access_token?(this.updateToken(n.access_token,n.expires_in),e(null,this.accessToken)):e(new Error("No access token"))}))}buildXOAuth2Token(e){let t=["user="+(this.options.user||""),"auth=Bearer "+(e||this.accessToken),"",""];return Buffer.from(t.join(""),"utf-8").toString("base64")}postRequest(e,i,n,s){let a=!1,o=[],r=0,c=t(e,{method:"post",headers:n.customHeaders,body:i,allowErrorResponse:!0});c.on("readable",(()=>{let e;for(;null!==(e=c.read());)o.push(e),r+=e.length})),c.once("error",(e=>{if(!a)return a=!0,s(e)})),c.once("end",(()=>{if(!a)return a=!0,s(null,Buffer.concat(o,r))}))}toBase64URL(e){return"string"==typeof e&&(e=Buffer.from(e)),e.toString("base64").replace(/[=]+/g,"").replace(/\+/g,"-").replace(/\//g,"_")}jwtSignRS256(e){e=['{"alg":"RS256","typ":"JWT"}',JSON.stringify(e)].map((e=>this.toBase64URL(e))).join(".");let t=i.createSign("RSA-SHA256").update(e).sign(this.options.privateKey);return e+"."+this.toBase64URL(t)}},QP}var a_,o_,r_,c_,l_,p_,d_,u_,m_,h_,f_,g_,y_,x_,v_,w_={126:{host:"smtp.126.com",port:465,secure:!0},163:{host:"smtp.163.com",port:465,secure:!0},"1und1":{host:"smtp.1und1.de",port:465,secure:!0,authMethod:"LOGIN"},Aliyun:{domains:["aliyun.com"],host:"smtp.aliyun.com",port:465,secure:!0},AOL:{domains:["aol.com"],host:"smtp.aol.com",port:587},Bluewin:{host:"smtpauths.bluewin.ch",domains:["bluewin.ch"],port:465},DebugMail:{host:"debugmail.io",port:25},DynectEmail:{aliases:["Dynect"],host:"smtp.dynect.net",port:25},Ethereal:{aliases:["ethereal.email"],host:"smtp.ethereal.email",port:587},FastMail:{domains:["fastmail.fm"],host:"smtp.fastmail.com",port:465,secure:!0},"Forward Email":{aliases:["FE","ForwardEmail"],domains:["forwardemail.net"],host:"smtp.forwardemail.net",port:465,secure:!0},"Feishu Mail":{aliases:["Feishu","FeishuMail"],domains:["www.feishu.cn"],host:"smtp.feishu.cn",port:465,secure:!0},GandiMail:{aliases:["Gandi","Gandi Mail"],host:"mail.gandi.net",port:587},Gmail:{aliases:["Google Mail"],domains:["gmail.com","googlemail.com"],host:"smtp.gmail.com",port:465,secure:!0},Godaddy:{host:"smtpout.secureserver.net",port:25},GodaddyAsia:{host:"smtp.asia.secureserver.net",port:25},GodaddyEurope:{host:"smtp.europe.secureserver.net",port:25},"hot.ee":{host:"mail.hot.ee"},Hotmail:{aliases:["Outlook","Outlook.com","Hotmail.com"],domains:["hotmail.com","outlook.com"],host:"smtp-mail.outlook.com",port:587},iCloud:{aliases:["Me","Mac"],domains:["me.com","mac.com"],host:"smtp.mail.me.com",port:587},Infomaniak:{host:"mail.infomaniak.com",domains:["ik.me","ikmail.com","etik.com"],port:587},Loopia:{host:"mailcluster.loopia.se",port:465},"mail.ee":{host:"smtp.mail.ee"},"Mail.ru":{host:"smtp.mail.ru",port:465,secure:!0},"Mailcatch.app":{host:"sandbox-smtp.mailcatch.app",port:2525},Maildev:{port:1025,ignoreTLS:!0},Mailgun:{host:"smtp.mailgun.org",port:465,secure:!0},Mailjet:{host:"in.mailjet.com",port:587},Mailosaur:{host:"mailosaur.io",port:25},Mailtrap:{host:"live.smtp.mailtrap.io",port:587},Mandrill:{host:"smtp.mandrillapp.com",port:587},Naver:{host:"smtp.naver.com",port:587},One:{host:"send.one.com",port:465,secure:!0},OpenMailBox:{aliases:["OMB","openmailbox.org"],host:"smtp.openmailbox.org",port:465,secure:!0},Outlook365:{host:"smtp.office365.com",port:587,secure:!1},OhMySMTP:{host:"smtp.ohmysmtp.com",port:587,secure:!1},Postmark:{aliases:["PostmarkApp"],host:"smtp.postmarkapp.com",port:2525},"qiye.aliyun":{host:"smtp.mxhichina.com",port:"465",secure:!0},QQ:{domains:["qq.com"],host:"smtp.qq.com",port:465,secure:!0},QQex:{aliases:["QQ Enterprise"],domains:["exmail.qq.com"],host:"smtp.exmail.qq.com",port:465,secure:!0},SendCloud:{host:"smtp.sendcloud.net",port:2525},SendGrid:{host:"smtp.sendgrid.net",port:587},SendinBlue:{aliases:["Brevo"],host:"smtp-relay.brevo.com",port:587},SendPulse:{host:"smtp-pulse.com",port:465,secure:!0},SES:{host:"email-smtp.us-east-1.amazonaws.com",port:465,secure:!0},"SES-US-EAST-1":{host:"email-smtp.us-east-1.amazonaws.com",port:465,secure:!0},"SES-US-WEST-2":{host:"email-smtp.us-west-2.amazonaws.com",port:465,secure:!0},"SES-EU-WEST-1":{host:"email-smtp.eu-west-1.amazonaws.com",port:465,secure:!0},"SES-AP-SOUTH-1":{host:"email-smtp.ap-south-1.amazonaws.com",port:465,secure:!0},"SES-AP-NORTHEAST-1":{host:"email-smtp.ap-northeast-1.amazonaws.com",port:465,secure:!0},"SES-AP-NORTHEAST-2":{host:"email-smtp.ap-northeast-2.amazonaws.com",port:465,secure:!0},"SES-AP-NORTHEAST-3":{host:"email-smtp.ap-northeast-3.amazonaws.com",port:465,secure:!0},"SES-AP-SOUTHEAST-1":{host:"email-smtp.ap-southeast-1.amazonaws.com",port:465,secure:!0},"SES-AP-SOUTHEAST-2":{host:"email-smtp.ap-southeast-2.amazonaws.com",port:465,secure:!0},Sparkpost:{aliases:["SparkPost","SparkPost Mail"],domains:["sparkpost.com"],host:"smtp.sparkpostmail.com",port:587,secure:!1},Tipimail:{host:"smtp.tipimail.com",port:587},Yahoo:{domains:["yahoo.com"],host:"smtp.mail.yahoo.com",port:465,secure:!0},Yandex:{domains:["yandex.ru"],host:"smtp.yandex.ru",port:465,secure:!0},Zoho:{host:"smtp.zoho.com",port:465,secure:!0,authMethod:"LOGIN"}};function b_(){if(o_)return a_;o_=1;const e=w_,t={};function i(e){return e.replace(/[^a-zA-Z0-9.-]/g,"").toLowerCase()}function n(e){let t=["domains","aliases"],i={};return Object.keys(e).forEach((n=>{t.indexOf(n)<0&&(i[n]=e[n])})),i}return Object.keys(e).forEach((s=>{let a=e[s];t[i(s)]=n(a),[].concat(a.aliases||[]).forEach((e=>{t[i(e)]=n(a)})),[].concat(a.domains||[]).forEach((e=>{t[i(e)]=n(a)}))})),a_=function(e){return e=i(e.split("@").pop()),t[e]||!1}}function E_(){if(c_)return r_;c_=1;const e=t,i=function(){if(YP)return JP;YP=1;const e=n_(),i=TP().assign,n=s_(),s=t;return JP=class extends s{constructor(e){if(super(),this.pool=e,this.options=e.options,this.logger=this.pool.logger,this.options.auth)switch((this.options.auth.type||"").toString().toUpperCase()){case"OAUTH2":{let e=new n(this.options.auth,this.logger);e.provisionCallback=this.pool.mailer&&this.pool.mailer.get("oauth2_provision_cb")||e.provisionCallback,this.auth={type:"OAUTH2",user:this.options.auth.user,oauth2:e,method:"XOAUTH2"},e.on("token",(e=>this.pool.mailer.emit("token",e))),e.on("error",(e=>this.emit("error",e)));break}default:if(!this.options.auth.user&&!this.options.auth.pass)break;this.auth={type:(this.options.auth.type||"").toString().toUpperCase()||"LOGIN",user:this.options.auth.user,credentials:{user:this.options.auth.user||"",pass:this.options.auth.pass,options:this.options.auth.options},method:(this.options.auth.method||"").trim().toUpperCase()||this.options.authMethod||!1}}this._connection=!1,this._connected=!1,this.messages=0,this.available=!0}connect(t){this.pool.getSocket(this.options,((n,s)=>{if(n)return t(n);let a=!1,o=this.options;s&&s.connection&&(this.logger.info({tnx:"proxy",remoteAddress:s.connection.remoteAddress,remotePort:s.connection.remotePort,destHost:o.host||"",destPort:o.port||"",action:"connected"},"Using proxied socket from %s:%s to %s:%s",s.connection.remoteAddress,s.connection.remotePort,o.host||"",o.port||""),o=i(!1,o),Object.keys(s).forEach((e=>{o[e]=s[e]}))),this.connection=new e(o),this.connection.once("error",(e=>{if(this.emit("error",e),!a)return a=!0,t(e)})),this.connection.once("end",(()=>{if(this.close(),a)return;a=!0;let e=setTimeout((()=>{if(a)return;let e=new Error("Unexpected socket close");this.connection&&this.connection._socket&&this.connection._socket.upgrading&&(e.code="ETLS"),t(e)}),1e3);try{e.unref()}catch(e){}})),this.connection.connect((()=>{if(!a)return this.auth&&(this.connection.allowsAuth||o.forceAuth)?void this.connection.login(this.auth,(e=>{if(!a){if(a=!0,e)return this.connection.close(),this.emit("error",e),t(e);this._connected=!0,t(null,!0)}})):(a=!0,this._connected=!0,t(null,!0))}))}))}send(e,t){if(!this._connected)return this.connect((i=>i?t(i):this.send(e,t)));let i=e.message.getEnvelope(),n=e.message.messageId(),s=[].concat(i.to||[]);s.length>3&&s.push("...and "+s.splice(2).length+" more"),this.logger.info({tnx:"send",messageId:n,cid:this.id},"Sending message %s using #%s to <%s>",n,this.id,s.join(", ")),e.data.dsn&&(i.dsn=e.data.dsn),this.connection.send(i,e.message.createReadStream(),((e,s)=>{if(this.messages++,e)return this.connection.close(),this.emit("error",e),t(e);s.envelope={from:i.from,to:i.to},s.messageId=n,setImmediate((()=>{let e;this.messages>=this.options.maxMessages?(e=new Error("Resource exhausted"),e.code="EMAXLIMIT",this.connection.close(),this.emit("error",e)):this.pool._checkRateLimit((()=>{this.available=!0,this.emit("available")}))})),t(null,s)}))}close(){this._connected=!1,this.auth&&this.auth.oauth2&&this.auth.oauth2.removeAllListeners(),this.connection&&this.connection.close(),this.emit("close")}}}(),n=n_(),s=b_(),a=TP(),o=AP;return r_=class extends e{constructor(e){let t;super(),"string"==typeof(e=e||{})&&(e={url:e});let i=e.service;"function"==typeof e.getSocket&&(this.getSocket=e.getSocket),e.url&&(t=a.parseConnectionUrl(e.url),i=i||t.service),this.options=a.assign(!1,e,t,i&&s(i)),this.options.maxConnections=this.options.maxConnections||5,this.options.maxMessages=this.options.maxMessages||100,this.logger=a.getLogger(this.options,{component:this.options.component||"smtp-pool"});let r=new n(this.options);this.name="SMTP (pool)",this.version=o.version+"[client:"+r.version+"]",this._rateLimit={counter:0,timeout:null,waiting:[],checkpoint:!1,delta:Number(this.options.rateDelta)||1e3,limit:Number(this.options.rateLimit)||0},this._closed=!1,this._queue=[],this._connections=[],this._connectionCounter=0,this.idling=!0,setImmediate((()=>{this.idling&&this.emit("idle")}))}getSocket(e,t){return setImmediate((()=>t(null,!1)))}send(e,t){return!this._closed&&(this._queue.push({mail:e,requeueAttempts:0,callback:t}),this.idling&&this._queue.length>=this.options.maxConnections&&(this.idling=!1),setImmediate((()=>this._processMessages())),!0)}close(){let e,t=this._connections.length;if(this._closed=!0,clearTimeout(this._rateLimit.timeout),!t&&!this._queue.length)return;for(let i=t-1;i>=0;i--)this._connections[i]&&this._connections[i].available&&(e=this._connections[i],e.close(),this.logger.info({tnx:"connection",cid:e.id,action:"removed"},"Connection #%s removed",e.id));if(t&&!this._connections.length&&this.logger.debug({tnx:"connection"},"All connections removed"),!this._queue.length)return;let i=()=>{if(!this._queue.length)return void this.logger.debug({tnx:"connection"},"Pending queue entries cleared");let t=this._queue.shift();if(t&&"function"==typeof t.callback)try{t.callback(new Error("Connection pool was closed"))}catch(t){this.logger.error({err:t,tnx:"callback",cid:e.id},"Callback error for #%s: %s",e.id,t.message)}setImmediate(i)};setImmediate(i)}_processMessages(){let e,t,i;if(this._closed)return;if(!this._queue.length)return void(this.idling||(this.idling=!0,this.emit("idle")));for(t=0,i=this._connections.length;t<i;t++)if(this._connections[t].available){e=this._connections[t];break}if(!e&&this._connections.length<this.options.maxConnections&&(e=this._createConnection()),!e)return void(this.idling=!1);!this.idling&&this._queue.length<this.options.maxConnections&&(this.idling=!0,this.emit("idle"));let n=e.queueEntry=this._queue.shift();n.messageId=(e.queueEntry.mail.message.getHeader("message-id")||"").replace(/[<>\s]/g,""),e.available=!1,this.logger.debug({tnx:"pool",cid:e.id,messageId:n.messageId,action:"assign"},"Assigned message <%s> to #%s (%s)",n.messageId,e.id,e.messages+1),this._rateLimit.limit&&(this._rateLimit.counter++,this._rateLimit.checkpoint||(this._rateLimit.checkpoint=Date.now())),e.send(n.mail,((t,i)=>{if(n===e.queueEntry){try{n.callback(t,i)}catch(t){this.logger.error({err:t,tnx:"callback",cid:e.id},"Callback error for #%s: %s",e.id,t.message)}e.queueEntry=!1}}))}_createConnection(){let e=new i(this);return e.id=++this._connectionCounter,this.logger.info({tnx:"pool",cid:e.id,action:"conection"},"Created new pool resource #%s",e.id),e.on("available",(()=>{this.logger.debug({tnx:"connection",cid:e.id,action:"available"},"Connection #%s became available",e.id),this._closed?this.close():this._processMessages()})),e.once("error",(t=>{if("EMAXLIMIT"!==t.code?this.logger.error({err:t,tnx:"pool",cid:e.id},"Pool Error for #%s: %s",e.id,t.message):this.logger.debug({tnx:"pool",cid:e.id,action:"maxlimit"},"Max messages limit exchausted for #%s",e.id),e.queueEntry){try{e.queueEntry.callback(t)}catch(t){this.logger.error({err:t,tnx:"callback",cid:e.id},"Callback error for #%s: %s",e.id,t.message)}e.queueEntry=!1}this._removeConnection(e),this._continueProcessing()})),e.once("close",(()=>{this.logger.info({tnx:"connection",cid:e.id,action:"closed"},"Connection #%s was closed",e.id),this._removeConnection(e),e.queueEntry?setTimeout((()=>{e.queueEntry&&(this._shouldRequeuOnConnectionClose(e.queueEntry)?this._requeueEntryOnConnectionClose(e):this._failDeliveryOnConnectionClose(e)),this._continueProcessing()}),50):this._continueProcessing()})),this._connections.push(e),e}_shouldRequeuOnConnectionClose(e){return void 0===this.options.maxRequeues||this.options.maxRequeues<0||e.requeueAttempts<this.options.maxRequeues}_failDeliveryOnConnectionClose(e){if(e.queueEntry&&e.queueEntry.callback){try{e.queueEntry.callback(new Error("Reached maximum number of retries after connection was closed"))}catch(t){this.logger.error({err:t,tnx:"callback",messageId:e.queueEntry.messageId,cid:e.id},"Callback error for #%s: %s",e.id,t.message)}e.queueEntry=!1}}_requeueEntryOnConnectionClose(e){e.queueEntry.requeueAttempts=e.queueEntry.requeueAttempts+1,this.logger.debug({tnx:"pool",cid:e.id,messageId:e.queueEntry.messageId,action:"requeue"},"Re-queued message <%s> for #%s. Attempt: #%s",e.queueEntry.messageId,e.id,e.queueEntry.requeueAttempts),this._queue.unshift(e.queueEntry),e.queueEntry=!1}_continueProcessing(){this._closed?this.close():setTimeout((()=>this._processMessages()),100)}_removeConnection(e){let t=this._connections.indexOf(e);-1!==t&&this._connections.splice(t,1)}_checkRateLimit(e){if(!this._rateLimit.limit)return e();let t=Date.now();return this._rateLimit.counter<this._rateLimit.limit?e():(this._rateLimit.waiting.push(e),this._rateLimit.checkpoint<=t-this._rateLimit.delta?this._clearRateLimit():void(this._rateLimit.timeout||(this._rateLimit.timeout=setTimeout((()=>this._clearRateLimit()),this._rateLimit.delta-(t-this._rateLimit.checkpoint)),this._rateLimit.checkpoint=t)))}_clearRateLimit(){for(clearTimeout(this._rateLimit.timeout),this._rateLimit.timeout=null,this._rateLimit.counter=0,this._rateLimit.checkpoint=!1;this._rateLimit.waiting.length;){let e=this._rateLimit.waiting.shift();setImmediate(e)}}isIdle(){return this.idling}verify(e){let t;e||(t=new Promise(((t,i)=>{e=a.callbackPromise(t,i)})));let s=new i(this).auth;return this.getSocket(this.options,((t,i)=>{if(t)return e(t);let o=this.options;i&&i.connection&&(this.logger.info({tnx:"proxy",remoteAddress:i.connection.remoteAddress,remotePort:i.connection.remotePort,destHost:o.host||"",destPort:o.port||"",action:"connected"},"Using proxied socket from %s:%s to %s:%s",i.connection.remoteAddress,i.connection.remotePort,o.host||"",o.port||""),o=a.assign(!1,o),Object.keys(i).forEach((e=>{o[e]=i[e]})));let r=new n(o),c=!1;r.once("error",(t=>{if(!c)return c=!0,r.close(),e(t)})),r.once("end",(()=>{if(!c)return c=!0,e(new Error("Connection closed"))}));let l=()=>{if(!c)return c=!0,r.quit(),e(null,!0)};r.connect((()=>{if(!c)if(s&&(r.allowsAuth||o.forceAuth))r.login(s,(t=>{if(!c)return t?(c=!0,r.close(),e(t)):void l()}));else{if(!s&&r.allowsAuth&&o.forceAuth){let t=new Error("Authentication info was not provided");return t.code="NoAuth",c=!0,r.close(),e(t)}l()}}))})),t}},r_}function S_(){if(x_)return y_;x_=1;const e=t,i=AP,n=TP(),s=MP();return y_=class extends e{constructor(e){super(),e=e||{},this.options=e||{},this.ses=this.options.SES,this.name="SESTransport",this.version=i.version,this.logger=n.getLogger(this.options,{component:this.options.component||"ses-transport"}),this.maxConnections=Number(this.options.maxConnections)||1/0,this.connections=0,this.sendingRate=Number(this.options.sendingRate)||1/0,this.sendingRateTTL=null,this.rateInterval=1e3,this.rateMessages=[],this.pending=[],this.idling=!0,setImmediate((()=>{this.idling&&this.emit("idle")}))}send(e,t){return this.connections>=this.maxConnections?(this.idling=!1,this.pending.push({mail:e,callback:t})):this._checkSendingRate()?void this._send(e,((...e)=>{setImmediate((()=>t(...e))),this._sent()})):(this.idling=!1,this.pending.push({mail:e,callback:t}))}_checkRatedQueue(){if(this.connections>=this.maxConnections||!this._checkSendingRate())return;if(!this.pending.length)return void(this.idling||(this.idling=!0,this.emit("idle")));let e=this.pending.shift();this._send(e.mail,((...t)=>{setImmediate((()=>e.callback(...t))),this._sent()}))}_checkSendingRate(){clearTimeout(this.sendingRateTTL);let e=Date.now(),t=!1;for(let i=this.rateMessages.length-1;i>=0;i--)this.rateMessages[i].ts>=e-this.rateInterval&&(!t||this.rateMessages[i].ts<t)&&(t=this.rateMessages[i].ts),this.rateMessages[i].ts<e-this.rateInterval&&!this.rateMessages[i].pending&&this.rateMessages.splice(i,1);if(this.rateMessages.length<this.sendingRate)return!0;let i=Math.max(t+1001,e+20);this.sendingRateTTL=setTimeout((()=>this._checkRatedQueue()),e-i);try{this.sendingRateTTL.unref()}catch(e){}return!1}_sent(){this.connections--,this._checkRatedQueue()}isIdle(){return this.idling}_send(e,t){let i={ts:Date.now(),pending:!0};this.connections++,this.rateMessages.push(i);let n=e.data.envelope||e.message.getEnvelope(),a=e.message.messageId(),o=[].concat(n.to||[]);o.length>3&&o.push("...and "+o.splice(2).length+" more"),this.logger.info({tnx:"send",messageId:a},"Sending message %s to <%s>",a,o.join(", "));setImmediate((()=>(t=>{e.data._dkim||(e.data._dkim={}),e.data._dkim.skipFields&&"string"==typeof e.data._dkim.skipFields?e.data._dkim.skipFields+=":date:message-id":e.data._dkim.skipFields="date:message-id";let i=e.message.createReadStream(),n=i.pipe(new s),a=[],o=0;n.on("readable",(()=>{let e;for(;null!==(e=n.read());)a.push(e),o+=e.length})),i.once("error",(e=>n.emit("error",e))),n.once("error",(e=>{t(e)})),n.once("end",(()=>t(null,Buffer.concat(a,o))))})(((s,o)=>{if(s)return this.logger.error({err:s,tnx:"send",messageId:a},"Failed creating message for %s. %s",a,s.message),i.pending=!1,t(s);let r={RawMessage:{Data:o},Source:n.from,Destinations:n.to};Object.keys(e.data.ses||{}).forEach((t=>{r[t]=e.data.ses[t]}));let c=(this.ses.aws?this.ses.ses:this.ses)||{},l=this.ses.aws||{};var p;p=(e,s)=>{let p;!e&&s||(s="us-east-1"),p="function"==typeof c.send&&l.SendRawEmailCommand?c.send(new l.SendRawEmailCommand(r)):c.sendRawEmail(r).promise(),p.then((e=>{"us-east-1"===s&&(s="email"),i.pending=!1,t(null,{envelope:{from:n.from,to:n.to},messageId:"<"+e.MessageId+(/@/.test(e.MessageId)?"":"@"+s+".amazonses.com")+">",response:e.MessageId,raw:o})})).catch((e=>{this.logger.error({err:e,tnx:"send"},"Send error for %s: %s",a,e.message),i.pending=!1,t(e)}))},c.config&&"function"==typeof c.config.region?c.config.region().then((e=>p(null,e))).catch((e=>p(e))):p(null,c.config&&c.config.region||"us-east-1")}))))}verify(e){let t,i=(this.ses.aws?this.ses.ses:this.ses)||{},s=this.ses.aws||{};const a={RawMessage:{Data:"From: invalid@invalid\r\nTo: invalid@invalid\r\n Subject: Invalid\r\n\r\nInvalid"},Source:"invalid@invalid",Destinations:["invalid@invalid"]};e||(t=new Promise(((t,i)=>{e=n.callbackPromise(t,i)})));const o=t=>t&&"InvalidParameterValue"!==(t.code||t.Code)?e(t):e(null,!0);return"function"==typeof i.send&&s.SendRawEmailCommand?(a.RawMessage.Data=Buffer.from(a.RawMessage.Data),i.send(new s.SendRawEmailCommand(a),o)):i.sendRawEmail(a,o),t}},y_}var C_=function(){if(v_)return KO;v_=1;const e=i_(),i=TP(),n=E_(),s=function(){if(p_)return l_;p_=1;const e=t,i=n_(),n=b_(),s=TP(),a=s_(),o=AP;return l_=class extends e{constructor(e){let t;super(),"string"==typeof(e=e||{})&&(e={url:e});let a=e.service;"function"==typeof e.getSocket&&(this.getSocket=e.getSocket),e.url&&(t=s.parseConnectionUrl(e.url),a=a||t.service),this.options=s.assign(!1,e,t,a&&n(a)),this.logger=s.getLogger(this.options,{component:this.options.component||"smtp-transport"});let r=new i(this.options);this.name="SMTP",this.version=o.version+"[client:"+r.version+"]",this.options.auth&&(this.auth=this.getAuth({}))}getSocket(e,t){return setImmediate((()=>t(null,!1)))}getAuth(e){if(!e)return this.auth;let t=!1,i={};if(this.options.auth&&"object"==typeof this.options.auth&&Object.keys(this.options.auth).forEach((e=>{t=!0,i[e]=this.options.auth[e]})),e&&"object"==typeof e&&Object.keys(e).forEach((n=>{t=!0,i[n]=e[n]})),!t)return!1;if("OAUTH2"===(i.type||"").toString().toUpperCase()){if(!i.service&&!i.user)return!1;let e=new a(i,this.logger);return e.provisionCallback=this.mailer&&this.mailer.get("oauth2_provision_cb")||e.provisionCallback,e.on("token",(e=>this.mailer.emit("token",e))),e.on("error",(e=>this.emit("error",e))),{type:"OAUTH2",user:i.user,oauth2:e,method:"XOAUTH2"}}return{type:(i.type||"").toString().toUpperCase()||"LOGIN",user:i.user,credentials:{user:i.user||"",pass:i.pass,options:i.options},method:(i.method||"").trim().toUpperCase()||this.options.authMethod||!1}}send(e,t){this.getSocket(this.options,((n,a)=>{if(n)return t(n);let o=!1,r=this.options;a&&a.connection&&(this.logger.info({tnx:"proxy",remoteAddress:a.connection.remoteAddress,remotePort:a.connection.remotePort,destHost:r.host||"",destPort:r.port||"",action:"connected"},"Using proxied socket from %s:%s to %s:%s",a.connection.remoteAddress,a.connection.remotePort,r.host||"",r.port||""),r=s.assign(!1,r),Object.keys(a).forEach((e=>{r[e]=a[e]})));let c=new i(r);c.once("error",(e=>{if(!o)return o=!0,c.close(),t(e)})),c.once("end",(()=>{if(o)return;let e=setTimeout((()=>{if(o)return;o=!0;let e=new Error("Unexpected socket close");c&&c._socket&&c._socket.upgrading&&(e.code="ETLS"),t(e)}),1e3);try{e.unref()}catch(e){}}));let l=()=>{let i=e.message.getEnvelope(),n=e.message.messageId(),s=[].concat(i.to||[]);s.length>3&&s.push("...and "+s.splice(2).length+" more"),e.data.dsn&&(i.dsn=e.data.dsn),this.logger.info({tnx:"send",messageId:n},"Sending message %s to <%s>",n,s.join(", ")),c.send(i,e.message.createReadStream(),((e,s)=>{if(o=!0,c.close(),e)return this.logger.error({err:e,tnx:"send"},"Send error for %s: %s",n,e.message),t(e);s.envelope={from:i.from,to:i.to},s.messageId=n;try{return t(null,s)}catch(e){this.logger.error({err:e,tnx:"callback"},"Callback error for %s: %s",n,e.message)}}))};c.connect((()=>{if(o)return;let i=this.getAuth(e.data.auth);i&&(c.allowsAuth||r.forceAuth)?c.login(i,(e=>{if(i&&i!==this.auth&&i.oauth2&&i.oauth2.removeAllListeners(),!o)return e?(o=!0,c.close(),t(e)):void l()})):l()}))}))}verify(e){let t;return e||(t=new Promise(((t,i)=>{e=s.callbackPromise(t,i)}))),this.getSocket(this.options,((t,n)=>{if(t)return e(t);let a=this.options;n&&n.connection&&(this.logger.info({tnx:"proxy",remoteAddress:n.connection.remoteAddress,remotePort:n.connection.remotePort,destHost:a.host||"",destPort:a.port||"",action:"connected"},"Using proxied socket from %s:%s to %s:%s",n.connection.remoteAddress,n.connection.remotePort,a.host||"",a.port||""),a=s.assign(!1,a),Object.keys(n).forEach((e=>{a[e]=n[e]})));let o=new i(a),r=!1;o.once("error",(t=>{if(!r)return r=!0,o.close(),e(t)})),o.once("end",(()=>{if(!r)return r=!0,e(new Error("Connection closed"))}));let c=()=>{if(!r)return r=!0,o.quit(),e(null,!0)};o.connect((()=>{if(r)return;let t=this.getAuth({});if(t&&(o.allowsAuth||a.forceAuth))o.login(t,(t=>{if(!r)return t?(r=!0,o.close(),e(t)):void c()}));else{if(!t&&o.allowsAuth&&a.forceAuth){let t=new Error("Authentication info was not provided");return t.code="NoAuth",r=!0,o.close(),e(t)}c()}}))})),t}close(){this.auth&&this.auth.oauth2&&this.auth.oauth2.removeAllListeners(),this.emit("close")}}}(),a=function(){if(u_)return d_;u_=1;const e=f.spawn,t=AP,i=TP();return d_=class{constructor(n){n=n||{},this._spawn=e,this.options=n||{},this.name="Sendmail",this.version=t.version,this.path="sendmail",this.args=!1,this.winbreak=!1,this.logger=i.getLogger(this.options,{component:this.options.component||"sendmail"}),n&&("string"==typeof n?this.path=n:"object"==typeof n&&(n.path&&(this.path=n.path),Array.isArray(n.args)&&(this.args=n.args),this.winbreak=["win","windows","dos","\r\n"].includes((n.newline||"").toString().toLowerCase())))}send(e,t){e.message.keepBcc=!0;let i,n,s,a=e.data.envelope||e.message.getEnvelope(),o=e.message.messageId();if([].concat(a.from||[]).concat(a.to||[]).some((e=>/^-/.test(e))))return t(new Error("Can not send mail. Invalid envelope addresses."));i=this.args?["-i"].concat(this.args).concat(a.to):["-i"].concat(a.from?["-f",a.from]:[]).concat(a.to);let r=i=>{if(!s)return s=!0,"function"==typeof t?i?t(i):t(null,{envelope:e.data.envelope||e.message.getEnvelope(),messageId:o,response:"Messages queued for delivery"}):void 0};try{n=this._spawn(this.path,i)}catch(e){return this.logger.error({err:e,tnx:"spawn",messageId:o},"Error occurred while spawning sendmail. %s",e.message),r(e)}if(!n)return r(new Error("sendmail was not found"));{n.on("error",(e=>{this.logger.error({err:e,tnx:"spawn",messageId:o},"Error occurred when sending message %s. %s",o,e.message),r(e)})),n.once("exit",(e=>{if(!e)return r();let t;t=127===e?new Error("Sendmail command not found, process exited with code "+e):new Error("Sendmail exited with code "+e),this.logger.error({err:t,tnx:"stdin",messageId:o},"Error sending message %s to sendmail. %s",o,t.message),r(t)})),n.once("close",r),n.stdin.on("error",(e=>{this.logger.error({err:e,tnx:"stdin",messageId:o},"Error occurred when piping message %s to sendmail. %s",o,e.message),r(e)}));let t=[].concat(a.to||[]);t.length>3&&t.push("...and "+t.splice(2).length+" more"),this.logger.info({tnx:"send",messageId:o},"Sending message %s to <%s>",o,t.join(", "));let i=e.message.createReadStream();i.once("error",(e=>{this.logger.error({err:e,tnx:"stdin",messageId:o},"Error occurred when generating message %s. %s",o,e.message),n.kill("SIGINT"),r(e)})),i.pipe(n.stdin)}}}}(),o=function(){if(h_)return m_;h_=1;const e=AP,t=TP();return m_=class{constructor(i){i=i||{},this.options=i||{},this.name="StreamTransport",this.version=e.version,this.logger=t.getLogger(this.options,{component:this.options.component||"stream-transport"}),this.winbreak=["win","windows","dos","\r\n"].includes((i.newline||"").toString().toLowerCase())}send(e,t){e.message.keepBcc=!0;let i=e.data.envelope||e.message.getEnvelope(),n=e.message.messageId(),s=[].concat(i.to||[]);s.length>3&&s.push("...and "+s.splice(2).length+" more"),this.logger.info({tnx:"send",messageId:n},"Sending message %s to <%s> using %s line breaks",n,s.join(", "),this.winbreak?"<CR><LF>":"<LF>"),setImmediate((()=>{let i;try{i=e.message.createReadStream()}catch(e){return this.logger.error({err:e,tnx:"send",messageId:n},"Creating send stream failed for %s. %s",n,e.message),t(e)}if(!this.options.buffer)return i.once("error",(e=>{this.logger.error({err:e,tnx:"send",messageId:n},"Failed creating message for %s. %s",n,e.message)})),t(null,{envelope:e.data.envelope||e.message.getEnvelope(),messageId:n,message:i});let s=[],a=0;i.on("readable",(()=>{let e;for(;null!==(e=i.read());)s.push(e),a+=e.length})),i.once("error",(e=>(this.logger.error({err:e,tnx:"send",messageId:n},"Failed creating message for %s. %s",n,e.message),t(e)))),i.on("end",(()=>t(null,{envelope:e.data.envelope||e.message.getEnvelope(),messageId:n,message:Buffer.concat(s,a)})))}))}}}(),r=function(){if(g_)return f_;g_=1;const e=AP,t=TP();return f_=class{constructor(i){i=i||{},this.options=i||{},this.name="JSONTransport",this.version=e.version,this.logger=t.getLogger(this.options,{component:this.options.component||"json-transport"})}send(e,t){e.message.keepBcc=!0;let i=e.data.envelope||e.message.getEnvelope(),n=e.message.messageId(),s=[].concat(i.to||[]);s.length>3&&s.push("...and "+s.splice(2).length+" more"),this.logger.info({tnx:"send",messageId:n},"Composing JSON structure of %s to <%s>",n,s.join(", ")),setImmediate((()=>{e.normalize(((e,s)=>e?(this.logger.error({err:e,tnx:"send",messageId:n},"Failed building JSON structure for %s. %s",n,e.message),t(e)):(delete s.envelope,delete s.normalizedHeaders,t(null,{envelope:i,messageId:n,message:this.options.skipEncoding?s:JSON.stringify(s)}))))}))}}}(),c=S_(),l=IP(),p=AP,d=(process.env.ETHEREAL_API||"https://api.nodemailer.com").replace(/\/+$/,""),u=(process.env.ETHEREAL_WEB||"https://ethereal.email").replace(/\/+$/,""),m=(process.env.ETHEREAL_API_KEY||"").replace(/\s*/g,"")||null,h=["true","yes","y","1"].includes((process.env.ETHEREAL_CACHE||"yes").toString().trim().toLowerCase());let g=!1;return KO.createTransport=function(t,l){let p,d,u;return("object"==typeof t&&"function"!=typeof t.send||"string"==typeof t&&/^(smtps?|direct):/i.test(t))&&(d=(p="string"==typeof t?t:t.url)?i.parseConnectionUrl(p):t,t=d.pool?new n(d):d.sendmail?new a(d):d.streamTransport?new o(d):d.jsonTransport?new r(d):d.SES?new c(d):new s(d)),u=new e(t,d,l),u},KO.createTestAccount=function(e,t){let n;if(t||"function"!=typeof e||(t=e,e=!1),t||(n=new Promise(((e,n)=>{t=i.callbackPromise(e,n)}))),h&&g)return setImmediate((()=>t(null,g))),n;e=e||d;let s=[],a=0,o={},r={requestor:p.name,version:p.version};m&&(o.Authorization="Bearer "+m);let c=l(e+"/user",{contentType:"application/json",method:"POST",headers:o,body:Buffer.from(JSON.stringify(r))});return c.on("readable",(()=>{let e;for(;null!==(e=c.read());)s.push(e),a+=e.length})),c.once("error",(e=>t(e))),c.once("end",(()=>{let e,i,n=Buffer.concat(s,a);try{e=JSON.parse(n.toString())}catch(e){i=e}return i?t(i):"success"!==e.status||e.error?t(new Error(e.error||"Request failed")):(delete e.status,g=e,void t(null,g))})),n},KO.getTestMessageUrl=function(e){if(!e||!e.response)return!1;let t=new Map;return e.response.replace(/\[([^\]]+)\]$/,((e,i)=>{i.replace(/\b([A-Z0-9]+)=([^\s]+)/g,((e,i,n)=>{t.set(i,n)}))})),!(!t.has("STATUS")||!t.has("MSGID"))&&(g.web||u)+"/message/"+t.get("MSGID")},KO}();const A_={clientConfig:{region:"eu-west-1"}};e.DEFAULT_PARAMETER_STORE_CLIENT_CONFIG=Qh,e.DEFAULT_SES_CLIENT_CONFIG=A_,e.lambda=e=>{const{clientConfig:t,...i}={...bc,...e},n=new vo(t);return{invokeLambda:(e,t)=>(async(e,t,i,n)=>{try{const s=new uc({FunctionName:t.functionName,InvocationType:i,Payload:Buffer.from(JSON.stringify(n))}),a=await e.send(s);return t.logger&&t.logger("info",JSON.stringify(a)),!0}catch(e){return t.logger&&t.logger("error",e),!1}})(n,i,e,t)}},e.parameterStore=e=>{const{clientConfig:t,...i}={...Qh,...e},n=new $l(t);return{getSecret:(e,t="")=>(async(e,t,i,n)=>{if(t.onlyDefault)return n;try{const s=await e.send(new Wh({Name:`${t.prefix??""}${i}`,WithDecryption:!0}));return s?.Parameter?.Value??n}catch(e){return t.logger&&t.logger("error",e),n}})(n,i,e,t),getSecrets:(e,t="")=>(async(e,t,i,n)=>{if(t.onlyDefault)return[n];try{const s=new Kh({Names:i.map((e=>`${t.prefix??""}${e}`)),WithDecryption:!0}),a=await e.send(s);return a?.Parameters?.map((e=>e.Value??n))??[n]}catch(e){return t.logger&&t.logger("error",e),[n]}})(n,i,e,t)}},e.ses=(e,t)=>{const{clientConfig:i,...n}={...A_,...t},s=new kf(i),a=C_.createTransport(t.customSMTPConfig??{SES:{aws:WO,ses:s}});return{sendMail:t=>(async(e,t,i,n)=>{if(!i.html&&!i.text)return e.logger&&e.logger("error","The option text or html needs to be set."),!1;if(!i.to||!i.subject)return e.logger&&e.logger("error","The fields to and subject have to be set."),!1;const s=await t.sendMail({from:n,...i});return e.logger&&e.logger("info",`Transporter response: ${JSON.stringify(s)}`),!!s||(e.logger&&e.logger("error","Sending email failed!"),!1)})(n,a,t,e)}}}));
|